diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-14 19:04:09 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-20 19:21:54 +0200 |
commit | 938553ab07d59f6b04b7c4d157142c0c26aeef76 (patch) | |
tree | b18999d71309c09540a4cd0402f16a15a9393de1 /core/vendor | |
parent | 4f0a318e02db1fcc5769049e7eff5da5493d865a (diff) | |
download | nextcloud-server-938553ab07d59f6b04b7c4d157142c0c26aeef76.tar.gz nextcloud-server-938553ab07d59f6b04b7c4d157142c0c26aeef76.zip |
IE11 css vars compatibility
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/vendor')
-rw-r--r-- | core/vendor/.gitignore | 7 | ||||
-rw-r--r-- | core/vendor/css-vars-ponyfill/LICENSE | 21 | ||||
-rw-r--r-- | core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js | 9 | ||||
-rw-r--r-- | core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js.map | 1 |
4 files changed, 38 insertions, 0 deletions
diff --git a/core/vendor/.gitignore b/core/vendor/.gitignore index 2c04d2e3177..a74b7f89a39 100644 --- a/core/vendor/.gitignore +++ b/core/vendor/.gitignore @@ -176,3 +176,10 @@ DOMPurify/** # strengthify strengthify/examples.html strengthify/examples.png + +# underscore +css-vars-ponyfill/** +!css-vars-ponyfill/dist +!css-vars-ponyfill/dist/css-vars-ponyfill.min.js +!css-vars-ponyfill/dist/css-vars-ponyfill.min.js.map +!css-vars-ponyfill/LICENSE
\ No newline at end of file diff --git a/core/vendor/css-vars-ponyfill/LICENSE b/core/vendor/css-vars-ponyfill/LICENSE new file mode 100644 index 00000000000..51e689fe047 --- /dev/null +++ b/core/vendor/css-vars-ponyfill/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 John Hildenbiddle + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js b/core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js new file mode 100644 index 00000000000..f68b2e18b81 --- /dev/null +++ b/core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js @@ -0,0 +1,9 @@ +/*! + * css-vars-ponyfill + * v1.7.2 + * https://github.com/jhildenbiddle/css-vars-ponyfill + * (c) 2018 John Hildenbiddle <http://hildenbiddle.com> + * MIT license + */ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.cssVars=n()}(this,function(){"use strict";function e(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={mimeType:n.mimeType||null,onBeforeSend:n.onBeforeSend||Function.prototype,onSuccess:n.onSuccess||Function.prototype,onError:n.onError||Function.prototype,onComplete:n.onComplete||Function.prototype},t=Array.isArray(e)?e:[e],o=Array.apply(null,Array(t.length)).map(function(e){return null});function s(e,n){r.onError(e,t[n],n)}function a(e,n){var s=r.onSuccess(e,t[n],n);e=!1===s?"":s||e,o[n]=e,-1===o.indexOf(null)&&r.onComplete(o)}t.forEach(function(e,n){var t=document.createElement("a");t.setAttribute("href",e),t.href=t.href;var o=t.host!==location.host,i=t.protocol===location.protocol;if(o&&"undefined"!=typeof XDomainRequest)if(i){var u=new XDomainRequest;u.open("GET",e),u.timeout=0,u.onprogress=Function.prototype,u.ontimeout=Function.prototype,u.onload=function(){a(u.responseText,n)},u.onerror=function(e){s(u,n)},setTimeout(function(){u.send()},0)}else console.log("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol"),s(null,n);else{var c=new XMLHttpRequest;c.open("GET",e),r.mimeType&&c.overrideMimeType&&c.overrideMimeType(r.mimeType),r.onBeforeSend(c,e,n),c.onreadystatechange=function(){4===c.readyState&&(200===c.status?a(c.responseText,n):s(c,n))},c.send()}})}function n(n){var t={cssComments:/\/\*[\s\S]+?\*\//g,cssImports:/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g},o={include:n.include||'style,link[rel="stylesheet"]',exclude:n.exclude||null,filter:n.filter||null,onBeforeSend:n.onBeforeSend||Function.prototype,onSuccess:n.onSuccess||Function.prototype,onError:n.onError||Function.prototype,onComplete:n.onComplete||Function.prototype},s=Array.apply(null,document.querySelectorAll(o.include)).filter(function(e){return n=e,r=o.exclude,!(n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector).call(n,r);var n,r}),a=Array.apply(null,Array(s.length)).map(function(e){return null});function i(){if(-1===a.indexOf(null)){var e=a.join("");o.onComplete(e,a,s)}}function u(n,r,t,s){var u=o.onSuccess(n,t,s);(function n(r,t,s,a){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];var l=c(r,s,u);l.rules.length?e(l.absoluteUrls,{onBeforeSend:function(e,n,r){o.onBeforeSend(e,t,n)},onSuccess:function(e,n,r){var s=o.onSuccess(e,t,n),a=c(e=!1===s?"":s||e,n,u);return a.rules.forEach(function(n,r){e=e.replace(n,a.absoluteRules[r])}),e},onError:function(e,o,c){i.push({xhr:e,url:o}),u.push(l.rules[c]),n(r,t,s,a,i,u)},onComplete:function(e){e.forEach(function(e,n){r=r.replace(l.rules[n],e)}),n(r,t,s,a,i,u)}}):a(r,i)})(n=!1===u?"":u||n,t,s,function(e,n){null===a[r]&&(n.forEach(function(e){return o.onError(e.xhr,t,e.url)}),!o.filter||o.filter.test(e)?a[r]=e:a[r]="",i())})}function c(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s={};return s.rules=(e.replace(t.cssComments,"").match(t.cssImports)||[]).filter(function(e){return-1===o.indexOf(e)}),s.urls=s.rules.map(function(e){return e.replace(t.cssImports,"$1")}),s.absoluteUrls=s.urls.map(function(e){return r(e,n)}),s.absoluteRules=s.rules.map(function(e,t){var o=s.urls[t],a=r(s.absoluteUrls[t],n);return e.replace(o,a)}),s}s.length?s.forEach(function(n,t){var s=n.getAttribute("href"),c=n.getAttribute("rel"),l="LINK"===n.nodeName&&s&&c&&"stylesheet"===c.toLowerCase(),f="STYLE"===n.nodeName;l?e(s,{mimeType:"text/css",onBeforeSend:function(e,r,t){o.onBeforeSend(e,n,r)},onSuccess:function(e,o,a){var i=r(s,location.href);u(e,t,n,i)},onError:function(e,r,s){a[t]="",o.onError(e,n,r),i()}}):f?u(n.textContent,t,n,location.href):(a[t]="",i())}):o.onComplete("",[])}function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,r=document.implementation.createHTMLDocument(""),t=r.createElement("base"),o=r.createElement("a");return r.head.appendChild(t),r.body.appendChild(o),t.href=n,o.href=e,o.href}function t(){for(var e=function(e){return e instanceof Object&&e.constructor===Object},n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return r.reduce(function(n,r){return Object.keys(r).forEach(function(o){var s=n[o],a=r[o];e(s)&&e(a)?n[o]=t(s,a):n[o]=a}),n},{})}var o=s;function s(e,n,r){e instanceof RegExp&&(e=a(e,r)),n instanceof RegExp&&(n=a(n,r));var t=i(e,n,r);return t&&{start:t[0],end:t[1],pre:r.slice(0,t[0]),body:r.slice(t[0]+e.length,t[1]),post:r.slice(t[1]+n.length)}}function a(e,n){var r=n.match(e);return r?r[0]:null}function i(e,n,r){var t,o,s,a,i,u=r.indexOf(e),c=r.indexOf(n,u+1),l=u;if(u>=0&&c>0){for(t=[],s=r.length;l>=0&&!i;)l==u?(t.push(l),u=r.indexOf(e,l+1)):1==t.length?i=[t.pop(),c]:((o=t.pop())<s&&(s=o,a=c),c=r.indexOf(n,l+1)),l=u<c&&u>=0?u:c;t.length&&(i=[s,a])}return i}function u(e){function n(e){throw new Error("CSS parse error: "+e)}function r(n){var r=n.exec(e);if(r)return e=e.slice(r[0].length),r}function t(){r(/^\s*/)}function o(){return r(/^{\s*/)}function s(){return r(/^}/)}function a(){if(t(),"/"===e[0]&&"*"===e[1]){for(var r=2;e[r]&&("*"!==e[r]||"/"!==e[r+1]);)r++;if(!e[r])return n("end of comment is missing");var o=e.slice(2,r);return e=e.slice(r+2),{type:"comment",comment:o}}}function i(){for(var e=[],n=void 0;n=a();)e.push(n);return e}function u(){for(t();"}"===e[0];)n("extra closing bracket");var o=r(/^(("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^{])+)/);if(o)return o[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function c(){r(/^([;\s]*)+/);var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=r(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=t[0].trim(),!r(/^:\s*/))return n("property missing ':'");var o=r(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/),s={type:"declaration",property:t.replace(e,""),value:o?o[0].replace(e,"").trim():""};return r(/^[;\s]*/),s}}function l(){if(!o())return n("missing '{'");for(var e=void 0,r=i();e=c();)r.push(e),r=r.concat(i());return s()?r:n("missing '}'")}function f(){t();for(var e=[],n=void 0;n=r(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(n[1]),r(/^,\s*/);if(e.length)return{type:"keyframe",values:e,declarations:l()}}function p(){if(t(),"@"===e[0])return function(){var e=r(/^@([-\w]+)?keyframes\s*/);if(e){var t=e[1];if(!(e=r(/^([-\w]+)\s*/)))return n("@keyframes missing name");var a=e[1];if(!o())return n("@keyframes missing '{'");for(var u=void 0,c=i();u=f();)c.push(u),c=c.concat(i());return s()?{type:"keyframes",name:a,vendor:t,keyframes:c}:n("@keyframes missing '}'")}}()||function(){var e=r(/^@supports *([^{]+)/);if(e)return{type:"supports",supports:e[1].trim(),rules:d()}}()||function(){if(r(/^@host\s*/))return{type:"host",rules:d()}}()||function(){var e=r(/^@media *([^{]+)/);if(e)return{type:"media",media:e[1].trim(),rules:d()}}()||function(){var e=r(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return{type:"custom-media",name:e[1].trim(),media:e[2].trim()}}()||function(){if(r(/^@page */))return{type:"page",selectors:u()||[],declarations:l()}}()||function(){var e=r(/^@([-\w]+)?document *([^{]+)/);if(e)return{type:"document",document:e[2].trim(),vendor:e[1]?e[1].trim():null,rules:d()}}()||function(){if(r(/^@font-face\s*/))return{type:"font-face",declarations:l()}}()||function(){var e=r(/^@(import|charset|namespace)\s*([^;]+);/);if(e)return{type:e[1],name:e[2].trim()}}()}function d(r){if(!r&&!o())return n("missing '{'");for(var t,a=void 0,c=i();e.length&&(r||"}"!==e[0])&&(a=p()||(void 0,(t=u()||[]).length||n("selector missing"),{type:"rule",selectors:t,declarations:l()}));)c.push(a),c=c.concat(i());return r||s()?c:n("missing '}'")}return{type:"stylesheet",stylesheet:{rules:d(!0),errors:[]}}}s.range=i;var c={},l="--",f="var";function p(e){var n,r,s={},a=t({fixNestedCalc:!0,onlyVars:!0,persist:!1,preserve:!1,variables:{},onWarning:function(){}},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),i=a.persist?c:a.variables,p=u(e);if(a.onlyVars&&(p.stylesheet.rules=function e(n){return n.filter(function(n){if(n.declarations){var r=n.declarations.filter(function(e){var n=e.property&&0===e.property.indexOf(l),r=e.value&&e.value.indexOf(f+"(")>-1;return n||r});return"font-face"!==n.type&&(n.declarations=r),Boolean(r.length)}return n.keyframes?Boolean(n.keyframes.filter(function(e){return Boolean(e.declarations.filter(function(e){var n=e.property&&0===e.property.indexOf(l),r=e.value&&e.value.indexOf(f+"(")>-1;return n||r}).length)}).length):!n.rules||(n.rules=e(n.rules).filter(function(e){return e.declarations&&e.declarations.length}),Boolean(n.rules.length))})}(p.stylesheet.rules)),p.stylesheet.rules.forEach(function(e){var n=[];if("rule"===e.type&&1===e.selectors.length&&":root"===e.selectors[0]&&(e.declarations.forEach(function(e,r){var t=e.property,o=e.value;t&&0===t.indexOf(l)&&(s[t]=o,n.push(r))}),!a.preserve))for(var r=n.length-1;r>=0;r--)e.declarations.splice(n[r],1)}),Object.keys(a.variables).forEach(function(e){var n="--"+e.replace(/^-+/,""),r=a.variables[e];e!==n&&(a.variables[n]=r,delete a.variables[e]),a.persist&&(c[n]=r)}),Object.keys(i).length){var m={declarations:[],selectors:[":root"],type:"rule"};Object.keys(i).forEach(function(e){s[e]=i[e],m.declarations.push({type:"declaration",property:e,value:i[e]}),a.persist&&(c[e]=i[e])}),a.preserve&&p.stylesheet.rules.push(m)}return function e(n,r){n.rules.forEach(function(t){t.rules?e(t,r):t.keyframes?t.keyframes.forEach(function(e){"keyframe"===e.type&&r(e.declarations,t)}):t.declarations&&r(t.declarations,n)})}(p.stylesheet,function(e,n){for(var r=void 0,t=void 0,o=void 0,i=0;i<e.length;i++)o=(r=e[i]).value,"declaration"===r.type&&o&&-1!==o.indexOf(f+"(")&&"undefined"!==(t=d(o,s,a))&&(a.preserve?(e.splice(i,0,{type:r.type,property:r.property,value:t}),i++):r.value=t)}),a.fixNestedCalc&&(n=p.stylesheet.rules,r=/(-[a-z]+-)?calc\(/,n.forEach(function(e){e.declarations&&e.declarations.forEach(function(e){for(var n=e.value,t="";r.test(n);){var s=o("calc(",")",n||"");for(n=n.slice(s.end);r.test(s.body);){var a=o(r,")",s.body);s.body=a.pre+"("+a.body+")"+a.post}t+=s.pre+"calc("+s.body,t+=r.test(n)?"":")"+s.post}e.value=t||e.value})})),function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments[2],t={charset:function(e){return"@charset "+e.name+";"},comment:function(e){return 0===e.comment.indexOf("__CSSVARSPONYFILL")?"/*"+e.comment+"*/":""},"custom-media":function(e){return"@custom-media "+e.name+" "+e.media+";"},declaration:function(e){return e.property+":"+e.value+";"},document:function(e){return"@"+(e.vendor||"")+"document "+e.document+"{"+o(e.rules)+"}"},"font-face":function(e){return"@font-face{"+o(e.declarations)+"}"},host:function(e){return"@host{"+o(e.rules)+"}"},import:function(e){return"@import "+e.name+";"},keyframe:function(e){return e.values.join(",")+"{"+o(e.declarations)+"}"},keyframes:function(e){return"@"+(e.vendor||"")+"keyframes "+e.name+"{"+o(e.keyframes)+"}"},media:function(e){return"@media "+e.media+"{"+o(e.rules)+"}"},namespace:function(e){return"@namespace "+e.name+";"},page:function(e){return"@page "+(e.selectors.length?e.selectors.join(", "):"")+"{"+o(e.declarations)+"}"},rule:function(e){var n=e.declarations;if(n.length)return e.selectors.join(",")+"{"+o(n)+"}"},supports:function(e){return"@supports "+e.supports+"{"+o(e.rules)+"}"}};function o(e){for(var o="",s=0;s<e.length;s++){var a=e[s];r&&r(a);var i=t[a.type](a);i&&(o+=i,i.length&&a.selectors&&(o+=n))}return o}return o(e.stylesheet.rules)}(p)}function d(e,n,r){var t=o("(",")",e),s=e.indexOf("var("),a=o("(",")",e.substring(s)).body,i="CSS transform warning:";t||r.onWarning(i+' missing closing ")" in the value "'+e+'"'),""===a&&r.onWarning(i+" var() must contain a non-whitespace string");var u=f+"("+a+")",c=a.replace(/([\w-]+)(?:\s*,\s*)?(.*)?/,function(e,t,o){var s=n[t];return s||o||r.onWarning(i+' variable "'+t+'" is undefined'),!s&&o?o:s});return-1!==(e=e.split(u).join(c)).indexOf(f+"(")&&(e=d(e,n,r)),e}var m="css-vars-ponyfill",v={include:"style,link[rel=stylesheet]",exclude:"",fixNestedCalc:!0,onlyLegacy:!0,onlyVars:!1,preserve:!1,silent:!1,updateDOM:!0,updateURLs:!0,variables:{},onBeforeSend:function(){},onSuccess:function(){},onWarning:function(){},onError:function(){},onComplete:function(){}},y={cssComments:/\/\*[\s\S]+?\*\//g,cssUrls:/url\((?!['"]?(?:data|http|\/\/):)['"]?([^'")]*)['"]?\)/g,cssVars:/(?:(?::root\s*{\s*[^;]*;*\s*)|(?:var\(\s*))(--[^:)]+)(?:\s*[:)])/};function h(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,r=document.implementation.createHTMLDocument(""),t=r.createElement("base"),o=r.createElement("a");return r.head.appendChild(t),r.body.appendChild(o),t.href=n,o.href=e,o.href}return function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t(v,r);function s(e,n,r,t){o.silent||console.error(e+"\n",n),o.onError(e,n,r,t)}function a(e){o.silent||console.warn(e),o.onWarning(e)}if("loading"!==document.readyState){var i=window.CSS&&window.CSS.supports&&window.CSS.supports("(--a: 0)");if(i&&o.onlyLegacy)i&&o.updateDOM&&Object.keys(o.variables).forEach(function(e){var n="--"+e.replace(/^-+/,""),r=o.variables[e];document.documentElement.style.setProperty(n,r)});else{var u=m;n({include:o.include,exclude:"#"+u+(o.exclude?","+o.exclude:""),filter:o.onlyVars?y.cssVars:null,onBeforeSend:o.onBeforeSend,onSuccess:function(e,n,r){var t=o.onSuccess(e,n,r);return e=!1===t?"":t||e,o.updateURLs&&(e.replace(y.cssComments,"").match(y.cssUrls)||[]).forEach(function(n){var t=n.replace(y.cssUrls,"$1"),o=h(t,r);e=e.replace(n,n.replace(t,o))}),e},onError:function(e,n,r){var t=e.responseURL||h(r,location.href),o=e.statusText?"("+e.statusText+")":"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");s("CSS XHR Error: "+t+" "+e.status+" "+o,n,e,t)},onComplete:function(e,n,r){var t=/\/\*__CSSVARSPONYFILL-(\d+)__\*\//g,i=null;e=n.map(function(e,n){return y.cssVars.test(e)?e:"/*__CSSVARSPONYFILL-"+n+"__*/"}).join("");try{e=p(e,{fixNestedCalc:o.fixNestedCalc,onlyVars:o.onlyVars,persist:o.updateDOM,preserve:o.preserve,variables:o.variables,onWarning:a});for(var c=t.exec(e);null!==c;){var l=c[0],f=c[1];e=e.replace(l,n[f]),c=t.exec(e)}if(o.updateDOM&&r&&r.length){var d=r[r.length-1];(i=document.querySelector("#"+u)||document.createElement("style")).setAttribute("id",u),i.textContent!==e&&(i.textContent=e),d.nextSibling!==i&&d.parentNode.insertBefore(i,d.nextSibling)}}catch(e){var m=!1;n.forEach(function(e,n){try{e=p(e,o)}catch(e){var t=r[n-0];m=!0,s(e.message,t)}}),m||s(e.message||e)}o.onComplete(e,i)}})}}else document.addEventListener("DOMContentLoaded",function n(t){e(r),document.removeEventListener("DOMContentLoaded",n)})}}); +//# sourceMappingURL=css-vars-ponyfill.min.js.map diff --git a/core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js.map b/core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js.map new file mode 100644 index 00000000000..a14eaaf0ab7 --- /dev/null +++ b/core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"css-vars-ponyfill.min.js","sources":["../node_modules/get-css-data/dist/get-css-data.esm.js","../src/merge-deep.js","../node_modules/balanced-match/index.js","../src/parse-css.js","../src/transform-css.js","../src/walk-css.js","../src/stringify-css.js","../src/index.js"],"sourcesContent":["/*!\n * get-css-data\n * v1.3.2\n * https://github.com/jhildenbiddle/get-css-data\n * (c) 2018 John Hildenbiddle <http://hildenbiddle.com>\n * MIT license\n */\nfunction getUrls(urls) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var settings = {\n mimeType: options.mimeType || null,\n onBeforeSend: options.onBeforeSend || Function.prototype,\n onSuccess: options.onSuccess || Function.prototype,\n onError: options.onError || Function.prototype,\n onComplete: options.onComplete || Function.prototype\n };\n var urlArray = Array.isArray(urls) ? urls : [ urls ];\n var urlQueue = Array.apply(null, Array(urlArray.length)).map(function(x) {\n return null;\n });\n function onError(xhr, urlIndex) {\n settings.onError(xhr, urlArray[urlIndex], urlIndex);\n }\n function onSuccess(responseText, urlIndex) {\n var returnVal = settings.onSuccess(responseText, urlArray[urlIndex], urlIndex);\n responseText = returnVal === false ? \"\" : returnVal || responseText;\n urlQueue[urlIndex] = responseText;\n if (urlQueue.indexOf(null) === -1) {\n settings.onComplete(urlQueue);\n }\n }\n urlArray.forEach(function(url, i) {\n var parser = document.createElement(\"a\");\n parser.setAttribute(\"href\", url);\n parser.href = parser.href;\n var isCrossDomain = parser.host !== location.host;\n var isSameProtocol = parser.protocol === location.protocol;\n if (isCrossDomain && typeof XDomainRequest !== \"undefined\") {\n if (isSameProtocol) {\n var xdr = new XDomainRequest();\n xdr.open(\"GET\", url);\n xdr.timeout = 0;\n xdr.onprogress = Function.prototype;\n xdr.ontimeout = Function.prototype;\n xdr.onload = function() {\n onSuccess(xdr.responseText, i);\n };\n xdr.onerror = function(err) {\n onError(xdr, i);\n };\n setTimeout(function() {\n xdr.send();\n }, 0);\n } else {\n console.log(\"Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol\");\n onError(null, i);\n }\n } else {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n if (settings.mimeType && xhr.overrideMimeType) {\n xhr.overrideMimeType(settings.mimeType);\n }\n settings.onBeforeSend(xhr, url, i);\n xhr.onreadystatechange = function() {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n onSuccess(xhr.responseText, i);\n } else {\n onError(xhr, i);\n }\n }\n };\n xhr.send();\n }\n });\n}\n\n/**\n * Gets CSS data from <style> and <link> nodes (including @imports), then\n * returns data in order processed by DOM. Allows specifying nodes to\n * include/exclude and filtering CSS data using RegEx.\n *\n * @preserve\n * @param {object} [options] The options object\n * @param {string} [options.include] CSS selector matching <link> and <style>\n * nodes to include\n * @param {string} [options.exclude] CSS selector matching <link> and <style>\n * nodes to exclude\n * @param {object} [options.filter] Regular expression used to filter node CSS\n * data. Each block of CSS data is tested against the filter,\n * and only matching data is included.\n * @param {function} [options.onBeforeSend] Callback before XHR is sent. Passes\n * 1) the XHR object, 2) source node reference, and 3) the\n * source URL as arguments.\n * @param {function} [options.onSuccess] Callback on each CSS node read. Passes\n * 1) CSS text, 2) source node reference, and 3) the source\n * URL as arguments.\n * @param {function} [options.onError] Callback on each error. Passes 1) the XHR\n * object for inspection, 2) soure node reference, and 3) the\n * source URL that failed (either a <link> href or an @import)\n * as arguments\n * @param {function} [options.onComplete] Callback after all nodes have been\n * processed. Passes 1) concatenated CSS text, 2) an array of\n * CSS text in DOM order, and 3) an array of nodes in DOM\n * order as arguments.\n *\n * @example\n *\n * getCssData({\n * include: 'style,link[rel=\"stylesheet\"]', // default\n * exclude: '[href=\"skip.css\"]',\n * filter : /red/,\n * onBeforeSend(xhr, node, url) {\n * // ...\n * }\n * onSuccess(cssText, node, url) {\n * // ...\n * }\n * onError(xhr, node, url) {\n * // ...\n * },\n * onComplete(cssText, cssArray) {\n * // ...\n * },\n * });\n */ function getCssData(options) {\n var regex = {\n cssComments: /\\/\\*[\\s\\S]+?\\*\\//g,\n cssImports: /(?:@import\\s*)(?:url\\(\\s*)?(?:['\"])([^'\"]*)(?:['\"])(?:\\s*\\))?(?:[^;]*;)/g\n };\n var settings = {\n include: options.include || 'style,link[rel=\"stylesheet\"]',\n exclude: options.exclude || null,\n filter: options.filter || null,\n onBeforeSend: options.onBeforeSend || Function.prototype,\n onSuccess: options.onSuccess || Function.prototype,\n onError: options.onError || Function.prototype,\n onComplete: options.onComplete || Function.prototype\n };\n var sourceNodes = Array.apply(null, document.querySelectorAll(settings.include)).filter(function(node) {\n return !matchesSelector(node, settings.exclude);\n });\n var cssArray = Array.apply(null, Array(sourceNodes.length)).map(function(x) {\n return null;\n });\n function handleComplete() {\n var isComplete = cssArray.indexOf(null) === -1;\n if (isComplete) {\n var cssText = cssArray.join(\"\");\n settings.onComplete(cssText, cssArray, sourceNodes);\n }\n }\n function handleSuccess(cssText, cssIndex, node, sourceUrl) {\n var returnVal = settings.onSuccess(cssText, node, sourceUrl);\n cssText = returnVal === false ? \"\" : returnVal || cssText;\n resolveImports(cssText, node, sourceUrl, function(resolvedCssText, errorData) {\n if (cssArray[cssIndex] === null) {\n errorData.forEach(function(data) {\n return settings.onError(data.xhr, node, data.url);\n });\n if (!settings.filter || settings.filter.test(resolvedCssText)) {\n cssArray[cssIndex] = resolvedCssText;\n } else {\n cssArray[cssIndex] = \"\";\n }\n handleComplete();\n }\n });\n }\n function parseImportData(cssText, baseUrl) {\n var ignoreRules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var importData = {};\n importData.rules = (cssText.replace(regex.cssComments, \"\").match(regex.cssImports) || []).filter(function(rule) {\n return ignoreRules.indexOf(rule) === -1;\n });\n importData.urls = importData.rules.map(function(rule) {\n return rule.replace(regex.cssImports, \"$1\");\n });\n importData.absoluteUrls = importData.urls.map(function(url) {\n return getFullUrl(url, baseUrl);\n });\n importData.absoluteRules = importData.rules.map(function(rule, i) {\n var oldUrl = importData.urls[i];\n var newUrl = getFullUrl(importData.absoluteUrls[i], baseUrl);\n return rule.replace(oldUrl, newUrl);\n });\n return importData;\n }\n function resolveImports(cssText, node, baseUrl, callbackFn) {\n var __errorData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];\n var __errorRules = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n var importData = parseImportData(cssText, baseUrl, __errorRules);\n if (importData.rules.length) {\n getUrls(importData.absoluteUrls, {\n onBeforeSend: function onBeforeSend(xhr, url, urlIndex) {\n settings.onBeforeSend(xhr, node, url);\n },\n onSuccess: function onSuccess(cssText, url, urlIndex) {\n var returnVal = settings.onSuccess(cssText, node, url);\n cssText = returnVal === false ? \"\" : returnVal || cssText;\n var responseImportData = parseImportData(cssText, url, __errorRules);\n responseImportData.rules.forEach(function(rule, i) {\n cssText = cssText.replace(rule, responseImportData.absoluteRules[i]);\n });\n return cssText;\n },\n onError: function onError(xhr, url, urlIndex) {\n __errorData.push({\n xhr: xhr,\n url: url\n });\n __errorRules.push(importData.rules[urlIndex]);\n resolveImports(cssText, node, baseUrl, callbackFn, __errorData, __errorRules);\n },\n onComplete: function onComplete(responseArray) {\n responseArray.forEach(function(importText, i) {\n cssText = cssText.replace(importData.rules[i], importText);\n });\n resolveImports(cssText, node, baseUrl, callbackFn, __errorData, __errorRules);\n }\n });\n } else {\n callbackFn(cssText, __errorData);\n }\n }\n if (sourceNodes.length) {\n sourceNodes.forEach(function(node, i) {\n var linkHref = node.getAttribute(\"href\");\n var linkRel = node.getAttribute(\"rel\");\n var isLink = node.nodeName === \"LINK\" && linkHref && linkRel && linkRel.toLowerCase() === \"stylesheet\";\n var isStyle = node.nodeName === \"STYLE\";\n if (isLink) {\n getUrls(linkHref, {\n mimeType: \"text/css\",\n onBeforeSend: function onBeforeSend(xhr, url, urlIndex) {\n settings.onBeforeSend(xhr, node, url);\n },\n onSuccess: function onSuccess(cssText, url, urlIndex) {\n var sourceUrl = getFullUrl(linkHref, location.href);\n handleSuccess(cssText, i, node, sourceUrl);\n },\n onError: function onError(xhr, url, urlIndex) {\n cssArray[i] = \"\";\n settings.onError(xhr, node, url);\n handleComplete();\n }\n });\n } else if (isStyle) {\n handleSuccess(node.textContent, i, node, location.href);\n } else {\n cssArray[i] = \"\";\n handleComplete();\n }\n });\n } else {\n settings.onComplete(\"\", []);\n }\n}\n\nfunction getFullUrl(url) {\n var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : location.href;\n var d = document.implementation.createHTMLDocument(\"\");\n var b = d.createElement(\"base\");\n var a = d.createElement(\"a\");\n d.head.appendChild(b);\n d.body.appendChild(a);\n b.href = base;\n a.href = url;\n return a.href;\n}\n\nfunction matchesSelector(elm, selector) {\n var matches = elm.matches || elm.matchesSelector || elm.webkitMatchesSelector || elm.mozMatchesSelector || elm.msMatchesSelector || elm.oMatchesSelector;\n return matches.call(elm, selector);\n}\n\nexport default getCssData;\n//# sourceMappingURL=get-css-data.esm.js.map\n","// Functions\n// =============================================================================\n/**\n * Performs a deep merge of objects and returns new object. Does not modify\n * objects (immutable) and merges arrays via concatenation.\n *\n * @param {...object} objects - Objects to merge\n * @returns {object} New object with merged key/values\n */\nfunction mergeDeep(...objects) {\n const isObject = obj => obj instanceof Object && obj.constructor === Object;\n\n return objects.reduce((prev, obj) => {\n Object.keys(obj).forEach(key => {\n const pVal = prev[key];\n const oVal = obj[key];\n\n // if (Array.isArray(pVal) && Array.isArray(oVal)) {\n // prev[key] = pVal.concat(...oVal);\n // }\n if (isObject(pVal) && isObject(oVal)) {\n prev[key] = mergeDeep(pVal, oVal);\n }\n else {\n prev[key] = oVal;\n }\n });\n\n return prev;\n }, {});\n}\n\n\n// Export\n// =============================================================================\nexport default mergeDeep;\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","/**\n * Based on css parser/compiler by NxChg\n * https://github.com/NxtChg/pieces/tree/master/js/css_parser\n */\n\n\n// Functions\n// =============================================================================\n/**\n * Parses CSS string and generates AST object\n *\n * @param {string} css The CSS stringt to be converted to an AST\n * @returns {object}\n */\nfunction cssParse(css) {\n const errors = [];\n\n // Errors\n // -------------------------------------------------------------------------\n function error(msg) {\n throw new Error(`CSS parse error: ${msg}`);\n }\n\n // RegEx\n // -------------------------------------------------------------------------\n // Match regexp and return captures\n function match(re) {\n const m = re.exec(css);\n\n if (m) {\n css = css.slice(m[0].length);\n\n return m;\n }\n }\n\n function whitespace() {\n match(/^\\s*/);\n }\n function open() {\n return match(/^{\\s*/);\n }\n function close() {\n return match(/^}/);\n }\n\n // Comments\n // -------------------------------------------------------------------------\n function comment() {\n whitespace();\n\n if (css[0] !== '/' || css[1] !== '*') { return; }\n\n let i = 2;\n while (css[i] && (css[i] !== '*' || css[i + 1] !== '/')) { i++; }\n\n // FIXED\n if (!css[i]) { return error('end of comment is missing'); }\n\n const str = css.slice(2, i);\n css = css.slice(i + 2);\n\n return { type: 'comment', comment: str };\n }\n function comments() {\n const cmnts = [];\n\n let c;\n\n while ((c = comment())) {\n cmnts.push(c);\n }\n return cmnts;\n }\n\n // Selector\n // -------------------------------------------------------------------------\n function selector() {\n whitespace();\n while (css[0] === '}') {\n error('extra closing bracket');\n }\n\n const m = match(/^((\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'|[^{])+)/);\n\n if (m)\n { return m[0]\n .trim() // remove all comments from selectors\n .replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, '')\n .replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function(m) {\n return m.replace(/,/g, '\\u200C');\n })\n .split(/\\s*(?![^(]*\\)),\\s*/)\n .map(function(s) {\n return s.replace(/\\u200C/g, ',');\n }); }\n }\n\n // Declarations\n // -------------------------------------------------------------------------\n function declaration() {\n match(/^([;\\s]*)+/); // ignore empty declarations + whitespace\n\n const comment_regexp = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\n let prop = match(/^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n if (!prop) { return; }\n\n prop = prop[0].trim();\n\n if (!match(/^:\\s*/)) { return error('property missing \\':\\''); }\n\n // Quotes regex repeats verbatim inside and outside parentheses\n const val = match(/^((?:\\/\\*.*?\\*\\/|'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\((\\s*'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|[^)]*?)\\s*\\)|[^};])+)/);\n\n const ret = { type: 'declaration', property: prop.replace(comment_regexp, ''), value: val ? val[0].replace(comment_regexp, '').trim() : '' };\n\n match(/^[;\\s]*/);\n\n return ret;\n }\n function declarations() {\n if (!open()) { return error('missing \\'{\\''); }\n\n let d,\n decls = comments();\n\n while ((d = declaration())) {\n decls.push(d);\n decls = decls.concat(comments());\n }\n\n if (!close()) { return error('missing \\'}\\''); }\n\n return decls;\n }\n\n // Keyframes\n // -------------------------------------------------------------------------\n function keyframe() {\n whitespace();\n\n const vals = [];\n\n let m;\n\n while ((m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/))) {\n vals.push(m[1]);\n match(/^,\\s*/);\n }\n\n if (vals.length) { return { type: 'keyframe', values: vals, declarations: declarations() }; }\n }\n function at_keyframes() {\n let m = match(/^@([-\\w]+)?keyframes\\s*/);\n\n if (!m) { return; }\n\n const vendor = m[1];\n\n m = match(/^([-\\w]+)\\s*/);\n if (!m) { return error('@keyframes missing name'); } // identifier\n\n const name = m[1];\n\n if (!open()) { return error('@keyframes missing \\'{\\''); }\n\n let frame,\n frames = comments();\n while ((frame = keyframe())) {\n frames.push(frame);\n frames = frames.concat(comments());\n }\n\n if (!close()) { return error('@keyframes missing \\'}\\''); }\n\n return { type: 'keyframes', name: name, vendor: vendor, keyframes: frames };\n }\n\n // @ Rules\n // -------------------------------------------------------------------------\n function at_page() {\n const m = match(/^@page */);\n if (m) {\n const sel = selector() || [];\n return { type: 'page', selectors: sel, declarations: declarations() };\n }\n }\n function at_fontface() {\n const m = match(/^@font-face\\s*/);\n if (m) { return { type: 'font-face', declarations: declarations() }; }\n }\n function at_supports() {\n const m = match(/^@supports *([^{]+)/);\n if (m) { return { type: 'supports', supports: m[1].trim(), rules: rules() }; }\n }\n function at_host() {\n const m = match(/^@host\\s*/);\n if (m) { return { type: 'host', rules: rules() }; }\n }\n function at_media() {\n const m = match(/^@media *([^{]+)/);\n if (m) { return { type: 'media', media: m[1].trim(), rules: rules() }; }\n }\n function at_custom_m() {\n const m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n if (m) { return { type: 'custom-media', name: m[1].trim(), media: m[2].trim() }; }\n }\n function at_document() {\n const m = match(/^@([-\\w]+)?document *([^{]+)/);\n // FIXED\n if (m) { return { type: 'document', document: m[2].trim(), vendor: m[1] ? m[1].trim() : null, rules: rules() }; }\n }\n function at_x() {\n const m = match(/^@(import|charset|namespace)\\s*([^;]+);/);\n if (m) { return { type: m[1], name: m[2].trim() }; }\n }\n function at_rule() {\n whitespace();\n if (css[0] === '@') { return at_keyframes() || at_supports() || at_host() || at_media() || at_custom_m() || at_page() || at_document() || at_fontface() || at_x(); }\n }\n\n // Rules\n // -------------------------------------------------------------------------\n function rule() {\n const sel = selector() || [];\n if (!sel.length) { error('selector missing'); }\n\n const decls = declarations();\n\n return { type: 'rule', selectors: sel, declarations: decls };\n }\n function rules(core) {\n if (!core && !open()) { return error('missing \\'{\\''); }\n\n let node,\n rules = comments();\n\n while (css.length && (core || css[0] !== '}') && (node = at_rule() || rule())) {\n rules.push(node);\n rules = rules.concat(comments());\n }\n\n if (!core && !close()) { return error('missing \\'}\\''); }\n\n return rules;\n }\n\n return { type: 'stylesheet', stylesheet: { rules: rules(true), errors: errors } };\n}\n\n\n// Exports\n// =============================================================================\nexport default cssParse;\n","/**\n * Based on rework-vars by reworkcss\n * https://github.com/reworkcss/rework-vars\n */\n\n\n// Dependencies\n// =============================================================================\nimport balanced from 'balanced-match';\nimport mergeDeep from './merge-deep';\nimport parseCss from './parse-css';\nimport stringifyCss from './stringify-css';\nimport walkCss from './walk-css';\n\n\n// Constants & Variables\n// =============================================================================\nconst persistStore = {};\nconst VAR_PROP_IDENTIFIER = '--';\nconst VAR_FUNC_IDENTIFIER = 'var';\n\n\n// Functions\n// =============================================================================\n/**\n * Transforms W3C-style CSS variables to static values and returns an updated\n * CSS string.\n *\n * @param {object} cssText CSS containing variable definitions and functions\n * @param {object} [options] Options object\n * @param {boolean} [options.fixNestedCalc=true] Removes nested 'calc' keywords\n * for legacy browser compatibility.\n * @param {boolean} [options.onlyVars=true] Remove declarations that do not\n * contain a CSS variable from the return value. Note that\n * @font-face and @keyframe rules require all declarations to\n * be returned if a CSS variable is used.\n * @param {boolean} [options.persist=false] Persists options.variables,\n * allowing variables set in previous calls to be applied in\n * subsequent calls.\n * @param {boolean} [options.preserve=false] Preserve CSS variable definitions\n * and functions in the return value, allowing \"live\" variable\n * updates via JavaScript to continue working in browsers with\n * native CSS variable support.\n * @param {object} [options.variables={}] CSS variable definitions to include\n * during transformation. Can be used to add new override\n * exisitng definitions.\n * @param {function} [options.onWarning] Callback on each transformation\n * warning. Passes 1) warningMessage as an argument.\n * @returns {string}\n */\nfunction transformVars(cssText, options = {}) {\n const defaults = {\n fixNestedCalc: true,\n onlyVars : true,\n persist : false,\n preserve : false,\n variables : {},\n onWarning() {}\n };\n const map = {};\n const settings = mergeDeep(defaults, options);\n const varSource = settings.persist ? persistStore : settings.variables;\n\n // Convert cssText to AST (this could throw errors)\n const cssTree = parseCss(cssText);\n\n // Remove non-vars\n if (settings.onlyVars) {\n cssTree.stylesheet.rules = filterVars(cssTree.stylesheet.rules);\n }\n\n // Define variables\n cssTree.stylesheet.rules.forEach(function(rule) {\n const varNameIndices = [];\n\n if (rule.type !== 'rule') {\n return;\n }\n\n // only variables declared for `:root` are supported\n if (rule.selectors.length !== 1 || rule.selectors[0] !== ':root') {\n return;\n }\n\n rule.declarations.forEach(function(decl, i) {\n const prop = decl.property;\n const value = decl.value;\n\n if (prop && prop.indexOf(VAR_PROP_IDENTIFIER) === 0) {\n map[prop] = value;\n varNameIndices.push(i);\n }\n });\n\n // optionally remove `--*` properties from the rule\n if (!settings.preserve) {\n for (let i = varNameIndices.length - 1; i >= 0; i--) {\n rule.declarations.splice(varNameIndices[i], 1);\n }\n }\n });\n\n // Handle variables defined in settings.variables\n Object.keys(settings.variables).forEach(key => {\n // Convert all property names to leading '--' style\n const prop = `--${key.replace(/^-+/, '')}`;\n const value = settings.variables[key];\n\n // Update settings.variables\n if (key !== prop) {\n settings.variables[prop] = value;\n delete settings.variables[key];\n }\n\n // Store variables so they can be reapplied on subsequent call. For\n // example, if '--myvar' is set on the first call it should continue to\n // be set on each call thereafter (otherwise each call removes the\n // previously set variables).\n if (settings.persist) {\n persistStore[prop] = value;\n }\n });\n\n if (Object.keys(varSource).length) {\n const newRule = {\n declarations: [],\n selectors : [':root'],\n type : 'rule'\n };\n\n Object.keys(varSource).forEach(function(key) {\n // Update internal map value with varSource value\n map[key] = varSource[key];\n\n // Add new declaration to newRule\n newRule.declarations.push({\n type : 'declaration',\n property: key,\n value : varSource[key]\n });\n\n // Add to persistent storage\n if (settings.persist) {\n persistStore[key] = varSource[key];\n }\n });\n\n // Append new :root ruleset\n if (settings.preserve) {\n cssTree.stylesheet.rules.push(newRule);\n }\n }\n\n // Resolve variables\n walkCss(cssTree.stylesheet, function(declarations, node) {\n let decl;\n let resolvedValue;\n let value;\n\n for (let i = 0; i < declarations.length; i++) {\n decl = declarations[i];\n value = decl.value;\n\n // skip comments\n if (decl.type !== 'declaration') {\n continue;\n }\n\n // skip values that don't contain variable functions\n if (!value || value.indexOf(VAR_FUNC_IDENTIFIER + '(') === -1) {\n continue;\n }\n\n resolvedValue = resolveValue(value, map, settings);\n\n if (resolvedValue !== 'undefined') {\n if (!settings.preserve) {\n decl.value = resolvedValue;\n }\n else {\n declarations.splice(i, 0, {\n type : decl.type,\n property: decl.property,\n value : resolvedValue\n });\n\n // skip ahead of preserved declaration\n i++;\n }\n }\n }\n });\n\n // Fix nested calc() values\n if (settings.fixNestedCalc) {\n fixNestedCalc(cssTree.stylesheet.rules);\n }\n\n // Return CSS string\n return stringifyCss(cssTree);\n}\n\n\n// Functions (Private)\n// =============================================================================\n/**\n * Filters rules recursively, retaining only declarations that contain either a\n * CSS variable definition (property) or function (value). Maintains all\n * declarations for @font-face and @keyframes rules that contain a CSS\n * definition or function.\n *\n * @param {array} rules\n * @returns {array}\n */\nfunction filterVars(rules) {\n return rules.filter(rule => {\n // Rule, @font-face, @host, @page\n if (rule.declarations) {\n const declArray = rule.declarations.filter(d => {\n const hasVarProp = d.property && d.property.indexOf(VAR_PROP_IDENTIFIER) === 0;\n const hasVarVal = d.value && d.value.indexOf(VAR_FUNC_IDENTIFIER + '(') > -1;\n\n return hasVarProp || hasVarVal;\n });\n\n // For most rule types the filtered declarations should be applied.\n // @font-face declaratons are unique and require all declarations to\n // be retained if any declaration contains a CSS variable definition\n // or value.\n if (rule.type !== 'font-face') {\n rule.declarations = declArray;\n }\n\n return Boolean(declArray.length);\n }\n // @keyframes\n else if (rule.keyframes) {\n // @keyframe rules require all declarations to be retained if any\n // declaration contains a CSS variable definition or value.\n return Boolean(rule.keyframes.filter(k =>\n Boolean(k.declarations.filter(d => {\n const hasVarProp = d.property && d.property.indexOf(VAR_PROP_IDENTIFIER) === 0;\n const hasVarVal = d.value && d.value.indexOf(VAR_FUNC_IDENTIFIER + '(') > -1;\n\n return hasVarProp || hasVarVal;\n }).length)\n ).length);\n }\n // @document, @media, @supports\n else if (rule.rules) {\n rule.rules = filterVars(rule.rules).filter(r => r.declarations && r.declarations.length);\n\n return Boolean(rule.rules.length);\n }\n\n return true;\n });\n}\n\n/**\n * Removes nested calc keywords for legacy browser compatibility.\n * Example: calc(1 + calc(2 + calc(3 + 3))) => calc(1 + (2 + (3 + 3)))\n *\n * @param {array} rules\n */\nfunction fixNestedCalc(rules) {\n const reCalcExp = /(-[a-z]+-)?calc\\(/; // Match \"calc(\" or \"-vendor-calc(\"\n\n rules.forEach(rule => {\n if (rule.declarations) {\n rule.declarations.forEach(decl => {\n let oldValue = decl.value;\n let newValue = '';\n\n while (reCalcExp.test(oldValue)) {\n const rootCalc = balanced('calc(', ')', oldValue || '');\n\n oldValue = oldValue.slice(rootCalc.end);\n\n while (reCalcExp.test(rootCalc.body)) {\n const nestedCalc = balanced(reCalcExp, ')', rootCalc.body);\n\n rootCalc.body = `${nestedCalc.pre}(${nestedCalc.body})${nestedCalc.post}`;\n }\n\n newValue += `${rootCalc.pre}calc(${rootCalc.body}`;\n newValue += !reCalcExp.test(oldValue) ? `)${rootCalc.post}` : '';\n }\n\n decl.value = newValue || decl.value;\n });\n }\n });\n}\n\n/**\n * Resolve CSS variables in a value\n *\n * The second argument to a CSS variable function, if provided, is a fallback\n * value, which is used as the substitution value when the referenced variable\n * is invalid.\n *\n * var(name[, fallback])\n *\n * @param {string} value A property value containing a CSS variable function\n * @param {object} map A map of variable names and values\n * @param {object} settings Settings object passed from transformVars()\n * @return {string} A new value with CSS variables substituted or using fallback\n */\nfunction resolveValue(value, map, settings) {\n // matches `name[, fallback]`, captures 'name' and 'fallback'\n const RE_VAR = /([\\w-]+)(?:\\s*,\\s*)?(.*)?/;\n const balancedParens = balanced('(', ')', value);\n const varStartIndex = value.indexOf('var(');\n const varRef = balanced('(', ')', value.substring(varStartIndex)).body;\n const warningIntro = 'CSS transform warning:';\n\n /* istanbul ignore next */\n if (!balancedParens) {\n settings.onWarning(`${warningIntro} missing closing \")\" in the value \"${value}\"`);\n }\n\n /* istanbul ignore next */\n if (varRef === '') {\n settings.onWarning(`${warningIntro} var() must contain a non-whitespace string`);\n }\n\n const varFunc = VAR_FUNC_IDENTIFIER + '(' + varRef + ')';\n\n const varResult = varRef.replace(RE_VAR, function(_, name, fallback) {\n const replacement = map[name];\n\n if (!replacement && !fallback) {\n settings.onWarning(`${warningIntro} variable \"${name}\" is undefined`);\n }\n\n if (!replacement && fallback) {\n return fallback;\n }\n\n return replacement;\n });\n\n // resolve the variable\n value = value.split(varFunc).join(varResult);\n\n // recursively resolve any remaining variables in the value\n if (value.indexOf(VAR_FUNC_IDENTIFIER + '(') !== -1) {\n value = resolveValue(value, map, settings);\n }\n\n return value;\n}\n\n\n// Exports\n// =============================================================================\nexport default transformVars;\n","/**\n * Based on rework-visit by reworkcss\n * https://github.com/reworkcss/rework-visit\n */\n\n\n// Functions\n// =============================================================================\n/**\n * Visit `node` declarations recursively and invoke `fn(declarations, node)`.\n *\n * @param {object} node\n * @param {function} fn\n */\nfunction walkCss(node, fn){\n node.rules.forEach(function(rule){\n // @media etc\n if (rule.rules) {\n walkCss(rule, fn);\n\n return;\n }\n\n // keyframes\n if (rule.keyframes) {\n rule.keyframes.forEach(function(keyframe){\n if (keyframe.type === 'keyframe') {\n fn(keyframe.declarations, rule);\n }\n });\n\n return;\n }\n\n // @charset, @import etc\n if (!rule.declarations) {\n return;\n }\n\n fn(rule.declarations, node);\n });\n}\n\n\n// Exports\n// =============================================================================\nexport default walkCss;\n","/**\n * Based on css parser/compiler by NxChg\n * https://github.com/NxtChg/pieces/tree/master/js/css_parser\n */\n\n\n// Functions\n// =============================================================================\n/**\n * Compiles CSS AST to string\n *\n * @param {object} tree CSS AST object\n * @param {string} [delim=''] CSS rule delimiter\n * @param {function} cb Function to be called before each node is processed\n * @returns {string}\n */\nfunction stringifyCss(tree, delim = '', cb) {\n const renderMethods = {\n charset(node) {\n return '@charset ' + node.name + ';';\n },\n comment(node) {\n // Preserve ponyfill marker comments\n return node.comment.indexOf('__CSSVARSPONYFILL') === 0 ? '/*' + node.comment + '*/' : '';\n },\n 'custom-media'(node) {\n return '@custom-media ' + node.name + ' ' + node.media + ';';\n },\n declaration(node) {\n return node.property + ':' + node.value + ';';\n },\n document(node) {\n return '@' + (node.vendor || '') + 'document ' + node.document + '{' + visit(node.rules) + '}';\n },\n 'font-face'(node) {\n return '@font-face' + '{' + visit(node.declarations) + '}';\n },\n host(node) {\n return '@host' + '{' + visit(node.rules) + '}';\n },\n import(node) {\n // FIXED\n return '@import ' + node.name + ';';\n },\n keyframe(node) {\n return node.values.join(',') + '{' + visit(node.declarations) + '}';\n },\n keyframes(node) {\n return '@' + (node.vendor || '') + 'keyframes ' + node.name + '{' + visit(node.keyframes) + '}';\n },\n media(node) {\n return '@media ' + node.media + '{' + visit(node.rules) + '}';\n },\n namespace(node) {\n return '@namespace ' + node.name + ';';\n },\n page(node) {\n return '@page ' + (node.selectors.length ? node.selectors.join(', ') : '') + '{' + visit(node.declarations) + '}';\n },\n rule(node) {\n const decls = node.declarations;\n\n if (decls.length) {\n return node.selectors.join(',') + '{' + visit(decls) + '}';\n }\n },\n supports(node) {\n // FIXED\n return '@supports ' + node.supports + '{' + visit(node.rules) + '}';\n }\n };\n\n function visit(nodes) {\n let buf = '';\n\n for (let i = 0; i < nodes.length; i++) {\n const n = nodes[i];\n\n if (cb) {\n cb(n);\n }\n\n const txt = renderMethods[n.type](n);\n\n if (txt) {\n buf += txt;\n\n if (txt.length && n.selectors) {\n buf += delim;\n }\n }\n }\n\n return buf;\n }\n\n return visit(tree.stylesheet.rules);\n}\n\n\n// Exports\n// =============================================================================\nexport default stringifyCss;\n","// Dependencies\n// =============================================================================\nimport getCssData from 'get-css-data';\nimport mergeDeep from './merge-deep';\nimport transformCss from './transform-css';\nimport { name as pkgName } from '../package.json';\n\n\n// Constants & Variables\n// =============================================================================\nconst defaults = {\n // Sources\n include : 'style,link[rel=stylesheet]',\n exclude : '',\n // Options\n fixNestedCalc: true, // transformCss\n onlyLegacy : true, // cssVars\n onlyVars : false, // cssVars, transformCss\n preserve : false, // transformCss\n silent : false, // cssVars\n updateDOM : true, // cssVars\n updateURLs : true, // cssVars\n variables : {}, // transformCss\n // Callbacks\n onBeforeSend() {}, // cssVars\n onSuccess() {}, // cssVars\n onWarning() {}, // transformCss\n onError() {}, // cssVars\n onComplete() {} // cssVars\n};\nconst regex = {\n // CSS comments\n cssComments: /\\/\\*[\\s\\S]+?\\*\\//g,\n // CSS url(...) values\n cssUrls: /url\\((?!['\"]?(?:data|http|\\/\\/):)['\"]?([^'\")]*)['\"]?\\)/g,\n // CSS variable :root declarations and var() function values\n cssVars: /(?:(?::root\\s*{\\s*[^;]*;*\\s*)|(?:var\\(\\s*))(--[^:)]+)(?:\\s*[:)])/\n};\n\n\n// Functions\n// =============================================================================\n/**\n * Fetches, parses, and transforms CSS custom properties from specified\n * <style> and <link> elements into static values, then appends a new <style>\n * element with static values to the DOM to provide CSS custom property\n * compatibility for legacy browsers. Also provides a single interface for\n * live updates of runtime values in both modern and legacy browsers.\n *\n * @preserve\n * @param {object} [options] Options object\n * @param {string} [options.include=\"style,link[rel=stylesheet]\"] CSS selector\n * matching <link re=\"stylesheet\"> and <style> nodes to\n * process\n * @param {string} [options.exclude] CSS selector matching <link\n * rel=\"stylehseet\"> and <style> nodes to exclude from those\n * matches by options.include\n * @param {boolean} [options.fixNestedCalc=true] Removes nested 'calc' keywords\n * for legacy browser compatibility.\n * @param {boolean} [options.onlyLegacy=true] Determines if the ponyfill will\n * only generate legacy-compatible CSS in browsers that lack\n * native support (i.e., legacy browsers)\n * @param {boolean} [options.onlyVars=false] Determines if CSS rulesets and\n * declarations without a custom property value should be\n * removed from the ponyfill-generated CSS\n * @param {boolean} [options.preserve=false] Determines if the original CSS\n * custom property declaration will be retained in the\n * ponyfill-generated CSS.\n * @param {boolean} [options.silent=false] Determines if warning and error\n * messages will be displayed on the console\n * @param {boolean} [options.updateDOM=true] Determines if the ponyfill will\n * update the DOM after processing CSS custom properties\n * @param {boolean} [options.updateURLs=true] Determines if the ponyfill will\n * convert relative url() paths to absolute urls.\n * @param {object} [options.variables] A map of custom property name/value\n * pairs. Property names can omit or include the leading\n * double-hyphen (—), and values specified will override\n * previous values.\n * @param {function} [options.onBeforeSend] Callback before XHR is sent. Passes\n * 1) the XHR object, 2) source node reference, and 3) the\n * source URL as arguments.\n * @param {function} [options.onSuccess] Callback after CSS data has been\n * collected from each node and before CSS custom properties\n * have been transformed. Allows modifying the CSS data before\n * it is transformed by returning any string value (or false\n * to skip). Passes 1) CSS text, 2) source node reference, and\n * 3) the source URL as arguments.\n * @param {function} [options.onWarning] Callback after each CSS parsing warning\n * has occurred. Passes 1) a warning message as an argument.\n * @param {function} [options.onError] Callback after a CSS parsing error has\n * occurred or an XHR request has failed. Passes 1) an error\n * message, and 2) source node reference, 3) xhr, and 4 url as\n * arguments.\n * @param {function} [options.onComplete] Callback after all CSS has been\n * processed, legacy-compatible CSS has been generated, and\n * (optionally) the DOM has been updated. Passes 1) a CSS\n * string with CSS variable values resolved, and 2) a\n * reference to the appended <style> node.\n *\n * @example\n *\n * cssVars({\n * include : 'style,link[rel=\"stylesheet\"]', // default\n * exclude : '',\n * fixNestedCalc: true, // default\n * onlyLegacy : true, // default\n * onlyVars : false, // default\n * preserve : false, // default\n * silent : false, // default\n * updateDOM : true, // default\n * updateURLs : true, // default\n * variables : {\n * // ...\n * },\n * onBeforeSend(xhr, node, url) {\n * // ...\n * }\n * onSuccess(cssText, node, url) {\n * // ...\n * },\n * onWarning(message) {\n * // ...\n * },\n * onError(message, node) {\n * // ...\n * },\n * onComplete(cssText, styleNode) {\n * // ...\n * }\n * });\n */\nfunction cssVars(options = {}) {\n const settings = mergeDeep(defaults, options);\n\n function handleError(message, sourceNode, xhr, url) {\n /* istanbul ignore next */\n if (!settings.silent) {\n // eslint-disable-next-line\n console.error(`${message}\\n`, sourceNode);\n }\n\n settings.onError(message, sourceNode, xhr, url);\n }\n\n function handleWarning(message) {\n /* istanbul ignore next */\n if (!settings.silent) {\n // eslint-disable-next-line\n console.warn(message);\n }\n\n settings.onWarning(message);\n }\n\n // Verify readyState to ensure all <link> and <style> nodes are available\n if (document.readyState !== 'loading') {\n const hasNativeSupport = window.CSS && window.CSS.supports && window.CSS.supports('(--a: 0)');\n\n // Lacks native support or onlyLegacy 'false'\n if (!hasNativeSupport || !settings.onlyLegacy) {\n const styleNodeId = pkgName;\n\n getCssData({\n include: settings.include,\n // Always exclude styleNodeId element, which is the generated\n // <style> node containing previously transformed CSS.\n exclude: `#${styleNodeId}` + (settings.exclude ? `,${settings.exclude}` : ''),\n // This filter does a test on each block of CSS. An additional\n // filter is used in the parser to remove individual\n // declarations.\n filter : settings.onlyVars ? regex.cssVars : null,\n onBeforeSend: settings.onBeforeSend,\n onSuccess(cssText, node, url) {\n const returnVal = settings.onSuccess(cssText, node, url);\n\n cssText = returnVal === false ? '' : returnVal || cssText;\n\n // Convert relative url(...) values to absolute\n if (settings.updateURLs) {\n const cssUrls = cssText\n // Remove comments to avoid processing @import in comments\n .replace(regex.cssComments, '')\n // Match url(...) values\n .match(regex.cssUrls) || [];\n\n cssUrls.forEach(cssUrl => {\n const oldUrl = cssUrl.replace(regex.cssUrls, '$1');\n const newUrl = getFullUrl(oldUrl, url);\n\n cssText = cssText.replace(cssUrl, cssUrl.replace(oldUrl, newUrl));\n });\n }\n\n return cssText;\n },\n onError(xhr, node, url) {\n const responseUrl = xhr.responseURL || getFullUrl(url, location.href);\n const statusText = xhr.statusText ? `(${xhr.statusText})` : 'Unspecified Error' + (xhr.status === 0 ? ' (possibly CORS related)' : '');\n const errorMsg = `CSS XHR Error: ${responseUrl} ${xhr.status} ${statusText}`;\n\n handleError(errorMsg, node, xhr, responseUrl);\n },\n onComplete(cssText, cssArray, nodeArray) {\n const cssMarker = /\\/\\*__CSSVARSPONYFILL-(\\d+)__\\*\\//g;\n let styleNode = null;\n\n // Concatenate cssArray items, replacing those that do not\n // contain a CSS custom property declaraion or function with\n // a temporary marker . After the CSS is transformed, the\n // markers will be replaced with the matching cssArray item.\n // This optimization is done to avoid processing CSS that\n // will not change as a results of the ponyfill.\n cssText = cssArray.map((css, i) => regex.cssVars.test(css) ? css : `/*__CSSVARSPONYFILL-${i}__*/`).join('');\n\n try {\n cssText = transformCss(cssText, {\n fixNestedCalc: settings.fixNestedCalc,\n onlyVars : settings.onlyVars,\n persist : settings.updateDOM,\n preserve : settings.preserve,\n variables : settings.variables,\n onWarning : handleWarning\n });\n\n let cssMarkerMatch = cssMarker.exec(cssText);\n\n // Replace markers with appropriate cssArray item\n while (cssMarkerMatch !== null) {\n const matchedText = cssMarkerMatch[0];\n const cssArrayIndex = cssMarkerMatch[1];\n\n cssText = cssText.replace(matchedText, cssArray[cssArrayIndex]);\n cssMarkerMatch = cssMarker.exec(cssText);\n }\n\n if (settings.updateDOM && nodeArray && nodeArray.length) {\n const lastNode = nodeArray[nodeArray.length - 1];\n\n styleNode = document.querySelector(`#${styleNodeId}`) || document.createElement('style');\n styleNode.setAttribute('id', styleNodeId);\n\n if (styleNode.textContent !== cssText) {\n styleNode.textContent = cssText;\n }\n\n // Insert <style> element after last nodeArray item\n if (lastNode.nextSibling !== styleNode) {\n lastNode.parentNode.insertBefore(styleNode, lastNode.nextSibling);\n }\n }\n }\n catch(err) {\n let errorThrown = false;\n\n // Iterate cssArray to detect CSS text and node(s)\n // responsibile for error.\n cssArray.forEach((cssText, i) => {\n try {\n cssText = transformCss(cssText, settings);\n }\n catch(err) {\n const errorNode = nodeArray[i - 0];\n\n errorThrown = true;\n handleError(err.message, errorNode);\n }\n });\n\n // In the event the error thrown was not due to\n // transformCss, handle the original error.\n /* istanbul ignore next */\n if (!errorThrown) {\n handleError(err.message || err);\n }\n }\n\n settings.onComplete(cssText, styleNode);\n }\n });\n }\n // Has native support\n else if (hasNativeSupport && settings.updateDOM) {\n // Set variables using native methods\n Object.keys(settings.variables).forEach(key => {\n // Convert all property names to leading '--' style\n const prop = `--${key.replace(/^-+/, '')}`;\n const value = settings.variables[key];\n\n document.documentElement.style.setProperty(prop, value);\n });\n }\n }\n // Delay function until DOMContentLoaded event is fired\n /* istanbul ignore next */\n else {\n document.addEventListener('DOMContentLoaded', function init(evt) {\n cssVars(options);\n\n document.removeEventListener('DOMContentLoaded', init);\n });\n }\n}\n\n\n// Functions (Private)\n// =============================================================================\n/**\n * Returns fully qualified URL from relative URL and (optional) base URL\n *\n * @param {any} url\n * @param {any} [base=location.href]\n * @returns\n */\nfunction getFullUrl(url, base = location.href) {\n const d = document.implementation.createHTMLDocument('');\n const b = d.createElement('base');\n const a = d.createElement('a');\n\n d.head.appendChild(b);\n d.body.appendChild(a);\n b.href = base;\n a.href = url;\n\n return a.href;\n}\n\n\n// Export\n// =============================================================================\nexport default cssVars;\n"],"names":["getUrls","urls","options","arguments","length","undefined","settings","mimeType","onBeforeSend","Function","prototype","onSuccess","onError","onComplete","urlArray","Array","isArray","urlQueue","apply","map","x","xhr","urlIndex","responseText","returnVal","indexOf","forEach","url","i","parser","document","createElement","setAttribute","href","isCrossDomain","host","location","isSameProtocol","protocol","XDomainRequest","xdr","open","timeout","onprogress","ontimeout","onload","onerror","err","setTimeout","send","console","log","XMLHttpRequest","overrideMimeType","onreadystatechange","readyState","status","getCssData","regex","cssComments","cssImports","include","exclude","filter","sourceNodes","querySelectorAll","node","elm","selector","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","call","cssArray","handleComplete","cssText","join","handleSuccess","cssIndex","sourceUrl","resolveImports","baseUrl","callbackFn","__errorData","__errorRules","importData","parseImportData","rules","absoluteUrls","responseImportData","rule","replace","absoluteRules","push","responseArray","importText","resolvedCssText","errorData","data","test","ignoreRules","match","getFullUrl","oldUrl","newUrl","linkHref","getAttribute","linkRel","isLink","nodeName","toLowerCase","isStyle","textContent","base","d","implementation","createHTMLDocument","b","a","head","appendChild","body","mergeDeep","isObject","obj","Object","constructor","objects","reduce","prev","keys","pVal","key","oVal","balanced","str","RegExp","maybeMatch","r","range","start","end","pre","slice","post","reg","m","begs","beg","left","right","result","ai","bi","pop","cssParse","css","error","msg","Error","re","exec","whitespace","close","comment","type","comments","cmnts","c","trim","split","s","declaration","comment_regexp","prop","val","ret","property","value","declarations","decls","concat","keyframe","vals","values","at_rule","vendor","name","frame","frames","keyframes","at_keyframes","supports","at_supports","at_host","media","at_media","at_custom_m","selectors","at_page","at_document","at_fontface","at_x","core","sel","stylesheet","errors","persistStore","VAR_PROP_IDENTIFIER","VAR_FUNC_IDENTIFIER","transformVars","reCalcExp","varSource","persist","variables","cssTree","parseCss","onlyVars","filterVars","declArray","hasVarProp","hasVarVal","Boolean","k","varNameIndices","decl","preserve","splice","newRule","walkCss","fn","resolvedValue","resolveValue","fixNestedCalc","oldValue","newValue","rootCalc","nestedCalc","tree","delim","cb","renderMethods","visit","nodes","buf","n","txt","stringifyCss","balancedParens","varStartIndex","varRef","substring","warningIntro","onWarning","varFunc","varResult","_","fallback","replacement","defaults","cssVars","handleError","message","sourceNode","silent","handleWarning","warn","hasNativeSupport","window","CSS","onlyLegacy","updateDOM","documentElement","style","setProperty","styleNodeId","pkgName","updateURLs","cssUrls","cssUrl","responseUrl","responseURL","statusText","nodeArray","cssMarker","styleNode","transformCss","cssMarkerMatch","matchedText","cssArrayIndex","lastNode","querySelector","nextSibling","parentNode","insertBefore","errorThrown","errorNode","addEventListener","init","evt","removeEventListener"],"mappings":";;;;;;;mLAOA,SAASA,EAAQC,GACb,IAAIC,EAAUC,UAAUC,OAAS,QAAsBC,IAAjB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