(()=>{"use strict";const t=window.wp.interactivity;function e(t,e){if(!t||"string"!=typeof t)return;const n=t.split(".");let o=e;for(const t of n){if(!o||"object"!=typeof o||!(t in o))return;o=o[t]}return o}(0,t.store)("gateway/route-link",{state:{get dynamicPath(){const n=(0,t.getContext)(),{template:o,tokens:r,parts:i}=n.templateData||{};if(!o||!r||!i)return n.staticPath||"/";let a="";for(let t=0;t<i.length;t++)if(a+=i[t],t<r.length){const o=e(r[t],n);if(null==o)return console.warn(`Route link: Could not resolve token "${r[t]}" from context.`,"Available context:",n),n.staticPath||"#";a+=String(o)}return a}}})})();