rsnext/packages/next/compiled/mini-css-extract-plugin/index.js

1 line
70 KiB
JavaScript
Raw Normal View History

module.exports=(()=>{var e={798:e=>{"use strict";e.exports=JSON.parse('{"type":"object","additionalProperties":false,"properties":{"filename":{"anyOf":[{"type":"string"},{"instanceof":"Function"}]},"chunkFilename":{"anyOf":[{"type":"string"},{"instanceof":"Function"}]},"experimentalUseImportModule":{"description":"Enable the experimental importModule approach instead of using child compilers. This uses less memory and is faster.","type":"boolean"},"ignoreOrder":{"type":"boolean"},"insert":{"description":"Inserts `<link>` at the given position (https://github.com/webpack-contrib/mini-css-extract-plugin#insert).","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"attributes":{"description":"Adds custom attributes to tag (https://github.com/webpack-contrib/mini-css-extract-plugin#attributes).","type":"object"},"linkType":{"anyOf":[{"enum":["text/css"]},{"type":"boolean"}]}}}')},736:e=>{"use strict";class LoadingLoaderError extends Error{constructor(e){super(e);this.name="LoaderRunnerError";Error.captureStackTrace(this,this.constructor)}}e.exports=LoadingLoaderError},278:(e,t,n)=>{var r=n(747);var s=r.readFile.bind(r);var i=n(384);function utf8BufferToString(e){var t=e.toString("utf-8");if(t.charCodeAt(0)===65279){return t.substr(1)}else{return t}}function splitQuery(e){var t=e.indexOf("?");if(t<0)return[e,""];return[e.substr(0,t),e.substr(t)]}function dirname(e){if(e==="/")return"/";var t=e.lastIndexOf("/");var n=e.lastIndexOf("\\");var r=e.indexOf("/");var s=e.indexOf("\\");var i=t>n?t:n;var o=t>n?r:s;if(i<0)return e;if(i===o)return e.substr(0,i+1);return e.substr(0,i)}function createLoaderObject(e){var t={path:null,query:null,options:null,ident:null,normal:null,pitch:null,raw:null,data:null,pitchExecuted:false,normalExecuted:false};Object.defineProperty(t,"request",{enumerable:true,get:function(){return t.path+t.query},set:function(e){if(typeof e==="string"){var n=splitQuery(e);t.path=n[0];t.query=n[1];t.options=undefined;t.ident=undefined}else{if(!e.loader)throw new Error("request should be a string or object with loader and object ("+JSON.stringify(e)+")");t.path=e.loader;t.options=e.options;t.ident=e.ident;if(t.options===null)t.query="";else if(t.options===undefined)t.query="";else if(typeof t.options==="string")t.query="?"+t.options;else if(t.ident)t.query="??"+t.ident;else if(typeof t.options==="object"&&t.options.ident)t.query="??"+t.options.ident;else t.query="?"+JSON.stringify(t.options)}}});t.request=e;if(Object.preventExtensions){Object.preventExtensions(t)}return t}function runSyncOrAsync(e,t,n,r){var s=true;var i=false;var o=false;var u=false;t.async=function async(){if(i){if(u)return;throw new Error("async(): The callback was already called.")}s=false;return a};var a=t.callback=function(){if(i){if(u)return;throw new Error("callback(): The callback was already called.")}i=true;s=false;try{r.apply(null,arguments)}catch(e){o=true;throw e}};try{var d=function LOADER_EXECUTION(){return e.apply(t,n)}();if(s){i=true;if(d===undefined)return r();if(d&&typeof d==="object"&&typeof d.then==="function"){return d.then(function(e){r(null,e)},r)}return r(null,d)}}catch(e){if(o)throw e;if(i){if(typeof e==="object"&&e.stack)console.error(e.stack);else console.error(e);return}i=true;u=true;r(e)}}function convertArgs(e,t){if(!t&&Buffer.isBuffer(e[0]))e[0]=utf8BufferToString(e[0]);else if(t&&typeof e[0]==="string")e[0]=new Buffer(e[0],"utf-8")}function iteratePitchingLoaders(e,t,n){if(t.loaderIndex>=t.loaders.length)return processResource(e,t,n);var r=t.loaders[t.loaderIndex];if(r.pitchExecuted){t.loaderIndex++;return iteratePitchingLoaders(e,t,n)}i(r,function(s){if(s){t.cacheable(false);return n(s)}var i=r.pitch;r.pitchExecuted=true;if(!i)return iteratePitchingLoaders(e,t,n);runSyncOrAsync(i,t,[t.remainingRequest,t.previousRequest,r.data={}],function(r){if(r)return n(r);var s=Array.prototype.slice.call(arguments,1);if(s.length>0){t.loaderIndex--;iterateNormalLoaders(e,t,s,n)}else{iteratePitchingLoaders(e,t,n)}})})}function processResource(e,t,n){t.loaderIndex=t.loaders.length-1;var r=t.resourcePath;if(r){t.addDependency(r)