sirius-press/wordpress/wp-includes/js/dist/router.min.js

6 lines
14 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
(function() {
"use strict";var wp;(wp||={}).router=(()=>{var qt=Object.create;var V=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var $t=Object.getPrototypeOf,Ut=Object.prototype.hasOwnProperty;var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bt=(e,t)=>{for(var r in t)V(e,r,{get:t[r],enumerable:!0})},ut=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Vt(t))!Ut.call(e,a)&&a!==r&&V(e,a,{get:()=>t[a],enumerable:!(n=Qt(t,a))||n.enumerable});return e};var O=(e,t,r)=>(r=e!=null?qt($t(e)):{},ut(t||!e||!e.__esModule?V(r,"default",{value:e,enumerable:!0}):r,e)),Gt=e=>ut(V({},"__esModule",{value:!0}),e);var tt=T((ge,Pt)=>{Pt.exports=window.wp.element});var et=T((me,Ot)=>{Ot.exports=window.wp.url});var Rt=T((ye,_t)=>{_t.exports=window.wp.compose});var rt=T((we,At)=>{At.exports=window.ReactJSXRuntime});var Ht=T((Oe,Mt)=>{Mt.exports=window.wp.privateApis});var ce={};Bt(ce,{privateApis:()=>it});var Jt=Object.create;function K(){var e=Jt(null);return e.__=void 0,delete e.__,e}var vt=function(t,r,n){this.path=t,this.matcher=r,this.delegate=n};vt.prototype.to=function(t,r){var n=this.delegate;if(n&&n.willAddRoute&&(t=n.willAddRoute(this.matcher.target,t)),this.matcher.add(this.path,t),r){if(r.length===0)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,t,r,this.delegate)}};var $=function(t){this.routes=K(),this.children=K(),this.target=t};$.prototype.add=function(t,r){this.routes[t]=r};$.prototype.addChild=function(t,r,n,a){var o=new $(r);this.children[t]=o;var i=X(t,o,a);a&&a.contextEntered&&a.contextEntered(r,i),n(i)};function X(e,t,r){function n(a,o){var i=e+a;if(o)o(X(i,t,r));else return new vt(i,t,r)}return n}function Yt(e,t,r){for(var n=0,a=0;a<e.length;a++)n+=e[a].path.length;t=t.substr(n);var o={path:t,handler:r};e.push(o)}function dt(e,t,r,n){for(var a=t.routes,o=Object.keys(a),i=0;i<o.length;i++){var s=o[i],c=e.slice();Yt(c,s,a[s]);var u=t.children[s];u?dt(c,u,r,n):r.call(n,c)}}var Wt=function(e,t){var r=new $;e(X("",r,this.delegate)),dt([],r,function(n){t?t(this,n):this.add(n)},this)};function pt(e){return e.split("/").map(Z).join("/")}var Ft=/%|\//g;function Z(e){return e.length<3||e.indexOf("%")===-1?e:decodeURIComponent(e).replace(Ft,encodeURIComponent)}var Kt=/%(?:2(?:4|6|B|C)|3(?:B|D|A)|40)/g;function gt(e){return encodeURIComponent(e).replace(Kt,decodeURIComponent)}var Xt=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\)/g,B=Array.isArray,Zt=Object.prototype.hasOwnProperty;function mt(e,t){if(typeof e!="object"||e===null)throw new Error("You must pass an object as the second argument to `generate`.");if(!Zt.call(e,t))throw new Error("You must provide param `"+t+"` to `generate`.");var r=e[t],n=typeof r=="string"?r:""+r;if(n.length===0)throw new Error("You must provide a param `"+t+"`.");return n}var M=[];M[0]=function(e,t){for(var r=t,n=e.value,a=0;a<n.length;a++){var o=n.charCodeAt(a);r=r.put(o,!1,!1)}return r};M[1]=function(e,t){return t.put(47,!0,!0)};M[2]=function(e,t){return t.put(-1,!1,!0)};M[4]=function(e,t){return t};var H=[];H[0]=function(e){return e.value.replace(Xt,"\\$1")};H[1]=function(){return"([^/]+)"};H[2]=function(){return"(.+)"};H[4]=function(){return""};var j=[];j[0]=function(e){return e.value};j[1]=function(e,t){var r=mt(t,e.value);return y.ENCODE_AND_DECODE_PATH_SEGMENTS?gt(r):r};j[2]=function(e,t){return mt(t,e.value)};j[4]=function(){return""};var ct=Object.freeze({}),U=Object.freeze([]);function te(e,t,r){t.length>0&&t.charCodeAt(0)===47&&(t=t.substr(1));for(var n=t.split("/"),a=void 0,o=void 0,i=0;i<n.length;i++){var s=n[i],c=0,u=0;s===""?u=4:s.charCodeAt(0)===58?u=1:s.charCodeAt(0)===42?u=2:u=0,c=2<<u,c&12&&(s=s.slice(1),a=a||[],a.push(s),o=o||[],o.push((c&4)!==0)),c&14&&r[u]++,e.push({type:u,value:Z(s)})}return{names:a||U,shouldDecodes:o||U}}function lt(e,t,r){return e.char===t&&e.negate===r}var C=function(t,r,n,a,o){this.states=t,this.id=r,this.char=n,this.negate=a,this.nextStates=o?r:null,this.pattern="",this._regex=void 0,this.handlers=void 0,this.types=void 0};C.prototy
(window.wp ||= {}).router = wp.router;
})();