summaryrefslogtreecommitdiffstats
path: root/wp-includes/js/dist/url.min.js
blob: 8078623f3fa18e643cc68cc52a29528d2afbb0d6 (plain)
1
2
/*! This file is auto-generated */
(()=>{var e={9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",:"A",:"A",:"A",:"A",:"A",Æ:"AE",:"A",:"A",Ȃ:"A",:"A",:"A",:"A",:"A",:"A",Ç:"C",:"C",È:"E",É:"E",Ê:"E",Ë:"E",:"E",:"E",:"E",:"E",:"E",Ȇ:"E",:"E",:"E",:"E",:"E",:"E",:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",:"I",Ȋ:"I",:"I",:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",:"O",:"O",:"O",Ȏ:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",:"U",:"U",:"U",:"U",:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",:"a",:"a",:"a",:"a",:"a",æ:"ae",:"a",:"a",ȃ:"a",:"a",:"a",:"a",:"a",:"a",ç:"c",:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",:"e",:"e",:"e",:"e",ȇ:"e",:"e",:"e",:"e",:"e",:"e",:"e",ì:"i",í:"i",î:"i",ï:"i",:"i",ȋ:"i",:"i",:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",:"o",:"o",:"o",ȏ:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",ù:"u",ú:"u",û:"u",ü:"u",:"u",:"u",:"u",:"u",:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",:"C",:"c",Ď:"D",ď:"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u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",:"U",:"u",:"U",:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",:"P",:"p",:"S",:"s",:"X",:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",:"A",:"a",:"E",:"e",:"I",:"i",Ǹ:"N",ǹ:"n",:"O",:"o",:"O",:"o",:"U",:"u",:"W",:"w",:"Y",:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",:"B",:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",:"F",:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",:"J",ǰ:"j",Ǩ:"K",ǩ:"k",:"M",:"m",:"P",:"p",:"Q",:"q",Ř̩:"R",ř̩:"r",:"S",:"s",:"V",:"v",:"W",:"w",:"X",:"x",:"Y",:"y",:"A",:"a",:"B",:"b",:"D",:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",:"H",:"h",:"I",:"i",Ɨ̧:"I",ɨ̧:"i",:"M",:"m",:"O",:"o",:"Q",:"q",:"U",:"u",:"X",:"x",:"Z",:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},r=Object.keys(t).join("|"),n=new RegExp(r,"g"),o=new RegExp(r,"");function i(e){return t[e]}var u=function(e){return e.replace(n,i)};e.exports=u,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=u}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";function e(e){try{return new URL(e),!0}catch{return!1}}r.r(n),r.d(n,{addQueryArgs:()=>y,buildQueryString:()=>f,cleanForSlug:()=>j,filterURLForDisplay:()=>w,getAuthority:()=>c,getFilename:()=>C,getFragment:()=>O,getPath:()=>s,getPathAndQueryString:()=>d,getProtocol:()=>i,getQueryArg:()=>U,getQueryArgs:()=>m,getQueryString:()=>p,hasQueryArg:()=>E,isEmail:()=>o,isURL:()=>e,isValidAuthority:()=>a,isValidFragment:()=>A,isValidPath:()=>l,isValidProtocol:()=>u,isValidQueryString:()=>g,normalizePath:()=>P,prependHTTP:()=>b,prependHTTPS:()=>$,removeQueryArgs:()=>I,safeDecodeURI:()=>v,safeDecodeURIComponent:()=>h});const t=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function o(e){return t.test(e)}function i(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function u(e){return!!e&&/^[a-z\-.\+]+[0-9]*:$/i.test(e)}function c(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function a(e){return!!e&&/^[^\s#?]+$/.test(e)}function s(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function l(e){return!!e&&/^[^\s#?]+$/.test(e)}function p(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}function f(e){let t="";const r=Object.entries(e);let n;for(;n=r.shift();){let[e,o]=n;if(Array.isArray(o)||o&&o.constructor===Object){const t=Object.entries(o).reverse();for(const[n,o]of t)r.unshift([`${e}[${n}]`,o])}else void 0!==o&&(null===o&&(o=""),t+="&"+[e,o].map(encodeURIComponent).join("="))}return t.substr(1)}function g(e){return!!e&&/^[^\s#?\/]+$/.test(e)}function d(e){const t=s(e),r=p(e);let n="/";return t&&(n+=t),r&&(n+=`?${r}`),n}function O(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function A(e){return!!e&&/^#[^\s#?\/]*$/.test(e)}function h(e){try{return decodeURIComponent(e)}catch(t){return e}}function m(e){return(p(e)||"").replace(/\+/g,"%20").split("&").reduce(((e,t)=>{const[r,n=""]=t.split("=").filter(Boolean).map(h);if(r){!function(e,t,r){const n=t.length,o=n-1;for(let i=0;i<n;i++){let n=t[i];!n&&Array.isArray(e)&&(n=e.length.toString()),n=["__proto__","constructor","prototype"].includes(n)?n.toUpperCase():n;const u=!isNaN(Number(t[i+1]));e[n]=i===o?r:e[n]||(u?[]:{}),Array.isArray(e[n])&&!u&&(e[n]={...e[n]}),e=e[n]}}(e,r.replace(/\]/g,"").split("["),n)}return e}),Object.create(null))}function y(e="",t){if(!t||!Object.keys(t).length)return e;let r=e;const n=e.indexOf("?");return-1!==n&&(t=Object.assign(m(e),t),r=r.substr(0,n)),r+"?"+f(t)}function U(e,t){return m(e)[t]}function E(e,t){return void 0!==U(e,t)}function I(e,...t){const r=e.indexOf("?");if(-1===r)return e;const n=m(e),o=e.substr(0,r);t.forEach((e=>delete n[e]));const i=f(n);return i?o+"?"+i:o}const x=/^(?:[a-z]+:|#|\?|\.|\/)/i;function b(e){return e?(e=e.trim(),x.test(e)||o(e)?e:"http://"+e):e}function v(e){try{return decodeURI(e)}catch(t){return e}}function w(e,t=null){let r=e.replace(/^(?:https?:)\/\/(?:www\.)?/,"");r.match(/^[^\/]+\/$/)&&(r=r.replace("/",""));if(!t||r.length<=t||!r.match(/\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/))return r;r=r.split("?")[0];const n=r.split("/"),o=n[n.length-1];if(o.length<=t)return"…"+r.slice(-t);const i=o.lastIndexOf("."),[u,c]=[o.slice(0,i),o.slice(i+1)],a=u.slice(-3)+"."+c;return o.slice(0,t-a.length-1)+"…"+a}var R=r(9681),S=r.n(R);function j(e){return e?S()(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}function C(e){let t;if(e){try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch(e){}return t||void 0}}function P(e){const t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((e=>e.split("="))).map((e=>e.map(decodeURIComponent))).sort(((e,t)=>e[0].localeCompare(t[0]))).map((e=>e.map(encodeURIComponent))).map((e=>e.join("="))).join("&"):n}function $(e){return e?e.startsWith("http://")?e:(e=b(e)).replace(/^http:/,"https:"):e}})(),(window.wp=window.wp||{}).url=n})();