-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path16-bdf86d769eae88e37da6.js.map
1 lines (1 loc) · 25.7 KB
/
16-bdf86d769eae88e37da6.js.map
1
{"version":3,"sources":["webpack:///./node_modules/@deckdeckgo/highlight-code/dist/esm-es5/shadow-css-b85eee6e.js","webpack:///./node_modules/gatsby/node_modules/core-js/modules/es7.string.trim-right.js"],"names":["__spreadArrays","s","i","il","arguments","length","r","Array","k","a","j","jl","_parenSuffix","_cssColonHostRe","RegExp","_cssColonHostContextRe","_cssColonSlottedRe","_polyfillHostNoCombinatorRe","_shadowDOMSelectorsRe","_polyfillHostRe","_colonHostRe","_colonSlottedRe","_colonHostContextRe","_commentRe","_commentWithHashRe","_ruleRe","_curlyRe","processRules","input","ruleCallback","inputWithEscapedBlocks","escapeBlocks","nextBlockIndex","escapedString","replace","m","_i","selector","content","suffix","contentPrefix","startsWith","blocks","substring","cssRule","rule","inputParts","split","resultParts","escapedBlocks","bracketCount","currentBlockParts","partIndex","part","push","join","convertColonRule","cssText","regExp","partReplacer","parts","p","trim","_polyfillHost","colonHostPartReplacer","host","colonHostContextPartReplacer","indexOf","selectorNeedsScoping","scopeSelector","makeScopeMatcher","test","applyStrictSelectorScope","hostSelector","res","className","_","_scopeSelectorPart","scopedP","lastIndex","replaceBy_1","before","colon","after","applySimpleSelectorScope","t","matches","match","safeContent","placeholders","index","keep","replaceBy","pseudo","exp","safeSelector","scopedSelector","startIndex","sep","shouldScope","exec","separator","part_1","slice","scopeSelectors","scopeSelectorText","slotSelector","commentOriginalSelector","map","shallowPart","scopeCssText","scopeId","hostScopeId","slotScopeId","slotted","slotClass","selectors","compound","slottedSelector","prefixSelector","_char","orgSelector","addedSelector","trimRight","updatedSelector","convertColonSlotted","convertColonHostContext","convertColonHost","reduce","result","pattern","convertShadowDOMSelectors","slottedSelectors","scopeCss","commentsWithHash","stripComments","orgSelectors","processCommentedSelector_1","placeholder","comment","scoped","forEach","_a","$trim","this"],"mappings":"4FAAA,kKA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Z,GACxC,MAAyB,MAArBA,EAAKR,SAAS,GACToG,EAA2B5F,GACzBA,EAAKR,SAASI,WAAW,WAAaI,EAAKR,SAASI,WAAW,cAAgBI,EAAKR,SAASI,WAAW,UAAYI,EAAKR,SAASI,WAAW,cACtJI,EAAKP,QAAUX,EAAakB,EAAKP,QAASmG,GACnC5F,GAGFA,KAIX,IAAI+F,EAAS9B,EAAarD,EAASsD,EAASC,EAAaC,GAczD,OAbAxD,EAAUzD,EAAe,CAAC4I,EAAOnF,SAAU6E,GAAkB/E,KAAK,MAE9DoD,GACF6B,EAAaK,SAAQ,SAAUC,GAC7B,IAAIJ,EAAcI,EAAGJ,YACjBC,EAAUG,EAAGH,QACjBlF,EAAUA,EAAQvB,QAAQwG,EAAaC,MAI3CC,EAAOR,iBAAiBS,SAAQ,SAAUvB,GACxC7D,EAAUA,EAAQvB,QAAQoF,EAAgBG,YAAaH,EAAgBM,oBAElEnE,I,oCC5eT,EAAQ,OAAR,CAA0B,aAAa,SAAUsF,GAC/C,OAAO,WACL,OAAOA,EAAMC,KAAM,MAEpB","file":"16-bdf86d769eae88e37da6.js","sourcesContent":["import \"core-js/modules/es6.array.for-each\";\nimport \"core-js/modules/es6.array.map\";\nimport \"core-js/modules/es6.array.reduce\";\nimport \"core-js/modules/es7.string.trim-right\";\nimport \"core-js/modules/es6.array.index-of\";\nimport \"core-js/modules/es6.string.trim\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.string.starts-with\";\nimport \"core-js/modules/es6.regexp.match\";\nimport \"core-js/modules/es6.regexp.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\n\nvar __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n};\n/*\n Stencil Client Platform v1.13.0 | MIT Licensed | https://stenciljs.com\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n *\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts\n */\n\n\nvar safeSelector = function safeSelector(selector) {\n var placeholders = [];\n var index = 0;\n var content; // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n\n selector = selector.replace(/(\\[[^\\]]*\\])/g, function (_, keep) {\n var replaceBy = \"__ph-\" + index + \"__\";\n placeholders.push(keep);\n index++;\n return replaceBy;\n }); // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n\n content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, function (_, pseudo, exp) {\n var replaceBy = \"__ph-\" + index + \"__\";\n placeholders.push(exp);\n index++;\n return pseudo + replaceBy;\n });\n var ss = {\n content: content,\n placeholders: placeholders\n };\n return ss;\n};\n\nvar restoreSafeSelector = function restoreSafeSelector(placeholders, content) {\n return content.replace(/__ph-(\\d+)__/g, function (_, index) {\n return placeholders[+index];\n });\n};\n\nvar _polyfillHost = '-shadowcsshost';\nvar _polyfillSlotted = '-shadowcssslotted'; // note: :host-context pre-processed to -shadowcsshostcontext.\n\nvar _polyfillHostContext = '-shadowcsscontext';\n\nvar _parenSuffix = ')(?:\\\\((' + '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' + ')\\\\))?([^,{]*)';\n\nvar _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\n\nvar _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\n\nvar _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');\n\nvar _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\n\nvar _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nvar _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];\nvar _selectorReSuffix = '([>\\\\s~+[.,{:][\\\\s\\\\S]*)?$';\nvar _polyfillHostRe = /-shadowcsshost/gim;\nvar _colonHostRe = /:host/gim;\nvar _colonSlottedRe = /::slotted/gim;\nvar _colonHostContextRe = /:host-context/gim;\nvar _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\n\nvar stripComments = function stripComments(input) {\n return input.replace(_commentRe, '');\n};\n\nvar _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\n\nvar extractCommentsWithHash = function extractCommentsWithHash(input) {\n return input.match(_commentWithHashRe) || [];\n};\n\nvar _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nvar _curlyRe = /([{}])/g;\nvar OPEN_CURLY = '{';\nvar CLOSE_CURLY = '}';\nvar BLOCK_PLACEHOLDER = '%BLOCK%';\n\nvar processRules = function processRules(input, ruleCallback) {\n var inputWithEscapedBlocks = escapeBlocks(input);\n var nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {\n var m = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n\n var selector = m[2];\n var content = '';\n var suffix = m[4];\n var contentPrefix = '';\n\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n\n var cssRule = {\n selector: selector,\n content: content\n };\n var rule = ruleCallback(cssRule);\n return \"\" + m[1] + rule.selector + m[3] + contentPrefix + rule.content + suffix;\n });\n};\n\nvar escapeBlocks = function escapeBlocks(input) {\n var inputParts = input.split(_curlyRe);\n var resultParts = [];\n var escapedBlocks = [];\n var bracketCount = 0;\n var currentBlockParts = [];\n\n for (var partIndex = 0; partIndex < inputParts.length; partIndex++) {\n var part = inputParts[partIndex];\n\n if (part === CLOSE_CURLY) {\n bracketCount--;\n }\n\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n } else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n\n resultParts.push(part);\n }\n\n if (part === OPEN_CURLY) {\n bracketCount++;\n }\n }\n\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n\n var strEscapedBlocks = {\n escapedString: resultParts.join(''),\n blocks: escapedBlocks\n };\n return strEscapedBlocks;\n};\n\nvar insertPolyfillHostInCssText = function insertPolyfillHostInCssText(selector) {\n selector = selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost).replace(_colonSlottedRe, _polyfillSlotted);\n return selector;\n};\n\nvar convertColonRule = function convertColonRule(cssText, regExp, partReplacer) {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, function () {\n var m = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n\n if (m[2]) {\n var parts = m[2].split(',');\n var r = [];\n\n for (var i = 0; i < parts.length; i++) {\n var p = parts[i].trim();\n if (!p) break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n\n return r.join(',');\n } else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n};\n\nvar colonHostPartReplacer = function colonHostPartReplacer(host, part, suffix) {\n return host + part.replace(_polyfillHost, '') + suffix;\n};\n\nvar convertColonHost = function convertColonHost(cssText) {\n return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);\n};\n\nvar colonHostContextPartReplacer = function colonHostContextPartReplacer(host, part, suffix) {\n if (part.indexOf(_polyfillHost) > -1) {\n return colonHostPartReplacer(host, part, suffix);\n } else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n};\n\nvar convertColonSlotted = function convertColonSlotted(cssText, slotScopeId) {\n var slotClass = '.' + slotScopeId + ' > ';\n var selectors = [];\n cssText = cssText.replace(_cssColonSlottedRe, function () {\n var m = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n\n if (m[2]) {\n var compound = m[2].trim();\n var suffix = m[3];\n var slottedSelector = slotClass + compound + suffix;\n var prefixSelector = '';\n\n for (var i = m[4] - 1; i >= 0; i--) {\n var _char = m[5][i];\n\n if (_char === '}' || _char === ',') {\n break;\n }\n\n prefixSelector = _char + prefixSelector;\n }\n\n var orgSelector = prefixSelector + slottedSelector;\n var addedSelector = \"\" + prefixSelector.trimRight() + slottedSelector.trim();\n\n if (orgSelector.trim() !== addedSelector.trim()) {\n var updatedSelector = addedSelector + \", \" + orgSelector;\n selectors.push({\n orgSelector: orgSelector,\n updatedSelector: updatedSelector\n });\n }\n\n return slottedSelector;\n } else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n return {\n selectors: selectors,\n cssText: cssText\n };\n};\n\nvar convertColonHostContext = function convertColonHostContext(cssText) {\n return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);\n};\n\nvar convertShadowDOMSelectors = function convertShadowDOMSelectors(cssText) {\n return _shadowDOMSelectorsRe.reduce(function (result, pattern) {\n return result.replace(pattern, ' ');\n }, cssText);\n};\n\nvar makeScopeMatcher = function makeScopeMatcher(scopeSelector) {\n var lre = /\\[/g;\n var rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n};\n\nvar selectorNeedsScoping = function selectorNeedsScoping(selector, scopeSelector) {\n var re = makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n};\n\nvar applySimpleSelectorScope = function applySimpleSelectorScope(selector, scopeSelector, hostSelector) {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n\n if (_polyfillHostRe.test(selector)) {\n var replaceBy_1 = \".\" + hostSelector;\n return selector.replace(_polyfillHostNoCombinatorRe, function (_, selector) {\n return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {\n return before + replaceBy_1 + colon + after;\n });\n }).replace(_polyfillHostRe, replaceBy_1 + ' ');\n }\n\n return scopeSelector + ' ' + selector;\n};\n\nvar applyStrictSelectorScope = function applyStrictSelectorScope(selector, scopeSelector, hostSelector) {\n var isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, function (_) {\n var parts = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n parts[_i - 1] = arguments[_i];\n }\n\n return parts[0];\n });\n var className = '.' + scopeSelector;\n\n var _scopeSelectorPart = function _scopeSelectorPart(p) {\n var scopedP = p.trim();\n\n if (!scopedP) {\n return '';\n }\n\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);\n } else {\n // remove :host since it should be unnecessary\n var t = p.replace(_polyfillHostRe, '');\n\n if (t.length > 0) {\n var matches = t.match(/([^:]*)(:*)(.*)/);\n\n if (matches) {\n scopedP = matches[1] + className + matches[2] + matches[3];\n }\n }\n }\n\n return scopedP;\n };\n\n var safeContent = safeSelector(selector);\n selector = safeContent.content;\n var scopedSelector = '';\n var startIndex = 0;\n var res;\n var sep = /( |>|\\+|~(?!=))\\s*/g; // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n\n var hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1; // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n\n var shouldScope = !hasHost;\n\n while ((res = sep.exec(selector)) !== null) {\n var separator = res[1];\n var part_1 = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part_1.indexOf(_polyfillHostNoCombinator) > -1;\n var scopedPart = shouldScope ? _scopeSelectorPart(part_1) : part_1;\n scopedSelector += scopedPart + \" \" + separator + \" \";\n startIndex = sep.lastIndex;\n }\n\n var part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part; // replace the placeholders with their original values\n\n return restoreSafeSelector(safeContent.placeholders, scopedSelector);\n};\n\nvar scopeSelector = function scopeSelector(selector, scopeSelectorText, hostSelector, slotSelector) {\n return selector.split(',').map(function (shallowPart) {\n if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {\n return shallowPart.trim();\n }\n\n if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {\n return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();\n } else {\n return shallowPart.trim();\n }\n }).join(', ');\n};\n\nvar scopeSelectors = function scopeSelectors(cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) {\n return processRules(cssText, function (rule) {\n var selector = rule.selector;\n var content = rule.content;\n\n if (rule.selector[0] !== '@') {\n selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);\n } else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);\n }\n\n var cssRule = {\n selector: selector.replace(/\\s{2,}/g, ' ').trim(),\n content: content\n };\n return cssRule;\n });\n};\n\nvar scopeCssText = function scopeCssText(cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) {\n cssText = insertPolyfillHostInCssText(cssText);\n cssText = convertColonHost(cssText);\n cssText = convertColonHostContext(cssText);\n var slotted = convertColonSlotted(cssText, slotScopeId);\n cssText = slotted.cssText;\n cssText = convertShadowDOMSelectors(cssText);\n\n if (scopeId) {\n cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);\n }\n\n cssText = cssText.replace(/-shadowcsshost-no-combinator/g, \".\" + hostScopeId);\n cssText = cssText.replace(/>\\s*\\*\\s+([^{, ]+)/gm, ' $1 ');\n return {\n cssText: cssText.trim(),\n slottedSelectors: slotted.selectors\n };\n};\n\nvar scopeCss = function scopeCss(cssText, scopeId, commentOriginalSelector) {\n var hostScopeId = scopeId + '-h';\n var slotScopeId = scopeId + '-s';\n var commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n var orgSelectors = [];\n\n if (commentOriginalSelector) {\n var processCommentedSelector_1 = function processCommentedSelector_1(rule) {\n var placeholder = \"/*!@___\" + orgSelectors.length + \"___*/\";\n var comment = \"/*!@\" + rule.selector + \"*/\";\n orgSelectors.push({\n placeholder: placeholder,\n comment: comment\n });\n rule.selector = placeholder + rule.selector;\n return rule;\n };\n\n cssText = processRules(cssText, function (rule) {\n if (rule.selector[0] !== '@') {\n return processCommentedSelector_1(rule);\n } else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n rule.content = processRules(rule.content, processCommentedSelector_1);\n return rule;\n }\n\n return rule;\n });\n }\n\n var scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);\n cssText = __spreadArrays([scoped.cssText], commentsWithHash).join('\\n');\n\n if (commentOriginalSelector) {\n orgSelectors.forEach(function (_a) {\n var placeholder = _a.placeholder,\n comment = _a.comment;\n cssText = cssText.replace(placeholder, comment);\n });\n }\n\n scoped.slottedSelectors.forEach(function (slottedSelector) {\n cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);\n });\n return cssText;\n};\n\nexport { scopeCss };","'use strict';\n// https://github.com/sebmarkbage/ecmascript-string-left-right-trim\nrequire('./_string-trim')('trimRight', function ($trim) {\n return function trimRight() {\n return $trim(this, 2);\n };\n}, 'trimEnd');\n"],"sourceRoot":""}