WordPress/wp-includes/js/dist/url.min.js

1 line
12 KiB
JavaScript
Raw Normal View History

this.wp=this.wp||{},this.wp.url=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=354)}({201:function(e,r,t){"use strict";var n=Object.prototype.hasOwnProperty,o=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),i=function(e,r){for(var t=r&&r.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(t[n]=e[n]);return t};e.exports={arrayToObject:i,assign:function(e,r){return Object.keys(r).reduce((function(e,t){return e[t]=r[t],e}),e)},combine:function(e,r){return[].concat(e,r)},compact:function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],n=0;n<r.length;++n)for(var o=r[n],i=o.obj[o.prop],a=Object.keys(i),c=0;c<a.length;++c){var u=a[c],s=i[u];"object"==typeof s&&null!==s&&-1===t.indexOf(s)&&(r.push({obj:i,prop:u}),t.push(s))}return function(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(Array.isArray(t)){for(var n=[],o=0;o<t.length;++o)void 0!==t[o]&&n.push(t[o]);r.obj[r.prop]=n}}}(r),e},decode:function(e,r,t){var n=e.replace(/\+/g," ");if("iso-8859-1"===t)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,r,t){if(0===e.length)return e;var n="string"==typeof e?e:String(e);if("iso-8859-1"===t)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var i="",a=0;a<n.length;++a){var c=n.charCodeAt(a);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122?i+=n.charAt(a):c<128?i+=o[c]:c<2048?i+=o[192|c>>6]+o[128|63&c]:c<55296||c>=57344?i+=o[224|c>>12]+o[128|c>>6&63]+o[128|63&c]:(a+=1,c=65536+((1023&c)<<10|1023&n.charCodeAt(a)),i+=o[240|c>>18]+o[128|c>>12&63]+o[128|c>>6&63]+o[128|63&c])}return i},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(r,t,o){if(!t)return r;if("object"!=typeof t){if(Array.isArray(r))r.push(t);else{if("object"!=typeof r)return[r,t];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,t))&&(r[t]=!0)}return r}if("object"!=typeof r)return[r].concat(t);var a=r;return Array.isArray(r)&&!Array.isArray(t)&&(a=i(r,o)),Array.isArray(r)&&Array.isArray(t)?(t.forEach((function(t,i){n.call(r,i)?r[i]&&"object"==typeof r[i]?r[i]=e(r[i],t,o):r.push(t):r[i]=t})),r):Object.keys(t).reduce((function(r,i){var a=t[i];return n.call(r,i)?r[i]=e(r[i],a,o):r[i]=a,r}),a)}}},202:function(e,r,t){"use strict";var n=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},354:function(e,r,t){"use strict";t.r(r),t.d(r,"isURL",(function(){return c})),t.d(r,"getProtocol",(function(){return u})),t.d(r,"isValidProtocol",(function(){return s})),t.d(r,"getAuthority",(function(){return l})),t.d(r,"isValidAuthority",(function(){return f})),t.d(r,"getPath",(function(){return p})),t.d(r,"isValidPath",(function(){return d})),t.d(r,"getQueryString",(function(){return y})),t.d(r,"isValidQueryString",(function(){return h})),t.d(r,"getFragment",(function(){return b})),t.d(r,"isValidFragment",(function()