{"version":3,"sources":["jsdelivr-header.js","/npm/contentful-space-types@1.0.1/src/renderers/contentful/renderContentfulImports.ts","/npm/contentful-space-types@1.0.1/src/renderers/typescript/renderInterface.ts","/npm/contentful-space-types@1.0.1/src/renderers/typescript/renderInterfaceProperty.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/renderField.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/renderContentTypeId.ts","/npm/contentful-space-types@1.0.1/src/renderers/typescript/renderUnion.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/fields/renderSymbol.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/fields/renderLink.ts","/npm/contentful-space-types@1.0.1/src/renderers/typescript/renderArrayOf.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/fields/renderArray.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/fields/renderBoolean.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/fields/renderLocation.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/fields/renderNumber.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/fields/renderObject.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/fields/renderRichText.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/renderContentType.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/renderAllLocales.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful/renderDefaultLocale.ts","/npm/contentful-space-types@1.0.1/src/renderers/render.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful-fields-only/fields/renderLink.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful-fields-only/fields/renderArray.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful-fields-only/fields/renderRichText.ts","/npm/contentful-space-types@1.0.1/src/renderers/contentful-fields-only/renderContentType.ts","/npm/contentful-space-types@1.0.1/src/renderers/renderFieldsOnly.ts","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/bind.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/utils.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/buildURL.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/InterceptorManager.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/transformData.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/cancel/isCancel.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/normalizeHeaderName.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/enhanceError.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/createError.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/settle.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/isAbsoluteURL.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/combineURLs.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/buildFullPath.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/parseHeaders.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/isURLSameOrigin.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/cookies.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/adapters/xhr.js","/npm/contentful-space-types@1.0.1/node_modules/ms/index.js","/npm/contentful-space-types@1.0.1/node_modules/follow-redirects/node_modules/debug/src/debug.js","/npm/contentful-space-types@1.0.1/node_modules/follow-redirects/node_modules/debug/src/browser.js","/npm/contentful-space-types@1.0.1/node_modules/has-flag/index.js","/npm/contentful-space-types@1.0.1/node_modules/supports-color/index.js","/npm/contentful-space-types@1.0.1/node_modules/follow-redirects/node_modules/debug/src/node.js","/npm/contentful-space-types@1.0.1/node_modules/follow-redirects/node_modules/debug/src/index.js","/npm/contentful-space-types@1.0.1/node_modules/follow-redirects/index.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/adapters/http.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/defaults.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/dispatchRequest.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/mergeConfig.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/core/Axios.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/cancel/Cancel.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/cancel/CancelToken.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/helpers/spread.js","/npm/contentful-space-types@1.0.1/node_modules/axios/lib/axios.js","/npm/contentful-space-types@1.0.1/node_modules/axios/index.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_listCacheClear.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/eq.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_assocIndexOf.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_listCacheDelete.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_listCacheGet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_listCacheHas.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_listCacheSet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_ListCache.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_stackClear.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_stackDelete.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_stackGet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_stackHas.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_freeGlobal.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_root.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_Symbol.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getRawTag.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_objectToString.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseGetTag.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isObject.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isFunction.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_coreJsData.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_isMasked.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_toSource.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseIsNative.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getValue.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getNative.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_Map.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_nativeCreate.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_hashClear.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_hashDelete.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_hashGet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_hashHas.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_hashSet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_Hash.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_mapCacheClear.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_isKeyable.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getMapData.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_mapCacheDelete.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_mapCacheGet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_mapCacheHas.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_mapCacheSet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_MapCache.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_stackSet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_Stack.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_arrayEach.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_defineProperty.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseAssignValue.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_assignValue.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_copyObject.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseTimes.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isObjectLike.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseIsArguments.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isArguments.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isArray.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/stubFalse.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isBuffer.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_isIndex.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isLength.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseIsTypedArray.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseUnary.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_nodeUtil.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isTypedArray.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_arrayLikeKeys.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_isPrototype.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_overArg.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_nativeKeys.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseKeys.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isArrayLike.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/keys.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseAssign.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_nativeKeysIn.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseKeysIn.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/keysIn.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseAssignIn.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_cloneBuffer.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_copyArray.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_arrayFilter.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/stubArray.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getSymbols.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_copySymbols.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_arrayPush.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getPrototype.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getSymbolsIn.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_copySymbolsIn.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseGetAllKeys.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getAllKeys.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getAllKeysIn.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_DataView.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_Promise.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_Set.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_WeakMap.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_getTag.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_initCloneArray.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_Uint8Array.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_cloneArrayBuffer.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_cloneDataView.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_cloneRegExp.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_cloneSymbol.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_cloneTypedArray.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_initCloneByTag.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseCreate.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_initCloneObject.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseIsMap.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isMap.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseIsSet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isSet.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/_baseClone.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/cloneDeep.js","/npm/contentful-space-types@1.0.1/node_modules/qs/lib/utils.js","/npm/contentful-space-types@1.0.1/node_modules/qs/lib/formats.js","/npm/contentful-space-types@1.0.1/node_modules/qs/lib/stringify.js","/npm/contentful-space-types@1.0.1/node_modules/qs/lib/parse.js","/npm/contentful-space-types@1.0.1/node_modules/qs/lib/index.js","/npm/contentful-space-types@1.0.1/node_modules/lodash/isPlainObject.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-sdk-core/dist/index.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/entities/space.js","/npm/contentful-space-types@1.0.1/node_modules/json-stringify-safe/stringify.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/mixins/stringify-safe.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-resolve-response/dist/cjs/index.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/entities/entry.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/entities/asset.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/entities/content-type.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/entities/locale.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/entities/index.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/paged-sync.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/create-contentful-api.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/create-global-options.js","/npm/contentful-space-types@1.0.1/node_modules/contentful/dist/es-modules/contentful.js","/npm/contentful-space-types@1.0.1/src/clients/contentfulClient.ts","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/error-handler.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/enhance-with-methods.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/create-space-api.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/space.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/create-environment-api.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/environment.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/instance-actions.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/snapshot.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/entry.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/asset.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/editor-interface.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/content-type.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/locale.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/webhook.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/space-membership.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/organization-membership.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/role.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/api-key.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/preview-api-key.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/upload.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/create-organization-api.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/organization.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/ui-extension.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/user.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/personal-access-token.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/usage.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/environment-alias.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/entities/index.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/create-contentful-api.js","/npm/contentful-space-types@1.0.1/node_modules/contentful-management/dist/es-modules/contentful-management.js","/npm/contentful-space-types@1.0.1/src/clients/contentfulManagementClient.ts","/npm/contentful-space-types@1.0.1/src/contentful-space-types.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;4nECNwB,0BACtB,MAAO,mLAMT,C,SCPwB,gBAAgB,G,IACtC,EAAA,EAAA,KACA,EAAA,EAAA,UACA,EAAA,EAAA,OACA,EAAA,EAAA,YAOA,MAAO,UACH,EAAc,OAAO,EAAW,MAAQ,IAAE,0BACzB,EAAI,KAAI,EAAY,WAAW,EAAc,IAAE,aAC9D,EAAM,aAGd,C,SCjBwB,wBACtB,EACA,EACA,EACA,GAEA,MAAO,CACL,mBAAmB,GACnB,EACA,EAAW,GAAK,IAChB,KACA,EACA,EAAW,GAAK,eAChB,KACA,KAAK,GACT,CAEA,SAAS,mBAAmB,GAC1B,OAAI,EACK,OAAO,EAAW,QAElB,EAEX,C,SCpBwB,YAAY,EAAc,GAChD,OAAO,wBAAwB,EAAM,GAAI,EAAM,EAAM,SAAU,EAAM,KACvE,C,SCHwB,oBAAoB,GAC1C,MAAO,IAAM,kBAAW,iBAAU,GACpC,C,SCJwB,YAAY,EAAc,GAChD,MAAO,cACE,EAAI,MAAM,kBAAkB,GAAO,OAE9C,CAEA,SAAgB,kBAAkB,GAChC,OAAsB,IAAlB,EAAO,OACF,QAEA,EAAO,KAAK,MAEvB,C,SCRwB,aAAa,G,MAC7B,EAAgC,QAApB,EAAG,EAAM,mBAAW,IAAA,OAAA,EAAA,EAAE,MAAK,SAAA,GAAc,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iB,UADf,EAAc,EAAA,QACmB,gBAAgB,CAAE,MAAO,O,OAChD,OADV,EAAe,EAAA,OACL,GAAM,EAAY,c,cAA5B,EAAU,EAAA,OACV,EAAa,KAAK,QAAQ,QAAQ,MAAO,GAG3C,IAAI,MAAM,WACH,GAAM,iBAAiB,EAAa,QAD3C,M,cACF,EAAS,EAAA,O,aAEA,SAAM,OAAO,EAAa,MAAO,EAAQ,Q,OAAlD,EAAS,EAAA,O,wBAGX,uBAAe,EAAY,G,WAQ7B,GALA,WAAW,IAAI,MAAM,QAAQ,OAAM,SAAA,GACjC,QAAQ,MAAM,GACd,QAAQ,KAAK,EACf,IAEI,IAAI,MAAM,KAAM,CAClB,IAAM,kBAAoB,SAAS,IAAI,MAAM,SAAU,IAEvD,GAAK,MAAM,sBAAsB,kBAAoB,GAGnD,MAAM,IAAI,MAAM,iDAAiD,IAAI,MAAM,UAF3E,aAAY,WAAM,OAAA,WAAW,IAAI,MAAM,OAAO,GAAsB,IAApB,kB","file":"/npm/contentful-space-types@1.0.1/dist/contentful-space-types.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/contentful-space-types@1.0.1/dist/contentful-space-types.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export default function renderContentfulImports(): string {\n  return `\n    // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT MODIFY IT.\n\n    import { Asset, Entry } from 'contentful'\n    import { Document } from '@contentful/rich-text-types'\n  `\n}\n","export default function renderInterface({\n  name,\n  extension,\n  fields,\n  description,\n}: {\n  name: string\n  extension?: string\n  fields: string\n  description?: string\n}) {\n  return `\n    ${description ? `/** ${description} */` : \"\"}\n    export interface ${name} ${extension ? `extends ${extension}` : \"\"} {\n      ${fields}\n    }\n  `\n}\n","export default function renderInterfaceProperty(\n  name: string,\n  type: string,\n  required: boolean,\n  description?: string,\n): string {\n  return [\n    descriptionComment(description),\n    name,\n    required ? \"\" : \"?\",\n    \": \",\n    type,\n    required ? \"\" : \" | undefined\",\n    \";\",\n  ].join(\"\")\n}\n\nfunction descriptionComment(description: string | undefined) {\n  if (description) {\n    return `/** ${description} */\\n`\n  } else {\n    return \"\"\n  }\n}\n","import { Field } from \"contentful\"\nimport renderInterfaceProperty from \"../typescript/renderInterfaceProperty\"\n\nexport default function renderField(field: Field, type: string): string {\n  return renderInterfaceProperty(field.id, type, field.required, field.name)\n}\n","import { upperFirst, camelCase } from \"lodash\"\n\nexport default function renderContentTypeId(contentTypeId: string): string {\n  return \"I\" + upperFirst(camelCase(contentTypeId))\n}\n","export default function renderUnion(name: string, values: string[]): string {\n  return `\n    type ${name} = ${renderUnionValues(values)};\n  `\n}\n\nexport function renderUnionValues(values: string[]): string {\n  if (values.length === 0) {\n    return \"never\"\n  } else {\n    return values.join(\" | \")\n  }\n}\n","import { Field } from \"contentful\"\n\nimport { renderUnionValues } from \"../../typescript/renderUnion\"\n\nexport default function renderSymbol(field: Field) {\n  const inValidation = field.validations?.find(validation => !!validation.in)\n\n  if (inValidation) {\n    return renderUnionValues(inValidation.in!.map(value => `'${value}'`))\n  } else {\n    return \"string\"\n  }\n}\n","import { Field } from \"contentful\"\nimport renderContentTypeId from \"../renderContentTypeId\"\nimport { renderUnionValues } from \"../../typescript/renderUnion\"\n\nexport default function renderLink(field: Field): string {\n  if (field.linkType === \"Asset\") {\n    return \"Asset\"\n  }\n\n  if (field.linkType === \"Entry\") {\n    const contentTypeValidation = field.validations?.find(\n      validation => !!validation.linkContentType,\n    )\n\n    if (contentTypeValidation) {\n      return renderUnionValues(contentTypeValidation.linkContentType!.map(renderContentTypeId))\n    } else {\n      return \"Entry<{ [fieldId: string]: unknown }>\"\n    }\n  }\n\n  return \"unknown\"\n}\n","export default function renderArrayOf(source: string) {\n  return `(${source})[]`\n}\n","import { Field } from \"contentful\"\nimport renderSymbol from \"./renderSymbol\"\nimport renderLink from \"./renderLink\"\nimport renderArrayOf from \"../../typescript/renderArrayOf\"\n\nexport default function renderArray(field: Field): string {\n  if (!field.items) {\n    throw new Error(`Cannot render non-array field ${field.id} as an array`)\n  }\n\n  const fieldWithValidations: Field = {\n    ...field,\n    linkType: field.items.linkType,\n    validations: field.items.validations || [],\n  }\n\n  switch (field.items.type) {\n    case \"Symbol\": {\n      return renderArrayOf(renderSymbol(fieldWithValidations))\n    }\n\n    case \"Link\": {\n      return renderArrayOf(renderLink(fieldWithValidations))\n    }\n  }\n\n  return renderArrayOf(\"unknown\")\n}\n","import { Field } from \"contentful\"\n\nexport default function renderBoolean(field: Field) {\n  return \"boolean\"\n}\n","import { Field } from \"contentful\"\n\nexport default function renderLocation(field: Field): string {\n  return \"{ lat: number, lon: number }\"\n}\n","import { Field } from \"contentful\"\n\nexport default function renderNumber(field: Field): string {\n  return \"number\"\n}\n","import { Field } from \"contentful\"\n\nexport default function renderObject(field: Field): string {\n  return \"Record<string, any>\"\n}\n","import { Field } from \"contentful\"\n\nexport default function renderRichText(field: Field): string {\n  return \"Document\"\n}\n","import { ContentType, Field, FieldType, Sys } from \"contentful\"\n\nimport renderInterface from \"../typescript/renderInterface\"\nimport renderField from \"./renderField\"\nimport renderContentTypeId from \"./renderContentTypeId\"\n\nimport renderArray from \"./fields/renderArray\"\nimport renderBoolean from \"./fields/renderBoolean\"\nimport renderLink from \"./fields/renderLink\"\nimport renderLocation from \"./fields/renderLocation\"\nimport renderNumber from \"./fields/renderNumber\"\nimport renderObject from \"./fields/renderObject\"\nimport renderRichText from \"./fields/renderRichText\"\nimport renderSymbol from \"./fields/renderSymbol\"\n\nexport default function renderContentType(contentType: ContentType): string {\n  const name = renderContentTypeId(contentType.sys.id)\n  const fields = renderContentTypeFields(contentType.fields)\n  const sys = renderSys(contentType.sys)\n\n  return `\n    ${renderInterface({ name: `${name}Fields`, fields })}\n\n    ${descriptionComment(contentType.description)}\n    ${renderInterface({ name, extension: `Entry<${name}Fields>`, fields: sys })}\n  `\n}\n\nfunction descriptionComment(description: string | undefined) {\n  if (description) {\n    return `/** ${description} */`\n  }\n\n  return \"\"\n}\n\nfunction renderContentTypeFields(fields: Field[]): string {\n  return fields\n    .filter(field => !field.omitted)\n    .map<string>(field => {\n      const functionMap: Record<FieldType, (field: Field) => string> = {\n        Array: renderArray,\n        Boolean: renderBoolean,\n        Date: renderSymbol,\n        Integer: renderNumber,\n        Link: renderLink,\n        Location: renderLocation,\n        Number: renderNumber,\n        Object: renderObject,\n        RichText: renderRichText,\n        Symbol: renderSymbol,\n        Text: renderSymbol,\n      }\n\n      return renderField(field, functionMap[field.type](field))\n    })\n    .join(\"\\n\\n\")\n}\n\nfunction renderSys(sys: Sys) {\n  return `\n    sys: {\n      id: string;\n      type: string;\n      createdAt: string;\n      updatedAt: string;\n      locale: string;\n      contentType: {\n        sys: {\n          id: '${sys.id}';\n          linkType: 'ContentType';\n          type: 'Link';\n        }\n      }\n    }\n  `\n}\n","import renderUnion from \"../typescript/renderUnion\"\nimport { Locale } from \"contentful\"\n\nexport default function renderAllLocales(locales: Locale[]): string {\n  return renderUnion(\"LOCALE_CODE\", locales.map(locale => `'${locale.code}'`))\n}\n","import { Locale } from \"contentful\"\n\nexport default function renderDefaultLocale(locales: Locale[]): string {\n  const defaultLocale = locales.find(locale => locale.default)\n\n  if (!defaultLocale) {\n    throw new Error(\"Could not find a default locale in Contentful.\")\n  }\n\n  return `type CONTENTFUL_DEFAULT_LOCALE_CODE = '${defaultLocale.code}';`\n}\n","import { ContentType, Locale } from \"contentful\"\n\nimport { format, resolveConfig } from \"prettier\"\n\nimport renderContentfulImports from \"./contentful/renderContentfulImports\"\nimport renderContentType from \"./contentful/renderContentType\"\nimport renderUnion from \"./typescript/renderUnion\"\nimport renderAllLocales from \"./contentful/renderAllLocales\"\nimport renderDefaultLocale from \"./contentful/renderDefaultLocale\"\n\nexport default async function render(contentTypes: ContentType[], locales: Locale[]) {\n  const sortedContentTypes = contentTypes.sort((a, b) => a.sys.id.localeCompare(b.sys.id))\n  const sortedLocales = locales.sort((a, b) => a.code.localeCompare(b.code))\n\n  const source = [\n    renderContentfulImports(),\n    renderAllContentTypes(sortedContentTypes),\n    renderAllContentTypeIds(sortedContentTypes),\n    renderAllLocales(sortedLocales),\n    renderDefaultLocale(sortedLocales),\n  ].join(\"\\n\\n\")\n\n  const prettierConfig = await resolveConfig(process.cwd())\n  return format(source, { ...prettierConfig, parser: \"typescript\" })\n}\n\nfunction renderAllContentTypes(contentTypes: ContentType[]): string {\n  return contentTypes.map(contentType => renderContentType(contentType)).join(\"\\n\\n\")\n}\n\nfunction renderAllContentTypeIds(contentTypes: ContentType[]): string {\n  return renderUnion(\"CONTENT_TYPE\", contentTypes.map(contentType => `'${contentType.sys.id}'`))\n}\n","import { Field } from \"contentful\"\nimport renderContentTypeId from \"../../contentful/renderContentTypeId\"\nimport { renderUnionValues } from \"../../typescript/renderUnion\"\n\nexport default function renderLink(field: Field): string {\n  if (field.linkType === \"Asset\") {\n    return \"any\"\n  }\n\n  if (field.linkType === \"Entry\") {\n    const contentTypeValidation = field.validations?.find(\n      validation => !!validation.linkContentType,\n    )\n\n    if (contentTypeValidation) {\n      return renderUnionValues(contentTypeValidation.linkContentType!.map(renderContentTypeId))\n    } else {\n      return \"unknown\"\n    }\n  }\n\n  return \"unknown\"\n}\n","import { Field } from \"contentful\"\nimport renderSymbol from \"../../contentful/fields/renderSymbol\"\nimport renderLink from \"../../contentful-fields-only/fields/renderLink\"\nimport renderArrayOf from \"../../typescript/renderArrayOf\"\n\nexport default function renderArray(field: Field): string {\n  if (!field.items) {\n    throw new Error(`Cannot render non-array field ${field.id} as an array`)\n  }\n\n  const fieldWithValidations: Field = {\n    ...field,\n    linkType: field.items.linkType,\n    validations: field.items.validations || [],\n  }\n\n  switch (field.items.type) {\n    case \"Symbol\": {\n      return renderArrayOf(renderSymbol(fieldWithValidations))\n    }\n\n    case \"Link\": {\n      return renderArrayOf(renderLink(fieldWithValidations))\n    }\n  }\n\n  return renderArrayOf(\"unknown\")\n}\n","import { Field } from \"contentful\"\n\nexport default function renderRichText(field: Field): string {\n  return \"any\"\n}\n","import { ContentType, Field, FieldType } from \"contentful\"\n\nimport renderInterface from \"../typescript/renderInterface\"\nimport renderField from \"../contentful/renderField\"\nimport renderContentTypeId from \"../contentful/renderContentTypeId\"\n\nimport renderArray from \"../contentful-fields-only/fields/renderArray\"\nimport renderLink from \"../contentful-fields-only/fields/renderLink\"\nimport renderRichText from \"../contentful-fields-only/fields/renderRichText\"\n\nimport renderBoolean from \"../contentful/fields/renderBoolean\"\nimport renderLocation from \"../contentful/fields/renderLocation\"\nimport renderNumber from \"../contentful/fields/renderNumber\"\nimport renderObject from \"../contentful/fields/renderObject\"\nimport renderSymbol from \"../contentful/fields/renderSymbol\"\n\nexport default function renderContentType(contentType: ContentType): string {\n  const name = renderContentTypeId(contentType.sys.id)\n  const fields = renderContentTypeFields(contentType.fields)\n\n  return renderInterface({\n    name,\n    fields: `\n      fields: { ${fields} };\n      [otherKeys: string]: any;\n    `,\n  })\n}\n\nfunction renderContentTypeFields(fields: Field[]): string {\n  return fields\n    .filter(field => !field.omitted)\n    .map<string>(field => {\n      const functionMap: Record<FieldType, (field: Field) => string> = {\n        Array: renderArray,\n        Boolean: renderBoolean,\n        Date: renderSymbol,\n        Integer: renderNumber,\n        Link: renderLink,\n        Location: renderLocation,\n        Number: renderNumber,\n        Object: renderObject,\n        RichText: renderRichText,\n        Symbol: renderSymbol,\n        Text: renderSymbol,\n      }\n\n      return renderField(field, functionMap[field.type](field))\n    })\n    .join(\"\\n\\n\")\n}\n","import { ContentType } from \"contentful\"\n\nimport { format } from \"prettier\"\n\nimport renderContentType from \"./contentful-fields-only/renderContentType\"\n\nexport default async function renderFieldsOnly(contentTypes: ContentType[]) {\n  const sortedContentTypes = contentTypes.sort((a, b) => a.sys.id.localeCompare(b.sys.id))\n\n  const source = renderAllContentTypes(sortedContentTypes)\n\n  return format(source, { parser: \"typescript\" })\n}\n\nfunction renderAllContentTypes(contentTypes: ContentType[]): string {\n  return contentTypes.map(contentType => renderContentType(contentType)).join(\"\\n\\n\")\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n  return function wrap() {\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n    return fn.apply(thisArg, args);\n  };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n  return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n  return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n    && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n  return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n  return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n  var result;\n  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n    result = ArrayBuffer.isView(val);\n  } else {\n    result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n  }\n  return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n  return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n  return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n  return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n  return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n  return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n  return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n  return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n  return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n  return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n  return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n *  typeof window -> undefined\n *  typeof document -> undefined\n *\n * react-native:\n *  navigator.product -> 'ReactNative'\n * nativescript\n *  navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n  if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n                                           navigator.product === 'NativeScript' ||\n                                           navigator.product === 'NS')) {\n    return false;\n  }\n  return (\n    typeof window !== 'undefined' &&\n    typeof document !== 'undefined'\n  );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n  // Don't bother if no value provided\n  if (obj === null || typeof obj === 'undefined') {\n    return;\n  }\n\n  // Force an array if not already something iterable\n  if (typeof obj !== 'object') {\n    /*eslint no-param-reassign:0*/\n    obj = [obj];\n  }\n\n  if (isArray(obj)) {\n    // Iterate over array values\n    for (var i = 0, l = obj.length; i < l; i++) {\n      fn.call(null, obj[i], i, obj);\n    }\n  } else {\n    // Iterate over object keys\n    for (var key in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, key)) {\n        fn.call(null, obj[key], key, obj);\n      }\n    }\n  }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n  var result = {};\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = merge(result[key], val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n  var result = {};\n  function assignValue(val, key) {\n    if (typeof result[key] === 'object' && typeof val === 'object') {\n      result[key] = deepMerge(result[key], val);\n    } else if (typeof val === 'object') {\n      result[key] = deepMerge({}, val);\n    } else {\n      result[key] = val;\n    }\n  }\n\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    forEach(arguments[i], assignValue);\n  }\n  return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n  forEach(b, function assignValue(val, key) {\n    if (thisArg && typeof val === 'function') {\n      a[key] = bind(val, thisArg);\n    } else {\n      a[key] = val;\n    }\n  });\n  return a;\n}\n\nmodule.exports = {\n  isArray: isArray,\n  isArrayBuffer: isArrayBuffer,\n  isBuffer: isBuffer,\n  isFormData: isFormData,\n  isArrayBufferView: isArrayBufferView,\n  isString: isString,\n  isNumber: isNumber,\n  isObject: isObject,\n  isUndefined: isUndefined,\n  isDate: isDate,\n  isFile: isFile,\n  isBlob: isBlob,\n  isFunction: isFunction,\n  isStream: isStream,\n  isURLSearchParams: isURLSearchParams,\n  isStandardBrowserEnv: isStandardBrowserEnv,\n  forEach: forEach,\n  merge: merge,\n  deepMerge: deepMerge,\n  extend: extend,\n  trim: trim\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n  return encodeURIComponent(val).\n    replace(/%40/gi, '@').\n    replace(/%3A/gi, ':').\n    replace(/%24/g, '$').\n    replace(/%2C/gi, ',').\n    replace(/%20/g, '+').\n    replace(/%5B/gi, '[').\n    replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n  /*eslint no-param-reassign:0*/\n  if (!params) {\n    return url;\n  }\n\n  var serializedParams;\n  if (paramsSerializer) {\n    serializedParams = paramsSerializer(params);\n  } else if (utils.isURLSearchParams(params)) {\n    serializedParams = params.toString();\n  } else {\n    var parts = [];\n\n    utils.forEach(params, function serialize(val, key) {\n      if (val === null || typeof val === 'undefined') {\n        return;\n      }\n\n      if (utils.isArray(val)) {\n        key = key + '[]';\n      } else {\n        val = [val];\n      }\n\n      utils.forEach(val, function parseValue(v) {\n        if (utils.isDate(v)) {\n          v = v.toISOString();\n        } else if (utils.isObject(v)) {\n          v = JSON.stringify(v);\n        }\n        parts.push(encode(key) + '=' + encode(v));\n      });\n    });\n\n    serializedParams = parts.join('&');\n  }\n\n  if (serializedParams) {\n    var hashmarkIndex = url.indexOf('#');\n    if (hashmarkIndex !== -1) {\n      url = url.slice(0, hashmarkIndex);\n    }\n\n    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n  }\n\n  return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n  this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n  this.handlers.push({\n    fulfilled: fulfilled,\n    rejected: rejected\n  });\n  return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n  if (this.handlers[id]) {\n    this.handlers[id] = null;\n  }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n  utils.forEach(this.handlers, function forEachHandler(h) {\n    if (h !== null) {\n      fn(h);\n    }\n  });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n  /*eslint no-param-reassign:0*/\n  utils.forEach(fns, function transform(fn) {\n    data = fn(data, headers);\n  });\n\n  return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n  return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n  utils.forEach(headers, function processHeader(value, name) {\n    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n      headers[normalizedName] = value;\n      delete headers[name];\n    }\n  });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n  error.config = config;\n  if (code) {\n    error.code = code;\n  }\n\n  error.request = request;\n  error.response = response;\n  error.isAxiosError = true;\n\n  error.toJSON = function() {\n    return {\n      // Standard\n      message: this.message,\n      name: this.name,\n      // Microsoft\n      description: this.description,\n      number: this.number,\n      // Mozilla\n      fileName: this.fileName,\n      lineNumber: this.lineNumber,\n      columnNumber: this.columnNumber,\n      stack: this.stack,\n      // Axios\n      config: this.config,\n      code: this.code\n    };\n  };\n  return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n  var error = new Error(message);\n  return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n  var validateStatus = response.config.validateStatus;\n  if (!validateStatus || validateStatus(response.status)) {\n    resolve(response);\n  } else {\n    reject(createError(\n      'Request failed with status code ' + response.status,\n      response.config,\n      null,\n      response.request,\n      response\n    ));\n  }\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n  // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n  // by any combination of letters, digits, plus, period, or hyphen.\n  return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n  return relativeURL\n    ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n    : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n  if (baseURL && !isAbsoluteURL(requestedURL)) {\n    return combineURLs(baseURL, requestedURL);\n  }\n  return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n  'age', 'authorization', 'content-length', 'content-type', 'etag',\n  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n  'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n  'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n  var parsed = {};\n  var key;\n  var val;\n  var i;\n\n  if (!headers) { return parsed; }\n\n  utils.forEach(headers.split('\\n'), function parser(line) {\n    i = line.indexOf(':');\n    key = utils.trim(line.substr(0, i)).toLowerCase();\n    val = utils.trim(line.substr(i + 1));\n\n    if (key) {\n      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n        return;\n      }\n      if (key === 'set-cookie') {\n        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n      } else {\n        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n      }\n    }\n  });\n\n  return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs have full support of the APIs needed to test\n  // whether the request URL is of the same origin as current location.\n    (function standardBrowserEnv() {\n      var msie = /(msie|trident)/i.test(navigator.userAgent);\n      var urlParsingNode = document.createElement('a');\n      var originURL;\n\n      /**\n    * Parse a URL to discover it's components\n    *\n    * @param {String} url The URL to be parsed\n    * @returns {Object}\n    */\n      function resolveURL(url) {\n        var href = url;\n\n        if (msie) {\n        // IE needs attribute set twice to normalize properties\n          urlParsingNode.setAttribute('href', href);\n          href = urlParsingNode.href;\n        }\n\n        urlParsingNode.setAttribute('href', href);\n\n        // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n        return {\n          href: urlParsingNode.href,\n          protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n          host: urlParsingNode.host,\n          search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n          hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n          hostname: urlParsingNode.hostname,\n          port: urlParsingNode.port,\n          pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n            urlParsingNode.pathname :\n            '/' + urlParsingNode.pathname\n        };\n      }\n\n      originURL = resolveURL(window.location.href);\n\n      /**\n    * Determine if a URL shares the same origin as the current location\n    *\n    * @param {String} requestURL The URL to test\n    * @returns {boolean} True if URL shares the same origin, otherwise false\n    */\n      return function isURLSameOrigin(requestURL) {\n        var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n        return (parsed.protocol === originURL.protocol &&\n            parsed.host === originURL.host);\n      };\n    })() :\n\n  // Non standard browser envs (web workers, react-native) lack needed support.\n    (function nonStandardBrowserEnv() {\n      return function isURLSameOrigin() {\n        return true;\n      };\n    })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n  utils.isStandardBrowserEnv() ?\n\n  // Standard browser envs support document.cookie\n    (function standardBrowserEnv() {\n      return {\n        write: function write(name, value, expires, path, domain, secure) {\n          var cookie = [];\n          cookie.push(name + '=' + encodeURIComponent(value));\n\n          if (utils.isNumber(expires)) {\n            cookie.push('expires=' + new Date(expires).toGMTString());\n          }\n\n          if (utils.isString(path)) {\n            cookie.push('path=' + path);\n          }\n\n          if (utils.isString(domain)) {\n            cookie.push('domain=' + domain);\n          }\n\n          if (secure === true) {\n            cookie.push('secure');\n          }\n\n          document.cookie = cookie.join('; ');\n        },\n\n        read: function read(name) {\n          var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n          return (match ? decodeURIComponent(match[3]) : null);\n        },\n\n        remove: function remove(name) {\n          this.write(name, '', Date.now() - 86400000);\n        }\n      };\n    })() :\n\n  // Non standard browser env (web workers, react-native) lack needed support.\n    (function nonStandardBrowserEnv() {\n      return {\n        write: function write() {},\n        read: function read() { return null; },\n        remove: function remove() {}\n      };\n    })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n  return new Promise(function dispatchXhrRequest(resolve, reject) {\n    var requestData = config.data;\n    var requestHeaders = config.headers;\n\n    if (utils.isFormData(requestData)) {\n      delete requestHeaders['Content-Type']; // Let the browser set it\n    }\n\n    var request = new XMLHttpRequest();\n\n    // HTTP basic authentication\n    if (config.auth) {\n      var username = config.auth.username || '';\n      var password = config.auth.password || '';\n      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n    }\n\n    var fullPath = buildFullPath(config.baseURL, config.url);\n    request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n    // Set the request timeout in MS\n    request.timeout = config.timeout;\n\n    // Listen for ready state\n    request.onreadystatechange = function handleLoad() {\n      if (!request || request.readyState !== 4) {\n        return;\n      }\n\n      // The request errored out and we didn't get a response, this will be\n      // handled by onerror instead\n      // With one exception: request that using file: protocol, most browsers\n      // will return status as 0 even though it's a successful request\n      if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n        return;\n      }\n\n      // Prepare the response\n      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n      var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n      var response = {\n        data: responseData,\n        status: request.status,\n        statusText: request.statusText,\n        headers: responseHeaders,\n        config: config,\n        request: request\n      };\n\n      settle(resolve, reject, response);\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle browser request cancellation (as opposed to a manual cancellation)\n    request.onabort = function handleAbort() {\n      if (!request) {\n        return;\n      }\n\n      reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle low level network errors\n    request.onerror = function handleError() {\n      // Real errors are hidden from us by the browser\n      // onerror should only fire if it's a network error\n      reject(createError('Network Error', config, null, request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Handle timeout\n    request.ontimeout = function handleTimeout() {\n      var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n      if (config.timeoutErrorMessage) {\n        timeoutErrorMessage = config.timeoutErrorMessage;\n      }\n      reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n        request));\n\n      // Clean up request\n      request = null;\n    };\n\n    // Add xsrf header\n    // This is only done if running in a standard browser environment.\n    // Specifically not if we're in a web worker, or react-native.\n    if (utils.isStandardBrowserEnv()) {\n      var cookies = require('./../helpers/cookies');\n\n      // Add xsrf header\n      var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n        cookies.read(config.xsrfCookieName) :\n        undefined;\n\n      if (xsrfValue) {\n        requestHeaders[config.xsrfHeaderName] = xsrfValue;\n      }\n    }\n\n    // Add headers to the request\n    if ('setRequestHeader' in request) {\n      utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n          // Remove Content-Type if data is undefined\n          delete requestHeaders[key];\n        } else {\n          // Otherwise add header to the request\n          request.setRequestHeader(key, val);\n        }\n      });\n    }\n\n    // Add withCredentials to request if needed\n    if (!utils.isUndefined(config.withCredentials)) {\n      request.withCredentials = !!config.withCredentials;\n    }\n\n    // Add responseType to request if needed\n    if (config.responseType) {\n      try {\n        request.responseType = config.responseType;\n      } catch (e) {\n        // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n        // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n        if (config.responseType !== 'json') {\n          throw e;\n        }\n      }\n    }\n\n    // Handle progress if needed\n    if (typeof config.onDownloadProgress === 'function') {\n      request.addEventListener('progress', config.onDownloadProgress);\n    }\n\n    // Not all browsers support upload events\n    if (typeof config.onUploadProgress === 'function' && request.upload) {\n      request.upload.addEventListener('progress', config.onUploadProgress);\n    }\n\n    if (config.cancelToken) {\n      // Handle cancellation\n      config.cancelToken.promise.then(function onCanceled(cancel) {\n        if (!request) {\n          return;\n        }\n\n        request.abort();\n        reject(cancel);\n        // Clean up request\n        request = null;\n      });\n    }\n\n    if (requestData === undefined) {\n      requestData = null;\n    }\n\n    // Send the request\n    request.send(requestData);\n  });\n};\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isNaN(val) === false) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  if (ms >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (ms >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (ms >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (ms >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  return plural(ms, d, 'day') ||\n    plural(ms, h, 'hour') ||\n    plural(ms, m, 'minute') ||\n    plural(ms, s, 'second') ||\n    ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n  if (ms < n) {\n    return;\n  }\n  if (ms < n * 1.5) {\n    return Math.floor(ms / n) + ' ' + name;\n  }\n  return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * Active `debug` instances.\n */\nexports.instances = [];\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n  var hash = 0, i;\n\n  for (i in namespace) {\n    hash  = ((hash << 5) - hash) + namespace.charCodeAt(i);\n    hash |= 0; // Convert to 32bit integer\n  }\n\n  return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n  var prevTime;\n\n  function debug() {\n    // disabled?\n    if (!debug.enabled) return;\n\n    var self = debug;\n\n    // set `diff` timestamp\n    var curr = +new Date();\n    var ms = curr - (prevTime || curr);\n    self.diff = ms;\n    self.prev = prevTime;\n    self.curr = curr;\n    prevTime = curr;\n\n    // turn the `arguments` into a proper Array\n    var args = new Array(arguments.length);\n    for (var i = 0; i < args.length; i++) {\n      args[i] = arguments[i];\n    }\n\n    args[0] = exports.coerce(args[0]);\n\n    if ('string' !== typeof args[0]) {\n      // anything else let's inspect with %O\n      args.unshift('%O');\n    }\n\n    // apply any `formatters` transformations\n    var index = 0;\n    args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n      // if we encounter an escaped % then don't increase the array index\n      if (match === '%%') return match;\n      index++;\n      var formatter = exports.formatters[format];\n      if ('function' === typeof formatter) {\n        var val = args[index];\n        match = formatter.call(self, val);\n\n        // now we need to remove `args[index]` since it's inlined in the `format`\n        args.splice(index, 1);\n        index--;\n      }\n      return match;\n    });\n\n    // apply env-specific formatting (colors, etc.)\n    exports.formatArgs.call(self, args);\n\n    var logFn = debug.log || exports.log || console.log.bind(console);\n    logFn.apply(self, args);\n  }\n\n  debug.namespace = namespace;\n  debug.enabled = exports.enabled(namespace);\n  debug.useColors = exports.useColors();\n  debug.color = selectColor(namespace);\n  debug.destroy = destroy;\n\n  // env-specific initialization logic for debug instances\n  if ('function' === typeof exports.init) {\n    exports.init(debug);\n  }\n\n  exports.instances.push(debug);\n\n  return debug;\n}\n\nfunction destroy () {\n  var index = exports.instances.indexOf(this);\n  if (index !== -1) {\n    exports.instances.splice(index, 1);\n    return true;\n  } else {\n    return false;\n  }\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n  exports.save(namespaces);\n\n  exports.names = [];\n  exports.skips = [];\n\n  var i;\n  var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n  var len = split.length;\n\n  for (i = 0; i < len; i++) {\n    if (!split[i]) continue; // ignore empty strings\n    namespaces = split[i].replace(/\\*/g, '.*?');\n    if (namespaces[0] === '-') {\n      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n    } else {\n      exports.names.push(new RegExp('^' + namespaces + '$'));\n    }\n  }\n\n  for (i = 0; i < exports.instances.length; i++) {\n    var instance = exports.instances[i];\n    instance.enabled = exports.enabled(instance.namespace);\n  }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n  exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n  if (name[name.length - 1] === '*') {\n    return true;\n  }\n  var i, len;\n  for (i = 0, len = exports.skips.length; i < len; i++) {\n    if (exports.skips[i].test(name)) {\n      return false;\n    }\n  }\n  for (i = 0, len = exports.names.length; i < len; i++) {\n    if (exports.names[i].test(name)) {\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n  if (val instanceof Error) return val.stack || val.message;\n  return val;\n}\n","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n               && 'undefined' != typeof chrome.storage\n                  ? chrome.storage.local\n                  : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n  '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',\n  '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',\n  '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',\n  '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',\n  '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',\n  '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',\n  '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',\n  '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',\n  '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',\n  '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',\n  '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n  // NB: In an Electron preload script, document will be defined but not fully\n  // initialized. Since we know we're in Chrome, we'll just detect this case\n  // explicitly\n  if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n    return true;\n  }\n\n  // Internet Explorer and Edge do not support colors.\n  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n    return false;\n  }\n\n  // is webkit? http://stackoverflow.com/a/16459606/376773\n  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n    // is firebug? http://stackoverflow.com/a/398120/376773\n    (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n    // is firefox >= v31?\n    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n    // double check webkit in userAgent just in case we are in a worker\n    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n  try {\n    return JSON.stringify(v);\n  } catch (err) {\n    return '[UnexpectedJSONParseError]: ' + err.message;\n  }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n  var useColors = this.useColors;\n\n  args[0] = (useColors ? '%c' : '')\n    + this.namespace\n    + (useColors ? ' %c' : ' ')\n    + args[0]\n    + (useColors ? '%c ' : ' ')\n    + '+' + exports.humanize(this.diff);\n\n  if (!useColors) return;\n\n  var c = 'color: ' + this.color;\n  args.splice(1, 0, c, 'color: inherit')\n\n  // the final \"%c\" is somewhat tricky, because there could be other\n  // arguments passed either before or after the %c, so we need to\n  // figure out the correct index to insert the CSS into\n  var index = 0;\n  var lastC = 0;\n  args[0].replace(/%[a-zA-Z%]/g, function(match) {\n    if ('%%' === match) return;\n    index++;\n    if ('%c' === match) {\n      // we only are interested in the *last* %c\n      // (the user may have provided their own)\n      lastC = index;\n    }\n  });\n\n  args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n  // this hackery is required for IE8/9, where\n  // the `console.log` function doesn't have 'apply'\n  return 'object' === typeof console\n    && console.log\n    && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n  try {\n    if (null == namespaces) {\n      exports.storage.removeItem('debug');\n    } else {\n      exports.storage.debug = namespaces;\n    }\n  } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n  var r;\n  try {\n    r = exports.storage.debug;\n  } catch(e) {}\n\n  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n  if (!r && typeof process !== 'undefined' && 'env' in process) {\n    r = process.env.DEBUG;\n  }\n\n  return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n  try {\n    return window.localStorage;\n  } catch (e) {}\n}\n","'use strict';\nmodule.exports = (flag, argv) => {\n\targv = argv || process.argv;\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst pos = argv.indexOf(prefix + flag);\n\tconst terminatorPos = argv.indexOf('--');\n\treturn pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);\n};\n","'use strict';\nconst os = require('os');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(stream) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (stream && !stream.isTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Node.js 7.5.0 is the first version of Node.js to include a patch to\n\t\t// libuv that enables 256 color output on Windows. Anything earlier and it\n\t\t// won't work. However, here we target Node.js 8 at minimum as it is an LTS\n\t\t// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows\n\t\t// release that supports 256 colors. Windows 10 build 14931 is the first release\n\t\t// that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(process.versions.node.split('.')[0]) >= 8 &&\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: getSupportLevel(process.stdout),\n\tstderr: getSupportLevel(process.stderr)\n};\n","/**\n * Module dependencies.\n */\n\nvar tty = require('tty');\nvar util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\n\n/**\n * Colors.\n */\n\nexports.colors = [ 6, 2, 3, 4, 5, 1 ];\n\ntry {\n  var supportsColor = require('supports-color');\n  if (supportsColor && supportsColor.level >= 2) {\n    exports.colors = [\n      20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,\n      69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,\n      135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,\n      172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,\n      205, 206, 207, 208, 209, 214, 215, 220, 221\n    ];\n  }\n} catch (err) {\n  // swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(function (key) {\n  return /^debug_/i.test(key);\n}).reduce(function (obj, key) {\n  // camel-case\n  var prop = key\n    .substring(6)\n    .toLowerCase()\n    .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });\n\n  // coerce string value into JS value\n  var val = process.env[key];\n  if (/^(yes|on|true|enabled)$/i.test(val)) val = true;\n  else if (/^(no|off|false|disabled)$/i.test(val)) val = false;\n  else if (val === 'null') val = null;\n  else val = Number(val);\n\n  obj[prop] = val;\n  return obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n  return 'colors' in exports.inspectOpts\n    ? Boolean(exports.inspectOpts.colors)\n    : tty.isatty(process.stderr.fd);\n}\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nexports.formatters.o = function(v) {\n  this.inspectOpts.colors = this.useColors;\n  return util.inspect(v, this.inspectOpts)\n    .split('\\n').map(function(str) {\n      return str.trim()\n    }).join(' ');\n};\n\n/**\n * Map %o to `util.inspect()`, allowing multiple lines if needed.\n */\n\nexports.formatters.O = function(v) {\n  this.inspectOpts.colors = this.useColors;\n  return util.inspect(v, this.inspectOpts);\n};\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n  var name = this.namespace;\n  var useColors = this.useColors;\n\n  if (useColors) {\n    var c = this.color;\n    var colorCode = '\\u001b[3' + (c < 8 ? c : '8;5;' + c);\n    var prefix = '  ' + colorCode + ';1m' + name + ' ' + '\\u001b[0m';\n\n    args[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n    args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\\u001b[0m');\n  } else {\n    args[0] = getDate() + name + ' ' + args[0];\n  }\n}\n\nfunction getDate() {\n  if (exports.inspectOpts.hideDate) {\n    return '';\n  } else {\n    return new Date().toISOString() + ' ';\n  }\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log() {\n  return process.stderr.write(util.format.apply(util, arguments) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n  if (null == namespaces) {\n    // If you set a process.env field to null or undefined, it gets cast to the\n    // string 'null' or 'undefined'. Just delete instead.\n    delete process.env.DEBUG;\n  } else {\n    process.env.DEBUG = namespaces;\n  }\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n  return process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init (debug) {\n  debug.inspectOpts = {};\n\n  var keys = Object.keys(exports.inspectOpts);\n  for (var i = 0; i < keys.length; i++) {\n    debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n  }\n}\n\n/**\n * Enable namespaces listed in `process.env.DEBUG` initially.\n */\n\nexports.enable(load());\n","/**\n * Detect Electron renderer process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer') {\n  module.exports = require('./browser.js');\n} else {\n  module.exports = require('./node.js');\n}\n","var url = require(\"url\");\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar assert = require(\"assert\");\nvar Writable = require(\"stream\").Writable;\nvar debug = require(\"debug\")(\"follow-redirects\");\n\n// RFC7231§4.2.1: Of the request methods defined by this specification,\n// the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe.\nvar SAFE_METHODS = { GET: true, HEAD: true, OPTIONS: true, TRACE: true };\n\n// Create handlers that pass events from native requests\nvar eventHandlers = Object.create(null);\n[\"abort\", \"aborted\", \"error\", \"socket\", \"timeout\"].forEach(function (event) {\n  eventHandlers[event] = function (arg) {\n    this._redirectable.emit(event, arg);\n  };\n});\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n  // Initialize the request\n  Writable.call(this);\n  options.headers = options.headers || {};\n  this._options = options;\n  this._redirectCount = 0;\n  this._redirects = [];\n  this._requestBodyLength = 0;\n  this._requestBodyBuffers = [];\n\n  // Since http.request treats host as an alias of hostname,\n  // but the url module interprets host as hostname plus port,\n  // eliminate the host property to avoid confusion.\n  if (options.host) {\n    // Use hostname if set, because it has precedence\n    if (!options.hostname) {\n      options.hostname = options.host;\n    }\n    delete options.host;\n  }\n\n  // Attach a callback if passed\n  if (responseCallback) {\n    this.on(\"response\", responseCallback);\n  }\n\n  // React to responses of native requests\n  var self = this;\n  this._onNativeResponse = function (response) {\n    self._processResponse(response);\n  };\n\n  // Complete the URL object when necessary\n  if (!options.pathname && options.path) {\n    var searchPos = options.path.indexOf(\"?\");\n    if (searchPos < 0) {\n      options.pathname = options.path;\n    }\n    else {\n      options.pathname = options.path.substring(0, searchPos);\n      options.search = options.path.substring(searchPos);\n    }\n  }\n\n  // Perform the first request\n  this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n  // Validate input and shift parameters if necessary\n  if (!(typeof data === \"string\" || typeof data === \"object\" && (\"length\" in data))) {\n    throw new Error(\"data should be a string, Buffer or Uint8Array\");\n  }\n  if (typeof encoding === \"function\") {\n    callback = encoding;\n    encoding = null;\n  }\n\n  // Ignore empty buffers, since writing them doesn't invoke the callback\n  // https://github.com/nodejs/node/issues/22066\n  if (data.length === 0) {\n    if (callback) {\n      callback();\n    }\n    return;\n  }\n  // Only write when we don't exceed the maximum body length\n  if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n    this._requestBodyLength += data.length;\n    this._requestBodyBuffers.push({ data: data, encoding: encoding });\n    this._currentRequest.write(data, encoding, callback);\n  }\n  // Error when we exceed the maximum body length\n  else {\n    this.emit(\"error\", new Error(\"Request body larger than maxBodyLength limit\"));\n    this.abort();\n  }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n  // Shift parameters if necessary\n  if (typeof data === \"function\") {\n    callback = data;\n    data = encoding = null;\n  }\n  else if (typeof encoding === \"function\") {\n    callback = encoding;\n    encoding = null;\n  }\n\n  // Write data and end\n  var currentRequest = this._currentRequest;\n  this.write(data || \"\", encoding, function () {\n    currentRequest.end(null, null, callback);\n  });\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n  this._options.headers[name] = value;\n  this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n  delete this._options.headers[name];\n  this._currentRequest.removeHeader(name);\n};\n\n// Proxy all other public ClientRequest methods\n[\n  \"abort\", \"flushHeaders\", \"getHeader\",\n  \"setNoDelay\", \"setSocketKeepAlive\", \"setTimeout\",\n].forEach(function (method) {\n  RedirectableRequest.prototype[method] = function (a, b) {\n    return this._currentRequest[method](a, b);\n  };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n  Object.defineProperty(RedirectableRequest.prototype, property, {\n    get: function () { return this._currentRequest[property]; },\n  });\n});\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n  // Load the native protocol\n  var protocol = this._options.protocol;\n  var nativeProtocol = this._options.nativeProtocols[protocol];\n  if (!nativeProtocol) {\n    this.emit(\"error\", new Error(\"Unsupported protocol \" + protocol));\n    return;\n  }\n\n  // If specified, use the agent corresponding to the protocol\n  // (HTTP and HTTPS use different types of agents)\n  if (this._options.agents) {\n    var scheme = protocol.substr(0, protocol.length - 1);\n    this._options.agent = this._options.agents[scheme];\n  }\n\n  // Create the native request\n  var request = this._currentRequest =\n        nativeProtocol.request(this._options, this._onNativeResponse);\n  this._currentUrl = url.format(this._options);\n\n  // Set up event handlers\n  request._redirectable = this;\n  for (var event in eventHandlers) {\n    /* istanbul ignore else */\n    if (event) {\n      request.on(event, eventHandlers[event]);\n    }\n  }\n\n  // End a redirected request\n  // (The first request must be ended explicitly with RedirectableRequest#end)\n  if (this._isRedirect) {\n    // Write the request entity and end.\n    var i = 0;\n    var buffers = this._requestBodyBuffers;\n    (function writeNext() {\n      if (i < buffers.length) {\n        var buffer = buffers[i++];\n        request.write(buffer.data, buffer.encoding, writeNext);\n      }\n      else {\n        request.end();\n      }\n    }());\n  }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n  // Store the redirected response\n  if (this._options.trackRedirects) {\n    this._redirects.push({\n      url: this._currentUrl,\n      headers: response.headers,\n      statusCode: response.statusCode,\n    });\n  }\n\n  // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n  // that further action needs to be taken by the user agent in order to\n  // fulfill the request. If a Location header field is provided,\n  // the user agent MAY automatically redirect its request to the URI\n  // referenced by the Location field value,\n  // even if the specific status code is not understood.\n  var location = response.headers.location;\n  if (location && this._options.followRedirects !== false &&\n      response.statusCode >= 300 && response.statusCode < 400) {\n    // RFC7231§6.4: A client SHOULD detect and intervene\n    // in cyclical redirections (i.e., \"infinite\" redirection loops).\n    if (++this._redirectCount > this._options.maxRedirects) {\n      this.emit(\"error\", new Error(\"Max redirects exceeded.\"));\n      return;\n    }\n\n    // RFC7231§6.4: Automatic redirection needs to done with\n    // care for methods not known to be safe […],\n    // since the user might not wish to redirect an unsafe request.\n    // RFC7231§6.4.7: The 307 (Temporary Redirect) status code indicates\n    // that the target resource resides temporarily under a different URI\n    // and the user agent MUST NOT change the request method\n    // if it performs an automatic redirection to that URI.\n    var header;\n    var headers = this._options.headers;\n    if (response.statusCode !== 307 && !(this._options.method in SAFE_METHODS)) {\n      this._options.method = \"GET\";\n      // Drop a possible entity and headers related to it\n      this._requestBodyBuffers = [];\n      for (header in headers) {\n        if (/^content-/i.test(header)) {\n          delete headers[header];\n        }\n      }\n    }\n\n    // Drop the Host header, as the redirect might lead to a different host\n    if (!this._isRedirect) {\n      for (header in headers) {\n        if (/^host$/i.test(header)) {\n          delete headers[header];\n        }\n      }\n    }\n\n    // Perform the redirected request\n    var redirectUrl = url.resolve(this._currentUrl, location);\n    debug(\"redirecting to\", redirectUrl);\n    Object.assign(this._options, url.parse(redirectUrl));\n    this._isRedirect = true;\n    this._performRequest();\n\n    // Discard the remainder of the response to avoid waiting for data\n    response.destroy();\n  }\n  else {\n    // The response is not a redirect; return it as-is\n    response.responseUrl = this._currentUrl;\n    response.redirects = this._redirects;\n    this.emit(\"response\", response);\n\n    // Clean up\n    this._requestBodyBuffers = [];\n  }\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n  // Default settings\n  var exports = {\n    maxRedirects: 21,\n    maxBodyLength: 10 * 1024 * 1024,\n  };\n\n  // Wrap each protocol\n  var nativeProtocols = {};\n  Object.keys(protocols).forEach(function (scheme) {\n    var protocol = scheme + \":\";\n    var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n    var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n    // Executes a request, following redirects\n    wrappedProtocol.request = function (options, callback) {\n      if (typeof options === \"string\") {\n        options = url.parse(options);\n        options.maxRedirects = exports.maxRedirects;\n      }\n      else {\n        options = Object.assign({\n          protocol: protocol,\n          maxRedirects: exports.maxRedirects,\n          maxBodyLength: exports.maxBodyLength,\n        }, options);\n      }\n      options.nativeProtocols = nativeProtocols;\n      assert.equal(options.protocol, protocol, \"protocol mismatch\");\n      debug(\"options\", options);\n      return new RedirectableRequest(options, callback);\n    };\n\n    // Executes a GET request, following redirects\n    wrappedProtocol.get = function (options, callback) {\n      var request = wrappedProtocol.request(options, callback);\n      request.end();\n      return request;\n    };\n  });\n  return exports;\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildFullPath = require('../core/buildFullPath');\nvar buildURL = require('./../helpers/buildURL');\nvar http = require('http');\nvar https = require('https');\nvar httpFollow = require('follow-redirects').http;\nvar httpsFollow = require('follow-redirects').https;\nvar url = require('url');\nvar zlib = require('zlib');\nvar pkg = require('./../../package.json');\nvar createError = require('../core/createError');\nvar enhanceError = require('../core/enhanceError');\n\nvar isHttps = /https:?/;\n\n/*eslint consistent-return:0*/\nmodule.exports = function httpAdapter(config) {\n  return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {\n    var resolve = function resolve(value) {\n      resolvePromise(value);\n    };\n    var reject = function reject(value) {\n      rejectPromise(value);\n    };\n    var data = config.data;\n    var headers = config.headers;\n\n    // Set User-Agent (required by some servers)\n    // Only set header if it hasn't been set in config\n    // See https://github.com/axios/axios/issues/69\n    if (!headers['User-Agent'] && !headers['user-agent']) {\n      headers['User-Agent'] = 'axios/' + pkg.version;\n    }\n\n    if (data && !utils.isStream(data)) {\n      if (Buffer.isBuffer(data)) {\n        // Nothing to do...\n      } else if (utils.isArrayBuffer(data)) {\n        data = Buffer.from(new Uint8Array(data));\n      } else if (utils.isString(data)) {\n        data = Buffer.from(data, 'utf-8');\n      } else {\n        return reject(createError(\n          'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n          config\n        ));\n      }\n\n      // Add Content-Length header if data exists\n      headers['Content-Length'] = data.length;\n    }\n\n    // HTTP basic authentication\n    var auth = undefined;\n    if (config.auth) {\n      var username = config.auth.username || '';\n      var password = config.auth.password || '';\n      auth = username + ':' + password;\n    }\n\n    // Parse url\n    var fullPath = buildFullPath(config.baseURL, config.url);\n    var parsed = url.parse(fullPath);\n    var protocol = parsed.protocol || 'http:';\n\n    if (!auth && parsed.auth) {\n      var urlAuth = parsed.auth.split(':');\n      var urlUsername = urlAuth[0] || '';\n      var urlPassword = urlAuth[1] || '';\n      auth = urlUsername + ':' + urlPassword;\n    }\n\n    if (auth) {\n      delete headers.Authorization;\n    }\n\n    var isHttpsRequest = isHttps.test(protocol);\n    var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n\n    var options = {\n      path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\\?/, ''),\n      method: config.method.toUpperCase(),\n      headers: headers,\n      agent: agent,\n      agents: { http: config.httpAgent, https: config.httpsAgent },\n      auth: auth\n    };\n\n    if (config.socketPath) {\n      options.socketPath = config.socketPath;\n    } else {\n      options.hostname = parsed.hostname;\n      options.port = parsed.port;\n    }\n\n    var proxy = config.proxy;\n    if (!proxy && proxy !== false) {\n      var proxyEnv = protocol.slice(0, -1) + '_proxy';\n      var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];\n      if (proxyUrl) {\n        var parsedProxyUrl = url.parse(proxyUrl);\n        var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;\n        var shouldProxy = true;\n\n        if (noProxyEnv) {\n          var noProxy = noProxyEnv.split(',').map(function trim(s) {\n            return s.trim();\n          });\n\n          shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {\n            if (!proxyElement) {\n              return false;\n            }\n            if (proxyElement === '*') {\n              return true;\n            }\n            if (proxyElement[0] === '.' &&\n                parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {\n              return true;\n            }\n\n            return parsed.hostname === proxyElement;\n          });\n        }\n\n\n        if (shouldProxy) {\n          proxy = {\n            host: parsedProxyUrl.hostname,\n            port: parsedProxyUrl.port\n          };\n\n          if (parsedProxyUrl.auth) {\n            var proxyUrlAuth = parsedProxyUrl.auth.split(':');\n            proxy.auth = {\n              username: proxyUrlAuth[0],\n              password: proxyUrlAuth[1]\n            };\n          }\n        }\n      }\n    }\n\n    if (proxy) {\n      options.hostname = proxy.host;\n      options.host = proxy.host;\n      options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');\n      options.port = proxy.port;\n      options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path;\n\n      // Basic proxy authorization\n      if (proxy.auth) {\n        var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');\n        options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n      }\n    }\n\n    var transport;\n    var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);\n    if (config.transport) {\n      transport = config.transport;\n    } else if (config.maxRedirects === 0) {\n      transport = isHttpsProxy ? https : http;\n    } else {\n      if (config.maxRedirects) {\n        options.maxRedirects = config.maxRedirects;\n      }\n      transport = isHttpsProxy ? httpsFollow : httpFollow;\n    }\n\n    if (config.maxContentLength && config.maxContentLength > -1) {\n      options.maxBodyLength = config.maxContentLength;\n    }\n\n    // Create the request\n    var req = transport.request(options, function handleResponse(res) {\n      if (req.aborted) return;\n\n      // uncompress the response body transparently if required\n      var stream = res;\n      switch (res.headers['content-encoding']) {\n      /*eslint default-case:0*/\n      case 'gzip':\n      case 'compress':\n      case 'deflate':\n        // add the unzipper to the body stream processing pipeline\n        stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip());\n\n        // remove the content-encoding in order to not confuse downstream operations\n        delete res.headers['content-encoding'];\n        break;\n      }\n\n      // return the last request in case of redirects\n      var lastRequest = res.req || req;\n\n      var response = {\n        status: res.statusCode,\n        statusText: res.statusMessage,\n        headers: res.headers,\n        config: config,\n        request: lastRequest\n      };\n\n      if (config.responseType === 'stream') {\n        response.data = stream;\n        settle(resolve, reject, response);\n      } else {\n        var responseBuffer = [];\n        stream.on('data', function handleStreamData(chunk) {\n          responseBuffer.push(chunk);\n\n          // make sure the content length is not over the maxContentLength if specified\n          if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) {\n            stream.destroy();\n            reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n              config, null, lastRequest));\n          }\n        });\n\n        stream.on('error', function handleStreamError(err) {\n          if (req.aborted) return;\n          reject(enhanceError(err, config, null, lastRequest));\n        });\n\n        stream.on('end', function handleStreamEnd() {\n          var responseData = Buffer.concat(responseBuffer);\n          if (config.responseType !== 'arraybuffer') {\n            responseData = responseData.toString(config.responseEncoding);\n          }\n\n          response.data = responseData;\n          settle(resolve, reject, response);\n        });\n      }\n    });\n\n    // Handle errors\n    req.on('error', function handleRequestError(err) {\n      if (req.aborted) return;\n      reject(enhanceError(err, config, null, req));\n    });\n\n    // Handle request timeout\n    if (config.timeout) {\n      // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n      // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n      // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n      // And then these socket which be hang up will devoring CPU little by little.\n      // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n      req.setTimeout(config.timeout, function handleRequestTimeout() {\n        req.abort();\n        reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req));\n      });\n    }\n\n    if (config.cancelToken) {\n      // Handle cancellation\n      config.cancelToken.promise.then(function onCanceled(cancel) {\n        if (req.aborted) return;\n\n        req.abort();\n        reject(cancel);\n      });\n    }\n\n    // Send the request\n    if (utils.isStream(data)) {\n      data.on('error', function handleStreamError(err) {\n        reject(enhanceError(err, config, null, req));\n      }).pipe(req);\n    } else {\n      req.end(data);\n    }\n  });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n  'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n    headers['Content-Type'] = value;\n  }\n}\n\nfunction getDefaultAdapter() {\n  var adapter;\n  if (typeof XMLHttpRequest !== 'undefined') {\n    // For browsers use XHR adapter\n    adapter = require('./adapters/xhr');\n  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n    // For node use HTTP adapter\n    adapter = require('./adapters/http');\n  }\n  return adapter;\n}\n\nvar defaults = {\n  adapter: getDefaultAdapter(),\n\n  transformRequest: [function transformRequest(data, headers) {\n    normalizeHeaderName(headers, 'Accept');\n    normalizeHeaderName(headers, 'Content-Type');\n    if (utils.isFormData(data) ||\n      utils.isArrayBuffer(data) ||\n      utils.isBuffer(data) ||\n      utils.isStream(data) ||\n      utils.isFile(data) ||\n      utils.isBlob(data)\n    ) {\n      return data;\n    }\n    if (utils.isArrayBufferView(data)) {\n      return data.buffer;\n    }\n    if (utils.isURLSearchParams(data)) {\n      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n      return data.toString();\n    }\n    if (utils.isObject(data)) {\n      setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n      return JSON.stringify(data);\n    }\n    return data;\n  }],\n\n  transformResponse: [function transformResponse(data) {\n    /*eslint no-param-reassign:0*/\n    if (typeof data === 'string') {\n      try {\n        data = JSON.parse(data);\n      } catch (e) { /* Ignore */ }\n    }\n    return data;\n  }],\n\n  /**\n   * A timeout in milliseconds to abort a request. If set to 0 (default) a\n   * timeout is not created.\n   */\n  timeout: 0,\n\n  xsrfCookieName: 'XSRF-TOKEN',\n  xsrfHeaderName: 'X-XSRF-TOKEN',\n\n  maxContentLength: -1,\n\n  validateStatus: function validateStatus(status) {\n    return status >= 200 && status < 300;\n  }\n};\n\ndefaults.headers = {\n  common: {\n    'Accept': 'application/json, text/plain, */*'\n  }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n  defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n  if (config.cancelToken) {\n    config.cancelToken.throwIfRequested();\n  }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n  throwIfCancellationRequested(config);\n\n  // Ensure headers exist\n  config.headers = config.headers || {};\n\n  // Transform request data\n  config.data = transformData(\n    config.data,\n    config.headers,\n    config.transformRequest\n  );\n\n  // Flatten headers\n  config.headers = utils.merge(\n    config.headers.common || {},\n    config.headers[config.method] || {},\n    config.headers\n  );\n\n  utils.forEach(\n    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n    function cleanHeaderConfig(method) {\n      delete config.headers[method];\n    }\n  );\n\n  var adapter = config.adapter || defaults.adapter;\n\n  return adapter(config).then(function onAdapterResolution(response) {\n    throwIfCancellationRequested(config);\n\n    // Transform response data\n    response.data = transformData(\n      response.data,\n      response.headers,\n      config.transformResponse\n    );\n\n    return response;\n  }, function onAdapterRejection(reason) {\n    if (!isCancel(reason)) {\n      throwIfCancellationRequested(config);\n\n      // Transform response data\n      if (reason && reason.response) {\n        reason.response.data = transformData(\n          reason.response.data,\n          reason.response.headers,\n          config.transformResponse\n        );\n      }\n    }\n\n    return Promise.reject(reason);\n  });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n  // eslint-disable-next-line no-param-reassign\n  config2 = config2 || {};\n  var config = {};\n\n  var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];\n  var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];\n  var defaultToConfig2Keys = [\n    'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',\n    'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n    'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',\n    'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',\n    'httpsAgent', 'cancelToken', 'socketPath'\n  ];\n\n  utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    }\n  });\n\n  utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {\n    if (utils.isObject(config2[prop])) {\n      config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n    } else if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (utils.isObject(config1[prop])) {\n      config[prop] = utils.deepMerge(config1[prop]);\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  var axiosKeys = valueFromConfig2Keys\n    .concat(mergeDeepPropertiesKeys)\n    .concat(defaultToConfig2Keys);\n\n  var otherKeys = Object\n    .keys(config2)\n    .filter(function filterAxiosKeys(key) {\n      return axiosKeys.indexOf(key) === -1;\n    });\n\n  utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {\n    if (typeof config2[prop] !== 'undefined') {\n      config[prop] = config2[prop];\n    } else if (typeof config1[prop] !== 'undefined') {\n      config[prop] = config1[prop];\n    }\n  });\n\n  return config;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n  this.defaults = instanceConfig;\n  this.interceptors = {\n    request: new InterceptorManager(),\n    response: new InterceptorManager()\n  };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n  /*eslint no-param-reassign:0*/\n  // Allow for axios('example/url'[, config]) a la fetch API\n  if (typeof config === 'string') {\n    config = arguments[1] || {};\n    config.url = arguments[0];\n  } else {\n    config = config || {};\n  }\n\n  config = mergeConfig(this.defaults, config);\n\n  // Set config.method\n  if (config.method) {\n    config.method = config.method.toLowerCase();\n  } else if (this.defaults.method) {\n    config.method = this.defaults.method.toLowerCase();\n  } else {\n    config.method = 'get';\n  }\n\n  // Hook up interceptors middleware\n  var chain = [dispatchRequest, undefined];\n  var promise = Promise.resolve(config);\n\n  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n    chain.unshift(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n    chain.push(interceptor.fulfilled, interceptor.rejected);\n  });\n\n  while (chain.length) {\n    promise = promise.then(chain.shift(), chain.shift());\n  }\n\n  return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n  config = mergeConfig(this.defaults, config);\n  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url\n    }));\n  };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n  /*eslint func-names:0*/\n  Axios.prototype[method] = function(url, data, config) {\n    return this.request(utils.merge(config || {}, {\n      method: method,\n      url: url,\n      data: data\n    }));\n  };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n  this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n  return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n  if (typeof executor !== 'function') {\n    throw new TypeError('executor must be a function.');\n  }\n\n  var resolvePromise;\n  this.promise = new Promise(function promiseExecutor(resolve) {\n    resolvePromise = resolve;\n  });\n\n  var token = this;\n  executor(function cancel(message) {\n    if (token.reason) {\n      // Cancellation has already been requested\n      return;\n    }\n\n    token.reason = new Cancel(message);\n    resolvePromise(token.reason);\n  });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n  if (this.reason) {\n    throw this.reason;\n  }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n  var cancel;\n  var token = new CancelToken(function executor(c) {\n    cancel = c;\n  });\n  return {\n    token: token,\n    cancel: cancel\n  };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n *  ```js\n *  function f(x, y, z) {}\n *  var args = [1, 2, 3];\n *  f.apply(null, args);\n *  ```\n *\n * With `spread` this example can be re-written.\n *\n *  ```js\n *  spread(function(x, y, z) {})([1, 2, 3]);\n *  ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n  return function wrap(arr) {\n    return callback.apply(null, arr);\n  };\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n  var context = new Axios(defaultConfig);\n  var instance = bind(Axios.prototype.request, context);\n\n  // Copy axios.prototype to instance\n  utils.extend(instance, Axios.prototype, context);\n\n  // Copy context to instance\n  utils.extend(instance, context);\n\n  return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n  return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n  return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n    listCacheDelete = require('./_listCacheDelete'),\n    listCacheGet = require('./_listCacheGet'),\n    listCacheHas = require('./_listCacheHas'),\n    listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n    isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n    isMasked = require('./_isMasked'),\n    isObject = require('./isObject'),\n    toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n    getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n    hashDelete = require('./_hashDelete'),\n    hashGet = require('./_hashGet'),\n    hashHas = require('./_hashHas'),\n    hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n    ListCache = require('./_ListCache'),\n    Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n    mapCacheDelete = require('./_mapCacheDelete'),\n    mapCacheGet = require('./_mapCacheGet'),\n    mapCacheHas = require('./_mapCacheHas'),\n    mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n    Map = require('./_Map'),\n    MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n    stackClear = require('./_stackClear'),\n    stackDelete = require('./_stackDelete'),\n    stackGet = require('./_stackGet'),\n    stackHas = require('./_stackHas'),\n    stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\nmodule.exports = arrayEach;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n    eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n    baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\nmodule.exports = copyObject;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n    isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n    stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n    isLength = require('./isLength'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n    baseUnary = require('./_baseUnary'),\n    nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n    isArguments = require('./isArguments'),\n    isArray = require('./isArray'),\n    isBuffer = require('./isBuffer'),\n    isIndex = require('./_isIndex'),\n    isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n    nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n    isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n    baseKeys = require('./_baseKeys'),\n    isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var copyObject = require('./_copyObject'),\n    keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n    isPrototype = require('./_isPrototype'),\n    nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n    baseKeysIn = require('./_baseKeysIn'),\n    isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var copyObject = require('./_copyObject'),\n    keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n  return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\nmodule.exports = cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\nmodule.exports = copyArray;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n    stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n  if (object == null) {\n    return [];\n  }\n  object = Object(object);\n  return arrayFilter(nativeGetSymbols(object), function(symbol) {\n    return propertyIsEnumerable.call(object, symbol);\n  });\n};\n\nmodule.exports = getSymbols;\n","var copyObject = require('./_copyObject'),\n    getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\nmodule.exports = arrayPush;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var arrayPush = require('./_arrayPush'),\n    getPrototype = require('./_getPrototype'),\n    getSymbols = require('./_getSymbols'),\n    stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n  var result = [];\n  while (object) {\n    arrayPush(result, getSymbols(object));\n    object = getPrototype(object);\n  }\n  return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var copyObject = require('./_copyObject'),\n    getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n  return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var arrayPush = require('./_arrayPush'),\n    isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n    getSymbols = require('./_getSymbols'),\n    keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n    getSymbolsIn = require('./_getSymbolsIn'),\n    keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n  return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n    Map = require('./_Map'),\n    Promise = require('./_Promise'),\n    Set = require('./_Set'),\n    WeakMap = require('./_WeakMap'),\n    baseGetTag = require('./_baseGetTag'),\n    toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nmodule.exports = getTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = new array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\nmodule.exports = initCloneArray;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n    cloneDataView = require('./_cloneDataView'),\n    cloneRegExp = require('./_cloneRegExp'),\n    cloneSymbol = require('./_cloneSymbol'),\n    cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return new Ctor;\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return new Ctor;\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\nmodule.exports = initCloneByTag;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\nmodule.exports = baseCreate;\n","var baseCreate = require('./_baseCreate'),\n    getPrototype = require('./_getPrototype'),\n    isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\nmodule.exports = initCloneObject;\n","var getTag = require('./_getTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n  return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsMap = require('./_baseIsMap'),\n    baseUnary = require('./_baseUnary'),\n    nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n  return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseIsSet = require('./_baseIsSet'),\n    baseUnary = require('./_baseUnary'),\n    nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var Stack = require('./_Stack'),\n    arrayEach = require('./_arrayEach'),\n    assignValue = require('./_assignValue'),\n    baseAssign = require('./_baseAssign'),\n    baseAssignIn = require('./_baseAssignIn'),\n    cloneBuffer = require('./_cloneBuffer'),\n    copyArray = require('./_copyArray'),\n    copySymbols = require('./_copySymbols'),\n    copySymbolsIn = require('./_copySymbolsIn'),\n    getAllKeys = require('./_getAllKeys'),\n    getAllKeysIn = require('./_getAllKeysIn'),\n    getTag = require('./_getTag'),\n    initCloneArray = require('./_initCloneArray'),\n    initCloneByTag = require('./_initCloneByTag'),\n    initCloneObject = require('./_initCloneObject'),\n    isArray = require('./isArray'),\n    isBuffer = require('./isBuffer'),\n    isMap = require('./isMap'),\n    isObject = require('./isObject'),\n    isSet = require('./isSet'),\n    keys = require('./keys');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_FLAT_FLAG = 2,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Deep clone\n *  2 - Flatten inherited properties\n *  4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n  var result,\n      isDeep = bitmask & CLONE_DEEP_FLAG,\n      isFlat = bitmask & CLONE_FLAT_FLAG,\n      isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      result = (isFlat || isFunc) ? {} : initCloneObject(value);\n      if (!isDeep) {\n        return isFlat\n          ? copySymbolsIn(value, baseAssignIn(result, value))\n          : copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (isSet(value)) {\n    value.forEach(function(subValue) {\n      result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n    });\n  } else if (isMap(value)) {\n    value.forEach(function(subValue, key) {\n      result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n    });\n  }\n\n  var keysFunc = isFull\n    ? (isFlat ? getAllKeysIn : getAllKeys)\n    : (isFlat ? keysIn : keys);\n\n  var props = isArr ? undefined : keysFunc(value);\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n  });\n  return result;\n}\n\nmodule.exports = baseClone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n  return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n    var array = [];\n    for (var i = 0; i < 256; ++i) {\n        array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n    }\n\n    return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n    while (queue.length > 1) {\n        var item = queue.pop();\n        var obj = item.obj[item.prop];\n\n        if (isArray(obj)) {\n            var compacted = [];\n\n            for (var j = 0; j < obj.length; ++j) {\n                if (typeof obj[j] !== 'undefined') {\n                    compacted.push(obj[j]);\n                }\n            }\n\n            item.obj[item.prop] = compacted;\n        }\n    }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n    var obj = options && options.plainObjects ? Object.create(null) : {};\n    for (var i = 0; i < source.length; ++i) {\n        if (typeof source[i] !== 'undefined') {\n            obj[i] = source[i];\n        }\n    }\n\n    return obj;\n};\n\nvar merge = function merge(target, source, options) {\n    /* eslint no-param-reassign: 0 */\n    if (!source) {\n        return target;\n    }\n\n    if (typeof source !== 'object') {\n        if (isArray(target)) {\n            target.push(source);\n        } else if (target && typeof target === 'object') {\n            if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n                target[source] = true;\n            }\n        } else {\n            return [target, source];\n        }\n\n        return target;\n    }\n\n    if (!target || typeof target !== 'object') {\n        return [target].concat(source);\n    }\n\n    var mergeTarget = target;\n    if (isArray(target) && !isArray(source)) {\n        mergeTarget = arrayToObject(target, options);\n    }\n\n    if (isArray(target) && isArray(source)) {\n        source.forEach(function (item, i) {\n            if (has.call(target, i)) {\n                var targetItem = target[i];\n                if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n                    target[i] = merge(targetItem, item, options);\n                } else {\n                    target.push(item);\n                }\n            } else {\n                target[i] = item;\n            }\n        });\n        return target;\n    }\n\n    return Object.keys(source).reduce(function (acc, key) {\n        var value = source[key];\n\n        if (has.call(acc, key)) {\n            acc[key] = merge(acc[key], value, options);\n        } else {\n            acc[key] = value;\n        }\n        return acc;\n    }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n    return Object.keys(source).reduce(function (acc, key) {\n        acc[key] = source[key];\n        return acc;\n    }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n    var strWithoutPlus = str.replace(/\\+/g, ' ');\n    if (charset === 'iso-8859-1') {\n        // unescape never throws, no try...catch needed:\n        return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n    }\n    // utf-8\n    try {\n        return decodeURIComponent(strWithoutPlus);\n    } catch (e) {\n        return strWithoutPlus;\n    }\n};\n\nvar encode = function encode(str, defaultEncoder, charset) {\n    // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n    // It has been adapted here for stricter adherence to RFC 3986\n    if (str.length === 0) {\n        return str;\n    }\n\n    var string = str;\n    if (typeof str === 'symbol') {\n        string = Symbol.prototype.toString.call(str);\n    } else if (typeof str !== 'string') {\n        string = String(str);\n    }\n\n    if (charset === 'iso-8859-1') {\n        return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n            return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n        });\n    }\n\n    var out = '';\n    for (var i = 0; i < string.length; ++i) {\n        var c = string.charCodeAt(i);\n\n        if (\n            c === 0x2D // -\n            || c === 0x2E // .\n            || c === 0x5F // _\n            || c === 0x7E // ~\n            || (c >= 0x30 && c <= 0x39) // 0-9\n            || (c >= 0x41 && c <= 0x5A) // a-z\n            || (c >= 0x61 && c <= 0x7A) // A-Z\n        ) {\n            out += string.charAt(i);\n            continue;\n        }\n\n        if (c < 0x80) {\n            out = out + hexTable[c];\n            continue;\n        }\n\n        if (c < 0x800) {\n            out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n            continue;\n        }\n\n        if (c < 0xD800 || c >= 0xE000) {\n            out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n            continue;\n        }\n\n        i += 1;\n        c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n        out += hexTable[0xF0 | (c >> 18)]\n            + hexTable[0x80 | ((c >> 12) & 0x3F)]\n            + hexTable[0x80 | ((c >> 6) & 0x3F)]\n            + hexTable[0x80 | (c & 0x3F)];\n    }\n\n    return out;\n};\n\nvar compact = function compact(value) {\n    var queue = [{ obj: { o: value }, prop: 'o' }];\n    var refs = [];\n\n    for (var i = 0; i < queue.length; ++i) {\n        var item = queue[i];\n        var obj = item.obj[item.prop];\n\n        var keys = Object.keys(obj);\n        for (var j = 0; j < keys.length; ++j) {\n            var key = keys[j];\n            var val = obj[key];\n            if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n                queue.push({ obj: obj, prop: key });\n                refs.push(val);\n            }\n        }\n    }\n\n    compactQueue(queue);\n\n    return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n    return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n    if (!obj || typeof obj !== 'object') {\n        return false;\n    }\n\n    return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n    return [].concat(a, b);\n};\n\nmodule.exports = {\n    arrayToObject: arrayToObject,\n    assign: assign,\n    combine: combine,\n    compact: compact,\n    decode: decode,\n    encode: encode,\n    isBuffer: isBuffer,\n    isRegExp: isRegExp,\n    merge: merge\n};\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar util = require('./utils');\n\nvar Format = {\n    RFC1738: 'RFC1738',\n    RFC3986: 'RFC3986'\n};\n\nmodule.exports = util.assign(\n    {\n        'default': Format.RFC3986,\n        formatters: {\n            RFC1738: function (value) {\n                return replace.call(value, percentTwenties, '+');\n            },\n            RFC3986: function (value) {\n                return String(value);\n            }\n        }\n    },\n    Format\n);\n","'use strict';\n\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n    brackets: function brackets(prefix) {\n        return prefix + '[]';\n    },\n    comma: 'comma',\n    indices: function indices(prefix, key) {\n        return prefix + '[' + key + ']';\n    },\n    repeat: function repeat(prefix) {\n        return prefix;\n    }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n    push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n    addQueryPrefix: false,\n    allowDots: false,\n    charset: 'utf-8',\n    charsetSentinel: false,\n    delimiter: '&',\n    encode: true,\n    encoder: utils.encode,\n    encodeValuesOnly: false,\n    format: defaultFormat,\n    formatter: formats.formatters[defaultFormat],\n    // deprecated\n    indices: false,\n    serializeDate: function serializeDate(date) {\n        return toISO.call(date);\n    },\n    skipNulls: false,\n    strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n    return typeof v === 'string'\n        || typeof v === 'number'\n        || typeof v === 'boolean'\n        || typeof v === 'symbol'\n        || typeof v === 'bigint';\n};\n\nvar stringify = function stringify(\n    object,\n    prefix,\n    generateArrayPrefix,\n    strictNullHandling,\n    skipNulls,\n    encoder,\n    filter,\n    sort,\n    allowDots,\n    serializeDate,\n    formatter,\n    encodeValuesOnly,\n    charset\n) {\n    var obj = object;\n    if (typeof filter === 'function') {\n        obj = filter(prefix, obj);\n    } else if (obj instanceof Date) {\n        obj = serializeDate(obj);\n    } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n        obj = obj.join(',');\n    }\n\n    if (obj === null) {\n        if (strictNullHandling) {\n            return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;\n        }\n\n        obj = '';\n    }\n\n    if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n        if (encoder) {\n            var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');\n            return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];\n        }\n        return [formatter(prefix) + '=' + formatter(String(obj))];\n    }\n\n    var values = [];\n\n    if (typeof obj === 'undefined') {\n        return values;\n    }\n\n    var objKeys;\n    if (isArray(filter)) {\n        objKeys = filter;\n    } else {\n        var keys = Object.keys(obj);\n        objKeys = sort ? keys.sort(sort) : keys;\n    }\n\n    for (var i = 0; i < objKeys.length; ++i) {\n        var key = objKeys[i];\n\n        if (skipNulls && obj[key] === null) {\n            continue;\n        }\n\n        if (isArray(obj)) {\n            pushToArray(values, stringify(\n                obj[key],\n                typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix,\n                generateArrayPrefix,\n                strictNullHandling,\n                skipNulls,\n                encoder,\n                filter,\n                sort,\n                allowDots,\n                serializeDate,\n                formatter,\n                encodeValuesOnly,\n                charset\n            ));\n        } else {\n            pushToArray(values, stringify(\n                obj[key],\n                prefix + (allowDots ? '.' + key : '[' + key + ']'),\n                generateArrayPrefix,\n                strictNullHandling,\n                skipNulls,\n                encoder,\n                filter,\n                sort,\n                allowDots,\n                serializeDate,\n                formatter,\n                encodeValuesOnly,\n                charset\n            ));\n        }\n    }\n\n    return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n    if (!opts) {\n        return defaults;\n    }\n\n    if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {\n        throw new TypeError('Encoder has to be a function.');\n    }\n\n    var charset = opts.charset || defaults.charset;\n    if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n        throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n    }\n\n    var format = formats['default'];\n    if (typeof opts.format !== 'undefined') {\n        if (!has.call(formats.formatters, opts.format)) {\n            throw new TypeError('Unknown format option provided.');\n        }\n        format = opts.format;\n    }\n    var formatter = formats.formatters[format];\n\n    var filter = defaults.filter;\n    if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n        filter = opts.filter;\n    }\n\n    return {\n        addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n        allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n        charset: charset,\n        charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n        delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n        encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n        encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n        encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n        filter: filter,\n        formatter: formatter,\n        serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n        skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n        sort: typeof opts.sort === 'function' ? opts.sort : null,\n        strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n    };\n};\n\nmodule.exports = function (object, opts) {\n    var obj = object;\n    var options = normalizeStringifyOptions(opts);\n\n    var objKeys;\n    var filter;\n\n    if (typeof options.filter === 'function') {\n        filter = options.filter;\n        obj = filter('', obj);\n    } else if (isArray(options.filter)) {\n        filter = options.filter;\n        objKeys = filter;\n    }\n\n    var keys = [];\n\n    if (typeof obj !== 'object' || obj === null) {\n        return '';\n    }\n\n    var arrayFormat;\n    if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n        arrayFormat = opts.arrayFormat;\n    } else if (opts && 'indices' in opts) {\n        arrayFormat = opts.indices ? 'indices' : 'repeat';\n    } else {\n        arrayFormat = 'indices';\n    }\n\n    var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n\n    if (!objKeys) {\n        objKeys = Object.keys(obj);\n    }\n\n    if (options.sort) {\n        objKeys.sort(options.sort);\n    }\n\n    for (var i = 0; i < objKeys.length; ++i) {\n        var key = objKeys[i];\n\n        if (options.skipNulls && obj[key] === null) {\n            continue;\n        }\n        pushToArray(keys, stringify(\n            obj[key],\n            key,\n            generateArrayPrefix,\n            options.strictNullHandling,\n            options.skipNulls,\n            options.encode ? options.encoder : null,\n            options.filter,\n            options.sort,\n            options.allowDots,\n            options.serializeDate,\n            options.formatter,\n            options.encodeValuesOnly,\n            options.charset\n        ));\n    }\n\n    var joined = keys.join(options.delimiter);\n    var prefix = options.addQueryPrefix === true ? '?' : '';\n\n    if (options.charsetSentinel) {\n        if (options.charset === 'iso-8859-1') {\n            // encodeURIComponent('&#10003;'), the \"numeric entity\" representation of a checkmark\n            prefix += 'utf8=%26%2310003%3B&';\n        } else {\n            // encodeURIComponent('✓')\n            prefix += 'utf8=%E2%9C%93&';\n        }\n    }\n\n    return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n    allowDots: false,\n    allowPrototypes: false,\n    arrayLimit: 20,\n    charset: 'utf-8',\n    charsetSentinel: false,\n    comma: false,\n    decoder: utils.decode,\n    delimiter: '&',\n    depth: 5,\n    ignoreQueryPrefix: false,\n    interpretNumericEntities: false,\n    parameterLimit: 1000,\n    parseArrays: true,\n    plainObjects: false,\n    strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n    return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n        return String.fromCharCode(parseInt(numberStr, 10));\n    });\n};\n\nvar parseArrayValue = function (val, options) {\n    if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n        return val.split(',');\n    }\n\n    return val;\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n    if (isArray(val)) {\n        var mapped = [];\n        for (var i = 0; i < val.length; i += 1) {\n            mapped.push(fn(val[i]));\n        }\n        return mapped;\n    }\n    return fn(val);\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n    var obj = {};\n    var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n    var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n    var parts = cleanStr.split(options.delimiter, limit);\n    var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n    var i;\n\n    var charset = options.charset;\n    if (options.charsetSentinel) {\n        for (i = 0; i < parts.length; ++i) {\n            if (parts[i].indexOf('utf8=') === 0) {\n                if (parts[i] === charsetSentinel) {\n                    charset = 'utf-8';\n                } else if (parts[i] === isoSentinel) {\n                    charset = 'iso-8859-1';\n                }\n                skipIndex = i;\n                i = parts.length; // The eslint settings do not allow break;\n            }\n        }\n    }\n\n    for (i = 0; i < parts.length; ++i) {\n        if (i === skipIndex) {\n            continue;\n        }\n        var part = parts[i];\n\n        var bracketEqualsPos = part.indexOf(']=');\n        var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n        var key, val;\n        if (pos === -1) {\n            key = options.decoder(part, defaults.decoder, charset, 'key');\n            val = options.strictNullHandling ? null : '';\n        } else {\n            key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n            val = maybeMap(\n                parseArrayValue(part.slice(pos + 1), options),\n                function (encodedVal) {\n                    return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n                }\n            );\n        }\n\n        if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n            val = interpretNumericEntities(val);\n        }\n\n        if (part.indexOf('[]=') > -1) {\n            val = isArray(val) ? [val] : val;\n        }\n\n        if (has.call(obj, key)) {\n            obj[key] = utils.combine(obj[key], val);\n        } else {\n            obj[key] = val;\n        }\n    }\n\n    return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n    var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n    for (var i = chain.length - 1; i >= 0; --i) {\n        var obj;\n        var root = chain[i];\n\n        if (root === '[]' && options.parseArrays) {\n            obj = [].concat(leaf);\n        } else {\n            obj = options.plainObjects ? Object.create(null) : {};\n            var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n            var index = parseInt(cleanRoot, 10);\n            if (!options.parseArrays && cleanRoot === '') {\n                obj = { 0: leaf };\n            } else if (\n                !isNaN(index)\n                && root !== cleanRoot\n                && String(index) === cleanRoot\n                && index >= 0\n                && (options.parseArrays && index <= options.arrayLimit)\n            ) {\n                obj = [];\n                obj[index] = leaf;\n            } else {\n                obj[cleanRoot] = leaf;\n            }\n        }\n\n        leaf = obj; // eslint-disable-line no-param-reassign\n    }\n\n    return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n    if (!givenKey) {\n        return;\n    }\n\n    // Transform dot notation to bracket notation\n    var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n    // The regex chunks\n\n    var brackets = /(\\[[^[\\]]*])/;\n    var child = /(\\[[^[\\]]*])/g;\n\n    // Get the parent\n\n    var segment = options.depth > 0 && brackets.exec(key);\n    var parent = segment ? key.slice(0, segment.index) : key;\n\n    // Stash the parent if it exists\n\n    var keys = [];\n    if (parent) {\n        // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n        if (!options.plainObjects && has.call(Object.prototype, parent)) {\n            if (!options.allowPrototypes) {\n                return;\n            }\n        }\n\n        keys.push(parent);\n    }\n\n    // Loop through children appending to the array until we hit depth\n\n    var i = 0;\n    while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n        i += 1;\n        if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n            if (!options.allowPrototypes) {\n                return;\n            }\n        }\n        keys.push(segment[1]);\n    }\n\n    // If there's a remainder, just add whatever is left\n\n    if (segment) {\n        keys.push('[' + key.slice(segment.index) + ']');\n    }\n\n    return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n    if (!opts) {\n        return defaults;\n    }\n\n    if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n        throw new TypeError('Decoder has to be a function.');\n    }\n\n    if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n        throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n    }\n    var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n    return {\n        allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n        allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n        arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n        charset: charset,\n        charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n        comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n        decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n        delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n        // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n        depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n        ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n        interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n        parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n        parseArrays: opts.parseArrays !== false,\n        plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n        strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n    };\n};\n\nmodule.exports = function (str, opts) {\n    var options = normalizeParseOptions(opts);\n\n    if (str === '' || str === null || typeof str === 'undefined') {\n        return options.plainObjects ? Object.create(null) : {};\n    }\n\n    var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n    var obj = options.plainObjects ? Object.create(null) : {};\n\n    // Iterate over the keys and setup the new object\n\n    var keys = Object.keys(tempObj);\n    for (var i = 0; i < keys.length; ++i) {\n        var key = keys[i];\n        var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n        obj = utils.merge(obj, newObj, options);\n    }\n\n    return utils.compact(obj);\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n    formats: formats,\n    parse: parse,\n    stringify: stringify\n};\n","var baseGetTag = require('./_baseGetTag'),\n    getPrototype = require('./_getPrototype'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar cloneDeep = _interopDefault(require('lodash/cloneDeep'));\nvar qs = _interopDefault(require('qs'));\nvar isPlainObject = _interopDefault(require('lodash/isPlainObject'));\nvar os = require('os');\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(source, true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(source).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _slicedToArray(arr, i) {\n  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n  if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n    return;\n  }\n\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _e = undefined;\n\n  try {\n    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}\n\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nvar attempts = {};\nvar defaultsByInstance = new Map();\nvar networkErrorAttempts = 0;\nfunction rateLimit(instance, defaults) {\n  var maxRetry = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;\n  defaultsByInstance.set(instance, defaults);\n  var instanceDefaults = defaultsByInstance.get(instance);\n  var _instanceDefaults$res = instanceDefaults.responseLogger,\n      responseLogger = _instanceDefaults$res === void 0 ? function () {\n    return undefined;\n  } : _instanceDefaults$res,\n      _instanceDefaults$req = instanceDefaults.requestLogger,\n      requestLogger = _instanceDefaults$req === void 0 ? function () {\n    return undefined;\n  } : _instanceDefaults$req;\n  instance.interceptors.request.use(function (config) {\n    requestLogger(config);\n    return config;\n  }, function (error) {\n    return Promise.reject(error);\n  });\n  instance.interceptors.response.use(function (response) {\n    // we don't need to do anything here\n    responseLogger(response);\n    return response;\n  }, function (error) {\n    var response = error.response,\n        config = error.config; // Do not retry if it is disabled or no request config exists (not an axios error)\n\n    if (!config || !instanceDefaults.retryOnError) {\n      return Promise.reject(error);\n    }\n\n    var retryErrorType = null;\n    var wait = 0; // Errors without response did not recieve anything from the server\n\n    if (!response) {\n      retryErrorType = 'Connection';\n      networkErrorAttempts++;\n\n      if (networkErrorAttempts > maxRetry) {\n        error.attempts = networkErrorAttempts;\n        return Promise.reject(error);\n      }\n\n      wait = Math.pow(Math.SQRT2, networkErrorAttempts);\n      response = {};\n    } else {\n      networkErrorAttempts = 0;\n    }\n\n    if (response.status >= 500 && response.status < 600) {\n      // 5** errors are server related\n      retryErrorType = \"Server \".concat(response.status);\n      var headers = response.headers || {};\n      var requestId = headers['x-contentful-request-id'] || null;\n      attempts[requestId] = attempts[requestId] || 0;\n      attempts[requestId]++; // we reject if there are too many errors with the same request id or request id is not defined\n\n      if (attempts[requestId] > maxRetry || !requestId) {\n        error.attempts = attempts[requestId];\n        return Promise.reject(error);\n      }\n\n      wait = Math.pow(Math.SQRT2, attempts[requestId]);\n    } else if (response.status === 429) {\n      // 429 errors are exceeded rate limit exceptions\n      retryErrorType = 'Rate limit'; // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413\n\n      if (response.headers && error.response.headers['x-contentful-ratelimit-reset']) {\n        wait = response.headers['x-contentful-ratelimit-reset'];\n      }\n    }\n\n    var delay = function delay(ms) {\n      return new Promise(function (resolve) {\n        setTimeout(resolve, ms);\n      });\n    };\n\n    if (retryErrorType) {\n      // convert to ms and add jitter\n      wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);\n      instanceDefaults.logHandler('warning', \"\".concat(retryErrorType, \" error occurred. Waiting for \").concat(wait, \" ms before retrying...\"));\n      /* Somehow between the interceptor and retrying the request the httpAgent/httpsAgent gets transformed from an Agent-like object\n         to a regular object, causing failures on retries after rate limits. Removing these properties here fixes the error, but retry\n         requests still use the original http/httpsAgent property */\n\n      delete config.httpAgent;\n      delete config.httpsAgent;\n      return delay(wait).then(function () {\n        return instance(config);\n      });\n    }\n\n    return Promise.reject(error);\n  });\n}\n\nfunction isNode() {\n  /**\n   * Polyfills of 'process' might set process.browser === true\n   *\n   * See:\n   * https://github.com/webpack/node-libs-browser/blob/master/mock/process.js#L8\n   * https://github.com/defunctzombie/node-process/blob/master/browser.js#L156\n  **/\n  return typeof process !== 'undefined' && !process.browser;\n}\nfunction getNodeVersion() {\n  return process.versions.node ? \"v\".concat(process.versions.node) : process.version;\n}\n\n// Also enforces toplevel domain specified, no spaces and no protocol\n\nvar HOST_REGEX = /^(?!\\w+:\\/\\/)([^\\s:]+\\.[^\\s:]+)(?::(\\d+))?(?!:)$/;\n/**\n * Create pre configured axios instance\n * @private\n * @param {Object} axios - Axios library\n * @param {Object} httpClientParams - Initialization parameters for the HTTP client\n * @prop {string} space - Space ID\n * @prop {string} accessToken - Access Token\n * @prop {boolean=} insecure - If we should use http instead\n * @prop {string=} host - Alternate host\n * @prop {Object=} httpAgent - HTTP agent for node\n * @prop {Object=} httpsAgent - HTTPS agent for node\n * @prop {function=} adapter - Axios adapter to handle requests\n * @prop {function=} requestLogger - Gets called on every request triggered by the SDK, takes the axios request config as an argument\n * @prop {function=} responseLogger - Gets called on every response, takes axios response object as an argument\n * @prop {Object=} proxy - Axios proxy config\n * @prop {Object=} headers - Additional headers\n * @prop {function=} logHandler - A log handler function to process given log messages & errors. Receives the log level (error, warning & info) and the actual log data (Error object or string). (Default can be found here: https://github.com/contentful/contentful-sdk-core/blob/master/lib/create-http-client.js)\n * @return {Object} Initialized axios instance\n */\n\nfunction createHttpClient(axios, options) {\n  var defaultConfig = {\n    insecure: false,\n    retryOnError: true,\n    logHandler: function logHandler(level, data) {\n      if (level === 'error' && data) {\n        var title = [data.name, data.message].filter(function (a) {\n          return a;\n        }).join(' - ');\n        console.error(\"[error] \".concat(title));\n        console.error(data);\n        return;\n      }\n\n      console.log(\"[\".concat(level, \"] \").concat(data));\n    },\n    // Passed to axios\n    headers: {},\n    httpAgent: false,\n    httpsAgent: false,\n    timeout: 30000,\n    proxy: false,\n    basePath: '',\n    adapter: false,\n    maxContentLength: 1073741824 // 1GB\n\n  };\n\n  var config = _objectSpread2({}, defaultConfig, {}, options);\n\n  if (!config.accessToken) {\n    var missingAccessTokenError = new TypeError('Expected parameter accessToken');\n    config.logHandler('error', missingAccessTokenError);\n    throw missingAccessTokenError;\n  } // Construct axios baseURL option\n\n\n  var protocol = config.insecure ? 'http' : 'https';\n  var space = config.space ? \"\".concat(config.space, \"/\") : '';\n  var hostname = config.defaultHostname;\n  var port = config.insecure ? 80 : 443;\n\n  if (HOST_REGEX.test(config.host)) {\n    var parsed = config.host.split(':');\n\n    if (parsed.length === 2) {\n      var _parsed = _slicedToArray(parsed, 2);\n\n      hostname = _parsed[0];\n      port = _parsed[1];\n    } else {\n      hostname = parsed[0];\n    }\n  } // Ensure that basePath does start but not end with a slash\n\n\n  if (config.basePath) {\n    config.basePath = \"/\".concat(config.basePath.split('/').filter(Boolean).join('/'));\n  }\n\n  var baseURL = options.baseURL || \"\".concat(protocol, \"://\").concat(hostname, \":\").concat(port).concat(config.basePath, \"/spaces/\").concat(space);\n\n  if (!config.headers['Authorization']) {\n    config.headers['Authorization'] = 'Bearer ' + config.accessToken;\n  } // Set these headers only for node because browsers don't like it when you\n  // override user-agent or accept-encoding.\n  // The SDKs should set their own X-Contentful-User-Agent.\n\n\n  if (isNode()) {\n    config.headers['user-agent'] = 'node.js/' + getNodeVersion();\n    config.headers['Accept-Encoding'] = 'gzip';\n  }\n\n  var axiosOptions = {\n    // Axios\n    baseURL: baseURL,\n    headers: config.headers,\n    httpAgent: config.httpAgent,\n    httpsAgent: config.httpsAgent,\n    paramsSerializer: qs.stringify,\n    proxy: config.proxy,\n    timeout: config.timeout,\n    adapter: config.adapter,\n    maxContentLength: config.maxContentLength,\n    // Contentful\n    logHandler: config.logHandler,\n    responseLogger: config.responseLogger,\n    requestLogger: config.requestLogger,\n    retryOnError: config.retryOnError\n  };\n  var instance = axios.create(axiosOptions);\n  instance.httpClientParams = options;\n  /**\n   * Creates a new axios instance with the same default base parameters as the\n   * current one, and with any overrides passed to the newParams object\n   * This is useful as the SDKs use dependency injection to get the axios library\n   * and the version of the library comes from different places depending\n   * on whether it's a browser build or a node.js build.\n   * @private\n   * @param {Object} httpClientParams - Initialization parameters for the HTTP client\n   * @return {Object} Initialized axios instance\n   */\n\n  instance.cloneWithNewParams = function (newParams) {\n    return createHttpClient(axios, _objectSpread2({}, cloneDeep(options), {}, newParams));\n  };\n\n  rateLimit(instance, axiosOptions, config.retryLimit);\n  return instance;\n}\n\n/**\n * Creates request parameters configuration by parsing an existing query object\n * @private\n * @param {Object} query\n * @return {Object} Config object with `params` property, ready to be used in axios\n */\n\nfunction createRequestConfig(_ref) {\n  var query = _ref.query;\n  var config = {};\n  delete query.resolveLinks;\n  config.params = cloneDeep(query);\n  return config;\n}\n\nfunction enforceObjPath(obj, path) {\n  if (!(path in obj)) {\n    var err = new Error();\n    err.name = 'PropertyMissing';\n    err.message = \"Required property \".concat(path, \" missing from:\\n\\n\").concat(JSON.stringify(obj), \"\\n\\n\");\n    throw err;\n  }\n\n  return true;\n}\n\nfunction freezeObjectDeep(obj) {\n  Object.keys(obj).forEach(function (key) {\n    var value = obj[key];\n\n    if (isPlainObject(value)) {\n      freezeObjectDeep(value);\n    }\n  });\n  return Object.freeze(obj);\n}\n\nfunction freezeSys(obj) {\n  freezeObjectDeep(obj.sys || {});\n  return obj;\n}\n\nfunction isReactNative() {\n  return typeof window !== 'undefined' && 'navigator' in window && 'product' in window.navigator && window.navigator.product === 'ReactNative';\n}\n\nfunction getBrowserOS() {\n  if (!window) {\n    return null;\n  }\n\n  var userAgent = window.navigator.userAgent;\n  var platform = window.navigator.platform;\n  var macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n  var windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n  var iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n  var os = null;\n\n  if (macosPlatforms.indexOf(platform) !== -1) {\n    os = 'macOS';\n  } else if (iosPlatforms.indexOf(platform) !== -1) {\n    os = 'iOS';\n  } else if (windowsPlatforms.indexOf(platform) !== -1) {\n    os = 'Windows';\n  } else if (/Android/.test(userAgent)) {\n    os = 'Android';\n  } else if (/Linux/.test(platform)) {\n    os = 'Linux';\n  }\n\n  return os;\n}\n\nfunction getNodeOS() {\n  var os$1 = os.platform() || 'linux';\n  var version = os.release() || '0.0.0';\n  var osMap = {\n    android: 'Android',\n    aix: 'Linux',\n    darwin: 'macOS',\n    freebsd: 'Linux',\n    linux: 'Linux',\n    openbsd: 'Linux',\n    sunos: 'Linux',\n    win32: 'Windows'\n  };\n\n  if (os$1 in osMap) {\n    return \"\".concat(osMap[os$1] || 'Linux', \"/\").concat(version);\n  }\n\n  return null;\n}\n\nfunction getUserAgentHeader(sdk, application, integration, feature) {\n  var headerParts = [];\n\n  if (application) {\n    headerParts.push(\"app \".concat(application));\n  }\n\n  if (integration) {\n    headerParts.push(\"integration \".concat(integration));\n  }\n\n  if (feature) {\n    headerParts.push('feature ' + feature);\n  }\n\n  headerParts.push(\"sdk \".concat(sdk));\n  var os = null;\n\n  try {\n    if (isReactNative()) {\n      os = getBrowserOS();\n      headerParts.push('platform ReactNative');\n    } else if (isNode()) {\n      os = getNodeOS();\n      headerParts.push(\"platform node.js/\".concat(getNodeVersion()));\n    } else {\n      os = getBrowserOS();\n      headerParts.push(\"platform browser\");\n    }\n  } catch (e) {\n    os = null;\n  }\n\n  if (os) {\n    headerParts.push(\"os \".concat(os));\n  }\n\n  return \"\".concat(headerParts.filter(function (item) {\n    return item !== '';\n  }).join('; '), \";\");\n}\n\n/**\n * Mixes in a method to return just a plain object with no additional methods\n * @private\n * @param {Object} data - Any plain JSON response returned from the API\n * @return {Object} Enhanced object with toPlainObject method\n */\n\nfunction toPlainObject(data) {\n  return Object.defineProperty(data, 'toPlainObject', {\n    enumerable: false,\n    configurable: false,\n    writable: false,\n    value: function value() {\n      return cloneDeep(this);\n    }\n  });\n}\n\nexports.createHttpClient = createHttpClient;\nexports.createRequestConfig = createRequestConfig;\nexports.enforceObjPath = enforceObjPath;\nexports.freezeSys = freezeSys;\nexports.getUserAgentHeader = getUserAgentHeader;\nexports.toPlainObject = toPlainObject;\n","import { toPlainObject, freezeSys } from 'contentful-sdk-core';\n/**\n * @memberof Entities\n * @typedef Space\n * @prop {Object} sys - System metadata\n * @prop {string} sys.id - Space id\n * @prop {string} sys.type - Entity type\n * @prop {string} name - Space name\n * @prop {Array<string>} locales - Array with locale codes\n * @prop {function(): Object} toPlainObject() - Returns this Space as a plain JS object\n */\n\n/**\n * @private\n * @param  {Object} data - API response for a Space\n * @return {Space}\n */\n\nexport function wrapSpace(data) {\n  return freezeSys(toPlainObject(data));\n}","exports = module.exports = stringify\nexports.getSerialize = serializer\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n  return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)\n}\n\nfunction serializer(replacer, cycleReplacer) {\n  var stack = [], keys = []\n\n  if (cycleReplacer == null) cycleReplacer = function(key, value) {\n    if (stack[0] === value) return \"[Circular ~]\"\n    return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\"\n  }\n\n  return function(key, value) {\n    if (stack.length > 0) {\n      var thisPos = stack.indexOf(this)\n      ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\n      ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\n      if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)\n    }\n    else stack.push(value)\n\n    return replacer == null ? value : replacer.call(this, key, value)\n  }\n}\n","import jsonStringifySafe from 'json-stringify-safe';\nexport default function mixinStringifySafe(data) {\n  return Object.defineProperty(data, 'stringifySafe', {\n    enumerable: false,\n    configurable: false,\n    writable: false,\n    value: function value() {\n      var serializer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n      return jsonStringifySafe(this, serializer, indent, function (key, value) {\n        return {\n          sys: {\n            type: 'Link',\n            linkType: 'Entry',\n            id: value.sys.id,\n            circular: true\n          }\n        };\n      });\n    }\n  });\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _cloneDeep = require('lodash/cloneDeep');\n\nvar _cloneDeep2 = _interopRequireDefault(_cloneDeep);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar UNRESOLVED_LINK = {}; // unique object to avoid polyfill bloat using Symbol()\n\n/**\n * isLink Function\n * Checks if the object has sys.type \"Link\"\n * @param object\n */\nvar isLink = function isLink(object) {\n  return object && object.sys && object.sys.type === 'Link';\n};\n\n/**\n * findNormalizableLinkInArray\n *\n * @param array\n * @param predicate\n * @return {*}\n */\nvar findNormalizableLinkInArray = function findNormalizableLinkInArray(array, predicate) {\n  for (var i = 0, len = array.length; i < len; i++) {\n    if (predicate(array[i])) {\n      return array[i];\n    }\n  }\n  return UNRESOLVED_LINK;\n};\n\n/**\n * getLink Function\n *\n * @param response\n * @param link\n * @return {undefined}\n */\nvar getLink = function getLink(allEntries, link) {\n  var _link$sys = link.sys,\n      type = _link$sys.linkType,\n      id = _link$sys.id;\n\n\n  var predicate = function predicate(_ref) {\n    var sys = _ref.sys;\n    return sys.type === type && sys.id === id;\n  };\n\n  return findNormalizableLinkInArray(allEntries, predicate);\n};\n\n/**\n * cleanUpLinks Function\n * - Removes unresolvable links from Arrays and Objects\n *\n * @param {Object[]|Object} input\n */\nvar cleanUpLinks = function cleanUpLinks(input) {\n  if (Array.isArray(input)) {\n    return input.filter(function (val) {\n      return val !== UNRESOLVED_LINK;\n    });\n  }\n  for (var key in input) {\n    if (input[key] === UNRESOLVED_LINK) {\n      delete input[key];\n    }\n  }\n  return input;\n};\n\n/**\n * walkMutate Function\n * @param input\n * @param predicate\n * @param mutator\n * @return {*}\n */\nvar walkMutate = function walkMutate(input, predicate, mutator, removeUnresolved) {\n  if (predicate(input)) {\n    return mutator(input);\n  }\n\n  if (input && typeof input === 'object') {\n    for (var key in input) {\n      if (input.hasOwnProperty(key)) {\n        input[key] = walkMutate(input[key], predicate, mutator, removeUnresolved);\n      }\n    }\n    if (removeUnresolved) {\n      input = cleanUpLinks(input);\n    }\n  }\n  return input;\n};\n\nvar normalizeLink = function normalizeLink(allEntries, link, removeUnresolved) {\n  var resolvedLink = getLink(allEntries, link);\n  if (resolvedLink === UNRESOLVED_LINK) {\n    return removeUnresolved ? resolvedLink : link;\n  }\n  return resolvedLink;\n};\n\nvar makeEntryObject = function makeEntryObject(item, itemEntryPoints) {\n  if (!Array.isArray(itemEntryPoints)) {\n    return item;\n  }\n\n  var entryPoints = Object.keys(item).filter(function (ownKey) {\n    return itemEntryPoints.indexOf(ownKey) !== -1;\n  });\n\n  return entryPoints.reduce(function (entryObj, entryPoint) {\n    entryObj[entryPoint] = item[entryPoint];\n    return entryObj;\n  }, {});\n};\n\n/**\n * resolveResponse Function\n * Resolves contentful response to normalized form.\n * @param {Object} response Contentful response\n * @param {Object} options\n * @param {Boolean} options.removeUnresolved - Remove unresolved links default:false\n * @param {Array<String>} options.itemEntryPoints - Resolve links only in those item properties\n * @return {Object}\n */\nvar resolveResponse = function resolveResponse(response, options) {\n  options = options || {};\n  if (!response.items) {\n    return [];\n  }\n  var responseClone = (0, _cloneDeep2.default)(response);\n  var allIncludes = Object.keys(responseClone.includes || {}).reduce(function (all, type) {\n    return [].concat(_toConsumableArray(all), _toConsumableArray(response.includes[type]));\n  }, []);\n\n  var allEntries = [].concat(_toConsumableArray(responseClone.items), _toConsumableArray(allIncludes));\n\n  allEntries.forEach(function (item) {\n    var entryObject = makeEntryObject(item, options.itemEntryPoints);\n\n    Object.assign(item, walkMutate(entryObject, isLink, function (link) {\n      return normalizeLink(allEntries, link, options.removeUnresolved);\n    }, options.removeUnresolved));\n  });\n\n  return responseClone.items;\n};\n\nexports.default = resolveResponse;\nmodule.exports = exports['default'];","import cloneDeep from 'lodash/cloneDeep';\nimport { toPlainObject, freezeSys } from 'contentful-sdk-core';\nimport mixinStringifySafe from '../mixins/stringify-safe';\nimport resolveResponse from 'contentful-resolve-response';\n/**\n * Types of fields found in an Entry\n * @namespace EntryFields\n */\n\n/**\n * @memberof EntryFields\n * @typedef Symbol\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Text\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Integer\n * @type number\n */\n\n/**\n * @memberof EntryFields\n * @typedef Number\n * @type number\n */\n\n/**\n * @memberof EntryFields\n * @typedef Date\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Boolean\n * @type boolean\n */\n\n/**\n * @memberof EntryFields\n * @typedef Location\n * @prop {string} lat - latitude\n * @prop {string} lon - longitude\n */\n\n/**\n * A Field in an Entry can have one of the following types that can be defined in Contentful. See <a href=\"https://www.contentful.com/developers/docs/references/field-type/\">Field Types</a> for more details.\n * @memberof Entities\n * @typedef Field\n * @type EntryFields.Symbol | EntryFields.Text | EntryFields.Integer | EntryFields.Number | EntryFields.Date | EntryFields.Boolean | EntryFields.Location | Entities.Link | Array<EntryFields.Symbol|Entities.Link> | Object\n */\n\n/**\n * @memberof Entities\n * @typedef Entry\n * @prop {Entities.Sys} sys - Standard system metadata with additional entry specific properties\n * @prop {Entities.Link} sys.contentType - Content Type used by this Entry\n * @prop {string=} sys.locale - If present, indicates the locale which this entry uses\n * @prop {Object<EntryFields.Field>} fields - Object with content for each field\n * @prop {function(): Object} toPlainObject() - Returns this Entry as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw entry data\n * @return {Entry} Wrapped entry data\n */\n\nexport function wrapEntry(data) {\n  return freezeSys(toPlainObject(cloneDeep(data)));\n}\n/**\n * @memberof Entities\n * @typedef EntryCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Entities.Entry>} items\n * @prop {Array<Object>=} errors - Array of errors that might occur when retrieving entries.\n * @prop {Object<Array>=} includes - Object with arrays of includes for Entries and Assets. This will be present if resolveLinks is on, and any linked entries or assets exist. Those links will be resolved in the Entries present in the items array, but they are also present here in raw form.\n * @prop {function(): Object} toPlainObject() - Returns this Entry collection as a plain JS object\n * @prop {function(?function=, space=): Object} stringifySafe(replacer,space) - Stringifies the entry collection, accounting for circular references. Circular references will be replaced with just a Link object, with a <code>circular</code> property set to <code>true</code>. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\">MDN</a> and <a href=\"https://www.npmjs.com/package/json-stringify-safe\">json-stringify-safe</a> for more details on the arguments this method can take.\n */\n\n/**\n * Data is also mixed in with link getters if links exist and includes were requested\n * @private\n * @param {Object} data - Raw entry collection data\n * @param {Object} options - wrapper options\n * @return {EntryCollection} Wrapped entry collection data\n */\n\nexport function wrapEntryCollection(data, _ref) {\n  var resolveLinks = _ref.resolveLinks,\n      removeUnresolved = _ref.removeUnresolved;\n  var wrappedData = mixinStringifySafe(toPlainObject(cloneDeep(data)));\n\n  if (resolveLinks) {\n    wrappedData.items = resolveResponse(wrappedData, {\n      removeUnresolved: removeUnresolved,\n      itemEntryPoints: ['fields']\n    });\n  }\n\n  return freezeSys(wrappedData);\n}","import cloneDeep from 'lodash/cloneDeep';\nimport { toPlainObject, freezeSys } from 'contentful-sdk-core';\n/**\n * @memberof Entities\n * @typedef Asset\n * @prop {Entities.Sys} sys - Standard system metadata with additional entry specific properties\n * @prop {string=} sys.locale - If present, indicates the locale which this asset uses\n * @prop {Object} fields - Object with content for each field\n * @prop {string} fields.title - Title for this asset\n * @prop {string} fields.description - Description for this asset\n * @prop {Object} fields.file - File object for this asset\n * @prop {string} fields.file.fileName - Name for the file\n * @prop {string} fields.file.contentType - Mime type for the file\n * @prop {string} fields.file.url - Url where the file is available at.\n * @prop {Object} fields.file.details - Details for the file, depending on file type (example: image size in bytes, etc)\n * @prop {function(): Object} toPlainObject() - Returns this Asset as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw asset data\n * @return {Asset} Wrapped asset data\n */\n\nexport function wrapAsset(data) {\n  return freezeSys(toPlainObject(cloneDeep(data)));\n}\n/**\n * @memberof Entities\n * @typedef AssetCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Entities.Asset>} items\n * @prop {function(): Object} toPlainObject() - Returns this Asset collection as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw asset collection data\n * @return {AssetCollection} Wrapped asset collection data\n */\n\nexport function wrapAssetCollection(data) {\n  return freezeSys(toPlainObject(cloneDeep(data)));\n}","import cloneDeep from 'lodash/cloneDeep';\nimport { toPlainObject, freezeSys } from 'contentful-sdk-core';\n/**\n * @memberof Entities\n * @typedef ContentType\n * @prop {Entities.Sys} sys - System metadata\n * @prop {string} name\n * @prop {string} description\n * @prop {string} displayField - Field used as the main display field for Entries\n * @prop {string} Array<Field> - All the fields contained in this Content Type\n * @prop {function(): Object} toPlainObject() - Returns this Content Type as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw content type data\n * @return {ContentType} Wrapped content type data\n */\n\nexport function wrapContentType(data) {\n  return freezeSys(toPlainObject(cloneDeep(data)));\n}\n/**\n * @memberof Entities\n * @typedef ContentTypeCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Entities.ContentType>} items\n * @prop {function(): Object} toPlainObject() - Returns this Content Type collection as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw content type collection data\n * @return {ContentTypeCollection} Wrapped content type collection data\n */\n\nexport function wrapContentTypeCollection(data) {\n  return freezeSys(toPlainObject(cloneDeep(data)));\n}","import cloneDeep from 'lodash/cloneDeep';\nimport { toPlainObject, freezeSys } from 'contentful-sdk-core';\n/**\n * @memberof Entities\n * @typedef Locale\n * @prop {Entities.Sys} sys - Standard system metadata with additional entry specific properties\n * @prop {string} name - locale name (example: English)\n * @prop {string} code - locale code (example: en-US)\n * @prop {string} fallbackCode - the locale code to fallback to when there is not content for the current locale\n * @prop {boolean} default - If this is the default locale\n * @prop {boolean} optional - If the locale needs to be filled in on entries or not\n * @prop {function(): Object} toPlainObject() - Returns this Locale as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw locale data\n * @return {Locale} Wrapped locale data\n */\n\nexport function wrapLocale(data) {\n  return freezeSys(toPlainObject(cloneDeep(data)));\n}\n/**\n * @memberof Entities\n * @typedef LocaleCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Entities.Locale>} items\n * @prop {function(): Object} toPlainObject() - Returns this Locale collection as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} data - Raw locale collection data\n * @return {LocaleCollection} Wrapped locale collection data\n */\n\nexport function wrapLocaleCollection(data) {\n  return freezeSys(toPlainObject(cloneDeep(data)));\n}","import * as space from './space';\nimport * as entry from './entry';\nimport * as asset from './asset';\nimport * as contentType from './content-type';\nimport * as locale from './locale';\nexport default {\n  space: space,\n  entry: entry,\n  asset: asset,\n  contentType: contentType,\n  locale: locale\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * See <a href=\"https://www.contentful.com/developers/docs/concepts/sync/\">Synchronization</a> for more information.\n * @namespace Sync\n */\nimport { createRequestConfig, freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport resolveResponse from 'contentful-resolve-response';\nimport mixinStringifySafe from './mixins/stringify-safe';\n/**\n * @memberof Sync\n * @typedef SyncCollection\n * @prop {Array<Entities.Entry>} entries - All existing entries on first sync. New and updated entries on subsequent syncs.\n * @prop {Array<Entities.Asset>} assets - All existing assets on first sync. New and updated assets on subsequent syncs.\n * @prop {Array<Sync.DeletedEntry>} deletedEntries - List of deleted Entries since last sync\n * @prop {Array<Sync.DeletedAsset>} deletedAssets - List of deleted Assets since last sync\n * @prop {string} nextSyncToken - Token to be sent to the next sync call\n * @prop {function(): Object} toPlainObject() - Returns this Sync collection as a plain JS object\n * @prop {function(?function=, space=): Object} stringifySafe(replacer,space) - Stringifies the Sync collection, accounting for circular references. Circular references will be replaced with just a Link object, with a <code>circular</code> property set to <code>true</code>. See <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\">MDN</a> and <a href=\"https://www.npmjs.com/package/json-stringify-safe\">json-stringify-safe</a> for more details on the arguments this method can take.\n */\n\n/**\n * Deleted Entries are the same as Entries, but only appear on the sync API.\n * @memberof Sync\n * @typedef DeletedEntry\n * @type Entities.Entry\n */\n\n/**\n * Deleted Assets are the same as Assets, but only appear on the sync API.\n * @memberof Sync\n * @typedef DeletedAsset\n * @type Entities.Asset\n */\n\n/**\n * This module retrieves all the available pages for a sync operation\n * @private\n * @param {Object} http - HTTP client\n * @param {Object} query - Query object\n * @param {Object} options - Sync options object\n * @param {boolean} [options.resolveLinks = true] - If links should be resolved\n * @param {boolean} [options.removeUnresolved = false] - If unresolvable links should get removed\n * @param {boolean} [options.paginate = true] - If further sync pages should automatically be crawled\n * @return {Promise<SyncCollection>}\n */\n\nexport default function pagedSync(http, query) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n  if (!query || !query.initial && !query.nextSyncToken && !query.nextPageToken) {\n    throw new Error('Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing');\n  }\n\n  if (query && query.content_type && !query.type) {\n    query.type = 'Entry';\n  } else if (query && query.content_type && query.type && query.type !== 'Entry') {\n    throw new Error('When using the `content_type` filter your `type` parameter cannot be different from `Entry`.');\n  }\n\n  var defaultOptions = {\n    resolveLinks: true,\n    removeUnresolved: false,\n    paginate: true\n  };\n\n  var _defaultOptions$optio = _objectSpread({}, defaultOptions, {}, options),\n      resolveLinks = _defaultOptions$optio.resolveLinks,\n      removeUnresolved = _defaultOptions$optio.removeUnresolved,\n      paginate = _defaultOptions$optio.paginate;\n\n  var syncOptions = {\n    paginate: paginate\n  };\n  return getSyncPage(http, [], query, syncOptions).then(function (response) {\n    // clones response.items used in includes because we don't want these to be mutated\n    if (resolveLinks) {\n      response.items = resolveResponse(response, {\n        removeUnresolved: removeUnresolved,\n        itemEntryPoints: ['fields']\n      });\n    } // maps response items again after getters are attached\n\n\n    var mappedResponseItems = mapResponseItems(response.items);\n\n    if (response.nextSyncToken) {\n      mappedResponseItems.nextSyncToken = response.nextSyncToken;\n    }\n\n    if (response.nextPageToken) {\n      mappedResponseItems.nextPageToken = response.nextPageToken;\n    }\n\n    return freezeSys(mixinStringifySafe(toPlainObject(mappedResponseItems)));\n  }, function (error) {\n    throw error;\n  });\n}\n/**\n * @private\n * @param {Array<Entities.Entry|Entities.Array|Sync.DeletedEntry|Sync.DeletedAsset>} items\n * @return {Object} Entities mapped to an object for each entity type\n */\n\nfunction mapResponseItems(items) {\n  var reducer = function reducer(type) {\n    return function (accumulated, item) {\n      if (item.sys.type === type) {\n        accumulated.push(toPlainObject(item));\n      }\n\n      return accumulated;\n    };\n  };\n\n  return {\n    entries: items.reduce(reducer('Entry'), []),\n    assets: items.reduce(reducer('Asset'), []),\n    deletedEntries: items.reduce(reducer('DeletedEntry'), []),\n    deletedAssets: items.reduce(reducer('DeletedAsset'), [])\n  };\n}\n/**\n * If the response contains a nextPageUrl, extracts the sync token to get the\n * next page and calls itself again with that token.\n * Otherwise, if the response contains a nextSyncUrl, extracts the sync token\n * and returns it.\n * On each call of this function, any retrieved items are collected in the\n * supplied items array, which gets returned in the end\n * @private\n * @param {Object} http\n * @param {Array<Entities.Entry|Entities.Array|Sync.DeletedEntry|Sync.DeletedAsset>} items\n * @param {Object} query\n * @param {Object} options - Sync page options object\n * @param {boolean} [options.paginate = true] - If further sync pages should automatically be crawled\n * @return {Promise<{items: Array, nextSyncToken: string}>}\n */\n\n\nfunction getSyncPage(http, items, query, _ref) {\n  var paginate = _ref.paginate;\n\n  if (query.nextSyncToken) {\n    query.sync_token = query.nextSyncToken;\n    delete query.nextSyncToken;\n  }\n\n  if (query.nextPageToken) {\n    query.sync_token = query.nextPageToken;\n    delete query.nextPageToken;\n  }\n\n  if (query.sync_token) {\n    delete query.initial;\n    delete query.type;\n    delete query.content_type;\n    delete query.limit;\n  }\n\n  return http.get('sync', createRequestConfig({\n    query: query\n  })).then(function (response) {\n    var data = response.data;\n    items = items.concat(data.items);\n\n    if (data.nextPageUrl) {\n      if (paginate) {\n        delete query.initial;\n        query.sync_token = getToken(data.nextPageUrl);\n        return getSyncPage(http, items, query, {\n          paginate: paginate\n        });\n      }\n\n      return {\n        items: items,\n        nextPageToken: getToken(data.nextPageUrl)\n      };\n    } else if (data.nextSyncUrl) {\n      return {\n        items: items,\n        nextSyncToken: getToken(data.nextSyncUrl)\n      };\n    }\n  });\n}\n/**\n * Extracts token out of an url\n * @private\n */\n\n\nfunction getToken(url) {\n  var urlParts = url.split('?');\n  return urlParts.length > 0 ? urlParts[1].replace('sync_token=', '') : '';\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Contentful Delivery API Client. Contains methods which allow access to the\n * different kinds of entities present in Contentful (Entries, Assets, etc).\n * @namespace ContentfulClientAPI\n * @see Entities\n */\n\n/**\n * The different kinds of top level entities you can find in Contentful\n * @namespace Entities\n */\n\n/**\n * System metadata. See <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/common-resource-attributes\">Common Resource Attributes</a> for more details.\n * @memberof Entities\n * @typedef Sys\n * @prop {string} type\n * @prop {string} id\n * @prop {Entities.Link} space\n * @prop {string} createdAt\n * @prop {string} updatedAt\n * @prop {number} revision\n */\n\n/**\n * Link to another entity. See <a href=\"https://www.contentful.com/developers/docs/concepts/links/\">Links</a> for more details.\n * @memberof Entities\n * @typedef Link\n * @prop {string} type - type of this entity. Always link.\n * @prop {string} id\n * @prop {string} linkType - type of this link. If defined, either Entry or Asset\n */\n\n/**\n * @memberof ContentfulClientAPI\n * @typedef {Object} ClientAPI\n * @prop {function} getSpace\n * @prop {function} getContentType\n * @prop {function} getContentTypes\n * @prop {function} getEntry\n * @prop {function} getEntries\n * @prop {function} getAsset\n * @prop {function} getAssets\n * @prop {function} parseEntries\n * @prop {function} sync\n */\nimport { createRequestConfig } from 'contentful-sdk-core';\nimport entities from './entities';\nimport pagedSync from './paged-sync';\n/**\n * Creates API object with methods to access functionality from Contentful's\n * Delivery API\n * @private\n * @param {Object} params - API initialization params\n * @prop {Object} http - HTTP client instance\n * @prop {Object} entities - Object with wrapper methods for each kind of entity\n * @prop {Function} getGlobalOptions - Link resolver preconfigured with global setting\n * @return {ClientAPI}\n */\n\nexport default function createContentfulApi(_ref) {\n  var http = _ref.http,\n      getGlobalOptions = _ref.getGlobalOptions;\n  var wrapSpace = entities.space.wrapSpace;\n  var _entities$contentType = entities.contentType,\n      wrapContentType = _entities$contentType.wrapContentType,\n      wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;\n  var _entities$entry = entities.entry,\n      wrapEntry = _entities$entry.wrapEntry,\n      wrapEntryCollection = _entities$entry.wrapEntryCollection;\n  var _entities$asset = entities.asset,\n      wrapAsset = _entities$asset.wrapAsset,\n      wrapAssetCollection = _entities$asset.wrapAssetCollection;\n  var wrapLocaleCollection = entities.locale.wrapLocaleCollection;\n\n  var notFoundError = function notFoundError(id) {\n    var error = new Error('The resource could not be found.');\n    error.sys = {\n      type: 'Error',\n      id: 'NotFound'\n    };\n    error.details = {\n      type: 'Entry',\n      id: id,\n      environment: getGlobalOptions().environment,\n      space: getGlobalOptions().space\n    };\n    return error;\n  };\n\n  function errorHandler(error) {\n    if (error.data) {\n      throw error.data;\n    }\n\n    if (error.response && error.response.data) {\n      throw error.response.data;\n    }\n\n    throw error;\n  }\n  /**\n   * Gets the Space which the client is currently configured to use\n   * @memberof ContentfulClientAPI\n   * @return {Promise<Entities.Space>} Promise for a Space\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   * // returns the space object with the above <space-id>\n   * client.getSpace()\n   * .then((space) => console.log(space))\n   * .catch(console.error)\n   */\n\n\n  function getSpace() {\n    switchToSpace(http);\n    return http.get('').then(function (response) {\n      return wrapSpace(response.data);\n    }, errorHandler);\n  }\n  /**\n   * Gets a Content Type\n   * @memberof ContentfulClientAPI\n   * @param  {string} id\n   * @return {Promise<Entities.ContentType>} Promise for a Content Type\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   *\n   * client.getContentType('<content_type_id>')\n   * .then((contentType) => console.log(contentType))\n   * .catch(console.error)\n   */\n\n\n  function getContentType(id) {\n    switchToEnvironment(http);\n    return http.get('content_types/' + id).then(function (response) {\n      return wrapContentType(response.data);\n    }, errorHandler);\n  }\n  /**\n   * Gets a collection of Content Types\n   * @memberof ContentfulClientAPI\n   * @param  {Object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<Entities.ContentTypeCollection>} Promise for a collection of Content Types\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   *\n   * client.getContentTypes()\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n\n\n  function getContentTypes() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    switchToEnvironment(http);\n    return http.get('content_types', createRequestConfig({\n      query: query\n    })).then(function (response) {\n      return wrapContentTypeCollection(response.data);\n    }, errorHandler);\n  }\n  /**\n   * Gets an Entry\n   * @memberof ContentfulClientAPI\n   * @param  {string} id\n   * @param  {Object=} query - Object with search parameters. In this method it's only useful for `locale`.\n   * @return {Promise<Entities.Entry>} Promise for an Entry\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   *\n   * client.getEntry('<entry_id>')\n   * .then((entry) => console.log(entry))\n   * .catch(console.error)\n   */\n\n\n  function getEntry(id) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    if (!id) {\n      return Promise.reject(notFoundError(id));\n    }\n\n    return this.getEntries(_objectSpread({\n      'sys.id': id\n    }, query)).then(function (response) {\n      if (response.items.length > 0) {\n        return wrapEntry(response.items[0]);\n      }\n\n      throw notFoundError(id);\n    }, errorHandler);\n  }\n  /**\n   * Gets a collection of Entries\n   * @memberof ContentfulClientAPI\n   * @param  {Object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<Entities.EntryCollection>} Promise for a collection of Entries\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   *\n   * client.getEntries()\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n\n\n  function getEntries() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    switchToEnvironment(http);\n\n    var _getGlobalOptions = getGlobalOptions(query),\n        resolveLinks = _getGlobalOptions.resolveLinks,\n        removeUnresolved = _getGlobalOptions.removeUnresolved;\n\n    normalizeSelect(query);\n    return http.get('entries', createRequestConfig({\n      query: query\n    })).then(function (response) {\n      return wrapEntryCollection(response.data, {\n        resolveLinks: resolveLinks,\n        removeUnresolved: removeUnresolved\n      });\n    }, errorHandler);\n  }\n  /**\n   * Gets an Asset\n   * @memberof ContentfulClientAPI\n   * @param  {string} id\n   * @param  {Object=} query - Object with search parameters. In this method it's only useful for `locale`.\n   * @return {Promise<Entities.Asset>} Promise for an Asset\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   *\n   * client.getAsset('<asset_id>')\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n   */\n\n\n  function getAsset(id) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    switchToEnvironment(http);\n    normalizeSelect(query);\n    return http.get('assets/' + id, createRequestConfig({\n      query: query\n    })).then(function (response) {\n      return wrapAsset(response.data);\n    }, errorHandler);\n  }\n  /**\n   * Gets a collection of Assets\n   * @memberof ContentfulClientAPI\n   * @param  {Object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<Entities.AssetCollection>} Promise for a collection of Assets\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   *\n   * client.getAssets()\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n\n\n  function getAssets() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    switchToEnvironment(http);\n    normalizeSelect(query);\n    return http.get('assets', createRequestConfig({\n      query: query\n    })).then(function (response) {\n      return wrapAssetCollection(response.data);\n    }, errorHandler);\n  }\n  /**\n   * Gets a collection of Locale\n   * @memberof ContentfulClientAPI\n   * @param  {Object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<Entities.LocaleCollection>} Promise for a collection of Locale\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   *\n   * client.getLocales()\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n\n\n  function getLocales() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    switchToEnvironment(http);\n    return http.get('locales', createRequestConfig({\n      query: query\n    })).then(function (response) {\n      return wrapLocaleCollection(response.data);\n    }, errorHandler);\n  }\n  /**\n   * Synchronizes either all the content or only new content since last sync\n   * See <a href=\"https://www.contentful.com/developers/docs/concepts/sync/\">Synchronization</a> for more information.\n   * <strong> Important note: </strong> The the sync api endpoint does not support include or link resolution.\n   * However contentful.js is doing link resolution client side if you only make an initial sync.\n   * For the delta sync (using nextSyncToken) it is not possible since the sdk wont have access to all the data to make such an operation.\n   * @memberof ContentfulClientAPI\n   * @param  {Object} query - Query object for the sync call. One of initial or nextSyncToken always needs to be specified, but not both.\n   * @param  {boolean?} query.initial - Indicates if this is the first sync. Use it if you don't have a sync token.\n   * @param  {string?} query.nextSyncToken - The token you got the last time you used this method. Ensures you only get changed content.\n   * @param  {string=} query.type - Filter by this type (all (default), Entry, Asset, Deletion, DeletedAsset or DeletedEntry)\n   * @param  {string=} query.content_type - Filter by this content type id\n   * @param  {boolean=} query.resolveLinks - When true, links to other Entries or Assets are resolved. Default: true.\n   * @param  {Object} options\n   * @param  {boolean=} [options.paginate = true] - Set to false to disable pagination\n   * @return {Promise<Sync.SyncCollection>} Promise for the collection resulting of a sync operation\n   * @example\n   * const contentful = require('contentful')\n   *\n   * const client = contentful.createClient({\n   *   space: '<space_id>',\n   *   accessToken: '<content_delivery_api_key>'\n   * })\n   *\n   * client.sync({\n   *   initial: true\n   * })\n   * .then((response) => console.log({\n   *   entries: response.entries,\n   *   assets: response.assets,\n   *   nextSyncToken: response.nextSyncToken\n   * }))\n   * .catch(console.error)\n   */\n\n\n  function sync() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n      paginate: true\n    };\n\n    var _getGlobalOptions2 = getGlobalOptions(query),\n        resolveLinks = _getGlobalOptions2.resolveLinks,\n        removeUnresolved = _getGlobalOptions2.removeUnresolved;\n\n    switchToEnvironment(http);\n    return pagedSync(http, query, _objectSpread({\n      resolveLinks: resolveLinks,\n      removeUnresolved: removeUnresolved\n    }, options));\n  }\n  /**\n  * Parse raw json data into collection of entry objects.Links will be resolved also\n  * @memberof ContentfulClientAPI\n  * @param {Object} raw json data\n  * @example\n  * let data = {items: [\n  *    {\n  *    sys: {type: 'Entry', locale: 'en-US'},\n  *    fields: {\n  *      animal: {sys: {type: 'Link', linkType: 'Animal', id: 'oink'}},\n  *      anotheranimal: {sys: {type: 'Link', linkType: 'Animal', id: 'middle-parrot'}}\n  *    }\n  *  }\n  * ],\n  * includes: {\n  *  Animal: [\n  *    {\n  *      sys: {type: 'Animal', id: 'oink', locale: 'en-US'},\n  *      fields: {\n  *        name: 'Pig',\n  *        friend: {sys: {type: 'Link', linkType: 'Animal', id: 'groundhog'}}\n  *      }\n  *    }\n  *   ]\n  *  }\n  * }\n  * console.log( data.items[0].fields.foo ); // undefined\n  * let parsedData = client.parseEntries(data);\n  * console.log( parsedData.items[0].fields.foo ); // foo\n  */\n\n\n  function parseEntries(data) {\n    var _getGlobalOptions3 = getGlobalOptions({}),\n        resolveLinks = _getGlobalOptions3.resolveLinks,\n        removeUnresolved = _getGlobalOptions3.removeUnresolved;\n\n    return wrapEntryCollection(data, {\n      resolveLinks: resolveLinks,\n      removeUnresolved: removeUnresolved\n    });\n  }\n  /*\n   * sdk relies heavily on sys metadata\n   * so we cannot omit the sys property on sdk level\n   * */\n\n\n  function normalizeSelect(query) {\n    if (query.select && !/sys/i.test(query.select)) {\n      query.select += ',sys';\n    }\n  }\n  /*\n   * Switches BaseURL to use /environments path\n   * */\n\n\n  function switchToEnvironment(http) {\n    http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;\n  }\n  /*\n   * Switches BaseURL to use /spaces path\n   * */\n\n\n  function switchToSpace(http) {\n    http.defaults.baseURL = getGlobalOptions().spaceBaseUrl;\n  }\n\n  return {\n    getSpace: getSpace,\n    getContentType: getContentType,\n    getContentTypes: getContentTypes,\n    getEntry: getEntry,\n    getEntries: getEntries,\n    getAsset: getAsset,\n    getAssets: getAssets,\n    getLocales: getLocales,\n    parseEntries: parseEntries,\n    sync: sync\n  };\n}","/**\n * Link resolution can be set globally, or it can be turned off for the methods\n * which make use of it. The local setting always overrides the global setting.\n * @private\n * @param {boolean} globalSetting - Global library setting for link resolution\n * @returns {function} Link resolver method preconfigured with global setting\n */\nexport default function createGlobalOptions(globalSettings) {\n  /**\n   * Link resolver method\n   * @param {Object} query - regular query object used for collection endpoints\n   */\n  return function getGlobalOptions(query) {\n    return Object.assign({}, globalSettings, query);\n  };\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Contentful Delivery API SDK. Allows you to create instances of a client\n * with access to the Contentful Content Delivery API.\n * @namespace contentful\n * @see ContentfulClientAPI\n */\nimport axios from 'axios';\nimport { createHttpClient, getUserAgentHeader } from 'contentful-sdk-core';\nimport createContentfulApi from './create-contentful-api';\nimport createGlobalOptions from './create-global-options';\n/**\n * Create a client instance\n * @func\n * @name createClient\n * @memberof contentful\n * @param {Object} params - Client initialization parameters\n * @prop {string} params.space - Space ID\n * @prop {string} params.accessToken - Contentful CDA Access Token\n * @prop {string} [params.environment=\"master\"] - Contentful Environment ID\n * @prop {boolean=} params.insecure - Requests will be made over http instead of the default https (default: true)\n * @prop {string=} params.host - API host (default: cdn.contentful.com). Also usable with preview.contentful.com.\n * @prop {string=} params.basePath - Path appended to the host to support gateways/proxies with custom urls.\n * @prop {Object=} params.httpAgent - Optional Node.js HTTP agent for proxying (see <a href=\"https://nodejs.org/api/http.html#http_class_http_agent\">Node.js docs</a> and <a href=\"https://www.npmjs.com/package/https-proxy-agent\">https-proxy-agent</a>)\n * @prop {Object=} params.httpsAgent - Optional Node.js HTTP agent for proxying (see <a href=\"https://nodejs.org/api/http.html#http_class_http_agent\">Node.js docs</a> and <a href=\"https://www.npmjs.com/package/https-proxy-agent\">https-proxy-agent</a>)\n * @prop {Object=} params.proxy - Optional Axios proxy (see <a href=\"https://github.com/mzabriskie/axios#request-config\"> axios docs </a>)\n * @prop {Object=} params.headers - Optional additional headers\n * @prop {function=} params.adapter - Optional axios request adapter (see <a href=\"https://github.com/mzabriskie/axios#request-config\"> axios docs </a>)\n * @prop {boolean=?} params.resolveLinks - If we should resolve links between entries (default: true)\n * @prop {boolean=?} params.removeUnresolved - If we should remove links to entries which could not be resolved (default: false)\n * @prop {boolean=?} params.retryOnError - If we should retry on errors and 429 rate limit exceptions (default: true)\n * @prop {function=} params.logHandler - A log handler function to process given log messages & errors. Receives the log level (error, warning & info) and the actual log data (Error object or string). (The default can be found at: https://github.com/contentful/contentful-sdk-core/blob/master/lib/create-http-client.js)\n * @prop {string=?} params.application - Application name and version e.g myApp/version\n * @prop {string=?} params.integration - Integration name and version e.g react/version\n * @prop {number=} params.timeout in milliseconds - connection timeout (default:30000)\n * @prop {number=} params.retryLimit - Optional number of retries before failure. Default is 5\n * @returns {ContentfulClientAPI.ClientAPI}\n * @example\n * const contentful = require('contentful')\n * const client = contentful.createClient({\n *  accessToken: 'myAccessToken',\n *  space: 'mySpaceId'\n * })\n */\n\nexport function createClient(params) {\n  if (!params.accessToken) {\n    throw new TypeError('Expected parameter accessToken');\n  }\n\n  if (!params.space) {\n    throw new TypeError('Expected parameter space');\n  }\n\n  var defaultConfig = {\n    resolveLinks: true,\n    removeUnresolved: false,\n    defaultHostname: 'cdn.contentful.com',\n    environment: 'master'\n  };\n\n  var config = _objectSpread({}, defaultConfig, {}, params);\n\n  var userAgentHeader = getUserAgentHeader(\"contentful.js/\".concat(\"0.0.0-determined-by-semantic-release\"), config.application, config.integration);\n  config.headers = _objectSpread({}, config.headers, {\n    'Content-Type': 'application/vnd.contentful.delivery.v1+json',\n    'X-Contentful-User-Agent': userAgentHeader\n  });\n  var http = createHttpClient(axios, config);\n  var getGlobalOptions = createGlobalOptions({\n    resolveLinks: config.resolveLinks,\n    environment: config.environment,\n    removeUnresolved: config.removeUnresolved,\n    spaceBaseUrl: http.defaults.baseURL,\n    environmentBaseUrl: \"\".concat(http.defaults.baseURL, \"environments/\").concat(config.environment)\n  }); // Append environment to baseURL\n\n  http.defaults.baseURL = getGlobalOptions().environmentBaseUrl; // Intercepts response and obscure the token\n\n  obscureAuthTokenInResponse(http);\n  return createContentfulApi({\n    http: http,\n    getGlobalOptions: getGlobalOptions\n  });\n}\n\nfunction obscureAuthTokenInResponse(http) {\n  http.interceptors.response.use(function (response) {\n    return response;\n  }, function (error) {\n    if (error.response && error.response.config.headers.Authorization) {\n      var token = error.response.config.headers.Authorization;\n      error.response.config.headers.Authorization = error.response.config.headers.Authorization.replace(token, \"Bearer...\".concat(token.substr(-5)));\n\n      if (error.response.request._headers && error.response.request._headers.authorization) {\n        error.response.request._headers.authorization = error.response.request._headers.authorization.replace(token, \"Bearer...\".concat(token.substr(-5)));\n      }\n\n      if (error.response.request._header) {\n        error.response.request._header = error.response.request._header.replace(token, \"Bearer...\".concat(token.substr(-5)));\n      }\n    }\n\n    return Promise.reject(error);\n  });\n}","import { ContentfulClientApi, createClient } from \"contentful\"\nimport { config } from \"dotenv\"\n\nconfig()\nconst spaceID: string = process.env.CONTENTFUL_SPACE_ID as string\nconst accessToken: string = process.env.CONTENTFUL_ACCESS_TOKEN as string\nconst environment: string = process.env.CONTENTFUL_ENVIRONMENT || \"master\"\nconst host: string = process.env.CONTENTFUL_HOST || \"cdn.contentful.com\"\n\nexport default function(): ContentfulClientApi {\n  return createClient({\n    space: spaceID,\n    environment: environment,\n    accessToken: accessToken,\n    host: host,\n  })\n}\n","import isPlainObject from 'lodash/isPlainObject';\n\n/**\n * Handles errors received from the server. Parses the error into a more useful\n * format, places it in an exception and throws it.\n * See https://www.contentful.com/developers/docs/references/errors/\n * for more details on the data received on the errorResponse.data property\n * and the expected error codes.\n * @private\n * @param {Object} errorResponse - Error received from an axios request\n * @throws {ErrorResponse}\n */\nexport default function errorHandler(errorResponse) {\n  var config = errorResponse.config,\n      response = errorResponse.response;\n\n  var errorName = void 0;\n\n  if (!isPlainObject(response) || !isPlainObject(config)) {\n    throw errorResponse;\n  }\n\n  var data = response.data;\n\n\n  var errorData = {\n    status: response.status,\n    statusText: response.statusText,\n    message: '',\n    details: {}\n\n    // Obscure the Management token\n  };if (config.headers && config.headers['Authorization']) {\n    var token = '...' + config.headers['Authorization'].substr(-5);\n    config.headers['Authorization'] = 'Bearer ' + token;\n  }\n  if (isPlainObject(config)) {\n    errorData.request = {\n      url: config.url,\n      headers: config.headers,\n      method: config.method,\n      payloadData: config.data\n    };\n  }\n  if (isPlainObject(data)) {\n    if ('requestId' in data) {\n      errorData.requestId = data.requestId || 'UNKNOWN';\n    }\n    if ('message' in data) {\n      errorData.message = data.message || '';\n    }\n    if ('details' in data) {\n      errorData.details = data.details || {};\n    }\n    if ('sys' in data) {\n      if ('id' in data.sys) {\n        errorName = data.sys.id;\n      }\n    }\n  }\n\n  var error = new Error();\n  error.name = errorName && errorName !== 'Unknown' ? errorName : response.status + ' ' + response.statusText;\n  error.message = JSON.stringify(errorData, null, '  ');\n  throw error;\n}","/**\n * This method enhances a base object which would normally contain data, with\n * methods from another object that might work on manipulating that data.\n * All the added methods are set as non enumerable, non configurable, and non\n * writable properties. This ensures that if we try to clone or stringify the\n * base object, we don't have to worry about these additional methods.\n * @private\n * @param {object} baseObject - Base object with data\n * @param {object} methodsObject - Object with methods as properties. The key\n * values used here will be the same that will be defined on the baseObject.\n */\nexport default function enhanceWithMethods(baseObject, methodsObject) {\n  return Object.keys(methodsObject).reduce(function (enhancedObject, methodName) {\n    Object.defineProperty(enhancedObject, methodName, {\n      enumerable: false,\n      configurable: false,\n      writable: false,\n      value: methodsObject[methodName]\n    });\n    return enhancedObject;\n  }, baseObject);\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Contentful Space API. Contains methods to access any operations at a space\n * level, such as creating and reading entities contained in a space.\n * @namespace ContentfulSpaceAPI\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { createRequestConfig } from 'contentful-sdk-core';\nimport errorHandler from './error-handler';\nimport entities from './entities';\n\n/**\n * @memberof ContentfulSpaceAPI\n * @typedef {object} ContentfulSpaceAPI\n * @prop {function} delete\n * @prop {function} update\n * @prop {function} getEnvironment\n * @prop {function} getEnvironments\n * @prop {function} createEnvironment\n * @prop {function} createEnvironmentWithId\n * @prop {function} getContentType\n * @prop {function} getContentTypes\n * @prop {function} createContentType\n * @prop {function} createContentTypeWithId\n * @prop {function} getEntry\n * @prop {function} getEntries\n * @prop {function} createEntry\n * @prop {function} createEntryWithId\n * @prop {function} getAsset\n * @prop {function} getAssets\n * @prop {function} createAsset\n * @prop {function} createAssetWithId\n * @prop {function} getLocale\n * @prop {function} getLocales\n * @prop {function} createLocale\n * @prop {function} getWebhook\n * @prop {function} getWebhooks\n * @prop {function} createWebhook\n * @prop {function} createWebhookWithId\n * @prop {function} getRole\n * @prop {function} getRoles\n * @prop {function} createRole\n * @prop {function} createRoleWithId\n * @prop {function} getSpaceUser\n * @prop {function} getSpaceUsers\n * @prop {function} getSpaceMembership\n * @prop {function} getSpaceMemberships\n * @prop {function} createSpaceMembership\n * @prop {function} createSpaceMembershipWithId\n * @prop {function} getApiKey\n * @prop {function} getApiKeys\n * @prop {function} createApiKey\n * @prop {function} createApiKeyWithId\n * @prop {function} getUiExtension\n * @prop {function} getUiExtensions\n * @prop {function} createUiExtension\n * @prop {function} createUiExtensionWithId\n * @prop {function} getEntrySnapshots\n * @prop {function} getContentTypeSnapshots\n * @prop {function} getEnvironmentAliases\n * @prop {function} getEnvironmentAlias\n */\n\nfunction raiseDeprecationWarning(method) {\n  console.warn(['Deprecated: Space.' + method + '() will be removed in future major versions.', null, 'Please migrate your code to use Environment.' + method + '():', 'https://contentful.github.io/contentful-management.js/contentful-management/latest/ContentfulEnvironmentAPI.html#.' + method, null].join('\\n'));\n}\n\n/**\n * Creates API object with methods to access the Space API\n * @private\n * @param {object} params - API initialization params\n * @prop {object} http - HTTP client instance\n * @prop {object} entities - Object with wrapper methods for each kind of entity\n * @return {ContentfulSpaceAPI}\n */\nexport default function createSpaceApi(_ref) {\n  var http = _ref.http,\n      httpUpload = _ref.httpUpload;\n  var wrapSpace = entities.space.wrapSpace;\n  var _entities$environment = entities.environment,\n      wrapEnvironment = _entities$environment.wrapEnvironment,\n      wrapEnvironmentCollection = _entities$environment.wrapEnvironmentCollection;\n  var _entities$contentType = entities.contentType,\n      wrapContentType = _entities$contentType.wrapContentType,\n      wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;\n  var _entities$entry = entities.entry,\n      wrapEntry = _entities$entry.wrapEntry,\n      wrapEntryCollection = _entities$entry.wrapEntryCollection;\n  var _entities$asset = entities.asset,\n      wrapAsset = _entities$asset.wrapAsset,\n      wrapAssetCollection = _entities$asset.wrapAssetCollection;\n  var _entities$locale = entities.locale,\n      wrapLocale = _entities$locale.wrapLocale,\n      wrapLocaleCollection = _entities$locale.wrapLocaleCollection;\n  var _entities$webhook = entities.webhook,\n      wrapWebhook = _entities$webhook.wrapWebhook,\n      wrapWebhookCollection = _entities$webhook.wrapWebhookCollection;\n  var _entities$role = entities.role,\n      wrapRole = _entities$role.wrapRole,\n      wrapRoleCollection = _entities$role.wrapRoleCollection;\n  var _entities$user = entities.user,\n      wrapUser = _entities$user.wrapUser,\n      wrapUserCollection = _entities$user.wrapUserCollection;\n  var _entities$spaceMember = entities.spaceMembership,\n      wrapSpaceMembership = _entities$spaceMember.wrapSpaceMembership,\n      wrapSpaceMembershipCollection = _entities$spaceMember.wrapSpaceMembershipCollection;\n  var _entities$apiKey = entities.apiKey,\n      wrapApiKey = _entities$apiKey.wrapApiKey,\n      wrapApiKeyCollection = _entities$apiKey.wrapApiKeyCollection;\n  var _entities$previewApiK = entities.previewApiKey,\n      wrapPreviewApiKey = _entities$previewApiK.wrapPreviewApiKey,\n      wrapPreviewApiKeyCollection = _entities$previewApiK.wrapPreviewApiKeyCollection;\n  var wrapSnapshotCollection = entities.snapshot.wrapSnapshotCollection;\n  var wrapEditorInterface = entities.editorInterface.wrapEditorInterface;\n  var wrapUpload = entities.upload.wrapUpload;\n  var _entities$uiExtension = entities.uiExtension,\n      wrapUiExtension = _entities$uiExtension.wrapUiExtension,\n      wrapUiExtensionCollection = _entities$uiExtension.wrapUiExtensionCollection;\n  var _entities$environment2 = entities.environmentAlias,\n      wrapEnvironmentAlias = _entities$environment2.wrapEnvironmentAlias,\n      wrapEnvironmentAliasCollection = _entities$environment2.wrapEnvironmentAliasCollection;\n\n  /**\n   * Space instances.\n   * @namespace Space\n   */\n\n  /**\n   * Deletes the space\n   * @memberof Space\n   * @func delete\n   * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.delete())\n   * .then(() => console.log('Space deleted.'))\n   * .catch(console.error)\n  */\n\n  function deleteSpace() {\n    return http.delete('').then(function (response) {}, errorHandler);\n  }\n\n  /**\n   * Updates the space\n   * @memberof Space\n   * @func update\n   * @return {Promise<Space.Space>} Promise for the updated space.\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => {\n   *   space.name = 'New name'\n   *   return space.update()\n   * })\n   * .then((space) => console.log(`Space ${space.sys.id} renamed.`)\n   * .catch(console.error)\n  */\n  function updateSpace() {\n    var raw = this.toPlainObject();\n    var data = cloneDeep(raw);\n    delete data.sys;\n    return http.put('', data, {\n      headers: {\n        'X-Contentful-Version': raw.sys.version\n      }\n    }).then(function (response) {\n      return wrapSpace(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an environment\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Environment ID\n   * @return {Promise<Environment.Environment>} Promise for an Environment\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environement_id>'))\n   * .then((environment) => console.log(environment))\n   * .catch(console.error)\n   */\n  function getEnvironment(id) {\n    return http.get('environments/' + id).then(function (response) {\n      return wrapEnvironment(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Environments\n   * @memberof ContentfulSpaceAPI\n   * @return {Promise<Environment.EnvironmentCollection>} Promise for a collection of Environment\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironments())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n  */\n  function getEnvironments() {\n    return http.get('environments').then(function (response) {\n      return wrapEnvironmentCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates an Environement\n   * @memberof ContentfulSpaceAPI\n   * @see {Environment}\n   * @param {object=} data - Object representation of the Environment to be created\n   * @return {Promise<Environment.Environment>} Promise for the newly created Environment\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createEnvironment({ name: 'Staging' }))\n   * .then((environment) => console.log(environment))\n   * .catch(console.error)\n   */\n  function createEnvironment() {\n    var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    return http.post('environments', data).then(function (response) {\n      return wrapEnvironment(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates an Environment with a custom ID\n   * @memberof ContentfulSpaceAPI\n   * @see {Environment}\n   * @param {string} id - Environment ID\n   * @param {object=} data - Object representation of the Environment to be created\n   * @param {string=} sourceEnvironmentId - ID of the source environment that will be copied to create the new environment. Default is \"master\"\n   * @return {Promise<Environment.Environment>} Promise for the newly created Environment\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createEnvironmentWithId('<environment-id>', { name: 'Staging'}, 'master'))\n   * .then((environment) => console.log(environment))\n   * .catch(console.error)\n   */\n  function createEnvironmentWithId(id) {\n    var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var sourceEnvironmentId = arguments[2];\n\n    return http.put('environments/' + id, data, {\n      headers: sourceEnvironmentId ? { 'X-Contentful-Source-Environment': sourceEnvironmentId } : {}\n    }).then(function (response) {\n      return wrapEnvironment(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a Content Type\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Content Type ID\n   * @return {Promise<ContentType.ContentType>} Promise for a Content Type\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getContentType('<content_type_id>'))\n   * .then((contentType) => console.log(contentType))\n   * .catch(console.error)\n   */\n  function getContentType(id) {\n    raiseDeprecationWarning('getContentType');\n    return http.get('content_types/' + id).then(function (response) {\n      return wrapContentType(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an EditorInterface for a ContentType\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {string} contentTypeId - Content Type ID\n   * @return {Promise<EditorInterface.EditorInterface>} Promise for an EditorInterface\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEditorInterfaceForContentType('<content_type_id>'))\n   * .then((EditorInterface) => console.log(EditorInterface))\n   * .catch(console.error)\n   */\n  function getEditorInterfaceForContentType(contentTypeId) {\n    raiseDeprecationWarning('getEditorInterfaceForContentType');\n    return http.get('content_types/' + contentTypeId + '/editor_interface').then(function (response) {\n      return wrapEditorInterface(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Content Types\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<ContentType.ContentTypeCollection>} Promise for a collection of Content Types\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getContentTypes())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n  */\n  function getContentTypes() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    raiseDeprecationWarning('getContentTypes');\n    return http.get('content_types', createRequestConfig({ query: query })).then(function (response) {\n      return wrapContentTypeCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Content Type\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {ContentType}\n   * @param {object} data - Object representation of the Content Type to be created\n   * @return {Promise<ContentType.ContentType>} Promise for the newly created Content Type\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createContentType({\n   *   name: 'Blog Post',\n   *   fields: [\n   *     {\n   *       id: 'title',\n   *       name: 'Title',\n   *       required: true,\n   *       localized: false,\n   *       type: 'Text'\n   *     }\n   *   ]\n   * }))\n   * .then((contentType) => console.log(contentType))\n   * .catch(console.error)\n   */\n  function createContentType(data) {\n    raiseDeprecationWarning('createContentType');\n    return http.post('content_types', data).then(function (response) {\n      return wrapContentType(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Content Type with a custom ID\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {ContentType.ContentType}\n   * @param {string} id - Content Type ID\n   * @param {object} data - Object representation of the Content Type to be created\n   * @return {Promise<ContentType.ContentType>} Promise for the newly created Content Type\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createContentTypeWithId('<content-type-id>', {\n   *   name: 'Blog Post',\n   *   fields: [\n   *     {\n   *       id: 'title',\n   *       name: 'Title',\n   *       required: true,\n   *       localized: false,\n   *       type: 'Text'\n   *     }\n   *   ]\n   * }))\n   * .then((contentType) => console.log(contentType))\n   * .catch(console.error)\n   */\n  function createContentTypeWithId(id, data) {\n    raiseDeprecationWarning('createContentTypeWithId');\n    return http.put('content_types/' + id, data).then(function (response) {\n      return wrapContentType(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an Entry\n   * Warning: if you are using the select operator, when saving, any field that was not selected will be removed\n   * from your entry in the backend\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Entry ID\n   * @param {object=} query - Object with search parameters. In this method it's only useful for `locale`.\n   * @return {Promise<Entry.Entry>} Promise for an Entry\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEntry('<entry-id>'))\n   * .then((entry) => console.log(entry))\n   * .catch(console.error)\n   */\n  function getEntry(id) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    raiseDeprecationWarning('getEntry');\n    normalizeSelect(query);\n    return http.get('entries/' + id, createRequestConfig({ query: query })).then(function (response) {\n      return wrapEntry(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Entries\n   * Warning: if you are using the select operator, when saving, any field that was not selected will be removed\n   * from your entry in the backend\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<Entry.EntryCollection>} Promise for a collection of Entries\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEntries({'content_type': 'foo'})) // you can add more queries as 'key': 'value'\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getEntries() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    raiseDeprecationWarning('getEntries');\n    normalizeSelect(query);\n    return http.get('entries', createRequestConfig({ query: query })).then(function (response) {\n      return wrapEntryCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Entry\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {Entry.Entry}\n   * @param {string} contentTypeId - The Content Type which this Entry is based on\n   * @param {object} data - Object representation of the Entry to be created\n   * @return {Promise<Entry.Entry>} Promise for the newly created Entry\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createEntry('<content_type_id>', {\n   *   fields: {\n   *     title: {\n   *       'en-US': 'Entry title'\n   *     }\n   *   }\n   * }))\n   * .then((entry) => console.log(entry))\n   * .catch(console.error)\n   */\n  function createEntry(contentTypeId, data) {\n    raiseDeprecationWarning('createEntry');\n    return http.post('entries', data, {\n      headers: {\n        'X-Contentful-Content-Type': contentTypeId\n      }\n    }).then(function (response) {\n      return wrapEntry(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Entry with a custom ID\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {Entry.Entry}\n   * @param {string} contentTypeId - The Content Type which this Entry is based on\n   * @param {string} id - Entry ID\n   * @param {object} data - Object representation of the Entry to be created\n   * @return {Promise<Entry.Entry>} Promise for the newly created Entry\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * // Create entry\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createEntryWithId('<content_type_id>', '<entry_id>', {\n   *   fields: {\n   *     title: {\n   *       'en-US': 'Entry title'\n   *     }\n   *   }\n   * }))\n   * .then((entry) => console.log(entry))\n   * .catch(console.error)\n   */\n  function createEntryWithId(contentTypeId, id, data) {\n    raiseDeprecationWarning('createEntryWithId');\n    return http.put('entries/' + id, data, {\n      headers: {\n        'X-Contentful-Content-Type': contentTypeId\n      }\n    }).then(function (response) {\n      return wrapEntry(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an Asset\n   * Warning: if you are using the select operator, when saving, any field that was not selected will be removed\n   * from your entry in the backend\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Asset ID\n   * @param {object=} query - Object with search parameters. In this method it's only useful for `locale`.\n   * @return {Promise<Asset.Asset>} Promise for an Asset\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getAsset('<asset_id>'))\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n  */\n  function getAsset(id) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    raiseDeprecationWarning('getAsset');\n    normalizeSelect(query);\n    return http.get('assets/' + id, createRequestConfig({ query: query })).then(function (response) {\n      return wrapAsset(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Assets\n   * Warning: if you are using the select operator, when saving, any field that was not selected will be removed\n   * from your entry in the backend\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<Asset.AssetCollection>} Promise for a collection of Assets\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getAssets())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n  */\n  function getAssets() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    raiseDeprecationWarning('getAssets');\n    normalizeSelect(query);\n    return http.get('assets', createRequestConfig({ query: query })).then(function (response) {\n      return wrapAssetCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {Asset.Asset}\n   * @param {object} data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.\n   * @return {Promise<Asset.Asset>} Promise for the newly created Asset\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * // Create asset\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createAsset({\n   *   fields: {\n   *     title: {\n   *       'en-US': 'Playsam Streamliner'\n   *    },\n   *    file: {\n   *       'en-US': {\n   *         contentType: 'image/jpeg',\n   *        fileName: 'example.jpeg',\n   *        upload: 'https://example.com/example.jpg'\n   *      }\n   *    }\n   *   }\n   * }))\n   * .then((asset) => asset.processForLocale(\"en-US\")) // OR asset.processForAllLocales()\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n   */\n  function createAsset(data) {\n    return http.post('assets', data).then(function (response) {\n      return wrapAsset(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Asset with a custom ID. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {Asset.Asset}\n   * @param {string} id - Asset ID\n   * @param {object} data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.\n   * @return {Promise<Asset.Asset>} Promise for the newly created Asset\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * // Create asset\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createAssetWithId('<asset_id>', {\n   *   title: {\n   *     'en-US': 'Playsam Streamliner'\n   *   },\n   *   file: {\n   *     'en-US': {\n   *       contentType: 'image/jpeg',\n   *       fileName: 'example.jpeg',\n   *       upload: 'https://example.com/example.jpg'\n   *     }\n   *   }\n   * }))\n   * .then((asset) => asset.process())\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n   */\n  function createAssetWithId(id, data) {\n    raiseDeprecationWarning('createAssetWithId');\n    return http.put('assets/' + id, data).then(function (response) {\n      return wrapAsset(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Asset based on files. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {Asset.Asset}\n   * @param {object} data - Object representation of the Asset to be created. Note that the field object should have an uploadFrom property on asset creation, which will be removed and replaced with an url property when processing is finished.\n   * @param {object} data.fields.file.[LOCALE].file - Can be a string, an ArrayBuffer or a Stream.\n   * @return {Promise<Asset.Asset>} Promise for the newly created Asset\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createAssetFromFiles({\n   *   fields: {\n   *     file: {\n   *       'en-US': {\n   *          contentType: 'image/jpeg',\n   *          fileName: 'filename_english.jpg',\n   *          file: createReadStream('path/to/filename_english.jpg')\n   *       },\n   *       'de-DE': {\n   *          contentType: 'image/svg+xml',\n   *          fileName: 'filename_german.svg',\n   *          file: '<svg><path fill=\"red\" d=\"M50 50h150v50H50z\"/></svg>'\n   *       }\n   *     }\n   *   }\n   * }))\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n   */\n  function createAssetFromFiles(data) {\n    raiseDeprecationWarning('createAssetFromFiles');\n    var file = data.fields.file;\n\n    return Promise.all(Object.keys(file).map(function (locale) {\n      var _file$locale = file[locale],\n          contentType = _file$locale.contentType,\n          fileName = _file$locale.fileName;\n\n      return createUpload(file[locale]).then(function (upload) {\n        return _defineProperty({}, locale, {\n          contentType: contentType,\n          fileName: fileName,\n          uploadFrom: {\n            sys: {\n              type: 'Link',\n              linkType: 'Upload',\n              id: upload.sys.id\n            }\n          }\n        });\n      });\n    })).then(function (uploads) {\n      data.fields.file = uploads.reduce(function (fieldsData, upload) {\n        return _extends({}, fieldsData, upload);\n      }, {});\n      return createAsset(data);\n    }).catch(errorHandler);\n  }\n\n  /**\n   * Creates a Upload.\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {object} data - Object with file information.\n   * @param {object} data.file - Actual file content. Can be a string, an ArrayBuffer or a Stream.\n   * @return {Promise<Upload>} Upload object containing information about the uploaded file.\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   * const uploadStream = createReadStream('path/to/filename_english.jpg')\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createUpload({file: uploadStream, 'image/png'})\n   * .then((upload) => console.log(upload))\n   * .catch(console.error)\n   */\n  function createUpload(data) {\n    raiseDeprecationWarning('createUpload');\n    var file = data.file;\n\n    if (!file) {\n      return Promise.reject(new Error('Unable to locate a file to upload.'));\n    }\n    return httpUpload.post('uploads', file, {\n      headers: {\n        'Content-Type': 'application/octet-stream'\n      }\n    }).then(function (uploadResponse) {\n      return wrapUpload(httpUpload, uploadResponse.data);\n    }).catch(errorHandler);\n  }\n\n  /**\n   * Gets an Upload\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Upload ID\n   * @return {Promise<Upload>} Promise for an Upload\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   * const uploadStream = createReadStream('path/to/filename_english.jpg')\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getUpload('<upload-id>')\n   * .then((upload) => console.log(upload))\n   * .catch(console.error)\n   */\n  function getUpload(id) {\n    raiseDeprecationWarning('getUpload');\n    return httpUpload.get('uploads/' + id).then(function (response) {\n      return wrapUpload(http, response.data);\n    }).catch(errorHandler);\n  }\n\n  /**\n   * Gets a Locale\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Locale ID\n   * @return {Promise<Locale.Locale>} Promise for an Locale\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getLocale('<locale_id>'))\n   * .then((locale) => console.log(locale))\n   * .catch(console.error)\n  */\n  function getLocale(id) {\n    raiseDeprecationWarning('getLocale');\n    return http.get('locales/' + id).then(function (response) {\n      return wrapLocale(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Locales\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @return {Promise<Locale.LocaleCollection>} Promise for a collection of Locales\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getLocales())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n  */\n  function getLocales() {\n    raiseDeprecationWarning('getLocales');\n    return http.get('locales').then(function (response) {\n      return wrapLocaleCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Locale\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {Locale.Locale}\n   * @param {object} data - Object representation of the Locale to be created\n   * @return {Promise<Locale.Locale>} Promise for the newly created Locale\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * // Create locale\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createLocale({\n   *   name: 'German (Austria)',\n   *   code: 'de-AT',\n   *   fallbackCode: 'de-DE',\n   *   optional: true\n   * }))\n   * .then((locale) => console.log(locale))\n   * .catch(console.error)\n   */\n  function createLocale(data) {\n    raiseDeprecationWarning('createLocale');\n    return http.post('locales', data).then(function (response) {\n      return wrapLocale(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a Webhook\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Webhook ID\n   * @return {Promise<Webhook.Webhook>} Promise for a Webhook\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getWebhook('<webhook_id>'))\n   * .then((webhook) => console.log(webhook))\n   * .catch(console.error)\n  */\n  function getWebhook(id) {\n    return http.get('webhook_definitions/' + id).then(function (response) {\n      return wrapWebhook(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Webhooks\n   * @memberof ContentfulSpaceAPI\n   * @return {Promise<Webhook.WebhookCollection>} Promise for a collection of Webhooks\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getWebhooks())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getWebhooks() {\n    return http.get('webhook_definitions').then(function (response) {\n      return wrapWebhookCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Webhook\n   * @memberof ContentfulSpaceAPI\n   * @see {Webhook.Webhook}\n   * @param {object} data - Object representation of the Webhook to be created\n   * @return {Promise<Webhook.Webhook>} Promise for the newly created Webhook\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createWebhook({\n   *   'name': 'My webhook',\n   *   'url': 'https://www.example.com/test',\n   *   'topics': [\n   *     'Entry.create',\n   *     'ContentType.create',\n   *     '*.publish',\n   *     'Asset.*'\n   *   ]\n   * }))\n   * .then((webhook) => console.log(webhook))\n   * .catch(console.error)\n   */\n  function createWebhook(data) {\n    return http.post('webhook_definitions', data).then(function (response) {\n      return wrapWebhook(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Webhook with a custom ID\n   * @memberof ContentfulSpaceAPI\n   * @see {Webhook.Webhook}\n   * @param {string} id - Webhook ID\n   * @param {object} data - Object representation of the Webhook to be created\n   * @return {Promise<Webhook.Webhook>} Promise for the newly created Webhook\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createWebhookWithId('<webhook_id>', {\n   *   'name': 'My webhook',\n   *   'url': 'https://www.example.com/test',\n   *   'topics': [\n   *     'Entry.create',\n   *     'ContentType.create',\n   *     '*.publish',\n   *     'Asset.*'\n   *   ]\n   * }))\n   * .then((webhook) => console.log(webhook))\n   * .catch(console.error)\n   */\n  function createWebhookWithId(id, data) {\n    return http.put('webhook_definitions/' + id, data).then(function (response) {\n      return wrapWebhook(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a User\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - User ID\n   * @return {Promise<User.User>} Promise for a User\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getSpaceUser('id'))\n   * .then((user) => console.log(user))\n   * .catch(console.error)\n   */\n  function getSpaceUser(id) {\n    return http.get('users/' + id).then(function (response) {\n      return wrapUser(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Users in a space\n   * @memberof ContentfulSpaceAPI\n   * @param {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<User.UserCollection>} Promise a collection of Users in a space\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getSpaceUsers(query))\n   * .then((data) => console.log(data))\n   * .catch(console.error)\n   */\n  function getSpaceUsers() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    return http.get('users/', createRequestConfig({ query: query })).then(function (response) {\n      return wrapUserCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a Space Membership\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Space Membership ID\n   * @return {Promise<SpaceMembership.SpaceMembership>} Promise for a Space Membership\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getSpaceMembership('id'))\n   * .then((spaceMembership) => console.log(spaceMembership))\n   * .catch(console.error)\n   */\n  function getSpaceMembership(id) {\n    return http.get('space_memberships/' + id).then(function (response) {\n      return wrapSpaceMembership(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Space Memberships\n   * @memberof ContentfulSpaceAPI\n   * @param {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<SpaceMembership.SpaceMembershipCollection>} Promise for a collection of Space Memberships\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getSpaceMemberships({'limit': 100})) // you can add more queries as 'key': 'value'\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getSpaceMemberships() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    return http.get('space_memberships', createRequestConfig({ query: query })).then(function (response) {\n      return wrapSpaceMembershipCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Space Membership\n   * @memberof ContentfulSpaceAPI\n   * @see {SpaceMembership.SpaceMembership}\n   * @param {object} data - Object representation of the Space Membership to be created\n   * @return {Promise<SpaceMembership.SpaceMembership>} Promise for the newly created Space Membership\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createSpaceMembership({\n   *   admin: false,\n   *   roles: [\n   *     {\n   *       type: 'Link',\n   *       linkType: 'Role',\n   *       id: '<role_id>'\n   *     }\n   *   ],\n   *   email: 'foo@example.com'\n   * }))\n   * .then((spaceMembership) => console.log(spaceMembership))\n   * .catch(console.error)\n   */\n  function createSpaceMembership(data) {\n    return http.post('space_memberships', data).then(function (response) {\n      return wrapSpaceMembership(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Space Membership with a custom ID\n   * @memberof ContentfulSpaceAPI\n   * @see {SpaceMembership.SpaceMembership}\n   * @param {string} id - Space Membership ID\n   * @param {object} data - Object representation of the Space Membership to be created\n   * @return {Promise<SpaceMembership.SpaceMembership>} Promise for the newly created Space Membership\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createSpaceMembershipWithId('<space-membership-id>', {\n   *   admin: false,\n   *   roles: [\n   *     {\n   *       type: 'Link',\n   *       linkType: 'Role',\n   *       id: '<role_id>'\n   *     }\n   *   ],\n   *   email: 'foo@example.com'\n   * }))\n   * .then((spaceMembership) => console.log(spaceMembership))\n   * .catch(console.error)\n   */\n  function createSpaceMembershipWithId(id, data) {\n    return http.put('space_memberships/' + id, data).then(function (response) {\n      return wrapSpaceMembership(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a Role\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Role ID\n   * @return {Promise<Role.Role>} Promise for a Role\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createRole({\n   *   fields: {\n   *     title: {\n   *       'en-US': 'Role title'\n   *     }\n   *   }\n   * }))\n   * .then((role) => console.log(role))\n   * .catch(console.error)\n  */\n  function getRole(id) {\n    return http.get('roles/' + id).then(function (response) {\n      return wrapRole(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Roles\n   * @memberof ContentfulSpaceAPI\n   * @return {Promise<Role.RoleCollection>} Promise for a collection of Roles\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getRoles())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getRoles() {\n    return http.get('roles').then(function (response) {\n      return wrapRoleCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Role\n   * @memberof ContentfulSpaceAPI\n   * @see {Role.Role}\n   * @param {object} data - Object representation of the Role to be created\n   * @return {Promise<Role.Role>} Promise for the newly created Role\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createRole({\n   *   name: 'My Role',\n   *   description: 'foobar role',\n   *   permissions: {\n   *     ContentDelivery: 'all',\n   *     ContentModel: ['read'],\n   *     Settings: []\n   *   },\n   *   policies: [\n   *     {\n   *       effect: 'allow',\n   *       actions: 'all',\n   *       constraint: {\n   *         and: [\n   *           {\n   *             equals: [\n   *               { doc: 'sys.type' },\n   *               'Entry'\n   *             ]\n   *           },\n   *           {\n   *             equals: [\n   *               { doc: 'sys.type' },\n   *               'Asset'\n   *             ]\n   *           }\n   *         ]\n   *       }\n   *     }\n   *   ]\n   * }))\n   * .then((role) => console.log(role))\n   * .catch(console.error)\n   */\n  function createRole(data) {\n    return http.post('roles', data).then(function (response) {\n      return wrapRole(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Role with a custom ID\n   * @memberof ContentfulSpaceAPI\n   * @see {Role.Role}\n   * @param {string} id - Role ID\n   * @param {object} data - Object representation of the Role to be created\n   * @return {Promise<Role.Role>} Promise for the newly created Role\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createRoleWithId('<role-id>', {\n   *   name: 'My Role',\n   *   description: 'foobar role',\n   *   permissions: {\n   *     ContentDelivery: 'all',\n   *     ContentModel: ['read'],\n   *     Settings: []\n   *   },\n   *   policies: [\n   *     {\n   *       effect: 'allow',\n   *       actions: 'all',\n   *       constraint: {\n   *         and: [\n   *           {\n   *             equals: [\n   *               { doc: 'sys.type' },\n   *               'Entry'\n   *             ]\n   *           },\n   *           {\n   *             equals: [\n   *               { doc: 'sys.type' },\n   *               'Asset'\n   *             ]\n   *           }\n   *         ]\n   *       }\n   *     }\n   *   ]\n   * }))\n   * .then((role) => console.log(role))\n   * .catch(console.error)\n   */\n  function createRoleWithId(id, data) {\n    return http.put('roles/' + id, data).then(function (response) {\n      return wrapRole(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a Api Key\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - API Key ID\n   * @return {Promise<ApiKey.ApiKey>} Promise for a Api Key\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getApiKey('<apikey-id>'))\n   * .then((apikey) => console.log(apikey))\n   * .catch(console.error)\n   */\n  function getApiKey(id) {\n    return http.get('api_keys/' + id).then(function (response) {\n      return wrapApiKey(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Api Keys\n   * @memberof ContentfulSpaceAPI\n   * @return {Promise<ApiKey.ApiKeyCollection>} Promise for a collection of Api Keys\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getApiKeys())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getApiKeys() {\n    return http.get('api_keys').then(function (response) {\n      return wrapApiKeyCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a preview Api Key\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Preview API Key ID\n   * @return {Promise<PreviewApiKey.PreviewApiKey>} Promise for a Preview Api Key\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getPreviewApiKey('<preview-apikey-id>'))\n   * .then((previewApikey) => console.log(previewApikey))\n   * .catch(console.error)\n   */\n  function getPreviewApiKey(id) {\n    return http.get('preview_api_keys/' + id).then(function (response) {\n      return wrapPreviewApiKey(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of preview Api Keys\n   * @memberof ContentfulSpaceAPI\n   * @return {Promise<PreviewApiKey.PreviewApiKeyCollection>} Promise for a collection of Preview Api Keys\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getPreviewApiKeys())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getPreviewApiKeys() {\n    return http.get('preview_api_keys').then(function (response) {\n      return wrapPreviewApiKeyCollection(http, response.data);\n    }, errorHandler);\n  }\n  /**\n   * Creates a Api Key\n   * @memberof ContentfulSpaceAPI\n   * @see {ApiKey.ApiKey}\n   * @param {object} data - Object representation of the Api Key to be created\n   * @return {Promise<ApiKey.ApiKey>} Promise for the newly created Api Key\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createApiKey({\n   *   name: 'API Key name',\n   *   environments:[\n   *    {\n   *     sys: {\n   *      type: 'Link'\n   *      linkType: 'Environment',\n   *      id:'<environment_id>'\n   *     }\n   *    }\n   *   ]\n   *   }\n   * }))\n   * .then((apiKey) => console.log(apiKey))\n   * .catch(console.error)\n  */\n  function createApiKey(data) {\n    return http.post('api_keys', data).then(function (response) {\n      return wrapApiKey(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Api Key with a custom ID\n   * @memberof ContentfulSpaceAPI\n   * @see {ApiKey.ApiKey}\n   * @param {string} id - Api Key ID\n   * @param {object} data - Object representation of the Api Key to be created\n   * @return {Promise<ApiKey.ApiKey>} Promise for the newly created Api Key\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createApiKeyWithId('<api-key-id>', {\n   *   name: 'API Key name'\n   *   environments:[\n   *    {\n   *     sys: {\n   *      type: 'Link'\n   *      linkType: 'Environment',\n   *      id:'<environment_id>'\n   *     }\n   *    }\n   *   ]\n   *   }\n   * }))\n   * .then((apiKey) => console.log(apiKey))\n   * .catch(console.error)\n   */\n  function createApiKeyWithId(id, data) {\n    return http.put('api_keys/' + id, data).then(function (response) {\n      return wrapApiKey(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an UI Extension\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - UI Extension ID\n   * @return {Promise<UiExtension.UiExtension>} Promise for an UI Extension\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getUiExtension('<extension-id>'))\n   * .then((uiExtension) => console.log(uiExtension))\n   * .catch(console.error)\n   */\n  function getUiExtension(id) {\n    raiseDeprecationWarning('getUiExtension');\n    return http.get('extensions/' + id).then(function (response) {\n      return wrapUiExtension(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of UI Extension\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @return {Promise<UiExtension.UiExtensionCollection>} Promise for a collection of UI Extensions\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getUiExtensions()\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getUiExtensions() {\n    raiseDeprecationWarning('getUiExtensions');\n    return http.get('extensions').then(function (response) {\n      return wrapUiExtensionCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a UI Extension\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {UiExtension.UiExtension}\n   * @param {object} data - Object representation of the UI Extension to be created\n   * @return {Promise<UiExtension.UiExtension>} Promise for the newly created UI Extension\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createUiExtension({\n   *   extension: {\n   *     name: 'My awesome extension',\n   *     src: 'https://example.com/my',\n   *     fieldTypes: [\n   *       {\n   *         type: 'Symbol'\n   *       },\n   *       {\n   *         type: 'Text'\n   *       }\n   *     ],\n   *     sidebar: false\n   *   }\n   * }))\n   * .then((uiExtension) => console.log(uiExtension))\n   * .catch(console.error)\n   */\n  function createUiExtension(data) {\n    raiseDeprecationWarning('createUiExtension');\n    return http.post('extensions', data).then(function (response) {\n      return wrapUiExtension(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a UI Extension with a custom ID\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @see {UiExtension.UiExtension}\n   * @param {string} id - UI Extension ID\n   * @param {object} data - Object representation of the UI Extension to be created\n   * @return {Promise<UiExtension.UiExtension>} Promise for the newly created UI Extension\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.createUiExtensionWithId('<extension_id>', {\n   *   extension: {\n   *     name: 'My awesome extension',\n   *     src: 'https://example.com/my',\n   *     fieldTypes: [\n   *       {\n   *         type: 'Symbol'\n   *       },\n   *       {\n   *         type: 'Text'\n   *       }\n   *     ],\n   *     sidebar: false\n   *   }\n   * }))\n   * .then((uiExtension) => console.log(uiExtension))\n   * .catch(console.error)\n   */\n  function createUiExtensionWithId(id, data) {\n    raiseDeprecationWarning('createUiExtensionWithId');\n    return http.put('extensions/' + id, data).then(function (response) {\n      return wrapUiExtension(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets all snapshots of an entry\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @func getEntrySnapshots\n   * @param {string} entryId - Entry ID\n   * @param {object=} query - additional query paramaters\n   * @return {Promise<Snapshot.SnapshotCollection>} Promise for a collection of Entry Snapshots\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEntrySnapshots('<entry_id>'))\n   * .then((snapshots) => console.log(snapshots.items))\n   * .catch(console.error)\n   */\n  function getEntrySnapshots(entryId) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    raiseDeprecationWarning('getEntrySnapshots');\n    return http.get('entries/' + entryId + '/snapshots', createRequestConfig({ query: query })).then(function (response) {\n      return wrapSnapshotCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets all snapshots of a contentType\n   * @deprecated since version 5.0\n   * @memberof ContentfulSpaceAPI\n   * @func getContentTypeSnapshots\n   * @param {string} contentTypeId - Content Type ID\n   * @param {object=} query - additional query paramaters\n   * @return {Promise<Snapshot.SnapshotCollection>} Promise for a collection of Content Type Snapshots\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getContentTypeSnapshots('<contentTypeId>'))\n   * .then((snapshots) => console.log(snapshots.items))\n   * .catch(console.error)\n   */\n  function getContentTypeSnapshots(contentTypeId) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    raiseDeprecationWarning('getContentTypeSnapshots');\n    return http.get('content_types/' + contentTypeId + '/snapshots', createRequestConfig({ query: query })).then(function (response) {\n      return wrapSnapshotCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an Environment Alias\n   * @memberof ContentfulSpaceAPI\n   * @param {string} id - Environment Alias ID\n   * @return {Promise<EnvironmentAlias.EnvironmentAlias>} Promise for an Environment Alias\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironmentAlias('<alias-id>'))\n   * .then((alias) => console.log(alias))\n   * .catch(console.error)\n   */\n  function getEnvironmentAlias(id) {\n    return http.get('environment_aliases/' + id).then(function (response) {\n      return wrapEnvironmentAlias(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Environment Aliases\n   * @memberof ContentfulSpaceAPI\n   * @return {Promise<EnvironmentAlias.EnvironmentAliasCollection>} Promise for a collection of Environment Aliases\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironmentAliases()\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getEnvironmentAliases() {\n    return http.get('environment_aliases').then(function (response) {\n      return wrapEnvironmentAliasCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /*\n   * @private\n   * sdk relies heavily on sys metadata\n   * so we cannot omit the sys property on sdk level\n   *\n   */\n  function normalizeSelect(query) {\n    if (query.select && !/sys/i.test(query.select)) {\n      query.select += ',sys';\n    }\n  }\n\n  return {\n    delete: deleteSpace,\n    update: updateSpace,\n    getEnvironment: getEnvironment,\n    getEnvironments: getEnvironments,\n    createEnvironment: createEnvironment,\n    createEnvironmentWithId: createEnvironmentWithId,\n    getContentType: getContentType,\n    getContentTypes: getContentTypes,\n    createContentType: createContentType,\n    createContentTypeWithId: createContentTypeWithId,\n    getEditorInterfaceForContentType: getEditorInterfaceForContentType,\n    getEntry: getEntry,\n    getEntries: getEntries,\n    createEntry: createEntry,\n    createEntryWithId: createEntryWithId,\n    getAsset: getAsset,\n    getAssets: getAssets,\n    createAsset: createAsset,\n    createAssetWithId: createAssetWithId,\n    createAssetFromFiles: createAssetFromFiles,\n    getUpload: getUpload,\n    createUpload: createUpload,\n    getLocale: getLocale,\n    getLocales: getLocales,\n    createLocale: createLocale,\n    getWebhook: getWebhook,\n    getWebhooks: getWebhooks,\n    createWebhook: createWebhook,\n    createWebhookWithId: createWebhookWithId,\n    getRole: getRole,\n    getRoles: getRoles,\n    createRole: createRole,\n    createRoleWithId: createRoleWithId,\n    getSpaceUser: getSpaceUser,\n    getSpaceUsers: getSpaceUsers,\n    getSpaceMembership: getSpaceMembership,\n    getSpaceMemberships: getSpaceMemberships,\n    createSpaceMembership: createSpaceMembership,\n    createSpaceMembershipWithId: createSpaceMembershipWithId,\n    getApiKey: getApiKey,\n    getApiKeys: getApiKeys,\n    getPreviewApiKeys: getPreviewApiKeys,\n    getPreviewApiKey: getPreviewApiKey,\n    createApiKey: createApiKey,\n    createApiKeyWithId: createApiKeyWithId,\n    getUiExtension: getUiExtension,\n    getUiExtensions: getUiExtensions,\n    createUiExtension: createUiExtension,\n    createUiExtensionWithId: createUiExtensionWithId,\n    getEntrySnapshots: getEntrySnapshots,\n    getContentTypeSnapshots: getContentTypeSnapshots,\n    getEnvironmentAlias: getEnvironmentAlias,\n    getEnvironmentAliases: getEnvironmentAliases\n  };\n}","import cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport createSpaceApi from '../create-space-api';\n\n/**\n * @memberof Space\n * @typedef Space\n * @prop {Object} sys - System metadata\n * @prop {string} sys.id - Space id\n * @prop {string} sys.type - Entity type\n * @prop {string} name - Space name\n * @prop {function(): Object} toPlainObject() - Returns this Space as a plain JS object\n */\n\n/**\n * @memberof Space\n * @typedef SpaceCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Space.Space>} items\n * @prop {function(): Object} toPlainObject() - Returns this Space collection as a plain JS object\n */\n\n/**\n * This method creates the API for the given space with all the methods for\n * reading and creating other entities. It also passes down a clone of the\n * http client with a space id, so the base path for requests now has the\n * space id already set.\n * @private\n * @param  {Object} http - HTTP client instance\n * @param  {Object} data - API response for a Space\n * @return {Space}\n */\nexport function wrapSpace(http, data) {\n  var space = toPlainObject(cloneDeep(data));\n  var _http$httpClientParam = http.httpClientParams,\n      hostUpload = _http$httpClientParam.hostUpload,\n      defaultHostnameUpload = _http$httpClientParam.defaultHostnameUpload;\n\n  var spaceScopedHttpClient = http.cloneWithNewParams({\n    space: space.sys.id\n  });\n  var spaceScopedUploadClient = http.cloneWithNewParams({\n    space: space.sys.id,\n    host: hostUpload || defaultHostnameUpload\n  });\n  var spaceApi = createSpaceApi({\n    http: spaceScopedHttpClient,\n    httpUpload: spaceScopedUploadClient\n  });\n  var enhancedSpace = enhanceWithMethods(space, spaceApi);\n  return freezeSys(enhancedSpace);\n}\n\n/**\n * This method wraps each space in a collection with the space API. See wrapSpace\n * above for more details.\n * @private\n * @param  {Object} http - HTTP client instance\n * @param  {Object} data - API response for a Space collection\n * @return {SpaceCollection}\n */\nexport function wrapSpaceCollection(http, data) {\n  var spaces = toPlainObject(cloneDeep(data));\n  spaces.items = spaces.items.map(function (entity) {\n    return wrapSpace(http, entity);\n  });\n  return freezeSys(spaces);\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Contentful Environment API. Contains methods to access any operations at a space\n * level, such as creating and reading entities contained in a space.\n * @namespace ContentfulEnvironmentAPI\n */\nimport cloneDeep from 'lodash/cloneDeep';\nimport { createRequestConfig } from 'contentful-sdk-core';\nimport errorHandler from './error-handler';\nimport entities from './entities';\n\n/**\n * @memberof ContentfulEnvironmentAPI\n * @typedef {object} ContentfulEnvironmentAPI\n * @prop {function} delete\n * @prop {function} update\n * @prop {function} getContentType\n * @prop {function} getContentTypes\n * @prop {function} createContentType\n * @prop {function} createContentTypeWithId\n * @prop {function} getEntry\n * @prop {function} getEntries\n * @prop {function} createEntry\n * @prop {function} createEntryWithId\n * @prop {function} getAsset\n * @prop {function} getAssets\n * @prop {function} createAsset\n * @prop {function} createAssetWithId\n * @prop {function} getLocale\n * @prop {function} getLocales\n * @prop {function} createLocale\n * @prop {function} getUiExtension\n * @prop {function} getUiExtensions\n * @prop {function} createUiExtension\n * @prop {function} createUiExtensionWithId\n * @prop {function} getEntrySnapshots\n * @prop {function} getContentTypeSnapshots\n */\n\n/**\n * Creates API object with methods to access the Environment API\n * @private\n * @param {object} params - API initialization params\n * @prop {object} http - HTTP client instance\n * @prop {object} entities - Object with wrapper methods for each kind of entity\n * @return {ContentfulEnvironmentAPI}\n */\nexport default function createEnvironmentApi(_ref) {\n  var http = _ref.http,\n      httpUpload = _ref.httpUpload;\n  var wrapEnvironment = entities.environment.wrapEnvironment;\n  var _entities$contentType = entities.contentType,\n      wrapContentType = _entities$contentType.wrapContentType,\n      wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;\n  var _entities$entry = entities.entry,\n      wrapEntry = _entities$entry.wrapEntry,\n      wrapEntryCollection = _entities$entry.wrapEntryCollection;\n  var _entities$asset = entities.asset,\n      wrapAsset = _entities$asset.wrapAsset,\n      wrapAssetCollection = _entities$asset.wrapAssetCollection;\n  var _entities$locale = entities.locale,\n      wrapLocale = _entities$locale.wrapLocale,\n      wrapLocaleCollection = _entities$locale.wrapLocaleCollection;\n  var wrapSnapshotCollection = entities.snapshot.wrapSnapshotCollection;\n  var wrapEditorInterface = entities.editorInterface.wrapEditorInterface;\n  var wrapUpload = entities.upload.wrapUpload;\n  var _entities$uiExtension = entities.uiExtension,\n      wrapUiExtension = _entities$uiExtension.wrapUiExtension,\n      wrapUiExtensionCollection = _entities$uiExtension.wrapUiExtensionCollection;\n  /**\n   * Environment instances.\n   * @namespace Environment\n   */\n\n  /**\n   * Deletes the environment\n   * @memberof Environment\n   * @func delete\n   * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.delete())\n   * .then(() => console.log('Environment deleted.'))\n   * .catch(console.error)\n  */\n\n  function deleteEnvironment() {\n    return http.delete('').then(function (response) {}, errorHandler);\n  }\n\n  /**\n   * Updates the environment\n   * @memberof Environment\n   * @func update\n   * @return {Promise<Environment.Environment>} Promise for the updated environment.\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => {\n   *   environment.name = 'New name'\n   *   return environment.update()\n   * })\n   * .then((environment) => console.log(`Environment ${environment.sys.id} renamed.`)\n   * .catch(console.error)\n  */\n  function updateEnvironment() {\n    var raw = this.toPlainObject();\n    var data = cloneDeep(raw);\n    delete data.sys;\n    return http.put('', data, {\n      headers: {\n        'X-Contentful-Version': raw.sys.version\n      }\n    }).then(function (response) {\n      return wrapEnvironment(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a Content Type\n   * @memberof ContentfulEnvironmentAPI\n   * @param {string} id - Content Type ID\n   * @return {Promise<ContentType.ContentType>} Promise for a Content Type\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getContentType('<content_type_id>'))\n   * .then((contentType) => console.log(contentType))\n   * .catch(console.error)\n   */\n  function getContentType(id) {\n    return http.get('content_types/' + id).then(function (response) {\n      return wrapContentType(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an EditorInterface for a ContentType\n   * @memberof ContentfulEnvironmentAPI\n   * @param {string} contentTypeId - Content Type ID\n   * @return {Promise<EditorInterface.EditorInterface>} Promise for an EditorInterface\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getEditorInterfaceForContentType('<content_type_id>'))\n   * .then((EditorInterface) => console.log(EditorInterface))\n   * .catch(console.error)\n   */\n  function getEditorInterfaceForContentType(contentTypeId) {\n    return http.get('content_types/' + contentTypeId + '/editor_interface').then(function (response) {\n      return wrapEditorInterface(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Content Types\n   * @memberof ContentfulEnvironmentAPI\n   * @param {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<ContentType.ContentTypeCollection>} Promise for a collection of Content Types\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getContentTypes())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n  */\n  function getContentTypes() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    return http.get('content_types', createRequestConfig({ query: query })).then(function (response) {\n      return wrapContentTypeCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Content Type\n   * @memberof ContentfulEnvironmentAPI\n   * @see {ContentType}\n   * @param {object} data - Object representation of the Content Type to be created\n   * @return {Promise<ContentType.ContentType>} Promise for the newly created Content Type\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createContentType({\n   *   name: 'Blog Post',\n   *   fields: [\n   *     {\n   *       id: 'title',\n   *       name: 'Title',\n   *       required: true,\n   *       localized: false,\n   *       type: 'Text'\n   *     }\n   *   ]\n   * }))\n   * .then((contentType) => console.log(contentType))\n   * .catch(console.error)\n   */\n  function createContentType(data) {\n    return http.post('content_types', data).then(function (response) {\n      return wrapContentType(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Content Type with a custom ID\n   * @memberof ContentfulEnvironmentAPI\n   * @see {ContentType.ContentType}\n   * @param {string} id - Content Type ID\n   * @param {object} data - Object representation of the Content Type to be created\n   * @return {Promise<ContentType.ContentType>} Promise for the newly created Content Type\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createContentTypeWithId('<content-type-id>', {\n   *   name: 'Blog Post',\n   *   fields: [\n   *     {\n   *       id: 'title',\n   *       name: 'Title',\n   *       required: true,\n   *       localized: false,\n   *       type: 'Text'\n   *     }\n   *   ]\n   * }))\n   * .then((contentType) => console.log(contentType))\n   * .catch(console.error)\n   */\n  function createContentTypeWithId(id, data) {\n    return http.put('content_types/' + id, data).then(function (response) {\n      return wrapContentType(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an Entry\n   * Warning: if you are using the select operator, when saving, any field that was not selected will be removed\n   * from your entry in the backend\n   * @memberof ContentfulEnvironmentAPI\n   * @param {string} id - Entry ID\n   * @param {object=} query - Object with search parameters. In this method it's only useful for `locale`.\n   * @return {Promise<Entry.Entry>} Promise for an Entry\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getEntry('<entry-id>'))\n   * .then((entry) => console.log(entry))\n   * .catch(console.error)\n   */\n  function getEntry(id) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    normalizeSelect(query);\n    return http.get('entries/' + id, createRequestConfig({ query: query })).then(function (response) {\n      return wrapEntry(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Entries\n   * Warning: if you are using the select operator, when saving, any field that was not selected will be removed\n   * from your entry in the backend\n   * @memberof ContentfulEnvironmentAPI\n   * @param {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<Entry.EntryCollection>} Promise for a collection of Entries\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getEntries({'content_type': 'foo'})) // you can add more queries as 'key': 'value'\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getEntries() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    normalizeSelect(query);\n    return http.get('entries', createRequestConfig({ query: query })).then(function (response) {\n      return wrapEntryCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Entry\n   * @memberof ContentfulEnvironmentAPI\n   * @see {Entry.Entry}\n   * @param {string} contentTypeId - The Content Type ID of the newly created Entry\n   * @param {object} data - Object representation of the Entry to be created\n   * @return {Promise<Entry.Entry>} Promise for the newly created Entry\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createEntry('<content_type_id>', {\n   *   fields: {\n   *     title: {\n   *       'en-US': 'Entry title'\n   *     }\n   *   }\n   * }))\n   * .then((entry) => console.log(entry))\n   * .catch(console.error)\n   */\n  function createEntry(contentTypeId, data) {\n    return http.post('entries', data, {\n      headers: {\n        'X-Contentful-Content-Type': contentTypeId\n      }\n    }).then(function (response) {\n      return wrapEntry(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Entry with a custom ID\n   * @memberof ContentfulEnvironmentAPI\n   * @see {Entry.Entry}\n   * @param {string} contentTypeId - The Content Type of the newly created Entry\n   * @param {string} id - Entry ID\n   * @param {object} data - Object representation of the Entry to be created\n   * @return {Promise<Entry.Entry>} Promise for the newly created Entry\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * // Create entry\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createEntryWithId('<content_type_id>', '<entry_id>', {\n   *   fields: {\n   *     title: {\n   *       'en-US': 'Entry title'\n   *     }\n   *   }\n   * }))\n   * .then((entry) => console.log(entry))\n   * .catch(console.error)\n   */\n  function createEntryWithId(contentTypeId, id, data) {\n    return http.put('entries/' + id, data, {\n      headers: {\n        'X-Contentful-Content-Type': contentTypeId\n      }\n    }).then(function (response) {\n      return wrapEntry(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an Asset\n   * Warning: if you are using the select operator, when saving, any field that was not selected will be removed\n   * from your entry in the backend\n   * @memberof ContentfulEnvironmentAPI\n   * @param {string} id - Asset ID\n   * @param {object=} query - Object with search parameters. In this method it's only useful for `locale`.\n   * @return {Promise<Asset.Asset>} Promise for an Asset\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getAsset('<asset_id>'))\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n  */\n  function getAsset(id) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    normalizeSelect(query);\n    return http.get('assets/' + id, createRequestConfig({ query: query })).then(function (response) {\n      return wrapAsset(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Assets\n   * Warning: if you are using the select operator, when saving, any field that was not selected will be removed\n   * from your entry in the backend\n   * @memberof ContentfulEnvironmentAPI\n   * @param {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<Asset.AssetCollection>} Promise for a collection of Assets\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getAssets())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n  */\n  function getAssets() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    normalizeSelect(query);\n    return http.get('assets', createRequestConfig({ query: query })).then(function (response) {\n      return wrapAssetCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.\n   * @memberof ContentfulEnvironmentAPI\n   * @see {Asset.Asset}\n   * @param {object} data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.\n   * @return {Promise<Asset.Asset>} Promise for the newly created Asset\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * // Create asset\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createAsset({\n   *   fields: {\n   *     title: {\n   *       'en-US': 'Playsam Streamliner'\n   *    },\n   *    file: {\n   *       'en-US': {\n   *         contentType: 'image/jpeg',\n   *        fileName: 'example.jpeg',\n   *        upload: 'https://example.com/example.jpg'\n   *      }\n   *    }\n   *   }\n   * }))\n   * .then((asset) => asset.processForLocale(\"en-US\")) // OR asset.processForAllLocales()\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n   */\n  function createAsset(data) {\n    return http.post('assets', data).then(function (response) {\n      return wrapAsset(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Asset with a custom ID. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.\n   * @memberof ContentfulEnvironmentAPI\n   * @see {Asset.Asset}\n   * @param {string} id - Asset ID\n   * @param {object} data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.\n   * @return {Promise<Asset.Asset>} Promise for the newly created Asset\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * // Create asset\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createAssetWithId('<asset_id>', {\n   *   title: {\n   *     'en-US': 'Playsam Streamliner'\n   *   },\n   *   file: {\n   *     'en-US': {\n   *       contentType: 'image/jpeg',\n   *       fileName: 'example.jpeg',\n   *       upload: 'https://example.com/example.jpg'\n   *     }\n   *   }\n   * }))\n   * .then((asset) => asset.process())\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n   */\n  function createAssetWithId(id, data) {\n    return http.put('assets/' + id, data).then(function (response) {\n      return wrapAsset(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Asset based on files. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.\n   * @memberof ContentfulEnvironmentAPI\n   * @see {Asset.Asset}\n   * @param {object} data - Object representation of the Asset to be created. Note that the field object should have an uploadFrom property on asset creation, which will be removed and replaced with an url property when processing is finished.\n   * @param {object} data.fields.file.[LOCALE].file - Can be a string, an ArrayBuffer or a Stream.\n   * @return {Promise<Asset.Asset>} Promise for the newly created Asset\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createAssetFromFiles({\n   *   fields: {\n   *     file: {\n   *       'en-US': {\n   *          contentType: 'image/jpeg',\n   *          fileName: 'filename_english.jpg',\n   *          file: createReadStream('path/to/filename_english.jpg')\n   *       },\n   *       'de-DE': {\n   *          contentType: 'image/svg+xml',\n   *          fileName: 'filename_german.svg',\n   *          file: '<svg><path fill=\"red\" d=\"M50 50h150v50H50z\"/></svg>'\n   *       }\n   *     }\n   *   }\n   * }))\n   * .then((asset) => console.log(asset))\n   * .catch(console.error)\n   */\n  function createAssetFromFiles(data) {\n    var file = data.fields.file;\n\n    return Promise.all(Object.keys(file).map(function (locale) {\n      var _file$locale = file[locale],\n          contentType = _file$locale.contentType,\n          fileName = _file$locale.fileName;\n\n      return createUpload(file[locale]).then(function (upload) {\n        return _defineProperty({}, locale, {\n          contentType: contentType,\n          fileName: fileName,\n          uploadFrom: {\n            sys: {\n              type: 'Link',\n              linkType: 'Upload',\n              id: upload.sys.id\n            }\n          }\n        });\n      });\n    })).then(function (uploads) {\n      data.fields.file = uploads.reduce(function (fieldsData, upload) {\n        return _extends({}, fieldsData, upload);\n      }, {});\n      return createAsset(data);\n    }).catch(errorHandler);\n  }\n\n  /**\n   * Creates a Upload.\n   * @memberof ContentfulEnvironmentAPI\n   * @param {object} data - Object with file information.\n   * @param {object} data.file - Actual file content. Can be a string, an ArrayBuffer or a Stream.\n   * @return {Promise<Upload>} Upload object containing information about the uploaded file.\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   * const uploadStream = createReadStream('path/to/filename_english.jpg')\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createUpload({file: uploadStream})\n   * .then((upload) => console.log(upload))\n   * .catch(console.error)\n   */\n  function createUpload(data) {\n    var file = data.file;\n\n    if (!file) {\n      return Promise.reject(new Error('Unable to locate a file to upload.'));\n    }\n    return httpUpload.post('uploads', file, {\n      headers: {\n        'Content-Type': 'application/octet-stream'\n      }\n    }).then(function (uploadResponse) {\n      return wrapUpload(httpUpload, uploadResponse.data);\n    }).catch(errorHandler);\n  }\n\n  /**\n   * Gets an Upload\n   * @memberof ContentfulEnvironmentAPI\n   * @param {string} id - Upload ID\n   * @return {Promise<Upload>} Promise for an Upload\n   * @example\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   * const uploadStream = createReadStream('path/to/filename_english.jpg')\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getUpload('<upload-id>')\n   * .then((upload) => console.log(upload))\n   * .catch(console.error)\n   */\n  function getUpload(id) {\n    return httpUpload.get('uploads/' + id).then(function (response) {\n      return wrapUpload(http, response.data);\n    }).catch(errorHandler);\n  }\n\n  /**\n   * Gets a Locale\n   * @memberof ContentfulEnvironmentAPI\n   * @param {string} id - Locale ID\n   * @return {Promise<Locale.Locale>} Promise for an Locale\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getLocale('<locale_id>'))\n   * .then((locale) => console.log(locale))\n   * .catch(console.error)\n  */\n  function getLocale(id) {\n    return http.get('locales/' + id).then(function (response) {\n      return wrapLocale(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Locales\n   * @memberof ContentfulEnvironmentAPI\n   * @return {Promise<Locale.LocaleCollection>} Promise for a collection of Locales\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getLocales())\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n  */\n  function getLocales() {\n    return http.get('locales').then(function (response) {\n      return wrapLocaleCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a Locale\n   * @memberof ContentfulEnvironmentAPI\n   * @see {Locale.Locale}\n   * @param {object} data - Object representation of the Locale to be created\n   * @return {Promise<Locale.Locale>} Promise for the newly created Locale\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * // Create locale\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createLocale({\n   *   name: 'German (Austria)',\n   *   code: 'de-AT',\n   *   fallbackCode: 'de-DE',\n   *   optional: true\n   * }))\n   * .then((locale) => console.log(locale))\n   * .catch(console.error)\n   */\n  function createLocale(data) {\n    return http.post('locales', data).then(function (response) {\n      return wrapLocale(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets an UI Extension\n   * @memberof ContentfulEnvironmentAPI\n   * @param {string} id - Extension ID\n   * @return {Promise<UiExtension.UiExtension>} Promise for an UI Extension\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getUiExtension('<extension-id>'))\n   * .then((uiExtension) => console.log(uiExtension))\n   * .catch(console.error)\n   */\n  function getUiExtension(id) {\n    return http.get('extensions/' + id).then(function (response) {\n      return wrapUiExtension(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of UI Extension\n   * @memberof ContentfulEnvironmentAPI\n   * @return {Promise<UiExtension.UiExtensionCollection>} Promise for a collection of UI Extensions\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getUiExtensions()\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getUiExtensions() {\n    return http.get('extensions').then(function (response) {\n      return wrapUiExtensionCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a UI Extension\n   * @memberof ContentfulEnvironmentAPI\n   * @see {UiExtension.UiExtension}\n   * @param {object} data - Object representation of the UI Extension to be created\n   * @return {Promise<UiExtension.UiExtension>} Promise for the newly created UI Extension\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createUiExtension({\n   *   extension: {\n   *     name: 'My awesome extension',\n   *     src: 'https://example.com/my',\n   *     fieldTypes: [\n   *       {\n   *         type: 'Symbol'\n   *       },\n   *       {\n   *         type: 'Text'\n   *       }\n   *     ],\n   *     sidebar: false\n   *   }\n   * }))\n   * .then((uiExtension) => console.log(uiExtension))\n   * .catch(console.error)\n   */\n  function createUiExtension(data) {\n    return http.post('extensions', data).then(function (response) {\n      return wrapUiExtension(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a UI Extension with a custom ID\n   * @memberof ContentfulEnvironmentAPI\n   * @see {UiExtension.UiExtension}\n   * @param {string} id - Extension ID\n   * @param {object} data - Object representation of the UI Extension to be created\n   * @return {Promise<UiExtension.UiExtension>} Promise for the newly created UI Extension\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.createUiExtensionWithId('<extension_id>', {\n   *   extension: {\n   *     name: 'My awesome extension',\n   *     src: 'https://example.com/my',\n   *     fieldTypes: [\n   *       {\n   *         type: 'Symbol'\n   *       },\n   *       {\n   *         type: 'Text'\n   *       }\n   *     ],\n   *     sidebar: false\n   *   }\n   * }))\n   * .then((uiExtension) => console.log(uiExtension))\n   * .catch(console.error)\n   */\n  function createUiExtensionWithId(id, data) {\n    return http.put('extensions/' + id, data).then(function (response) {\n      return wrapUiExtension(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets all snapshots of an entry\n   * @memberof ContentfulEnvironmentAPI\n   * @func getEntrySnapshots\n   * @param {string} entryId - Entry ID\n   * @param {object=} query - query additional query paramaters\n   * @param {number=} query.skip - optional, number of items to skip\n   * @param {number=} query.limit - optional, limit total number of snapshots returned\n   * @param\n   * @return {Promise<Snapshot.SnapshotCollection>} Promise for a collection of Entry Snapshots\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getEntrySnapshots('<entry_id>'))\n   * .then((snapshots) => console.log(snapshots.items))\n   * .catch(console.error)\n   */\n  function getEntrySnapshots(entryId) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    return http.get('entries/' + entryId + '/snapshots', createRequestConfig({ query: query })).then(function (response) {\n      return wrapSnapshotCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets all snapshots of a contentType\n   * @memberof ContentfulEnvironmentAPI\n   * @func getContentTypeSnapshots\n   * @param {string} contentTypeId - Content Type ID\n   * @param {object=} query - query additional query paramaters\n   * @param {number=} query.skip - optional, number of items to skip\n   * @param {number=} query.limit - optional, limit total number of snapshots returned\n   * @return {Promise<Snapshot.SnapshotCollection>} Promise for a collection of Content Type Snapshots\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => space.getEnvironment('<environment-id>'))\n   * .then((environment) => environment.getContentTypeSnapshots('<contentTypeId>'))\n   * .then((snapshots) => console.log(snapshots.items))\n   * .catch(console.error)\n   */\n  function getContentTypeSnapshots(contentTypeId) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    return http.get('content_types/' + contentTypeId + '/snapshots', createRequestConfig({ query: query })).then(function (response) {\n      return wrapSnapshotCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /*\n   * @private\n   * sdk relies heavily on sys metadata\n   * so we cannot omit the sys property on sdk level\n   *\n   */\n  function normalizeSelect(query) {\n    if (query.select && !/sys/i.test(query.select)) {\n      query.select += ',sys';\n    }\n  }\n\n  return {\n    delete: deleteEnvironment,\n    update: updateEnvironment,\n    getContentType: getContentType,\n    getContentTypes: getContentTypes,\n    createContentType: createContentType,\n    createContentTypeWithId: createContentTypeWithId,\n    getEditorInterfaceForContentType: getEditorInterfaceForContentType,\n    getEntry: getEntry,\n    getEntries: getEntries,\n    createEntry: createEntry,\n    createEntryWithId: createEntryWithId,\n    getAsset: getAsset,\n    getAssets: getAssets,\n    createAsset: createAsset,\n    createAssetWithId: createAssetWithId,\n    createAssetFromFiles: createAssetFromFiles,\n    getUpload: getUpload,\n    createUpload: createUpload,\n    getLocale: getLocale,\n    getLocales: getLocales,\n    createLocale: createLocale,\n    getUiExtension: getUiExtension,\n    getUiExtensions: getUiExtensions,\n    createUiExtension: createUiExtension,\n    createUiExtensionWithId: createUiExtensionWithId,\n    getEntrySnapshots: getEntrySnapshots,\n    getContentTypeSnapshots: getContentTypeSnapshots\n  };\n}","import cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport createEnvironmentApi from '../create-environment-api';\n\n/**\n * @memberof Environment\n * @typedef Environment\n * @prop {Object} sys - System metadata\n * @prop {string} sys.id - Environment id\n * @prop {string} sys.type - Entity type\n * @prop {string} name - Environment name\n * @prop {function(): Object} toPlainObject() - Returns this Environment as a plain JS object\n */\n\n/**\n * @memberof Environment\n * @typedef SpaceCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Environment.Environment>} items\n * @prop {function(): Object} toPlainObject() - Returns this Environment collection as a plain JS object\n */\n\n/**\n * This method creates the API for the given environment with all the methods for\n * reading and creating other entities. It also passes down a clone of the\n * http client with a environment id, so the base path for requests now has the\n * environment id already set.\n * @private\n * @param  {Object} http - HTTP client instance\n * @param  {Object} data - API response for a Environment\n * @return {Environment}\n */\nexport function wrapEnvironment(http, data) {\n  var environment = toPlainObject(cloneDeep(data));\n  var _http$httpClientParam = http.httpClientParams,\n      hostUpload = _http$httpClientParam.hostUpload,\n      defaultHostnameUpload = _http$httpClientParam.defaultHostnameUpload;\n\n  var environmentScopedHttpClient = http.cloneWithNewParams({\n    baseURL: http.defaults.baseURL + 'environments/' + environment.sys.id\n  });\n  var environmentScopedUploadClient = http.cloneWithNewParams({\n    space: environment.sys.space.sys.id,\n    host: hostUpload || defaultHostnameUpload\n  });\n  var environmentApi = createEnvironmentApi({\n    http: environmentScopedHttpClient,\n    httpUpload: environmentScopedUploadClient\n  });\n  var enhancedEnvironment = enhanceWithMethods(environment, environmentApi);\n  return freezeSys(enhancedEnvironment);\n}\n\n/**\n * This method wraps each environment in a collection with the environment API. See wrapEnvironment\n * above for more details.\n * @private\n * @param  {Object} http - HTTP client instance\n * @param  {Object} data - API response for a Environment collection\n * @return {SpaceCollection}\n */\nexport function wrapEnvironmentCollection(http, data) {\n  var environments = toPlainObject(cloneDeep(data));\n  environments.items = environments.items.map(function (entity) {\n    return wrapEnvironment(http, entity);\n  });\n  return freezeSys(environments);\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport cloneDeep from 'lodash/cloneDeep';\n\nimport errorHandler from './error-handler';\n\n/**\n * @private\n */\nexport function createUpdateEntity(_ref) {\n  var http = _ref.http,\n      entityPath = _ref.entityPath,\n      wrapperMethod = _ref.wrapperMethod,\n      headers = _ref.headers;\n\n  return function () {\n    var raw = this.toPlainObject();\n    var data = cloneDeep(raw);\n    delete data.sys;\n    return http.put(entityPath + '/' + this.sys.id, data, {\n      headers: _extends({\n        'X-Contentful-Version': this.sys.version || 0 }, headers)\n    }).then(function (response) {\n      return wrapperMethod(http, response.data);\n    }, errorHandler);\n  };\n}\n\n/**\n * @private\n */\nexport function createDeleteEntity(_ref2) {\n  var http = _ref2.http,\n      entityPath = _ref2.entityPath;\n\n  return function () {\n    return http.delete(entityPath + '/' + this.sys.id).then(function (response) {}, errorHandler);\n  };\n}\n\n/**\n * @private\n */\nexport function createPublishEntity(_ref3) {\n  var http = _ref3.http,\n      entityPath = _ref3.entityPath,\n      wrapperMethod = _ref3.wrapperMethod;\n\n  return function () {\n    return http.put(entityPath + '/' + this.sys.id + '/published', null, {\n      headers: {\n        'X-Contentful-Version': this.sys.version\n      }\n    }).then(function (response) {\n      return wrapperMethod(http, response.data);\n    }, errorHandler);\n  };\n}\n\n/**\n * @private\n */\nexport function createUnpublishEntity(_ref4) {\n  var http = _ref4.http,\n      entityPath = _ref4.entityPath,\n      wrapperMethod = _ref4.wrapperMethod;\n\n  return function () {\n    return http.delete(entityPath + '/' + this.sys.id + '/published').then(function (response) {\n      return wrapperMethod(http, response.data);\n    }, errorHandler);\n  };\n}\n\n/**\n * @private\n */\nexport function createArchiveEntity(_ref5) {\n  var http = _ref5.http,\n      entityPath = _ref5.entityPath,\n      wrapperMethod = _ref5.wrapperMethod;\n\n  return function () {\n    return http.put(entityPath + '/' + this.sys.id + '/archived').then(function (response) {\n      return wrapperMethod(http, response.data);\n    }, errorHandler);\n  };\n}\n\n/**\n * @private\n */\nexport function createUnarchiveEntity(_ref6) {\n  var http = _ref6.http,\n      entityPath = _ref6.entityPath,\n      wrapperMethod = _ref6.wrapperMethod;\n\n  return function () {\n    return http.delete(entityPath + '/' + this.sys.id + '/archived').then(function (response) {\n      return wrapperMethod(http, response.data);\n    }, errorHandler);\n  };\n}\n\n/**\n * @private\n */\nexport function createPublishedChecker() {\n  return function () {\n    return !!this.sys.publishedVersion;\n  };\n}\n\n/**\n * @private\n */\nexport function createUpdatedChecker() {\n  return function () {\n    // The act of publishing an entity increases its version by 1, so any entry which has\n    // 2 versions higher or more than the publishedVersion has unpublished changes.\n    return !!(this.sys.publishedVersion && this.sys.version > this.sys.publishedVersion + 1);\n  };\n}\n\n/**\n * @private\n */\nexport function createDraftChecker() {\n  return function () {\n    return !this.sys.publishedVersion;\n  };\n}\n\n/**\n * @private\n */\nexport function createArchivedChecker() {\n  return function () {\n    return !!this.sys.archivedVersion;\n  };\n}","/**\n * Snapshot instances\n * @namespace Snapshot\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\n\n/**\n * @memberof Snapshot\n * @typedef Snapshot\n * @prop {Meta.Sys} sys - System metadata\n * @prop {Object<EntryFields.Field>} fields - Object with content for each field\n * @prop {function(): Object} toPlainObject() - Returns this Snapshot as a plain JS object\n */\nfunction createSnapshotApi(http) {\n  return {/* In case the snapshot object evolve later */};\n}\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw snapshot data\n * @return {Snapshot} Wrapped snapshot data\n */\nexport function wrapSnapshot(http, data) {\n  var snapshot = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(snapshot, createSnapshotApi(http));\n  return freezeSys(snapshot);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw snapshot collection data\n * @return {ApiKeyCollection} Wrapped snapshot collection data\n */\nexport function wrapSnapshotCollection(http, data) {\n  var snapshots = toPlainObject(cloneDeep(data));\n  snapshots.items = snapshots.items.map(function (entity) {\n    return wrapSnapshot(http, entity);\n  });\n  return freezeSys(snapshots);\n}","/**\n * Entry instances\n * @namespace Entry\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject, createRequestConfig } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createUpdateEntity, createDeleteEntity, createPublishEntity, createUnpublishEntity, createArchiveEntity, createUnarchiveEntity, createPublishedChecker, createUpdatedChecker, createDraftChecker, createArchivedChecker } from '../instance-actions';\nimport errorHandler from '../error-handler';\nimport { wrapSnapshot, wrapSnapshotCollection } from './snapshot';\n/**\n * Types of fields found in an Entry\n * @namespace EntryFields\n */\n\n/**\n * @memberof EntryFields\n * @typedef Symbol\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Text\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Integer\n * @type number\n */\n\n/**\n * @memberof EntryFields\n * @typedef Number\n * @type number\n */\n\n/**\n * @memberof EntryFields\n * @typedef Date\n * @type string\n */\n\n/**\n * @memberof EntryFields\n * @typedef Boolean\n * @type boolean\n */\n\n/**\n * @memberof EntryFields\n * @typedef Location\n * @prop {string} lat - latitude\n * @prop {string} lon - longitude\n */\n\n/**\n * A Field in an Entry can have one of the following types that can be defined in Contentful. See <a href=\"https://www.contentful.com/developers/docs/references/field-type/\">Field Types</a> for more details.\n * @memberof EntryFields\n * @typedef Field\n * @type EntryFields.Symbol | EntryFields.Text | EntryFields.Integer | EntryFields.Number | EntryFields.Date | EntryFields.Boolean | EntryFields.Location | Meta.Link | Array<EntryFields.Symbol|Meta.Link> | Object\n */\n\n/**\n * @memberof Entry\n * @typedef Entry\n * @prop {Meta.Sys} sys - Standard system metadata with additional entry specific properties\n * @prop {Meta.Link} sys.contentType - Content Type used by this Entry\n * @prop {string=} sys.locale - If present, indicates the locale which this entry uses\n * @prop {Object<EntryFields.Field>} fields - Object with content for each field\n * @prop {function(): Object} toPlainObject() - Returns this Entry as a plain JS object\n */\n\nfunction createEntryApi(http) {\n  return {\n\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof Entry\n     * @func update\n     * @return {Promise<Entry>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEntry('<entry_id>'))\n     * .then((entry) => {\n     *   entry.fields.title['en-US'] = 'New entry title'\n     *   return entry.update()\n     * })\n     * .then((entry) => console.log(`Entry ${entry.sys.id} updated.`))\n     * .catch(console.error)\n    */\n    update: createUpdateEntity({\n      http: http,\n      entityPath: 'entries',\n      wrapperMethod: wrapEntry\n    }),\n\n    /**\n     * Deletes this object on the server.\n     * @memberof Entry\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEntry('<entry_id>'))\n     * .then((entry) => entry.delete())\n     * .then(() => console.log(`Entry deleted.`))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'entries'\n    }),\n\n    /**\n     * Publishes the object\n     * @memberof Entry\n     * @func publish\n     * @return {Promise<Entry>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEntry('<entry_id>'))\n     * .then((entry) => entry.publish())\n     * .then((entry) => console.log(`Entry ${entry.sys.id} published.`))\n     * .catch(console.error)\n     */\n    publish: createPublishEntity({\n      http: http,\n      entityPath: 'entries',\n      wrapperMethod: wrapEntry\n    }),\n\n    /**\n     * Unpublishes the object\n     * @memberof Entry\n     * @func unpublish\n     * @return {Promise<Entry>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEntry('<entry_id>'))\n     * .then((entry) => entry.unpublish())\n     * .then((entry) => console.log(`Entry ${entry.sys.id} unpublished.`))\n     * .catch(console.error)\n     */\n    unpublish: createUnpublishEntity({\n      http: http,\n      entityPath: 'entries',\n      wrapperMethod: wrapEntry\n    }),\n\n    /**\n     * Archives the object\n     * @memberof Entry\n     * @func archive\n     * @return {Promise<Entry>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEntry('<entry_id>'))\n     * .then((entry) => entry.archive())\n     * .then((entry) => console.log(`Entry ${entry.sys.id} archived.`))\n     * .catch(console.error)\n     */\n    archive: createArchiveEntity({\n      http: http,\n      entityPath: 'entries',\n      wrapperMethod: wrapEntry\n    }),\n\n    /**\n     * Unarchives the object\n     * @memberof Entry\n     * @func unarchive\n     * @return {Promise<Entry>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEntry('<entry_id>'))\n     * .then((entry) => entry.unarchive())\n     * .then((entry) => console.log(`Entry ${entry.sys.id} unarchived.`))\n     * .catch(console.error)\n     */\n    unarchive: createUnarchiveEntity({\n      http: http,\n      entityPath: 'entries',\n      wrapperMethod: wrapEntry\n    }),\n\n    /**\n     * Gets all snapshots of an entry\n     * @memberof Entry\n     * @func getSnapshots\n     * @return Promise<Snapshot>\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEntry('<entry_id>'))\n     * .then((entry) => entry.getSnapshots())\n     * .then((snapshots) => console.log(snapshots.items))\n     * .catch(console.error)\n     */\n    getSnapshots: function getSnapshots() {\n      var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n      return http.get('entries/' + this.sys.id + '/snapshots', createRequestConfig({ query: query })).then(function (response) {\n        return wrapSnapshotCollection(http, response.data);\n      }, errorHandler);\n    },\n\n    /**\n     * Gets a snapshot of an entry\n     * @memberof Entry\n     * @func getSnapshot\n     * @param {string} snapshotId - Id of the snapshot\n     * @return Promise<Snapshot>\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEntry('<entry_id>'))\n     * .then((entry) => entry.getSnapshot('<snapshot_id>'))\n     * .then((snapshot) => console.log(snapshot))\n     * .catch(console.error)\n     */\n    getSnapshot: function getSnapshot(snapshotId) {\n      return http.get('entries/' + this.sys.id + '/snapshots/' + snapshotId).then(function (response) {\n        return wrapSnapshot(http, response.data);\n      }, errorHandler);\n    },\n    /**\n     * Checks if the entry is published. A published entry might have unpublished changes (@see {Entry.isUpdated})\n     * @memberof Entry\n     * @func isPublished\n     * @return {boolean}\n     */\n    isPublished: createPublishedChecker(),\n\n    /**\n     * Checks if the entry is updated. This means the entry was previously published but has unpublished changes.\n     * @memberof Entry\n     * @func isUpdated\n     * @return {boolean}\n     */\n    isUpdated: createUpdatedChecker(),\n\n    /**\n     * Checks if the entry is in draft mode. This means it is not published.\n     * @memberof Entry\n     * @func isDraft\n     * @return {boolean}\n     */\n    isDraft: createDraftChecker(),\n\n    /**\n     * Checks if entry is archived. This means it's not exposed to the Delivery/Preview APIs.\n     * @memberof Entry\n     * @func isArchived\n     * @return {boolean}\n     */\n    isArchived: createArchivedChecker()\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw entry data\n * @return {Entry} Wrapped entry data\n */\nexport function wrapEntry(http, data) {\n  var entry = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(entry, createEntryApi(http));\n  return freezeSys(entry);\n}\n\n/**\n * Data is also mixed in with link getters if links exist and includes were requested\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw entry collection data\n * @return {EntryCollection} Wrapped entry collection data\n */\nexport function wrapEntryCollection(http, data, resolveLinks) {\n  var entries = toPlainObject(cloneDeep(data));\n  entries.items = entries.items.map(function (entity) {\n    return wrapEntry(http, entity);\n  });\n  return freezeSys(entries);\n}","/**\n * Asset instances\n * @namespace Asset\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport errorHandler from '../error-handler';\nimport { createUpdateEntity, createDeleteEntity, createPublishEntity, createUnpublishEntity, createArchiveEntity, createUnarchiveEntity, createPublishedChecker, createUpdatedChecker, createDraftChecker, createArchivedChecker } from '../instance-actions';\n\nvar ASSET_PROCESSING_CHECK_WAIT = 2000;\nvar ASSET_PROCESSING_CHECK_RETRIES = 10;\n\n/**\n * @memberof Asset\n * @typedef Asset\n * @prop {Meta.Sys} sys - Standard system metadata with additional asset specific properties\n * @prop {string=} sys.locale - If present, indicates the locale which this asset uses\n * @prop {Object} fields - Object with content for each field\n * @prop {string} fields.title - Title for this asset\n * @prop {string} fields.description - Description for this asset\n * @prop {Object} fields.file - File object for this asset\n * @prop {Object} fields.file.fileName - Name for the file\n * @prop {string} fields.file.contentType - Mime type for the file\n * @prop {string=} fields.file.upload - Url where the file is available to be downloaded from, into the Contentful asset system. After the asset is processed this field is gone.\n * @prop {string=} fields.file.url - Url where the file is available at the Contentful media asset system. This field won't be available until the asset is processed.\n * @prop {Object} fields.file.details - Details for the file, depending on file type (example: image size in bytes, etc)\n * @prop {function(): Object} toPlainObject() - Returns this Asset as a plain JS object\n */\n\nfunction createAssetApi(http) {\n  function checkIfAssetHasUrl(_ref) {\n    var resolve = _ref.resolve,\n        reject = _ref.reject,\n        id = _ref.id,\n        locale = _ref.locale,\n        _ref$processingCheckW = _ref.processingCheckWait,\n        processingCheckWait = _ref$processingCheckW === undefined ? ASSET_PROCESSING_CHECK_WAIT : _ref$processingCheckW,\n        _ref$processingCheckR = _ref.processingCheckRetries,\n        processingCheckRetries = _ref$processingCheckR === undefined ? ASSET_PROCESSING_CHECK_RETRIES : _ref$processingCheckR,\n        _ref$checkCount = _ref.checkCount,\n        checkCount = _ref$checkCount === undefined ? 0 : _ref$checkCount;\n\n    http.get('assets/' + id).then(function (response) {\n      return wrapAsset(http, response.data);\n    }, errorHandler).then(function (asset) {\n      if (asset.fields.file[locale].url) {\n        resolve(asset);\n      } else if (checkCount === processingCheckRetries) {\n        var error = new Error();\n        error.name = 'AssetProcessingTimeout';\n        error.message = 'Asset is taking longer then expected to process.';\n        reject(error);\n      } else {\n        checkCount++;\n        setTimeout(function () {\n          return checkIfAssetHasUrl({\n            resolve: resolve,\n            reject: reject,\n            id: id,\n            locale: locale,\n            checkCount: checkCount,\n            processingCheckWait: processingCheckWait,\n            processingCheckRetries: processingCheckRetries\n          });\n        }, processingCheckWait);\n      }\n    });\n  }\n\n  function processForLocale(locale) {\n    var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        processingCheckWait = _ref2.processingCheckWait,\n        processingCheckRetries = _ref2.processingCheckRetries;\n\n    var assetId = this.sys.id;\n    return http.put('assets/' + this.sys.id + '/files/' + locale + '/process', null, {\n      headers: {\n        'X-Contentful-Version': this.sys.version\n      }\n    }).then(function () {\n      return new Promise(function (resolve, reject) {\n        return checkIfAssetHasUrl({\n          resolve: resolve,\n          reject: reject,\n          id: assetId,\n          locale: locale,\n          processingCheckWait: processingCheckWait,\n          processingCheckRetries: processingCheckRetries\n        });\n      });\n    }, errorHandler);\n  }\n\n  function processForAllLocales() {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    var self = this;\n    var locales = Object.keys(this.fields.file || {});\n\n    var mostUpToDateAssetVersion = void 0;\n\n    // Let all the locales process\n    // Since they all resolve at different times,\n    // we need to pick the last resolved value\n    // to reflect the most recent state\n    var allProcessingLocales = locales.map(function (locale) {\n      return processForLocale.call(self, locale, options).then(function (result) {\n        // Side effect of always setting the most up to date asset version\n        // The last one to call this will be the last one that finished\n        // and thus the most up to date\n        mostUpToDateAssetVersion = result;\n      });\n    });\n\n    return Promise.all(allProcessingLocales).then(function () {\n      return mostUpToDateAssetVersion;\n    });\n  }\n\n  return {\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof Asset\n     * @func update\n     * @return {Promise<Asset>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getAsset('<asset_id>'))\n     * .then((asset) => {\n     *   asset.fields.title['en-US'] = 'New asset title'\n     *   return asset.update()\n     * })\n     * .then((asset) => console.log(`Asset ${asset.sys.id} updated.`)\n     * .catch(console.error)\n    */\n    update: createUpdateEntity({\n      http: http,\n      entityPath: 'assets',\n      wrapperMethod: wrapAsset\n    }),\n\n    /**\n     * Deletes this object on the server.\n     * @memberof Asset\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getAsset('<asset_id>'))\n     * .then((asset) => asset.delete())\n     * .then((asset) => console.log(`Asset deleted.`)\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'assets'\n    }),\n\n    /**\n     * Publishes the object\n     * @memberof Asset\n     * @func publish\n     * @return {Promise<Asset>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getAsset('<asset_id>'))\n     * .then((asset) => asset.publish())\n     * .then((asset) => console.log(`Asset ${asset.sys.id} published.`)\n     * .catch(console.error)\n    */\n    publish: createPublishEntity({\n      http: http,\n      entityPath: 'assets',\n      wrapperMethod: wrapAsset\n    }),\n\n    /**\n     * Unpublishes the object\n     * @memberof Asset\n     * @func unpublish\n     * @return {Promise<Asset>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getAsset('<asset_id>'))\n     * .then((asset) => asset.unpublish())\n     * .then((asset) => console.log(`Asset ${asset.sys.id} unpublished.`)\n     * .catch(console.error)\n    */\n    unpublish: createUnpublishEntity({\n      http: http,\n      entityPath: 'assets',\n      wrapperMethod: wrapAsset\n    }),\n\n    /**\n     * Archives the object\n     * @memberof Asset\n     * @func archive\n     * @return {Promise<Asset>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getAsset('<asset_id>'))\n     * .then((asset) => asset.archive())\n     * .then((asset) => console.log(`Asset ${asset.sys.id} archived.`)\n     * .catch(console.error)\n    */\n    archive: createArchiveEntity({\n      http: http,\n      entityPath: 'assets',\n      wrapperMethod: wrapAsset\n    }),\n\n    /**\n     * Unarchives the object\n     * @memberof Asset\n     * @func unarchive\n     * @return {Promise<Asset>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getAsset('<asset_id>'))\n     * .then((asset) => asset.unarchive())\n     * .then((asset) => console.log(`Asset ${asset.sys.id} unarchived.`)\n     * .catch(console.error)\n    */\n    unarchive: createUnarchiveEntity({\n      http: http,\n      entityPath: 'assets',\n      wrapperMethod: wrapAsset\n    }),\n\n    /**\n     * Triggers asset processing after an upload, for the file uploaded to a specific locale.\n     * @memberof Asset\n     * @func processForLocale\n     * @param {string} locale - Locale which processing should be triggered for\n     * @param {object} options - Additional options for processing\n     * @prop {number} options.processingCheckWait - Time in milliseconds to wait before checking again if the asset has been processed (default: 500ms)\n     * @prop {number} options.processingCheckRetries - Maximum amount of times to check if the asset has been processed (default: 5)\n     * @return {Promise<Asset>} Object returned from the server with updated metadata.\n     * @throws {AssetProcessingTimeout} If the asset takes too long to process. If this happens, retrieve the asset again, and if the url property is available, then processing has succeeded. If not, your file might be damaged.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     * client.getSpace('<space_id>')\n     * .then((space) => space.createAssetWithId('<asset_id>', {\n     *   title: {\n     *     'en-US': 'Playsam Streamliner',\n     *   },\n     *   file: {\n     *     'en-US': {\n     *       contentType: 'image/jpeg',\n     *       fileName: 'example.jpeg',\n     *       upload: 'https://example.com/example.jpg'\n     *     }\n     *   }\n     * }))\n     * .then((asset) => asset.processForLocale('en-US'))\n     * .then((asset) => console.log(asset))\n     * .catch(console.error)\n     */\n    processForLocale: processForLocale,\n\n    /**\n     * Triggers asset processing after an upload, for the files uploaded to all locales of an asset.\n     * @memberof Asset\n     * @func processForAllLocales\n     * @param {object} options - Additional options for processing\n     * @prop {number} options.processingCheckWait - Time in milliseconds to wait before checking again if the asset has been processed (default: 500ms)\n     * @prop {number} options.processingCheckRetries - Maximum amount of times to check if the asset has been processed (default: 5)\n     * @return {Promise<Asset>} Object returned from the server with updated metadata.\n     * @throws {AssetProcessingTimeout} If the asset takes too long to process. If this happens, retrieve the asset again, and if the url property is available, then processing has succeeded. If not, your file might be damaged.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     * client.getSpace('<space_id>')\n     * .then((space) => space.createAssetWithId('<asset_id>', {\n     *   title: {\n     *     'en-US': 'Playsam Streamliner',\n     *     'de-DE': 'Playsam Streamliner'\n     *   },\n     *   file: {\n     *     'en-US': {\n     *       contentType: 'image/jpeg',\n     *       fileName: 'example.jpeg',\n     *       upload: 'https://example.com/example.jpg'\n     *     },\n     *     'de-DE': {\n     *       contentType: 'image/jpeg',\n     *       fileName: 'example.jpeg',\n     *       upload: 'https://example.com/example-de.jpg'\n     *     }\n     *   }\n     * }))\n     * .then((asset) => asset.processForAllLocales())\n     * .then((asset) => console.log(asset))\n     * .catch(console.error)\n     */\n    processForAllLocales: processForAllLocales,\n\n    /**\n     * Checks if the asset is published. A published asset might have unpublished changes (@see {Asset.isUpdated})\n     * @memberof Asset\n     * @func isPublished\n     * @return {boolean}\n     */\n    isPublished: createPublishedChecker(),\n\n    /**\n     * Checks if the asset is updated. This means the asset was previously published but has unpublished changes.\n     * @memberof Asset\n     * @func isUpdated\n     * @return {boolean}\n     */\n    isUpdated: createUpdatedChecker(),\n\n    /**\n     * Checks if the asset is in draft mode. This means it is not published.\n     * @memberof Asset\n     * @func isDraft\n     * @return {boolean}\n     */\n    isDraft: createDraftChecker(),\n\n    /**\n     * Checks if asset is archived. This means it's not exposed to the Delivery/Preview APIs.\n     * @memberof Asset\n     * @func isArchived\n     * @return {boolean}\n     */\n    isArchived: createArchivedChecker()\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw asset data\n * @return {Asset} Wrapped asset data\n */\nexport function wrapAsset(http, data) {\n  var asset = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(asset, createAssetApi(http));\n  return freezeSys(asset);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw asset collection data\n * @return {AssetCollection} Wrapped asset collection data\n */\nexport function wrapAssetCollection(http, data) {\n  var assets = toPlainObject(cloneDeep(data));\n  assets.items = assets.items.map(function (entity) {\n    return wrapAsset(http, entity);\n  });\n  return freezeSys(assets);\n}","/**\n * Editor Interface instances\n * @namespace EditorInterface\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport errorHandler from '../error-handler';\n\n/**\n * @memberof EditorInterface\n * @typedef Control\n * @prop {srting} fieldId - the id of the customized field\n * @prop {string} widgetId - customization associated to the field\n */\n\n/**\n * @memberof EditorInterface\n * @typedef EditorInterface\n * @prop {Meta.Sys} sys - System metadata\n * @prop {EditorInterface.Control[]} controls - array of fields and it's associated widgetId\n */\n\nfunction createEditorInterfaceApi(http) {\n  return {\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof EditorInterface\n     * @func update\n     * @return {Promise<EditorInterface>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<contentType_id>'))\n     * .then((contentType) => contentType.getEditorInterface())\n     * .then((editorInterface) => {\n     *  editorInterface.controls[0] = { \"fieldId\": \"title\", \"widgetId\": \"singleLine\"}\n     *  return editorInterface.update()\n     * })\n     * .catch(console.error)\n     */\n    update: function update() {\n      var raw = this.toPlainObject();\n      var data = cloneDeep(raw);\n      delete data.sys;\n      return http.put('content_types/' + this.sys.contentType.sys.id + '/editor_interface', data, {\n        headers: { 'X-Contentful-Version': this.sys.version }\n      }).then(function (response) {\n        return wrapEditorInterface(http, response.data);\n      }, errorHandler);\n    },\n    /**\n     * gets a control for a specific field\n     * @memberof EditorInterface\n     * @func getControlForField\n     * @return {?Object} control object for specific field.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<contentType_id>'))\n     * .then((contentType) => contentType.getEditorInterface())\n     * .then((editorInterface) => {\n     *  control = editorInterface.getControlForField('<field-id>')\n     *  console.log(control)\n     * })\n     * .catch(console.error)\n     */\n    getControlForField: function getControlForField(fieldId) {\n      var result = this.controls.filter(function (control) {\n        return control.fieldId === fieldId;\n      });\n      return result && result.length > 0 ? result[0] : null;\n    }\n  };\n}\n\n/**\n* @private\n* @param {Object} http - HTTP client instance\n* @param {Object} data - Raw editor-interface data\n* @return {EditorInterface} Wrapped editor-interface data\n*/\nexport function wrapEditorInterface(http, data) {\n  var editorInterface = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(editorInterface, createEditorInterfaceApi(http));\n  return freezeSys(editorInterface);\n}","/**\n * Content Type instances\n * @namespace ContentType\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject, createRequestConfig } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createUpdateEntity, createDeleteEntity, createPublishEntity, createUnpublishEntity, createPublishedChecker, createUpdatedChecker, createDraftChecker } from '../instance-actions';\nimport { wrapEditorInterface } from './editor-interface';\nimport errorHandler from '../error-handler';\nimport { wrapSnapshot, wrapSnapshotCollection } from './snapshot';\n/**\n * @memberof ContentType\n * @typedef ContentType\n * @prop {Meta.Sys} sys - System metadata\n * @prop {string} name\n * @prop {string} description\n * @prop {string} displayField - Field used as the main display field for Entries\n * @prop {Array<Field>} fields - All the fields contained in this Content Type\n * @prop {function(): Object} toPlainObject() - Returns this Content Type as a plain JS object\n */\n\nfunction createContentTypeApi(http) {\n  return {\n\n    /**\n     * Sends an update to the server with any changes made to the object's properties. <br />\n     * <strong>Important note about deleting fields</strong>: The standard way to delete a field is with two updates: first omit the property from your responses (set the field attribute \"omitted\" to true), and then\n     * delete it by setting the attribute \"deleted\" to true. See the \"Deleting fields\" section in the\n     * <a href=\"https://www.contentful.com/developers/docs/references/content-management-api/#/reference/content-types/content-type\">API reference</a> for more reasoning. Alternatively,\n     * you may use the convenience method omitAndDeleteField to do both steps at once.\n     * @memberof ContentType\n     * @func update\n     * @return {Promise<ContentType>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<contentType_id>'))\n     * .then((contentType) => {\n     *  contentType.name = 'New name'\n     *  return contentType.update()\n     * })\n     * .then(contentType => console.log(contentType))\n     * .catch(console.error)\n     */\n    update: createUpdateEntity({\n      http: http,\n      entityPath: 'content_types',\n      wrapperMethod: wrapContentType\n    }),\n\n    /**\n     * Deletes this object on the server.\n     * @memberof ContentType\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<contentType_id>'))\n     * .then((contentType) => contentType.delete())\n     * .then(() => console.log('contentType deleted'))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'content_types'\n    }),\n\n    /**\n     * Publishes the object\n     * @memberof ContentType\n     * @func publish\n     * @return {Promise<ContentType>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<contentType_id>'))\n     * .then((contentType) => contentType.publish())\n     * .then((contentType) => console.log(`${contentType.sys.id} is published`))\n     * .catch(console.error)\n     */\n    publish: createPublishEntity({\n      http: http,\n      entityPath: 'content_types',\n      wrapperMethod: wrapContentType\n    }),\n\n    /**\n     * Unpublishes the object\n     * @memberof ContentType\n     * @func unpublish\n     * @return {Promise<ContentType>} Object returned from the server with updated metadata.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<contentType_id>'))\n     * .then((contentType) => contentType.unpublish())\n     * .then((contentType) => console.log(`${contentType.sys.id} is unpublished`))\n     * .catch(console.error)\n     */\n    unpublish: createUnpublishEntity({\n      http: http,\n      entityPath: 'content_types',\n      wrapperMethod: wrapContentType\n    }),\n\n    /**\n     * Gets the editor interface for the object <br />\n     * <strong>Important note</strong>: The editor interface only represent a published contentType.<br />\n     * To get the most recent representation of the contentType make sure to publish it first\n     * @memberof ContentType\n     * @func getEditorInterface\n     * @return {Promise<EditorInterface.EditorInterface>} Object returned from the server with the current editor interface.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<contentType_id>'))\n     * .then((contentType) => contentType.getEditorInterface())\n     * .then((editorInterface) => console.log(editorInterface.contorls))\n     * .catch(console.error)\n     */\n    getEditorInterface: function getEditorInterface() {\n      return http.get('content_types/' + this.sys.id + '/editor_interface').then(function (response) {\n        return wrapEditorInterface(http, response.data);\n      }, errorHandler);\n    },\n\n    /**\n     * Gets all snapshots of a contentType\n     * @memberof ContentType\n     * @func getSnapshots\n     * @return Promise<Snapshot>\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<contentType_id>'))\n     * .then((entry) => entry.getSnapshots())\n     * .then((snapshots) => console.log(snapshots.items))\n     * .catch(console.error)\n     */\n    getSnapshots: function getSnapshots() {\n      var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n      return http.get('content_types/' + this.sys.id + '/snapshots', createRequestConfig({ query: query })).then(function (response) {\n        return wrapSnapshotCollection(http, response.data);\n      }, errorHandler);\n    },\n\n    /**\n     * Gets a snapshot of a contentType\n     * @memberof ContentType\n     * @func getSnapshot\n     * @param {string} snapshotId - Id of the snapshot\n     * @return Promise<Snapshot>\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getContentType('<content_type-id>'))\n     * .then((entry) => entry.getSnapshot('<snapshot-id>'))\n     * .then((snapshot) => console.log(snapshot))\n     * .catch(console.error)\n     */\n    getSnapshot: function getSnapshot(snapshotId) {\n      return http.get('content_types/' + this.sys.id + '/snapshots/' + snapshotId).then(function (response) {\n        return wrapSnapshot(http, response.data);\n      }, errorHandler);\n    },\n    /**\n     * Checks if the contentType is published. A published contentType might have unpublished changes (@see {ContentType.isUpdated})\n     * @memberof ContentType\n     * @func isPublished\n     * @return {boolean}\n     */\n    isPublished: createPublishedChecker(),\n\n    /**\n     * Checks if the contentType is updated. This means the contentType was previously published but has unpublished changes.\n     * @memberof ContentType\n     * @func isUpdated\n     * @return {boolean}\n     */\n    isUpdated: createUpdatedChecker(),\n\n    /**\n     * Checks if the contentType is in draft mode. This means it is not published.\n     * @memberof ContentType\n     * @func isDraft\n     * @return {boolean}\n     */\n    isDraft: createDraftChecker(),\n\n    /**\n     * Omits and deletes a field if it exists on the contentType. This is a convenience method which does both operations at once and potentially less\n     * safe than the standard way. See note about deleting fields on the Update method.\n     * @memberof ContentType\n     * @func omitAndDeleteField\n     * @return {Promise<ContentType>} Object returned from the server with updated metadata.\n     */\n    omitAndDeleteField: function omitAndDeleteField(id) {\n      return this.findAndUpdateField(id, 'omitted', true).then(function (newContentType) {\n        return newContentType.findAndUpdateField(id, 'deleted', true);\n      }).catch(errorHandler);\n    },\n\n    /**\n     * @private\n     * @param {string} id - unique ID of the field\n     * @param {string} key - the attribute on the field to change\n     * @param {string} value - the value to set the attribute to\n     * @return {Promise<ContentType>}\n     */\n    findAndUpdateField: function findAndUpdateField(id, key, value) {\n      var field = this.fields.find(function (field) {\n        return field.id === id;\n      });\n      if (!field) {\n        return Promise.reject(new Error('Tried to omitAndDeleteField on a nonexistent field, ' + id + ', on the content type ' + this.name + '.'));\n      }\n      field[key] = value;\n      return this.update();\n    }\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw content type data\n * @return {ContentType} Wrapped content type data\n */\nexport function wrapContentType(http, data) {\n  var contentType = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(contentType, createContentTypeApi(http));\n  return freezeSys(contentType);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw content type collection data\n * @return {ContentTypeCollection} Wrapped content type collection data\n */\nexport function wrapContentTypeCollection(http, data) {\n  var contentTypes = toPlainObject(cloneDeep(data));\n  contentTypes.items = contentTypes.items.map(function (entity) {\n    return wrapContentType(http, entity);\n  });\n  return freezeSys(contentTypes);\n}","/**\n * Locale instances\n * @namespace Locale\n */\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createUpdateEntity, createDeleteEntity } from '../instance-actions';\n\n/**\n * @memberof Locale\n * @typedef Locale\n * @prop {Meta.Sys} sys - System metadata\n * @prop {string} name\n * @prop {string} code - Locale code (example: en-us)\n * @prop {string} fallbackCode - the locale code to fallback to when there is not content for the current locale\n * @prop {boolean} contentDeliveryApi - If the content under this locale should be available on the CDA (for public reading)\n * @prop {boolean} contentManagementApi - If the content under this locale should be available on the CMA (for editing)\n * @prop {boolean} default - If this is the default locale\n * @prop {boolean} optional - If the locale needs to be filled in on entries or not\n * @prop {function(): Object} toPlainObject() - Returns this Locale as a plain JS object\n */\n\nfunction createLocaleApi(http) {\n  return {\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof Locale\n     * @func update\n     * @return {Promise<Locale>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getLocale('<locale_id>'))\n     * .then((locale) => {\n     *   locale.name = 'New locale name'\n     *   return locale.update()\n     * })\n     * .then((locale) => console.log(`locale ${locale.sys.id} updated.`))\n     * .catch(console.error)\n     */\n    update: function update() {\n      var locale = this;\n      delete locale.default; // we should not send this back\n      return createUpdateEntity({\n        http: http,\n        entityPath: 'locales',\n        wrapperMethod: wrapLocale\n      }).call(locale);\n    },\n\n    /**\n     * Deletes this object on the server.\n     * @memberof Locale\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getLocale('<locale_id>'))\n     * .then((locale) => locale.delete())\n     * .then(() => console.log(`locale deleted.`))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'locales'\n    })\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw locale data\n * @return {Locale} Wrapped locale data\n */\nexport function wrapLocale(http, data) {\n  delete data.internal_code;\n  var locale = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(locale, createLocaleApi(http));\n  return freezeSys(locale);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw locale collection data\n * @return {LocaleCollection} Wrapped locale collection data\n */\nexport function wrapLocaleCollection(http, data) {\n  var locales = toPlainObject(cloneDeep(data));\n  locales.items = locales.items.map(function (entity) {\n    return wrapLocale(http, entity);\n  });\n  return freezeSys(locales);\n}","/**\n * Webhook instances\n * @namespace Webhook\n */\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport errorHandler from '../error-handler';\nimport { createUpdateEntity, createDeleteEntity } from '../instance-actions';\n\n/**\n * @memberof Webhook\n * @typedef Webhook\n * @prop {Meta.Sys} sys - System metadata\n * @prop {string} name\n * @prop {string} url - Url which the webhook will call\n * @prop {string} httpBasicUsername - Username for basic HTTP authentication\n * @prop {string} httpBasicPassword - Password for basic HTTP authentication\n * @prop {object} headers - Key value pairs of additional headers to be sent with every webhook call.\n * @prop {array} topics - Topics which this webhook should be subscribed to. See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/webhooks/create-a-webhook for more details\n * @prop {function(): Object} toPlainObject() - Returns this Webhook as a plain JS object\n */\n\nfunction createWebhookApi(http) {\n  return {\n\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof Webhook\n     * @func update\n     * @return {Promise<Webhook>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getWebhook('<webhook_id>'))\n     * .then((webhook) => {\n     *  webhook.name = 'new webhook name'\n     *  return webhook.update()\n     * })\n     * .then((webhook) => console.log(`webhook ${webhook.sys.id} updated.`))\n     * .catch(console.error)\n     */\n    update: createUpdateEntity({\n      http: http,\n      entityPath: 'webhook_definitions',\n      wrapperMethod: wrapWebhook\n    }),\n\n    /**\n     * Deletes this object on the server.\n     * @memberof Webhook\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getWebhook('<webhook_id>'))\n     * .then((webhook) => webhook.delete())\n     * .then((webhook) => console.log(`webhook ${webhook.sys.id} updated.`))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'webhook_definitions'\n    }),\n\n    /**\n     * List of the most recent webhook calls. See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/webhook-calls/webhook-call-overviews for more details.\n     * @memberof Webhook\n     * @func getCalls\n     * @return {Promise<object>} Promise for list of calls\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getWebhook('<webhook_id>'))\n     * .then((webhook) => webhook.getCalls())\n     * .then((response) => console.log(response.items)) // webhook calls\n     * .catch(console.error)\n     */\n    getCalls: function getCalls() {\n      return http.get('webhooks/' + this.sys.id + '/calls').then(function (response) {\n        return response.data;\n      }, errorHandler);\n    },\n\n    /**\n     * Webhook call with specific id. See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/webhook-calls/webhook-call-overviews for more details\n     * @memberof Webhook\n     * @func getCalls\n     * @return {Promise<object>} Promise for call details\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getWebhook('<webhook_id>'))\n     * .then((webhook) => webhook.getCall(<call-id>))\n     * .then((webhookCall) => console.log(webhookCall))\n     * .catch(console.error)\n     */\n    getCall: function getCall(id) {\n      return http.get('webhooks/' + this.sys.id + '/calls/' + id).then(function (response) {\n        return response.data;\n      }, errorHandler);\n    },\n\n    /**\n     * Overview of the health of webhook calls. See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/webhook-calls/webhook-call-overviews for more details.\n     * @memberof Webhook\n     * @func getHealth\n     * @return {Promise<object>} Promise for health info\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getWebhook('<webhook_id>'))\n     * .then((webhook) => webhook.getHealth())\n     * .then((webhookHealth) => console.log(webhookHealth))\n     * .catch(console.error)\n     */\n    getHealth: function getHealth() {\n      return http.get('webhooks/' + this.sys.id + '/health').then(function (response) {\n        return response.data;\n      }, errorHandler);\n    }\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw webhook data\n * @return {Webhook} Wrapped webhook data\n */\nexport function wrapWebhook(http, data) {\n  var webhook = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(webhook, createWebhookApi(http));\n  return freezeSys(webhook);\n}\n\n/**\n * @memberof Webhook\n * @typedef WebhookCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<Webhook.Webhook>} items\n * @prop {function(): Object} toPlainObject() - Returns this Webhook collection as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw webhook collection data\n * @return {WebhookCollection} Wrapped webhook collection data\n */\nexport function wrapWebhookCollection(http, data) {\n  var webhooks = toPlainObject(cloneDeep(data));\n  webhooks.items = webhooks.items.map(function (entity) {\n    return wrapWebhook(http, entity);\n  });\n  return freezeSys(webhooks);\n}","/**\n * Space Membership instances\n * @namespace SpaceMembership\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createUpdateEntity, createDeleteEntity } from '../instance-actions';\n\n/**\n * @memberof SpaceMembership\n * @typedef SpaceMembership\n * @prop {Meta.Sys} sys - System metadata\n * @prop {string} name\n * @prop {boolean} admin - User is an admin\n * @prop {array} roles - Array of Role Links\n * @prop {function(): Object} toPlainObject() - Returns this Space Membership as a plain JS object\n */\n\nfunction createSpaceMembershipApi(http) {\n  return {\n\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof SpaceMembership\n     * @func update\n     * @return {Promise<SpaceMembership>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getSpaceMembership('<spaceMembership_id>'))\n     * .then((spaceMembership) => {\n     *  spaceMembership.name = 'new space membership name'\n     * })\n     * .then((spaceMembership) => console.log(`spaceMembership ${spaceMembership.sys.id} updated.`))\n     * .catch(console.error)\n     */\n    update: createUpdateEntity({\n      http: http,\n      entityPath: 'space_memberships',\n      wrapperMethod: wrapSpaceMembership\n    }),\n\n    /**\n     * Deletes this object on the server.\n     * @memberof SpaceMembership\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getSpaceMembership('<spaceMembership_id>'))\n     * .then((spaceMembership) => spaceMembership.delete())\n     * .then(() => console.log(`spaceMembership deleted.`))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'space_memberships'\n    })\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw space membership data\n * @return {SpaceMembership} Wrapped space membership data\n */\nexport function wrapSpaceMembership(http, data) {\n  var spaceMembership = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(spaceMembership, createSpaceMembershipApi(http));\n  return freezeSys(spaceMembership);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw space membership collection data\n * @return {SpaceMembershipCollection} Wrapped space membership collection data\n */\nexport function wrapSpaceMembershipCollection(http, data) {\n  var spaceMemberships = toPlainObject(cloneDeep(data));\n  spaceMemberships.items = spaceMemberships.items.map(function (entity) {\n    return wrapSpaceMembership(http, entity);\n  });\n  return freezeSys(spaceMemberships);\n}","/**\n * Organization membership instances\n * @namespace OrganizationMembership\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport errorHandler from '../error-handler';\n\n/**\n * @memberof OrganizationMembership\n * @typedef OrganizationMembership\n * @prop {Meta.Sys} sys - System metadata\n * @prop {string} role\n * @prop {boolean} status - User is an admin\n * @prop {function(): Object} toPlainObject() - Returns this Organization Membership as a plain JS object\n */\n\n/**\n * @memberof OrganizationMembership\n * @typedef OrganizationMembershipCollection\n * @prop {number} total\n * @prop {number} limit\n * @prop {number} skip\n * @prop {Object<{type: \"Array\"}>} sys\n * @prop {Array<OrganizationMembership.OrganizationMembership>} items\n * @prop {function(): Object} toPlainObject() - Returns the collection as a plain JS object\n */\n\nfunction createOrganizationMembershipApi(http, orgId) {\n  var baseURL = http.defaults.baseURL.replace('/spaces/', '/organizations/' + orgId);\n\n  return {\n\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof OrganizationMembership\n     * @func update\n     * @return {Promise<OrganizationMembership>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getOrganizations()\n     * .then((organizations) => organizations.items[0])\n     * .then(org => org.getOrganizationMembership('organizationMembership_id'))\n     * .then((organizationMembership) => {\n     *  organizationMembership.role = 'member';\n     *  organizationMembership.update();\n     * })\n     * .catch(console.error)\n     */\n\n    update: function update() {\n      var raw = this.toPlainObject();\n      var role = raw.role;\n\n\n      return http.put('organization_memberships' + '/' + this.sys.id, { role: role }, {\n        headers: {\n          'X-Contentful-Version': this.sys.version || 0\n        },\n        baseURL: baseURL\n      }).then(function (response) {\n        return wrapOrganizationMembership(http, response.data);\n      }, errorHandler);\n    },\n\n    /**\n     * Deletes this object on the server.\n     * @memberof OrganizationMembership\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getOrganizations()\n     * .then((organizations) => organizations.items[0])\n     * .then(org => org.getOrganizationMembership('organizationMembership_id'))\n     * .then((organizationMembership) => {\n     *  organizationMembership.delete();\n     * })\n     * .catch(console.error)\n     */\n\n    delete: function _delete() {\n      return http.delete('organization_memberships' + '/' + this.sys.id, {\n        headers: {\n          'x-contentful-enable-alpha-feature': 'organization-user-management-api'\n        },\n        baseURL: baseURL\n      }).then(function (response) {}, errorHandler);\n    }\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw organization membership data\n * @return {OrganizationMembership} Wrapped organization membership data\n */\nexport function wrapOrganizationMembership(http, data, orgId) {\n  var organizationMembership = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(organizationMembership, createOrganizationMembershipApi(http, orgId));\n  return freezeSys(organizationMembership);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw organization membership collection data\n * @return {OrganizationMembershipCollection} Wrapped organization membership collection data\n */\nexport function wrapOrganizationMembershipCollection(http, data) {\n  var organizationMemberships = toPlainObject(cloneDeep(data));\n  organizationMemberships.items = organizationMemberships.items.map(function (entity) {\n    return wrapOrganizationMembership(http, entity);\n  });\n  return freezeSys(organizationMemberships);\n}","/**\n * Role instances\n * @namespace Role\n */\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createUpdateEntity, createDeleteEntity } from '../instance-actions';\n\n/**\n * See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/roles/create-a-role\n * @memberof Role\n * @typedef Role\n * @prop {Meta.Sys} sys - System metadata\n * @prop {string} name\n * @prop {object} permissions - Permissions for application sections\n * @prop {object} policies\n * @prop {function(): Object} toPlainObject() - Returns this Role as a plain JS object\n */\n\nfunction createRoleApi(http) {\n  return {\n\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof Role\n     * @func update\n     * @return {Promise<Role>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getRole('<roles_id>'))\n     * .then((roles) => {\n     *   roles.name = 'New role name'\n     *   return roles.update()\n     * })\n     * .then((roles) => console.log(`roles ${roles.sys.id} updated.`))\n     * .catch(console.error)\n     */\n    update: createUpdateEntity({\n      http: http,\n      entityPath: 'roles',\n      wrapperMethod: wrapRole\n    }),\n\n    /**\n     * Deletes this object on the server.\n     * @memberof Role\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getRole('<role_id>'))\n     * .then((role) => role.delete())\n     * .then((role) => console.log(`role deleted.`))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'roles'\n    })\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw role data\n * @return {Role} Wrapped role data\n */\nexport function wrapRole(http, data) {\n  var role = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(role, createRoleApi(http));\n  return freezeSys(role);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw role collection data\n * @return {RoleCollection} Wrapped role collection data\n */\nexport function wrapRoleCollection(http, data) {\n  var roles = toPlainObject(cloneDeep(data));\n  roles.items = roles.items.map(function (entity) {\n    return wrapRole(http, entity);\n  });\n  return freezeSys(roles);\n}","/**\n * Api Key instances\n * @namespace ApiKey\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createUpdateEntity, createDeleteEntity } from '../instance-actions';\n\n/**\n * @memberof ApiKey\n * @typedef ApiKey\n * @prop {Meta.Sys} sys - System metadata\n * @prop {string} name\n * @prop {string} description\n * @prop {function(): Object} toPlainObject() - Returns this Api Key as a plain JS object\n */\n\nfunction createApiKeyApi(http) {\n  return {\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof ApiKey\n     * @func update\n     * @return {Promise<ApiKey>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getApiKey(<api-key-id>))\n     * .then((apiKey) => {\n     *  apiKey.name = 'New name'\n     *  return apiKey.update()\n     * })\n     * .then(apiKey => console.log(apiKey.name))\n     * .catch(console.error)\n     */\n    update: function update() {\n      if ('accessToken' in this) {\n        delete this.accessToken;\n      }\n      if ('preview_api_key' in this) {\n        delete this.preview_api_key;\n      }\n      if ('policies' in this) {\n        delete this.policies;\n      }\n      var update = createUpdateEntity({\n        http: http,\n        entityPath: 'api_keys',\n        wrapperMethod: wrapApiKey\n      });\n      return update.call(this);\n    },\n\n    /**\n     * Deletes this object on the server.\n     * @memberof ApiKey\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getApiKey(<api-key-id>))\n     * .then((apiKey) => apiKey.delete())\n     * .then(() => console.log('apikey deleted'))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'api_keys'\n    })\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw api key data\n * @return {ApiKey} Wrapped api key data\n */\nexport function wrapApiKey(http, data) {\n  var apiKey = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(apiKey, createApiKeyApi(http));\n  return freezeSys(apiKey);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw api key collection data\n * @return {ApiKeyCollection} Wrapped api key collection data\n */\nexport function wrapApiKeyCollection(http, data) {\n  var apiKeys = toPlainObject(cloneDeep(data));\n  apiKeys.items = apiKeys.items.map(function (entity) {\n    return wrapApiKey(http, entity);\n  });\n  return freezeSys(apiKeys);\n}","/**\n * Preview Api Key instances\n * @namespace PreviewApiKey\n */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\n\n/**\n * @memberof PreviewApiKey\n * @typedef PreviewApiKey\n * @prop {Meta.Sys} sys - System metadata\n * @prop {string} name\n * @prop {string} description\n * @prop {function(): Object} toPlainObject() - Returns this Preview Api Key as a plain JS object\n */\n\nfunction createPreviewApiKeyApi(http) {\n  return {};\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw api key data\n * @return {PreviewApiKey} Wrapped preview api key data\n */\nexport function wrapPreviewApiKey(http, data) {\n  var previewApiKey = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(previewApiKey, createPreviewApiKeyApi(http));\n  return freezeSys(previewApiKey);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw api key collection data\n * @return {PreviewApiKeyCollection} Wrapped api key collection data\n */\nexport function wrapPreviewApiKeyCollection(http, data) {\n  var previewApiKeys = toPlainObject(cloneDeep(data));\n  previewApiKeys.items = previewApiKeys.items.map(function (entity) {\n    return wrapPreviewApiKey(http, entity);\n  });\n  return freezeSys(previewApiKeys);\n}","/**\n * Upload instances\n * @namespace Upload\n */\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createDeleteEntity } from '../instance-actions';\n\n/**\n * @memberof Upload\n * @typedef {Upload} Upload\n * @prop {Object} sys - Standard system metadata with additional asset specific properties\n * @prop {string} sys.id - The id of the upload\n * @prop {function(): Promise} delete - Deletes an upload\n * @prop {function(): Object} toPlainObject - Returns this Asset as a plain JS object\n */\n\nfunction createUploadApi(http) {\n  return {\n    /**\n     * Deletes this object on the server.\n     * @memberof Upload\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getUpload('<upload_id>'))\n     * .then((upload) => upload.delete())\n     * .then((upload) => console.log(`upload ${upload.sys.id} updated.`))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'uploads'\n    })\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw upload data\n * @return {Upload} Wrapped upload data\n */\nexport function wrapUpload(http, data) {\n  var upload = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(upload, createUploadApi(http));\n  return freezeSys(upload);\n}","/**\n * Contentful Organization API. Contains methods to access any operations at a organization level.\n * @namespace ContentfulOrganizationAPI\n */\n\nimport errorHandler from './error-handler';\nimport entities from './entities';\n\n/**\n * @memberof ContentfulOrganizationAPI\n * @typedef {object} ContentfulOrganizationAPI\n * @prop {function} getOrganizationMembership\n * @prop {function} getOrganizationMemberships\n */\n\n/**\n * Creates API object with methods to access the Organization API\n * @private\n * @param {object} params - API initialization params\n * @prop {object} http - HTTP client instance\n * @prop {object} entities - Object with wrapper methods for each kind of entity\n * @return {ContentfulOrganizationAPI}\n */\nexport default function createOrganizationApi(_ref) {\n  var http = _ref.http,\n      orgId = _ref.orgId;\n  var _entities$organizatio = entities.organizationMembership,\n      wrapOrganizationMembership = _entities$organizatio.wrapOrganizationMembership,\n      wrapOrganizationMembershipCollection = _entities$organizatio.wrapOrganizationMembershipCollection;\n\n  var headers = { 'x-contentful-enable-alpha-feature': 'organization-user-management-api' };\n  var baseURL = http.defaults.baseURL.replace('/spaces/', '/organizations/' + orgId);\n\n  /**\n   * Organization instances.\n   * @namespace Organization\n   */\n\n  /**\n   * Gets a Organization Membership\n   * @memberof ContentfulOrganizationAPI\n   * @param {string} id - Organiztion Membership ID\n   * @return {Promise<OrganizationMembership.OrganizationMembership>} Promise for a Organization Membership\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * client.getOrganizations()\n   * .then((organization) => organization.getOrganizationMembership('organizationMembership_id'))\n   * .then((organizationMembership) => console.log(organizationMembership))\n   * .catch(console.error)\n   */\n  function getOrganizationMembership(id) {\n    return http.get('organization_memberships/' + id, {\n      baseURL: baseURL,\n      headers: headers\n    }).then(function (response) {\n      return wrapOrganizationMembership(http, response.data, orgId);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Organization Memberships\n   * @memberof ContentfulOrganizationAPI\n   * @param {object=} query - Object with search parameters. Check the <a href=\"https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters\">JS SDK tutorial</a> and the <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters\">REST API reference</a> for more details.\n   * @return {Promise<OrganizationMembership.OrganizationMembershipCollection>} Promise for a collection of Organization Memberships\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * client.getOrganizations()\n   * .then((organization) => organization.getOrganizationMemberships({'limit': 100})) // you can add more queries as 'key': 'value'\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n  function getOrganizationMemberships() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    return http.get('organization_memberships', {\n      baseURL: baseURL,\n      headers: headers,\n      query: query\n    }).then(function (response) {\n      return wrapOrganizationMembershipCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  return {\n    getOrganizationMembership: getOrganizationMembership,\n    getOrganizationMemberships: getOrganizationMemberships\n  };\n}","import cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport createOrganizationApi from '../create-organization-api';\nimport enhanceWithMethods from '../enhance-with-methods';\n\n/**\n * @memberof Organization\n * @typedef Organization\n * @prop {Object} sys - System metadata\n * @prop {string} sys.id - Organization id\n * @prop {string} sys.type - Entity type\n * @prop {string} name - Organization name\n * @prop {function(): Object} toPlainObject() - Returns this Organization as a plain JS object\n */\n\n/**\n * This method creates the API for the given organization with all the methods for\n * reading and creating other entities. It also passes down a clone of the\n * http client with a organization id, so the base path for requests now has the\n * organization id already set.\n * @private\n * @param  {Object} http - HTTP client instance\n * @param  {Object} data - API response for a Organization\n * @return {Organization}\n */\n\nexport function wrapOrganization(http, data) {\n  var organization = toPlainObject(cloneDeep(data));\n\n  var organizationApi = createOrganizationApi({\n    http: http,\n    orgId: organization.sys.id\n  });\n  var enhancedOrg = enhanceWithMethods(organization, organizationApi);\n  return freezeSys(enhancedOrg);\n}\n\n/**\n* This method normalizes each organization in a collection.\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw organization collection data\n * @return {OrganizationCollection} Normalized organization collection data\n */\nexport function wrapOrganizationCollection(http, data) {\n  var organizations = toPlainObject(cloneDeep(data));\n  organizations.items = organizations.items.map(function (entity) {\n    return wrapOrganization(http, entity);\n  });\n  return freezeSys(organizations);\n}","/**\n * UI Extension instances\n * @namespace UiExtension\n */\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createUpdateEntity, createDeleteEntity } from '../instance-actions';\n\n/**\n * @memberof UiExtension\n * @typedef UiExtension\n * @prop {Meta.Sys} sys - System metadata\n * @prop {object} extension - UI Extension config\n * @prop {string} extension.name - Extension name\n * @prop {array} extension.fieldTypes - Field types where an extension can be used\n * @prop {array} extension.src - URL where the root HTML document of the extension can be found\n * @prop {array} extension.srcdoc - String representation of the extension (e.g. inline HTML code)\n * @prop {boolean} extension.sidebar - Controls the location of the extension. If true it will be rendered on the sidebar instead of replacing the field's editing control\n * @prop {function(): Object} toPlainObject() - Returns this UI Extension as a plain JS object\n */\n\nfunction createUiExtensionApi(http) {\n  return {\n    /**\n     * Sends an update to the server with any changes made to the object's properties\n     * @memberof UiExtension\n     * @func update\n     * @return {Promise<UiExtension>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getUiExtension('<ui_extension_id>'))\n     * .then((uiExtension) => {\n     *   uiExtension.extension.name = 'New UI Extension name'\n     *   return uiExtension.update()\n     * })\n     * .then((uiExtension) => console.log(`UI Extension ${uiExtension.sys.id} updated.`))\n     * .catch(console.error)\n     */\n    update: createUpdateEntity({\n      http: http,\n      entityPath: 'extensions',\n      wrapperMethod: wrapUiExtension\n    }),\n\n    /**\n     * Deletes this object on the server.\n     * @memberof UiExtension\n     * @func delete\n     * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getUiExtension('<ui_extension_id>'))\n     * .then((uiExtension) => uiExtension.delete())\n     * .then(() => console.log(`UI Extension deleted.`))\n     * .catch(console.error)\n     */\n    delete: createDeleteEntity({\n      http: http,\n      entityPath: 'extensions'\n    })\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw UI Extension data\n * @return {UiExtension} Wrapped UI Extension data\n */\nexport function wrapUiExtension(http, data) {\n  var uiExtension = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(uiExtension, createUiExtensionApi(http));\n  return freezeSys(uiExtension);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw UI Extension collection data\n * @return {UiExtensionCollection} Wrapped UI Extension collection data\n */\nexport function wrapUiExtensionCollection(http, data) {\n  var uiExtensions = toPlainObject(cloneDeep(data));\n  uiExtensions.items = uiExtensions.items.map(function (entity) {\n    return wrapUiExtension(http, entity);\n  });\n  return freezeSys(uiExtensions);\n}","/**\n * @namespace User\n */\n\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport cloneDeep from 'lodash/cloneDeep';\n/**\n * @memberof User\n * @typedef User\n * @prop {Object} sys - System metadata\n * @prop {string} sys.id - User id\n * @prop {string} sys.type - Entity type\n * @prop {string} firstName - User first name\n * @prop {string} lastName - User last name\n * @prop {string} avatarUrl - User avatar url\n * @prop {string} email - User email\n * @prop {boolean} activated - User activated\n * @prop {number} signInCount - User sign in count\n * @prop {boolean} confirmed - User confirmed\n * @prop {function(): Object} toPlainObject() - Returns this User as a plain JS object\n */\n\n/**\n * @memberof User\n * @typedef UserCollection\n * @prop {number} total\n * @prop {number} limit\n * @prop {number} skip\n * @prop {Object<{type: \"Array\"}>} sys\n * @prop {Array<User.User>} items\n * @prop {function(): Object} toPlainObject() - Returns the collection as a plain JS object\n */\n\n/*\n *\n * @private\n * */\nexport function wrapUser(http, data) {\n  var user = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(user, {});\n  return freezeSys(user);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw data collection\n * @return {User.UserCollection} Normalized usage collection\n */\nexport function wrapUserCollection(http, data) {\n  var users = toPlainObject(cloneDeep(data));\n  users.items = users.items.map(function (entity) {\n    return wrapUser(http, entity);\n  });\n  return freezeSys(users);\n}","/**\n * Personal access token\n * @namespace PersonalAccessToken\n * */\n\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport errorHandler from '../error-handler';\n\nfunction createPersonalAccessToken(http) {\n  return {\n    /**\n     * Revokes a personal access token\n     * @memberof PersonalAccessToken\n     * @func revoke\n     * @return {Promise<PersonalAccessToken>} Object the revoked personal access token\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *  accessToken: <content_management_api_key>\n     * })\n     *\n     * client.getPersonalAccessToken('<token-id>')\n     *  .then((personalAccessToken) => {\n     *    return personalAccessToken.revoke()\n     *  })\n     *  .catch(console.error)\n     */\n    revoke: function revoke() {\n      var baseURL = http.defaults.baseURL.replace('/spaces/', '/users/me/access_tokens');\n      return http.put(this.sys.id + '/revoked', null, {\n        baseURL: baseURL\n      }).then(function (response) {\n        return response.data;\n      }, errorHandler);\n    }\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw  personal access token data\n * @return {PersonalAccessToken} Wrapped personal access token\n */\nexport function wrapPersonalAccessToken(http, data) {\n  var personalAccessToken = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(personalAccessToken, createPersonalAccessToken(http));\n  return freezeSys(personalAccessToken);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw personal access collection data\n * @return {PersonalAccessTokenCollection} Wrapped personal access token collection data\n */\nexport function wrapPersonalAccessTokenCollection(http, data) {\n  var personalAccessTokens = toPlainObject(cloneDeep(data));\n  personalAccessTokens.items = personalAccessTokens.items.map(function (entity) {\n    return wrapPersonalAccessToken(http, entity);\n  });\n  return freezeSys(personalAccessTokens);\n}","/**\n * @namespace Usage\n */\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport cloneDeep from 'lodash/cloneDeep';\n\n/**\n * @memberof Usage\n * @typedef { \"cma\" | \"cda\" | \"cpa\" | \"gql\" } UsageMetricEnum\n */\n\n/**\n * The <code>dateRange</code> parameter is optional. When some or all of\n * <code>dateRange</code> properties are missing the usage period is derived\n * from today and the maximum reported data points which are currently set to\n * <code>45 days</code>. The calculated usage period is part of the response\n * object see {@link Usage.Usage}\n *\n * @memberof Usage\n * @typedef UsageQuery\n * @prop {string} [metric[in]] - One or more comma separated usage {@link Usage.UsageMetricEnum metrics}. By default no filtering is applied.\n * @prop {string} [dateRange.startAt] - Start of a usage period in <code>yyyy-mm-dd</code> format\n * @prop {string} [dateRange.endAt] - End of a usage period in <code>yyyy-mm-dd</code> format\n * @prop {number} [skip=0]\n * @prop {number} [limit=25]\n * @prop {string} [order=\"-usage\"]\n */\n\n/**\n * @memberof Usage\n * @typedef Usage\n * @prop {string} sys.id - Usage id in form of <code>usage-{metric}-{entity}-key-{key}-{startAt}-{endAt}</code>\n * @prop {\"OrganizationPeriodicUsage\" | \"SpacePeriodicUsage\"} sys.type - Usage internal type\n * @prop {Meta.Link} [sys.organization] - Organization link when <code>sys.type</code> is <code>OrganizationPeriodicUsage</code>\n * @prop {Meta.Link} [sys.space] - Space link when <code>sys.code</code> is <code>SpacePeriodicUsage</code>\n * @prop {\"apiRequestsCount\"} unitOfMeasure - Unit of measurement\n * @prop {Usage.UsageMetricEnum} metric - Type of the requested metric\n * @prop {string} dateRange.startAt - Start of the requested usage period in <code>yyyy-mm-dd</code> format\n * @prop {string} dateRange.endAt - End of the requested usage period in <code>yyyy-mm-dd</code> format\n * @prop {number} usage - Usage total for the requested <code>metric</code> and usage period\n * @prop {Object} usagePerDay - Usage per day for the requested <code>metric</code> and usage period, <code>{ \"yyyy-dd-mm\": number, ... }</code>\n */\n\n/**\n * @memberof Usage\n * @typedef UsageCollection\n * @prop {number} total\n * @prop {number} limit\n * @prop {number} skip\n * @prop {string} order\n * @prop {Object<{type: \"Array\"}>} sys\n * @prop {Array<Usage.Usage>} items\n * @prop {function(): Object} toPlainObject() - Returns the collection as a plain JS object\n */\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw usage data collection\n * @return {Usage.UsageCollection} Normalized usage collection\n */\nexport function wrapUsageCollection(http, data) {\n  var usage = toPlainObject(cloneDeep(data));\n  return freezeSys(usage);\n}","/**\n * Environment alias instances\n * @namespace EnvironmentAlias\n * @description Environment aliases allow environments to be accessed through another identifier. You must have a V2 org and manually opt-in to this feature from the\n *  environments settings page in the Contentful web app. If you do not have access to this feature, these methods will return 403 errors.\n */\nimport cloneDeep from 'lodash/cloneDeep';\nimport { freezeSys, toPlainObject } from 'contentful-sdk-core';\nimport enhanceWithMethods from '../enhance-with-methods';\nimport { createUpdateEntity } from '../instance-actions';\n\n/**\n * @memberof EnvironmentAlias\n * @typedef EnvironmentAlias\n * @prop {Object} sys - System metadata\n * @prop {string} sys.id - EnvironmentAlias id\n * @prop {string} sys.type - Entity type\n * @prop {Environment} environment - the environment this alias points to\n * @prop {function(): Object} toPlainObject() - Returns this EnvironmentAlias as a plain JS object\n */\n\n/**\n * @memberof EnvironmentAlias\n * @typedef EnvironmentAliasCollection\n * @prop {number} total\n * @prop {number} skip\n * @prop {number} limit\n * @prop {Array<EnvironmentAlias.EnvironmentAlias>} items\n * @prop {function(): Object} toPlainObject() - Returns this EnvironmentAlias collection as a plain JS object\n */\nfunction createEnvironmentAliasApi(http) {\n  return {\n    /**\n     * Sends an update to the server with any changes made to the object's properties. Currently, you can only change the id of the alias's underlying environment. See the example below.\n     * @memberof EnvironmentAlias\n     * @func update\n     * @return {Promise<EnvironmentAlias>} Object returned from the server with updated changes.\n     * @example\n     * const contentful = require('contentful-management')\n     *\n     * const client = contentful.createClient({\n     *   accessToken: '<content_management_api_key>'\n     * })\n     *\n     * client.getSpace('<space_id>')\n     * .then((space) => space.getEnvironmentAlias('<environment_alias_id>'))\n     * .then((alias) => {\n     *   alias.environment.sys.id = '<environment_id>'\n     *   return alias.update()\n     * })\n     * .then((alias) => console.log(`alias ${alias.sys.id} updated.`))\n     * .catch(console.error)\n     */\n    update: createUpdateEntity({\n      http: http,\n      entityPath: 'environment_aliases',\n      wrapperMethod: wrapEnvironmentAlias\n    })\n  };\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw environment alias data\n * @return {EnvironmentAlias} Wrapped environment alias data\n */\nexport function wrapEnvironmentAlias(http, data) {\n  var alias = toPlainObject(cloneDeep(data));\n  enhanceWithMethods(alias, createEnvironmentAliasApi(http));\n  return freezeSys(alias);\n}\n\n/**\n * @private\n * @param {Object} http - HTTP client instance\n * @param {Object} data - Raw environment alias collection data\n * @return {EnvironmentAliasCollection} Wrapped environment alias collection data\n */\nexport function wrapEnvironmentAliasCollection(http, data) {\n  var aliases = toPlainObject(cloneDeep(data));\n  aliases.items = aliases.items.map(function (entity) {\n    return wrapEnvironmentAlias(http, entity);\n  });\n  return freezeSys(aliases);\n}","import * as space from './space';\nimport * as environment from './environment';\nimport * as entry from './entry';\nimport * as asset from './asset';\nimport * as contentType from './content-type';\nimport * as editorInterface from './editor-interface';\nimport * as locale from './locale';\nimport * as webhook from './webhook';\nimport * as spaceMembership from './space-membership';\nimport * as organizationMembership from './organization-membership';\nimport * as role from './role';\nimport * as apiKey from './api-key';\nimport * as previewApiKey from './preview-api-key';\nimport * as upload from './upload';\nimport * as organization from './organization';\nimport * as uiExtension from './ui-extension';\nimport * as snapshot from './snapshot';\nimport * as user from './user';\nimport * as personalAccessToken from './personal-access-token';\nimport * as usage from './usage';\nimport * as environmentAlias from './environment-alias';\n\nexport default {\n  space: space,\n  environment: environment,\n  entry: entry,\n  asset: asset,\n  contentType: contentType,\n  editorInterface: editorInterface,\n  locale: locale,\n  webhook: webhook,\n  spaceMembership: spaceMembership,\n  organizationMembership: organizationMembership,\n  role: role,\n  apiKey: apiKey,\n  previewApiKey: previewApiKey,\n  upload: upload,\n  organization: organization,\n  uiExtension: uiExtension,\n  snapshot: snapshot,\n  user: user,\n  personalAccessToken: personalAccessToken,\n  usage: usage,\n  environmentAlias: environmentAlias\n};","/**\n * Contentful Management API Client. Contains methods which allow access to\n * any operations that can be performed with a management token.\n * @namespace ContentfulClientAPI\n */\n\n/**\n * Types for meta information found across the different entities in Contentful\n * @namespace Meta\n */\n\n/**\n * System metadata. See <a href=\"https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/common-resource-attributes\">Common Resource Attributes</a> for more details.\n * @memberof Meta\n * @typedef Sys\n * @prop {string} type\n * @prop {string} id\n * @prop {Meta.Link} space\n * @prop {string} createdAt\n * @prop {string} updatedAt\n * @prop {number} revision\n */\n\n/**\n * Link to another entity. See <a href=\"https://www.contentful.com/developers/docs/concepts/links/\">Links</a> for more details.\n * @memberof Meta\n * @typedef Link\n * @prop {string} type - type of this entity. Always link.\n * @prop {string} id\n * @prop {string} linkType - type of this link. If defined, either Entry or Asset\n */\n\n/**\n * @memberof ContentfulClientAPI\n * @typedef {Object} ClientAPI\n * @prop {function} getSpace\n * @prop {function} getSpaces\n * @prop {function} createSpace\n * @prop {function} createPersonalAccessToken\n * @prop {function} getCurrentUser\n * @prop {function} getPersonalAccessTokens\n * @prop {function} getPersonalAccessToken\n * @prop {function} getOrganizations\n * @prop {function} rawRequest\n * @prop {function} getOrganizationUsage\n * @prop {function} getSpaceUsage\n */\n\nimport { createRequestConfig } from 'contentful-sdk-core';\nimport errorHandler from './error-handler';\nimport entities from './entities';\n\n/**\n * Creates API object with methods to access functionality from Contentful's\n * Management API\n * @private\n * @param {Object} params - API initialization params\n * @prop {Object} http - HTTP client instance\n * @prop {Function} shouldLinksResolve - Link resolver preconfigured with global setting\n * @return {ClientAPI}\n */\nexport default function createClientApi(_ref) {\n  var http = _ref.http;\n  var _entities$space = entities.space,\n      wrapSpace = _entities$space.wrapSpace,\n      wrapSpaceCollection = _entities$space.wrapSpaceCollection;\n  var wrapUser = entities.user.wrapUser;\n  var _entities$personalAcc = entities.personalAccessToken,\n      wrapPersonalAccessToken = _entities$personalAcc.wrapPersonalAccessToken,\n      wrapPersonalAccessTokenCollection = _entities$personalAcc.wrapPersonalAccessTokenCollection;\n  var wrapOrganizationCollection = entities.organization.wrapOrganizationCollection;\n  var wrapUsageCollection = entities.usage.wrapUsageCollection;\n\n  /**\n   * Gets all spaces\n   * @memberof ContentfulClientAPI\n   * @return {Promise<Space.SpaceCollection>} Promise for a collection of Spaces\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpaces()\n   * .then((response) => console.log(response.items))\n   * .catch(console.error)\n   */\n\n  function getSpaces() {\n    var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    return http.get('', createRequestConfig({ query: query })).then(function (response) {\n      return wrapSpaceCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a space\n   * @memberof ContentfulClientAPI\n   * @param {string} id - Space ID\n   * @return {Promise<Space.Space>} Promise for a Space\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpace('<space_id>')\n   * .then((space) => console.log(space))\n   * .catch(console.error)\n   */\n  function getSpace(id) {\n    return http.get(id).then(function (response) {\n      return wrapSpace(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a space\n   * @memberof ContentfulClientAPI\n   * @see {Space.Space}\n   * @param {object} data - Object representation of the Space to be created\n   * @param {string=} organizationId - Organization ID, if the associated token can manage more than one organization.\n   * @return {Promise<Space.Space>} Promise for the newly created Space\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.createSpace({\n   *   name: 'Name of new space'\n   * })\n   * .then((space) => console.log(space))\n   * .catch(console.error)\n   */\n  function createSpace(data, organizationId) {\n    return http.post('', data, {\n      headers: organizationId ? { 'X-Contentful-Organization': organizationId } : {}\n    }).then(function (response) {\n      return wrapSpace(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a collection of Organizations\n   * @memberof ContentfulClientAPI\n   * @return {Promise<OrganizationCollection>} Promise for a collection of Organizations\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getOrganizations()\n   * .then(result => console.log(result.items))\n   * .catch(console.error)\n   */\n  function getOrganizations() {\n    var baseURL = http.defaults.baseURL.replace('/spaces/', '/organizations/');\n    return http.get('', {\n      baseURL: baseURL\n    }).then(function (response) {\n      return wrapOrganizationCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Get organization usage grouped by {@link Usage.UsageMetricEnum metric}\n   *\n   * @memberof ContentfulClientAPI\n   * @param {string} organizationId - Id of an organization\n   * @param {Usage.UsageQuery} query - Query parameters\n   * @return {Promise<Usage.UsageCollection>} Promise of a collection of usages\n   * @example\n   *\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getOrganizationUsage('<organizationId>', {\n   *    'metric[in]': 'cma,gql',\n   *    'dateRange.startAt': '2019-10-22',\n   *    'dateRange.endAt': '2019-11-10'\n   *    }\n   * })\n   * .then(result => console.log(result.items))\n   * .catch(console.error)\n   */\n  function getOrganizationUsage(organizationId) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    var baseURL = http.defaults.baseURL.replace('/spaces/', '/organizations/' + organizationId + '/organization_periodic_usages');\n    return http.get('', { baseURL: baseURL, params: query }).then(function (response) {\n      return wrapUsageCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Get organization usage grouped by space and metric\n   *\n   * @memberof ContentfulClientAPI\n   * @param {string} organizationId - Id of an organization\n   * @param {Usage.UsageQuery} query - Query parameters\n   * @return {Promise<Usage.UsageCollection>} Promise of a collection of usages\n   * @example\n   *\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getSpaceUsage('<organizationId>', {\n   *    skip: 0,\n   *    limit: 10,\n   *    'metric[in]': 'cda,cpa,gql',\n   *    'dateRange.startAt': '2019-10-22',\n   *    'dateRange.endAt': '2020-11-30'\n   *    }\n   * })\n   * .then(result => console.log(result.items))\n   * .catch(console.error)\n   *\n   */\n  function getSpaceUsage(organizationId) {\n    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    var baseURL = http.defaults.baseURL.replace('/spaces/', '/organizations/' + organizationId + '/space_periodic_usages');\n    return http.get('', { baseURL: baseURL, params: query }).then(function (response) {\n      return wrapUsageCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets the authenticated user\n   * @memberof ContentfulClientAPI\n   * @return {Promise<User>} Promise for a User\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getCurrentUser()\n   * .then(user => console.log(user.firstName))\n   * .catch(console.error)\n   */\n  function getCurrentUser() {\n    var baseURL = http.defaults.baseURL.replace('/spaces/', '/users/me/');\n    return http.get('', {\n      baseURL: baseURL\n    }).then(function (response) {\n      return wrapUser(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Creates a personal access token\n   * @memberof ContentfulClientAPI\n   * @param {Object} data - personal access token config\n   * @return {Promise<User>} Promise for a Token\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.createPersonalAccessToken(\n   *  {\n   *    \"name\": \"My Token\",\n   *    \"scope\": [\n   *      \"content_management_manage\"\n   *    ]\n   *  }\n   * )\n   * .then(personalAccessToken => console.log(personalAccessToken.token))\n   * .catch(console.error)\n   */\n  function createPersonalAccessToken(data) {\n    var baseURL = http.defaults.baseURL.replace('/spaces/', '/users/me/access_tokens');\n    return http.post('', data, {\n      baseURL: baseURL\n    }).then(function (response) {\n      return wrapPersonalAccessToken(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets a personal access token\n   * @memberof ContentfulClientAPI\n   * @param {Object} data - personal access token config\n   * @return {Promise<User>} Promise for a Token\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getPersonalAccessToken(tokenId)\n   * .then(token => console.log(token.token))\n   * .catch(console.error)\n   */\n  function getPersonalAccessToken(tokenId) {\n    var baseURL = http.defaults.baseURL.replace('/spaces/', '/users/me/access_tokens');\n    return http.get(tokenId, {\n      baseURL: baseURL\n    }).then(function (response) {\n      return wrapPersonalAccessToken(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Gets all personal access tokens\n   * @memberof ContentfulClientAPI\n   * @return {Promise<User>} Promise for a Token\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.getPersonalAccessTokens()\n   * .then(response => console.log(reponse.items))\n   * .catch(console.error)\n   */\n  function getPersonalAccessTokens() {\n    var baseURL = http.defaults.baseURL.replace('/spaces/', '/users/me/access_tokens');\n    return http.get('', {\n      baseURL: baseURL\n    }).then(function (response) {\n      return wrapPersonalAccessTokenCollection(http, response.data);\n    }, errorHandler);\n  }\n\n  /**\n   * Make a custom request to the Contentful management API's /spaces endpoint\n   * @memberof ContentfulClientAPI\n   * @param {Object} opts - axios request options (https://github.com/mzabriskie/axios)\n   * @return {Promise<Object>} Promise for the response data\n   * @example\n   * const contentful = require('contentful-management')\n   *\n   * const client = contentful.createClient({\n   *   accessToken: '<content_management_api_key>'\n   * })\n   *\n   * client.rawRequest({\n   *   method: 'GET',\n   *   url: '/custom/path'\n   * })\n   * .then((responseData) => console.log(responseData))\n   * .catch(console.error)\n   */\n  function rawRequest(opts) {\n    return http(opts).then(function (response) {\n      return response.data;\n    }, errorHandler);\n  }\n\n  return {\n    getSpaces: getSpaces,\n    getSpace: getSpace,\n    createSpace: createSpace,\n    getOrganizations: getOrganizations,\n    getCurrentUser: getCurrentUser,\n    createPersonalAccessToken: createPersonalAccessToken,\n    getPersonalAccessToken: getPersonalAccessToken,\n    getPersonalAccessTokens: getPersonalAccessTokens,\n    rawRequest: rawRequest,\n    getOrganizationUsage: getOrganizationUsage,\n    getSpaceUsage: getSpaceUsage\n  };\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n/**\n * Contentful Management API SDK. Allows you to create instances of a client\n * with access to the Contentful Content Management API.\n * @namespace contentfulManagement\n * @see ContentfulClientAPI\n */\nimport axios from 'axios';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { createHttpClient, getUserAgentHeader } from 'contentful-sdk-core';\nimport createContentfulApi from './create-contentful-api';\n\n/**\n * Create a client instance\n * @func\n * @name createClient\n * @memberof contentfulManagement\n * @param {object} params - Client initialization parameters\n * @prop {string=} params.accessToken - Contentful CDA Access Token\n * @prop {boolean=?} params.insecure - Requests will be made over http instead of the default https (default: false)\n * @prop {boolean=?} params.retryOnError - If we should retry on errors and 429 rate limit exceptions (default: true)\n * @prop {string=?} params.host - API host (default: api.contentful.com)\n * @prop {string=?} params.hostUpload - direct file upload host (default : upload.contentful.com)\n * @prop {Object=?} params.httpAgent - Optional Node.js HTTP agent for proxying (see <a href=\"https://nodejs.org/api/http.html#http_class_http_agent\">Node.js docs</a> and <a href=\"https://www.npmjs.com/package/https-proxy-agent\">https-proxy-agent</a>)\n * @prop {Object=?} params.httpsAgent - Optional Node.js HTTP agent for proxying (see <a href=\"https://nodejs.org/api/http.html#http_class_http_agent\">Node.js docs</a> and <a href=\"https://www.npmjs.com/package/https-proxy-agent\">https-proxy-agent</a>)\n * @prop {Object=?} params.proxy - Optional Axios proxy (see <a href=\"https://github.com/mzabriskie/axios#request-config\"> axios docs </a>)\n * @prop {object=?} params.headers - Optional additional headers\n * @prop {function=} params.logHandler - A log handler function to process given log messages & errors. Receives the log level (error, warning & info) and the actual log data (Error object or string). (The default can be found at: https://github.com/contentful/contentful-sdk-core/blob/master/lib/create-http-client.js)\n * @prop {string=?} params.application - Application name and version e.g myApp/version\n * @prop {string=?} params.integration - Integration name and version e.g react/version\n * @prop {number=} params.timeout - Optional number of milliseconds before the request times out. Default is 30000\n * @prop {number=} params.retryLimit - Optional number of retries before failure. Default is 5\n * @prop {number=} params.maxContentLength - Optional maximum content length in bytes (default: 1073741824 i.e. 1GB)\n * @returns {ContentfulClientAPI.ClientAPI}\n * @example\n * const client = contentfulManagement.createClient({\n *  accessToken: 'myAccessToken'\n * })\n */\nexport function createClient(params) {\n  var defaultParameters = {\n    defaultHostname: 'api.contentful.com',\n    defaultHostnameUpload: 'upload.contentful.com'\n  };\n  var userAgentHeader = getUserAgentHeader('contentful-management.js/' + '5.15.0', params.application, params.integration, params.feature);\n\n  var requiredHeaders = {\n    'Content-Type': 'application/vnd.contentful.management.v1+json',\n    'X-Contentful-User-Agent': userAgentHeader\n  };\n\n  params = _extends({}, defaultParameters, cloneDeep(params));\n\n  if (!params.accessToken) {\n    throw new TypeError('Expected parameter accessToken');\n  }\n\n  params.headers = _extends({}, params.headers, requiredHeaders);\n\n  var http = createHttpClient(axios, params);\n  var api = createContentfulApi({\n    http: http\n  });\n\n  return api;\n}","import { createClient } from \"contentful-management\"\nimport { config } from \"dotenv\"\n\nconfig()\nconst spaceID: string = process.env.CONTENTFUL_SPACE_ID as string\nconst accessToken: string = process.env.CONTENTFUL_MANAGEMENT_ACCESS_TOKEN as string\nconst environment: string = process.env.CONTENTFUL_ENVIRONMENT || \"master\"\n\nexport default function() {\n  return createClient({\n    accessToken,\n  })\n    .getSpace(spaceID)\n    .then((space: any) => space.getEnvironment(environment))\n}\n","import render from \"./renderers/render\"\nimport renderFieldsOnly from \"./renderers/renderFieldsOnly\"\nimport path from \"path\"\nimport { outputFileSync } from \"fs-extra\"\nimport { config } from \"dotenv\"\nimport contentfulClient from \"./clients/contentfulClient\"\nimport contentfulManagementClient from \"./clients/contentfulManagementClient\"\nconfig()\n\nconst meow = require(\"meow\")\n\nconst cli = meow(\n  `\n  Usage\n    $ contentful-space-types --output <file> <options>\n\n  Options\n    --output,      -o  Where to write to\n    --poll,        -p  Continuously refresh types\n    --interval N,  -i  The interval in seconds at which to poll (defaults to 15)\n    --fields-only      Output a tree that _only_ ensures fields are valid\n                       and present, and does not provide types for Sys,\n                       Assets, or Rich Text. This is useful for ensuring raw\n                       Contentful responses will be compatible with your code.\n\n  Examples\n    $ contentful-space-types -o src/types/contentful.d.ts\n`,\n  {\n    flags: {\n      output: {\n        type: \"string\",\n        alias: \"o\",\n        required: true,\n      },\n      fieldsOnly: {\n        type: \"boolean\",\n        required: false,\n      },\n      poll: {\n        type: \"boolean\",\n        alias: \"p\",\n        required: false,\n      },\n      interval: {\n        type: \"string\",\n        alias: \"i\",\n        required: false,\n      },\n    },\n  },\n)\n\nasync function runCodegen(outputFile: string = \"src/types/contentful.d.ts\") {\n  const client = process.env.CONTENTFUL_MANAGEMENT_ACCESS_TOKEN\n    ? contentfulManagementClient\n    : contentfulClient\n  const environment = await client()\n  const contentTypes = await environment.getContentTypes({ limit: 1000 })\n  const locales = await environment.getLocales()\n  const outputPath = path.resolve(process.cwd(), outputFile)\n\n  let output\n  if (cli.flags.fieldsOnly) {\n    output = await renderFieldsOnly(contentTypes.items)\n  } else {\n    output = await render(contentTypes.items, locales.items)\n  }\n\n  outputFileSync(outputPath, output)\n}\n\nrunCodegen(cli.flags.output).catch(error => {\n  console.error(error)\n  process.exit(1)\n})\n\nif (cli.flags.poll) {\n  const intervalInSeconds = parseInt(cli.flags.interval, 10)\n\n  if (!isNaN(intervalInSeconds) && intervalInSeconds > 0) {\n    setInterval(() => runCodegen(cli.flags.output), intervalInSeconds * 1000)\n  } else {\n    throw new Error(`Expected a positive numeric interval, but got ${cli.flags.interval}`)\n  }\n}\n"]}