/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var __create = Object.create; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop2 in b || (b = {})) if (__hasOwnProp.call(b, prop2)) __defNormalProp(a, prop2, b[prop2]); if (__getOwnPropSymbols) for (var prop2 of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop2)) __defNormalProp(a, prop2, b[prop2]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __markAsModule = (target2) => __defProp(target2, "__esModule", { value: true }); var __objRest = (source, exclude) => { var target2 = {}; for (var prop2 in source) if (__hasOwnProp.call(source, prop2) && exclude.indexOf(prop2) < 0) target2[prop2] = source[prop2]; if (source != null && __getOwnPropSymbols) for (var prop2 of __getOwnPropSymbols(source)) { if (exclude.indexOf(prop2) < 0 && __propIsEnum.call(source, prop2)) target2[prop2] = source[prop2]; } return target2; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target2, all) => { __markAsModule(target2); for (var name2 in all) __defProp(target2, name2, { get: all[name2], enumerable: true }); }; var __reExport = (target2, module2, desc) => { if (module2 && typeof module2 === "object" || typeof module2 === "function") { for (let key of __getOwnPropNames(module2)) if (!__hasOwnProp.call(target2, key) && key !== "default") __defProp(target2, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); } return target2; }; var __toModule = (module2) => { return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); }; var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; // node_modules/localforage/dist/localforage.js var require_localforage = __commonJS({ "node_modules/localforage/dist/localforage.js"(exports, module2) { (function(f) { if (typeof exports === "object" && typeof module2 !== "undefined") { module2.exports = f(); } else if (typeof define === "function" && define.amd) { define([], f); } else { var g2; if (typeof window !== "undefined") { g2 = window; } else if (typeof global !== "undefined") { g2 = global; } else if (typeof self !== "undefined") { g2 = self; } else { g2 = this; } g2.localforage = f(); } })(function() { var define2, module3, exports2; return function e(t, n, r) { function s(o2, u) { if (!n[o2]) { if (!t[o2]) { var a = typeof require == "function" && require; if (!u && a) return a(o2, true); if (i) return i(o2, true); var f = new Error("Cannot find module '" + o2 + "'"); throw f.code = "MODULE_NOT_FOUND", f; } var l = n[o2] = { exports: {} }; t[o2][0].call(l.exports, function(e2) { var n2 = t[o2][1][e2]; return s(n2 ? n2 : e2); }, l, l.exports, e, t, n, r); } return n[o2].exports; } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++) s(r[o]); return s; }({ 1: [function(_dereq_, module4, exports3) { (function(global2) { "use strict"; var Mutation = global2.MutationObserver || global2.WebKitMutationObserver; var scheduleDrain; { if (Mutation) { var called = 0; var observer = new Mutation(nextTick); var element = global2.document.createTextNode(""); observer.observe(element, { characterData: true }); scheduleDrain = function() { element.data = called = ++called % 2; }; } else if (!global2.setImmediate && typeof global2.MessageChannel !== "undefined") { var channel = new global2.MessageChannel(); channel.port1.onmessage = nextTick; scheduleDrain = function() { channel.port2.postMessage(0); }; } else if ("document" in global2 && "onreadystatechange" in global2.document.createElement("script")) { scheduleDrain = function() { var scriptEl = global2.document.createElement("script"); scriptEl.onreadystatechange = function() { nextTick(); scriptEl.onreadystatechange = null; scriptEl.parentNode.removeChild(scriptEl); scriptEl = null; }; global2.document.documentElement.appendChild(scriptEl); }; } else { scheduleDrain = function() { setTimeout(nextTick, 0); }; } } var draining; var queue = []; function nextTick() { draining = true; var i, oldQueue; var len = queue.length; while (len) { oldQueue = queue; queue = []; i = -1; while (++i < len) { oldQueue[i](); } len = queue.length; } draining = false; } module4.exports = immediate; function immediate(task) { if (queue.push(task) === 1 && !draining) { scheduleDrain(); } } }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); }, {}], 2: [function(_dereq_, module4, exports3) { "use strict"; var immediate = _dereq_(1); function INTERNAL() { } var handlers2 = {}; var REJECTED = ["REJECTED"]; var FULFILLED = ["FULFILLED"]; var PENDING = ["PENDING"]; module4.exports = Promise2; function Promise2(resolver) { if (typeof resolver !== "function") { throw new TypeError("resolver must be a function"); } this.state = PENDING; this.queue = []; this.outcome = void 0; if (resolver !== INTERNAL) { safelyResolveThenable(this, resolver); } } Promise2.prototype["catch"] = function(onRejected) { return this.then(null, onRejected); }; Promise2.prototype.then = function(onFulfilled, onRejected) { if (typeof onFulfilled !== "function" && this.state === FULFILLED || typeof onRejected !== "function" && this.state === REJECTED) { return this; } var promise = new this.constructor(INTERNAL); if (this.state !== PENDING) { var resolver = this.state === FULFILLED ? onFulfilled : onRejected; unwrap(promise, resolver, this.outcome); } else { this.queue.push(new QueueItem(promise, onFulfilled, onRejected)); } return promise; }; function QueueItem(promise, onFulfilled, onRejected) { this.promise = promise; if (typeof onFulfilled === "function") { this.onFulfilled = onFulfilled; this.callFulfilled = this.otherCallFulfilled; } if (typeof onRejected === "function") { this.onRejected = onRejected; this.callRejected = this.otherCallRejected; } } QueueItem.prototype.callFulfilled = function(value) { handlers2.resolve(this.promise, value); }; QueueItem.prototype.otherCallFulfilled = function(value) { unwrap(this.promise, this.onFulfilled, value); }; QueueItem.prototype.callRejected = function(value) { handlers2.reject(this.promise, value); }; QueueItem.prototype.otherCallRejected = function(value) { unwrap(this.promise, this.onRejected, value); }; function unwrap(promise, func, value) { immediate(function() { var returnValue; try { returnValue = func(value); } catch (e) { return handlers2.reject(promise, e); } if (returnValue === promise) { handlers2.reject(promise, new TypeError("Cannot resolve promise with itself")); } else { handlers2.resolve(promise, returnValue); } }); } handlers2.resolve = function(self2, value) { var result = tryCatch(getThen, value); if (result.status === "error") { return handlers2.reject(self2, result.value); } var thenable = result.value; if (thenable) { safelyResolveThenable(self2, thenable); } else { self2.state = FULFILLED; self2.outcome = value; var i = -1; var len = self2.queue.length; while (++i < len) { self2.queue[i].callFulfilled(value); } } return self2; }; handlers2.reject = function(self2, error2) { self2.state = REJECTED; self2.outcome = error2; var i = -1; var len = self2.queue.length; while (++i < len) { self2.queue[i].callRejected(error2); } return self2; }; function getThen(obj) { var then = obj && obj.then; if (obj && (typeof obj === "object" || typeof obj === "function") && typeof then === "function") { return function appyThen() { then.apply(obj, arguments); }; } } function safelyResolveThenable(self2, thenable) { var called = false; function onError(value) { if (called) { return; } called = true; handlers2.reject(self2, value); } function onSuccess(value) { if (called) { return; } called = true; handlers2.resolve(self2, value); } function tryToUnwrap() { thenable(onSuccess, onError); } var result = tryCatch(tryToUnwrap); if (result.status === "error") { onError(result.value); } } function tryCatch(func, value) { var out = {}; try { out.value = func(value); out.status = "success"; } catch (e) { out.status = "error"; out.value = e; } return out; } Promise2.resolve = resolve; function resolve(value) { if (value instanceof this) { return value; } return handlers2.resolve(new this(INTERNAL), value); } Promise2.reject = reject; function reject(reason) { var promise = new this(INTERNAL); return handlers2.reject(promise, reason); } Promise2.all = all; function all(iterable) { var self2 = this; if (Object.prototype.toString.call(iterable) !== "[object Array]") { return this.reject(new TypeError("must be an array")); } var len = iterable.length; var called = false; if (!len) { return this.resolve([]); } var values = new Array(len); var resolved = 0; var i = -1; var promise = new this(INTERNAL); while (++i < len) { allResolver(iterable[i], i); } return promise; function allResolver(value, i2) { self2.resolve(value).then(resolveFromAll, function(error2) { if (!called) { called = true; handlers2.reject(promise, error2); } }); function resolveFromAll(outValue) { values[i2] = outValue; if (++resolved === len && !called) { called = true; handlers2.resolve(promise, values); } } } } Promise2.race = race2; function race2(iterable) { var self2 = this; if (Object.prototype.toString.call(iterable) !== "[object Array]") { return this.reject(new TypeError("must be an array")); } var len = iterable.length; var called = false; if (!len) { return this.resolve([]); } var i = -1; var promise = new this(INTERNAL); while (++i < len) { resolver(iterable[i]); } return promise; function resolver(value) { self2.resolve(value).then(function(response) { if (!called) { called = true; handlers2.resolve(promise, response); } }, function(error2) { if (!called) { called = true; handlers2.reject(promise, error2); } }); } } }, { "1": 1 }], 3: [function(_dereq_, module4, exports3) { (function(global2) { "use strict"; if (typeof global2.Promise !== "function") { global2.Promise = _dereq_(2); } }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); }, { "2": 2 }], 4: [function(_dereq_, module4, exports3) { "use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { return typeof obj; } : function(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function getIDB() { try { if (typeof indexedDB !== "undefined") { return indexedDB; } if (typeof webkitIndexedDB !== "undefined") { return webkitIndexedDB; } if (typeof mozIndexedDB !== "undefined") { return mozIndexedDB; } if (typeof OIndexedDB !== "undefined") { return OIndexedDB; } if (typeof msIndexedDB !== "undefined") { return msIndexedDB; } } catch (e) { return; } } var idb = getIDB(); function isIndexedDBValid() { try { if (!idb || !idb.open) { return false; } var isSafari = typeof openDatabase !== "undefined" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform); var hasFetch = typeof fetch === "function" && fetch.toString().indexOf("[native code") !== -1; return (!isSafari || hasFetch) && typeof indexedDB !== "undefined" && typeof IDBKeyRange !== "undefined"; } catch (e) { return false; } } function createBlob(parts, properties) { parts = parts || []; properties = properties || {}; try { return new Blob(parts, properties); } catch (e) { if (e.name !== "TypeError") { throw e; } var Builder = typeof BlobBuilder !== "undefined" ? BlobBuilder : typeof MSBlobBuilder !== "undefined" ? MSBlobBuilder : typeof MozBlobBuilder !== "undefined" ? MozBlobBuilder : WebKitBlobBuilder; var builder = new Builder(); for (var i = 0; i < parts.length; i += 1) { builder.append(parts[i]); } return builder.getBlob(properties.type); } } if (typeof Promise === "undefined") { _dereq_(3); } var Promise$1 = Promise; function executeCallback(promise, callback) { if (callback) { promise.then(function(result) { callback(null, result); }, function(error2) { callback(error2); }); } } function executeTwoCallbacks(promise, callback, errorCallback) { if (typeof callback === "function") { promise.then(callback); } if (typeof errorCallback === "function") { promise["catch"](errorCallback); } } function normalizeKey(key2) { if (typeof key2 !== "string") { console.warn(key2 + " used as a key, but it is not a string."); key2 = String(key2); } return key2; } function getCallback() { if (arguments.length && typeof arguments[arguments.length - 1] === "function") { return arguments[arguments.length - 1]; } } var DETECT_BLOB_SUPPORT_STORE = "local-forage-detect-blob-support"; var supportsBlobs = void 0; var dbContexts = {}; var toString = Object.prototype.toString; var READ_ONLY = "readonly"; var READ_WRITE = "readwrite"; function _binStringToArrayBuffer(bin) { var length2 = bin.length; var buf = new ArrayBuffer(length2); var arr = new Uint8Array(buf); for (var i = 0; i < length2; i++) { arr[i] = bin.charCodeAt(i); } return buf; } function _checkBlobSupportWithoutCaching(idb2) { return new Promise$1(function(resolve) { var txn = idb2.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE); var blob = createBlob([""]); txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, "key"); txn.onabort = function(e) { e.preventDefault(); e.stopPropagation(); resolve(false); }; txn.oncomplete = function() { var matchedChrome = navigator.userAgent.match(/Chrome\/(\d+)/); var matchedEdge = navigator.userAgent.match(/Edge\//); resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43); }; })["catch"](function() { return false; }); } function _checkBlobSupport(idb2) { if (typeof supportsBlobs === "boolean") { return Promise$1.resolve(supportsBlobs); } return _checkBlobSupportWithoutCaching(idb2).then(function(value) { supportsBlobs = value; return supportsBlobs; }); } function _deferReadiness(dbInfo) { var dbContext = dbContexts[dbInfo.name]; var deferredOperation = {}; deferredOperation.promise = new Promise$1(function(resolve, reject) { deferredOperation.resolve = resolve; deferredOperation.reject = reject; }); dbContext.deferredOperations.push(deferredOperation); if (!dbContext.dbReady) { dbContext.dbReady = deferredOperation.promise; } else { dbContext.dbReady = dbContext.dbReady.then(function() { return deferredOperation.promise; }); } } function _advanceReadiness(dbInfo) { var dbContext = dbContexts[dbInfo.name]; var deferredOperation = dbContext.deferredOperations.pop(); if (deferredOperation) { deferredOperation.resolve(); return deferredOperation.promise; } } function _rejectReadiness(dbInfo, err) { var dbContext = dbContexts[dbInfo.name]; var deferredOperation = dbContext.deferredOperations.pop(); if (deferredOperation) { deferredOperation.reject(err); return deferredOperation.promise; } } function _getConnection(dbInfo, upgradeNeeded) { return new Promise$1(function(resolve, reject) { dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext(); if (dbInfo.db) { if (upgradeNeeded) { _deferReadiness(dbInfo); dbInfo.db.close(); } else { return resolve(dbInfo.db); } } var dbArgs = [dbInfo.name]; if (upgradeNeeded) { dbArgs.push(dbInfo.version); } var openreq = idb.open.apply(idb, dbArgs); if (upgradeNeeded) { openreq.onupgradeneeded = function(e) { var db = openreq.result; try { db.createObjectStore(dbInfo.storeName); if (e.oldVersion <= 1) { db.createObjectStore(DETECT_BLOB_SUPPORT_STORE); } } catch (ex) { if (ex.name === "ConstraintError") { console.warn('The database "' + dbInfo.name + '" has been upgraded from version ' + e.oldVersion + " to version " + e.newVersion + ', but the storage "' + dbInfo.storeName + '" already exists.'); } else { throw ex; } } }; } openreq.onerror = function(e) { e.preventDefault(); reject(openreq.error); }; openreq.onsuccess = function() { var db = openreq.result; db.onversionchange = function(e) { e.target.close(); }; resolve(db); _advanceReadiness(dbInfo); }; }); } function _getOriginalConnection(dbInfo) { return _getConnection(dbInfo, false); } function _getUpgradedConnection(dbInfo) { return _getConnection(dbInfo, true); } function _isUpgradeNeeded(dbInfo, defaultVersion) { if (!dbInfo.db) { return true; } var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName); var isDowngrade = dbInfo.version < dbInfo.db.version; var isUpgrade = dbInfo.version > dbInfo.db.version; if (isDowngrade) { if (dbInfo.version !== defaultVersion) { console.warn('The database "' + dbInfo.name + `" can't be downgraded from version ` + dbInfo.db.version + " to version " + dbInfo.version + "."); } dbInfo.version = dbInfo.db.version; } if (isUpgrade || isNewStore) { if (isNewStore) { var incVersion = dbInfo.db.version + 1; if (incVersion > dbInfo.version) { dbInfo.version = incVersion; } } return true; } return false; } function _encodeBlob(blob) { return new Promise$1(function(resolve, reject) { var reader = new FileReader(); reader.onerror = reject; reader.onloadend = function(e) { var base64 = btoa(e.target.result || ""); resolve({ __local_forage_encoded_blob: true, data: base64, type: blob.type }); }; reader.readAsBinaryString(blob); }); } function _decodeBlob(encodedBlob) { var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data)); return createBlob([arrayBuff], { type: encodedBlob.type }); } function _isEncodedBlob(value) { return value && value.__local_forage_encoded_blob; } function _fullyReady(callback) { var self2 = this; var promise = self2._initReady().then(function() { var dbContext = dbContexts[self2._dbInfo.name]; if (dbContext && dbContext.dbReady) { return dbContext.dbReady; } }); executeTwoCallbacks(promise, callback, callback); return promise; } function _tryReconnect(dbInfo) { _deferReadiness(dbInfo); var dbContext = dbContexts[dbInfo.name]; var forages = dbContext.forages; for (var i = 0; i < forages.length; i++) { var forage = forages[i]; if (forage._dbInfo.db) { forage._dbInfo.db.close(); forage._dbInfo.db = null; } } dbInfo.db = null; return _getOriginalConnection(dbInfo).then(function(db) { dbInfo.db = db; if (_isUpgradeNeeded(dbInfo)) { return _getUpgradedConnection(dbInfo); } return db; }).then(function(db) { dbInfo.db = dbContext.db = db; for (var i2 = 0; i2 < forages.length; i2++) { forages[i2]._dbInfo.db = db; } })["catch"](function(err) { _rejectReadiness(dbInfo, err); throw err; }); } function createTransaction(dbInfo, mode, callback, retries) { if (retries === void 0) { retries = 1; } try { var tx = dbInfo.db.transaction(dbInfo.storeName, mode); callback(null, tx); } catch (err) { if (retries > 0 && (!dbInfo.db || err.name === "InvalidStateError" || err.name === "NotFoundError")) { return Promise$1.resolve().then(function() { if (!dbInfo.db || err.name === "NotFoundError" && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) { if (dbInfo.db) { dbInfo.version = dbInfo.db.version + 1; } return _getUpgradedConnection(dbInfo); } }).then(function() { return _tryReconnect(dbInfo).then(function() { createTransaction(dbInfo, mode, callback, retries - 1); }); })["catch"](callback); } callback(err); } } function createDbContext() { return { forages: [], db: null, dbReady: null, deferredOperations: [] }; } function _initStorage(options) { var self2 = this; var dbInfo = { db: null }; if (options) { for (var i in options) { dbInfo[i] = options[i]; } } var dbContext = dbContexts[dbInfo.name]; if (!dbContext) { dbContext = createDbContext(); dbContexts[dbInfo.name] = dbContext; } dbContext.forages.push(self2); if (!self2._initReady) { self2._initReady = self2.ready; self2.ready = _fullyReady; } var initPromises = []; function ignoreErrors() { return Promise$1.resolve(); } for (var j = 0; j < dbContext.forages.length; j++) { var forage = dbContext.forages[j]; if (forage !== self2) { initPromises.push(forage._initReady()["catch"](ignoreErrors)); } } var forages = dbContext.forages.slice(0); return Promise$1.all(initPromises).then(function() { dbInfo.db = dbContext.db; return _getOriginalConnection(dbInfo); }).then(function(db) { dbInfo.db = db; if (_isUpgradeNeeded(dbInfo, self2._defaultConfig.version)) { return _getUpgradedConnection(dbInfo); } return db; }).then(function(db) { dbInfo.db = dbContext.db = db; self2._dbInfo = dbInfo; for (var k = 0; k < forages.length; k++) { var forage2 = forages[k]; if (forage2 !== self2) { forage2._dbInfo.db = dbInfo.db; forage2._dbInfo.version = dbInfo.version; } } }); } function getItem(key2, callback) { var self2 = this; key2 = normalizeKey(key2); var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self2._dbInfo.storeName); var req = store.get(key2); req.onsuccess = function() { var value = req.result; if (value === void 0) { value = null; } if (_isEncodedBlob(value)) { value = _decodeBlob(value); } resolve(value); }; req.onerror = function() { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function iterate(iterator, callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self2._dbInfo.storeName); var req = store.openCursor(); var iterationNumber = 1; req.onsuccess = function() { var cursor = req.result; if (cursor) { var value = cursor.value; if (_isEncodedBlob(value)) { value = _decodeBlob(value); } var result = iterator(value, cursor.key, iterationNumber++); if (result !== void 0) { resolve(result); } else { cursor["continue"](); } } else { resolve(); } }; req.onerror = function() { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function setItem(key2, value, callback) { var self2 = this; key2 = normalizeKey(key2); var promise = new Promise$1(function(resolve, reject) { var dbInfo; self2.ready().then(function() { dbInfo = self2._dbInfo; if (toString.call(value) === "[object Blob]") { return _checkBlobSupport(dbInfo.db).then(function(blobSupport) { if (blobSupport) { return value; } return _encodeBlob(value); }); } return value; }).then(function(value2) { createTransaction(self2._dbInfo, READ_WRITE, function(err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self2._dbInfo.storeName); if (value2 === null) { value2 = void 0; } var req = store.put(value2, key2); transaction.oncomplete = function() { if (value2 === void 0) { value2 = null; } resolve(value2); }; transaction.onabort = transaction.onerror = function() { var err2 = req.error ? req.error : req.transaction.error; reject(err2); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function removeItem(key2, callback) { var self2 = this; key2 = normalizeKey(key2); var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { createTransaction(self2._dbInfo, READ_WRITE, function(err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self2._dbInfo.storeName); var req = store["delete"](key2); transaction.oncomplete = function() { resolve(); }; transaction.onerror = function() { reject(req.error); }; transaction.onabort = function() { var err2 = req.error ? req.error : req.transaction.error; reject(err2); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function clear2(callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { createTransaction(self2._dbInfo, READ_WRITE, function(err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self2._dbInfo.storeName); var req = store.clear(); transaction.oncomplete = function() { resolve(); }; transaction.onabort = transaction.onerror = function() { var err2 = req.error ? req.error : req.transaction.error; reject(err2); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function length(callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self2._dbInfo.storeName); var req = store.count(); req.onsuccess = function() { resolve(req.result); }; req.onerror = function() { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function key(n, callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { if (n < 0) { resolve(null); return; } self2.ready().then(function() { createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self2._dbInfo.storeName); var advanced = false; var req = store.openKeyCursor(); req.onsuccess = function() { var cursor = req.result; if (!cursor) { resolve(null); return; } if (n === 0) { resolve(cursor.key); } else { if (!advanced) { advanced = true; cursor.advance(n); } else { resolve(cursor.key); } } }; req.onerror = function() { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function keys(callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self2._dbInfo.storeName); var req = store.openKeyCursor(); var keys2 = []; req.onsuccess = function() { var cursor = req.result; if (!cursor) { resolve(keys2); return; } keys2.push(cursor.key); cursor["continue"](); }; req.onerror = function() { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function dropInstance(options, callback) { callback = getCallback.apply(this, arguments); var currentConfig = this.config(); options = typeof options !== "function" && options || {}; if (!options.name) { options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self2 = this; var promise; if (!options.name) { promise = Promise$1.reject("Invalid arguments"); } else { var isCurrentDb = options.name === currentConfig.name && self2._dbInfo.db; var dbPromise = isCurrentDb ? Promise$1.resolve(self2._dbInfo.db) : _getOriginalConnection(options).then(function(db) { var dbContext = dbContexts[options.name]; var forages = dbContext.forages; dbContext.db = db; for (var i = 0; i < forages.length; i++) { forages[i]._dbInfo.db = db; } return db; }); if (!options.storeName) { promise = dbPromise.then(function(db) { _deferReadiness(options); var dbContext = dbContexts[options.name]; var forages = dbContext.forages; db.close(); for (var i = 0; i < forages.length; i++) { var forage = forages[i]; forage._dbInfo.db = null; } var dropDBPromise = new Promise$1(function(resolve, reject) { var req = idb.deleteDatabase(options.name); req.onerror = function() { var db2 = req.result; if (db2) { db2.close(); } reject(req.error); }; req.onblocked = function() { console.warn('dropInstance blocked for database "' + options.name + '" until all open connections are closed'); }; req.onsuccess = function() { var db2 = req.result; if (db2) { db2.close(); } resolve(db2); }; }); return dropDBPromise.then(function(db2) { dbContext.db = db2; for (var i2 = 0; i2 < forages.length; i2++) { var _forage = forages[i2]; _advanceReadiness(_forage._dbInfo); } })["catch"](function(err) { (_rejectReadiness(options, err) || Promise$1.resolve())["catch"](function() { }); throw err; }); }); } else { promise = dbPromise.then(function(db) { if (!db.objectStoreNames.contains(options.storeName)) { return; } var newVersion = db.version + 1; _deferReadiness(options); var dbContext = dbContexts[options.name]; var forages = dbContext.forages; db.close(); for (var i = 0; i < forages.length; i++) { var forage = forages[i]; forage._dbInfo.db = null; forage._dbInfo.version = newVersion; } var dropObjectPromise = new Promise$1(function(resolve, reject) { var req = idb.open(options.name, newVersion); req.onerror = function(err) { var db2 = req.result; db2.close(); reject(err); }; req.onupgradeneeded = function() { var db2 = req.result; db2.deleteObjectStore(options.storeName); }; req.onsuccess = function() { var db2 = req.result; db2.close(); resolve(db2); }; }); return dropObjectPromise.then(function(db2) { dbContext.db = db2; for (var j = 0; j < forages.length; j++) { var _forage2 = forages[j]; _forage2._dbInfo.db = db2; _advanceReadiness(_forage2._dbInfo); } })["catch"](function(err) { (_rejectReadiness(options, err) || Promise$1.resolve())["catch"](function() { }); throw err; }); }); } } executeCallback(promise, callback); return promise; } var asyncStorage = { _driver: "asyncStorage", _initStorage, _support: isIndexedDBValid(), iterate, getItem, setItem, removeItem, clear: clear2, length, key, keys, dropInstance }; function isWebSQLValid() { return typeof openDatabase === "function"; } var BASE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var BLOB_TYPE_PREFIX = "~~local_forage_type~"; var BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/; var SERIALIZED_MARKER = "__lfsc__:"; var SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length; var TYPE_ARRAYBUFFER = "arbf"; var TYPE_BLOB = "blob"; var TYPE_INT8ARRAY = "si08"; var TYPE_UINT8ARRAY = "ui08"; var TYPE_UINT8CLAMPEDARRAY = "uic8"; var TYPE_INT16ARRAY = "si16"; var TYPE_INT32ARRAY = "si32"; var TYPE_UINT16ARRAY = "ur16"; var TYPE_UINT32ARRAY = "ui32"; var TYPE_FLOAT32ARRAY = "fl32"; var TYPE_FLOAT64ARRAY = "fl64"; var TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length; var toString$1 = Object.prototype.toString; function stringToBuffer(serializedString) { var bufferLength = serializedString.length * 0.75; var len = serializedString.length; var i; var p = 0; var encoded1, encoded2, encoded3, encoded4; if (serializedString[serializedString.length - 1] === "=") { bufferLength--; if (serializedString[serializedString.length - 2] === "=") { bufferLength--; } } var buffer = new ArrayBuffer(bufferLength); var bytes = new Uint8Array(buffer); for (i = 0; i < len; i += 4) { encoded1 = BASE_CHARS.indexOf(serializedString[i]); encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]); encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]); encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]); bytes[p++] = encoded1 << 2 | encoded2 >> 4; bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; } return buffer; } function bufferToString(buffer) { var bytes = new Uint8Array(buffer); var base64String = ""; var i; for (i = 0; i < bytes.length; i += 3) { base64String += BASE_CHARS[bytes[i] >> 2]; base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4]; base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6]; base64String += BASE_CHARS[bytes[i + 2] & 63]; } if (bytes.length % 3 === 2) { base64String = base64String.substring(0, base64String.length - 1) + "="; } else if (bytes.length % 3 === 1) { base64String = base64String.substring(0, base64String.length - 2) + "=="; } return base64String; } function serialize(value, callback) { var valueType = ""; if (value) { valueType = toString$1.call(value); } if (value && (valueType === "[object ArrayBuffer]" || value.buffer && toString$1.call(value.buffer) === "[object ArrayBuffer]")) { var buffer; var marker2 = SERIALIZED_MARKER; if (value instanceof ArrayBuffer) { buffer = value; marker2 += TYPE_ARRAYBUFFER; } else { buffer = value.buffer; if (valueType === "[object Int8Array]") { marker2 += TYPE_INT8ARRAY; } else if (valueType === "[object Uint8Array]") { marker2 += TYPE_UINT8ARRAY; } else if (valueType === "[object Uint8ClampedArray]") { marker2 += TYPE_UINT8CLAMPEDARRAY; } else if (valueType === "[object Int16Array]") { marker2 += TYPE_INT16ARRAY; } else if (valueType === "[object Uint16Array]") { marker2 += TYPE_UINT16ARRAY; } else if (valueType === "[object Int32Array]") { marker2 += TYPE_INT32ARRAY; } else if (valueType === "[object Uint32Array]") { marker2 += TYPE_UINT32ARRAY; } else if (valueType === "[object Float32Array]") { marker2 += TYPE_FLOAT32ARRAY; } else if (valueType === "[object Float64Array]") { marker2 += TYPE_FLOAT64ARRAY; } else { callback(new Error("Failed to get type for BinaryArray")); } } callback(marker2 + bufferToString(buffer)); } else if (valueType === "[object Blob]") { var fileReader = new FileReader(); fileReader.onload = function() { var str = BLOB_TYPE_PREFIX + value.type + "~" + bufferToString(this.result); callback(SERIALIZED_MARKER + TYPE_BLOB + str); }; fileReader.readAsArrayBuffer(value); } else { try { callback(JSON.stringify(value)); } catch (e) { console.error("Couldn't convert value into a JSON string: ", value); callback(null, e); } } } function deserialize(value) { if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) { return JSON.parse(value); } var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH); var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH); var blobType; if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) { var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX); blobType = matcher[1]; serializedString = serializedString.substring(matcher[0].length); } var buffer = stringToBuffer(serializedString); switch (type) { case TYPE_ARRAYBUFFER: return buffer; case TYPE_BLOB: return createBlob([buffer], { type: blobType }); case TYPE_INT8ARRAY: return new Int8Array(buffer); case TYPE_UINT8ARRAY: return new Uint8Array(buffer); case TYPE_UINT8CLAMPEDARRAY: return new Uint8ClampedArray(buffer); case TYPE_INT16ARRAY: return new Int16Array(buffer); case TYPE_UINT16ARRAY: return new Uint16Array(buffer); case TYPE_INT32ARRAY: return new Int32Array(buffer); case TYPE_UINT32ARRAY: return new Uint32Array(buffer); case TYPE_FLOAT32ARRAY: return new Float32Array(buffer); case TYPE_FLOAT64ARRAY: return new Float64Array(buffer); default: throw new Error("Unkown type: " + type); } } var localforageSerializer = { serialize, deserialize, stringToBuffer, bufferToString }; function createDbTable(t, dbInfo, callback, errorCallback) { t.executeSql("CREATE TABLE IF NOT EXISTS " + dbInfo.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], callback, errorCallback); } function _initStorage$1(options) { var self2 = this; var dbInfo = { db: null }; if (options) { for (var i in options) { dbInfo[i] = typeof options[i] !== "string" ? options[i].toString() : options[i]; } } var dbInfoPromise = new Promise$1(function(resolve, reject) { try { dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size); } catch (e) { return reject(e); } dbInfo.db.transaction(function(t) { createDbTable(t, dbInfo, function() { self2._dbInfo = dbInfo; resolve(); }, function(t2, error2) { reject(error2); }); }, reject); }); dbInfo.serializer = localforageSerializer; return dbInfoPromise; } function tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) { t.executeSql(sqlStatement, args, callback, function(t2, error2) { if (error2.code === error2.SYNTAX_ERR) { t2.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [dbInfo.storeName], function(t3, results) { if (!results.rows.length) { createDbTable(t3, dbInfo, function() { t3.executeSql(sqlStatement, args, callback, errorCallback); }, errorCallback); } else { errorCallback(t3, error2); } }, errorCallback); } else { errorCallback(t2, error2); } }, errorCallback); } function getItem$1(key2, callback) { var self2 = this; key2 = normalizeKey(key2); var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { var dbInfo = self2._dbInfo; dbInfo.db.transaction(function(t) { tryExecuteSql(t, dbInfo, "SELECT * FROM " + dbInfo.storeName + " WHERE key = ? LIMIT 1", [key2], function(t2, results) { var result = results.rows.length ? results.rows.item(0).value : null; if (result) { result = dbInfo.serializer.deserialize(result); } resolve(result); }, function(t2, error2) { reject(error2); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function iterate$1(iterator, callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { var dbInfo = self2._dbInfo; dbInfo.db.transaction(function(t) { tryExecuteSql(t, dbInfo, "SELECT * FROM " + dbInfo.storeName, [], function(t2, results) { var rows = results.rows; var length2 = rows.length; for (var i = 0; i < length2; i++) { var item = rows.item(i); var result = item.value; if (result) { result = dbInfo.serializer.deserialize(result); } result = iterator(result, item.key, i + 1); if (result !== void 0) { resolve(result); return; } } resolve(); }, function(t2, error2) { reject(error2); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function _setItem(key2, value, callback, retriesLeft) { var self2 = this; key2 = normalizeKey(key2); var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { if (value === void 0) { value = null; } var originalValue = value; var dbInfo = self2._dbInfo; dbInfo.serializer.serialize(value, function(value2, error2) { if (error2) { reject(error2); } else { dbInfo.db.transaction(function(t) { tryExecuteSql(t, dbInfo, "INSERT OR REPLACE INTO " + dbInfo.storeName + " (key, value) VALUES (?, ?)", [key2, value2], function() { resolve(originalValue); }, function(t2, error3) { reject(error3); }); }, function(sqlError) { if (sqlError.code === sqlError.QUOTA_ERR) { if (retriesLeft > 0) { resolve(_setItem.apply(self2, [key2, originalValue, callback, retriesLeft - 1])); return; } reject(sqlError); } }); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function setItem$1(key2, value, callback) { return _setItem.apply(this, [key2, value, callback, 1]); } function removeItem$1(key2, callback) { var self2 = this; key2 = normalizeKey(key2); var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { var dbInfo = self2._dbInfo; dbInfo.db.transaction(function(t) { tryExecuteSql(t, dbInfo, "DELETE FROM " + dbInfo.storeName + " WHERE key = ?", [key2], function() { resolve(); }, function(t2, error2) { reject(error2); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function clear$1(callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { var dbInfo = self2._dbInfo; dbInfo.db.transaction(function(t) { tryExecuteSql(t, dbInfo, "DELETE FROM " + dbInfo.storeName, [], function() { resolve(); }, function(t2, error2) { reject(error2); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function length$1(callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { var dbInfo = self2._dbInfo; dbInfo.db.transaction(function(t) { tryExecuteSql(t, dbInfo, "SELECT COUNT(key) as c FROM " + dbInfo.storeName, [], function(t2, results) { var result = results.rows.item(0).c; resolve(result); }, function(t2, error2) { reject(error2); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function key$1(n, callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { var dbInfo = self2._dbInfo; dbInfo.db.transaction(function(t) { tryExecuteSql(t, dbInfo, "SELECT key FROM " + dbInfo.storeName + " WHERE id = ? LIMIT 1", [n + 1], function(t2, results) { var result = results.rows.length ? results.rows.item(0).key : null; resolve(result); }, function(t2, error2) { reject(error2); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function keys$1(callback) { var self2 = this; var promise = new Promise$1(function(resolve, reject) { self2.ready().then(function() { var dbInfo = self2._dbInfo; dbInfo.db.transaction(function(t) { tryExecuteSql(t, dbInfo, "SELECT key FROM " + dbInfo.storeName, [], function(t2, results) { var keys2 = []; for (var i = 0; i < results.rows.length; i++) { keys2.push(results.rows.item(i).key); } resolve(keys2); }, function(t2, error2) { reject(error2); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function getAllStoreNames(db) { return new Promise$1(function(resolve, reject) { db.transaction(function(t) { t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(t2, results) { var storeNames = []; for (var i = 0; i < results.rows.length; i++) { storeNames.push(results.rows.item(i).name); } resolve({ db, storeNames }); }, function(t2, error2) { reject(error2); }); }, function(sqlError) { reject(sqlError); }); }); } function dropInstance$1(options, callback) { callback = getCallback.apply(this, arguments); var currentConfig = this.config(); options = typeof options !== "function" && options || {}; if (!options.name) { options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self2 = this; var promise; if (!options.name) { promise = Promise$1.reject("Invalid arguments"); } else { promise = new Promise$1(function(resolve) { var db; if (options.name === currentConfig.name) { db = self2._dbInfo.db; } else { db = openDatabase(options.name, "", "", 0); } if (!options.storeName) { resolve(getAllStoreNames(db)); } else { resolve({ db, storeNames: [options.storeName] }); } }).then(function(operationInfo) { return new Promise$1(function(resolve, reject) { operationInfo.db.transaction(function(t) { function dropTable(storeName) { return new Promise$1(function(resolve2, reject2) { t.executeSql("DROP TABLE IF EXISTS " + storeName, [], function() { resolve2(); }, function(t2, error2) { reject2(error2); }); }); } var operations = []; for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) { operations.push(dropTable(operationInfo.storeNames[i])); } Promise$1.all(operations).then(function() { resolve(); })["catch"](function(e) { reject(e); }); }, function(sqlError) { reject(sqlError); }); }); }); } executeCallback(promise, callback); return promise; } var webSQLStorage = { _driver: "webSQLStorage", _initStorage: _initStorage$1, _support: isWebSQLValid(), iterate: iterate$1, getItem: getItem$1, setItem: setItem$1, removeItem: removeItem$1, clear: clear$1, length: length$1, key: key$1, keys: keys$1, dropInstance: dropInstance$1 }; function isLocalStorageValid() { try { return typeof localStorage !== "undefined" && "setItem" in localStorage && !!localStorage.setItem; } catch (e) { return false; } } function _getKeyPrefix(options, defaultConfig) { var keyPrefix = options.name + "/"; if (options.storeName !== defaultConfig.storeName) { keyPrefix += options.storeName + "/"; } return keyPrefix; } function checkIfLocalStorageThrows() { var localStorageTestKey = "_localforage_support_test"; try { localStorage.setItem(localStorageTestKey, true); localStorage.removeItem(localStorageTestKey); return false; } catch (e) { return true; } } function _isLocalStorageUsable() { return !checkIfLocalStorageThrows() || localStorage.length > 0; } function _initStorage$2(options) { var self2 = this; var dbInfo = {}; if (options) { for (var i in options) { dbInfo[i] = options[i]; } } dbInfo.keyPrefix = _getKeyPrefix(options, self2._defaultConfig); if (!_isLocalStorageUsable()) { return Promise$1.reject(); } self2._dbInfo = dbInfo; dbInfo.serializer = localforageSerializer; return Promise$1.resolve(); } function clear$2(callback) { var self2 = this; var promise = self2.ready().then(function() { var keyPrefix = self2._dbInfo.keyPrefix; for (var i = localStorage.length - 1; i >= 0; i--) { var key2 = localStorage.key(i); if (key2.indexOf(keyPrefix) === 0) { localStorage.removeItem(key2); } } }); executeCallback(promise, callback); return promise; } function getItem$2(key2, callback) { var self2 = this; key2 = normalizeKey(key2); var promise = self2.ready().then(function() { var dbInfo = self2._dbInfo; var result = localStorage.getItem(dbInfo.keyPrefix + key2); if (result) { result = dbInfo.serializer.deserialize(result); } return result; }); executeCallback(promise, callback); return promise; } function iterate$2(iterator, callback) { var self2 = this; var promise = self2.ready().then(function() { var dbInfo = self2._dbInfo; var keyPrefix = dbInfo.keyPrefix; var keyPrefixLength = keyPrefix.length; var length2 = localStorage.length; var iterationNumber = 1; for (var i = 0; i < length2; i++) { var key2 = localStorage.key(i); if (key2.indexOf(keyPrefix) !== 0) { continue; } var value = localStorage.getItem(key2); if (value) { value = dbInfo.serializer.deserialize(value); } value = iterator(value, key2.substring(keyPrefixLength), iterationNumber++); if (value !== void 0) { return value; } } }); executeCallback(promise, callback); return promise; } function key$2(n, callback) { var self2 = this; var promise = self2.ready().then(function() { var dbInfo = self2._dbInfo; var result; try { result = localStorage.key(n); } catch (error2) { result = null; } if (result) { result = result.substring(dbInfo.keyPrefix.length); } return result; }); executeCallback(promise, callback); return promise; } function keys$2(callback) { var self2 = this; var promise = self2.ready().then(function() { var dbInfo = self2._dbInfo; var length2 = localStorage.length; var keys2 = []; for (var i = 0; i < length2; i++) { var itemKey = localStorage.key(i); if (itemKey.indexOf(dbInfo.keyPrefix) === 0) { keys2.push(itemKey.substring(dbInfo.keyPrefix.length)); } } return keys2; }); executeCallback(promise, callback); return promise; } function length$2(callback) { var self2 = this; var promise = self2.keys().then(function(keys2) { return keys2.length; }); executeCallback(promise, callback); return promise; } function removeItem$2(key2, callback) { var self2 = this; key2 = normalizeKey(key2); var promise = self2.ready().then(function() { var dbInfo = self2._dbInfo; localStorage.removeItem(dbInfo.keyPrefix + key2); }); executeCallback(promise, callback); return promise; } function setItem$2(key2, value, callback) { var self2 = this; key2 = normalizeKey(key2); var promise = self2.ready().then(function() { if (value === void 0) { value = null; } var originalValue = value; return new Promise$1(function(resolve, reject) { var dbInfo = self2._dbInfo; dbInfo.serializer.serialize(value, function(value2, error2) { if (error2) { reject(error2); } else { try { localStorage.setItem(dbInfo.keyPrefix + key2, value2); resolve(originalValue); } catch (e) { if (e.name === "QuotaExceededError" || e.name === "NS_ERROR_DOM_QUOTA_REACHED") { reject(e); } reject(e); } } }); }); }); executeCallback(promise, callback); return promise; } function dropInstance$2(options, callback) { callback = getCallback.apply(this, arguments); options = typeof options !== "function" && options || {}; if (!options.name) { var currentConfig = this.config(); options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self2 = this; var promise; if (!options.name) { promise = Promise$1.reject("Invalid arguments"); } else { promise = new Promise$1(function(resolve) { if (!options.storeName) { resolve(options.name + "/"); } else { resolve(_getKeyPrefix(options, self2._defaultConfig)); } }).then(function(keyPrefix) { for (var i = localStorage.length - 1; i >= 0; i--) { var key2 = localStorage.key(i); if (key2.indexOf(keyPrefix) === 0) { localStorage.removeItem(key2); } } }); } executeCallback(promise, callback); return promise; } var localStorageWrapper = { _driver: "localStorageWrapper", _initStorage: _initStorage$2, _support: isLocalStorageValid(), iterate: iterate$2, getItem: getItem$2, setItem: setItem$2, removeItem: removeItem$2, clear: clear$2, length: length$2, key: key$2, keys: keys$2, dropInstance: dropInstance$2 }; var sameValue = function sameValue2(x, y) { return x === y || typeof x === "number" && typeof y === "number" && isNaN(x) && isNaN(y); }; var includes = function includes2(array, searchElement) { var len = array.length; var i = 0; while (i < len) { if (sameValue(array[i], searchElement)) { return true; } i++; } return false; }; var isArray = Array.isArray || function(arg) { return Object.prototype.toString.call(arg) === "[object Array]"; }; var DefinedDrivers = {}; var DriverSupport = {}; var DefaultDrivers = { INDEXEDDB: asyncStorage, WEBSQL: webSQLStorage, LOCALSTORAGE: localStorageWrapper }; var DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver]; var OptionalDriverMethods = ["dropInstance"]; var LibraryMethods = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(OptionalDriverMethods); var DefaultConfig = { description: "", driver: DefaultDriverOrder.slice(), name: "localforage", size: 4980736, storeName: "keyvaluepairs", version: 1 }; function callWhenReady(localForageInstance, libraryMethod) { localForageInstance[libraryMethod] = function() { var _args = arguments; return localForageInstance.ready().then(function() { return localForageInstance[libraryMethod].apply(localForageInstance, _args); }); }; } function extend() { for (var i = 1; i < arguments.length; i++) { var arg = arguments[i]; if (arg) { for (var _key in arg) { if (arg.hasOwnProperty(_key)) { if (isArray(arg[_key])) { arguments[0][_key] = arg[_key].slice(); } else { arguments[0][_key] = arg[_key]; } } } } } return arguments[0]; } var LocalForage = function() { function LocalForage2(options) { _classCallCheck(this, LocalForage2); for (var driverTypeKey in DefaultDrivers) { if (DefaultDrivers.hasOwnProperty(driverTypeKey)) { var driver = DefaultDrivers[driverTypeKey]; var driverName = driver._driver; this[driverTypeKey] = driverName; if (!DefinedDrivers[driverName]) { this.defineDriver(driver); } } } this._defaultConfig = extend({}, DefaultConfig); this._config = extend({}, this._defaultConfig, options); this._driverSet = null; this._initDriver = null; this._ready = false; this._dbInfo = null; this._wrapLibraryMethodsWithReady(); this.setDriver(this._config.driver)["catch"](function() { }); } LocalForage2.prototype.config = function config3(options) { if ((typeof options === "undefined" ? "undefined" : _typeof(options)) === "object") { if (this._ready) { return new Error("Can't call config() after localforage has been used."); } for (var i in options) { if (i === "storeName") { options[i] = options[i].replace(/\W/g, "_"); } if (i === "version" && typeof options[i] !== "number") { return new Error("Database version must be a number."); } this._config[i] = options[i]; } if ("driver" in options && options.driver) { return this.setDriver(this._config.driver); } return true; } else if (typeof options === "string") { return this._config[options]; } else { return this._config; } }; LocalForage2.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) { var promise = new Promise$1(function(resolve, reject) { try { var driverName = driverObject._driver; var complianceError = new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"); if (!driverObject._driver) { reject(complianceError); return; } var driverMethods = LibraryMethods.concat("_initStorage"); for (var i = 0, len = driverMethods.length; i < len; i++) { var driverMethodName = driverMethods[i]; var isRequired = !includes(OptionalDriverMethods, driverMethodName); if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== "function") { reject(complianceError); return; } } var configureMissingMethods = function configureMissingMethods2() { var methodNotImplementedFactory = function methodNotImplementedFactory2(methodName) { return function() { var error2 = new Error("Method " + methodName + " is not implemented by the current driver"); var promise2 = Promise$1.reject(error2); executeCallback(promise2, arguments[arguments.length - 1]); return promise2; }; }; for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) { var optionalDriverMethod = OptionalDriverMethods[_i]; if (!driverObject[optionalDriverMethod]) { driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod); } } }; configureMissingMethods(); var setDriverSupport = function setDriverSupport2(support) { if (DefinedDrivers[driverName]) { console.info("Redefining LocalForage driver: " + driverName); } DefinedDrivers[driverName] = driverObject; DriverSupport[driverName] = support; resolve(); }; if ("_support" in driverObject) { if (driverObject._support && typeof driverObject._support === "function") { driverObject._support().then(setDriverSupport, reject); } else { setDriverSupport(!!driverObject._support); } } else { setDriverSupport(true); } } catch (e) { reject(e); } }); executeTwoCallbacks(promise, callback, errorCallback); return promise; }; LocalForage2.prototype.driver = function driver() { return this._driver || null; }; LocalForage2.prototype.getDriver = function getDriver(driverName, callback, errorCallback) { var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error("Driver not found.")); executeTwoCallbacks(getDriverPromise, callback, errorCallback); return getDriverPromise; }; LocalForage2.prototype.getSerializer = function getSerializer(callback) { var serializerPromise = Promise$1.resolve(localforageSerializer); executeTwoCallbacks(serializerPromise, callback); return serializerPromise; }; LocalForage2.prototype.ready = function ready(callback) { var self2 = this; var promise = self2._driverSet.then(function() { if (self2._ready === null) { self2._ready = self2._initDriver(); } return self2._ready; }); executeTwoCallbacks(promise, callback, callback); return promise; }; LocalForage2.prototype.setDriver = function setDriver(drivers, callback, errorCallback) { var self2 = this; if (!isArray(drivers)) { drivers = [drivers]; } var supportedDrivers = this._getSupportedDrivers(drivers); function setDriverToConfig() { self2._config.driver = self2.driver(); } function extendSelfWithDriver(driver) { self2._extend(driver); setDriverToConfig(); self2._ready = self2._initStorage(self2._config); return self2._ready; } function initDriver(supportedDrivers2) { return function() { var currentDriverIndex = 0; function driverPromiseLoop() { while (currentDriverIndex < supportedDrivers2.length) { var driverName = supportedDrivers2[currentDriverIndex]; currentDriverIndex++; self2._dbInfo = null; self2._ready = null; return self2.getDriver(driverName).then(extendSelfWithDriver)["catch"](driverPromiseLoop); } setDriverToConfig(); var error2 = new Error("No available storage method found."); self2._driverSet = Promise$1.reject(error2); return self2._driverSet; } return driverPromiseLoop(); }; } var oldDriverSetDone = this._driverSet !== null ? this._driverSet["catch"](function() { return Promise$1.resolve(); }) : Promise$1.resolve(); this._driverSet = oldDriverSetDone.then(function() { var driverName = supportedDrivers[0]; self2._dbInfo = null; self2._ready = null; return self2.getDriver(driverName).then(function(driver) { self2._driver = driver._driver; setDriverToConfig(); self2._wrapLibraryMethodsWithReady(); self2._initDriver = initDriver(supportedDrivers); }); })["catch"](function() { setDriverToConfig(); var error2 = new Error("No available storage method found."); self2._driverSet = Promise$1.reject(error2); return self2._driverSet; }); executeTwoCallbacks(this._driverSet, callback, errorCallback); return this._driverSet; }; LocalForage2.prototype.supports = function supports(driverName) { return !!DriverSupport[driverName]; }; LocalForage2.prototype._extend = function _extend(libraryMethodsAndProperties) { extend(this, libraryMethodsAndProperties); }; LocalForage2.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) { var supportedDrivers = []; for (var i = 0, len = drivers.length; i < len; i++) { var driverName = drivers[i]; if (this.supports(driverName)) { supportedDrivers.push(driverName); } } return supportedDrivers; }; LocalForage2.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() { for (var i = 0, len = LibraryMethods.length; i < len; i++) { callWhenReady(this, LibraryMethods[i]); } }; LocalForage2.prototype.createInstance = function createInstance(options) { return new LocalForage2(options); }; return LocalForage2; }(); var localforage_js = new LocalForage(); module4.exports = localforage_js; }, { "3": 3 }] }, {}, [4])(4); }); } }); // main.ts __export(exports, { default: () => TikzjaxPlugin }); var import_obsidian2 = __toModule(require("obsidian")); // settings.ts var import_obsidian = __toModule(require("obsidian")); var localForage = __toModule(require_localforage()); var DEFAULT_SETTINGS = { invertColorsInDarkMode: true }; var TikzjaxSettingTab = class extends import_obsidian.PluginSettingTab { constructor(app, plugin) { super(app, plugin); this.plugin = plugin; try { localForage.config({ name: "TikzJax", storeName: "svgImages" }); } catch (error2) { console.log(error2); } } display() { const { containerEl } = this; containerEl.empty(); containerEl.createEl("h4", { text: "TikZJax settings" }); new import_obsidian.Setting(containerEl).setName("Invert dark colors in dark mode").setDesc("Invert dark colors in diagrams (e.g. axes, arrows) when in dark mode, so that they are visible.").addToggle((toggle) => toggle.setValue(this.plugin.settings.invertColorsInDarkMode).onChange((value) => __async(this, null, function* () { this.plugin.settings.invertColorsInDarkMode = value; yield this.plugin.saveSettings(); }))); new import_obsidian.Setting(containerEl).setName("Clear cached SVGs").setDesc("SVGs rendered with TikZJax are stored in a database, so diagrams don't have to be re-rendered from scratch every time you open a page. Use this to clear the cache and force all diagrams to be re-rendered.").addButton((button) => button.setIcon("trash").setTooltip("Clear cached SVGs").onClick(() => __async(this, null, function* () { localForage.clear((err) => { if (err) { console.log(err); new import_obsidian.Notice(err, 3e3); } else { new import_obsidian.Notice("TikZJax: Successfully cleared cached SVGs.", 3e3); } }); }))); } }; // svgo.browser.js var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; var svgo = {}; var config$1 = {}; var plugins$1 = {}; var plugins = {}; var xast = {}; var lib$8 = {}; var lib$7 = {}; var stringify$2 = {}; var lib$6 = {}; var lib$5 = {}; (function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0; var ElementType2; (function(ElementType3) { ElementType3["Root"] = "root"; ElementType3["Text"] = "text"; ElementType3["Directive"] = "directive"; ElementType3["Comment"] = "comment"; ElementType3["Script"] = "script"; ElementType3["Style"] = "style"; ElementType3["Tag"] = "tag"; ElementType3["CDATA"] = "cdata"; ElementType3["Doctype"] = "doctype"; })(ElementType2 = exports.ElementType || (exports.ElementType = {})); function isTag2(elem) { return elem.type === ElementType2.Tag || elem.type === ElementType2.Script || elem.type === ElementType2.Style; } exports.isTag = isTag2; exports.Root = ElementType2.Root; exports.Text = ElementType2.Text; exports.Directive = ElementType2.Directive; exports.Comment = ElementType2.Comment; exports.Script = ElementType2.Script; exports.Style = ElementType2.Style; exports.Tag = ElementType2.Tag; exports.CDATA = ElementType2.CDATA; exports.Doctype = ElementType2.Doctype; })(lib$5); var node = {}; var __extends = commonjsGlobal && commonjsGlobal.__extends || function() { var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; } || function(d2, b2) { for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; return extendStatics(d, b); }; return function(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; }(); var __assign$1 = commonjsGlobal && commonjsGlobal.__assign || function() { __assign$1 = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign$1.apply(this, arguments); }; Object.defineProperty(node, "__esModule", { value: true }); node.cloneNode = node.hasChildren = node.isDocument = node.isDirective = node.isComment = node.isText = node.isCDATA = node.isTag = node.Element = node.Document = node.NodeWithChildren = node.ProcessingInstruction = node.Comment = node.Text = node.DataNode = node.Node = void 0; var domelementtype_1$1 = lib$5; var nodeTypes = new Map([[domelementtype_1$1.ElementType.Tag, 1], [domelementtype_1$1.ElementType.Script, 1], [domelementtype_1$1.ElementType.Style, 1], [domelementtype_1$1.ElementType.Directive, 1], [domelementtype_1$1.ElementType.Text, 3], [domelementtype_1$1.ElementType.CDATA, 4], [domelementtype_1$1.ElementType.Comment, 8], [domelementtype_1$1.ElementType.Root, 9]]); var Node = function() { function Node2(type) { this.type = type; this.parent = null; this.prev = null; this.next = null; this.startIndex = null; this.endIndex = null; } Object.defineProperty(Node2.prototype, "nodeType", { get: function() { var _a; return (_a = nodeTypes.get(this.type)) !== null && _a !== void 0 ? _a : 1; }, enumerable: false, configurable: true }); Object.defineProperty(Node2.prototype, "parentNode", { get: function() { return this.parent; }, set: function(parent) { this.parent = parent; }, enumerable: false, configurable: true }); Object.defineProperty(Node2.prototype, "previousSibling", { get: function() { return this.prev; }, set: function(prev) { this.prev = prev; }, enumerable: false, configurable: true }); Object.defineProperty(Node2.prototype, "nextSibling", { get: function() { return this.next; }, set: function(next) { this.next = next; }, enumerable: false, configurable: true }); Node2.prototype.cloneNode = function(recursive) { if (recursive === void 0) { recursive = false; } return cloneNode(this, recursive); }; return Node2; }(); node.Node = Node; var DataNode = function(_super) { __extends(DataNode2, _super); function DataNode2(type, data) { var _this = _super.call(this, type) || this; _this.data = data; return _this; } Object.defineProperty(DataNode2.prototype, "nodeValue", { get: function() { return this.data; }, set: function(data) { this.data = data; }, enumerable: false, configurable: true }); return DataNode2; }(Node); node.DataNode = DataNode; var Text = function(_super) { __extends(Text2, _super); function Text2(data) { return _super.call(this, domelementtype_1$1.ElementType.Text, data) || this; } return Text2; }(DataNode); node.Text = Text; var Comment$1 = function(_super) { __extends(Comment2, _super); function Comment2(data) { return _super.call(this, domelementtype_1$1.ElementType.Comment, data) || this; } return Comment2; }(DataNode); node.Comment = Comment$1; var ProcessingInstruction = function(_super) { __extends(ProcessingInstruction2, _super); function ProcessingInstruction2(name2, data) { var _this = _super.call(this, domelementtype_1$1.ElementType.Directive, data) || this; _this.name = name2; return _this; } return ProcessingInstruction2; }(DataNode); node.ProcessingInstruction = ProcessingInstruction; var NodeWithChildren = function(_super) { __extends(NodeWithChildren2, _super); function NodeWithChildren2(type, children) { var _this = _super.call(this, type) || this; _this.children = children; return _this; } Object.defineProperty(NodeWithChildren2.prototype, "firstChild", { get: function() { var _a; return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null; }, enumerable: false, configurable: true }); Object.defineProperty(NodeWithChildren2.prototype, "lastChild", { get: function() { return this.children.length > 0 ? this.children[this.children.length - 1] : null; }, enumerable: false, configurable: true }); Object.defineProperty(NodeWithChildren2.prototype, "childNodes", { get: function() { return this.children; }, set: function(children) { this.children = children; }, enumerable: false, configurable: true }); return NodeWithChildren2; }(Node); node.NodeWithChildren = NodeWithChildren; var Document = function(_super) { __extends(Document2, _super); function Document2(children) { return _super.call(this, domelementtype_1$1.ElementType.Root, children) || this; } return Document2; }(NodeWithChildren); node.Document = Document; var Element$1 = function(_super) { __extends(Element2, _super); function Element2(name2, attribs, children, type) { if (children === void 0) { children = []; } if (type === void 0) { type = name2 === "script" ? domelementtype_1$1.ElementType.Script : name2 === "style" ? domelementtype_1$1.ElementType.Style : domelementtype_1$1.ElementType.Tag; } var _this = _super.call(this, type, children) || this; _this.name = name2; _this.attribs = attribs; return _this; } Object.defineProperty(Element2.prototype, "tagName", { get: function() { return this.name; }, set: function(name2) { this.name = name2; }, enumerable: false, configurable: true }); Object.defineProperty(Element2.prototype, "attributes", { get: function() { var _this = this; return Object.keys(this.attribs).map(function(name2) { var _a, _b; return { name: name2, value: _this.attribs[name2], namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name2], prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name2] }; }); }, enumerable: false, configurable: true }); return Element2; }(NodeWithChildren); node.Element = Element$1; function isTag$1(node2) { return (0, domelementtype_1$1.isTag)(node2); } node.isTag = isTag$1; function isCDATA(node2) { return node2.type === domelementtype_1$1.ElementType.CDATA; } node.isCDATA = isCDATA; function isText(node2) { return node2.type === domelementtype_1$1.ElementType.Text; } node.isText = isText; function isComment(node2) { return node2.type === domelementtype_1$1.ElementType.Comment; } node.isComment = isComment; function isDirective(node2) { return node2.type === domelementtype_1$1.ElementType.Directive; } node.isDirective = isDirective; function isDocument(node2) { return node2.type === domelementtype_1$1.ElementType.Root; } node.isDocument = isDocument; function hasChildren(node2) { return Object.prototype.hasOwnProperty.call(node2, "children"); } node.hasChildren = hasChildren; function cloneNode(node2, recursive) { if (recursive === void 0) { recursive = false; } var result; if (isText(node2)) { result = new Text(node2.data); } else if (isComment(node2)) { result = new Comment$1(node2.data); } else if (isTag$1(node2)) { var children = recursive ? cloneChildren(node2.children) : []; var clone_1 = new Element$1(node2.name, __assign$1({}, node2.attribs), children); children.forEach(function(child) { return child.parent = clone_1; }); if (node2["x-attribsNamespace"]) { clone_1["x-attribsNamespace"] = __assign$1({}, node2["x-attribsNamespace"]); } if (node2["x-attribsPrefix"]) { clone_1["x-attribsPrefix"] = __assign$1({}, node2["x-attribsPrefix"]); } result = clone_1; } else if (isCDATA(node2)) { var children = recursive ? cloneChildren(node2.children) : []; var clone_2 = new NodeWithChildren(domelementtype_1$1.ElementType.CDATA, children); children.forEach(function(child) { return child.parent = clone_2; }); result = clone_2; } else if (isDocument(node2)) { var children = recursive ? cloneChildren(node2.children) : []; var clone_3 = new Document(children); children.forEach(function(child) { return child.parent = clone_3; }); if (node2["x-mode"]) { clone_3["x-mode"] = node2["x-mode"]; } result = clone_3; } else if (isDirective(node2)) { var instruction = new ProcessingInstruction(node2.name, node2.data); if (node2["x-name"] != null) { instruction["x-name"] = node2["x-name"]; instruction["x-publicId"] = node2["x-publicId"]; instruction["x-systemId"] = node2["x-systemId"]; } result = instruction; } else { throw new Error("Not implemented yet: " + node2.type); } result.startIndex = node2.startIndex; result.endIndex = node2.endIndex; return result; } node.cloneNode = cloneNode; function cloneChildren(childs) { var children = childs.map(function(child) { return cloneNode(child, true); }); for (var i = 1; i < children.length; i++) { children[i].prev = children[i - 1]; children[i - 1].next = children[i]; } return children; } (function(exports) { var __createBinding2 = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m, exports2) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DomHandler = void 0; var domelementtype_12 = lib$5; var node_1 = node; __exportStar(node, exports); var reWhitespace = /\s+/g; var defaultOpts = { normalizeWhitespace: false, withStartIndices: false, withEndIndices: false, xmlMode: false }; var DomHandler = function() { function DomHandler2(callback, options, elementCB) { this.dom = []; this.root = new node_1.Document(this.dom); this.done = false; this.tagStack = [this.root]; this.lastNode = null; this.parser = null; if (typeof options === "function") { elementCB = options; options = defaultOpts; } if (typeof callback === "object") { options = callback; callback = void 0; } this.callback = callback !== null && callback !== void 0 ? callback : null; this.options = options !== null && options !== void 0 ? options : defaultOpts; this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null; } DomHandler2.prototype.onparserinit = function(parser2) { this.parser = parser2; }; DomHandler2.prototype.onreset = function() { this.dom = []; this.root = new node_1.Document(this.dom); this.done = false; this.tagStack = [this.root]; this.lastNode = null; this.parser = null; }; DomHandler2.prototype.onend = function() { if (this.done) return; this.done = true; this.parser = null; this.handleCallback(null); }; DomHandler2.prototype.onerror = function(error2) { this.handleCallback(error2); }; DomHandler2.prototype.onclosetag = function() { this.lastNode = null; var elem = this.tagStack.pop(); if (this.options.withEndIndices) { elem.endIndex = this.parser.endIndex; } if (this.elementCB) this.elementCB(elem); }; DomHandler2.prototype.onopentag = function(name2, attribs) { var type = this.options.xmlMode ? domelementtype_12.ElementType.Tag : void 0; var element = new node_1.Element(name2, attribs, void 0, type); this.addNode(element); this.tagStack.push(element); }; DomHandler2.prototype.ontext = function(data) { var normalizeWhitespace = this.options.normalizeWhitespace; var lastNode = this.lastNode; if (lastNode && lastNode.type === domelementtype_12.ElementType.Text) { if (normalizeWhitespace) { lastNode.data = (lastNode.data + data).replace(reWhitespace, " "); } else { lastNode.data += data; } if (this.options.withEndIndices) { lastNode.endIndex = this.parser.endIndex; } } else { if (normalizeWhitespace) { data = data.replace(reWhitespace, " "); } var node2 = new node_1.Text(data); this.addNode(node2); this.lastNode = node2; } }; DomHandler2.prototype.oncomment = function(data) { if (this.lastNode && this.lastNode.type === domelementtype_12.ElementType.Comment) { this.lastNode.data += data; return; } var node2 = new node_1.Comment(data); this.addNode(node2); this.lastNode = node2; }; DomHandler2.prototype.oncommentend = function() { this.lastNode = null; }; DomHandler2.prototype.oncdatastart = function() { var text = new node_1.Text(""); var node2 = new node_1.NodeWithChildren(domelementtype_12.ElementType.CDATA, [text]); this.addNode(node2); text.parent = node2; this.lastNode = text; }; DomHandler2.prototype.oncdataend = function() { this.lastNode = null; }; DomHandler2.prototype.onprocessinginstruction = function(name2, data) { var node2 = new node_1.ProcessingInstruction(name2, data); this.addNode(node2); }; DomHandler2.prototype.handleCallback = function(error2) { if (typeof this.callback === "function") { this.callback(error2, this.dom); } else if (error2) { throw error2; } }; DomHandler2.prototype.addNode = function(node2) { var parent = this.tagStack[this.tagStack.length - 1]; var previousSibling = parent.children[parent.children.length - 1]; if (this.options.withStartIndices) { node2.startIndex = this.parser.startIndex; } if (this.options.withEndIndices) { node2.endIndex = this.parser.endIndex; } parent.children.push(node2); if (previousSibling) { node2.prev = previousSibling; previousSibling.next = node2; } node2.parent = parent; this.lastNode = null; }; return DomHandler2; }(); exports.DomHandler = DomHandler; exports.default = DomHandler; })(lib$6); var lib$4 = {}; var lib$3 = {}; var decode = {}; var Aacute$1 = "\xC1"; var aacute$1 = "\xE1"; var Abreve = "\u0102"; var abreve = "\u0103"; var ac = "\u223E"; var acd = "\u223F"; var acE = "\u223E\u0333"; var Acirc$1 = "\xC2"; var acirc$1 = "\xE2"; var acute$1 = "\xB4"; var Acy = "\u0410"; var acy = "\u0430"; var AElig$1 = "\xC6"; var aelig$1 = "\xE6"; var af = "\u2061"; var Afr = "\u{1D504}"; var afr = "\u{1D51E}"; var Agrave$1 = "\xC0"; var agrave$1 = "\xE0"; var alefsym = "\u2135"; var aleph = "\u2135"; var Alpha = "\u0391"; var alpha = "\u03B1"; var Amacr = "\u0100"; var amacr = "\u0101"; var amalg = "\u2A3F"; var amp$2 = "&"; var AMP$1 = "&"; var andand = "\u2A55"; var And = "\u2A53"; var and = "\u2227"; var andd = "\u2A5C"; var andslope = "\u2A58"; var andv = "\u2A5A"; var ang = "\u2220"; var ange = "\u29A4"; var angle = "\u2220"; var angmsdaa = "\u29A8"; var angmsdab = "\u29A9"; var angmsdac = "\u29AA"; var angmsdad = "\u29AB"; var angmsdae = "\u29AC"; var angmsdaf = "\u29AD"; var angmsdag = "\u29AE"; var angmsdah = "\u29AF"; var angmsd = "\u2221"; var angrt = "\u221F"; var angrtvb = "\u22BE"; var angrtvbd = "\u299D"; var angsph = "\u2222"; var angst = "\xC5"; var angzarr = "\u237C"; var Aogon = "\u0104"; var aogon = "\u0105"; var Aopf = "\u{1D538}"; var aopf = "\u{1D552}"; var apacir = "\u2A6F"; var ap = "\u2248"; var apE = "\u2A70"; var ape = "\u224A"; var apid = "\u224B"; var apos$1 = "'"; var ApplyFunction = "\u2061"; var approx = "\u2248"; var approxeq = "\u224A"; var Aring$1 = "\xC5"; var aring$1 = "\xE5"; var Ascr = "\u{1D49C}"; var ascr = "\u{1D4B6}"; var Assign = "\u2254"; var ast = "*"; var asymp = "\u2248"; var asympeq = "\u224D"; var Atilde$1 = "\xC3"; var atilde$1 = "\xE3"; var Auml$1 = "\xC4"; var auml$1 = "\xE4"; var awconint = "\u2233"; var awint = "\u2A11"; var backcong = "\u224C"; var backepsilon = "\u03F6"; var backprime = "\u2035"; var backsim = "\u223D"; var backsimeq = "\u22CD"; var Backslash = "\u2216"; var Barv = "\u2AE7"; var barvee = "\u22BD"; var barwed = "\u2305"; var Barwed = "\u2306"; var barwedge = "\u2305"; var bbrk = "\u23B5"; var bbrktbrk = "\u23B6"; var bcong = "\u224C"; var Bcy = "\u0411"; var bcy = "\u0431"; var bdquo = "\u201E"; var becaus = "\u2235"; var because = "\u2235"; var Because = "\u2235"; var bemptyv = "\u29B0"; var bepsi = "\u03F6"; var bernou = "\u212C"; var Bernoullis = "\u212C"; var Beta = "\u0392"; var beta = "\u03B2"; var beth = "\u2136"; var between = "\u226C"; var Bfr = "\u{1D505}"; var bfr = "\u{1D51F}"; var bigcap = "\u22C2"; var bigcirc = "\u25EF"; var bigcup = "\u22C3"; var bigodot = "\u2A00"; var bigoplus = "\u2A01"; var bigotimes = "\u2A02"; var bigsqcup = "\u2A06"; var bigstar = "\u2605"; var bigtriangledown = "\u25BD"; var bigtriangleup = "\u25B3"; var biguplus = "\u2A04"; var bigvee = "\u22C1"; var bigwedge = "\u22C0"; var bkarow = "\u290D"; var blacklozenge = "\u29EB"; var blacksquare = "\u25AA"; var blacktriangle = "\u25B4"; var blacktriangledown = "\u25BE"; var blacktriangleleft = "\u25C2"; var blacktriangleright = "\u25B8"; var blank = "\u2423"; var blk12 = "\u2592"; var blk14 = "\u2591"; var blk34 = "\u2593"; var block = "\u2588"; var bne = "=\u20E5"; var bnequiv = "\u2261\u20E5"; var bNot = "\u2AED"; var bnot = "\u2310"; var Bopf = "\u{1D539}"; var bopf = "\u{1D553}"; var bot = "\u22A5"; var bottom = "\u22A5"; var bowtie = "\u22C8"; var boxbox = "\u29C9"; var boxdl = "\u2510"; var boxdL = "\u2555"; var boxDl = "\u2556"; var boxDL = "\u2557"; var boxdr = "\u250C"; var boxdR = "\u2552"; var boxDr = "\u2553"; var boxDR = "\u2554"; var boxh = "\u2500"; var boxH = "\u2550"; var boxhd = "\u252C"; var boxHd = "\u2564"; var boxhD = "\u2565"; var boxHD = "\u2566"; var boxhu = "\u2534"; var boxHu = "\u2567"; var boxhU = "\u2568"; var boxHU = "\u2569"; var boxminus = "\u229F"; var boxplus = "\u229E"; var boxtimes = "\u22A0"; var boxul = "\u2518"; var boxuL = "\u255B"; var boxUl = "\u255C"; var boxUL = "\u255D"; var boxur = "\u2514"; var boxuR = "\u2558"; var boxUr = "\u2559"; var boxUR = "\u255A"; var boxv = "\u2502"; var boxV = "\u2551"; var boxvh = "\u253C"; var boxvH = "\u256A"; var boxVh = "\u256B"; var boxVH = "\u256C"; var boxvl = "\u2524"; var boxvL = "\u2561"; var boxVl = "\u2562"; var boxVL = "\u2563"; var boxvr = "\u251C"; var boxvR = "\u255E"; var boxVr = "\u255F"; var boxVR = "\u2560"; var bprime = "\u2035"; var breve = "\u02D8"; var Breve = "\u02D8"; var brvbar$1 = "\xA6"; var bscr = "\u{1D4B7}"; var Bscr = "\u212C"; var bsemi = "\u204F"; var bsim = "\u223D"; var bsime = "\u22CD"; var bsolb = "\u29C5"; var bsol = "\\"; var bsolhsub = "\u27C8"; var bull = "\u2022"; var bullet = "\u2022"; var bump = "\u224E"; var bumpE = "\u2AAE"; var bumpe = "\u224F"; var Bumpeq = "\u224E"; var bumpeq = "\u224F"; var Cacute = "\u0106"; var cacute = "\u0107"; var capand = "\u2A44"; var capbrcup = "\u2A49"; var capcap = "\u2A4B"; var cap = "\u2229"; var Cap = "\u22D2"; var capcup = "\u2A47"; var capdot = "\u2A40"; var CapitalDifferentialD = "\u2145"; var caps = "\u2229\uFE00"; var caret = "\u2041"; var caron = "\u02C7"; var Cayleys = "\u212D"; var ccaps = "\u2A4D"; var Ccaron = "\u010C"; var ccaron = "\u010D"; var Ccedil$1 = "\xC7"; var ccedil$1 = "\xE7"; var Ccirc = "\u0108"; var ccirc = "\u0109"; var Cconint = "\u2230"; var ccups = "\u2A4C"; var ccupssm = "\u2A50"; var Cdot = "\u010A"; var cdot = "\u010B"; var cedil$1 = "\xB8"; var Cedilla = "\xB8"; var cemptyv = "\u29B2"; var cent$1 = "\xA2"; var centerdot = "\xB7"; var CenterDot = "\xB7"; var cfr = "\u{1D520}"; var Cfr = "\u212D"; var CHcy = "\u0427"; var chcy = "\u0447"; var check = "\u2713"; var checkmark = "\u2713"; var Chi = "\u03A7"; var chi = "\u03C7"; var circ = "\u02C6"; var circeq = "\u2257"; var circlearrowleft = "\u21BA"; var circlearrowright = "\u21BB"; var circledast = "\u229B"; var circledcirc = "\u229A"; var circleddash = "\u229D"; var CircleDot = "\u2299"; var circledR = "\xAE"; var circledS = "\u24C8"; var CircleMinus = "\u2296"; var CirclePlus = "\u2295"; var CircleTimes = "\u2297"; var cir = "\u25CB"; var cirE = "\u29C3"; var cire = "\u2257"; var cirfnint = "\u2A10"; var cirmid = "\u2AEF"; var cirscir = "\u29C2"; var ClockwiseContourIntegral = "\u2232"; var CloseCurlyDoubleQuote = "\u201D"; var CloseCurlyQuote = "\u2019"; var clubs = "\u2663"; var clubsuit = "\u2663"; var colon = ":"; var Colon = "\u2237"; var Colone = "\u2A74"; var colone = "\u2254"; var coloneq = "\u2254"; var comma = ","; var commat = "@"; var comp = "\u2201"; var compfn = "\u2218"; var complement = "\u2201"; var complexes = "\u2102"; var cong = "\u2245"; var congdot = "\u2A6D"; var Congruent = "\u2261"; var conint = "\u222E"; var Conint = "\u222F"; var ContourIntegral = "\u222E"; var copf = "\u{1D554}"; var Copf = "\u2102"; var coprod = "\u2210"; var Coproduct = "\u2210"; var copy$2 = "\xA9"; var COPY$1 = "\xA9"; var copysr = "\u2117"; var CounterClockwiseContourIntegral = "\u2233"; var crarr = "\u21B5"; var cross$1 = "\u2717"; var Cross = "\u2A2F"; var Cscr = "\u{1D49E}"; var cscr = "\u{1D4B8}"; var csub = "\u2ACF"; var csube = "\u2AD1"; var csup = "\u2AD0"; var csupe = "\u2AD2"; var ctdot = "\u22EF"; var cudarrl = "\u2938"; var cudarrr = "\u2935"; var cuepr = "\u22DE"; var cuesc = "\u22DF"; var cularr = "\u21B6"; var cularrp = "\u293D"; var cupbrcap = "\u2A48"; var cupcap = "\u2A46"; var CupCap = "\u224D"; var cup = "\u222A"; var Cup = "\u22D3"; var cupcup = "\u2A4A"; var cupdot = "\u228D"; var cupor = "\u2A45"; var cups = "\u222A\uFE00"; var curarr = "\u21B7"; var curarrm = "\u293C"; var curlyeqprec = "\u22DE"; var curlyeqsucc = "\u22DF"; var curlyvee = "\u22CE"; var curlywedge = "\u22CF"; var curren$1 = "\xA4"; var curvearrowleft = "\u21B6"; var curvearrowright = "\u21B7"; var cuvee = "\u22CE"; var cuwed = "\u22CF"; var cwconint = "\u2232"; var cwint = "\u2231"; var cylcty = "\u232D"; var dagger = "\u2020"; var Dagger = "\u2021"; var daleth = "\u2138"; var darr = "\u2193"; var Darr = "\u21A1"; var dArr = "\u21D3"; var dash = "\u2010"; var Dashv = "\u2AE4"; var dashv = "\u22A3"; var dbkarow = "\u290F"; var dblac = "\u02DD"; var Dcaron = "\u010E"; var dcaron = "\u010F"; var Dcy = "\u0414"; var dcy = "\u0434"; var ddagger = "\u2021"; var ddarr = "\u21CA"; var DD = "\u2145"; var dd = "\u2146"; var DDotrahd = "\u2911"; var ddotseq = "\u2A77"; var deg$1 = "\xB0"; var Del = "\u2207"; var Delta = "\u0394"; var delta = "\u03B4"; var demptyv = "\u29B1"; var dfisht = "\u297F"; var Dfr = "\u{1D507}"; var dfr = "\u{1D521}"; var dHar = "\u2965"; var dharl = "\u21C3"; var dharr = "\u21C2"; var DiacriticalAcute = "\xB4"; var DiacriticalDot = "\u02D9"; var DiacriticalDoubleAcute = "\u02DD"; var DiacriticalGrave = "`"; var DiacriticalTilde = "\u02DC"; var diam = "\u22C4"; var diamond = "\u22C4"; var Diamond = "\u22C4"; var diamondsuit = "\u2666"; var diams = "\u2666"; var die = "\xA8"; var DifferentialD = "\u2146"; var digamma = "\u03DD"; var disin = "\u22F2"; var div = "\xF7"; var divide$1 = "\xF7"; var divideontimes = "\u22C7"; var divonx = "\u22C7"; var DJcy = "\u0402"; var djcy = "\u0452"; var dlcorn = "\u231E"; var dlcrop = "\u230D"; var dollar = "$"; var Dopf = "\u{1D53B}"; var dopf = "\u{1D555}"; var Dot = "\xA8"; var dot$1 = "\u02D9"; var DotDot = "\u20DC"; var doteq = "\u2250"; var doteqdot = "\u2251"; var DotEqual = "\u2250"; var dotminus = "\u2238"; var dotplus = "\u2214"; var dotsquare = "\u22A1"; var doublebarwedge = "\u2306"; var DoubleContourIntegral = "\u222F"; var DoubleDot = "\xA8"; var DoubleDownArrow = "\u21D3"; var DoubleLeftArrow = "\u21D0"; var DoubleLeftRightArrow = "\u21D4"; var DoubleLeftTee = "\u2AE4"; var DoubleLongLeftArrow = "\u27F8"; var DoubleLongLeftRightArrow = "\u27FA"; var DoubleLongRightArrow = "\u27F9"; var DoubleRightArrow = "\u21D2"; var DoubleRightTee = "\u22A8"; var DoubleUpArrow = "\u21D1"; var DoubleUpDownArrow = "\u21D5"; var DoubleVerticalBar = "\u2225"; var DownArrowBar = "\u2913"; var downarrow = "\u2193"; var DownArrow = "\u2193"; var Downarrow = "\u21D3"; var DownArrowUpArrow = "\u21F5"; var DownBreve = "\u0311"; var downdownarrows = "\u21CA"; var downharpoonleft = "\u21C3"; var downharpoonright = "\u21C2"; var DownLeftRightVector = "\u2950"; var DownLeftTeeVector = "\u295E"; var DownLeftVectorBar = "\u2956"; var DownLeftVector = "\u21BD"; var DownRightTeeVector = "\u295F"; var DownRightVectorBar = "\u2957"; var DownRightVector = "\u21C1"; var DownTeeArrow = "\u21A7"; var DownTee = "\u22A4"; var drbkarow = "\u2910"; var drcorn = "\u231F"; var drcrop = "\u230C"; var Dscr = "\u{1D49F}"; var dscr = "\u{1D4B9}"; var DScy = "\u0405"; var dscy = "\u0455"; var dsol = "\u29F6"; var Dstrok = "\u0110"; var dstrok = "\u0111"; var dtdot = "\u22F1"; var dtri = "\u25BF"; var dtrif = "\u25BE"; var duarr = "\u21F5"; var duhar = "\u296F"; var dwangle = "\u29A6"; var DZcy = "\u040F"; var dzcy = "\u045F"; var dzigrarr = "\u27FF"; var Eacute$1 = "\xC9"; var eacute$1 = "\xE9"; var easter = "\u2A6E"; var Ecaron = "\u011A"; var ecaron = "\u011B"; var Ecirc$1 = "\xCA"; var ecirc$1 = "\xEA"; var ecir = "\u2256"; var ecolon = "\u2255"; var Ecy = "\u042D"; var ecy = "\u044D"; var eDDot = "\u2A77"; var Edot = "\u0116"; var edot = "\u0117"; var eDot = "\u2251"; var ee = "\u2147"; var efDot = "\u2252"; var Efr = "\u{1D508}"; var efr = "\u{1D522}"; var eg = "\u2A9A"; var Egrave$1 = "\xC8"; var egrave$1 = "\xE8"; var egs = "\u2A96"; var egsdot = "\u2A98"; var el = "\u2A99"; var Element = "\u2208"; var elinters = "\u23E7"; var ell = "\u2113"; var els = "\u2A95"; var elsdot = "\u2A97"; var Emacr = "\u0112"; var emacr = "\u0113"; var empty = "\u2205"; var emptyset = "\u2205"; var EmptySmallSquare = "\u25FB"; var emptyv = "\u2205"; var EmptyVerySmallSquare = "\u25AB"; var emsp13 = "\u2004"; var emsp14 = "\u2005"; var emsp = "\u2003"; var ENG = "\u014A"; var eng = "\u014B"; var ensp = "\u2002"; var Eogon = "\u0118"; var eogon = "\u0119"; var Eopf = "\u{1D53C}"; var eopf = "\u{1D556}"; var epar = "\u22D5"; var eparsl = "\u29E3"; var eplus = "\u2A71"; var epsi = "\u03B5"; var Epsilon = "\u0395"; var epsilon = "\u03B5"; var epsiv = "\u03F5"; var eqcirc = "\u2256"; var eqcolon = "\u2255"; var eqsim = "\u2242"; var eqslantgtr = "\u2A96"; var eqslantless = "\u2A95"; var Equal = "\u2A75"; var equals = "="; var EqualTilde = "\u2242"; var equest = "\u225F"; var Equilibrium = "\u21CC"; var equiv = "\u2261"; var equivDD = "\u2A78"; var eqvparsl = "\u29E5"; var erarr = "\u2971"; var erDot = "\u2253"; var escr = "\u212F"; var Escr = "\u2130"; var esdot = "\u2250"; var Esim = "\u2A73"; var esim = "\u2242"; var Eta = "\u0397"; var eta = "\u03B7"; var ETH$1 = "\xD0"; var eth$1 = "\xF0"; var Euml$1 = "\xCB"; var euml$1 = "\xEB"; var euro = "\u20AC"; var excl = "!"; var exist = "\u2203"; var Exists = "\u2203"; var expectation = "\u2130"; var exponentiale = "\u2147"; var ExponentialE = "\u2147"; var fallingdotseq = "\u2252"; var Fcy = "\u0424"; var fcy = "\u0444"; var female = "\u2640"; var ffilig = "\uFB03"; var fflig = "\uFB00"; var ffllig = "\uFB04"; var Ffr = "\u{1D509}"; var ffr = "\u{1D523}"; var filig = "\uFB01"; var FilledSmallSquare = "\u25FC"; var FilledVerySmallSquare = "\u25AA"; var fjlig = "fj"; var flat = "\u266D"; var fllig = "\uFB02"; var fltns = "\u25B1"; var fnof = "\u0192"; var Fopf = "\u{1D53D}"; var fopf = "\u{1D557}"; var forall = "\u2200"; var ForAll = "\u2200"; var fork = "\u22D4"; var forkv = "\u2AD9"; var Fouriertrf = "\u2131"; var fpartint = "\u2A0D"; var frac12$1 = "\xBD"; var frac13 = "\u2153"; var frac14$1 = "\xBC"; var frac15 = "\u2155"; var frac16 = "\u2159"; var frac18 = "\u215B"; var frac23 = "\u2154"; var frac25 = "\u2156"; var frac34$1 = "\xBE"; var frac35 = "\u2157"; var frac38 = "\u215C"; var frac45 = "\u2158"; var frac56 = "\u215A"; var frac58 = "\u215D"; var frac78 = "\u215E"; var frasl = "\u2044"; var frown = "\u2322"; var fscr = "\u{1D4BB}"; var Fscr = "\u2131"; var gacute = "\u01F5"; var Gamma = "\u0393"; var gamma = "\u03B3"; var Gammad = "\u03DC"; var gammad = "\u03DD"; var gap = "\u2A86"; var Gbreve = "\u011E"; var gbreve = "\u011F"; var Gcedil = "\u0122"; var Gcirc = "\u011C"; var gcirc = "\u011D"; var Gcy = "\u0413"; var gcy = "\u0433"; var Gdot = "\u0120"; var gdot = "\u0121"; var ge = "\u2265"; var gE = "\u2267"; var gEl = "\u2A8C"; var gel = "\u22DB"; var geq = "\u2265"; var geqq = "\u2267"; var geqslant = "\u2A7E"; var gescc = "\u2AA9"; var ges = "\u2A7E"; var gesdot = "\u2A80"; var gesdoto = "\u2A82"; var gesdotol = "\u2A84"; var gesl = "\u22DB\uFE00"; var gesles = "\u2A94"; var Gfr = "\u{1D50A}"; var gfr = "\u{1D524}"; var gg = "\u226B"; var Gg = "\u22D9"; var ggg = "\u22D9"; var gimel = "\u2137"; var GJcy = "\u0403"; var gjcy = "\u0453"; var gla = "\u2AA5"; var gl = "\u2277"; var glE = "\u2A92"; var glj = "\u2AA4"; var gnap = "\u2A8A"; var gnapprox = "\u2A8A"; var gne = "\u2A88"; var gnE = "\u2269"; var gneq = "\u2A88"; var gneqq = "\u2269"; var gnsim = "\u22E7"; var Gopf = "\u{1D53E}"; var gopf = "\u{1D558}"; var grave = "`"; var GreaterEqual = "\u2265"; var GreaterEqualLess = "\u22DB"; var GreaterFullEqual = "\u2267"; var GreaterGreater = "\u2AA2"; var GreaterLess = "\u2277"; var GreaterSlantEqual = "\u2A7E"; var GreaterTilde = "\u2273"; var Gscr = "\u{1D4A2}"; var gscr = "\u210A"; var gsim = "\u2273"; var gsime = "\u2A8E"; var gsiml = "\u2A90"; var gtcc = "\u2AA7"; var gtcir = "\u2A7A"; var gt$2 = ">"; var GT$1 = ">"; var Gt = "\u226B"; var gtdot = "\u22D7"; var gtlPar = "\u2995"; var gtquest = "\u2A7C"; var gtrapprox = "\u2A86"; var gtrarr = "\u2978"; var gtrdot = "\u22D7"; var gtreqless = "\u22DB"; var gtreqqless = "\u2A8C"; var gtrless = "\u2277"; var gtrsim = "\u2273"; var gvertneqq = "\u2269\uFE00"; var gvnE = "\u2269\uFE00"; var Hacek = "\u02C7"; var hairsp = "\u200A"; var half = "\xBD"; var hamilt = "\u210B"; var HARDcy = "\u042A"; var hardcy = "\u044A"; var harrcir = "\u2948"; var harr = "\u2194"; var hArr = "\u21D4"; var harrw = "\u21AD"; var Hat = "^"; var hbar = "\u210F"; var Hcirc = "\u0124"; var hcirc = "\u0125"; var hearts = "\u2665"; var heartsuit = "\u2665"; var hellip = "\u2026"; var hercon = "\u22B9"; var hfr = "\u{1D525}"; var Hfr = "\u210C"; var HilbertSpace = "\u210B"; var hksearow = "\u2925"; var hkswarow = "\u2926"; var hoarr = "\u21FF"; var homtht = "\u223B"; var hookleftarrow = "\u21A9"; var hookrightarrow = "\u21AA"; var hopf = "\u{1D559}"; var Hopf = "\u210D"; var horbar = "\u2015"; var HorizontalLine = "\u2500"; var hscr = "\u{1D4BD}"; var Hscr = "\u210B"; var hslash = "\u210F"; var Hstrok = "\u0126"; var hstrok = "\u0127"; var HumpDownHump = "\u224E"; var HumpEqual = "\u224F"; var hybull = "\u2043"; var hyphen = "\u2010"; var Iacute$1 = "\xCD"; var iacute$1 = "\xED"; var ic = "\u2063"; var Icirc$1 = "\xCE"; var icirc$1 = "\xEE"; var Icy = "\u0418"; var icy = "\u0438"; var Idot = "\u0130"; var IEcy = "\u0415"; var iecy = "\u0435"; var iexcl$1 = "\xA1"; var iff = "\u21D4"; var ifr = "\u{1D526}"; var Ifr = "\u2111"; var Igrave$1 = "\xCC"; var igrave$1 = "\xEC"; var ii = "\u2148"; var iiiint = "\u2A0C"; var iiint = "\u222D"; var iinfin = "\u29DC"; var iiota = "\u2129"; var IJlig = "\u0132"; var ijlig = "\u0133"; var Imacr = "\u012A"; var imacr = "\u012B"; var image = "\u2111"; var ImaginaryI = "\u2148"; var imagline = "\u2110"; var imagpart = "\u2111"; var imath = "\u0131"; var Im = "\u2111"; var imof = "\u22B7"; var imped = "\u01B5"; var Implies = "\u21D2"; var incare = "\u2105"; var infin = "\u221E"; var infintie = "\u29DD"; var inodot = "\u0131"; var intcal = "\u22BA"; var int = "\u222B"; var Int = "\u222C"; var integers = "\u2124"; var Integral = "\u222B"; var intercal = "\u22BA"; var Intersection = "\u22C2"; var intlarhk = "\u2A17"; var intprod = "\u2A3C"; var InvisibleComma = "\u2063"; var InvisibleTimes = "\u2062"; var IOcy = "\u0401"; var iocy = "\u0451"; var Iogon = "\u012E"; var iogon = "\u012F"; var Iopf = "\u{1D540}"; var iopf = "\u{1D55A}"; var Iota = "\u0399"; var iota = "\u03B9"; var iprod = "\u2A3C"; var iquest$1 = "\xBF"; var iscr = "\u{1D4BE}"; var Iscr = "\u2110"; var isin = "\u2208"; var isindot = "\u22F5"; var isinE = "\u22F9"; var isins = "\u22F4"; var isinsv = "\u22F3"; var isinv = "\u2208"; var it = "\u2062"; var Itilde = "\u0128"; var itilde = "\u0129"; var Iukcy = "\u0406"; var iukcy = "\u0456"; var Iuml$1 = "\xCF"; var iuml$1 = "\xEF"; var Jcirc = "\u0134"; var jcirc = "\u0135"; var Jcy = "\u0419"; var jcy = "\u0439"; var Jfr = "\u{1D50D}"; var jfr = "\u{1D527}"; var jmath = "\u0237"; var Jopf = "\u{1D541}"; var jopf = "\u{1D55B}"; var Jscr = "\u{1D4A5}"; var jscr = "\u{1D4BF}"; var Jsercy = "\u0408"; var jsercy = "\u0458"; var Jukcy = "\u0404"; var jukcy = "\u0454"; var Kappa = "\u039A"; var kappa = "\u03BA"; var kappav = "\u03F0"; var Kcedil = "\u0136"; var kcedil = "\u0137"; var Kcy = "\u041A"; var kcy = "\u043A"; var Kfr = "\u{1D50E}"; var kfr = "\u{1D528}"; var kgreen = "\u0138"; var KHcy = "\u0425"; var khcy = "\u0445"; var KJcy = "\u040C"; var kjcy = "\u045C"; var Kopf = "\u{1D542}"; var kopf = "\u{1D55C}"; var Kscr = "\u{1D4A6}"; var kscr = "\u{1D4C0}"; var lAarr = "\u21DA"; var Lacute = "\u0139"; var lacute = "\u013A"; var laemptyv = "\u29B4"; var lagran = "\u2112"; var Lambda = "\u039B"; var lambda = "\u03BB"; var lang = "\u27E8"; var Lang = "\u27EA"; var langd = "\u2991"; var langle = "\u27E8"; var lap = "\u2A85"; var Laplacetrf = "\u2112"; var laquo$1 = "\xAB"; var larrb = "\u21E4"; var larrbfs = "\u291F"; var larr = "\u2190"; var Larr = "\u219E"; var lArr = "\u21D0"; var larrfs = "\u291D"; var larrhk = "\u21A9"; var larrlp = "\u21AB"; var larrpl = "\u2939"; var larrsim = "\u2973"; var larrtl = "\u21A2"; var latail = "\u2919"; var lAtail = "\u291B"; var lat = "\u2AAB"; var late = "\u2AAD"; var lates = "\u2AAD\uFE00"; var lbarr = "\u290C"; var lBarr = "\u290E"; var lbbrk = "\u2772"; var lbrace = "{"; var lbrack = "["; var lbrke = "\u298B"; var lbrksld = "\u298F"; var lbrkslu = "\u298D"; var Lcaron = "\u013D"; var lcaron = "\u013E"; var Lcedil = "\u013B"; var lcedil = "\u013C"; var lceil = "\u2308"; var lcub = "{"; var Lcy = "\u041B"; var lcy = "\u043B"; var ldca = "\u2936"; var ldquo = "\u201C"; var ldquor = "\u201E"; var ldrdhar = "\u2967"; var ldrushar = "\u294B"; var ldsh = "\u21B2"; var le = "\u2264"; var lE = "\u2266"; var LeftAngleBracket = "\u27E8"; var LeftArrowBar = "\u21E4"; var leftarrow = "\u2190"; var LeftArrow = "\u2190"; var Leftarrow = "\u21D0"; var LeftArrowRightArrow = "\u21C6"; var leftarrowtail = "\u21A2"; var LeftCeiling = "\u2308"; var LeftDoubleBracket = "\u27E6"; var LeftDownTeeVector = "\u2961"; var LeftDownVectorBar = "\u2959"; var LeftDownVector = "\u21C3"; var LeftFloor = "\u230A"; var leftharpoondown = "\u21BD"; var leftharpoonup = "\u21BC"; var leftleftarrows = "\u21C7"; var leftrightarrow = "\u2194"; var LeftRightArrow = "\u2194"; var Leftrightarrow = "\u21D4"; var leftrightarrows = "\u21C6"; var leftrightharpoons = "\u21CB"; var leftrightsquigarrow = "\u21AD"; var LeftRightVector = "\u294E"; var LeftTeeArrow = "\u21A4"; var LeftTee = "\u22A3"; var LeftTeeVector = "\u295A"; var leftthreetimes = "\u22CB"; var LeftTriangleBar = "\u29CF"; var LeftTriangle = "\u22B2"; var LeftTriangleEqual = "\u22B4"; var LeftUpDownVector = "\u2951"; var LeftUpTeeVector = "\u2960"; var LeftUpVectorBar = "\u2958"; var LeftUpVector = "\u21BF"; var LeftVectorBar = "\u2952"; var LeftVector = "\u21BC"; var lEg = "\u2A8B"; var leg = "\u22DA"; var leq = "\u2264"; var leqq = "\u2266"; var leqslant = "\u2A7D"; var lescc = "\u2AA8"; var les = "\u2A7D"; var lesdot = "\u2A7F"; var lesdoto = "\u2A81"; var lesdotor = "\u2A83"; var lesg = "\u22DA\uFE00"; var lesges = "\u2A93"; var lessapprox = "\u2A85"; var lessdot = "\u22D6"; var lesseqgtr = "\u22DA"; var lesseqqgtr = "\u2A8B"; var LessEqualGreater = "\u22DA"; var LessFullEqual = "\u2266"; var LessGreater = "\u2276"; var lessgtr = "\u2276"; var LessLess = "\u2AA1"; var lesssim = "\u2272"; var LessSlantEqual = "\u2A7D"; var LessTilde = "\u2272"; var lfisht = "\u297C"; var lfloor = "\u230A"; var Lfr = "\u{1D50F}"; var lfr = "\u{1D529}"; var lg = "\u2276"; var lgE = "\u2A91"; var lHar = "\u2962"; var lhard = "\u21BD"; var lharu = "\u21BC"; var lharul = "\u296A"; var lhblk = "\u2584"; var LJcy = "\u0409"; var ljcy = "\u0459"; var llarr = "\u21C7"; var ll = "\u226A"; var Ll = "\u22D8"; var llcorner = "\u231E"; var Lleftarrow = "\u21DA"; var llhard = "\u296B"; var lltri = "\u25FA"; var Lmidot = "\u013F"; var lmidot = "\u0140"; var lmoustache = "\u23B0"; var lmoust = "\u23B0"; var lnap = "\u2A89"; var lnapprox = "\u2A89"; var lne = "\u2A87"; var lnE = "\u2268"; var lneq = "\u2A87"; var lneqq = "\u2268"; var lnsim = "\u22E6"; var loang = "\u27EC"; var loarr = "\u21FD"; var lobrk = "\u27E6"; var longleftarrow = "\u27F5"; var LongLeftArrow = "\u27F5"; var Longleftarrow = "\u27F8"; var longleftrightarrow = "\u27F7"; var LongLeftRightArrow = "\u27F7"; var Longleftrightarrow = "\u27FA"; var longmapsto = "\u27FC"; var longrightarrow = "\u27F6"; var LongRightArrow = "\u27F6"; var Longrightarrow = "\u27F9"; var looparrowleft = "\u21AB"; var looparrowright = "\u21AC"; var lopar = "\u2985"; var Lopf = "\u{1D543}"; var lopf = "\u{1D55D}"; var loplus = "\u2A2D"; var lotimes = "\u2A34"; var lowast = "\u2217"; var lowbar = "_"; var LowerLeftArrow = "\u2199"; var LowerRightArrow = "\u2198"; var loz = "\u25CA"; var lozenge = "\u25CA"; var lozf = "\u29EB"; var lpar = "("; var lparlt = "\u2993"; var lrarr = "\u21C6"; var lrcorner = "\u231F"; var lrhar = "\u21CB"; var lrhard = "\u296D"; var lrm = "\u200E"; var lrtri = "\u22BF"; var lsaquo = "\u2039"; var lscr = "\u{1D4C1}"; var Lscr = "\u2112"; var lsh = "\u21B0"; var Lsh = "\u21B0"; var lsim = "\u2272"; var lsime = "\u2A8D"; var lsimg = "\u2A8F"; var lsqb = "["; var lsquo = "\u2018"; var lsquor = "\u201A"; var Lstrok = "\u0141"; var lstrok = "\u0142"; var ltcc = "\u2AA6"; var ltcir = "\u2A79"; var lt$2 = "<"; var LT$1 = "<"; var Lt = "\u226A"; var ltdot = "\u22D6"; var lthree = "\u22CB"; var ltimes = "\u22C9"; var ltlarr = "\u2976"; var ltquest = "\u2A7B"; var ltri = "\u25C3"; var ltrie = "\u22B4"; var ltrif = "\u25C2"; var ltrPar = "\u2996"; var lurdshar = "\u294A"; var luruhar = "\u2966"; var lvertneqq = "\u2268\uFE00"; var lvnE = "\u2268\uFE00"; var macr$1 = "\xAF"; var male = "\u2642"; var malt = "\u2720"; var maltese = "\u2720"; var map = "\u21A6"; var mapsto = "\u21A6"; var mapstodown = "\u21A7"; var mapstoleft = "\u21A4"; var mapstoup = "\u21A5"; var marker = "\u25AE"; var mcomma = "\u2A29"; var Mcy = "\u041C"; var mcy = "\u043C"; var mdash = "\u2014"; var mDDot = "\u223A"; var measuredangle = "\u2221"; var MediumSpace = "\u205F"; var Mellintrf = "\u2133"; var Mfr = "\u{1D510}"; var mfr = "\u{1D52A}"; var mho = "\u2127"; var micro$1 = "\xB5"; var midast = "*"; var midcir = "\u2AF0"; var mid = "\u2223"; var middot$1 = "\xB7"; var minusb = "\u229F"; var minus$1 = "\u2212"; var minusd = "\u2238"; var minusdu = "\u2A2A"; var MinusPlus = "\u2213"; var mlcp = "\u2ADB"; var mldr = "\u2026"; var mnplus = "\u2213"; var models = "\u22A7"; var Mopf = "\u{1D544}"; var mopf = "\u{1D55E}"; var mp = "\u2213"; var mscr = "\u{1D4C2}"; var Mscr = "\u2133"; var mstpos = "\u223E"; var Mu = "\u039C"; var mu = "\u03BC"; var multimap = "\u22B8"; var mumap = "\u22B8"; var nabla = "\u2207"; var Nacute = "\u0143"; var nacute = "\u0144"; var nang = "\u2220\u20D2"; var nap = "\u2249"; var napE = "\u2A70\u0338"; var napid = "\u224B\u0338"; var napos = "\u0149"; var napprox = "\u2249"; var natural = "\u266E"; var naturals = "\u2115"; var natur = "\u266E"; var nbsp$1 = "\xA0"; var nbump = "\u224E\u0338"; var nbumpe = "\u224F\u0338"; var ncap = "\u2A43"; var Ncaron = "\u0147"; var ncaron = "\u0148"; var Ncedil = "\u0145"; var ncedil = "\u0146"; var ncong = "\u2247"; var ncongdot = "\u2A6D\u0338"; var ncup = "\u2A42"; var Ncy = "\u041D"; var ncy = "\u043D"; var ndash = "\u2013"; var nearhk = "\u2924"; var nearr = "\u2197"; var neArr = "\u21D7"; var nearrow = "\u2197"; var ne = "\u2260"; var nedot = "\u2250\u0338"; var NegativeMediumSpace = "\u200B"; var NegativeThickSpace = "\u200B"; var NegativeThinSpace = "\u200B"; var NegativeVeryThinSpace = "\u200B"; var nequiv = "\u2262"; var nesear = "\u2928"; var nesim = "\u2242\u0338"; var NestedGreaterGreater = "\u226B"; var NestedLessLess = "\u226A"; var NewLine = "\n"; var nexist = "\u2204"; var nexists = "\u2204"; var Nfr = "\u{1D511}"; var nfr = "\u{1D52B}"; var ngE = "\u2267\u0338"; var nge = "\u2271"; var ngeq = "\u2271"; var ngeqq = "\u2267\u0338"; var ngeqslant = "\u2A7E\u0338"; var nges = "\u2A7E\u0338"; var nGg = "\u22D9\u0338"; var ngsim = "\u2275"; var nGt = "\u226B\u20D2"; var ngt = "\u226F"; var ngtr = "\u226F"; var nGtv = "\u226B\u0338"; var nharr = "\u21AE"; var nhArr = "\u21CE"; var nhpar = "\u2AF2"; var ni = "\u220B"; var nis = "\u22FC"; var nisd = "\u22FA"; var niv = "\u220B"; var NJcy = "\u040A"; var njcy = "\u045A"; var nlarr = "\u219A"; var nlArr = "\u21CD"; var nldr = "\u2025"; var nlE = "\u2266\u0338"; var nle = "\u2270"; var nleftarrow = "\u219A"; var nLeftarrow = "\u21CD"; var nleftrightarrow = "\u21AE"; var nLeftrightarrow = "\u21CE"; var nleq = "\u2270"; var nleqq = "\u2266\u0338"; var nleqslant = "\u2A7D\u0338"; var nles = "\u2A7D\u0338"; var nless = "\u226E"; var nLl = "\u22D8\u0338"; var nlsim = "\u2274"; var nLt = "\u226A\u20D2"; var nlt = "\u226E"; var nltri = "\u22EA"; var nltrie = "\u22EC"; var nLtv = "\u226A\u0338"; var nmid = "\u2224"; var NoBreak = "\u2060"; var NonBreakingSpace = "\xA0"; var nopf = "\u{1D55F}"; var Nopf = "\u2115"; var Not = "\u2AEC"; var not$1 = "\xAC"; var NotCongruent = "\u2262"; var NotCupCap = "\u226D"; var NotDoubleVerticalBar = "\u2226"; var NotElement = "\u2209"; var NotEqual = "\u2260"; var NotEqualTilde = "\u2242\u0338"; var NotExists = "\u2204"; var NotGreater = "\u226F"; var NotGreaterEqual = "\u2271"; var NotGreaterFullEqual = "\u2267\u0338"; var NotGreaterGreater = "\u226B\u0338"; var NotGreaterLess = "\u2279"; var NotGreaterSlantEqual = "\u2A7E\u0338"; var NotGreaterTilde = "\u2275"; var NotHumpDownHump = "\u224E\u0338"; var NotHumpEqual = "\u224F\u0338"; var notin = "\u2209"; var notindot = "\u22F5\u0338"; var notinE = "\u22F9\u0338"; var notinva = "\u2209"; var notinvb = "\u22F7"; var notinvc = "\u22F6"; var NotLeftTriangleBar = "\u29CF\u0338"; var NotLeftTriangle = "\u22EA"; var NotLeftTriangleEqual = "\u22EC"; var NotLess = "\u226E"; var NotLessEqual = "\u2270"; var NotLessGreater = "\u2278"; var NotLessLess = "\u226A\u0338"; var NotLessSlantEqual = "\u2A7D\u0338"; var NotLessTilde = "\u2274"; var NotNestedGreaterGreater = "\u2AA2\u0338"; var NotNestedLessLess = "\u2AA1\u0338"; var notni = "\u220C"; var notniva = "\u220C"; var notnivb = "\u22FE"; var notnivc = "\u22FD"; var NotPrecedes = "\u2280"; var NotPrecedesEqual = "\u2AAF\u0338"; var NotPrecedesSlantEqual = "\u22E0"; var NotReverseElement = "\u220C"; var NotRightTriangleBar = "\u29D0\u0338"; var NotRightTriangle = "\u22EB"; var NotRightTriangleEqual = "\u22ED"; var NotSquareSubset = "\u228F\u0338"; var NotSquareSubsetEqual = "\u22E2"; var NotSquareSuperset = "\u2290\u0338"; var NotSquareSupersetEqual = "\u22E3"; var NotSubset = "\u2282\u20D2"; var NotSubsetEqual = "\u2288"; var NotSucceeds = "\u2281"; var NotSucceedsEqual = "\u2AB0\u0338"; var NotSucceedsSlantEqual = "\u22E1"; var NotSucceedsTilde = "\u227F\u0338"; var NotSuperset = "\u2283\u20D2"; var NotSupersetEqual = "\u2289"; var NotTilde = "\u2241"; var NotTildeEqual = "\u2244"; var NotTildeFullEqual = "\u2247"; var NotTildeTilde = "\u2249"; var NotVerticalBar = "\u2224"; var nparallel = "\u2226"; var npar = "\u2226"; var nparsl = "\u2AFD\u20E5"; var npart = "\u2202\u0338"; var npolint = "\u2A14"; var npr = "\u2280"; var nprcue = "\u22E0"; var nprec = "\u2280"; var npreceq = "\u2AAF\u0338"; var npre = "\u2AAF\u0338"; var nrarrc = "\u2933\u0338"; var nrarr = "\u219B"; var nrArr = "\u21CF"; var nrarrw = "\u219D\u0338"; var nrightarrow = "\u219B"; var nRightarrow = "\u21CF"; var nrtri = "\u22EB"; var nrtrie = "\u22ED"; var nsc = "\u2281"; var nsccue = "\u22E1"; var nsce = "\u2AB0\u0338"; var Nscr = "\u{1D4A9}"; var nscr = "\u{1D4C3}"; var nshortmid = "\u2224"; var nshortparallel = "\u2226"; var nsim = "\u2241"; var nsime = "\u2244"; var nsimeq = "\u2244"; var nsmid = "\u2224"; var nspar = "\u2226"; var nsqsube = "\u22E2"; var nsqsupe = "\u22E3"; var nsub = "\u2284"; var nsubE = "\u2AC5\u0338"; var nsube = "\u2288"; var nsubset = "\u2282\u20D2"; var nsubseteq = "\u2288"; var nsubseteqq = "\u2AC5\u0338"; var nsucc = "\u2281"; var nsucceq = "\u2AB0\u0338"; var nsup = "\u2285"; var nsupE = "\u2AC6\u0338"; var nsupe = "\u2289"; var nsupset = "\u2283\u20D2"; var nsupseteq = "\u2289"; var nsupseteqq = "\u2AC6\u0338"; var ntgl = "\u2279"; var Ntilde$1 = "\xD1"; var ntilde$1 = "\xF1"; var ntlg = "\u2278"; var ntriangleleft = "\u22EA"; var ntrianglelefteq = "\u22EC"; var ntriangleright = "\u22EB"; var ntrianglerighteq = "\u22ED"; var Nu = "\u039D"; var nu = "\u03BD"; var num = "#"; var numero = "\u2116"; var numsp = "\u2007"; var nvap = "\u224D\u20D2"; var nvdash = "\u22AC"; var nvDash = "\u22AD"; var nVdash = "\u22AE"; var nVDash = "\u22AF"; var nvge = "\u2265\u20D2"; var nvgt = ">\u20D2"; var nvHarr = "\u2904"; var nvinfin = "\u29DE"; var nvlArr = "\u2902"; var nvle = "\u2264\u20D2"; var nvlt = "<\u20D2"; var nvltrie = "\u22B4\u20D2"; var nvrArr = "\u2903"; var nvrtrie = "\u22B5\u20D2"; var nvsim = "\u223C\u20D2"; var nwarhk = "\u2923"; var nwarr = "\u2196"; var nwArr = "\u21D6"; var nwarrow = "\u2196"; var nwnear = "\u2927"; var Oacute$1 = "\xD3"; var oacute$1 = "\xF3"; var oast = "\u229B"; var Ocirc$1 = "\xD4"; var ocirc$1 = "\xF4"; var ocir = "\u229A"; var Ocy = "\u041E"; var ocy = "\u043E"; var odash = "\u229D"; var Odblac = "\u0150"; var odblac = "\u0151"; var odiv = "\u2A38"; var odot = "\u2299"; var odsold = "\u29BC"; var OElig = "\u0152"; var oelig = "\u0153"; var ofcir = "\u29BF"; var Ofr = "\u{1D512}"; var ofr = "\u{1D52C}"; var ogon = "\u02DB"; var Ograve$1 = "\xD2"; var ograve$1 = "\xF2"; var ogt = "\u29C1"; var ohbar = "\u29B5"; var ohm = "\u03A9"; var oint = "\u222E"; var olarr = "\u21BA"; var olcir = "\u29BE"; var olcross = "\u29BB"; var oline = "\u203E"; var olt = "\u29C0"; var Omacr = "\u014C"; var omacr = "\u014D"; var Omega = "\u03A9"; var omega = "\u03C9"; var Omicron = "\u039F"; var omicron = "\u03BF"; var omid = "\u29B6"; var ominus = "\u2296"; var Oopf = "\u{1D546}"; var oopf = "\u{1D560}"; var opar = "\u29B7"; var OpenCurlyDoubleQuote = "\u201C"; var OpenCurlyQuote = "\u2018"; var operp = "\u29B9"; var oplus = "\u2295"; var orarr = "\u21BB"; var Or = "\u2A54"; var or = "\u2228"; var ord = "\u2A5D"; var order = "\u2134"; var orderof = "\u2134"; var ordf$1 = "\xAA"; var ordm$1 = "\xBA"; var origof = "\u22B6"; var oror = "\u2A56"; var orslope = "\u2A57"; var orv = "\u2A5B"; var oS = "\u24C8"; var Oscr = "\u{1D4AA}"; var oscr = "\u2134"; var Oslash$1 = "\xD8"; var oslash$1 = "\xF8"; var osol = "\u2298"; var Otilde$1 = "\xD5"; var otilde$1 = "\xF5"; var otimesas = "\u2A36"; var Otimes = "\u2A37"; var otimes = "\u2297"; var Ouml$1 = "\xD6"; var ouml$1 = "\xF6"; var ovbar = "\u233D"; var OverBar = "\u203E"; var OverBrace = "\u23DE"; var OverBracket = "\u23B4"; var OverParenthesis = "\u23DC"; var para$1 = "\xB6"; var parallel = "\u2225"; var par = "\u2225"; var parsim = "\u2AF3"; var parsl = "\u2AFD"; var part = "\u2202"; var PartialD = "\u2202"; var Pcy = "\u041F"; var pcy = "\u043F"; var percnt = "%"; var period = "."; var permil = "\u2030"; var perp = "\u22A5"; var pertenk = "\u2031"; var Pfr = "\u{1D513}"; var pfr = "\u{1D52D}"; var Phi = "\u03A6"; var phi = "\u03C6"; var phiv = "\u03D5"; var phmmat = "\u2133"; var phone = "\u260E"; var Pi = "\u03A0"; var pi = "\u03C0"; var pitchfork = "\u22D4"; var piv = "\u03D6"; var planck = "\u210F"; var planckh = "\u210E"; var plankv = "\u210F"; var plusacir = "\u2A23"; var plusb = "\u229E"; var pluscir = "\u2A22"; var plus = "+"; var plusdo = "\u2214"; var plusdu = "\u2A25"; var pluse = "\u2A72"; var PlusMinus = "\xB1"; var plusmn$1 = "\xB1"; var plussim = "\u2A26"; var plustwo = "\u2A27"; var pm = "\xB1"; var Poincareplane = "\u210C"; var pointint = "\u2A15"; var popf = "\u{1D561}"; var Popf = "\u2119"; var pound$1 = "\xA3"; var prap = "\u2AB7"; var Pr = "\u2ABB"; var pr = "\u227A"; var prcue = "\u227C"; var precapprox = "\u2AB7"; var prec = "\u227A"; var preccurlyeq = "\u227C"; var Precedes = "\u227A"; var PrecedesEqual = "\u2AAF"; var PrecedesSlantEqual = "\u227C"; var PrecedesTilde = "\u227E"; var preceq = "\u2AAF"; var precnapprox = "\u2AB9"; var precneqq = "\u2AB5"; var precnsim = "\u22E8"; var pre = "\u2AAF"; var prE = "\u2AB3"; var precsim = "\u227E"; var prime = "\u2032"; var Prime = "\u2033"; var primes = "\u2119"; var prnap = "\u2AB9"; var prnE = "\u2AB5"; var prnsim = "\u22E8"; var prod = "\u220F"; var Product = "\u220F"; var profalar = "\u232E"; var profline = "\u2312"; var profsurf = "\u2313"; var prop = "\u221D"; var Proportional = "\u221D"; var Proportion = "\u2237"; var propto = "\u221D"; var prsim = "\u227E"; var prurel = "\u22B0"; var Pscr = "\u{1D4AB}"; var pscr = "\u{1D4C5}"; var Psi = "\u03A8"; var psi = "\u03C8"; var puncsp = "\u2008"; var Qfr = "\u{1D514}"; var qfr = "\u{1D52E}"; var qint = "\u2A0C"; var qopf = "\u{1D562}"; var Qopf = "\u211A"; var qprime = "\u2057"; var Qscr = "\u{1D4AC}"; var qscr = "\u{1D4C6}"; var quaternions = "\u210D"; var quatint = "\u2A16"; var quest = "?"; var questeq = "\u225F"; var quot$2 = '"'; var QUOT$1 = '"'; var rAarr = "\u21DB"; var race = "\u223D\u0331"; var Racute = "\u0154"; var racute = "\u0155"; var radic = "\u221A"; var raemptyv = "\u29B3"; var rang = "\u27E9"; var Rang = "\u27EB"; var rangd = "\u2992"; var range = "\u29A5"; var rangle = "\u27E9"; var raquo$1 = "\xBB"; var rarrap = "\u2975"; var rarrb = "\u21E5"; var rarrbfs = "\u2920"; var rarrc = "\u2933"; var rarr = "\u2192"; var Rarr = "\u21A0"; var rArr = "\u21D2"; var rarrfs = "\u291E"; var rarrhk = "\u21AA"; var rarrlp = "\u21AC"; var rarrpl = "\u2945"; var rarrsim = "\u2974"; var Rarrtl = "\u2916"; var rarrtl = "\u21A3"; var rarrw = "\u219D"; var ratail = "\u291A"; var rAtail = "\u291C"; var ratio = "\u2236"; var rationals = "\u211A"; var rbarr = "\u290D"; var rBarr = "\u290F"; var RBarr = "\u2910"; var rbbrk = "\u2773"; var rbrace = "}"; var rbrack = "]"; var rbrke = "\u298C"; var rbrksld = "\u298E"; var rbrkslu = "\u2990"; var Rcaron = "\u0158"; var rcaron = "\u0159"; var Rcedil = "\u0156"; var rcedil = "\u0157"; var rceil = "\u2309"; var rcub = "}"; var Rcy = "\u0420"; var rcy = "\u0440"; var rdca = "\u2937"; var rdldhar = "\u2969"; var rdquo = "\u201D"; var rdquor = "\u201D"; var rdsh = "\u21B3"; var real = "\u211C"; var realine = "\u211B"; var realpart = "\u211C"; var reals = "\u211D"; var Re = "\u211C"; var rect = "\u25AD"; var reg$1 = "\xAE"; var REG$1 = "\xAE"; var ReverseElement = "\u220B"; var ReverseEquilibrium = "\u21CB"; var ReverseUpEquilibrium = "\u296F"; var rfisht = "\u297D"; var rfloor = "\u230B"; var rfr = "\u{1D52F}"; var Rfr = "\u211C"; var rHar = "\u2964"; var rhard = "\u21C1"; var rharu = "\u21C0"; var rharul = "\u296C"; var Rho = "\u03A1"; var rho = "\u03C1"; var rhov = "\u03F1"; var RightAngleBracket = "\u27E9"; var RightArrowBar = "\u21E5"; var rightarrow = "\u2192"; var RightArrow = "\u2192"; var Rightarrow = "\u21D2"; var RightArrowLeftArrow = "\u21C4"; var rightarrowtail = "\u21A3"; var RightCeiling = "\u2309"; var RightDoubleBracket = "\u27E7"; var RightDownTeeVector = "\u295D"; var RightDownVectorBar = "\u2955"; var RightDownVector = "\u21C2"; var RightFloor = "\u230B"; var rightharpoondown = "\u21C1"; var rightharpoonup = "\u21C0"; var rightleftarrows = "\u21C4"; var rightleftharpoons = "\u21CC"; var rightrightarrows = "\u21C9"; var rightsquigarrow = "\u219D"; var RightTeeArrow = "\u21A6"; var RightTee = "\u22A2"; var RightTeeVector = "\u295B"; var rightthreetimes = "\u22CC"; var RightTriangleBar = "\u29D0"; var RightTriangle = "\u22B3"; var RightTriangleEqual = "\u22B5"; var RightUpDownVector = "\u294F"; var RightUpTeeVector = "\u295C"; var RightUpVectorBar = "\u2954"; var RightUpVector = "\u21BE"; var RightVectorBar = "\u2953"; var RightVector = "\u21C0"; var ring = "\u02DA"; var risingdotseq = "\u2253"; var rlarr = "\u21C4"; var rlhar = "\u21CC"; var rlm = "\u200F"; var rmoustache = "\u23B1"; var rmoust = "\u23B1"; var rnmid = "\u2AEE"; var roang = "\u27ED"; var roarr = "\u21FE"; var robrk = "\u27E7"; var ropar = "\u2986"; var ropf = "\u{1D563}"; var Ropf = "\u211D"; var roplus = "\u2A2E"; var rotimes = "\u2A35"; var RoundImplies = "\u2970"; var rpar = ")"; var rpargt = "\u2994"; var rppolint = "\u2A12"; var rrarr = "\u21C9"; var Rrightarrow = "\u21DB"; var rsaquo = "\u203A"; var rscr = "\u{1D4C7}"; var Rscr = "\u211B"; var rsh = "\u21B1"; var Rsh = "\u21B1"; var rsqb = "]"; var rsquo = "\u2019"; var rsquor = "\u2019"; var rthree = "\u22CC"; var rtimes = "\u22CA"; var rtri = "\u25B9"; var rtrie = "\u22B5"; var rtrif = "\u25B8"; var rtriltri = "\u29CE"; var RuleDelayed = "\u29F4"; var ruluhar = "\u2968"; var rx = "\u211E"; var Sacute = "\u015A"; var sacute = "\u015B"; var sbquo = "\u201A"; var scap = "\u2AB8"; var Scaron = "\u0160"; var scaron = "\u0161"; var Sc = "\u2ABC"; var sc = "\u227B"; var sccue = "\u227D"; var sce = "\u2AB0"; var scE = "\u2AB4"; var Scedil = "\u015E"; var scedil = "\u015F"; var Scirc = "\u015C"; var scirc = "\u015D"; var scnap = "\u2ABA"; var scnE = "\u2AB6"; var scnsim = "\u22E9"; var scpolint = "\u2A13"; var scsim = "\u227F"; var Scy = "\u0421"; var scy = "\u0441"; var sdotb = "\u22A1"; var sdot = "\u22C5"; var sdote = "\u2A66"; var searhk = "\u2925"; var searr = "\u2198"; var seArr = "\u21D8"; var searrow = "\u2198"; var sect$1 = "\xA7"; var semi = ";"; var seswar = "\u2929"; var setminus = "\u2216"; var setmn = "\u2216"; var sext = "\u2736"; var Sfr = "\u{1D516}"; var sfr = "\u{1D530}"; var sfrown = "\u2322"; var sharp = "\u266F"; var SHCHcy = "\u0429"; var shchcy = "\u0449"; var SHcy = "\u0428"; var shcy = "\u0448"; var ShortDownArrow = "\u2193"; var ShortLeftArrow = "\u2190"; var shortmid = "\u2223"; var shortparallel = "\u2225"; var ShortRightArrow = "\u2192"; var ShortUpArrow = "\u2191"; var shy$1 = "\xAD"; var Sigma = "\u03A3"; var sigma = "\u03C3"; var sigmaf = "\u03C2"; var sigmav = "\u03C2"; var sim = "\u223C"; var simdot = "\u2A6A"; var sime = "\u2243"; var simeq = "\u2243"; var simg = "\u2A9E"; var simgE = "\u2AA0"; var siml = "\u2A9D"; var simlE = "\u2A9F"; var simne = "\u2246"; var simplus = "\u2A24"; var simrarr = "\u2972"; var slarr = "\u2190"; var SmallCircle = "\u2218"; var smallsetminus = "\u2216"; var smashp = "\u2A33"; var smeparsl = "\u29E4"; var smid = "\u2223"; var smile = "\u2323"; var smt = "\u2AAA"; var smte = "\u2AAC"; var smtes = "\u2AAC\uFE00"; var SOFTcy = "\u042C"; var softcy = "\u044C"; var solbar = "\u233F"; var solb = "\u29C4"; var sol = "/"; var Sopf = "\u{1D54A}"; var sopf = "\u{1D564}"; var spades = "\u2660"; var spadesuit = "\u2660"; var spar = "\u2225"; var sqcap = "\u2293"; var sqcaps = "\u2293\uFE00"; var sqcup = "\u2294"; var sqcups = "\u2294\uFE00"; var Sqrt = "\u221A"; var sqsub = "\u228F"; var sqsube = "\u2291"; var sqsubset = "\u228F"; var sqsubseteq = "\u2291"; var sqsup = "\u2290"; var sqsupe = "\u2292"; var sqsupset = "\u2290"; var sqsupseteq = "\u2292"; var square = "\u25A1"; var Square = "\u25A1"; var SquareIntersection = "\u2293"; var SquareSubset = "\u228F"; var SquareSubsetEqual = "\u2291"; var SquareSuperset = "\u2290"; var SquareSupersetEqual = "\u2292"; var SquareUnion = "\u2294"; var squarf = "\u25AA"; var squ = "\u25A1"; var squf = "\u25AA"; var srarr = "\u2192"; var Sscr = "\u{1D4AE}"; var sscr = "\u{1D4C8}"; var ssetmn = "\u2216"; var ssmile = "\u2323"; var sstarf = "\u22C6"; var Star = "\u22C6"; var star = "\u2606"; var starf = "\u2605"; var straightepsilon = "\u03F5"; var straightphi = "\u03D5"; var strns = "\xAF"; var sub$1 = "\u2282"; var Sub = "\u22D0"; var subdot = "\u2ABD"; var subE = "\u2AC5"; var sube = "\u2286"; var subedot = "\u2AC3"; var submult = "\u2AC1"; var subnE = "\u2ACB"; var subne = "\u228A"; var subplus = "\u2ABF"; var subrarr = "\u2979"; var subset = "\u2282"; var Subset = "\u22D0"; var subseteq = "\u2286"; var subseteqq = "\u2AC5"; var SubsetEqual = "\u2286"; var subsetneq = "\u228A"; var subsetneqq = "\u2ACB"; var subsim = "\u2AC7"; var subsub = "\u2AD5"; var subsup = "\u2AD3"; var succapprox = "\u2AB8"; var succ = "\u227B"; var succcurlyeq = "\u227D"; var Succeeds = "\u227B"; var SucceedsEqual = "\u2AB0"; var SucceedsSlantEqual = "\u227D"; var SucceedsTilde = "\u227F"; var succeq = "\u2AB0"; var succnapprox = "\u2ABA"; var succneqq = "\u2AB6"; var succnsim = "\u22E9"; var succsim = "\u227F"; var SuchThat = "\u220B"; var sum = "\u2211"; var Sum = "\u2211"; var sung = "\u266A"; var sup1$1 = "\xB9"; var sup2$1 = "\xB2"; var sup3$1 = "\xB3"; var sup = "\u2283"; var Sup = "\u22D1"; var supdot = "\u2ABE"; var supdsub = "\u2AD8"; var supE = "\u2AC6"; var supe = "\u2287"; var supedot = "\u2AC4"; var Superset = "\u2283"; var SupersetEqual = "\u2287"; var suphsol = "\u27C9"; var suphsub = "\u2AD7"; var suplarr = "\u297B"; var supmult = "\u2AC2"; var supnE = "\u2ACC"; var supne = "\u228B"; var supplus = "\u2AC0"; var supset = "\u2283"; var Supset = "\u22D1"; var supseteq = "\u2287"; var supseteqq = "\u2AC6"; var supsetneq = "\u228B"; var supsetneqq = "\u2ACC"; var supsim = "\u2AC8"; var supsub = "\u2AD4"; var supsup = "\u2AD6"; var swarhk = "\u2926"; var swarr = "\u2199"; var swArr = "\u21D9"; var swarrow = "\u2199"; var swnwar = "\u292A"; var szlig$1 = "\xDF"; var Tab = " "; var target = "\u2316"; var Tau = "\u03A4"; var tau = "\u03C4"; var tbrk = "\u23B4"; var Tcaron = "\u0164"; var tcaron = "\u0165"; var Tcedil = "\u0162"; var tcedil = "\u0163"; var Tcy = "\u0422"; var tcy = "\u0442"; var tdot = "\u20DB"; var telrec = "\u2315"; var Tfr = "\u{1D517}"; var tfr = "\u{1D531}"; var there4 = "\u2234"; var therefore = "\u2234"; var Therefore = "\u2234"; var Theta = "\u0398"; var theta = "\u03B8"; var thetasym = "\u03D1"; var thetav = "\u03D1"; var thickapprox = "\u2248"; var thicksim = "\u223C"; var ThickSpace = "\u205F\u200A"; var ThinSpace = "\u2009"; var thinsp = "\u2009"; var thkap = "\u2248"; var thksim = "\u223C"; var THORN$1 = "\xDE"; var thorn$1 = "\xFE"; var tilde = "\u02DC"; var Tilde = "\u223C"; var TildeEqual = "\u2243"; var TildeFullEqual = "\u2245"; var TildeTilde = "\u2248"; var timesbar = "\u2A31"; var timesb = "\u22A0"; var times$1 = "\xD7"; var timesd = "\u2A30"; var tint = "\u222D"; var toea = "\u2928"; var topbot = "\u2336"; var topcir = "\u2AF1"; var top = "\u22A4"; var Topf = "\u{1D54B}"; var topf = "\u{1D565}"; var topfork = "\u2ADA"; var tosa = "\u2929"; var tprime = "\u2034"; var trade = "\u2122"; var TRADE = "\u2122"; var triangle = "\u25B5"; var triangledown = "\u25BF"; var triangleleft = "\u25C3"; var trianglelefteq = "\u22B4"; var triangleq = "\u225C"; var triangleright = "\u25B9"; var trianglerighteq = "\u22B5"; var tridot = "\u25EC"; var trie = "\u225C"; var triminus = "\u2A3A"; var TripleDot = "\u20DB"; var triplus = "\u2A39"; var trisb = "\u29CD"; var tritime = "\u2A3B"; var trpezium = "\u23E2"; var Tscr = "\u{1D4AF}"; var tscr = "\u{1D4C9}"; var TScy = "\u0426"; var tscy = "\u0446"; var TSHcy = "\u040B"; var tshcy = "\u045B"; var Tstrok = "\u0166"; var tstrok = "\u0167"; var twixt = "\u226C"; var twoheadleftarrow = "\u219E"; var twoheadrightarrow = "\u21A0"; var Uacute$1 = "\xDA"; var uacute$1 = "\xFA"; var uarr = "\u2191"; var Uarr = "\u219F"; var uArr = "\u21D1"; var Uarrocir = "\u2949"; var Ubrcy = "\u040E"; var ubrcy = "\u045E"; var Ubreve = "\u016C"; var ubreve = "\u016D"; var Ucirc$1 = "\xDB"; var ucirc$1 = "\xFB"; var Ucy = "\u0423"; var ucy = "\u0443"; var udarr = "\u21C5"; var Udblac = "\u0170"; var udblac = "\u0171"; var udhar = "\u296E"; var ufisht = "\u297E"; var Ufr = "\u{1D518}"; var ufr = "\u{1D532}"; var Ugrave$1 = "\xD9"; var ugrave$1 = "\xF9"; var uHar = "\u2963"; var uharl = "\u21BF"; var uharr = "\u21BE"; var uhblk = "\u2580"; var ulcorn = "\u231C"; var ulcorner = "\u231C"; var ulcrop = "\u230F"; var ultri = "\u25F8"; var Umacr = "\u016A"; var umacr = "\u016B"; var uml$1 = "\xA8"; var UnderBar = "_"; var UnderBrace = "\u23DF"; var UnderBracket = "\u23B5"; var UnderParenthesis = "\u23DD"; var Union = "\u22C3"; var UnionPlus = "\u228E"; var Uogon = "\u0172"; var uogon = "\u0173"; var Uopf = "\u{1D54C}"; var uopf = "\u{1D566}"; var UpArrowBar = "\u2912"; var uparrow = "\u2191"; var UpArrow = "\u2191"; var Uparrow = "\u21D1"; var UpArrowDownArrow = "\u21C5"; var updownarrow = "\u2195"; var UpDownArrow = "\u2195"; var Updownarrow = "\u21D5"; var UpEquilibrium = "\u296E"; var upharpoonleft = "\u21BF"; var upharpoonright = "\u21BE"; var uplus = "\u228E"; var UpperLeftArrow = "\u2196"; var UpperRightArrow = "\u2197"; var upsi = "\u03C5"; var Upsi = "\u03D2"; var upsih = "\u03D2"; var Upsilon = "\u03A5"; var upsilon = "\u03C5"; var UpTeeArrow = "\u21A5"; var UpTee = "\u22A5"; var upuparrows = "\u21C8"; var urcorn = "\u231D"; var urcorner = "\u231D"; var urcrop = "\u230E"; var Uring = "\u016E"; var uring = "\u016F"; var urtri = "\u25F9"; var Uscr = "\u{1D4B0}"; var uscr = "\u{1D4CA}"; var utdot = "\u22F0"; var Utilde = "\u0168"; var utilde = "\u0169"; var utri = "\u25B5"; var utrif = "\u25B4"; var uuarr = "\u21C8"; var Uuml$1 = "\xDC"; var uuml$1 = "\xFC"; var uwangle = "\u29A7"; var vangrt = "\u299C"; var varepsilon = "\u03F5"; var varkappa = "\u03F0"; var varnothing = "\u2205"; var varphi = "\u03D5"; var varpi = "\u03D6"; var varpropto = "\u221D"; var varr = "\u2195"; var vArr = "\u21D5"; var varrho = "\u03F1"; var varsigma = "\u03C2"; var varsubsetneq = "\u228A\uFE00"; var varsubsetneqq = "\u2ACB\uFE00"; var varsupsetneq = "\u228B\uFE00"; var varsupsetneqq = "\u2ACC\uFE00"; var vartheta = "\u03D1"; var vartriangleleft = "\u22B2"; var vartriangleright = "\u22B3"; var vBar = "\u2AE8"; var Vbar = "\u2AEB"; var vBarv = "\u2AE9"; var Vcy = "\u0412"; var vcy = "\u0432"; var vdash = "\u22A2"; var vDash = "\u22A8"; var Vdash = "\u22A9"; var VDash = "\u22AB"; var Vdashl = "\u2AE6"; var veebar = "\u22BB"; var vee = "\u2228"; var Vee = "\u22C1"; var veeeq = "\u225A"; var vellip = "\u22EE"; var verbar = "|"; var Verbar = "\u2016"; var vert = "|"; var Vert = "\u2016"; var VerticalBar = "\u2223"; var VerticalLine = "|"; var VerticalSeparator = "\u2758"; var VerticalTilde = "\u2240"; var VeryThinSpace = "\u200A"; var Vfr = "\u{1D519}"; var vfr = "\u{1D533}"; var vltri = "\u22B2"; var vnsub = "\u2282\u20D2"; var vnsup = "\u2283\u20D2"; var Vopf = "\u{1D54D}"; var vopf = "\u{1D567}"; var vprop = "\u221D"; var vrtri = "\u22B3"; var Vscr = "\u{1D4B1}"; var vscr = "\u{1D4CB}"; var vsubnE = "\u2ACB\uFE00"; var vsubne = "\u228A\uFE00"; var vsupnE = "\u2ACC\uFE00"; var vsupne = "\u228B\uFE00"; var Vvdash = "\u22AA"; var vzigzag = "\u299A"; var Wcirc = "\u0174"; var wcirc = "\u0175"; var wedbar = "\u2A5F"; var wedge = "\u2227"; var Wedge = "\u22C0"; var wedgeq = "\u2259"; var weierp = "\u2118"; var Wfr = "\u{1D51A}"; var wfr = "\u{1D534}"; var Wopf = "\u{1D54E}"; var wopf = "\u{1D568}"; var wp = "\u2118"; var wr = "\u2240"; var wreath = "\u2240"; var Wscr = "\u{1D4B2}"; var wscr = "\u{1D4CC}"; var xcap = "\u22C2"; var xcirc = "\u25EF"; var xcup = "\u22C3"; var xdtri = "\u25BD"; var Xfr = "\u{1D51B}"; var xfr = "\u{1D535}"; var xharr = "\u27F7"; var xhArr = "\u27FA"; var Xi = "\u039E"; var xi = "\u03BE"; var xlarr = "\u27F5"; var xlArr = "\u27F8"; var xmap = "\u27FC"; var xnis = "\u22FB"; var xodot = "\u2A00"; var Xopf = "\u{1D54F}"; var xopf = "\u{1D569}"; var xoplus = "\u2A01"; var xotime = "\u2A02"; var xrarr = "\u27F6"; var xrArr = "\u27F9"; var Xscr = "\u{1D4B3}"; var xscr = "\u{1D4CD}"; var xsqcup = "\u2A06"; var xuplus = "\u2A04"; var xutri = "\u25B3"; var xvee = "\u22C1"; var xwedge = "\u22C0"; var Yacute$1 = "\xDD"; var yacute$1 = "\xFD"; var YAcy = "\u042F"; var yacy = "\u044F"; var Ycirc = "\u0176"; var ycirc = "\u0177"; var Ycy = "\u042B"; var ycy = "\u044B"; var yen$1 = "\xA5"; var Yfr = "\u{1D51C}"; var yfr = "\u{1D536}"; var YIcy = "\u0407"; var yicy = "\u0457"; var Yopf = "\u{1D550}"; var yopf = "\u{1D56A}"; var Yscr = "\u{1D4B4}"; var yscr = "\u{1D4CE}"; var YUcy = "\u042E"; var yucy = "\u044E"; var yuml$1 = "\xFF"; var Yuml = "\u0178"; var Zacute = "\u0179"; var zacute = "\u017A"; var Zcaron = "\u017D"; var zcaron = "\u017E"; var Zcy = "\u0417"; var zcy = "\u0437"; var Zdot = "\u017B"; var zdot = "\u017C"; var zeetrf = "\u2128"; var ZeroWidthSpace = "\u200B"; var Zeta = "\u0396"; var zeta = "\u03B6"; var zfr = "\u{1D537}"; var Zfr = "\u2128"; var ZHcy = "\u0416"; var zhcy = "\u0436"; var zigrarr = "\u21DD"; var zopf = "\u{1D56B}"; var Zopf = "\u2124"; var Zscr = "\u{1D4B5}"; var zscr = "\u{1D4CF}"; var zwj = "\u200D"; var zwnj = "\u200C"; var require$$1$1 = { Aacute: Aacute$1, aacute: aacute$1, Abreve, abreve, ac, acd, acE, Acirc: Acirc$1, acirc: acirc$1, acute: acute$1, Acy, acy, AElig: AElig$1, aelig: aelig$1, af, Afr, afr, Agrave: Agrave$1, agrave: agrave$1, alefsym, aleph, Alpha, alpha, Amacr, amacr, amalg, amp: amp$2, AMP: AMP$1, andand, And, and, andd, andslope, andv, ang, ange, angle, angmsdaa, angmsdab, angmsdac, angmsdad, angmsdae, angmsdaf, angmsdag, angmsdah, angmsd, angrt, angrtvb, angrtvbd, angsph, angst, angzarr, Aogon, aogon, Aopf, aopf, apacir, ap, apE, ape, apid, apos: apos$1, ApplyFunction, approx, approxeq, Aring: Aring$1, aring: aring$1, Ascr, ascr, Assign, ast, asymp, asympeq, Atilde: Atilde$1, atilde: atilde$1, Auml: Auml$1, auml: auml$1, awconint, awint, backcong, backepsilon, backprime, backsim, backsimeq, Backslash, Barv, barvee, barwed, Barwed, barwedge, bbrk, bbrktbrk, bcong, Bcy, bcy, bdquo, becaus, because, Because, bemptyv, bepsi, bernou, Bernoullis, Beta, beta, beth, between, Bfr, bfr, bigcap, bigcirc, bigcup, bigodot, bigoplus, bigotimes, bigsqcup, bigstar, bigtriangledown, bigtriangleup, biguplus, bigvee, bigwedge, bkarow, blacklozenge, blacksquare, blacktriangle, blacktriangledown, blacktriangleleft, blacktriangleright, blank, blk12, blk14, blk34, block, bne, bnequiv, bNot, bnot, Bopf, bopf, bot, bottom, bowtie, boxbox, boxdl, boxdL, boxDl, boxDL, boxdr, boxdR, boxDr, boxDR, boxh, boxH, boxhd, boxHd, boxhD, boxHD, boxhu, boxHu, boxhU, boxHU, boxminus, boxplus, boxtimes, boxul, boxuL, boxUl, boxUL, boxur, boxuR, boxUr, boxUR, boxv, boxV, boxvh, boxvH, boxVh, boxVH, boxvl, boxvL, boxVl, boxVL, boxvr, boxvR, boxVr, boxVR, bprime, breve, Breve, brvbar: brvbar$1, bscr, Bscr, bsemi, bsim, bsime, bsolb, bsol, bsolhsub, bull, bullet, bump, bumpE, bumpe, Bumpeq, bumpeq, Cacute, cacute, capand, capbrcup, capcap, cap, Cap, capcup, capdot, CapitalDifferentialD, caps, caret, caron, Cayleys, ccaps, Ccaron, ccaron, Ccedil: Ccedil$1, ccedil: ccedil$1, Ccirc, ccirc, Cconint, ccups, ccupssm, Cdot, cdot, cedil: cedil$1, Cedilla, cemptyv, cent: cent$1, centerdot, CenterDot, cfr, Cfr, CHcy, chcy, check, checkmark, Chi, chi, circ, circeq, circlearrowleft, circlearrowright, circledast, circledcirc, circleddash, CircleDot, circledR, circledS, CircleMinus, CirclePlus, CircleTimes, cir, cirE, cire, cirfnint, cirmid, cirscir, ClockwiseContourIntegral, CloseCurlyDoubleQuote, CloseCurlyQuote, clubs, clubsuit, colon, Colon, Colone, colone, coloneq, comma, commat, comp, compfn, complement, complexes, cong, congdot, Congruent, conint, Conint, ContourIntegral, copf, Copf, coprod, Coproduct, copy: copy$2, COPY: COPY$1, copysr, CounterClockwiseContourIntegral, crarr, cross: cross$1, Cross, Cscr, cscr, csub, csube, csup, csupe, ctdot, cudarrl, cudarrr, cuepr, cuesc, cularr, cularrp, cupbrcap, cupcap, CupCap, cup, Cup, cupcup, cupdot, cupor, cups, curarr, curarrm, curlyeqprec, curlyeqsucc, curlyvee, curlywedge, curren: curren$1, curvearrowleft, curvearrowright, cuvee, cuwed, cwconint, cwint, cylcty, dagger, Dagger, daleth, darr, Darr, dArr, dash, Dashv, dashv, dbkarow, dblac, Dcaron, dcaron, Dcy, dcy, ddagger, ddarr, DD, dd, DDotrahd, ddotseq, deg: deg$1, Del, Delta, delta, demptyv, dfisht, Dfr, dfr, dHar, dharl, dharr, DiacriticalAcute, DiacriticalDot, DiacriticalDoubleAcute, DiacriticalGrave, DiacriticalTilde, diam, diamond, Diamond, diamondsuit, diams, die, DifferentialD, digamma, disin, div, divide: divide$1, divideontimes, divonx, DJcy, djcy, dlcorn, dlcrop, dollar, Dopf, dopf, Dot, dot: dot$1, DotDot, doteq, doteqdot, DotEqual, dotminus, dotplus, dotsquare, doublebarwedge, DoubleContourIntegral, DoubleDot, DoubleDownArrow, DoubleLeftArrow, DoubleLeftRightArrow, DoubleLeftTee, DoubleLongLeftArrow, DoubleLongLeftRightArrow, DoubleLongRightArrow, DoubleRightArrow, DoubleRightTee, DoubleUpArrow, DoubleUpDownArrow, DoubleVerticalBar, DownArrowBar, downarrow, DownArrow, Downarrow, DownArrowUpArrow, DownBreve, downdownarrows, downharpoonleft, downharpoonright, DownLeftRightVector, DownLeftTeeVector, DownLeftVectorBar, DownLeftVector, DownRightTeeVector, DownRightVectorBar, DownRightVector, DownTeeArrow, DownTee, drbkarow, drcorn, drcrop, Dscr, dscr, DScy, dscy, dsol, Dstrok, dstrok, dtdot, dtri, dtrif, duarr, duhar, dwangle, DZcy, dzcy, dzigrarr, Eacute: Eacute$1, eacute: eacute$1, easter, Ecaron, ecaron, Ecirc: Ecirc$1, ecirc: ecirc$1, ecir, ecolon, Ecy, ecy, eDDot, Edot, edot, eDot, ee, efDot, Efr, efr, eg, Egrave: Egrave$1, egrave: egrave$1, egs, egsdot, el, Element, elinters, ell, els, elsdot, Emacr, emacr, empty, emptyset, EmptySmallSquare, emptyv, EmptyVerySmallSquare, emsp13, emsp14, emsp, ENG, eng, ensp, Eogon, eogon, Eopf, eopf, epar, eparsl, eplus, epsi, Epsilon, epsilon, epsiv, eqcirc, eqcolon, eqsim, eqslantgtr, eqslantless, Equal, equals, EqualTilde, equest, Equilibrium, equiv, equivDD, eqvparsl, erarr, erDot, escr, Escr, esdot, Esim, esim, Eta, eta, ETH: ETH$1, eth: eth$1, Euml: Euml$1, euml: euml$1, euro, excl, exist, Exists, expectation, exponentiale, ExponentialE, fallingdotseq, Fcy, fcy, female, ffilig, fflig, ffllig, Ffr, ffr, filig, FilledSmallSquare, FilledVerySmallSquare, fjlig, flat, fllig, fltns, fnof, Fopf, fopf, forall, ForAll, fork, forkv, Fouriertrf, fpartint, frac12: frac12$1, frac13, frac14: frac14$1, frac15, frac16, frac18, frac23, frac25, frac34: frac34$1, frac35, frac38, frac45, frac56, frac58, frac78, frasl, frown, fscr, Fscr, gacute, Gamma, gamma, Gammad, gammad, gap, Gbreve, gbreve, Gcedil, Gcirc, gcirc, Gcy, gcy, Gdot, gdot, ge, gE, gEl, gel, geq, geqq, geqslant, gescc, ges, gesdot, gesdoto, gesdotol, gesl, gesles, Gfr, gfr, gg, Gg, ggg, gimel, GJcy, gjcy, gla, gl, glE, glj, gnap, gnapprox, gne, gnE, gneq, gneqq, gnsim, Gopf, gopf, grave, GreaterEqual, GreaterEqualLess, GreaterFullEqual, GreaterGreater, GreaterLess, GreaterSlantEqual, GreaterTilde, Gscr, gscr, gsim, gsime, gsiml, gtcc, gtcir, gt: gt$2, GT: GT$1, Gt, gtdot, gtlPar, gtquest, gtrapprox, gtrarr, gtrdot, gtreqless, gtreqqless, gtrless, gtrsim, gvertneqq, gvnE, Hacek, hairsp, half, hamilt, HARDcy, hardcy, harrcir, harr, hArr, harrw, Hat, hbar, Hcirc, hcirc, hearts, heartsuit, hellip, hercon, hfr, Hfr, HilbertSpace, hksearow, hkswarow, hoarr, homtht, hookleftarrow, hookrightarrow, hopf, Hopf, horbar, HorizontalLine, hscr, Hscr, hslash, Hstrok, hstrok, HumpDownHump, HumpEqual, hybull, hyphen, Iacute: Iacute$1, iacute: iacute$1, ic, Icirc: Icirc$1, icirc: icirc$1, Icy, icy, Idot, IEcy, iecy, iexcl: iexcl$1, iff, ifr, Ifr, Igrave: Igrave$1, igrave: igrave$1, ii, iiiint, iiint, iinfin, iiota, IJlig, ijlig, Imacr, imacr, image, ImaginaryI, imagline, imagpart, imath, Im, imof, imped, Implies, incare, in: "\u2208", infin, infintie, inodot, intcal, int, Int, integers, Integral, intercal, Intersection, intlarhk, intprod, InvisibleComma, InvisibleTimes, IOcy, iocy, Iogon, iogon, Iopf, iopf, Iota, iota, iprod, iquest: iquest$1, iscr, Iscr, isin, isindot, isinE, isins, isinsv, isinv, it, Itilde, itilde, Iukcy, iukcy, Iuml: Iuml$1, iuml: iuml$1, Jcirc, jcirc, Jcy, jcy, Jfr, jfr, jmath, Jopf, jopf, Jscr, jscr, Jsercy, jsercy, Jukcy, jukcy, Kappa, kappa, kappav, Kcedil, kcedil, Kcy, kcy, Kfr, kfr, kgreen, KHcy, khcy, KJcy, kjcy, Kopf, kopf, Kscr, kscr, lAarr, Lacute, lacute, laemptyv, lagran, Lambda, lambda, lang, Lang, langd, langle, lap, Laplacetrf, laquo: laquo$1, larrb, larrbfs, larr, Larr, lArr, larrfs, larrhk, larrlp, larrpl, larrsim, larrtl, latail, lAtail, lat, late, lates, lbarr, lBarr, lbbrk, lbrace, lbrack, lbrke, lbrksld, lbrkslu, Lcaron, lcaron, Lcedil, lcedil, lceil, lcub, Lcy, lcy, ldca, ldquo, ldquor, ldrdhar, ldrushar, ldsh, le, lE, LeftAngleBracket, LeftArrowBar, leftarrow, LeftArrow, Leftarrow, LeftArrowRightArrow, leftarrowtail, LeftCeiling, LeftDoubleBracket, LeftDownTeeVector, LeftDownVectorBar, LeftDownVector, LeftFloor, leftharpoondown, leftharpoonup, leftleftarrows, leftrightarrow, LeftRightArrow, Leftrightarrow, leftrightarrows, leftrightharpoons, leftrightsquigarrow, LeftRightVector, LeftTeeArrow, LeftTee, LeftTeeVector, leftthreetimes, LeftTriangleBar, LeftTriangle, LeftTriangleEqual, LeftUpDownVector, LeftUpTeeVector, LeftUpVectorBar, LeftUpVector, LeftVectorBar, LeftVector, lEg, leg, leq, leqq, leqslant, lescc, les, lesdot, lesdoto, lesdotor, lesg, lesges, lessapprox, lessdot, lesseqgtr, lesseqqgtr, LessEqualGreater, LessFullEqual, LessGreater, lessgtr, LessLess, lesssim, LessSlantEqual, LessTilde, lfisht, lfloor, Lfr, lfr, lg, lgE, lHar, lhard, lharu, lharul, lhblk, LJcy, ljcy, llarr, ll, Ll, llcorner, Lleftarrow, llhard, lltri, Lmidot, lmidot, lmoustache, lmoust, lnap, lnapprox, lne, lnE, lneq, lneqq, lnsim, loang, loarr, lobrk, longleftarrow, LongLeftArrow, Longleftarrow, longleftrightarrow, LongLeftRightArrow, Longleftrightarrow, longmapsto, longrightarrow, LongRightArrow, Longrightarrow, looparrowleft, looparrowright, lopar, Lopf, lopf, loplus, lotimes, lowast, lowbar, LowerLeftArrow, LowerRightArrow, loz, lozenge, lozf, lpar, lparlt, lrarr, lrcorner, lrhar, lrhard, lrm, lrtri, lsaquo, lscr, Lscr, lsh, Lsh, lsim, lsime, lsimg, lsqb, lsquo, lsquor, Lstrok, lstrok, ltcc, ltcir, lt: lt$2, LT: LT$1, Lt, ltdot, lthree, ltimes, ltlarr, ltquest, ltri, ltrie, ltrif, ltrPar, lurdshar, luruhar, lvertneqq, lvnE, macr: macr$1, male, malt, maltese, Map: "\u2905", map, mapsto, mapstodown, mapstoleft, mapstoup, marker, mcomma, Mcy, mcy, mdash, mDDot, measuredangle, MediumSpace, Mellintrf, Mfr, mfr, mho, micro: micro$1, midast, midcir, mid, middot: middot$1, minusb, minus: minus$1, minusd, minusdu, MinusPlus, mlcp, mldr, mnplus, models, Mopf, mopf, mp, mscr, Mscr, mstpos, Mu, mu, multimap, mumap, nabla, Nacute, nacute, nang, nap, napE, napid, napos, napprox, natural, naturals, natur, nbsp: nbsp$1, nbump, nbumpe, ncap, Ncaron, ncaron, Ncedil, ncedil, ncong, ncongdot, ncup, Ncy, ncy, ndash, nearhk, nearr, neArr, nearrow, ne, nedot, NegativeMediumSpace, NegativeThickSpace, NegativeThinSpace, NegativeVeryThinSpace, nequiv, nesear, nesim, NestedGreaterGreater, NestedLessLess, NewLine, nexist, nexists, Nfr, nfr, ngE, nge, ngeq, ngeqq, ngeqslant, nges, nGg, ngsim, nGt, ngt, ngtr, nGtv, nharr, nhArr, nhpar, ni, nis, nisd, niv, NJcy, njcy, nlarr, nlArr, nldr, nlE, nle, nleftarrow, nLeftarrow, nleftrightarrow, nLeftrightarrow, nleq, nleqq, nleqslant, nles, nless, nLl, nlsim, nLt, nlt, nltri, nltrie, nLtv, nmid, NoBreak, NonBreakingSpace, nopf, Nopf, Not, not: not$1, NotCongruent, NotCupCap, NotDoubleVerticalBar, NotElement, NotEqual, NotEqualTilde, NotExists, NotGreater, NotGreaterEqual, NotGreaterFullEqual, NotGreaterGreater, NotGreaterLess, NotGreaterSlantEqual, NotGreaterTilde, NotHumpDownHump, NotHumpEqual, notin, notindot, notinE, notinva, notinvb, notinvc, NotLeftTriangleBar, NotLeftTriangle, NotLeftTriangleEqual, NotLess, NotLessEqual, NotLessGreater, NotLessLess, NotLessSlantEqual, NotLessTilde, NotNestedGreaterGreater, NotNestedLessLess, notni, notniva, notnivb, notnivc, NotPrecedes, NotPrecedesEqual, NotPrecedesSlantEqual, NotReverseElement, NotRightTriangleBar, NotRightTriangle, NotRightTriangleEqual, NotSquareSubset, NotSquareSubsetEqual, NotSquareSuperset, NotSquareSupersetEqual, NotSubset, NotSubsetEqual, NotSucceeds, NotSucceedsEqual, NotSucceedsSlantEqual, NotSucceedsTilde, NotSuperset, NotSupersetEqual, NotTilde, NotTildeEqual, NotTildeFullEqual, NotTildeTilde, NotVerticalBar, nparallel, npar, nparsl, npart, npolint, npr, nprcue, nprec, npreceq, npre, nrarrc, nrarr, nrArr, nrarrw, nrightarrow, nRightarrow, nrtri, nrtrie, nsc, nsccue, nsce, Nscr, nscr, nshortmid, nshortparallel, nsim, nsime, nsimeq, nsmid, nspar, nsqsube, nsqsupe, nsub, nsubE, nsube, nsubset, nsubseteq, nsubseteqq, nsucc, nsucceq, nsup, nsupE, nsupe, nsupset, nsupseteq, nsupseteqq, ntgl, Ntilde: Ntilde$1, ntilde: ntilde$1, ntlg, ntriangleleft, ntrianglelefteq, ntriangleright, ntrianglerighteq, Nu, nu, num, numero, numsp, nvap, nvdash, nvDash, nVdash, nVDash, nvge, nvgt, nvHarr, nvinfin, nvlArr, nvle, nvlt, nvltrie, nvrArr, nvrtrie, nvsim, nwarhk, nwarr, nwArr, nwarrow, nwnear, Oacute: Oacute$1, oacute: oacute$1, oast, Ocirc: Ocirc$1, ocirc: ocirc$1, ocir, Ocy, ocy, odash, Odblac, odblac, odiv, odot, odsold, OElig, oelig, ofcir, Ofr, ofr, ogon, Ograve: Ograve$1, ograve: ograve$1, ogt, ohbar, ohm, oint, olarr, olcir, olcross, oline, olt, Omacr, omacr, Omega, omega, Omicron, omicron, omid, ominus, Oopf, oopf, opar, OpenCurlyDoubleQuote, OpenCurlyQuote, operp, oplus, orarr, Or, or, ord, order, orderof, ordf: ordf$1, ordm: ordm$1, origof, oror, orslope, orv, oS, Oscr, oscr, Oslash: Oslash$1, oslash: oslash$1, osol, Otilde: Otilde$1, otilde: otilde$1, otimesas, Otimes, otimes, Ouml: Ouml$1, ouml: ouml$1, ovbar, OverBar, OverBrace, OverBracket, OverParenthesis, para: para$1, parallel, par, parsim, parsl, part, PartialD, Pcy, pcy, percnt, period, permil, perp, pertenk, Pfr, pfr, Phi, phi, phiv, phmmat, phone, Pi, pi, pitchfork, piv, planck, planckh, plankv, plusacir, plusb, pluscir, plus, plusdo, plusdu, pluse, PlusMinus, plusmn: plusmn$1, plussim, plustwo, pm, Poincareplane, pointint, popf, Popf, pound: pound$1, prap, Pr, pr, prcue, precapprox, prec, preccurlyeq, Precedes, PrecedesEqual, PrecedesSlantEqual, PrecedesTilde, preceq, precnapprox, precneqq, precnsim, pre, prE, precsim, prime, Prime, primes, prnap, prnE, prnsim, prod, Product, profalar, profline, profsurf, prop, Proportional, Proportion, propto, prsim, prurel, Pscr, pscr, Psi, psi, puncsp, Qfr, qfr, qint, qopf, Qopf, qprime, Qscr, qscr, quaternions, quatint, quest, questeq, quot: quot$2, QUOT: QUOT$1, rAarr, race, Racute, racute, radic, raemptyv, rang, Rang, rangd, range, rangle, raquo: raquo$1, rarrap, rarrb, rarrbfs, rarrc, rarr, Rarr, rArr, rarrfs, rarrhk, rarrlp, rarrpl, rarrsim, Rarrtl, rarrtl, rarrw, ratail, rAtail, ratio, rationals, rbarr, rBarr, RBarr, rbbrk, rbrace, rbrack, rbrke, rbrksld, rbrkslu, Rcaron, rcaron, Rcedil, rcedil, rceil, rcub, Rcy, rcy, rdca, rdldhar, rdquo, rdquor, rdsh, real, realine, realpart, reals, Re, rect, reg: reg$1, REG: REG$1, ReverseElement, ReverseEquilibrium, ReverseUpEquilibrium, rfisht, rfloor, rfr, Rfr, rHar, rhard, rharu, rharul, Rho, rho, rhov, RightAngleBracket, RightArrowBar, rightarrow, RightArrow, Rightarrow, RightArrowLeftArrow, rightarrowtail, RightCeiling, RightDoubleBracket, RightDownTeeVector, RightDownVectorBar, RightDownVector, RightFloor, rightharpoondown, rightharpoonup, rightleftarrows, rightleftharpoons, rightrightarrows, rightsquigarrow, RightTeeArrow, RightTee, RightTeeVector, rightthreetimes, RightTriangleBar, RightTriangle, RightTriangleEqual, RightUpDownVector, RightUpTeeVector, RightUpVectorBar, RightUpVector, RightVectorBar, RightVector, ring, risingdotseq, rlarr, rlhar, rlm, rmoustache, rmoust, rnmid, roang, roarr, robrk, ropar, ropf, Ropf, roplus, rotimes, RoundImplies, rpar, rpargt, rppolint, rrarr, Rrightarrow, rsaquo, rscr, Rscr, rsh, Rsh, rsqb, rsquo, rsquor, rthree, rtimes, rtri, rtrie, rtrif, rtriltri, RuleDelayed, ruluhar, rx, Sacute, sacute, sbquo, scap, Scaron, scaron, Sc, sc, sccue, sce, scE, Scedil, scedil, Scirc, scirc, scnap, scnE, scnsim, scpolint, scsim, Scy, scy, sdotb, sdot, sdote, searhk, searr, seArr, searrow, sect: sect$1, semi, seswar, setminus, setmn, sext, Sfr, sfr, sfrown, sharp, SHCHcy, shchcy, SHcy, shcy, ShortDownArrow, ShortLeftArrow, shortmid, shortparallel, ShortRightArrow, ShortUpArrow, shy: shy$1, Sigma, sigma, sigmaf, sigmav, sim, simdot, sime, simeq, simg, simgE, siml, simlE, simne, simplus, simrarr, slarr, SmallCircle, smallsetminus, smashp, smeparsl, smid, smile, smt, smte, smtes, SOFTcy, softcy, solbar, solb, sol, Sopf, sopf, spades, spadesuit, spar, sqcap, sqcaps, sqcup, sqcups, Sqrt, sqsub, sqsube, sqsubset, sqsubseteq, sqsup, sqsupe, sqsupset, sqsupseteq, square, Square, SquareIntersection, SquareSubset, SquareSubsetEqual, SquareSuperset, SquareSupersetEqual, SquareUnion, squarf, squ, squf, srarr, Sscr, sscr, ssetmn, ssmile, sstarf, Star, star, starf, straightepsilon, straightphi, strns, sub: sub$1, Sub, subdot, subE, sube, subedot, submult, subnE, subne, subplus, subrarr, subset, Subset, subseteq, subseteqq, SubsetEqual, subsetneq, subsetneqq, subsim, subsub, subsup, succapprox, succ, succcurlyeq, Succeeds, SucceedsEqual, SucceedsSlantEqual, SucceedsTilde, succeq, succnapprox, succneqq, succnsim, succsim, SuchThat, sum, Sum, sung, sup1: sup1$1, sup2: sup2$1, sup3: sup3$1, sup, Sup, supdot, supdsub, supE, supe, supedot, Superset, SupersetEqual, suphsol, suphsub, suplarr, supmult, supnE, supne, supplus, supset, Supset, supseteq, supseteqq, supsetneq, supsetneqq, supsim, supsub, supsup, swarhk, swarr, swArr, swarrow, swnwar, szlig: szlig$1, Tab, target, Tau, tau, tbrk, Tcaron, tcaron, Tcedil, tcedil, Tcy, tcy, tdot, telrec, Tfr, tfr, there4, therefore, Therefore, Theta, theta, thetasym, thetav, thickapprox, thicksim, ThickSpace, ThinSpace, thinsp, thkap, thksim, THORN: THORN$1, thorn: thorn$1, tilde, Tilde, TildeEqual, TildeFullEqual, TildeTilde, timesbar, timesb, times: times$1, timesd, tint, toea, topbot, topcir, top, Topf, topf, topfork, tosa, tprime, trade, TRADE, triangle, triangledown, triangleleft, trianglelefteq, triangleq, triangleright, trianglerighteq, tridot, trie, triminus, TripleDot, triplus, trisb, tritime, trpezium, Tscr, tscr, TScy, tscy, TSHcy, tshcy, Tstrok, tstrok, twixt, twoheadleftarrow, twoheadrightarrow, Uacute: Uacute$1, uacute: uacute$1, uarr, Uarr, uArr, Uarrocir, Ubrcy, ubrcy, Ubreve, ubreve, Ucirc: Ucirc$1, ucirc: ucirc$1, Ucy, ucy, udarr, Udblac, udblac, udhar, ufisht, Ufr, ufr, Ugrave: Ugrave$1, ugrave: ugrave$1, uHar, uharl, uharr, uhblk, ulcorn, ulcorner, ulcrop, ultri, Umacr, umacr, uml: uml$1, UnderBar, UnderBrace, UnderBracket, UnderParenthesis, Union, UnionPlus, Uogon, uogon, Uopf, uopf, UpArrowBar, uparrow, UpArrow, Uparrow, UpArrowDownArrow, updownarrow, UpDownArrow, Updownarrow, UpEquilibrium, upharpoonleft, upharpoonright, uplus, UpperLeftArrow, UpperRightArrow, upsi, Upsi, upsih, Upsilon, upsilon, UpTeeArrow, UpTee, upuparrows, urcorn, urcorner, urcrop, Uring, uring, urtri, Uscr, uscr, utdot, Utilde, utilde, utri, utrif, uuarr, Uuml: Uuml$1, uuml: uuml$1, uwangle, vangrt, varepsilon, varkappa, varnothing, varphi, varpi, varpropto, varr, vArr, varrho, varsigma, varsubsetneq, varsubsetneqq, varsupsetneq, varsupsetneqq, vartheta, vartriangleleft, vartriangleright, vBar, Vbar, vBarv, Vcy, vcy, vdash, vDash, Vdash, VDash, Vdashl, veebar, vee, Vee, veeeq, vellip, verbar, Verbar, vert, Vert, VerticalBar, VerticalLine, VerticalSeparator, VerticalTilde, VeryThinSpace, Vfr, vfr, vltri, vnsub, vnsup, Vopf, vopf, vprop, vrtri, Vscr, vscr, vsubnE, vsubne, vsupnE, vsupne, Vvdash, vzigzag, Wcirc, wcirc, wedbar, wedge, Wedge, wedgeq, weierp, Wfr, wfr, Wopf, wopf, wp, wr, wreath, Wscr, wscr, xcap, xcirc, xcup, xdtri, Xfr, xfr, xharr, xhArr, Xi, xi, xlarr, xlArr, xmap, xnis, xodot, Xopf, xopf, xoplus, xotime, xrarr, xrArr, Xscr, xscr, xsqcup, xuplus, xutri, xvee, xwedge, Yacute: Yacute$1, yacute: yacute$1, YAcy, yacy, Ycirc, ycirc, Ycy, ycy, yen: yen$1, Yfr, yfr, YIcy, yicy, Yopf, yopf, Yscr, yscr, YUcy, yucy, yuml: yuml$1, Yuml, Zacute, zacute, Zcaron, zcaron, Zcy, zcy, Zdot, zdot, zeetrf, ZeroWidthSpace, Zeta, zeta, zfr, Zfr, ZHcy, zhcy, zigrarr, zopf, Zopf, Zscr, zscr, zwj, zwnj }; var Aacute = "\xC1"; var aacute = "\xE1"; var Acirc = "\xC2"; var acirc = "\xE2"; var acute = "\xB4"; var AElig = "\xC6"; var aelig = "\xE6"; var Agrave = "\xC0"; var agrave = "\xE0"; var amp$1 = "&"; var AMP = "&"; var Aring = "\xC5"; var aring = "\xE5"; var Atilde = "\xC3"; var atilde = "\xE3"; var Auml = "\xC4"; var auml = "\xE4"; var brvbar = "\xA6"; var Ccedil = "\xC7"; var ccedil = "\xE7"; var cedil = "\xB8"; var cent = "\xA2"; var copy$1 = "\xA9"; var COPY = "\xA9"; var curren = "\xA4"; var deg = "\xB0"; var divide = "\xF7"; var Eacute = "\xC9"; var eacute = "\xE9"; var Ecirc = "\xCA"; var ecirc = "\xEA"; var Egrave = "\xC8"; var egrave = "\xE8"; var ETH = "\xD0"; var eth = "\xF0"; var Euml = "\xCB"; var euml = "\xEB"; var frac12 = "\xBD"; var frac14 = "\xBC"; var frac34 = "\xBE"; var gt$1 = ">"; var GT = ">"; var Iacute = "\xCD"; var iacute = "\xED"; var Icirc = "\xCE"; var icirc = "\xEE"; var iexcl = "\xA1"; var Igrave = "\xCC"; var igrave = "\xEC"; var iquest = "\xBF"; var Iuml = "\xCF"; var iuml = "\xEF"; var laquo = "\xAB"; var lt$1 = "<"; var LT = "<"; var macr = "\xAF"; var micro = "\xB5"; var middot = "\xB7"; var nbsp = "\xA0"; var not = "\xAC"; var Ntilde = "\xD1"; var ntilde = "\xF1"; var Oacute = "\xD3"; var oacute = "\xF3"; var Ocirc = "\xD4"; var ocirc = "\xF4"; var Ograve = "\xD2"; var ograve = "\xF2"; var ordf = "\xAA"; var ordm = "\xBA"; var Oslash = "\xD8"; var oslash = "\xF8"; var Otilde = "\xD5"; var otilde = "\xF5"; var Ouml = "\xD6"; var ouml = "\xF6"; var para = "\xB6"; var plusmn = "\xB1"; var pound = "\xA3"; var quot$1 = '"'; var QUOT = '"'; var raquo = "\xBB"; var reg = "\xAE"; var REG = "\xAE"; var sect = "\xA7"; var shy = "\xAD"; var sup1 = "\xB9"; var sup2 = "\xB2"; var sup3 = "\xB3"; var szlig = "\xDF"; var THORN = "\xDE"; var thorn = "\xFE"; var times = "\xD7"; var Uacute = "\xDA"; var uacute = "\xFA"; var Ucirc = "\xDB"; var ucirc = "\xFB"; var Ugrave = "\xD9"; var ugrave = "\xF9"; var uml = "\xA8"; var Uuml = "\xDC"; var uuml = "\xFC"; var Yacute = "\xDD"; var yacute = "\xFD"; var yen = "\xA5"; var yuml = "\xFF"; var require$$1 = { Aacute, aacute, Acirc, acirc, acute, AElig, aelig, Agrave, agrave, amp: amp$1, AMP, Aring, aring, Atilde, atilde, Auml, auml, brvbar, Ccedil, ccedil, cedil, cent, copy: copy$1, COPY, curren, deg, divide, Eacute, eacute, Ecirc, ecirc, Egrave, egrave, ETH, eth, Euml, euml, frac12, frac14, frac34, gt: gt$1, GT, Iacute, iacute, Icirc, icirc, iexcl, Igrave, igrave, iquest, Iuml, iuml, laquo, lt: lt$1, LT, macr, micro, middot, nbsp, not, Ntilde, ntilde, Oacute, oacute, Ocirc, ocirc, Ograve, ograve, ordf, ordm, Oslash, oslash, Otilde, otilde, Ouml, ouml, para, plusmn, pound, quot: quot$1, QUOT, raquo, reg, REG, sect, shy, sup1, sup2, sup3, szlig, THORN, thorn, times, Uacute, uacute, Ucirc, ucirc, Ugrave, ugrave, uml, Uuml, uuml, Yacute, yacute, yen, yuml }; var amp = "&"; var apos = "'"; var gt = ">"; var lt = "<"; var quot = '"'; var require$$0$1 = { amp, apos, gt, lt, quot }; var decode_codepoint = {}; var require$$0 = { 0: 65533, 128: 8364, 130: 8218, 131: 402, 132: 8222, 133: 8230, 134: 8224, 135: 8225, 136: 710, 137: 8240, 138: 352, 139: 8249, 140: 338, 142: 381, 145: 8216, 146: 8217, 147: 8220, 148: 8221, 149: 8226, 150: 8211, 151: 8212, 152: 732, 153: 8482, 154: 353, 155: 8250, 156: 339, 158: 382, 159: 376 }; var __importDefault$4 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(decode_codepoint, "__esModule", { value: true }); var decode_json_1 = __importDefault$4(require$$0); var fromCodePoint = String.fromCodePoint || function(codePoint) { var output = ""; if (codePoint > 65535) { codePoint -= 65536; output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296); codePoint = 56320 | codePoint & 1023; } output += String.fromCharCode(codePoint); return output; }; function decodeCodePoint(codePoint) { if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { return "\uFFFD"; } if (codePoint in decode_json_1.default) { codePoint = decode_json_1.default[codePoint]; } return fromCodePoint(codePoint); } decode_codepoint.default = decodeCodePoint; var __importDefault$3 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(decode, "__esModule", { value: true }); decode.decodeHTML = decode.decodeHTMLStrict = decode.decodeXML = void 0; var entities_json_1$1 = __importDefault$3(require$$1$1); var legacy_json_1 = __importDefault$3(require$$1); var xml_json_1$1 = __importDefault$3(require$$0$1); var decode_codepoint_1 = __importDefault$3(decode_codepoint); var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g; decode.decodeXML = getStrictDecoder(xml_json_1$1.default); decode.decodeHTMLStrict = getStrictDecoder(entities_json_1$1.default); function getStrictDecoder(map2) { var replace2 = getReplacer(map2); return function(str) { return String(str).replace(strictEntityRe, replace2); }; } var sorter = function(a, b) { return a < b ? 1 : -1; }; decode.decodeHTML = function() { var legacy2 = Object.keys(legacy_json_1.default).sort(sorter); var keys = Object.keys(entities_json_1$1.default).sort(sorter); for (var i = 0, j = 0; i < keys.length; i++) { if (legacy2[j] === keys[i]) { keys[i] += ";?"; j++; } else { keys[i] += ";"; } } var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"); var replace2 = getReplacer(entities_json_1$1.default); function replacer(str) { if (str.substr(-1) !== ";") str += ";"; return replace2(str); } return function(str) { return String(str).replace(re, replacer); }; }(); function getReplacer(map2) { return function replace2(str) { if (str.charAt(1) === "#") { var secondChar = str.charAt(2); if (secondChar === "X" || secondChar === "x") { return decode_codepoint_1.default(parseInt(str.substr(3), 16)); } return decode_codepoint_1.default(parseInt(str.substr(2), 10)); } return map2[str.slice(1, -1)] || str; }; } var encode = {}; var __importDefault$2 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(encode, "__esModule", { value: true }); encode.escapeUTF8 = encode.escape = encode.encodeNonAsciiHTML = encode.encodeHTML = encode.encodeXML = void 0; var xml_json_1 = __importDefault$2(require$$0$1); var inverseXML = getInverseObj(xml_json_1.default); var xmlReplacer = getInverseReplacer(inverseXML); encode.encodeXML = getASCIIEncoder(inverseXML); var entities_json_1 = __importDefault$2(require$$1$1); var inverseHTML = getInverseObj(entities_json_1.default); var htmlReplacer = getInverseReplacer(inverseHTML); encode.encodeHTML = getInverse(inverseHTML, htmlReplacer); encode.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML); function getInverseObj(obj) { return Object.keys(obj).sort().reduce(function(inverse, name2) { inverse[obj[name2]] = "&" + name2 + ";"; return inverse; }, {}); } function getInverseReplacer(inverse) { var single = []; var multiple = []; for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) { var k = _a[_i]; if (k.length === 1) { single.push("\\" + k); } else { multiple.push(k); } } single.sort(); for (var start = 0; start < single.length - 1; start++) { var end = start; while (end < single.length - 1 && single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) { end += 1; } var count = 1 + end - start; if (count < 3) continue; single.splice(start, count, single[start] + "-" + single[end]); } multiple.unshift("[" + single.join("") + "]"); return new RegExp(multiple.join("|"), "g"); } var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g; var getCodePoint = String.prototype.codePointAt != null ? function(str) { return str.codePointAt(0); } : function(c) { return (c.charCodeAt(0) - 55296) * 1024 + c.charCodeAt(1) - 56320 + 65536; }; function singleCharReplacer(c) { return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0)).toString(16).toUpperCase() + ";"; } function getInverse(inverse, re) { return function(data) { return data.replace(re, function(name2) { return inverse[name2]; }).replace(reNonASCII, singleCharReplacer); }; } var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g"); function escape(data) { return data.replace(reEscapeChars, singleCharReplacer); } encode.escape = escape; function escapeUTF8(data) { return data.replace(xmlReplacer, singleCharReplacer); } encode.escapeUTF8 = escapeUTF8; function getASCIIEncoder(obj) { return function(data) { return data.replace(reEscapeChars, function(c) { return obj[c] || singleCharReplacer(c); }); }; } (function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0; var decode_1 = decode; var encode_1 = encode; function decode$1(data, level) { return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data); } exports.decode = decode$1; function decodeStrict(data, level) { return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data); } exports.decodeStrict = decodeStrict; function encode$1(data, level) { return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data); } exports.encode = encode$1; var encode_2 = encode; Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function() { return encode_2.encodeXML; } }); Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function() { return encode_2.encodeHTML; } }); Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function() { return encode_2.encodeNonAsciiHTML; } }); Object.defineProperty(exports, "escape", { enumerable: true, get: function() { return encode_2.escape; } }); Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function() { return encode_2.escapeUTF8; } }); Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function() { return encode_2.encodeHTML; } }); Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function() { return encode_2.encodeHTML; } }); var decode_2 = decode; Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function() { return decode_2.decodeXML; } }); Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function() { return decode_2.decodeHTML; } }); Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function() { return decode_2.decodeHTMLStrict; } }); Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function() { return decode_2.decodeHTML; } }); Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function() { return decode_2.decodeHTML; } }); Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function() { return decode_2.decodeHTMLStrict; } }); Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function() { return decode_2.decodeHTMLStrict; } }); Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function() { return decode_2.decodeXML; } }); })(lib$3); var foreignNames = {}; Object.defineProperty(foreignNames, "__esModule", { value: true }); foreignNames.attributeNames = foreignNames.elementNames = void 0; foreignNames.elementNames = new Map([["altglyph", "altGlyph"], ["altglyphdef", "altGlyphDef"], ["altglyphitem", "altGlyphItem"], ["animatecolor", "animateColor"], ["animatemotion", "animateMotion"], ["animatetransform", "animateTransform"], ["clippath", "clipPath"], ["feblend", "feBlend"], ["fecolormatrix", "feColorMatrix"], ["fecomponenttransfer", "feComponentTransfer"], ["fecomposite", "feComposite"], ["feconvolvematrix", "feConvolveMatrix"], ["fediffuselighting", "feDiffuseLighting"], ["fedisplacementmap", "feDisplacementMap"], ["fedistantlight", "feDistantLight"], ["fedropshadow", "feDropShadow"], ["feflood", "feFlood"], ["fefunca", "feFuncA"], ["fefuncb", "feFuncB"], ["fefuncg", "feFuncG"], ["fefuncr", "feFuncR"], ["fegaussianblur", "feGaussianBlur"], ["feimage", "feImage"], ["femerge", "feMerge"], ["femergenode", "feMergeNode"], ["femorphology", "feMorphology"], ["feoffset", "feOffset"], ["fepointlight", "fePointLight"], ["fespecularlighting", "feSpecularLighting"], ["fespotlight", "feSpotLight"], ["fetile", "feTile"], ["feturbulence", "feTurbulence"], ["foreignobject", "foreignObject"], ["glyphref", "glyphRef"], ["lineargradient", "linearGradient"], ["radialgradient", "radialGradient"], ["textpath", "textPath"]]); foreignNames.attributeNames = new Map([["definitionurl", "definitionURL"], ["attributename", "attributeName"], ["attributetype", "attributeType"], ["basefrequency", "baseFrequency"], ["baseprofile", "baseProfile"], ["calcmode", "calcMode"], ["clippathunits", "clipPathUnits"], ["diffuseconstant", "diffuseConstant"], ["edgemode", "edgeMode"], ["filterunits", "filterUnits"], ["glyphref", "glyphRef"], ["gradienttransform", "gradientTransform"], ["gradientunits", "gradientUnits"], ["kernelmatrix", "kernelMatrix"], ["kernelunitlength", "kernelUnitLength"], ["keypoints", "keyPoints"], ["keysplines", "keySplines"], ["keytimes", "keyTimes"], ["lengthadjust", "lengthAdjust"], ["limitingconeangle", "limitingConeAngle"], ["markerheight", "markerHeight"], ["markerunits", "markerUnits"], ["markerwidth", "markerWidth"], ["maskcontentunits", "maskContentUnits"], ["maskunits", "maskUnits"], ["numoctaves", "numOctaves"], ["pathlength", "pathLength"], ["patterncontentunits", "patternContentUnits"], ["patterntransform", "patternTransform"], ["patternunits", "patternUnits"], ["pointsatx", "pointsAtX"], ["pointsaty", "pointsAtY"], ["pointsatz", "pointsAtZ"], ["preservealpha", "preserveAlpha"], ["preserveaspectratio", "preserveAspectRatio"], ["primitiveunits", "primitiveUnits"], ["refx", "refX"], ["refy", "refY"], ["repeatcount", "repeatCount"], ["repeatdur", "repeatDur"], ["requiredextensions", "requiredExtensions"], ["requiredfeatures", "requiredFeatures"], ["specularconstant", "specularConstant"], ["specularexponent", "specularExponent"], ["spreadmethod", "spreadMethod"], ["startoffset", "startOffset"], ["stddeviation", "stdDeviation"], ["stitchtiles", "stitchTiles"], ["surfacescale", "surfaceScale"], ["systemlanguage", "systemLanguage"], ["tablevalues", "tableValues"], ["targetx", "targetX"], ["targety", "targetY"], ["textlength", "textLength"], ["viewbox", "viewBox"], ["viewtarget", "viewTarget"], ["xchannelselector", "xChannelSelector"], ["ychannelselector", "yChannelSelector"], ["zoomandpan", "zoomAndPan"]]); var __assign = commonjsGlobal && commonjsGlobal.__assign || function() { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault = commonjsGlobal && commonjsGlobal.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar = commonjsGlobal && commonjsGlobal.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } __setModuleDefault(result, mod); return result; }; Object.defineProperty(lib$4, "__esModule", { value: true }); var ElementType = __importStar(lib$5); var entities_1 = lib$3; var foreignNames_1 = foreignNames; var unencodedElements = new Set(["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"]); function formatAttributes(attributes2, opts) { if (!attributes2) return; return Object.keys(attributes2).map(function(key) { var _a, _b; var value = (_a = attributes2[key]) !== null && _a !== void 0 ? _a : ""; if (opts.xmlMode === "foreign") { key = (_b = foreignNames_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key; } if (!opts.emptyAttrs && !opts.xmlMode && value === "") { return key; } return key + '="' + (opts.decodeEntities !== false ? entities_1.encodeXML(value) : value.replace(/"/g, """)) + '"'; }).join(" "); } var singleTag = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]); function render(node2, options) { if (options === void 0) { options = {}; } var nodes = "length" in node2 ? node2 : [node2]; var output = ""; for (var i = 0; i < nodes.length; i++) { output += renderNode(nodes[i], options); } return output; } lib$4.default = render; function renderNode(node2, options) { switch (node2.type) { case ElementType.Root: return render(node2.children, options); case ElementType.Directive: case ElementType.Doctype: return renderDirective(node2); case ElementType.Comment: return renderComment(node2); case ElementType.CDATA: return renderCdata(node2); case ElementType.Script: case ElementType.Style: case ElementType.Tag: return renderTag(node2, options); case ElementType.Text: return renderText(node2, options); } } var foreignModeIntegrationPoints = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title"]); var foreignElements = new Set(["svg", "math"]); function renderTag(elem, opts) { var _a; if (opts.xmlMode === "foreign") { elem.name = (_a = foreignNames_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name; if (elem.parent && foreignModeIntegrationPoints.has(elem.parent.name)) { opts = __assign(__assign({}, opts), { xmlMode: false }); } } if (!opts.xmlMode && foreignElements.has(elem.name)) { opts = __assign(__assign({}, opts), { xmlMode: "foreign" }); } var tag = "<" + elem.name; var attribs = formatAttributes(elem.attribs, opts); if (attribs) { tag += " " + attribs; } if (elem.children.length === 0 && (opts.xmlMode ? opts.selfClosingTags !== false : opts.selfClosingTags && singleTag.has(elem.name))) { if (!opts.xmlMode) tag += " "; tag += "/>"; } else { tag += ">"; if (elem.children.length > 0) { tag += render(elem.children, opts); } if (opts.xmlMode || !singleTag.has(elem.name)) { tag += ""; } } return tag; } function renderDirective(elem) { return "<" + elem.data + ">"; } function renderText(elem, opts) { var data = elem.data || ""; if (opts.decodeEntities !== false && !(!opts.xmlMode && elem.parent && unencodedElements.has(elem.parent.name))) { data = entities_1.encodeXML(data); } return data; } function renderCdata(elem) { return ""; } function renderComment(elem) { return ""; } var __importDefault$1 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(stringify$2, "__esModule", { value: true }); stringify$2.innerText = stringify$2.textContent = stringify$2.getText = stringify$2.getInnerHTML = stringify$2.getOuterHTML = void 0; var domhandler_1$4 = lib$6; var dom_serializer_1 = __importDefault$1(lib$4); var domelementtype_1 = lib$5; function getOuterHTML(node2, options) { return (0, dom_serializer_1.default)(node2, options); } stringify$2.getOuterHTML = getOuterHTML; function getInnerHTML(node2, options) { return (0, domhandler_1$4.hasChildren)(node2) ? node2.children.map(function(node3) { return getOuterHTML(node3, options); }).join("") : ""; } stringify$2.getInnerHTML = getInnerHTML; function getText$1(node2) { if (Array.isArray(node2)) return node2.map(getText$1).join(""); if ((0, domhandler_1$4.isTag)(node2)) return node2.name === "br" ? "\n" : getText$1(node2.children); if ((0, domhandler_1$4.isCDATA)(node2)) return getText$1(node2.children); if ((0, domhandler_1$4.isText)(node2)) return node2.data; return ""; } stringify$2.getText = getText$1; function textContent(node2) { if (Array.isArray(node2)) return node2.map(textContent).join(""); if ((0, domhandler_1$4.hasChildren)(node2) && !(0, domhandler_1$4.isComment)(node2)) { return textContent(node2.children); } if ((0, domhandler_1$4.isText)(node2)) return node2.data; return ""; } stringify$2.textContent = textContent; function innerText(node2) { if (Array.isArray(node2)) return node2.map(innerText).join(""); if ((0, domhandler_1$4.hasChildren)(node2) && (node2.type === domelementtype_1.ElementType.Tag || (0, domhandler_1$4.isCDATA)(node2))) { return innerText(node2.children); } if ((0, domhandler_1$4.isText)(node2)) return node2.data; return ""; } stringify$2.innerText = innerText; var traversal = {}; Object.defineProperty(traversal, "__esModule", { value: true }); traversal.prevElementSibling = traversal.nextElementSibling = traversal.getName = traversal.hasAttrib = traversal.getAttributeValue = traversal.getSiblings = traversal.getParent = traversal.getChildren = void 0; var domhandler_1$3 = lib$6; var emptyArray = []; function getChildren$1(elem) { var _a; return (_a = elem.children) !== null && _a !== void 0 ? _a : emptyArray; } traversal.getChildren = getChildren$1; function getParent$1(elem) { return elem.parent || null; } traversal.getParent = getParent$1; function getSiblings$1(elem) { var _a, _b; var parent = getParent$1(elem); if (parent != null) return getChildren$1(parent); var siblings = [elem]; var prev = elem.prev, next = elem.next; while (prev != null) { siblings.unshift(prev); _a = prev, prev = _a.prev; } while (next != null) { siblings.push(next); _b = next, next = _b.next; } return siblings; } traversal.getSiblings = getSiblings$1; function getAttributeValue$1(elem, name2) { var _a; return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name2]; } traversal.getAttributeValue = getAttributeValue$1; function hasAttrib$1(elem, name2) { return elem.attribs != null && Object.prototype.hasOwnProperty.call(elem.attribs, name2) && elem.attribs[name2] != null; } traversal.hasAttrib = hasAttrib$1; function getName$1(elem) { return elem.name; } traversal.getName = getName$1; function nextElementSibling(elem) { var _a; var next = elem.next; while (next !== null && !(0, domhandler_1$3.isTag)(next)) _a = next, next = _a.next; return next; } traversal.nextElementSibling = nextElementSibling; function prevElementSibling(elem) { var _a; var prev = elem.prev; while (prev !== null && !(0, domhandler_1$3.isTag)(prev)) _a = prev, prev = _a.prev; return prev; } traversal.prevElementSibling = prevElementSibling; var manipulation = {}; Object.defineProperty(manipulation, "__esModule", { value: true }); manipulation.prepend = manipulation.prependChild = manipulation.append = manipulation.appendChild = manipulation.replaceElement = manipulation.removeElement = void 0; function removeElement(elem) { if (elem.prev) elem.prev.next = elem.next; if (elem.next) elem.next.prev = elem.prev; if (elem.parent) { var childs = elem.parent.children; childs.splice(childs.lastIndexOf(elem), 1); } } manipulation.removeElement = removeElement; function replaceElement(elem, replacement) { var prev = replacement.prev = elem.prev; if (prev) { prev.next = replacement; } var next = replacement.next = elem.next; if (next) { next.prev = replacement; } var parent = replacement.parent = elem.parent; if (parent) { var childs = parent.children; childs[childs.lastIndexOf(elem)] = replacement; } } manipulation.replaceElement = replaceElement; function appendChild(elem, child) { removeElement(child); child.next = null; child.parent = elem; if (elem.children.push(child) > 1) { var sibling = elem.children[elem.children.length - 2]; sibling.next = child; child.prev = sibling; } else { child.prev = null; } } manipulation.appendChild = appendChild; function append(elem, next) { removeElement(next); var parent = elem.parent; var currNext = elem.next; next.next = currNext; next.prev = elem; elem.next = next; next.parent = parent; if (currNext) { currNext.prev = next; if (parent) { var childs = parent.children; childs.splice(childs.lastIndexOf(currNext), 0, next); } } else if (parent) { parent.children.push(next); } } manipulation.append = append; function prependChild(elem, child) { removeElement(child); child.parent = elem; child.prev = null; if (elem.children.unshift(child) !== 1) { var sibling = elem.children[1]; sibling.prev = child; child.next = sibling; } else { child.next = null; } } manipulation.prependChild = prependChild; function prepend(elem, prev) { removeElement(prev); var parent = elem.parent; if (parent) { var childs = parent.children; childs.splice(childs.indexOf(elem), 0, prev); } if (elem.prev) { elem.prev.next = prev; } prev.parent = parent; prev.prev = elem.prev; prev.next = elem; elem.prev = prev; } manipulation.prepend = prepend; var querying = {}; Object.defineProperty(querying, "__esModule", { value: true }); querying.findAll = querying.existsOne = querying.findOne = querying.findOneChild = querying.find = querying.filter = void 0; var domhandler_1$2 = lib$6; function filter(test, node2, recurse, limit) { if (recurse === void 0) { recurse = true; } if (limit === void 0) { limit = Infinity; } if (!Array.isArray(node2)) node2 = [node2]; return find(test, node2, recurse, limit); } querying.filter = filter; function find(test, nodes, recurse, limit) { var result = []; for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { var elem = nodes_1[_i]; if (test(elem)) { result.push(elem); if (--limit <= 0) break; } if (recurse && (0, domhandler_1$2.hasChildren)(elem) && elem.children.length > 0) { var children = find(test, elem.children, recurse, limit); result.push.apply(result, children); limit -= children.length; if (limit <= 0) break; } } return result; } querying.find = find; function findOneChild(test, nodes) { return nodes.find(test); } querying.findOneChild = findOneChild; function findOne$1(test, nodes, recurse) { if (recurse === void 0) { recurse = true; } var elem = null; for (var i = 0; i < nodes.length && !elem; i++) { var checked = nodes[i]; if (!(0, domhandler_1$2.isTag)(checked)) { continue; } else if (test(checked)) { elem = checked; } else if (recurse && checked.children.length > 0) { elem = findOne$1(test, checked.children); } } return elem; } querying.findOne = findOne$1; function existsOne$1(test, nodes) { return nodes.some(function(checked) { return (0, domhandler_1$2.isTag)(checked) && (test(checked) || checked.children.length > 0 && existsOne$1(test, checked.children)); }); } querying.existsOne = existsOne$1; function findAll$1(test, nodes) { var _a; var result = []; var stack = nodes.filter(domhandler_1$2.isTag); var elem; while (elem = stack.shift()) { var children = (_a = elem.children) === null || _a === void 0 ? void 0 : _a.filter(domhandler_1$2.isTag); if (children && children.length > 0) { stack.unshift.apply(stack, children); } if (test(elem)) result.push(elem); } return result; } querying.findAll = findAll$1; var legacy = {}; Object.defineProperty(legacy, "__esModule", { value: true }); legacy.getElementsByTagType = legacy.getElementsByTagName = legacy.getElementById = legacy.getElements = legacy.testElement = void 0; var domhandler_1$1 = lib$6; var querying_1 = querying; var Checks = { tag_name: function(name2) { if (typeof name2 === "function") { return function(elem) { return (0, domhandler_1$1.isTag)(elem) && name2(elem.name); }; } else if (name2 === "*") { return domhandler_1$1.isTag; } return function(elem) { return (0, domhandler_1$1.isTag)(elem) && elem.name === name2; }; }, tag_type: function(type) { if (typeof type === "function") { return function(elem) { return type(elem.type); }; } return function(elem) { return elem.type === type; }; }, tag_contains: function(data) { if (typeof data === "function") { return function(elem) { return (0, domhandler_1$1.isText)(elem) && data(elem.data); }; } return function(elem) { return (0, domhandler_1$1.isText)(elem) && elem.data === data; }; } }; function getAttribCheck(attrib, value) { if (typeof value === "function") { return function(elem) { return (0, domhandler_1$1.isTag)(elem) && value(elem.attribs[attrib]); }; } return function(elem) { return (0, domhandler_1$1.isTag)(elem) && elem.attribs[attrib] === value; }; } function combineFuncs(a, b) { return function(elem) { return a(elem) || b(elem); }; } function compileTest(options) { var funcs = Object.keys(options).map(function(key) { var value = options[key]; return Object.prototype.hasOwnProperty.call(Checks, key) ? Checks[key](value) : getAttribCheck(key, value); }); return funcs.length === 0 ? null : funcs.reduce(combineFuncs); } function testElement(options, node2) { var test = compileTest(options); return test ? test(node2) : true; } legacy.testElement = testElement; function getElements(options, nodes, recurse, limit) { if (limit === void 0) { limit = Infinity; } var test = compileTest(options); return test ? (0, querying_1.filter)(test, nodes, recurse, limit) : []; } legacy.getElements = getElements; function getElementById(id, nodes, recurse) { if (recurse === void 0) { recurse = true; } if (!Array.isArray(nodes)) nodes = [nodes]; return (0, querying_1.findOne)(getAttribCheck("id", id), nodes, recurse); } legacy.getElementById = getElementById; function getElementsByTagName(tagName, nodes, recurse, limit) { if (recurse === void 0) { recurse = true; } if (limit === void 0) { limit = Infinity; } return (0, querying_1.filter)(Checks.tag_name(tagName), nodes, recurse, limit); } legacy.getElementsByTagName = getElementsByTagName; function getElementsByTagType(type, nodes, recurse, limit) { if (recurse === void 0) { recurse = true; } if (limit === void 0) { limit = Infinity; } return (0, querying_1.filter)(Checks.tag_type(type), nodes, recurse, limit); } legacy.getElementsByTagType = getElementsByTagType; var helpers = {}; Object.defineProperty(helpers, "__esModule", { value: true }); helpers.uniqueSort = helpers.compareDocumentPosition = helpers.removeSubsets = void 0; var domhandler_1 = lib$6; function removeSubsets$1(nodes) { var idx = nodes.length; while (--idx >= 0) { var node2 = nodes[idx]; if (idx > 0 && nodes.lastIndexOf(node2, idx - 1) >= 0) { nodes.splice(idx, 1); continue; } for (var ancestor = node2.parent; ancestor; ancestor = ancestor.parent) { if (nodes.includes(ancestor)) { nodes.splice(idx, 1); break; } } } return nodes; } helpers.removeSubsets = removeSubsets$1; function compareDocumentPosition(nodeA, nodeB) { var aParents = []; var bParents = []; if (nodeA === nodeB) { return 0; } var current = (0, domhandler_1.hasChildren)(nodeA) ? nodeA : nodeA.parent; while (current) { aParents.unshift(current); current = current.parent; } current = (0, domhandler_1.hasChildren)(nodeB) ? nodeB : nodeB.parent; while (current) { bParents.unshift(current); current = current.parent; } var maxIdx = Math.min(aParents.length, bParents.length); var idx = 0; while (idx < maxIdx && aParents[idx] === bParents[idx]) { idx++; } if (idx === 0) { return 1; } var sharedParent = aParents[idx - 1]; var siblings = sharedParent.children; var aSibling = aParents[idx]; var bSibling = bParents[idx]; if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) { if (sharedParent === nodeB) { return 4 | 16; } return 4; } if (sharedParent === nodeA) { return 2 | 8; } return 2; } helpers.compareDocumentPosition = compareDocumentPosition; function uniqueSort(nodes) { nodes = nodes.filter(function(node2, i, arr) { return !arr.includes(node2, i + 1); }); nodes.sort(function(a, b) { var relative = compareDocumentPosition(a, b); if (relative & 2) { return -1; } else if (relative & 4) { return 1; } return 0; }); return nodes; } helpers.uniqueSort = uniqueSort; var feeds = {}; Object.defineProperty(feeds, "__esModule", { value: true }); feeds.getFeed = void 0; var stringify_1 = stringify$2; var legacy_1 = legacy; function getFeed(doc) { var feedRoot = getOneElement(isValidFeed, doc); return !feedRoot ? null : feedRoot.name === "feed" ? getAtomFeed(feedRoot) : getRssFeed(feedRoot); } feeds.getFeed = getFeed; function getAtomFeed(feedRoot) { var _a; var childs = feedRoot.children; var feed = { type: "atom", items: (0, legacy_1.getElementsByTagName)("entry", childs).map(function(item) { var _a2; var children = item.children; var entry = { media: getMediaElements(children) }; addConditionally(entry, "id", "id", children); addConditionally(entry, "title", "title", children); var href2 = (_a2 = getOneElement("link", children)) === null || _a2 === void 0 ? void 0 : _a2.attribs.href; if (href2) { entry.link = href2; } var description2 = fetch2("summary", children) || fetch2("content", children); if (description2) { entry.description = description2; } var pubDate = fetch2("updated", children); if (pubDate) { entry.pubDate = new Date(pubDate); } return entry; }) }; addConditionally(feed, "id", "id", childs); addConditionally(feed, "title", "title", childs); var href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs.href; if (href) { feed.link = href; } addConditionally(feed, "description", "subtitle", childs); var updated = fetch2("updated", childs); if (updated) { feed.updated = new Date(updated); } addConditionally(feed, "author", "email", childs, true); return feed; } function getRssFeed(feedRoot) { var _a, _b; var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []; var feed = { type: feedRoot.name.substr(0, 3), id: "", items: (0, legacy_1.getElementsByTagName)("item", feedRoot.children).map(function(item) { var children = item.children; var entry = { media: getMediaElements(children) }; addConditionally(entry, "id", "guid", children); addConditionally(entry, "title", "title", children); addConditionally(entry, "link", "link", children); addConditionally(entry, "description", "description", children); var pubDate = fetch2("pubDate", children); if (pubDate) entry.pubDate = new Date(pubDate); return entry; }) }; addConditionally(feed, "title", "title", childs); addConditionally(feed, "link", "link", childs); addConditionally(feed, "description", "description", childs); var updated = fetch2("lastBuildDate", childs); if (updated) { feed.updated = new Date(updated); } addConditionally(feed, "author", "managingEditor", childs, true); return feed; } var MEDIA_KEYS_STRING = ["url", "type", "lang"]; var MEDIA_KEYS_INT = ["fileSize", "bitrate", "framerate", "samplingrate", "channels", "duration", "height", "width"]; function getMediaElements(where) { return (0, legacy_1.getElementsByTagName)("media:content", where).map(function(elem) { var attribs = elem.attribs; var media = { medium: attribs.medium, isDefault: !!attribs.isDefault }; for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) { var attrib = MEDIA_KEYS_STRING_1[_i]; if (attribs[attrib]) { media[attrib] = attribs[attrib]; } } for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) { var attrib = MEDIA_KEYS_INT_1[_a]; if (attribs[attrib]) { media[attrib] = parseInt(attribs[attrib], 10); } } if (attribs.expression) { media.expression = attribs.expression; } return media; }); } function getOneElement(tagName, node2) { return (0, legacy_1.getElementsByTagName)(tagName, node2, true, 1)[0]; } function fetch2(tagName, where, recurse) { if (recurse === void 0) { recurse = false; } return (0, stringify_1.textContent)((0, legacy_1.getElementsByTagName)(tagName, where, recurse, 1)).trim(); } function addConditionally(obj, prop2, tagName, where, recurse) { if (recurse === void 0) { recurse = false; } var val = fetch2(tagName, where, recurse); if (val) obj[prop2] = val; } function isValidFeed(value) { return value === "rss" || value === "feed" || value === "rdf:RDF"; } (function(exports) { var __createBinding2 = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m, exports2) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0; __exportStar(stringify$2, exports); __exportStar(traversal, exports); __exportStar(manipulation, exports); __exportStar(querying, exports); __exportStar(legacy, exports); __exportStar(helpers, exports); __exportStar(feeds, exports); var domhandler_12 = lib$6; Object.defineProperty(exports, "isTag", { enumerable: true, get: function() { return domhandler_12.isTag; } }); Object.defineProperty(exports, "isCDATA", { enumerable: true, get: function() { return domhandler_12.isCDATA; } }); Object.defineProperty(exports, "isText", { enumerable: true, get: function() { return domhandler_12.isText; } }); Object.defineProperty(exports, "isComment", { enumerable: true, get: function() { return domhandler_12.isComment; } }); Object.defineProperty(exports, "isDocument", { enumerable: true, get: function() { return domhandler_12.isDocument; } }); Object.defineProperty(exports, "hasChildren", { enumerable: true, get: function() { return domhandler_12.hasChildren; } }); })(lib$7); var boolbase = { trueFunc: function trueFunc() { return true; }, falseFunc: function falseFunc() { return false; } }; var compile$3 = {}; var lib$2 = {}; var parse$4 = {}; var __spreadArray$1 = commonjsGlobal && commonjsGlobal.__spreadArray || function(to, from) { for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i]; return to; }; Object.defineProperty(parse$4, "__esModule", { value: true }); parse$4.isTraversal = void 0; var reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/; var reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi; var actionTypes$1 = new Map([["~", "element"], ["^", "start"], ["$", "end"], ["*", "any"], ["!", "not"], ["|", "hyphen"]]); var Traversals = { ">": "child", "<": "parent", "~": "sibling", "+": "adjacent" }; var attribSelectors = { "#": ["id", "equals"], ".": ["class", "element"] }; var unpackPseudos = new Set(["has", "not", "matches", "is", "host", "host-context"]); var traversalNames = new Set(__spreadArray$1(["descendant"], Object.keys(Traversals).map(function(k) { return Traversals[k]; }))); var caseInsensitiveAttributes = new Set(["accept", "accept-charset", "align", "alink", "axis", "bgcolor", "charset", "checked", "clear", "codetype", "color", "compact", "declare", "defer", "dir", "direction", "disabled", "enctype", "face", "frame", "hreflang", "http-equiv", "lang", "language", "link", "media", "method", "multiple", "nohref", "noresize", "noshade", "nowrap", "readonly", "rel", "rev", "rules", "scope", "scrolling", "selected", "shape", "target", "text", "type", "valign", "valuetype", "vlink"]); function isTraversal(selector) { return traversalNames.has(selector.type); } parse$4.isTraversal = isTraversal; var stripQuotesFromPseudos = new Set(["contains", "icontains"]); var quotes = new Set(['"', "'"]); function funescape(_, escaped, escapedWhitespace) { var high = parseInt(escaped, 16) - 65536; return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320); } function unescapeCSS(str) { return str.replace(reEscape, funescape); } function isWhitespace(c) { return c === " " || c === "\n" || c === " " || c === "\f" || c === "\r"; } function parse$3(selector, options) { var subselects2 = []; var endIndex = parseSelector(subselects2, "" + selector, options, 0); if (endIndex < selector.length) { throw new Error("Unmatched selector: " + selector.slice(endIndex)); } return subselects2; } parse$4.default = parse$3; function parseSelector(subselects2, selector, options, selectorIndex) { var _a, _b; if (options === void 0) { options = {}; } var tokens = []; var sawWS = false; function getName2(offset) { var match = selector.slice(selectorIndex + offset).match(reName); if (!match) { throw new Error("Expected name, found " + selector.slice(selectorIndex)); } var name2 = match[0]; selectorIndex += offset + name2.length; return unescapeCSS(name2); } function stripWhitespace(offset) { while (isWhitespace(selector.charAt(selectorIndex + offset))) offset++; selectorIndex += offset; } function isEscaped(pos) { var slashCount = 0; while (selector.charAt(--pos) === "\\") slashCount++; return (slashCount & 1) === 1; } function ensureNotTraversal() { if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) { throw new Error("Did not expect successive traversals."); } } stripWhitespace(0); while (selector !== "") { var firstChar = selector.charAt(selectorIndex); if (isWhitespace(firstChar)) { sawWS = true; stripWhitespace(1); } else if (firstChar in Traversals) { ensureNotTraversal(); tokens.push({ type: Traversals[firstChar] }); sawWS = false; stripWhitespace(1); } else if (firstChar === ",") { if (tokens.length === 0) { throw new Error("Empty sub-selector"); } subselects2.push(tokens); tokens = []; sawWS = false; stripWhitespace(1); } else if (selector.startsWith("/*", selectorIndex)) { var endIndex = selector.indexOf("*/", selectorIndex + 2); if (endIndex < 0) { throw new Error("Comment was not terminated"); } selectorIndex = endIndex + 2; } else { if (sawWS) { ensureNotTraversal(); tokens.push({ type: "descendant" }); sawWS = false; } if (firstChar in attribSelectors) { var _c = attribSelectors[firstChar], name_1 = _c[0], action = _c[1]; tokens.push({ type: "attribute", name: name_1, action, value: getName2(1), namespace: null, ignoreCase: options.xmlMode ? null : false }); } else if (firstChar === "[") { stripWhitespace(1); var name_2 = void 0; var namespace = null; if (selector.charAt(selectorIndex) === "|") { namespace = ""; selectorIndex += 1; } if (selector.startsWith("*|", selectorIndex)) { namespace = "*"; selectorIndex += 2; } name_2 = getName2(0); if (namespace === null && selector.charAt(selectorIndex) === "|" && selector.charAt(selectorIndex + 1) !== "=") { namespace = name_2; name_2 = getName2(1); } if ((_a = options.lowerCaseAttributeNames) !== null && _a !== void 0 ? _a : !options.xmlMode) { name_2 = name_2.toLowerCase(); } stripWhitespace(0); var action = "exists"; var possibleAction = actionTypes$1.get(selector.charAt(selectorIndex)); if (possibleAction) { action = possibleAction; if (selector.charAt(selectorIndex + 1) !== "=") { throw new Error("Expected `=`"); } stripWhitespace(2); } else if (selector.charAt(selectorIndex) === "=") { action = "equals"; stripWhitespace(1); } var value = ""; var ignoreCase = null; if (action !== "exists") { if (quotes.has(selector.charAt(selectorIndex))) { var quote = selector.charAt(selectorIndex); var sectionEnd = selectorIndex + 1; while (sectionEnd < selector.length && (selector.charAt(sectionEnd) !== quote || isEscaped(sectionEnd))) { sectionEnd += 1; } if (selector.charAt(sectionEnd) !== quote) { throw new Error("Attribute value didn't end"); } value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd)); selectorIndex = sectionEnd + 1; } else { var valueStart = selectorIndex; while (selectorIndex < selector.length && (!isWhitespace(selector.charAt(selectorIndex)) && selector.charAt(selectorIndex) !== "]" || isEscaped(selectorIndex))) { selectorIndex += 1; } value = unescapeCSS(selector.slice(valueStart, selectorIndex)); } stripWhitespace(0); var forceIgnore = selector.charAt(selectorIndex); if (forceIgnore === "s" || forceIgnore === "S") { ignoreCase = false; stripWhitespace(1); } else if (forceIgnore === "i" || forceIgnore === "I") { ignoreCase = true; stripWhitespace(1); } } if (!options.xmlMode) { ignoreCase !== null && ignoreCase !== void 0 ? ignoreCase : ignoreCase = caseInsensitiveAttributes.has(name_2); } if (selector.charAt(selectorIndex) !== "]") { throw new Error("Attribute selector didn't terminate"); } selectorIndex += 1; var attributeSelector = { type: "attribute", name: name_2, action, value, namespace, ignoreCase }; tokens.push(attributeSelector); } else if (firstChar === ":") { if (selector.charAt(selectorIndex + 1) === ":") { tokens.push({ type: "pseudo-element", name: getName2(2).toLowerCase() }); continue; } var name_3 = getName2(1).toLowerCase(); var data = null; if (selector.charAt(selectorIndex) === "(") { if (unpackPseudos.has(name_3)) { if (quotes.has(selector.charAt(selectorIndex + 1))) { throw new Error("Pseudo-selector " + name_3 + " cannot be quoted"); } data = []; selectorIndex = parseSelector(data, selector, options, selectorIndex + 1); if (selector.charAt(selectorIndex) !== ")") { throw new Error("Missing closing parenthesis in :" + name_3 + " (" + selector + ")"); } selectorIndex += 1; } else { selectorIndex += 1; var start = selectorIndex; var counter = 1; for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) { if (selector.charAt(selectorIndex) === "(" && !isEscaped(selectorIndex)) { counter++; } else if (selector.charAt(selectorIndex) === ")" && !isEscaped(selectorIndex)) { counter--; } } if (counter) { throw new Error("Parenthesis not matched"); } data = selector.slice(start, selectorIndex - 1); if (stripQuotesFromPseudos.has(name_3)) { var quot2 = data.charAt(0); if (quot2 === data.slice(-1) && quotes.has(quot2)) { data = data.slice(1, -1); } data = unescapeCSS(data); } } } tokens.push({ type: "pseudo", name: name_3, data }); } else { var namespace = null; var name_4 = void 0; if (firstChar === "*") { selectorIndex += 1; name_4 = "*"; } else if (reName.test(selector.slice(selectorIndex))) { if (selector.charAt(selectorIndex) === "|") { namespace = ""; selectorIndex += 1; } name_4 = getName2(0); } else { if (tokens.length && tokens[tokens.length - 1].type === "descendant") { tokens.pop(); } addToken(subselects2, tokens); return selectorIndex; } if (selector.charAt(selectorIndex) === "|") { namespace = name_4; if (selector.charAt(selectorIndex + 1) === "*") { name_4 = "*"; selectorIndex += 2; } else { name_4 = getName2(1); } } if (name_4 === "*") { tokens.push({ type: "universal", namespace }); } else { if ((_b = options.lowerCaseTags) !== null && _b !== void 0 ? _b : !options.xmlMode) { name_4 = name_4.toLowerCase(); } tokens.push({ type: "tag", name: name_4, namespace }); } } } } addToken(subselects2, tokens); return selectorIndex; } function addToken(subselects2, tokens) { if (subselects2.length > 0 && tokens.length === 0) { throw new Error("Empty sub-selector"); } subselects2.push(tokens); } var stringify$1 = {}; var __spreadArray = commonjsGlobal && commonjsGlobal.__spreadArray || function(to, from) { for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i]; return to; }; Object.defineProperty(stringify$1, "__esModule", { value: true }); var actionTypes = { equals: "", element: "~", start: "^", end: "$", any: "*", not: "!", hyphen: "|" }; var charsToEscape = new Set(__spreadArray(__spreadArray([], Object.keys(actionTypes).map(function(typeKey) { return actionTypes[typeKey]; }).filter(Boolean)), [":", "[", "]", " ", "\\", "(", ")", "'"])); function stringify(selector) { return selector.map(stringifySubselector).join(", "); } stringify$1.default = stringify; function stringifySubselector(token) { return token.map(stringifyToken).join(""); } function stringifyToken(token) { switch (token.type) { case "child": return " > "; case "parent": return " < "; case "sibling": return " ~ "; case "adjacent": return " + "; case "descendant": return " "; case "universal": return getNamespace(token.namespace) + "*"; case "tag": return getNamespacedName(token); case "pseudo-element": return "::" + escapeName(token.name); case "pseudo": if (token.data === null) return ":" + escapeName(token.name); if (typeof token.data === "string") { return ":" + escapeName(token.name) + "(" + escapeName(token.data) + ")"; } return ":" + escapeName(token.name) + "(" + stringify(token.data) + ")"; case "attribute": { if (token.name === "id" && token.action === "equals" && !token.ignoreCase && !token.namespace) { return "#" + escapeName(token.value); } if (token.name === "class" && token.action === "element" && !token.ignoreCase && !token.namespace) { return "." + escapeName(token.value); } var name_1 = getNamespacedName(token); if (token.action === "exists") { return "[" + name_1 + "]"; } return "[" + name_1 + actionTypes[token.action] + "='" + escapeName(token.value) + "'" + (token.ignoreCase ? "i" : token.ignoreCase === false ? "s" : "") + "]"; } } } function getNamespacedName(token) { return "" + getNamespace(token.namespace) + escapeName(token.name); } function getNamespace(namespace) { return namespace !== null ? (namespace === "*" ? "*" : escapeName(namespace)) + "|" : ""; } function escapeName(str) { return str.split("").map(function(c) { return charsToEscape.has(c) ? "\\" + c : c; }).join(""); } (function(exports) { var __createBinding2 = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m, exports2) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m, p); }; var __importDefault2 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.stringify = exports.parse = void 0; __exportStar(parse$4, exports); var parse_1 = parse$4; Object.defineProperty(exports, "parse", { enumerable: true, get: function() { return __importDefault2(parse_1).default; } }); var stringify_12 = stringify$1; Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { return __importDefault2(stringify_12).default; } }); })(lib$2); var sort = {}; var procedure = {}; (function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); exports.isTraversal = exports.procedure = void 0; exports.procedure = { universal: 50, tag: 30, attribute: 1, pseudo: 0, "pseudo-element": 0, descendant: -1, child: -1, parent: -1, sibling: -1, adjacent: -1, _flexibleDescendant: -1 }; function isTraversal2(t) { return exports.procedure[t.type] < 0; } exports.isTraversal = isTraversal2; })(procedure); Object.defineProperty(sort, "__esModule", { value: true }); var procedure_1$1 = procedure; var attributes$1 = { exists: 10, equals: 8, not: 7, start: 6, end: 6, any: 5, hyphen: 4, element: 4 }; function sortByProcedure(arr) { var procs = arr.map(getProcedure); for (var i = 1; i < arr.length; i++) { var procNew = procs[i]; if (procNew < 0) continue; for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) { var token = arr[j + 1]; arr[j + 1] = arr[j]; arr[j] = token; procs[j + 1] = procs[j]; procs[j] = procNew; } } } sort.default = sortByProcedure; function getProcedure(token) { var proc = procedure_1$1.procedure[token.type]; if (token.type === "attribute") { proc = attributes$1[token.action]; if (proc === attributes$1.equals && token.name === "id") { proc = 9; } if (token.ignoreCase) { proc >>= 1; } } else if (token.type === "pseudo") { if (!token.data) { proc = 3; } else if (token.name === "has" || token.name === "contains") { proc = 0; } else if (Array.isArray(token.data)) { proc = 0; for (var i = 0; i < token.data.length; i++) { if (token.data[i].length !== 1) continue; var cur = getProcedure(token.data[i][0]); if (cur === 0) { proc = 0; break; } if (cur > proc) proc = cur; } if (token.data.length > 1 && proc > 0) proc -= 1; } else { proc = 1; } } return proc; } var general = {}; var attributes = {}; Object.defineProperty(attributes, "__esModule", { value: true }); attributes.attributeRules = void 0; var boolbase_1$2 = boolbase; var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g; function escapeRegex(value) { return value.replace(reChars, "\\$&"); } attributes.attributeRules = { equals: function(next, data, _a) { var adapter = _a.adapter; var name2 = data.name; var value = data.value; if (data.ignoreCase) { value = value.toLowerCase(); return function(elem) { var attr = adapter.getAttributeValue(elem, name2); return attr != null && attr.length === value.length && attr.toLowerCase() === value && next(elem); }; } return function(elem) { return adapter.getAttributeValue(elem, name2) === value && next(elem); }; }, hyphen: function(next, data, _a) { var adapter = _a.adapter; var name2 = data.name; var value = data.value; var len = value.length; if (data.ignoreCase) { value = value.toLowerCase(); return function hyphenIC(elem) { var attr = adapter.getAttributeValue(elem, name2); return attr != null && (attr.length === len || attr.charAt(len) === "-") && attr.substr(0, len).toLowerCase() === value && next(elem); }; } return function hyphen2(elem) { var attr = adapter.getAttributeValue(elem, name2); return attr != null && (attr.length === len || attr.charAt(len) === "-") && attr.substr(0, len) === value && next(elem); }; }, element: function(next, _a, _b) { var name2 = _a.name, value = _a.value, ignoreCase = _a.ignoreCase; var adapter = _b.adapter; if (/\s/.test(value)) { return boolbase_1$2.falseFunc; } var regex = new RegExp("(?:^|\\s)" + escapeRegex(value) + "(?:$|\\s)", ignoreCase ? "i" : ""); return function element(elem) { var attr = adapter.getAttributeValue(elem, name2); return attr != null && attr.length >= value.length && regex.test(attr) && next(elem); }; }, exists: function(next, _a, _b) { var name2 = _a.name; var adapter = _b.adapter; return function(elem) { return adapter.hasAttrib(elem, name2) && next(elem); }; }, start: function(next, data, _a) { var adapter = _a.adapter; var name2 = data.name; var value = data.value; var len = value.length; if (len === 0) { return boolbase_1$2.falseFunc; } if (data.ignoreCase) { value = value.toLowerCase(); return function(elem) { var attr = adapter.getAttributeValue(elem, name2); return attr != null && attr.length >= len && attr.substr(0, len).toLowerCase() === value && next(elem); }; } return function(elem) { var _a2; return !!((_a2 = adapter.getAttributeValue(elem, name2)) === null || _a2 === void 0 ? void 0 : _a2.startsWith(value)) && next(elem); }; }, end: function(next, data, _a) { var adapter = _a.adapter; var name2 = data.name; var value = data.value; var len = -value.length; if (len === 0) { return boolbase_1$2.falseFunc; } if (data.ignoreCase) { value = value.toLowerCase(); return function(elem) { var _a2; return ((_a2 = adapter.getAttributeValue(elem, name2)) === null || _a2 === void 0 ? void 0 : _a2.substr(len).toLowerCase()) === value && next(elem); }; } return function(elem) { var _a2; return !!((_a2 = adapter.getAttributeValue(elem, name2)) === null || _a2 === void 0 ? void 0 : _a2.endsWith(value)) && next(elem); }; }, any: function(next, data, _a) { var adapter = _a.adapter; var name2 = data.name, value = data.value; if (value === "") { return boolbase_1$2.falseFunc; } if (data.ignoreCase) { var regex_1 = new RegExp(escapeRegex(value), "i"); return function anyIC(elem) { var attr = adapter.getAttributeValue(elem, name2); return attr != null && attr.length >= value.length && regex_1.test(attr) && next(elem); }; } return function(elem) { var _a2; return !!((_a2 = adapter.getAttributeValue(elem, name2)) === null || _a2 === void 0 ? void 0 : _a2.includes(value)) && next(elem); }; }, not: function(next, data, _a) { var adapter = _a.adapter; var name2 = data.name; var value = data.value; if (value === "") { return function(elem) { return !!adapter.getAttributeValue(elem, name2) && next(elem); }; } else if (data.ignoreCase) { value = value.toLowerCase(); return function(elem) { var attr = adapter.getAttributeValue(elem, name2); return (attr == null || attr.length !== value.length || attr.toLowerCase() !== value) && next(elem); }; } return function(elem) { return adapter.getAttributeValue(elem, name2) !== value && next(elem); }; } }; var pseudoSelectors = {}; var filters$1 = {}; var lib$1 = {}; var parse$2 = {}; Object.defineProperty(parse$2, "__esModule", { value: true }); parse$2.parse = void 0; var RE_NTH_ELEMENT = /^([+-]?\d*n)?\s*(?:([+-]?)\s*(\d+))?$/; function parse$1(formula) { formula = formula.trim().toLowerCase(); if (formula === "even") { return [2, 0]; } else if (formula === "odd") { return [2, 1]; } var parsed = formula.match(RE_NTH_ELEMENT); if (!parsed) { throw new Error("n-th rule couldn't be parsed ('" + formula + "')"); } var a; if (parsed[1]) { a = parseInt(parsed[1], 10); if (isNaN(a)) { a = parsed[1].startsWith("-") ? -1 : 1; } } else a = 0; var b = (parsed[2] === "-" ? -1 : 1) * (parsed[3] ? parseInt(parsed[3], 10) : 0); return [a, b]; } parse$2.parse = parse$1; var compile$2 = {}; Object.defineProperty(compile$2, "__esModule", { value: true }); compile$2.compile = void 0; var boolbase_1$1 = boolbase; function compile$1(parsed) { var a = parsed[0]; var b = parsed[1] - 1; if (b < 0 && a <= 0) return boolbase_1$1.falseFunc; if (a === -1) return function(index) { return index <= b; }; if (a === 0) return function(index) { return index === b; }; if (a === 1) return b < 0 ? boolbase_1$1.trueFunc : function(index) { return index >= b; }; var absA = Math.abs(a); var bMod = (b % absA + absA) % absA; return a > 1 ? function(index) { return index >= b && index % absA === bMod; } : function(index) { return index <= b && index % absA === bMod; }; } compile$2.compile = compile$1; (function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); exports.compile = exports.parse = void 0; var parse_1 = parse$2; Object.defineProperty(exports, "parse", { enumerable: true, get: function() { return parse_1.parse; } }); var compile_1 = compile$2; Object.defineProperty(exports, "compile", { enumerable: true, get: function() { return compile_1.compile; } }); function nthCheck(formula) { return compile_1.compile(parse_1.parse(formula)); } exports.default = nthCheck; })(lib$1); (function(exports) { var __importDefault2 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.filters = void 0; var nth_check_1 = __importDefault2(lib$1); var boolbase_12 = boolbase; function getChildFunc(next, adapter) { return function(elem) { var parent = adapter.getParent(elem); return parent != null && adapter.isTag(parent) && next(elem); }; } exports.filters = { contains: function(next, text, _a) { var adapter = _a.adapter; return function contains(elem) { return next(elem) && adapter.getText(elem).includes(text); }; }, icontains: function(next, text, _a) { var adapter = _a.adapter; var itext = text.toLowerCase(); return function icontains(elem) { return next(elem) && adapter.getText(elem).toLowerCase().includes(itext); }; }, "nth-child": function(next, rule, _a) { var adapter = _a.adapter, equals2 = _a.equals; var func = nth_check_1.default(rule); if (func === boolbase_12.falseFunc) return boolbase_12.falseFunc; if (func === boolbase_12.trueFunc) return getChildFunc(next, adapter); return function nthChild(elem) { var siblings = adapter.getSiblings(elem); var pos = 0; for (var i = 0; i < siblings.length; i++) { if (equals2(elem, siblings[i])) break; if (adapter.isTag(siblings[i])) { pos++; } } return func(pos) && next(elem); }; }, "nth-last-child": function(next, rule, _a) { var adapter = _a.adapter, equals2 = _a.equals; var func = nth_check_1.default(rule); if (func === boolbase_12.falseFunc) return boolbase_12.falseFunc; if (func === boolbase_12.trueFunc) return getChildFunc(next, adapter); return function nthLastChild(elem) { var siblings = adapter.getSiblings(elem); var pos = 0; for (var i = siblings.length - 1; i >= 0; i--) { if (equals2(elem, siblings[i])) break; if (adapter.isTag(siblings[i])) { pos++; } } return func(pos) && next(elem); }; }, "nth-of-type": function(next, rule, _a) { var adapter = _a.adapter, equals2 = _a.equals; var func = nth_check_1.default(rule); if (func === boolbase_12.falseFunc) return boolbase_12.falseFunc; if (func === boolbase_12.trueFunc) return getChildFunc(next, adapter); return function nthOfType(elem) { var siblings = adapter.getSiblings(elem); var pos = 0; for (var i = 0; i < siblings.length; i++) { var currentSibling = siblings[i]; if (equals2(elem, currentSibling)) break; if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === adapter.getName(elem)) { pos++; } } return func(pos) && next(elem); }; }, "nth-last-of-type": function(next, rule, _a) { var adapter = _a.adapter, equals2 = _a.equals; var func = nth_check_1.default(rule); if (func === boolbase_12.falseFunc) return boolbase_12.falseFunc; if (func === boolbase_12.trueFunc) return getChildFunc(next, adapter); return function nthLastOfType(elem) { var siblings = adapter.getSiblings(elem); var pos = 0; for (var i = siblings.length - 1; i >= 0; i--) { var currentSibling = siblings[i]; if (equals2(elem, currentSibling)) break; if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === adapter.getName(elem)) { pos++; } } return func(pos) && next(elem); }; }, root: function(next, _rule, _a) { var adapter = _a.adapter; return function(elem) { var parent = adapter.getParent(elem); return (parent == null || !adapter.isTag(parent)) && next(elem); }; }, scope: function(next, rule, options, context) { var equals2 = options.equals; if (!context || context.length === 0) { return exports.filters.root(next, rule, options); } if (context.length === 1) { return function(elem) { return equals2(context[0], elem) && next(elem); }; } return function(elem) { return context.includes(elem) && next(elem); }; }, hover: dynamicStatePseudo("isHovered"), visited: dynamicStatePseudo("isVisited"), active: dynamicStatePseudo("isActive") }; function dynamicStatePseudo(name2) { return function dynamicPseudo(next, _rule, _a) { var adapter = _a.adapter; var func = adapter[name2]; if (typeof func !== "function") { return boolbase_12.falseFunc; } return function active(elem) { return func(elem) && next(elem); }; }; } })(filters$1); var pseudos = {}; Object.defineProperty(pseudos, "__esModule", { value: true }); pseudos.verifyPseudoArgs = pseudos.pseudos = void 0; pseudos.pseudos = { empty: function(elem, _a) { var adapter = _a.adapter; return !adapter.getChildren(elem).some(function(elem2) { return adapter.isTag(elem2) || adapter.getText(elem2) !== ""; }); }, "first-child": function(elem, _a) { var adapter = _a.adapter, equals2 = _a.equals; var firstChild = adapter.getSiblings(elem).find(function(elem2) { return adapter.isTag(elem2); }); return firstChild != null && equals2(elem, firstChild); }, "last-child": function(elem, _a) { var adapter = _a.adapter, equals2 = _a.equals; var siblings = adapter.getSiblings(elem); for (var i = siblings.length - 1; i >= 0; i--) { if (equals2(elem, siblings[i])) return true; if (adapter.isTag(siblings[i])) break; } return false; }, "first-of-type": function(elem, _a) { var adapter = _a.adapter, equals2 = _a.equals; var siblings = adapter.getSiblings(elem); var elemName = adapter.getName(elem); for (var i = 0; i < siblings.length; i++) { var currentSibling = siblings[i]; if (equals2(elem, currentSibling)) return true; if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === elemName) { break; } } return false; }, "last-of-type": function(elem, _a) { var adapter = _a.adapter, equals2 = _a.equals; var siblings = adapter.getSiblings(elem); var elemName = adapter.getName(elem); for (var i = siblings.length - 1; i >= 0; i--) { var currentSibling = siblings[i]; if (equals2(elem, currentSibling)) return true; if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === elemName) { break; } } return false; }, "only-of-type": function(elem, _a) { var adapter = _a.adapter, equals2 = _a.equals; var elemName = adapter.getName(elem); return adapter.getSiblings(elem).every(function(sibling) { return equals2(elem, sibling) || !adapter.isTag(sibling) || adapter.getName(sibling) !== elemName; }); }, "only-child": function(elem, _a) { var adapter = _a.adapter, equals2 = _a.equals; return adapter.getSiblings(elem).every(function(sibling) { return equals2(elem, sibling) || !adapter.isTag(sibling); }); } }; function verifyPseudoArgs(func, name2, subselect) { if (subselect === null) { if (func.length > 2) { throw new Error("pseudo-selector :" + name2 + " requires an argument"); } } else if (func.length === 2) { throw new Error("pseudo-selector :" + name2 + " doesn't have any arguments"); } } pseudos.verifyPseudoArgs = verifyPseudoArgs; var aliases = {}; Object.defineProperty(aliases, "__esModule", { value: true }); aliases.aliases = void 0; aliases.aliases = { "any-link": ":is(a, area, link)[href]", link: ":any-link:not(:visited)", disabled: ":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )", enabled: ":not(:disabled)", checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)", required: ":is(input, select, textarea)[required]", optional: ":is(input, select, textarea):not([required])", selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)", checkbox: "[type=checkbox]", file: "[type=file]", password: "[type=password]", radio: "[type=radio]", reset: "[type=reset]", image: "[type=image]", submit: "[type=submit]", parent: ":not(:empty)", header: ":is(h1, h2, h3, h4, h5, h6)", button: ":is(button, input[type=button])", input: ":is(input, textarea, select, button)", text: "input:is(:not([type!='']), [type=text])" }; var subselects = {}; (function(exports) { var __spreadArray2 = commonjsGlobal && commonjsGlobal.__spreadArray || function(to, from) { for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i]; return to; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.subselects = exports.getNextSiblings = exports.ensureIsTag = exports.PLACEHOLDER_ELEMENT = void 0; var boolbase_12 = boolbase; var procedure_12 = procedure; exports.PLACEHOLDER_ELEMENT = {}; function ensureIsTag(next, adapter) { if (next === boolbase_12.falseFunc) return boolbase_12.falseFunc; return function(elem) { return adapter.isTag(elem) && next(elem); }; } exports.ensureIsTag = ensureIsTag; function getNextSiblings(elem, adapter) { var siblings = adapter.getSiblings(elem); if (siblings.length <= 1) return []; var elemIndex = siblings.indexOf(elem); if (elemIndex < 0 || elemIndex === siblings.length - 1) return []; return siblings.slice(elemIndex + 1).filter(adapter.isTag); } exports.getNextSiblings = getNextSiblings; var is2 = function(next, token, options, context, compileToken2) { var opts = { xmlMode: !!options.xmlMode, adapter: options.adapter, equals: options.equals }; var func = compileToken2(token, opts, context); return function(elem) { return func(elem) && next(elem); }; }; exports.subselects = { is: is2, matches: is2, not: function(next, token, options, context, compileToken2) { var opts = { xmlMode: !!options.xmlMode, adapter: options.adapter, equals: options.equals }; var func = compileToken2(token, opts, context); if (func === boolbase_12.falseFunc) return next; if (func === boolbase_12.trueFunc) return boolbase_12.falseFunc; return function not2(elem) { return !func(elem) && next(elem); }; }, has: function(next, subselect, options, _context, compileToken2) { var adapter = options.adapter; var opts = { xmlMode: !!options.xmlMode, adapter, equals: options.equals }; var context = subselect.some(function(s) { return s.some(procedure_12.isTraversal); }) ? [exports.PLACEHOLDER_ELEMENT] : void 0; var compiled = compileToken2(subselect, opts, context); if (compiled === boolbase_12.falseFunc) return boolbase_12.falseFunc; if (compiled === boolbase_12.trueFunc) { return function(elem) { return adapter.getChildren(elem).some(adapter.isTag) && next(elem); }; } var hasElement = ensureIsTag(compiled, adapter); var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings = _a === void 0 ? false : _a; if (context) { return function(elem) { context[0] = elem; var childs = adapter.getChildren(elem); var nextElements = shouldTestNextSiblings ? __spreadArray2(__spreadArray2([], childs), getNextSiblings(elem, adapter)) : childs; return next(elem) && adapter.existsOne(hasElement, nextElements); }; } return function(elem) { return next(elem) && adapter.existsOne(hasElement, adapter.getChildren(elem)); }; } }; })(subselects); (function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); exports.compilePseudoSelector = exports.aliases = exports.pseudos = exports.filters = void 0; var boolbase_12 = boolbase; var css_what_12 = lib$2; var filters_1 = filters$1; Object.defineProperty(exports, "filters", { enumerable: true, get: function() { return filters_1.filters; } }); var pseudos_1 = pseudos; Object.defineProperty(exports, "pseudos", { enumerable: true, get: function() { return pseudos_1.pseudos; } }); var aliases_1 = aliases; Object.defineProperty(exports, "aliases", { enumerable: true, get: function() { return aliases_1.aliases; } }); var subselects_12 = subselects; function compilePseudoSelector(next, selector, options, context, compileToken2) { var name2 = selector.name, data = selector.data; if (Array.isArray(data)) { return subselects_12.subselects[name2](next, data, options, context, compileToken2); } if (name2 in aliases_1.aliases) { if (data != null) { throw new Error("Pseudo " + name2 + " doesn't have any arguments"); } var alias = css_what_12.parse(aliases_1.aliases[name2], options); return subselects_12.subselects.is(next, alias, options, context, compileToken2); } if (name2 in filters_1.filters) { return filters_1.filters[name2](next, data, options, context); } if (name2 in pseudos_1.pseudos) { var pseudo_1 = pseudos_1.pseudos[name2]; pseudos_1.verifyPseudoArgs(pseudo_1, name2, data); return pseudo_1 === boolbase_12.falseFunc ? boolbase_12.falseFunc : next === boolbase_12.trueFunc ? function(elem) { return pseudo_1(elem, options, data); } : function(elem) { return pseudo_1(elem, options, data) && next(elem); }; } throw new Error("unmatched pseudo-class :" + name2); } exports.compilePseudoSelector = compilePseudoSelector; })(pseudoSelectors); Object.defineProperty(general, "__esModule", { value: true }); general.compileGeneralSelector = void 0; var attributes_1 = attributes; var pseudo_selectors_1 = pseudoSelectors; function compileGeneralSelector(next, selector, options, context, compileToken2) { var adapter = options.adapter, equals2 = options.equals; switch (selector.type) { case "pseudo-element": throw new Error("Pseudo-elements are not supported by css-select"); case "attribute": return attributes_1.attributeRules[selector.action](next, selector, options); case "pseudo": return pseudo_selectors_1.compilePseudoSelector(next, selector, options, context, compileToken2); case "tag": return function tag(elem) { return adapter.getName(elem) === selector.name && next(elem); }; case "descendant": if (options.cacheResults === false || typeof WeakSet === "undefined") { return function descendant(elem) { var current = elem; while (current = adapter.getParent(current)) { if (adapter.isTag(current) && next(current)) { return true; } } return false; }; } var isFalseCache_1 = new WeakSet(); return function cachedDescendant(elem) { var current = elem; while (current = adapter.getParent(current)) { if (!isFalseCache_1.has(current)) { if (adapter.isTag(current) && next(current)) { return true; } isFalseCache_1.add(current); } } return false; }; case "_flexibleDescendant": return function flexibleDescendant(elem) { var current = elem; do { if (adapter.isTag(current) && next(current)) return true; } while (current = adapter.getParent(current)); return false; }; case "parent": return function parent(elem) { return adapter.getChildren(elem).some(function(elem2) { return adapter.isTag(elem2) && next(elem2); }); }; case "child": return function child(elem) { var parent = adapter.getParent(elem); return parent != null && adapter.isTag(parent) && next(parent); }; case "sibling": return function sibling(elem) { var siblings = adapter.getSiblings(elem); for (var i = 0; i < siblings.length; i++) { var currentSibling = siblings[i]; if (equals2(elem, currentSibling)) break; if (adapter.isTag(currentSibling) && next(currentSibling)) { return true; } } return false; }; case "adjacent": return function adjacent(elem) { var siblings = adapter.getSiblings(elem); var lastElement; for (var i = 0; i < siblings.length; i++) { var currentSibling = siblings[i]; if (equals2(elem, currentSibling)) break; if (adapter.isTag(currentSibling)) { lastElement = currentSibling; } } return !!lastElement && next(lastElement); }; case "universal": return next; } } general.compileGeneralSelector = compileGeneralSelector; var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(compile$3, "__esModule", { value: true }); compile$3.compileToken = compile$3.compileUnsafe = compile$3.compile = void 0; var css_what_1 = lib$2; var boolbase_1 = boolbase; var sort_1 = __importDefault(sort); var procedure_1 = procedure; var general_1 = general; var subselects_1 = subselects; function compile(selector, options, context) { var next = compileUnsafe(selector, options, context); return subselects_1.ensureIsTag(next, options.adapter); } compile$3.compile = compile; function compileUnsafe(selector, options, context) { var token = typeof selector === "string" ? css_what_1.parse(selector, options) : selector; return compileToken(token, options, context); } compile$3.compileUnsafe = compileUnsafe; function includesScopePseudo(t) { return t.type === "pseudo" && (t.name === "scope" || Array.isArray(t.data) && t.data.some(function(data) { return data.some(includesScopePseudo); })); } var DESCENDANT_TOKEN = { type: "descendant" }; var FLEXIBLE_DESCENDANT_TOKEN = { type: "_flexibleDescendant" }; var SCOPE_TOKEN = { type: "pseudo", name: "scope", data: null }; function absolutize(token, _a, context) { var adapter = _a.adapter; var hasContext = !!(context === null || context === void 0 ? void 0 : context.every(function(e) { var parent = adapter.isTag(e) && adapter.getParent(e); return e === subselects_1.PLACEHOLDER_ELEMENT || parent && adapter.isTag(parent); })); for (var _i = 0, token_1 = token; _i < token_1.length; _i++) { var t = token_1[_i]; if (t.length > 0 && procedure_1.isTraversal(t[0]) && t[0].type !== "descendant") ; else if (hasContext && !t.some(includesScopePseudo)) { t.unshift(DESCENDANT_TOKEN); } else { continue; } t.unshift(SCOPE_TOKEN); } } function compileToken(token, options, context) { var _a; token = token.filter(function(t) { return t.length > 0; }); token.forEach(sort_1.default); context = (_a = options.context) !== null && _a !== void 0 ? _a : context; var isArrayContext = Array.isArray(context); var finalContext = context && (Array.isArray(context) ? context : [context]); absolutize(token, options, finalContext); var shouldTestNextSiblings = false; var query = token.map(function(rules) { if (rules.length >= 2) { var first = rules[0], second = rules[1]; if (first.type !== "pseudo" || first.name !== "scope") ; else if (isArrayContext && second.type === "descendant") { rules[1] = FLEXIBLE_DESCENDANT_TOKEN; } else if (second.type === "adjacent" || second.type === "sibling") { shouldTestNextSiblings = true; } } return compileRules(rules, options, finalContext); }).reduce(reduceRules, boolbase_1.falseFunc); query.shouldTestNextSiblings = shouldTestNextSiblings; return query; } compile$3.compileToken = compileToken; function compileRules(rules, options, context) { var _a; return rules.reduce(function(previous, rule) { return previous === boolbase_1.falseFunc ? boolbase_1.falseFunc : general_1.compileGeneralSelector(previous, rule, options, context, compileToken); }, (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase_1.trueFunc); } function reduceRules(a, b) { if (b === boolbase_1.falseFunc || a === boolbase_1.trueFunc) { return a; } if (a === boolbase_1.falseFunc || b === boolbase_1.trueFunc) { return b; } return function combine(elem) { return a(elem) || b(elem); }; } (function(exports) { var __createBinding2 = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = commonjsGlobal && commonjsGlobal.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = commonjsGlobal && commonjsGlobal.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.aliases = exports.pseudos = exports.filters = exports.is = exports.selectOne = exports.selectAll = exports.prepareContext = exports._compileToken = exports._compileUnsafe = exports.compile = void 0; var DomUtils = __importStar2(lib$7); var boolbase_12 = boolbase; var compile_1 = compile$3; var subselects_12 = subselects; var defaultEquals = function(a, b) { return a === b; }; var defaultOptions = { adapter: DomUtils, equals: defaultEquals }; function convertOptionFormats(options) { var _a, _b, _c, _d; var opts = options !== null && options !== void 0 ? options : defaultOptions; (_a = opts.adapter) !== null && _a !== void 0 ? _a : opts.adapter = DomUtils; (_b = opts.equals) !== null && _b !== void 0 ? _b : opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals; return opts; } function wrapCompile(func) { return function addAdapter(selector, options, context) { var opts = convertOptionFormats(options); return func(selector, opts, context); }; } exports.compile = wrapCompile(compile_1.compile); exports._compileUnsafe = wrapCompile(compile_1.compileUnsafe); exports._compileToken = wrapCompile(compile_1.compileToken); function getSelectorFunc(searchFunc) { return function select(query, elements, options) { var opts = convertOptionFormats(options); if (typeof query !== "function") { query = compile_1.compileUnsafe(query, opts, elements); } var filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings); return searchFunc(query, filteredElements, opts); }; } function prepareContext(elems2, adapter, shouldTestNextSiblings) { if (shouldTestNextSiblings === void 0) { shouldTestNextSiblings = false; } if (shouldTestNextSiblings) { elems2 = appendNextSiblings(elems2, adapter); } return Array.isArray(elems2) ? adapter.removeSubsets(elems2) : adapter.getChildren(elems2); } exports.prepareContext = prepareContext; function appendNextSiblings(elem, adapter) { var elems2 = Array.isArray(elem) ? elem.slice(0) : [elem]; for (var i = 0; i < elems2.length; i++) { var nextSiblings = subselects_12.getNextSiblings(elems2[i], adapter); elems2.push.apply(elems2, nextSiblings); } return elems2; } exports.selectAll = getSelectorFunc(function(query, elems2, options) { return query === boolbase_12.falseFunc || !elems2 || elems2.length === 0 ? [] : options.adapter.findAll(query, elems2); }); exports.selectOne = getSelectorFunc(function(query, elems2, options) { return query === boolbase_12.falseFunc || !elems2 || elems2.length === 0 ? null : options.adapter.findOne(query, elems2); }); function is2(elem, query, options) { var opts = convertOptionFormats(options); return (typeof query === "function" ? query : compile_1.compile(query, opts))(elem); } exports.is = is2; exports.default = exports.selectAll; var pseudo_selectors_12 = pseudoSelectors; Object.defineProperty(exports, "filters", { enumerable: true, get: function() { return pseudo_selectors_12.filters; } }); Object.defineProperty(exports, "pseudos", { enumerable: true, get: function() { return pseudo_selectors_12.pseudos; } }); Object.defineProperty(exports, "aliases", { enumerable: true, get: function() { return pseudo_selectors_12.aliases; } }); })(lib$8); var isTag = (node2) => node2.type === "element"; var existsOne = (test, elems2) => elems2.some((elem) => { if (isTag(elem)) { return test(elem) || existsOne(test, getChildren(elem)); } else { return false; } }); var getAttributeValue = (elem, name2) => elem.attributes[name2]; var getChildren = (node2) => node2.children || []; var getName = (elemAst) => elemAst.name; var getParent = (node2) => node2.parentNode || null; var getSiblings = (elem) => { var parent = getParent(elem); return parent ? getChildren(parent) : []; }; var getText = (node2) => { if (node2.children[0].type === "text" && node2.children[0].type === "cdata") { return node2.children[0].value; } return ""; }; var hasAttrib = (elem, name2) => elem.attributes[name2] !== void 0; var removeSubsets = (nodes) => { let idx = nodes.length; let node2; let ancestor; let replace2; while (--idx > -1) { node2 = ancestor = nodes[idx]; nodes[idx] = null; replace2 = true; while (ancestor) { if (nodes.includes(ancestor)) { replace2 = false; nodes.splice(idx, 1); break; } ancestor = getParent(ancestor); } if (replace2) { nodes[idx] = node2; } } return nodes; }; var findAll = (test, elems2) => { const result = []; for (const elem of elems2) { if (isTag(elem)) { if (test(elem)) { result.push(elem); } result.push(...findAll(test, getChildren(elem))); } } return result; }; var findOne = (test, elems2) => { for (const elem of elems2) { if (isTag(elem)) { if (test(elem)) { return elem; } const result = findOne(test, getChildren(elem)); if (result) { return result; } } } return null; }; var svgoCssSelectAdapter$1 = { isTag, existsOne, getAttributeValue, getChildren, getName, getParent, getSiblings, getText, hasAttrib, removeSubsets, findAll, findOne }; var cssSelectAdapter = svgoCssSelectAdapter$1; var { selectAll: selectAll$1, selectOne: selectOne$1, is: is$1 } = lib$8; var xastAdaptor = cssSelectAdapter; var cssSelectOptions = { xmlMode: true, adapter: xastAdaptor }; var querySelectorAll$2 = (node2, selector) => selectAll$1(selector, node2, cssSelectOptions); xast.querySelectorAll = querySelectorAll$2; var querySelector$1 = (node2, selector) => selectOne$1(selector, node2, cssSelectOptions); xast.querySelector = querySelector$1; var matches$1 = (node2, selector) => is$1(node2, selector, cssSelectOptions); xast.matches = matches$1; var closestByName$1 = (node2, name2) => { let currentNode = node2; while (currentNode) { if (currentNode.type === "element" && currentNode.name === name2) { return currentNode; } currentNode = currentNode.parentNode; } return null; }; xast.closestByName = closestByName$1; var visitSkip$6 = Symbol(); xast.visitSkip = visitSkip$6; var visit$5 = (node2, visitor, parentNode) => { const callbacks = visitor[node2.type]; if (callbacks && callbacks.enter) { const symbol = callbacks.enter(node2, parentNode); if (symbol === visitSkip$6) { return; } } if (node2.type === "root") { for (const child of node2.children) { visit$5(child, visitor, node2); } } if (node2.type === "element") { if (parentNode.children.includes(node2)) { for (const child of node2.children) { visit$5(child, visitor, node2); } } } if (callbacks && callbacks.exit) { callbacks.exit(node2, parentNode); } }; xast.visit = visit$5; var detachNodeFromParent$m = (node2, parentNode) => { parentNode.children = parentNode.children.filter((child) => child !== node2); }; xast.detachNodeFromParent = detachNodeFromParent$m; var { visit: visit$4 } = xast; var invokePlugins$1 = (ast2, info, plugins2, overrides, globalOverrides) => { for (const plugin of plugins2) { const override = overrides == null ? null : overrides[plugin.name]; if (override === false) { continue; } const params = __spreadValues(__spreadValues(__spreadValues({}, plugin.params), globalOverrides), override); if (plugin.type === "perItem") { ast2 = perItem(ast2, info, plugin, params); } if (plugin.type === "perItemReverse") { ast2 = perItem(ast2, info, plugin, params, true); } if (plugin.type === "full") { if (plugin.active) { ast2 = plugin.fn(ast2, params, info); } } if (plugin.type === "visitor") { if (plugin.active) { const visitor = plugin.fn(ast2, params, info); if (visitor != null) { visit$4(ast2, visitor); } } } } return ast2; }; plugins.invokePlugins = invokePlugins$1; function perItem(data, info, plugin, params, reverse) { function monkeys(items) { items.children = items.children.filter(function(item) { if (reverse && item.children) { monkeys(item); } let kept = true; if (plugin.active) { kept = plugin.fn(item, params, info) !== false; } if (!reverse && item.children) { monkeys(item); } return kept; }); return items; } return monkeys(data); } var createPreset$1 = ({ name: name2, plugins: plugins2 }) => ({ name: name2, type: "full", fn: (ast2, params, info) => { const { floatPrecision, overrides } = params; const globalOverrides = {}; if (floatPrecision != null) { globalOverrides.floatPrecision = floatPrecision; } if (overrides) { for (const [pluginName, override] of Object.entries(overrides)) { if (override === true) { console.warn(`You are trying to enable ${pluginName} which is not part of preset. Try to put it before or after preset, for example plugins: [ { name: 'preset-default', }, 'cleanupListOfValues' ] `); } } } return invokePlugins$1(ast2, info, plugins2, overrides, globalOverrides); } }); plugins.createPreset = createPreset$1; var removeDoctype$1 = {}; var { detachNodeFromParent: detachNodeFromParent$l } = xast; removeDoctype$1.name = "removeDoctype"; removeDoctype$1.type = "visitor"; removeDoctype$1.active = true; removeDoctype$1.description = "removes doctype declaration"; removeDoctype$1.fn = () => ({ doctype: { enter: (node2, parentNode) => { detachNodeFromParent$l(node2, parentNode); } } }); var removeXMLProcInst$1 = {}; var { detachNodeFromParent: detachNodeFromParent$k } = xast; removeXMLProcInst$1.name = "removeXMLProcInst"; removeXMLProcInst$1.type = "visitor"; removeXMLProcInst$1.active = true; removeXMLProcInst$1.description = "removes XML processing instructions"; removeXMLProcInst$1.fn = () => ({ instruction: { enter: (node2, parentNode) => { if (node2.name === "xml") { detachNodeFromParent$k(node2, parentNode); } } } }); var removeComments$1 = {}; var { detachNodeFromParent: detachNodeFromParent$j } = xast; removeComments$1.name = "removeComments"; removeComments$1.type = "visitor"; removeComments$1.active = true; removeComments$1.description = "removes comments"; removeComments$1.fn = () => ({ comment: { enter: (node2, parentNode) => { if (node2.value.charAt(0) !== "!") { detachNodeFromParent$j(node2, parentNode); } } } }); var removeMetadata$1 = {}; var { detachNodeFromParent: detachNodeFromParent$i } = xast; removeMetadata$1.name = "removeMetadata"; removeMetadata$1.type = "visitor"; removeMetadata$1.active = true; removeMetadata$1.description = "removes "; removeMetadata$1.fn = () => ({ element: { enter: (node2, parentNode) => { if (node2.name === "metadata") { detachNodeFromParent$i(node2, parentNode); } } } }); var removeEditorsNSData$1 = {}; var _collections = {}; (function(exports) { exports.elemsGroups = { animation: ["animate", "animateColor", "animateMotion", "animateTransform", "set"], descriptive: ["desc", "metadata", "title"], shape: ["circle", "ellipse", "line", "path", "polygon", "polyline", "rect"], structural: ["defs", "g", "svg", "symbol", "use"], paintServer: ["solidColor", "linearGradient", "radialGradient", "meshGradient", "pattern", "hatch"], nonRendering: ["linearGradient", "radialGradient", "pattern", "clipPath", "mask", "marker", "symbol", "filter", "solidColor"], container: ["a", "defs", "g", "marker", "mask", "missing-glyph", "pattern", "svg", "switch", "symbol", "foreignObject"], textContent: ["altGlyph", "altGlyphDef", "altGlyphItem", "glyph", "glyphRef", "textPath", "text", "tref", "tspan"], textContentChild: ["altGlyph", "textPath", "tref", "tspan"], lightSource: ["feDiffuseLighting", "feSpecularLighting", "feDistantLight", "fePointLight", "feSpotLight"], filterPrimitive: ["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "feSpecularLighting", "feTile", "feTurbulence"] }; exports.textElems = exports.elemsGroups.textContent.concat("title"); exports.pathElems = ["path", "glyph", "missing-glyph"]; exports.attrsGroups = { animationAddition: ["additive", "accumulate"], animationAttributeTarget: ["attributeType", "attributeName"], animationEvent: ["onbegin", "onend", "onrepeat", "onload"], animationTiming: ["begin", "dur", "end", "min", "max", "restart", "repeatCount", "repeatDur", "fill"], animationValue: ["calcMode", "values", "keyTimes", "keySplines", "from", "to", "by"], conditionalProcessing: ["requiredFeatures", "requiredExtensions", "systemLanguage"], core: ["id", "tabindex", "xml:base", "xml:lang", "xml:space"], graphicalEvent: ["onfocusin", "onfocusout", "onactivate", "onclick", "onmousedown", "onmouseup", "onmouseover", "onmousemove", "onmouseout", "onload"], presentation: ["alignment-baseline", "baseline-shift", "clip", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cursor", "direction", "display", "dominant-baseline", "enable-background", "fill", "fill-opacity", "fill-rule", "filter", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "glyph-orientation-horizontal", "glyph-orientation-vertical", "image-rendering", "letter-spacing", "lighting-color", "marker-end", "marker-mid", "marker-start", "mask", "opacity", "overflow", "paint-order", "pointer-events", "shape-rendering", "stop-color", "stop-opacity", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-anchor", "text-decoration", "text-overflow", "text-rendering", "transform", "transform-origin", "unicode-bidi", "vector-effect", "visibility", "word-spacing", "writing-mode"], xlink: ["xlink:href", "xlink:show", "xlink:actuate", "xlink:type", "xlink:role", "xlink:arcrole", "xlink:title"], documentEvent: ["onunload", "onabort", "onerror", "onresize", "onscroll", "onzoom"], filterPrimitive: ["x", "y", "width", "height", "result"], transferFunction: ["type", "tableValues", "slope", "intercept", "amplitude", "exponent", "offset"] }; exports.attrsGroupsDefaults = { core: { "xml:space": "default" }, presentation: { clip: "auto", "clip-path": "none", "clip-rule": "nonzero", mask: "none", opacity: "1", "stop-color": "#000", "stop-opacity": "1", "fill-opacity": "1", "fill-rule": "nonzero", fill: "#000", stroke: "none", "stroke-width": "1", "stroke-linecap": "butt", "stroke-linejoin": "miter", "stroke-miterlimit": "4", "stroke-dasharray": "none", "stroke-dashoffset": "0", "stroke-opacity": "1", "paint-order": "normal", "vector-effect": "none", display: "inline", visibility: "visible", "marker-start": "none", "marker-mid": "none", "marker-end": "none", "color-interpolation": "sRGB", "color-interpolation-filters": "linearRGB", "color-rendering": "auto", "shape-rendering": "auto", "text-rendering": "auto", "image-rendering": "auto", "font-style": "normal", "font-variant": "normal", "font-weight": "normal", "font-stretch": "normal", "font-size": "medium", "font-size-adjust": "none", kerning: "auto", "letter-spacing": "normal", "word-spacing": "normal", "text-decoration": "none", "text-anchor": "start", "text-overflow": "clip", "writing-mode": "lr-tb", "glyph-orientation-vertical": "auto", "glyph-orientation-horizontal": "0deg", direction: "ltr", "unicode-bidi": "normal", "dominant-baseline": "auto", "alignment-baseline": "baseline", "baseline-shift": "baseline" }, transferFunction: { slope: "1", intercept: "0", amplitude: "1", exponent: "1", offset: "0" } }; exports.elems = { a: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "transform", "target"], defaults: { target: "_self" }, contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view", "tspan"] }, altGlyph: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "x", "y", "dx", "dy", "glyphRef", "format", "rotate"] }, altGlyphDef: { attrsGroups: ["core"], content: ["glyphRef"] }, altGlyphItem: { attrsGroups: ["core"], content: ["glyphRef", "altGlyphItem"] }, animate: { attrsGroups: ["conditionalProcessing", "core", "animationAddition", "animationAttributeTarget", "animationEvent", "animationTiming", "animationValue", "presentation", "xlink"], attrs: ["externalResourcesRequired"], contentGroups: ["descriptive"] }, animateColor: { attrsGroups: ["conditionalProcessing", "core", "animationEvent", "xlink", "animationAttributeTarget", "animationTiming", "animationValue", "animationAddition", "presentation"], attrs: ["externalResourcesRequired"], contentGroups: ["descriptive"] }, animateMotion: { attrsGroups: ["conditionalProcessing", "core", "animationEvent", "xlink", "animationTiming", "animationValue", "animationAddition"], attrs: ["externalResourcesRequired", "path", "keyPoints", "rotate", "origin"], defaults: { rotate: "0" }, contentGroups: ["descriptive"], content: ["mpath"] }, animateTransform: { attrsGroups: ["conditionalProcessing", "core", "animationEvent", "xlink", "animationAttributeTarget", "animationTiming", "animationValue", "animationAddition"], attrs: ["externalResourcesRequired", "type"], contentGroups: ["descriptive"] }, circle: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "cx", "cy", "r"], defaults: { cx: "0", cy: "0" }, contentGroups: ["animation", "descriptive"] }, clipPath: { attrsGroups: ["conditionalProcessing", "core", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "clipPathUnits"], defaults: { clipPathUnits: "userSpaceOnUse" }, contentGroups: ["animation", "descriptive", "shape"], content: ["text", "use"] }, "color-profile": { attrsGroups: ["core", "xlink"], attrs: ["local", "name", "rendering-intent"], defaults: { name: "sRGB", "rendering-intent": "auto" }, contentGroups: ["descriptive"] }, cursor: { attrsGroups: ["core", "conditionalProcessing", "xlink"], attrs: ["externalResourcesRequired", "x", "y"], defaults: { x: "0", y: "0" }, contentGroups: ["descriptive"] }, defs: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform"], contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, desc: { attrsGroups: ["core"], attrs: ["class", "style"] }, ellipse: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "cx", "cy", "rx", "ry"], defaults: { cx: "0", cy: "0" }, contentGroups: ["animation", "descriptive"] }, feBlend: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "in2", "mode"], defaults: { mode: "normal" }, content: ["animate", "set"] }, feColorMatrix: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "type", "values"], defaults: { type: "matrix" }, content: ["animate", "set"] }, feComponentTransfer: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in"], content: ["feFuncA", "feFuncB", "feFuncG", "feFuncR"] }, feComposite: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "in2", "operator", "k1", "k2", "k3", "k4"], defaults: { operator: "over", k1: "0", k2: "0", k3: "0", k4: "0" }, content: ["animate", "set"] }, feConvolveMatrix: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "order", "kernelMatrix", "divisor", "bias", "targetX", "targetY", "edgeMode", "kernelUnitLength", "preserveAlpha"], defaults: { order: "3", bias: "0", edgeMode: "duplicate", preserveAlpha: "false" }, content: ["animate", "set"] }, feDiffuseLighting: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "surfaceScale", "diffuseConstant", "kernelUnitLength"], defaults: { surfaceScale: "1", diffuseConstant: "1" }, contentGroups: ["descriptive"], content: ["feDistantLight", "fePointLight", "feSpotLight"] }, feDisplacementMap: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "in2", "scale", "xChannelSelector", "yChannelSelector"], defaults: { scale: "0", xChannelSelector: "A", yChannelSelector: "A" }, content: ["animate", "set"] }, feDistantLight: { attrsGroups: ["core"], attrs: ["azimuth", "elevation"], defaults: { azimuth: "0", elevation: "0" }, content: ["animate", "set"] }, feFlood: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style"], content: ["animate", "animateColor", "set"] }, feFuncA: { attrsGroups: ["core", "transferFunction"], content: ["set", "animate"] }, feFuncB: { attrsGroups: ["core", "transferFunction"], content: ["set", "animate"] }, feFuncG: { attrsGroups: ["core", "transferFunction"], content: ["set", "animate"] }, feFuncR: { attrsGroups: ["core", "transferFunction"], content: ["set", "animate"] }, feGaussianBlur: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "stdDeviation"], defaults: { stdDeviation: "0" }, content: ["set", "animate"] }, feImage: { attrsGroups: ["core", "presentation", "filterPrimitive", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "preserveAspectRatio", "href", "xlink:href"], defaults: { preserveAspectRatio: "xMidYMid meet" }, content: ["animate", "animateTransform", "set"] }, feMerge: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style"], content: ["feMergeNode"] }, feMergeNode: { attrsGroups: ["core"], attrs: ["in"], content: ["animate", "set"] }, feMorphology: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "operator", "radius"], defaults: { operator: "erode", radius: "0" }, content: ["animate", "set"] }, feOffset: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "dx", "dy"], defaults: { dx: "0", dy: "0" }, content: ["animate", "set"] }, fePointLight: { attrsGroups: ["core"], attrs: ["x", "y", "z"], defaults: { x: "0", y: "0", z: "0" }, content: ["animate", "set"] }, feSpecularLighting: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in", "surfaceScale", "specularConstant", "specularExponent", "kernelUnitLength"], defaults: { surfaceScale: "1", specularConstant: "1", specularExponent: "1" }, contentGroups: ["descriptive", "lightSource"] }, feSpotLight: { attrsGroups: ["core"], attrs: ["x", "y", "z", "pointsAtX", "pointsAtY", "pointsAtZ", "specularExponent", "limitingConeAngle"], defaults: { x: "0", y: "0", z: "0", pointsAtX: "0", pointsAtY: "0", pointsAtZ: "0", specularExponent: "1" }, content: ["animate", "set"] }, feTile: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "in"], content: ["animate", "set"] }, feTurbulence: { attrsGroups: ["core", "presentation", "filterPrimitive"], attrs: ["class", "style", "baseFrequency", "numOctaves", "seed", "stitchTiles", "type"], defaults: { baseFrequency: "0", numOctaves: "1", seed: "0", stitchTiles: "noStitch", type: "turbulence" }, content: ["animate", "set"] }, filter: { attrsGroups: ["core", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "x", "y", "width", "height", "filterRes", "filterUnits", "primitiveUnits", "href", "xlink:href"], defaults: { primitiveUnits: "userSpaceOnUse", x: "-10%", y: "-10%", width: "120%", height: "120%" }, contentGroups: ["descriptive", "filterPrimitive"], content: ["animate", "set"] }, font: { attrsGroups: ["core", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "horiz-origin-x", "horiz-origin-y", "horiz-adv-x", "vert-origin-x", "vert-origin-y", "vert-adv-y"], defaults: { "horiz-origin-x": "0", "horiz-origin-y": "0" }, contentGroups: ["descriptive"], content: ["font-face", "glyph", "hkern", "missing-glyph", "vkern"] }, "font-face": { attrsGroups: ["core"], attrs: ["font-family", "font-style", "font-variant", "font-weight", "font-stretch", "font-size", "unicode-range", "units-per-em", "panose-1", "stemv", "stemh", "slope", "cap-height", "x-height", "accent-height", "ascent", "descent", "widths", "bbox", "ideographic", "alphabetic", "mathematical", "hanging", "v-ideographic", "v-alphabetic", "v-mathematical", "v-hanging", "underline-position", "underline-thickness", "strikethrough-position", "strikethrough-thickness", "overline-position", "overline-thickness"], defaults: { "font-style": "all", "font-variant": "normal", "font-weight": "all", "font-stretch": "normal", "unicode-range": "U+0-10FFFF", "units-per-em": "1000", "panose-1": "0 0 0 0 0 0 0 0 0 0", slope: "0" }, contentGroups: ["descriptive"], content: ["font-face-src"] }, "font-face-format": { attrsGroups: ["core"], attrs: ["string"] }, "font-face-name": { attrsGroups: ["core"], attrs: ["name"] }, "font-face-src": { attrsGroups: ["core"], content: ["font-face-name", "font-face-uri"] }, "font-face-uri": { attrsGroups: ["core", "xlink"], attrs: ["href", "xlink:href"], content: ["font-face-format"] }, foreignObject: { attrsGroups: ["core", "conditionalProcessing", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "x", "y", "width", "height"], defaults: { x: "0", y: "0" } }, g: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform"], contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, glyph: { attrsGroups: ["core", "presentation"], attrs: ["class", "style", "d", "horiz-adv-x", "vert-origin-x", "vert-origin-y", "vert-adv-y", "unicode", "glyph-name", "orientation", "arabic-form", "lang"], defaults: { "arabic-form": "initial" }, contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, glyphRef: { attrsGroups: ["core", "presentation"], attrs: ["class", "style", "d", "horiz-adv-x", "vert-origin-x", "vert-origin-y", "vert-adv-y"], contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, hatch: { attrsGroups: ["core", "presentation", "xlink"], attrs: ["class", "style", "x", "y", "pitch", "rotate", "hatchUnits", "hatchContentUnits", "transform"], defaults: { hatchUnits: "objectBoundingBox", hatchContentUnits: "userSpaceOnUse", x: "0", y: "0", pitch: "0", rotate: "0" }, contentGroups: ["animation", "descriptive"], content: ["hatchPath"] }, hatchPath: { attrsGroups: ["core", "presentation", "xlink"], attrs: ["class", "style", "d", "offset"], defaults: { offset: "0" }, contentGroups: ["animation", "descriptive"] }, hkern: { attrsGroups: ["core"], attrs: ["u1", "g1", "u2", "g2", "k"] }, image: { attrsGroups: ["core", "conditionalProcessing", "graphicalEvent", "xlink", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "preserveAspectRatio", "transform", "x", "y", "width", "height", "href", "xlink:href"], defaults: { x: "0", y: "0", preserveAspectRatio: "xMidYMid meet" }, contentGroups: ["animation", "descriptive"] }, line: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "x1", "y1", "x2", "y2"], defaults: { x1: "0", y1: "0", x2: "0", y2: "0" }, contentGroups: ["animation", "descriptive"] }, linearGradient: { attrsGroups: ["core", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "x1", "y1", "x2", "y2", "gradientUnits", "gradientTransform", "spreadMethod", "href", "xlink:href"], defaults: { x1: "0", y1: "0", x2: "100%", y2: "0", spreadMethod: "pad" }, contentGroups: ["descriptive"], content: ["animate", "animateTransform", "set", "stop"] }, marker: { attrsGroups: ["core", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "viewBox", "preserveAspectRatio", "refX", "refY", "markerUnits", "markerWidth", "markerHeight", "orient"], defaults: { markerUnits: "strokeWidth", refX: "0", refY: "0", markerWidth: "3", markerHeight: "3" }, contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, mask: { attrsGroups: ["conditionalProcessing", "core", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "x", "y", "width", "height", "mask-type", "maskUnits", "maskContentUnits"], defaults: { maskUnits: "objectBoundingBox", maskContentUnits: "userSpaceOnUse", x: "-10%", y: "-10%", width: "120%", height: "120%" }, contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, metadata: { attrsGroups: ["core"] }, "missing-glyph": { attrsGroups: ["core", "presentation"], attrs: ["class", "style", "d", "horiz-adv-x", "vert-origin-x", "vert-origin-y", "vert-adv-y"], contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, mpath: { attrsGroups: ["core", "xlink"], attrs: ["externalResourcesRequired", "href", "xlink:href"], contentGroups: ["descriptive"] }, path: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "d", "pathLength"], contentGroups: ["animation", "descriptive"] }, pattern: { attrsGroups: ["conditionalProcessing", "core", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "viewBox", "preserveAspectRatio", "x", "y", "width", "height", "patternUnits", "patternContentUnits", "patternTransform", "href", "xlink:href"], defaults: { patternUnits: "objectBoundingBox", patternContentUnits: "userSpaceOnUse", x: "0", y: "0", width: "0", height: "0", preserveAspectRatio: "xMidYMid meet" }, contentGroups: ["animation", "descriptive", "paintServer", "shape", "structural"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, polygon: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "points"], contentGroups: ["animation", "descriptive"] }, polyline: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "points"], contentGroups: ["animation", "descriptive"] }, radialGradient: { attrsGroups: ["core", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "cx", "cy", "r", "fx", "fy", "fr", "gradientUnits", "gradientTransform", "spreadMethod", "href", "xlink:href"], defaults: { gradientUnits: "objectBoundingBox", cx: "50%", cy: "50%", r: "50%" }, contentGroups: ["descriptive"], content: ["animate", "animateTransform", "set", "stop"] }, meshGradient: { attrsGroups: ["core", "presentation", "xlink"], attrs: ["class", "style", "x", "y", "gradientUnits", "transform"], contentGroups: ["descriptive", "paintServer", "animation"], content: ["meshRow"] }, meshRow: { attrsGroups: ["core", "presentation"], attrs: ["class", "style"], contentGroups: ["descriptive"], content: ["meshPatch"] }, meshPatch: { attrsGroups: ["core", "presentation"], attrs: ["class", "style"], contentGroups: ["descriptive"], content: ["stop"] }, rect: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "x", "y", "width", "height", "rx", "ry"], defaults: { x: "0", y: "0" }, contentGroups: ["animation", "descriptive"] }, script: { attrsGroups: ["core", "xlink"], attrs: ["externalResourcesRequired", "type", "href", "xlink:href"] }, set: { attrsGroups: ["conditionalProcessing", "core", "animation", "xlink", "animationAttributeTarget", "animationTiming"], attrs: ["externalResourcesRequired", "to"], contentGroups: ["descriptive"] }, solidColor: { attrsGroups: ["core", "presentation"], attrs: ["class", "style"], contentGroups: ["paintServer"] }, stop: { attrsGroups: ["core", "presentation"], attrs: ["class", "style", "offset", "path"], content: ["animate", "animateColor", "set"] }, style: { attrsGroups: ["core"], attrs: ["type", "media", "title"], defaults: { type: "text/css" } }, svg: { attrsGroups: ["conditionalProcessing", "core", "documentEvent", "graphicalEvent", "presentation"], attrs: ["class", "style", "x", "y", "width", "height", "viewBox", "preserveAspectRatio", "zoomAndPan", "version", "baseProfile", "contentScriptType", "contentStyleType"], defaults: { x: "0", y: "0", width: "100%", height: "100%", preserveAspectRatio: "xMidYMid meet", zoomAndPan: "magnify", version: "1.1", baseProfile: "none", contentScriptType: "application/ecmascript", contentStyleType: "text/css" }, contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, switch: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform"], contentGroups: ["animation", "descriptive", "shape"], content: ["a", "foreignObject", "g", "image", "svg", "switch", "text", "use"] }, symbol: { attrsGroups: ["core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "preserveAspectRatio", "viewBox", "refX", "refY"], defaults: { refX: "0", refY: "0" }, contentGroups: ["animation", "descriptive", "shape", "structural", "paintServer"], content: ["a", "altGlyphDef", "clipPath", "color-profile", "cursor", "filter", "font", "font-face", "foreignObject", "image", "marker", "mask", "pattern", "script", "style", "switch", "text", "view"] }, text: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "transform", "lengthAdjust", "x", "y", "dx", "dy", "rotate", "textLength"], defaults: { x: "0", y: "0", lengthAdjust: "spacing" }, contentGroups: ["animation", "descriptive", "textContentChild"], content: ["a"] }, textPath: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "href", "xlink:href", "startOffset", "method", "spacing", "d"], defaults: { startOffset: "0", method: "align", spacing: "exact" }, contentGroups: ["descriptive"], content: ["a", "altGlyph", "animate", "animateColor", "set", "tref", "tspan"] }, title: { attrsGroups: ["core"], attrs: ["class", "style"] }, tref: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "href", "xlink:href"], contentGroups: ["descriptive"], content: ["animate", "animateColor", "set"] }, tspan: { attrsGroups: ["conditionalProcessing", "core", "graphicalEvent", "presentation"], attrs: ["class", "style", "externalResourcesRequired", "x", "y", "dx", "dy", "rotate", "textLength", "lengthAdjust"], contentGroups: ["descriptive"], content: ["a", "altGlyph", "animate", "animateColor", "set", "tref", "tspan"] }, use: { attrsGroups: ["core", "conditionalProcessing", "graphicalEvent", "presentation", "xlink"], attrs: ["class", "style", "externalResourcesRequired", "transform", "x", "y", "width", "height", "href", "xlink:href"], defaults: { x: "0", y: "0" }, contentGroups: ["animation", "descriptive"] }, view: { attrsGroups: ["core"], attrs: ["externalResourcesRequired", "viewBox", "preserveAspectRatio", "zoomAndPan", "viewTarget"], contentGroups: ["descriptive"] }, vkern: { attrsGroups: ["core"], attrs: ["u1", "g1", "u2", "g2", "k"] } }; exports.editorNamespaces = ["http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd", "http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd", "http://www.inkscape.org/namespaces/inkscape", "http://www.bohemiancoding.com/sketch/ns", "http://ns.adobe.com/AdobeIllustrator/10.0/", "http://ns.adobe.com/Graphs/1.0/", "http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/", "http://ns.adobe.com/Variables/1.0/", "http://ns.adobe.com/SaveForWeb/1.0/", "http://ns.adobe.com/Extensibility/1.0/", "http://ns.adobe.com/Flows/1.0/", "http://ns.adobe.com/ImageReplacement/1.0/", "http://ns.adobe.com/GenericCustomNamespace/1.0/", "http://ns.adobe.com/XPath/1.0/", "http://schemas.microsoft.com/visio/2003/SVGExtensions/", "http://taptrix.com/vectorillustrator/svg_extensions", "http://www.figma.com/figma/ns", "http://purl.org/dc/elements/1.1/", "http://creativecommons.org/ns#", "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "http://www.serif.com/", "http://www.vector.evaxdesign.sk"]; exports.referencesProps = ["clip-path", "color-profile", "fill", "filter", "marker-start", "marker-mid", "marker-end", "mask", "stroke", "style"]; exports.inheritableAttrs = ["clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cursor", "direction", "dominant-baseline", "fill", "fill-opacity", "fill-rule", "font", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "glyph-orientation-horizontal", "glyph-orientation-vertical", "image-rendering", "letter-spacing", "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "pointer-events", "shape-rendering", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-anchor", "text-rendering", "transform", "visibility", "word-spacing", "writing-mode"]; exports.presentationNonInheritableGroupAttrs = ["display", "clip-path", "filter", "mask", "opacity", "text-decoration", "transform", "unicode-bidi"]; exports.colorsNames = { aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#0ff", aquamarine: "#7fffd4", azure: "#f0ffff", beige: "#f5f5dc", bisque: "#ffe4c4", black: "#000", blanchedalmond: "#ffebcd", blue: "#00f", blueviolet: "#8a2be2", brown: "#a52a2a", burlywood: "#deb887", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", cornflowerblue: "#6495ed", cornsilk: "#fff8dc", crimson: "#dc143c", cyan: "#0ff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", darkkhaki: "#bdb76b", darkmagenta: "#8b008b", darkolivegreen: "#556b2f", darkorange: "#ff8c00", darkorchid: "#9932cc", darkred: "#8b0000", darksalmon: "#e9967a", darkseagreen: "#8fbc8f", darkslateblue: "#483d8b", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", darkturquoise: "#00ced1", darkviolet: "#9400d3", deeppink: "#ff1493", deepskyblue: "#00bfff", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1e90ff", firebrick: "#b22222", floralwhite: "#fffaf0", forestgreen: "#228b22", fuchsia: "#f0f", gainsboro: "#dcdcdc", ghostwhite: "#f8f8ff", gold: "#ffd700", goldenrod: "#daa520", gray: "#808080", green: "#008000", greenyellow: "#adff2f", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", indianred: "#cd5c5c", indigo: "#4b0082", ivory: "#fffff0", khaki: "#f0e68c", lavender: "#e6e6fa", lavenderblush: "#fff0f5", lawngreen: "#7cfc00", lemonchiffon: "#fffacd", lightblue: "#add8e6", lightcoral: "#f08080", lightcyan: "#e0ffff", lightgoldenrodyellow: "#fafad2", lightgray: "#d3d3d3", lightgreen: "#90ee90", lightgrey: "#d3d3d3", lightpink: "#ffb6c1", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", lightskyblue: "#87cefa", lightslategray: "#789", lightslategrey: "#789", lightsteelblue: "#b0c4de", lightyellow: "#ffffe0", lime: "#0f0", limegreen: "#32cd32", linen: "#faf0e6", magenta: "#f0f", maroon: "#800000", mediumaquamarine: "#66cdaa", mediumblue: "#0000cd", mediumorchid: "#ba55d3", mediumpurple: "#9370db", mediumseagreen: "#3cb371", mediumslateblue: "#7b68ee", mediumspringgreen: "#00fa9a", mediumturquoise: "#48d1cc", mediumvioletred: "#c71585", midnightblue: "#191970", mintcream: "#f5fffa", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", navajowhite: "#ffdead", navy: "#000080", oldlace: "#fdf5e6", olive: "#808000", olivedrab: "#6b8e23", orange: "#ffa500", orangered: "#ff4500", orchid: "#da70d6", palegoldenrod: "#eee8aa", palegreen: "#98fb98", paleturquoise: "#afeeee", palevioletred: "#db7093", papayawhip: "#ffefd5", peachpuff: "#ffdab9", peru: "#cd853f", pink: "#ffc0cb", plum: "#dda0dd", powderblue: "#b0e0e6", purple: "#800080", rebeccapurple: "#639", red: "#f00", rosybrown: "#bc8f8f", royalblue: "#4169e1", saddlebrown: "#8b4513", salmon: "#fa8072", sandybrown: "#f4a460", seagreen: "#2e8b57", seashell: "#fff5ee", sienna: "#a0522d", silver: "#c0c0c0", skyblue: "#87ceeb", slateblue: "#6a5acd", slategray: "#708090", slategrey: "#708090", snow: "#fffafa", springgreen: "#00ff7f", steelblue: "#4682b4", tan: "#d2b48c", teal: "#008080", thistle: "#d8bfd8", tomato: "#ff6347", turquoise: "#40e0d0", violet: "#ee82ee", wheat: "#f5deb3", white: "#fff", whitesmoke: "#f5f5f5", yellow: "#ff0", yellowgreen: "#9acd32" }; exports.colorsShortNames = { "#f0ffff": "azure", "#f5f5dc": "beige", "#ffe4c4": "bisque", "#a52a2a": "brown", "#ff7f50": "coral", "#ffd700": "gold", "#808080": "gray", "#008000": "green", "#4b0082": "indigo", "#fffff0": "ivory", "#f0e68c": "khaki", "#faf0e6": "linen", "#800000": "maroon", "#000080": "navy", "#808000": "olive", "#ffa500": "orange", "#da70d6": "orchid", "#cd853f": "peru", "#ffc0cb": "pink", "#dda0dd": "plum", "#800080": "purple", "#f00": "red", "#ff0000": "red", "#fa8072": "salmon", "#a0522d": "sienna", "#c0c0c0": "silver", "#fffafa": "snow", "#d2b48c": "tan", "#008080": "teal", "#ff6347": "tomato", "#ee82ee": "violet", "#f5deb3": "wheat" }; exports.colorsProps = ["color", "fill", "stroke", "stop-color", "flood-color", "lighting-color"]; })(_collections); var { detachNodeFromParent: detachNodeFromParent$h } = xast; var { editorNamespaces } = _collections; removeEditorsNSData$1.type = "visitor"; removeEditorsNSData$1.name = "removeEditorsNSData"; removeEditorsNSData$1.active = true; removeEditorsNSData$1.description = "removes editors namespaces, elements and attributes"; removeEditorsNSData$1.fn = (_root, params) => { let namespaces = editorNamespaces; if (Array.isArray(params.additionalNamespaces)) { namespaces = [...editorNamespaces, ...params.additionalNamespaces]; } const prefixes = []; return { element: { enter: (node2, parentNode) => { if (node2.name === "svg") { for (const [name2, value] of Object.entries(node2.attributes)) { if (name2.startsWith("xmlns:") && namespaces.includes(value)) { prefixes.push(name2.slice("xmlns:".length)); delete node2.attributes[name2]; } } } for (const name2 of Object.keys(node2.attributes)) { if (name2.includes(":")) { const [prefix] = name2.split(":"); if (prefixes.includes(prefix)) { delete node2.attributes[name2]; } } } if (node2.name.includes(":")) { const [prefix] = node2.name.split(":"); if (prefixes.includes(prefix)) { detachNodeFromParent$h(node2, parentNode); } } } } }; }; var cleanupAttrs$1 = {}; cleanupAttrs$1.name = "cleanupAttrs"; cleanupAttrs$1.type = "visitor"; cleanupAttrs$1.active = true; cleanupAttrs$1.description = "cleanups attributes from newlines, trailing and repeating spaces"; var regNewlinesNeedSpace = /(\S)\r?\n(\S)/g; var regNewlines = /\r?\n/g; var regSpaces = /\s{2,}/g; cleanupAttrs$1.fn = (root, params) => { const { newlines = true, trim = true, spaces = true } = params; return { element: { enter: (node2) => { for (const name2 of Object.keys(node2.attributes)) { if (newlines) { node2.attributes[name2] = node2.attributes[name2].replace(regNewlinesNeedSpace, (match, p1, p2) => p1 + " " + p2); node2.attributes[name2] = node2.attributes[name2].replace(regNewlines, ""); } if (trim) { node2.attributes[name2] = node2.attributes[name2].trim(); } if (spaces) { node2.attributes[name2] = node2.attributes[name2].replace(regSpaces, " "); } } } } }; }; var mergeStyles$1 = {}; var CSSClassList$1 = function(node2) { this.parentNode = node2; this.classNames = new Set(); const value = node2.attributes.class; if (value != null) { this.addClassValueHandler(); this.setClassValue(value); } }; CSSClassList$1.prototype.addClassValueHandler = function() { Object.defineProperty(this.parentNode.attributes, "class", { get: this.getClassValue.bind(this), set: this.setClassValue.bind(this), enumerable: true, configurable: true }); }; CSSClassList$1.prototype.getClassValue = function() { var arrClassNames = Array.from(this.classNames); return arrClassNames.join(" "); }; CSSClassList$1.prototype.setClassValue = function(newValue) { if (typeof newValue === "undefined") { this.classNames.clear(); return; } var arrClassNames = newValue.split(" "); this.classNames = new Set(arrClassNames); }; CSSClassList$1.prototype.add = function() { this.addClassValueHandler(); Object.values(arguments).forEach(this._addSingle.bind(this)); }; CSSClassList$1.prototype._addSingle = function(className) { this.classNames.add(className); }; CSSClassList$1.prototype.remove = function() { this.addClassValueHandler(); Object.values(arguments).forEach(this._removeSingle.bind(this)); }; CSSClassList$1.prototype._removeSingle = function(className) { this.classNames.delete(className); }; CSSClassList$1.prototype.item = function(index) { var arrClassNames = Array.from(this.classNames); return arrClassNames[index]; }; CSSClassList$1.prototype.toggle = function(className, force) { if (this.contains(className) || force === false) { this.classNames.delete(className); } this.classNames.add(className); }; CSSClassList$1.prototype.contains = function(className) { return this.classNames.has(className); }; var cssClassList = CSSClassList$1; var csstree_min = { exports: {} }; (function(module2, exports) { !function(e, t) { module2.exports = t(); }(commonjsGlobal, function() { function e(e2) { return { prev: null, next: null, data: e2 }; } function t(e2, t2, n2) { var i2; return r !== null ? (i2 = r, r = r.cursor, i2.prev = t2, i2.next = n2, i2.cursor = e2.cursor) : i2 = { prev: t2, next: n2, cursor: e2.cursor }, e2.cursor = i2, i2; } function n(e2) { var t2 = e2.cursor; e2.cursor = t2.cursor, t2.prev = null, t2.next = null, t2.cursor = r, r = t2; } var r = null, i = function() { this.cursor = null, this.head = null, this.tail = null; }; i.createItem = e, i.prototype.createItem = e, i.prototype.updateCursors = function(e2, t2, n2, r2) { for (var i2 = this.cursor; i2 !== null; ) i2.prev === e2 && (i2.prev = t2), i2.next === n2 && (i2.next = r2), i2 = i2.cursor; }, i.prototype.getSize = function() { for (var e2 = 0, t2 = this.head; t2; ) e2++, t2 = t2.next; return e2; }, i.prototype.fromArray = function(t2) { var n2 = null; this.head = null; for (var r2 = 0; r2 < t2.length; r2++) { var i2 = e(t2[r2]); n2 !== null ? n2.next = i2 : this.head = i2, i2.prev = n2, n2 = i2; } return this.tail = n2, this; }, i.prototype.toArray = function() { for (var e2 = this.head, t2 = []; e2; ) t2.push(e2.data), e2 = e2.next; return t2; }, i.prototype.toJSON = i.prototype.toArray, i.prototype.isEmpty = function() { return this.head === null; }, i.prototype.first = function() { return this.head && this.head.data; }, i.prototype.last = function() { return this.tail && this.tail.data; }, i.prototype.each = function(e2, r2) { var i2; r2 === void 0 && (r2 = this); for (var a2 = t(this, null, this.head); a2.next !== null; ) i2 = a2.next, a2.next = i2.next, e2.call(r2, i2.data, i2, this); n(this); }, i.prototype.forEach = i.prototype.each, i.prototype.eachRight = function(e2, r2) { var i2; r2 === void 0 && (r2 = this); for (var a2 = t(this, this.tail, null); a2.prev !== null; ) i2 = a2.prev, a2.prev = i2.prev, e2.call(r2, i2.data, i2, this); n(this); }, i.prototype.forEachRight = i.prototype.eachRight, i.prototype.reduce = function(e2, r2, i2) { var a2; i2 === void 0 && (i2 = this); for (var o2 = t(this, null, this.head), s2 = r2; o2.next !== null; ) a2 = o2.next, o2.next = a2.next, s2 = e2.call(i2, s2, a2.data, a2, this); return n(this), s2; }, i.prototype.reduceRight = function(e2, r2, i2) { var a2; i2 === void 0 && (i2 = this); for (var o2 = t(this, this.tail, null), s2 = r2; o2.prev !== null; ) a2 = o2.prev, o2.prev = a2.prev, s2 = e2.call(i2, s2, a2.data, a2, this); return n(this), s2; }, i.prototype.nextUntil = function(e2, r2, i2) { if (e2 !== null) { var a2; i2 === void 0 && (i2 = this); for (var o2 = t(this, null, e2); o2.next !== null && (a2 = o2.next, o2.next = a2.next, !r2.call(i2, a2.data, a2, this)); ) ; n(this); } }, i.prototype.prevUntil = function(e2, r2, i2) { if (e2 !== null) { var a2; i2 === void 0 && (i2 = this); for (var o2 = t(this, e2, null); o2.prev !== null && (a2 = o2.prev, o2.prev = a2.prev, !r2.call(i2, a2.data, a2, this)); ) ; n(this); } }, i.prototype.some = function(e2, t2) { var n2 = this.head; for (t2 === void 0 && (t2 = this); n2 !== null; ) { if (e2.call(t2, n2.data, n2, this)) return true; n2 = n2.next; } return false; }, i.prototype.map = function(e2, t2) { var n2 = new i(), r2 = this.head; for (t2 === void 0 && (t2 = this); r2 !== null; ) n2.appendData(e2.call(t2, r2.data, r2, this)), r2 = r2.next; return n2; }, i.prototype.filter = function(e2, t2) { var n2 = new i(), r2 = this.head; for (t2 === void 0 && (t2 = this); r2 !== null; ) e2.call(t2, r2.data, r2, this) && n2.appendData(r2.data), r2 = r2.next; return n2; }, i.prototype.clear = function() { this.head = null, this.tail = null; }, i.prototype.copy = function() { for (var t2 = new i(), n2 = this.head; n2 !== null; ) t2.insert(e(n2.data)), n2 = n2.next; return t2; }, i.prototype.prepend = function(e2) { return this.updateCursors(null, e2, this.head, e2), this.head !== null ? (this.head.prev = e2, e2.next = this.head) : this.tail = e2, this.head = e2, this; }, i.prototype.prependData = function(t2) { return this.prepend(e(t2)); }, i.prototype.append = function(e2) { return this.insert(e2); }, i.prototype.appendData = function(t2) { return this.insert(e(t2)); }, i.prototype.insert = function(e2, t2) { if (t2 != null) if (this.updateCursors(t2.prev, e2, t2, e2), t2.prev === null) { if (this.head !== t2) throw new Error("before doesn't belong to list"); this.head = e2, t2.prev = e2, e2.next = t2, this.updateCursors(null, e2); } else t2.prev.next = e2, e2.prev = t2.prev, t2.prev = e2, e2.next = t2; else this.updateCursors(this.tail, e2, null, e2), this.tail !== null ? (this.tail.next = e2, e2.prev = this.tail) : this.head = e2, this.tail = e2; return this; }, i.prototype.insertData = function(t2, n2) { return this.insert(e(t2), n2); }, i.prototype.remove = function(e2) { if (this.updateCursors(e2, e2.prev, e2, e2.next), e2.prev !== null) e2.prev.next = e2.next; else { if (this.head !== e2) throw new Error("item doesn't belong to list"); this.head = e2.next; } if (e2.next !== null) e2.next.prev = e2.prev; else { if (this.tail !== e2) throw new Error("item doesn't belong to list"); this.tail = e2.prev; } return e2.prev = null, e2.next = null, e2; }, i.prototype.push = function(t2) { this.insert(e(t2)); }, i.prototype.pop = function() { if (this.tail !== null) return this.remove(this.tail); }, i.prototype.unshift = function(t2) { this.prepend(e(t2)); }, i.prototype.shift = function() { if (this.head !== null) return this.remove(this.head); }, i.prototype.prependList = function(e2) { return this.insertList(e2, this.head); }, i.prototype.appendList = function(e2) { return this.insertList(e2); }, i.prototype.insertList = function(e2, t2) { return e2.head === null || (t2 != null ? (this.updateCursors(t2.prev, e2.tail, t2, e2.head), t2.prev !== null ? (t2.prev.next = e2.head, e2.head.prev = t2.prev) : this.head = e2.head, t2.prev = e2.tail, e2.tail.next = t2) : (this.updateCursors(this.tail, e2.tail, null, e2.head), this.tail !== null ? (this.tail.next = e2.head, e2.head.prev = this.tail) : this.head = e2.head, this.tail = e2.tail), e2.head = null, e2.tail = null), this; }, i.prototype.replace = function(e2, t2) { "head" in t2 ? this.insertList(t2, e2) : this.insert(t2, e2), this.remove(e2); }; var a = i, o = function(e2, t2) { var n2 = Object.create(SyntaxError.prototype), r2 = new Error(); return n2.name = e2, n2.message = t2, Object.defineProperty(n2, "stack", { get: function() { return (r2.stack || "").replace(/^(.+\n){1,3}/, e2 + ": " + t2 + "\n"); } }), n2; }; function s(e2, t2) { function n2(e3, t3) { return r2.slice(e3, t3).map(function(t4, n3) { for (var r3 = String(e3 + n3 + 1); r3.length < l2; ) r3 = " " + r3; return r3 + " |" + t4; }).join("\n"); } var r2 = e2.source.split(/\r\n?|\n|\f/), i2 = e2.line, a2 = e2.column, o2 = Math.max(1, i2 - t2) - 1, s2 = Math.min(i2 + t2, r2.length + 1), l2 = Math.max(4, String(s2).length) + 1, c2 = 0; (a2 += (" ".length - 1) * (r2[i2 - 1].substr(0, a2 - 1).match(/\t/g) || []).length) > 100 && (c2 = a2 - 60 + 3, a2 = 58); for (var u2 = o2; u2 <= s2; u2++) u2 >= 0 && u2 < r2.length && (r2[u2] = r2[u2].replace(/\t/g, " "), r2[u2] = (c2 > 0 && r2[u2].length > c2 ? "\u2026" : "") + r2[u2].substr(c2, 98) + (r2[u2].length > c2 + 100 - 1 ? "\u2026" : "")); return [n2(o2, i2), new Array(a2 + l2 + 2).join("-") + "^", n2(i2, s2)].filter(Boolean).join("\n"); } var l = function(e2, t2, n2, r2, i2) { var a2 = o("SyntaxError", e2); return a2.source = t2, a2.offset = n2, a2.line = r2, a2.column = i2, a2.sourceFragment = function(e3) { return s(a2, isNaN(e3) ? 0 : e3); }, Object.defineProperty(a2, "formattedMessage", { get: function() { return "Parse error: " + a2.message + "\n" + s(a2, 2); } }), a2.parseError = { offset: n2, line: r2, column: i2 }, a2; }, c = { EOF: 0, Ident: 1, Function: 2, AtKeyword: 3, Hash: 4, String: 5, BadString: 6, Url: 7, BadUrl: 8, Delim: 9, Number: 10, Percentage: 11, Dimension: 12, WhiteSpace: 13, CDO: 14, CDC: 15, Colon: 16, Semicolon: 17, Comma: 18, LeftSquareBracket: 19, RightSquareBracket: 20, LeftParenthesis: 21, RightParenthesis: 22, LeftCurlyBracket: 23, RightCurlyBracket: 24, Comment: 25 }, u = Object.keys(c).reduce(function(e2, t2) { return e2[c[t2]] = t2, e2; }, {}), h = { TYPE: c, NAME: u }; function p(e2) { return e2 >= 48 && e2 <= 57; } function d(e2) { return e2 >= 65 && e2 <= 90; } function m(e2) { return e2 >= 97 && e2 <= 122; } function g2(e2) { return d(e2) || m(e2); } function f(e2) { return e2 >= 128; } function b(e2) { return g2(e2) || f(e2) || e2 === 95; } function y(e2) { return e2 >= 0 && e2 <= 8 || e2 === 11 || e2 >= 14 && e2 <= 31 || e2 === 127; } function k(e2) { return e2 === 10 || e2 === 13 || e2 === 12; } function v(e2) { return k(e2) || e2 === 32 || e2 === 9; } function x(e2, t2) { return e2 === 92 && (!k(t2) && t2 !== 0); } var w = new Array(128); C.Eof = 128, C.WhiteSpace = 130, C.Digit = 131, C.NameStart = 132, C.NonPrintable = 133; for (var S = 0; S < w.length; S++) switch (true) { case v(S): w[S] = C.WhiteSpace; break; case p(S): w[S] = C.Digit; break; case b(S): w[S] = C.NameStart; break; case y(S): w[S] = C.NonPrintable; break; default: w[S] = S || C.Eof; } function C(e2) { return e2 < 128 ? w[e2] : C.NameStart; } var z = { isDigit: p, isHexDigit: function(e2) { return p(e2) || e2 >= 65 && e2 <= 70 || e2 >= 97 && e2 <= 102; }, isUppercaseLetter: d, isLowercaseLetter: m, isLetter: g2, isNonAscii: f, isNameStart: b, isName: function(e2) { return b(e2) || p(e2) || e2 === 45; }, isNonPrintable: y, isNewline: k, isWhiteSpace: v, isValidEscape: x, isIdentifierStart: function(e2, t2, n2) { return e2 === 45 ? b(t2) || t2 === 45 || x(t2, n2) : !!b(e2) || e2 === 92 && x(e2, t2); }, isNumberStart: function(e2, t2, n2) { return e2 === 43 || e2 === 45 ? p(t2) ? 2 : t2 === 46 && p(n2) ? 3 : 0 : e2 === 46 ? p(t2) ? 2 : 0 : p(e2) ? 1 : 0; }, isBOM: function(e2) { return e2 === 65279 || e2 === 65534 ? 1 : 0; }, charCodeCategory: C }, A = z.isDigit, P = z.isHexDigit, T = z.isUppercaseLetter, L = z.isName, E = z.isWhiteSpace, D = z.isValidEscape; function O(e2, t2) { return t2 < e2.length ? e2.charCodeAt(t2) : 0; } function B(e2, t2, n2) { return n2 === 13 && O(e2, t2 + 1) === 10 ? 2 : 1; } function I(e2, t2, n2) { var r2 = e2.charCodeAt(t2); return T(r2) && (r2 |= 32), r2 === n2; } function N(e2, t2) { for (; t2 < e2.length && A(e2.charCodeAt(t2)); t2++) ; return t2; } function R(e2, t2) { if (P(O(e2, (t2 += 2) - 1))) { for (var n2 = Math.min(e2.length, t2 + 5); t2 < n2 && P(O(e2, t2)); t2++) ; var r2 = O(e2, t2); E(r2) && (t2 += B(e2, t2, r2)); } return t2; } var M = { consumeEscaped: R, consumeName: function(e2, t2) { for (; t2 < e2.length; t2++) { var n2 = e2.charCodeAt(t2); if (!L(n2)) { if (!D(n2, O(e2, t2 + 1))) break; t2 = R(e2, t2) - 1; } } return t2; }, consumeNumber: function(e2, t2) { var n2 = e2.charCodeAt(t2); if (n2 !== 43 && n2 !== 45 || (n2 = e2.charCodeAt(t2 += 1)), A(n2) && (t2 = N(e2, t2 + 1), n2 = e2.charCodeAt(t2)), n2 === 46 && A(e2.charCodeAt(t2 + 1)) && (n2 = e2.charCodeAt(t2 += 2), t2 = N(e2, t2)), I(e2, t2, 101)) { var r2 = 0; (n2 = e2.charCodeAt(t2 + 1)) !== 45 && n2 !== 43 || (r2 = 1, n2 = e2.charCodeAt(t2 + 2)), A(n2) && (t2 = N(e2, t2 + 1 + r2 + 1)); } return t2; }, consumeBadUrlRemnants: function(e2, t2) { for (; t2 < e2.length; t2++) { var n2 = e2.charCodeAt(t2); if (n2 === 41) { t2++; break; } D(n2, O(e2, t2 + 1)) && (t2 = R(e2, t2)); } return t2; }, cmpChar: I, cmpStr: function(e2, t2, n2, r2) { if (n2 - t2 !== r2.length) return false; if (t2 < 0 || n2 > e2.length) return false; for (var i2 = t2; i2 < n2; i2++) { var a2 = e2.charCodeAt(i2), o2 = r2.charCodeAt(i2 - t2); if (T(a2) && (a2 |= 32), a2 !== o2) return false; } return true; }, getNewlineLength: B, findWhiteSpaceStart: function(e2, t2) { for (; t2 >= 0 && E(e2.charCodeAt(t2)); t2--) ; return t2 + 1; }, findWhiteSpaceEnd: function(e2, t2) { for (; t2 < e2.length && E(e2.charCodeAt(t2)); t2++) ; return t2; } }, j = h.TYPE, _ = h.NAME, F = M.cmpStr, W = j.EOF, q = j.WhiteSpace, Y = j.Comment, U = function() { this.offsetAndType = null, this.balance = null, this.reset(); }; U.prototype = { reset: function() { this.eof = false, this.tokenIndex = -1, this.tokenType = 0, this.tokenStart = this.firstCharOffset, this.tokenEnd = this.firstCharOffset; }, lookupType: function(e2) { return (e2 += this.tokenIndex) < this.tokenCount ? this.offsetAndType[e2] >> 24 : W; }, lookupOffset: function(e2) { return (e2 += this.tokenIndex) < this.tokenCount ? 16777215 & this.offsetAndType[e2 - 1] : this.source.length; }, lookupValue: function(e2, t2) { return (e2 += this.tokenIndex) < this.tokenCount && F(this.source, 16777215 & this.offsetAndType[e2 - 1], 16777215 & this.offsetAndType[e2], t2); }, getTokenStart: function(e2) { return e2 === this.tokenIndex ? this.tokenStart : e2 > 0 ? e2 < this.tokenCount ? 16777215 & this.offsetAndType[e2 - 1] : 16777215 & this.offsetAndType[this.tokenCount] : this.firstCharOffset; }, getRawLength: function(e2, t2) { var n2, r2 = e2, i2 = 16777215 & this.offsetAndType[Math.max(r2 - 1, 0)]; e: for (; r2 < this.tokenCount && !((n2 = this.balance[r2]) < e2); r2++) switch (t2(this.offsetAndType[r2] >> 24, this.source, i2)) { case 1: break e; case 2: r2++; break e; default: this.balance[n2] === r2 && (r2 = n2), i2 = 16777215 & this.offsetAndType[r2]; } return r2 - this.tokenIndex; }, isBalanceEdge: function(e2) { return this.balance[this.tokenIndex] < e2; }, isDelim: function(e2, t2) { return t2 ? this.lookupType(t2) === j.Delim && this.source.charCodeAt(this.lookupOffset(t2)) === e2 : this.tokenType === j.Delim && this.source.charCodeAt(this.tokenStart) === e2; }, getTokenValue: function() { return this.source.substring(this.tokenStart, this.tokenEnd); }, getTokenLength: function() { return this.tokenEnd - this.tokenStart; }, substrToCursor: function(e2) { return this.source.substring(e2, this.tokenStart); }, skipWS: function() { for (var e2 = this.tokenIndex, t2 = 0; e2 < this.tokenCount && this.offsetAndType[e2] >> 24 === q; e2++, t2++) ; t2 > 0 && this.skip(t2); }, skipSC: function() { for (; this.tokenType === q || this.tokenType === Y; ) this.next(); }, skip: function(e2) { var t2 = this.tokenIndex + e2; t2 < this.tokenCount ? (this.tokenIndex = t2, this.tokenStart = 16777215 & this.offsetAndType[t2 - 1], t2 = this.offsetAndType[t2], this.tokenType = t2 >> 24, this.tokenEnd = 16777215 & t2) : (this.tokenIndex = this.tokenCount, this.next()); }, next: function() { var e2 = this.tokenIndex + 1; e2 < this.tokenCount ? (this.tokenIndex = e2, this.tokenStart = this.tokenEnd, e2 = this.offsetAndType[e2], this.tokenType = e2 >> 24, this.tokenEnd = 16777215 & e2) : (this.tokenIndex = this.tokenCount, this.eof = true, this.tokenType = W, this.tokenStart = this.tokenEnd = this.source.length); }, forEachToken(e2) { for (var t2 = 0, n2 = this.firstCharOffset; t2 < this.tokenCount; t2++) { var r2 = n2, i2 = this.offsetAndType[t2], a2 = 16777215 & i2; n2 = a2, e2(i2 >> 24, r2, a2, t2); } }, dump() { var e2 = new Array(this.tokenCount); return this.forEachToken((t2, n2, r2, i2) => { e2[i2] = { idx: i2, type: _[t2], chunk: this.source.substring(n2, r2), balance: this.balance[i2] }; }), e2; } }; var H = U; function V(e2) { return e2; } function K(e2, t2, n2, r2) { var i2, a2; switch (e2.type) { case "Group": i2 = function(e3, t3, n3, r3) { var i3 = e3.combinator === " " || r3 ? e3.combinator : " " + e3.combinator + " ", a3 = e3.terms.map(function(e4) { return K(e4, t3, n3, r3); }).join(i3); return (e3.explicit || n3) && (a3 = (r3 || a3[0] === "," ? "[" : "[ ") + a3 + (r3 ? "]" : " ]")), a3; }(e2, t2, n2, r2) + (e2.disallowEmpty ? "!" : ""); break; case "Multiplier": return K(e2.term, t2, n2, r2) + t2((a2 = e2).min === 0 && a2.max === 0 ? "*" : a2.min === 0 && a2.max === 1 ? "?" : a2.min === 1 && a2.max === 0 ? a2.comma ? "#" : "+" : a2.min === 1 && a2.max === 1 ? "" : (a2.comma ? "#" : "") + (a2.min === a2.max ? "{" + a2.min + "}" : "{" + a2.min + "," + (a2.max !== 0 ? a2.max : "") + "}"), e2); case "Type": i2 = "<" + e2.name + (e2.opts ? t2(function(e3) { switch (e3.type) { case "Range": return " [" + (e3.min === null ? "-\u221E" : e3.min) + "," + (e3.max === null ? "\u221E" : e3.max) + "]"; default: throw new Error("Unknown node type `" + e3.type + "`"); } }(e2.opts), e2.opts) : "") + ">"; break; case "Property": i2 = "<'" + e2.name + "'>"; break; case "Keyword": i2 = e2.name; break; case "AtKeyword": i2 = "@" + e2.name; break; case "Function": i2 = e2.name + "("; break; case "String": case "Token": i2 = e2.value; break; case "Comma": i2 = ","; break; default: throw new Error("Unknown node type `" + e2.type + "`"); } return t2(i2, e2); } var G = function(e2, t2) { var n2 = V, r2 = false, i2 = false; return typeof t2 == "function" ? n2 = t2 : t2 && (r2 = Boolean(t2.forceBraces), i2 = Boolean(t2.compact), typeof t2.decorate == "function" && (n2 = t2.decorate)), K(e2, n2, r2, i2); }; const Q = { offset: 0, line: 1, column: 1 }; function X(e2, t2) { const n2 = e2 && e2.loc && e2.loc[t2]; return n2 ? "line" in n2 ? Z(n2) : n2 : null; } function Z({ offset: e2, line: t2, column: n2 }, r2) { const i2 = { offset: e2, line: t2, column: n2 }; if (r2) { const e3 = r2.split(/\n|\r\n?|\f/); i2.offset += r2.length, i2.line += e3.length - 1, i2.column = e3.length === 1 ? i2.column + r2.length : e3.pop().length + 1; } return i2; } var $ = function(e2, t2) { const n2 = o("SyntaxReferenceError", e2 + (t2 ? " `" + t2 + "`" : "")); return n2.reference = t2, n2; }, J = function(e2, t2, n2, r2) { const i2 = o("SyntaxMatchError", e2), { css: a2, mismatchOffset: s2, mismatchLength: l2, start: c2, end: u2 } = function(e3, t3) { const n3 = e3.tokens, r3 = e3.longestMatch, i3 = r3 < n3.length && n3[r3].node || null, a3 = i3 !== t3 ? i3 : null; let o2, s3, l3 = 0, c3 = 0, u3 = 0, h2 = ""; for (let e4 = 0; e4 < n3.length; e4++) { const t4 = n3[e4].value; e4 === r3 && (c3 = t4.length, l3 = h2.length), a3 !== null && n3[e4].node === a3 && (e4 <= r3 ? u3++ : u3 = 0), h2 += t4; } return r3 === n3.length || u3 > 1 ? (o2 = X(a3 || t3, "end") || Z(Q, h2), s3 = Z(o2)) : (o2 = X(a3, "start") || Z(X(t3, "start") || Q, h2.slice(0, l3)), s3 = X(a3, "end") || Z(o2, h2.substr(l3, c3))), { css: h2, mismatchOffset: l3, mismatchLength: c3, start: o2, end: s3 }; }(r2, n2); return i2.rawMessage = e2, i2.syntax = t2 ? G(t2) : "", i2.css = a2, i2.mismatchOffset = s2, i2.mismatchLength = l2, i2.message = e2 + "\n syntax: " + i2.syntax + "\n value: " + (a2 || "") + "\n --------" + new Array(i2.mismatchOffset + 1).join("-") + "^", Object.assign(i2, c2), i2.loc = { source: n2 && n2.loc && n2.loc.source || "", start: c2, end: u2 }, i2; }, ee2 = Object.prototype.hasOwnProperty, te = Object.create(null), ne2 = Object.create(null); function re(e2, t2) { return t2 = t2 || 0, e2.length - t2 >= 2 && e2.charCodeAt(t2) === 45 && e2.charCodeAt(t2 + 1) === 45; } function ie(e2, t2) { if (t2 = t2 || 0, e2.length - t2 >= 3 && e2.charCodeAt(t2) === 45 && e2.charCodeAt(t2 + 1) !== 45) { var n2 = e2.indexOf("-", t2 + 2); if (n2 !== -1) return e2.substring(t2, n2 + 1); } return ""; } var ae = { keyword: function(e2) { if (ee2.call(te, e2)) return te[e2]; var t2 = e2.toLowerCase(); if (ee2.call(te, t2)) return te[e2] = te[t2]; var n2 = re(t2, 0), r2 = n2 ? "" : ie(t2, 0); return te[e2] = Object.freeze({ basename: t2.substr(r2.length), name: t2, vendor: r2, prefix: r2, custom: n2 }); }, property: function(e2) { if (ee2.call(ne2, e2)) return ne2[e2]; var t2 = e2, n2 = e2[0]; n2 === "/" ? n2 = e2[1] === "/" ? "//" : "/" : n2 !== "_" && n2 !== "*" && n2 !== "$" && n2 !== "#" && n2 !== "+" && n2 !== "&" && (n2 = ""); var r2 = re(t2, n2.length); if (!r2 && (t2 = t2.toLowerCase(), ee2.call(ne2, t2))) return ne2[e2] = ne2[t2]; var i2 = r2 ? "" : ie(t2, n2.length), a2 = t2.substr(0, n2.length + i2.length); return ne2[e2] = Object.freeze({ basename: t2.substr(a2.length), name: t2.substr(n2.length), hack: n2, vendor: i2, prefix: a2, custom: r2 }); }, isCustomProperty: re, vendorPrefix: ie }, oe = typeof Uint32Array != "undefined" ? Uint32Array : Array, se = function(e2, t2) { return e2 === null || e2.length < t2 ? new oe(Math.max(t2 + 1024, 16384)) : e2; }, le2 = h.TYPE, ce = z.isNewline, ue = z.isName, he = z.isValidEscape, pe = z.isNumberStart, de = z.isIdentifierStart, me = z.charCodeCategory, ge2 = z.isBOM, fe = M.cmpStr, be = M.getNewlineLength, ye = M.findWhiteSpaceEnd, ke = M.consumeEscaped, ve = M.consumeName, xe = M.consumeNumber, we = M.consumeBadUrlRemnants; function Se(e2, t2) { function n2(t3) { return t3 < o2 ? e2.charCodeAt(t3) : 0; } function r2() { return h2 = xe(e2, h2), de(n2(h2), n2(h2 + 1), n2(h2 + 2)) ? (f2 = le2.Dimension, void (h2 = ve(e2, h2))) : n2(h2) === 37 ? (f2 = le2.Percentage, void h2++) : void (f2 = le2.Number); } function i2() { const t3 = h2; return h2 = ve(e2, h2), fe(e2, t3, h2, "url") && n2(h2) === 40 ? n2(h2 = ye(e2, h2 + 1)) === 34 || n2(h2) === 39 ? (f2 = le2.Function, void (h2 = t3 + 4)) : void function() { for (f2 = le2.Url, h2 = ye(e2, h2); h2 < e2.length; h2++) { var t4 = e2.charCodeAt(h2); switch (me(t4)) { case 41: return void h2++; case me.Eof: return; case me.WhiteSpace: return n2(h2 = ye(e2, h2)) === 41 || h2 >= e2.length ? void (h2 < e2.length && h2++) : (h2 = we(e2, h2), void (f2 = le2.BadUrl)); case 34: case 39: case 40: case me.NonPrintable: return h2 = we(e2, h2), void (f2 = le2.BadUrl); case 92: if (he(t4, n2(h2 + 1))) { h2 = ke(e2, h2) - 1; break; } return h2 = we(e2, h2), void (f2 = le2.BadUrl); } } }() : n2(h2) === 40 ? (f2 = le2.Function, void h2++) : void (f2 = le2.Ident); } function a2(t3) { for (t3 || (t3 = n2(h2++)), f2 = le2.String; h2 < e2.length; h2++) { var r3 = e2.charCodeAt(h2); switch (me(r3)) { case t3: return void h2++; case me.Eof: return; case me.WhiteSpace: if (ce(r3)) return h2 += be(e2, h2, r3), void (f2 = le2.BadString); break; case 92: if (h2 === e2.length - 1) break; var i3 = n2(h2 + 1); ce(i3) ? h2 += be(e2, h2 + 1, i3) : he(r3, i3) && (h2 = ke(e2, h2) - 1); } } } t2 || (t2 = new H()); for (var o2 = (e2 = String(e2 || "")).length, s2 = se(t2.offsetAndType, o2 + 1), l2 = se(t2.balance, o2 + 1), c2 = 0, u2 = ge2(n2(0)), h2 = u2, p2 = 0, d2 = 0, m2 = 0; h2 < o2; ) { var g3 = e2.charCodeAt(h2), f2 = 0; switch (l2[c2] = o2, me(g3)) { case me.WhiteSpace: f2 = le2.WhiteSpace, h2 = ye(e2, h2 + 1); break; case 34: a2(); break; case 35: ue(n2(h2 + 1)) || he(n2(h2 + 1), n2(h2 + 2)) ? (f2 = le2.Hash, h2 = ve(e2, h2 + 1)) : (f2 = le2.Delim, h2++); break; case 39: a2(); break; case 40: f2 = le2.LeftParenthesis, h2++; break; case 41: f2 = le2.RightParenthesis, h2++; break; case 43: pe(g3, n2(h2 + 1), n2(h2 + 2)) ? r2() : (f2 = le2.Delim, h2++); break; case 44: f2 = le2.Comma, h2++; break; case 45: pe(g3, n2(h2 + 1), n2(h2 + 2)) ? r2() : n2(h2 + 1) === 45 && n2(h2 + 2) === 62 ? (f2 = le2.CDC, h2 += 3) : de(g3, n2(h2 + 1), n2(h2 + 2)) ? i2() : (f2 = le2.Delim, h2++); break; case 46: pe(g3, n2(h2 + 1), n2(h2 + 2)) ? r2() : (f2 = le2.Delim, h2++); break; case 47: n2(h2 + 1) === 42 ? (f2 = le2.Comment, (h2 = e2.indexOf("*/", h2 + 2) + 2) === 1 && (h2 = e2.length)) : (f2 = le2.Delim, h2++); break; case 58: f2 = le2.Colon, h2++; break; case 59: f2 = le2.Semicolon, h2++; break; case 60: n2(h2 + 1) === 33 && n2(h2 + 2) === 45 && n2(h2 + 3) === 45 ? (f2 = le2.CDO, h2 += 4) : (f2 = le2.Delim, h2++); break; case 64: de(n2(h2 + 1), n2(h2 + 2), n2(h2 + 3)) ? (f2 = le2.AtKeyword, h2 = ve(e2, h2 + 1)) : (f2 = le2.Delim, h2++); break; case 91: f2 = le2.LeftSquareBracket, h2++; break; case 92: he(g3, n2(h2 + 1)) ? i2() : (f2 = le2.Delim, h2++); break; case 93: f2 = le2.RightSquareBracket, h2++; break; case 123: f2 = le2.LeftCurlyBracket, h2++; break; case 125: f2 = le2.RightCurlyBracket, h2++; break; case me.Digit: r2(); break; case me.NameStart: i2(); break; case me.Eof: break; default: f2 = le2.Delim, h2++; } switch (f2) { case p2: for (p2 = (d2 = l2[m2 = 16777215 & d2]) >> 24, l2[c2] = m2, l2[m2++] = c2; m2 < c2; m2++) l2[m2] === o2 && (l2[m2] = c2); break; case le2.LeftParenthesis: case le2.Function: l2[c2] = d2, d2 = (p2 = le2.RightParenthesis) << 24 | c2; break; case le2.LeftSquareBracket: l2[c2] = d2, d2 = (p2 = le2.RightSquareBracket) << 24 | c2; break; case le2.LeftCurlyBracket: l2[c2] = d2, d2 = (p2 = le2.RightCurlyBracket) << 24 | c2; } s2[c2++] = f2 << 24 | h2; } for (s2[c2] = le2.EOF << 24 | h2, l2[c2] = o2, l2[o2] = o2; d2 !== 0; ) d2 = l2[m2 = 16777215 & d2], l2[m2] = o2; return t2.source = e2, t2.firstCharOffset = u2, t2.offsetAndType = s2, t2.tokenCount = c2, t2.balance = l2, t2.reset(), t2.next(), t2; } Object.keys(h).forEach(function(e2) { Se[e2] = h[e2]; }), Object.keys(z).forEach(function(e2) { Se[e2] = z[e2]; }), Object.keys(M).forEach(function(e2) { Se[e2] = M[e2]; }); var Ce = Se, ze = Ce.isDigit, Ae = Ce.cmpChar, Pe = Ce.TYPE, Te = Pe.Delim, Le = Pe.WhiteSpace, Ee = Pe.Comment, De = Pe.Ident, Oe = Pe.Number, Be = Pe.Dimension; function Ie(e2, t2) { return e2 !== null && e2.type === Te && e2.value.charCodeAt(0) === t2; } function Ne(e2, t2, n2) { for (; e2 !== null && (e2.type === Le || e2.type === Ee); ) e2 = n2(++t2); return t2; } function Re2(e2, t2, n2, r2) { if (!e2) return 0; var i2 = e2.value.charCodeAt(t2); if (i2 === 43 || i2 === 45) { if (n2) return 0; t2++; } for (; t2 < e2.value.length; t2++) if (!ze(e2.value.charCodeAt(t2))) return 0; return r2 + 1; } function Me(e2, t2, n2) { var r2 = false, i2 = Ne(e2, t2, n2); if ((e2 = n2(i2)) === null) return t2; if (e2.type !== Oe) { if (!Ie(e2, 43) && !Ie(e2, 45)) return t2; if (r2 = true, i2 = Ne(n2(++i2), i2, n2), (e2 = n2(i2)) === null && e2.type !== Oe) return 0; } if (!r2) { var a2 = e2.value.charCodeAt(0); if (a2 !== 43 && a2 !== 45) return 0; } return Re2(e2, r2 ? 0 : 1, r2, i2); } var je = Ce.isHexDigit, _e = Ce.cmpChar, Fe = Ce.TYPE, We = Fe.Ident, qe = Fe.Delim, Ye = Fe.Number, Ue = Fe.Dimension; function He(e2, t2) { return e2 !== null && e2.type === qe && e2.value.charCodeAt(0) === t2; } function Ve(e2, t2) { return e2.value.charCodeAt(0) === t2; } function Ke(e2, t2, n2) { for (var r2 = t2, i2 = 0; r2 < e2.value.length; r2++) { var a2 = e2.value.charCodeAt(r2); if (a2 === 45 && n2 && i2 !== 0) return Ke(e2, t2 + i2 + 1, false) > 0 ? 6 : 0; if (!je(a2)) return 0; if (++i2 > 6) return 0; } return i2; } function Ge(e2, t2, n2) { if (!e2) return 0; for (; He(n2(t2), 63); ) { if (++e2 > 6) return 0; t2++; } return t2; } var Qe = Ce.isIdentifierStart, Xe = Ce.isHexDigit, Ze = Ce.isDigit, $e = Ce.cmpStr, Je = Ce.consumeNumber, et = Ce.TYPE, tt = ["unset", "initial", "inherit"], nt = ["calc(", "-moz-calc(", "-webkit-calc("]; function rt(e2, t2) { return t2 < e2.length ? e2.charCodeAt(t2) : 0; } function it2(e2, t2) { return $e(e2, 0, e2.length, t2); } function at(e2, t2) { for (var n2 = 0; n2 < t2.length; n2++) if (it2(e2, t2[n2])) return true; return false; } function ot(e2, t2) { return t2 === e2.length - 2 && (e2.charCodeAt(t2) === 92 && Ze(e2.charCodeAt(t2 + 1))); } function st(e2, t2, n2) { if (e2 && e2.type === "Range") { var r2 = Number(n2 !== void 0 && n2 !== t2.length ? t2.substr(0, n2) : t2); if (isNaN(r2)) return true; if (e2.min !== null && r2 < e2.min) return true; if (e2.max !== null && r2 > e2.max) return true; } return false; } function lt2(e2, t2) { var n2 = e2.index, r2 = 0; do { if (r2++, e2.balance <= n2) break; } while (e2 = t2(r2)); return r2; } function ct(e2) { return function(t2, n2, r2) { return t2 === null ? 0 : t2.type === et.Function && at(t2.value, nt) ? lt2(t2, n2) : e2(t2, n2, r2); }; } function ut(e2) { return function(t2) { return t2 === null || t2.type !== e2 ? 0 : 1; }; } function ht(e2) { return function(t2, n2, r2) { if (t2 === null || t2.type !== et.Dimension) return 0; var i2 = Je(t2.value, 0); if (e2 !== null) { var a2 = t2.value.indexOf("\\", i2), o2 = a2 !== -1 && ot(t2.value, a2) ? t2.value.substring(i2, a2) : t2.value.substr(i2); if (e2.hasOwnProperty(o2.toLowerCase()) === false) return 0; } return st(r2, t2.value, i2) ? 0 : 1; }; } function pt(e2) { return typeof e2 != "function" && (e2 = function() { return 0; }), function(t2, n2, r2) { return t2 !== null && t2.type === et.Number && Number(t2.value) === 0 ? 1 : e2(t2, n2, r2); }; } var dt, mt = { "ident-token": ut(et.Ident), "function-token": ut(et.Function), "at-keyword-token": ut(et.AtKeyword), "hash-token": ut(et.Hash), "string-token": ut(et.String), "bad-string-token": ut(et.BadString), "url-token": ut(et.Url), "bad-url-token": ut(et.BadUrl), "delim-token": ut(et.Delim), "number-token": ut(et.Number), "percentage-token": ut(et.Percentage), "dimension-token": ut(et.Dimension), "whitespace-token": ut(et.WhiteSpace), "CDO-token": ut(et.CDO), "CDC-token": ut(et.CDC), "colon-token": ut(et.Colon), "semicolon-token": ut(et.Semicolon), "comma-token": ut(et.Comma), "[-token": ut(et.LeftSquareBracket), "]-token": ut(et.RightSquareBracket), "(-token": ut(et.LeftParenthesis), ")-token": ut(et.RightParenthesis), "{-token": ut(et.LeftCurlyBracket), "}-token": ut(et.RightCurlyBracket), string: ut(et.String), ident: ut(et.Ident), "custom-ident": function(e2) { if (e2 === null || e2.type !== et.Ident) return 0; var t2 = e2.value.toLowerCase(); return at(t2, tt) || it2(t2, "default") ? 0 : 1; }, "custom-property-name": function(e2) { return e2 === null || e2.type !== et.Ident || rt(e2.value, 0) !== 45 || rt(e2.value, 1) !== 45 ? 0 : 1; }, "hex-color": function(e2) { if (e2 === null || e2.type !== et.Hash) return 0; var t2 = e2.value.length; if (t2 !== 4 && t2 !== 5 && t2 !== 7 && t2 !== 9) return 0; for (var n2 = 1; n2 < t2; n2++) if (!Xe(e2.value.charCodeAt(n2))) return 0; return 1; }, "id-selector": function(e2) { return e2 === null || e2.type !== et.Hash ? 0 : Qe(rt(e2.value, 1), rt(e2.value, 2), rt(e2.value, 3)) ? 1 : 0; }, "an-plus-b": function(e2, t2) { var n2 = 0; if (!e2) return 0; if (e2.type === Oe) return Re2(e2, 0, false, n2); if (e2.type === De && e2.value.charCodeAt(0) === 45) { if (!Ae(e2.value, 1, 110)) return 0; switch (e2.value.length) { case 2: return Me(t2(++n2), n2, t2); case 3: return e2.value.charCodeAt(2) !== 45 ? 0 : (n2 = Ne(t2(++n2), n2, t2), Re2(e2 = t2(n2), 0, true, n2)); default: return e2.value.charCodeAt(2) !== 45 ? 0 : Re2(e2, 3, true, n2); } } else if (e2.type === De || Ie(e2, 43) && t2(n2 + 1).type === De) { if (e2.type !== De && (e2 = t2(++n2)), e2 === null || !Ae(e2.value, 0, 110)) return 0; switch (e2.value.length) { case 1: return Me(t2(++n2), n2, t2); case 2: return e2.value.charCodeAt(1) !== 45 ? 0 : (n2 = Ne(t2(++n2), n2, t2), Re2(e2 = t2(n2), 0, true, n2)); default: return e2.value.charCodeAt(1) !== 45 ? 0 : Re2(e2, 2, true, n2); } } else if (e2.type === Be) { for (var r2 = e2.value.charCodeAt(0), i2 = r2 === 43 || r2 === 45 ? 1 : 0, a2 = i2; a2 < e2.value.length && ze(e2.value.charCodeAt(a2)); a2++) ; return a2 === i2 ? 0 : Ae(e2.value, a2, 110) ? a2 + 1 === e2.value.length ? Me(t2(++n2), n2, t2) : e2.value.charCodeAt(a2 + 1) !== 45 ? 0 : a2 + 2 === e2.value.length ? (n2 = Ne(t2(++n2), n2, t2), Re2(e2 = t2(n2), 0, true, n2)) : Re2(e2, a2 + 2, true, n2) : 0; } return 0; }, urange: function(e2, t2) { var n2 = 0; if (e2 === null || e2.type !== We || !_e(e2.value, 0, 117)) return 0; if ((e2 = t2(++n2)) === null) return 0; if (He(e2, 43)) return (e2 = t2(++n2)) === null ? 0 : e2.type === We ? Ge(Ke(e2, 0, true), ++n2, t2) : He(e2, 63) ? Ge(1, ++n2, t2) : 0; if (e2.type === Ye) { if (!Ve(e2, 43)) return 0; var r2 = Ke(e2, 1, true); return r2 === 0 ? 0 : (e2 = t2(++n2)) === null ? n2 : e2.type === Ue || e2.type === Ye ? Ve(e2, 45) && Ke(e2, 1, false) ? n2 + 1 : 0 : Ge(r2, n2, t2); } return e2.type === Ue && Ve(e2, 43) ? Ge(Ke(e2, 1, true), ++n2, t2) : 0; }, "declaration-value": function(e2, t2) { if (!e2) return 0; var n2 = 0, r2 = 0, i2 = e2.index; e: do { switch (e2.type) { case et.BadString: case et.BadUrl: break e; case et.RightCurlyBracket: case et.RightParenthesis: case et.RightSquareBracket: if (e2.balance > e2.index || e2.balance < i2) break e; r2--; break; case et.Semicolon: if (r2 === 0) break e; break; case et.Delim: if (e2.value === "!" && r2 === 0) break e; break; case et.Function: case et.LeftParenthesis: case et.LeftSquareBracket: case et.LeftCurlyBracket: r2++; } if (n2++, e2.balance <= i2) break; } while (e2 = t2(n2)); return n2; }, "any-value": function(e2, t2) { if (!e2) return 0; var n2 = e2.index, r2 = 0; e: do { switch (e2.type) { case et.BadString: case et.BadUrl: break e; case et.RightCurlyBracket: case et.RightParenthesis: case et.RightSquareBracket: if (e2.balance > e2.index || e2.balance < n2) break e; } if (r2++, e2.balance <= n2) break; } while (e2 = t2(r2)); return r2; }, dimension: ct(ht(null)), angle: ct(ht({ deg: true, grad: true, rad: true, turn: true })), decibel: ct(ht({ db: true })), frequency: ct(ht({ hz: true, khz: true })), flex: ct(ht({ fr: true })), length: ct(pt(ht({ px: true, mm: true, cm: true, in: true, pt: true, pc: true, q: true, em: true, ex: true, ch: true, rem: true, vh: true, vw: true, vmin: true, vmax: true, vm: true }))), resolution: ct(ht({ dpi: true, dpcm: true, dppx: true, x: true })), semitones: ct(ht({ st: true })), time: ct(ht({ s: true, ms: true })), percentage: ct(function(e2, t2, n2) { return e2 === null || e2.type !== et.Percentage || st(n2, e2.value, e2.value.length - 1) ? 0 : 1; }), zero: pt(), number: ct(function(e2, t2, n2) { if (e2 === null) return 0; var r2 = Je(e2.value, 0); return r2 === e2.value.length || ot(e2.value, r2) ? st(n2, e2.value, r2) ? 0 : 1 : 0; }), integer: ct(function(e2, t2, n2) { if (e2 === null || e2.type !== et.Number) return 0; for (var r2 = e2.value.charCodeAt(0) === 43 || e2.value.charCodeAt(0) === 45 ? 1 : 0; r2 < e2.value.length; r2++) if (!Ze(e2.value.charCodeAt(r2))) return 0; return st(n2, e2.value, r2) ? 0 : 1; }), "-ms-legacy-expression": (dt = "expression", dt += "(", function(e2, t2) { return e2 !== null && it2(e2.value, dt) ? lt2(e2, t2) : 0; }) }, gt2 = function(e2, t2, n2) { var r2 = o("SyntaxError", e2); return r2.input = t2, r2.offset = n2, r2.rawMessage = e2, r2.message = r2.rawMessage + "\n " + r2.input + "\n--" + new Array((r2.offset || r2.input.length) + 1).join("-") + "^", r2; }, ft = function(e2) { this.str = e2, this.pos = 0; }; ft.prototype = { charCodeAt: function(e2) { return e2 < this.str.length ? this.str.charCodeAt(e2) : 0; }, charCode: function() { return this.charCodeAt(this.pos); }, nextCharCode: function() { return this.charCodeAt(this.pos + 1); }, nextNonWsCode: function(e2) { return this.charCodeAt(this.findWsEnd(e2)); }, findWsEnd: function(e2) { for (; e2 < this.str.length; e2++) { var t2 = this.str.charCodeAt(e2); if (t2 !== 13 && t2 !== 10 && t2 !== 12 && t2 !== 32 && t2 !== 9) break; } return e2; }, substringToPos: function(e2) { return this.str.substring(this.pos, this.pos = e2); }, eat: function(e2) { this.charCode() !== e2 && this.error("Expect `" + String.fromCharCode(e2) + "`"), this.pos++; }, peek: function() { return this.pos < this.str.length ? this.str.charAt(this.pos++) : ""; }, error: function(e2) { throw new gt2(e2, this.str, this.pos); } }; var bt = ft, yt = function(e2) { for (var t2 = typeof Uint32Array == "function" ? new Uint32Array(128) : new Array(128), n2 = 0; n2 < 128; n2++) t2[n2] = e2(String.fromCharCode(n2)) ? 1 : 0; return t2; }(function(e2) { return /[a-zA-Z0-9\-]/.test(e2); }), kt = { " ": 1, "&&": 2, "||": 3, "|": 4 }; function vt(e2) { return e2.substringToPos(e2.findWsEnd(e2.pos)); } function xt(e2) { for (var t2 = e2.pos; t2 < e2.str.length; t2++) { var n2 = e2.str.charCodeAt(t2); if (n2 >= 128 || yt[n2] === 0) break; } return e2.pos === t2 && e2.error("Expect a keyword"), e2.substringToPos(t2); } function wt(e2) { for (var t2 = e2.pos; t2 < e2.str.length; t2++) { var n2 = e2.str.charCodeAt(t2); if (n2 < 48 || n2 > 57) break; } return e2.pos === t2 && e2.error("Expect a number"), e2.substringToPos(t2); } function St(e2) { var t2 = e2.str.indexOf("'", e2.pos + 1); return t2 === -1 && (e2.pos = e2.str.length, e2.error("Expect an apostrophe")), e2.substringToPos(t2 + 1); } function Ct(e2) { var t2, n2 = null; return e2.eat(123), t2 = wt(e2), e2.charCode() === 44 ? (e2.pos++, e2.charCode() !== 125 && (n2 = wt(e2))) : n2 = t2, e2.eat(125), { min: Number(t2), max: n2 ? Number(n2) : 0 }; } function zt(e2, t2) { var n2 = function(e3) { var t3 = null, n3 = false; switch (e3.charCode()) { case 42: e3.pos++, t3 = { min: 0, max: 0 }; break; case 43: e3.pos++, t3 = { min: 1, max: 0 }; break; case 63: e3.pos++, t3 = { min: 0, max: 1 }; break; case 35: e3.pos++, n3 = true, t3 = e3.charCode() === 123 ? Ct(e3) : { min: 1, max: 0 }; break; case 123: t3 = Ct(e3); break; default: return null; } return { type: "Multiplier", comma: n3, min: t3.min, max: t3.max, term: null }; }(e2); return n2 !== null ? (n2.term = t2, n2) : t2; } function At(e2) { var t2 = e2.peek(); return t2 === "" ? null : { type: "Token", value: t2 }; } function Pt(e2) { var t2, n2 = null; return e2.eat(60), t2 = xt(e2), e2.charCode() === 40 && e2.nextCharCode() === 41 && (e2.pos += 2, t2 += "()"), e2.charCodeAt(e2.findWsEnd(e2.pos)) === 91 && (vt(e2), n2 = function(e3) { var t3 = null, n3 = null, r2 = 1; return e3.eat(91), e3.charCode() === 45 && (e3.peek(), r2 = -1), r2 == -1 && e3.charCode() === 8734 ? e3.peek() : t3 = r2 * Number(wt(e3)), vt(e3), e3.eat(44), vt(e3), e3.charCode() === 8734 ? e3.peek() : (r2 = 1, e3.charCode() === 45 && (e3.peek(), r2 = -1), n3 = r2 * Number(wt(e3))), e3.eat(93), t3 === null && n3 === null ? null : { type: "Range", min: t3, max: n3 }; }(e2)), e2.eat(62), zt(e2, { type: "Type", name: t2, opts: n2 }); } function Tt(e2, t2) { function n2(e3, t3) { return { type: "Group", terms: e3, combinator: t3, disallowEmpty: false, explicit: false }; } for (t2 = Object.keys(t2).sort(function(e3, t3) { return kt[e3] - kt[t3]; }); t2.length > 0; ) { for (var r2 = t2.shift(), i2 = 0, a2 = 0; i2 < e2.length; i2++) { var o2 = e2[i2]; o2.type === "Combinator" && (o2.value === r2 ? (a2 === -1 && (a2 = i2 - 1), e2.splice(i2, 1), i2--) : (a2 !== -1 && i2 - a2 > 1 && (e2.splice(a2, i2 - a2, n2(e2.slice(a2, i2), r2)), i2 = a2 + 1), a2 = -1)); } a2 !== -1 && t2.length && e2.splice(a2, i2 - a2, n2(e2.slice(a2, i2), r2)); } return r2; } function Lt2(e2) { for (var t2, n2 = [], r2 = {}, i2 = null, a2 = e2.pos; t2 = Et(e2); ) t2.type !== "Spaces" && (t2.type === "Combinator" ? (i2 !== null && i2.type !== "Combinator" || (e2.pos = a2, e2.error("Unexpected combinator")), r2[t2.value] = true) : i2 !== null && i2.type !== "Combinator" && (r2[" "] = true, n2.push({ type: "Combinator", value: " " })), n2.push(t2), i2 = t2, a2 = e2.pos); return i2 !== null && i2.type === "Combinator" && (e2.pos -= a2, e2.error("Unexpected combinator")), { type: "Group", terms: n2, combinator: Tt(n2, r2) || " ", disallowEmpty: false, explicit: false }; } function Et(e2) { var t2 = e2.charCode(); if (t2 < 128 && yt[t2] === 1) return function(e3) { var t3; return t3 = xt(e3), e3.charCode() === 40 ? (e3.pos++, { type: "Function", name: t3 }) : zt(e3, { type: "Keyword", name: t3 }); }(e2); switch (t2) { case 93: break; case 91: return zt(e2, function(e3) { var t3; return e3.eat(91), t3 = Lt2(e3), e3.eat(93), t3.explicit = true, e3.charCode() === 33 && (e3.pos++, t3.disallowEmpty = true), t3; }(e2)); case 60: return e2.nextCharCode() === 39 ? function(e3) { var t3; return e3.eat(60), e3.eat(39), t3 = xt(e3), e3.eat(39), e3.eat(62), zt(e3, { type: "Property", name: t3 }); }(e2) : Pt(e2); case 124: return { type: "Combinator", value: e2.substringToPos(e2.nextCharCode() === 124 ? e2.pos + 2 : e2.pos + 1) }; case 38: return e2.pos++, e2.eat(38), { type: "Combinator", value: "&&" }; case 44: return e2.pos++, { type: "Comma" }; case 39: return zt(e2, { type: "String", value: St(e2) }); case 32: case 9: case 10: case 13: case 12: return { type: "Spaces", value: vt(e2) }; case 64: return (t2 = e2.nextCharCode()) < 128 && yt[t2] === 1 ? (e2.pos++, { type: "AtKeyword", name: xt(e2) }) : At(e2); case 42: case 43: case 63: case 35: case 33: break; case 123: if ((t2 = e2.nextCharCode()) < 48 || t2 > 57) return At(e2); break; default: return At(e2); } } function Dt(e2) { var t2 = new bt(e2), n2 = Lt2(t2); return t2.pos !== e2.length && t2.error("Unexpected input"), n2.terms.length === 1 && n2.terms[0].type === "Group" && (n2 = n2.terms[0]), n2; } Dt("[a&&#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!"); var Ot = Dt, Bt = function() { }; function It(e2) { return typeof e2 == "function" ? e2 : Bt; } var Nt = function(e2, t2, n2) { var r2 = Bt, i2 = Bt; if (typeof t2 == "function" ? r2 = t2 : t2 && (r2 = It(t2.enter), i2 = It(t2.leave)), r2 === Bt && i2 === Bt) throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function"); !function e3(t3) { switch (r2.call(n2, t3), t3.type) { case "Group": t3.terms.forEach(e3); break; case "Multiplier": e3(t3.term); break; case "Type": case "Property": case "Keyword": case "AtKeyword": case "Function": case "String": case "Token": case "Comma": break; default: throw new Error("Unknown type: " + t3.type); } i2.call(n2, t3); }(e2); }, Rt = new H(), Mt = { decorator: function(e2) { var t2 = null, n2 = { len: 0, node: null }, r2 = [n2], i2 = ""; return { children: e2.children, node: function(n3) { var r3 = t2; t2 = n3, e2.node.call(this, n3), t2 = r3; }, chunk: function(e3) { i2 += e3, n2.node !== t2 ? r2.push({ len: e3.length, node: t2 }) : n2.len += e3.length; }, result: function() { return jt(i2, r2); } }; } }; function jt(e2, t2) { var n2 = [], r2 = 0, i2 = 0, a2 = t2 ? t2[i2].node : null; for (Ce(e2, Rt); !Rt.eof; ) { if (t2) for (; i2 < t2.length && r2 + t2[i2].len <= Rt.tokenStart; ) r2 += t2[i2++].len, a2 = t2[i2].node; n2.push({ type: Rt.tokenType, value: Rt.getTokenValue(), index: Rt.tokenIndex, balance: Rt.balance[Rt.tokenIndex], node: a2 }), Rt.next(); } return n2; } var _t = { type: "Match" }, Ft = { type: "Mismatch" }, Wt = { type: "DisallowEmpty" }; function qt(e2, t2, n2) { return t2 === _t && n2 === Ft || e2 === _t && t2 === _t && n2 === _t ? e2 : (e2.type === "If" && e2.else === Ft && t2 === _t && (t2 = e2.then, e2 = e2.match), { type: "If", match: e2, then: t2, else: n2 }); } function Yt(e2) { return e2.length > 2 && e2.charCodeAt(e2.length - 2) === 40 && e2.charCodeAt(e2.length - 1) === 41; } function Ut(e2) { return e2.type === "Keyword" || e2.type === "AtKeyword" || e2.type === "Function" || e2.type === "Type" && Yt(e2.name); } function Ht(e2) { if (typeof e2 == "function") return { type: "Generic", fn: e2 }; switch (e2.type) { case "Group": var t2 = function e3(t3, n2, r2) { switch (t3) { case " ": for (var i2 = _t, a2 = n2.length - 1; a2 >= 0; a2--) { i2 = qt(l2 = n2[a2], i2, Ft); } return i2; case "|": i2 = Ft; var o2 = null; for (a2 = n2.length - 1; a2 >= 0; a2--) { if (Ut(l2 = n2[a2]) && (o2 === null && a2 > 0 && Ut(n2[a2 - 1]) && (i2 = qt({ type: "Enum", map: o2 = Object.create(null) }, _t, i2)), o2 !== null)) { var s2 = (Yt(l2.name) ? l2.name.slice(0, -1) : l2.name).toLowerCase(); if (s2 in o2 == false) { o2[s2] = l2; continue; } } o2 = null, i2 = qt(l2, _t, i2); } return i2; case "&&": if (n2.length > 5) return { type: "MatchOnce", terms: n2, all: true }; for (i2 = Ft, a2 = n2.length - 1; a2 >= 0; a2--) { var l2 = n2[a2]; c2 = n2.length > 1 ? e3(t3, n2.filter(function(e4) { return e4 !== l2; }), false) : _t, i2 = qt(l2, c2, i2); } return i2; case "||": if (n2.length > 5) return { type: "MatchOnce", terms: n2, all: false }; for (i2 = r2 ? _t : Ft, a2 = n2.length - 1; a2 >= 0; a2--) { var c2; l2 = n2[a2]; c2 = n2.length > 1 ? e3(t3, n2.filter(function(e4) { return e4 !== l2; }), true) : _t, i2 = qt(l2, c2, i2); } return i2; } }(e2.combinator, e2.terms.map(Ht), false); return e2.disallowEmpty && (t2 = qt(t2, Wt, Ft)), t2; case "Multiplier": return function(e3) { var t3 = _t, n2 = Ht(e3.term); if (e3.max === 0) n2 = qt(n2, Wt, Ft), (t3 = qt(n2, null, Ft)).then = qt(_t, _t, t3), e3.comma && (t3.then.else = qt({ type: "Comma", syntax: e3 }, t3, Ft)); else for (var r2 = e3.min || 1; r2 <= e3.max; r2++) e3.comma && t3 !== _t && (t3 = qt({ type: "Comma", syntax: e3 }, t3, Ft)), t3 = qt(n2, qt(_t, _t, t3), Ft); if (e3.min === 0) t3 = qt(_t, _t, t3); else for (r2 = 0; r2 < e3.min - 1; r2++) e3.comma && t3 !== _t && (t3 = qt({ type: "Comma", syntax: e3 }, t3, Ft)), t3 = qt(n2, t3, Ft); return t3; }(e2); case "Type": case "Property": return { type: e2.type, name: e2.name, syntax: e2 }; case "Keyword": return { type: e2.type, name: e2.name.toLowerCase(), syntax: e2 }; case "AtKeyword": return { type: e2.type, name: "@" + e2.name.toLowerCase(), syntax: e2 }; case "Function": return { type: e2.type, name: e2.name.toLowerCase() + "(", syntax: e2 }; case "String": return e2.value.length === 3 ? { type: "Token", value: e2.value.charAt(1), syntax: e2 } : { type: e2.type, value: e2.value.substr(1, e2.value.length - 2).replace(/\\'/g, "'"), syntax: e2 }; case "Token": return { type: e2.type, value: e2.value, syntax: e2 }; case "Comma": return { type: e2.type, syntax: e2 }; default: throw new Error("Unknown node type:", e2.type); } } var Vt = _t, Kt = Ft, Gt2 = Wt, Qt = function(e2, t2) { return typeof e2 == "string" && (e2 = Ot(e2)), { type: "MatchGraph", match: Ht(e2), syntax: t2 || null, source: e2 }; }, Xt = Object.prototype.hasOwnProperty, Zt = Vt, $t = Kt, Jt = Gt2, en = h.TYPE; function tn(e2) { for (var t2 = null, n2 = null, r2 = e2; r2 !== null; ) n2 = r2.prev, r2.prev = t2, t2 = r2, r2 = n2; return t2; } function nn(e2, t2) { if (e2.length !== t2.length) return false; for (var n2 = 0; n2 < e2.length; n2++) { var r2 = e2.charCodeAt(n2); if (r2 >= 65 && r2 <= 90 && (r2 |= 32), r2 !== t2.charCodeAt(n2)) return false; } return true; } function rn(e2) { return e2 === null || (e2.type === en.Comma || e2.type === en.Function || e2.type === en.LeftParenthesis || e2.type === en.LeftSquareBracket || e2.type === en.LeftCurlyBracket || function(e3) { return e3.type === en.Delim && e3.value !== "?"; }(e2)); } function an(e2) { return e2 === null || (e2.type === en.RightParenthesis || e2.type === en.RightSquareBracket || e2.type === en.RightCurlyBracket || e2.type === en.Delim); } function on(e2, t2, n2) { function r2() { do { b2++, f2 = b2 < e2.length ? e2[b2] : null; } while (f2 !== null && (f2.type === en.WhiteSpace || f2.type === en.Comment)); } function i2(t3) { var n3 = b2 + t3; return n3 < e2.length ? e2[n3] : null; } function a2(e3, t3) { return { nextState: e3, matchStack: k2, syntaxStack: u2, thenStack: h2, tokenIndex: b2, prev: t3 }; } function o2(e3) { h2 = { nextState: e3, matchStack: k2, syntaxStack: u2, prev: h2 }; } function s2(e3) { p2 = a2(e3, p2); } function l2() { k2 = { type: 1, syntax: t2.syntax, token: f2, prev: k2 }, r2(), d2 = null, b2 > y2 && (y2 = b2); } function c2() { k2 = k2.type === 2 ? k2.prev : { type: 3, syntax: u2.syntax, token: k2.token, prev: k2 }, u2 = u2.prev; } var u2 = null, h2 = null, p2 = null, d2 = null, m2 = 0, g3 = null, f2 = null, b2 = -1, y2 = 0, k2 = { type: 0, syntax: null, token: null, prev: null }; for (r2(); g3 === null && ++m2 < 15e3; ) switch (t2.type) { case "Match": if (h2 === null) { if (f2 !== null && (b2 !== e2.length - 1 || f2.value !== "\\0" && f2.value !== "\\9")) { t2 = $t; break; } g3 = "Match"; break; } if ((t2 = h2.nextState) === Jt) { if (h2.matchStack === k2) { t2 = $t; break; } t2 = Zt; } for (; h2.syntaxStack !== u2; ) c2(); h2 = h2.prev; break; case "Mismatch": if (d2 !== null && d2 !== false) (p2 === null || b2 > p2.tokenIndex) && (p2 = d2, d2 = false); else if (p2 === null) { g3 = "Mismatch"; break; } t2 = p2.nextState, h2 = p2.thenStack, u2 = p2.syntaxStack, k2 = p2.matchStack, b2 = p2.tokenIndex, f2 = b2 < e2.length ? e2[b2] : null, p2 = p2.prev; break; case "MatchGraph": t2 = t2.match; break; case "If": t2.else !== $t && s2(t2.else), t2.then !== Zt && o2(t2.then), t2 = t2.match; break; case "MatchOnce": t2 = { type: "MatchOnceBuffer", syntax: t2, index: 0, mask: 0 }; break; case "MatchOnceBuffer": var v2 = t2.syntax.terms; if (t2.index === v2.length) { if (t2.mask === 0 || t2.syntax.all) { t2 = $t; break; } t2 = Zt; break; } if (t2.mask === (1 << v2.length) - 1) { t2 = Zt; break; } for (; t2.index < v2.length; t2.index++) { var x2 = 1 << t2.index; if ((t2.mask & x2) == 0) { s2(t2), o2({ type: "AddMatchOnce", syntax: t2.syntax, mask: t2.mask | x2 }), t2 = v2[t2.index++]; break; } } break; case "AddMatchOnce": t2 = { type: "MatchOnceBuffer", syntax: t2.syntax, index: 0, mask: t2.mask }; break; case "Enum": if (f2 !== null) { if ((A2 = f2.value.toLowerCase()).indexOf("\\") !== -1 && (A2 = A2.replace(/\\[09].*$/, "")), Xt.call(t2.map, A2)) { t2 = t2.map[A2]; break; } } t2 = $t; break; case "Generic": var w2 = u2 !== null ? u2.opts : null, S2 = b2 + Math.floor(t2.fn(f2, i2, w2)); if (!isNaN(S2) && S2 > b2) { for (; b2 < S2; ) l2(); t2 = Zt; } else t2 = $t; break; case "Type": case "Property": var C2 = t2.type === "Type" ? "types" : "properties", z2 = Xt.call(n2, C2) ? n2[C2][t2.name] : null; if (!z2 || !z2.match) throw new Error("Bad syntax reference: " + (t2.type === "Type" ? "<" + t2.name + ">" : "<'" + t2.name + "'>")); if (d2 !== false && f2 !== null && t2.type === "Type") { if (t2.name === "custom-ident" && f2.type === en.Ident || t2.name === "length" && f2.value === "0") { d2 === null && (d2 = a2(t2, p2)), t2 = $t; break; } } u2 = { syntax: t2.syntax, opts: t2.syntax.opts || u2 !== null && u2.opts || null, prev: u2 }, k2 = { type: 2, syntax: t2.syntax, token: k2.token, prev: k2 }, t2 = z2.match; break; case "Keyword": var A2 = t2.name; if (f2 !== null) { var P2 = f2.value; if (P2.indexOf("\\") !== -1 && (P2 = P2.replace(/\\[09].*$/, "")), nn(P2, A2)) { l2(), t2 = Zt; break; } } t2 = $t; break; case "AtKeyword": case "Function": if (f2 !== null && nn(f2.value, t2.name)) { l2(), t2 = Zt; break; } t2 = $t; break; case "Token": if (f2 !== null && f2.value === t2.value) { l2(), t2 = Zt; break; } t2 = $t; break; case "Comma": f2 !== null && f2.type === en.Comma ? rn(k2.token) ? t2 = $t : (l2(), t2 = an(f2) ? $t : Zt) : t2 = rn(k2.token) || an(f2) ? Zt : $t; break; case "String": var T2 = ""; for (S2 = b2; S2 < e2.length && T2.length < t2.value.length; S2++) T2 += e2[S2].value; if (nn(T2, t2.value)) { for (; b2 < S2; ) l2(); t2 = Zt; } else t2 = $t; break; default: throw new Error("Unknown node type: " + t2.type); } switch (g3) { case null: console.warn("[csstree-match] BREAK after 15000 iterations"), g3 = "Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)", k2 = null; break; case "Match": for (; u2 !== null; ) c2(); break; default: k2 = null; } return { tokens: e2, reason: g3, iterations: m2, match: k2, longestMatch: y2 }; } var sn = function(e2, t2, n2) { var r2 = on(e2, t2, n2 || {}); if (r2.match === null) return r2; var i2 = r2.match, a2 = r2.match = { syntax: t2.syntax || null, match: [] }, o2 = [a2]; for (i2 = tn(i2).prev; i2 !== null; ) { switch (i2.type) { case 2: a2.match.push(a2 = { syntax: i2.syntax, match: [] }), o2.push(a2); break; case 3: o2.pop(), a2 = o2[o2.length - 1]; break; default: a2.match.push({ syntax: i2.syntax || null, token: i2.token.value, node: i2.token.node }); } i2 = i2.prev; } return r2; }; function ln(e2) { function t2(e3) { return e3 !== null && (e3.type === "Type" || e3.type === "Property" || e3.type === "Keyword"); } var n2 = null; return this.matched !== null && function r2(i2) { if (Array.isArray(i2.match)) { for (var a2 = 0; a2 < i2.match.length; a2++) if (r2(i2.match[a2])) return t2(i2.syntax) && n2.unshift(i2.syntax), true; } else if (i2.node === e2) return n2 = t2(i2.syntax) ? [i2.syntax] : [], true; return false; }(this.matched), n2; } function cn(e2, t2, n2) { var r2 = ln.call(e2, t2); return r2 !== null && r2.some(n2); } var un = { getTrace: ln, isType: function(e2, t2) { return cn(this, e2, function(e3) { return e3.type === "Type" && e3.name === t2; }); }, isProperty: function(e2, t2) { return cn(this, e2, function(e3) { return e3.type === "Property" && e3.name === t2; }); }, isKeyword: function(e2) { return cn(this, e2, function(e3) { return e3.type === "Keyword"; }); } }; var hn = { matchFragments: function(e2, t2, n2, r2, i2) { var o2 = []; return n2.matched !== null && function n3(s2) { if (s2.syntax !== null && s2.syntax.type === r2 && s2.syntax.name === i2) { var l2 = function e3(t3) { return "node" in t3 ? t3.node : e3(t3.match[0]); }(s2), c2 = function e3(t3) { return "node" in t3 ? t3.node : e3(t3.match[t3.match.length - 1]); }(s2); e2.syntax.walk(t2, function(e3, t3, n4) { if (e3 === l2) { var r3 = new a(); do { if (r3.appendData(t3.data), t3.data === c2) break; t3 = t3.next; } while (t3 !== null); o2.push({ parent: n4, nodes: r3 }); } }); } Array.isArray(s2.match) && s2.match.forEach(n3); }(n2.matched), o2; } }, pn = Object.prototype.hasOwnProperty; function dn(e2) { return typeof e2 == "number" && isFinite(e2) && Math.floor(e2) === e2 && e2 >= 0; } function mn(e2) { return Boolean(e2) && dn(e2.offset) && dn(e2.line) && dn(e2.column); } function gn(e2, t2) { return function(n2, r2) { if (!n2 || n2.constructor !== Object) return r2(n2, "Type of node should be an Object"); for (var i2 in n2) { var o2 = true; if (pn.call(n2, i2) !== false) { if (i2 === "type") n2.type !== e2 && r2(n2, "Wrong node type `" + n2.type + "`, expected `" + e2 + "`"); else if (i2 === "loc") { if (n2.loc === null) continue; if (n2.loc && n2.loc.constructor === Object) if (typeof n2.loc.source != "string") i2 += ".source"; else if (mn(n2.loc.start)) { if (mn(n2.loc.end)) continue; i2 += ".end"; } else i2 += ".start"; o2 = false; } else if (t2.hasOwnProperty(i2)) { var s2 = 0; for (o2 = false; !o2 && s2 < t2[i2].length; s2++) { var l2 = t2[i2][s2]; switch (l2) { case String: o2 = typeof n2[i2] == "string"; break; case Boolean: o2 = typeof n2[i2] == "boolean"; break; case null: o2 = n2[i2] === null; break; default: typeof l2 == "string" ? o2 = n2[i2] && n2[i2].type === l2 : Array.isArray(l2) && (o2 = n2[i2] instanceof a); } } } else r2(n2, "Unknown field `" + i2 + "` for " + e2 + " node type"); o2 || r2(n2, "Bad value for `" + e2 + "." + i2 + "`"); } } for (var i2 in t2) pn.call(t2, i2) && pn.call(n2, i2) === false && r2(n2, "Field `" + e2 + "." + i2 + "` is missed"); }; } function fn(e2, t2) { var n2 = t2.structure, r2 = { type: String, loc: true }, i2 = { type: '"' + e2 + '"' }; for (var a2 in n2) if (pn.call(n2, a2) !== false) { for (var o2 = [], s2 = r2[a2] = Array.isArray(n2[a2]) ? n2[a2].slice() : [n2[a2]], l2 = 0; l2 < s2.length; l2++) { var c2 = s2[l2]; if (c2 === String || c2 === Boolean) o2.push(c2.name); else if (c2 === null) o2.push("null"); else if (typeof c2 == "string") o2.push("<" + c2 + ">"); else { if (!Array.isArray(c2)) throw new Error("Wrong value `" + c2 + "` in `" + e2 + "." + a2 + "` structure definition"); o2.push("List"); } } i2[a2] = o2.join(" | "); } return { docs: i2, check: gn(e2, r2) }; } var bn = $, yn = J, kn = Qt, vn = sn, xn = function(e2) { var t2 = {}; if (e2.node) { for (var n2 in e2.node) if (pn.call(e2.node, n2)) { var r2 = e2.node[n2]; if (!r2.structure) throw new Error("Missed `structure` field in `" + n2 + "` node type definition"); t2[n2] = fn(n2, r2); } } return t2; }, wn = kn("inherit | initial | unset"), Sn = kn("inherit | initial | unset | <-ms-legacy-expression>"); function Cn(e2, t2, n2) { var r2 = {}; for (var i2 in e2) e2[i2].syntax && (r2[i2] = n2 ? e2[i2].syntax : G(e2[i2].syntax, { compact: t2 })); return r2; } function zn(e2, t2, n2) { const r2 = {}; for (const [i2, a2] of Object.entries(e2)) r2[i2] = { prelude: a2.prelude && (n2 ? a2.prelude.syntax : G(a2.prelude.syntax, { compact: t2 })), descriptors: a2.descriptors && Cn(a2.descriptors, t2, n2) }; return r2; } function An(e2, t2, n2) { return { matched: e2, iterations: n2, error: t2, getTrace: un.getTrace, isType: un.isType, isProperty: un.isProperty, isKeyword: un.isKeyword }; } function Pn(e2, t2, n2, r2) { var i2, a2 = function(e3, t3) { return typeof e3 == "string" ? jt(e3, null) : t3.generate(e3, Mt); }(n2, e2.syntax); return function(e3) { for (var t3 = 0; t3 < e3.length; t3++) if (e3[t3].value.toLowerCase() === "var(") return true; return false; }(a2) ? An(null, new Error("Matching for a tree with var() is not supported")) : (r2 && (i2 = vn(a2, e2.valueCommonSyntax, e2)), r2 && i2.match || (i2 = vn(a2, t2.match, e2)).match ? An(i2.match, null, i2.iterations) : An(null, new yn(i2.reason, t2.syntax, n2, i2), i2.iterations)); } var Tn = function(e2, t2, n2) { if (this.valueCommonSyntax = wn, this.syntax = t2, this.generic = false, this.atrules = {}, this.properties = {}, this.types = {}, this.structure = n2 || xn(e2), e2) { if (e2.types) for (var r2 in e2.types) this.addType_(r2, e2.types[r2]); if (e2.generic) for (var r2 in this.generic = true, mt) this.addType_(r2, mt[r2]); if (e2.atrules) for (var r2 in e2.atrules) this.addAtrule_(r2, e2.atrules[r2]); if (e2.properties) for (var r2 in e2.properties) this.addProperty_(r2, e2.properties[r2]); } }; Tn.prototype = { structure: {}, checkStructure: function(e2) { function t2(e3, t3) { r2.push({ node: e3, message: t3 }); } var n2 = this.structure, r2 = []; return this.syntax.walk(e2, function(e3) { n2.hasOwnProperty(e3.type) ? n2[e3.type].check(e3, t2) : t2(e3, "Unknown node type `" + e3.type + "`"); }), !!r2.length && r2; }, createDescriptor: function(e2, t2, n2, r2 = null) { var i2 = { type: t2, name: n2 }, a2 = { type: t2, name: n2, parent: r2, syntax: null, match: null }; return typeof e2 == "function" ? a2.match = kn(e2, i2) : (typeof e2 == "string" ? Object.defineProperty(a2, "syntax", { get: function() { return Object.defineProperty(a2, "syntax", { value: Ot(e2) }), a2.syntax; } }) : a2.syntax = e2, Object.defineProperty(a2, "match", { get: function() { return Object.defineProperty(a2, "match", { value: kn(a2.syntax, i2) }), a2.match; } })), a2; }, addAtrule_: function(e2, t2) { t2 && (this.atrules[e2] = { type: "Atrule", name: e2, prelude: t2.prelude ? this.createDescriptor(t2.prelude, "AtrulePrelude", e2) : null, descriptors: t2.descriptors ? Object.keys(t2.descriptors).reduce((n2, r2) => (n2[r2] = this.createDescriptor(t2.descriptors[r2], "AtruleDescriptor", r2, e2), n2), {}) : null }); }, addProperty_: function(e2, t2) { t2 && (this.properties[e2] = this.createDescriptor(t2, "Property", e2)); }, addType_: function(e2, t2) { t2 && (this.types[e2] = this.createDescriptor(t2, "Type", e2), t2 === mt["-ms-legacy-expression"] && (this.valueCommonSyntax = Sn)); }, checkAtruleName: function(e2) { if (!this.getAtrule(e2)) return new bn("Unknown at-rule", "@" + e2); }, checkAtrulePrelude: function(e2, t2) { let n2 = this.checkAtruleName(e2); if (n2) return n2; var r2 = this.getAtrule(e2); return !r2.prelude && t2 ? new SyntaxError("At-rule `@" + e2 + "` should not contain a prelude") : r2.prelude && !t2 ? new SyntaxError("At-rule `@" + e2 + "` should contain a prelude") : void 0; }, checkAtruleDescriptorName: function(e2, t2) { let n2 = this.checkAtruleName(e2); if (n2) return n2; var r2 = this.getAtrule(e2), i2 = ae.keyword(t2); return r2.descriptors ? r2.descriptors[i2.name] || r2.descriptors[i2.basename] ? void 0 : new bn("Unknown at-rule descriptor", t2) : new SyntaxError("At-rule `@" + e2 + "` has no known descriptors"); }, checkPropertyName: function(e2) { return ae.property(e2).custom ? new Error("Lexer matching doesn't applicable for custom properties") : this.getProperty(e2) ? void 0 : new bn("Unknown property", e2); }, matchAtrulePrelude: function(e2, t2) { var n2 = this.checkAtrulePrelude(e2, t2); return n2 ? An(null, n2) : t2 ? Pn(this, this.getAtrule(e2).prelude, t2, false) : An(null, null); }, matchAtruleDescriptor: function(e2, t2, n2) { var r2 = this.checkAtruleDescriptorName(e2, t2); if (r2) return An(null, r2); var i2 = this.getAtrule(e2), a2 = ae.keyword(t2); return Pn(this, i2.descriptors[a2.name] || i2.descriptors[a2.basename], n2, false); }, matchDeclaration: function(e2) { return e2.type !== "Declaration" ? An(null, new Error("Not a Declaration node")) : this.matchProperty(e2.property, e2.value); }, matchProperty: function(e2, t2) { var n2 = this.checkPropertyName(e2); return n2 ? An(null, n2) : Pn(this, this.getProperty(e2), t2, true); }, matchType: function(e2, t2) { var n2 = this.getType(e2); return n2 ? Pn(this, n2, t2, false) : An(null, new bn("Unknown type", e2)); }, match: function(e2, t2) { return typeof e2 == "string" || e2 && e2.type ? (typeof e2 != "string" && e2.match || (e2 = this.createDescriptor(e2, "Type", "anonymous")), Pn(this, e2, t2, false)) : An(null, new bn("Bad syntax")); }, findValueFragments: function(e2, t2, n2, r2) { return hn.matchFragments(this, t2, this.matchProperty(e2, t2), n2, r2); }, findDeclarationValueFragments: function(e2, t2, n2) { return hn.matchFragments(this, e2.value, this.matchDeclaration(e2), t2, n2); }, findAllFragments: function(e2, t2, n2) { var r2 = []; return this.syntax.walk(e2, { visit: "Declaration", enter: function(e3) { r2.push.apply(r2, this.findDeclarationValueFragments(e3, t2, n2)); }.bind(this) }), r2; }, getAtrule: function(e2, t2 = true) { var n2 = ae.keyword(e2); return (n2.vendor && t2 ? this.atrules[n2.name] || this.atrules[n2.basename] : this.atrules[n2.name]) || null; }, getAtrulePrelude: function(e2, t2 = true) { const n2 = this.getAtrule(e2, t2); return n2 && n2.prelude || null; }, getAtruleDescriptor: function(e2, t2) { return this.atrules.hasOwnProperty(e2) && this.atrules.declarators && this.atrules[e2].declarators[t2] || null; }, getProperty: function(e2, t2 = true) { var n2 = ae.property(e2); return (n2.vendor && t2 ? this.properties[n2.name] || this.properties[n2.basename] : this.properties[n2.name]) || null; }, getType: function(e2) { return this.types.hasOwnProperty(e2) ? this.types[e2] : null; }, validate: function() { function e2(r3, i2, a2, o2) { if (a2.hasOwnProperty(i2)) return a2[i2]; a2[i2] = false, o2.syntax !== null && Nt(o2.syntax, function(o3) { if (o3.type === "Type" || o3.type === "Property") { var s2 = o3.type === "Type" ? r3.types : r3.properties, l2 = o3.type === "Type" ? t2 : n2; s2.hasOwnProperty(o3.name) && !e2(r3, o3.name, l2, s2[o3.name]) || (a2[i2] = true); } }, this); } var t2 = {}, n2 = {}; for (var r2 in this.types) e2(this, r2, t2, this.types[r2]); for (var r2 in this.properties) e2(this, r2, n2, this.properties[r2]); return t2 = Object.keys(t2).filter(function(e3) { return t2[e3]; }), n2 = Object.keys(n2).filter(function(e3) { return n2[e3]; }), t2.length || n2.length ? { types: t2, properties: n2 } : null; }, dump: function(e2, t2) { return { generic: this.generic, types: Cn(this.types, !t2, e2), properties: Cn(this.properties, !t2, e2), atrules: zn(this.atrules, !t2, e2) }; }, toString: function() { return JSON.stringify(this.dump()); } }; var Ln = Tn, En = { SyntaxError: gt2, parse: Ot, generate: G, walk: Nt }, Dn = Ce.isBOM; var On = function() { this.lines = null, this.columns = null, this.linesAndColumnsComputed = false; }; On.prototype = { setSource: function(e2, t2, n2, r2) { this.source = e2, this.startOffset = t2 === void 0 ? 0 : t2, this.startLine = n2 === void 0 ? 1 : n2, this.startColumn = r2 === void 0 ? 1 : r2, this.linesAndColumnsComputed = false; }, ensureLinesAndColumnsComputed: function() { this.linesAndColumnsComputed || (!function(e2, t2) { for (var n2 = t2.length, r2 = se(e2.lines, n2), i2 = e2.startLine, a2 = se(e2.columns, n2), o2 = e2.startColumn, s2 = t2.length > 0 ? Dn(t2.charCodeAt(0)) : 0; s2 < n2; s2++) { var l2 = t2.charCodeAt(s2); r2[s2] = i2, a2[s2] = o2++, l2 !== 10 && l2 !== 13 && l2 !== 12 || (l2 === 13 && s2 + 1 < n2 && t2.charCodeAt(s2 + 1) === 10 && (r2[++s2] = i2, a2[s2] = o2), i2++, o2 = 1); } r2[s2] = i2, a2[s2] = o2, e2.lines = r2, e2.columns = a2; }(this, this.source), this.linesAndColumnsComputed = true); }, getLocation: function(e2, t2) { return this.ensureLinesAndColumnsComputed(), { source: t2, offset: this.startOffset + e2, line: this.lines[e2], column: this.columns[e2] }; }, getLocationRange: function(e2, t2, n2) { return this.ensureLinesAndColumnsComputed(), { source: n2, start: { offset: this.startOffset + e2, line: this.lines[e2], column: this.columns[e2] }, end: { offset: this.startOffset + t2, line: this.lines[t2], column: this.columns[t2] } }; } }; var Bn = On, In = Ce.TYPE, Nn = In.WhiteSpace, Rn = In.Comment, Mn = function(e2) { var t2 = this.createList(), n2 = null, r2 = { recognizer: e2, space: null, ignoreWS: false, ignoreWSAfter: false }; for (this.scanner.skipSC(); !this.scanner.eof; ) { switch (this.scanner.tokenType) { case Rn: this.scanner.next(); continue; case Nn: r2.ignoreWS ? this.scanner.next() : r2.space = this.WhiteSpace(); continue; } if ((n2 = e2.getNode.call(this, r2)) === void 0) break; r2.space !== null && (t2.push(r2.space), r2.space = null), t2.push(n2), r2.ignoreWSAfter ? (r2.ignoreWSAfter = false, r2.ignoreWS = true) : r2.ignoreWS = false; } return t2; }, { findWhiteSpaceStart: jn, cmpStr: _n } = M, Fn = function() { }, Wn = h.TYPE, qn = h.NAME, Yn = Wn.WhiteSpace, Un = Wn.Comment, Hn = Wn.Ident, Vn = Wn.Function, Kn = Wn.Url, Gn = Wn.Hash, Qn = Wn.Percentage, Xn = Wn.Number; function Zn(e2) { return function() { return this[e2](); }; } var $n = function(e2) { var t2 = { scanner: new H(), locationMap: new Bn(), filename: "", needPositions: false, onParseError: Fn, onParseErrorThrow: false, parseAtrulePrelude: true, parseRulePrelude: true, parseValue: true, parseCustomProperty: false, readSequence: Mn, createList: function() { return new a(); }, createSingleNodeList: function(e3) { return new a().appendData(e3); }, getFirstListNode: function(e3) { return e3 && e3.first(); }, getLastListNode: function(e3) { return e3.last(); }, parseWithFallback: function(e3, t3) { var n3 = this.scanner.tokenIndex; try { return e3.call(this); } catch (e4) { if (this.onParseErrorThrow) throw e4; var r2 = t3.call(this, n3); return this.onParseErrorThrow = true, this.onParseError(e4, r2), this.onParseErrorThrow = false, r2; } }, lookupNonWSType: function(e3) { do { var t3 = this.scanner.lookupType(e3++); if (t3 !== Yn) return t3; } while (t3 !== 0); return 0; }, eat: function(e3) { if (this.scanner.tokenType !== e3) { var t3 = this.scanner.tokenStart, n3 = qn[e3] + " is expected"; switch (e3) { case Hn: this.scanner.tokenType === Vn || this.scanner.tokenType === Kn ? (t3 = this.scanner.tokenEnd - 1, n3 = "Identifier is expected but function found") : n3 = "Identifier is expected"; break; case Gn: this.scanner.isDelim(35) && (this.scanner.next(), t3++, n3 = "Name is expected"); break; case Qn: this.scanner.tokenType === Xn && (t3 = this.scanner.tokenEnd, n3 = "Percent sign is expected"); break; default: this.scanner.source.charCodeAt(this.scanner.tokenStart) === e3 && (t3 += 1); } this.error(n3, t3); } this.scanner.next(); }, consume: function(e3) { var t3 = this.scanner.getTokenValue(); return this.eat(e3), t3; }, consumeFunctionName: function() { var e3 = this.scanner.source.substring(this.scanner.tokenStart, this.scanner.tokenEnd - 1); return this.eat(Vn), e3; }, getLocation: function(e3, t3) { return this.needPositions ? this.locationMap.getLocationRange(e3, t3, this.filename) : null; }, getLocationFromList: function(e3) { if (this.needPositions) { var t3 = this.getFirstListNode(e3), n3 = this.getLastListNode(e3); return this.locationMap.getLocationRange(t3 !== null ? t3.loc.start.offset - this.locationMap.startOffset : this.scanner.tokenStart, n3 !== null ? n3.loc.end.offset - this.locationMap.startOffset : this.scanner.tokenStart, this.filename); } return null; }, error: function(e3, t3) { var n3 = t3 !== void 0 && t3 < this.scanner.source.length ? this.locationMap.getLocation(t3) : this.scanner.eof ? this.locationMap.getLocation(jn(this.scanner.source, this.scanner.source.length - 1)) : this.locationMap.getLocation(this.scanner.tokenStart); throw new l(e3 || "Unexpected input", this.scanner.source, n3.offset, n3.line, n3.column); } }; for (var n2 in e2 = function(e3) { var t3 = { context: {}, scope: {}, atrule: {}, pseudo: {} }; if (e3.parseContext) for (var n3 in e3.parseContext) switch (typeof e3.parseContext[n3]) { case "function": t3.context[n3] = e3.parseContext[n3]; break; case "string": t3.context[n3] = Zn(e3.parseContext[n3]); } if (e3.scope) for (var n3 in e3.scope) t3.scope[n3] = e3.scope[n3]; if (e3.atrule) for (var n3 in e3.atrule) { var r2 = e3.atrule[n3]; r2.parse && (t3.atrule[n3] = r2.parse); } if (e3.pseudo) for (var n3 in e3.pseudo) { var i2 = e3.pseudo[n3]; i2.parse && (t3.pseudo[n3] = i2.parse); } if (e3.node) for (var n3 in e3.node) t3[n3] = e3.node[n3].parse; return t3; }(e2 || {})) t2[n2] = e2[n2]; return function(e3, n3) { var r2, i2 = (n3 = n3 || {}).context || "default", a2 = n3.onComment; if (Ce(e3, t2.scanner), t2.locationMap.setSource(e3, n3.offset, n3.line, n3.column), t2.filename = n3.filename || "", t2.needPositions = Boolean(n3.positions), t2.onParseError = typeof n3.onParseError == "function" ? n3.onParseError : Fn, t2.onParseErrorThrow = false, t2.parseAtrulePrelude = !("parseAtrulePrelude" in n3) || Boolean(n3.parseAtrulePrelude), t2.parseRulePrelude = !("parseRulePrelude" in n3) || Boolean(n3.parseRulePrelude), t2.parseValue = !("parseValue" in n3) || Boolean(n3.parseValue), t2.parseCustomProperty = "parseCustomProperty" in n3 && Boolean(n3.parseCustomProperty), !t2.context.hasOwnProperty(i2)) throw new Error("Unknown context `" + i2 + "`"); return typeof a2 == "function" && t2.scanner.forEachToken((n4, r3, i3) => { if (n4 === Un) { const n5 = t2.getLocation(r3, i3), o2 = _n(e3, i3 - 2, i3, "*/") ? e3.slice(r3 + 2, i3 - 2) : e3.slice(r3 + 2, i3); a2(o2, n5); } }), r2 = t2.context[i2].call(t2, n3), t2.scanner.eof || t2.error(), r2; }; }, Jn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), er = function(e2) { if (0 <= e2 && e2 < Jn.length) return Jn[e2]; throw new TypeError("Must be between 0 and 63: " + e2); }; var tr = function(e2) { var t2, n2 = "", r2 = function(e3) { return e3 < 0 ? 1 + (-e3 << 1) : 0 + (e3 << 1); }(e2); do { t2 = 31 & r2, (r2 >>>= 5) > 0 && (t2 |= 32), n2 += er(t2); } while (r2 > 0); return n2; }; var nr = function(e2, t2) { return e2(t2 = { exports: {} }, t2.exports), t2.exports; }(function(e2, t2) { t2.getArg = function(e3, t3, n3) { if (t3 in e3) return e3[t3]; if (arguments.length === 3) return n3; throw new Error('"' + t3 + '" is a required argument.'); }; var n2 = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, r2 = /^data:.+\,.+$/; function i2(e3) { var t3 = e3.match(n2); return t3 ? { scheme: t3[1], auth: t3[2], host: t3[3], port: t3[4], path: t3[5] } : null; } function a2(e3) { var t3 = ""; return e3.scheme && (t3 += e3.scheme + ":"), t3 += "//", e3.auth && (t3 += e3.auth + "@"), e3.host && (t3 += e3.host), e3.port && (t3 += ":" + e3.port), e3.path && (t3 += e3.path), t3; } function o2(e3) { var n3 = e3, r3 = i2(e3); if (r3) { if (!r3.path) return e3; n3 = r3.path; } for (var o3, s3 = t2.isAbsolute(n3), l3 = n3.split(/\/+/), c3 = 0, u3 = l3.length - 1; u3 >= 0; u3--) (o3 = l3[u3]) === "." ? l3.splice(u3, 1) : o3 === ".." ? c3++ : c3 > 0 && (o3 === "" ? (l3.splice(u3 + 1, c3), c3 = 0) : (l3.splice(u3, 2), c3--)); return (n3 = l3.join("/")) === "" && (n3 = s3 ? "/" : "."), r3 ? (r3.path = n3, a2(r3)) : n3; } function s2(e3, t3) { e3 === "" && (e3 = "."), t3 === "" && (t3 = "."); var n3 = i2(t3), s3 = i2(e3); if (s3 && (e3 = s3.path || "/"), n3 && !n3.scheme) return s3 && (n3.scheme = s3.scheme), a2(n3); if (n3 || t3.match(r2)) return t3; if (s3 && !s3.host && !s3.path) return s3.host = t3, a2(s3); var l3 = t3.charAt(0) === "/" ? t3 : o2(e3.replace(/\/+$/, "") + "/" + t3); return s3 ? (s3.path = l3, a2(s3)) : l3; } t2.urlParse = i2, t2.urlGenerate = a2, t2.normalize = o2, t2.join = s2, t2.isAbsolute = function(e3) { return e3.charAt(0) === "/" || n2.test(e3); }, t2.relative = function(e3, t3) { e3 === "" && (e3 = "."), e3 = e3.replace(/\/$/, ""); for (var n3 = 0; t3.indexOf(e3 + "/") !== 0; ) { var r3 = e3.lastIndexOf("/"); if (r3 < 0) return t3; if ((e3 = e3.slice(0, r3)).match(/^([^\/]+:\/)?\/*$/)) return t3; ++n3; } return Array(n3 + 1).join("../") + t3.substr(e3.length + 1); }; var l2 = !("__proto__" in Object.create(null)); function c2(e3) { return e3; } function u2(e3) { if (!e3) return false; var t3 = e3.length; if (t3 < 9) return false; if (e3.charCodeAt(t3 - 1) !== 95 || e3.charCodeAt(t3 - 2) !== 95 || e3.charCodeAt(t3 - 3) !== 111 || e3.charCodeAt(t3 - 4) !== 116 || e3.charCodeAt(t3 - 5) !== 111 || e3.charCodeAt(t3 - 6) !== 114 || e3.charCodeAt(t3 - 7) !== 112 || e3.charCodeAt(t3 - 8) !== 95 || e3.charCodeAt(t3 - 9) !== 95) return false; for (var n3 = t3 - 10; n3 >= 0; n3--) if (e3.charCodeAt(n3) !== 36) return false; return true; } function h2(e3, t3) { return e3 === t3 ? 0 : e3 === null ? 1 : t3 === null ? -1 : e3 > t3 ? 1 : -1; } t2.toSetString = l2 ? c2 : function(e3) { return u2(e3) ? "$" + e3 : e3; }, t2.fromSetString = l2 ? c2 : function(e3) { return u2(e3) ? e3.slice(1) : e3; }, t2.compareByOriginalPositions = function(e3, t3, n3) { var r3 = h2(e3.source, t3.source); return r3 !== 0 || (r3 = e3.originalLine - t3.originalLine) !== 0 || (r3 = e3.originalColumn - t3.originalColumn) !== 0 || n3 || (r3 = e3.generatedColumn - t3.generatedColumn) !== 0 || (r3 = e3.generatedLine - t3.generatedLine) !== 0 ? r3 : h2(e3.name, t3.name); }, t2.compareByGeneratedPositionsDeflated = function(e3, t3, n3) { var r3 = e3.generatedLine - t3.generatedLine; return r3 !== 0 || (r3 = e3.generatedColumn - t3.generatedColumn) !== 0 || n3 || (r3 = h2(e3.source, t3.source)) !== 0 || (r3 = e3.originalLine - t3.originalLine) !== 0 || (r3 = e3.originalColumn - t3.originalColumn) !== 0 ? r3 : h2(e3.name, t3.name); }, t2.compareByGeneratedPositionsInflated = function(e3, t3) { var n3 = e3.generatedLine - t3.generatedLine; return n3 !== 0 || (n3 = e3.generatedColumn - t3.generatedColumn) !== 0 || (n3 = h2(e3.source, t3.source)) !== 0 || (n3 = e3.originalLine - t3.originalLine) !== 0 || (n3 = e3.originalColumn - t3.originalColumn) !== 0 ? n3 : h2(e3.name, t3.name); }, t2.parseSourceMapInput = function(e3) { return JSON.parse(e3.replace(/^\)]}'[^\n]*\n/, "")); }, t2.computeSourceURL = function(e3, t3, n3) { if (t3 = t3 || "", e3 && (e3[e3.length - 1] !== "/" && t3[0] !== "/" && (e3 += "/"), t3 = e3 + t3), n3) { var r3 = i2(n3); if (!r3) throw new Error("sourceMapURL could not be parsed"); if (r3.path) { var l3 = r3.path.lastIndexOf("/"); l3 >= 0 && (r3.path = r3.path.substring(0, l3 + 1)); } t3 = s2(a2(r3), t3); } return o2(t3); }; }), rr = (nr.getArg, nr.urlParse, nr.urlGenerate, nr.normalize, nr.join, nr.isAbsolute, nr.relative, nr.toSetString, nr.fromSetString, nr.compareByOriginalPositions, nr.compareByGeneratedPositionsDeflated, nr.compareByGeneratedPositionsInflated, nr.parseSourceMapInput, nr.computeSourceURL, Object.prototype.hasOwnProperty), ir = typeof Map != "undefined"; function ar() { this._array = [], this._set = ir ? new Map() : Object.create(null); } ar.fromArray = function(e2, t2) { for (var n2 = new ar(), r2 = 0, i2 = e2.length; r2 < i2; r2++) n2.add(e2[r2], t2); return n2; }, ar.prototype.size = function() { return ir ? this._set.size : Object.getOwnPropertyNames(this._set).length; }, ar.prototype.add = function(e2, t2) { var n2 = ir ? e2 : nr.toSetString(e2), r2 = ir ? this.has(e2) : rr.call(this._set, n2), i2 = this._array.length; r2 && !t2 || this._array.push(e2), r2 || (ir ? this._set.set(e2, i2) : this._set[n2] = i2); }, ar.prototype.has = function(e2) { if (ir) return this._set.has(e2); var t2 = nr.toSetString(e2); return rr.call(this._set, t2); }, ar.prototype.indexOf = function(e2) { if (ir) { var t2 = this._set.get(e2); if (t2 >= 0) return t2; } else { var n2 = nr.toSetString(e2); if (rr.call(this._set, n2)) return this._set[n2]; } throw new Error('"' + e2 + '" is not in the set.'); }, ar.prototype.at = function(e2) { if (e2 >= 0 && e2 < this._array.length) return this._array[e2]; throw new Error("No element indexed by " + e2); }, ar.prototype.toArray = function() { return this._array.slice(); }; var or2 = { ArraySet: ar }; function sr() { this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 }; } sr.prototype.unsortedForEach = function(e2, t2) { this._array.forEach(e2, t2); }, sr.prototype.add = function(e2) { var t2, n2, r2, i2, a2, o2; t2 = this._last, n2 = e2, r2 = t2.generatedLine, i2 = n2.generatedLine, a2 = t2.generatedColumn, o2 = n2.generatedColumn, i2 > r2 || i2 == r2 && o2 >= a2 || nr.compareByGeneratedPositionsInflated(t2, n2) <= 0 ? (this._last = e2, this._array.push(e2)) : (this._sorted = false, this._array.push(e2)); }, sr.prototype.toArray = function() { return this._sorted || (this._array.sort(nr.compareByGeneratedPositionsInflated), this._sorted = true), this._array; }; var lr = or2.ArraySet, cr = { MappingList: sr }.MappingList; function ur(e2) { e2 || (e2 = {}), this._file = nr.getArg(e2, "file", null), this._sourceRoot = nr.getArg(e2, "sourceRoot", null), this._skipValidation = nr.getArg(e2, "skipValidation", false), this._sources = new lr(), this._names = new lr(), this._mappings = new cr(), this._sourcesContents = null; } ur.prototype._version = 3, ur.fromSourceMap = function(e2) { var t2 = e2.sourceRoot, n2 = new ur({ file: e2.file, sourceRoot: t2 }); return e2.eachMapping(function(e3) { var r2 = { generated: { line: e3.generatedLine, column: e3.generatedColumn } }; e3.source != null && (r2.source = e3.source, t2 != null && (r2.source = nr.relative(t2, r2.source)), r2.original = { line: e3.originalLine, column: e3.originalColumn }, e3.name != null && (r2.name = e3.name)), n2.addMapping(r2); }), e2.sources.forEach(function(r2) { var i2 = r2; t2 !== null && (i2 = nr.relative(t2, r2)), n2._sources.has(i2) || n2._sources.add(i2); var a2 = e2.sourceContentFor(r2); a2 != null && n2.setSourceContent(r2, a2); }), n2; }, ur.prototype.addMapping = function(e2) { var t2 = nr.getArg(e2, "generated"), n2 = nr.getArg(e2, "original", null), r2 = nr.getArg(e2, "source", null), i2 = nr.getArg(e2, "name", null); this._skipValidation || this._validateMapping(t2, n2, r2, i2), r2 != null && (r2 = String(r2), this._sources.has(r2) || this._sources.add(r2)), i2 != null && (i2 = String(i2), this._names.has(i2) || this._names.add(i2)), this._mappings.add({ generatedLine: t2.line, generatedColumn: t2.column, originalLine: n2 != null && n2.line, originalColumn: n2 != null && n2.column, source: r2, name: i2 }); }, ur.prototype.setSourceContent = function(e2, t2) { var n2 = e2; this._sourceRoot != null && (n2 = nr.relative(this._sourceRoot, n2)), t2 != null ? (this._sourcesContents || (this._sourcesContents = Object.create(null)), this._sourcesContents[nr.toSetString(n2)] = t2) : this._sourcesContents && (delete this._sourcesContents[nr.toSetString(n2)], Object.keys(this._sourcesContents).length === 0 && (this._sourcesContents = null)); }, ur.prototype.applySourceMap = function(e2, t2, n2) { var r2 = t2; if (t2 == null) { if (e2.file == null) throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`); r2 = e2.file; } var i2 = this._sourceRoot; i2 != null && (r2 = nr.relative(i2, r2)); var a2 = new lr(), o2 = new lr(); this._mappings.unsortedForEach(function(t3) { if (t3.source === r2 && t3.originalLine != null) { var s2 = e2.originalPositionFor({ line: t3.originalLine, column: t3.originalColumn }); s2.source != null && (t3.source = s2.source, n2 != null && (t3.source = nr.join(n2, t3.source)), i2 != null && (t3.source = nr.relative(i2, t3.source)), t3.originalLine = s2.line, t3.originalColumn = s2.column, s2.name != null && (t3.name = s2.name)); } var l2 = t3.source; l2 == null || a2.has(l2) || a2.add(l2); var c2 = t3.name; c2 == null || o2.has(c2) || o2.add(c2); }, this), this._sources = a2, this._names = o2, e2.sources.forEach(function(t3) { var r3 = e2.sourceContentFor(t3); r3 != null && (n2 != null && (t3 = nr.join(n2, t3)), i2 != null && (t3 = nr.relative(i2, t3)), this.setSourceContent(t3, r3)); }, this); }, ur.prototype._validateMapping = function(e2, t2, n2, r2) { if (t2 && typeof t2.line != "number" && typeof t2.column != "number") throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."); if ((!(e2 && "line" in e2 && "column" in e2 && e2.line > 0 && e2.column >= 0) || t2 || n2 || r2) && !(e2 && "line" in e2 && "column" in e2 && t2 && "line" in t2 && "column" in t2 && e2.line > 0 && e2.column >= 0 && t2.line > 0 && t2.column >= 0 && n2)) throw new Error("Invalid mapping: " + JSON.stringify({ generated: e2, source: n2, original: t2, name: r2 })); }, ur.prototype._serializeMappings = function() { for (var e2, t2, n2, r2, i2 = 0, a2 = 1, o2 = 0, s2 = 0, l2 = 0, c2 = 0, u2 = "", h2 = this._mappings.toArray(), p2 = 0, d2 = h2.length; p2 < d2; p2++) { if (e2 = "", (t2 = h2[p2]).generatedLine !== a2) for (i2 = 0; t2.generatedLine !== a2; ) e2 += ";", a2++; else if (p2 > 0) { if (!nr.compareByGeneratedPositionsInflated(t2, h2[p2 - 1])) continue; e2 += ","; } e2 += tr(t2.generatedColumn - i2), i2 = t2.generatedColumn, t2.source != null && (r2 = this._sources.indexOf(t2.source), e2 += tr(r2 - c2), c2 = r2, e2 += tr(t2.originalLine - 1 - s2), s2 = t2.originalLine - 1, e2 += tr(t2.originalColumn - o2), o2 = t2.originalColumn, t2.name != null && (n2 = this._names.indexOf(t2.name), e2 += tr(n2 - l2), l2 = n2)), u2 += e2; } return u2; }, ur.prototype._generateSourcesContent = function(e2, t2) { return e2.map(function(e3) { if (!this._sourcesContents) return null; t2 != null && (e3 = nr.relative(t2, e3)); var n2 = nr.toSetString(e3); return Object.prototype.hasOwnProperty.call(this._sourcesContents, n2) ? this._sourcesContents[n2] : null; }, this); }, ur.prototype.toJSON = function() { var e2 = { version: this._version, sources: this._sources.toArray(), names: this._names.toArray(), mappings: this._serializeMappings() }; return this._file != null && (e2.file = this._file), this._sourceRoot != null && (e2.sourceRoot = this._sourceRoot), this._sourcesContents && (e2.sourcesContent = this._generateSourcesContent(e2.sources, e2.sourceRoot)), e2; }, ur.prototype.toString = function() { return JSON.stringify(this.toJSON()); }; var hr = { SourceMapGenerator: ur }.SourceMapGenerator, pr2 = { Atrule: true, Selector: true, Declaration: true }, dr = Object.prototype.hasOwnProperty; function mr(e2, t2) { var n2 = e2.children, r2 = null; typeof t2 != "function" ? n2.forEach(this.node, this) : n2.forEach(function(e3) { r2 !== null && t2.call(this, r2), this.node(e3), r2 = e3; }, this); } var gr = function(e2) { function t2(e3) { if (!dr.call(n2, e3.type)) throw new Error("Unknown node type: " + e3.type); n2[e3.type].call(this, e3); } var n2 = {}; if (e2.node) for (var r2 in e2.node) n2[r2] = e2.node[r2].generate; return function(e3, n3) { var r3 = "", i2 = { children: mr, node: t2, chunk: function(e4) { r3 += e4; }, result: function() { return r3; } }; return n3 && (typeof n3.decorator == "function" && (i2 = n3.decorator(i2)), n3.sourceMap && (i2 = function(e4) { var t3 = new hr(), n4 = 1, r4 = 0, i3 = { line: 1, column: 0 }, a2 = { line: 0, column: 0 }, o2 = false, s2 = { line: 1, column: 0 }, l2 = { generated: s2 }, c2 = e4.node; e4.node = function(e5) { if (e5.loc && e5.loc.start && pr2.hasOwnProperty(e5.type)) { var u3 = e5.loc.start.line, h3 = e5.loc.start.column - 1; a2.line === u3 && a2.column === h3 || (a2.line = u3, a2.column = h3, i3.line = n4, i3.column = r4, o2 && (o2 = false, i3.line === s2.line && i3.column === s2.column || t3.addMapping(l2)), o2 = true, t3.addMapping({ source: e5.loc.source, original: a2, generated: i3 })); } c2.call(this, e5), o2 && pr2.hasOwnProperty(e5.type) && (s2.line = n4, s2.column = r4); }; var u2 = e4.chunk; e4.chunk = function(e5) { for (var t4 = 0; t4 < e5.length; t4++) e5.charCodeAt(t4) === 10 ? (n4++, r4 = 0) : r4++; u2(e5); }; var h2 = e4.result; return e4.result = function() { return o2 && t3.addMapping(l2), { css: h2(), map: t3 }; }, e4; }(i2))), i2.node(e3), i2.result(); }; }, fr = Object.prototype.hasOwnProperty, br = function() { }; function yr(e2) { return typeof e2 == "function" ? e2 : br; } function kr(e2, t2) { return function(n2, r2, i2) { n2.type === t2 && e2.call(this, n2, r2, i2); }; } function vr(e2, t2) { var n2 = t2.structure, r2 = []; for (var i2 in n2) if (fr.call(n2, i2) !== false) { var a2 = n2[i2], o2 = { name: i2, type: false, nullable: false }; Array.isArray(n2[i2]) || (a2 = [n2[i2]]); for (var s2 = 0; s2 < a2.length; s2++) { var l2 = a2[s2]; l2 === null ? o2.nullable = true : typeof l2 == "string" ? o2.type = "node" : Array.isArray(l2) && (o2.type = "list"); } o2.type && r2.push(o2); } return r2.length ? { context: t2.walkContext, fields: r2 } : null; } function xr(e2, t2) { var n2 = e2.fields.slice(), r2 = e2.context, i2 = typeof r2 == "string"; return t2 && n2.reverse(), function(e3, a2, o2, s2) { var l2; i2 && (l2 = a2[r2], a2[r2] = e3); for (var c2 = 0; c2 < n2.length; c2++) { var u2 = n2[c2], h2 = e3[u2.name]; if (!u2.nullable || h2) { if (u2.type === "list") { if (t2 ? h2.reduceRight(s2, false) : h2.reduce(s2, false)) return true; } else if (o2(h2)) return true; } } i2 && (a2[r2] = l2); }; } function wr2(e2) { return { Atrule: { StyleSheet: e2.StyleSheet, Atrule: e2.Atrule, Rule: e2.Rule, Block: e2.Block }, Rule: { StyleSheet: e2.StyleSheet, Atrule: e2.Atrule, Rule: e2.Rule, Block: e2.Block }, Declaration: { StyleSheet: e2.StyleSheet, Atrule: e2.Atrule, Rule: e2.Rule, Block: e2.Block, DeclarationList: e2.DeclarationList } }; } var Sr = function(e2) { var t2 = function(e3) { var t3 = {}; for (var n3 in e3.node) if (fr.call(e3.node, n3)) { var r3 = e3.node[n3]; if (!r3.structure) throw new Error("Missed `structure` field in `" + n3 + "` node type definition"); t3[n3] = vr(0, r3); } return t3; }(e2), n2 = {}, r2 = {}, i2 = Symbol("break-walk"), a2 = Symbol("skip-node"); for (var o2 in t2) fr.call(t2, o2) && t2[o2] !== null && (n2[o2] = xr(t2[o2], false), r2[o2] = xr(t2[o2], true)); var s2 = wr2(n2), l2 = wr2(r2), c2 = function(e3, o3) { function c3(e4, t3, n3) { var r3 = h2.call(m2, e4, t3, n3); return r3 === i2 || r3 !== a2 && (!(!d2.hasOwnProperty(e4.type) || !d2[e4.type](e4, m2, c3, u2)) || p2.call(m2, e4, t3, n3) === i2); } var u2 = (e4, t3, n3, r3) => e4 || c3(t3, n3, r3), h2 = br, p2 = br, d2 = n2, m2 = { break: i2, skip: a2, root: e3, stylesheet: null, atrule: null, atrulePrelude: null, rule: null, selector: null, block: null, declaration: null, function: null }; if (typeof o3 == "function") h2 = o3; else if (o3 && (h2 = yr(o3.enter), p2 = yr(o3.leave), o3.reverse && (d2 = r2), o3.visit)) { if (s2.hasOwnProperty(o3.visit)) d2 = o3.reverse ? l2[o3.visit] : s2[o3.visit]; else if (!t2.hasOwnProperty(o3.visit)) throw new Error("Bad value `" + o3.visit + "` for `visit` option (should be: " + Object.keys(t2).join(", ") + ")"); h2 = kr(h2, o3.visit), p2 = kr(p2, o3.visit); } if (h2 === br && p2 === br) throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function"); c3(e3); }; return c2.break = i2, c2.skip = a2, c2.find = function(e3, t3) { var n3 = null; return c2(e3, function(e4, r3, a3) { if (t3.call(this, e4, r3, a3)) return n3 = e4, i2; }), n3; }, c2.findLast = function(e3, t3) { var n3 = null; return c2(e3, { reverse: true, enter: function(e4, r3, a3) { if (t3.call(this, e4, r3, a3)) return n3 = e4, i2; } }), n3; }, c2.findAll = function(e3, t3) { var n3 = []; return c2(e3, function(e4, r3, i3) { t3.call(this, e4, r3, i3) && n3.push(e4); }), n3; }, c2; }, Cr = function e2(t2) { var n2 = {}; for (var r2 in t2) { var i2 = t2[r2]; i2 && (Array.isArray(i2) || i2 instanceof a ? i2 = i2.map(e2) : i2.constructor === Object && (i2 = e2(i2))), n2[r2] = i2; } return n2; }; const zr = Object.prototype.hasOwnProperty, Ar = { generic: true, types: Er, atrules: { prelude: Dr, descriptors: Dr }, properties: Er, parseContext: function(e2, t2) { return Object.assign(e2, t2); }, scope: function e2(t2, n2) { for (const r2 in n2) zr.call(n2, r2) && (Pr2(t2[r2]) ? e2(t2[r2], Tr(n2[r2])) : t2[r2] = Tr(n2[r2])); return t2; }, atrule: ["parse"], pseudo: ["parse"], node: ["name", "structure", "parse", "generate", "walkContext"] }; function Pr2(e2) { return e2 && e2.constructor === Object; } function Tr(e2) { return Pr2(e2) ? Object.assign({}, e2) : e2; } function Lr(e2, t2) { return typeof t2 == "string" && /^\s*\|/.test(t2) ? typeof e2 == "string" ? e2 + t2 : t2.replace(/^\s*\|\s*/, "") : t2 || null; } function Er(e2, t2) { if (typeof t2 == "string") return Lr(e2, t2); const n2 = Object.assign({}, e2); for (let r2 in t2) zr.call(t2, r2) && (n2[r2] = Lr(zr.call(e2, r2) ? e2[r2] : void 0, t2[r2])); return n2; } function Dr(e2, t2) { const n2 = Er(e2, t2); return !Pr2(n2) || Object.keys(n2).length ? n2 : null; } var Or2 = (e2, t2) => function e3(t3, n2, r2) { for (const i2 in r2) if (zr.call(r2, i2) !== false) { if (r2[i2] === true) i2 in n2 && zr.call(n2, i2) && (t3[i2] = Tr(n2[i2])); else if (r2[i2]) { if (typeof r2[i2] == "function") { const e4 = r2[i2]; t3[i2] = e4({}, t3[i2]), t3[i2] = e4(t3[i2] || {}, n2[i2]); } else if (Pr2(r2[i2])) { const a2 = {}; for (let n3 in t3[i2]) a2[n3] = e3({}, t3[i2][n3], r2[i2]); for (let t4 in n2[i2]) a2[t4] = e3(a2[t4] || {}, n2[i2][t4], r2[i2]); t3[i2] = a2; } else if (Array.isArray(r2[i2])) { const a2 = {}, o2 = r2[i2].reduce(function(e4, t4) { return e4[t4] = true, e4; }, {}); for (const [n3, r3] of Object.entries(t3[i2] || {})) a2[n3] = {}, r3 && e3(a2[n3], r3, o2); for (const t4 in n2[i2]) zr.call(n2[i2], t4) && (a2[t4] || (a2[t4] = {}), n2[i2] && n2[i2][t4] && e3(a2[t4], n2[i2][t4], o2)); t3[i2] = a2; } } } return t3; }(e2, t2, Ar); function Br(e2) { var t2 = $n(e2), n2 = Sr(e2), r2 = gr(e2), i2 = function(e3) { return { fromPlainObject: function(t3) { return e3(t3, { enter: function(e4) { e4.children && e4.children instanceof a == false && (e4.children = new a().fromArray(e4.children)); } }), t3; }, toPlainObject: function(t3) { return e3(t3, { leave: function(e4) { e4.children && e4.children instanceof a && (e4.children = e4.children.toArray()); } }), t3; } }; }(n2), o2 = { List: a, SyntaxError: l, TokenStream: H, Lexer: Ln, vendorPrefix: ae.vendorPrefix, keyword: ae.keyword, property: ae.property, isCustomProperty: ae.isCustomProperty, definitionSyntax: En, lexer: null, createLexer: function(e3) { return new Ln(e3, o2, o2.lexer.structure); }, tokenize: Ce, parse: t2, walk: n2, generate: r2, find: n2.find, findLast: n2.findLast, findAll: n2.findAll, clone: Cr, fromPlainObject: i2.fromPlainObject, toPlainObject: i2.toPlainObject, createSyntax: function(e3) { return Br(Or2({}, e3)); }, fork: function(t3) { var n3 = Or2({}, e2); return Br(typeof t3 == "function" ? t3(n3, Object.assign) : Or2(n3, t3)); } }; return o2.lexer = new Ln({ generic: true, types: e2.types, atrules: e2.atrules, properties: e2.properties, node: e2.node }, o2), o2; } var Ir = function(e2) { return Br(Or2({}, e2)); }, Nr = { generic: true, types: { "absolute-size": "xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large", "alpha-value": "|", "angle-percentage": "|", "angular-color-hint": "", "angular-color-stop": "&&?", "angular-color-stop-list": "[ [, ]?]# , ", "animateable-feature": "scroll-position|contents|", attachment: "scroll|fixed|local", "attr()": "attr( ? [, ]? )", "attr-matcher": "['~'|'|'|'^'|'$'|'*']? '='", "attr-modifier": "i|s", "attribute-selector": "'[' ']'|'[' [|] ? ']'", "auto-repeat": "repeat( [auto-fill|auto-fit] , [? ]+ ? )", "auto-track-list": "[? [|]]* ? [? [|]]* ?", "baseline-position": "[first|last]? baseline", "basic-shape": "||||", "bg-image": "none|", "bg-layer": "|| [/ ]?||||||||", "bg-position": "[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]", "bg-size": "[|auto]{1,2}|cover|contain", "blur()": "blur( )", "blend-mode": "normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity", box: "border-box|padding-box|content-box", "brightness()": "brightness( )", "calc()": "calc( )", "calc-sum": " [['+'|'-'] ]*", "calc-product": " ['*' |'/' ]*", "calc-value": "|||( )", "cf-final-image": "|", "cf-mixing-image": "?&&", "circle()": "circle( []? [at ]? )", "clamp()": "clamp( #{3} )", "class-selector": "'.' ", "clip-source": "", color: "||||||currentcolor|", "color-stop": "|", "color-stop-angle": "{1,2}", "color-stop-length": "{1,2}", "color-stop-list": "[ [, ]?]# , ", combinator: "'>'|'+'|'~'|['||']", "common-lig-values": "[common-ligatures|no-common-ligatures]", "compat-auto": "searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button", "composite-style": "clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor", "compositing-operator": "add|subtract|intersect|exclude", "compound-selector": "[? * [ *]*]!", "compound-selector-list": "#", "complex-selector": " [? ]*", "complex-selector-list": "#", "conic-gradient()": "conic-gradient( [from ]? [at ]? , )", "contextual-alt-values": "[contextual|no-contextual]", "content-distribution": "space-between|space-around|space-evenly|stretch", "content-list": "[|contents||||||counter( , <'list-style-type'>? )]+", "content-position": "center|start|end|flex-start|flex-end", "content-replacement": "", "contrast()": "contrast( [] )", "counter()": "counter( , ? )", "counter-style": "|symbols( )", "counter-style-name": "", "counters()": "counters( , , ? )", "cross-fade()": "cross-fade( , ? )", "cubic-bezier-timing-function": "ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )", "deprecated-system-color": "ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText", "discretionary-lig-values": "[discretionary-ligatures|no-discretionary-ligatures]", "display-box": "contents|none", "display-inside": "flow|flow-root|table|flex|grid|ruby", "display-internal": "table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container", "display-legacy": "inline-block|inline-list-item|inline-table|inline-flex|inline-grid", "display-listitem": "?&&[flow|flow-root]?&&list-item", "display-outside": "block|inline|run-in", "drop-shadow()": "drop-shadow( {2,3} ? )", "east-asian-variant-values": "[jis78|jis83|jis90|jis04|simplified|traditional]", "east-asian-width-values": "[full-width|proportional-width]", "element()": "element( , [first|start|last|first-except]? )|element( )", "ellipse()": "ellipse( [{2}]? [at ]? )", "ending-shape": "circle|ellipse", "env()": "env( , ? )", "explicit-track-list": "[? ]+ ?", "family-name": "|+", "feature-tag-value": " [|on|off]?", "feature-type": "@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation", "feature-value-block": " '{' '}'", "feature-value-block-list": "+", "feature-value-declaration": " : + ;", "feature-value-declaration-list": "", "feature-value-name": "", "fill-rule": "nonzero|evenodd", "filter-function": "|||||||||", "filter-function-list": "[|]+", "final-bg-layer": "<'background-color'>|||| [/ ]?||||||||", "fit-content()": "fit-content( [|] )", "fixed-breadth": "", "fixed-repeat": "repeat( [] , [? ]+ ? )", "fixed-size": "|minmax( , )|minmax( , )", "font-stretch-absolute": "normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|", "font-variant-css21": "[normal|small-caps]", "font-weight-absolute": "normal|bold|", "frequency-percentage": "|", "general-enclosed": "[ )]|( )", "generic-family": "serif|sans-serif|cursive|fantasy|monospace|-apple-system", "generic-name": "serif|sans-serif|cursive|fantasy|monospace", "geometry-box": "|fill-box|stroke-box|view-box", gradient: "|||||<-legacy-gradient>", "grayscale()": "grayscale( )", "grid-line": "auto||[&&?]|[span&&[||]]", "historical-lig-values": "[historical-ligatures|no-historical-ligatures]", "hsl()": "hsl( [/ ]? )|hsl( , , , ? )", "hsla()": "hsla( [/ ]? )|hsla( , , , ? )", hue: "|", "hue-rotate()": "hue-rotate( )", image: "||||||", "image()": "image( ? [? , ?]! )", "image-set()": "image-set( # )", "image-set-option": "[|] ", "image-src": "|", "image-tags": "ltr|rtl", "inflexible-breadth": "||min-content|max-content|auto", "inset()": "inset( {1,4} [round <'border-radius'>]? )", "invert()": "invert( )", "keyframes-name": "|", "keyframe-block": "# { }", "keyframe-block-list": "+", "keyframe-selector": "from|to|", "leader()": "leader( )", "leader-type": "dotted|solid|space|", "length-percentage": "|", "line-names": "'[' * ']'", "line-name-list": "[|]+", "line-style": "none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset", "line-width": "|thin|medium|thick", "linear-color-hint": "", "linear-color-stop": " ?", "linear-gradient()": "linear-gradient( [|to ]? , )", "mask-layer": "|| [/ ]?||||||[|no-clip]||||", "mask-position": "[|left|center|right] [|top|center|bottom]?", "mask-reference": "none||", "mask-source": "", "masking-mode": "alpha|luminance|match-source", "matrix()": "matrix( #{6} )", "matrix3d()": "matrix3d( #{16} )", "max()": "max( # )", "media-and": " [and ]+", "media-condition": "|||", "media-condition-without-or": "||", "media-feature": "( [||] )", "media-in-parens": "( )||", "media-not": "not ", "media-or": " [or ]+", "media-query": "|[not|only]? [and ]?", "media-query-list": "#", "media-type": "", "mf-boolean": "", "mf-name": "", "mf-plain": " : ", "mf-range": " ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ", "mf-value": "|||", "min()": "min( # )", "minmax()": "minmax( [||min-content|max-content|auto] , [|||min-content|max-content|auto] )", "named-color": "transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>", "namespace-prefix": "", "ns-prefix": "[|'*']? '|'", "number-percentage": "|", "numeric-figure-values": "[lining-nums|oldstyle-nums]", "numeric-fraction-values": "[diagonal-fractions|stacked-fractions]", "numeric-spacing-values": "[proportional-nums|tabular-nums]", nth: "|even|odd", "opacity()": "opacity( [] )", "overflow-position": "unsafe|safe", "outline-radius": "|", "page-body": "? [; ]?| ", "page-margin-box": " '{' '}'", "page-margin-box-type": "@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom", "page-selector-list": "[#]?", "page-selector": "+| *", "path()": "path( [ ,]? )", "paint()": "paint( , ? )", "perspective()": "perspective( )", "polygon()": "polygon( ? , [ ]# )", position: "[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]", "pseudo-class-selector": "':' |':' ')'", "pseudo-element-selector": "':' ", "pseudo-page": ": [left|right|first|blank]", quote: "open-quote|close-quote|no-open-quote|no-close-quote", "radial-gradient()": "radial-gradient( [||]? [at ]? , )", "relative-selector": "? ", "relative-selector-list": "#", "relative-size": "larger|smaller", "repeat-style": "repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}", "repeating-linear-gradient()": "repeating-linear-gradient( [|to ]? , )", "repeating-radial-gradient()": "repeating-radial-gradient( [||]? [at ]? , )", "rgb()": "rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )", "rgba()": "rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )", "rotate()": "rotate( [|] )", "rotate3d()": "rotate3d( , , , [|] )", "rotateX()": "rotateX( [|] )", "rotateY()": "rotateY( [|] )", "rotateZ()": "rotateZ( [|] )", "saturate()": "saturate( )", "scale()": "scale( , ? )", "scale3d()": "scale3d( , , )", "scaleX()": "scaleX( )", "scaleY()": "scaleY( )", "scaleZ()": "scaleZ( )", "self-position": "center|start|end|self-start|self-end|flex-start|flex-end", "shape-radius": "|closest-side|farthest-side", "skew()": "skew( [|] , [|]? )", "skewX()": "skewX( [|] )", "skewY()": "skewY( [|] )", "sepia()": "sepia( )", shadow: "inset?&&{2,4}&&?", "shadow-t": "[{2,3}&&?]", shape: "rect( , , , )|rect( )", "shape-box": "|margin-box", "side-or-corner": "[left|right]||[top|bottom]", "single-animation": "