WordPress/wp-includes/js/dist/api-fetch.js.map

1 line
30 KiB
Plaintext

{"version":3,"sources":["webpack://wp.[name]/webpack/bootstrap","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectSpread.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/api-fetch/src/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/api-fetch/src/middlewares/fetch-all-middleware.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/api-fetch/src/middlewares/http-v1.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/api-fetch/src/middlewares/namespace-endpoint.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/api-fetch/src/middlewares/nonce.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/api-fetch/src/middlewares/preloading.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/api-fetch/src/middlewares/root-url.js","webpack://wp.[name]/external {\"this\":[\"wp\",\"hooks\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"i18n\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"url\"]}"],"names":["middlewares","registerMiddleware","middleware","push","checkCloudflareError","error","indexOf","code","apiFetch","options","raw","nextOptions","url","path","body","data","parse","remainingOptions","headers","responsePromise","window","fetch","credentials","JSON","stringify","checkStatus","response","status","parseResponse","json","Promise","reject","then","catch","invalidJsonError","message","__","responseClone","clone","text","unknownError","steps","fetchAllMiddleware","httpV1Middleware","namespaceEndpointMiddleware","reverse","runMiddleware","index","nextMiddleware","next","use","createNonceMiddleware","createPreloadingMiddleware","createRootURLMiddleware","modifyQuery","queryArgs","addQueryArgs","parseLinkHeader","linkHeader","match","getNextPageUrl","get","requestContainsUnboundedQuery","pathIsUnbounded","urlIsUnbounded","per_page","results","Array","isArray","nextPage","mergedResults","concat","undefined","nextResponse","nextResults","newOptions","method","toUpperCase","namespaceAndEndpointMiddleware","namespaceTrimmed","endpointTrimmed","namespace","endpoint","replace","nonce","usedNonce","addAction","addNonceHeader","headerName","hasOwnProperty","toLowerCase","preloadedData","getStablePath","splitted","split","query","base","map","entry","sort","a","b","localeCompare","pair","join","resolve","rootURL","optionsWithPath","apiRoot"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA,C;;;;;;;;;;;;AClCA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA,C;;;;;;;;;;;;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,OAAL,CAAc,GAAd,EAAmB,GAAnB,CAAP;AACA;;AAEDtE,YAAI,GAAGA,IAAI,CAACsE,OAAL,CAAc,KAAd,EAAqB,EAArB,CAAP,CAP+B,CAS/B;AACA;;AACA,YAAK,aAAa,OAAOyB,OAApB,IAA+B,CAAC,CAAD,KAAOA,OAAO,CAACtG,OAAR,CAAiB,GAAjB,CAA3C,EAAoE;AACnEO,cAAI,GAAGA,IAAI,CAACsE,OAAL,CAAc,GAAd,EAAmB,GAAnB,CAAP;AACA;;AAEDvE,WAAG,GAAGgG,OAAO,GAAG/F,IAAhB;AACA;;AAED,aAAOoC,IAAI,CAAC,4FACR0D,eADO;AAEV/F,WAAG,EAAHA;AAFU,SAAX;AAIA,KA3BoC,CAArC;AA4BA,GA7B+B;AAAA,CAAhC;;AA+BeyC,sFAAf;;;;;;;;;;;;ACpCA,aAAa,sCAAsC,EAAE,I;;;;;;;;;;;ACArD,aAAa,qCAAqC,EAAE,I;;;;;;;;;;;ACApD,aAAa,oCAAoC,EAAE,I","file":"api-fetch.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./node_modules/@wordpress/api-fetch/build-module/index.js\");\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","export default function _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}","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport createNonceMiddleware from './middlewares/nonce';\nimport createRootURLMiddleware from './middlewares/root-url';\nimport createPreloadingMiddleware from './middlewares/preloading';\nimport fetchAllMiddleware from './middlewares/fetch-all-middleware';\nimport namespaceEndpointMiddleware from './middlewares/namespace-endpoint';\nimport httpV1Middleware from './middlewares/http-v1';\n\nconst middlewares = [];\n\nfunction registerMiddleware( middleware ) {\n\tmiddlewares.push( middleware );\n}\n\nfunction checkCloudflareError( error ) {\n\tif ( typeof error === 'string' && error.indexOf( 'Cloudflare Ray ID' ) >= 0 ) {\n\t\tthrow {\n\t\t\tcode: 'cloudflare_error',\n\t\t};\n\t}\n}\n\nfunction apiFetch( options ) {\n\tconst raw = ( nextOptions ) => {\n\t\tconst { url, path, body, data, parse = true, ...remainingOptions } = nextOptions;\n\t\tconst headers = remainingOptions.headers || {};\n\t\tif ( ! headers[ 'Content-Type' ] && data ) {\n\t\t\theaders[ 'Content-Type' ] = 'application/json';\n\t\t}\n\n\t\tconst responsePromise = window.fetch(\n\t\t\turl || path,\n\t\t\t{\n\t\t\t\t...remainingOptions,\n\t\t\t\tcredentials: 'include',\n\t\t\t\tbody: body || JSON.stringify( data ),\n\t\t\t\theaders,\n\t\t\t}\n\t\t);\n\t\tconst checkStatus = ( response ) => {\n\t\t\tif ( response.status >= 200 && response.status < 300 ) {\n\t\t\t\treturn response;\n\t\t\t}\n\n\t\t\tthrow response;\n\t\t};\n\n\t\tconst parseResponse = ( response ) => {\n\t\t\tif ( parse ) {\n\t\t\t\treturn response.json ? response.json() : Promise.reject( response );\n\t\t\t}\n\n\t\t\treturn response;\n\t\t};\n\n\t\treturn responsePromise\n\t\t\t.then( checkStatus )\n\t\t\t.then( parseResponse )\n\t\t\t.catch( ( response ) => {\n\t\t\t\tif ( ! parse ) {\n\t\t\t\t\tthrow response;\n\t\t\t\t}\n\n\t\t\t\tconst invalidJsonError = {\n\t\t\t\t\tcode: 'invalid_json',\n\t\t\t\t\tmessage: __( 'The response is not a valid JSON response.' ),\n\t\t\t\t};\n\n\t\t\t\tif ( ! response || ! response.json ) {\n\t\t\t\t\tthrow invalidJsonError;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * Response data is a stream, which will be consumed by the .json() call.\n\t\t\t\t * If we need to re-use this data to send to the Cloudflare error handler,\n\t\t\t\t * we need a clone of the original response, so the stream can be consumed\n\t\t\t\t * in the .text() call, instead.\n\t\t\t\t */\n\t\t\t\tconst responseClone = response.clone();\n\n\t\t\t\treturn response.json()\n\t\t\t\t\t.catch( async () => {\n\t\t\t\t\t\tconst text = await responseClone.text();\n\t\t\t\t\t\tcheckCloudflareError( text );\n\t\t\t\t\t\tthrow invalidJsonError;\n\t\t\t\t\t} )\n\t\t\t\t\t.then( ( error ) => {\n\t\t\t\t\t\tconst unknownError = {\n\t\t\t\t\t\t\tcode: 'unknown_error',\n\t\t\t\t\t\t\tmessage: __( 'An unknown error occurred.' ),\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tcheckCloudflareError( error );\n\n\t\t\t\t\t\tthrow error || unknownError;\n\t\t\t\t\t} );\n\t\t\t} );\n\t};\n\n\tconst steps = [\n\t\traw,\n\t\tfetchAllMiddleware,\n\t\thttpV1Middleware,\n\t\tnamespaceEndpointMiddleware,\n\t\t...middlewares,\n\t].reverse();\n\n\tconst runMiddleware = ( index ) => ( nextOptions ) => {\n\t\tconst nextMiddleware = steps[ index ];\n\t\tconst next = runMiddleware( index + 1 );\n\t\treturn nextMiddleware( nextOptions, next );\n\t};\n\n\treturn runMiddleware( 0 )( options );\n}\n\napiFetch.use = registerMiddleware;\n\napiFetch.createNonceMiddleware = createNonceMiddleware;\napiFetch.createPreloadingMiddleware = createPreloadingMiddleware;\napiFetch.createRootURLMiddleware = createRootURLMiddleware;\napiFetch.fetchAllMiddleware = fetchAllMiddleware;\n\nexport default apiFetch;\n","/**\n * WordPress dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\n\n// Apply query arguments to both URL and Path, whichever is present.\nconst modifyQuery = ( { path, url, ...options }, queryArgs ) => ( {\n\t...options,\n\turl: url && addQueryArgs( url, queryArgs ),\n\tpath: path && addQueryArgs( path, queryArgs ),\n} );\n\n// Duplicates parsing functionality from apiFetch.\nconst parseResponse = ( response ) => response.json ?\n\tresponse.json() :\n\tPromise.reject( response );\n\nconst parseLinkHeader = ( linkHeader ) => {\n\tif ( ! linkHeader ) {\n\t\treturn {};\n\t}\n\tconst match = linkHeader.match( /<([^>]+)>; rel=\"next\"/ );\n\treturn match ? {\n\t\tnext: match[ 1 ],\n\t} : {};\n};\n\nconst getNextPageUrl = ( response ) => {\n\tconst { next } = parseLinkHeader( response.headers.get( 'link' ) );\n\treturn next;\n};\n\nconst requestContainsUnboundedQuery = ( options ) => {\n\tconst pathIsUnbounded = options.path && options.path.indexOf( 'per_page=-1' ) !== -1;\n\tconst urlIsUnbounded = options.url && options.url.indexOf( 'per_page=-1' ) !== -1;\n\treturn pathIsUnbounded || urlIsUnbounded;\n};\n\n// The REST API enforces an upper limit on the per_page option. To handle large\n// collections, apiFetch consumers can pass `per_page=-1`; this middleware will\n// then recursively assemble a full response array from all available pages.\nconst fetchAllMiddleware = async ( options, next ) => {\n\tif ( options.parse === false ) {\n\t\t// If a consumer has opted out of parsing, do not apply middleware.\n\t\treturn next( options );\n\t}\n\tif ( ! requestContainsUnboundedQuery( options ) ) {\n\t\t// If neither url nor path is requesting all items, do not apply middleware.\n\t\treturn next( options );\n\t}\n\n\t// Retrieve requested page of results.\n\tconst response = await next( {\n\t\t...modifyQuery( options, {\n\t\t\tper_page: 100,\n\t\t} ),\n\t\t// Ensure headers are returned for page 1.\n\t\tparse: false,\n\t} );\n\n\tconst results = await parseResponse( response );\n\n\tif ( ! Array.isArray( results ) ) {\n\t\t// We have no reliable way of merging non-array results.\n\t\treturn results;\n\t}\n\n\tlet nextPage = getNextPageUrl( response );\n\n\tif ( ! nextPage ) {\n\t\t// There are no further pages to request.\n\t\treturn results;\n\t}\n\n\t// Iteratively fetch all remaining pages until no \"next\" header is found.\n\tlet mergedResults = [].concat( results );\n\twhile ( nextPage ) {\n\t\tconst nextResponse = await next( {\n\t\t\t...options,\n\t\t\t// Ensure the URL for the next page is used instead of any provided path.\n\t\t\tpath: undefined,\n\t\t\turl: nextPage,\n\t\t\t// Ensure we still get headers so we can identify the next page.\n\t\t\tparse: false,\n\t\t} );\n\t\tconst nextResults = await parseResponse( nextResponse );\n\t\tmergedResults = mergedResults.concat( nextResults );\n\t\tnextPage = getNextPageUrl( nextResponse );\n\t}\n\treturn mergedResults;\n};\n\nexport default fetchAllMiddleware;\n","function httpV1Middleware( options, next ) {\n\tconst newOptions = { ...options };\n\tif ( newOptions.method ) {\n\t\tif ( [ 'PATCH', 'PUT', 'DELETE' ].indexOf( newOptions.method.toUpperCase() ) >= 0 ) {\n\t\t\tif ( ! newOptions.headers ) {\n\t\t\t\tnewOptions.headers = {};\n\t\t\t}\n\t\t\tnewOptions.headers[ 'X-HTTP-Method-Override' ] = newOptions.method;\n\t\t\tnewOptions.headers[ 'Content-Type' ] = 'application/json';\n\t\t\tnewOptions.method = 'POST';\n\t\t}\n\t}\n\n\treturn next( newOptions, next );\n}\n\nexport default httpV1Middleware;\n","const namespaceAndEndpointMiddleware = ( options, next ) => {\n\tlet path = options.path;\n\tlet namespaceTrimmed, endpointTrimmed;\n\n\tif (\n\t\ttypeof options.namespace === 'string' &&\n\t\t\ttypeof options.endpoint === 'string'\n\t) {\n\t\tnamespaceTrimmed = options.namespace.replace( /^\\/|\\/$/g, '' );\n\t\tendpointTrimmed = options.endpoint.replace( /^\\//, '' );\n\t\tif ( endpointTrimmed ) {\n\t\t\tpath = namespaceTrimmed + '/' + endpointTrimmed;\n\t\t} else {\n\t\t\tpath = namespaceTrimmed;\n\t\t}\n\t}\n\n\tdelete options.namespace;\n\tdelete options.endpoint;\n\n\treturn next( {\n\t\t...options,\n\t\tpath,\n\t} );\n};\n\nexport default namespaceAndEndpointMiddleware;\n","/**\n * External dependencies\n */\nimport { addAction } from '@wordpress/hooks';\n\nconst createNonceMiddleware = ( nonce ) => ( options, next ) => {\n\tlet usedNonce = nonce;\n\t/**\n\t * This is not ideal but it's fine for now.\n\t *\n\t * Configure heartbeat to refresh the wp-api nonce, keeping the editor\n\t * authorization intact.\n\t */\n\taddAction( 'heartbeat.tick', 'core/api-fetch/create-nonce-middleware', ( response ) => {\n\t\tif ( response[ 'rest-nonce' ] ) {\n\t\t\tusedNonce = response[ 'rest-nonce' ];\n\t\t}\n\t} );\n\n\tlet headers = options.headers || {};\n\t// If an 'X-WP-Nonce' header (or any case-insensitive variation\n\t// thereof) was specified, no need to add a nonce header.\n\tlet addNonceHeader = true;\n\tfor ( const headerName in headers ) {\n\t\tif ( headers.hasOwnProperty( headerName ) ) {\n\t\t\tif ( headerName.toLowerCase() === 'x-wp-nonce' ) {\n\t\t\t\taddNonceHeader = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( addNonceHeader ) {\n\t// Do not mutate the original headers object, if any.\n\t\theaders = {\n\t\t\t...headers,\n\t\t\t'X-WP-Nonce': usedNonce,\n\t\t};\n\t}\n\n\treturn next( {\n\t\t...options,\n\t\theaders,\n\t} );\n};\n\nexport default createNonceMiddleware;\n","const createPreloadingMiddleware = ( preloadedData ) => ( options, next ) => {\n\tfunction getStablePath( path ) {\n\t\tconst splitted = path.split( '?' );\n\t\tconst query = splitted[ 1 ];\n\t\tconst base = splitted[ 0 ];\n\t\tif ( ! query ) {\n\t\t\treturn base;\n\t\t}\n\n\t\t// 'b=1&c=2&a=5'\n\t\treturn base + '?' + query\n\t\t\t// [ 'b=1', 'c=2', 'a=5' ]\n\t\t\t.split( '&' )\n\t\t\t// [ [ 'b, '1' ], [ 'c', '2' ], [ 'a', '5' ] ]\n\t\t\t.map( function( entry ) {\n\t\t\t\treturn entry.split( '=' );\n\t\t\t} )\n\t\t\t// [ [ 'a', '5' ], [ 'b, '1' ], [ 'c', '2' ] ]\n\t\t\t.sort( function( a, b ) {\n\t\t\t\treturn a[ 0 ].localeCompare( b[ 0 ] );\n\t\t\t} )\n\t\t\t// [ 'a=5', 'b=1', 'c=2' ]\n\t\t\t.map( function( pair ) {\n\t\t\t\treturn pair.join( '=' );\n\t\t\t} )\n\t\t\t// 'a=5&b=1&c=2'\n\t\t\t.join( '&' );\n\t}\n\n\tconst { parse = true } = options;\n\tif ( typeof options.path === 'string' && parse ) {\n\t\tconst method = options.method || 'GET';\n\t\tconst path = getStablePath( options.path );\n\n\t\tif ( 'GET' === method && preloadedData[ path ] ) {\n\t\t\treturn Promise.resolve( preloadedData[ path ].body );\n\t\t}\n\t}\n\n\treturn next( options );\n};\n\nexport default createPreloadingMiddleware;\n","/**\n * Internal dependencies\n */\nimport namespaceAndEndpointMiddleware from './namespace-endpoint';\n\nconst createRootURLMiddleware = ( rootURL ) => ( options, next ) => {\n\treturn namespaceAndEndpointMiddleware( options, ( optionsWithPath ) => {\n\t\tlet url = optionsWithPath.url;\n\t\tlet path = optionsWithPath.path;\n\t\tlet apiRoot;\n\n\t\tif ( typeof path === 'string' ) {\n\t\t\tapiRoot = rootURL;\n\n\t\t\tif ( -1 !== rootURL.indexOf( '?' ) ) {\n\t\t\t\tpath = path.replace( '?', '&' );\n\t\t\t}\n\n\t\t\tpath = path.replace( /^\\//, '' );\n\n\t\t\t// API root may already include query parameter prefix if site is\n\t\t\t// configured to use plain permalinks.\n\t\t\tif ( 'string' === typeof apiRoot && -1 !== apiRoot.indexOf( '?' ) ) {\n\t\t\t\tpath = path.replace( '?', '&' );\n\t\t\t}\n\n\t\t\turl = apiRoot + path;\n\t\t}\n\n\t\treturn next( {\n\t\t\t...optionsWithPath,\n\t\t\turl,\n\t\t} );\n\t} );\n};\n\nexport default createRootURLMiddleware;\n","(function() { module.exports = this[\"wp\"][\"hooks\"]; }());","(function() { module.exports = this[\"wp\"][\"i18n\"]; }());","(function() { module.exports = this[\"wp\"][\"url\"]; }());"],"sourceRoot":""}