You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
40 KiB
JavaScript
25 lines
40 KiB
JavaScript
|
9 months ago
|
"use strict";
|
||
|
|
/*
|
||
|
|
* ATTENTION: An "eval-source-map" devtool has been used.
|
||
|
|
* This devtool is neither made for production nor for readable output files.
|
||
|
|
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||
|
|
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||
|
|
* or disable the default devtool with "devtool: false".
|
||
|
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||
|
|
*/
|
||
|
|
exports.id = "vendor-chunks/flairup";
|
||
|
|
exports.ids = ["vendor-chunks/flairup"];
|
||
|
|
exports.modules = {
|
||
|
|
|
||
|
|
/***/ "(ssr)/./node_modules/flairup/dist/esm/index.js":
|
||
|
|
/*!************************************************!*\
|
||
|
|
!*** ./node_modules/flairup/dist/esm/index.js ***!
|
||
|
|
\************************************************/
|
||
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
|
||
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createSheet: () => (/* binding */ createSheet),\n/* harmony export */ cx: () => (/* binding */ cx)\n/* harmony export */ });\n// src/utils/asArray.ts\nfunction asArray(v) {\n return [].concat(v);\n}\n// src/utils/is.ts\nfunction isPsuedoSelector(selector) {\n return selector.startsWith(\":\");\n}\nfunction isStyleCondition(selector) {\n return isString(selector) && (selector === \"*\" || selector.length > 1 && \":>~.+*\".includes(selector.slice(0, 1)) || isImmediatePostcondition(selector));\n}\nfunction isValidProperty(property, value) {\n return (isString(value) || typeof value === \"number\") && !isCssVariables(property) && !isPsuedoSelector(property) && !isMediaQuery(property);\n}\nfunction isMediaQuery(selector) {\n return selector.startsWith(\"@media\");\n}\nfunction isDirectClass(selector) {\n return selector === \".\";\n}\nfunction isCssVariables(selector) {\n return selector === \"--\";\n}\nfunction isString(value) {\n return value + \"\" === value;\n}\nfunction isImmediatePostcondition(value) {\n return isString(value) && (value.startsWith(\"&\") || isPsuedoSelector(value));\n}\n// src/utils/joinTruthy.ts\nfunction joinTruthy(arr, delimiter = \"\") {\n return arr.filter(Boolean).join(delimiter);\n}\n// src/utils/stableHash.ts\nfunction stableHash(prefix, seed) {\n let hash = 0;\n if (seed.length === 0) return hash.toString();\n for(let i = 0; i < seed.length; i++){\n const char = seed.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash = hash & hash;\n }\n return `${prefix ?? \"cl\"}_${hash.toString(36)}`;\n}\n// src/utils/stringManipulators.ts\nfunction handlePropertyValue(property, value) {\n if (property === \"content\") {\n return `\"${value}\"`;\n }\n return value;\n}\nfunction camelCaseToDash(str) {\n return str.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\nfunction joinedProperty(property, value) {\n return `${property}:${value}`;\n}\nfunction toClass(str) {\n return str ? `.${str}` : \"\";\n}\nfunction appendString(base, line) {\n return base ? `${base}\n${line}` : line;\n}\n// src/Rule.ts\nvar Rule = class _Rule {\n constructor(sheet, property, value, selector){\n this.sheet = sheet;\n this.property = property;\n this.value = value;\n this.selector = selector;\n this.property = property;\n this.value = value;\n this.joined = joinedProperty(property, value);\n const joinedConditions = this.selector.preconditions.concat(this.selector.postconditions);\n this.hash = this.selector.hasConditions ? this.selector.scopeClassName : stableHash(this.sheet.name, this.joined);\n this.key = joinTruthy([\n this.joined,\n joinedConditions,\n this.hash\n ]);\n }\n toString() {\n let selectors = mergeSelectors(this.selector.preconditions, {\n right: this.hash\n });\n selectors = mergeSelectors(this.selector.postconditions, {\n left: selectors\n });\n return `${selectors} {${_Rule.genRule(this.property, this.value)}}`;\n }\n static genRule(property, value) {\n const transformedProperty = camelCaseToDash(property);\n return joinedProperty(transformedProperty, handlePropertyValue(property, value)) + \";\";\n }\n};\nfunction mergeSelectors(selectors, { left = \"\", right = \"\" } = {}) {\n const output = selectors.reduce((selectors2, current)=>{\n if (isPsuedoSelector(current)) {\n return selectors2 + current;\n }\n if (isImmediatePostcondition(current)) {\n return selectors2 + current.slice(1);\n }\n return joinTruthy([\n selectors2,\n current\n ], \" \");\n }, left);\n return joinTruthy([\n output,\n toClass(right)\n ], \" \");\n}\nvar Selector = class _Selector {\n
|
||
|
|
|
||
|
|
/***/ })
|
||
|
|
|
||
|
|
};
|
||
|
|
;
|