You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
1.0 MiB

2 years ago
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(window,function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=235)}([function(e,t,i){"use strict";i.d(t,"a",function(){return r});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function r(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var n=i(0),r=i(51),o=i(96),a=i(11),s=i(74),c=i(31),u=i(65),l=function(e){function t(i,n,r){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=o.a;break;case 1:if(!i){a.destination=o.a;break}if("object"==typeof i){i instanceof t?(a.syncErrorThrowable=i.syncErrorThrowable,a.destination=i,i.add(a)):(a.syncErrorThrowable=!0,a.destination=new d(a,i));break}default:a.syncErrorThrowable=!0,a.destination=new d(a,i,n,r)}return a}return n.a(t,e),t.prototype[s.a]=function(){return this},t.create=function(e,i,n){var r=new t(e,i,n);return r.syncErrorThrowable=!1,r},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(a.a),d=function(e){function t(t,i,n,a){var s,c=e.call(this)||this;c._parentSubscriber=t;var u=c;return Object(r.a)(i)?s=i:i&&(s=i.next,n=i.error,a=i.complete,i!==o.a&&(u=Object.create(i),Object(r.a)(u.unsubscribe)&&c.add(u.unsubscribe.bind(u)),u.unsubscribe=c.unsubscribe.bind(c))),c._context=u,c._next=s,c._error=n,c._complete=a,c}return n.a(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;c.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,i=c.a.useDeprecatedSynchronousErrorHandling;if(this._error)i&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)i?(t.syncErrorValue=e,t.syncErrorThrown=!0):Object(u.a)(e),this.unsubscribe();else{if(this.unsubscribe(),i)throw e;Object(u.a)(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var i=function(){return e._complete.call(e._context)};c.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,i),this.unsubscribe()):(this.__tryOrUnsub(i),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),c.a.useDeprecatedSynchronousErrorHandling)throw e;Object(u.a)(e)}},t.prototype.__tryOrSetError=function(e,t,i){if(!c.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,i)}catch(t){return c.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(Object(u.a)(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},function(e,t,i){"use strict";var n=i(92),r=i(1),o=i(74),a=i(96);var s=i(45),c=i(73),u=i(31);i.d(t,"a",function(){return l});var l=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var i=new e;return i.source=this,i.operator=t,i},e.prototype.subscribe=function(e,t,i){var n=this.operator,s=function(e,t,i){if(e){if(e i
/*!
* css-vars-ponyfill
* v2.0.2
* https://jhildenbiddle.github.io/css-vars-ponyfill/
* (c) 2018-2019 John Hildenbiddle <http://hildenbiddle.com>
* MIT license
*/
function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function r(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}
/*!
* get-css-data
* v1.6.3
* https://github.com/jhildenbiddle/get-css-data
* (c) 2018-2019 John Hildenbiddle <http://hildenbiddle.com>
* MIT license
*/()}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={mimeType:t.mimeType||null,onBeforeSend:t.onBeforeSend||Function.prototype,onSuccess:t.onSuccess||Function.prototype,onError:t.onError||Function.prototype,onComplete:t.onComplete||Function.prototype},n=Array.isArray(e)?e:[e],r=Array.apply(null,Array(n.length)).map(function(e){return null});function o(){return!("<"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().charAt(0))}function a(e,t){i.onError(e,n[t],t)}function s(e,t){var o=i.onSuccess(e,n[t],t);e=!1===o?"":o||e,r[t]=e,-1===r.indexOf(null)&&i.onComplete(r)}var c=document.createElement("a");n.forEach(function(e,t){if(c.setAttribute("href",e),c.href=String(c.href),Boolean(document.all&&!window.atob)&&c.host.split(":")[0]!==location.host.split(":")[0]){if(c.protocol===location.protocol){var n=new XDomainRequest;n.open("GET",e),n.timeout=0,n.onprogress=Function.prototype,n.ontimeout=Function.prototype,n.onload=function(){o(n.responseText)?s(n.responseText,t):a(n,t)},n.onerror=function(e){a(n,t)},setTimeout(function(){n.send()},0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),a(null,t)}else{var r=new XMLHttpRequest;r.open("GET",e),i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.onBeforeSend(r,e,t),r.onreadystatechange=function(){4===r.readyState&&(200===r.status&&o(r.responseText)?s(r.responseText,t):a(r,t))},r.send()}})}
/**
* Gets CSS data from <style> and <link> nodes (including @imports), then
* returns data in order processed by DOM. Allows specifying nodes to
* include/exclude and filtering CSS data using RegEx.
*
* @preserve
* @param {object} [options] The options object
* @param {object} [options.rootElement=document] Root element to traverse for
* <link> and <style> nodes.
* @param {string} [options.include] CSS selector matching <link> and <style>
* nodes to include
* @param {string} [options.exclude] CSS selector matching <link> and <style>
* nodes to exclude
* @param {object} [options.filter] Regular expression used to filter node CSS
* data. Each block of CSS data is tested against the filter,
* and only matching data is included.
* @param {object} [options.useCSSOM=false] Determines if CSS data will be
* collected from a stylesheet's runtime values instead of its
* text content. This is required to get accurate CSS data
* when a stylesheet has been modified using the deleteRule()
* or insertRule() methods because these modifications will
* not be reflected in the stylesheet's text content.
* @param {function} [options.onBeforeSend] Callback before XHR is sent. Passes
* 1) the XHR object, 2) source node reference, and 3) the
* source URL as arguments.
* @param {function} [options.onSuccess] Callback on each CSS node read. Passes
* 1) CSS text, 2) source node reference, and 3) the source
* URL as arguments.
* @param {function} [options.onError] Callback on each error. Passes 1) the XHR
* object for inspection, 2) soure node reference, and 3) the
* source URL that failed (either a <link> href or an @import)
* as arguments
* @param {function} [options.onComplete] Callback after all nodes have been
* processed. Passes 1) concatenated CSS text, 2) an array of
* CSS text in DOM order, and 3) an array of nodes in DOM
* order as arguments.
*
* @example
*
* getCssData({
* rootElement: document,
* include : 'style,link[rel="stylesheet"]',
* exclude : '[href="skip.css"]',
* filter : /red/,
* useCSSOM : false,
* onBeforeSend(xhr, node, url) {
* // ...
* }
* onSuccess(cssText, node, url) {
* // ...
* }
* onError(xhr, node, url) {
* // ...
* },
* onComplete(cssText, cssArray, nodeArray) {
* // ...
* }
* });
*/function a(e){var t={cssComments:/\/\*[\s\S]+?\*\//g,cssImports:/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g},i={rootElement:e.rootElement||document,include:e.include||'style,link[rel="stylesheet"]',exclude:e.exclude||null,filter:e.filter||null,useCSSOM:e.useCSSOM||!1,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},n=Array.apply(null,i.rootElement.querySelectorAll(i.include)).filter(function(e){return t=e,n=i.exclude,!(t.matches||t.matchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector).call(t,n);var t,n}),r=Array.apply(null,Array(n.length)).map(function(e){return null});function a(){if(-1===r.indexOf(null)){var e=r.join("");i.onComplete(e,r,n)}}function c(e,t,n,s){var c=i.onSuccess(e,n,s);(function e(t,n,r,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];var l=u(t,r,c);l.rules.length?o(l.absoluteUrls,{onBeforeSend:function(e,t,r){i.onBeforeSend(e,n,t)},onSuccess:function(e,t,r){var o=i.onSuccess(e,n,t),a=u(e=!1===o?"":o||e,t,c);return a.rules.forEach(function(t,i){e=e.replace(t,a.absoluteRules[i])}),e},onError:function(i,o,u){s.push({xhr:i,url:o}),c.push(l.rules[u]),e(t,n,r,a,s,c)},onComplete:function(i){i.forEach(function(e,i){t=t.replace(l.rules[i],e)}),e(t,n,r,a,s,c)}}):a(t,s)})(e=void 0!==c&&!1===Boolean(c)?"":c||e,n,s,function(e,o){null===r[t]&&(o.forEach(function(e){return i.onError(e.xhr,n,e.url)}),!i.filter||i.filter.test(e)?r[t]=e:r[t]="",a())})}function u(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r={};return r.rules=(e.replace(t.cssComments,"").match(t.cssImports)||[]).filter(function(e){return-1===n.indexOf(e)}),r.urls=r.rules.map(function(e){return e.replace(t.cssImports,"$1")}),r.absoluteUrls=r.urls.map(function(e){return s(e,i)}),r.absoluteRules=r.rules.map(function(e,t){var n=r.urls[t],o=s(r.absoluteUrls[t],i);return e.replace(n,o)}),r}n.length?n.forEach(function(e,t){var n=e.getAttribute("href"),u=e.getAttribute("rel"),l="LINK"===e.nodeName&&n&&u&&"stylesheet"===u.toLowerCase(),d="STYLE"===e.nodeName;if(l)o(n,{mimeType:"text/css",onBeforeSend:function(t,n,r){i.onBeforeSend(t,e,n)},onSuccess:function(i,r,o){var a=s(n,location.href);c(i,t,e,a)},onError:function(n,o,s){r[t]="",i.onError(n,e,o),a()}});else if(d){var h=e.textContent;i.useCSSOM&&(h=Array.apply(null,e.sheet.cssRules).map(function(e){return e.cssText}).join("")),c(h,t,e,location.href)}else r[t]="",a()}):i.onComplete("",[])}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,i=document.implementation.createHTMLDocument(""),n=i.createElement("base"),r=i.createElement("a");return i.head.appendChild(n),i.body.appendChild(r),n.href=t,r.href=e,r.href}i.r(t);var c=u;function u(e,t,i){e instanceof RegExp&&(e=l(e,i)),t instanceof RegExp&&(t=l(t,i));var n=d(e,t,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+e.length,n[1]),post:i.slice(n[1]+t.length)}}function l(e,t){var i=t.match(e);return i?i[0]:null}function d(e,t,i){var n,r,o,a,s,c=i.indexOf(e),u=i.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(n=[],o=i.length;l>=0&&!s;)l==c?(n.push(l),c=i.indexOf(e,l+1)):1==n.length?s=[n.pop(),u]:((r=n.pop())<o&&(o=r,a=u),u=i.indexOf(t,l+1)),l=c<u&&c>=0?c:u;n.length&&(s=[o,a])}return s}function h(e){var t=n({},{preserveStatic:!0,removeComments:!1},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});function i(e){throw new Error("CSS parse error: ".concat(e))}function r(t){var i=t.exec(e);if(i)return e=e.slice(i[0].length),i}function o(){return r(/^{\s*/)}function a(){return r(/^}/)}function s(){r(/^\s*/)}function u(){if(s(),"/"===e[0]&&"*"===e[1]){for(var t=2;e[t]&&("*"!==e[t]||"/"!==e[t+1]);)t++;if(!e[t])return i("end of comment is missing");var n=e.slice(2,t);return e=e.slice(t+2),{type:"comment",comment:n}}}function l(){for(var e,i=[];e=u();)i.push(e);return t.removeComments?[]:i}function d(){for
/**
* Fetches, parses, and transforms CSS custom properties from specified
* <style> and <link> elements into static values, then appends a new <style>
* element with static values to the DOM to provide CSS custom property
* compatibility for legacy browsers. Also provides a single interface for
* live updates of runtime values in both modern and legacy browsers.
*
* @preserve
* @param {object} [options] Options object
* @param {object} [options.rootElement=document] Root element to traverse for
* <link> and <style> nodes
* @param {boolean} [options.shadowDOM=false] Determines if shadow DOM <link>
* and <style> nodes will be processed.
* @param {string} [options.include="style,link[rel=stylesheet]"] CSS selector
* matching <link re="stylesheet"> and <style> nodes to
* process
* @param {string} [options.exclude] CSS selector matching <link
* rel="stylehseet"> and <style> nodes to exclude from those
* matches by options.include
* @param {object} [options.variables] A map of custom property name/value
* pairs. Property names can omit or include the leading
* double-hyphen (), and values specified will override
* previous values
* @param {boolean} [options.onlyLegacy=true] Determines if the ponyfill will
* only generate legacy-compatible CSS in browsers that lack
* native support (i.e., legacy browsers)
* @param {boolean} [options.preserveStatic=true] Determines if CSS
* declarations that do not reference a custom property will
* be preserved in the transformed CSS
* @param {boolean} [options.preserveVars=false] Determines if CSS custom
* property declarations will be preserved in the transformed
* CSS
* @param {boolean} [options.silent=false] Determines if warning and error
* messages will be displayed on the console
* @param {boolean} [options.updateDOM=true] Determines if the ponyfill will
* update the DOM after processing CSS custom properties
* @param {boolean} [options.updateURLs=true] Determines if the ponyfill will
* convert relative url() paths to absolute urls
* @param {boolean} [options.watch=false] Determines if a MutationObserver will
* be created that will execute the ponyfill when a <link> or
* <style> DOM mutation is observed
* @param {function} [options.onBeforeSend] Callback before XHR is sent. Passes
* 1) the XHR object, 2) source node reference, and 3) the
* source URL as arguments
* @param {function} [options.onWarning] Callback after each CSS parsing warning
* has occurred. Passes 1) a warning message as an argument.
* @param {function} [options.onError] Callback after a CSS parsing error has
* occurred or an XHR request has failed. Passes 1) an error
* message, and 2) source node reference, 3) xhr, and 4 url as
* arguments.
* @param {function} [options.onSuccess] Callback after CSS data has been
* collected from each node and before CSS custom properties
* have been transformed. Allows modifying the CSS data before
* it is transformed by returning any string value (or false
* to skip). Passes 1) CSS text, 2) source node reference, and
* 3) the source URL as arguments.
* @param {function} [options.onComplete] Callback after all CSS has been
* processed, legacy-compatible CSS has been generated, and
* (optionally) the DOM has been updated. Passes 1) a CSS
* string with CSS variable values resolved, 2) an array of
* output <style> node references that have been appended to
* the DOM, 3) an object containing all custom properies names
* and values, and 4) the ponyfill execution time in
* milliseconds.
*
* @example
*
* cssVars({
* rootElement : document,
* shadowDOM : false,
* include : 'style,link[rel="stylesheet"]',
* exclude : '',
* variables : {},
* onlyLegacy : true,
* preserveStatic: true,
* preserveVars : false,
* silent : false,
* updateDOM : true,
* updateURLs : true,
* watch : false,
* onBeforeSend(xhr, node, url) {},
* onWarning(message) {},
* onError(message, node, xhr, url) {},
* onSuccess(cssText, node, url) {},
* onComplete(cssText, styleNode, cssVariables, benchmark) {}
* });
*/
function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="cssVars(): ",i=n({},N,e);function o(e,n,r,o){!i.silent&&window.console&&console.error("".concat(t).concat(e,"\n"),n),i.onError(e,n,r,o)}function s(e){!i.silent&&window.console&&console.warn("".concat(t).concat(e)),i.onWarning(e)}if(y){if(i.watch)return i.watch=N.watch,function(e){function t(e){var t="LINK"===e.tagName&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet");return t&&!e.disabled}if(!window.MutationObserver)return;k&&(k.disconnect(),k=null);(k=new MutationObserver(function(i){var n=i.some(function(i){var n,r=!1;return"attributes"===i.type?r=t(i.target):"childList"===i.type&&(n=i.addedNodes,r=Array.apply(null,n).some(function(e){var i=1===e.nodeType,n=i&&e.hasAttribute("data-cssvars"),r=function(e){return"STYLE"===e.tagName&&!e.disabled}(e)&&T.cssVars.test(e.textContent),o=!n&&(t(e)||r);return o})||function(t){return Array.apply(null,t).some(function(t){var i=1===t.nodeType,n=i&&"out"===t.getAttribute("data-cssvars"),r=i&&"src"===t.getAttribute("data-cssvars"),o=r;if(r||n){var a=t.getAttribute("data-cssvars-group"),s=e.rootElement.querySelector('[data-cssvars-group="'.concat(a,'"]'));r&&(O(e.rootElement),D.dom={}),s&&s.parentNode.removeChild(s)}return o})}(i.removedNodes)),r});n&&z(e)})).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0})}(i),void z(i);if(!1===i.watch&&k&&(k.disconnect(),k=null),!i.__benchmark){if(C===i.rootElement)return void function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(b),b=setTimeout(function(){e.__benchmark=null,z(e)},t)}(e);if(i.__benchmark=S(),i.exclude=[k?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',i.exclude].filter(function(e){return e}).join(","),i.variables=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=/^-{2}/;return Object.keys(e).reduce(function(i,n){var r=t.test(n)?n:"--".concat(n.replace(/^-+/,""));return i[r]=e[n],i},{})}(i.variables),!k)if(Array.apply(null,i.rootElement.querySelectorAll('[data-cssvars="out"]')).forEach(function(e){var t=e.getAttribute("data-cssvars-group");(t?i.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(t,'"]')):null)||e.parentNode.removeChild(e)}),j){var c=i.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])');c.length<j&&(j=c.length,D.dom={})}}if("loading"!==document.readyState){var u=i.shadowDOM||i.rootElement.shadowRoot||i.rootElement.host;if(w&&i.onlyLegacy){if(i.updateDOM){var l=i.rootElement.host||(i.rootElement===document?document.documentElement:i.rootElement);Object.keys(i.variables).forEach(function(e){l.style.setProperty(e,i.variables[e])})}}else u&&!E?a({rootElement:N.rootElement,include:N.include,exclude:i.exclude,onSuccess:function(e,t,i){return(e=((e=e.replace(T.cssComments,"").replace(T.cssMediaQueries,"")).match(T.cssRootRules)||[]).join(""))||!1},onComplete:function(e,t,n){p(e,{store:D.dom,onWarning:s}),E=!0,z(i)}}):(C=i.rootElement,a({rootElement:i.rootElement,include:i.include,exclude:i.exclude,onBeforeSend:i.onBeforeSend,onError:function(e,t,i){var n=e.responseURL||L(i,location.href),r=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");o("CSS XHR Error: ".concat(n," ").concat(e.status," ").concat(r),t,e,n)},onSuccess:function(e,t,n){var r=i.onSuccess(e,t,n);return e=void 0!==r&&!1===Boolean(r)?"":r||e,i.updateURLs&&(e=function(e,t){return(e.replace(T.cssComments,"").match(T.cssUrls)||[]).forEach(function(i){var n=i.replace(T.cssUrls,"$1"),r=L(n,t);e=e.replace(i,i.replace(n,r))}),e}(e,n)),e},onComplete:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],c={},u=i.updateDOM?D.dom:Object.keys(D.job).length?D.job:D.job=JSON.parse(JSON.stringify(D.dom)),l=!1;if(a.forEach(function(e,n){if(T.cssVars.test(t[n]))try{var r=h(t[n],{preserveStatic:i.preserveStatic,removeComments:!0});p(r,{store:c,onWarning:s}),e.__cssVars={tree:r}}catch(t){o(t.message,e)}}),i.updateDOM&&n(D.user,i.varia