2025-02-28 08:42:11 +01:00
import * as _ _WEBPACK _EXTERNAL _MODULE _ _wordpress _interactivity _8e89b257 _ _ from "@wordpress/interactivity" ;
/******/ var _ _webpack _modules _ _ = ( {
/***/ 317 :
/***/ ( ( module ) => {
module . exports = import ( "@wordpress/a11y" ) ; ;
/***/ } )
/******/ } ) ;
/************************************************************************/
/******/ // 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/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 ) )
/******/ } ) ( ) ;
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
o : ( ) => ( /* binding */ actions ) ,
w : ( ) => ( /* binding */ state )
} ) ;
2025-04-25 12:30:07 +02:00
; // external "@wordpress/interactivity"
2025-02-28 08:42:11 +01:00
var x = ( y ) => {
var x = { } ; _ _webpack _require _ _ . d ( x , y ) ; return x
}
var y = ( x ) => ( ( ) => ( x ) )
const interactivity _namespaceObject = x ( { [ "getConfig" ] : ( ) => ( _ _WEBPACK _EXTERNAL _MODULE _ _wordpress _interactivity _8e89b257 _ _ . getConfig ) , [ "privateApis" ] : ( ) => ( _ _WEBPACK _EXTERNAL _MODULE _ _wordpress _interactivity _8e89b257 _ _ . privateApis ) , [ "store" ] : ( ) => ( _ _WEBPACK _EXTERNAL _MODULE _ _wordpress _interactivity _8e89b257 _ _ . store ) } ) ;
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/interactivity-router/build-module/assets/scs.js
function shortestCommonSupersequence ( X , Y , isEqual = ( a , b ) => a === b ) {
const m = X . length ;
const n = Y . length ;
const dp = Array . from (
{ length : m + 1 } ,
( ) => Array ( n + 1 ) . fill ( null )
) ;
for ( let i = 0 ; i <= m ; i ++ ) {
dp [ i ] [ 0 ] = X . slice ( 0 , i ) ;
}
for ( let j = 0 ; j <= n ; j ++ ) {
dp [ 0 ] [ j ] = Y . slice ( 0 , j ) ;
}
for ( let i = 1 ; i <= m ; i ++ ) {
for ( let j = 1 ; j <= n ; j ++ ) {
if ( isEqual ( X [ i - 1 ] , Y [ j - 1 ] ) ) {
dp [ i ] [ j ] = dp [ i - 1 ] [ j - 1 ] . concat ( X [ i - 1 ] ) ;
} else {
const option1 = dp [ i - 1 ] [ j ] . concat ( X [ i - 1 ] ) ;
const option2 = dp [ i ] [ j - 1 ] . concat ( Y [ j - 1 ] ) ;
dp [ i ] [ j ] = option1 . length <= option2 . length ? option1 : option2 ;
}
2025-04-25 12:30:07 +02:00
}
}
2025-12-12 13:15:55 +01:00
return dp [ m ] [ n ] ;
}
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/interactivity-router/build-module/assets/styles.js
2025-04-25 12:30:07 +02:00
2025-12-12 13:15:55 +01:00
const areNodesEqual = ( a , b ) => a . isEqualNode ( b ) ;
const normalizeMedia = ( element ) => {
element = element . cloneNode ( true ) ;
const media = element . media ;
const { originalMedia } = element . dataset ;
if ( media === "preload" ) {
element . media = originalMedia || "all" ;
element . removeAttribute ( "data-original-media" ) ;
} else if ( ! element . media ) {
element . media = "all" ;
}
return element ;
} ;
function updateStylesWithSCS ( X , Y , parent = window . document . head ) {
if ( X . length === 0 ) {
return Y . map ( ( element ) => {
const promise = prepareStylePromise ( element ) ;
parent . appendChild ( element ) ;
return promise ;
} ) ;
}
const xNormalized = X . map ( normalizeMedia ) ;
const yNormalized = Y . map ( normalizeMedia ) ;
const scs = shortestCommonSupersequence (
xNormalized ,
yNormalized ,
areNodesEqual
) ;
const xLength = X . length ;
const yLength = Y . length ;
const promises = [ ] ;
let last = X [ xLength - 1 ] ;
let xIndex = 0 ;
let yIndex = 0 ;
for ( const scsElement of scs ) {
const xElement = X [ xIndex ] ;
const yElement = Y [ yIndex ] ;
const xNormEl = xNormalized [ xIndex ] ;
const yNormEl = yNormalized [ yIndex ] ;
if ( xIndex < xLength && areNodesEqual ( xNormEl , scsElement ) ) {
if ( yIndex < yLength && areNodesEqual ( yNormEl , scsElement ) ) {
promises . push ( prepareStylePromise ( xElement ) ) ;
yIndex ++ ;
}
xIndex ++ ;
} else {
promises . push ( prepareStylePromise ( yElement ) ) ;
if ( xIndex < xLength ) {
xElement . before ( yElement ) ;
} else {
last . after ( yElement ) ;
last = yElement ;
}
yIndex ++ ;
}
}
return promises ;
}
const stylePromiseCache = /* @__PURE__ */ new WeakMap ( ) ;
const prepareStylePromise = ( element ) => {
if ( stylePromiseCache . has ( element ) ) {
return stylePromiseCache . get ( element ) ;
}
if ( window . document . contains ( element ) && element . media !== "preload" ) {
const promise2 = Promise . resolve ( element ) ;
stylePromiseCache . set ( element , promise2 ) ;
return promise2 ;
}
if ( element . hasAttribute ( "media" ) && element . media !== "all" ) {
element . dataset . originalMedia = element . media ;
}
element . media = "preload" ;
if ( element instanceof HTMLStyleElement ) {
const promise2 = Promise . resolve ( element ) ;
stylePromiseCache . set ( element , promise2 ) ;
return promise2 ;
}
const promise = new Promise ( ( resolve , reject ) => {
element . addEventListener ( "load" , ( ) => resolve ( element ) ) ;
element . addEventListener ( "error" , ( event ) => {
const { href } = event . target ;
reject (
Error (
` The style sheet with the following URL failed to load: ${ href } `
)
) ;
} ) ;
} ) ;
stylePromiseCache . set ( element , promise ) ;
return promise ;
} ;
const styleSheetCache = /* @__PURE__ */ new Map ( ) ;
const preloadStyles = ( doc , url ) => {
if ( ! styleSheetCache . has ( url ) ) {
const currentStyleElements = Array . from (
window . document . querySelectorAll (
"style,link[rel=stylesheet]"
)
) ;
const newStyleElements = Array . from (
doc . querySelectorAll ( "style,link[rel=stylesheet]" )
) ;
const stylePromises = updateStylesWithSCS (
currentStyleElements ,
newStyleElements
) ;
styleSheetCache . set ( url , stylePromises ) ;
}
return styleSheetCache . get ( url ) ;
} ;
const applyStyles = ( styles ) => {
window . document . querySelectorAll ( "style,link[rel=stylesheet]" ) . forEach ( ( el ) => {
if ( el . sheet ) {
if ( styles . includes ( el ) ) {
if ( el . sheet . media . mediaText === "preload" ) {
const { originalMedia = "all" } = el . dataset ;
el . sheet . media . mediaText = originalMedia ;
}
el . sheet . disabled = false ;
} else {
el . sheet . disabled = true ;
}
2025-04-25 12:30:07 +02:00
}
} ) ;
2025-12-12 13:15:55 +01:00
} ;
; // ./node_modules/@wordpress/interactivity-router/build-module/assets/dynamic-importmap/resolver.js
const backslashRegEx = /\\/g ;
function isURL ( url ) {
if ( url . indexOf ( ":" ) === - 1 ) {
return false ;
}
try {
new URL ( url ) ;
return true ;
} catch ( _ ) {
return false ;
}
}
function resolveIfNotPlainOrUrl ( relUrl , parentUrl ) {
const hIdx = parentUrl . indexOf ( "#" ) , qIdx = parentUrl . indexOf ( "?" ) ;
if ( hIdx + qIdx > - 2 ) {
parentUrl = parentUrl . slice (
0 ,
// eslint-disable-next-line no-nested-ternary
hIdx === - 1 ? qIdx : qIdx === - 1 || qIdx > hIdx ? hIdx : qIdx
) ;
}
if ( relUrl . indexOf ( "\\" ) !== - 1 ) {
relUrl = relUrl . replace ( backslashRegEx , "/" ) ;
}
if ( relUrl [ 0 ] === "/" && relUrl [ 1 ] === "/" ) {
return parentUrl . slice ( 0 , parentUrl . indexOf ( ":" ) + 1 ) + relUrl ;
} else if ( relUrl [ 0 ] === "." && ( relUrl [ 1 ] === "/" || relUrl [ 1 ] === "." && ( relUrl [ 2 ] === "/" || relUrl . length === 2 && ( relUrl += "/" ) ) || relUrl . length === 1 && ( relUrl += "/" ) ) || relUrl [ 0 ] === "/" ) {
const parentProtocol = parentUrl . slice (
0 ,
parentUrl . indexOf ( ":" ) + 1
) ;
let pathname ;
if ( parentUrl [ parentProtocol . length + 1 ] === "/" ) {
if ( parentProtocol !== "file:" ) {
pathname = parentUrl . slice ( parentProtocol . length + 2 ) ;
pathname = pathname . slice ( pathname . indexOf ( "/" ) + 1 ) ;
} else {
pathname = parentUrl . slice ( 8 ) ;
}
} else {
pathname = parentUrl . slice (
parentProtocol . length + ( parentUrl [ parentProtocol . length ] === "/" )
) ;
}
if ( relUrl [ 0 ] === "/" ) {
return parentUrl . slice ( 0 , parentUrl . length - pathname . length - 1 ) + relUrl ;
}
const segmented = pathname . slice ( 0 , pathname . lastIndexOf ( "/" ) + 1 ) + relUrl ;
const output = [ ] ;
let segmentIndex = - 1 ;
for ( let i = 0 ; i < segmented . length ; i ++ ) {
if ( segmentIndex !== - 1 ) {
if ( segmented [ i ] === "/" ) {
output . push ( segmented . slice ( segmentIndex , i + 1 ) ) ;
segmentIndex = - 1 ;
}
continue ;
} else if ( segmented [ i ] === "." ) {
if ( segmented [ i + 1 ] === "." && ( segmented [ i + 2 ] === "/" || i + 2 === segmented . length ) ) {
output . pop ( ) ;
i += 2 ;
continue ;
} else if ( segmented [ i + 1 ] === "/" || i + 1 === segmented . length ) {
i += 1 ;
continue ;
}
}
while ( segmented [ i ] === "/" ) {
i ++ ;
}
segmentIndex = i ;
}
if ( segmentIndex !== - 1 ) {
output . push ( segmented . slice ( segmentIndex ) ) ;
}
return parentUrl . slice ( 0 , parentUrl . length - pathname . length ) + output . join ( "" ) ;
}
}
function resolveUrl ( relUrl , parentUrl ) {
return resolveIfNotPlainOrUrl ( relUrl , parentUrl ) || ( isURL ( relUrl ) ? relUrl : resolveIfNotPlainOrUrl ( "./" + relUrl , parentUrl ) ) ;
}
function getMatch ( path , matchObj ) {
if ( matchObj [ path ] ) {
return path ;
}
let sepIndex = path . length ;
do {
const segment = path . slice ( 0 , sepIndex + 1 ) ;
if ( segment in matchObj ) {
return segment ;
}
} while ( ( sepIndex = path . lastIndexOf ( "/" , sepIndex - 1 ) ) !== - 1 ) ;
}
function applyPackages ( id , packages ) {
const pkgName = getMatch ( id , packages ) ;
if ( pkgName ) {
const pkg = packages [ pkgName ] ;
if ( pkg === null ) {
2025-04-25 12:30:07 +02:00
return ;
}
2025-12-12 13:15:55 +01:00
return pkg + id . slice ( pkgName . length ) ;
}
}
function resolveImportMap ( importMap2 , resolvedOrPlain , parentUrl ) {
let scopeUrl = parentUrl && getMatch ( parentUrl , importMap2 . scopes ) ;
while ( scopeUrl ) {
const packageResolution = applyPackages (
resolvedOrPlain ,
importMap2 . scopes [ scopeUrl ]
) ;
if ( packageResolution ) {
return packageResolution ;
}
scopeUrl = getMatch (
scopeUrl . slice ( 0 , scopeUrl . lastIndexOf ( "/" ) ) ,
importMap2 . scopes
) ;
}
return applyPackages ( resolvedOrPlain , importMap2 . imports ) || resolvedOrPlain . indexOf ( ":" ) !== - 1 && resolvedOrPlain ;
}
function resolveAndComposePackages ( packages , outPackages , baseUrl2 , parentMap ) {
for ( const p in packages ) {
const resolvedLhs = resolveIfNotPlainOrUrl ( p , baseUrl2 ) || p ;
const target = packages [ p ] ;
if ( typeof target !== "string" ) {
continue ;
}
const mapped = resolveImportMap (
parentMap ,
resolveIfNotPlainOrUrl ( target , baseUrl2 ) || target ,
baseUrl2
) ;
if ( mapped ) {
outPackages [ resolvedLhs ] = mapped ;
continue ;
}
}
}
function resolveAndComposeImportMap ( json , baseUrl2 , parentMap ) {
const outMap = {
imports : Object . assign ( { } , parentMap . imports ) ,
scopes : Object . assign ( { } , parentMap . scopes )
} ;
if ( json . imports ) {
resolveAndComposePackages (
json . imports ,
outMap . imports ,
baseUrl2 ,
parentMap
) ;
}
if ( json . scopes ) {
for ( const s in json . scopes ) {
const resolvedScope = resolveUrl ( s , baseUrl2 ) ;
resolveAndComposePackages (
json . scopes [ s ] ,
outMap . scopes [ resolvedScope ] || ( outMap . scopes [ resolvedScope ] = { } ) ,
baseUrl2 ,
parentMap
) ;
}
}
return outMap ;
}
let importMap = { imports : { } , scopes : { } } ;
const baseUrl = document . baseURI ;
const pageBaseUrl = baseUrl ;
function resolver _addImportMap ( importMapIn ) {
importMap = resolveAndComposeImportMap (
importMapIn ,
pageBaseUrl ,
importMap
) ;
}
function resolve ( id , parentUrl ) {
const urlResolved = resolveIfNotPlainOrUrl ( id , parentUrl ) ;
return resolveImportMap ( importMap , urlResolved || id , parentUrl ) || id ;
}
; // ./node_modules/es-module-lexer/dist/lexer.js
/* es-module-lexer 1.7.0 */
var ImportType ; ! function ( A ) { A [ A . Static = 1 ] = "Static" , A [ A . Dynamic = 2 ] = "Dynamic" , A [ A . ImportMeta = 3 ] = "ImportMeta" , A [ A . StaticSourcePhase = 4 ] = "StaticSourcePhase" , A [ A . DynamicSourcePhase = 5 ] = "DynamicSourcePhase" , A [ A . StaticDeferPhase = 6 ] = "StaticDeferPhase" , A [ A . DynamicDeferPhase = 7 ] = "DynamicDeferPhase" } ( ImportType || ( ImportType = { } ) ) ; const A = 1 === new Uint8Array ( new Uint16Array ( [ 1 ] ) . buffer ) [ 0 ] ; function parse ( E , g = "@" ) { if ( ! C ) return init . then ( ( ( ) => parse ( E ) ) ) ; const I = E . length + 1 , w = ( C . _ _heap _base . value || C . _ _heap _base ) + 4 * I - C . memory . buffer . byteLength ; w > 0 && C . memory . grow ( Math . ceil ( w / 65536 ) ) ; const K = C . sa ( I - 1 ) ; if ( ( A ? B : Q ) ( E , new Uint16Array ( C . memory . buffer , K , I ) ) , ! C . parse ( ) ) throw Object . assign ( new Error ( ` Parse error ${ g } : ${ E . slice ( 0 , C . e ( ) ) . split ( "\n" ) . length } : ${ C . e ( ) - E . lastIndexOf ( "\n" , C . e ( ) - 1 ) } ` ) , { idx : C . e ( ) } ) ; const o = [ ] , D = [ ] ; for ( ; C . ri ( ) ; ) { const A = C . is ( ) , Q = C . ie ( ) , B = C . it ( ) , g = C . ai ( ) , I = C . id ( ) , w = C . ss ( ) , K = C . se ( ) ; let D ; C . ip ( ) && ( D = k ( E . slice ( - 1 === I ? A - 1 : A , - 1 === I ? Q + 1 : Q ) ) ) , o . push ( { n : D , t : B , s : A , e : Q , ss : w , se : K , d : I , a : g } ) } for ( ; C . re ( ) ; ) { const A = C . es ( ) , Q = C . ee ( ) , B = C . els ( ) , g = C . ele ( ) , I = E . slice ( A , Q ) , w = I [ 0 ] , K = B < 0 ? void 0 : E . slice ( B , g ) , o = K ? K [ 0 ] : "" ; D . push ( { s : A , e : Q , ls : B , le : g , n : '"' === w || "'" === w ? k ( I ) : I , ln : '"' === o || "'" === o ? k ( K ) : K } ) } function k ( A ) { try { return ( 0 , eval ) ( A ) } catch ( A ) { } } return [ o , D , ! ! C . f ( ) , ! ! C . ms ( ) ] } function Q ( A , Q ) { const B = A . length ; let C = 0 ; for ( ; C < B ; ) { const B = A . charCodeAt ( C ) ; Q [ C ++ ] = ( 255 & B ) << 8 | B >>> 8 } } function B ( A , Q ) { const B = A . length ; let C = 0 ; for ( ; C < B ; ) Q [ C ] = A . charCodeAt ( C ++ ) } let C ; const E = ( ) => { return A = " AGFzbQEAAAABKwhgAX8Bf2AEf39 / fwBgAAF / YAAAYAF / AGADf39 / AX9gAn9 / AX9gA39 / fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ / AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJzZQAUC19faGVhcF9iYXNlAwEKzkQwaAEBf0EAIAA2AoAKQQAoAtwJIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgKECkEAIAA2AogKQQBBADYC4AlBAEEANgLwCUEAQQA2AugJQQBBADYC5AlBAEEANgL4CUEAQQA2AuwJIAEL0wEBA39BACgC8AkhBEEAQQAoAogKIgU2AvAJQQAgBDYC9AlBACAFQSRqNgKICiAEQSBqQeAJIAQbIAU2AgBBACgC1AkhBEEAKALQCSEGIAUgATYCACAFIAA2AgggBSACIAJBAmpBACAGIANGIgAbIAQgA0YiBBs2AgwgBSADNgIUIAVBADYCECAFIAI2AgQgBUEANgIgIAVBA0EBQQIgABsgBBs2AhwgBUEAKALQCSADRiICOgAYAkACQCACDQBBACgC1AkgA0cNAQtBAEEBOgCMCgsLXgEBf0EAKAL4CSIEQRBqQeQJIAQbQQAoAogKIgQ2AgBBACAENgL4CUEAIARBFGo2AogKQQBBAToAjAogBEEANgIQIAQgAzYCDCAEIAI2AgggBCABNgIEIAQgADYCAAsIAEEAKAKQCgsVAEEAKALoCSgCAEEAKALcCWtBAXULHgEBf0EAKALoCSgCBCIAQQAoAtwJa0EBdUF / IAAbCxUAQQAoAugJKAIIQQAoAtwJa0EBdQseAQF / QQAoAugJKAIMIgBBACgC3AlrQQF1QX8gABsLCwBBACgC6AkoAhwLHgEBf0EAKALoCSgCECIAQQAoAtwJa0EBdUF / IAAbCzsBAX8CQEEAKALoCSgCFCIAQQAoAtAJRw0AQX8PCwJAIABBACgC1AlHDQBBfg8LIABBACgC3AlrQQF1CwsAQQAoAugJLQAYCxUAQQAoAuwJKAIAQQAoAtwJa0EBdQsVAEEAKALsCSgCBEEAKALcCWtBAXULHgEBf0EAKALsCSgCCCIAQQAoAtwJa0EBdUF / IAAbCx4BAX9BACgC7AkoAgwiAEEAKALcCWtBAXVBfyAAGwslAQF / QQBBACgC6AkiAEEgakHgCSAAGygCACIANgLoCSAAQQBHCyUBAX9BAEEAKALsCSIAQRBqQeQJIAAbKAIAIgA2AuwJIABBAEcLCABBAC0AlAoLCABBAC0AjAoL3Q0BBX8jAEGA0ABrIgAkAEEAQQE6AJQKQQBBACgC2Ak2ApwKQQBBACgC3AlBfmoiATYCsApBACABQQAoAoAKQQF0aiICNgK0CkEAQQA6AIwKQQBBADsBlgpBAEEAOwGYCkEAQQA6AKAKQQBBADYCkApBAEEAOgD8CUEAIABBgBBqNgKkCkEAIAA2AqgKQQBBADoArAoCQAJAAkACQANAQQAgAUECaiIDNgKwCiABIAJPDQECQCADLwEAIgJBd2pBBUkNAAJAAkACQAJAAkAgAkGbf2oOBQEICAgCAAsgAkEgRg0EIAJBL0YNAyACQTtGDQIMBwtBAC8BmAoNASADEBVFDQEgAUEEakGCCEEKEC8NARAWQQAtAJQKDQFBAEEAKAKwCiIBNgKcCgwHCyADEBVFDQAgAUEEakGMCEEKEC8NABAXC0EAQQAoArAKNgKcCgwBCwJAIAEvAQQiA0EqRg0AIANBL0cNBBAYDAELQQEQGQtBACgCtAohAkEAKAKwCiEBDAALC0EAIQIgAyEBQQAtAPwJDQIMAQtBACABNgKwCkEAQQA6AJQKCwNAQQAgAUECaiIDNgKwCgJAAkACQAJAAkACQAJAIAFBACgCtApPDQAgAy8BACICQXdqQQVJDQYCQAJAAkACQAJAAkACQAJAAkACQCACQWBqDgoQDwYPDw8PBQECAAsCQAJAAkACQCACQaB / ag4KCxISAxIBEhISAgALIAJBhX9qDgMFEQYJC0EALwGYCg0QIAMQFUUNECABQQRqQYIIQQoQLw0QEBYMEAsgAxAVRQ0PIAFBBGpBjAhBChAvDQ8QFwwPCyADEBVFDQ4gASkABELsgISDsI7AOVINDiABLwEMIgNBd2oiAUEXSw0MQQEgAXRBn4CABHFFDQwMDQtBAEEALwGYCiIBQQFqOwGYCkEAKAKkCiABQQN0aiIBQQE2AgAgAUEAKAKcCjYCBAwNC0EALwGYCiIDRQ0JQQAgA0F / aiIDOwGYCkEALwGWCiICRQ0MQQAoAqQKIANB //8DcUEDdGooAgBBBUcNDAJAIAJBAnRBACgCqApqQXxqKAIAIgMoAgQNACADQQAoApwKQQJqNgIEC0EAIAJBf2o7AZYKIAMgAUEEajYCDAwMCwJAQQAoApwKIgEvAQB
; // ./node_modules/@wordpress/interactivity-router/build-module/assets/dynamic-importmap/fetch.js
const fetching = ( url , parent ) => {
return ` fetching ${ url } ${ parent ? ` from ${ parent } ` : "" } ` ;
} ;
const jsContentType = /^(text|application)\/(x-)?javascript(;|$)/ ;
async function fetchModule ( url , fetchOpts , parent ) {
let res ;
try {
res = await fetch ( url , fetchOpts ) ;
} catch ( e ) {
throw Error ( ` Network error ${ fetching ( url , parent ) } . ` ) ;
}
if ( ! res . ok ) {
throw Error ( ` Error ${ res . status } ${ fetching ( url , parent ) } . ` ) ;
}
const contentType = res . headers . get ( "content-type" ) ;
if ( ! jsContentType . test ( contentType ) ) {
throw Error (
` Bad Content-Type " ${ contentType } " ${ fetching ( url , parent ) } . `
) ;
}
return { responseUrl : res . url , source : await res . text ( ) } ;
}
; // ./node_modules/@wordpress/interactivity-router/build-module/assets/dynamic-importmap/loader.js
const initPromise = init ;
const initialImportMapElement = window . document . querySelector (
"script#wp-importmap[type=importmap]"
) ;
const initialImportMap = initialImportMapElement ? JSON . parse ( initialImportMapElement . text ) : { imports : { } , scopes : { } } ;
const skip = ( id ) => Object . keys ( initialImportMap . imports ) . includes ( id ) ;
const fetchCache = { } ;
const registry = { } ;
Object . keys ( initialImportMap . imports ) . forEach ( ( id ) => {
registry [ id ] = {
blobUrl : id
} ;
} ) ;
async function loadAll ( load , seen ) {
if ( load . blobUrl || seen [ load . url ] ) {
return ;
}
seen [ load . url ] = 1 ;
await load . linkPromise ;
await Promise . all ( load . deps . map ( ( dep ) => loadAll ( dep , seen ) ) ) ;
}
function urlJsString ( url ) {
return ` ' ${ url . replace ( /'/g , "\\'" ) } ' ` ;
}
const createBlob = ( source , type = "text/javascript" ) => URL . createObjectURL ( new Blob ( [ source ] , { type } ) ) ;
function resolveDeps ( load , seen ) {
if ( load . blobUrl || ! seen [ load . url ] ) {
return ;
}
seen [ load . url ] = 0 ;
for ( const dep of load . deps ) {
resolveDeps ( dep , seen ) ;
}
const [ imports , exports ] = load . analysis ;
const source = load . source ;
let resolvedSource = "" ;
if ( ! imports . length ) {
resolvedSource += source ;
} else {
let pushStringTo = function ( originalIndex ) {
while ( dynamicImportEndStack . length && dynamicImportEndStack [ dynamicImportEndStack . length - 1 ] < originalIndex ) {
const dynamicImportEnd = dynamicImportEndStack . pop ( ) ;
resolvedSource += ` ${ source . slice (
lastIndex ,
dynamicImportEnd
) } , $ { urlJsString ( load . responseUrl ) } ` ;
lastIndex = dynamicImportEnd ;
}
resolvedSource += source . slice ( lastIndex , originalIndex ) ;
lastIndex = originalIndex ;
} ;
let lastIndex = 0 ;
let depIndex = 0 ;
const dynamicImportEndStack = [ ] ;
for ( const {
s : start ,
ss : statementStart ,
se : statementEnd ,
d : dynamicImportIndex
} of imports ) {
if ( dynamicImportIndex === - 1 ) {
const depLoad = load . deps [ depIndex ++ ] ;
let blobUrl = depLoad . blobUrl ;
const cycleShell = ! blobUrl ;
if ( cycleShell ) {
if ( ! ( blobUrl = depLoad . shellUrl ) ) {
blobUrl = depLoad . shellUrl = createBlob (
` export function u $ _(m){ ${ depLoad . analysis [ 1 ] . map ( ( { s , e } , i) => {
const q = depLoad . source [ s ] === '"' || depLoad . source [ s ] === "'" ;
return ` e $ _ ${ i } =m ${ q ? ` [ ` : "." } ${ depLoad . source . slice ( s , e ) } ${ q ? ` ] ` : "" } ` ;
} ) . join ( "," ) } } $ { depLoad . analysis [ 1 ] . length ? ` let ${ depLoad . analysis [ 1 ] . map ( ( _ , i ) => ` e $ _ ${ i } ` ) . join ( "," ) } ; ` : "" } export { $ { depLoad . analysis [ 1 ] . map (
( { s , e } , i ) => ` e $ _ ${ i } as ${ depLoad . source . slice (
s ,
e
) } `
) . join ( "," ) } }
//# sourceURL=${depLoad.responseUrl}?cycle`
) ;
}
}
pushStringTo ( start - 1 ) ;
resolvedSource += ` /* ${ source . slice (
start - 1 ,
statementEnd
) } * / $ { u r l J s S t r i n g ( b l o b U r l ) } ` ;
if ( ! cycleShell && depLoad . shellUrl ) {
resolvedSource += ` ;import*as m $ _ ${ depIndex } from' ${ depLoad . blobUrl } ';import{u $ _ as u $ _ ${ depIndex } }from' ${ depLoad . shellUrl } ';u $ _ ${ depIndex } (m $ _ ${ depIndex } ) ` ;
depLoad . shellUrl = void 0 ;
}
lastIndex = statementEnd ;
} else if ( dynamicImportIndex === - 2 ) {
throw Error ( "The import.meta property is not supported." ) ;
} else {
pushStringTo ( statementStart ) ;
resolvedSource += ` wpInteractivityRouterImport( ` ;
dynamicImportEndStack . push ( statementEnd - 1 ) ;
lastIndex = start ;
2025-04-25 12:30:07 +02:00
}
}
2025-12-12 13:15:55 +01:00
if ( load . shellUrl ) {
resolvedSource += `
; import { u$ _ } from '${load.shellUrl}' ; try { u$ _ ( { $ { exports . filter ( ( e ) => e . ln ) . map ( ( { s , e , ln } ) => ` ${ source . slice ( s , e ) } : ${ ln } ` ) . join ( "," ) } } ) } catch ( _ ) { } ;
` ;
}
pushStringTo ( source . length ) ;
}
let hasSourceURL = false ;
resolvedSource = resolvedSource . replace (
sourceMapURLRegEx ,
( match , isMapping , url ) => {
hasSourceURL = ! isMapping ;
return match . replace (
url ,
( ) => new URL ( url , load . responseUrl ) . toString ( )
) ;
}
) ;
if ( ! hasSourceURL ) {
resolvedSource += "\n//# sourceURL=" + load . responseUrl ;
}
load . blobUrl = createBlob ( resolvedSource ) ;
load . source = void 0 ;
}
const sourceMapURLRegEx = /\n\/\/# source(Mapping)?URL=([^\n]+)\s*((;|\/\/[^#][^\n]*)\s*)*$/ ;
function getOrCreateLoad ( url , fetchOpts , parent ) {
let load = registry [ url ] ;
if ( load ) {
return load ;
}
load = { url } ;
if ( registry [ url ] ) {
let i = 0 ;
while ( registry [ load . url + ++ i ] ) {
}
load . url += i ;
}
registry [ load . url ] = load ;
load . fetchPromise = ( async ( ) => {
let source ;
( { responseUrl : load . responseUrl , source } = await ( fetchCache [ url ] || fetchModule ( url , fetchOpts , parent ) ) ) ;
try {
load . analysis = parse ( source , load . url ) ;
} catch ( e ) {
console . error ( e ) ;
load . analysis = [ [ ] , [ ] , false , false ] ;
}
load . source = source ;
return load ;
} ) ( ) ;
load . linkPromise = load . fetchPromise . then ( async ( ) => {
let childFetchOpts = fetchOpts ;
load . deps = ( await Promise . all (
load . analysis [ 0 ] . map ( async ( { n , d } ) => {
if ( d !== - 1 || ! n ) {
return void 0 ;
}
const responseUrl = resolve (
n ,
load . responseUrl || load . url
) ;
if ( skip && skip ( responseUrl ) ) {
return { blobUrl : responseUrl } ;
}
if ( childFetchOpts . integrity ) {
childFetchOpts = {
... childFetchOpts ,
integrity : void 0
} ;
}
return getOrCreateLoad (
responseUrl ,
childFetchOpts ,
load . responseUrl
) . fetchPromise ;
} )
) ) . filter ( ( l ) => l ) ;
} ) ;
return load ;
}
const dynamicImport = ( u ) => import (
/* webpackIgnore: true */
u
) ;
async function preloadModule ( url , fetchOpts ) {
await initPromise ;
const load = getOrCreateLoad ( url , fetchOpts , null ) ;
const seen = { } ;
await loadAll ( load , seen ) ;
resolveDeps ( load , seen ) ;
await Promise . resolve ( ) ;
return load ;
}
async function importPreloadedModule ( load ) {
const module = await dynamicImport ( load . blobUrl ) ;
if ( load . shellUrl ) {
( await dynamicImport ( load . shellUrl ) ) . u$ _ ( module ) ;
}
return module ;
}
async function topLevelLoad ( url , fetchOpts ) {
const load = await preloadModule ( url , fetchOpts ) ;
return importPreloadedModule ( load ) ;
}
; // ./node_modules/@wordpress/interactivity-router/build-module/assets/dynamic-importmap/index.js
const dynamic _importmap _baseUrl = document . baseURI ;
const dynamic _importmap _pageBaseUrl = dynamic _importmap _baseUrl ;
Object . defineProperty ( self , "wpInteractivityRouterImport" , {
value : importShim ,
writable : false ,
enumerable : false ,
configurable : false
} ) ;
async function importShim ( id ) {
await initPromise ;
return topLevelLoad ( resolve ( id , dynamic _importmap _pageBaseUrl ) , {
credentials : "same-origin"
} ) ;
}
async function importWithMap ( id , importMapIn ) {
addImportMap ( importMapIn ) ;
return importShim ( id ) ;
}
async function preloadWithMap ( id , importMapIn ) {
resolver _addImportMap ( importMapIn ) ;
await initPromise ;
return preloadModule ( resolve ( id , dynamic _importmap _pageBaseUrl ) , {
credentials : "same-origin"
} ) ;
}
; // ./node_modules/@wordpress/interactivity-router/build-module/assets/script-modules.js
const resolvedScriptModules = /* @__PURE__ */ new Set ( ) ;
const markScriptModuleAsResolved = ( url ) => {
resolvedScriptModules . add ( url ) ;
} ;
const preloadScriptModules = ( doc ) => {
const importMapElement = doc . querySelector (
"script#wp-importmap[type=importmap]"
) ;
const importMap = importMapElement ? JSON . parse ( importMapElement . text ) : { imports : { } , scopes : { } } ;
for ( const key in initialImportMap . imports ) {
delete importMap . imports [ key ] ;
}
const moduleUrls = [
... doc . querySelectorAll (
"script[type=module][src][data-wp-router-options]"
)
] . filter ( ( script ) => {
try {
const parsed = JSON . parse (
script . getAttribute ( "data-wp-router-options" )
) ;
return parsed ? . loadOnClientNavigation === true ;
} catch {
return false ;
}
} ) . map ( ( script ) => script . src ) ;
return moduleUrls . filter ( ( url ) => ! resolvedScriptModules . has ( url ) ) . map ( ( url ) => preloadWithMap ( url , importMap ) ) ;
2025-04-25 12:30:07 +02:00
} ;
2025-12-12 13:15:55 +01:00
const importScriptModules = ( modules ) => Promise . all ( modules . map ( ( m ) => importPreloadedModule ( m ) ) ) ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/interactivity-router/build-module/index.js
2025-02-28 08:42:11 +01:00
const {
getRegionRootFragment ,
initialVdom ,
toVdom ,
render ,
parseServerData ,
populateServerData ,
2025-12-12 13:15:55 +01:00
batch ,
routerRegions ,
2026-03-31 11:30:59 +02:00
h : createElement ,
2025-12-12 13:15:55 +01:00
navigationSignal
} = ( 0 , interactivity _namespaceObject . privateApis ) (
"I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."
) ;
const regionAttr = ` data-wp-router-region ` ;
const interactiveAttr = ` data-wp-interactive ` ;
const regionsSelector = ` [ ${ interactiveAttr } ][ ${ regionAttr } ], [ ${ interactiveAttr } ] [ ${ interactiveAttr } ][ ${ regionAttr } ] ` ;
const pages = /* @__PURE__ */ new Map ( ) ;
const getPagePath = ( url ) => {
2025-02-28 08:42:11 +01:00
const u = new URL ( url , window . location . href ) ;
return u . pathname + u . search ;
} ;
2025-12-12 13:15:55 +01:00
const parseRegionAttribute = ( region ) => {
const value = region . getAttribute ( regionAttr ) ;
try {
const { id , attachTo } = JSON . parse ( value ) ;
return { id , attachTo } ;
} catch ( e ) {
return { id : value } ;
}
} ;
const cloneRouterRegionContent = ( vdom ) => {
if ( ! vdom ) {
return vdom ;
}
const allPriorityLevels = vdom . props . priorityLevels ;
const routerRegionLevel = allPriorityLevels . findIndex (
( level ) => level . includes ( "router-region" )
) ;
const priorityLevels = routerRegionLevel !== - 1 ? allPriorityLevels . slice ( routerRegionLevel + 1 ) : allPriorityLevels ;
2026-03-31 11:30:59 +02:00
return priorityLevels . length > 0 ? createElement ( vdom . type , {
2025-12-12 13:15:55 +01:00
... vdom . props ,
priorityLevels
} ) : vdom . props . element ;
} ;
const regionsToAttachByParent = /* @__PURE__ */ new WeakMap ( ) ;
const rootFragmentsByParent = /* @__PURE__ */ new WeakMap ( ) ;
2026-03-31 11:30:59 +02:00
const initialRegionsToAttach = /* @__PURE__ */ new Set ( ) ;
2025-12-12 13:15:55 +01:00
const fetchPage = async ( url , { html } ) => {
2025-02-28 08:42:11 +01:00
try {
if ( ! html ) {
const res = await window . fetch ( url ) ;
if ( res . status !== 200 ) {
return false ;
}
html = await res . text ( ) ;
}
2025-12-12 13:15:55 +01:00
const dom = new window . DOMParser ( ) . parseFromString ( html , "text/html" ) ;
return await preparePage ( url , dom ) ;
2025-02-28 08:42:11 +01:00
} catch ( e ) {
return false ;
}
} ;
2025-12-12 13:15:55 +01:00
const preparePage = async ( url , dom , { vdom } = { } ) => {
dom . querySelectorAll ( "noscript" ) . forEach ( ( el ) => el . remove ( ) ) ;
const regions = { } ;
const regionsToAttach = { } ;
dom . querySelectorAll ( regionsSelector ) . forEach ( ( region ) => {
const { id , attachTo } = parseRegionAttribute ( region ) ;
if ( region . parentElement . closest ( ` [ ${ regionAttr } ] ` ) ) {
regions [ id ] = void 0 ;
} else {
2025-02-28 08:42:11 +01:00
regions [ id ] = vdom ? . has ( region ) ? vdom . get ( region ) : toVdom ( region ) ;
2025-12-12 13:15:55 +01:00
}
2026-03-31 11:30:59 +02:00
if ( attachTo && ! initialRegionsToAttach . has ( id ) ) {
2025-12-12 13:15:55 +01:00
regionsToAttach [ id ] = attachTo ;
}
} ) ;
const title = dom . querySelector ( "title" ) ? . innerText ;
2025-02-28 08:42:11 +01:00
const initialData = parseServerData ( dom ) ;
2025-12-12 13:15:55 +01:00
const [ styles , scriptModules ] = await Promise . all ( [
Promise . all ( preloadStyles ( dom , url ) ) ,
Promise . all ( preloadScriptModules ( dom ) )
] ) ;
2025-02-28 08:42:11 +01:00
return {
regions ,
2025-12-12 13:15:55 +01:00
regionsToAttach ,
styles ,
scriptModules ,
2025-02-28 08:42:11 +01:00
title ,
2025-12-12 13:15:55 +01:00
initialData ,
url
2025-02-28 08:42:11 +01:00
} ;
} ;
2025-12-12 13:15:55 +01:00
const renderPage = ( page ) => {
applyStyles ( page . styles ) ;
const regionsToAttach = { ... page . regionsToAttach } ;
batch ( ( ) => {
populateServerData ( page . initialData ) ;
navigationSignal . value += 1 ;
routerRegions . forEach ( ( signal ) => {
signal . value = null ;
2025-04-25 12:30:07 +02:00
} ) ;
2025-12-12 13:15:55 +01:00
const parentsToUpdate = /* @__PURE__ */ new Set ( ) ;
for ( const id in regionsToAttach ) {
const parent = document . querySelector ( regionsToAttach [ id ] ) ;
if ( ! regionsToAttachByParent . has ( parent ) ) {
regionsToAttachByParent . set ( parent , [ ] ) ;
}
const regions = regionsToAttachByParent . get ( parent ) ;
if ( ! regions . includes ( id ) ) {
regions . push ( id ) ;
parentsToUpdate . add ( parent ) ;
}
}
for ( const id in page . regions ) {
if ( routerRegions . has ( id ) ) {
routerRegions . get ( id ) . value = cloneRouterRegionContent (
page . regions [ id ]
) ;
}
}
parentsToUpdate . forEach ( ( parent ) => {
const ids = regionsToAttachByParent . get ( parent ) ;
const vdoms = ids . map ( ( id ) => page . regions [ id ] ) ;
if ( ! rootFragmentsByParent . has ( parent ) ) {
const regions = vdoms . map ( ( { props , type } ) => {
const elementType = typeof type === "function" ? props . type : type ;
const region = document . createElement ( elementType ) ;
parent . appendChild ( region ) ;
return region ;
} ) ;
rootFragmentsByParent . set (
parent ,
getRegionRootFragment ( regions )
) ;
}
const fragment = rootFragmentsByParent . get ( parent ) ;
render ( vdoms , fragment ) ;
} ) ;
} ) ;
2025-04-25 12:30:07 +02:00
if ( page . title ) {
document . title = page . title ;
}
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
const forcePageReload = ( href ) => {
2025-02-28 08:42:11 +01:00
window . location . assign ( href ) ;
2025-12-12 13:15:55 +01:00
return new Promise ( ( ) => {
} ) ;
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
window . addEventListener ( "popstate" , async ( ) => {
const pagePath = getPagePath ( window . location . href ) ;
const page = pages . has ( pagePath ) && await pages . get ( pagePath ) ;
2025-02-28 08:42:11 +01:00
if ( page ) {
2025-12-12 13:15:55 +01:00
batch ( ( ) => {
state . url = window . location . href ;
renderPage ( page ) ;
} ) ;
2025-02-28 08:42:11 +01:00
} else {
window . location . reload ( ) ;
}
} ) ;
2026-03-31 11:30:59 +02:00
document . querySelectorAll ( regionsSelector ) . forEach ( ( region ) => {
const { id , attachTo } = parseRegionAttribute ( region ) ;
if ( attachTo ) {
initialRegionsToAttach . add ( id ) ;
}
} ) ;
2025-12-12 13:15:55 +01:00
window . document . querySelectorAll ( "script[type=module][src]" ) . forEach ( ( { src } ) => markScriptModuleAsResolved ( src ) ) ;
pages . set (
getPagePath ( window . location . href ) ,
Promise . resolve (
preparePage ( getPagePath ( window . location . href ) , document , {
vdom : initialVdom
} )
)
) ;
let navigatingTo = "" ;
2025-02-28 08:42:11 +01:00
let hasLoadedNavigationTextsData = false ;
const navigationTexts = {
2025-12-12 13:15:55 +01:00
loading : "Loading page, please wait." ,
loaded : "Page Loaded."
2025-02-28 08:42:11 +01:00
} ;
2025-12-12 13:15:55 +01:00
const { state , actions } = ( 0 , interactivity _namespaceObject . store ) ( "core/router" , {
2025-02-28 08:42:11 +01:00
state : {
url : window . location . href ,
navigation : {
hasStarted : false ,
hasFinished : false
}
} ,
actions : {
/ * *
* Navigates to the specified page .
*
2025-04-25 12:30:07 +02:00
* This function normalizes the passed href , fetches the page HTML if
2025-02-28 08:42:11 +01:00
* needed , and updates any interactive regions whose contents have
* changed . It also creates a new entry in the browser session history .
*
* @ param href The page href .
* @ param [ options ] Options object .
* @ param [ options . force ] If true , it forces re - fetching the URL .
* @ param [ options . html ] HTML string to be used instead of fetching the requested URL .
* @ param [ options . replace ] If true , it replaces the current entry in the browser session history .
* @ param [ options . timeout ] Time until the navigation is aborted , in milliseconds . Default is 10000.
* @ param [ options . loadingAnimation ] Whether an animation should be shown while navigating . Default to ` true ` .
* @ param [ options . screenReaderAnnouncement ] Whether a message for screen readers should be announced while navigating . Default to ` true ` .
*
* @ return Promise that resolves once the navigation is completed or aborted .
* /
* navigate ( href , options = { } ) {
2025-12-12 13:15:55 +01:00
const { clientNavigationDisabled } = ( 0 , interactivity _namespaceObject . getConfig ) ( ) ;
2025-02-28 08:42:11 +01:00
if ( clientNavigationDisabled ) {
yield forcePageReload ( href ) ;
}
const pagePath = getPagePath ( href ) ;
2025-12-12 13:15:55 +01:00
const { navigation } = state ;
2025-02-28 08:42:11 +01:00
const {
loadingAnimation = true ,
screenReaderAnnouncement = true ,
2025-12-12 13:15:55 +01:00
timeout = 1e4
2025-02-28 08:42:11 +01:00
} = options ;
navigatingTo = href ;
actions . prefetch ( pagePath , options ) ;
2025-12-12 13:15:55 +01:00
const timeoutPromise = new Promise (
( resolve ) => setTimeout ( resolve , timeout )
) ;
2025-02-28 08:42:11 +01:00
const loadingTimeout = setTimeout ( ( ) => {
if ( navigatingTo !== href ) {
return ;
}
if ( loadingAnimation ) {
navigation . hasStarted = true ;
navigation . hasFinished = false ;
}
if ( screenReaderAnnouncement ) {
2025-12-12 13:15:55 +01:00
a11ySpeak ( "loading" ) ;
2025-02-28 08:42:11 +01:00
}
} , 400 ) ;
2025-12-12 13:15:55 +01:00
const page = yield Promise . race ( [
pages . get ( pagePath ) ,
timeoutPromise
] ) ;
2025-02-28 08:42:11 +01:00
clearTimeout ( loadingTimeout ) ;
if ( navigatingTo !== href ) {
return ;
}
2025-12-12 13:15:55 +01:00
if ( page && ! page . initialData ? . config ? . [ "core/router" ] ? . clientNavigationDisabled ) {
yield importScriptModules ( page . scriptModules ) ;
batch ( ( ) => {
state . url = href ;
if ( loadingAnimation ) {
navigation . hasStarted = false ;
navigation . hasFinished = true ;
}
renderPage ( page ) ;
} ) ;
window . history [ options . replace ? "replaceState" : "pushState" ] ( { } , "" , href ) ;
2025-02-28 08:42:11 +01:00
if ( screenReaderAnnouncement ) {
2025-12-12 13:15:55 +01:00
a11ySpeak ( "loaded" ) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
const { hash } = new URL ( href , window . location . href ) ;
2025-02-28 08:42:11 +01:00
if ( hash ) {
document . querySelector ( hash ) ? . scrollIntoView ( ) ;
}
} else {
yield forcePageReload ( href ) ;
}
} ,
/ * *
2025-04-25 12:30:07 +02:00
* Prefetches the page with the passed URL .
2025-02-28 08:42:11 +01:00
*
* The function normalizes the URL and stores internally the fetch
* promise , to avoid triggering a second fetch for an ongoing request .
*
* @ param url The page URL .
* @ param [ options ] Options object .
* @ param [ options . force ] Force fetching the URL again .
* @ param [ options . html ] HTML string to be used instead of fetching the requested URL .
2025-12-12 13:15:55 +01:00
*
* @ return Promise that resolves once the page has been fetched .
2025-02-28 08:42:11 +01:00
* /
2025-12-12 13:15:55 +01:00
* prefetch ( url , options = { } ) {
const { clientNavigationDisabled } = ( 0 , interactivity _namespaceObject . getConfig ) ( ) ;
2025-02-28 08:42:11 +01:00
if ( clientNavigationDisabled ) {
return ;
}
const pagePath = getPagePath ( url ) ;
if ( options . force || ! pages . has ( pagePath ) ) {
2025-12-12 13:15:55 +01:00
pages . set (
pagePath ,
fetchPage ( pagePath , { html : options . html } )
) ;
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
yield pages . get ( pagePath ) ;
2025-02-28 08:42:11 +01:00
}
}
} ) ;
function a11ySpeak ( messageKey ) {
if ( ! hasLoadedNavigationTextsData ) {
hasLoadedNavigationTextsData = true ;
2025-12-12 13:15:55 +01:00
const content = document . getElementById (
"wp-script-module-data-@wordpress/interactivity-router"
) ? . textContent ;
2025-02-28 08:42:11 +01:00
if ( content ) {
try {
const parsed = JSON . parse ( content ) ;
2025-12-12 13:15:55 +01:00
if ( typeof parsed ? . i18n ? . loading === "string" ) {
2025-02-28 08:42:11 +01:00
navigationTexts . loading = parsed . i18n . loading ;
}
2025-12-12 13:15:55 +01:00
if ( typeof parsed ? . i18n ? . loaded === "string" ) {
2025-02-28 08:42:11 +01:00
navigationTexts . loaded = parsed . i18n . loaded ;
}
2025-12-12 13:15:55 +01:00
} catch {
}
2025-02-28 08:42:11 +01:00
} else {
if ( state . navigation . texts ? . loading ) {
navigationTexts . loading = state . navigation . texts . loading ;
}
if ( state . navigation . texts ? . loaded ) {
navigationTexts . loaded = state . navigation . texts . loaded ;
}
}
}
const message = navigationTexts [ messageKey ] ;
2025-12-12 13:15:55 +01:00
Promise . resolve ( /* import() */ ) . then ( _ _webpack _require _ _ . bind ( _ _webpack _require _ _ , 317 ) ) . then (
( { speak } ) => speak ( message ) ,
// Ignore failures to load the a11y module.
( ) => {
}
) ;
2025-02-28 08:42:11 +01:00
}
var _ _webpack _exports _ _actions = _ _webpack _exports _ _ . o ;
var _ _webpack _exports _ _state = _ _webpack _exports _ _ . w ;
export { _ _webpack _exports _ _actions as actions , _ _webpack _exports _ _state as state } ;