Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
* `aria-activedescendant` are also considered.
[57500] Fix | Delete
*
[57501] Fix | Delete
* @example
[57502] Fix | Delete
* import { hasFocusWithin } from "reakit-utils";
[57503] Fix | Delete
*
[57504] Fix | Delete
* hasFocusWithin(document.getElementById("id"));
[57505] Fix | Delete
*/
[57506] Fix | Delete
[57507] Fix | Delete
function hasFocusWithin(element) {
[57508] Fix | Delete
var activeElement = Object(_getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__[/* getActiveElement */ "a"])(element);
[57509] Fix | Delete
if (!activeElement) return false;
[57510] Fix | Delete
if (Object(_contains_js__WEBPACK_IMPORTED_MODULE_1__[/* contains */ "a"])(element, activeElement)) return true;
[57511] Fix | Delete
var activeDescendant = activeElement.getAttribute("aria-activedescendant");
[57512] Fix | Delete
if (!activeDescendant) return false;
[57513] Fix | Delete
if (activeDescendant === element.id) return true;
[57514] Fix | Delete
return !!element.querySelector("#" + activeDescendant);
[57515] Fix | Delete
}
[57516] Fix | Delete
[57517] Fix | Delete
[57518] Fix | Delete
[57519] Fix | Delete
[57520] Fix | Delete
/***/ }),
[57521] Fix | Delete
[57522] Fix | Delete
/***/ "yLpj":
[57523] Fix | Delete
/***/ (function(module, exports) {
[57524] Fix | Delete
[57525] Fix | Delete
var g;
[57526] Fix | Delete
[57527] Fix | Delete
// This works in non-strict mode
[57528] Fix | Delete
g = (function() {
[57529] Fix | Delete
return this;
[57530] Fix | Delete
})();
[57531] Fix | Delete
[57532] Fix | Delete
try {
[57533] Fix | Delete
// This works if eval is allowed (see CSP)
[57534] Fix | Delete
g = g || new Function("return this")();
[57535] Fix | Delete
} catch (e) {
[57536] Fix | Delete
// This works if the window reference is available
[57537] Fix | Delete
if (typeof window === "object") g = window;
[57538] Fix | Delete
}
[57539] Fix | Delete
[57540] Fix | Delete
// g can still be undefined, but nothing to do about it...
[57541] Fix | Delete
// We return undefined, instead of nothing here, so it's
[57542] Fix | Delete
// easier to handle this case. if(!global) { ...}
[57543] Fix | Delete
[57544] Fix | Delete
module.exports = g;
[57545] Fix | Delete
[57546] Fix | Delete
[57547] Fix | Delete
/***/ }),
[57548] Fix | Delete
[57549] Fix | Delete
/***/ "yLpt":
[57550] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[57551] Fix | Delete
[57552] Fix | Delete
"use strict";
[57553] Fix | Delete
[57554] Fix | Delete
[57555] Fix | Delete
var implementation = __webpack_require__("FufO");
[57556] Fix | Delete
[57557] Fix | Delete
var lacksProperEnumerationOrder = function () {
[57558] Fix | Delete
if (!Object.assign) {
[57559] Fix | Delete
return false;
[57560] Fix | Delete
}
[57561] Fix | Delete
/*
[57562] Fix | Delete
* v8, specifically in node 4.x, has a bug with incorrect property enumeration order
[57563] Fix | Delete
* note: this does not detect the bug unless there's 20 characters
[57564] Fix | Delete
*/
[57565] Fix | Delete
var str = 'abcdefghijklmnopqrst';
[57566] Fix | Delete
var letters = str.split('');
[57567] Fix | Delete
var map = {};
[57568] Fix | Delete
for (var i = 0; i < letters.length; ++i) {
[57569] Fix | Delete
map[letters[i]] = letters[i];
[57570] Fix | Delete
}
[57571] Fix | Delete
var obj = Object.assign({}, map);
[57572] Fix | Delete
var actual = '';
[57573] Fix | Delete
for (var k in obj) {
[57574] Fix | Delete
actual += k;
[57575] Fix | Delete
}
[57576] Fix | Delete
return str !== actual;
[57577] Fix | Delete
};
[57578] Fix | Delete
[57579] Fix | Delete
var assignHasPendingExceptions = function () {
[57580] Fix | Delete
if (!Object.assign || !Object.preventExtensions) {
[57581] Fix | Delete
return false;
[57582] Fix | Delete
}
[57583] Fix | Delete
/*
[57584] Fix | Delete
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
[57585] Fix | Delete
* which is 72% slower than our shim, and Firefox 40's native implementation.
[57586] Fix | Delete
*/
[57587] Fix | Delete
var thrower = Object.preventExtensions({ 1: 2 });
[57588] Fix | Delete
try {
[57589] Fix | Delete
Object.assign(thrower, 'xy');
[57590] Fix | Delete
} catch (e) {
[57591] Fix | Delete
return thrower[1] === 'y';
[57592] Fix | Delete
}
[57593] Fix | Delete
return false;
[57594] Fix | Delete
};
[57595] Fix | Delete
[57596] Fix | Delete
module.exports = function getPolyfill() {
[57597] Fix | Delete
if (!Object.assign) {
[57598] Fix | Delete
return implementation;
[57599] Fix | Delete
}
[57600] Fix | Delete
if (lacksProperEnumerationOrder()) {
[57601] Fix | Delete
return implementation;
[57602] Fix | Delete
}
[57603] Fix | Delete
if (assignHasPendingExceptions()) {
[57604] Fix | Delete
return implementation;
[57605] Fix | Delete
}
[57606] Fix | Delete
return Object.assign;
[57607] Fix | Delete
};
[57608] Fix | Delete
[57609] Fix | Delete
[57610] Fix | Delete
/***/ }),
[57611] Fix | Delete
[57612] Fix | Delete
/***/ "yN6O":
[57613] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[57614] Fix | Delete
[57615] Fix | Delete
"use strict";
[57616] Fix | Delete
[57617] Fix | Delete
[57618] Fix | Delete
var ArraySpeciesCreate = __webpack_require__("7Ji+");
[57619] Fix | Delete
var FlattenIntoArray = __webpack_require__("iz0l");
[57620] Fix | Delete
var Get = __webpack_require__("3aeR");
[57621] Fix | Delete
var ToInteger = __webpack_require__("ddK1");
[57622] Fix | Delete
var ToLength = __webpack_require__("w3Ut");
[57623] Fix | Delete
var ToObject = __webpack_require__("sA9S");
[57624] Fix | Delete
[57625] Fix | Delete
module.exports = function flat() {
[57626] Fix | Delete
var O = ToObject(this);
[57627] Fix | Delete
var sourceLen = ToLength(Get(O, 'length'));
[57628] Fix | Delete
[57629] Fix | Delete
var depthNum = 1;
[57630] Fix | Delete
if (arguments.length > 0 && typeof arguments[0] !== 'undefined') {
[57631] Fix | Delete
depthNum = ToInteger(arguments[0]);
[57632] Fix | Delete
}
[57633] Fix | Delete
[57634] Fix | Delete
var A = ArraySpeciesCreate(O, 0);
[57635] Fix | Delete
FlattenIntoArray(A, O, sourceLen, 0, depthNum);
[57636] Fix | Delete
return A;
[57637] Fix | Delete
};
[57638] Fix | Delete
[57639] Fix | Delete
[57640] Fix | Delete
/***/ }),
[57641] Fix | Delete
[57642] Fix | Delete
/***/ "yc2e":
[57643] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[57644] Fix | Delete
[57645] Fix | Delete
"use strict";
[57646] Fix | Delete
[57647] Fix | Delete
[57648] Fix | Delete
Object.defineProperty(exports, "__esModule", {
[57649] Fix | Delete
value: true
[57650] Fix | Delete
});
[57651] Fix | Delete
exports['default'] = getPhrasePropTypes;
[57652] Fix | Delete
[57653] Fix | Delete
var _object = __webpack_require__("Koq/");
[57654] Fix | Delete
[57655] Fix | Delete
var _object2 = _interopRequireDefault(_object);
[57656] Fix | Delete
[57657] Fix | Delete
var _propTypes = __webpack_require__("17x9");
[57658] Fix | Delete
[57659] Fix | Delete
var _propTypes2 = _interopRequireDefault(_propTypes);
[57660] Fix | Delete
[57661] Fix | Delete
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
[57662] Fix | Delete
[57663] Fix | Delete
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
[57664] Fix | Delete
[57665] Fix | Delete
function getPhrasePropTypes(defaultPhrases) {
[57666] Fix | Delete
return Object.keys(defaultPhrases).reduce(function (phrases, key) {
[57667] Fix | Delete
return (0, _object2['default'])({}, phrases, _defineProperty({}, key, _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].func, _propTypes2['default'].node])));
[57668] Fix | Delete
}, {});
[57669] Fix | Delete
}
[57670] Fix | Delete
[57671] Fix | Delete
/***/ }),
[57672] Fix | Delete
[57673] Fix | Delete
/***/ "ym77":
[57674] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[57675] Fix | Delete
[57676] Fix | Delete
"use strict";
[57677] Fix | Delete
/* unused harmony export unstable_Id */
[57678] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_useId; });
[57679] Fix | Delete
/* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BZp5");
[57680] Fix | Delete
/* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dQ10");
[57681] Fix | Delete
/* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("1k9I");
[57682] Fix | Delete
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("cDcd");
[57683] Fix | Delete
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
[57684] Fix | Delete
/* harmony import */ var _IdProvider_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("KCH1");
[57685] Fix | Delete
[57686] Fix | Delete
[57687] Fix | Delete
[57688] Fix | Delete
[57689] Fix | Delete
[57690] Fix | Delete
[57691] Fix | Delete
// Automatically generated
[57692] Fix | Delete
var ID_STATE_KEYS = ["baseId", "unstable_idCountRef", "setBaseId"];
[57693] Fix | Delete
var ID_KEYS = [].concat(ID_STATE_KEYS, ["id"]);
[57694] Fix | Delete
[57695] Fix | Delete
var unstable_useId = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
[57696] Fix | Delete
keys: ID_KEYS,
[57697] Fix | Delete
useOptions: function useOptions(options, htmlProps) {
[57698] Fix | Delete
var generateId = Object(react__WEBPACK_IMPORTED_MODULE_3__["useContext"])(_IdProvider_js__WEBPACK_IMPORTED_MODULE_4__[/* unstable_IdContext */ "a"]);
[57699] Fix | Delete
[57700] Fix | Delete
var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(function () {
[57701] Fix | Delete
// This comes from useIdState
[57702] Fix | Delete
if (options.unstable_idCountRef) {
[57703] Fix | Delete
options.unstable_idCountRef.current += 1;
[57704] Fix | Delete
return "-" + options.unstable_idCountRef.current;
[57705] Fix | Delete
} // If there's no useIdState, we check if `baseId` was passed (as a prop,
[57706] Fix | Delete
// not from useIdState).
[57707] Fix | Delete
[57708] Fix | Delete
[57709] Fix | Delete
if (options.baseId) {
[57710] Fix | Delete
return "-" + generateId("");
[57711] Fix | Delete
}
[57712] Fix | Delete
[57713] Fix | Delete
return "";
[57714] Fix | Delete
}),
[57715] Fix | Delete
suffix = _React$useState[0]; // `baseId` will be the prop passed directly as a prop or via useIdState.
[57716] Fix | Delete
// If there's neither, then it'll fallback to Context's generateId.
[57717] Fix | Delete
// This generateId can result in a sequential ID (if there's a Provider)
[57718] Fix | Delete
// or a random string (without Provider).
[57719] Fix | Delete
[57720] Fix | Delete
[57721] Fix | Delete
var baseId = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () {
[57722] Fix | Delete
return options.baseId || generateId();
[57723] Fix | Delete
}, [options.baseId, generateId]);
[57724] Fix | Delete
var id = htmlProps.id || options.id || "" + baseId + suffix;
[57725] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, options), {}, {
[57726] Fix | Delete
id: id
[57727] Fix | Delete
});
[57728] Fix | Delete
},
[57729] Fix | Delete
useProps: function useProps(options, htmlProps) {
[57730] Fix | Delete
return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
[57731] Fix | Delete
id: options.id
[57732] Fix | Delete
}, htmlProps);
[57733] Fix | Delete
}
[57734] Fix | Delete
});
[57735] Fix | Delete
var unstable_Id = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
[57736] Fix | Delete
as: "div",
[57737] Fix | Delete
useHook: unstable_useId
[57738] Fix | Delete
});
[57739] Fix | Delete
[57740] Fix | Delete
[57741] Fix | Delete
[57742] Fix | Delete
[57743] Fix | Delete
/***/ }),
[57744] Fix | Delete
[57745] Fix | Delete
/***/ "yy3d":
[57746] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[57747] Fix | Delete
[57748] Fix | Delete
"use strict";
[57749] Fix | Delete
[57750] Fix | Delete
[57751] Fix | Delete
var GetIntrinsic = __webpack_require__("AM7I");
[57752] Fix | Delete
[57753] Fix | Delete
var $match = GetIntrinsic('%Symbol.match%', true);
[57754] Fix | Delete
[57755] Fix | Delete
var hasRegExpMatcher = __webpack_require__("2Nju");
[57756] Fix | Delete
[57757] Fix | Delete
var ToBoolean = __webpack_require__("kvlw");
[57758] Fix | Delete
[57759] Fix | Delete
// https://ecma-international.org/ecma-262/6.0/#sec-isregexp
[57760] Fix | Delete
[57761] Fix | Delete
module.exports = function IsRegExp(argument) {
[57762] Fix | Delete
if (!argument || typeof argument !== 'object') {
[57763] Fix | Delete
return false;
[57764] Fix | Delete
}
[57765] Fix | Delete
if ($match) {
[57766] Fix | Delete
var isRegExp = argument[$match];
[57767] Fix | Delete
if (typeof isRegExp !== 'undefined') {
[57768] Fix | Delete
return ToBoolean(isRegExp);
[57769] Fix | Delete
}
[57770] Fix | Delete
}
[57771] Fix | Delete
return hasRegExpMatcher(argument);
[57772] Fix | Delete
};
[57773] Fix | Delete
[57774] Fix | Delete
[57775] Fix | Delete
/***/ }),
[57776] Fix | Delete
[57777] Fix | Delete
/***/ "yyeE":
[57778] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[57779] Fix | Delete
[57780] Fix | Delete
"use strict";
[57781] Fix | Delete
[57782] Fix | Delete
[57783] Fix | Delete
var GetIntrinsic = __webpack_require__("AM7I");
[57784] Fix | Delete
[57785] Fix | Delete
var $Math = GetIntrinsic('%Math%');
[57786] Fix | Delete
var $Number = GetIntrinsic('%Number%');
[57787] Fix | Delete
[57788] Fix | Delete
module.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1;
[57789] Fix | Delete
[57790] Fix | Delete
[57791] Fix | Delete
/***/ }),
[57792] Fix | Delete
[57793] Fix | Delete
/***/ "z222":
[57794] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[57795] Fix | Delete
[57796] Fix | Delete
"use strict";
[57797] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getActiveElement; });
[57798] Fix | Delete
/* harmony import */ var _getDocument_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Ccil");
[57799] Fix | Delete
[57800] Fix | Delete
[57801] Fix | Delete
/**
[57802] Fix | Delete
* Returns `element.ownerDocument.activeElement`.
[57803] Fix | Delete
*/
[57804] Fix | Delete
[57805] Fix | Delete
function getActiveElement(element) {
[57806] Fix | Delete
var _getDocument = Object(_getDocument_js__WEBPACK_IMPORTED_MODULE_0__[/* getDocument */ "a"])(element),
[57807] Fix | Delete
activeElement = _getDocument.activeElement;
[57808] Fix | Delete
[57809] Fix | Delete
if (!(activeElement !== null && activeElement !== void 0 && activeElement.nodeName)) {
[57810] Fix | Delete
// In IE11, activeElement might be an empty object if we're interacting
[57811] Fix | Delete
// with elements inside of an iframe.
[57812] Fix | Delete
return null;
[57813] Fix | Delete
}
[57814] Fix | Delete
[57815] Fix | Delete
return activeElement;
[57816] Fix | Delete
}
[57817] Fix | Delete
[57818] Fix | Delete
[57819] Fix | Delete
[57820] Fix | Delete
[57821] Fix | Delete
/***/ }),
[57822] Fix | Delete
[57823] Fix | Delete
/***/ "z3X9":
[57824] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[57825] Fix | Delete
[57826] Fix | Delete
"use strict";
[57827] Fix | Delete
[57828] Fix | Delete
[57829] Fix | Delete
var has = __webpack_require__("oNNP");
[57830] Fix | Delete
[57831] Fix | Delete
var assertRecord = __webpack_require__("10Kj");
[57832] Fix | Delete
[57833] Fix | Delete
var Type = __webpack_require__("V1cy");
[57834] Fix | Delete
[57835] Fix | Delete
// https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor
[57836] Fix | Delete
[57837] Fix | Delete
module.exports = function IsAccessorDescriptor(Desc) {
[57838] Fix | Delete
if (typeof Desc === 'undefined') {
[57839] Fix | Delete
return false;
[57840] Fix | Delete
}
[57841] Fix | Delete
[57842] Fix | Delete
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
[57843] Fix | Delete
[57844] Fix | Delete
if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {
[57845] Fix | Delete
return false;
[57846] Fix | Delete
}
[57847] Fix | Delete
[57848] Fix | Delete
return true;
[57849] Fix | Delete
};
[57850] Fix | Delete
[57851] Fix | Delete
[57852] Fix | Delete
/***/ }),
[57853] Fix | Delete
[57854] Fix | Delete
/***/ "z9I/":
[57855] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[57856] Fix | Delete
[57857] Fix | Delete
"use strict";
[57858] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StyleSheet; });
[57859] Fix | Delete
/*
[57860] Fix | Delete
[57861] Fix | Delete
Based off glamor's StyleSheet, thanks Sunil ❤️
[57862] Fix | Delete
[57863] Fix | Delete
high performance StyleSheet for css-in-js systems
[57864] Fix | Delete
[57865] Fix | Delete
- uses multiple style tags behind the scenes for millions of rules
[57866] Fix | Delete
- uses `insertRule` for appending in production for *much* faster performance
[57867] Fix | Delete
[57868] Fix | Delete
// usage
[57869] Fix | Delete
[57870] Fix | Delete
import { StyleSheet } from '@emotion/sheet'
[57871] Fix | Delete
[57872] Fix | Delete
let styleSheet = new StyleSheet({ key: '', container: document.head })
[57873] Fix | Delete
[57874] Fix | Delete
styleSheet.insert('#box { border: 1px solid red; }')
[57875] Fix | Delete
- appends a css rule into the stylesheet
[57876] Fix | Delete
[57877] Fix | Delete
styleSheet.flush()
[57878] Fix | Delete
- empties the stylesheet of all its contents
[57879] Fix | Delete
[57880] Fix | Delete
*/
[57881] Fix | Delete
// $FlowFixMe
[57882] Fix | Delete
function sheetForTag(tag) {
[57883] Fix | Delete
if (tag.sheet) {
[57884] Fix | Delete
// $FlowFixMe
[57885] Fix | Delete
return tag.sheet;
[57886] Fix | Delete
} // this weirdness brought to you by firefox
[57887] Fix | Delete
[57888] Fix | Delete
/* istanbul ignore next */
[57889] Fix | Delete
[57890] Fix | Delete
[57891] Fix | Delete
for (var i = 0; i < document.styleSheets.length; i++) {
[57892] Fix | Delete
if (document.styleSheets[i].ownerNode === tag) {
[57893] Fix | Delete
// $FlowFixMe
[57894] Fix | Delete
return document.styleSheets[i];
[57895] Fix | Delete
}
[57896] Fix | Delete
}
[57897] Fix | Delete
}
[57898] Fix | Delete
[57899] Fix | Delete
function createStyleElement(options) {
[57900] Fix | Delete
var tag = document.createElement('style');
[57901] Fix | Delete
tag.setAttribute('data-emotion', options.key);
[57902] Fix | Delete
[57903] Fix | Delete
if (options.nonce !== undefined) {
[57904] Fix | Delete
tag.setAttribute('nonce', options.nonce);
[57905] Fix | Delete
}
[57906] Fix | Delete
[57907] Fix | Delete
tag.appendChild(document.createTextNode(''));
[57908] Fix | Delete
return tag;
[57909] Fix | Delete
}
[57910] Fix | Delete
[57911] Fix | Delete
var StyleSheet =
[57912] Fix | Delete
/*#__PURE__*/
[57913] Fix | Delete
function () {
[57914] Fix | Delete
function StyleSheet(options) {
[57915] Fix | Delete
this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy;
[57916] Fix | Delete
this.tags = [];
[57917] Fix | Delete
this.ctr = 0;
[57918] Fix | Delete
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
[57919] Fix | Delete
[57920] Fix | Delete
this.key = options.key;
[57921] Fix | Delete
this.container = options.container;
[57922] Fix | Delete
this.before = null;
[57923] Fix | Delete
}
[57924] Fix | Delete
[57925] Fix | Delete
var _proto = StyleSheet.prototype;
[57926] Fix | Delete
[57927] Fix | Delete
_proto.insert = function insert(rule) {
[57928] Fix | Delete
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
[57929] Fix | Delete
// it's 1 in dev because we insert source maps that map a single rule to a location
[57930] Fix | Delete
// and you can only have one source map per style tag
[57931] Fix | Delete
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
[57932] Fix | Delete
var _tag = createStyleElement(this);
[57933] Fix | Delete
[57934] Fix | Delete
var before;
[57935] Fix | Delete
[57936] Fix | Delete
if (this.tags.length === 0) {
[57937] Fix | Delete
before = this.before;
[57938] Fix | Delete
} else {
[57939] Fix | Delete
before = this.tags[this.tags.length - 1].nextSibling;
[57940] Fix | Delete
}
[57941] Fix | Delete
[57942] Fix | Delete
this.container.insertBefore(_tag, before);
[57943] Fix | Delete
this.tags.push(_tag);
[57944] Fix | Delete
}
[57945] Fix | Delete
[57946] Fix | Delete
var tag = this.tags[this.tags.length - 1];
[57947] Fix | Delete
[57948] Fix | Delete
if (this.isSpeedy) {
[57949] Fix | Delete
var sheet = sheetForTag(tag);
[57950] Fix | Delete
[57951] Fix | Delete
try {
[57952] Fix | Delete
// this is a really hot path
[57953] Fix | Delete
// we check the second character first because having "i"
[57954] Fix | Delete
// as the second character will happen less often than
[57955] Fix | Delete
// having "@" as the first character
[57956] Fix | Delete
var isImportRule = rule.charCodeAt(1) === 105 && rule.charCodeAt(0) === 64; // this is the ultrafast version, works across browsers
[57957] Fix | Delete
// the big drawback is that the css won't be editable in devtools
[57958] Fix | Delete
[57959] Fix | Delete
sheet.insertRule(rule, // we need to insert @import rules before anything else
[57960] Fix | Delete
// otherwise there will be an error
[57961] Fix | Delete
// technically this means that the @import rules will
[57962] Fix | Delete
// _usually_(not always since there could be multiple style tags)
[57963] Fix | Delete
// be the first ones in prod and generally later in dev
[57964] Fix | Delete
// this shouldn't really matter in the real world though
[57965] Fix | Delete
// @import is generally only used for font faces from google fonts and etc.
[57966] Fix | Delete
// so while this could be technically correct then it would be slower and larger
[57967] Fix | Delete
// for a tiny bit of correctness that won't matter in the real world
[57968] Fix | Delete
isImportRule ? 0 : sheet.cssRules.length);
[57969] Fix | Delete
} catch (e) {
[57970] Fix | Delete
if (false) {}
[57971] Fix | Delete
}
[57972] Fix | Delete
} else {
[57973] Fix | Delete
tag.appendChild(document.createTextNode(rule));
[57974] Fix | Delete
}
[57975] Fix | Delete
[57976] Fix | Delete
this.ctr++;
[57977] Fix | Delete
};
[57978] Fix | Delete
[57979] Fix | Delete
_proto.flush = function flush() {
[57980] Fix | Delete
// $FlowFixMe
[57981] Fix | Delete
this.tags.forEach(function (tag) {
[57982] Fix | Delete
return tag.parentNode.removeChild(tag);
[57983] Fix | Delete
});
[57984] Fix | Delete
this.tags = [];
[57985] Fix | Delete
this.ctr = 0;
[57986] Fix | Delete
};
[57987] Fix | Delete
[57988] Fix | Delete
return StyleSheet;
[57989] Fix | Delete
}();
[57990] Fix | Delete
[57991] Fix | Delete
[57992] Fix | Delete
[57993] Fix | Delete
[57994] Fix | Delete
/***/ }),
[57995] Fix | Delete
[57996] Fix | Delete
/***/ "zGFp":
[57997] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[57998] Fix | Delete
[57999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function