@knapsack/app
Version:
Build Design Systems on top of knapsack, by Basalt
2 lines • 6.35 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["graphiql-page-QvAQg~493df0b3"],{"../node_modules/decode-uri-component/index.js":function(e,r,t){var n=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function decodeComponents(e,r){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;r=r||1;var t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],decodeComponents(t),decodeComponents(n))}function decode(e){try{return decodeURIComponent(e)}catch(o){for(var r=e.match(n),t=1;t<r.length;t++)r=(e=decodeComponents(r,t).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(r){return function customDecodeURIComponent(e){for(var r={"%FE%FF":"��","%FF%FE":"��"},t=o.exec(e);t;){try{r[t[0]]=decodeURIComponent(t[0])}catch(e){var n=decode(t[0]);n!==t[0]&&(r[t[0]]=n)}t=o.exec(e)}r["%C2"]="�";for(var s=Object.keys(r),a=0;a<s.length;a++){var c=s[a];e=e.replace(new RegExp(c,"g"),r[c])}return e}(e)}}},"../node_modules/query-string/index.js":function(e,r,t){const n=t("../node_modules/strict-uri-encode/index.js"),o=t("../node_modules/decode-uri-component/index.js"),s=t("../node_modules/split-on-first/index.js");function encode(e,r){return r.encode?r.strict?n(e):encodeURIComponent(e):e}function decode(e,r){return r.decode?o(e):e}function removeHash(e){const r=e.indexOf("#");return-1!==r&&(e=e.slice(0,r)),e}function extract(e){const r=(e=removeHash(e)).indexOf("?");return-1===r?"":e.slice(r+1)}function parseValue(e,r){return r.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!r.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function parse(e,r){const t=function parserForArrayFormat(e){let r;switch(e.arrayFormat){case"index":return(e,t,n)=>{r=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),r?(void 0===n[e]&&(n[e]={}),n[e][r[1]]=t):n[e]=t};case"bracket":return(e,t,n)=>{r=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),r?void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=[t]:n[e]=t};case"comma":return(e,r,t)=>{const n="string"==typeof r&&r.split("").indexOf(",")>-1?r.split(","):r;t[e]=n};default:return(e,r,t)=>{void 0!==t[e]?t[e]=[].concat(t[e],r):t[e]=r}}}(r=Object.assign({decode:!0,sort:!0,arrayFormat:"none",parseNumbers:!1,parseBooleans:!1},r)),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const o of e.split("&")){let[e,a]=s(r.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:decode(a,r),t(decode(e,r),a,n)}for(const e of Object.keys(n)){const t=n[e];if("object"==typeof t&&null!==t)for(const e of Object.keys(t))t[e]=parseValue(t[e],r);else n[e]=parseValue(t,r)}return!1===r.sort?n:(!0===r.sort?Object.keys(n).sort():Object.keys(n).sort(r.sort)).reduce((e,r)=>{const t=n[r];return Boolean(t)&&"object"==typeof t&&!Array.isArray(t)?e[r]=function keysSorter(e){return Array.isArray(e)?e.sort():"object"==typeof e?keysSorter(Object.keys(e)).sort((e,r)=>Number(e)-Number(r)).map(r=>e[r]):e}(t):e[r]=t,e},Object.create(null))}r.extract=extract,r.parse=parse,r.stringify=(e,r)=>{if(!e)return"";const t=function encoderForArrayFormat(e){switch(e.arrayFormat){case"index":return r=>(t,n)=>{const o=t.length;return void 0===n||e.skipNull&&null===n?t:null===n?[...t,[encode(r,e),"[",o,"]"].join("")]:[...t,[encode(r,e),"[",encode(o,e),"]=",encode(n,e)].join("")]};case"bracket":return r=>(t,n)=>void 0===n||e.skipNull&&null===n?t:null===n?[...t,[encode(r,e),"[]"].join("")]:[...t,[encode(r,e),"[]=",encode(n,e)].join("")];case"comma":return r=>(t,n)=>null==n||0===n.length?t:0===t.length?[[encode(r,e),"=",encode(n,e)].join("")]:[[t,encode(n,e)].join(",")];default:return r=>(t,n)=>void 0===n||e.skipNull&&null===n?t:null===n?[...t,encode(r,e)]:[...t,[encode(r,e),"=",encode(n,e)].join("")]}}(r=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},r)),n=Object.assign({},e);if(r.skipNull)for(const e of Object.keys(n))void 0!==n[e]&&null!==n[e]||delete n[e];const o=Object.keys(n);return!1!==r.sort&&o.sort(r.sort),o.map(n=>{const o=e[n];return void 0===o?"":null===o?encode(n,r):Array.isArray(o)?o.reduce(t(n),[]).join("&"):encode(n,r)+"="+encode(o,r)}).filter(e=>e.length>0).join("&")},r.parseUrl=(e,r)=>({url:removeHash(e).split("?")[0]||"",query:parse(extract(e),r)})},"../node_modules/split-on-first/index.js":function(e,r,t){e.exports=(e,r)=>{if("string"!=typeof e||"string"!=typeof r)throw new TypeError("Expected the arguments to be of type `string`");if(""===r)return[e];const t=e.indexOf(r);return-1===t?[e]:[e.slice(0,t),e.slice(t+r.length)]}},"../node_modules/strict-uri-encode/index.js":function(e,r,t){e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},"./src/client/pages/graphiql-page.jsx":function(e,r,t){t.r(r);var n=t("../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=t("react"),s=t.n(o),a=t("../node_modules/prop-types/index.js"),c=t.n(a),i=t("../node_modules/query-string/index.js"),l=t.n(i),d=t("./src/client/layouts/page-with-sidebar.tsx");var u=function GraphiQLBlock(){return s.a.createElement("h1",null,"GraphiQL is temporarily disabled.")},p=t("./src/lib/constants.ts"),f=t("./src/client/data.ts");class graphiql_page_GraphiqlPage extends o.Component{constructor(e){super(e),this.state={query:null,variables:null,ready:!1,response:""}}componentDidMount(){var e=this;return Object(n.a)((function*(){var{query:r,variables:t}=l.a.parse(window.location.search);if(r){var n=JSON.stringify(yield Object(f.g)({query:r,variables:t}),null," ");e.setState({query:r,variables:t?JSON.stringify(JSON.parse(t),null," "):"",response:n,ready:!0})}else e.setState({ready:!0})}))()}render(){if(!this.state.ready)return null;var{query:e,variables:r,response:t}=this.state;return s.a.createElement(d.default,{location:this.props.location},s.a.createElement(u,{initialResponse:t,initialVariables:r,initialQuery:e}))}}graphiql_page_GraphiqlPage.defaultProps={location:p.a.GRAPHIQL_PLAYGROUND},graphiql_page_GraphiqlPage.propTypes={location:c.a.object};r.default=graphiql_page_GraphiqlPage}}]);
//# sourceMappingURL=graphiql-page-QvAQg~493df0b3.chunk.eaa5497fb7f7db0479e3.js.map