微信公众号前端模版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
11 KiB

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Qs=e()}}(function(){return function i(a,l,c){function s(t,e){if(!l[t]){if(!a[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(f)return f(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var n=l[t]={exports:{}};a[t][0].call(n.exports,function(e){return s(a[t][1][e]||e)},n,n.exports,i,a,l,c)}return l[t].exports}for(var f="function"==typeof require&&require,e=0;e<c.length;e++)s(c[e]);return s}({1:[function(e,t,r){"use strict";var o=String.prototype.replace,n=/%20/g,i=e("./utils"),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return o.call(e,n,"+")},RFC3986:function(e){return String(e)}}},a)},{"./utils":5}],2:[function(e,t,r){"use strict";var o=e("./stringify"),n=e("./parse"),i=e("./formats");t.exports={formats:i,parse:n,stringify:o}},{"./formats":1,"./parse":3,"./stringify":4}],3:[function(e,t,r){"use strict";function y(e,t){return e&&"string"==typeof e&&t.comma&&-1<e.indexOf(",")?e.split(","):e}function m(e,t){if(g(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(t(e[o]));return r}return t(e)}function s(e,t){var r,o={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=n.split(t.delimiter,i),l=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?c="utf-8":"utf8=%26%2310003%3B"===a[r]&&(c="iso-8859-1"),l=r,r=a.length);for(r=0;r<a.length;++r)if(r!==l){var s,f,u=a[r],p=u.indexOf("]="),d=-1===p?u.indexOf("="):p+1;(f=-1===d?(s=t.decoder(u,v.decoder,c,"key"),t.strictNullHandling?null:""):(s=t.decoder(u.slice(0,d),v.decoder,c,"key"),m(y(u.slice(d+1),t),function(e){return t.decoder(e,v.decoder,c,"value")})))&&t.interpretNumericEntities&&"iso-8859-1"===c&&(f=f.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),-1<u.indexOf("[]=")&&(f=g(f)?[f]:f),b.call(o,s)?o[s]=h.combine(o[s],f):o[s]=f}return o}function f(e,t,r,o){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=0<r.depth&&/(\[[^[\]]*])/.exec(n),l=a?n.slice(0,a.index):n,c=[];if(l){if(!r.plainObjects&&b.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var s=0;0<r.depth&&null!==(a=i.exec(n))&&s<r.depth;){if(s+=1,!r.plainObjects&&b.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+n.slice(a.index)+"]"),function(e,t,r,o){for(var n=o?t:y(t,r),i=e.length-1;0<=i;--i){var a,l=e[i];if("[]"===l&&r.parseArrays)a=[].concat(n);else{a=r.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,s=parseInt(c,10);r.parseArrays||""!==c?!isNaN(s)&&l!==c&&String(s)===c&&0<=s&&r.parseArrays&&s<=r.arrayLimit?(a=[])[s]=n:a[c]=n:a={0:n}}n=a}return n}(c,t,r,o)}}var h=e("./utils"),b=Object.prototype.hasOwnProperty,g=Array.isArray,v={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:h.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1};t.exports=function(e,t){var r=function(e){if(!e)return v;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?v.charset:e.charset;return{allowDots:void 0===e.allowDots?v.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:v.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:v.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:v.charsetSentinel,c