swc/bundler/tests/.cache/untrusted/4232f25ed09362f48909de066d48e5676063c892.ts
강동윤 f8aa0509ce
fix(bundler): Fix stack overflow (#2080)
swc_bundler:
 - Prevent infinite recursions. (#1963)
2021-08-15 02:37:31 +00:00

6 lines
11 KiB
TypeScript

// Loaded from https://cdn.esm.sh/v44/qs@6.9.4/es2015/qs.js
/* esm.sh - esbuild bundle(qs@6.9.4) es2015 production */
var Z=Object.create;var A=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var ie=n=>A(n,"__esModule",{value:!0});var O=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var ae=(n,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of re(e))!ne.call(n,t)&&t!=="default"&&A(n,t,{get:()=>e[t],enumerable:!(r=ee(e,t))||r.enumerable});return n},R=n=>ae(ie(A(n!=null?Z(te(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var N=O((qe,V)=>{"use strict";var C=Object.prototype.hasOwnProperty,b=Array.isArray,v=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),fe=function(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(b(t)){for(var a=[],f=0;f<t.length;++f)typeof t[f]!="undefined"&&a.push(t[f]);r.obj[r.prop]=a}}},q=function(e,r){for(var t=r&&r.plainObjects?Object.create(null):{},a=0;a<e.length;++a)typeof e[a]!="undefined"&&(t[a]=e[a]);return t},le=function n(e,r,t){if(!r)return e;if(typeof r!="object"){if(b(e))e.push(r);else if(e&&typeof e=="object")(t&&(t.plainObjects||t.allowPrototypes)||!C.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var a=e;return b(e)&&!b(r)&&(a=q(e,t)),b(e)&&b(r)?(r.forEach(function(f,l){if(C.call(e,l)){var i=e[l];i&&typeof i=="object"&&f&&typeof f=="object"?e[l]=n(i,f,t):e.push(f)}else e[l]=f}),e):Object.keys(r).reduce(function(f,l){var i=r[l];return C.call(f,l)?f[l]=n(f[l],i,t):f[l]=i,f},a)},ue=function(e,r){return Object.keys(r).reduce(function(t,a){return t[a]=r[a],t},e)},oe=function(n,e,r){var t=n.replace(/\+/g," ");if(r==="iso-8859-1")return t.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(t)}catch(a){return t}},ce=function(e,r,t){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),t==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var f="",l=0;l<a.length;++l){var i=a.charCodeAt(l);if(i===45||i===46||i===95||i===126||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122){f+=a.charAt(l);continue}if(i<128){f=f+v[i];continue}if(i<2048){f=f+(v[192|i>>6]+v[128|i&63]);continue}if(i<55296||i>=57344){f=f+(v[224|i>>12]+v[128|i>>6&63]+v[128|i&63]);continue}l+=1,i=65536+((i&1023)<<10|a.charCodeAt(l)&1023),f+=v[240|i>>18]+v[128|i>>12&63]+v[128|i>>6&63]+v[128|i&63]}return f},se=function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],a=0;a<r.length;++a)for(var f=r[a],l=f.obj[f.prop],i=Object.keys(l),u=0;u<i.length;++u){var c=i[u],s=l[c];typeof s=="object"&&s!==null&&t.indexOf(s)===-1&&(r.push({obj:l,prop:c}),t.push(s))}return fe(r),e},de=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},ye=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},pe=function(e,r){return[].concat(e,r)},me=function(e,r){if(b(e)){for(var t=[],a=0;a<e.length;a+=1)t.push(r(e[a]));return t}return r(e)};V.exports={arrayToObject:q,assign:ue,combine:pe,compact:se,decode:oe,encode:ce,isBuffer:ye,isRegExp:de,maybeMap:me,merge:le}});var Q=O((Ve,k)=>{"use strict";var he=String.prototype.replace,ve=/%20/g,be=N(),I={RFC1738:"RFC1738",RFC3986:"RFC3986"};k.exports=be.assign({default:I.RFC3986,formatters:{RFC1738:function(n){return he.call(n,ve,"+")},RFC3986:function(n){return String(n)}}},I)});var $=O((Ie,_)=>{"use strict";var T=N(),j=Q(),ge=Object.prototype.hasOwnProperty,M={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},g=Array.isArray,xe=Array.prototype.push,U=function(n,e){xe.apply(n,g(e)?e:[e])},Oe=Date.prototype.toISOString,K=j.default,y={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:T.encode,encodeValuesOnly:!1,format:K,formatter:j.formatters[K],indices:!1,serializeDate:function(e){return Oe.call(e)},skipNulls:!1,strictNullHandling:!1},je=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},we=function n(e,r,t,a,f,l,i,u,c,s,p,m,h){var o=e;if(typeof i=="function"?o=i(r,o):o instanceof Date?o=s(o):t==="comma"&&g(o)&&(o=T.maybeMap(o,function(D){return D instanceof Date?s(D):D}).join(",")),o===null){if(a)return l&&!m?l(r,y.encoder,h,"key"):r;o=""}if(je(o)||T.isBuffer(o)){if(l){var E=m?r:l(r,y.encoder,h,"key");return[p(E)+"="+p(l(o,y.encoder,h,"value"))]}return[p(r)+"="+p(String(o))]}var F=[];if(typeof o=="undefined")return F;var w;if(g(i))w=i;else{var z=Object.keys(o);w=u?z.sort(u):z}for(var P=0;P<w.length;++P){var S=w[P],B=o[S];if(!(f&&B===null)){var Y=g(o)?typeof t=="function"?t(r,S):r:r+(c?"."+S:"["+S+"]");U(F,n(B,Y,t,a,f,l,i,u,c,s,p,m,h))}}return F},Se=function(e){if(!e)return y;if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||y.charset;if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=j.default;if(typeof e.format!="undefined"){if(!ge.call(j.formatters,e.format))throw new TypeError("Unknown format option provided.");t=e.format}var a=j.formatters[t],f=y.filter;return(typeof e.filter=="function"||g(e.filter))&&(f=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:y.addQueryPrefix,allowDots:typeof e.allowDots=="undefined"?y.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:y.charsetSentinel,delimiter:typeof e.delimiter=="undefined"?y.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:y.encode,encoder:typeof e.encoder=="function"?e.encoder:y.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:y.encodeValuesOnly,filter:f,formatter:a,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:y.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:y.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:y.strictNullHandling}};_.exports=function(n,e){var r=n,t=Se(e),a,f;typeof t.filter=="function"?(f=t.filter,r=f("",r)):g(t.filter)&&(f=t.filter,a=f);var l=[];if(typeof r!="object"||r===null)return"";var i;e&&e.arrayFormat in M?i=e.arrayFormat:e&&"indices"in e?i=e.indices?"indices":"repeat":i="indices";var u=M[i];a||(a=Object.keys(r)),t.sort&&a.sort(t.sort);for(var c=0;c<a.length;++c){var s=a[c];t.skipNulls&&r[s]===null||U(l,we(r[s],s,u,t.strictNullHandling,t.skipNulls,t.encode?t.encoder:null,t.filter,t.sort,t.allowDots,t.serializeDate,t.formatter,t.encodeValuesOnly,t.charset))}var p=l.join(t.delimiter),m=t.addQueryPrefix===!0?"?":"";return t.charsetSentinel&&(t.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),p.length>0?m+p:""}});var J=O((ke,W)=>{"use strict";var x=N(),L=Object.prototype.hasOwnProperty,Ne=Array.isArray,d={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:x.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Ee=function(n){return n.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},G=function(n,e){return n&&typeof n=="string"&&e.comma&&n.indexOf(",")>-1?n.split(","):n},Fe="utf8=%26%2310003%3B",Pe="utf8=%E2%9C%93",De=function(e,r){var t={},a=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=r.parameterLimit===1/0?void 0:r.parameterLimit,l=a.split(r.delimiter,f),i=-1,u,c=r.charset;if(r.charsetSentinel)for(u=0;u<l.length;++u)l[u].indexOf("utf8=")===0&&(l[u]===Pe?c="utf-8":l[u]===Fe&&(c="iso-8859-1"),i=u,u=l.length);for(u=0;u<l.length;++u)if(u!==i){var s=l[u],p=s.indexOf("]="),m=p===-1?s.indexOf("="):p+1,h,o;m===-1?(h=r.decoder(s,d.decoder,c,"key"),o=r.strictNullHandling?null:""):(h=r.decoder(s.slice(0,m),d.decoder,c,"key"),o=x.maybeMap(G(s.slice(m+1),r),function(E){return r.decoder(E,d.decoder,c,"value")})),o&&r.interpretNumericEntities&&c==="iso-8859-1"&&(o=Ee(o)),s.indexOf("[]=")>-1&&(o=Ne(o)?[o]:o),L.call(t,h)?t[h]=x.combine(t[h],o):t[h]=o}return t},Ae=function(n,e,r,t){for(var a=t?e:G(e,r),f=n.length-1;f>=0;--f){var l,i=n[f];if(i==="[]"&&r.parseArrays)l=[].concat(a);else{l=r.plainObjects?Object.create(null):{};var u=i.charAt(0)==="["&&i.charAt(i.length-1)==="]"?i.slice(1,-1):i,c=parseInt(u,10);!r.parseArrays&&u===""?l={0:a}:!isNaN(c)&&i!==u&&String(c)===u&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(l=[],l[c]=a):l[u]=a}a=l}return a},Ce=function(e,r,t,a){if(!!e){var f=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,u=t.depth>0&&l.exec(f),c=u?f.slice(0,u.index):f,s=[];if(c){if(!t.plainObjects&&L.call(Object.prototype,c)&&!t.allowPrototypes)return;s.push(c)}for(var p=0;t.depth>0&&(u=i.exec(f))!==null&&p<t.depth;){if(p+=1,!t.plainObjects&&L.call(Object.prototype,u[1].slice(1,-1))&&!t.allowPrototypes)return;s.push(u[1])}return u&&s.push("["+f.slice(u.index)+"]"),Ae(s,r,t,a)}},Qe=function(e){if(!e)return d;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset=="undefined"?d.charset:e.charset;return{allowDots:typeof e.allowDots=="undefined"?d.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:d.allowPrototypes,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:d.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:d.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:d.comma,decoder:typeof e.decoder=="function"?e.decoder:d.decoder,delimiter:typeof e.delimiter=="string"||x.isRegExp(e.delimiter)?e.delimiter:d.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:d.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:d.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:d.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:d.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:d.strictNullHandling}};W.exports=function(n,e){var r=Qe(e);if(n===""||n===null||typeof n=="undefined")return r.plainObjects?Object.create(null):{};for(var t=typeof n=="string"?De(n,r):n,a=r.plainObjects?Object.create(null):{},f=Object.keys(t),l=0;l<f.length;++l){var i=f[l],u=Ce(i,t[i],r,typeof n=="string");a=x.merge(a,u,r)}return x.compact(a)}});var H=O((Me,X)=>{"use strict";var Te=$(),Le=J(),He=Q();X.exports={formats:He,parse:Le,stringify:Te}});var ze=R(H()),Be=R(H()),{formats:Ue,parse:Ke,stringify:_e}=ze;var export_default=Be.default;export{export_default as default,Ue as formats,Ke as parse,_e as stringify};