2024-04-17 11:32:24 +02:00
/******/ ( ( ) => { // webpackBootstrap
2022-06-16 14:03:35 +02:00
/******/ var _ _webpack _modules _ _ = ( {
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
/***/ 287 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ fL : ( ) => ( /* binding */ pascalCase ) ,
/* harmony export */ l3 : ( ) => ( /* binding */ pascalCaseTransform )
/* harmony export */ } ) ;
/* unused harmony export pascalCaseTransformMerge */
/* harmony import */ var tslib _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1635 ) ;
/* harmony import */ var no _case _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 2226 ) ;
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
function pascalCaseTransform ( input , index ) {
var firstChar = input . charAt ( 0 ) ;
var lowerChars = input . substr ( 1 ) . toLowerCase ( ) ;
if ( index > 0 && firstChar >= "0" && firstChar <= "9" ) {
return "_" + firstChar + lowerChars ;
}
return "" + firstChar . toUpperCase ( ) + lowerChars ;
2019-11-02 10:38:58 +01:00
}
2025-12-12 13:15:55 +01:00
function pascalCaseTransformMerge ( input ) {
return input . charAt ( 0 ) . toUpperCase ( ) + input . slice ( 1 ) . toLowerCase ( ) ;
2019-11-02 10:38:58 +01:00
}
2025-12-12 13:15:55 +01:00
function pascalCase ( input , options ) {
if ( options === void 0 ) { options = { } ; }
return ( 0 , no _case _ _WEBPACK _IMPORTED _MODULE _0 _ _ /* .noCase */ . W ) ( input , ( 0 , tslib _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .__assign */ . Cl ) ( { delimiter : "" , transform : pascalCaseTransform } , options ) ) ;
2020-09-15 14:29:22 +02:00
}
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ 533 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ A : ( ) => ( /* binding */ get _normalized _comma _separable _default )
/* harmony export */ } ) ;
function getNormalizedCommaSeparable ( value ) {
if ( typeof value === "string" ) {
return value . split ( "," ) ;
} else if ( Array . isArray ( value ) ) {
return value ;
}
return null ;
}
var get _normalized _comma _separable _default = getNormalizedCommaSeparable ;
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ 1455 :
/***/ ( ( module ) => {
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
module . exports = window [ "wp" ] [ "apiFetch" ] ;
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
/***/ 1635 :
/***/ ( ( _ _unused _webpack _ _ _webpack _module _ _ , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ Cl : ( ) => ( /* binding */ _ _assign )
/* harmony export */ } ) ;
/* unused harmony exports __extends, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources, __rewriteRelativeImportExtension */
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright ( c ) Microsoft Corporation .
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
Permission to use , copy , modify , and / or distribute this software for any
purpose with or without fee is hereby granted .
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS . IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL , DIRECT ,
INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE , DATA OR PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR
OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
var extendStatics = function ( d , b ) {
extendStatics = Object . setPrototypeOf ||
( { _ _proto _ _ : [ ] } instanceof Array && function ( d , b ) { d . _ _proto _ _ = b ; } ) ||
function ( d , b ) { for ( var p in b ) if ( Object . prototype . hasOwnProperty . call ( b , p ) ) d [ p ] = b [ p ] ; } ;
return extendStatics ( d , b ) ;
} ;
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _extends ( d , b ) {
if ( typeof b !== "function" && b !== null )
throw new TypeError ( "Class extends value " + String ( b ) + " is not a constructor or null" ) ;
extendStatics ( d , b ) ;
function _ _ ( ) { this . constructor = d ; }
d . prototype = b === null ? Object . create ( b ) : ( _ _ . prototype = b . prototype , new _ _ ( ) ) ;
2019-11-02 10:38:58 +01:00
}
2025-12-12 13:15:55 +01:00
var _ _assign = function ( ) {
_ _assign = Object . assign || function _ _assign ( t ) {
for ( var s , i = 1 , n = arguments . length ; i < n ; i ++ ) {
s = arguments [ i ] ;
for ( var p in s ) if ( Object . prototype . hasOwnProperty . call ( s , p ) ) t [ p ] = s [ p ] ;
}
return t ;
}
return _ _assign . apply ( this , arguments ) ;
}
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _rest ( s , e ) {
var t = { } ;
for ( var p in s ) if ( Object . prototype . hasOwnProperty . call ( s , p ) && e . indexOf ( p ) < 0 )
t [ p ] = s [ p ] ;
if ( s != null && typeof Object . getOwnPropertySymbols === "function" )
for ( var i = 0 , p = Object . getOwnPropertySymbols ( s ) ; i < p . length ; i ++ ) {
if ( e . indexOf ( p [ i ] ) < 0 && Object . prototype . propertyIsEnumerable . call ( s , p [ i ] ) )
t [ p [ i ] ] = s [ p [ i ] ] ;
}
return t ;
}
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _decorate ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
}
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _param ( paramIndex , decorator ) {
return function ( target , key ) { decorator ( target , key , paramIndex ) ; }
}
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _esDecorate ( ctor , descriptorIn , decorators , contextIn , initializers , extraInitializers ) {
function accept ( f ) { if ( f !== void 0 && typeof f !== "function" ) throw new TypeError ( "Function expected" ) ; return f ; }
var kind = contextIn . kind , key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value" ;
var target = ! descriptorIn && ctor ? contextIn [ "static" ] ? ctor : ctor . prototype : null ;
var descriptor = descriptorIn || ( target ? Object . getOwnPropertyDescriptor ( target , contextIn . name ) : { } ) ;
var _ , done = false ;
for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) {
var context = { } ;
for ( var p in contextIn ) context [ p ] = p === "access" ? { } : contextIn [ p ] ;
for ( var p in contextIn . access ) context . access [ p ] = contextIn . access [ p ] ;
context . addInitializer = function ( f ) { if ( done ) throw new TypeError ( "Cannot add initializers after decoration has completed" ) ; extraInitializers . push ( accept ( f || null ) ) ; } ;
var result = ( 0 , decorators [ i ] ) ( kind === "accessor" ? { get : descriptor . get , set : descriptor . set } : descriptor [ key ] , context ) ;
if ( kind === "accessor" ) {
if ( result === void 0 ) continue ;
if ( result === null || typeof result !== "object" ) throw new TypeError ( "Object expected" ) ;
if ( _ = accept ( result . get ) ) descriptor . get = _ ;
if ( _ = accept ( result . set ) ) descriptor . set = _ ;
if ( _ = accept ( result . init ) ) initializers . unshift ( _ ) ;
}
else if ( _ = accept ( result ) ) {
if ( kind === "field" ) initializers . unshift ( _ ) ;
else descriptor [ key ] = _ ;
2020-09-15 14:29:22 +02:00
}
2020-05-06 17:23:38 +02:00
}
2025-12-12 13:15:55 +01:00
if ( target ) Object . defineProperty ( target , contextIn . name , descriptor ) ;
done = true ;
} ;
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _runInitializers ( thisArg , initializers , value ) {
var useValue = arguments . length > 2 ;
for ( var i = 0 ; i < initializers . length ; i ++ ) {
value = useValue ? initializers [ i ] . call ( thisArg , value ) : initializers [ i ] . call ( thisArg ) ;
}
return useValue ? value : void 0 ;
} ;
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _propKey ( x ) {
return typeof x === "symbol" ? x : "" . concat ( x ) ;
} ;
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
function _ _setFunctionName ( f , name , prefix ) {
if ( typeof name === "symbol" ) name = name . description ? "[" . concat ( name . description , "]" ) : "" ;
return Object . defineProperty ( f , "name" , { configurable : true , value : prefix ? "" . concat ( prefix , " " , name ) : name } ) ;
} ;
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
function _ _metadata ( metadataKey , metadataValue ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( metadataKey , metadataValue ) ;
}
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _awaiter ( thisArg , _arguments , P , generator ) {
function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
function fulfilled ( value ) { try { step ( generator . next ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function rejected ( value ) { try { step ( generator [ "throw" ] ( value ) ) ; } catch ( e ) { reject ( e ) ; } }
function step ( result ) { result . done ? resolve ( result . value ) : adopt ( result . value ) . then ( fulfilled , rejected ) ; }
step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
} ) ;
}
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
function _ _generator ( thisArg , body ) {
var _ = { label : 0 , sent : function ( ) { if ( t [ 0 ] & 1 ) throw t [ 1 ] ; return t [ 1 ] ; } , trys : [ ] , ops : [ ] } , f , y , t , g = Object . create ( ( typeof Iterator === "function" ? Iterator : Object ) . prototype ) ;
return g . next = verb ( 0 ) , g [ "throw" ] = verb ( 1 ) , g [ "return" ] = verb ( 2 ) , typeof Symbol === "function" && ( g [ Symbol . iterator ] = function ( ) { return this ; } ) , g ;
function verb ( n ) { return function ( v ) { return step ( [ n , v ] ) ; } ; }
function step ( op ) {
if ( f ) throw new TypeError ( "Generator is already executing." ) ;
while ( g && ( g = 0 , op [ 0 ] && ( _ = 0 ) ) , _ ) try {
if ( f = 1 , y && ( t = op [ 0 ] & 2 ? y [ "return" ] : op [ 0 ] ? y [ "throw" ] || ( ( t = y [ "return" ] ) && t . call ( y ) , 0 ) : y . next ) && ! ( t = t . call ( y , op [ 1 ] ) ) . done ) return t ;
if ( y = 0 , t ) op = [ op [ 0 ] & 2 , t . value ] ;
switch ( op [ 0 ] ) {
case 0 : case 1 : t = op ; break ;
case 4 : _ . label ++ ; return { value : op [ 1 ] , done : false } ;
case 5 : _ . label ++ ; y = op [ 1 ] ; op = [ 0 ] ; continue ;
case 7 : op = _ . ops . pop ( ) ; _ . trys . pop ( ) ; continue ;
default :
if ( ! ( t = _ . trys , t = t . length > 0 && t [ t . length - 1 ] ) && ( op [ 0 ] === 6 || op [ 0 ] === 2 ) ) { _ = 0 ; continue ; }
if ( op [ 0 ] === 3 && ( ! t || ( op [ 1 ] > t [ 0 ] && op [ 1 ] < t [ 3 ] ) ) ) { _ . label = op [ 1 ] ; break ; }
if ( op [ 0 ] === 6 && _ . label < t [ 1 ] ) { _ . label = t [ 1 ] ; t = op ; break ; }
if ( t && _ . label < t [ 2 ] ) { _ . label = t [ 2 ] ; _ . ops . push ( op ) ; break ; }
if ( t [ 2 ] ) _ . ops . pop ( ) ;
_ . trys . pop ( ) ; continue ;
}
op = body . call ( thisArg , _ ) ;
} catch ( e ) { op = [ 6 , e ] ; y = 0 ; } finally { f = t = 0 ; }
if ( op [ 0 ] & 5 ) throw op [ 1 ] ; return { value : op [ 0 ] ? op [ 1 ] : void 0 , done : true } ;
}
}
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
var _ _createBinding = Object . create ? ( function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
var desc = Object . getOwnPropertyDescriptor ( m , k ) ;
if ( ! desc || ( "get" in desc ? ! m . _ _esModule : desc . writable || desc . configurable ) ) {
desc = { enumerable : true , get : function ( ) { return m [ k ] ; } } ;
}
Object . defineProperty ( o , k2 , desc ) ;
} ) : ( function ( o , m , k , k2 ) {
if ( k2 === undefined ) k2 = k ;
o [ k2 ] = m [ k ] ;
} ) ;
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
function _ _exportStar ( m , o ) {
for ( var p in m ) if ( p !== "default" && ! Object . prototype . hasOwnProperty . call ( o , p ) ) _ _createBinding ( o , m , p ) ;
}
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
function _ _values ( o ) {
var s = typeof Symbol === "function" && Symbol . iterator , m = s && o [ s ] , i = 0 ;
if ( m ) return m . call ( o ) ;
if ( o && typeof o . length === "number" ) return {
next : function ( ) {
if ( o && i >= o . length ) o = void 0 ;
return { value : o && o [ i ++ ] , done : ! o } ;
2020-09-15 14:29:22 +02:00
}
2025-12-12 13:15:55 +01:00
} ;
throw new TypeError ( s ? "Object is not iterable." : "Symbol.iterator is not defined." ) ;
}
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
function _ _read ( o , n ) {
var m = typeof Symbol === "function" && o [ Symbol . iterator ] ;
if ( ! m ) return o ;
var i = m . call ( o ) , r , ar = [ ] , e ;
try {
while ( ( n === void 0 || n -- > 0 ) && ! ( r = i . next ( ) ) . done ) ar . push ( r . value ) ;
}
catch ( error ) { e = { error : error } ; }
finally {
try {
if ( r && ! r . done && ( m = i [ "return" ] ) ) m . call ( i ) ;
}
finally { if ( e ) throw e . error ; }
}
return ar ;
}
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
/** @deprecated */
function _ _spread ( ) {
for ( var ar = [ ] , i = 0 ; i < arguments . length ; i ++ )
ar = ar . concat ( _ _read ( arguments [ i ] ) ) ;
return ar ;
}
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
/** @deprecated */
function _ _spreadArrays ( ) {
for ( var s = 0 , i = 0 , il = arguments . length ; i < il ; i ++ ) s += arguments [ i ] . length ;
for ( var r = Array ( s ) , k = 0 , i = 0 ; i < il ; i ++ )
for ( var a = arguments [ i ] , j = 0 , jl = a . length ; j < jl ; j ++ , k ++ )
r [ k ] = a [ j ] ;
return r ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _spreadArray ( to , from , pack ) {
if ( pack || arguments . length === 2 ) for ( var i = 0 , l = from . length , ar ; i < l ; i ++ ) {
if ( ar || ! ( i in from ) ) {
if ( ! ar ) ar = Array . prototype . slice . call ( from , 0 , i ) ;
ar [ i ] = from [ i ] ;
2020-09-15 14:29:22 +02:00
}
2025-12-12 13:15:55 +01:00
}
return to . concat ( ar || Array . prototype . slice . call ( from ) ) ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _await ( v ) {
return this instanceof _ _await ? ( this . v = v , this ) : new _ _await ( v ) ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _asyncGenerator ( thisArg , _arguments , generator ) {
if ( ! Symbol . asyncIterator ) throw new TypeError ( "Symbol.asyncIterator is not defined." ) ;
var g = generator . apply ( thisArg , _arguments || [ ] ) , i , q = [ ] ;
return i = Object . create ( ( typeof AsyncIterator === "function" ? AsyncIterator : Object ) . prototype ) , verb ( "next" ) , verb ( "throw" ) , verb ( "return" , awaitReturn ) , i [ Symbol . asyncIterator ] = function ( ) { return this ; } , i ;
function awaitReturn ( f ) { return function ( v ) { return Promise . resolve ( v ) . then ( f , reject ) ; } ; }
function verb ( n , f ) { if ( g [ n ] ) { i [ n ] = function ( v ) { return new Promise ( function ( a , b ) { q . push ( [ n , v , a , b ] ) > 1 || resume ( n , v ) ; } ) ; } ; if ( f ) i [ n ] = f ( i [ n ] ) ; } }
function resume ( n , v ) { try { step ( g [ n ] ( v ) ) ; } catch ( e ) { settle ( q [ 0 ] [ 3 ] , e ) ; } }
function step ( r ) { r . value instanceof _ _await ? Promise . resolve ( r . value . v ) . then ( fulfill , reject ) : settle ( q [ 0 ] [ 2 ] , r ) ; }
function fulfill ( value ) { resume ( "next" , value ) ; }
function reject ( value ) { resume ( "throw" , value ) ; }
function settle ( f , v ) { if ( f ( v ) , q . shift ( ) , q . length ) resume ( q [ 0 ] [ 0 ] , q [ 0 ] [ 1 ] ) ; }
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _asyncDelegator ( o ) {
var i , p ;
return i = { } , verb ( "next" ) , verb ( "throw" , function ( e ) { throw e ; } ) , verb ( "return" ) , i [ Symbol . iterator ] = function ( ) { return this ; } , i ;
function verb ( n , f ) { i [ n ] = o [ n ] ? function ( v ) { return ( p = ! p ) ? { value : _ _await ( o [ n ] ( v ) ) , done : false } : f ? f ( v ) : v ; } : f ; }
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _asyncValues ( o ) {
if ( ! Symbol . asyncIterator ) throw new TypeError ( "Symbol.asyncIterator is not defined." ) ;
var m = o [ Symbol . asyncIterator ] , i ;
return m ? m . call ( o ) : ( o = typeof _ _values === "function" ? _ _values ( o ) : o [ Symbol . iterator ] ( ) , i = { } , verb ( "next" ) , verb ( "throw" ) , verb ( "return" ) , i [ Symbol . asyncIterator ] = function ( ) { return this ; } , i ) ;
function verb ( n ) { i [ n ] = o [ n ] && function ( v ) { return new Promise ( function ( resolve , reject ) { v = o [ n ] ( v ) , settle ( resolve , reject , v . done , v . value ) ; } ) ; } ; }
function settle ( resolve , reject , d , v ) { Promise . resolve ( v ) . then ( function ( v ) { resolve ( { value : v , done : d } ) ; } , reject ) ; }
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _makeTemplateObject ( cooked , raw ) {
if ( Object . defineProperty ) { Object . defineProperty ( cooked , "raw" , { value : raw } ) ; } else { cooked . raw = raw ; }
return cooked ;
} ;
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
var _ _setModuleDefault = Object . create ? ( function ( o , v ) {
Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
} ) : function ( o , v ) {
o [ "default" ] = v ;
} ;
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
var ownKeys = function ( o ) {
ownKeys = Object . getOwnPropertyNames || function ( o ) {
var ar = [ ] ;
for ( var k in o ) if ( Object . prototype . hasOwnProperty . call ( o , k ) ) ar [ ar . length ] = k ;
return ar ;
} ;
return ownKeys ( o ) ;
} ;
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _importStar ( mod ) {
if ( mod && mod . _ _esModule ) return mod ;
var result = { } ;
if ( mod != null ) for ( var k = ownKeys ( mod ) , i = 0 ; i < k . length ; i ++ ) if ( k [ i ] !== "default" ) _ _createBinding ( result , mod , k [ i ] ) ;
_ _setModuleDefault ( result , mod ) ;
return result ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _importDefault ( mod ) {
return ( mod && mod . _ _esModule ) ? mod : { default : mod } ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _classPrivateFieldGet ( receiver , state , kind , f ) {
if ( kind === "a" && ! f ) throw new TypeError ( "Private accessor was defined without a getter" ) ;
if ( typeof state === "function" ? receiver !== state || ! f : ! state . has ( receiver ) ) throw new TypeError ( "Cannot read private member from an object whose class did not declare it" ) ;
return kind === "m" ? f : kind === "a" ? f . call ( receiver ) : f ? f . value : state . get ( receiver ) ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _classPrivateFieldSet ( receiver , state , value , kind , f ) {
if ( kind === "m" ) throw new TypeError ( "Private method is not writable" ) ;
if ( kind === "a" && ! f ) throw new TypeError ( "Private accessor was defined without a setter" ) ;
if ( typeof state === "function" ? receiver !== state || ! f : ! state . has ( receiver ) ) throw new TypeError ( "Cannot write private member to an object whose class did not declare it" ) ;
return ( kind === "a" ? f . call ( receiver , value ) : f ? f . value = value : state . set ( receiver , value ) ) , value ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _classPrivateFieldIn ( state , receiver ) {
if ( receiver === null || ( typeof receiver !== "object" && typeof receiver !== "function" ) ) throw new TypeError ( "Cannot use 'in' operator on non-object" ) ;
return typeof state === "function" ? receiver === state : state . has ( receiver ) ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _ _addDisposableResource ( env , value , async ) {
if ( value !== null && value !== void 0 ) {
if ( typeof value !== "object" && typeof value !== "function" ) throw new TypeError ( "Object expected." ) ;
var dispose , inner ;
if ( async ) {
if ( ! Symbol . asyncDispose ) throw new TypeError ( "Symbol.asyncDispose is not defined." ) ;
dispose = value [ Symbol . asyncDispose ] ;
2020-09-15 14:29:22 +02:00
}
2025-12-12 13:15:55 +01:00
if ( dispose === void 0 ) {
if ( ! Symbol . dispose ) throw new TypeError ( "Symbol.dispose is not defined." ) ;
dispose = value [ Symbol . dispose ] ;
if ( async ) inner = dispose ;
2020-09-15 14:29:22 +02:00
}
2025-12-12 13:15:55 +01:00
if ( typeof dispose !== "function" ) throw new TypeError ( "Object not disposable." ) ;
if ( inner ) dispose = function ( ) { try { inner . call ( this ) ; } catch ( e ) { return Promise . reject ( e ) ; } } ;
env . stack . push ( { value : value , dispose : dispose , async : async } ) ;
}
else if ( async ) {
env . stack . push ( { async : true } ) ;
}
return value ;
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function ( error , suppressed , message ) {
var e = new Error ( message ) ;
return e . name = "SuppressedError" , e . error = error , e . suppressed = suppressed , e ;
} ;
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
function _ _disposeResources ( env ) {
function fail ( e ) {
env . error = env . hasError ? new _SuppressedError ( e , env . error , "An error was suppressed during disposal." ) : e ;
env . hasError = true ;
}
var r , s = 0 ;
function next ( ) {
while ( r = env . stack . pop ( ) ) {
try {
if ( ! r . async && s === 1 ) return s = 0 , env . stack . push ( r ) , Promise . resolve ( ) . then ( next ) ;
if ( r . dispose ) {
var result = r . dispose . call ( r . value ) ;
if ( r . async ) return s |= 2 , Promise . resolve ( result ) . then ( next , function ( e ) { fail ( e ) ; return next ( ) ; } ) ;
}
else s |= 1 ;
}
catch ( e ) {
fail ( e ) ;
}
}
if ( s === 1 ) return env . hasError ? Promise . reject ( env . error ) : Promise . resolve ( ) ;
if ( env . hasError ) throw env . error ;
}
return next ( ) ;
}
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
function _ _rewriteRelativeImportExtension ( path , preserveJsx ) {
if ( typeof path === "string" && /^\.\.?\// . test ( path ) ) {
return path . replace ( /\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i , function ( m , tsx , d , ext , cm ) {
return tsx ? preserveJsx ? ".jsx" : ".js" : d && ( ! ext || ! cm ) ? m : ( d + ext + "." + cm . toLowerCase ( ) + "js" ) ;
} ) ;
}
return path ;
}
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
/* unused harmony default export */ var _ _WEBPACK _DEFAULT _EXPORT _ _ = ( {
_ _extends ,
_ _assign ,
_ _rest ,
_ _decorate ,
_ _param ,
_ _esDecorate ,
_ _runInitializers ,
_ _propKey ,
_ _setFunctionName ,
_ _metadata ,
_ _awaiter ,
_ _generator ,
_ _createBinding ,
_ _exportStar ,
_ _values ,
_ _read ,
_ _spread ,
_ _spreadArrays ,
_ _spreadArray ,
_ _await ,
_ _asyncGenerator ,
_ _asyncDelegator ,
_ _asyncValues ,
_ _makeTemplateObject ,
_ _importStar ,
_ _importDefault ,
_ _classPrivateFieldGet ,
_ _classPrivateFieldSet ,
_ _classPrivateFieldIn ,
_ _addDisposableResource ,
_ _disposeResources ,
_ _rewriteRelativeImportExtension ,
} ) ;
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
/***/ 2226 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ W : ( ) => ( /* binding */ noCase )
/* harmony export */ } ) ;
/* harmony import */ var lower _case _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 7314 ) ;
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
var DEFAULT _SPLIT _REGEXP = [ /([a-z0-9])([A-Z])/g , /([A-Z])([A-Z][a-z])/g ] ;
// Remove all non-word characters.
var DEFAULT _STRIP _REGEXP = /[^A-Z0-9]+/gi ;
/ * *
* Normalize the string into something other libraries can manipulate easier .
* /
function noCase ( input , options ) {
if ( options === void 0 ) { options = { } ; }
var _a = options . splitRegexp , splitRegexp = _a === void 0 ? DEFAULT _SPLIT _REGEXP : _a , _b = options . stripRegexp , stripRegexp = _b === void 0 ? DEFAULT _STRIP _REGEXP : _b , _c = options . transform , transform = _c === void 0 ? lower _case _ _WEBPACK _IMPORTED _MODULE _0 _ _ /* .lowerCase */ . g : _c , _d = options . delimiter , delimiter = _d === void 0 ? " " : _d ;
var result = replace ( replace ( input , splitRegexp , "$1\0$2" ) , stripRegexp , "\0" ) ;
var start = 0 ;
var end = result . length ;
// Trim the delimiter from around the output string.
while ( result . charAt ( start ) === "\0" )
start ++ ;
while ( result . charAt ( end - 1 ) === "\0" )
end -- ;
// Transform each token independently.
return result . slice ( start , end ) . split ( "\0" ) . map ( transform ) . join ( delimiter ) ;
}
/ * *
* Replace ` re ` in the input string with the replacement value .
* /
function replace ( input , re , value ) {
if ( re instanceof RegExp )
return input . replace ( re , value ) ;
return re . reduce ( function ( input , re ) { return input . replace ( re , value ) ; } , input ) ;
}
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
/***/ 2239 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
"use strict" ;
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
A : ( ) => ( /* binding */ createLocksActions )
} ) ;
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/locks/utils.js
function deepCopyLocksTreePath ( tree , path ) {
const newTree = { ... tree } ;
let currentNode = newTree ;
for ( const branchName of path ) {
currentNode . children = {
... currentNode . children ,
[ branchName ] : {
locks : [ ] ,
children : { } ,
... currentNode . children [ branchName ]
}
} ;
currentNode = currentNode . children [ branchName ] ;
}
return newTree ;
}
function getNode ( tree , path ) {
let currentNode = tree ;
for ( const branchName of path ) {
const nextNode = currentNode . children [ branchName ] ;
if ( ! nextNode ) {
return null ;
2023-04-26 17:39:43 +02:00
}
2025-12-12 13:15:55 +01:00
currentNode = nextNode ;
}
return currentNode ;
}
function * iteratePath ( tree , path ) {
let currentNode = tree ;
yield currentNode ;
for ( const branchName of path ) {
const nextNode = currentNode . children [ branchName ] ;
if ( ! nextNode ) {
break ;
2023-04-26 17:39:43 +02:00
}
2025-12-12 13:15:55 +01:00
yield nextNode ;
currentNode = nextNode ;
}
}
function * iterateDescendants ( node ) {
const stack = Object . values ( node . children ) ;
while ( stack . length ) {
const childNode = stack . pop ( ) ;
yield childNode ;
stack . push ( ... Object . values ( childNode . children ) ) ;
}
}
function hasConflictingLock ( { exclusive } , locks ) {
if ( exclusive && locks . length ) {
return true ;
}
if ( ! exclusive && locks . filter ( ( lock ) => lock . exclusive ) . length ) {
2023-04-26 17:39:43 +02:00
return true ;
}
2025-12-12 13:15:55 +01:00
return false ;
}
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/locks/reducer.js
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
const DEFAULT _STATE = {
requests : [ ] ,
tree : {
locks : [ ] ,
children : { }
}
} ;
function locks ( state = DEFAULT _STATE , action ) {
switch ( action . type ) {
case "ENQUEUE_LOCK_REQUEST" : {
const { request } = action ;
return {
... state ,
requests : [ request , ... state . requests ]
} ;
}
case "GRANT_LOCK_REQUEST" : {
const { lock , request } = action ;
const { store , path } = request ;
const storePath = [ store , ... path ] ;
const newTree = deepCopyLocksTreePath ( state . tree , storePath ) ;
const node = getNode ( newTree , storePath ) ;
node . locks = [ ... node . locks , lock ] ;
return {
... state ,
requests : state . requests . filter ( ( r ) => r !== request ) ,
tree : newTree
} ;
}
case "RELEASE_LOCK" : {
const { lock } = action ;
const storePath = [ lock . store , ... lock . path ] ;
const newTree = deepCopyLocksTreePath ( state . tree , storePath ) ;
const node = getNode ( newTree , storePath ) ;
node . locks = node . locks . filter ( ( l ) => l !== lock ) ;
return {
... state ,
tree : newTree
} ;
}
}
return state ;
}
2022-06-16 14:03:35 +02:00
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/locks/selectors.js
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function getPendingLockRequests ( state ) {
return state . requests ;
}
function isLockAvailable ( state , store , path , { exclusive } ) {
const storePath = [ store , ... path ] ;
const locks = state . tree ;
for ( const node2 of iteratePath ( locks , storePath ) ) {
if ( hasConflictingLock ( { exclusive } , node2 . locks ) ) {
return false ;
}
}
const node = getNode ( locks , storePath ) ;
if ( ! node ) {
return true ;
}
for ( const descendant of iterateDescendants ( node ) ) {
if ( hasConflictingLock ( { exclusive } , descendant . locks ) ) {
return false ;
}
}
return true ;
}
2023-12-07 09:44:11 +01:00
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/locks/engine.js
2025-04-25 12:30:07 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function createLocks ( ) {
let state = locks ( void 0 , { type : "@@INIT" } ) ;
function processPendingLockRequests ( ) {
for ( const request of getPendingLockRequests ( state ) ) {
const { store , path , exclusive , notifyAcquired } = request ;
if ( isLockAvailable ( state , store , path , { exclusive } ) ) {
const lock = { store , path , exclusive } ;
state = locks ( state , {
type : "GRANT_LOCK_REQUEST" ,
lock ,
request
} ) ;
notifyAcquired ( lock ) ;
}
}
}
function acquire ( store , path , exclusive ) {
return new Promise ( ( resolve ) => {
state = locks ( state , {
type : "ENQUEUE_LOCK_REQUEST" ,
request : { store , path , exclusive , notifyAcquired : resolve }
} ) ;
processPendingLockRequests ( ) ;
} ) ;
}
function release ( lock ) {
state = locks ( state , {
type : "RELEASE_LOCK" ,
lock
} ) ;
processPendingLockRequests ( ) ;
}
return { acquire , release } ;
}
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/locks/actions.js
function createLocksActions ( ) {
const locks = createLocks ( ) ;
function _ _unstableAcquireStoreLock ( store , path , { exclusive } ) {
return ( ) => locks . acquire ( store , path , exclusive ) ;
}
function _ _unstableReleaseStoreLock ( lock ) {
return ( ) => locks . release ( lock ) ;
}
return { _ _unstableAcquireStoreLock , _ _unstableReleaseStoreLock } ;
}
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 2278 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ E : ( ) => ( /* binding */ STORE _NAME )
/* harmony export */ } ) ;
const STORE _NAME = "core" ;
/***/ } ) ,
/***/ 2577 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ CO : ( ) => ( /* binding */ ALLOWED _RESOURCE _ACTIONS ) ,
/* harmony export */ kC : ( ) => ( /* binding */ getUserPermissionCacheKey ) ,
/* harmony export */ qY : ( ) => ( /* binding */ getUserPermissionsFromAllowHeader )
/* harmony export */ } ) ;
const ALLOWED _RESOURCE _ACTIONS = [
"create" ,
"read" ,
"update" ,
"delete"
] ;
function getUserPermissionsFromAllowHeader ( allowedMethods ) {
const permissions = { } ;
if ( ! allowedMethods ) {
return permissions ;
}
const methods = {
create : "POST" ,
read : "GET" ,
update : "PUT" ,
delete : "DELETE"
2025-04-25 12:30:07 +02:00
} ;
2025-12-12 13:15:55 +01:00
for ( const [ actionName , methodName ] of Object . entries ( methods ) ) {
permissions [ actionName ] = allowedMethods . includes ( methodName ) ;
}
return permissions ;
}
function getUserPermissionCacheKey ( action , resource , id ) {
const key = ( typeof resource === "object" ? [ action , resource . kind , resource . name , resource . id ] : [ action , resource , id ] ) . filter ( Boolean ) . join ( "/" ) ;
return key ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 2859 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ n : ( ) => ( /* binding */ Status )
/* harmony export */ } ) ;
var Status = /* @__PURE__ */ ( ( Status2 ) => {
Status2 [ "Idle" ] = "IDLE" ;
Status2 [ "Resolving" ] = "RESOLVING" ;
Status2 [ "Error" ] = "ERROR" ;
Status2 [ "Success" ] = "SUCCESS" ;
return Status2 ;
} ) ( Status || { } ) ;
/***/ } ) ,
/***/ 3249 :
/***/ ( ( module ) => {
"use strict" ;
function _typeof ( obj ) {
if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) {
_typeof = function ( obj ) {
return typeof obj ;
2025-04-25 12:30:07 +02:00
} ;
} else {
2025-12-12 13:15:55 +01:00
_typeof = function ( obj ) {
return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return _typeof ( obj ) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function _classCallCheck ( instance , Constructor ) {
if ( ! ( instance instanceof Constructor ) ) {
throw new TypeError ( "Cannot call a class as a function" ) ;
}
}
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
function _defineProperties ( target , props ) {
for ( var i = 0 ; i < props . length ; i ++ ) {
var descriptor = props [ i ] ;
descriptor . enumerable = descriptor . enumerable || false ;
descriptor . configurable = true ;
if ( "value" in descriptor ) descriptor . writable = true ;
Object . defineProperty ( target , descriptor . key , descriptor ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
}
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
function _createClass ( Constructor , protoProps , staticProps ) {
if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ;
if ( staticProps ) _defineProperties ( Constructor , staticProps ) ;
return Constructor ;
}
2022-06-16 14:03:35 +02:00
2020-09-15 14:29:22 +02:00
/ * *
2025-12-12 13:15:55 +01:00
* Given an instance of EquivalentKeyMap , returns its internal value pair tuple
* for a key , if one exists . The tuple members consist of the last reference
* value for the key ( used in efficient subsequent lookups ) and the value
* assigned for the key at the leaf node .
2020-09-15 14:29:22 +02:00
*
2025-12-12 13:15:55 +01:00
* @ param { EquivalentKeyMap } instance EquivalentKeyMap instance .
* @ param { * } key The key for which to return value pair .
2020-09-15 14:29:22 +02:00
*
2025-12-12 13:15:55 +01:00
* @ return { ? Array } Value pair , if exists .
2020-09-15 14:29:22 +02:00
* /
2025-12-12 13:15:55 +01:00
function getValuePair ( instance , key ) {
var _map = instance . _map ,
_arrayTreeMap = instance . _arrayTreeMap ,
_objectTreeMap = instance . _objectTreeMap ; // Map keeps a reference to the last object-like key used to set the
// value, which can be used to shortcut immediately to the value.
2020-09-15 14:29:22 +02:00
2025-12-12 13:15:55 +01:00
if ( _map . has ( key ) ) {
return _map . get ( key ) ;
} // Sort keys to ensure stable retrieval from tree.
2019-11-02 10:38:58 +01:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
var properties = Object . keys ( key ) . sort ( ) ; // Tree by type to avoid conflicts on numeric object keys, empty value.
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
var map = Array . isArray ( key ) ? _arrayTreeMap : _objectTreeMap ;
for ( var i = 0 ; i < properties . length ; i ++ ) {
var property = properties [ i ] ;
map = map . get ( property ) ;
if ( map === undefined ) {
return ;
2020-12-10 14:06:04 +01:00
}
2020-05-06 17:23:38 +02:00
2025-12-12 13:15:55 +01:00
var propertyValue = key [ property ] ;
map = map . get ( propertyValue ) ;
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
if ( map === undefined ) {
return ;
}
2023-12-07 09:44:11 +01:00
}
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
var valuePair = map . get ( '_ekm_value' ) ;
2021-04-27 08:32:47 +02:00
2025-12-12 13:15:55 +01:00
if ( ! valuePair ) {
return ;
} // If reached, it implies that an object-like key was set with another
// reference, so delete the reference and replace with the current.
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
_map . delete ( valuePair [ 0 ] ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
valuePair [ 0 ] = key ;
map . set ( '_ekm_value' , valuePair ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
_map . set ( key , valuePair ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
return valuePair ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
/ * *
* Variant of a Map object which enables lookup by equivalent ( deeply equal )
* object and array keys .
* /
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
var EquivalentKeyMap =
/*#__PURE__*/
function ( ) {
/ * *
* Constructs a new instance of EquivalentKeyMap .
*
* @ param { Iterable . < * > } iterable Initial pair of key , value for map .
* /
function EquivalentKeyMap ( iterable ) {
_classCallCheck ( this , EquivalentKeyMap ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
this . clear ( ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
if ( iterable instanceof EquivalentKeyMap ) {
// Map#forEach is only means of iterating with support for IE11.
var iterablePairs = [ ] ;
iterable . forEach ( function ( value , key ) {
iterablePairs . push ( [ key , value ] ) ;
} ) ;
iterable = iterablePairs ;
}
if ( iterable != null ) {
for ( var i = 0 ; i < iterable . length ; i ++ ) {
this . set ( iterable [ i ] [ 0 ] , iterable [ i ] [ 1 ] ) ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
}
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
/ * *
* Accessor property returning the number of elements .
*
* @ return { number } Number of elements .
* /
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
_createClass ( EquivalentKeyMap , [ {
key : "set" ,
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
/ * *
* Add or update an element with a specified key and value .
*
* @ param { * } key The key of the element to add .
* @ param { * } value The value of the element to add .
*
* @ return { EquivalentKeyMap } Map instance .
* /
value : function set ( key , value ) {
// Shortcut non-object-like to set on internal Map.
if ( key === null || _typeof ( key ) !== 'object' ) {
this . _map . set ( key , value ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
return this ;
} // Sort keys to ensure stable assignment into tree.
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
var properties = Object . keys ( key ) . sort ( ) ;
var valuePair = [ key , value ] ; // Tree by type to avoid conflicts on numeric object keys, empty value.
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
var map = Array . isArray ( key ) ? this . _arrayTreeMap : this . _objectTreeMap ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
for ( var i = 0 ; i < properties . length ; i ++ ) {
var property = properties [ i ] ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
if ( ! map . has ( property ) ) {
map . set ( property , new EquivalentKeyMap ( ) ) ;
}
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
map = map . get ( property ) ;
var propertyValue = key [ property ] ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
if ( ! map . has ( propertyValue ) ) {
map . set ( propertyValue , new EquivalentKeyMap ( ) ) ;
}
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
map = map . get ( propertyValue ) ;
} // If an _ekm_value exists, there was already an equivalent key. Before
// overriding, ensure that the old key reference is removed from map to
// avoid memory leak of accumulating equivalent keys. This is, in a
// sense, a poor man's WeakMap, while still enabling iterability.
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
var previousValuePair = map . get ( '_ekm_value' ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
if ( previousValuePair ) {
this . _map . delete ( previousValuePair [ 0 ] ) ;
}
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
map . set ( '_ekm_value' , valuePair ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
this . _map . set ( key , valuePair ) ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
return this ;
}
/ * *
* Returns a specified element .
*
* @ param { * } key The key of the element to return .
*
* @ return { ? * } The element associated with the specified key or undefined
* if the key can ' t be found .
* /
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
} , {
key : "get" ,
value : function get ( key ) {
// Shortcut non-object-like to get from internal Map.
if ( key === null || _typeof ( key ) !== 'object' ) {
return this . _map . get ( key ) ;
}
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
var valuePair = getValuePair ( this , key ) ;
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
if ( valuePair ) {
return valuePair [ 1 ] ;
}
}
/ * *
* Returns a boolean indicating whether an element with the specified key
* exists or not .
*
* @ param { * } key The key of the element to test for presence .
*
* @ return { boolean } Whether an element with the specified key exists .
* /
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
} , {
key : "has" ,
value : function has ( key ) {
if ( key === null || _typeof ( key ) !== 'object' ) {
return this . _map . has ( key ) ;
} // Test on the _presence_ of the pair, not its value, as even undefined
// can be a valid member value for a key.
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
return getValuePair ( this , key ) !== undefined ;
}
/ * *
* Removes the specified element .
*
* @ param { * } key The key of the element to remove .
*
* @ return { boolean } Returns true if an element existed and has been
* removed , or false if the element does not exist .
* /
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
} , {
key : "delete" ,
value : function _delete ( key ) {
if ( ! this . has ( key ) ) {
return false ;
} // This naive implementation will leave orphaned child trees. A better
// implementation should traverse and remove orphans.
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
this . set ( key , undefined ) ;
return true ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
/ * *
* Executes a provided function once per each key / value pair , in insertion
* order .
*
* @ param { Function } callback Function to execute for each element .
* @ param { * } thisArg Value to use as ` this ` when executing
* ` callback ` .
* /
} , {
key : "forEach" ,
value : function forEach ( callback ) {
var _this = this ;
var thisArg = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : this ;
this . _map . forEach ( function ( value , key ) {
// Unwrap value from object-like value pair.
if ( key !== null && _typeof ( key ) === 'object' ) {
value = value [ 1 ] ;
}
callback . call ( thisArg , value , key , _this ) ;
} ) ;
}
/ * *
* Removes all elements .
* /
} , {
key : "clear" ,
value : function clear ( ) {
this . _map = new Map ( ) ;
this . _arrayTreeMap = new Map ( ) ;
this . _objectTreeMap = new Map ( ) ;
}
} , {
key : "size" ,
get : function get ( ) {
return this . _map . size ;
}
} ] ) ;
return EquivalentKeyMap ;
} ( ) ;
module . exports = EquivalentKeyMap ;
/***/ } ) ,
/***/ 3377 :
/***/ ( ( ) => {
/***/ } ) ,
/***/ 3440 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
_ _experimentalBatch : ( ) => ( /* binding */ _ _experimentalBatch ) ,
_ _experimentalReceiveCurrentGlobalStylesId : ( ) => ( /* binding */ _ _experimentalReceiveCurrentGlobalStylesId ) ,
_ _experimentalReceiveThemeBaseGlobalStyles : ( ) => ( /* binding */ _ _experimentalReceiveThemeBaseGlobalStyles ) ,
_ _experimentalReceiveThemeGlobalStyleVariations : ( ) => ( /* binding */ _ _experimentalReceiveThemeGlobalStyleVariations ) ,
_ _experimentalSaveSpecifiedEntityEdits : ( ) => ( /* binding */ _ _experimentalSaveSpecifiedEntityEdits ) ,
_ _unstableCreateUndoLevel : ( ) => ( /* binding */ _ _unstableCreateUndoLevel ) ,
addEntities : ( ) => ( /* binding */ addEntities ) ,
deleteEntityRecord : ( ) => ( /* binding */ deleteEntityRecord ) ,
editEntityRecord : ( ) => ( /* binding */ editEntityRecord ) ,
receiveAutosaves : ( ) => ( /* binding */ receiveAutosaves ) ,
receiveCurrentTheme : ( ) => ( /* binding */ receiveCurrentTheme ) ,
receiveCurrentUser : ( ) => ( /* binding */ receiveCurrentUser ) ,
receiveDefaultTemplateId : ( ) => ( /* binding */ receiveDefaultTemplateId ) ,
receiveEmbedPreview : ( ) => ( /* binding */ receiveEmbedPreview ) ,
receiveEntityRecords : ( ) => ( /* binding */ receiveEntityRecords ) ,
receiveNavigationFallbackId : ( ) => ( /* binding */ receiveNavigationFallbackId ) ,
receiveRevisions : ( ) => ( /* binding */ receiveRevisions ) ,
receiveThemeGlobalStyleRevisions : ( ) => ( /* binding */ receiveThemeGlobalStyleRevisions ) ,
receiveThemeSupports : ( ) => ( /* binding */ receiveThemeSupports ) ,
receiveUploadPermissions : ( ) => ( /* binding */ receiveUploadPermissions ) ,
receiveUserPermission : ( ) => ( /* binding */ receiveUserPermission ) ,
receiveUserPermissions : ( ) => ( /* binding */ receiveUserPermissions ) ,
receiveUserQuery : ( ) => ( /* binding */ receiveUserQuery ) ,
redo : ( ) => ( /* binding */ redo ) ,
saveEditedEntityRecord : ( ) => ( /* binding */ saveEditedEntityRecord ) ,
saveEntityRecord : ( ) => ( /* binding */ saveEntityRecord ) ,
undo : ( ) => ( /* binding */ undo )
} ) ;
// EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js
var es6 = _ _webpack _require _ _ ( 7734 ) ;
var es6 _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( es6 ) ;
; // ./node_modules/@wordpress/core-data/node_modules/uuid/dist/esm-browser/native.js
const randomUUID = typeof crypto !== 'undefined' && crypto . randomUUID && crypto . randomUUID . bind ( crypto ) ;
/* harmony default export */ const esm _browser _native = ( {
randomUUID
} ) ;
; // ./node_modules/@wordpress/core-data/node_modules/uuid/dist/esm-browser/rng.js
// Unique ID creation requires a high quality random # generator. In the browser we therefore
// require the crypto API and do not support built-in fallback to lower quality random number
// generators (like Math.random()).
let getRandomValues ;
const rnds8 = new Uint8Array ( 16 ) ;
function rng ( ) {
// lazy load so that environments that need to polyfill have a chance to do so
if ( ! getRandomValues ) {
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
getRandomValues = typeof crypto !== 'undefined' && crypto . getRandomValues && crypto . getRandomValues . bind ( crypto ) ;
if ( ! getRandomValues ) {
throw new Error ( 'crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported' ) ;
2023-09-26 10:33:34 +02:00
}
}
2025-12-12 13:15:55 +01:00
return getRandomValues ( rnds8 ) ;
}
; // ./node_modules/@wordpress/core-data/node_modules/uuid/dist/esm-browser/stringify.js
/ * *
* Convert array of 16 byte values to UUID string format of the form :
* XXXXXXXX - XXXX - XXXX - XXXX - XXXXXXXXXXXX
* /
const byteToHex = [ ] ;
for ( let i = 0 ; i < 256 ; ++ i ) {
byteToHex . push ( ( i + 0x100 ) . toString ( 16 ) . slice ( 1 ) ) ;
}
function unsafeStringify ( arr , offset = 0 ) {
// Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
return byteToHex [ arr [ offset + 0 ] ] + byteToHex [ arr [ offset + 1 ] ] + byteToHex [ arr [ offset + 2 ] ] + byteToHex [ arr [ offset + 3 ] ] + '-' + byteToHex [ arr [ offset + 4 ] ] + byteToHex [ arr [ offset + 5 ] ] + '-' + byteToHex [ arr [ offset + 6 ] ] + byteToHex [ arr [ offset + 7 ] ] + '-' + byteToHex [ arr [ offset + 8 ] ] + byteToHex [ arr [ offset + 9 ] ] + '-' + byteToHex [ arr [ offset + 10 ] ] + byteToHex [ arr [ offset + 11 ] ] + byteToHex [ arr [ offset + 12 ] ] + byteToHex [ arr [ offset + 13 ] ] + byteToHex [ arr [ offset + 14 ] ] + byteToHex [ arr [ offset + 15 ] ] ;
}
function stringify ( arr , offset = 0 ) {
const uuid = unsafeStringify ( arr , offset ) ; // Consistency check for valid UUID. If this throws, it's likely due to one
// of the following:
// - One or more input array values don't map to a hex octet (leading to
// "undefined" in the uuid)
// - Invalid input values for the RFC `version` or `variant` fields
if ( ! validate ( uuid ) ) {
throw TypeError ( 'Stringified UUID is invalid' ) ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
return uuid ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
/* harmony default export */ const esm _browser _stringify = ( ( /* unused pure expression or super */ null && ( stringify ) ) ) ;
; // ./node_modules/@wordpress/core-data/node_modules/uuid/dist/esm-browser/v4.js
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
function v4 ( options , buf , offset ) {
if ( esm _browser _native . randomUUID && ! buf && ! options ) {
return esm _browser _native . randomUUID ( ) ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
options = options || { } ;
const rnds = options . random || ( options . rng || rng ) ( ) ; // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
rnds [ 6 ] = rnds [ 6 ] & 0x0f | 0x40 ;
rnds [ 8 ] = rnds [ 8 ] & 0x3f | 0x80 ; // Copy bytes to buffer, if provided
if ( buf ) {
offset = offset || 0 ;
for ( let i = 0 ; i < 16 ; ++ i ) {
buf [ offset + i ] = rnds [ i ] ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
return buf ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return unsafeStringify ( rnds ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
/* harmony default export */ const esm _browser _v4 = ( v4 ) ;
// EXTERNAL MODULE: external ["wp","apiFetch"]
var external _wp _apiFetch _ = _ _webpack _require _ _ ( 1455 ) ;
var external _wp _apiFetch _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _apiFetch _ ) ;
// EXTERNAL MODULE: external ["wp","url"]
var external _wp _url _ = _ _webpack _require _ _ ( 3832 ) ;
// EXTERNAL MODULE: external ["wp","deprecated"]
var external _wp _deprecated _ = _ _webpack _require _ _ ( 4040 ) ;
var external _wp _deprecated _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _deprecated _ ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/set-nested-value.js
var set _nested _value = _ _webpack _require _ _ ( 5003 ) ;
; // ./node_modules/@wordpress/core-data/build-module/utils/get-nested-value.js
function getNestedValue ( object , path , defaultValue ) {
if ( ! object || typeof object !== "object" || typeof path !== "string" && ! Array . isArray ( path ) ) {
return object ;
}
const normalizedPath = Array . isArray ( path ) ? path : path . split ( "." ) ;
let value = object ;
normalizedPath . forEach ( ( fieldName ) => {
value = value ? . [ fieldName ] ;
} ) ;
return value !== void 0 ? value : defaultValue ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/queried-data/actions.js
function receiveItems ( items , edits , meta ) {
return {
type : "RECEIVE_ITEMS" ,
items : Array . isArray ( items ) ? items : [ items ] ,
persistedEdits : edits ,
meta
} ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
function removeItems ( kind , name , records , invalidateCache = false ) {
return {
type : "REMOVE_ITEMS" ,
itemIds : Array . isArray ( records ) ? records : [ records ] ,
kind ,
name ,
invalidateCache
} ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
function receiveQueriedItems ( items , query = { } , edits , meta ) {
return {
... receiveItems ( items , edits , meta ) ,
query
} ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/entities.js + 2 modules
var entities = _ _webpack _require _ _ ( 5914 ) ;
; // ./node_modules/@wordpress/core-data/build-module/batch/default-processor.js
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
let maxItems = null ;
function chunk ( arr , chunkSize ) {
const tmp = [ ... arr ] ;
const cache = [ ] ;
while ( tmp . length ) {
cache . push ( tmp . splice ( 0 , chunkSize ) ) ;
}
return cache ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
async function defaultProcessor ( requests ) {
if ( maxItems === null ) {
const preflightResponse = await external _wp _apiFetch _default ( ) ( {
path : "/batch/v1" ,
method : "OPTIONS"
} ) ;
maxItems = preflightResponse . endpoints [ 0 ] . args . requests . maxItems ;
}
const results = [ ] ;
for ( const batchRequests of chunk ( requests , maxItems ) ) {
const batchResponse = await external _wp _apiFetch _default ( ) ( {
path : "/batch/v1" ,
method : "POST" ,
data : {
validation : "require-all-validate" ,
requests : batchRequests . map ( ( request ) => ( {
path : request . path ,
body : request . data ,
// Rename 'data' to 'body'.
method : request . method ,
headers : request . headers
} ) )
}
} ) ;
let batchResults ;
if ( batchResponse . failed ) {
batchResults = batchResponse . responses . map ( ( response ) => ( {
error : response ? . body
} ) ) ;
} else {
batchResults = batchResponse . responses . map ( ( response ) => {
const result = { } ;
if ( response . status >= 200 && response . status < 300 ) {
result . output = response . body ;
} else {
result . error = response . body ;
}
return result ;
} ) ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
results . push ( ... batchResults ) ;
}
return results ;
2022-12-15 17:47:31 +01:00
}
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/batch/create-batch.js
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
function createBatch ( processor = defaultProcessor ) {
let lastId = 0 ;
let queue = [ ] ;
const pending = new ObservableSet ( ) ;
return {
/ * *
* Adds an input to the batch and returns a promise that is resolved or
* rejected when the input is processed by ` batch.run() ` .
*
* You may also pass a thunk which allows inputs to be added
* asynchronously .
*
* ` ` `
* // Both are allowed:
* batch . add ( { path : '/v1/books' , ... } ) ;
* batch . add ( ( add ) => add ( { path : '/v1/books' , ... } ) ) ;
* ` ` `
*
* If a thunk is passed , ` batch.run() ` will pause until either :
*
* - The thunk calls its ` add ` argument , or ;
* - The thunk returns a promise and that promise resolves , or ;
* - The thunk returns a non - promise .
*
* @ param { any | Function } inputOrThunk Input to add or thunk to execute .
*
* @ return { Promise | any } If given an input , returns a promise that
* is resolved or rejected when the batch is
* processed . If given a thunk , returns the return
* value of that thunk .
* /
add ( inputOrThunk ) {
const id = ++ lastId ;
pending . add ( id ) ;
const add = ( input ) => new Promise ( ( resolve , reject ) => {
queue . push ( {
input ,
resolve ,
reject
} ) ;
pending . delete ( id ) ;
2025-04-25 12:30:07 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
if ( typeof inputOrThunk === "function" ) {
return Promise . resolve ( inputOrThunk ( add ) ) . finally ( ( ) => {
pending . delete ( id ) ;
} ) ;
}
return add ( inputOrThunk ) ;
2025-04-25 12:30:07 +02:00
} ,
2025-12-12 13:15:55 +01:00
/ * *
* Runs the batch . This calls ` batchProcessor ` and resolves or rejects
* all promises returned by ` add() ` .
*
* @ return { Promise < boolean > } A promise that resolves to a boolean that is true
* if the processor returned no errors .
* /
async run ( ) {
if ( pending . size ) {
await new Promise ( ( resolve ) => {
const unsubscribe = pending . subscribe ( ( ) => {
if ( ! pending . size ) {
unsubscribe ( ) ;
resolve ( void 0 ) ;
2025-04-25 12:30:07 +02:00
}
} ) ;
} ) ;
}
2025-12-12 13:15:55 +01:00
let results ;
try {
results = await processor (
queue . map ( ( { input } ) => input )
) ;
if ( results . length !== queue . length ) {
throw new Error (
"run: Array returned by processor must be same size as input array."
) ;
}
} catch ( error ) {
for ( const { reject } of queue ) {
reject ( error ) ;
}
throw error ;
}
let isSuccess = true ;
results . forEach ( ( result , key ) => {
const queueItem = queue [ key ] ;
if ( result ? . error ) {
queueItem ? . reject ( result . error ) ;
isSuccess = false ;
} else {
queueItem ? . resolve ( result ? . output ? ? result ) ;
}
} ) ;
queue = [ ] ;
return isSuccess ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
class ObservableSet {
constructor ( ... args ) {
this . set = new Set ( ... args ) ;
this . subscribers = /* @__PURE__ */ new Set ( ) ;
}
get size ( ) {
return this . set . size ;
}
add ( value ) {
this . set . add ( value ) ;
this . subscribers . forEach ( ( subscriber ) => subscriber ( ) ) ;
return this ;
}
delete ( value ) {
const isSuccess = this . set . delete ( value ) ;
this . subscribers . forEach ( ( subscriber ) => subscriber ( ) ) ;
return isSuccess ;
}
subscribe ( subscriber ) {
this . subscribers . add ( subscriber ) ;
return ( ) => {
this . subscribers . delete ( subscriber ) ;
} ;
2025-04-25 12:30:07 +02:00
}
2021-04-27 08:32:47 +02:00
}
2025-04-25 12:30:07 +02:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/name.js
var build _module _name = _ _webpack _require _ _ ( 2278 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/log-entity-deprecation.js
var log _entity _deprecation = _ _webpack _require _ _ ( 9410 ) ;
; // ./node_modules/@wordpress/core-data/build-module/actions.js
2025-04-25 12:30:07 +02:00
2023-12-07 09:44:11 +01:00
2025-04-25 12:30:07 +02:00
2023-12-07 09:44:11 +01:00
2025-04-25 12:30:07 +02:00
2023-12-07 09:44:11 +01:00
2025-04-25 12:30:07 +02:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
function receiveUserQuery ( queryID , users ) {
return {
type : "RECEIVE_USER_QUERY" ,
users : Array . isArray ( users ) ? users : [ users ] ,
queryID
} ;
2022-06-16 14:03:35 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveCurrentUser ( currentUser ) {
return {
type : "RECEIVE_CURRENT_USER" ,
currentUser
} ;
2019-11-02 10:38:58 +01:00
}
2025-12-12 13:15:55 +01:00
function addEntities ( entities ) {
return {
type : "ADD_ENTITIES" ,
entities
} ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveEntityRecords ( kind , name , records , query , invalidateCache = false , edits , meta ) {
if ( kind === "postType" ) {
records = ( Array . isArray ( records ) ? records : [ records ] ) . map (
( record ) => record . status === "auto-draft" ? { ... record , title : "" } : record
) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
let action ;
if ( query ) {
action = receiveQueriedItems ( records , query , edits , meta ) ;
} else {
action = receiveItems ( records , edits , meta ) ;
2023-09-26 10:33:34 +02:00
}
2025-12-12 13:15:55 +01:00
return {
... action ,
kind ,
name ,
invalidateCache
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveCurrentTheme ( currentTheme ) {
2025-04-25 12:30:07 +02:00
return {
2025-12-12 13:15:55 +01:00
type : "RECEIVE_CURRENT_THEME" ,
currentTheme
2025-04-25 12:30:07 +02:00
} ;
}
2025-12-12 13:15:55 +01:00
function _ _experimentalReceiveCurrentGlobalStylesId ( currentGlobalStylesId ) {
return {
type : "RECEIVE_CURRENT_GLOBAL_STYLES_ID" ,
id : currentGlobalStylesId
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function _ _experimentalReceiveThemeBaseGlobalStyles ( stylesheet , globalStyles ) {
return {
type : "RECEIVE_THEME_GLOBAL_STYLES" ,
stylesheet ,
globalStyles
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function _ _experimentalReceiveThemeGlobalStyleVariations ( stylesheet , variations ) {
return {
type : "RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS" ,
stylesheet ,
variations
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveThemeSupports ( ) {
external _wp _deprecated _default ( ) ( "wp.data.dispatch( 'core' ).receiveThemeSupports" , {
since : "5.9"
} ) ;
return {
type : "DO_NOTHING"
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveThemeGlobalStyleRevisions ( currentId , revisions ) {
external _wp _deprecated _default ( ) (
"wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()" ,
{
since : "6.5.0" ,
alternative : "wp.data.dispatch( 'core' ).receiveRevisions"
}
) ;
return {
type : "RECEIVE_THEME_GLOBAL_STYLE_REVISIONS" ,
currentId ,
revisions
} ;
2019-11-02 10:38:58 +01:00
}
2025-12-12 13:15:55 +01:00
function receiveEmbedPreview ( url , preview ) {
return {
type : "RECEIVE_EMBED_PREVIEW" ,
url ,
preview
} ;
2019-11-02 10:38:58 +01:00
}
2025-12-12 13:15:55 +01:00
const deleteEntityRecord = ( kind , name , recordId , query , { _ _unstableFetch = ( external _wp _apiFetch _default ( ) ) , throwOnError = false } = { } ) => async ( { dispatch , resolveSelect } ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "deleteEntityRecord" ) ;
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
const entityConfig = configs . find (
( config ) => config . kind === kind && config . name === name
) ;
let error ;
let deletedRecord = false ;
if ( ! entityConfig ) {
return ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const lock = await dispatch . _ _unstableAcquireStoreLock (
build _module _name /* STORE_NAME */ . E ,
[ "entities" , "records" , kind , name , recordId ] ,
{ exclusive : true }
) ;
try {
dispatch ( {
type : "DELETE_ENTITY_RECORD_START" ,
kind ,
name ,
recordId
} ) ;
let hasError = false ;
try {
let path = ` ${ entityConfig . baseURL } / ${ recordId } ` ;
if ( query ) {
path = ( 0 , external _wp _url _ . addQueryArgs ) ( path , query ) ;
}
deletedRecord = await _ _unstableFetch ( {
path ,
method : "DELETE"
2025-04-25 12:30:07 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
await dispatch ( removeItems ( kind , name , recordId , true ) ) ;
} catch ( _error ) {
hasError = true ;
error = _error ;
}
dispatch ( {
type : "DELETE_ENTITY_RECORD_FINISH" ,
kind ,
name ,
recordId ,
error
2025-04-25 12:30:07 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
if ( hasError && throwOnError ) {
throw error ;
}
return deletedRecord ;
} finally {
dispatch . _ _unstableReleaseStoreLock ( lock ) ;
2025-04-25 12:30:07 +02:00
}
} ;
2025-12-12 13:15:55 +01:00
const editEntityRecord = ( kind , name , recordId , edits , options = { } ) => ( { select , dispatch } ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "editEntityRecord" ) ;
const entityConfig = select . getEntityConfig ( kind , name ) ;
if ( ! entityConfig ) {
throw new Error (
` The entity being edited ( ${ kind } , ${ name } ) does not have a loaded config. `
) ;
}
const { mergedEdits = { } } = entityConfig ;
const record = select . getRawEntityRecord ( kind , name , recordId ) ;
const editedRecord = select . getEditedEntityRecord (
kind ,
name ,
recordId
) ;
const edit = {
kind ,
name ,
recordId ,
// Clear edits when they are equal to their persisted counterparts
// so that the property is not considered dirty.
edits : Object . keys ( edits ) . reduce ( ( acc , key ) => {
const recordValue = record [ key ] ;
const editedRecordValue = editedRecord [ key ] ;
const value = mergedEdits [ key ] ? { ... editedRecordValue , ... edits [ key ] } : edits [ key ] ;
acc [ key ] = es6 _default ( ) ( recordValue , value ) ? void 0 : value ;
return acc ;
} , { } )
} ;
if ( window . _ _experimentalEnableSync && entityConfig . syncConfig ) {
if ( false ) { }
}
if ( ! options . undoIgnore ) {
select . getUndoManager ( ) . addRecord (
[
{
id : { kind , name , recordId } ,
changes : Object . keys ( edits ) . reduce ( ( acc , key ) => {
acc [ key ] = {
from : editedRecord [ key ] ,
to : edits [ key ]
} ;
return acc ;
} , { } )
}
] ,
options . isCached
) ;
}
dispatch ( {
type : "EDIT_ENTITY_RECORD" ,
... edit
} ) ;
} ;
const undo = ( ) => ( { select , dispatch } ) => {
const undoRecord = select . getUndoManager ( ) . undo ( ) ;
if ( ! undoRecord ) {
return ;
}
dispatch ( {
type : "UNDO" ,
record : undoRecord
} ) ;
} ;
const redo = ( ) => ( { select , dispatch } ) => {
const redoRecord = select . getUndoManager ( ) . redo ( ) ;
if ( ! redoRecord ) {
return ;
}
dispatch ( {
type : "REDO" ,
record : redoRecord
} ) ;
} ;
const _ _unstableCreateUndoLevel = ( ) => ( { select } ) => {
select . getUndoManager ( ) . addRecord ( ) ;
} ;
const saveEntityRecord = ( kind , name , record , {
isAutosave = false ,
_ _unstableFetch = ( external _wp _apiFetch _default ( ) ) ,
throwOnError = false
} = { } ) => async ( { select , resolveSelect , dispatch } ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "saveEntityRecord" ) ;
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
const entityConfig = configs . find (
( config ) => config . kind === kind && config . name === name
) ;
if ( ! entityConfig ) {
return ;
}
const entityIdKey = entityConfig . key ? ? entities /* DEFAULT_ENTITY_KEY */ . C _ ;
const recordId = record [ entityIdKey ] ;
const isNewRecord = ! ! entityIdKey && ! recordId ;
const lock = await dispatch . _ _unstableAcquireStoreLock (
build _module _name /* STORE_NAME */ . E ,
[ "entities" , "records" , kind , name , recordId || esm _browser _v4 ( ) ] ,
{ exclusive : true }
) ;
try {
for ( const [ key , value ] of Object . entries ( record ) ) {
if ( typeof value === "function" ) {
const evaluatedValue = value (
select . getEditedEntityRecord ( kind , name , recordId )
) ;
dispatch . editEntityRecord (
kind ,
name ,
recordId ,
{
[ key ] : evaluatedValue
} ,
{ undoIgnore : true }
) ;
record [ key ] = evaluatedValue ;
}
}
dispatch ( {
type : "SAVE_ENTITY_RECORD_START" ,
kind ,
name ,
recordId ,
isAutosave
} ) ;
let updatedRecord ;
let error ;
let hasError = false ;
try {
const path = ` ${ entityConfig . baseURL } ${ recordId ? "/" + recordId : "" } ` ;
const persistedRecord = ! isNewRecord ? select . getRawEntityRecord ( kind , name , recordId ) : { } ;
if ( isAutosave ) {
const currentUser = select . getCurrentUser ( ) ;
const currentUserId = currentUser ? currentUser . id : void 0 ;
const autosavePost = await resolveSelect . getAutosave (
persistedRecord . type ,
persistedRecord . id ,
currentUserId
) ;
let data = {
... persistedRecord ,
... autosavePost ,
... record
} ;
data = Object . keys ( data ) . reduce (
( acc , key ) => {
if ( [
"title" ,
"excerpt" ,
"content" ,
"meta"
] . includes ( key ) ) {
acc [ key ] = data [ key ] ;
}
return acc ;
} ,
{
// Do not update the `status` if we have edited it when auto saving.
// It's very important to let the user explicitly save this change,
// because it can lead to unexpected results. An example would be to
// have a draft post and change the status to publish.
status : data . status === "auto-draft" ? "draft" : void 0
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
) ;
updatedRecord = await _ _unstableFetch ( {
path : ` ${ path } /autosaves ` ,
method : "POST" ,
data
} ) ;
if ( persistedRecord . id === updatedRecord . id ) {
let newRecord = {
... persistedRecord ,
... data ,
... updatedRecord
2025-04-25 12:30:07 +02:00
} ;
2025-12-12 13:15:55 +01:00
newRecord = Object . keys ( newRecord ) . reduce (
( acc , key ) => {
if ( [ "title" , "excerpt" , "content" ] . includes (
key
) ) {
acc [ key ] = newRecord [ key ] ;
} else if ( key === "status" ) {
acc [ key ] = persistedRecord . status === "auto-draft" && newRecord . status === "draft" ? newRecord . status : persistedRecord . status ;
} else {
acc [ key ] = persistedRecord [ key ] ;
2025-04-25 12:30:07 +02:00
}
return acc ;
2025-12-12 13:15:55 +01:00
} ,
{ }
) ;
dispatch . receiveEntityRecords (
kind ,
name ,
newRecord ,
void 0 ,
true
) ;
} else {
dispatch . receiveAutosaves (
persistedRecord . id ,
updatedRecord
) ;
}
} else {
let edits = record ;
if ( entityConfig . _ _unstablePrePersist ) {
edits = {
... edits ,
... entityConfig . _ _unstablePrePersist (
persistedRecord ,
edits
)
2025-04-25 12:30:07 +02:00
} ;
2025-12-12 13:15:55 +01:00
}
updatedRecord = await _ _unstableFetch ( {
path ,
method : recordId ? "PUT" : "POST" ,
data : edits
2025-04-25 12:30:07 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
dispatch . receiveEntityRecords (
kind ,
name ,
updatedRecord ,
void 0 ,
true ,
edits
) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
} catch ( _error ) {
hasError = true ;
error = _error ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
dispatch ( {
type : "SAVE_ENTITY_RECORD_FINISH" ,
kind ,
name ,
recordId ,
error ,
isAutosave
} ) ;
if ( hasError && throwOnError ) {
throw error ;
}
return updatedRecord ;
} finally {
dispatch . _ _unstableReleaseStoreLock ( lock ) ;
2025-04-25 12:30:07 +02:00
}
} ;
2025-12-12 13:15:55 +01:00
const _ _experimentalBatch = ( requests ) => async ( { dispatch } ) => {
const batch = createBatch ( ) ;
const api = {
saveEntityRecord ( kind , name , record , options ) {
return batch . add (
( add ) => dispatch . saveEntityRecord ( kind , name , record , {
... options ,
_ _unstableFetch : add
} )
) ;
} ,
saveEditedEntityRecord ( kind , name , recordId , options ) {
return batch . add (
( add ) => dispatch . saveEditedEntityRecord ( kind , name , recordId , {
... options ,
_ _unstableFetch : add
} )
) ;
} ,
deleteEntityRecord ( kind , name , recordId , query , options ) {
return batch . add (
( add ) => dispatch . deleteEntityRecord ( kind , name , recordId , query , {
... options ,
_ _unstableFetch : add
} )
) ;
}
} ;
const resultPromises = requests . map ( ( request ) => request ( api ) ) ;
const [ , ... results ] = await Promise . all ( [
batch . run ( ) ,
... resultPromises
] ) ;
return results ;
} ;
const saveEditedEntityRecord = ( kind , name , recordId , options ) => async ( { select , dispatch , resolveSelect } ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "saveEditedEntityRecord" ) ;
if ( ! select . hasEditsForEntityRecord ( kind , name , recordId ) ) {
return ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
const entityConfig = configs . find (
( config ) => config . kind === kind && config . name === name
) ;
if ( ! entityConfig ) {
return ;
2021-04-27 08:32:47 +02:00
}
2025-12-12 13:15:55 +01:00
const entityIdKey = entityConfig . key || entities /* DEFAULT_ENTITY_KEY */ . C _ ;
const edits = select . getEntityRecordNonTransientEdits (
kind ,
name ,
recordId
) ;
const record = { [ entityIdKey ] : recordId , ... edits } ;
return await dispatch . saveEntityRecord ( kind , name , record , options ) ;
} ;
const _ _experimentalSaveSpecifiedEntityEdits = ( kind , name , recordId , itemsToSave , options ) => async ( { select , dispatch , resolveSelect } ) => {
( 0 , log _entity _deprecation /* default */ . A ) (
kind ,
name ,
"__experimentalSaveSpecifiedEntityEdits"
) ;
if ( ! select . hasEditsForEntityRecord ( kind , name , recordId ) ) {
return ;
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
const edits = select . getEntityRecordNonTransientEdits (
kind ,
name ,
recordId
) ;
const editsToSave = { } ;
for ( const item of itemsToSave ) {
( 0 , set _nested _value /* default */ . A ) ( editsToSave , item , getNestedValue ( edits , item ) ) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
const entityConfig = configs . find (
( config ) => config . kind === kind && config . name === name
) ;
const entityIdKey = entityConfig ? . key || entities /* DEFAULT_ENTITY_KEY */ . C _ ;
if ( recordId ) {
editsToSave [ entityIdKey ] = recordId ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return await dispatch . saveEntityRecord (
kind ,
name ,
editsToSave ,
options
) ;
} ;
function receiveUploadPermissions ( hasUploadPermissions ) {
external _wp _deprecated _default ( ) ( "wp.data.dispatch( 'core' ).receiveUploadPermissions" , {
since : "5.9" ,
alternative : "receiveUserPermission"
} ) ;
return receiveUserPermission ( "create/media" , hasUploadPermissions ) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveUserPermission ( key , isAllowed ) {
return {
type : "RECEIVE_USER_PERMISSION" ,
key ,
isAllowed
} ;
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveUserPermissions ( permissions ) {
return {
type : "RECEIVE_USER_PERMISSIONS" ,
permissions
} ;
2019-11-02 10:38:58 +01:00
}
2025-12-12 13:15:55 +01:00
function receiveAutosaves ( postId , autosaves ) {
return {
type : "RECEIVE_AUTOSAVES" ,
postId ,
autosaves : Array . isArray ( autosaves ) ? autosaves : [ autosaves ]
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveNavigationFallbackId ( fallbackId ) {
return {
type : "RECEIVE_NAVIGATION_FALLBACK_ID" ,
fallbackId
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function receiveDefaultTemplateId ( query , templateId ) {
return {
type : "RECEIVE_DEFAULT_TEMPLATE" ,
query ,
templateId
} ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const receiveRevisions = ( kind , name , recordKey , records , query , invalidateCache = false , meta ) => async ( { dispatch , resolveSelect } ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "receiveRevisions" ) ;
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
const entityConfig = configs . find (
( config ) => config . kind === kind && config . name === name
) ;
const key = entityConfig && entityConfig ? . revisionKey ? entityConfig . revisionKey : entities /* DEFAULT_ENTITY_KEY */ . C _ ;
dispatch ( {
type : "RECEIVE_ITEM_REVISIONS" ,
key ,
items : Array . isArray ( records ) ? records : [ records ] ,
recordKey ,
meta ,
query ,
kind ,
name ,
invalidateCache
2025-04-25 12:30:07 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
} ;
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ 3832 :
/***/ ( ( module ) => {
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
module . exports = window [ "wp" ] [ "url" ] ;
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ 4027 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
A : ( ) => ( /* binding */ get _query _parts _default )
} ) ;
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
// UNUSED EXPORTS: getQueryParts
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: external ["wp","url"]
var external _wp _url _ = _ _webpack _require _ _ ( 3832 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/get-normalized-comma-separable.js
var get _normalized _comma _separable = _ _webpack _require _ _ ( 533 ) ;
; // ./node_modules/@wordpress/core-data/build-module/utils/with-weak-map-cache.js
function withWeakMapCache ( fn ) {
const cache = /* @__PURE__ */ new WeakMap ( ) ;
return ( key ) => {
let value ;
if ( cache . has ( key ) ) {
value = cache . get ( key ) ;
} else {
value = fn ( key ) ;
if ( key !== null && typeof key === "object" ) {
cache . set ( key , value ) ;
}
}
return value ;
} ;
2023-12-07 09:44:11 +01:00
}
2025-12-12 13:15:55 +01:00
var with _weak _map _cache _default = withWeakMapCache ;
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/queried-data/get-query-parts.js
2023-12-07 09:44:11 +01:00
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
function getQueryParts ( query ) {
const parts = {
stableKey : "" ,
page : 1 ,
perPage : 10 ,
fields : null ,
include : null ,
context : "default"
} ;
const keys = Object . keys ( query ) . sort ( ) ;
for ( let i = 0 ; i < keys . length ; i ++ ) {
const key = keys [ i ] ;
let value = query [ key ] ;
switch ( key ) {
case "page" :
parts [ key ] = Number ( value ) ;
break ;
case "per_page" :
parts . perPage = Number ( value ) ;
break ;
case "context" :
parts . context = value ;
break ;
default :
if ( key === "_fields" ) {
parts . fields = ( 0 , get _normalized _comma _separable /* default */ . A ) ( value ) ? ? [ ] ;
value = parts . fields . join ( ) ;
}
if ( key === "include" ) {
if ( typeof value === "number" ) {
value = value . toString ( ) ;
}
parts . include = ( ( 0 , get _normalized _comma _separable /* default */ . A ) ( value ) ? ? [ ] ) . map ( Number ) ;
value = parts . include . join ( ) ;
}
parts . stableKey += ( parts . stableKey ? "&" : "" ) + ( 0 , external _wp _url _ . addQueryArgs ) ( "" , { [ key ] : value } ) . slice ( 1 ) ;
}
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
return parts ;
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
var get _query _parts _default = with _weak _map _cache _default ( getQueryParts ) ;
2025-02-28 08:42:11 +01:00
2020-05-06 17:23:38 +02:00
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ 4040 :
/***/ ( ( module ) => {
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
"use strict" ;
module . exports = window [ "wp" ] [ "deprecated" ] ;
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 4460 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
A : ( ) => ( /* binding */ EntityProvider )
} ) ;
; // external "ReactJSXRuntime"
const external _ReactJSXRuntime _namespaceObject = window [ "ReactJSXRuntime" ] ;
// EXTERNAL MODULE: external ["wp","element"]
var external _wp _element _ = _ _webpack _require _ _ ( 6087 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/entity-context.js
var entity _context = _ _webpack _require _ _ ( 8843 ) ;
; // ./node_modules/@wordpress/core-data/build-module/entity-provider.js
function EntityProvider ( { kind , type : name , id , children } ) {
const parent = ( 0 , external _wp _element _ . useContext ) ( entity _context /* EntityContext */ . D ) ;
const childContext = ( 0 , external _wp _element _ . useMemo ) (
( ) => ( {
... parent ,
[ kind ] : {
... parent ? . [ kind ] ,
[ name ] : id
}
} ) ,
[ parent , kind , name , id ]
) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( entity _context /* EntityContext */ . D . Provider , { value : childContext , children } ) ;
2025-04-25 12:30:07 +02:00
}
2023-12-07 09:44:11 +01:00
2025-04-25 12:30:07 +02:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 4565 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ EntityProvider : ( ) => ( /* reexport safe */ _entity _provider _ _WEBPACK _IMPORTED _MODULE _17 _ _ . A ) ,
/* harmony export */ _ _experimentalFetchLinkSuggestions : ( ) => ( /* reexport safe */ _fetch _ _WEBPACK _IMPORTED _MODULE _14 _ _ . Y3 ) ,
/* harmony export */ _ _experimentalFetchUrlData : ( ) => ( /* reexport safe */ _fetch _ _WEBPACK _IMPORTED _MODULE _14 _ _ . gr ) ,
/* harmony export */ _ _experimentalUseEntityRecord : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . qh ) ,
/* harmony export */ _ _experimentalUseEntityRecords : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . bM ) ,
/* harmony export */ _ _experimentalUseResourcePermissions : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . _ ) ,
/* harmony export */ fetchBlockPatterns : ( ) => ( /* reexport safe */ _fetch _ _WEBPACK _IMPORTED _MODULE _14 _ _ . l$ ) ,
/* harmony export */ privateApis : ( ) => ( /* reexport safe */ _private _apis _ _WEBPACK _IMPORTED _MODULE _16 _ _ . j ) ,
/* harmony export */ store : ( ) => ( /* binding */ store ) ,
/* harmony export */ useEntityBlockEditor : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . hg ) ,
/* harmony export */ useEntityId : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . mV ) ,
/* harmony export */ useEntityProp : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . S$ ) ,
/* harmony export */ useEntityRecord : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . MA ) ,
/* harmony export */ useEntityRecords : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . $u ) ,
/* harmony export */ useResourcePermissions : ( ) => ( /* reexport safe */ _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ . qs )
/* harmony export */ } ) ;
/* harmony import */ var _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 7143 ) ;
/* harmony import */ var _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _reducer _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( 5469 ) ;
/* harmony import */ var _selectors _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 8368 ) ;
/* harmony import */ var _private _selectors _ _WEBPACK _IMPORTED _MODULE _11 _ _ = _ _webpack _require _ _ ( 8741 ) ;
/* harmony import */ var _actions _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( 3440 ) ;
/* harmony import */ var _private _actions _ _WEBPACK _IMPORTED _MODULE _12 _ _ = _ _webpack _require _ _ ( 9424 ) ;
/* harmony import */ var _resolvers _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 6384 ) ;
/* harmony import */ var _locks _actions _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( 2239 ) ;
/* harmony import */ var _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 5914 ) ;
/* harmony import */ var _name _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( 2278 ) ;
/* harmony import */ var _lock _unlock _ _WEBPACK _IMPORTED _MODULE _10 _ _ = _ _webpack _require _ _ ( 6378 ) ;
/* harmony import */ var _dynamic _entities _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( 8582 ) ;
/* harmony import */ var _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 9410 ) ;
/* harmony import */ var _entity _provider _ _WEBPACK _IMPORTED _MODULE _17 _ _ = _ _webpack _require _ _ ( 4460 ) ;
/* harmony import */ var _entity _types _ _WEBPACK _IMPORTED _MODULE _13 _ _ = _ _webpack _require _ _ ( 3377 ) ;
/* harmony import */ var _entity _types _ _WEBPACK _IMPORTED _MODULE _13 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _entity _types _ _WEBPACK _IMPORTED _MODULE _13 _ _ ) ;
/* harmony reexport (unknown) */ var _ _WEBPACK _REEXPORT _OBJECT _ _ = { } ;
/* harmony reexport (unknown) */ for ( const _ _WEBPACK _IMPORT _KEY _ _ in _entity _types _ _WEBPACK _IMPORTED _MODULE _13 _ _ ) if ( [ "default" , "EntityProvider" , "store" ] . indexOf ( _ _WEBPACK _IMPORT _KEY _ _ ) < 0 ) _ _WEBPACK _REEXPORT _OBJECT _ _ [ _ _WEBPACK _IMPORT _KEY _ _ ] = ( ) => _entity _types _ _WEBPACK _IMPORTED _MODULE _13 _ _ [ _ _WEBPACK _IMPORT _KEY _ _ ]
/* harmony reexport (unknown) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , _ _WEBPACK _REEXPORT _OBJECT _ _ ) ;
/* harmony import */ var _fetch _ _WEBPACK _IMPORTED _MODULE _14 _ _ = _ _webpack _require _ _ ( 7006 ) ;
/* harmony import */ var _hooks _ _WEBPACK _IMPORTED _MODULE _15 _ _ = _ _webpack _require _ _ ( 5891 ) ;
/* harmony import */ var _private _apis _ _WEBPACK _IMPORTED _MODULE _16 _ _ = _ _webpack _require _ _ ( 7826 ) ;
const entitiesConfig = [
... _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .rootEntitiesConfig */ . Mr ,
... _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .additionalEntityConfigLoaders */ . L2 . filter ( ( config ) => ! ! config . name )
] ;
const entitySelectors = entitiesConfig . reduce ( ( result , entity ) => {
const { kind , name , plural } = entity ;
const getEntityRecordMethodName = ( 0 , _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .getMethodName */ . zD ) ( kind , name ) ;
result [ getEntityRecordMethodName ] = ( state , key , query ) => {
( 0 , _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* ["default"] */ . A ) ( kind , name , getEntityRecordMethodName , {
isShorthandSelector : true ,
alternativeFunctionName : "getEntityRecord"
} ) ;
return _selectors _ _WEBPACK _IMPORTED _MODULE _3 _ _ . getEntityRecord ( state , kind , name , key , query ) ;
} ;
if ( plural ) {
const getEntityRecordsMethodName = ( 0 , _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .getMethodName */ . zD ) ( kind , plural , "get" ) ;
result [ getEntityRecordsMethodName ] = ( state , query ) => {
( 0 , _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* ["default"] */ . A ) ( kind , name , getEntityRecordsMethodName , {
isShorthandSelector : true ,
alternativeFunctionName : "getEntityRecords"
} ) ;
return _selectors _ _WEBPACK _IMPORTED _MODULE _3 _ _ . getEntityRecords ( state , kind , name , query ) ;
} ;
}
return result ;
} , { } ) ;
const entityResolvers = entitiesConfig . reduce ( ( result , entity ) => {
const { kind , name , plural } = entity ;
const getEntityRecordMethodName = ( 0 , _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .getMethodName */ . zD ) ( kind , name ) ;
result [ getEntityRecordMethodName ] = ( key , query ) => {
( 0 , _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* ["default"] */ . A ) ( kind , name , getEntityRecordMethodName , {
isShorthandSelector : true ,
alternativeFunctionName : "getEntityRecord"
} ) ;
return _resolvers _ _WEBPACK _IMPORTED _MODULE _4 _ _ . getEntityRecord ( kind , name , key , query ) ;
} ;
if ( plural ) {
const getEntityRecordsMethodName = ( 0 , _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .getMethodName */ . zD ) ( kind , plural , "get" ) ;
result [ getEntityRecordsMethodName ] = ( ... args ) => {
( 0 , _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* ["default"] */ . A ) ( kind , plural , getEntityRecordsMethodName , {
isShorthandSelector : true ,
alternativeFunctionName : "getEntityRecords"
} ) ;
return _resolvers _ _WEBPACK _IMPORTED _MODULE _4 _ _ . getEntityRecords ( kind , name , ... args ) ;
} ;
result [ getEntityRecordsMethodName ] . shouldInvalidate = ( action ) => _resolvers _ _WEBPACK _IMPORTED _MODULE _4 _ _ . getEntityRecords . shouldInvalidate ( action , kind , name ) ;
}
return result ;
} , { } ) ;
const entityActions = entitiesConfig . reduce ( ( result , entity ) => {
const { kind , name } = entity ;
const saveEntityRecordMethodName = ( 0 , _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .getMethodName */ . zD ) ( kind , name , "save" ) ;
result [ saveEntityRecordMethodName ] = ( record , options ) => {
( 0 , _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* ["default"] */ . A ) ( kind , name , saveEntityRecordMethodName , {
isShorthandSelector : true ,
alternativeFunctionName : "saveEntityRecord"
} ) ;
return _actions _ _WEBPACK _IMPORTED _MODULE _5 _ _ . saveEntityRecord ( kind , name , record , options ) ;
} ;
const deleteEntityRecordMethodName = ( 0 , _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .getMethodName */ . zD ) ( kind , name , "delete" ) ;
result [ deleteEntityRecordMethodName ] = ( key , query , options ) => {
( 0 , _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* ["default"] */ . A ) ( kind , name , deleteEntityRecordMethodName , {
isShorthandSelector : true ,
alternativeFunctionName : "deleteEntityRecord"
} ) ;
return _actions _ _WEBPACK _IMPORTED _MODULE _5 _ _ . deleteEntityRecord ( kind , name , key , query , options ) ;
} ;
return result ;
} , { } ) ;
const storeConfig = ( ) => ( {
reducer : _reducer _ _WEBPACK _IMPORTED _MODULE _6 _ _ /* ["default"] */ . Ay ,
actions : {
... _dynamic _entities _ _WEBPACK _IMPORTED _MODULE _7 _ _ /* .dynamicActions */ . B ,
... _actions _ _WEBPACK _IMPORTED _MODULE _5 _ _ ,
... entityActions ,
... ( 0 , _locks _actions _ _WEBPACK _IMPORTED _MODULE _8 _ _ /* ["default"] */ . A ) ( )
} ,
selectors : {
... _dynamic _entities _ _WEBPACK _IMPORTED _MODULE _7 _ _ /* .dynamicSelectors */ . A ,
... _selectors _ _WEBPACK _IMPORTED _MODULE _3 _ _ ,
... entitySelectors
} ,
resolvers : { ... _resolvers _ _WEBPACK _IMPORTED _MODULE _4 _ _ , ... entityResolvers }
} ) ;
const store = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createReduxStore ) ( _name _ _WEBPACK _IMPORTED _MODULE _9 _ _ /* .STORE_NAME */ . E , storeConfig ( ) ) ;
( 0 , _lock _unlock _ _WEBPACK _IMPORTED _MODULE _10 _ _ /* .unlock */ . T ) ( store ) . registerPrivateSelectors ( _private _selectors _ _WEBPACK _IMPORTED _MODULE _11 _ _ ) ;
( 0 , _lock _unlock _ _WEBPACK _IMPORTED _MODULE _10 _ _ /* .unlock */ . T ) ( store ) . registerPrivateActions ( _private _actions _ _WEBPACK _IMPORTED _MODULE _12 _ _ ) ;
( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . register ) ( store ) ;
2024-04-17 11:32:24 +02:00
2020-09-15 14:29:22 +02:00
2022-04-02 10:26:41 +02:00
2023-12-07 09:44:11 +01:00
2022-04-02 10:26:41 +02:00
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
/***/ 4997 :
/***/ ( ( module ) => {
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
module . exports = window [ "wp" ] [ "blocks" ] ;
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ 5003 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ A : ( ) => ( /* binding */ setNestedValue )
/* harmony export */ } ) ;
function setNestedValue ( object , path , value ) {
if ( ! object || typeof object !== "object" ) {
return object ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const normalizedPath = Array . isArray ( path ) ? path : path . split ( "." ) ;
normalizedPath . reduce ( ( acc , key , idx ) => {
if ( acc [ key ] === void 0 ) {
if ( Number . isInteger ( normalizedPath [ idx + 1 ] ) ) {
acc [ key ] = [ ] ;
} else {
acc [ key ] = { } ;
}
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
if ( idx === normalizedPath . length - 1 ) {
acc [ key ] = value ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return acc [ key ] ;
} , object ) ;
return object ;
}
2023-12-07 09:44:11 +01:00
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
/***/ 5101 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ Z : ( ) => ( /* binding */ RECEIVE _INTERMEDIATE _RESULTS )
/* harmony export */ } ) ;
const RECEIVE _INTERMEDIATE _RESULTS = Symbol (
"RECEIVE_INTERMEDIATE_RESULTS"
) ;
/***/ } ) ,
/***/ 5469 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
Ay : ( ) => ( /* binding */ reducer _reducer _default )
} ) ;
// UNUSED EXPORTS: autosaves, blockPatternCategories, blockPatterns, currentGlobalStylesId, currentTheme, currentUser, defaultTemplates, editsReference, embedPreviews, entities, entitiesConfig, navigationFallbackId, registeredPostMeta, themeBaseGlobalStyles, themeGlobalStyleRevisions, themeGlobalStyleVariations, undoManager, userPatternCategories, userPermissions, users
// EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js
var es6 = _ _webpack _require _ _ ( 7734 ) ;
var es6 _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( es6 ) ;
; // external ["wp","compose"]
const external _wp _compose _namespaceObject = window [ "wp" ] [ "compose" ] ;
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 7143 ) ;
; // external ["wp","isShallowEqual"]
const external _wp _isShallowEqual _namespaceObject = window [ "wp" ] [ "isShallowEqual" ] ;
var external _wp _isShallowEqual _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _isShallowEqual _namespaceObject ) ;
; // ./node_modules/@wordpress/undo-manager/build-module/index.js
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
function mergeHistoryChanges ( changes1 , changes2 ) {
const newChanges = { ... changes1 } ;
Object . entries ( changes2 ) . forEach ( ( [ key , value ] ) => {
if ( newChanges [ key ] ) {
newChanges [ key ] = { ... newChanges [ key ] , to : value . to } ;
} else {
newChanges [ key ] = value ;
}
} ) ;
return newChanges ;
}
const addHistoryChangesIntoRecord = ( record , changes ) => {
const existingChangesIndex = record ? . findIndex (
( { id : recordIdentifier } ) => {
return typeof recordIdentifier === "string" ? recordIdentifier === changes . id : external _wp _isShallowEqual _default ( ) ( recordIdentifier , changes . id ) ;
}
) ;
const nextRecord = [ ... record ] ;
if ( existingChangesIndex !== - 1 ) {
nextRecord [ existingChangesIndex ] = {
id : changes . id ,
changes : mergeHistoryChanges (
nextRecord [ existingChangesIndex ] . changes ,
changes . changes
)
} ;
} else {
nextRecord . push ( changes ) ;
}
return nextRecord ;
} ;
function createUndoManager ( ) {
let history = [ ] ;
let stagedRecord = [ ] ;
let offset = 0 ;
const dropPendingRedos = ( ) => {
history = history . slice ( 0 , offset || void 0 ) ;
offset = 0 ;
} ;
const appendStagedRecordToLatestHistoryRecord = ( ) => {
const index = history . length === 0 ? 0 : history . length - 1 ;
let latestRecord = history [ index ] ? ? [ ] ;
stagedRecord . forEach ( ( changes ) => {
latestRecord = addHistoryChangesIntoRecord ( latestRecord , changes ) ;
} ) ;
stagedRecord = [ ] ;
history [ index ] = latestRecord ;
} ;
const isRecordEmpty = ( record ) => {
const filteredRecord = record . filter ( ( { changes } ) => {
return Object . values ( changes ) . some (
( { from , to } ) => typeof from !== "function" && typeof to !== "function" && ! external _wp _isShallowEqual _default ( ) ( from , to )
) ;
} ) ;
return ! filteredRecord . length ;
} ;
return {
addRecord ( record , isStaged = false ) {
const isEmpty = ! record || isRecordEmpty ( record ) ;
if ( isStaged ) {
if ( isEmpty ) {
return ;
}
record . forEach ( ( changes ) => {
stagedRecord = addHistoryChangesIntoRecord (
stagedRecord ,
changes
) ;
} ) ;
} else {
dropPendingRedos ( ) ;
if ( stagedRecord . length ) {
appendStagedRecordToLatestHistoryRecord ( ) ;
}
if ( isEmpty ) {
return ;
}
history . push ( record ) ;
}
} ,
undo ( ) {
if ( stagedRecord . length ) {
dropPendingRedos ( ) ;
appendStagedRecordToLatestHistoryRecord ( ) ;
}
const undoRecord = history [ history . length - 1 + offset ] ;
if ( ! undoRecord ) {
return ;
}
offset -= 1 ;
return undoRecord ;
} ,
redo ( ) {
const redoRecord = history [ history . length + offset ] ;
if ( ! redoRecord ) {
return ;
}
offset += 1 ;
return redoRecord ;
} ,
hasUndo ( ) {
return ! ! history [ history . length - 1 + offset ] ;
} ,
hasRedo ( ) {
return ! ! history [ history . length + offset ] ;
}
} ;
}
2025-04-25 12:30:07 +02:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/utils/if-matching-action.js
const ifMatchingAction = ( isMatch ) => ( reducer ) => ( state , action ) => {
if ( state === void 0 || isMatch ( action ) ) {
return reducer ( state , action ) ;
}
return state ;
} ;
var if _matching _action _default = ifMatchingAction ;
2023-12-07 09:44:11 +01:00
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/utils/replace-action.js
const replaceAction = ( replacer ) => ( reducer ) => ( state , action ) => {
return reducer ( state , replacer ( action ) ) ;
} ;
var replace _action _default = replaceAction ;
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/utils/conservative-map-item.js
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
function conservativeMapItem ( item , nextItem ) {
if ( ! item ) {
return nextItem ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
let hasChanges = false ;
const result = { } ;
for ( const key in nextItem ) {
if ( es6 _default ( ) ( item [ key ] , nextItem [ key ] ) ) {
result [ key ] = item [ key ] ;
} else {
hasChanges = true ;
result [ key ] = nextItem [ key ] ;
2025-04-25 12:30:07 +02:00
}
}
2025-12-12 13:15:55 +01:00
if ( ! hasChanges ) {
return item ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
for ( const key in item ) {
if ( ! result . hasOwnProperty ( key ) ) {
result [ key ] = item [ key ] ;
2025-04-25 12:30:07 +02:00
}
}
2025-12-12 13:15:55 +01:00
return result ;
}
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/utils/on-sub-key.js
const onSubKey = ( actionProperty ) => ( reducer ) => ( state = { } , action ) => {
const key = action [ actionProperty ] ;
if ( key === void 0 ) {
return state ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const nextKeyState = reducer ( state [ key ] , action ) ;
if ( nextKeyState === state [ key ] ) {
return state ;
}
return {
... state ,
[ key ] : nextKeyState
} ;
} ;
var on _sub _key _default = onSubKey ;
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/entities.js + 2 modules
var entities = _ _webpack _require _ _ ( 5914 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/get-query-parts.js + 1 modules
var get _query _parts = _ _webpack _require _ _ ( 4027 ) ;
; // ./node_modules/@wordpress/core-data/build-module/queried-data/reducer.js
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
function getContextFromAction ( action ) {
const { query } = action ;
if ( ! query ) {
return "default" ;
2020-12-10 14:06:04 +01:00
}
2025-12-12 13:15:55 +01:00
const queryParts = ( 0 , get _query _parts /* default */ . A ) ( query ) ;
return queryParts . context ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function getMergedItemIds ( itemIds , nextItemIds , page , perPage ) {
const receivedAllIds = page === 1 && perPage === - 1 ;
if ( receivedAllIds ) {
return nextItemIds ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const nextItemIdsStartIndex = ( page - 1 ) * perPage ;
const size = Math . max (
itemIds ? . length ? ? 0 ,
nextItemIdsStartIndex + nextItemIds . length
) ;
const mergedItemIds = new Array ( size ) ;
for ( let i = 0 ; i < size ; i ++ ) {
const isInNextItemsRange = i >= nextItemIdsStartIndex && i < nextItemIdsStartIndex + perPage ;
mergedItemIds [ i ] = isInNextItemsRange ? nextItemIds [ i - nextItemIdsStartIndex ] : itemIds ? . [ i ] ;
}
return mergedItemIds ;
}
function removeEntitiesById ( entities , ids ) {
return Object . fromEntries (
Object . entries ( entities ) . filter (
( [ id ] ) => ! ids . some ( ( itemId ) => {
if ( Number . isInteger ( itemId ) ) {
return itemId === + id ;
}
return itemId === id ;
} )
)
) ;
}
function items ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_ITEMS" : {
const context = getContextFromAction ( action ) ;
const key = action . key || entities /* DEFAULT_ENTITY_KEY */ . C _ ;
return {
... state ,
[ context ] : {
... state [ context ] ,
... action . items . reduce ( ( accumulator , value ) => {
const itemId = value ? . [ key ] ;
accumulator [ itemId ] = conservativeMapItem (
state ? . [ context ] ? . [ itemId ] ,
value
) ;
return accumulator ;
} , { } )
}
} ;
2020-12-10 14:06:04 +01:00
}
2025-12-12 13:15:55 +01:00
case "REMOVE_ITEMS" :
return Object . fromEntries (
Object . entries ( state ) . map ( ( [ itemId , contextState ] ) => [
itemId ,
removeEntitiesById ( contextState , action . itemIds )
] )
) ;
2020-12-10 14:06:04 +01:00
}
2025-12-12 13:15:55 +01:00
return state ;
}
function itemIsComplete ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_ITEMS" : {
const context = getContextFromAction ( action ) ;
const { query , key = entities /* DEFAULT_ENTITY_KEY */ . C _ } = action ;
const queryParts = query ? ( 0 , get _query _parts /* default */ . A ) ( query ) : { } ;
const isCompleteQuery = ! query || ! Array . isArray ( queryParts . fields ) ;
return {
... state ,
[ context ] : {
... state [ context ] ,
... action . items . reduce ( ( result , item ) => {
const itemId = item ? . [ key ] ;
result [ itemId ] = state ? . [ context ] ? . [ itemId ] || isCompleteQuery ;
return result ;
} , { } )
}
} ;
}
case "REMOVE_ITEMS" :
return Object . fromEntries (
Object . entries ( state ) . map ( ( [ itemId , contextState ] ) => [
itemId ,
removeEntitiesById ( contextState , action . itemIds )
] )
) ;
}
return state ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const receiveQueries = ( 0 , external _wp _compose _namespaceObject . compose ) ( [
// Limit to matching action type so we don't attempt to replace action on
// an unhandled action.
if _matching _action _default ( ( action ) => "query" in action ) ,
// Inject query parts into action for use both in `onSubKey` and reducer.
replace _action _default ( ( action ) => {
if ( action . query ) {
return {
... action ,
... ( 0 , get _query _parts /* default */ . A ) ( action . query )
} ;
}
return action ;
} ) ,
on _sub _key _default ( "context" ) ,
// Queries shape is shared, but keyed by query `stableKey` part. Original
// reducer tracks only a single query object.
on _sub _key _default ( "stableKey" )
] ) ( ( state = { } , action ) => {
const { type , page , perPage , key = entities /* DEFAULT_ENTITY_KEY */ . C _ } = action ;
if ( type !== "RECEIVE_ITEMS" ) {
return state ;
}
return {
itemIds : getMergedItemIds (
state ? . itemIds || [ ] ,
action . items . map ( ( item ) => item ? . [ key ] ) . filter ( Boolean ) ,
page ,
perPage
) ,
meta : action . meta
} ;
} ) ;
const queries = ( state = { } , action ) => {
switch ( action . type ) {
case "RECEIVE_ITEMS" :
return receiveQueries ( state , action ) ;
case "REMOVE_ITEMS" :
const removedItems = action . itemIds . reduce ( ( result , itemId ) => {
result [ itemId ] = true ;
return result ;
} , { } ) ;
return Object . fromEntries (
Object . entries ( state ) . map (
( [ queryGroup , contextQueries ] ) => [
queryGroup ,
Object . fromEntries (
Object . entries ( contextQueries ) . map (
( [ query , queryItems ] ) => [
query ,
{
... queryItems ,
itemIds : queryItems . itemIds . filter (
( queryId ) => ! removedItems [ queryId ]
)
}
]
)
)
]
)
) ;
default :
return state ;
}
} ;
var reducer _default = ( 0 , external _wp _data _ . combineReducers ) ( {
items ,
itemIsComplete ,
queries
} ) ;
; // ./node_modules/@wordpress/core-data/build-module/reducer.js
2025-04-25 12:30:07 +02:00
2024-04-17 11:32:24 +02:00
2023-12-07 09:44:11 +01:00
2022-12-15 17:47:31 +01:00
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
function users ( state = { byId : { } , queries : { } } , action ) {
switch ( action . type ) {
case "RECEIVE_USER_QUERY" :
return {
byId : {
... state . byId ,
// Key users by their ID.
... action . users . reduce (
( newUsers , user ) => ( {
... newUsers ,
[ user . id ] : user
} ) ,
{ }
)
} ,
queries : {
... state . queries ,
[ action . queryID ] : action . users . map ( ( user ) => user . id )
}
} ;
2020-05-06 17:23:38 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function currentUser ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_CURRENT_USER" :
return action . currentUser ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
}
function currentTheme ( state = void 0 , action ) {
switch ( action . type ) {
case "RECEIVE_CURRENT_THEME" :
return action . currentTheme . stylesheet ;
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function currentGlobalStylesId ( state = void 0 , action ) {
switch ( action . type ) {
case "RECEIVE_CURRENT_GLOBAL_STYLES_ID" :
return action . id ;
}
return state ;
}
function themeBaseGlobalStyles ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_THEME_GLOBAL_STYLES" :
return {
... state ,
[ action . stylesheet ] : action . globalStyles
} ;
}
return state ;
}
function themeGlobalStyleVariations ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS" :
return {
... state ,
[ action . stylesheet ] : action . variations
} ;
}
return state ;
}
const withMultiEntityRecordEdits = ( reducer ) => ( state , action ) => {
if ( action . type === "UNDO" || action . type === "REDO" ) {
const { record } = action ;
let newState = state ;
record . forEach ( ( { id : { kind , name , recordId } , changes } ) => {
newState = reducer ( newState , {
type : "EDIT_ENTITY_RECORD" ,
kind ,
name ,
recordId ,
edits : Object . entries ( changes ) . reduce (
( acc , [ key , value ] ) => {
acc [ key ] = action . type === "UNDO" ? value . from : value . to ;
return acc ;
} ,
{ }
)
2025-04-25 12:30:07 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
} ) ;
return newState ;
}
return reducer ( state , action ) ;
} ;
function entity ( entityConfig ) {
return ( 0 , external _wp _compose _namespaceObject . compose ) ( [
withMultiEntityRecordEdits ,
// Limit to matching action type so we don't attempt to replace action on
// an unhandled action.
if _matching _action _default (
( action ) => action . name && action . kind && action . name === entityConfig . name && action . kind === entityConfig . kind
) ,
// Inject the entity config into the action.
replace _action _default ( ( action ) => {
return {
key : entityConfig . key || entities /* DEFAULT_ENTITY_KEY */ . C _ ,
... action
} ;
} )
] ) (
( 0 , external _wp _data _ . combineReducers ) ( {
queriedData : reducer _default ,
edits : ( state = { } , action ) => {
switch ( action . type ) {
case "RECEIVE_ITEMS" :
const context = action ? . query ? . context ? ? "default" ;
if ( context !== "default" ) {
return state ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const nextState = { ... state } ;
for ( const record of action . items ) {
const recordId = record ? . [ action . key ] ;
const edits = nextState [ recordId ] ;
if ( ! edits ) {
continue ;
}
const nextEdits2 = Object . keys ( edits ) . reduce (
( acc , key ) => {
if (
// Edits are the "raw" attribute values, but records may have
// objects with more properties, so we use `get` here for the
// comparison.
! es6 _default ( ) (
edits [ key ] ,
record [ key ] ? . raw ? ? record [ key ]
) && // Sometimes the server alters the sent value which means
// we need to also remove the edits before the api request.
( ! action . persistedEdits || ! es6 _default ( ) (
edits [ key ] ,
action . persistedEdits [ key ]
) )
) {
acc [ key ] = edits [ key ] ;
}
return acc ;
} ,
{ }
) ;
if ( Object . keys ( nextEdits2 ) . length ) {
nextState [ recordId ] = nextEdits2 ;
} else {
delete nextState [ recordId ] ;
}
}
return nextState ;
case "EDIT_ENTITY_RECORD" :
const nextEdits = {
... state [ action . recordId ] ,
... action . edits
} ;
Object . keys ( nextEdits ) . forEach ( ( key ) => {
if ( nextEdits [ key ] === void 0 ) {
delete nextEdits [ key ] ;
}
} ) ;
return {
... state ,
[ action . recordId ] : nextEdits
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
} ,
saving : ( state = { } , action ) => {
switch ( action . type ) {
case "SAVE_ENTITY_RECORD_START" :
case "SAVE_ENTITY_RECORD_FINISH" :
return {
... state ,
[ action . recordId ] : {
pending : action . type === "SAVE_ENTITY_RECORD_START" ,
error : action . error ,
isAutosave : action . isAutosave
}
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
} ,
deleting : ( state = { } , action ) => {
switch ( action . type ) {
case "DELETE_ENTITY_RECORD_START" :
case "DELETE_ENTITY_RECORD_FINISH" :
return {
... state ,
[ action . recordId ] : {
pending : action . type === "DELETE_ENTITY_RECORD_START" ,
error : action . error
}
} ;
}
return state ;
} ,
revisions : ( state = { } , action ) => {
if ( action . type === "RECEIVE_ITEM_REVISIONS" ) {
const recordKey = action . recordKey ;
delete action . recordKey ;
const newState = reducer _default ( state [ recordKey ] , {
... action ,
type : "RECEIVE_ITEMS"
} ) ;
return {
... state ,
[ recordKey ] : newState
} ;
}
if ( action . type === "REMOVE_ITEMS" ) {
return Object . fromEntries (
Object . entries ( state ) . filter (
( [ id ] ) => ! action . itemIds . some ( ( itemId ) => {
if ( Number . isInteger ( itemId ) ) {
return itemId === + id ;
}
return itemId === id ;
} )
)
) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
}
} )
) ;
}
function entitiesConfig ( state = entities /* rootEntitiesConfig */ . Mr , action ) {
switch ( action . type ) {
case "ADD_ENTITIES" :
return [ ... state , ... action . entities ] ;
}
return state ;
}
const reducer _entities = ( state = { } , action ) => {
const newConfig = entitiesConfig ( state . config , action ) ;
let entitiesDataReducer = state . reducer ;
if ( ! entitiesDataReducer || newConfig !== state . config ) {
const entitiesByKind = newConfig . reduce ( ( acc , record ) => {
const { kind } = record ;
if ( ! acc [ kind ] ) {
acc [ kind ] = [ ] ;
}
acc [ kind ] . push ( record ) ;
return acc ;
} , { } ) ;
entitiesDataReducer = ( 0 , external _wp _data _ . combineReducers ) (
Object . fromEntries (
Object . entries ( entitiesByKind ) . map (
( [ kind , subEntities ] ) => {
const kindReducer = ( 0 , external _wp _data _ . combineReducers ) (
Object . fromEntries (
subEntities . map ( ( entityConfig ) => [
entityConfig . name ,
entity ( entityConfig )
] )
)
) ;
return [ kind , kindReducer ] ;
}
)
)
) ;
}
const newData = entitiesDataReducer ( state . records , action ) ;
if ( newData === state . records && newConfig === state . config && entitiesDataReducer === state . reducer ) {
return state ;
}
return {
reducer : entitiesDataReducer ,
records : newData ,
config : newConfig
2025-04-25 12:30:07 +02:00
} ;
2025-12-12 13:15:55 +01:00
} ;
function undoManager ( state = createUndoManager ( ) ) {
return state ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function editsReference ( state = { } , action ) {
switch ( action . type ) {
case "EDIT_ENTITY_RECORD" :
case "UNDO" :
case "REDO" :
return { } ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
}
function embedPreviews ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_EMBED_PREVIEW" :
const { url , preview } = action ;
return {
... state ,
[ url ] : preview
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
}
function userPermissions ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_USER_PERMISSION" :
return {
... state ,
[ action . key ] : action . isAllowed
} ;
case "RECEIVE_USER_PERMISSIONS" :
return {
... state ,
... action . permissions
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
}
function autosaves ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_AUTOSAVES" :
const { postId , autosaves : autosavesData } = action ;
return {
... state ,
[ postId ] : autosavesData
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
}
function blockPatterns ( state = [ ] , action ) {
switch ( action . type ) {
case "RECEIVE_BLOCK_PATTERNS" :
return action . patterns ;
}
return state ;
}
function blockPatternCategories ( state = [ ] , action ) {
switch ( action . type ) {
case "RECEIVE_BLOCK_PATTERN_CATEGORIES" :
return action . categories ;
}
return state ;
}
function userPatternCategories ( state = [ ] , action ) {
switch ( action . type ) {
case "RECEIVE_USER_PATTERN_CATEGORIES" :
return action . patternCategories ;
}
return state ;
}
function navigationFallbackId ( state = null , action ) {
switch ( action . type ) {
case "RECEIVE_NAVIGATION_FALLBACK_ID" :
return action . fallbackId ;
}
return state ;
}
function themeGlobalStyleRevisions ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_THEME_GLOBAL_STYLE_REVISIONS" :
return {
... state ,
[ action . currentId ] : action . revisions
} ;
}
return state ;
}
function defaultTemplates ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_DEFAULT_TEMPLATE" :
return {
... state ,
[ JSON . stringify ( action . query ) ] : action . templateId
} ;
}
return state ;
}
function registeredPostMeta ( state = { } , action ) {
switch ( action . type ) {
case "RECEIVE_REGISTERED_POST_META" :
return {
... state ,
[ action . postType ] : action . registeredPostMeta
} ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return state ;
2020-05-06 17:23:38 +02:00
}
2025-12-12 13:15:55 +01:00
var reducer _reducer _default = ( 0 , external _wp _data _ . combineReducers ) ( {
users ,
currentTheme ,
currentGlobalStylesId ,
currentUser ,
themeGlobalStyleVariations ,
themeBaseGlobalStyles ,
themeGlobalStyleRevisions ,
entities : reducer _entities ,
editsReference ,
undoManager ,
embedPreviews ,
userPermissions ,
autosaves ,
blockPatterns ,
blockPatternCategories ,
userPatternCategories ,
navigationFallbackId ,
defaultTemplates ,
registeredPostMeta
} ) ;
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ 5663 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ xQ : ( ) => ( /* binding */ camelCase )
/* harmony export */ } ) ;
/* unused harmony exports camelCaseTransform, camelCaseTransformMerge */
/* harmony import */ var tslib _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1635 ) ;
/* harmony import */ var pascal _case _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 287 ) ;
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
function camelCaseTransform ( input , index ) {
if ( index === 0 )
return input . toLowerCase ( ) ;
return ( 0 , pascal _case _ _WEBPACK _IMPORTED _MODULE _0 _ _ /* .pascalCaseTransform */ . l3 ) ( input , index ) ;
}
function camelCaseTransformMerge ( input , index ) {
if ( index === 0 )
return input . toLowerCase ( ) ;
return pascalCaseTransformMerge ( input ) ;
}
function camelCase ( input , options ) {
if ( options === void 0 ) { options = { } ; }
return ( 0 , pascal _case _ _WEBPACK _IMPORTED _MODULE _0 _ _ /* .pascalCase */ . fL ) ( input , ( 0 , tslib _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .__assign */ . Cl ) ( { transform : camelCaseTransform } , options ) ) ;
}
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 5891 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
qh : ( ) => ( /* reexport */ _ _experimentalUseEntityRecord ) ,
bM : ( ) => ( /* reexport */ use _entity _records /* __experimentalUseEntityRecords */ . bM ) ,
_ : ( ) => ( /* reexport */ _ _experimentalUseResourcePermissions ) ,
hg : ( ) => ( /* reexport */ useEntityBlockEditor ) ,
mV : ( ) => ( /* reexport */ useEntityId ) ,
S$ : ( ) => ( /* reexport */ useEntityProp ) ,
MA : ( ) => ( /* reexport */ useEntityRecord ) ,
$u : ( ) => ( /* reexport */ use _entity _records /* default */ . Ay ) ,
qs : ( ) => ( /* reexport */ use _resource _permissions _default )
} ) ;
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 7143 ) ;
// EXTERNAL MODULE: external ["wp","deprecated"]
var external _wp _deprecated _ = _ _webpack _require _ _ ( 4040 ) ;
var external _wp _deprecated _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _deprecated _ ) ;
// EXTERNAL MODULE: external ["wp","element"]
var external _wp _element _ = _ _webpack _require _ _ ( 6087 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/hooks/use-query-select.js + 2 modules
var use _query _select = _ _webpack _require _ _ ( 7541 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/index.js
var build _module = _ _webpack _require _ _ ( 4565 ) ;
; // ./node_modules/@wordpress/core-data/build-module/hooks/use-entity-record.js
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
const EMPTY _OBJECT = { } ;
function useEntityRecord ( kind , name , recordId , options = { enabled : true } ) {
const { editEntityRecord , saveEditedEntityRecord } = ( 0 , external _wp _data _ . useDispatch ) ( build _module . store ) ;
const mutations = ( 0 , external _wp _element _ . useMemo ) (
( ) => ( {
edit : ( record2 , editOptions = { } ) => editEntityRecord ( kind , name , recordId , record2 , editOptions ) ,
save : ( saveOptions = { } ) => saveEditedEntityRecord ( kind , name , recordId , {
throwOnError : true ,
... saveOptions
} )
} ) ,
[ editEntityRecord , kind , name , recordId , saveEditedEntityRecord ]
) ;
const { editedRecord , hasEdits , edits } = ( 0 , external _wp _data _ . useSelect ) (
( select ) => {
if ( ! options . enabled ) {
return {
editedRecord : EMPTY _OBJECT ,
hasEdits : false ,
edits : EMPTY _OBJECT
} ;
}
return {
editedRecord : select ( build _module . store ) . getEditedEntityRecord (
kind ,
name ,
recordId
) ,
hasEdits : select ( build _module . store ) . hasEditsForEntityRecord (
kind ,
name ,
recordId
) ,
edits : select ( build _module . store ) . getEntityRecordNonTransientEdits (
kind ,
name ,
recordId
)
} ;
} ,
[ kind , name , recordId , options . enabled ]
) ;
const { data : record , ... querySelectRest } = ( 0 , use _query _select /* default */ . A ) (
( query ) => {
if ( ! options . enabled ) {
return {
data : null
} ;
}
return query ( build _module . store ) . getEntityRecord ( kind , name , recordId ) ;
} ,
[ kind , name , recordId , options . enabled ]
) ;
2025-04-25 12:30:07 +02:00
return {
2025-12-12 13:15:55 +01:00
record ,
editedRecord ,
hasEdits ,
edits ,
... querySelectRest ,
... mutations
2025-04-25 12:30:07 +02:00
} ;
2019-11-15 22:59:44 +01:00
}
2025-12-12 13:15:55 +01:00
function _ _experimentalUseEntityRecord ( kind , name , recordId , options ) {
external _wp _deprecated _default ( ) ( ` wp.data.__experimentalUseEntityRecord ` , {
alternative : "wp.data.useEntityRecord" ,
since : "6.1"
} ) ;
return useEntityRecord ( kind , name , recordId , options ) ;
}
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/hooks/use-entity-records.js
var use _entity _records = _ _webpack _require _ _ ( 7078 ) ;
; // external ["wp","warning"]
const external _wp _warning _namespaceObject = window [ "wp" ] [ "warning" ] ;
var external _wp _warning _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _warning _namespaceObject ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/hooks/constants.js
var constants = _ _webpack _require _ _ ( 2859 ) ;
; // ./node_modules/@wordpress/core-data/build-module/hooks/use-resource-permissions.js
function useResourcePermissions ( resource , id ) {
const isEntity = typeof resource === "object" ;
const resourceAsString = isEntity ? JSON . stringify ( resource ) : resource ;
if ( isEntity && typeof id !== "undefined" ) {
external _wp _warning _default ( ) (
` When 'resource' is an entity object, passing 'id' as a separate argument isn't supported. `
) ;
}
return ( 0 , use _query _select /* default */ . A ) (
( resolve ) => {
const hasId = isEntity ? ! ! resource . id : ! ! id ;
const { canUser } = resolve ( build _module . store ) ;
const create = canUser (
"create" ,
isEntity ? { kind : resource . kind , name : resource . name } : resource
) ;
if ( ! hasId ) {
const read2 = canUser ( "read" , resource ) ;
const isResolving2 = create . isResolving || read2 . isResolving ;
const hasResolved2 = create . hasResolved && read2 . hasResolved ;
let status2 = constants /* Status */ . n . Idle ;
if ( isResolving2 ) {
status2 = constants /* Status */ . n . Resolving ;
} else if ( hasResolved2 ) {
status2 = constants /* Status */ . n . Success ;
}
return {
status : status2 ,
isResolving : isResolving2 ,
hasResolved : hasResolved2 ,
canCreate : create . hasResolved && create . data ,
canRead : read2 . hasResolved && read2 . data
} ;
}
const read = canUser ( "read" , resource , id ) ;
const update = canUser ( "update" , resource , id ) ;
const _delete = canUser ( "delete" , resource , id ) ;
const isResolving = read . isResolving || create . isResolving || update . isResolving || _delete . isResolving ;
const hasResolved = read . hasResolved && create . hasResolved && update . hasResolved && _delete . hasResolved ;
let status = constants /* Status */ . n . Idle ;
if ( isResolving ) {
status = constants /* Status */ . n . Resolving ;
} else if ( hasResolved ) {
status = constants /* Status */ . n . Success ;
}
return {
status ,
isResolving ,
hasResolved ,
canRead : hasResolved && read . data ,
canCreate : hasResolved && create . data ,
canUpdate : hasResolved && update . data ,
canDelete : hasResolved && _delete . data
} ;
} ,
[ resourceAsString , id ]
) ;
}
var use _resource _permissions _default = useResourcePermissions ;
function _ _experimentalUseResourcePermissions ( resource , id ) {
external _wp _deprecated _default ( ) ( ` wp.data.__experimentalUseResourcePermissions ` , {
alternative : "wp.data.useResourcePermissions" ,
since : "6.1"
} ) ;
return useResourcePermissions ( resource , id ) ;
}
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: external ["wp","blocks"]
var external _wp _blocks _ = _ _webpack _require _ _ ( 4997 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/name.js
var build _module _name = _ _webpack _require _ _ ( 2278 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/entity-context.js
var entity _context = _ _webpack _require _ _ ( 8843 ) ;
; // ./node_modules/@wordpress/core-data/build-module/hooks/use-entity-id.js
function useEntityId ( kind , name ) {
const context = ( 0 , external _wp _element _ . useContext ) ( entity _context /* EntityContext */ . D ) ;
return context ? . [ kind ] ? . [ name ] ;
2020-05-06 17:23:38 +02:00
}
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
; // external ["wp","richText"]
const external _wp _richText _namespaceObject = window [ "wp" ] [ "richText" ] ;
; // external ["wp","blockEditor"]
const external _wp _blockEditor _namespaceObject = window [ "wp" ] [ "blockEditor" ] ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/lock-unlock.js + 1 modules
var lock _unlock = _ _webpack _require _ _ ( 6378 ) ;
; // ./node_modules/@wordpress/core-data/build-module/footnotes/get-rich-text-values-cached.js
let unlockedApis ;
const cache = /* @__PURE__ */ new WeakMap ( ) ;
function getRichTextValuesCached ( block ) {
if ( ! unlockedApis ) {
unlockedApis = ( 0 , lock _unlock /* unlock */ . T ) ( external _wp _blockEditor _namespaceObject . privateApis ) ;
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
if ( ! cache . has ( block ) ) {
const values = unlockedApis . getRichTextValues ( [ block ] ) ;
cache . set ( block , values ) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return cache . get ( block ) ;
2022-04-02 10:26:41 +02:00
}
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/footnotes/get-footnotes-order.js
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
const get _footnotes _order _cache = /* @__PURE__ */ new WeakMap ( ) ;
function getBlockFootnotesOrder ( block ) {
if ( ! get _footnotes _order _cache . has ( block ) ) {
const order = [ ] ;
for ( const value of getRichTextValuesCached ( block ) ) {
if ( ! value ) {
continue ;
}
value . replacements . forEach ( ( { type , attributes } ) => {
if ( type === "core/footnote" ) {
order . push ( attributes [ "data-fn" ] ) ;
}
} ) ;
}
get _footnotes _order _cache . set ( block , order ) ;
}
return get _footnotes _order _cache . get ( block ) ;
2020-05-06 17:23:38 +02:00
}
2025-12-12 13:15:55 +01:00
function getFootnotesOrder ( blocks ) {
return blocks . flatMap ( getBlockFootnotesOrder ) ;
2020-05-06 17:23:38 +02:00
}
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/footnotes/index.js
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
let oldFootnotes = { } ;
function updateFootnotesFromMeta ( blocks , meta ) {
const output = { blocks } ;
if ( ! meta ) {
return output ;
2020-05-06 17:23:38 +02:00
}
2025-12-12 13:15:55 +01:00
if ( meta . footnotes === void 0 ) {
return output ;
}
const newOrder = getFootnotesOrder ( blocks ) ;
const footnotes = meta . footnotes ? JSON . parse ( meta . footnotes ) : [ ] ;
const currentOrder = footnotes . map ( ( fn ) => fn . id ) ;
if ( currentOrder . join ( "" ) === newOrder . join ( "" ) ) {
return output ;
}
const newFootnotes = newOrder . map (
( fnId ) => footnotes . find ( ( fn ) => fn . id === fnId ) || oldFootnotes [ fnId ] || {
id : fnId ,
content : ""
}
) ;
function updateAttributes ( attributes ) {
if ( ! attributes || Array . isArray ( attributes ) || typeof attributes !== "object" ) {
return attributes ;
}
attributes = { ... attributes } ;
for ( const key in attributes ) {
const value = attributes [ key ] ;
if ( Array . isArray ( value ) ) {
attributes [ key ] = value . map ( updateAttributes ) ;
continue ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
if ( typeof value !== "string" && ! ( value instanceof external _wp _richText _namespaceObject . RichTextData ) ) {
continue ;
}
const richTextValue = typeof value === "string" ? external _wp _richText _namespaceObject . RichTextData . fromHTMLString ( value ) : new external _wp _richText _namespaceObject . RichTextData ( value ) ;
let hasFootnotes = false ;
richTextValue . replacements . forEach ( ( replacement ) => {
if ( replacement . type === "core/footnote" ) {
const id = replacement . attributes [ "data-fn" ] ;
const index = newOrder . indexOf ( id ) ;
const countValue = ( 0 , external _wp _richText _namespaceObject . create ) ( {
html : replacement . innerHTML
} ) ;
countValue . text = String ( index + 1 ) ;
countValue . formats = Array . from (
{ length : countValue . text . length } ,
( ) => countValue . formats [ 0 ]
) ;
countValue . replacements = Array . from (
{ length : countValue . text . length } ,
( ) => countValue . replacements [ 0 ]
) ;
replacement . innerHTML = ( 0 , external _wp _richText _namespaceObject . toHTMLString ) ( {
value : countValue
} ) ;
hasFootnotes = true ;
}
2025-04-25 12:30:07 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
if ( hasFootnotes ) {
attributes [ key ] = typeof value === "string" ? richTextValue . toHTMLString ( ) : richTextValue ;
}
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
return attributes ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
function updateBlocksAttributes ( _ _blocks ) {
return _ _blocks . map ( ( block ) => {
return {
... block ,
attributes : updateAttributes ( block . attributes ) ,
innerBlocks : updateBlocksAttributes ( block . innerBlocks )
} ;
} ) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const newBlocks = updateBlocksAttributes ( blocks ) ;
oldFootnotes = {
... oldFootnotes ,
... footnotes . reduce ( ( acc , fn ) => {
if ( ! newOrder . includes ( fn . id ) ) {
acc [ fn . id ] = fn ;
}
2025-04-25 12:30:07 +02:00
return acc ;
} , { } )
} ;
2025-12-12 13:15:55 +01:00
return {
meta : {
... meta ,
footnotes : JSON . stringify ( newFootnotes )
} ,
blocks : newBlocks
} ;
}
2023-12-07 09:44:11 +01:00
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/hooks/use-entity-block-editor.js
2023-12-07 09:44:11 +01:00
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
const EMPTY _ARRAY = [ ] ;
const parsedBlocksCache = /* @__PURE__ */ new WeakMap ( ) ;
function useEntityBlockEditor ( kind , name , { id : _id } = { } ) {
const providerId = useEntityId ( kind , name ) ;
const id = _id ? ? providerId ;
const { getEntityRecord , getEntityRecordEdits } = ( 0 , external _wp _data _ . useSelect ) ( build _module _name /* STORE_NAME */ . E ) ;
const { content , editedBlocks , meta } = ( 0 , external _wp _data _ . useSelect ) (
( select ) => {
if ( ! id ) {
return { } ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const { getEditedEntityRecord } = select ( build _module _name /* STORE_NAME */ . E ) ;
const editedRecord = getEditedEntityRecord ( kind , name , id ) ;
return {
editedBlocks : editedRecord . blocks ,
content : editedRecord . content ,
meta : editedRecord . meta
} ;
} ,
[ kind , name , id ]
) ;
const { _ _unstableCreateUndoLevel , editEntityRecord } = ( 0 , external _wp _data _ . useDispatch ) ( build _module _name /* STORE_NAME */ . E ) ;
const blocks = ( 0 , external _wp _element _ . useMemo ) ( ( ) => {
if ( ! id ) {
return void 0 ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
if ( editedBlocks ) {
return editedBlocks ;
}
if ( ! content || typeof content !== "string" ) {
return EMPTY _ARRAY ;
}
const edits = getEntityRecordEdits ( kind , name , id ) ;
const isUnedited = ! edits || ! Object . keys ( edits ) . length ;
const cackeKey = isUnedited ? getEntityRecord ( kind , name , id ) : edits ;
let _blocks = parsedBlocksCache . get ( cackeKey ) ;
if ( ! _blocks ) {
_blocks = ( 0 , external _wp _blocks _ . parse ) ( content ) ;
parsedBlocksCache . set ( cackeKey , _blocks ) ;
}
return _blocks ;
} , [
kind ,
name ,
id ,
editedBlocks ,
content ,
getEntityRecord ,
getEntityRecordEdits
] ) ;
const onChange = ( 0 , external _wp _element _ . useCallback ) (
( newBlocks , options ) => {
const noChange = blocks === newBlocks ;
if ( noChange ) {
return _ _unstableCreateUndoLevel ( kind , name , id ) ;
}
const { selection , ... rest } = options ;
const edits = {
selection ,
content : ( { blocks : blocksForSerialization = [ ] } ) => ( 0 , external _wp _blocks _ . _ _unstableSerializeAndClean ) ( blocksForSerialization ) ,
... updateFootnotesFromMeta ( newBlocks , meta )
} ;
editEntityRecord ( kind , name , id , edits , {
isCached : false ,
... rest
} ) ;
} ,
[
2025-04-25 12:30:07 +02:00
kind ,
name ,
2025-12-12 13:15:55 +01:00
id ,
blocks ,
meta ,
_ _unstableCreateUndoLevel ,
editEntityRecord
]
) ;
const onInput = ( 0 , external _wp _element _ . useCallback ) (
( newBlocks , options ) => {
const { selection , ... rest } = options ;
const footnotesChanges = updateFootnotesFromMeta ( newBlocks , meta ) ;
const edits = { selection , ... footnotesChanges } ;
editEntityRecord ( kind , name , id , edits , {
isCached : true ,
... rest
} ) ;
} ,
[ kind , name , id , meta , editEntityRecord ]
) ;
return [ blocks , onInput , onChange ] ;
}
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/hooks/use-entity-prop.js
function useEntityProp ( kind , name , prop , _id ) {
const providerId = useEntityId ( kind , name ) ;
const id = _id ? ? providerId ;
const { value , fullValue } = ( 0 , external _wp _data _ . useSelect ) (
( select ) => {
const { getEntityRecord , getEditedEntityRecord } = select ( build _module _name /* STORE_NAME */ . E ) ;
const record = getEntityRecord ( kind , name , id ) ;
const editedRecord = getEditedEntityRecord ( kind , name , id ) ;
return record && editedRecord ? {
value : editedRecord [ prop ] ,
fullValue : record [ prop ]
} : { } ;
2025-04-25 12:30:07 +02:00
} ,
2025-12-12 13:15:55 +01:00
[ kind , name , id , prop ]
) ;
const { editEntityRecord } = ( 0 , external _wp _data _ . useDispatch ) ( build _module _name /* STORE_NAME */ . E ) ;
const setValue = ( 0 , external _wp _element _ . useCallback ) (
( newValue ) => {
editEntityRecord ( kind , name , id , {
[ prop ] : newValue
} ) ;
2025-04-25 12:30:07 +02:00
} ,
2025-12-12 13:15:55 +01:00
[ editEntityRecord , kind , name , id , prop ]
) ;
return [ value , setValue , fullValue ] ;
}
2023-12-07 09:44:11 +01:00
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/hooks/index.js
2025-04-25 12:30:07 +02:00
2024-04-17 11:32:24 +02:00
2023-12-07 09:44:11 +01:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 5914 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
C _ : ( ) => ( /* binding */ DEFAULT _ENTITY _KEY ) ,
L2 : ( ) => ( /* binding */ additionalEntityConfigLoaders ) ,
TK : ( ) => ( /* binding */ deprecatedEntities ) ,
zD : ( ) => ( /* binding */ getMethodName ) ,
Mr : ( ) => ( /* binding */ rootEntitiesConfig )
} ) ;
// UNUSED EXPORTS: prePersistPostType
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
var tslib _es6 = _ _webpack _require _ _ ( 1635 ) ;
// EXTERNAL MODULE: ./node_modules/no-case/dist.es2015/index.js
var dist _es2015 = _ _webpack _require _ _ ( 2226 ) ;
; // ./node_modules/upper-case-first/dist.es2015/index.js
2025-02-28 08:42:11 +01:00
/ * *
2025-12-12 13:15:55 +01:00
* Upper case the first character of an input string .
2025-02-28 08:42:11 +01:00
* /
2025-12-12 13:15:55 +01:00
function upperCaseFirst ( input ) {
return input . charAt ( 0 ) . toUpperCase ( ) + input . substr ( 1 ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/capital-case/dist.es2015/index.js
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
function capitalCaseTransform ( input ) {
return upperCaseFirst ( input . toLowerCase ( ) ) ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
function capitalCase ( input , options ) {
2022-12-15 17:47:31 +01:00
if ( options === void 0 ) { options = { } ; }
2025-12-12 13:15:55 +01:00
return ( 0 , dist _es2015 /* noCase */ . W ) ( input , ( 0 , tslib _es6 /* __assign */ . Cl ) ( { delimiter : " " , transform : capitalCaseTransform } , options ) ) ;
}
// EXTERNAL MODULE: ./node_modules/pascal-case/dist.es2015/index.js
var pascal _case _dist _es2015 = _ _webpack _require _ _ ( 287 ) ;
// EXTERNAL MODULE: external ["wp","apiFetch"]
var external _wp _apiFetch _ = _ _webpack _require _ _ ( 1455 ) ;
var external _wp _apiFetch _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _apiFetch _ ) ;
// EXTERNAL MODULE: external ["wp","blocks"]
var external _wp _blocks _ = _ _webpack _require _ _ ( 4997 ) ;
// EXTERNAL MODULE: external ["wp","i18n"]
var external _wp _i18n _ = _ _webpack _require _ _ ( 7723 ) ;
; // ./node_modules/@wordpress/core-data/build-module/entities.js
2025-02-28 08:42:11 +01:00
2019-11-15 22:59:44 +01:00
2023-12-07 09:44:11 +01:00
2019-11-15 22:59:44 +01:00
2025-12-12 13:15:55 +01:00
const DEFAULT _ENTITY _KEY = "id" ;
const POST _RAW _ATTRIBUTES = [ "title" , "excerpt" , "content" ] ;
const blocksTransientEdits = {
blocks : {
read : ( record ) => ( 0 , external _wp _blocks _ . parse ) ( record . content ? . raw ? ? "" ) ,
write : ( record ) => ( {
content : ( 0 , external _wp _blocks _ . _ _unstableSerializeAndClean ) ( record . blocks )
} )
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
} ;
const rootEntitiesConfig = [
{
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Base" ) ,
kind : "root" ,
key : false ,
name : "__unstableBase" ,
baseURL : "/" ,
baseURLParams : {
// Please also change the preload path when changing this.
// @see lib/compat/wordpress-6.8/preload.php
_fields : [
"description" ,
"gmt_offset" ,
"home" ,
"name" ,
"site_icon" ,
"site_icon_url" ,
"site_logo" ,
"timezone_string" ,
"url" ,
"page_for_posts" ,
"page_on_front" ,
"show_on_front"
] . join ( "," )
} ,
// The entity doesn't support selecting multiple records.
// The property is maintained for backward compatibility.
plural : "__unstableBases"
} ,
{
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Post Type" ) ,
name : "postType" ,
kind : "root" ,
key : "slug" ,
baseURL : "/wp/v2/types" ,
baseURLParams : { context : "edit" } ,
plural : "postTypes"
} ,
{
name : "media" ,
kind : "root" ,
baseURL : "/wp/v2/media" ,
baseURLParams : { context : "edit" } ,
plural : "mediaItems" ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Media" ) ,
rawAttributes : [ "caption" , "title" , "description" ] ,
supportsPagination : true
} ,
{
name : "taxonomy" ,
kind : "root" ,
key : "slug" ,
baseURL : "/wp/v2/taxonomies" ,
baseURLParams : { context : "edit" } ,
plural : "taxonomies" ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Taxonomy" )
} ,
{
name : "sidebar" ,
kind : "root" ,
baseURL : "/wp/v2/sidebars" ,
baseURLParams : { context : "edit" } ,
plural : "sidebars" ,
transientEdits : { blocks : true } ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Widget areas" )
} ,
{
name : "widget" ,
kind : "root" ,
baseURL : "/wp/v2/widgets" ,
baseURLParams : { context : "edit" } ,
plural : "widgets" ,
transientEdits : { blocks : true } ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Widgets" )
} ,
{
name : "widgetType" ,
kind : "root" ,
baseURL : "/wp/v2/widget-types" ,
baseURLParams : { context : "edit" } ,
plural : "widgetTypes" ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Widget types" )
} ,
{
label : ( 0 , external _wp _i18n _ . _ _ ) ( "User" ) ,
name : "user" ,
kind : "root" ,
baseURL : "/wp/v2/users" ,
getTitle : ( record ) => record ? . name || record ? . slug ,
baseURLParams : { context : "edit" } ,
plural : "users" ,
supportsPagination : true
} ,
{
name : "comment" ,
kind : "root" ,
baseURL : "/wp/v2/comments" ,
baseURLParams : { context : "edit" } ,
plural : "comments" ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Comment" ) ,
supportsPagination : true
} ,
{
name : "menu" ,
kind : "root" ,
baseURL : "/wp/v2/menus" ,
baseURLParams : { context : "edit" } ,
plural : "menus" ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Menu" ) ,
supportsPagination : true
} ,
{
name : "menuItem" ,
kind : "root" ,
baseURL : "/wp/v2/menu-items" ,
baseURLParams : { context : "edit" } ,
plural : "menuItems" ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Menu Item" ) ,
rawAttributes : [ "title" ] ,
supportsPagination : true
} ,
{
name : "menuLocation" ,
kind : "root" ,
baseURL : "/wp/v2/menu-locations" ,
baseURLParams : { context : "edit" } ,
plural : "menuLocations" ,
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Menu Location" ) ,
key : "name"
} ,
{
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Global Styles" ) ,
name : "globalStyles" ,
kind : "root" ,
baseURL : "/wp/v2/global-styles" ,
baseURLParams : { context : "edit" } ,
plural : "globalStylesVariations" ,
// Should be different from name.
getTitle : ( ) => ( 0 , external _wp _i18n _ . _ _ ) ( "Custom Styles" ) ,
getRevisionsUrl : ( parentId , revisionId ) => ` /wp/v2/global-styles/ ${ parentId } /revisions ${ revisionId ? "/" + revisionId : "" } ` ,
supportsPagination : true
} ,
{
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Themes" ) ,
name : "theme" ,
kind : "root" ,
baseURL : "/wp/v2/themes" ,
baseURLParams : { context : "edit" } ,
plural : "themes" ,
key : "stylesheet"
} ,
{
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Plugins" ) ,
name : "plugin" ,
kind : "root" ,
baseURL : "/wp/v2/plugins" ,
baseURLParams : { context : "edit" } ,
plural : "plugins" ,
key : "plugin"
} ,
{
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Status" ) ,
name : "status" ,
kind : "root" ,
baseURL : "/wp/v2/statuses" ,
baseURLParams : { context : "edit" } ,
plural : "statuses" ,
key : "slug"
}
] ;
const deprecatedEntities = {
root : {
media : {
since : "6.9" ,
alternative : {
kind : "postType" ,
name : "attachment"
}
}
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
} ;
const additionalEntityConfigLoaders = [
{ kind : "postType" , loadEntities : loadPostTypeEntities } ,
{ kind : "taxonomy" , loadEntities : loadTaxonomyEntities } ,
{
kind : "root" ,
name : "site" ,
plural : "sites" ,
loadEntities : loadSiteEntity
}
] ;
const prePersistPostType = ( persistedRecord , edits ) => {
const newEdits = { } ;
if ( persistedRecord ? . status === "auto-draft" ) {
if ( ! edits . status && ! newEdits . status ) {
newEdits . status = "draft" ;
}
if ( ( ! edits . title || edits . title === "Auto Draft" ) && ! newEdits . title && ( ! persistedRecord ? . title || persistedRecord ? . title === "Auto Draft" ) ) {
newEdits . title = "" ;
}
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
return newEdits ;
} ;
async function loadPostTypeEntities ( ) {
const postTypes = await external _wp _apiFetch _default ( ) ( {
path : "/wp/v2/types?context=view"
} ) ;
return Object . entries ( postTypes ? ? { } ) . map ( ( [ name , postType ] ) => {
const isTemplate = [ "wp_template" , "wp_template_part" ] . includes (
name
2024-04-17 11:32:24 +02:00
) ;
2025-12-12 13:15:55 +01:00
const namespace = postType ? . rest _namespace ? ? "wp/v2" ;
const entity = {
kind : "postType" ,
baseURL : ` / ${ namespace } / ${ postType . rest _base } ` ,
baseURLParams : { context : "edit" } ,
name ,
label : postType . name ,
transientEdits : {
... blocksTransientEdits ,
selection : true
} ,
mergedEdits : { meta : true } ,
rawAttributes : POST _RAW _ATTRIBUTES ,
getTitle : ( record ) => record ? . title ? . rendered || record ? . title || ( isTemplate ? capitalCase ( record . slug ? ? "" ) : String ( record . id ) ) ,
_ _unstablePrePersist : isTemplate ? void 0 : prePersistPostType ,
_ _unstable _rest _base : postType . rest _base ,
supportsPagination : true ,
getRevisionsUrl : ( parentId , revisionId ) => ` / ${ namespace } / ${ postType . rest _base } / ${ parentId } /revisions ${ revisionId ? "/" + revisionId : "" } ` ,
revisionKey : isTemplate ? "wp_id" : DEFAULT _ENTITY _KEY
} ;
if ( window . _ _experimentalEnableSync ) {
if ( false ) { }
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return entity ;
} ) ;
}
async function loadTaxonomyEntities ( ) {
const taxonomies = await external _wp _apiFetch _default ( ) ( {
path : "/wp/v2/taxonomies?context=view"
} ) ;
return Object . entries ( taxonomies ? ? { } ) . map ( ( [ name , taxonomy ] ) => {
const namespace = taxonomy ? . rest _namespace ? ? "wp/v2" ;
return {
kind : "taxonomy" ,
baseURL : ` / ${ namespace } / ${ taxonomy . rest _base } ` ,
baseURLParams : { context : "edit" } ,
name ,
label : taxonomy . name ,
getTitle : ( record ) => record ? . name ,
supportsPagination : true
} ;
} ) ;
}
async function loadSiteEntity ( ) {
const entity = {
label : ( 0 , external _wp _i18n _ . _ _ ) ( "Site" ) ,
name : "site" ,
kind : "root" ,
key : false ,
baseURL : "/wp/v2/settings" ,
meta : { }
} ;
if ( window . _ _experimentalEnableSync ) {
if ( false ) { }
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const site = await external _wp _apiFetch _default ( ) ( {
path : entity . baseURL ,
method : "OPTIONS"
} ) ;
const labels = { } ;
Object . entries ( site ? . schema ? . properties ? ? { } ) . forEach (
( [ key , value ] ) => {
if ( typeof value === "object" && value . title ) {
labels [ key ] = value . title ;
}
}
) ;
return [ { ... entity , meta : { labels } } ] ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const getMethodName = ( kind , name , prefix = "get" ) => {
const kindPrefix = kind === "root" ? "" : ( 0 , pascal _case _dist _es2015 /* pascalCase */ . fL ) ( kind ) ;
const suffix = ( 0 , pascal _case _dist _es2015 /* pascalCase */ . fL ) ( name ) ;
return ` ${ prefix } ${ kindPrefix } ${ suffix } ` ;
} ;
2025-02-28 08:42:11 +01:00
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 6087 :
/***/ ( ( module ) => {
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
"use strict" ;
module . exports = window [ "wp" ] [ "element" ] ;
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
/***/ 6378 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
"use strict" ;
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
s : ( ) => ( /* binding */ lock ) ,
T : ( ) => ( /* binding */ unlock )
} ) ;
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
; // external ["wp","privateApis"]
const external _wp _privateApis _namespaceObject = window [ "wp" ] [ "privateApis" ] ;
; // ./node_modules/@wordpress/core-data/build-module/lock-unlock.js
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
const { lock , unlock } = ( 0 , external _wp _privateApis _namespaceObject . _ _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/core-data"
) ;
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
/***/ 6384 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
"use strict" ;
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
_ _experimentalGetCurrentGlobalStylesId : ( ) => ( /* binding */ _ _experimentalGetCurrentGlobalStylesId ) ,
_ _experimentalGetCurrentThemeBaseGlobalStyles : ( ) => ( /* binding */ _ _experimentalGetCurrentThemeBaseGlobalStyles ) ,
_ _experimentalGetCurrentThemeGlobalStylesVariations : ( ) => ( /* binding */ _ _experimentalGetCurrentThemeGlobalStylesVariations ) ,
canUser : ( ) => ( /* binding */ canUser ) ,
canUserEditEntityRecord : ( ) => ( /* binding */ canUserEditEntityRecord ) ,
getAuthors : ( ) => ( /* binding */ getAuthors ) ,
getAutosave : ( ) => ( /* binding */ getAutosave ) ,
getAutosaves : ( ) => ( /* binding */ getAutosaves ) ,
getBlockPatternCategories : ( ) => ( /* binding */ getBlockPatternCategories ) ,
getBlockPatterns : ( ) => ( /* binding */ getBlockPatterns ) ,
getCurrentTheme : ( ) => ( /* binding */ getCurrentTheme ) ,
getCurrentThemeGlobalStylesRevisions : ( ) => ( /* binding */ getCurrentThemeGlobalStylesRevisions ) ,
getCurrentUser : ( ) => ( /* binding */ getCurrentUser ) ,
getDefaultTemplateId : ( ) => ( /* binding */ getDefaultTemplateId ) ,
getEditedEntityRecord : ( ) => ( /* binding */ getEditedEntityRecord ) ,
getEmbedPreview : ( ) => ( /* binding */ getEmbedPreview ) ,
getEntitiesConfig : ( ) => ( /* binding */ getEntitiesConfig ) ,
getEntityRecord : ( ) => ( /* binding */ getEntityRecord ) ,
getEntityRecords : ( ) => ( /* binding */ getEntityRecords ) ,
getEntityRecordsTotalItems : ( ) => ( /* binding */ getEntityRecordsTotalItems ) ,
getEntityRecordsTotalPages : ( ) => ( /* binding */ getEntityRecordsTotalPages ) ,
getNavigationFallbackId : ( ) => ( /* binding */ getNavigationFallbackId ) ,
getRawEntityRecord : ( ) => ( /* binding */ getRawEntityRecord ) ,
getRegisteredPostMeta : ( ) => ( /* binding */ getRegisteredPostMeta ) ,
getRevision : ( ) => ( /* binding */ getRevision ) ,
getRevisions : ( ) => ( /* binding */ getRevisions ) ,
getThemeSupports : ( ) => ( /* binding */ getThemeSupports ) ,
getUserPatternCategories : ( ) => ( /* binding */ getUserPatternCategories )
} ) ;
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: ./node_modules/camel-case/dist.es2015/index.js
var dist _es2015 = _ _webpack _require _ _ ( 5663 ) ;
// EXTERNAL MODULE: external ["wp","url"]
var external _wp _url _ = _ _webpack _require _ _ ( 3832 ) ;
// EXTERNAL MODULE: external ["wp","htmlEntities"]
var external _wp _htmlEntities _ = _ _webpack _require _ _ ( 8537 ) ;
// EXTERNAL MODULE: external ["wp","apiFetch"]
var external _wp _apiFetch _ = _ _webpack _require _ _ ( 1455 ) ;
var external _wp _apiFetch _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _apiFetch _ ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/name.js
var build _module _name = _ _webpack _require _ _ ( 2278 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/entities.js + 2 modules
var entities = _ _webpack _require _ _ ( 5914 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/get-normalized-comma-separable.js
var get _normalized _comma _separable = _ _webpack _require _ _ ( 533 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/user-permissions.js
var user _permissions = _ _webpack _require _ _ ( 2577 ) ;
; // ./node_modules/@wordpress/core-data/build-module/utils/forward-resolver.js
const forwardResolver = ( resolverName ) => ( ... args ) => async ( { resolveSelect } ) => {
await resolveSelect [ resolverName ] ( ... args ) ;
} ;
var forward _resolver _default = forwardResolver ;
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/receive-intermediate-results.js
var receive _intermediate _results = _ _webpack _require _ _ ( 5101 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/fetch/index.js + 2 modules
var fetch = _ _webpack _require _ _ ( 7006 ) ;
; // ./node_modules/@wordpress/core-data/build-module/resolvers.js
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
const getAuthors = ( query ) => async ( { dispatch } ) => {
const path = ( 0 , external _wp _url _ . addQueryArgs ) (
"/wp/v2/users/?who=authors&per_page=100" ,
query
) ;
const users = await external _wp _apiFetch _default ( ) ( { path } ) ;
2024-04-17 11:32:24 +02:00
dispatch . receiveUserQuery ( path , users ) ;
} ;
2025-12-12 13:15:55 +01:00
const getCurrentUser = ( ) => async ( { dispatch } ) => {
const currentUser = await external _wp _apiFetch _default ( ) ( { path : "/wp/v2/users/me" } ) ;
2024-04-17 11:32:24 +02:00
dispatch . receiveCurrentUser ( currentUser ) ;
} ;
2025-12-12 13:15:55 +01:00
const getEntityRecord = ( kind , name , key = "" , query ) => async ( { select , dispatch , registry , resolveSelect } ) => {
2025-04-25 12:30:07 +02:00
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
2025-12-12 13:15:55 +01:00
const entityConfig = configs . find (
( config ) => config . name === name && config . kind === kind
) ;
2025-02-28 08:42:11 +01:00
if ( ! entityConfig ) {
2023-09-26 10:33:34 +02:00
return ;
}
2025-12-12 13:15:55 +01:00
const lock = await dispatch . _ _unstableAcquireStoreLock (
build _module _name /* STORE_NAME */ . E ,
[ "entities" , "records" , kind , name , key ] ,
{ exclusive : false }
) ;
2023-09-26 10:33:34 +02:00
try {
2025-12-12 13:15:55 +01:00
if ( query !== void 0 && query . _fields ) {
query = {
... query ,
_fields : [
... /* @__PURE__ */ new Set ( [
... ( 0 , get _normalized _comma _separable /* default */ . A ) ( query . _fields ) || [ ] ,
entityConfig . key || entities /* DEFAULT_ENTITY_KEY */ . C _
] )
] . join ( )
} ;
}
if ( query !== void 0 && query . _fields ) {
const hasRecord = select . hasEntityRecord (
kind ,
name ,
key ,
query
) ;
if ( hasRecord ) {
return ;
2023-12-07 09:44:11 +01:00
}
2025-12-12 13:15:55 +01:00
}
const path = ( 0 , external _wp _url _ . addQueryArgs ) (
entityConfig . baseURL + ( key ? "/" + key : "" ) ,
{
2023-12-07 09:44:11 +01:00
... entityConfig . baseURLParams ,
... query
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
) ;
const response = await external _wp _apiFetch _default ( ) ( { path , parse : false } ) ;
const record = await response . json ( ) ;
const permissions = ( 0 , user _permissions /* getUserPermissionsFromAllowHeader */ . qY ) (
response . headers ? . get ( "allow" )
) ;
const canUserResolutionsArgs = [ ] ;
const receiveUserPermissionArgs = { } ;
for ( const action of user _permissions /* ALLOWED_RESOURCE_ACTIONS */ . CO ) {
receiveUserPermissionArgs [ ( 0 , user _permissions /* getUserPermissionCacheKey */ . kC ) ( action , {
kind ,
name ,
id : key
} ) ] = permissions [ action ] ;
canUserResolutionsArgs . push ( [
action ,
{ kind , name , id : key }
] ) ;
}
if ( window . _ _experimentalEnableSync && entityConfig . syncConfig && ! query ) {
if ( false ) { }
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
registry . batch ( ( ) => {
dispatch . receiveEntityRecords ( kind , name , record , query ) ;
dispatch . receiveUserPermissions ( receiveUserPermissionArgs ) ;
dispatch . finishResolutions ( "canUser" , canUserResolutionsArgs ) ;
} ) ;
2023-09-26 10:33:34 +02:00
} finally {
dispatch . _ _unstableReleaseStoreLock ( lock ) ;
}
2022-04-02 10:26:41 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getRawEntityRecord = forward _resolver _default ( "getEntityRecord" ) ;
const getEditedEntityRecord = forward _resolver _default ( "getEntityRecord" ) ;
const getEntityRecords = ( kind , name , query = { } ) => async ( { dispatch , registry , resolveSelect } ) => {
2025-04-25 12:30:07 +02:00
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
2025-12-12 13:15:55 +01:00
const entityConfig = configs . find (
( config ) => config . name === name && config . kind === kind
) ;
2025-02-28 08:42:11 +01:00
if ( ! entityConfig ) {
2023-09-26 10:33:34 +02:00
return ;
}
2025-12-12 13:15:55 +01:00
const lock = await dispatch . _ _unstableAcquireStoreLock (
build _module _name /* STORE_NAME */ . E ,
[ "entities" , "records" , kind , name ] ,
{ exclusive : false }
) ;
const rawQuery = { ... query } ;
const key = entityConfig . key || entities /* DEFAULT_ENTITY_KEY */ . C _ ;
function getResolutionsArgs ( records , recordsQuery ) {
const queryArgs = Object . fromEntries (
Object . entries ( recordsQuery ) . filter ( ( [ k , v ] ) => {
return [ "context" , "_fields" ] . includes ( k ) && ! ! v ;
} )
) ;
return records . filter ( ( record ) => record ? . [ key ] ) . map ( ( record ) => [
kind ,
name ,
record [ key ] ,
Object . keys ( queryArgs ) . length > 0 ? queryArgs : void 0
] ) ;
2025-02-28 08:42:11 +01:00
}
2023-09-26 10:33:34 +02:00
try {
if ( query . _fields ) {
2023-12-07 09:44:11 +01:00
query = {
... query ,
2025-12-12 13:15:55 +01:00
_fields : [
... /* @__PURE__ */ new Set ( [
... ( 0 , get _normalized _comma _separable /* default */ . A ) ( query . _fields ) || [ ] ,
key
] )
] . join ( )
2023-09-26 10:33:34 +02:00
} ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
const path = ( 0 , external _wp _url _ . addQueryArgs ) ( entityConfig . baseURL , {
2023-12-07 09:44:11 +01:00
... entityConfig . baseURLParams ,
2023-09-26 10:33:34 +02:00
... query
2021-07-23 11:58:50 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
let records = [ ] , meta ;
2024-04-17 11:32:24 +02:00
if ( entityConfig . supportsPagination && query . per _page !== - 1 ) {
2025-12-12 13:15:55 +01:00
const response = await external _wp _apiFetch _default ( ) ( { path , parse : false } ) ;
2024-04-17 11:32:24 +02:00
records = Object . values ( await response . json ( ) ) ;
meta = {
2025-12-12 13:15:55 +01:00
totalItems : parseInt (
response . headers . get ( "X-WP-Total" )
) ,
totalPages : parseInt (
response . headers . get ( "X-WP-TotalPages" )
)
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
} else if ( query . per _page === - 1 && query [ receive _intermediate _results /* RECEIVE_INTERMEDIATE_RESULTS */ . Z ] === true ) {
2025-02-28 08:42:11 +01:00
let page = 1 ;
let totalPages ;
do {
const response = await external _wp _apiFetch _default ( ) ( {
2025-12-12 13:15:55 +01:00
path : ( 0 , external _wp _url _ . addQueryArgs ) ( path , { page , per _page : 100 } ) ,
2025-02-28 08:42:11 +01:00
parse : false
} ) ;
const pageRecords = Object . values ( await response . json ( ) ) ;
2025-12-12 13:15:55 +01:00
totalPages = parseInt (
response . headers . get ( "X-WP-TotalPages" )
) ;
if ( ! meta ) {
meta = {
totalItems : parseInt (
response . headers . get ( "X-WP-Total" )
) ,
totalPages : 1
} ;
}
2025-02-28 08:42:11 +01:00
records . push ( ... pageRecords ) ;
registry . batch ( ( ) => {
2025-12-12 13:15:55 +01:00
dispatch . receiveEntityRecords (
kind ,
name ,
records ,
query ,
false ,
void 0 ,
meta
) ;
dispatch . finishResolutions (
"getEntityRecord" ,
getResolutionsArgs ( pageRecords , rawQuery )
) ;
2025-02-28 08:42:11 +01:00
} ) ;
page ++ ;
} while ( page <= totalPages ) ;
2024-04-17 11:32:24 +02:00
} else {
2025-12-12 13:15:55 +01:00
records = Object . values ( await external _wp _apiFetch _default ( ) ( { path } ) ) ;
2025-02-28 08:42:11 +01:00
meta = {
totalItems : records . length ,
totalPages : 1
} ;
2024-04-17 11:32:24 +02:00
}
2023-09-26 10:33:34 +02:00
if ( query . _fields ) {
2025-12-12 13:15:55 +01:00
records = records . map ( ( record ) => {
query . _fields . split ( "," ) . forEach ( ( field ) => {
2023-09-26 10:33:34 +02:00
if ( ! record . hasOwnProperty ( field ) ) {
2025-12-12 13:15:55 +01:00
record [ field ] = void 0 ;
2023-09-26 10:33:34 +02:00
}
} ) ;
return record ;
2021-07-23 11:58:50 +02:00
} ) ;
2023-09-26 10:33:34 +02:00
}
2025-02-28 08:42:11 +01:00
registry . batch ( ( ) => {
2025-12-12 13:15:55 +01:00
dispatch . receiveEntityRecords (
kind ,
name ,
records ,
query ,
false ,
void 0 ,
meta
) ;
const targetHints = records . filter (
( record ) => ! ! record ? . [ key ] && ! ! record ? . _links ? . self ? . [ 0 ] ? . targetHints ? . allow
) . map ( ( record ) => ( {
id : record [ key ] ,
permissions : ( 0 , user _permissions /* getUserPermissionsFromAllowHeader */ . qY ) (
record . _links . self [ 0 ] . targetHints . allow
)
} ) ) ;
const canUserResolutionsArgs = [ ] ;
const receiveUserPermissionArgs = { } ;
for ( const targetHint of targetHints ) {
for ( const action of user _permissions /* ALLOWED_RESOURCE_ACTIONS */ . CO ) {
canUserResolutionsArgs . push ( [
action ,
{ kind , name , id : targetHint . id }
] ) ;
receiveUserPermissionArgs [ ( 0 , user _permissions /* getUserPermissionCacheKey */ . kC ) ( action , {
kind ,
name ,
id : targetHint . id
} ) ] = targetHint . permissions [ action ] ;
2025-02-28 08:42:11 +01:00
}
}
2025-12-12 13:15:55 +01:00
if ( targetHints . length > 0 ) {
dispatch . receiveUserPermissions (
receiveUserPermissionArgs
) ;
dispatch . finishResolutions (
"canUser" ,
canUserResolutionsArgs
) ;
}
dispatch . finishResolutions (
"getEntityRecord" ,
getResolutionsArgs ( records , rawQuery )
) ;
2025-02-28 08:42:11 +01:00
dispatch . _ _unstableReleaseStoreLock ( lock ) ;
} ) ;
} catch ( e ) {
2023-09-26 10:33:34 +02:00
dispatch . _ _unstableReleaseStoreLock ( lock ) ;
}
2022-04-02 10:26:41 +02:00
} ;
2025-12-12 13:15:55 +01:00
getEntityRecords . shouldInvalidate = ( action , kind , name ) => {
return ( action . type === "RECEIVE_ITEMS" || action . type === "REMOVE_ITEMS" ) && action . invalidateCache && kind === action . kind && name === action . name ;
2020-05-06 17:23:38 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getEntityRecordsTotalItems = forward _resolver _default ( "getEntityRecords" ) ;
const getEntityRecordsTotalPages = forward _resolver _default ( "getEntityRecords" ) ;
const getCurrentTheme = ( ) => async ( { dispatch , resolveSelect } ) => {
const activeThemes = await resolveSelect . getEntityRecords (
"root" ,
"theme" ,
{ status : "active" }
) ;
2022-04-02 10:26:41 +02:00
dispatch . receiveCurrentTheme ( activeThemes [ 0 ] ) ;
} ;
2025-12-12 13:15:55 +01:00
const getThemeSupports = forward _resolver _default ( "getCurrentTheme" ) ;
const getEmbedPreview = ( url ) => async ( { dispatch } ) => {
2021-07-23 11:58:50 +02:00
try {
2022-04-02 10:26:41 +02:00
const embedProxyResponse = await external _wp _apiFetch _default ( ) ( {
2025-12-12 13:15:55 +01:00
path : ( 0 , external _wp _url _ . addQueryArgs ) ( "/oembed/1.0/proxy" , { url } )
2021-07-23 11:58:50 +02:00
} ) ;
2022-04-02 10:26:41 +02:00
dispatch . receiveEmbedPreview ( url , embedProxyResponse ) ;
2021-07-23 11:58:50 +02:00
} catch ( error ) {
2022-04-02 10:26:41 +02:00
dispatch . receiveEmbedPreview ( url , false ) ;
2021-07-23 11:58:50 +02:00
}
2022-04-02 10:26:41 +02:00
} ;
2025-12-12 13:15:55 +01:00
const canUser = ( requestedAction , resource , id ) => async ( { dispatch , registry , resolveSelect } ) => {
if ( ! user _permissions /* ALLOWED_RESOURCE_ACTIONS */ . CO . includes ( requestedAction ) ) {
2025-02-28 08:42:11 +01:00
throw new Error ( ` ' ${ requestedAction } ' is not a valid action. ` ) ;
}
2025-12-12 13:15:55 +01:00
const { hasStartedResolution } = registry . select ( build _module _name /* STORE_NAME */ . E ) ;
for ( const relatedAction of user _permissions /* ALLOWED_RESOURCE_ACTIONS */ . CO ) {
2022-12-15 17:47:31 +01:00
if ( relatedAction === requestedAction ) {
continue ;
}
2025-12-12 13:15:55 +01:00
const isAlreadyResolving = hasStartedResolution ( "canUser" , [
relatedAction ,
resource ,
id
] ) ;
2022-12-15 17:47:31 +01:00
if ( isAlreadyResolving ) {
return ;
}
2021-07-23 11:58:50 +02:00
}
2025-04-25 12:30:07 +02:00
let resourcePath = null ;
2025-12-12 13:15:55 +01:00
if ( typeof resource === "object" ) {
2025-04-25 12:30:07 +02:00
if ( ! resource . kind || ! resource . name ) {
2025-12-12 13:15:55 +01:00
throw new Error ( "The entity resource object is not valid." ) ;
2025-04-25 12:30:07 +02:00
}
2025-12-12 13:15:55 +01:00
const configs = await resolveSelect . getEntitiesConfig (
resource . kind
) ;
const entityConfig = configs . find (
( config ) => config . name === resource . name && config . kind === resource . kind
) ;
2025-04-25 12:30:07 +02:00
if ( ! entityConfig ) {
return ;
}
2025-12-12 13:15:55 +01:00
resourcePath = entityConfig . baseURL + ( resource . id ? "/" + resource . id : "" ) ;
2025-04-25 12:30:07 +02:00
} else {
2025-12-12 13:15:55 +01:00
resourcePath = ` /wp/v2/ ${ resource } ` + ( id ? "/" + id : "" ) ;
2025-04-25 12:30:07 +02:00
}
2021-07-23 11:58:50 +02:00
let response ;
try {
2022-04-02 10:26:41 +02:00
response = await external _wp _apiFetch _default ( ) ( {
2025-02-28 08:42:11 +01:00
path : resourcePath ,
2025-12-12 13:15:55 +01:00
method : "OPTIONS" ,
2021-07-23 11:58:50 +02:00
parse : false
} ) ;
} catch ( error ) {
return ;
2023-12-07 09:44:11 +01:00
}
2025-12-12 13:15:55 +01:00
const permissions = ( 0 , user _permissions /* getUserPermissionsFromAllowHeader */ . qY ) (
response . headers ? . get ( "allow" )
) ;
2025-02-28 08:42:11 +01:00
registry . batch ( ( ) => {
2025-12-12 13:15:55 +01:00
for ( const action of user _permissions /* ALLOWED_RESOURCE_ACTIONS */ . CO ) {
const key = ( 0 , user _permissions /* getUserPermissionCacheKey */ . kC ) ( action , resource , id ) ;
2025-02-28 08:42:11 +01:00
dispatch . receiveUserPermission ( key , permissions [ action ] ) ;
if ( action !== requestedAction ) {
2025-12-12 13:15:55 +01:00
dispatch . finishResolution ( "canUser" , [
action ,
resource ,
id
] ) ;
2025-02-28 08:42:11 +01:00
}
}
} ) ;
2022-04-02 10:26:41 +02:00
} ;
2025-12-12 13:15:55 +01:00
const canUserEditEntityRecord = ( kind , name , recordId ) => async ( { dispatch } ) => {
await dispatch ( canUser ( "update" , { kind , name , id : recordId } ) ) ;
2022-04-02 10:26:41 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getAutosaves = ( postType , postId ) => async ( { dispatch , resolveSelect } ) => {
2021-07-23 11:58:50 +02:00
const {
2022-12-15 17:47:31 +01:00
rest _base : restBase ,
2025-12-12 13:15:55 +01:00
rest _namespace : restNamespace = "wp/v2" ,
2025-04-25 12:30:07 +02:00
supports
2022-04-02 10:26:41 +02:00
} = await resolveSelect . getPostType ( postType ) ;
2025-04-25 12:30:07 +02:00
if ( ! supports ? . autosave ) {
return ;
}
2022-04-02 10:26:41 +02:00
const autosaves = await external _wp _apiFetch _default ( ) ( {
2022-12-15 17:47:31 +01:00
path : ` / ${ restNamespace } / ${ restBase } / ${ postId } /autosaves?context=edit `
2021-07-23 11:58:50 +02:00
} ) ;
if ( autosaves && autosaves . length ) {
2022-04-02 10:26:41 +02:00
dispatch . receiveAutosaves ( postId , autosaves ) ;
2021-07-23 11:58:50 +02:00
}
2022-04-02 10:26:41 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getAutosave = ( postType , postId ) => async ( { resolveSelect } ) => {
2022-04-02 10:26:41 +02:00
await resolveSelect . getAutosaves ( postType , postId ) ;
} ;
2025-12-12 13:15:55 +01:00
const _ _experimentalGetCurrentGlobalStylesId = ( ) => async ( { dispatch , resolveSelect } ) => {
const activeThemes = await resolveSelect . getEntityRecords (
"root" ,
"theme" ,
{ status : "active" }
) ;
const globalStylesURL = activeThemes ? . [ 0 ] ? . _links ? . [ "wp:user-global-styles" ] ? . [ 0 ] ? . href ;
2025-02-28 08:42:11 +01:00
if ( ! globalStylesURL ) {
return ;
}
const matches = globalStylesURL . match ( /\/(\d+)(?:\?|$)/ ) ;
const id = matches ? Number ( matches [ 1 ] ) : null ;
if ( id ) {
dispatch . _ _experimentalReceiveCurrentGlobalStylesId ( id ) ;
2022-04-02 10:26:41 +02:00
}
} ;
2025-12-12 13:15:55 +01:00
const _ _experimentalGetCurrentThemeBaseGlobalStyles = ( ) => async ( { resolveSelect , dispatch } ) => {
2022-04-02 10:26:41 +02:00
const currentTheme = await resolveSelect . getCurrentTheme ( ) ;
const themeGlobalStyles = await external _wp _apiFetch _default ( ) ( {
2025-02-28 08:42:11 +01:00
path : ` /wp/v2/global-styles/themes/ ${ currentTheme . stylesheet } ?context=view `
2022-04-02 10:26:41 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
dispatch . _ _experimentalReceiveThemeBaseGlobalStyles (
currentTheme . stylesheet ,
themeGlobalStyles
) ;
2022-06-16 14:03:35 +02:00
} ;
2025-12-12 13:15:55 +01:00
const _ _experimentalGetCurrentThemeGlobalStylesVariations = ( ) => async ( { resolveSelect , dispatch } ) => {
2022-06-16 14:03:35 +02:00
const currentTheme = await resolveSelect . getCurrentTheme ( ) ;
const variations = await external _wp _apiFetch _default ( ) ( {
2025-02-28 08:42:11 +01:00
path : ` /wp/v2/global-styles/themes/ ${ currentTheme . stylesheet } /variations?context=view `
2022-06-16 14:03:35 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
dispatch . _ _experimentalReceiveThemeGlobalStyleVariations (
currentTheme . stylesheet ,
variations
) ;
2022-06-16 14:03:35 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getCurrentThemeGlobalStylesRevisions = ( ) => async ( { resolveSelect , dispatch } ) => {
2023-09-26 10:33:34 +02:00
const globalStylesId = await resolveSelect . _ _experimentalGetCurrentGlobalStylesId ( ) ;
2025-12-12 13:15:55 +01:00
const record = globalStylesId ? await resolveSelect . getEntityRecord (
"root" ,
"globalStyles" ,
globalStylesId
) : void 0 ;
const revisionsURL = record ? . _links ? . [ "version-history" ] ? . [ 0 ] ? . href ;
2023-09-26 10:33:34 +02:00
if ( revisionsURL ) {
const resetRevisions = await external _wp _apiFetch _default ( ) ( {
url : revisionsURL
} ) ;
2025-12-12 13:15:55 +01:00
const revisions = resetRevisions ? . map (
( revision ) => Object . fromEntries (
Object . entries ( revision ) . map ( ( [ key , value ] ) => [
( 0 , dist _es2015 /* camelCase */ . xQ ) ( key ) ,
value
] )
)
) ;
dispatch . receiveThemeGlobalStyleRevisions (
globalStylesId ,
revisions
) ;
2023-09-26 10:33:34 +02:00
}
} ;
2025-12-12 13:15:55 +01:00
getCurrentThemeGlobalStylesRevisions . shouldInvalidate = ( action ) => {
return action . type === "SAVE_ENTITY_RECORD_FINISH" && action . kind === "root" && ! action . error && action . name === "globalStyles" ;
2023-09-26 10:33:34 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getBlockPatterns = ( ) => async ( { dispatch } ) => {
const patterns = await ( 0 , fetch /* fetchBlockPatterns */ . l$ ) ( ) ;
dispatch ( { type : "RECEIVE_BLOCK_PATTERNS" , patterns } ) ;
2022-06-16 14:03:35 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getBlockPatternCategories = ( ) => async ( { dispatch } ) => {
2022-06-16 14:03:35 +02:00
const categories = await external _wp _apiFetch _default ( ) ( {
2025-12-12 13:15:55 +01:00
path : "/wp/v2/block-patterns/categories"
2022-06-16 14:03:35 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
dispatch ( { type : "RECEIVE_BLOCK_PATTERN_CATEGORIES" , categories } ) ;
2022-04-02 10:26:41 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getUserPatternCategories = ( ) => async ( { dispatch , resolveSelect } ) => {
const patternCategories = await resolveSelect . getEntityRecords (
"taxonomy" ,
"wp_pattern_category" ,
{
per _page : - 1 ,
_fields : "id,name,description,slug" ,
context : "view"
}
) ;
const mappedPatternCategories = patternCategories ? . map ( ( userCategory ) => ( {
2023-12-07 09:44:11 +01:00
... userCategory ,
2025-12-12 13:15:55 +01:00
label : ( 0 , external _wp _htmlEntities _ . decodeEntities ) ( userCategory . name ) ,
2023-12-07 09:44:11 +01:00
name : userCategory . slug
} ) ) || [ ] ;
dispatch ( {
2025-12-12 13:15:55 +01:00
type : "RECEIVE_USER_PATTERN_CATEGORIES" ,
2023-12-07 09:44:11 +01:00
patternCategories : mappedPatternCategories
} ) ;
} ;
2025-12-12 13:15:55 +01:00
const getNavigationFallbackId = ( ) => async ( { dispatch , select , registry } ) => {
2023-09-26 10:33:34 +02:00
const fallback = await external _wp _apiFetch _default ( ) ( {
2025-12-12 13:15:55 +01:00
path : ( 0 , external _wp _url _ . addQueryArgs ) ( "/wp-block-editor/v1/navigation-fallback" , {
2023-09-26 10:33:34 +02:00
_embed : true
} )
} ) ;
const record = fallback ? . _embedded ? . self ;
2025-02-28 08:42:11 +01:00
registry . batch ( ( ) => {
dispatch . receiveNavigationFallbackId ( fallback ? . id ) ;
if ( ! record ) {
return ;
}
2025-12-12 13:15:55 +01:00
const existingFallbackEntityRecord = select . getEntityRecord (
"postType" ,
"wp_navigation" ,
fallback . id
) ;
2023-09-26 10:33:34 +02:00
const invalidateNavigationQueries = ! existingFallbackEntityRecord ;
2025-12-12 13:15:55 +01:00
dispatch . receiveEntityRecords (
"postType" ,
"wp_navigation" ,
record ,
void 0 ,
invalidateNavigationQueries
) ;
dispatch . finishResolution ( "getEntityRecord" , [
"postType" ,
"wp_navigation" ,
fallback . id
] ) ;
2025-02-28 08:42:11 +01:00
} ) ;
2024-04-17 11:32:24 +02:00
} ;
2025-12-12 13:15:55 +01:00
const getDefaultTemplateId = ( query ) => async ( { dispatch , registry , resolveSelect } ) => {
2024-04-17 11:32:24 +02:00
const template = await external _wp _apiFetch _default ( ) ( {
2025-12-12 13:15:55 +01:00
path : ( 0 , external _wp _url _ . addQueryArgs ) ( "/wp/v2/templates/lookup" , query )
2024-04-17 11:32:24 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
await resolveSelect . getEntitiesConfig ( "postType" ) ;
2025-02-28 08:42:11 +01:00
if ( template ? . id ) {
2025-04-25 12:30:07 +02:00
registry . batch ( ( ) => {
dispatch . receiveDefaultTemplateId ( query , template . id ) ;
2025-12-12 13:15:55 +01:00
dispatch . receiveEntityRecords ( "postType" , "wp_template" , [
template
] ) ;
dispatch . finishResolution ( "getEntityRecord" , [
"postType" ,
"wp_template" ,
template . id
] ) ;
2025-04-25 12:30:07 +02:00
} ) ;
2024-04-17 11:32:24 +02:00
}
} ;
2025-12-12 13:15:55 +01:00
const getRevisions = ( kind , name , recordKey , query = { } ) => async ( { dispatch , registry , resolveSelect } ) => {
2025-04-25 12:30:07 +02:00
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
2025-12-12 13:15:55 +01:00
const entityConfig = configs . find (
( config ) => config . name === name && config . kind === kind
) ;
2025-02-28 08:42:11 +01:00
if ( ! entityConfig ) {
2024-04-17 11:32:24 +02:00
return ;
}
if ( query . _fields ) {
query = {
... query ,
2025-12-12 13:15:55 +01:00
_fields : [
... /* @__PURE__ */ new Set ( [
... ( 0 , get _normalized _comma _separable /* default */ . A ) ( query . _fields ) || [ ] ,
entityConfig . revisionKey || entities /* DEFAULT_ENTITY_KEY */ . C _
] )
] . join ( )
2024-04-17 11:32:24 +02:00
} ;
}
2025-12-12 13:15:55 +01:00
const path = ( 0 , external _wp _url _ . addQueryArgs ) (
entityConfig . getRevisionsUrl ( recordKey ) ,
query
) ;
2024-04-17 11:32:24 +02:00
let records , response ;
const meta = { } ;
const isPaginated = entityConfig . supportsPagination && query . per _page !== - 1 ;
try {
2025-12-12 13:15:55 +01:00
response = await external _wp _apiFetch _default ( ) ( { path , parse : ! isPaginated } ) ;
2024-04-17 11:32:24 +02:00
} catch ( error ) {
return ;
}
if ( response ) {
if ( isPaginated ) {
records = Object . values ( await response . json ( ) ) ;
2025-12-12 13:15:55 +01:00
meta . totalItems = parseInt (
response . headers . get ( "X-WP-Total" )
) ;
2024-04-17 11:32:24 +02:00
} else {
records = Object . values ( response ) ;
}
if ( query . _fields ) {
2025-12-12 13:15:55 +01:00
records = records . map ( ( record ) => {
query . _fields . split ( "," ) . forEach ( ( field ) => {
2024-04-17 11:32:24 +02:00
if ( ! record . hasOwnProperty ( field ) ) {
2025-12-12 13:15:55 +01:00
record [ field ] = void 0 ;
2024-04-17 11:32:24 +02:00
}
} ) ;
return record ;
} ) ;
}
2025-02-28 08:42:11 +01:00
registry . batch ( ( ) => {
2025-12-12 13:15:55 +01:00
dispatch . receiveRevisions (
kind ,
name ,
recordKey ,
records ,
query ,
false ,
meta
) ;
2025-02-28 08:42:11 +01:00
if ( ! query ? . _fields && ! query . context ) {
2025-12-12 13:15:55 +01:00
const key = entityConfig . key || entities /* DEFAULT_ENTITY_KEY */ . C _ ;
const resolutionsArgs = records . filter ( ( record ) => record [ key ] ) . map ( ( record ) => [
kind ,
name ,
recordKey ,
record [ key ]
] ) ;
dispatch . finishResolutions (
"getRevision" ,
resolutionsArgs
) ;
2025-02-28 08:42:11 +01:00
}
} ) ;
2024-04-17 11:32:24 +02:00
}
} ;
2025-12-12 13:15:55 +01:00
getRevisions . shouldInvalidate = ( action , kind , name , recordKey ) => action . type === "SAVE_ENTITY_RECORD_FINISH" && name === action . name && kind === action . kind && ! action . error && recordKey === action . recordId ;
const getRevision = ( kind , name , recordKey , revisionKey , query ) => async ( { dispatch , resolveSelect } ) => {
2025-04-25 12:30:07 +02:00
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
2025-12-12 13:15:55 +01:00
const entityConfig = configs . find (
( config ) => config . name === name && config . kind === kind
) ;
2025-02-28 08:42:11 +01:00
if ( ! entityConfig ) {
2024-04-17 11:32:24 +02:00
return ;
}
2025-12-12 13:15:55 +01:00
if ( query !== void 0 && query . _fields ) {
2024-04-17 11:32:24 +02:00
query = {
... query ,
2025-12-12 13:15:55 +01:00
_fields : [
... /* @__PURE__ */ new Set ( [
... ( 0 , get _normalized _comma _separable /* default */ . A ) ( query . _fields ) || [ ] ,
entityConfig . revisionKey || entities /* DEFAULT_ENTITY_KEY */ . C _
] )
] . join ( )
2024-04-17 11:32:24 +02:00
} ;
}
2025-12-12 13:15:55 +01:00
const path = ( 0 , external _wp _url _ . addQueryArgs ) (
entityConfig . getRevisionsUrl ( recordKey , revisionKey ) ,
query
) ;
2024-04-17 11:32:24 +02:00
let record ;
try {
2025-12-12 13:15:55 +01:00
record = await external _wp _apiFetch _default ( ) ( { path } ) ;
2024-04-17 11:32:24 +02:00
} catch ( error ) {
return ;
}
if ( record ) {
dispatch . receiveRevisions ( kind , name , recordKey , record , query ) ;
2023-09-26 10:33:34 +02:00
}
} ;
2025-12-12 13:15:55 +01:00
const getRegisteredPostMeta = ( postType ) => async ( { dispatch , resolveSelect } ) => {
2025-02-28 08:42:11 +01:00
let options ;
try {
const {
2025-12-12 13:15:55 +01:00
rest _namespace : restNamespace = "wp/v2" ,
2025-02-28 08:42:11 +01:00
rest _base : restBase
2025-12-12 13:15:55 +01:00
} = await resolveSelect . getPostType ( postType ) || { } ;
2025-02-28 08:42:11 +01:00
options = await external _wp _apiFetch _default ( ) ( {
path : ` ${ restNamespace } / ${ restBase } /?context=edit ` ,
2025-12-12 13:15:55 +01:00
method : "OPTIONS"
2025-02-28 08:42:11 +01:00
} ) ;
} catch ( error ) {
return ;
}
if ( options ) {
2025-12-12 13:15:55 +01:00
dispatch . receiveRegisteredPostMeta (
postType ,
options ? . schema ? . properties ? . meta ? . properties
) ;
2025-02-28 08:42:11 +01:00
}
} ;
2025-12-12 13:15:55 +01:00
const getEntitiesConfig = ( kind ) => async ( { dispatch } ) => {
const loader = entities /* additionalEntityConfigLoaders */ . L2 . find (
( l ) => l . kind === kind
) ;
2025-04-25 12:30:07 +02:00
if ( ! loader ) {
return ;
}
try {
const configs = await loader . loadEntities ( ) ;
if ( ! configs . length ) {
return ;
}
dispatch . addEntities ( configs ) ;
} catch {
}
} ;
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 7006 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
Y3 : ( ) => ( /* reexport */ fetchLinkSuggestions ) ,
gr : ( ) => ( /* reexport */ experimental _fetch _url _data _default ) ,
l$ : ( ) => ( /* binding */ fetchBlockPatterns )
} ) ;
// EXTERNAL MODULE: ./node_modules/camel-case/dist.es2015/index.js
var dist _es2015 = _ _webpack _require _ _ ( 5663 ) ;
// EXTERNAL MODULE: external ["wp","apiFetch"]
var external _wp _apiFetch _ = _ _webpack _require _ _ ( 1455 ) ;
var external _wp _apiFetch _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _apiFetch _ ) ;
// EXTERNAL MODULE: external ["wp","url"]
var external _wp _url _ = _ _webpack _require _ _ ( 3832 ) ;
// EXTERNAL MODULE: external ["wp","htmlEntities"]
var external _wp _htmlEntities _ = _ _webpack _require _ _ ( 8537 ) ;
// EXTERNAL MODULE: external ["wp","i18n"]
var external _wp _i18n _ = _ _webpack _require _ _ ( 7723 ) ;
; // ./node_modules/@wordpress/core-data/build-module/fetch/__experimental-fetch-link-suggestions.js
async function fetchLinkSuggestions ( search , searchOptions = { } , editorSettings = { } ) {
const searchOptionsToUse = searchOptions . isInitialSuggestions && searchOptions . initialSuggestionsSearchOptions ? {
... searchOptions ,
... searchOptions . initialSuggestionsSearchOptions
} : searchOptions ;
const {
type ,
subtype ,
page ,
perPage = searchOptions . isInitialSuggestions ? 3 : 20
} = searchOptionsToUse ;
const { disablePostFormats = false } = editorSettings ;
const queries = [ ] ;
if ( ! type || type === "post" ) {
queries . push (
external _wp _apiFetch _default ( ) ( {
path : ( 0 , external _wp _url _ . addQueryArgs ) ( "/wp/v2/search" , {
search ,
page ,
per _page : perPage ,
type : "post" ,
subtype
} )
} ) . then ( ( results2 ) => {
return results2 . map ( ( result ) => {
return {
id : result . id ,
url : result . url ,
title : ( 0 , external _wp _htmlEntities _ . decodeEntities ) ( result . title || "" ) || ( 0 , external _wp _i18n _ . _ _ ) ( "(no title)" ) ,
type : result . subtype || result . type ,
kind : "post-type"
} ;
} ) ;
} ) . catch ( ( ) => [ ] )
// Fail by returning no results.
) ;
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
if ( ! type || type === "term" ) {
queries . push (
external _wp _apiFetch _default ( ) ( {
path : ( 0 , external _wp _url _ . addQueryArgs ) ( "/wp/v2/search" , {
search ,
page ,
per _page : perPage ,
type : "term" ,
subtype
} )
} ) . then ( ( results2 ) => {
return results2 . map ( ( result ) => {
return {
id : result . id ,
url : result . url ,
title : ( 0 , external _wp _htmlEntities _ . decodeEntities ) ( result . title || "" ) || ( 0 , external _wp _i18n _ . _ _ ) ( "(no title)" ) ,
type : result . subtype || result . type ,
kind : "taxonomy"
} ;
} ) ;
} ) . catch ( ( ) => [ ] )
// Fail by returning no results.
) ;
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
if ( ! disablePostFormats && ( ! type || type === "post-format" ) ) {
queries . push (
external _wp _apiFetch _default ( ) ( {
path : ( 0 , external _wp _url _ . addQueryArgs ) ( "/wp/v2/search" , {
search ,
page ,
per _page : perPage ,
type : "post-format" ,
subtype
} )
} ) . then ( ( results2 ) => {
return results2 . map ( ( result ) => {
return {
id : result . id ,
url : result . url ,
title : ( 0 , external _wp _htmlEntities _ . decodeEntities ) ( result . title || "" ) || ( 0 , external _wp _i18n _ . _ _ ) ( "(no title)" ) ,
type : result . subtype || result . type ,
kind : "taxonomy"
} ;
} ) ;
} ) . catch ( ( ) => [ ] )
// Fail by returning no results.
) ;
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
if ( ! type || type === "attachment" ) {
queries . push (
external _wp _apiFetch _default ( ) ( {
path : ( 0 , external _wp _url _ . addQueryArgs ) ( "/wp/v2/media" , {
search ,
page ,
per _page : perPage
} )
} ) . then ( ( results2 ) => {
return results2 . map ( ( result ) => {
return {
id : result . id ,
url : result . source _url ,
title : ( 0 , external _wp _htmlEntities _ . decodeEntities ) ( result . title . rendered || "" ) || ( 0 , external _wp _i18n _ . _ _ ) ( "(no title)" ) ,
type : result . type ,
kind : "media"
} ;
} ) ;
} ) . catch ( ( ) => [ ] )
// Fail by returning no results.
) ;
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
const responses = await Promise . all ( queries ) ;
let results = responses . flat ( ) ;
results = results . filter ( ( result ) => ! ! result . id ) ;
results = sortResults ( results , search ) ;
results = results . slice ( 0 , perPage ) ;
return results ;
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
function sortResults ( results , search ) {
const searchTokens = tokenize ( search ) ;
const scores = { } ;
for ( const result of results ) {
if ( result . title ) {
const titleTokens = tokenize ( result . title ) ;
const exactMatchingTokens = titleTokens . filter (
( titleToken ) => searchTokens . some (
( searchToken ) => titleToken === searchToken
)
) ;
const subMatchingTokens = titleTokens . filter (
( titleToken ) => searchTokens . some (
( searchToken ) => titleToken !== searchToken && titleToken . includes ( searchToken )
)
) ;
const exactMatchScore = exactMatchingTokens . length / titleTokens . length * 10 ;
const subMatchScore = subMatchingTokens . length / titleTokens . length ;
scores [ result . id ] = exactMatchScore + subMatchScore ;
} else {
scores [ result . id ] = 0 ;
}
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
return results . sort ( ( a , b ) => scores [ b . id ] - scores [ a . id ] ) ;
}
function tokenize ( text ) {
return text . toLowerCase ( ) . match ( /[\p{L}\p{N}]+/gu ) || [ ] ;
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/fetch/__experimental-fetch-url-data.js
const CACHE = /* @__PURE__ */ new Map ( ) ;
const fetchUrlData = async ( url , options = { } ) => {
const endpoint = "/wp-block-editor/v1/url-details" ;
const args = {
url : ( 0 , external _wp _url _ . prependHTTP ) ( url )
} ;
if ( ! ( 0 , external _wp _url _ . isURL ) ( url ) ) {
return Promise . reject ( ` ${ url } is not a valid URL. ` ) ;
}
const protocol = ( 0 , external _wp _url _ . getProtocol ) ( url ) ;
if ( ! protocol || ! ( 0 , external _wp _url _ . isValidProtocol ) ( protocol ) || ! protocol . startsWith ( "http" ) || ! /^https?:\/\/[^\/\s]/i . test ( url ) ) {
return Promise . reject (
` ${ url } does not have a valid protocol. URLs must be "http" based `
) ;
2022-04-02 10:26:41 +02:00
}
2025-12-12 13:15:55 +01:00
if ( CACHE . has ( url ) ) {
return CACHE . get ( url ) ;
}
return external _wp _apiFetch _default ( ) ( {
path : ( 0 , external _wp _url _ . addQueryArgs ) ( endpoint , args ) ,
... options
} ) . then ( ( res ) => {
CACHE . set ( url , res ) ;
return res ;
} ) ;
2022-04-02 10:26:41 +02:00
} ;
2025-12-12 13:15:55 +01:00
var experimental _fetch _url _data _default = fetchUrlData ;
2023-12-07 09:44:11 +01:00
2022-04-02 10:26:41 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/fetch/index.js
2021-04-27 08:32:47 +02:00
2021-07-23 11:58:50 +02:00
2021-04-27 08:32:47 +02:00
2025-12-12 13:15:55 +01:00
async function fetchBlockPatterns ( ) {
const restPatterns = await external _wp _apiFetch _default ( ) ( {
path : "/wp/v2/block-patterns/patterns"
} ) ;
if ( ! restPatterns ) {
return [ ] ;
2021-04-27 08:32:47 +02:00
}
2025-12-12 13:15:55 +01:00
return restPatterns . map (
( pattern ) => Object . fromEntries (
Object . entries ( pattern ) . map ( ( [ key , value ] ) => [
( 0 , dist _es2015 /* camelCase */ . xQ ) ( key ) ,
value
] )
)
) ;
2021-04-27 08:32:47 +02:00
}
2022-04-02 10:26:41 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 7078 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ Ay : ( ) => ( /* binding */ useEntityRecords ) ,
/* harmony export */ bM : ( ) => ( /* binding */ _ _experimentalUseEntityRecords ) ,
/* harmony export */ pU : ( ) => ( /* binding */ useEntityRecordsWithPermissions )
/* harmony export */ } ) ;
/* harmony import */ var _wordpress _url _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 3832 ) ;
/* harmony import */ var _wordpress _url _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _url _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 4040 ) ;
/* harmony import */ var _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/* harmony import */ var _wordpress _data _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 7143 ) ;
/* harmony import */ var _wordpress _data _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _data _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 6087 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _3 _ _ ) ;
/* harmony import */ var _use _query _select _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( 7541 ) ;
/* harmony import */ var _ _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 4565 ) ;
/* harmony import */ var _lock _unlock _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( 6378 ) ;
/* harmony import */ var _utils _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( 533 ) ;
const EMPTY _ARRAY = [ ] ;
function useEntityRecords ( kind , name , queryArgs = { } , options = { enabled : true } ) {
const queryAsString = ( 0 , _wordpress _url _ _WEBPACK _IMPORTED _MODULE _0 _ _ . addQueryArgs ) ( "" , queryArgs ) ;
const { data : records , ... rest } = ( 0 , _use _query _select _ _WEBPACK _IMPORTED _MODULE _5 _ _ /* ["default"] */ . A ) (
( query ) => {
if ( ! options . enabled ) {
return {
// Avoiding returning a new reference on every execution.
data : EMPTY _ARRAY
2022-04-02 10:26:41 +02:00
} ;
}
2025-12-12 13:15:55 +01:00
return query ( _ _ _WEBPACK _IMPORTED _MODULE _4 _ _ . store ) . getEntityRecords ( kind , name , queryArgs ) ;
} ,
[ kind , name , queryAsString , options . enabled ]
) ;
const { totalItems , totalPages } = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _2 _ _ . useSelect ) (
( select ) => {
if ( ! options . enabled ) {
return {
totalItems : null ,
totalPages : null
} ;
}
return {
totalItems : select ( _ _ _WEBPACK _IMPORTED _MODULE _4 _ _ . store ) . getEntityRecordsTotalItems (
kind ,
name ,
queryArgs
) ,
totalPages : select ( _ _ _WEBPACK _IMPORTED _MODULE _4 _ _ . store ) . getEntityRecordsTotalPages (
kind ,
name ,
queryArgs
)
} ;
} ,
[ kind , name , queryAsString , options . enabled ]
) ;
2022-04-02 10:26:41 +02:00
return {
2025-12-12 13:15:55 +01:00
records ,
totalItems ,
totalPages ,
... rest
2022-04-02 10:26:41 +02:00
} ;
}
2025-12-12 13:15:55 +01:00
function _ _experimentalUseEntityRecords ( kind , name , queryArgs , options ) {
_wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) ( ` wp.data.__experimentalUseEntityRecords ` , {
alternative : "wp.data.useEntityRecords" ,
since : "6.1"
} ) ;
return useEntityRecords ( kind , name , queryArgs , options ) ;
}
function useEntityRecordsWithPermissions ( kind , name , queryArgs = { } , options = { enabled : true } ) {
const entityConfig = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _2 _ _ . useSelect ) (
( select ) => select ( _ _ _WEBPACK _IMPORTED _MODULE _4 _ _ . store ) . getEntityConfig ( kind , name ) ,
[ kind , name ]
) ;
const { records : data , ... ret } = useEntityRecords (
kind ,
name ,
{
... queryArgs ,
// If _fields is provided, we need to include _links in the request for permission caching to work.
... queryArgs . _fields ? {
_fields : [
... /* @__PURE__ */ new Set ( [
... ( 0 , _utils _ _WEBPACK _IMPORTED _MODULE _6 _ _ /* ["default"] */ . A ) (
queryArgs . _fields
) || [ ] ,
"_links"
] )
] . join ( )
} : { }
} ,
options
) ;
const ids = ( 0 , _wordpress _element _ _WEBPACK _IMPORTED _MODULE _3 _ _ . useMemo ) (
( ) => data ? . map (
// @ts-ignore
( record ) => record [ entityConfig ? . key ? ? "id" ]
) ? ? [ ] ,
[ data , entityConfig ? . key ]
) ;
const permissions = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _2 _ _ . useSelect ) (
( select ) => {
const { getEntityRecordsPermissions } = ( 0 , _lock _unlock _ _WEBPACK _IMPORTED _MODULE _7 _ _ /* .unlock */ . T ) (
select ( _ _ _WEBPACK _IMPORTED _MODULE _4 _ _ . store )
) ;
return getEntityRecordsPermissions ( kind , name , ids ) ;
} ,
[ ids , kind , name ]
) ;
const dataWithPermissions = ( 0 , _wordpress _element _ _WEBPACK _IMPORTED _MODULE _3 _ _ . useMemo ) (
( ) => data ? . map ( ( record , index ) => ( {
// @ts-ignore
... record ,
permissions : permissions [ index ]
} ) ) ? ? [ ] ,
[ data , permissions ]
) ;
return { records : dataWithPermissions , ... ret } ;
}
2022-04-02 10:26:41 +02:00
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 7143 :
/***/ ( ( module ) => {
"use strict" ;
module . exports = window [ "wp" ] [ "data" ] ;
/***/ } ) ,
/***/ 7314 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ g : ( ) => ( /* binding */ lowerCase )
/* harmony export */ } ) ;
/* unused harmony export localeLowerCase */
2025-04-25 12:30:07 +02:00
/ * *
2025-12-12 13:15:55 +01:00
* Source : ftp : //ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
2025-04-25 12:30:07 +02:00
* /
2025-12-12 13:15:55 +01:00
var SUPPORTED _LOCALE = {
tr : {
regexp : /\u0130|\u0049|\u0049\u0307/g ,
map : {
İ : "\u0069" ,
I : "\u0131" ,
I ̇ : "\u0069" ,
} ,
} ,
az : {
regexp : /\u0130/g ,
map : {
İ : "\u0069" ,
I : "\u0131" ,
I ̇ : "\u0069" ,
} ,
} ,
lt : {
regexp : /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g ,
map : {
I : "\u0069\u0307" ,
J : "\u006A\u0307" ,
Į : "\u012F\u0307" ,
Ì : "\u0069\u0307\u0300" ,
Í : "\u0069\u0307\u0301" ,
Ĩ : "\u0069\u0307\u0303" ,
} ,
} ,
} ;
2025-04-25 12:30:07 +02:00
/ * *
2025-12-12 13:15:55 +01:00
* Localized lower case .
2025-04-25 12:30:07 +02:00
* /
2025-12-12 13:15:55 +01:00
function localeLowerCase ( str , locale ) {
var lang = SUPPORTED _LOCALE [ locale . toLowerCase ( ) ] ;
if ( lang )
return lowerCase ( str . replace ( lang . regexp , function ( m ) { return lang . map [ m ] ; } ) ) ;
return lowerCase ( str ) ;
}
2024-04-17 11:32:24 +02:00
/ * *
2025-12-12 13:15:55 +01:00
* Lower case as a function .
2024-04-17 11:32:24 +02:00
* /
2025-12-12 13:15:55 +01:00
function lowerCase ( str ) {
return str . toLowerCase ( ) ;
}
2019-11-02 10:38:58 +01:00
2022-04-02 10:26:41 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2022-04-02 10:26:41 +02:00
2025-12-12 13:15:55 +01:00
/***/ 7541 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
A : ( ) => ( /* binding */ useQuerySelect )
} ) ;
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
// UNUSED EXPORTS: META_SELECTORS
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 7143 ) ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/memize/dist/index.js
2022-04-02 10:26:41 +02:00
/ * *
2025-02-28 08:42:11 +01:00
* Memize options object .
2024-04-17 11:32:24 +02:00
*
2025-02-28 08:42:11 +01:00
* @ typedef MemizeOptions
*
* @ property { number } [ maxSize ] Maximum size of the cache .
2022-04-02 10:26:41 +02:00
* /
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
/ * *
2025-02-28 08:42:11 +01:00
* Internal cache entry .
2021-07-23 11:58:50 +02:00
*
2025-02-28 08:42:11 +01:00
* @ typedef MemizeCacheNode
2024-04-17 11:32:24 +02:00
*
2025-02-28 08:42:11 +01:00
* @ property { ? MemizeCacheNode | undefined } [ prev ] Previous node .
* @ property { ? MemizeCacheNode | undefined } [ next ] Next node .
* @ property { Array < * > } args Function arguments for cache
* entry .
* @ property { * } val Function result .
2021-07-23 11:58:50 +02:00
* /
/ * *
2025-02-28 08:42:11 +01:00
* Properties of the enhanced function for controlling cache .
2021-07-23 11:58:50 +02:00
*
2025-02-28 08:42:11 +01:00
* @ typedef MemizeMemoizedFunction
2021-07-23 11:58:50 +02:00
*
2025-02-28 08:42:11 +01:00
* @ property { ( ) => void } clear Clear the cache .
2023-09-26 10:33:34 +02:00
* /
/ * *
* Accepts a function to be memoized , and returns a new memoized function , with
* optional options .
*
* @ template { ( ... args : any [ ] ) => any } F
*
* @ param { F } fn Function to memoize .
* @ param { MemizeOptions } [ options ] Options object .
*
* @ return { ( ( ... args : Parameters < F > ) => ReturnType < F > ) & MemizeMemoizedFunction } Memoized function .
* /
function memize ( fn , options ) {
var size = 0 ;
/** @type {?MemizeCacheNode|undefined} */
var head ;
/** @type {?MemizeCacheNode|undefined} */
var tail ;
options = options || { } ;
function memoized ( /* ...args */ ) {
var node = head ,
len = arguments . length ,
args ,
i ;
searchCache : while ( node ) {
// Perform a shallow equality test to confirm that whether the node
// under test is a candidate for the arguments passed. Two arrays
// are shallowly equal if their length matches and each entry is
// strictly equal between the two sets. Avoid abstracting to a
// function which could incur an arguments leaking deoptimization.
// Check whether node arguments match arguments length
if ( node . args . length !== arguments . length ) {
node = node . next ;
continue ;
}
// Check whether node arguments match arguments values
for ( i = 0 ; i < len ; i ++ ) {
if ( node . args [ i ] !== arguments [ i ] ) {
node = node . next ;
continue searchCache ;
}
}
// At this point we can assume we've found a match
// Surface matched node to head if not already
if ( node !== head ) {
// As tail, shift to previous. Must only shift if not also
// head, since if both head and tail, there is no previous.
if ( node === tail ) {
tail = node . prev ;
}
// Adjust siblings to point to each other. If node was tail,
// this also handles new tail's empty `next` assignment.
/** @type {MemizeCacheNode} */ ( node . prev ) . next = node . next ;
if ( node . next ) {
node . next . prev = node . prev ;
}
node . next = head ;
node . prev = null ;
/** @type {MemizeCacheNode} */ ( head ) . prev = node ;
head = node ;
}
// Return immediately
return node . val ;
}
// No cached value found. Continue to insertion phase:
// Create a copy of arguments (avoid leaking deoptimization)
args = new Array ( len ) ;
for ( i = 0 ; i < len ; i ++ ) {
args [ i ] = arguments [ i ] ;
}
node = {
args : args ,
// Generate the result from original function
val : fn . apply ( null , args ) ,
} ;
// Don't need to check whether node is already head, since it would
// have been returned above already if it was
// Shift existing head down list
if ( head ) {
head . prev = node ;
node . next = head ;
} else {
// If no head, follows that there's no tail (at initial or reset)
tail = node ;
}
// Trim tail if we're reached max size and are pending cache insertion
if ( size === /** @type {MemizeOptions} */ ( options ) . maxSize ) {
tail = /** @type {MemizeCacheNode} */ ( tail ) . prev ;
/** @type {MemizeCacheNode} */ ( tail ) . next = null ;
} else {
size ++ ;
}
head = node ;
return node . val ;
}
memoized . clear = function ( ) {
head = null ;
tail = null ;
size = 0 ;
} ;
// Ignore reason: There's not a clear solution to create an intersection of
// the function with additional properties, where the goal is to retain the
// function signature of the incoming argument and add control properties
// on the return value.
// @ts-ignore
return memoized ;
}
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/core-data/build-module/hooks/memoize.js
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
var memoize _default = memize ;
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/hooks/constants.js
var constants = _ _webpack _require _ _ ( 2859 ) ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/core-data/build-module/hooks/use-query-select.js
2022-12-15 17:47:31 +01:00
2023-12-07 09:44:11 +01:00
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
const META _SELECTORS = [
"getIsResolving" ,
"hasStartedResolution" ,
"hasFinishedResolution" ,
"isResolving" ,
"getCachedResolvers"
] ;
2022-12-15 17:47:31 +01:00
function useQuerySelect ( mapQuerySelect , deps ) {
2025-12-12 13:15:55 +01:00
return ( 0 , external _wp _data _ . useSelect ) ( ( select , registry ) => {
const resolve = ( store ) => enrichSelectors ( select ( store ) ) ;
2022-12-15 17:47:31 +01:00
return mapQuerySelect ( resolve , registry ) ;
} , deps ) ;
}
2025-12-12 13:15:55 +01:00
const enrichSelectors = memoize _default ( ( ( selectors ) => {
2022-12-15 17:47:31 +01:00
const resolvers = { } ;
for ( const selectorName in selectors ) {
if ( META _SELECTORS . includes ( selectorName ) ) {
continue ;
}
Object . defineProperty ( resolvers , selectorName , {
2023-09-26 10:33:34 +02:00
get : ( ) => ( ... args ) => {
2022-12-15 17:47:31 +01:00
const data = selectors [ selectorName ] ( ... args ) ;
2025-12-12 13:15:55 +01:00
const resolutionStatus = selectors . getResolutionState (
selectorName ,
args
) ? . status ;
2022-12-15 17:47:31 +01:00
let status ;
2025-02-28 08:42:11 +01:00
switch ( resolutionStatus ) {
2025-12-12 13:15:55 +01:00
case "resolving" :
status = constants /* Status */ . n . Resolving ;
2025-02-28 08:42:11 +01:00
break ;
2025-12-12 13:15:55 +01:00
case "finished" :
status = constants /* Status */ . n . Success ;
2025-02-28 08:42:11 +01:00
break ;
2025-12-12 13:15:55 +01:00
case "error" :
status = constants /* Status */ . n . Error ;
2025-02-28 08:42:11 +01:00
break ;
2025-12-12 13:15:55 +01:00
case void 0 :
status = constants /* Status */ . n . Idle ;
2025-02-28 08:42:11 +01:00
break ;
2022-12-15 17:47:31 +01:00
}
return {
data ,
status ,
2025-12-12 13:15:55 +01:00
isResolving : status === constants /* Status */ . n . Resolving ,
hasStarted : status !== constants /* Status */ . n . Idle ,
hasResolved : status === constants /* Status */ . n . Success || status === constants /* Status */ . n . Error
2022-12-15 17:47:31 +01:00
} ;
}
} ) ;
}
return resolvers ;
2025-12-12 13:15:55 +01:00
} ) ) ;
/***/ } ) ,
/***/ 7723 :
/***/ ( ( module ) => {
"use strict" ;
module . exports = window [ "wp" ] [ "i18n" ] ;
/***/ } ) ,
/***/ 7734 :
/***/ ( ( module ) => {
"use strict" ;
// do not edit .js files directly - edit src/index.jst
var envHasBigInt64Array = typeof BigInt64Array !== 'undefined' ;
module . exports = function equal ( a , b ) {
if ( a === b ) return true ;
if ( a && b && typeof a == 'object' && typeof b == 'object' ) {
if ( a . constructor !== b . constructor ) return false ;
var length , i , keys ;
if ( Array . isArray ( a ) ) {
length = a . length ;
if ( length != b . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( ! equal ( a [ i ] , b [ i ] ) ) return false ;
return true ;
}
if ( ( a instanceof Map ) && ( b instanceof Map ) ) {
if ( a . size !== b . size ) return false ;
for ( i of a . entries ( ) )
if ( ! b . has ( i [ 0 ] ) ) return false ;
for ( i of a . entries ( ) )
if ( ! equal ( i [ 1 ] , b . get ( i [ 0 ] ) ) ) return false ;
return true ;
}
if ( ( a instanceof Set ) && ( b instanceof Set ) ) {
if ( a . size !== b . size ) return false ;
for ( i of a . entries ( ) )
if ( ! b . has ( i [ 0 ] ) ) return false ;
return true ;
}
if ( ArrayBuffer . isView ( a ) && ArrayBuffer . isView ( b ) ) {
length = a . length ;
if ( length != b . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( a [ i ] !== b [ i ] ) return false ;
return true ;
}
if ( a . constructor === RegExp ) return a . source === b . source && a . flags === b . flags ;
if ( a . valueOf !== Object . prototype . valueOf ) return a . valueOf ( ) === b . valueOf ( ) ;
if ( a . toString !== Object . prototype . toString ) return a . toString ( ) === b . toString ( ) ;
keys = Object . keys ( a ) ;
length = keys . length ;
if ( length !== Object . keys ( b ) . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( ! Object . prototype . hasOwnProperty . call ( b , keys [ i ] ) ) return false ;
for ( i = length ; i -- !== 0 ; ) {
var key = keys [ i ] ;
if ( ! equal ( a [ key ] , b [ key ] ) ) return false ;
}
return true ;
}
// true if both NaN, false otherwise
return a !== a && b !== b ;
} ;
/***/ } ) ,
/***/ 7826 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ j : ( ) => ( /* binding */ privateApis )
/* harmony export */ } ) ;
/* harmony import */ var _hooks _use _entity _records _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 7078 ) ;
/* harmony import */ var _utils _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 5101 ) ;
/* harmony import */ var _lock _unlock _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 6378 ) ;
const privateApis = { } ;
( 0 , _lock _unlock _ _WEBPACK _IMPORTED _MODULE _0 _ _ /* .lock */ . s ) ( privateApis , {
useEntityRecordsWithPermissions : _hooks _use _entity _records _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .useEntityRecordsWithPermissions */ . pU ,
RECEIVE _INTERMEDIATE _RESULTS : _utils _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .RECEIVE_INTERMEDIATE_RESULTS */ . Z
2022-12-15 17:47:31 +01:00
} ) ;
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
/***/ 8368 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
_ _experimentalGetCurrentGlobalStylesId : ( ) => ( /* binding */ _ _experimentalGetCurrentGlobalStylesId ) ,
_ _experimentalGetCurrentThemeBaseGlobalStyles : ( ) => ( /* binding */ _ _experimentalGetCurrentThemeBaseGlobalStyles ) ,
_ _experimentalGetCurrentThemeGlobalStylesVariations : ( ) => ( /* binding */ _ _experimentalGetCurrentThemeGlobalStylesVariations ) ,
_ _experimentalGetDirtyEntityRecords : ( ) => ( /* binding */ _ _experimentalGetDirtyEntityRecords ) ,
_ _experimentalGetEntitiesBeingSaved : ( ) => ( /* binding */ _ _experimentalGetEntitiesBeingSaved ) ,
_ _experimentalGetEntityRecordNoResolver : ( ) => ( /* binding */ _ _experimentalGetEntityRecordNoResolver ) ,
canUser : ( ) => ( /* binding */ canUser ) ,
canUserEditEntityRecord : ( ) => ( /* binding */ canUserEditEntityRecord ) ,
getAuthors : ( ) => ( /* binding */ getAuthors ) ,
getAutosave : ( ) => ( /* binding */ getAutosave ) ,
getAutosaves : ( ) => ( /* binding */ getAutosaves ) ,
getBlockPatternCategories : ( ) => ( /* binding */ getBlockPatternCategories ) ,
getBlockPatterns : ( ) => ( /* binding */ getBlockPatterns ) ,
getCurrentTheme : ( ) => ( /* binding */ getCurrentTheme ) ,
getCurrentThemeGlobalStylesRevisions : ( ) => ( /* binding */ getCurrentThemeGlobalStylesRevisions ) ,
getCurrentUser : ( ) => ( /* binding */ getCurrentUser ) ,
getDefaultTemplateId : ( ) => ( /* binding */ getDefaultTemplateId ) ,
getEditedEntityRecord : ( ) => ( /* binding */ getEditedEntityRecord ) ,
getEmbedPreview : ( ) => ( /* binding */ getEmbedPreview ) ,
getEntitiesByKind : ( ) => ( /* binding */ getEntitiesByKind ) ,
getEntitiesConfig : ( ) => ( /* binding */ getEntitiesConfig ) ,
getEntity : ( ) => ( /* binding */ getEntity ) ,
getEntityConfig : ( ) => ( /* binding */ getEntityConfig ) ,
getEntityRecord : ( ) => ( /* binding */ getEntityRecord ) ,
getEntityRecordEdits : ( ) => ( /* binding */ getEntityRecordEdits ) ,
getEntityRecordNonTransientEdits : ( ) => ( /* binding */ getEntityRecordNonTransientEdits ) ,
getEntityRecords : ( ) => ( /* binding */ getEntityRecords ) ,
getEntityRecordsTotalItems : ( ) => ( /* binding */ getEntityRecordsTotalItems ) ,
getEntityRecordsTotalPages : ( ) => ( /* binding */ getEntityRecordsTotalPages ) ,
getLastEntityDeleteError : ( ) => ( /* binding */ getLastEntityDeleteError ) ,
getLastEntitySaveError : ( ) => ( /* binding */ getLastEntitySaveError ) ,
getRawEntityRecord : ( ) => ( /* binding */ getRawEntityRecord ) ,
getRedoEdit : ( ) => ( /* binding */ getRedoEdit ) ,
getReferenceByDistinctEdits : ( ) => ( /* binding */ getReferenceByDistinctEdits ) ,
getRevision : ( ) => ( /* binding */ getRevision ) ,
getRevisions : ( ) => ( /* binding */ getRevisions ) ,
getThemeSupports : ( ) => ( /* binding */ getThemeSupports ) ,
getUndoEdit : ( ) => ( /* binding */ getUndoEdit ) ,
getUserPatternCategories : ( ) => ( /* binding */ getUserPatternCategories ) ,
getUserQueryResults : ( ) => ( /* binding */ getUserQueryResults ) ,
hasEditsForEntityRecord : ( ) => ( /* binding */ hasEditsForEntityRecord ) ,
hasEntityRecord : ( ) => ( /* binding */ hasEntityRecord ) ,
hasEntityRecords : ( ) => ( /* binding */ hasEntityRecords ) ,
hasFetchedAutosaves : ( ) => ( /* binding */ hasFetchedAutosaves ) ,
hasRedo : ( ) => ( /* binding */ hasRedo ) ,
hasUndo : ( ) => ( /* binding */ hasUndo ) ,
isAutosavingEntityRecord : ( ) => ( /* binding */ isAutosavingEntityRecord ) ,
isDeletingEntityRecord : ( ) => ( /* binding */ isDeletingEntityRecord ) ,
isPreviewEmbedFallback : ( ) => ( /* binding */ isPreviewEmbedFallback ) ,
isRequestingEmbedPreview : ( ) => ( /* binding */ isRequestingEmbedPreview ) ,
isSavingEntityRecord : ( ) => ( /* binding */ isSavingEntityRecord )
} ) ;
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: external ["wp","data"]
var external _wp _data _ = _ _webpack _require _ _ ( 7143 ) ;
// EXTERNAL MODULE: external ["wp","url"]
var external _wp _url _ = _ _webpack _require _ _ ( 3832 ) ;
// EXTERNAL MODULE: external ["wp","deprecated"]
var external _wp _deprecated _ = _ _webpack _require _ _ ( 4040 ) ;
var external _wp _deprecated _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _deprecated _ ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/name.js
var build _module _name = _ _webpack _require _ _ ( 2278 ) ;
// EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js
var equivalent _key _map = _ _webpack _require _ _ ( 3249 ) ;
var equivalent _key _map _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( equivalent _key _map ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/get-query-parts.js + 1 modules
var get _query _parts = _ _webpack _require _ _ ( 4027 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/set-nested-value.js
var set _nested _value = _ _webpack _require _ _ ( 5003 ) ;
; // ./node_modules/@wordpress/core-data/build-module/queried-data/selectors.js
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
const queriedItemsCacheByState = /* @__PURE__ */ new WeakMap ( ) ;
function getQueriedItemsUncached ( state , query ) {
const { stableKey , page , perPage , include , fields , context } = ( 0 , get _query _parts /* default */ . A ) ( query ) ;
let itemIds ;
if ( state . queries ? . [ context ] ? . [ stableKey ] ) {
itemIds = state . queries [ context ] [ stableKey ] . itemIds ;
}
if ( ! itemIds ) {
return null ;
}
const startOffset = perPage === - 1 ? 0 : ( page - 1 ) * perPage ;
const endOffset = perPage === - 1 ? itemIds . length : Math . min ( startOffset + perPage , itemIds . length ) ;
const items = [ ] ;
for ( let i = startOffset ; i < endOffset ; i ++ ) {
const itemId = itemIds [ i ] ;
if ( Array . isArray ( include ) && ! include . includes ( itemId ) ) {
continue ;
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
if ( itemId === void 0 ) {
continue ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
if ( ! state . items [ context ] ? . hasOwnProperty ( itemId ) ) {
return null ;
}
const item = state . items [ context ] [ itemId ] ;
let filteredItem ;
if ( Array . isArray ( fields ) ) {
filteredItem = { } ;
for ( let f = 0 ; f < fields . length ; f ++ ) {
const field = fields [ f ] . split ( "." ) ;
let value = item ;
field . forEach ( ( fieldName ) => {
value = value ? . [ fieldName ] ;
} ) ;
( 0 , set _nested _value /* default */ . A ) ( filteredItem , field , value ) ;
}
} else {
if ( ! state . itemIsComplete [ context ] ? . [ itemId ] ) {
return null ;
}
filteredItem = item ;
}
items . push ( filteredItem ) ;
}
return items ;
2022-12-15 17:47:31 +01:00
}
2025-12-12 13:15:55 +01:00
const getQueriedItems = ( 0 , external _wp _data _ . createSelector ) ( ( state , query = { } ) => {
let queriedItemsCache = queriedItemsCacheByState . get ( state ) ;
if ( queriedItemsCache ) {
const queriedItems = queriedItemsCache . get ( query ) ;
if ( queriedItems !== void 0 ) {
return queriedItems ;
}
} else {
queriedItemsCache = new ( equivalent _key _map _default ( ) ) ( ) ;
queriedItemsCacheByState . set ( state , queriedItemsCache ) ;
}
const items = getQueriedItemsUncached ( state , query ) ;
queriedItemsCache . set ( query , items ) ;
return items ;
} ) ;
function getQueriedTotalItems ( state , query = { } ) {
const { stableKey , context } = ( 0 , get _query _parts /* default */ . A ) ( query ) ;
return state . queries ? . [ context ] ? . [ stableKey ] ? . meta ? . totalItems ? ? null ;
}
function getQueriedTotalPages ( state , query = { } ) {
const { stableKey , context } = ( 0 , get _query _parts /* default */ . A ) ( query ) ;
return state . queries ? . [ context ] ? . [ stableKey ] ? . meta ? . totalPages ? ? null ;
2022-12-15 17:47:31 +01:00
}
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/entities.js + 2 modules
var entities = _ _webpack _require _ _ ( 5914 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/get-normalized-comma-separable.js
var get _normalized _comma _separable = _ _webpack _require _ _ ( 533 ) ;
; // ./node_modules/@wordpress/core-data/build-module/utils/is-numeric-id.js
function isNumericID ( id ) {
return /^\s*\d+\s*$/ . test ( id ) ;
}
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/core-data/build-module/utils/is-raw-attribute.js
function isRawAttribute ( entity , attribute ) {
return ( entity . rawAttributes || [ ] ) . includes ( attribute ) ;
}
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/user-permissions.js
var user _permissions = _ _webpack _require _ _ ( 2577 ) ;
// EXTERNAL MODULE: ./node_modules/@wordpress/core-data/build-module/utils/log-entity-deprecation.js
var log _entity _deprecation = _ _webpack _require _ _ ( 9410 ) ;
; // ./node_modules/@wordpress/core-data/build-module/selectors.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const EMPTY _OBJECT = { } ;
const isRequestingEmbedPreview = ( 0 , external _wp _data _ . createRegistrySelector ) (
( select ) => ( state , url ) => {
return select ( build _module _name /* STORE_NAME */ . E ) . isResolving ( "getEmbedPreview" , [
url
] ) ;
}
) ;
function getAuthors ( state , query ) {
external _wp _deprecated _default ( ) ( "select( 'core' ).getAuthors()" , {
since : "5.9" ,
alternative : "select( 'core' ).getUsers({ who: 'authors' })"
} ) ;
const path = ( 0 , external _wp _url _ . addQueryArgs ) (
"/wp/v2/users/?who=authors&per_page=100" ,
query
) ;
return getUserQueryResults ( state , path ) ;
}
function getCurrentUser ( state ) {
return state . currentUser ;
}
const getUserQueryResults = ( 0 , external _wp _data _ . createSelector ) (
( state , queryID ) => {
const queryResults = state . users . queries [ queryID ] ? ? [ ] ;
return queryResults . map ( ( id ) => state . users . byId [ id ] ) ;
} ,
( state , queryID ) => [
state . users . queries [ queryID ] ,
state . users . byId
]
) ;
function getEntitiesByKind ( state , kind ) {
external _wp _deprecated _default ( ) ( "wp.data.select( 'core' ).getEntitiesByKind()" , {
since : "6.0" ,
alternative : "wp.data.select( 'core' ).getEntitiesConfig()"
} ) ;
return getEntitiesConfig ( state , kind ) ;
}
const getEntitiesConfig = ( 0 , external _wp _data _ . createSelector ) (
( state , kind ) => state . entities . config . filter ( ( entity ) => entity . kind === kind ) ,
/* eslint-disable @typescript-eslint/no-unused-vars */
( state , kind ) => state . entities . config
/* eslint-enable @typescript-eslint/no-unused-vars */
) ;
function getEntity ( state , kind , name ) {
external _wp _deprecated _default ( ) ( "wp.data.select( 'core' ).getEntity()" , {
since : "6.0" ,
alternative : "wp.data.select( 'core' ).getEntityConfig()"
} ) ;
return getEntityConfig ( state , kind , name ) ;
}
function getEntityConfig ( state , kind , name ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getEntityConfig" ) ;
return state . entities . config ? . find (
( config ) => config . kind === kind && config . name === name
) ;
}
const getEntityRecord = ( 0 , external _wp _data _ . createSelector ) (
( ( state , kind , name , key , query ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getEntityRecord" ) ;
const queriedState = state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData ;
if ( ! queriedState ) {
return void 0 ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const context = query ? . context ? ? "default" ;
if ( ! query || ! query . _fields ) {
if ( ! queriedState . itemIsComplete [ context ] ? . [ key ] ) {
return void 0 ;
}
return queriedState . items [ context ] [ key ] ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const item = queriedState . items [ context ] ? . [ key ] ;
if ( ! item ) {
return item ;
}
const filteredItem = { } ;
const fields = ( 0 , get _normalized _comma _separable /* default */ . A ) ( query . _fields ) ? ? [ ] ;
for ( let f = 0 ; f < fields . length ; f ++ ) {
const field = fields [ f ] . split ( "." ) ;
let value = item ;
field . forEach ( ( fieldName ) => {
value = value ? . [ fieldName ] ;
} ) ;
( 0 , set _nested _value /* default */ . A ) ( filteredItem , field , value ) ;
}
return filteredItem ;
} ) ,
( state , kind , name , recordId , query ) => {
const context = query ? . context ? ? "default" ;
const queriedState = state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData ;
return [
queriedState ? . items [ context ] ? . [ recordId ] ,
queriedState ? . itemIsComplete [ context ] ? . [ recordId ]
] ;
}
) ;
getEntityRecord . _ _unstableNormalizeArgs = ( args ) => {
const newArgs = [ ... args ] ;
const recordKey = newArgs ? . [ 2 ] ;
newArgs [ 2 ] = isNumericID ( recordKey ) ? Number ( recordKey ) : recordKey ;
return newArgs ;
} ;
function hasEntityRecord ( state , kind , name , key , query ) {
const queriedState = state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData ;
if ( ! queriedState ) {
return false ;
}
const context = query ? . context ? ? "default" ;
if ( ! query || ! query . _fields ) {
return ! ! queriedState . itemIsComplete [ context ] ? . [ key ] ;
}
const item = queriedState . items [ context ] ? . [ key ] ;
if ( ! item ) {
return false ;
}
const fields = ( 0 , get _normalized _comma _separable /* default */ . A ) ( query . _fields ) ? ? [ ] ;
for ( let i = 0 ; i < fields . length ; i ++ ) {
const path = fields [ i ] . split ( "." ) ;
let value = item ;
for ( let p = 0 ; p < path . length ; p ++ ) {
const part = path [ p ] ;
if ( ! value || ! Object . hasOwn ( value , part ) ) {
return false ;
}
value = value [ part ] ;
}
}
return true ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
function _ _experimentalGetEntityRecordNoResolver ( state , kind , name , key ) {
return getEntityRecord ( state , kind , name , key ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const getRawEntityRecord = ( 0 , external _wp _data _ . createSelector ) (
( state , kind , name , key ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getRawEntityRecord" ) ;
const record = getEntityRecord (
state ,
kind ,
name ,
key
) ;
return record && Object . keys ( record ) . reduce ( ( accumulator , _key ) => {
if ( isRawAttribute ( getEntityConfig ( state , kind , name ) , _key ) ) {
accumulator [ _key ] = record [ _key ] ? . raw !== void 0 ? record [ _key ] ? . raw : record [ _key ] ;
} else {
accumulator [ _key ] = record [ _key ] ;
}
return accumulator ;
} , { } ) ;
} ,
( state , kind , name , recordId , query ) => {
const context = query ? . context ? ? "default" ;
return [
state . entities . config ,
state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData ? . items [ context ] ? . [ recordId ] ,
state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData ? . itemIsComplete [ context ] ? . [ recordId ]
] ;
}
) ;
function hasEntityRecords ( state , kind , name , query ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "hasEntityRecords" ) ;
return Array . isArray ( getEntityRecords ( state , kind , name , query ) ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const getEntityRecords = ( ( state , kind , name , query ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getEntityRecords" ) ;
const queriedState = state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData ;
if ( ! queriedState ) {
return null ;
}
return getQueriedItems ( queriedState , query ) ;
} ) ;
const getEntityRecordsTotalItems = ( state , kind , name , query ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getEntityRecordsTotalItems" ) ;
const queriedState = state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData ;
if ( ! queriedState ) {
return null ;
}
return getQueriedTotalItems ( queriedState , query ) ;
} ;
const getEntityRecordsTotalPages = ( state , kind , name , query ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getEntityRecordsTotalPages" ) ;
const queriedState = state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData ;
if ( ! queriedState ) {
return null ;
}
if ( query ? . per _page === - 1 ) {
return 1 ;
}
const totalItems = getQueriedTotalItems ( queriedState , query ) ;
if ( ! totalItems ) {
return totalItems ;
}
if ( ! query ? . per _page ) {
return getQueriedTotalPages ( queriedState , query ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return Math . ceil ( totalItems / query . per _page ) ;
} ;
const _ _experimentalGetDirtyEntityRecords = ( 0 , external _wp _data _ . createSelector ) (
( state ) => {
2025-02-28 08:42:11 +01:00
const {
2025-12-12 13:15:55 +01:00
entities : { records }
} = state ;
const dirtyRecords = [ ] ;
Object . keys ( records ) . forEach ( ( kind ) => {
Object . keys ( records [ kind ] ) . forEach ( ( name ) => {
const primaryKeys = Object . keys ( records [ kind ] [ name ] . edits ) . filter (
( primaryKey ) => (
// The entity record must exist (not be deleted),
// and it must have edits.
getEntityRecord ( state , kind , name , primaryKey ) && hasEditsForEntityRecord ( state , kind , name , primaryKey )
)
) ;
if ( primaryKeys . length ) {
const entityConfig = getEntityConfig ( state , kind , name ) ;
primaryKeys . forEach ( ( primaryKey ) => {
const entityRecord = getEditedEntityRecord (
state ,
kind ,
name ,
primaryKey
) ;
dirtyRecords . push ( {
// We avoid using primaryKey because it's transformed into a string
// when it's used as an object key.
key : entityRecord ? entityRecord [ entityConfig . key || entities /* DEFAULT_ENTITY_KEY */ . C _ ] : void 0 ,
title : entityConfig ? . getTitle ? . ( entityRecord ) || "" ,
name ,
kind
} ) ;
} ) ;
}
} ) ;
} ) ;
return dirtyRecords ;
} ,
( state ) => [ state . entities . records ]
) ;
const _ _experimentalGetEntitiesBeingSaved = ( 0 , external _wp _data _ . createSelector ) (
( state ) => {
const {
entities : { records }
} = state ;
const recordsBeingSaved = [ ] ;
Object . keys ( records ) . forEach ( ( kind ) => {
Object . keys ( records [ kind ] ) . forEach ( ( name ) => {
const primaryKeys = Object . keys ( records [ kind ] [ name ] . saving ) . filter (
( primaryKey ) => isSavingEntityRecord ( state , kind , name , primaryKey )
) ;
if ( primaryKeys . length ) {
const entityConfig = getEntityConfig ( state , kind , name ) ;
primaryKeys . forEach ( ( primaryKey ) => {
const entityRecord = getEditedEntityRecord (
state ,
kind ,
name ,
primaryKey
) ;
recordsBeingSaved . push ( {
// We avoid using primaryKey because it's transformed into a string
// when it's used as an object key.
key : entityRecord ? entityRecord [ entityConfig . key || entities /* DEFAULT_ENTITY_KEY */ . C _ ] : void 0 ,
title : entityConfig ? . getTitle ? . ( entityRecord ) || "" ,
name ,
kind
} ) ;
} ) ;
}
} ) ;
} ) ;
return recordsBeingSaved ;
} ,
( state ) => [ state . entities . records ]
) ;
function getEntityRecordEdits ( state , kind , name , recordId ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getEntityRecordEdits" ) ;
return state . entities . records ? . [ kind ] ? . [ name ] ? . edits ? . [ recordId ] ;
}
const getEntityRecordNonTransientEdits = ( 0 , external _wp _data _ . createSelector ) (
( state , kind , name , recordId ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getEntityRecordNonTransientEdits" ) ;
const { transientEdits } = getEntityConfig ( state , kind , name ) || { } ;
const edits = getEntityRecordEdits ( state , kind , name , recordId ) || { } ;
if ( ! transientEdits ) {
return edits ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return Object . keys ( edits ) . reduce ( ( acc , key ) => {
if ( ! transientEdits [ key ] ) {
acc [ key ] = edits [ key ] ;
}
return acc ;
} , { } ) ;
} ,
( state , kind , name , recordId ) => [
state . entities . config ,
state . entities . records ? . [ kind ] ? . [ name ] ? . edits ? . [ recordId ]
]
) ;
function hasEditsForEntityRecord ( state , kind , name , recordId ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "hasEditsForEntityRecord" ) ;
return isSavingEntityRecord ( state , kind , name , recordId ) || Object . keys (
getEntityRecordNonTransientEdits ( state , kind , name , recordId )
) . length > 0 ;
}
const getEditedEntityRecord = ( 0 , external _wp _data _ . createSelector ) (
( state , kind , name , recordId ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getEditedEntityRecord" ) ;
const raw = getRawEntityRecord ( state , kind , name , recordId ) ;
const edited = getEntityRecordEdits ( state , kind , name , recordId ) ;
if ( ! raw && ! edited ) {
return false ;
2025-02-28 08:42:11 +01:00
}
return {
2025-12-12 13:15:55 +01:00
... raw ,
... edited
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
} ,
( state , kind , name , recordId , query ) => {
const context = query ? . context ? ? "default" ;
return [
state . entities . config ,
state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData . items [ context ] ? . [ recordId ] ,
state . entities . records ? . [ kind ] ? . [ name ] ? . queriedData . itemIsComplete [ context ] ? . [ recordId ] ,
state . entities . records ? . [ kind ] ? . [ name ] ? . edits ? . [ recordId ]
] ;
}
) ;
function isAutosavingEntityRecord ( state , kind , name , recordId ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "isAutosavingEntityRecord" ) ;
const { pending , isAutosave } = state . entities . records ? . [ kind ] ? . [ name ] ? . saving ? . [ recordId ] ? ? { } ;
return Boolean ( pending && isAutosave ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
function isSavingEntityRecord ( state , kind , name , recordId ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "isSavingEntityRecord" ) ;
return state . entities . records ? . [ kind ] ? . [ name ] ? . saving ? . [ recordId ] ? . pending ? ? false ;
}
function isDeletingEntityRecord ( state , kind , name , recordId ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "isDeletingEntityRecord" ) ;
return state . entities . records ? . [ kind ] ? . [ name ] ? . deleting ? . [ recordId ] ? . pending ? ? false ;
}
function getLastEntitySaveError ( state , kind , name , recordId ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getLastEntitySaveError" ) ;
return state . entities . records ? . [ kind ] ? . [ name ] ? . saving ? . [ recordId ] ? . error ;
}
function getLastEntityDeleteError ( state , kind , name , recordId ) {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getLastEntityDeleteError" ) ;
return state . entities . records ? . [ kind ] ? . [ name ] ? . deleting ? . [ recordId ] ? . error ;
}
function getUndoEdit ( state ) {
external _wp _deprecated _default ( ) ( "select( 'core' ).getUndoEdit()" , {
since : "6.3"
} ) ;
return void 0 ;
}
function getRedoEdit ( state ) {
external _wp _deprecated _default ( ) ( "select( 'core' ).getRedoEdit()" , {
since : "6.3"
2025-02-28 08:42:11 +01:00
} ) ;
2025-12-12 13:15:55 +01:00
return void 0 ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
function hasUndo ( state ) {
return state . undoManager . hasUndo ( ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
function hasRedo ( state ) {
return state . undoManager . hasRedo ( ) ;
}
function getCurrentTheme ( state ) {
if ( ! state . currentTheme ) {
return null ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return getEntityRecord ( state , "root" , "theme" , state . currentTheme ) ;
}
function _ _experimentalGetCurrentGlobalStylesId ( state ) {
return state . currentGlobalStylesId ;
}
function getThemeSupports ( state ) {
return getCurrentTheme ( state ) ? . theme _supports ? ? EMPTY _OBJECT ;
}
function getEmbedPreview ( state , url ) {
return state . embedPreviews [ url ] ;
}
function isPreviewEmbedFallback ( state , url ) {
const preview = state . embedPreviews [ url ] ;
const oEmbedLinkCheck = '<a href="' + url + '">' + url + "</a>" ;
if ( ! preview ) {
return false ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return preview . html === oEmbedLinkCheck ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
function canUser ( state , action , resource , id ) {
const isEntity = typeof resource === "object" ;
if ( isEntity && ( ! resource . kind || ! resource . name ) ) {
return false ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
if ( isEntity ) {
( 0 , log _entity _deprecation /* default */ . A ) ( resource . kind , resource . name , "canUser" ) ;
}
const key = ( 0 , user _permissions /* getUserPermissionCacheKey */ . kC ) ( action , resource , id ) ;
return state . userPermissions [ key ] ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
function canUserEditEntityRecord ( state , kind , name , recordId ) {
external _wp _deprecated _default ( ) ( ` wp.data.select( 'core' ).canUserEditEntityRecord() ` , {
since : "6.7" ,
alternative : ` wp.data.select( 'core' ).canUser( 'update', { kind, name, id } ) `
} ) ;
return canUser ( state , "update" , { kind , name , id : recordId } ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
function getAutosaves ( state , postType , postId ) {
return state . autosaves [ postId ] ;
}
function getAutosave ( state , postType , postId , authorId ) {
if ( authorId === void 0 ) {
return ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const autosaves = state . autosaves [ postId ] ;
return autosaves ? . find (
( autosave ) => autosave . author === authorId
) ;
}
const hasFetchedAutosaves = ( 0 , external _wp _data _ . createRegistrySelector ) (
( select ) => ( state , postType , postId ) => {
return select ( build _module _name /* STORE_NAME */ . E ) . hasFinishedResolution ( "getAutosaves" , [
postType ,
postId
] ) ;
}
) ;
function getReferenceByDistinctEdits ( state ) {
return state . editsReference ;
}
function _ _experimentalGetCurrentThemeBaseGlobalStyles ( state ) {
const currentTheme = getCurrentTheme ( state ) ;
if ( ! currentTheme ) {
return null ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return state . themeBaseGlobalStyles [ currentTheme . stylesheet ] ;
}
function _ _experimentalGetCurrentThemeGlobalStylesVariations ( state ) {
const currentTheme = getCurrentTheme ( state ) ;
if ( ! currentTheme ) {
return null ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return state . themeGlobalStyleVariations [ currentTheme . stylesheet ] ;
}
function getBlockPatterns ( state ) {
return state . blockPatterns ;
}
function getBlockPatternCategories ( state ) {
return state . blockPatternCategories ;
}
function getUserPatternCategories ( state ) {
return state . userPatternCategories ;
}
function getCurrentThemeGlobalStylesRevisions ( state ) {
external _wp _deprecated _default ( ) ( "select( 'core' ).getCurrentThemeGlobalStylesRevisions()" , {
since : "6.5.0" ,
alternative : "select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"
2025-02-28 08:42:11 +01:00
} ) ;
2025-12-12 13:15:55 +01:00
const currentGlobalStylesId = _ _experimentalGetCurrentGlobalStylesId ( state ) ;
if ( ! currentGlobalStylesId ) {
return null ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
return state . themeGlobalStyleRevisions [ currentGlobalStylesId ] ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
function getDefaultTemplateId ( state , query ) {
return state . defaultTemplates [ JSON . stringify ( query ) ] ;
}
const getRevisions = ( state , kind , name , recordKey , query ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getRevisions" ) ;
const queriedStateRevisions = state . entities . records ? . [ kind ] ? . [ name ] ? . revisions ? . [ recordKey ] ;
if ( ! queriedStateRevisions ) {
return null ;
}
return getQueriedItems ( queriedStateRevisions , query ) ;
} ;
const getRevision = ( 0 , external _wp _data _ . createSelector ) (
( state , kind , name , recordKey , revisionKey , query ) => {
( 0 , log _entity _deprecation /* default */ . A ) ( kind , name , "getRevision" ) ;
const queriedState = state . entities . records ? . [ kind ] ? . [ name ] ? . revisions ? . [ recordKey ] ;
if ( ! queriedState ) {
return void 0 ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const context = query ? . context ? ? "default" ;
if ( ! query || ! query . _fields ) {
if ( ! queriedState . itemIsComplete [ context ] ? . [ revisionKey ] ) {
return void 0 ;
}
return queriedState . items [ context ] [ revisionKey ] ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const item = queriedState . items [ context ] ? . [ revisionKey ] ;
if ( ! item ) {
return item ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const filteredItem = { } ;
const fields = ( 0 , get _normalized _comma _separable /* default */ . A ) ( query . _fields ) ? ? [ ] ;
for ( let f = 0 ; f < fields . length ; f ++ ) {
const field = fields [ f ] . split ( "." ) ;
let value = item ;
field . forEach ( ( fieldName ) => {
value = value ? . [ fieldName ] ;
} ) ;
( 0 , set _nested _value /* default */ . A ) ( filteredItem , field , value ) ;
}
return filteredItem ;
} ,
( state , kind , name , recordKey , revisionKey , query ) => {
const context = query ? . context ? ? "default" ;
const queriedState = state . entities . records ? . [ kind ] ? . [ name ] ? . revisions ? . [ recordKey ] ;
return [
queriedState ? . items ? . [ context ] ? . [ revisionKey ] ,
queriedState ? . itemIsComplete ? . [ context ] ? . [ revisionKey ]
] ;
}
) ;
2025-02-28 08:42:11 +01:00
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ 8537 :
/***/ ( ( module ) => {
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
module . exports = window [ "wp" ] [ "htmlEntities" ] ;
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ 8582 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ A : ( ) => ( /* binding */ dynamicSelectors ) ,
/* harmony export */ B : ( ) => ( /* binding */ dynamicActions )
/* harmony export */ } ) ;
let dynamicActions ;
let dynamicSelectors ;
2025-02-28 08:42:11 +01:00
2022-12-15 17:47:31 +01:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
/***/ 8741 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ getBlockPatternsForPostType : ( ) => ( /* binding */ getBlockPatternsForPostType ) ,
/* harmony export */ getEntityRecordPermissions : ( ) => ( /* binding */ getEntityRecordPermissions ) ,
/* harmony export */ getEntityRecordsPermissions : ( ) => ( /* binding */ getEntityRecordsPermissions ) ,
/* harmony export */ getHomePage : ( ) => ( /* binding */ getHomePage ) ,
/* harmony export */ getNavigationFallbackId : ( ) => ( /* binding */ getNavigationFallbackId ) ,
/* harmony export */ getPostsPageId : ( ) => ( /* binding */ getPostsPageId ) ,
/* harmony export */ getRegisteredPostMeta : ( ) => ( /* binding */ getRegisteredPostMeta ) ,
/* harmony export */ getTemplateId : ( ) => ( /* binding */ getTemplateId ) ,
/* harmony export */ getUndoManager : ( ) => ( /* binding */ getUndoManager )
/* harmony export */ } ) ;
/* harmony import */ var _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 7143 ) ;
/* harmony import */ var _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _selectors _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 8368 ) ;
/* harmony import */ var _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 2278 ) ;
/* harmony import */ var _lock _unlock _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 6378 ) ;
/* harmony import */ var _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 9410 ) ;
2022-12-15 17:47:31 +01:00
2025-02-28 08:42:11 +01:00
2022-12-15 17:47:31 +01:00
2025-12-12 13:15:55 +01:00
function getUndoManager ( state ) {
return state . undoManager ;
}
function getNavigationFallbackId ( state ) {
return state . navigationFallbackId ;
}
const getBlockPatternsForPostType = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createRegistrySelector ) (
( select ) => ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createSelector ) (
( state , postType ) => select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getBlockPatterns ( ) . filter (
( { postTypes } ) => ! postTypes || Array . isArray ( postTypes ) && postTypes . includes ( postType )
) ,
( ) => [ select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getBlockPatterns ( ) ]
)
) ;
const getEntityRecordsPermissions = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createRegistrySelector ) (
( select ) => ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createSelector ) (
( state , kind , name , ids ) => {
const normalizedIds = Array . isArray ( ids ) ? ids : [ ids ] ;
return normalizedIds . map ( ( id ) => ( {
delete : select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . canUser ( "delete" , {
kind ,
name ,
id
} ) ,
update : select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . canUser ( "update" , {
kind ,
name ,
id
} )
} ) ) ;
} ,
( state ) => [ state . userPermissions ]
)
) ;
function getEntityRecordPermissions ( state , kind , name , id ) {
( 0 , _utils _log _entity _deprecation _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* ["default"] */ . A ) ( kind , name , "getEntityRecordPermissions" ) ;
return getEntityRecordsPermissions ( state , kind , name , id ) [ 0 ] ;
}
function getRegisteredPostMeta ( state , postType ) {
return state . registeredPostMeta ? . [ postType ] ? ? { } ;
}
function normalizePageId ( value ) {
if ( ! value || ! [ "number" , "string" ] . includes ( typeof value ) ) {
return null ;
}
if ( Number ( value ) === 0 ) {
return null ;
}
return value . toString ( ) ;
}
const getHomePage = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createRegistrySelector ) (
( select ) => ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createSelector ) (
( ) => {
const siteData = select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getEntityRecord (
"root" ,
"__unstableBase"
) ;
if ( ! siteData ) {
return null ;
}
const homepageId = siteData ? . show _on _front === "page" ? normalizePageId ( siteData . page _on _front ) : null ;
if ( homepageId ) {
return { postType : "page" , postId : homepageId } ;
}
const frontPageTemplateId = select (
_name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E
) . getDefaultTemplateId ( {
slug : "front-page"
} ) ;
if ( ! frontPageTemplateId ) {
return null ;
}
return { postType : "wp_template" , postId : frontPageTemplateId } ;
} ,
( state ) => [
( 0 , _selectors _ _WEBPACK _IMPORTED _MODULE _3 _ _ . getEntityRecord ) ( state , "root" , "__unstableBase" ) ,
( 0 , _selectors _ _WEBPACK _IMPORTED _MODULE _3 _ _ . getDefaultTemplateId ) ( state , {
slug : "front-page"
} )
]
)
) ;
const getPostsPageId = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createRegistrySelector ) ( ( select ) => ( ) => {
const siteData = select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getEntityRecord (
"root" ,
"__unstableBase"
) ;
return siteData ? . show _on _front === "page" ? normalizePageId ( siteData . page _for _posts ) : null ;
2025-02-28 08:42:11 +01:00
} ) ;
2025-12-12 13:15:55 +01:00
const getTemplateId = ( 0 , _wordpress _data _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createRegistrySelector ) (
( select ) => ( state , postType , postId ) => {
const homepage = ( 0 , _lock _unlock _ _WEBPACK _IMPORTED _MODULE _4 _ _ /* .unlock */ . T ) ( select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) ) . getHomePage ( ) ;
if ( ! homepage ) {
return ;
}
if ( postType === "page" && postType === homepage ? . postType && postId . toString ( ) === homepage ? . postId ) {
const templates = select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getEntityRecords (
"postType" ,
"wp_template" ,
{
per _page : - 1
}
) ;
if ( ! templates ) {
return ;
}
const id = templates . find ( ( { slug } ) => slug === "front-page" ) ? . id ;
if ( id ) {
return id ;
}
}
const editedEntity = select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getEditedEntityRecord (
"postType" ,
postType ,
postId
) ;
if ( ! editedEntity ) {
return ;
}
const postsPageId = ( 0 , _lock _unlock _ _WEBPACK _IMPORTED _MODULE _4 _ _ /* .unlock */ . T ) ( select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) ) . getPostsPageId ( ) ;
if ( postType === "page" && postsPageId === postId . toString ( ) ) {
return select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getDefaultTemplateId ( {
slug : "home"
} ) ;
}
const currentTemplateSlug = editedEntity . template ;
if ( currentTemplateSlug ) {
const currentTemplate = select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getEntityRecords ( "postType" , "wp_template" , {
per _page : - 1
} ) ? . find ( ( { slug } ) => slug === currentTemplateSlug ) ;
if ( currentTemplate ) {
return currentTemplate . id ;
}
}
let slugToCheck ;
if ( editedEntity . slug ) {
slugToCheck = postType === "page" ? ` ${ postType } - ${ editedEntity . slug } ` : ` single- ${ postType } - ${ editedEntity . slug } ` ;
} else {
slugToCheck = postType === "page" ? "page" : ` single- ${ postType } ` ;
}
return select ( _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ) . getDefaultTemplateId ( {
slug : slugToCheck
} ) ;
}
) ;
2022-12-15 17:47:31 +01:00
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
/***/ 8843 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ D : ( ) => ( /* binding */ EntityContext )
/* harmony export */ } ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 6087 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2019-11-02 10:38:58 +01:00
2025-12-12 13:15:55 +01:00
const EntityContext = ( 0 , _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createContext ) ( { } ) ;
EntityContext . displayName = "EntityContext" ;
2019-11-02 10:38:58 +01:00
2021-04-27 08:32:47 +02:00
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
/***/ 9410 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
"use strict" ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ A : ( ) => ( /* binding */ logEntityDeprecation )
/* harmony export */ } ) ;
/* harmony import */ var _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 4040 ) ;
/* harmony import */ var _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 5914 ) ;
2025-02-28 08:42:11 +01:00
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
let loggedAlready = false ;
function logEntityDeprecation ( kind , name , functionName , {
alternativeFunctionName ,
isShorthandSelector = false
} = { } ) {
const deprecation = _entities _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .deprecatedEntities */ . TK [ kind ] ? . [ name ] ;
if ( ! deprecation ) {
return ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
if ( ! loggedAlready ) {
const { alternative } = deprecation ;
const message = isShorthandSelector ? ` ' ${ functionName } ' ` : ` The ' ${ kind } ', ' ${ name } ' entity (used via ' ${ functionName } ') ` ;
let alternativeMessage = ` the ' ${ alternative . kind } ', ' ${ alternative . name } ' entity ` ;
if ( alternativeFunctionName ) {
alternativeMessage += ` via the ' ${ alternativeFunctionName } ' function ` ;
}
_wordpress _deprecated _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) ( message , {
... deprecation ,
alternative : alternativeMessage
} ) ;
2022-06-16 14:03:35 +02:00
}
2025-12-12 13:15:55 +01:00
loggedAlready = true ;
setTimeout ( ( ) => {
loggedAlready = false ;
} , 0 ) ;
}
2023-12-07 09:44:11 +01:00
2023-09-26 10:33:34 +02:00
2025-12-12 13:15:55 +01:00
/***/ } ) ,
/***/ 9424 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
2021-04-27 08:32:47 +02:00
2025-12-12 13:15:55 +01:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ editMediaEntity : ( ) => ( /* binding */ editMediaEntity ) ,
/* harmony export */ receiveRegisteredPostMeta : ( ) => ( /* binding */ receiveRegisteredPostMeta )
/* harmony export */ } ) ;
/* harmony import */ var _wordpress _api _fetch _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1455 ) ;
/* harmony import */ var _wordpress _api _fetch _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _api _fetch _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _name _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 2278 ) ;
2021-04-27 08:32:47 +02:00
2025-12-12 13:15:55 +01:00
function receiveRegisteredPostMeta ( postType , registeredPostMeta ) {
return {
type : "RECEIVE_REGISTERED_POST_META" ,
postType ,
registeredPostMeta
} ;
}
const editMediaEntity = ( recordId , edits = { } , { _ _unstableFetch = ( _wordpress _api _fetch _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default ( ) ) , throwOnError = false } = { } ) => async ( { dispatch , resolveSelect } ) => {
if ( ! recordId ) {
return ;
}
const kind = "postType" ;
const name = "attachment" ;
const configs = await resolveSelect . getEntitiesConfig ( kind ) ;
const entityConfig = configs . find (
( config ) => config . kind === kind && config . name === name
) ;
if ( ! entityConfig ) {
return ;
}
const lock = await dispatch . _ _unstableAcquireStoreLock (
_name _ _WEBPACK _IMPORTED _MODULE _1 _ _ /* .STORE_NAME */ . E ,
[ "entities" , "records" , kind , name , recordId ] ,
{ exclusive : true }
) ;
let updatedRecord ;
let error ;
let hasError = false ;
try {
dispatch ( {
type : "SAVE_ENTITY_RECORD_START" ,
kind ,
name ,
recordId
} ) ;
try {
const path = ` ${ entityConfig . baseURL } / ${ recordId } /edit ` ;
const newRecord = await _ _unstableFetch ( {
path ,
method : "POST" ,
data : {
... edits
}
} ) ;
if ( newRecord ) {
dispatch . receiveEntityRecords (
kind ,
name ,
[ newRecord ] ,
void 0 ,
true ,
void 0 ,
void 0
) ;
updatedRecord = newRecord ;
}
} catch ( e ) {
error = e ;
hasError = true ;
}
dispatch ( {
type : "SAVE_ENTITY_RECORD_FINISH" ,
kind ,
name ,
recordId ,
error
} ) ;
if ( hasError && throwOnError ) {
throw error ;
}
return updatedRecord ;
} finally {
dispatch . _ _unstableReleaseStoreLock ( lock ) ;
}
} ;
2021-04-27 08:32:47 +02:00
2025-12-12 13:15:55 +01:00
/***/ } )
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
/******/ } ) ;
/************************************************************************/
/******/ // The module cache
/******/ var _ _webpack _module _cache _ _ = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/ // Check if module is in cache
/******/ var cachedModule = _ _webpack _module _cache _ _ [ moduleId ] ;
/******/ if ( cachedModule !== undefined ) {
/******/ return cachedModule . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = _ _webpack _module _cache _ _ [ moduleId ] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ _ _webpack _modules _ _ [ moduleId ] ( module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ ( ( ) => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = ( module ) => {
/******/ var getter = module && module . _ _esModule ?
/******/ ( ) => ( module [ 'default' ] ) :
/******/ ( ) => ( module ) ;
/******/ _ _webpack _require _ _ . d ( getter , { a : getter } ) ;
/******/ return getter ;
/******/ } ;
/******/ } ) ( ) ;
/******/
/******/ /* webpack/runtime/define property getters */
/******/ ( ( ) => {
/******/ // define getter functions for harmony exports
/******/ _ _webpack _require _ _ . d = ( exports , definition ) => {
/******/ for ( var key in definition ) {
/******/ if ( _ _webpack _require _ _ . o ( definition , key ) && ! _ _webpack _require _ _ . o ( exports , key ) ) {
/******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
/******/ }
/******/ }
/******/ } ;
/******/ } ) ( ) ;
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ ( ( ) => {
/******/ _ _webpack _require _ _ . o = ( obj , prop ) => ( Object . prototype . hasOwnProperty . call ( obj , prop ) )
/******/ } ) ( ) ;
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ ( ( ) => {
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = ( exports ) => {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/ } ) ( ) ;
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var _ _webpack _exports _ _ = _ _webpack _require _ _ ( 4565 ) ;
/******/ ( window . wp = window . wp || { } ) . coreData = _ _webpack _exports _ _ ;
/******/
2022-06-16 14:03:35 +02:00
/******/ } ) ( )
;