1 |
- !function(){function e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function r(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){t(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function t(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}System.register([],(function(e,t){"use strict";return{execute:function(){const t="%[a-f0-9]{2}",n=new RegExp("("+t+")|([^%]+?)","gi"),o=new RegExp("("+t+")+","gi");function i(e,r){try{return[decodeURIComponent(e.join(""))]}catch(o){}if(1===e.length)return e;r=r||1;const t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],i(t),i(n))}function c(e){try{return decodeURIComponent(e)}catch(r){let t=e.match(n)||[];for(let o=1;o<t.length;o++)t=(e=i(t,o).join("")).match(n)||[];return e}}function a(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch(r){return function(e){const r={"%FE%FF":"��","%FF%FE":"��"};let t=o.exec(e);for(;t;){try{r[t[0]]=decodeURIComponent(t[0])}catch(i){const e=c(t[0]);e!==t[0]&&(r[t[0]]=e)}t=o.exec(e)}r["%C2"]="�";const n=Object.keys(r);for(const o of n)e=e.replace(new RegExp(o,"g"),r[o]);return e}(e)}}function s(e,r){if("string"!=typeof e||"string"!=typeof r)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===r)return[];const t=e.indexOf(r);return-1===t?[]:[e.slice(0,t),e.slice(t+r.length)]}function u(e,r){const t={};if(Array.isArray(r))for(const n of r){const r=Object.getOwnPropertyDescriptor(e,n);null!=r&&r.enumerable&&Object.defineProperty(t,n,r)}else for(const n of Reflect.ownKeys(e)){const o=Object.getOwnPropertyDescriptor(e,n);if(o.enumerable){r(n,e[n],e)&&Object.defineProperty(t,n,o)}}return t}const l=e=>null==e,f=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),p=Symbol("encodeFragmentIdentifier");function y(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,r){return r.encode?r.strict?f(e):encodeURIComponent(e):e}function m(e,r){return r.decode?a(e):e}function g(e){return Array.isArray(e)?e.sort():"object"==typeof e?g(Object.keys(e)).sort(((e,r)=>Number(e)-Number(r))).map((r=>e[r])):e}function b(e){const r=e.indexOf("#");return-1!==r&&(e=e.slice(0,r)),e}function j(e,r){return r.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!r.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function O(e){const r=(e=b(e)).indexOf("?");return-1===r?"":e.slice(r+1)}function v(e,t){y((t=r({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let r;switch(e.arrayFormat){case"index":return(e,t,n)=>{r=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),r?(void 0===n[e]&&(n[e]={}),n[e][r[1]]=t):n[e]=t};case"bracket":return(e,t,n)=>{r=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),r?void 0!==n[e]?n[e]=[...n[e],t]:n[e]=[t]:n[e]=t};case"colon-list-separator":return(e,t,n)=>{r=/(:list)$/.exec(e),e=e.replace(/:list$/,""),r?void 0!==n[e]?n[e]=[...n[e],t]:n[e]=[t]:n[e]=t};case"comma":case"separator":return(r,t,n)=>{const o="string"==typeof t&&t.includes(e.arrayFormatSeparator),i="string"==typeof t&&!o&&m(t,e).includes(e.arrayFormatSeparator);t=i?m(t,e):t;const c=o||i?t.split(e.arrayFormatSeparator).map((r=>m(r,e))):null===t?t:m(t,e);n[r]=c};case"bracket-separator":return(r,t,n)=>{const o=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!o)return void(n[r]=t?m(t,e):t);const i=null===t?[]:t.split(e.arrayFormatSeparator).map((r=>m(r,e)));void 0!==n[r]?n[r]=[...n[r],...i]:n[r]=i};default:return(e,r,t)=>{void 0!==t[e]?t[e]=[...[t[e]].flat(),r]:t[e]=r}}}(t),o=Object.create(null);if("string"!=typeof e)return o;if(!(e=e.trim().replace(/^[?#&]/,"")))return o;for(const r of e.split("&")){if(""===r)continue;const e=t.decode?r.replace(/\+/g," "):r;let[i,c]=s(e,"=");void 0===i&&(i=e),c=void 0===c?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?c:m(c,t),n(m(i,t),c,o)}for(const[r,i]of Object.entries(o))if("object"==typeof i&&null!==i)for(const[e,n]of Object.entries(i))i[e]=j(n,t);else o[r]=j(i,t);return!1===t.sort?o:(!0===t.sort?Object.keys(o).sort():Object.keys(o).sort(t.sort)).reduce(((e,r)=>{const t=o[r];return Boolean(t)&&"object"==typeof t&&!Array.isArray(t)?e[r]=g(t):e[r]=t,e}),Object.create(null))}function h(e,t){if(!e)return"";y((t=r({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=r=>t.skipNull&&l(e[r])||t.skipEmptyString&&""===e[r],o=function(e){switch(e.arrayFormat){case"index":return r=>(t,n)=>{const o=t.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,[d(r,e),"[",o,"]"].join("")]:[...t,[d(r,e),"[",d(o,e),"]=",d(n,e)].join("")]};case"bracket":return r=>(t,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,[d(r,e),"[]"].join("")]:[...t,[d(r,e),"[]=",d(n,e)].join("")];case"colon-list-separator":return r=>(t,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,[d(r,e),":list="].join("")]:[...t,[d(r,e),":list=",d(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const r="bracket-separator"===e.arrayFormat?"[]=":"=";return t=>(n,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?n:(o=null===o?"":o,0===n.length?[[d(t,e),r,d(o,e)].join("")]:[[n,d(o,e)].join(e.arrayFormatSeparator)])}default:return r=>(t,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,d(r,e)]:[...t,[d(r,e),"=",d(n,e)].join("")]}}(t),i={};for(const[r,a]of Object.entries(e))n(r)||(i[r]=a);const c=Object.keys(i);return!1!==t.sort&&c.sort(t.sort),c.map((r=>{const n=e[r];return void 0===n?"":null===n?d(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?d(r,t)+"[]":n.reduce(o(r),[]).join("&"):d(r,t)+"="+d(n,t)})).filter((e=>e.length>0)).join("&")}function w(e,t){var n,o,i;t=r({decode:!0},t);let[c,a]=s(e,"#");return void 0===c&&(c=e),r({url:null!==(n=null===(o=c)||void 0===o||null===(i=o.split("?"))||void 0===i?void 0:i[0])&&void 0!==n?n:"",query:v(O(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:m(a,t)}:{})}function k(e,t){t=r({encode:!0,strict:!0,[p]:!0},t);const n=b(e.url).split("?")[0]||"";let o=h(r(r({},v(O(e.url),{sort:!1})),e.query),t);o&&(o=`?${o}`);let i=function(e){let r="";const t=e.indexOf("#");return-1!==t&&(r=e.slice(t)),r}(e.url);if(e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,i=t[p]?r.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${i}`}function F(e,t,n){n=r({parseFragmentIdentifier:!0,[p]:!1},n);const{url:o,query:i,fragmentIdentifier:c}=w(e,n);return k({url:o,query:u(i,t),fragmentIdentifier:c},n)}const S=Object.freeze(Object.defineProperty({__proto__:null,exclude:function(e,r,t){return F(e,Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t),t)},extract:O,parse:v,parseUrl:w,pick:F,stringify:h,stringifyUrl:k},Symbol.toStringTag,{value:"Module"}));e("q",S)}}}))}();
|