2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
|
|
function r(r,t){for(var n=0;n<t.length;n++){var e=t[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,u(e.key),e)}}function t(t,n,e){return n&&r(t.prototype,n),e&&r(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function n(){return n=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var e in n)({}).hasOwnProperty.call(n,e)&&(r[e]=n[e])}return r},n.apply(null,arguments)}function e(r){return e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},e(r)}function o(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(o=function(){return!!r})()}function i(r,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,t){return r.__proto__=t,r},i(r,t)}function u(r){var t=function(r){if("object"!=typeof r||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(r);return"symbol"==typeof t?t:t+""}function f(r){var t="function"==typeof Map?new Map:void 0;return f=function(r){if(null===r||!function(r){try{return-1!==Function.toString.call(r).indexOf("[native code]")}catch(t){return"function"==typeof r}}(r))return r;if("function"!=typeof r)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return function(r,t,n){if(o())return Reflect.construct.apply(null,arguments);var e=[null];e.push.apply(e,t);var u=new(r.bind.apply(r,e));return n&&i(u,n.prototype),u}(r,arguments,e(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,r)},f(r)}var a=String.prototype.replace,c=/%20/g,l="RFC3986",s={default:l,formatters:{RFC1738:function(r){return a.call(r,c,"+")},RFC3986:function(r){return String(r)}},RFC1738:"RFC1738",RFC3986:l},v=Object.prototype.hasOwnProperty,p=Array.isArray,y=function(){for(var r=[],t=0;t<256;++t)r.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return r}(),d=function(r,t){for(var n=t&&t.plainObjects?Object.create(null):{},e=0;e<r.length;++e)void 0!==r[e]&&(n[e]=r[e]);return n},b={arrayToObject:d,assign:function(r,t){return Object.keys(t).reduce(function(r,n){return r[n]=t[n],r},r)},combine:function(r,t){return[].concat(r,t)},compact:function(r){for(var t=[{obj:{o:r},prop:"o"}],n=[],e=0;e<t.length;++e)for(var o=t[e],i=o.obj[o.prop],u=Object.keys(i),f=0;f<u.length;++f){var a=u[f],c=i[a];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:i,prop:a}),n.push(c))}return function(r){for(;r.length>1;){var t=r.pop(),n=t.obj[t.prop];if(p(n)){for(var e=[],o=0;o<n.length;++o)void 0!==n[o]&&e.push(n[o]);t.obj[t.prop]=e}}}(t),r},decode:function(r,t,n){var e=r.replace(/\+/g," ");if("iso-8859-1"===n)return e.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(e)}catch(r){return e}},encode:function(r,t,n,e,o){if(0===r.length)return r;var i=r;if("symbol"==typeof r?i=Symbol.prototype.toString.call(r):"string"!=typeof r&&(i=String(r)),"iso-8859-1"===n)return escape(i).replace(/%u[0-9a-f]{4}/gi,function(r){return"%26%23"+parseInt(r.slice(2),16)+"%3B"});for(var u="",f=0;f<i.length;++f){var a=i.charCodeAt(f);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===s.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=y[a]:a<2048?u+=y[192|a>>6]+y[128|63&a]:a<55296||a>=57344?u+=y[224|a>>12]+y[128|a>>6&63]+y[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=y[240|a>>18]+y[128|a>>12&63]+y[128|a>>6&63]+y[128|63&a])}return u},isBuffer:function(r){return!(!r||"object"!=typeof r||!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r)))},isRegExp:function(r){return"[object RegExp]"===Object.prototype.toString.call(r)},maybeMap:function(r,t){if(p(r)){for(var n=[],e=0;e<r.length;e+=1)n.push(t(r[e]));return n}return t(r)},merge:function r(t,n,e
|