Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

1 rad
9.6 KiB

  1. {"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.Container = Container;\nexports.createUrl = createUrl;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _utils = require(\"../next-server/lib/utils\");\n\nexports.AppInitialProps = _utils.AppInitialProps;\n/**\n* `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.\n* This allows for keeping state between navigation, custom error handling, injecting additional data.\n*/\n\nasync function appGetInitialProps(_ref) {\n var {\n Component,\n ctx\n } = _ref;\n var pageProps = await (0, _utils.loadGetInitialProps)(Component, ctx);\n return {\n pageProps\n };\n}\n\nclass App extends _react.default.Component {\n // Kept here for backwards compatibility.\n // When someone ended App they could call `super.componentDidCatch`.\n // @deprecated This method is no longer needed. Errors are caught at the top level\n componentDidCatch(error, _errorInfo) {\n throw error;\n }\n\n render() {\n var {\n router,\n Component,\n pageProps,\n __N_SSG,\n __N_SSP\n } = this.props;\n return _react.default.createElement(Component, Object.assign({}, pageProps, // we don't add the legacy URL prop if it's using non-legacy\n // methods like getStaticProps and getServerSideProps\n !(__N_SSG || __N_SSP) ? {\n url: createUrl(router)\n } : {}));\n }\n\n}\n\nexports.default = App;\nApp.origGetInitialProps = appGetInitialProps;\nApp.getInitialProps = appGetInitialProps;\nvar warnContainer;\nvar warnUrl;\n\nif (true) {\n warnContainer = (0, _utils.execOnce)(() => {\n console.warn(\"Warning: the `Container` in `_app` has been deprecated and should be removed. https://err.sh/zeit/next.js/app-container-deprecated\");\n });\n warnUrl = (0, _utils.execOnce)(() => {\n console.error(\"Warning: the 'url' property is deprecated. https://err.sh/zeit/next.js/url-deprecated\");\n });\n} // @deprecated noop for now until removal\n\n\nfunction Container(p) {\n if (true) warnContainer();\n return p.children;\n}\n\nfunction createUrl(router) {\n // This is to make sure we don't references the router object at call time\n var {\n pathname,\n asPath,\n query\n } = router;\n return {\n get query() {\n if (true) warnUrl();\n return query;\n },\n\n get pathname() {\n if (true) warnUrl();\n return pathname;\n },\n\n get asPath() {\n if (true) warnUrl();\n return asPath;\n },\n\n back: () => {\n if (true) warnUrl();\n router.back();\n },\n push: (url, as) => {\n if (true) warnUrl();\n return router.push(url, as);\n },\n pushTo: (href, as) => {\n if (true) warnUrl();\n var pushRoute = as ? href : '';\n var pushUrl = as || href;\n return router.push(pushRoute, pushUrl);\n },\n replace: (url, as) => {\n if (true) warnUrl();\n return router.replace(url, as);\n },\n replaceTo: (href, as) => {\n if (true) warnUrl();\n var replaceRoute = as ? href : '';\n var replaceUrl = as || href;\n return router.replace(replaceRoute, replaceUrl);\n }\n };\n}","map":{"version":3,"sources":["C:/tbg-ecomm-nextjs/node_modules/next/dist/pages/_app.js"],"names":["_interopRequireDefault","require","exports","__esModule","Container","createUrl","default","_react","_utils","AppInitialProps","appGetInitialProps","_ref","Component","ctx","pageProps","loadGetInitialProps","App","componentDidCatch","error","_errorInfo","render","router","__N_SSG","__N_SSP","props","createElement","Object","assign","url","origGetInitialProps","getInitialProps","warnContainer","warnUrl","execOnce","console","warn","p","children","pathname","asPath","query","back","push","as","pushTo","href","pushRoute","pushUrl","replace","replaceTo","replaceRoute","replaceUrl"],"mappings":"AAAA;;AAAa,IAAIA,sBAAsB,GAACC,OAAO,CAAC,8CAAD,CAAlC;;AAAmFC,OAAO,CAACC,UAAR,GAAmB,IAAnB;AAAwBD,OAAO,CAACE,SAAR,GAAkBA,SAAlB;AAA4BF,OAAO,CAACG,SAAR,GAAkBA,SAAlB;AAA4BH,OAAO,CAACI,OAAR,GAAgB,KAAK,CAArB;;AAAuB,IAAIC,MAAM,GAACP,sBAAsB,CAACC,OAAO,CAAC,OAAD,CAAR,CAAjC;;AAAoD,IAAIO,MAAM,GAACP,OAAO,CAAC,0BAAD,CAAlB;;AAA+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uC,KAA/iB;AAAgjBC,IAAAA,OAAO,EAAC,CAACpB,GAAD,EAAKe,EAAL,KAAU;AAAC,gBAAuCX,OAAO;AAAG,aAAOX,MAAM,CAAC2B,OAAP,CAAepB,GAAf,EAAmBe,EAAnB,CAAP;AAA+B,KAAnpB;AAAopBM,IAAAA,SAAS,EAAC,CAACJ,IAAD,EAAMF,EAAN,KAAW;AAAC,gBAAuCX,OAAO;AAAG,UAAIkB,YAAY,GAACP,EAAE,GAACE,IAAD,GAAM,EAAzB;AAA4B,UAAIM,UAAU,GAACR,EAAE,IAAEE,IAAnB;AAAwB,aAAOxB,MAAM,CAAC2B,OAAP,CAAeE,YAAf,EAA4BC,UAA5B,CAAP;AAAgD;AAA/zB,GAAN;AAAw0B","sourcesContent":["\"use strict\";var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");exports.__esModule=true;exports.Container=Container;exports.createUrl=createUrl;exports.default=void 0;var _react=_interopRequireDefault(require(\"react\"));var _utils=require(\"../next-server/lib/utils\");exports.AppInitialProps=_utils.AppInitialProps;/**\n * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.\n * This allows for keeping state between navigation, custom error handling, injecting additional data.\n */async function appGetInitialProps(_ref){var{Component,ctx}=_ref;var pageProps=await(0,_utils.loadGetInitialProps)(Component,ctx);return{pageProps};}class App extends _react.default.Component{// Kept here for backwards compatibility.\n// When someone ended App they could call `super.componentDidCatch`.\n// @deprecated This method is no longer needed. Errors are caught at the top level\ncomponentDidCatch(error,_errorInfo){throw error;}render(){var{router,Component,pageProps,__N_SSG,__N_SSP}=this.props;return _react.default.createElement(Component,Object.assign({},pageProps,// we don't add the legacy URL prop if it's using non-legacy\n// methods like getStaticProps and getServerSideProps\n!(__N_SSG||__N_SSP)?{url:createUrl(router)}:{}));}}exports.default=App;App.origGetInitialProps=appGetInitialProps;App.getInitialProps=appGetInitialProps;var warnContainer;var warnUrl;if(process.env.NODE_ENV!=='production'){warnContainer=(0,_utils.execOnce)(()=>{console.warn(\"Warning: the `Container` in `_app` has been deprecated and should be removed. https://err.sh/zeit/next.js/app-container-deprecated\");});warnUrl=(0,_utils.execOnce)(()=>{console.error(\"Warning: the 'url' property is deprecated. https://err.sh/zeit/next.js/url-deprecated\");});}// @deprecated noop for now until removal\nfunction Container(p){if(process.env.NODE_ENV!=='production')warnContainer();return p.children;}function createUrl(router){// This is to make sure we don't references the router object at call time\nvar{pathname,asPath,query}=router;return{get query(){if(process.env.NODE_ENV!=='production')warnUrl();return query;},get pathname(){if(process.env.NODE_ENV!=='production')warnUrl();return pathname;},get asPath(){if(process.env.NODE_ENV!=='production')warnUrl();return asPath;},back:()=>{if(process.env.NODE_ENV!=='production')warnUrl();router.back();},push:(url,as)=>{if(process.env.NODE_ENV!=='production')warnUrl();return router.push(url,as);},pushTo:(href,as)=>{if(process.env.NODE_ENV!=='production')warnUrl();var pushRoute=as?href:'';var pushUrl=as||href;return router.push(pushRoute,pushUrl);},replace:(url,as)=>{if(process.env.NODE_ENV!=='production')warnUrl();return router.replace(url,as);},replaceTo:(href,as)=>{if(process.env.NODE_ENV!=='production')warnUrl();var replaceRoute=as?href:'';var replaceUrl=as||href;return router.replace(replaceRoute,replaceUrl);}};}"]},"metadata":{},"sourceType":"script"}