@smooai/utils
Version:
A collection of shared utilities and tools used across SmooAI projects. This package provides common functionality to standardize and simplify development across all SmooAI repositories.
1 lines • 2.17 MB
Source Map (JSON)
{"version":3,"file":"generate-jira-git-branch.cjs","names":["http2","EventEmitter","url","EventEmitter","https","tls","net","EventEmitter","crypto","parse","url","querystring","crypto","REGEX","URL","v35","v35","assert","Stream","util","buffer","util","assert","crypto","crypto","crypto","crypto","stream","util","crypto","crypto","crypto","crypto","util","crypto","crypto","crypto","crypto","util","util","mod_util","exports","crypto","util","crypto","util","net","tls","Stream","util","util","util","http","https","fs","stream","Promise","fs","crypto","fs","crypto","crypto","crypto","tls","http","https","util","Buffer","stream","net","net","exports","http","https","exports","net","http","util","tls","zlib","stream","url","pc","JiraApi","OpenAI"],"sources":["../../node_modules/.pnpm/@babel+runtime@7.26.9/node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js","../../node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.js","../../node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js","../../node_modules/.pnpm/querystringify@2.2.0/node_modules/querystringify/index.js","../../node_modules/.pnpm/url-parse@1.5.10/node_modules/url-parse/index.js","../../node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.cjs","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/pubsuffix-psl.js","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/store.js","../../node_modules/.pnpm/universalify@0.2.0/node_modules/universalify/index.js","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/permuteDomain.js","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/pathMatch.js","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/utilHelper.js","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/memstore.js","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/validators.js","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/version.js","../../node_modules/.pnpm/@postman+tough-cookie@4.1.3-postman.1/node_modules/@postman/tough-cookie/lib/cookie.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/cookies.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/autohttp/requestName.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/http2/agent.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/autohttp/headerValidations.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/http2/request.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/http2/index.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/autohttp/agent.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/autohttp/request.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/autohttp/index.js","../../node_modules/.pnpm/aws-sign2@0.7.0/node_modules/aws-sign2/index.js","../../node_modules/.pnpm/aws4@1.13.2/node_modules/aws4/lru.js","../../node_modules/.pnpm/aws4@1.13.2/node_modules/aws4/aws4.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js","../../node_modules/.pnpm/assert-plus@1.0.0/node_modules/assert-plus/assert.js","../../node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/algs.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/errors.js","../../node_modules/.pnpm/asn1@0.2.6/node_modules/asn1/lib/ber/errors.js","../../node_modules/.pnpm/asn1@0.2.6/node_modules/asn1/lib/ber/types.js","../../node_modules/.pnpm/asn1@0.2.6/node_modules/asn1/lib/ber/reader.js","../../node_modules/.pnpm/asn1@0.2.6/node_modules/asn1/lib/ber/writer.js","../../node_modules/.pnpm/asn1@0.2.6/node_modules/asn1/lib/ber/index.js","../../node_modules/.pnpm/asn1@0.2.6/node_modules/asn1/lib/index.js","../../node_modules/.pnpm/jsbn@0.1.1/node_modules/jsbn/index.js","../../node_modules/.pnpm/ecc-jsbn@0.1.2/node_modules/ecc-jsbn/lib/ec.js","../../node_modules/.pnpm/tweetnacl@0.14.5/node_modules/tweetnacl/nacl-fast.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/utils.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/ssh-buffer.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/signature.js","../../node_modules/.pnpm/ecc-jsbn@0.1.2/node_modules/ecc-jsbn/lib/sec.js","../../node_modules/.pnpm/ecc-jsbn@0.1.2/node_modules/ecc-jsbn/index.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/dhe.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/ed-compat.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/pkcs8.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/pkcs1.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/rfc4253.js","../../node_modules/.pnpm/bcrypt-pbkdf@1.0.2/node_modules/bcrypt-pbkdf/index.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/ssh-private.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/pem.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/ssh.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/dnssec.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/putty.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/auto.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/private-key.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/identity.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/openssh-cert.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/x509.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/formats/x509-pem.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/certificate.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/fingerprint.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/key.js","../../node_modules/.pnpm/sshpk@1.18.0/node_modules/sshpk/lib/index.js","../../node_modules/.pnpm/http-signature@1.4.0/node_modules/http-signature/lib/utils.js","../../node_modules/.pnpm/http-signature@1.4.0/node_modules/http-signature/lib/parser.js","../../node_modules/.pnpm/extsprintf@1.3.0/node_modules/extsprintf/lib/extsprintf.js","../../node_modules/.pnpm/core-util-is@1.0.2/node_modules/core-util-is/lib/util.js","../../node_modules/.pnpm/verror@1.10.0/node_modules/verror/lib/verror.js","../../node_modules/.pnpm/json-schema@0.4.0/node_modules/json-schema/lib/validate.js","../../node_modules/.pnpm/jsprim@2.0.2/node_modules/jsprim/lib/jsprim.js","../../node_modules/.pnpm/http-signature@1.4.0/node_modules/http-signature/lib/signer.js","../../node_modules/.pnpm/http-signature@1.4.0/node_modules/http-signature/lib/verify.js","../../node_modules/.pnpm/http-signature@1.4.0/node_modules/http-signature/lib/index.js","../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json","../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js","../../node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js","../../node_modules/.pnpm/caseless@0.12.0/node_modules/caseless/index.js","../../node_modules/.pnpm/forever-agent@0.6.1/node_modules/forever-agent/index.js","../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js","../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/defer.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/async.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/abort.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/state.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serial.js","../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/index.js","../../node_modules/.pnpm/@postman+form-data@3.1.1/node_modules/@postman/form-data/lib/populate.js","../../node_modules/.pnpm/@postman+form-data@3.1.1/node_modules/@postman/form-data/lib/form_data.js","../../node_modules/.pnpm/isstream@0.1.2/node_modules/isstream/isstream.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/es5.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/util.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/schedule.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/queue.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/async.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/errors.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/thenables.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/promise_array.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/captured_trace.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/debuggability.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/context.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/catch_filter.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/promise_resolver.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/progress.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/method.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/bind.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/finally.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/direct_resolve.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/synchronous_inspection.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/join.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/map.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/cancel.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/using.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/generators.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/nodeify.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/call_get.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/props.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/race.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/reduce.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/settle.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/some.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/promisify.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/any.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/each.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/timers.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/filter.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/promise.js","../../node_modules/.pnpm/bluebird@2.11.0/node_modules/bluebird/js/main/bluebird.js","../../node_modules/.pnpm/stream-length@1.0.2/node_modules/stream-length/lib/stream-length.js","../../node_modules/.pnpm/stream-length@1.0.2/node_modules/stream-length/index.js","../../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js","../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js","../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/helpers.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/getProxyFromURI.js","../../node_modules/.pnpm/qs@6.5.3/node_modules/qs/lib/utils.js","../../node_modules/.pnpm/qs@6.5.3/node_modules/qs/lib/formats.js","../../node_modules/.pnpm/qs@6.5.3/node_modules/qs/lib/stringify.js","../../node_modules/.pnpm/qs@6.5.3/node_modules/qs/lib/parse.js","../../node_modules/.pnpm/qs@6.5.3/node_modules/qs/lib/index.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/querystring.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/har.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/auth.js","../../node_modules/.pnpm/oauth-sign@0.9.0/node_modules/oauth-sign/index.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/oauth.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/hawk.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/multipart.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/redirect.js","../../node_modules/.pnpm/@postman+tunnel-agent@0.6.4/node_modules/@postman/tunnel-agent/index.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/tunnel.js","../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/utils.js","../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/smartbuffer.js","../../node_modules/.pnpm/socks@2.8.7/node_modules/socks/build/common/constants.js","../../node_modules/.pnpm/socks@2.8.7/node_modules/socks/build/common/util.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/common.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/v4/constants.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/address-error.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/ipv4.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/v6/constants.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/v6/helpers.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/v6/regular-expressions.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/ipv6.js","../../node_modules/.pnpm/ip-address@10.0.1/node_modules/ip-address/dist/ip-address.js","../../node_modules/.pnpm/socks@2.8.7/node_modules/socks/build/common/helpers.js","../../node_modules/.pnpm/socks@2.8.7/node_modules/socks/build/common/receivebuffer.js","../../node_modules/.pnpm/socks@2.8.7/node_modules/socks/build/client/socksclient.js","../../node_modules/.pnpm/socks@2.8.7/node_modules/socks/build/index.js","../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js","../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js","../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js","../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js","../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js","../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js","../../node_modules/.pnpm/socks-proxy-agent@8.0.5/node_modules/socks-proxy-agent/dist/index.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/socks.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/inflate.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/lib/url-parse.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/request.js","../../node_modules/.pnpm/postman-request@2.88.1-postman.43/node_modules/postman-request/index.js","../../node_modules/.pnpm/jira-client@8.2.2/node_modules/jira-client/lib/jira.js","../../src/scripts/generate-jira-git-branch.ts"],"sourcesContent":["function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nmodule.exports = punycode;\n","'use strict';\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , undef;\n\n/**\n * Decode a URI encoded string.\n *\n * @param {String} input The URI encoded string.\n * @returns {String|Null} The decoded string.\n * @api private\n */\nfunction decode(input) {\n try {\n return decodeURIComponent(input.replace(/\\+/g, ' '));\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Attempts to encode a given input.\n *\n * @param {String} input The string that needs to be encoded.\n * @returns {String|Null} The encoded string.\n * @api private\n */\nfunction encode(input) {\n try {\n return encodeURIComponent(input);\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\nfunction querystring(query) {\n var parser = /([^=?#&]+)=?([^&]*)/g\n , result = {}\n , part;\n\n while (part = parser.exec(query)) {\n var key = decode(part[1])\n , value = decode(part[2]);\n\n //\n // Prevent overriding of existing properties. This ensures that build-in\n // methods like `toString` or __proto__ are not overriden by malicious\n // querystrings.\n //\n // In the case if failed decoding, we want to omit the key/value pairs\n // from the result.\n //\n if (key === null || value === null || key in result) continue;\n result[key] = value;\n }\n\n return result;\n}\n\n/**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\nfunction querystringify(obj, prefix) {\n prefix = prefix || '';\n\n var pairs = []\n , value\n , key;\n\n //\n // Optionally prefix with a '?' if needed\n //\n if ('string' !== typeof prefix) prefix = '?';\n\n for (key in obj) {\n if (has.call(obj, key)) {\n value = obj[key];\n\n //\n // Edge cases where we actually want to encode the value to an empty\n // string instead of the stringified value.\n //\n if (!value && (value === null || value === undef || isNaN(value))) {\n value = '';\n }\n\n key = encode(key);\n value = encode(value);\n\n //\n // If we failed to encode the strings, we should bail out as we don't\n // want to add invalid strings to the query.\n //\n if (key === null || value === null) continue;\n pairs.push(key +'='+ value);\n }\n }\n\n return pairs.length ? prefix + pairs.join('&') : '';\n}\n\n//\n// Expose the module.\n//\nexports.stringify = querystringify;\nexports.parse = querystring;\n","'use strict';\n\nvar required = require('requires-port')\n , qs = require('querystringify')\n , controlOrWhitespace = /^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/\n , CRHTLF = /[\\n\\r\\t]/g\n , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//\n , port = /:\\d+$/\n , protocolre = /^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i\n , windowsDriveLetter = /^[a-zA-Z]:/;\n\n/**\n * Remove control characters and whitespace from the beginning of a string.\n *\n * @param {Object|String} str String to trim.\n * @returns {String} A new string representing `str` stripped of control\n * characters and whitespace from its beginning.\n * @public\n */\nfunction trimLeft(str) {\n return (str ? str : '').toString().replace(controlOrWhitespace, '');\n}\n\n/**\n * These are the parse rules for the URL parser, it informs the parser\n * about:\n *\n * 0. The char it Needs to parse, if it's a string it should be done using\n * indexOf, RegExp using exec and NaN means set as current value.\n * 1. The property we should set when parsing this value.\n * 2. Indication if it's backwards or forward parsing, when set as number it's\n * the value of extra chars that should be split off.\n * 3. Inherit from location if non existing in the parser.\n * 4. `toLowerCase` the resulting value.\n */\nvar rules = [\n ['#', 'hash'], // Extract from the back.\n ['?', 'query'], // Extract from the back.\n function sanitize(address, url) { // Sanitize what is left of the address\n return isSpecial(url.protocol) ? address.replace(/\\\\/g, '/') : address;\n },\n ['/', 'pathname'], // Extract from the back.\n ['@', 'auth', 1], // Extract from the front.\n [NaN, 'host', undefined, 1, 1], // Set left over value.\n [/:(\\d*)$/, 'port', undefined, 1], // RegExp the back.\n [NaN, 'hostname', undefined, 1, 1] // Set left over.\n];\n\n/**\n * These properties should not be copied or inherited from. This is only needed\n * for all non blob URL's as a blob URL does not include a hash, only the\n * origin.\n *\n * @type {Object}\n * @private\n */\nvar ignore = { hash: 1, query: 1 };\n\n/**\n * The location object differs when your code is loaded through a normal page,\n * Worker or through a worker using a blob. And with the blobble begins the\n * trouble as the location object will contain the URL of the blob, not the\n * location of the page where our code is loaded in. The actual origin is\n * encoded in the `pathname` so we can thankfully generate a good \"default\"\n * location from it so we can generate proper relative URL's again.\n *\n * @param {Object|String} loc Optional default location object.\n * @returns {Object} lolcation object.\n * @public\n */\nfunction lolcation(loc) {\n var globalVar;\n\n if (typeof window !== 'undefined') globalVar = window;\n else if (typeof global !== 'undefined') globalVar = global;\n else if (typeof self !== 'undefined') globalVar = self;\n else globalVar = {};\n\n var location = globalVar.location || {};\n loc = loc || location;\n\n var finaldestination = {}\n , type = typeof loc\n , key;\n\n if ('blob:' === loc.protocol) {\n finaldestination = new Url(unescape(loc.pathname), {});\n } else if ('string' === type) {\n finaldestination = new Url(loc, {});\n for (key in ignore) delete finaldestination[key];\n } else if ('object' === type) {\n for (key in loc) {\n if (key in ignore) continue;\n finaldestination[key] = loc[key];\n }\n\n if (finaldestination.slashes === undefined) {\n finaldestination.slashes = slashes.test(loc.href);\n }\n }\n\n return finaldestination;\n}\n\n/**\n * Check whether a protocol scheme is special.\n *\n * @param {String} The protocol scheme of the URL\n * @return {Boolean} `true` if the protocol scheme is special, else `false`\n * @private\n */\nfunction isSpecial(scheme) {\n return (\n scheme === 'file:' ||\n scheme === 'ftp:' ||\n scheme === 'http:' ||\n scheme === 'https:' ||\n scheme === 'ws:' ||\n scheme === 'wss:'\n );\n}\n\n/**\n * @typedef ProtocolExtract\n * @type Object\n * @property {String} protocol Protocol matched in the URL, in lowercase.\n * @property {Boolean} slashes `true` if protocol is followed by \"//\", else `false`.\n * @property {String} rest Rest of the URL that is not part of the protocol.\n */\n\n/**\n * Extract protocol information from a URL with/without double slash (\"//\").\n *\n * @param {String} address URL we want to extract from.\n * @param {Object} location\n * @return {ProtocolExtract} Extracted information.\n * @private\n */\nfunction extractProtocol(address, location) {\n address = trimLeft(address);\n address = address.replace(CRHTLF, '');\n location = location || {};\n\n var match = protocolre.exec(address);\n var protocol = match[1] ? match[1].toLowerCase() : '';\n var forwardSlashes = !!match[2];\n var otherSlashes = !!match[3];\n var slashesCount = 0;\n var rest;\n\n if (forwardSlashes) {\n if (otherSlashes) {\n rest = match[2] + match[3] + match[4];\n slashesCount = match[2].length + match[3].length;\n } else {\n rest = match[2] + match[4];\n slashesCount = match[2].length;\n }\n } else {\n if (otherSlashes) {\n rest = match[3] + match[4];\n slashesCount = match[3].length;\n } else {\n rest = match[4]\n }\n }\n\n if (protocol === 'file:') {\n if (slashesCount >= 2) {\n rest = rest.slice(2);\n }\n } else if (isSpecial(protocol)) {\n rest = match[4];\n } else if (protocol) {\n if (forwardSlashes) {\n rest = rest.slice(2);\n }\n } else if (slashesCount >= 2 && isSpecial(location.protocol)) {\n rest = match[4];\n }\n\n return {\n protocol: protocol,\n slashes: forwardSlashes || isSpecial(protocol),\n slashesCount: slashesCount,\n rest: rest\n };\n}\n\n/**\n * Resolve a relative URL pathname against a base URL pathname.\n *\n * @param {String} relative Pathname of the relative URL.\n * @param {String} base Pathname of the base URL.\n * @return {String} Resolved pathname.\n * @private\n */\nfunction resolve(relative, base) {\n if (relative === '') return base;\n\n var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))\n , i = path.length\n , last = path[i - 1]\n , unshift = false\n , up = 0;\n\n while (i--) {\n if (path[i] === '.') {\n path.splice(i, 1);\n } else if (path[i] === '..') {\n path.splice(i, 1);\n up++;\n } else if (up) {\n if (i === 0) unshift = true;\n path.splice(i, 1);\n up--;\n }\n }\n\n if (unshift) path.unshift('');\n if (last === '.' || last === '..') path.push('');\n\n return path.join('/');\n}\n\n/**\n * The actual URL instance. Instead of returning an object we've opted-in to\n * create an actual constructor as it's much more memory efficient and\n * faster and it pleases my OCD.\n *\n * It is worth noting that we should not use `URL` as class name to prevent\n * clashes with the global URL instance that got introduced in browsers.\n *\n * @constructor\n * @param {String} address URL we want to parse.\n * @param {Object|String} [location] Location defaults for relative paths.\n * @param {Boolean|Function} [parser] Parser for the query string.\n * @private\n */\nfunction Url(address, location, parser) {\n address = trimLeft(address);\n address = address.replace(CRHTLF, '');\n\n if (!(this instanceof Url)) {\n return new Url(address, location, parser);\n }\n\n var relative, extracted, parse, instruction, index, key\n , instructions = rules.slice()\n , type = typeof location\n , url = this\n , i = 0;\n\n //\n // The following if statements allows this module two have compatibility with\n // 2 different API:\n //\n // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments\n // where the boolean indicates that the query string should also be parsed.\n //\n // 2. The `URL` interface of the browser which accepts a URL, object as\n // arguments. The supplied object will be used as default values / fall-back\n // for relative paths.\n //\n if ('object' !== type && 'string' !== type) {\n parser = location;\n location = null;\n }\n\n if (parser && 'function' !== typeof parser) parser = qs.parse;\n\n location = lolcation(location);\n\n //\n // Extract protocol information before running the instructions.\n //\n extracted = extractProtocol(address || '', location);\n relative = !extracted.protocol && !extracted.slashes;\n url.slashes = extracted.slashes || relative && location.slashes;\n url.protocol = extracted.protocol || location.protocol || '';\n address = extracted.rest;\n\n //\n // When the authority component is absent the URL starts with a path\n // component.\n //\n if (\n extracted.protocol === 'file:' && (\n extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) ||\n (!extracted.slashes &&\n (extracted.protocol ||\n extracted.slashesCount < 2 ||\n !isSpecial(url.protocol)))\n ) {\n instructions[3] = [/(.*)/, 'pathname'];\n }\n\n for (; i < instructions.length; i++) {\n instruction = instructions[i];\n\n if (typeof instruction === 'function') {\n address = instruction(address, url);\n continue;\n }\n\n parse = instruction[0];\n key = instruction[1];\n\n if (parse !== parse) {\n url[key] = address;\n } else if ('string' === typeof parse) {\n index = parse === '@'\n ? address.lastIndexOf(parse)\n : address.indexOf(parse);\n\n if (~index) {\n if ('number' === typeof instruction[2]) {\n url[key] = address.slice(0, index);\n address = address.slice(index + instruction[2]);\n } else {\n url[key] = address.slice(index);\n address = address.slice(0, index);\n }\n }\n } else if ((index = parse.exec(address))) {\n url[key] = index[1];\n address = address.slice(0, index.index);\n }\n\n url[key] = url[key] || (\n relative && instruction[3] ? location[key] || '' : ''\n );\n\n //\n // Hostname, host and protocol should be lowercased so they can be used to\n // create a proper `origin`.\n //\n if (instruction[4]) url[key] = url[key].toLowerCase();\n }\n\n //\n // Also parse the supplied query string in to an object. If we're supplied\n // with a custom parser as function use that instead of the default build-in\n // parser.\n //\n if (parser) url.query = parser(url.query);\n\n //\n // If the URL is relative, resolve the pathname against the base URL.\n //\