Version Description
- 16 December 2021 =
- Basic Editor: Added a dark theme option.
- Ajax Saving: Resolved unintended slashes added during escaping.
Download this release
Release Info
Developer | SiteOrigin |
Plugin | SiteOrigin CSS |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.3 to 1.5.0
- css/admin.css +5 -1
- js/css.js +4051 -509
- js/css.min.js +8 -1
- js/editor.js +11 -2
- js/editor.min.js +1 -1
- lang/so-css.pot +44 -32
- lib/codemirror/theme/ambiance.css +74 -0
- readme.txt +6 -2
- so-css.php +15 -4
- tpl/page.php +93 -80
css/admin.css
CHANGED
@@ -127,8 +127,8 @@
|
|
127 |
margin-right: 340px;
|
128 |
}
|
129 |
#so-custom-css-info {
|
130 |
-
width: 315px;
|
131 |
float: right;
|
|
|
132 |
}
|
133 |
#so-custom-css-info *:first-child {
|
134 |
margin-top: 0;
|
@@ -144,6 +144,10 @@
|
|
144 |
min-height: 40px;
|
145 |
width: 100%;
|
146 |
}
|
|
|
|
|
|
|
|
|
147 |
#so-custom-css-revisions ol {
|
148 |
list-style: none;
|
149 |
margin: 0;
|
127 |
margin-right: 340px;
|
128 |
}
|
129 |
#so-custom-css-info {
|
|
|
130 |
float: right;
|
131 |
+
width: 315px;
|
132 |
}
|
133 |
#so-custom-css-info *:first-child {
|
134 |
margin-top: 0;
|
144 |
min-height: 40px;
|
145 |
width: 100%;
|
146 |
}
|
147 |
+
#so-custom-css-info #so_css_editor_theme {
|
148 |
+
margin-top: 6px;
|
149 |
+
width: 100%;
|
150 |
+
}
|
151 |
#so-custom-css-revisions ol {
|
152 |
list-style: none;
|
153 |
margin: 0;
|
js/css.js
CHANGED
@@ -1,6 +1,2027 @@
|
|
1 |
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
},{}],2:[function(require,module,exports){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
4 |
(function (process){
|
5 |
// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
|
6 |
// backported and transplited with Babel, with backwards-compat fixes
|
@@ -306,7 +2327,7 @@ var substr = 'ab'.substr(-1) === 'b'
|
|
306 |
;
|
307 |
|
308 |
}).call(this,require('_process'))
|
309 |
-
},{"_process":
|
310 |
// shim for using process in browser
|
311 |
var process = module.exports = {};
|
312 |
|
@@ -416,83 +2437,799 @@ function cleanUpNextTick() {
|
|
416 |
}
|
417 |
}
|
418 |
|
419 |
-
function drainQueue() {
|
420 |
-
if (draining) {
|
421 |
-
return;
|
422 |
-
}
|
423 |
-
var timeout = runTimeout(cleanUpNextTick);
|
424 |
-
draining = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
while (++queueIndex < len) {
|
431 |
-
if (currentQueue) {
|
432 |
-
currentQueue[queueIndex].run();
|
433 |
-
}
|
434 |
-
}
|
435 |
-
queueIndex = -1;
|
436 |
-
len = queue.length;
|
437 |
-
}
|
438 |
-
currentQueue = null;
|
439 |
-
draining = false;
|
440 |
-
runClearTimeout(timeout);
|
441 |
-
}
|
442 |
|
443 |
-
|
444 |
-
|
445 |
-
if (arguments.length > 1) {
|
446 |
-
for (var i = 1; i < arguments.length; i++) {
|
447 |
-
args[i - 1] = arguments[i];
|
448 |
-
}
|
449 |
-
}
|
450 |
-
queue.push(new Item(fun, args));
|
451 |
-
if (queue.length === 1 && !draining) {
|
452 |
-
runTimeout(drainQueue);
|
453 |
-
}
|
454 |
-
};
|
455 |
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
this.fun.apply(null, this.array);
|
463 |
};
|
464 |
-
process.title = 'browser';
|
465 |
-
process.browser = true;
|
466 |
-
process.env = {};
|
467 |
-
process.argv = [];
|
468 |
-
process.version = ''; // empty string to avoid regexp issues
|
469 |
-
process.versions = {};
|
470 |
|
471 |
-
function
|
|
|
|
|
|
|
|
|
|
|
472 |
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
|
|
|
|
482 |
|
483 |
-
|
484 |
|
485 |
-
|
486 |
-
|
|
|
487 |
};
|
488 |
|
489 |
-
|
490 |
-
|
491 |
-
throw new Error('process.chdir is not supported');
|
492 |
};
|
493 |
-
process.umask = function() { return 0; };
|
494 |
|
495 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
(function (setImmediate,clearImmediate){
|
497 |
var nextTick = require('process/browser.js').nextTick;
|
498 |
var apply = Function.prototype.apply;
|
@@ -564,22 +3301,822 @@ exports.setImmediate = typeof setImmediate === "function" ? setImmediate : funct
|
|
564 |
}
|
565 |
});
|
566 |
|
567 |
-
return id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
568 |
};
|
569 |
|
570 |
-
|
571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
};
|
573 |
-
|
574 |
-
},{"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
//This is for browserify to build the required CSS module into something we can use in the browser.
|
576 |
window.css = require('css');
|
577 |
|
578 |
-
},{"css":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
579 |
exports.parse = require('./lib/parse');
|
580 |
exports.stringify = require('./lib/stringify');
|
581 |
|
582 |
-
},{"./lib/parse":
|
583 |
// http://www.w3.org/TR/CSS21/grammar.html
|
584 |
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
|
585 |
var commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g
|
@@ -1184,7 +4721,7 @@ function addParent(obj, parent) {
|
|
1184 |
return obj;
|
1185 |
}
|
1186 |
|
1187 |
-
},{}],
|
1188 |
|
1189 |
/**
|
1190 |
* Expose `Compiler`.
|
@@ -1236,7 +4773,7 @@ Compiler.prototype.mapVisit = function(nodes, delim){
|
|
1236 |
return buf;
|
1237 |
};
|
1238 |
|
1239 |
-
},{}],
|
1240 |
|
1241 |
/**
|
1242 |
* Module dependencies.
|
@@ -1437,7 +4974,7 @@ Compiler.prototype.declaration = function(node){
|
|
1437 |
};
|
1438 |
|
1439 |
|
1440 |
-
},{"./compiler":
|
1441 |
|
1442 |
/**
|
1443 |
* Module dependencies.
|
@@ -1693,7 +5230,7 @@ Compiler.prototype.indent = function(level) {
|
|
1693 |
return Array(this.level).join(this.indentation || ' ');
|
1694 |
};
|
1695 |
|
1696 |
-
},{"./compiler":
|
1697 |
|
1698 |
/**
|
1699 |
* Module dependencies.
|
@@ -1742,7 +5279,7 @@ module.exports = function(node, options){
|
|
1742 |
return code;
|
1743 |
};
|
1744 |
|
1745 |
-
},{"./compress":
|
1746 |
|
1747 |
/**
|
1748 |
* Module dependencies.
|
@@ -1751,7 +5288,6 @@ module.exports = function(node, options){
|
|
1751 |
var SourceMap = require('source-map').SourceMapGenerator;
|
1752 |
var SourceMapConsumer = require('source-map').SourceMapConsumer;
|
1753 |
var sourceMapResolve = require('source-map-resolve');
|
1754 |
-
var urix = require('urix');
|
1755 |
var fs = require('fs');
|
1756 |
var path = require('path');
|
1757 |
|
@@ -1761,6 +5297,14 @@ var path = require('path');
|
|
1761 |
|
1762 |
module.exports = mixin;
|
1763 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1764 |
/**
|
1765 |
* Mixin source map support into `compiler`.
|
1766 |
*
|
@@ -1801,7 +5345,7 @@ exports.updatePosition = function(str) {
|
|
1801 |
|
1802 |
exports.emit = function(str, pos) {
|
1803 |
if (pos) {
|
1804 |
-
var sourceFile =
|
1805 |
|
1806 |
this.map.addMapping({
|
1807 |
source: sourceFile,
|
@@ -1852,7 +5396,7 @@ exports.applySourceMaps = function() {
|
|
1852 |
if (originalMap) {
|
1853 |
var map = new SourceMapConsumer(originalMap.map);
|
1854 |
var relativeTo = originalMap.sourcesRelativeTo;
|
1855 |
-
this.map.applySourceMap(map, file,
|
1856 |
}
|
1857 |
}
|
1858 |
}, this);
|
@@ -1870,7 +5414,103 @@ exports.comment = function(node) {
|
|
1870 |
return this._comment(node);
|
1871 |
};
|
1872 |
|
1873 |
-
},{"fs":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1874 |
if (typeof Object.create === 'function') {
|
1875 |
// implementation from standard node.js 'util' module
|
1876 |
module.exports = function inherits(ctor, superCtor) {
|
@@ -1899,467 +5539,388 @@ if (typeof Object.create === 'function') {
|
|
1899 |
}
|
1900 |
}
|
1901 |
|
1902 |
-
},{}],
|
1903 |
-
// Copyright 2014 Simon Lydell
|
1904 |
-
// X11 (“MIT”) Licensed. (See LICENSE.)
|
1905 |
-
|
1906 |
-
void (function(root, factory) {
|
1907 |
-
if (typeof define === "function" && define.amd) {
|
1908 |
-
define(factory)
|
1909 |
-
} else if (typeof exports === "object") {
|
1910 |
-
module.exports = factory()
|
1911 |
-
} else {
|
1912 |
-
root.resolveUrl = factory()
|
1913 |
-
}
|
1914 |
-
}(this, function() {
|
1915 |
-
|
1916 |
-
function resolveUrl(/* ...urls */) {
|
1917 |
-
var numUrls = arguments.length
|
1918 |
-
|
1919 |
-
if (numUrls === 0) {
|
1920 |
-
throw new Error("resolveUrl requires at least one argument; got none.")
|
1921 |
-
}
|
1922 |
-
|
1923 |
-
var base = document.createElement("base")
|
1924 |
-
base.href = arguments[0]
|
1925 |
-
|
1926 |
-
if (numUrls === 1) {
|
1927 |
-
return base.href
|
1928 |
-
}
|
1929 |
-
|
1930 |
-
var head = document.getElementsByTagName("head")[0]
|
1931 |
-
head.insertBefore(base, head.firstChild)
|
1932 |
-
|
1933 |
-
var a = document.createElement("a")
|
1934 |
-
var resolved
|
1935 |
-
|
1936 |
-
for (var index = 1; index < numUrls; index++) {
|
1937 |
-
a.href = arguments[index]
|
1938 |
-
resolved = a.href
|
1939 |
-
base.href = resolved
|
1940 |
-
}
|
1941 |
-
|
1942 |
-
head.removeChild(base)
|
1943 |
-
|
1944 |
-
return resolved
|
1945 |
-
}
|
1946 |
-
|
1947 |
-
return resolveUrl
|
1948 |
-
|
1949 |
-
}));
|
1950 |
-
|
1951 |
-
},{}],15:[function(require,module,exports){
|
1952 |
(function (setImmediate){
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
void (function(root, factory) {
|
1958 |
-
if (typeof define === "function" && define.amd) {
|
1959 |
-
define(["source-map-url", "resolve-url"], factory)
|
1960 |
-
} else if (typeof exports === "object") {
|
1961 |
-
var sourceMappingURL = require("source-map-url")
|
1962 |
-
var resolveUrl = require("resolve-url")
|
1963 |
-
module.exports = factory(sourceMappingURL, resolveUrl)
|
1964 |
-
} else {
|
1965 |
-
root.sourceMapResolve = factory(root.sourceMappingURL, root.resolveUrl)
|
1966 |
-
}
|
1967 |
-
}(this, function(sourceMappingURL, resolveUrl) {
|
1968 |
|
1969 |
-
function callbackAsync(callback, error, result) {
|
1970 |
-
setImmediate(function() { callback(error, result) })
|
1971 |
-
}
|
1972 |
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1980 |
}
|
|
|
1981 |
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
}
|
1990 |
}
|
|
|
|
|
1991 |
|
1992 |
|
|
|
1993 |
|
1994 |
-
|
1995 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1996 |
try {
|
1997 |
-
mapData =
|
1998 |
} catch (error) {
|
1999 |
-
return
|
2000 |
-
}
|
2001 |
-
if (!mapData || mapData.map) {
|
2002 |
-
return callbackAsync(callback, null, mapData)
|
2003 |
}
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
error.sourceMapData = mapData
|
2008 |
-
return callback(error)
|
2009 |
-
}
|
2010 |
-
mapData.map = String(result)
|
2011 |
-
try {
|
2012 |
-
mapData.map = parseMapToJSON(mapData.map, mapData)
|
2013 |
-
} catch (error) {
|
2014 |
-
return callback(error)
|
2015 |
-
}
|
2016 |
-
callback(null, mapData)
|
2017 |
-
})
|
2018 |
-
}
|
2019 |
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
return mapData
|
2024 |
-
}
|
2025 |
-
mapData.map = readSync(read, mapData.url, mapData)
|
2026 |
-
mapData.map = parseMapToJSON(mapData.map, mapData)
|
2027 |
return mapData
|
2028 |
}
|
|
|
|
|
|
|
|
|
2029 |
|
2030 |
-
|
2031 |
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
}
|
2056 |
-
return arr
|
2057 |
}
|
|
|
|
|
2058 |
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
}
|
2063 |
-
var buf = base64ToBuf(b64);
|
2064 |
-
// Note: `decoder.decode` method will throw a `DOMException` with the
|
2065 |
-
// `"EncodingError"` value when an coding error is found.
|
2066 |
-
var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true})
|
2067 |
-
return decoder.decode(buf);
|
2068 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2069 |
|
2070 |
-
|
2071 |
-
|
2072 |
-
if (!url) {
|
2073 |
-
return null
|
2074 |
-
}
|
2075 |
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
var encoded = dataUri[3] || ""
|
2081 |
-
var data = {
|
2082 |
-
sourceMappingURL: url,
|
2083 |
-
url: null,
|
2084 |
-
sourcesRelativeTo: codeUrl,
|
2085 |
-
map: encoded
|
2086 |
-
}
|
2087 |
-
if (!jsonMimeTypeRegex.test(mimeType)) {
|
2088 |
-
var error = new Error("Unuseful data uri mime type: " + mimeType)
|
2089 |
-
error.sourceMapData = data
|
2090 |
-
throw error
|
2091 |
-
}
|
2092 |
-
try {
|
2093 |
-
data.map = parseMapToJSON(
|
2094 |
-
lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded),
|
2095 |
-
data
|
2096 |
-
)
|
2097 |
-
} catch (error) {
|
2098 |
-
error.sourceMapData = data
|
2099 |
-
throw error
|
2100 |
-
}
|
2101 |
-
return data
|
2102 |
-
}
|
2103 |
|
2104 |
-
|
2105 |
-
|
|
|
|
|
|
|
|
|
2106 |
sourceMappingURL: url,
|
2107 |
-
url:
|
2108 |
-
sourcesRelativeTo:
|
2109 |
-
map:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2110 |
}
|
|
|
2111 |
}
|
2112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2113 |
|
2114 |
|
2115 |
-
function resolveSources(map, mapUrl, read, options, callback) {
|
2116 |
-
if (typeof options === "function") {
|
2117 |
-
callback = options
|
2118 |
-
options = {}
|
2119 |
-
}
|
2120 |
-
var pending = map.sources ? map.sources.length : 0
|
2121 |
-
var result = {
|
2122 |
-
sourcesResolved: [],
|
2123 |
-
sourcesContent: []
|
2124 |
-
}
|
2125 |
-
|
2126 |
-
if (pending === 0) {
|
2127 |
-
callbackAsync(callback, null, result)
|
2128 |
-
return
|
2129 |
-
}
|
2130 |
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
|
|
|
|
|
|
|
|
2137 |
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
result.sourcesContent[index] = sourceContent
|
2142 |
-
callbackAsync(done, null)
|
2143 |
-
} else {
|
2144 |
-
var readUrl = fullUrl
|
2145 |
-
read(readUrl, function(error, source) {
|
2146 |
-
result.sourcesContent[index] = error ? error : String(source)
|
2147 |
-
done()
|
2148 |
-
})
|
2149 |
-
}
|
2150 |
-
})
|
2151 |
}
|
2152 |
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
}
|
|
|
2158 |
|
2159 |
-
|
2160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2161 |
}
|
|
|
|
|
2162 |
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
} else {
|
2169 |
-
var readUrl = fullUrl
|
2170 |
-
try {
|
2171 |
-
result.sourcesContent[index] = String(read(readUrl))
|
2172 |
-
} catch (error) {
|
2173 |
-
result.sourcesContent[index] = error
|
2174 |
-
}
|
2175 |
-
}
|
2176 |
-
}
|
2177 |
-
})
|
2178 |
|
|
|
2179 |
return result
|
2180 |
}
|
2181 |
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
var sourceContent
|
2188 |
-
var sourceRoot
|
2189 |
-
for (var index = 0, len = map.sources.length; index < len; index++) {
|
2190 |
-
sourceRoot = null
|
2191 |
-
if (typeof options.sourceRoot === "string") {
|
2192 |
-
sourceRoot = options.sourceRoot
|
2193 |
-
} else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) {
|
2194 |
-
sourceRoot = map.sourceRoot
|
2195 |
-
}
|
2196 |
-
// If the sourceRoot is the empty string, it is equivalent to not setting
|
2197 |
-
// the property at all.
|
2198 |
-
if (sourceRoot === null || sourceRoot === '') {
|
2199 |
-
fullUrl = resolveUrl(mapUrl, map.sources[index])
|
2200 |
} else {
|
2201 |
-
|
2202 |
-
// `/scripts/subdir/<source>`, not `/scripts/<source>`. Pointing to a file as source root
|
2203 |
-
// does not make sense.
|
2204 |
-
fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index])
|
2205 |
-
}
|
2206 |
-
sourceContent = (map.sourcesContent || [])[index]
|
2207 |
-
fn(fullUrl, sourceContent, index)
|
2208 |
-
}
|
2209 |
-
}
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
function resolve(code, codeUrl, read, options, callback) {
|
2214 |
-
if (typeof options === "function") {
|
2215 |
-
callback = options
|
2216 |
-
options = {}
|
2217 |
-
}
|
2218 |
-
if (code === null) {
|
2219 |
-
var mapUrl = codeUrl
|
2220 |
-
var data = {
|
2221 |
-
sourceMappingURL: null,
|
2222 |
-
url: mapUrl,
|
2223 |
-
sourcesRelativeTo: mapUrl,
|
2224 |
-
map: null
|
2225 |
-
}
|
2226 |
-
var readUrl = mapUrl
|
2227 |
-
read(readUrl, function(error, result) {
|
2228 |
-
if (error) {
|
2229 |
-
error.sourceMapData = data
|
2230 |
-
return callback(error)
|
2231 |
-
}
|
2232 |
-
data.map = String(result)
|
2233 |
try {
|
2234 |
-
|
2235 |
} catch (error) {
|
2236 |
-
|
2237 |
}
|
2238 |
-
|
2239 |
-
})
|
2240 |
-
} else {
|
2241 |
-
resolveSourceMap(code, codeUrl, read, function(error, mapData) {
|
2242 |
-
if (error) {
|
2243 |
-
return callback(error)
|
2244 |
-
}
|
2245 |
-
if (!mapData) {
|
2246 |
-
return callback(null, null)
|
2247 |
-
}
|
2248 |
-
_resolveSources(mapData)
|
2249 |
-
})
|
2250 |
}
|
|
|
2251 |
|
2252 |
-
|
2253 |
-
|
2254 |
-
if (error) {
|
2255 |
-
return callback(error)
|
2256 |
-
}
|
2257 |
-
mapData.sourcesResolved = result.sourcesResolved
|
2258 |
-
mapData.sourcesContent = result.sourcesContent
|
2259 |
-
callback(null, mapData)
|
2260 |
-
})
|
2261 |
-
}
|
2262 |
-
}
|
2263 |
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2276 |
} else {
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
}
|
2282 |
-
|
2283 |
-
|
2284 |
-
mapData.sourcesContent = result.sourcesContent
|
2285 |
-
return mapData
|
2286 |
}
|
|
|
2287 |
|
2288 |
|
2289 |
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
resolveSourcesSync: resolveSourcesSync,
|
2295 |
-
resolve: resolve,
|
2296 |
-
resolveSync: resolveSync,
|
2297 |
-
parseMapToJSON: parseMapToJSON
|
2298 |
}
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2312 |
} else {
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
"(?:" + innerRegex.source + ")" +
|
2324 |
-
"\\s*" +
|
2325 |
-
"\\*/" +
|
2326 |
-
"|" +
|
2327 |
-
"//(?:" + innerRegex.source + ")" +
|
2328 |
-
")" +
|
2329 |
-
"\\s*"
|
2330 |
-
)
|
2331 |
-
|
2332 |
-
return {
|
2333 |
-
|
2334 |
-
regex: regex,
|
2335 |
-
_innerRegex: innerRegex,
|
2336 |
-
|
2337 |
-
getFrom: function(code) {
|
2338 |
-
var match = code.match(regex)
|
2339 |
-
return (match ? match[1] || match[2] || "" : null)
|
2340 |
-
},
|
2341 |
-
|
2342 |
-
existsIn: function(code) {
|
2343 |
-
return regex.test(code)
|
2344 |
-
},
|
2345 |
-
|
2346 |
-
removeFrom: function(code) {
|
2347 |
-
return code.replace(regex, "")
|
2348 |
-
},
|
2349 |
|
2350 |
-
|
2351 |
-
|
2352 |
-
if (
|
2353 |
-
return
|
2354 |
-
} else {
|
2355 |
-
return code + string
|
2356 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2357 |
}
|
2358 |
}
|
|
|
|
|
|
|
|
|
|
|
2359 |
|
2360 |
-
}));
|
2361 |
|
2362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2363 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2364 |
/*
|
2365 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -2482,7 +6043,7 @@ ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
2482 |
|
2483 |
exports.ArraySet = ArraySet;
|
2484 |
|
2485 |
-
},{"./util":
|
2486 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2487 |
/*
|
2488 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -2624,7 +6185,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
|
2624 |
aOutParam.rest = aIndex;
|
2625 |
};
|
2626 |
|
2627 |
-
},{"./base64":
|
2628 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2629 |
/*
|
2630 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -2693,7 +6254,7 @@ exports.decode = function (charCode) {
|
|
2693 |
return -1;
|
2694 |
};
|
2695 |
|
2696 |
-
},{}],
|
2697 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2698 |
/*
|
2699 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -2806,7 +6367,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
|
|
2806 |
return index;
|
2807 |
};
|
2808 |
|
2809 |
-
},{}],
|
2810 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2811 |
/*
|
2812 |
* Copyright 2014 Mozilla Foundation and contributors
|
@@ -2887,7 +6448,7 @@ MappingList.prototype.toArray = function MappingList_toArray() {
|
|
2887 |
|
2888 |
exports.MappingList = MappingList;
|
2889 |
|
2890 |
-
},{"./util":
|
2891 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2892 |
/*
|
2893 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -3003,7 +6564,7 @@ exports.quickSort = function (ary, comparator) {
|
|
3003 |
doQuickSort(ary, comparator, 0, ary.length - 1);
|
3004 |
};
|
3005 |
|
3006 |
-
},{}],
|
3007 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
3008 |
/*
|
3009 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -4150,7 +7711,7 @@ IndexedSourceMapConsumer.prototype._parseMappings =
|
|
4150 |
|
4151 |
exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
4152 |
|
4153 |
-
},{"./array-set":
|
4154 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
4155 |
/*
|
4156 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -4577,7 +8138,7 @@ SourceMapGenerator.prototype.toString =
|
|
4577 |
|
4578 |
exports.SourceMapGenerator = SourceMapGenerator;
|
4579 |
|
4580 |
-
},{"./array-set":
|
4581 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
4582 |
/*
|
4583 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -4992,7 +8553,7 @@ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSou
|
|
4992 |
|
4993 |
exports.SourceNode = SourceNode;
|
4994 |
|
4995 |
-
},{"./source-map-generator":
|
4996 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
4997 |
/*
|
4998 |
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -5482,7 +9043,7 @@ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
|
5482 |
}
|
5483 |
exports.computeSourceURL = computeSourceURL;
|
5484 |
|
5485 |
-
},{}],
|
5486 |
/*
|
5487 |
* Copyright 2009-2011 Mozilla Foundation and contributors
|
5488 |
* Licensed under the New BSD license. See LICENSE.txt or:
|
@@ -5492,23 +9053,4 @@ exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGene
|
|
5492 |
exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
|
5493 |
exports.SourceNode = require('./lib/source-node').SourceNode;
|
5494 |
|
5495 |
-
},{"./lib/source-map-consumer":
|
5496 |
-
// Copyright 2014 Simon Lydell
|
5497 |
-
// X11 (“MIT”) Licensed. (See LICENSE.)
|
5498 |
-
|
5499 |
-
var path = require("path")
|
5500 |
-
|
5501 |
-
"use strict"
|
5502 |
-
|
5503 |
-
function urix(aPath) {
|
5504 |
-
if (path.sep === "\\") {
|
5505 |
-
return aPath
|
5506 |
-
.replace(/\\/g, "/")
|
5507 |
-
.replace(/^[a-z]:\/?/i, "/")
|
5508 |
-
}
|
5509 |
-
return aPath
|
5510 |
-
}
|
5511 |
-
|
5512 |
-
module.exports = urix
|
5513 |
-
|
5514 |
-
},{"path":2}]},{},[5]);
|
1 |
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
2 |
+
'use strict'
|
3 |
+
|
4 |
+
exports.byteLength = byteLength
|
5 |
+
exports.toByteArray = toByteArray
|
6 |
+
exports.fromByteArray = fromByteArray
|
7 |
+
|
8 |
+
var lookup = []
|
9 |
+
var revLookup = []
|
10 |
+
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
|
11 |
+
|
12 |
+
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
13 |
+
for (var i = 0, len = code.length; i < len; ++i) {
|
14 |
+
lookup[i] = code[i]
|
15 |
+
revLookup[code.charCodeAt(i)] = i
|
16 |
+
}
|
17 |
+
|
18 |
+
// Support decoding URL-safe base64 strings, as Node.js does.
|
19 |
+
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
20 |
+
revLookup['-'.charCodeAt(0)] = 62
|
21 |
+
revLookup['_'.charCodeAt(0)] = 63
|
22 |
+
|
23 |
+
function getLens (b64) {
|
24 |
+
var len = b64.length
|
25 |
+
|
26 |
+
if (len % 4 > 0) {
|
27 |
+
throw new Error('Invalid string. Length must be a multiple of 4')
|
28 |
+
}
|
29 |
+
|
30 |
+
// Trim off extra bytes after placeholder bytes are found
|
31 |
+
// See: https://github.com/beatgammit/base64-js/issues/42
|
32 |
+
var validLen = b64.indexOf('=')
|
33 |
+
if (validLen === -1) validLen = len
|
34 |
+
|
35 |
+
var placeHoldersLen = validLen === len
|
36 |
+
? 0
|
37 |
+
: 4 - (validLen % 4)
|
38 |
+
|
39 |
+
return [validLen, placeHoldersLen]
|
40 |
+
}
|
41 |
+
|
42 |
+
// base64 is 4/3 + up to two characters of the original data
|
43 |
+
function byteLength (b64) {
|
44 |
+
var lens = getLens(b64)
|
45 |
+
var validLen = lens[0]
|
46 |
+
var placeHoldersLen = lens[1]
|
47 |
+
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
48 |
+
}
|
49 |
+
|
50 |
+
function _byteLength (b64, validLen, placeHoldersLen) {
|
51 |
+
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
52 |
+
}
|
53 |
+
|
54 |
+
function toByteArray (b64) {
|
55 |
+
var tmp
|
56 |
+
var lens = getLens(b64)
|
57 |
+
var validLen = lens[0]
|
58 |
+
var placeHoldersLen = lens[1]
|
59 |
+
|
60 |
+
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
|
61 |
+
|
62 |
+
var curByte = 0
|
63 |
+
|
64 |
+
// if there are placeholders, only get up to the last complete 4 chars
|
65 |
+
var len = placeHoldersLen > 0
|
66 |
+
? validLen - 4
|
67 |
+
: validLen
|
68 |
+
|
69 |
+
var i
|
70 |
+
for (i = 0; i < len; i += 4) {
|
71 |
+
tmp =
|
72 |
+
(revLookup[b64.charCodeAt(i)] << 18) |
|
73 |
+
(revLookup[b64.charCodeAt(i + 1)] << 12) |
|
74 |
+
(revLookup[b64.charCodeAt(i + 2)] << 6) |
|
75 |
+
revLookup[b64.charCodeAt(i + 3)]
|
76 |
+
arr[curByte++] = (tmp >> 16) & 0xFF
|
77 |
+
arr[curByte++] = (tmp >> 8) & 0xFF
|
78 |
+
arr[curByte++] = tmp & 0xFF
|
79 |
+
}
|
80 |
+
|
81 |
+
if (placeHoldersLen === 2) {
|
82 |
+
tmp =
|
83 |
+
(revLookup[b64.charCodeAt(i)] << 2) |
|
84 |
+
(revLookup[b64.charCodeAt(i + 1)] >> 4)
|
85 |
+
arr[curByte++] = tmp & 0xFF
|
86 |
+
}
|
87 |
+
|
88 |
+
if (placeHoldersLen === 1) {
|
89 |
+
tmp =
|
90 |
+
(revLookup[b64.charCodeAt(i)] << 10) |
|
91 |
+
(revLookup[b64.charCodeAt(i + 1)] << 4) |
|
92 |
+
(revLookup[b64.charCodeAt(i + 2)] >> 2)
|
93 |
+
arr[curByte++] = (tmp >> 8) & 0xFF
|
94 |
+
arr[curByte++] = tmp & 0xFF
|
95 |
+
}
|
96 |
+
|
97 |
+
return arr
|
98 |
+
}
|
99 |
+
|
100 |
+
function tripletToBase64 (num) {
|
101 |
+
return lookup[num >> 18 & 0x3F] +
|
102 |
+
lookup[num >> 12 & 0x3F] +
|
103 |
+
lookup[num >> 6 & 0x3F] +
|
104 |
+
lookup[num & 0x3F]
|
105 |
+
}
|
106 |
+
|
107 |
+
function encodeChunk (uint8, start, end) {
|
108 |
+
var tmp
|
109 |
+
var output = []
|
110 |
+
for (var i = start; i < end; i += 3) {
|
111 |
+
tmp =
|
112 |
+
((uint8[i] << 16) & 0xFF0000) +
|
113 |
+
((uint8[i + 1] << 8) & 0xFF00) +
|
114 |
+
(uint8[i + 2] & 0xFF)
|
115 |
+
output.push(tripletToBase64(tmp))
|
116 |
+
}
|
117 |
+
return output.join('')
|
118 |
+
}
|
119 |
+
|
120 |
+
function fromByteArray (uint8) {
|
121 |
+
var tmp
|
122 |
+
var len = uint8.length
|
123 |
+
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
|
124 |
+
var parts = []
|
125 |
+
var maxChunkLength = 16383 // must be multiple of 3
|
126 |
+
|
127 |
+
// go through the array every three bytes, we'll deal with trailing stuff later
|
128 |
+
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
129 |
+
parts.push(encodeChunk(
|
130 |
+
uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
|
131 |
+
))
|
132 |
+
}
|
133 |
+
|
134 |
+
// pad the end with zeros, but make sure to not forget the extra bytes
|
135 |
+
if (extraBytes === 1) {
|
136 |
+
tmp = uint8[len - 1]
|
137 |
+
parts.push(
|
138 |
+
lookup[tmp >> 2] +
|
139 |
+
lookup[(tmp << 4) & 0x3F] +
|
140 |
+
'=='
|
141 |
+
)
|
142 |
+
} else if (extraBytes === 2) {
|
143 |
+
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
|
144 |
+
parts.push(
|
145 |
+
lookup[tmp >> 10] +
|
146 |
+
lookup[(tmp >> 4) & 0x3F] +
|
147 |
+
lookup[(tmp << 2) & 0x3F] +
|
148 |
+
'='
|
149 |
+
)
|
150 |
+
}
|
151 |
+
|
152 |
+
return parts.join('')
|
153 |
+
}
|
154 |
|
155 |
},{}],2:[function(require,module,exports){
|
156 |
+
|
157 |
+
},{}],3:[function(require,module,exports){
|
158 |
+
(function (Buffer){
|
159 |
+
/*!
|
160 |
+
* The buffer module from node.js, for the browser.
|
161 |
+
*
|
162 |
+
* @author Feross Aboukhadijeh <https://feross.org>
|
163 |
+
* @license MIT
|
164 |
+
*/
|
165 |
+
/* eslint-disable no-proto */
|
166 |
+
|
167 |
+
'use strict'
|
168 |
+
|
169 |
+
var base64 = require('base64-js')
|
170 |
+
var ieee754 = require('ieee754')
|
171 |
+
|
172 |
+
exports.Buffer = Buffer
|
173 |
+
exports.SlowBuffer = SlowBuffer
|
174 |
+
exports.INSPECT_MAX_BYTES = 50
|
175 |
+
|
176 |
+
var K_MAX_LENGTH = 0x7fffffff
|
177 |
+
exports.kMaxLength = K_MAX_LENGTH
|
178 |
+
|
179 |
+
/**
|
180 |
+
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
181 |
+
* === true Use Uint8Array implementation (fastest)
|
182 |
+
* === false Print warning and recommend using `buffer` v4.x which has an Object
|
183 |
+
* implementation (most compatible, even IE6)
|
184 |
+
*
|
185 |
+
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
186 |
+
* Opera 11.6+, iOS 4.2+.
|
187 |
+
*
|
188 |
+
* We report that the browser does not support typed arrays if the are not subclassable
|
189 |
+
* using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
|
190 |
+
* (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
|
191 |
+
* for __proto__ and has a buggy typed array implementation.
|
192 |
+
*/
|
193 |
+
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
|
194 |
+
|
195 |
+
if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
|
196 |
+
typeof console.error === 'function') {
|
197 |
+
console.error(
|
198 |
+
'This browser lacks typed array (Uint8Array) support which is required by ' +
|
199 |
+
'`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
|
200 |
+
)
|
201 |
+
}
|
202 |
+
|
203 |
+
function typedArraySupport () {
|
204 |
+
// Can typed array instances can be augmented?
|
205 |
+
try {
|
206 |
+
var arr = new Uint8Array(1)
|
207 |
+
arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }
|
208 |
+
return arr.foo() === 42
|
209 |
+
} catch (e) {
|
210 |
+
return false
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
Object.defineProperty(Buffer.prototype, 'parent', {
|
215 |
+
enumerable: true,
|
216 |
+
get: function () {
|
217 |
+
if (!Buffer.isBuffer(this)) return undefined
|
218 |
+
return this.buffer
|
219 |
+
}
|
220 |
+
})
|
221 |
+
|
222 |
+
Object.defineProperty(Buffer.prototype, 'offset', {
|
223 |
+
enumerable: true,
|
224 |
+
get: function () {
|
225 |
+
if (!Buffer.isBuffer(this)) return undefined
|
226 |
+
return this.byteOffset
|
227 |
+
}
|
228 |
+
})
|
229 |
+
|
230 |
+
function createBuffer (length) {
|
231 |
+
if (length > K_MAX_LENGTH) {
|
232 |
+
throw new RangeError('The value "' + length + '" is invalid for option "size"')
|
233 |
+
}
|
234 |
+
// Return an augmented `Uint8Array` instance
|
235 |
+
var buf = new Uint8Array(length)
|
236 |
+
buf.__proto__ = Buffer.prototype
|
237 |
+
return buf
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* The Buffer constructor returns instances of `Uint8Array` that have their
|
242 |
+
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
243 |
+
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
244 |
+
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
245 |
+
* returns a single octet.
|
246 |
+
*
|
247 |
+
* The `Uint8Array` prototype remains unmodified.
|
248 |
+
*/
|
249 |
+
|
250 |
+
function Buffer (arg, encodingOrOffset, length) {
|
251 |
+
// Common case.
|
252 |
+
if (typeof arg === 'number') {
|
253 |
+
if (typeof encodingOrOffset === 'string') {
|
254 |
+
throw new TypeError(
|
255 |
+
'The "string" argument must be of type string. Received type number'
|
256 |
+
)
|
257 |
+
}
|
258 |
+
return allocUnsafe(arg)
|
259 |
+
}
|
260 |
+
return from(arg, encodingOrOffset, length)
|
261 |
+
}
|
262 |
+
|
263 |
+
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
|
264 |
+
if (typeof Symbol !== 'undefined' && Symbol.species != null &&
|
265 |
+
Buffer[Symbol.species] === Buffer) {
|
266 |
+
Object.defineProperty(Buffer, Symbol.species, {
|
267 |
+
value: null,
|
268 |
+
configurable: true,
|
269 |
+
enumerable: false,
|
270 |
+
writable: false
|
271 |
+
})
|
272 |
+
}
|
273 |
+
|
274 |
+
Buffer.poolSize = 8192 // not used by this implementation
|
275 |
+
|
276 |
+
function from (value, encodingOrOffset, length) {
|
277 |
+
if (typeof value === 'string') {
|
278 |
+
return fromString(value, encodingOrOffset)
|
279 |
+
}
|
280 |
+
|
281 |
+
if (ArrayBuffer.isView(value)) {
|
282 |
+
return fromArrayLike(value)
|
283 |
+
}
|
284 |
+
|
285 |
+
if (value == null) {
|
286 |
+
throw TypeError(
|
287 |
+
'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
|
288 |
+
'or Array-like Object. Received type ' + (typeof value)
|
289 |
+
)
|
290 |
+
}
|
291 |
+
|
292 |
+
if (isInstance(value, ArrayBuffer) ||
|
293 |
+
(value && isInstance(value.buffer, ArrayBuffer))) {
|
294 |
+
return fromArrayBuffer(value, encodingOrOffset, length)
|
295 |
+
}
|
296 |
+
|
297 |
+
if (typeof value === 'number') {
|
298 |
+
throw new TypeError(
|
299 |
+
'The "value" argument must not be of type number. Received type number'
|
300 |
+
)
|
301 |
+
}
|
302 |
+
|
303 |
+
var valueOf = value.valueOf && value.valueOf()
|
304 |
+
if (valueOf != null && valueOf !== value) {
|
305 |
+
return Buffer.from(valueOf, encodingOrOffset, length)
|
306 |
+
}
|
307 |
+
|
308 |
+
var b = fromObject(value)
|
309 |
+
if (b) return b
|
310 |
+
|
311 |
+
if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
|
312 |
+
typeof value[Symbol.toPrimitive] === 'function') {
|
313 |
+
return Buffer.from(
|
314 |
+
value[Symbol.toPrimitive]('string'), encodingOrOffset, length
|
315 |
+
)
|
316 |
+
}
|
317 |
+
|
318 |
+
throw new TypeError(
|
319 |
+
'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
|
320 |
+
'or Array-like Object. Received type ' + (typeof value)
|
321 |
+
)
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
326 |
+
* if value is a number.
|
327 |
+
* Buffer.from(str[, encoding])
|
328 |
+
* Buffer.from(array)
|
329 |
+
* Buffer.from(buffer)
|
330 |
+
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
331 |
+
**/
|
332 |
+
Buffer.from = function (value, encodingOrOffset, length) {
|
333 |
+
return from(value, encodingOrOffset, length)
|
334 |
+
}
|
335 |
+
|
336 |
+
// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
|
337 |
+
// https://github.com/feross/buffer/pull/148
|
338 |
+
Buffer.prototype.__proto__ = Uint8Array.prototype
|
339 |
+
Buffer.__proto__ = Uint8Array
|
340 |
+
|
341 |
+
function assertSize (size) {
|
342 |
+
if (typeof size !== 'number') {
|
343 |
+
throw new TypeError('"size" argument must be of type number')
|
344 |
+
} else if (size < 0) {
|
345 |
+
throw new RangeError('The value "' + size + '" is invalid for option "size"')
|
346 |
+
}
|
347 |
+
}
|
348 |
+
|
349 |
+
function alloc (size, fill, encoding) {
|
350 |
+
assertSize(size)
|
351 |
+
if (size <= 0) {
|
352 |
+
return createBuffer(size)
|
353 |
+
}
|
354 |
+
if (fill !== undefined) {
|
355 |
+
// Only pay attention to encoding if it's a string. This
|
356 |
+
// prevents accidentally sending in a number that would
|
357 |
+
// be interpretted as a start offset.
|
358 |
+
return typeof encoding === 'string'
|
359 |
+
? createBuffer(size).fill(fill, encoding)
|
360 |
+
: createBuffer(size).fill(fill)
|
361 |
+
}
|
362 |
+
return createBuffer(size)
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Creates a new filled Buffer instance.
|
367 |
+
* alloc(size[, fill[, encoding]])
|
368 |
+
**/
|
369 |
+
Buffer.alloc = function (size, fill, encoding) {
|
370 |
+
return alloc(size, fill, encoding)
|
371 |
+
}
|
372 |
+
|
373 |
+
function allocUnsafe (size) {
|
374 |
+
assertSize(size)
|
375 |
+
return createBuffer(size < 0 ? 0 : checked(size) | 0)
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
380 |
+
* */
|
381 |
+
Buffer.allocUnsafe = function (size) {
|
382 |
+
return allocUnsafe(size)
|
383 |
+
}
|
384 |
+
/**
|
385 |
+
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
386 |
+
*/
|
387 |
+
Buffer.allocUnsafeSlow = function (size) {
|
388 |
+
return allocUnsafe(size)
|
389 |
+
}
|
390 |
+
|
391 |
+
function fromString (string, encoding) {
|
392 |
+
if (typeof encoding !== 'string' || encoding === '') {
|
393 |
+
encoding = 'utf8'
|
394 |
+
}
|
395 |
+
|
396 |
+
if (!Buffer.isEncoding(encoding)) {
|
397 |
+
throw new TypeError('Unknown encoding: ' + encoding)
|
398 |
+
}
|
399 |
+
|
400 |
+
var length = byteLength(string, encoding) | 0
|
401 |
+
var buf = createBuffer(length)
|
402 |
+
|
403 |
+
var actual = buf.write(string, encoding)
|
404 |
+
|
405 |
+
if (actual !== length) {
|
406 |
+
// Writing a hex string, for example, that contains invalid characters will
|
407 |
+
// cause everything after the first invalid character to be ignored. (e.g.
|
408 |
+
// 'abxxcd' will be treated as 'ab')
|
409 |
+
buf = buf.slice(0, actual)
|
410 |
+
}
|
411 |
+
|
412 |
+
return buf
|
413 |
+
}
|
414 |
+
|
415 |
+
function fromArrayLike (array) {
|
416 |
+
var length = array.length < 0 ? 0 : checked(array.length) | 0
|
417 |
+
var buf = createBuffer(length)
|
418 |
+
for (var i = 0; i < length; i += 1) {
|
419 |
+
buf[i] = array[i] & 255
|
420 |
+
}
|
421 |
+
return buf
|
422 |
+
}
|
423 |
+
|
424 |
+
function fromArrayBuffer (array, byteOffset, length) {
|
425 |
+
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
426 |
+
throw new RangeError('"offset" is outside of buffer bounds')
|
427 |
+
}
|
428 |
+
|
429 |
+
if (array.byteLength < byteOffset + (length || 0)) {
|
430 |
+
throw new RangeError('"length" is outside of buffer bounds')
|
431 |
+
}
|
432 |
+
|
433 |
+
var buf
|
434 |
+
if (byteOffset === undefined && length === undefined) {
|
435 |
+
buf = new Uint8Array(array)
|
436 |
+
} else if (length === undefined) {
|
437 |
+
buf = new Uint8Array(array, byteOffset)
|
438 |
+
} else {
|
439 |
+
buf = new Uint8Array(array, byteOffset, length)
|
440 |
+
}
|
441 |
+
|
442 |
+
// Return an augmented `Uint8Array` instance
|
443 |
+
buf.__proto__ = Buffer.prototype
|
444 |
+
return buf
|
445 |
+
}
|
446 |
+
|
447 |
+
function fromObject (obj) {
|
448 |
+
if (Buffer.isBuffer(obj)) {
|
449 |
+
var len = checked(obj.length) | 0
|
450 |
+
var buf = createBuffer(len)
|
451 |
+
|
452 |
+
if (buf.length === 0) {
|
453 |
+
return buf
|
454 |
+
}
|
455 |
+
|
456 |
+
obj.copy(buf, 0, 0, len)
|
457 |
+
return buf
|
458 |
+
}
|
459 |
+
|
460 |
+
if (obj.length !== undefined) {
|
461 |
+
if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
|
462 |
+
return createBuffer(0)
|
463 |
+
}
|
464 |
+
return fromArrayLike(obj)
|
465 |
+
}
|
466 |
+
|
467 |
+
if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
|
468 |
+
return fromArrayLike(obj.data)
|
469 |
+
}
|
470 |
+
}
|
471 |
+
|
472 |
+
function checked (length) {
|
473 |
+
// Note: cannot use `length < K_MAX_LENGTH` here because that fails when
|
474 |
+
// length is NaN (which is otherwise coerced to zero.)
|
475 |
+
if (length >= K_MAX_LENGTH) {
|
476 |
+
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
|
477 |
+
'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
|
478 |
+
}
|
479 |
+
return length | 0
|
480 |
+
}
|
481 |
+
|
482 |
+
function SlowBuffer (length) {
|
483 |
+
if (+length != length) { // eslint-disable-line eqeqeq
|
484 |
+
length = 0
|
485 |
+
}
|
486 |
+
return Buffer.alloc(+length)
|
487 |
+
}
|
488 |
+
|
489 |
+
Buffer.isBuffer = function isBuffer (b) {
|
490 |
+
return b != null && b._isBuffer === true &&
|
491 |
+
b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
|
492 |
+
}
|
493 |
+
|
494 |
+
Buffer.compare = function compare (a, b) {
|
495 |
+
if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)
|
496 |
+
if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)
|
497 |
+
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
|
498 |
+
throw new TypeError(
|
499 |
+
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
500 |
+
)
|
501 |
+
}
|
502 |
+
|
503 |
+
if (a === b) return 0
|
504 |
+
|
505 |
+
var x = a.length
|
506 |
+
var y = b.length
|
507 |
+
|
508 |
+
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
509 |
+
if (a[i] !== b[i]) {
|
510 |
+
x = a[i]
|
511 |
+
y = b[i]
|
512 |
+
break
|
513 |
+
}
|
514 |
+
}
|
515 |
+
|
516 |
+
if (x < y) return -1
|
517 |
+
if (y < x) return 1
|
518 |
+
return 0
|
519 |
+
}
|
520 |
+
|
521 |
+
Buffer.isEncoding = function isEncoding (encoding) {
|
522 |
+
switch (String(encoding).toLowerCase()) {
|
523 |
+
case 'hex':
|
524 |
+
case 'utf8':
|
525 |
+
case 'utf-8':
|
526 |
+
case 'ascii':
|
527 |
+
case 'latin1':
|
528 |
+
case 'binary':
|
529 |
+
case 'base64':
|
530 |
+
case 'ucs2':
|
531 |
+
case 'ucs-2':
|
532 |
+
case 'utf16le':
|
533 |
+
case 'utf-16le':
|
534 |
+
return true
|
535 |
+
default:
|
536 |
+
return false
|
537 |
+
}
|
538 |
+
}
|
539 |
+
|
540 |
+
Buffer.concat = function concat (list, length) {
|
541 |
+
if (!Array.isArray(list)) {
|
542 |
+
throw new TypeError('"list" argument must be an Array of Buffers')
|
543 |
+
}
|
544 |
+
|
545 |
+
if (list.length === 0) {
|
546 |
+
return Buffer.alloc(0)
|
547 |
+
}
|
548 |
+
|
549 |
+
var i
|
550 |
+
if (length === undefined) {
|
551 |
+
length = 0
|
552 |
+
for (i = 0; i < list.length; ++i) {
|
553 |
+
length += list[i].length
|
554 |
+
}
|
555 |
+
}
|
556 |
+
|
557 |
+
var buffer = Buffer.allocUnsafe(length)
|
558 |
+
var pos = 0
|
559 |
+
for (i = 0; i < list.length; ++i) {
|
560 |
+
var buf = list[i]
|
561 |
+
if (isInstance(buf, Uint8Array)) {
|
562 |
+
buf = Buffer.from(buf)
|
563 |
+
}
|
564 |
+
if (!Buffer.isBuffer(buf)) {
|
565 |
+
throw new TypeError('"list" argument must be an Array of Buffers')
|
566 |
+
}
|
567 |
+
buf.copy(buffer, pos)
|
568 |
+
pos += buf.length
|
569 |
+
}
|
570 |
+
return buffer
|
571 |
+
}
|
572 |
+
|
573 |
+
function byteLength (string, encoding) {
|
574 |
+
if (Buffer.isBuffer(string)) {
|
575 |
+
return string.length
|
576 |
+
}
|
577 |
+
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
578 |
+
return string.byteLength
|
579 |
+
}
|
580 |
+
if (typeof string !== 'string') {
|
581 |
+
throw new TypeError(
|
582 |
+
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
|
583 |
+
'Received type ' + typeof string
|
584 |
+
)
|
585 |
+
}
|
586 |
+
|
587 |
+
var len = string.length
|
588 |
+
var mustMatch = (arguments.length > 2 && arguments[2] === true)
|
589 |
+
if (!mustMatch && len === 0) return 0
|
590 |
+
|
591 |
+
// Use a for loop to avoid recursion
|
592 |
+
var loweredCase = false
|
593 |
+
for (;;) {
|
594 |
+
switch (encoding) {
|
595 |
+
case 'ascii':
|
596 |
+
case 'latin1':
|
597 |
+
case 'binary':
|
598 |
+
return len
|
599 |
+
case 'utf8':
|
600 |
+
case 'utf-8':
|
601 |
+
return utf8ToBytes(string).length
|
602 |
+
case 'ucs2':
|
603 |
+
case 'ucs-2':
|
604 |
+
case 'utf16le':
|
605 |
+
case 'utf-16le':
|
606 |
+
return len * 2
|
607 |
+
case 'hex':
|
608 |
+
return len >>> 1
|
609 |
+
case 'base64':
|
610 |
+
return base64ToBytes(string).length
|
611 |
+
default:
|
612 |
+
if (loweredCase) {
|
613 |
+
return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
|
614 |
+
}
|
615 |
+
encoding = ('' + encoding).toLowerCase()
|
616 |
+
loweredCase = true
|
617 |
+
}
|
618 |
+
}
|
619 |
+
}
|
620 |
+
Buffer.byteLength = byteLength
|
621 |
+
|
622 |
+
function slowToString (encoding, start, end) {
|
623 |
+
var loweredCase = false
|
624 |
+
|
625 |
+
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
626 |
+
// property of a typed array.
|
627 |
+
|
628 |
+
// This behaves neither like String nor Uint8Array in that we set start/end
|
629 |
+
// to their upper/lower bounds if the value passed is out of range.
|
630 |
+
// undefined is handled specially as per ECMA-262 6th Edition,
|
631 |
+
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
632 |
+
if (start === undefined || start < 0) {
|
633 |
+
start = 0
|
634 |
+
}
|
635 |
+
// Return early if start > this.length. Done here to prevent potential uint32
|
636 |
+
// coercion fail below.
|
637 |
+
if (start > this.length) {
|
638 |
+
return ''
|
639 |
+
}
|
640 |
+
|
641 |
+
if (end === undefined || end > this.length) {
|
642 |
+
end = this.length
|
643 |
+
}
|
644 |
+
|
645 |
+
if (end <= 0) {
|
646 |
+
return ''
|
647 |
+
}
|
648 |
+
|
649 |
+
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
|
650 |
+
end >>>= 0
|
651 |
+
start >>>= 0
|
652 |
+
|
653 |
+
if (end <= start) {
|
654 |
+
return ''
|
655 |
+
}
|
656 |
+
|
657 |
+
if (!encoding) encoding = 'utf8'
|
658 |
+
|
659 |
+
while (true) {
|
660 |
+
switch (encoding) {
|
661 |
+
case 'hex':
|
662 |
+
return hexSlice(this, start, end)
|
663 |
+
|
664 |
+
case 'utf8':
|
665 |
+
case 'utf-8':
|
666 |
+
return utf8Slice(this, start, end)
|
667 |
+
|
668 |
+
case 'ascii':
|
669 |
+
return asciiSlice(this, start, end)
|
670 |
+
|
671 |
+
case 'latin1':
|
672 |
+
case 'binary':
|
673 |
+
return latin1Slice(this, start, end)
|
674 |
+
|
675 |
+
case 'base64':
|
676 |
+
return base64Slice(this, start, end)
|
677 |
+
|
678 |
+
case 'ucs2':
|
679 |
+
case 'ucs-2':
|
680 |
+
case 'utf16le':
|
681 |
+
case 'utf-16le':
|
682 |
+
return utf16leSlice(this, start, end)
|
683 |
+
|
684 |
+
default:
|
685 |
+
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
686 |
+
encoding = (encoding + '').toLowerCase()
|
687 |
+
loweredCase = true
|
688 |
+
}
|
689 |
+
}
|
690 |
+
}
|
691 |
+
|
692 |
+
// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
|
693 |
+
// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
|
694 |
+
// reliably in a browserify context because there could be multiple different
|
695 |
+
// copies of the 'buffer' package in use. This method works even for Buffer
|
696 |
+
// instances that were created from another copy of the `buffer` package.
|
697 |
+
// See: https://github.com/feross/buffer/issues/154
|
698 |
+
Buffer.prototype._isBuffer = true
|
699 |
+
|
700 |
+
function swap (b, n, m) {
|
701 |
+
var i = b[n]
|
702 |
+
b[n] = b[m]
|
703 |
+
b[m] = i
|
704 |
+
}
|
705 |
+
|
706 |
+
Buffer.prototype.swap16 = function swap16 () {
|
707 |
+
var len = this.length
|
708 |
+
if (len % 2 !== 0) {
|
709 |
+
throw new RangeError('Buffer size must be a multiple of 16-bits')
|
710 |
+
}
|
711 |
+
for (var i = 0; i < len; i += 2) {
|
712 |
+
swap(this, i, i + 1)
|
713 |
+
}
|
714 |
+
return this
|
715 |
+
}
|
716 |
+
|
717 |
+
Buffer.prototype.swap32 = function swap32 () {
|
718 |
+
var len = this.length
|
719 |
+
if (len % 4 !== 0) {
|
720 |
+
throw new RangeError('Buffer size must be a multiple of 32-bits')
|
721 |
+
}
|
722 |
+
for (var i = 0; i < len; i += 4) {
|
723 |
+
swap(this, i, i + 3)
|
724 |
+
swap(this, i + 1, i + 2)
|
725 |
+
}
|
726 |
+
return this
|
727 |
+
}
|
728 |
+
|
729 |
+
Buffer.prototype.swap64 = function swap64 () {
|
730 |
+
var len = this.length
|
731 |
+
if (len % 8 !== 0) {
|
732 |
+
throw new RangeError('Buffer size must be a multiple of 64-bits')
|
733 |
+
}
|
734 |
+
for (var i = 0; i < len; i += 8) {
|
735 |
+
swap(this, i, i + 7)
|
736 |
+
swap(this, i + 1, i + 6)
|
737 |
+
swap(this, i + 2, i + 5)
|
738 |
+
swap(this, i + 3, i + 4)
|
739 |
+
}
|
740 |
+
return this
|
741 |
+
}
|
742 |
+
|
743 |
+
Buffer.prototype.toString = function toString () {
|
744 |
+
var length = this.length
|
745 |
+
if (length === 0) return ''
|
746 |
+
if (arguments.length === 0) return utf8Slice(this, 0, length)
|
747 |
+
return slowToString.apply(this, arguments)
|
748 |
+
}
|
749 |
+
|
750 |
+
Buffer.prototype.toLocaleString = Buffer.prototype.toString
|
751 |
+
|
752 |
+
Buffer.prototype.equals = function equals (b) {
|
753 |
+
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
754 |
+
if (this === b) return true
|
755 |
+
return Buffer.compare(this, b) === 0
|
756 |
+
}
|
757 |
+
|
758 |
+
Buffer.prototype.inspect = function inspect () {
|
759 |
+
var str = ''
|
760 |
+
var max = exports.INSPECT_MAX_BYTES
|
761 |
+
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
|
762 |
+
if (this.length > max) str += ' ... '
|
763 |
+
return '<Buffer ' + str + '>'
|
764 |
+
}
|
765 |
+
|
766 |
+
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
|
767 |
+
if (isInstance(target, Uint8Array)) {
|
768 |
+
target = Buffer.from(target, target.offset, target.byteLength)
|
769 |
+
}
|
770 |
+
if (!Buffer.isBuffer(target)) {
|
771 |
+
throw new TypeError(
|
772 |
+
'The "target" argument must be one of type Buffer or Uint8Array. ' +
|
773 |
+
'Received type ' + (typeof target)
|
774 |
+
)
|
775 |
+
}
|
776 |
+
|
777 |
+
if (start === undefined) {
|
778 |
+
start = 0
|
779 |
+
}
|
780 |
+
if (end === undefined) {
|
781 |
+
end = target ? target.length : 0
|
782 |
+
}
|
783 |
+
if (thisStart === undefined) {
|
784 |
+
thisStart = 0
|
785 |
+
}
|
786 |
+
if (thisEnd === undefined) {
|
787 |
+
thisEnd = this.length
|
788 |
+
}
|
789 |
+
|
790 |
+
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
791 |
+
throw new RangeError('out of range index')
|
792 |
+
}
|
793 |
+
|
794 |
+
if (thisStart >= thisEnd && start >= end) {
|
795 |
+
return 0
|
796 |
+
}
|
797 |
+
if (thisStart >= thisEnd) {
|
798 |
+
return -1
|
799 |
+
}
|
800 |
+
if (start >= end) {
|
801 |
+
return 1
|
802 |
+
}
|
803 |
+
|
804 |
+
start >>>= 0
|
805 |
+
end >>>= 0
|
806 |
+
thisStart >>>= 0
|
807 |
+
thisEnd >>>= 0
|
808 |
+
|
809 |
+
if (this === target) return 0
|
810 |
+
|
811 |
+
var x = thisEnd - thisStart
|
812 |
+
var y = end - start
|
813 |
+
var len = Math.min(x, y)
|
814 |
+
|
815 |
+
var thisCopy = this.slice(thisStart, thisEnd)
|
816 |
+
var targetCopy = target.slice(start, end)
|
817 |
+
|
818 |
+
for (var i = 0; i < len; ++i) {
|
819 |
+
if (thisCopy[i] !== targetCopy[i]) {
|
820 |
+
x = thisCopy[i]
|
821 |
+
y = targetCopy[i]
|
822 |
+
break
|
823 |
+
}
|
824 |
+
}
|
825 |
+
|
826 |
+
if (x < y) return -1
|
827 |
+
if (y < x) return 1
|
828 |
+
return 0
|
829 |
+
}
|
830 |
+
|
831 |
+
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
832 |
+
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
833 |
+
//
|
834 |
+
// Arguments:
|
835 |
+
// - buffer - a Buffer to search
|
836 |
+
// - val - a string, Buffer, or number
|
837 |
+
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
838 |
+
// - encoding - an optional encoding, relevant is val is a string
|
839 |
+
// - dir - true for indexOf, false for lastIndexOf
|
840 |
+
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
|
841 |
+
// Empty buffer means no match
|
842 |
+
if (buffer.length === 0) return -1
|
843 |
+
|
844 |
+
// Normalize byteOffset
|
845 |
+
if (typeof byteOffset === 'string') {
|
846 |
+
encoding = byteOffset
|
847 |
+
byteOffset = 0
|
848 |
+
} else if (byteOffset > 0x7fffffff) {
|
849 |
+
byteOffset = 0x7fffffff
|
850 |
+
} else if (byteOffset < -0x80000000) {
|
851 |
+
byteOffset = -0x80000000
|
852 |
+
}
|
853 |
+
byteOffset = +byteOffset // Coerce to Number.
|
854 |
+
if (numberIsNaN(byteOffset)) {
|
855 |
+
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
856 |
+
byteOffset = dir ? 0 : (buffer.length - 1)
|
857 |
+
}
|
858 |
+
|
859 |
+
// Normalize byteOffset: negative offsets start from the end of the buffer
|
860 |
+
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
|
861 |
+
if (byteOffset >= buffer.length) {
|
862 |
+
if (dir) return -1
|
863 |
+
else byteOffset = buffer.length - 1
|
864 |
+
} else if (byteOffset < 0) {
|
865 |
+
if (dir) byteOffset = 0
|
866 |
+
else return -1
|
867 |
+
}
|
868 |
+
|
869 |
+
// Normalize val
|
870 |
+
if (typeof val === 'string') {
|
871 |
+
val = Buffer.from(val, encoding)
|
872 |
+
}
|
873 |
+
|
874 |
+
// Finally, search either indexOf (if dir is true) or lastIndexOf
|
875 |
+
if (Buffer.isBuffer(val)) {
|
876 |
+
// Special case: looking for empty string/buffer always fails
|
877 |
+
if (val.length === 0) {
|
878 |
+
return -1
|
879 |
+
}
|
880 |
+
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
|
881 |
+
} else if (typeof val === 'number') {
|
882 |
+
val = val & 0xFF // Search for a byte value [0-255]
|
883 |
+
if (typeof Uint8Array.prototype.indexOf === 'function') {
|
884 |
+
if (dir) {
|
885 |
+
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
|
886 |
+
} else {
|
887 |
+
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
|
888 |
+
}
|
889 |
+
}
|
890 |
+
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
|
891 |
+
}
|
892 |
+
|
893 |
+
throw new TypeError('val must be string, number or Buffer')
|
894 |
+
}
|
895 |
+
|
896 |
+
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
|
897 |
+
var indexSize = 1
|
898 |
+
var arrLength = arr.length
|
899 |
+
var valLength = val.length
|
900 |
+
|
901 |
+
if (encoding !== undefined) {
|
902 |
+
encoding = String(encoding).toLowerCase()
|
903 |
+
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
|
904 |
+
encoding === 'utf16le' || encoding === 'utf-16le') {
|
905 |
+
if (arr.length < 2 || val.length < 2) {
|
906 |
+
return -1
|
907 |
+
}
|
908 |
+
indexSize = 2
|
909 |
+
arrLength /= 2
|
910 |
+
valLength /= 2
|
911 |
+
byteOffset /= 2
|
912 |
+
}
|
913 |
+
}
|
914 |
+
|
915 |
+
function read (buf, i) {
|
916 |
+
if (indexSize === 1) {
|
917 |
+
return buf[i]
|
918 |
+
} else {
|
919 |
+
return buf.readUInt16BE(i * indexSize)
|
920 |
+
}
|
921 |
+
}
|
922 |
+
|
923 |
+
var i
|
924 |
+
if (dir) {
|
925 |
+
var foundIndex = -1
|
926 |
+
for (i = byteOffset; i < arrLength; i++) {
|
927 |
+
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
928 |
+
if (foundIndex === -1) foundIndex = i
|
929 |
+
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
|
930 |
+
} else {
|
931 |
+
if (foundIndex !== -1) i -= i - foundIndex
|
932 |
+
foundIndex = -1
|
933 |
+
}
|
934 |
+
}
|
935 |
+
} else {
|
936 |
+
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
|
937 |
+
for (i = byteOffset; i >= 0; i--) {
|
938 |
+
var found = true
|
939 |
+
for (var j = 0; j < valLength; j++) {
|
940 |
+
if (read(arr, i + j) !== read(val, j)) {
|
941 |
+
found = false
|
942 |
+
break
|
943 |
+
}
|
944 |
+
}
|
945 |
+
if (found) return i
|
946 |
+
}
|
947 |
+
}
|
948 |
+
|
949 |
+
return -1
|
950 |
+
}
|
951 |
+
|
952 |
+
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
|
953 |
+
return this.indexOf(val, byteOffset, encoding) !== -1
|
954 |
+
}
|
955 |
+
|
956 |
+
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
|
957 |
+
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
|
958 |
+
}
|
959 |
+
|
960 |
+
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
|
961 |
+
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
|
962 |
+
}
|
963 |
+
|
964 |
+
function hexWrite (buf, string, offset, length) {
|
965 |
+
offset = Number(offset) || 0
|
966 |
+
var remaining = buf.length - offset
|
967 |
+
if (!length) {
|
968 |
+
length = remaining
|
969 |
+
} else {
|
970 |
+
length = Number(length)
|
971 |
+
if (length > remaining) {
|
972 |
+
length = remaining
|
973 |
+
}
|
974 |
+
}
|
975 |
+
|
976 |
+
var strLen = string.length
|
977 |
+
|
978 |
+
if (length > strLen / 2) {
|
979 |
+
length = strLen / 2
|
980 |
+
}
|
981 |
+
for (var i = 0; i < length; ++i) {
|
982 |
+
var parsed = parseInt(string.substr(i * 2, 2), 16)
|
983 |
+
if (numberIsNaN(parsed)) return i
|
984 |
+
buf[offset + i] = parsed
|
985 |
+
}
|
986 |
+
return i
|
987 |
+
}
|
988 |
+
|
989 |
+
function utf8Write (buf, string, offset, length) {
|
990 |
+
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
|
991 |
+
}
|
992 |
+
|
993 |
+
function asciiWrite (buf, string, offset, length) {
|
994 |
+
return blitBuffer(asciiToBytes(string), buf, offset, length)
|
995 |
+
}
|
996 |
+
|
997 |
+
function latin1Write (buf, string, offset, length) {
|
998 |
+
return asciiWrite(buf, string, offset, length)
|
999 |
+
}
|
1000 |
+
|
1001 |
+
function base64Write (buf, string, offset, length) {
|
1002 |
+
return blitBuffer(base64ToBytes(string), buf, offset, length)
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
function ucs2Write (buf, string, offset, length) {
|
1006 |
+
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
Buffer.prototype.write = function write (string, offset, length, encoding) {
|
1010 |
+
// Buffer#write(string)
|
1011 |
+
if (offset === undefined) {
|
1012 |
+
encoding = 'utf8'
|
1013 |
+
length = this.length
|
1014 |
+
offset = 0
|
1015 |
+
// Buffer#write(string, encoding)
|
1016 |
+
} else if (length === undefined && typeof offset === 'string') {
|
1017 |
+
encoding = offset
|
1018 |
+
length = this.length
|
1019 |
+
offset = 0
|
1020 |
+
// Buffer#write(string, offset[, length][, encoding])
|
1021 |
+
} else if (isFinite(offset)) {
|
1022 |
+
offset = offset >>> 0
|
1023 |
+
if (isFinite(length)) {
|
1024 |
+
length = length >>> 0
|
1025 |
+
if (encoding === undefined) encoding = 'utf8'
|
1026 |
+
} else {
|
1027 |
+
encoding = length
|
1028 |
+
length = undefined
|
1029 |
+
}
|
1030 |
+
} else {
|
1031 |
+
throw new Error(
|
1032 |
+
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
|
1033 |
+
)
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
var remaining = this.length - offset
|
1037 |
+
if (length === undefined || length > remaining) length = remaining
|
1038 |
+
|
1039 |
+
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
|
1040 |
+
throw new RangeError('Attempt to write outside buffer bounds')
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
if (!encoding) encoding = 'utf8'
|
1044 |
+
|
1045 |
+
var loweredCase = false
|
1046 |
+
for (;;) {
|
1047 |
+
switch (encoding) {
|
1048 |
+
case 'hex':
|
1049 |
+
return hexWrite(this, string, offset, length)
|
1050 |
+
|
1051 |
+
case 'utf8':
|
1052 |
+
case 'utf-8':
|
1053 |
+
return utf8Write(this, string, offset, length)
|
1054 |
+
|
1055 |
+
case 'ascii':
|
1056 |
+
return asciiWrite(this, string, offset, length)
|
1057 |
+
|
1058 |
+
case 'latin1':
|
1059 |
+
case 'binary':
|
1060 |
+
return latin1Write(this, string, offset, length)
|
1061 |
+
|
1062 |
+
case 'base64':
|
1063 |
+
// Warning: maxLength not taken into account in base64Write
|
1064 |
+
return base64Write(this, string, offset, length)
|
1065 |
+
|
1066 |
+
case 'ucs2':
|
1067 |
+
case 'ucs-2':
|
1068 |
+
case 'utf16le':
|
1069 |
+
case 'utf-16le':
|
1070 |
+
return ucs2Write(this, string, offset, length)
|
1071 |
+
|
1072 |
+
default:
|
1073 |
+
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
1074 |
+
encoding = ('' + encoding).toLowerCase()
|
1075 |
+
loweredCase = true
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
Buffer.prototype.toJSON = function toJSON () {
|
1081 |
+
return {
|
1082 |
+
type: 'Buffer',
|
1083 |
+
data: Array.prototype.slice.call(this._arr || this, 0)
|
1084 |
+
}
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
function base64Slice (buf, start, end) {
|
1088 |
+
if (start === 0 && end === buf.length) {
|
1089 |
+
return base64.fromByteArray(buf)
|
1090 |
+
} else {
|
1091 |
+
return base64.fromByteArray(buf.slice(start, end))
|
1092 |
+
}
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
function utf8Slice (buf, start, end) {
|
1096 |
+
end = Math.min(buf.length, end)
|
1097 |
+
var res = []
|
1098 |
+
|
1099 |
+
var i = start
|
1100 |
+
while (i < end) {
|
1101 |
+
var firstByte = buf[i]
|
1102 |
+
var codePoint = null
|
1103 |
+
var bytesPerSequence = (firstByte > 0xEF) ? 4
|
1104 |
+
: (firstByte > 0xDF) ? 3
|
1105 |
+
: (firstByte > 0xBF) ? 2
|
1106 |
+
: 1
|
1107 |
+
|
1108 |
+
if (i + bytesPerSequence <= end) {
|
1109 |
+
var secondByte, thirdByte, fourthByte, tempCodePoint
|
1110 |
+
|
1111 |
+
switch (bytesPerSequence) {
|
1112 |
+
case 1:
|
1113 |
+
if (firstByte < 0x80) {
|
1114 |
+
codePoint = firstByte
|
1115 |
+
}
|
1116 |
+
break
|
1117 |
+
case 2:
|
1118 |
+
secondByte = buf[i + 1]
|
1119 |
+
if ((secondByte & 0xC0) === 0x80) {
|
1120 |
+
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
|
1121 |
+
if (tempCodePoint > 0x7F) {
|
1122 |
+
codePoint = tempCodePoint
|
1123 |
+
}
|
1124 |
+
}
|
1125 |
+
break
|
1126 |
+
case 3:
|
1127 |
+
secondByte = buf[i + 1]
|
1128 |
+
thirdByte = buf[i + 2]
|
1129 |
+
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
|
1130 |
+
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
|
1131 |
+
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
|
1132 |
+
codePoint = tempCodePoint
|
1133 |
+
}
|
1134 |
+
}
|
1135 |
+
break
|
1136 |
+
case 4:
|
1137 |
+
secondByte = buf[i + 1]
|
1138 |
+
thirdByte = buf[i + 2]
|
1139 |
+
fourthByte = buf[i + 3]
|
1140 |
+
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
|
1141 |
+
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
|
1142 |
+
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
|
1143 |
+
codePoint = tempCodePoint
|
1144 |
+
}
|
1145 |
+
}
|
1146 |
+
}
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
if (codePoint === null) {
|
1150 |
+
// we did not generate a valid codePoint so insert a
|
1151 |
+
// replacement char (U+FFFD) and advance only 1 byte
|
1152 |
+
codePoint = 0xFFFD
|
1153 |
+
bytesPerSequence = 1
|
1154 |
+
} else if (codePoint > 0xFFFF) {
|
1155 |
+
// encode to utf16 (surrogate pair dance)
|
1156 |
+
codePoint -= 0x10000
|
1157 |
+
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
|
1158 |
+
codePoint = 0xDC00 | codePoint & 0x3FF
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
res.push(codePoint)
|
1162 |
+
i += bytesPerSequence
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
return decodeCodePointsArray(res)
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
1169 |
+
// the lowest limit is Chrome, with 0x10000 args.
|
1170 |
+
// We go 1 magnitude less, for safety
|
1171 |
+
var MAX_ARGUMENTS_LENGTH = 0x1000
|
1172 |
+
|
1173 |
+
function decodeCodePointsArray (codePoints) {
|
1174 |
+
var len = codePoints.length
|
1175 |
+
if (len <= MAX_ARGUMENTS_LENGTH) {
|
1176 |
+
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
// Decode in chunks to avoid "call stack size exceeded".
|
1180 |
+
var res = ''
|
1181 |
+
var i = 0
|
1182 |
+
while (i < len) {
|
1183 |
+
res += String.fromCharCode.apply(
|
1184 |
+
String,
|
1185 |
+
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
1186 |
+
)
|
1187 |
+
}
|
1188 |
+
return res
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
function asciiSlice (buf, start, end) {
|
1192 |
+
var ret = ''
|
1193 |
+
end = Math.min(buf.length, end)
|
1194 |
+
|
1195 |
+
for (var i = start; i < end; ++i) {
|
1196 |
+
ret += String.fromCharCode(buf[i] & 0x7F)
|
1197 |
+
}
|
1198 |
+
return ret
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
function latin1Slice (buf, start, end) {
|
1202 |
+
var ret = ''
|
1203 |
+
end = Math.min(buf.length, end)
|
1204 |
+
|
1205 |
+
for (var i = start; i < end; ++i) {
|
1206 |
+
ret += String.fromCharCode(buf[i])
|
1207 |
+
}
|
1208 |
+
return ret
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
function hexSlice (buf, start, end) {
|
1212 |
+
var len = buf.length
|
1213 |
+
|
1214 |
+
if (!start || start < 0) start = 0
|
1215 |
+
if (!end || end < 0 || end > len) end = len
|
1216 |
+
|
1217 |
+
var out = ''
|
1218 |
+
for (var i = start; i < end; ++i) {
|
1219 |
+
out += toHex(buf[i])
|
1220 |
+
}
|
1221 |
+
return out
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
function utf16leSlice (buf, start, end) {
|
1225 |
+
var bytes = buf.slice(start, end)
|
1226 |
+
var res = ''
|
1227 |
+
for (var i = 0; i < bytes.length; i += 2) {
|
1228 |
+
res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
|
1229 |
+
}
|
1230 |
+
return res
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
Buffer.prototype.slice = function slice (start, end) {
|
1234 |
+
var len = this.length
|
1235 |
+
start = ~~start
|
1236 |
+
end = end === undefined ? len : ~~end
|
1237 |
+
|
1238 |
+
if (start < 0) {
|
1239 |
+
start += len
|
1240 |
+
if (start < 0) start = 0
|
1241 |
+
} else if (start > len) {
|
1242 |
+
start = len
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
if (end < 0) {
|
1246 |
+
end += len
|
1247 |
+
if (end < 0) end = 0
|
1248 |
+
} else if (end > len) {
|
1249 |
+
end = len
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
if (end < start) end = start
|
1253 |
+
|
1254 |
+
var newBuf = this.subarray(start, end)
|
1255 |
+
// Return an augmented `Uint8Array` instance
|
1256 |
+
newBuf.__proto__ = Buffer.prototype
|
1257 |
+
return newBuf
|
1258 |
+
}
|
1259 |
+
|
1260 |
+
/*
|
1261 |
+
* Need to make sure that buffer isn't trying to write out of bounds.
|
1262 |
+
*/
|
1263 |
+
function checkOffset (offset, ext, length) {
|
1264 |
+
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
|
1265 |
+
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
|
1266 |
+
}
|
1267 |
+
|
1268 |
+
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
|
1269 |
+
offset = offset >>> 0
|
1270 |
+
byteLength = byteLength >>> 0
|
1271 |
+
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
1272 |
+
|
1273 |
+
var val = this[offset]
|
1274 |
+
var mul = 1
|
1275 |
+
var i = 0
|
1276 |
+
while (++i < byteLength && (mul *= 0x100)) {
|
1277 |
+
val += this[offset + i] * mul
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
return val
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
|
1284 |
+
offset = offset >>> 0
|
1285 |
+
byteLength = byteLength >>> 0
|
1286 |
+
if (!noAssert) {
|
1287 |
+
checkOffset(offset, byteLength, this.length)
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
var val = this[offset + --byteLength]
|
1291 |
+
var mul = 1
|
1292 |
+
while (byteLength > 0 && (mul *= 0x100)) {
|
1293 |
+
val += this[offset + --byteLength] * mul
|
1294 |
+
}
|
1295 |
+
|
1296 |
+
return val
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
|
1300 |
+
offset = offset >>> 0
|
1301 |
+
if (!noAssert) checkOffset(offset, 1, this.length)
|
1302 |
+
return this[offset]
|
1303 |
+
}
|
1304 |
+
|
1305 |
+
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
|
1306 |
+
offset = offset >>> 0
|
1307 |
+
if (!noAssert) checkOffset(offset, 2, this.length)
|
1308 |
+
return this[offset] | (this[offset + 1] << 8)
|
1309 |
+
}
|
1310 |
+
|
1311 |
+
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
|
1312 |
+
offset = offset >>> 0
|
1313 |
+
if (!noAssert) checkOffset(offset, 2, this.length)
|
1314 |
+
return (this[offset] << 8) | this[offset + 1]
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
|
1318 |
+
offset = offset >>> 0
|
1319 |
+
if (!noAssert) checkOffset(offset, 4, this.length)
|
1320 |
+
|
1321 |
+
return ((this[offset]) |
|
1322 |
+
(this[offset + 1] << 8) |
|
1323 |
+
(this[offset + 2] << 16)) +
|
1324 |
+
(this[offset + 3] * 0x1000000)
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
|
1328 |
+
offset = offset >>> 0
|
1329 |
+
if (!noAssert) checkOffset(offset, 4, this.length)
|
1330 |
+
|
1331 |
+
return (this[offset] * 0x1000000) +
|
1332 |
+
((this[offset + 1] << 16) |
|
1333 |
+
(this[offset + 2] << 8) |
|
1334 |
+
this[offset + 3])
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
|
1338 |
+
offset = offset >>> 0
|
1339 |
+
byteLength = byteLength >>> 0
|
1340 |
+
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
1341 |
+
|
1342 |
+
var val = this[offset]
|
1343 |
+
var mul = 1
|
1344 |
+
var i = 0
|
1345 |
+
while (++i < byteLength && (mul *= 0x100)) {
|
1346 |
+
val += this[offset + i] * mul
|
1347 |
+
}
|
1348 |
+
mul *= 0x80
|
1349 |
+
|
1350 |
+
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
1351 |
+
|
1352 |
+
return val
|
1353 |
+
}
|
1354 |
+
|
1355 |
+
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
|
1356 |
+
offset = offset >>> 0
|
1357 |
+
byteLength = byteLength >>> 0
|
1358 |
+
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
1359 |
+
|
1360 |
+
var i = byteLength
|
1361 |
+
var mul = 1
|
1362 |
+
var val = this[offset + --i]
|
1363 |
+
while (i > 0 && (mul *= 0x100)) {
|
1364 |
+
val += this[offset + --i] * mul
|
1365 |
+
}
|
1366 |
+
mul *= 0x80
|
1367 |
+
|
1368 |
+
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
1369 |
+
|
1370 |
+
return val
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
|
1374 |
+
offset = offset >>> 0
|
1375 |
+
if (!noAssert) checkOffset(offset, 1, this.length)
|
1376 |
+
if (!(this[offset] & 0x80)) return (this[offset])
|
1377 |
+
return ((0xff - this[offset] + 1) * -1)
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
|
1381 |
+
offset = offset >>> 0
|
1382 |
+
if (!noAssert) checkOffset(offset, 2, this.length)
|
1383 |
+
var val = this[offset] | (this[offset + 1] << 8)
|
1384 |
+
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
|
1388 |
+
offset = offset >>> 0
|
1389 |
+
if (!noAssert) checkOffset(offset, 2, this.length)
|
1390 |
+
var val = this[offset + 1] | (this[offset] << 8)
|
1391 |
+
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
|
1395 |
+
offset = offset >>> 0
|
1396 |
+
if (!noAssert) checkOffset(offset, 4, this.length)
|
1397 |
+
|
1398 |
+
return (this[offset]) |
|
1399 |
+
(this[offset + 1] << 8) |
|
1400 |
+
(this[offset + 2] << 16) |
|
1401 |
+
(this[offset + 3] << 24)
|
1402 |
+
}
|
1403 |
+
|
1404 |
+
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
|
1405 |
+
offset = offset >>> 0
|
1406 |
+
if (!noAssert) checkOffset(offset, 4, this.length)
|
1407 |
+
|
1408 |
+
return (this[offset] << 24) |
|
1409 |
+
(this[offset + 1] << 16) |
|
1410 |
+
(this[offset + 2] << 8) |
|
1411 |
+
(this[offset + 3])
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
|
1415 |
+
offset = offset >>> 0
|
1416 |
+
if (!noAssert) checkOffset(offset, 4, this.length)
|
1417 |
+
return ieee754.read(this, offset, true, 23, 4)
|
1418 |
+
}
|
1419 |
+
|
1420 |
+
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
|
1421 |
+
offset = offset >>> 0
|
1422 |
+
if (!noAssert) checkOffset(offset, 4, this.length)
|
1423 |
+
return ieee754.read(this, offset, false, 23, 4)
|
1424 |
+
}
|
1425 |
+
|
1426 |
+
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
|
1427 |
+
offset = offset >>> 0
|
1428 |
+
if (!noAssert) checkOffset(offset, 8, this.length)
|
1429 |
+
return ieee754.read(this, offset, true, 52, 8)
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
|
1433 |
+
offset = offset >>> 0
|
1434 |
+
if (!noAssert) checkOffset(offset, 8, this.length)
|
1435 |
+
return ieee754.read(this, offset, false, 52, 8)
|
1436 |
+
}
|
1437 |
+
|
1438 |
+
function checkInt (buf, value, offset, ext, max, min) {
|
1439 |
+
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
|
1440 |
+
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
|
1441 |
+
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
|
1445 |
+
value = +value
|
1446 |
+
offset = offset >>> 0
|
1447 |
+
byteLength = byteLength >>> 0
|
1448 |
+
if (!noAssert) {
|
1449 |
+
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
1450 |
+
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
1451 |
+
}
|
1452 |
+
|
1453 |
+
var mul = 1
|
1454 |
+
var i = 0
|
1455 |
+
this[offset] = value & 0xFF
|
1456 |
+
while (++i < byteLength && (mul *= 0x100)) {
|
1457 |
+
this[offset + i] = (value / mul) & 0xFF
|
1458 |
+
}
|
1459 |
+
|
1460 |
+
return offset + byteLength
|
1461 |
+
}
|
1462 |
+
|
1463 |
+
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
|
1464 |
+
value = +value
|
1465 |
+
offset = offset >>> 0
|
1466 |
+
byteLength = byteLength >>> 0
|
1467 |
+
if (!noAssert) {
|
1468 |
+
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
1469 |
+
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
1470 |
+
}
|
1471 |
+
|
1472 |
+
var i = byteLength - 1
|
1473 |
+
var mul = 1
|
1474 |
+
this[offset + i] = value & 0xFF
|
1475 |
+
while (--i >= 0 && (mul *= 0x100)) {
|
1476 |
+
this[offset + i] = (value / mul) & 0xFF
|
1477 |
+
}
|
1478 |
+
|
1479 |
+
return offset + byteLength
|
1480 |
+
}
|
1481 |
+
|
1482 |
+
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
|
1483 |
+
value = +value
|
1484 |
+
offset = offset >>> 0
|
1485 |
+
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
|
1486 |
+
this[offset] = (value & 0xff)
|
1487 |
+
return offset + 1
|
1488 |
+
}
|
1489 |
+
|
1490 |
+
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
|
1491 |
+
value = +value
|
1492 |
+
offset = offset >>> 0
|
1493 |
+
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
1494 |
+
this[offset] = (value & 0xff)
|
1495 |
+
this[offset + 1] = (value >>> 8)
|
1496 |
+
return offset + 2
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
|
1500 |
+
value = +value
|
1501 |
+
offset = offset >>> 0
|
1502 |
+
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
1503 |
+
this[offset] = (value >>> 8)
|
1504 |
+
this[offset + 1] = (value & 0xff)
|
1505 |
+
return offset + 2
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
|
1509 |
+
value = +value
|
1510 |
+
offset = offset >>> 0
|
1511 |
+
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
1512 |
+
this[offset + 3] = (value >>> 24)
|
1513 |
+
this[offset + 2] = (value >>> 16)
|
1514 |
+
this[offset + 1] = (value >>> 8)
|
1515 |
+
this[offset] = (value & 0xff)
|
1516 |
+
return offset + 4
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
|
1520 |
+
value = +value
|
1521 |
+
offset = offset >>> 0
|
1522 |
+
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
1523 |
+
this[offset] = (value >>> 24)
|
1524 |
+
this[offset + 1] = (value >>> 16)
|
1525 |
+
this[offset + 2] = (value >>> 8)
|
1526 |
+
this[offset + 3] = (value & 0xff)
|
1527 |
+
return offset + 4
|
1528 |
+
}
|
1529 |
+
|
1530 |
+
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
|
1531 |
+
value = +value
|
1532 |
+
offset = offset >>> 0
|
1533 |
+
if (!noAssert) {
|
1534 |
+
var limit = Math.pow(2, (8 * byteLength) - 1)
|
1535 |
+
|
1536 |
+
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
1537 |
+
}
|
1538 |
+
|
1539 |
+
var i = 0
|
1540 |
+
var mul = 1
|
1541 |
+
var sub = 0
|
1542 |
+
this[offset] = value & 0xFF
|
1543 |
+
while (++i < byteLength && (mul *= 0x100)) {
|
1544 |
+
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
1545 |
+
sub = 1
|
1546 |
+
}
|
1547 |
+
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
1548 |
+
}
|
1549 |
+
|
1550 |
+
return offset + byteLength
|
1551 |
+
}
|
1552 |
+
|
1553 |
+
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
|
1554 |
+
value = +value
|
1555 |
+
offset = offset >>> 0
|
1556 |
+
if (!noAssert) {
|
1557 |
+
var limit = Math.pow(2, (8 * byteLength) - 1)
|
1558 |
+
|
1559 |
+
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
1560 |
+
}
|
1561 |
+
|
1562 |
+
var i = byteLength - 1
|
1563 |
+
var mul = 1
|
1564 |
+
var sub = 0
|
1565 |
+
this[offset + i] = value & 0xFF
|
1566 |
+
while (--i >= 0 && (mul *= 0x100)) {
|
1567 |
+
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
1568 |
+
sub = 1
|
1569 |
+
}
|
1570 |
+
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
1571 |
+
}
|
1572 |
+
|
1573 |
+
return offset + byteLength
|
1574 |
+
}
|
1575 |
+
|
1576 |
+
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
1577 |
+
value = +value
|
1578 |
+
offset = offset >>> 0
|
1579 |
+
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
|
1580 |
+
if (value < 0) value = 0xff + value + 1
|
1581 |
+
this[offset] = (value & 0xff)
|
1582 |
+
return offset + 1
|
1583 |
+
}
|
1584 |
+
|
1585 |
+
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
|
1586 |
+
value = +value
|
1587 |
+
offset = offset >>> 0
|
1588 |
+
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
1589 |
+
this[offset] = (value & 0xff)
|
1590 |
+
this[offset + 1] = (value >>> 8)
|
1591 |
+
return offset + 2
|
1592 |
+
}
|
1593 |
+
|
1594 |
+
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
|
1595 |
+
value = +value
|
1596 |
+
offset = offset >>> 0
|
1597 |
+
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
1598 |
+
this[offset] = (value >>> 8)
|
1599 |
+
this[offset + 1] = (value & 0xff)
|
1600 |
+
return offset + 2
|
1601 |
+
}
|
1602 |
+
|
1603 |
+
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
|
1604 |
+
value = +value
|
1605 |
+
offset = offset >>> 0
|
1606 |
+
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
1607 |
+
this[offset] = (value & 0xff)
|
1608 |
+
this[offset + 1] = (value >>> 8)
|
1609 |
+
this[offset + 2] = (value >>> 16)
|
1610 |
+
this[offset + 3] = (value >>> 24)
|
1611 |
+
return offset + 4
|
1612 |
+
}
|
1613 |
+
|
1614 |
+
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
|
1615 |
+
value = +value
|
1616 |
+
offset = offset >>> 0
|
1617 |
+
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
1618 |
+
if (value < 0) value = 0xffffffff + value + 1
|
1619 |
+
this[offset] = (value >>> 24)
|
1620 |
+
this[offset + 1] = (value >>> 16)
|
1621 |
+
this[offset + 2] = (value >>> 8)
|
1622 |
+
this[offset + 3] = (value & 0xff)
|
1623 |
+
return offset + 4
|
1624 |
+
}
|
1625 |
+
|
1626 |
+
function checkIEEE754 (buf, value, offset, ext, max, min) {
|
1627 |
+
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
1628 |
+
if (offset < 0) throw new RangeError('Index out of range')
|
1629 |
+
}
|
1630 |
+
|
1631 |
+
function writeFloat (buf, value, offset, littleEndian, noAssert) {
|
1632 |
+
value = +value
|
1633 |
+
offset = offset >>> 0
|
1634 |
+
if (!noAssert) {
|
1635 |
+
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
1636 |
+
}
|
1637 |
+
ieee754.write(buf, value, offset, littleEndian, 23, 4)
|
1638 |
+
return offset + 4
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
|
1642 |
+
return writeFloat(this, value, offset, true, noAssert)
|
1643 |
+
}
|
1644 |
+
|
1645 |
+
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
|
1646 |
+
return writeFloat(this, value, offset, false, noAssert)
|
1647 |
+
}
|
1648 |
+
|
1649 |
+
function writeDouble (buf, value, offset, littleEndian, noAssert) {
|
1650 |
+
value = +value
|
1651 |
+
offset = offset >>> 0
|
1652 |
+
if (!noAssert) {
|
1653 |
+
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
1654 |
+
}
|
1655 |
+
ieee754.write(buf, value, offset, littleEndian, 52, 8)
|
1656 |
+
return offset + 8
|
1657 |
+
}
|
1658 |
+
|
1659 |
+
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
|
1660 |
+
return writeDouble(this, value, offset, true, noAssert)
|
1661 |
+
}
|
1662 |
+
|
1663 |
+
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
|
1664 |
+
return writeDouble(this, value, offset, false, noAssert)
|
1665 |
+
}
|
1666 |
+
|
1667 |
+
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
1668 |
+
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
|
1669 |
+
if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
|
1670 |
+
if (!start) start = 0
|
1671 |
+
if (!end && end !== 0) end = this.length
|
1672 |
+
if (targetStart >= target.length) targetStart = target.length
|
1673 |
+
if (!targetStart) targetStart = 0
|
1674 |
+
if (end > 0 && end < start) end = start
|
1675 |
+
|
1676 |
+
// Copy 0 bytes; we're done
|
1677 |
+
if (end === start) return 0
|
1678 |
+
if (target.length === 0 || this.length === 0) return 0
|
1679 |
+
|
1680 |
+
// Fatal error conditions
|
1681 |
+
if (targetStart < 0) {
|
1682 |
+
throw new RangeError('targetStart out of bounds')
|
1683 |
+
}
|
1684 |
+
if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
|
1685 |
+
if (end < 0) throw new RangeError('sourceEnd out of bounds')
|
1686 |
+
|
1687 |
+
// Are we oob?
|
1688 |
+
if (end > this.length) end = this.length
|
1689 |
+
if (target.length - targetStart < end - start) {
|
1690 |
+
end = target.length - targetStart + start
|
1691 |
+
}
|
1692 |
+
|
1693 |
+
var len = end - start
|
1694 |
+
|
1695 |
+
if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
|
1696 |
+
// Use built-in when available, missing from IE11
|
1697 |
+
this.copyWithin(targetStart, start, end)
|
1698 |
+
} else if (this === target && start < targetStart && targetStart < end) {
|
1699 |
+
// descending copy from end
|
1700 |
+
for (var i = len - 1; i >= 0; --i) {
|
1701 |
+
target[i + targetStart] = this[i + start]
|
1702 |
+
}
|
1703 |
+
} else {
|
1704 |
+
Uint8Array.prototype.set.call(
|
1705 |
+
target,
|
1706 |
+
this.subarray(start, end),
|
1707 |
+
targetStart
|
1708 |
+
)
|
1709 |
+
}
|
1710 |
+
|
1711 |
+
return len
|
1712 |
+
}
|
1713 |
+
|
1714 |
+
// Usage:
|
1715 |
+
// buffer.fill(number[, offset[, end]])
|
1716 |
+
// buffer.fill(buffer[, offset[, end]])
|
1717 |
+
// buffer.fill(string[, offset[, end]][, encoding])
|
1718 |
+
Buffer.prototype.fill = function fill (val, start, end, encoding) {
|
1719 |
+
// Handle string cases:
|
1720 |
+
if (typeof val === 'string') {
|
1721 |
+
if (typeof start === 'string') {
|
1722 |
+
encoding = start
|
1723 |
+
start = 0
|
1724 |
+
end = this.length
|
1725 |
+
} else if (typeof end === 'string') {
|
1726 |
+
encoding = end
|
1727 |
+
end = this.length
|
1728 |
+
}
|
1729 |
+
if (encoding !== undefined && typeof encoding !== 'string') {
|
1730 |
+
throw new TypeError('encoding must be a string')
|
1731 |
+
}
|
1732 |
+
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
|
1733 |
+
throw new TypeError('Unknown encoding: ' + encoding)
|
1734 |
+
}
|
1735 |
+
if (val.length === 1) {
|
1736 |
+
var code = val.charCodeAt(0)
|
1737 |
+
if ((encoding === 'utf8' && code < 128) ||
|
1738 |
+
encoding === 'latin1') {
|
1739 |
+
// Fast path: If `val` fits into a single byte, use that numeric value.
|
1740 |
+
val = code
|
1741 |
+
}
|
1742 |
+
}
|
1743 |
+
} else if (typeof val === 'number') {
|
1744 |
+
val = val & 255
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
// Invalid ranges are not set to a default, so can range check early.
|
1748 |
+
if (start < 0 || this.length < start || this.length < end) {
|
1749 |
+
throw new RangeError('Out of range index')
|
1750 |
+
}
|
1751 |
+
|
1752 |
+
if (end <= start) {
|
1753 |
+
return this
|
1754 |
+
}
|
1755 |
+
|
1756 |
+
start = start >>> 0
|
1757 |
+
end = end === undefined ? this.length : end >>> 0
|
1758 |
+
|
1759 |
+
if (!val) val = 0
|
1760 |
+
|
1761 |
+
var i
|
1762 |
+
if (typeof val === 'number') {
|
1763 |
+
for (i = start; i < end; ++i) {
|
1764 |
+
this[i] = val
|
1765 |
+
}
|
1766 |
+
} else {
|
1767 |
+
var bytes = Buffer.isBuffer(val)
|
1768 |
+
? val
|
1769 |
+
: Buffer.from(val, encoding)
|
1770 |
+
var len = bytes.length
|
1771 |
+
if (len === 0) {
|
1772 |
+
throw new TypeError('The value "' + val +
|
1773 |
+
'" is invalid for argument "value"')
|
1774 |
+
}
|
1775 |
+
for (i = 0; i < end - start; ++i) {
|
1776 |
+
this[i + start] = bytes[i % len]
|
1777 |
+
}
|
1778 |
+
}
|
1779 |
+
|
1780 |
+
return this
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
// HELPER FUNCTIONS
|
1784 |
+
// ================
|
1785 |
+
|
1786 |
+
var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
|
1787 |
+
|
1788 |
+
function base64clean (str) {
|
1789 |
+
// Node takes equal signs as end of the Base64 encoding
|
1790 |
+
str = str.split('=')[0]
|
1791 |
+
// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
1792 |
+
str = str.trim().replace(INVALID_BASE64_RE, '')
|
1793 |
+
// Node converts strings with length < 2 to ''
|
1794 |
+
if (str.length < 2) return ''
|
1795 |
+
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
1796 |
+
while (str.length % 4 !== 0) {
|
1797 |
+
str = str + '='
|
1798 |
+
}
|
1799 |
+
return str
|
1800 |
+
}
|
1801 |
+
|
1802 |
+
function toHex (n) {
|
1803 |
+
if (n < 16) return '0' + n.toString(16)
|
1804 |
+
return n.toString(16)
|
1805 |
+
}
|
1806 |
+
|
1807 |
+
function utf8ToBytes (string, units) {
|
1808 |
+
units = units || Infinity
|
1809 |
+
var codePoint
|
1810 |
+
var length = string.length
|
1811 |
+
var leadSurrogate = null
|
1812 |
+
var bytes = []
|
1813 |
+
|
1814 |
+
for (var i = 0; i < length; ++i) {
|
1815 |
+
codePoint = string.charCodeAt(i)
|
1816 |
+
|
1817 |
+
// is surrogate component
|
1818 |
+
if (codePoint > 0xD7FF && codePoint < 0xE000) {
|
1819 |
+
// last char was a lead
|
1820 |
+
if (!leadSurrogate) {
|
1821 |
+
// no lead yet
|
1822 |
+
if (codePoint > 0xDBFF) {
|
1823 |
+
// unexpected trail
|
1824 |
+
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
1825 |
+
continue
|
1826 |
+
} else if (i + 1 === length) {
|
1827 |
+
// unpaired lead
|
1828 |
+
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
1829 |
+
continue
|
1830 |
+
}
|
1831 |
+
|
1832 |
+
// valid lead
|
1833 |
+
leadSurrogate = codePoint
|
1834 |
+
|
1835 |
+
continue
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
// 2 leads in a row
|
1839 |
+
if (codePoint < 0xDC00) {
|
1840 |
+
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
1841 |
+
leadSurrogate = codePoint
|
1842 |
+
continue
|
1843 |
+
}
|
1844 |
+
|
1845 |
+
// valid surrogate pair
|
1846 |
+
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
|
1847 |
+
} else if (leadSurrogate) {
|
1848 |
+
// valid bmp char, but last char was a lead
|
1849 |
+
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
leadSurrogate = null
|
1853 |
+
|
1854 |
+
// encode utf8
|
1855 |
+
if (codePoint < 0x80) {
|
1856 |
+
if ((units -= 1) < 0) break
|
1857 |
+
bytes.push(codePoint)
|
1858 |
+
} else if (codePoint < 0x800) {
|
1859 |
+
if ((units -= 2) < 0) break
|
1860 |
+
bytes.push(
|
1861 |
+
codePoint >> 0x6 | 0xC0,
|
1862 |
+
codePoint & 0x3F | 0x80
|
1863 |
+
)
|
1864 |
+
} else if (codePoint < 0x10000) {
|
1865 |
+
if ((units -= 3) < 0) break
|
1866 |
+
bytes.push(
|
1867 |
+
codePoint >> 0xC | 0xE0,
|
1868 |
+
codePoint >> 0x6 & 0x3F | 0x80,
|
1869 |
+
codePoint & 0x3F | 0x80
|
1870 |
+
)
|
1871 |
+
} else if (codePoint < 0x110000) {
|
1872 |
+
if ((units -= 4) < 0) break
|
1873 |
+
bytes.push(
|
1874 |
+
codePoint >> 0x12 | 0xF0,
|
1875 |
+
codePoint >> 0xC & 0x3F | 0x80,
|
1876 |
+
codePoint >> 0x6 & 0x3F | 0x80,
|
1877 |
+
codePoint & 0x3F | 0x80
|
1878 |
+
)
|
1879 |
+
} else {
|
1880 |
+
throw new Error('Invalid code point')
|
1881 |
+
}
|
1882 |
+
}
|
1883 |
+
|
1884 |
+
return bytes
|
1885 |
+
}
|
1886 |
+
|
1887 |
+
function asciiToBytes (str) {
|
1888 |
+
var byteArray = []
|
1889 |
+
for (var i = 0; i < str.length; ++i) {
|
1890 |
+
// Node's code seems to be doing this and not & 0x7F..
|
1891 |
+
byteArray.push(str.charCodeAt(i) & 0xFF)
|
1892 |
+
}
|
1893 |
+
return byteArray
|
1894 |
+
}
|
1895 |
+
|
1896 |
+
function utf16leToBytes (str, units) {
|
1897 |
+
var c, hi, lo
|
1898 |
+
var byteArray = []
|
1899 |
+
for (var i = 0; i < str.length; ++i) {
|
1900 |
+
if ((units -= 2) < 0) break
|
1901 |
+
|
1902 |
+
c = str.charCodeAt(i)
|
1903 |
+
hi = c >> 8
|
1904 |
+
lo = c % 256
|
1905 |
+
byteArray.push(lo)
|
1906 |
+
byteArray.push(hi)
|
1907 |
+
}
|
1908 |
+
|
1909 |
+
return byteArray
|
1910 |
+
}
|
1911 |
+
|
1912 |
+
function base64ToBytes (str) {
|
1913 |
+
return base64.toByteArray(base64clean(str))
|
1914 |
+
}
|
1915 |
+
|
1916 |
+
function blitBuffer (src, dst, offset, length) {
|
1917 |
+
for (var i = 0; i < length; ++i) {
|
1918 |
+
if ((i + offset >= dst.length) || (i >= src.length)) break
|
1919 |
+
dst[i + offset] = src[i]
|
1920 |
+
}
|
1921 |
+
return i
|
1922 |
+
}
|
1923 |
+
|
1924 |
+
// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
|
1925 |
+
// the `instanceof` check but they should be treated as of that type.
|
1926 |
+
// See: https://github.com/feross/buffer/issues/166
|
1927 |
+
function isInstance (obj, type) {
|
1928 |
+
return obj instanceof type ||
|
1929 |
+
(obj != null && obj.constructor != null && obj.constructor.name != null &&
|
1930 |
+
obj.constructor.name === type.name)
|
1931 |
+
}
|
1932 |
+
function numberIsNaN (obj) {
|
1933 |
+
// For IE11 support
|
1934 |
+
return obj !== obj // eslint-disable-line no-self-compare
|
1935 |
+
}
|
1936 |
+
|
1937 |
+
}).call(this,require("buffer").Buffer)
|
1938 |
+
},{"base64-js":1,"buffer":3,"ieee754":4}],4:[function(require,module,exports){
|
1939 |
+
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
1940 |
+
var e, m
|
1941 |
+
var eLen = (nBytes * 8) - mLen - 1
|
1942 |
+
var eMax = (1 << eLen) - 1
|
1943 |
+
var eBias = eMax >> 1
|
1944 |
+
var nBits = -7
|
1945 |
+
var i = isLE ? (nBytes - 1) : 0
|
1946 |
+
var d = isLE ? -1 : 1
|
1947 |
+
var s = buffer[offset + i]
|
1948 |
+
|
1949 |
+
i += d
|
1950 |
+
|
1951 |
+
e = s & ((1 << (-nBits)) - 1)
|
1952 |
+
s >>= (-nBits)
|
1953 |
+
nBits += eLen
|
1954 |
+
for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
1955 |
+
|
1956 |
+
m = e & ((1 << (-nBits)) - 1)
|
1957 |
+
e >>= (-nBits)
|
1958 |
+
nBits += mLen
|
1959 |
+
for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
1960 |
+
|
1961 |
+
if (e === 0) {
|
1962 |
+
e = 1 - eBias
|
1963 |
+
} else if (e === eMax) {
|
1964 |
+
return m ? NaN : ((s ? -1 : 1) * Infinity)
|
1965 |
+
} else {
|
1966 |
+
m = m + Math.pow(2, mLen)
|
1967 |
+
e = e - eBias
|
1968 |
+
}
|
1969 |
+
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
|
1970 |
+
}
|
1971 |
+
|
1972 |
+
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
1973 |
+
var e, m, c
|
1974 |
+
var eLen = (nBytes * 8) - mLen - 1
|
1975 |
+
var eMax = (1 << eLen) - 1
|
1976 |
+
var eBias = eMax >> 1
|
1977 |
+
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
|
1978 |
+
var i = isLE ? 0 : (nBytes - 1)
|
1979 |
+
var d = isLE ? 1 : -1
|
1980 |
+
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
|
1981 |
+
|
1982 |
+
value = Math.abs(value)
|
1983 |
+
|
1984 |
+
if (isNaN(value) || value === Infinity) {
|
1985 |
+
m = isNaN(value) ? 1 : 0
|
1986 |
+
e = eMax
|
1987 |
+
} else {
|
1988 |
+
e = Math.floor(Math.log(value) / Math.LN2)
|
1989 |
+
if (value * (c = Math.pow(2, -e)) < 1) {
|
1990 |
+
e--
|
1991 |
+
c *= 2
|
1992 |
+
}
|
1993 |
+
if (e + eBias >= 1) {
|
1994 |
+
value += rt / c
|
1995 |
+
} else {
|
1996 |
+
value += rt * Math.pow(2, 1 - eBias)
|
1997 |
+
}
|
1998 |
+
if (value * c >= 2) {
|
1999 |
+
e++
|
2000 |
+
c /= 2
|
2001 |
+
}
|
2002 |
+
|
2003 |
+
if (e + eBias >= eMax) {
|
2004 |
+
m = 0
|
2005 |
+
e = eMax
|
2006 |
+
} else if (e + eBias >= 1) {
|
2007 |
+
m = ((value * c) - 1) * Math.pow(2, mLen)
|
2008 |
+
e = e + eBias
|
2009 |
+
} else {
|
2010 |
+
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
|
2011 |
+
e = 0
|
2012 |
+
}
|
2013 |
+
}
|
2014 |
+
|
2015 |
+
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
|
2016 |
+
|
2017 |
+
e = (e << mLen) | m
|
2018 |
+
eLen += mLen
|
2019 |
+
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
|
2020 |
+
|
2021 |
+
buffer[offset + i - d] |= s * 128
|
2022 |
+
}
|
2023 |
+
|
2024 |
+
},{}],5:[function(require,module,exports){
|
2025 |
(function (process){
|
2026 |
// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
|
2027 |
// backported and transplited with Babel, with backwards-compat fixes
|
2327 |
;
|
2328 |
|
2329 |
}).call(this,require('_process'))
|
2330 |
+
},{"_process":6}],6:[function(require,module,exports){
|
2331 |
// shim for using process in browser
|
2332 |
var process = module.exports = {};
|
2333 |
|
2437 |
}
|
2438 |
}
|
2439 |
|
2440 |
+
function drainQueue() {
|
2441 |
+
if (draining) {
|
2442 |
+
return;
|
2443 |
+
}
|
2444 |
+
var timeout = runTimeout(cleanUpNextTick);
|
2445 |
+
draining = true;
|
2446 |
+
|
2447 |
+
var len = queue.length;
|
2448 |
+
while(len) {
|
2449 |
+
currentQueue = queue;
|
2450 |
+
queue = [];
|
2451 |
+
while (++queueIndex < len) {
|
2452 |
+
if (currentQueue) {
|
2453 |
+
currentQueue[queueIndex].run();
|
2454 |
+
}
|
2455 |
+
}
|
2456 |
+
queueIndex = -1;
|
2457 |
+
len = queue.length;
|
2458 |
+
}
|
2459 |
+
currentQueue = null;
|
2460 |
+
draining = false;
|
2461 |
+
runClearTimeout(timeout);
|
2462 |
+
}
|
2463 |
+
|
2464 |
+
process.nextTick = function (fun) {
|
2465 |
+
var args = new Array(arguments.length - 1);
|
2466 |
+
if (arguments.length > 1) {
|
2467 |
+
for (var i = 1; i < arguments.length; i++) {
|
2468 |
+
args[i - 1] = arguments[i];
|
2469 |
+
}
|
2470 |
+
}
|
2471 |
+
queue.push(new Item(fun, args));
|
2472 |
+
if (queue.length === 1 && !draining) {
|
2473 |
+
runTimeout(drainQueue);
|
2474 |
+
}
|
2475 |
+
};
|
2476 |
+
|
2477 |
+
// v8 likes predictible objects
|
2478 |
+
function Item(fun, array) {
|
2479 |
+
this.fun = fun;
|
2480 |
+
this.array = array;
|
2481 |
+
}
|
2482 |
+
Item.prototype.run = function () {
|
2483 |
+
this.fun.apply(null, this.array);
|
2484 |
+
};
|
2485 |
+
process.title = 'browser';
|
2486 |
+
process.browser = true;
|
2487 |
+
process.env = {};
|
2488 |
+
process.argv = [];
|
2489 |
+
process.version = ''; // empty string to avoid regexp issues
|
2490 |
+
process.versions = {};
|
2491 |
+
|
2492 |
+
function noop() {}
|
2493 |
+
|
2494 |
+
process.on = noop;
|
2495 |
+
process.addListener = noop;
|
2496 |
+
process.once = noop;
|
2497 |
+
process.off = noop;
|
2498 |
+
process.removeListener = noop;
|
2499 |
+
process.removeAllListeners = noop;
|
2500 |
+
process.emit = noop;
|
2501 |
+
process.prependListener = noop;
|
2502 |
+
process.prependOnceListener = noop;
|
2503 |
+
|
2504 |
+
process.listeners = function (name) { return [] }
|
2505 |
+
|
2506 |
+
process.binding = function (name) {
|
2507 |
+
throw new Error('process.binding is not supported');
|
2508 |
+
};
|
2509 |
+
|
2510 |
+
process.cwd = function () { return '/' };
|
2511 |
+
process.chdir = function (dir) {
|
2512 |
+
throw new Error('process.chdir is not supported');
|
2513 |
+
};
|
2514 |
+
process.umask = function() { return 0; };
|
2515 |
+
|
2516 |
+
},{}],7:[function(require,module,exports){
|
2517 |
+
(function (global){
|
2518 |
+
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
2519 |
+
;(function(root) {
|
2520 |
+
|
2521 |
+
/** Detect free variables */
|
2522 |
+
var freeExports = typeof exports == 'object' && exports &&
|
2523 |
+
!exports.nodeType && exports;
|
2524 |
+
var freeModule = typeof module == 'object' && module &&
|
2525 |
+
!module.nodeType && module;
|
2526 |
+
var freeGlobal = typeof global == 'object' && global;
|
2527 |
+
if (
|
2528 |
+
freeGlobal.global === freeGlobal ||
|
2529 |
+
freeGlobal.window === freeGlobal ||
|
2530 |
+
freeGlobal.self === freeGlobal
|
2531 |
+
) {
|
2532 |
+
root = freeGlobal;
|
2533 |
+
}
|
2534 |
+
|
2535 |
+
/**
|
2536 |
+
* The `punycode` object.
|
2537 |
+
* @name punycode
|
2538 |
+
* @type Object
|
2539 |
+
*/
|
2540 |
+
var punycode,
|
2541 |
+
|
2542 |
+
/** Highest positive signed 32-bit float value */
|
2543 |
+
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
|
2544 |
+
|
2545 |
+
/** Bootstring parameters */
|
2546 |
+
base = 36,
|
2547 |
+
tMin = 1,
|
2548 |
+
tMax = 26,
|
2549 |
+
skew = 38,
|
2550 |
+
damp = 700,
|
2551 |
+
initialBias = 72,
|
2552 |
+
initialN = 128, // 0x80
|
2553 |
+
delimiter = '-', // '\x2D'
|
2554 |
+
|
2555 |
+
/** Regular expressions */
|
2556 |
+
regexPunycode = /^xn--/,
|
2557 |
+
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
|
2558 |
+
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
|
2559 |
+
|
2560 |
+
/** Error messages */
|
2561 |
+
errors = {
|
2562 |
+
'overflow': 'Overflow: input needs wider integers to process',
|
2563 |
+
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
|
2564 |
+
'invalid-input': 'Invalid input'
|
2565 |
+
},
|
2566 |
+
|
2567 |
+
/** Convenience shortcuts */
|
2568 |
+
baseMinusTMin = base - tMin,
|
2569 |
+
floor = Math.floor,
|
2570 |
+
stringFromCharCode = String.fromCharCode,
|
2571 |
+
|
2572 |
+
/** Temporary variable */
|
2573 |
+
key;
|
2574 |
+
|
2575 |
+
/*--------------------------------------------------------------------------*/
|
2576 |
+
|
2577 |
+
/**
|
2578 |
+
* A generic error utility function.
|
2579 |
+
* @private
|
2580 |
+
* @param {String} type The error type.
|
2581 |
+
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
2582 |
+
*/
|
2583 |
+
function error(type) {
|
2584 |
+
throw new RangeError(errors[type]);
|
2585 |
+
}
|
2586 |
+
|
2587 |
+
/**
|
2588 |
+
* A generic `Array#map` utility function.
|
2589 |
+
* @private
|
2590 |
+
* @param {Array} array The array to iterate over.
|
2591 |
+
* @param {Function} callback The function that gets called for every array
|
2592 |
+
* item.
|
2593 |
+
* @returns {Array} A new array of values returned by the callback function.
|
2594 |
+
*/
|
2595 |
+
function map(array, fn) {
|
2596 |
+
var length = array.length;
|
2597 |
+
var result = [];
|
2598 |
+
while (length--) {
|
2599 |
+
result[length] = fn(array[length]);
|
2600 |
+
}
|
2601 |
+
return result;
|
2602 |
+
}
|
2603 |
+
|
2604 |
+
/**
|
2605 |
+
* A simple `Array#map`-like wrapper to work with domain name strings or email
|
2606 |
+
* addresses.
|
2607 |
+
* @private
|
2608 |
+
* @param {String} domain The domain name or email address.
|
2609 |
+
* @param {Function} callback The function that gets called for every
|
2610 |
+
* character.
|
2611 |
+
* @returns {Array} A new string of characters returned by the callback
|
2612 |
+
* function.
|
2613 |
+
*/
|
2614 |
+
function mapDomain(string, fn) {
|
2615 |
+
var parts = string.split('@');
|
2616 |
+
var result = '';
|
2617 |
+
if (parts.length > 1) {
|
2618 |
+
// In email addresses, only the domain name should be punycoded. Leave
|
2619 |
+
// the local part (i.e. everything up to `@`) intact.
|
2620 |
+
result = parts[0] + '@';
|
2621 |
+
string = parts[1];
|
2622 |
+
}
|
2623 |
+
// Avoid `split(regex)` for IE8 compatibility. See #17.
|
2624 |
+
string = string.replace(regexSeparators, '\x2E');
|
2625 |
+
var labels = string.split('.');
|
2626 |
+
var encoded = map(labels, fn).join('.');
|
2627 |
+
return result + encoded;
|
2628 |
+
}
|
2629 |
+
|
2630 |
+
/**
|
2631 |
+
* Creates an array containing the numeric code points of each Unicode
|
2632 |
+
* character in the string. While JavaScript uses UCS-2 internally,
|
2633 |
+
* this function will convert a pair of surrogate halves (each of which
|
2634 |
+
* UCS-2 exposes as separate characters) into a single code point,
|
2635 |
+
* matching UTF-16.
|
2636 |
+
* @see `punycode.ucs2.encode`
|
2637 |
+
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
2638 |
+
* @memberOf punycode.ucs2
|
2639 |
+
* @name decode
|
2640 |
+
* @param {String} string The Unicode input string (UCS-2).
|
2641 |
+
* @returns {Array} The new array of code points.
|
2642 |
+
*/
|
2643 |
+
function ucs2decode(string) {
|
2644 |
+
var output = [],
|
2645 |
+
counter = 0,
|
2646 |
+
length = string.length,
|
2647 |
+
value,
|
2648 |
+
extra;
|
2649 |
+
while (counter < length) {
|
2650 |
+
value = string.charCodeAt(counter++);
|
2651 |
+
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
2652 |
+
// high surrogate, and there is a next character
|
2653 |
+
extra = string.charCodeAt(counter++);
|
2654 |
+
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
|
2655 |
+
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
2656 |
+
} else {
|
2657 |
+
// unmatched surrogate; only append this code unit, in case the next
|
2658 |
+
// code unit is the high surrogate of a surrogate pair
|
2659 |
+
output.push(value);
|
2660 |
+
counter--;
|
2661 |
+
}
|
2662 |
+
} else {
|
2663 |
+
output.push(value);
|
2664 |
+
}
|
2665 |
+
}
|
2666 |
+
return output;
|
2667 |
+
}
|
2668 |
+
|
2669 |
+
/**
|
2670 |
+
* Creates a string based on an array of numeric code points.
|
2671 |
+
* @see `punycode.ucs2.decode`
|
2672 |
+
* @memberOf punycode.ucs2
|
2673 |
+
* @name encode
|
2674 |
+
* @param {Array} codePoints The array of numeric code points.
|
2675 |
+
* @returns {String} The new Unicode string (UCS-2).
|
2676 |
+
*/
|
2677 |
+
function ucs2encode(array) {
|
2678 |
+
return map(array, function(value) {
|
2679 |
+
var output = '';
|
2680 |
+
if (value > 0xFFFF) {
|
2681 |
+
value -= 0x10000;
|
2682 |
+
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
|
2683 |
+
value = 0xDC00 | value & 0x3FF;
|
2684 |
+
}
|
2685 |
+
output += stringFromCharCode(value);
|
2686 |
+
return output;
|
2687 |
+
}).join('');
|
2688 |
+
}
|
2689 |
+
|
2690 |
+
/**
|
2691 |
+
* Converts a basic code point into a digit/integer.
|
2692 |
+
* @see `digitToBasic()`
|
2693 |
+
* @private
|
2694 |
+
* @param {Number} codePoint The basic numeric code point value.
|
2695 |
+
* @returns {Number} The numeric value of a basic code point (for use in
|
2696 |
+
* representing integers) in the range `0` to `base - 1`, or `base` if
|
2697 |
+
* the code point does not represent a value.
|
2698 |
+
*/
|
2699 |
+
function basicToDigit(codePoint) {
|
2700 |
+
if (codePoint - 48 < 10) {
|
2701 |
+
return codePoint - 22;
|
2702 |
+
}
|
2703 |
+
if (codePoint - 65 < 26) {
|
2704 |
+
return codePoint - 65;
|
2705 |
+
}
|
2706 |
+
if (codePoint - 97 < 26) {
|
2707 |
+
return codePoint - 97;
|
2708 |
+
}
|
2709 |
+
return base;
|
2710 |
+
}
|
2711 |
+
|
2712 |
+
/**
|
2713 |
+
* Converts a digit/integer into a basic code point.
|
2714 |
+
* @see `basicToDigit()`
|
2715 |
+
* @private
|
2716 |
+
* @param {Number} digit The numeric value of a basic code point.
|
2717 |
+
* @returns {Number} The basic code point whose value (when used for
|
2718 |
+
* representing integers) is `digit`, which needs to be in the range
|
2719 |
+
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
2720 |
+
* used; else, the lowercase form is used. The behavior is undefined
|
2721 |
+
* if `flag` is non-zero and `digit` has no uppercase form.
|
2722 |
+
*/
|
2723 |
+
function digitToBasic(digit, flag) {
|
2724 |
+
// 0..25 map to ASCII a..z or A..Z
|
2725 |
+
// 26..35 map to ASCII 0..9
|
2726 |
+
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
2727 |
+
}
|
2728 |
+
|
2729 |
+
/**
|
2730 |
+
* Bias adaptation function as per section 3.4 of RFC 3492.
|
2731 |
+
* https://tools.ietf.org/html/rfc3492#section-3.4
|
2732 |
+
* @private
|
2733 |
+
*/
|
2734 |
+
function adapt(delta, numPoints, firstTime) {
|
2735 |
+
var k = 0;
|
2736 |
+
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
2737 |
+
delta += floor(delta / numPoints);
|
2738 |
+
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
|
2739 |
+
delta = floor(delta / baseMinusTMin);
|
2740 |
+
}
|
2741 |
+
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
2742 |
+
}
|
2743 |
+
|
2744 |
+
/**
|
2745 |
+
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
2746 |
+
* symbols.
|
2747 |
+
* @memberOf punycode
|
2748 |
+
* @param {String} input The Punycode string of ASCII-only symbols.
|
2749 |
+
* @returns {String} The resulting string of Unicode symbols.
|
2750 |
+
*/
|
2751 |
+
function decode(input) {
|
2752 |
+
// Don't use UCS-2
|
2753 |
+
var output = [],
|
2754 |
+
inputLength = input.length,
|
2755 |
+
out,
|
2756 |
+
i = 0,
|
2757 |
+
n = initialN,
|
2758 |
+
bias = initialBias,
|
2759 |
+
basic,
|
2760 |
+
j,
|
2761 |
+
index,
|
2762 |
+
oldi,
|
2763 |
+
w,
|
2764 |
+
k,
|
2765 |
+
digit,
|
2766 |
+
t,
|
2767 |
+
/** Cached calculation results */
|
2768 |
+
baseMinusT;
|
2769 |
+
|
2770 |
+
// Handle the basic code points: let `basic` be the number of input code
|
2771 |
+
// points before the last delimiter, or `0` if there is none, then copy
|
2772 |
+
// the first basic code points to the output.
|
2773 |
+
|
2774 |
+
basic = input.lastIndexOf(delimiter);
|
2775 |
+
if (basic < 0) {
|
2776 |
+
basic = 0;
|
2777 |
+
}
|
2778 |
+
|
2779 |
+
for (j = 0; j < basic; ++j) {
|
2780 |
+
// if it's not a basic code point
|
2781 |
+
if (input.charCodeAt(j) >= 0x80) {
|
2782 |
+
error('not-basic');
|
2783 |
+
}
|
2784 |
+
output.push(input.charCodeAt(j));
|
2785 |
+
}
|
2786 |
+
|
2787 |
+
// Main decoding loop: start just after the last delimiter if any basic code
|
2788 |
+
// points were copied; start at the beginning otherwise.
|
2789 |
+
|
2790 |
+
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
|
2791 |
+
|
2792 |
+
// `index` is the index of the next character to be consumed.
|
2793 |
+
// Decode a generalized variable-length integer into `delta`,
|
2794 |
+
// which gets added to `i`. The overflow checking is easier
|
2795 |
+
// if we increase `i` as we go, then subtract off its starting
|
2796 |
+
// value at the end to obtain `delta`.
|
2797 |
+
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
|
2798 |
+
|
2799 |
+
if (index >= inputLength) {
|
2800 |
+
error('invalid-input');
|
2801 |
+
}
|
2802 |
+
|
2803 |
+
digit = basicToDigit(input.charCodeAt(index++));
|
2804 |
+
|
2805 |
+
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
2806 |
+
error('overflow');
|
2807 |
+
}
|
2808 |
+
|
2809 |
+
i += digit * w;
|
2810 |
+
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
2811 |
+
|
2812 |
+
if (digit < t) {
|
2813 |
+
break;
|
2814 |
+
}
|
2815 |
+
|
2816 |
+
baseMinusT = base - t;
|
2817 |
+
if (w > floor(maxInt / baseMinusT)) {
|
2818 |
+
error('overflow');
|
2819 |
+
}
|
2820 |
+
|
2821 |
+
w *= baseMinusT;
|
2822 |
+
|
2823 |
+
}
|
2824 |
+
|
2825 |
+
out = output.length + 1;
|
2826 |
+
bias = adapt(i - oldi, out, oldi == 0);
|
2827 |
+
|
2828 |
+
// `i` was supposed to wrap around from `out` to `0`,
|
2829 |
+
// incrementing `n` each time, so we'll fix that now:
|
2830 |
+
if (floor(i / out) > maxInt - n) {
|
2831 |
+
error('overflow');
|
2832 |
+
}
|
2833 |
+
|
2834 |
+
n += floor(i / out);
|
2835 |
+
i %= out;
|
2836 |
+
|
2837 |
+
// Insert `n` at position `i` of the output
|
2838 |
+
output.splice(i++, 0, n);
|
2839 |
+
|
2840 |
+
}
|
2841 |
+
|
2842 |
+
return ucs2encode(output);
|
2843 |
+
}
|
2844 |
+
|
2845 |
+
/**
|
2846 |
+
* Converts a string of Unicode symbols (e.g. a domain name label) to a
|
2847 |
+
* Punycode string of ASCII-only symbols.
|
2848 |
+
* @memberOf punycode
|
2849 |
+
* @param {String} input The string of Unicode symbols.
|
2850 |
+
* @returns {String} The resulting Punycode string of ASCII-only symbols.
|
2851 |
+
*/
|
2852 |
+
function encode(input) {
|
2853 |
+
var n,
|
2854 |
+
delta,
|
2855 |
+
handledCPCount,
|
2856 |
+
basicLength,
|
2857 |
+
bias,
|
2858 |
+
j,
|
2859 |
+
m,
|
2860 |
+
q,
|
2861 |
+
k,
|
2862 |
+
t,
|
2863 |
+
currentValue,
|
2864 |
+
output = [],
|
2865 |
+
/** `inputLength` will hold the number of code points in `input`. */
|
2866 |
+
inputLength,
|
2867 |
+
/** Cached calculation results */
|
2868 |
+
handledCPCountPlusOne,
|
2869 |
+
baseMinusT,
|
2870 |
+
qMinusT;
|
2871 |
+
|
2872 |
+
// Convert the input in UCS-2 to Unicode
|
2873 |
+
input = ucs2decode(input);
|
2874 |
+
|
2875 |
+
// Cache the length
|
2876 |
+
inputLength = input.length;
|
2877 |
+
|
2878 |
+
// Initialize the state
|
2879 |
+
n = initialN;
|
2880 |
+
delta = 0;
|
2881 |
+
bias = initialBias;
|
2882 |
+
|
2883 |
+
// Handle the basic code points
|
2884 |
+
for (j = 0; j < inputLength; ++j) {
|
2885 |
+
currentValue = input[j];
|
2886 |
+
if (currentValue < 0x80) {
|
2887 |
+
output.push(stringFromCharCode(currentValue));
|
2888 |
+
}
|
2889 |
+
}
|
2890 |
+
|
2891 |
+
handledCPCount = basicLength = output.length;
|
2892 |
+
|
2893 |
+
// `handledCPCount` is the number of code points that have been handled;
|
2894 |
+
// `basicLength` is the number of basic code points.
|
2895 |
+
|
2896 |
+
// Finish the basic string - if it is not empty - with a delimiter
|
2897 |
+
if (basicLength) {
|
2898 |
+
output.push(delimiter);
|
2899 |
+
}
|
2900 |
+
|
2901 |
+
// Main encoding loop:
|
2902 |
+
while (handledCPCount < inputLength) {
|
2903 |
+
|
2904 |
+
// All non-basic code points < n have been handled already. Find the next
|
2905 |
+
// larger one:
|
2906 |
+
for (m = maxInt, j = 0; j < inputLength; ++j) {
|
2907 |
+
currentValue = input[j];
|
2908 |
+
if (currentValue >= n && currentValue < m) {
|
2909 |
+
m = currentValue;
|
2910 |
+
}
|
2911 |
+
}
|
2912 |
+
|
2913 |
+
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
|
2914 |
+
// but guard against overflow
|
2915 |
+
handledCPCountPlusOne = handledCPCount + 1;
|
2916 |
+
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
2917 |
+
error('overflow');
|
2918 |
+
}
|
2919 |
+
|
2920 |
+
delta += (m - n) * handledCPCountPlusOne;
|
2921 |
+
n = m;
|
2922 |
+
|
2923 |
+
for (j = 0; j < inputLength; ++j) {
|
2924 |
+
currentValue = input[j];
|
2925 |
+
|
2926 |
+
if (currentValue < n && ++delta > maxInt) {
|
2927 |
+
error('overflow');
|
2928 |
+
}
|
2929 |
+
|
2930 |
+
if (currentValue == n) {
|
2931 |
+
// Represent delta as a generalized variable-length integer
|
2932 |
+
for (q = delta, k = base; /* no condition */; k += base) {
|
2933 |
+
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
2934 |
+
if (q < t) {
|
2935 |
+
break;
|
2936 |
+
}
|
2937 |
+
qMinusT = q - t;
|
2938 |
+
baseMinusT = base - t;
|
2939 |
+
output.push(
|
2940 |
+
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
|
2941 |
+
);
|
2942 |
+
q = floor(qMinusT / baseMinusT);
|
2943 |
+
}
|
2944 |
+
|
2945 |
+
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
2946 |
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
2947 |
+
delta = 0;
|
2948 |
+
++handledCPCount;
|
2949 |
+
}
|
2950 |
+
}
|
2951 |
+
|
2952 |
+
++delta;
|
2953 |
+
++n;
|
2954 |
+
|
2955 |
+
}
|
2956 |
+
return output.join('');
|
2957 |
+
}
|
2958 |
+
|
2959 |
+
/**
|
2960 |
+
* Converts a Punycode string representing a domain name or an email address
|
2961 |
+
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
|
2962 |
+
* it doesn't matter if you call it on a string that has already been
|
2963 |
+
* converted to Unicode.
|
2964 |
+
* @memberOf punycode
|
2965 |
+
* @param {String} input The Punycoded domain name or email address to
|
2966 |
+
* convert to Unicode.
|
2967 |
+
* @returns {String} The Unicode representation of the given Punycode
|
2968 |
+
* string.
|
2969 |
+
*/
|
2970 |
+
function toUnicode(input) {
|
2971 |
+
return mapDomain(input, function(string) {
|
2972 |
+
return regexPunycode.test(string)
|
2973 |
+
? decode(string.slice(4).toLowerCase())
|
2974 |
+
: string;
|
2975 |
+
});
|
2976 |
+
}
|
2977 |
+
|
2978 |
+
/**
|
2979 |
+
* Converts a Unicode string representing a domain name or an email address to
|
2980 |
+
* Punycode. Only the non-ASCII parts of the domain name will be converted,
|
2981 |
+
* i.e. it doesn't matter if you call it with a domain that's already in
|
2982 |
+
* ASCII.
|
2983 |
+
* @memberOf punycode
|
2984 |
+
* @param {String} input The domain name or email address to convert, as a
|
2985 |
+
* Unicode string.
|
2986 |
+
* @returns {String} The Punycode representation of the given domain name or
|
2987 |
+
* email address.
|
2988 |
+
*/
|
2989 |
+
function toASCII(input) {
|
2990 |
+
return mapDomain(input, function(string) {
|
2991 |
+
return regexNonASCII.test(string)
|
2992 |
+
? 'xn--' + encode(string)
|
2993 |
+
: string;
|
2994 |
+
});
|
2995 |
+
}
|
2996 |
+
|
2997 |
+
/*--------------------------------------------------------------------------*/
|
2998 |
+
|
2999 |
+
/** Define the public API */
|
3000 |
+
punycode = {
|
3001 |
+
/**
|
3002 |
+
* A string representing the current Punycode.js version number.
|
3003 |
+
* @memberOf punycode
|
3004 |
+
* @type String
|
3005 |
+
*/
|
3006 |
+
'version': '1.4.1',
|
3007 |
+
/**
|
3008 |
+
* An object of methods to convert from JavaScript's internal character
|
3009 |
+
* representation (UCS-2) to Unicode code points, and back.
|
3010 |
+
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
3011 |
+
* @memberOf punycode
|
3012 |
+
* @type Object
|
3013 |
+
*/
|
3014 |
+
'ucs2': {
|
3015 |
+
'decode': ucs2decode,
|
3016 |
+
'encode': ucs2encode
|
3017 |
+
},
|
3018 |
+
'decode': decode,
|
3019 |
+
'encode': encode,
|
3020 |
+
'toASCII': toASCII,
|
3021 |
+
'toUnicode': toUnicode
|
3022 |
+
};
|
3023 |
+
|
3024 |
+
/** Expose `punycode` */
|
3025 |
+
// Some AMD build optimizers, like r.js, check for specific condition patterns
|
3026 |
+
// like the following:
|
3027 |
+
if (
|
3028 |
+
typeof define == 'function' &&
|
3029 |
+
typeof define.amd == 'object' &&
|
3030 |
+
define.amd
|
3031 |
+
) {
|
3032 |
+
define('punycode', function() {
|
3033 |
+
return punycode;
|
3034 |
+
});
|
3035 |
+
} else if (freeExports && freeModule) {
|
3036 |
+
if (module.exports == freeExports) {
|
3037 |
+
// in Node.js, io.js, or RingoJS v0.8.0+
|
3038 |
+
freeModule.exports = punycode;
|
3039 |
+
} else {
|
3040 |
+
// in Narwhal or RingoJS v0.7.0-
|
3041 |
+
for (key in punycode) {
|
3042 |
+
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
|
3043 |
+
}
|
3044 |
+
}
|
3045 |
+
} else {
|
3046 |
+
// in Rhino or a web browser
|
3047 |
+
root.punycode = punycode;
|
3048 |
+
}
|
3049 |
+
|
3050 |
+
}(this));
|
3051 |
+
|
3052 |
+
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
3053 |
+
},{}],8:[function(require,module,exports){
|
3054 |
+
// Copyright Joyent, Inc. and other Node contributors.
|
3055 |
+
//
|
3056 |
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
3057 |
+
// copy of this software and associated documentation files (the
|
3058 |
+
// "Software"), to deal in the Software without restriction, including
|
3059 |
+
// without limitation the rights to use, copy, modify, merge, publish,
|
3060 |
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
3061 |
+
// persons to whom the Software is furnished to do so, subject to the
|
3062 |
+
// following conditions:
|
3063 |
+
//
|
3064 |
+
// The above copyright notice and this permission notice shall be included
|
3065 |
+
// in all copies or substantial portions of the Software.
|
3066 |
+
//
|
3067 |
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
3068 |
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
3069 |
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
3070 |
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
3071 |
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
3072 |
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
3073 |
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
3074 |
+
|
3075 |
+
'use strict';
|
3076 |
+
|
3077 |
+
// If obj.hasOwnProperty has been overridden, then calling
|
3078 |
+
// obj.hasOwnProperty(prop) will break.
|
3079 |
+
// See: https://github.com/joyent/node/issues/1707
|
3080 |
+
function hasOwnProperty(obj, prop) {
|
3081 |
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
3082 |
+
}
|
3083 |
+
|
3084 |
+
module.exports = function(qs, sep, eq, options) {
|
3085 |
+
sep = sep || '&';
|
3086 |
+
eq = eq || '=';
|
3087 |
+
var obj = {};
|
3088 |
+
|
3089 |
+
if (typeof qs !== 'string' || qs.length === 0) {
|
3090 |
+
return obj;
|
3091 |
+
}
|
3092 |
+
|
3093 |
+
var regexp = /\+/g;
|
3094 |
+
qs = qs.split(sep);
|
3095 |
+
|
3096 |
+
var maxKeys = 1000;
|
3097 |
+
if (options && typeof options.maxKeys === 'number') {
|
3098 |
+
maxKeys = options.maxKeys;
|
3099 |
+
}
|
3100 |
+
|
3101 |
+
var len = qs.length;
|
3102 |
+
// maxKeys <= 0 means that we should not limit keys count
|
3103 |
+
if (maxKeys > 0 && len > maxKeys) {
|
3104 |
+
len = maxKeys;
|
3105 |
+
}
|
3106 |
+
|
3107 |
+
for (var i = 0; i < len; ++i) {
|
3108 |
+
var x = qs[i].replace(regexp, '%20'),
|
3109 |
+
idx = x.indexOf(eq),
|
3110 |
+
kstr, vstr, k, v;
|
3111 |
+
|
3112 |
+
if (idx >= 0) {
|
3113 |
+
kstr = x.substr(0, idx);
|
3114 |
+
vstr = x.substr(idx + 1);
|
3115 |
+
} else {
|
3116 |
+
kstr = x;
|
3117 |
+
vstr = '';
|
3118 |
+
}
|
3119 |
+
|
3120 |
+
k = decodeURIComponent(kstr);
|
3121 |
+
v = decodeURIComponent(vstr);
|
3122 |
+
|
3123 |
+
if (!hasOwnProperty(obj, k)) {
|
3124 |
+
obj[k] = v;
|
3125 |
+
} else if (isArray(obj[k])) {
|
3126 |
+
obj[k].push(v);
|
3127 |
+
} else {
|
3128 |
+
obj[k] = [obj[k], v];
|
3129 |
+
}
|
3130 |
+
}
|
3131 |
+
|
3132 |
+
return obj;
|
3133 |
+
};
|
3134 |
+
|
3135 |
+
var isArray = Array.isArray || function (xs) {
|
3136 |
+
return Object.prototype.toString.call(xs) === '[object Array]';
|
3137 |
+
};
|
3138 |
+
|
3139 |
+
},{}],9:[function(require,module,exports){
|
3140 |
+
// Copyright Joyent, Inc. and other Node contributors.
|
3141 |
+
//
|
3142 |
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
3143 |
+
// copy of this software and associated documentation files (the
|
3144 |
+
// "Software"), to deal in the Software without restriction, including
|
3145 |
+
// without limitation the rights to use, copy, modify, merge, publish,
|
3146 |
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
3147 |
+
// persons to whom the Software is furnished to do so, subject to the
|
3148 |
+
// following conditions:
|
3149 |
+
//
|
3150 |
+
// The above copyright notice and this permission notice shall be included
|
3151 |
+
// in all copies or substantial portions of the Software.
|
3152 |
+
//
|
3153 |
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
3154 |
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
3155 |
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
3156 |
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
3157 |
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
3158 |
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
3159 |
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
3160 |
+
|
3161 |
+
'use strict';
|
3162 |
|
3163 |
+
var stringifyPrimitive = function(v) {
|
3164 |
+
switch (typeof v) {
|
3165 |
+
case 'string':
|
3166 |
+
return v;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3167 |
|
3168 |
+
case 'boolean':
|
3169 |
+
return v ? 'true' : 'false';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3170 |
|
3171 |
+
case 'number':
|
3172 |
+
return isFinite(v) ? v : '';
|
3173 |
+
|
3174 |
+
default:
|
3175 |
+
return '';
|
3176 |
+
}
|
|
|
3177 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
3178 |
|
3179 |
+
module.exports = function(obj, sep, eq, name) {
|
3180 |
+
sep = sep || '&';
|
3181 |
+
eq = eq || '=';
|
3182 |
+
if (obj === null) {
|
3183 |
+
obj = undefined;
|
3184 |
+
}
|
3185 |
|
3186 |
+
if (typeof obj === 'object') {
|
3187 |
+
return map(objectKeys(obj), function(k) {
|
3188 |
+
var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
|
3189 |
+
if (isArray(obj[k])) {
|
3190 |
+
return map(obj[k], function(v) {
|
3191 |
+
return ks + encodeURIComponent(stringifyPrimitive(v));
|
3192 |
+
}).join(sep);
|
3193 |
+
} else {
|
3194 |
+
return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
|
3195 |
+
}
|
3196 |
+
}).join(sep);
|
3197 |
|
3198 |
+
}
|
3199 |
|
3200 |
+
if (!name) return '';
|
3201 |
+
return encodeURIComponent(stringifyPrimitive(name)) + eq +
|
3202 |
+
encodeURIComponent(stringifyPrimitive(obj));
|
3203 |
};
|
3204 |
|
3205 |
+
var isArray = Array.isArray || function (xs) {
|
3206 |
+
return Object.prototype.toString.call(xs) === '[object Array]';
|
|
|
3207 |
};
|
|
|
3208 |
|
3209 |
+
function map (xs, f) {
|
3210 |
+
if (xs.map) return xs.map(f);
|
3211 |
+
var res = [];
|
3212 |
+
for (var i = 0; i < xs.length; i++) {
|
3213 |
+
res.push(f(xs[i], i));
|
3214 |
+
}
|
3215 |
+
return res;
|
3216 |
+
}
|
3217 |
+
|
3218 |
+
var objectKeys = Object.keys || function (obj) {
|
3219 |
+
var res = [];
|
3220 |
+
for (var key in obj) {
|
3221 |
+
if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
|
3222 |
+
}
|
3223 |
+
return res;
|
3224 |
+
};
|
3225 |
+
|
3226 |
+
},{}],10:[function(require,module,exports){
|
3227 |
+
'use strict';
|
3228 |
+
|
3229 |
+
exports.decode = exports.parse = require('./decode');
|
3230 |
+
exports.encode = exports.stringify = require('./encode');
|
3231 |
+
|
3232 |
+
},{"./decode":8,"./encode":9}],11:[function(require,module,exports){
|
3233 |
(function (setImmediate,clearImmediate){
|
3234 |
var nextTick = require('process/browser.js').nextTick;
|
3235 |
var apply = Function.prototype.apply;
|
3301 |
}
|
3302 |
});
|
3303 |
|
3304 |
+
return id;
|
3305 |
+
};
|
3306 |
+
|
3307 |
+
exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) {
|
3308 |
+
delete immediateIds[id];
|
3309 |
+
};
|
3310 |
+
}).call(this,require("timers").setImmediate,require("timers").clearImmediate)
|
3311 |
+
},{"process/browser.js":6,"timers":11}],12:[function(require,module,exports){
|
3312 |
+
// Copyright Joyent, Inc. and other Node contributors.
|
3313 |
+
//
|
3314 |
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
3315 |
+
// copy of this software and associated documentation files (the
|
3316 |
+
// "Software"), to deal in the Software without restriction, including
|
3317 |
+
// without limitation the rights to use, copy, modify, merge, publish,
|
3318 |
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
3319 |
+
// persons to whom the Software is furnished to do so, subject to the
|
3320 |
+
// following conditions:
|
3321 |
+
//
|
3322 |
+
// The above copyright notice and this permission notice shall be included
|
3323 |
+
// in all copies or substantial portions of the Software.
|
3324 |
+
//
|
3325 |
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
3326 |
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
3327 |
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
3328 |
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
3329 |
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
3330 |
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
3331 |
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
3332 |
+
|
3333 |
+
'use strict';
|
3334 |
+
|
3335 |
+
var punycode = require('punycode');
|
3336 |
+
var util = require('./util');
|
3337 |
+
|
3338 |
+
exports.parse = urlParse;
|
3339 |
+
exports.resolve = urlResolve;
|
3340 |
+
exports.resolveObject = urlResolveObject;
|
3341 |
+
exports.format = urlFormat;
|
3342 |
+
|
3343 |
+
exports.Url = Url;
|
3344 |
+
|
3345 |
+
function Url() {
|
3346 |
+
this.protocol = null;
|
3347 |
+
this.slashes = null;
|
3348 |
+
this.auth = null;
|
3349 |
+
this.host = null;
|
3350 |
+
this.port = null;
|
3351 |
+
this.hostname = null;
|
3352 |
+
this.hash = null;
|
3353 |
+
this.search = null;
|
3354 |
+
this.query = null;
|
3355 |
+
this.pathname = null;
|
3356 |
+
this.path = null;
|
3357 |
+
this.href = null;
|
3358 |
+
}
|
3359 |
+
|
3360 |
+
// Reference: RFC 3986, RFC 1808, RFC 2396
|
3361 |
+
|
3362 |
+
// define these here so at least they only have to be
|
3363 |
+
// compiled once on the first module load.
|
3364 |
+
var protocolPattern = /^([a-z0-9.+-]+:)/i,
|
3365 |
+
portPattern = /:[0-9]*$/,
|
3366 |
+
|
3367 |
+
// Special case for a simple path URL
|
3368 |
+
simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
|
3369 |
+
|
3370 |
+
// RFC 2396: characters reserved for delimiting URLs.
|
3371 |
+
// We actually just auto-escape these.
|
3372 |
+
delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
|
3373 |
+
|
3374 |
+
// RFC 2396: characters not allowed for various reasons.
|
3375 |
+
unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
|
3376 |
+
|
3377 |
+
// Allowed by RFCs, but cause of XSS attacks. Always escape these.
|
3378 |
+
autoEscape = ['\''].concat(unwise),
|
3379 |
+
// Characters that are never ever allowed in a hostname.
|
3380 |
+
// Note that any invalid chars are also handled, but these
|
3381 |
+
// are the ones that are *expected* to be seen, so we fast-path
|
3382 |
+
// them.
|
3383 |
+
nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
|
3384 |
+
hostEndingChars = ['/', '?', '#'],
|
3385 |
+
hostnameMaxLen = 255,
|
3386 |
+
hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
|
3387 |
+
hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
|
3388 |
+
// protocols that can allow "unsafe" and "unwise" chars.
|
3389 |
+
unsafeProtocol = {
|
3390 |
+
'javascript': true,
|
3391 |
+
'javascript:': true
|
3392 |
+
},
|
3393 |
+
// protocols that never have a hostname.
|
3394 |
+
hostlessProtocol = {
|
3395 |
+
'javascript': true,
|
3396 |
+
'javascript:': true
|
3397 |
+
},
|
3398 |
+
// protocols that always contain a // bit.
|
3399 |
+
slashedProtocol = {
|
3400 |
+
'http': true,
|
3401 |
+
'https': true,
|
3402 |
+
'ftp': true,
|
3403 |
+
'gopher': true,
|
3404 |
+
'file': true,
|
3405 |
+
'http:': true,
|
3406 |
+
'https:': true,
|
3407 |
+
'ftp:': true,
|
3408 |
+
'gopher:': true,
|
3409 |
+
'file:': true
|
3410 |
+
},
|
3411 |
+
querystring = require('querystring');
|
3412 |
+
|
3413 |
+
function urlParse(url, parseQueryString, slashesDenoteHost) {
|
3414 |
+
if (url && util.isObject(url) && url instanceof Url) return url;
|
3415 |
+
|
3416 |
+
var u = new Url;
|
3417 |
+
u.parse(url, parseQueryString, slashesDenoteHost);
|
3418 |
+
return u;
|
3419 |
+
}
|
3420 |
+
|
3421 |
+
Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
|
3422 |
+
if (!util.isString(url)) {
|
3423 |
+
throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
|
3424 |
+
}
|
3425 |
+
|
3426 |
+
// Copy chrome, IE, opera backslash-handling behavior.
|
3427 |
+
// Back slashes before the query string get converted to forward slashes
|
3428 |
+
// See: https://code.google.com/p/chromium/issues/detail?id=25916
|
3429 |
+
var queryIndex = url.indexOf('?'),
|
3430 |
+
splitter =
|
3431 |
+
(queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
|
3432 |
+
uSplit = url.split(splitter),
|
3433 |
+
slashRegex = /\\/g;
|
3434 |
+
uSplit[0] = uSplit[0].replace(slashRegex, '/');
|
3435 |
+
url = uSplit.join(splitter);
|
3436 |
+
|
3437 |
+
var rest = url;
|
3438 |
+
|
3439 |
+
// trim before proceeding.
|
3440 |
+
// This is to support parse stuff like " http://foo.com \n"
|
3441 |
+
rest = rest.trim();
|
3442 |
+
|
3443 |
+
if (!slashesDenoteHost && url.split('#').length === 1) {
|
3444 |
+
// Try fast path regexp
|
3445 |
+
var simplePath = simplePathPattern.exec(rest);
|
3446 |
+
if (simplePath) {
|
3447 |
+
this.path = rest;
|
3448 |
+
this.href = rest;
|
3449 |
+
this.pathname = simplePath[1];
|
3450 |
+
if (simplePath[2]) {
|
3451 |
+
this.search = simplePath[2];
|
3452 |
+
if (parseQueryString) {
|
3453 |
+
this.query = querystring.parse(this.search.substr(1));
|
3454 |
+
} else {
|
3455 |
+
this.query = this.search.substr(1);
|
3456 |
+
}
|
3457 |
+
} else if (parseQueryString) {
|
3458 |
+
this.search = '';
|
3459 |
+
this.query = {};
|
3460 |
+
}
|
3461 |
+
return this;
|
3462 |
+
}
|
3463 |
+
}
|
3464 |
+
|
3465 |
+
var proto = protocolPattern.exec(rest);
|
3466 |
+
if (proto) {
|
3467 |
+
proto = proto[0];
|
3468 |
+
var lowerProto = proto.toLowerCase();
|
3469 |
+
this.protocol = lowerProto;
|
3470 |
+
rest = rest.substr(proto.length);
|
3471 |
+
}
|
3472 |
+
|
3473 |
+
// figure out if it's got a host
|
3474 |
+
// user@server is *always* interpreted as a hostname, and url
|
3475 |
+
// resolution will treat //foo/bar as host=foo,path=bar because that's
|
3476 |
+
// how the browser resolves relative URLs.
|
3477 |
+
if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
|
3478 |
+
var slashes = rest.substr(0, 2) === '//';
|
3479 |
+
if (slashes && !(proto && hostlessProtocol[proto])) {
|
3480 |
+
rest = rest.substr(2);
|
3481 |
+
this.slashes = true;
|
3482 |
+
}
|
3483 |
+
}
|
3484 |
+
|
3485 |
+
if (!hostlessProtocol[proto] &&
|
3486 |
+
(slashes || (proto && !slashedProtocol[proto]))) {
|
3487 |
+
|
3488 |
+
// there's a hostname.
|
3489 |
+
// the first instance of /, ?, ;, or # ends the host.
|
3490 |
+
//
|
3491 |
+
// If there is an @ in the hostname, then non-host chars *are* allowed
|
3492 |
+
// to the left of the last @ sign, unless some host-ending character
|
3493 |
+
// comes *before* the @-sign.
|
3494 |
+
// URLs are obnoxious.
|
3495 |
+
//
|
3496 |
+
// ex:
|
3497 |
+
// http://a@b@c/ => user:a@b host:c
|
3498 |
+
// http://a@b?@c => user:a host:c path:/?@c
|
3499 |
+
|
3500 |
+
// v0.12 TODO(isaacs): This is not quite how Chrome does things.
|
3501 |
+
// Review our test case against browsers more comprehensively.
|
3502 |
+
|
3503 |
+
// find the first instance of any hostEndingChars
|
3504 |
+
var hostEnd = -1;
|
3505 |
+
for (var i = 0; i < hostEndingChars.length; i++) {
|
3506 |
+
var hec = rest.indexOf(hostEndingChars[i]);
|
3507 |
+
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
|
3508 |
+
hostEnd = hec;
|
3509 |
+
}
|
3510 |
+
|
3511 |
+
// at this point, either we have an explicit point where the
|
3512 |
+
// auth portion cannot go past, or the last @ char is the decider.
|
3513 |
+
var auth, atSign;
|
3514 |
+
if (hostEnd === -1) {
|
3515 |
+
// atSign can be anywhere.
|
3516 |
+
atSign = rest.lastIndexOf('@');
|
3517 |
+
} else {
|
3518 |
+
// atSign must be in auth portion.
|
3519 |
+
// http://a@b/c@d => host:b auth:a path:/c@d
|
3520 |
+
atSign = rest.lastIndexOf('@', hostEnd);
|
3521 |
+
}
|
3522 |
+
|
3523 |
+
// Now we have a portion which is definitely the auth.
|
3524 |
+
// Pull that off.
|
3525 |
+
if (atSign !== -1) {
|
3526 |
+
auth = rest.slice(0, atSign);
|
3527 |
+
rest = rest.slice(atSign + 1);
|
3528 |
+
this.auth = decodeURIComponent(auth);
|
3529 |
+
}
|
3530 |
+
|
3531 |
+
// the host is the remaining to the left of the first non-host char
|
3532 |
+
hostEnd = -1;
|
3533 |
+
for (var i = 0; i < nonHostChars.length; i++) {
|
3534 |
+
var hec = rest.indexOf(nonHostChars[i]);
|
3535 |
+
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
|
3536 |
+
hostEnd = hec;
|
3537 |
+
}
|
3538 |
+
// if we still have not hit it, then the entire thing is a host.
|
3539 |
+
if (hostEnd === -1)
|
3540 |
+
hostEnd = rest.length;
|
3541 |
+
|
3542 |
+
this.host = rest.slice(0, hostEnd);
|
3543 |
+
rest = rest.slice(hostEnd);
|
3544 |
+
|
3545 |
+
// pull out port.
|
3546 |
+
this.parseHost();
|
3547 |
+
|
3548 |
+
// we've indicated that there is a hostname,
|
3549 |
+
// so even if it's empty, it has to be present.
|
3550 |
+
this.hostname = this.hostname || '';
|
3551 |
+
|
3552 |
+
// if hostname begins with [ and ends with ]
|
3553 |
+
// assume that it's an IPv6 address.
|
3554 |
+
var ipv6Hostname = this.hostname[0] === '[' &&
|
3555 |
+
this.hostname[this.hostname.length - 1] === ']';
|
3556 |
+
|
3557 |
+
// validate a little.
|
3558 |
+
if (!ipv6Hostname) {
|
3559 |
+
var hostparts = this.hostname.split(/\./);
|
3560 |
+
for (var i = 0, l = hostparts.length; i < l; i++) {
|
3561 |
+
var part = hostparts[i];
|
3562 |
+
if (!part) continue;
|
3563 |
+
if (!part.match(hostnamePartPattern)) {
|
3564 |
+
var newpart = '';
|
3565 |
+
for (var j = 0, k = part.length; j < k; j++) {
|
3566 |
+
if (part.charCodeAt(j) > 127) {
|
3567 |
+
// we replace non-ASCII char with a temporary placeholder
|
3568 |
+
// we need this to make sure size of hostname is not
|
3569 |
+
// broken by replacing non-ASCII by nothing
|
3570 |
+
newpart += 'x';
|
3571 |
+
} else {
|
3572 |
+
newpart += part[j];
|
3573 |
+
}
|
3574 |
+
}
|
3575 |
+
// we test again with ASCII char only
|
3576 |
+
if (!newpart.match(hostnamePartPattern)) {
|
3577 |
+
var validParts = hostparts.slice(0, i);
|
3578 |
+
var notHost = hostparts.slice(i + 1);
|
3579 |
+
var bit = part.match(hostnamePartStart);
|
3580 |
+
if (bit) {
|
3581 |
+
validParts.push(bit[1]);
|
3582 |
+
notHost.unshift(bit[2]);
|
3583 |
+
}
|
3584 |
+
if (notHost.length) {
|
3585 |
+
rest = '/' + notHost.join('.') + rest;
|
3586 |
+
}
|
3587 |
+
this.hostname = validParts.join('.');
|
3588 |
+
break;
|
3589 |
+
}
|
3590 |
+
}
|
3591 |
+
}
|
3592 |
+
}
|
3593 |
+
|
3594 |
+
if (this.hostname.length > hostnameMaxLen) {
|
3595 |
+
this.hostname = '';
|
3596 |
+
} else {
|
3597 |
+
// hostnames are always lower case.
|
3598 |
+
this.hostname = this.hostname.toLowerCase();
|
3599 |
+
}
|
3600 |
+
|
3601 |
+
if (!ipv6Hostname) {
|
3602 |
+
// IDNA Support: Returns a punycoded representation of "domain".
|
3603 |
+
// It only converts parts of the domain name that
|
3604 |
+
// have non-ASCII characters, i.e. it doesn't matter if
|
3605 |
+
// you call it with a domain that already is ASCII-only.
|
3606 |
+
this.hostname = punycode.toASCII(this.hostname);
|
3607 |
+
}
|
3608 |
+
|
3609 |
+
var p = this.port ? ':' + this.port : '';
|
3610 |
+
var h = this.hostname || '';
|
3611 |
+
this.host = h + p;
|
3612 |
+
this.href += this.host;
|
3613 |
+
|
3614 |
+
// strip [ and ] from the hostname
|
3615 |
+
// the host field still retains them, though
|
3616 |
+
if (ipv6Hostname) {
|
3617 |
+
this.hostname = this.hostname.substr(1, this.hostname.length - 2);
|
3618 |
+
if (rest[0] !== '/') {
|
3619 |
+
rest = '/' + rest;
|
3620 |
+
}
|
3621 |
+
}
|
3622 |
+
}
|
3623 |
+
|
3624 |
+
// now rest is set to the post-host stuff.
|
3625 |
+
// chop off any delim chars.
|
3626 |
+
if (!unsafeProtocol[lowerProto]) {
|
3627 |
+
|
3628 |
+
// First, make 100% sure that any "autoEscape" chars get
|
3629 |
+
// escaped, even if encodeURIComponent doesn't think they
|
3630 |
+
// need to be.
|
3631 |
+
for (var i = 0, l = autoEscape.length; i < l; i++) {
|
3632 |
+
var ae = autoEscape[i];
|
3633 |
+
if (rest.indexOf(ae) === -1)
|
3634 |
+
continue;
|
3635 |
+
var esc = encodeURIComponent(ae);
|
3636 |
+
if (esc === ae) {
|
3637 |
+
esc = escape(ae);
|
3638 |
+
}
|
3639 |
+
rest = rest.split(ae).join(esc);
|
3640 |
+
}
|
3641 |
+
}
|
3642 |
+
|
3643 |
+
|
3644 |
+
// chop off from the tail first.
|
3645 |
+
var hash = rest.indexOf('#');
|
3646 |
+
if (hash !== -1) {
|
3647 |
+
// got a fragment string.
|
3648 |
+
this.hash = rest.substr(hash);
|
3649 |
+
rest = rest.slice(0, hash);
|
3650 |
+
}
|
3651 |
+
var qm = rest.indexOf('?');
|
3652 |
+
if (qm !== -1) {
|
3653 |
+
this.search = rest.substr(qm);
|
3654 |
+
this.query = rest.substr(qm + 1);
|
3655 |
+
if (parseQueryString) {
|
3656 |
+
this.query = querystring.parse(this.query);
|
3657 |
+
}
|
3658 |
+
rest = rest.slice(0, qm);
|
3659 |
+
} else if (parseQueryString) {
|
3660 |
+
// no query string, but parseQueryString still requested
|
3661 |
+
this.search = '';
|
3662 |
+
this.query = {};
|
3663 |
+
}
|
3664 |
+
if (rest) this.pathname = rest;
|
3665 |
+
if (slashedProtocol[lowerProto] &&
|
3666 |
+
this.hostname && !this.pathname) {
|
3667 |
+
this.pathname = '/';
|
3668 |
+
}
|
3669 |
+
|
3670 |
+
//to support http.request
|
3671 |
+
if (this.pathname || this.search) {
|
3672 |
+
var p = this.pathname || '';
|
3673 |
+
var s = this.search || '';
|
3674 |
+
this.path = p + s;
|
3675 |
+
}
|
3676 |
+
|
3677 |
+
// finally, reconstruct the href based on what has been validated.
|
3678 |
+
this.href = this.format();
|
3679 |
+
return this;
|
3680 |
+
};
|
3681 |
+
|
3682 |
+
// format a parsed object into a url string
|
3683 |
+
function urlFormat(obj) {
|
3684 |
+
// ensure it's an object, and not a string url.
|
3685 |
+
// If it's an obj, this is a no-op.
|
3686 |
+
// this way, you can call url_format() on strings
|
3687 |
+
// to clean up potentially wonky urls.
|
3688 |
+
if (util.isString(obj)) obj = urlParse(obj);
|
3689 |
+
if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
|
3690 |
+
return obj.format();
|
3691 |
+
}
|
3692 |
+
|
3693 |
+
Url.prototype.format = function() {
|
3694 |
+
var auth = this.auth || '';
|
3695 |
+
if (auth) {
|
3696 |
+
auth = encodeURIComponent(auth);
|
3697 |
+
auth = auth.replace(/%3A/i, ':');
|
3698 |
+
auth += '@';
|
3699 |
+
}
|
3700 |
+
|
3701 |
+
var protocol = this.protocol || '',
|
3702 |
+
pathname = this.pathname || '',
|
3703 |
+
hash = this.hash || '',
|
3704 |
+
host = false,
|
3705 |
+
query = '';
|
3706 |
+
|
3707 |
+
if (this.host) {
|
3708 |
+
host = auth + this.host;
|
3709 |
+
} else if (this.hostname) {
|
3710 |
+
host = auth + (this.hostname.indexOf(':') === -1 ?
|
3711 |
+
this.hostname :
|
3712 |
+
'[' + this.hostname + ']');
|
3713 |
+
if (this.port) {
|
3714 |
+
host += ':' + this.port;
|
3715 |
+
}
|
3716 |
+
}
|
3717 |
+
|
3718 |
+
if (this.query &&
|
3719 |
+
util.isObject(this.query) &&
|
3720 |
+
Object.keys(this.query).length) {
|
3721 |
+
query = querystring.stringify(this.query);
|
3722 |
+
}
|
3723 |
+
|
3724 |
+
var search = this.search || (query && ('?' + query)) || '';
|
3725 |
+
|
3726 |
+
if (protocol && protocol.substr(-1) !== ':') protocol += ':';
|
3727 |
+
|
3728 |
+
// only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
|
3729 |
+
// unless they had them to begin with.
|
3730 |
+
if (this.slashes ||
|
3731 |
+
(!protocol || slashedProtocol[protocol]) && host !== false) {
|
3732 |
+
host = '//' + (host || '');
|
3733 |
+
if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
|
3734 |
+
} else if (!host) {
|
3735 |
+
host = '';
|
3736 |
+
}
|
3737 |
+
|
3738 |
+
if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
|
3739 |
+
if (search && search.charAt(0) !== '?') search = '?' + search;
|
3740 |
+
|
3741 |
+
pathname = pathname.replace(/[?#]/g, function(match) {
|
3742 |
+
return encodeURIComponent(match);
|
3743 |
+
});
|
3744 |
+
search = search.replace('#', '%23');
|
3745 |
+
|
3746 |
+
return protocol + host + pathname + search + hash;
|
3747 |
+
};
|
3748 |
+
|
3749 |
+
function urlResolve(source, relative) {
|
3750 |
+
return urlParse(source, false, true).resolve(relative);
|
3751 |
+
}
|
3752 |
+
|
3753 |
+
Url.prototype.resolve = function(relative) {
|
3754 |
+
return this.resolveObject(urlParse(relative, false, true)).format();
|
3755 |
+
};
|
3756 |
+
|
3757 |
+
function urlResolveObject(source, relative) {
|
3758 |
+
if (!source) return relative;
|
3759 |
+
return urlParse(source, false, true).resolveObject(relative);
|
3760 |
+
}
|
3761 |
+
|
3762 |
+
Url.prototype.resolveObject = function(relative) {
|
3763 |
+
if (util.isString(relative)) {
|
3764 |
+
var rel = new Url();
|
3765 |
+
rel.parse(relative, false, true);
|
3766 |
+
relative = rel;
|
3767 |
+
}
|
3768 |
+
|
3769 |
+
var result = new Url();
|
3770 |
+
var tkeys = Object.keys(this);
|
3771 |
+
for (var tk = 0; tk < tkeys.length; tk++) {
|
3772 |
+
var tkey = tkeys[tk];
|
3773 |
+
result[tkey] = this[tkey];
|
3774 |
+
}
|
3775 |
+
|
3776 |
+
// hash is always overridden, no matter what.
|
3777 |
+
// even href="" will remove it.
|
3778 |
+
result.hash = relative.hash;
|
3779 |
+
|
3780 |
+
// if the relative url is empty, then there's nothing left to do here.
|
3781 |
+
if (relative.href === '') {
|
3782 |
+
result.href = result.format();
|
3783 |
+
return result;
|
3784 |
+
}
|
3785 |
+
|
3786 |
+
// hrefs like //foo/bar always cut to the protocol.
|
3787 |
+
if (relative.slashes && !relative.protocol) {
|
3788 |
+
// take everything except the protocol from relative
|
3789 |
+
var rkeys = Object.keys(relative);
|
3790 |
+
for (var rk = 0; rk < rkeys.length; rk++) {
|
3791 |
+
var rkey = rkeys[rk];
|
3792 |
+
if (rkey !== 'protocol')
|
3793 |
+
result[rkey] = relative[rkey];
|
3794 |
+
}
|
3795 |
+
|
3796 |
+
//urlParse appends trailing / to urls like http://www.example.com
|
3797 |
+
if (slashedProtocol[result.protocol] &&
|
3798 |
+
result.hostname && !result.pathname) {
|
3799 |
+
result.path = result.pathname = '/';
|
3800 |
+
}
|
3801 |
+
|
3802 |
+
result.href = result.format();
|
3803 |
+
return result;
|
3804 |
+
}
|
3805 |
+
|
3806 |
+
if (relative.protocol && relative.protocol !== result.protocol) {
|
3807 |
+
// if it's a known url protocol, then changing
|
3808 |
+
// the protocol does weird things
|
3809 |
+
// first, if it's not file:, then we MUST have a host,
|
3810 |
+
// and if there was a path
|
3811 |
+
// to begin with, then we MUST have a path.
|
3812 |
+
// if it is file:, then the host is dropped,
|
3813 |
+
// because that's known to be hostless.
|
3814 |
+
// anything else is assumed to be absolute.
|
3815 |
+
if (!slashedProtocol[relative.protocol]) {
|
3816 |
+
var keys = Object.keys(relative);
|
3817 |
+
for (var v = 0; v < keys.length; v++) {
|
3818 |
+
var k = keys[v];
|
3819 |
+
result[k] = relative[k];
|
3820 |
+
}
|
3821 |
+
result.href = result.format();
|
3822 |
+
return result;
|
3823 |
+
}
|
3824 |
+
|
3825 |
+
result.protocol = relative.protocol;
|
3826 |
+
if (!relative.host && !hostlessProtocol[relative.protocol]) {
|
3827 |
+
var relPath = (relative.pathname || '').split('/');
|
3828 |
+
while (relPath.length && !(relative.host = relPath.shift()));
|
3829 |
+
if (!relative.host) relative.host = '';
|
3830 |
+
if (!relative.hostname) relative.hostname = '';
|
3831 |
+
if (relPath[0] !== '') relPath.unshift('');
|
3832 |
+
if (relPath.length < 2) relPath.unshift('');
|
3833 |
+
result.pathname = relPath.join('/');
|
3834 |
+
} else {
|
3835 |
+
result.pathname = relative.pathname;
|
3836 |
+
}
|
3837 |
+
result.search = relative.search;
|
3838 |
+
result.query = relative.query;
|
3839 |
+
result.host = relative.host || '';
|
3840 |
+
result.auth = relative.auth;
|
3841 |
+
result.hostname = relative.hostname || relative.host;
|
3842 |
+
result.port = relative.port;
|
3843 |
+
// to support http.request
|
3844 |
+
if (result.pathname || result.search) {
|
3845 |
+
var p = result.pathname || '';
|
3846 |
+
var s = result.search || '';
|
3847 |
+
result.path = p + s;
|
3848 |
+
}
|
3849 |
+
result.slashes = result.slashes || relative.slashes;
|
3850 |
+
result.href = result.format();
|
3851 |
+
return result;
|
3852 |
+
}
|
3853 |
+
|
3854 |
+
var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
|
3855 |
+
isRelAbs = (
|
3856 |
+
relative.host ||
|
3857 |
+
relative.pathname && relative.pathname.charAt(0) === '/'
|
3858 |
+
),
|
3859 |
+
mustEndAbs = (isRelAbs || isSourceAbs ||
|
3860 |
+
(result.host && relative.pathname)),
|
3861 |
+
removeAllDots = mustEndAbs,
|
3862 |
+
srcPath = result.pathname && result.pathname.split('/') || [],
|
3863 |
+
relPath = relative.pathname && relative.pathname.split('/') || [],
|
3864 |
+
psychotic = result.protocol && !slashedProtocol[result.protocol];
|
3865 |
+
|
3866 |
+
// if the url is a non-slashed url, then relative
|
3867 |
+
// links like ../.. should be able
|
3868 |
+
// to crawl up to the hostname, as well. This is strange.
|
3869 |
+
// result.protocol has already been set by now.
|
3870 |
+
// Later on, put the first path part into the host field.
|
3871 |
+
if (psychotic) {
|
3872 |
+
result.hostname = '';
|
3873 |
+
result.port = null;
|
3874 |
+
if (result.host) {
|
3875 |
+
if (srcPath[0] === '') srcPath[0] = result.host;
|
3876 |
+
else srcPath.unshift(result.host);
|
3877 |
+
}
|
3878 |
+
result.host = '';
|
3879 |
+
if (relative.protocol) {
|
3880 |
+
relative.hostname = null;
|
3881 |
+
relative.port = null;
|
3882 |
+
if (relative.host) {
|
3883 |
+
if (relPath[0] === '') relPath[0] = relative.host;
|
3884 |
+
else relPath.unshift(relative.host);
|
3885 |
+
}
|
3886 |
+
relative.host = null;
|
3887 |
+
}
|
3888 |
+
mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
|
3889 |
+
}
|
3890 |
+
|
3891 |
+
if (isRelAbs) {
|
3892 |
+
// it's absolute.
|
3893 |
+
result.host = (relative.host || relative.host === '') ?
|
3894 |
+
relative.host : result.host;
|
3895 |
+
result.hostname = (relative.hostname || relative.hostname === '') ?
|
3896 |
+
relative.hostname : result.hostname;
|
3897 |
+
result.search = relative.search;
|
3898 |
+
result.query = relative.query;
|
3899 |
+
srcPath = relPath;
|
3900 |
+
// fall through to the dot-handling below.
|
3901 |
+
} else if (relPath.length) {
|
3902 |
+
// it's relative
|
3903 |
+
// throw away the existing file, and take the new path instead.
|
3904 |
+
if (!srcPath) srcPath = [];
|
3905 |
+
srcPath.pop();
|
3906 |
+
srcPath = srcPath.concat(relPath);
|
3907 |
+
result.search = relative.search;
|
3908 |
+
result.query = relative.query;
|
3909 |
+
} else if (!util.isNullOrUndefined(relative.search)) {
|
3910 |
+
// just pull out the search.
|
3911 |
+
// like href='?foo'.
|
3912 |
+
// Put this after the other two cases because it simplifies the booleans
|
3913 |
+
if (psychotic) {
|
3914 |
+
result.hostname = result.host = srcPath.shift();
|
3915 |
+
//occationaly the auth can get stuck only in host
|
3916 |
+
//this especially happens in cases like
|
3917 |
+
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
|
3918 |
+
var authInHost = result.host && result.host.indexOf('@') > 0 ?
|
3919 |
+
result.host.split('@') : false;
|
3920 |
+
if (authInHost) {
|
3921 |
+
result.auth = authInHost.shift();
|
3922 |
+
result.host = result.hostname = authInHost.shift();
|
3923 |
+
}
|
3924 |
+
}
|
3925 |
+
result.search = relative.search;
|
3926 |
+
result.query = relative.query;
|
3927 |
+
//to support http.request
|
3928 |
+
if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
|
3929 |
+
result.path = (result.pathname ? result.pathname : '') +
|
3930 |
+
(result.search ? result.search : '');
|
3931 |
+
}
|
3932 |
+
result.href = result.format();
|
3933 |
+
return result;
|
3934 |
+
}
|
3935 |
+
|
3936 |
+
if (!srcPath.length) {
|
3937 |
+
// no path at all. easy.
|
3938 |
+
// we've already handled the other stuff above.
|
3939 |
+
result.pathname = null;
|
3940 |
+
//to support http.request
|
3941 |
+
if (result.search) {
|
3942 |
+
result.path = '/' + result.search;
|
3943 |
+
} else {
|
3944 |
+
result.path = null;
|
3945 |
+
}
|
3946 |
+
result.href = result.format();
|
3947 |
+
return result;
|
3948 |
+
}
|
3949 |
+
|
3950 |
+
// if a url ENDs in . or .., then it must get a trailing slash.
|
3951 |
+
// however, if it ends in anything else non-slashy,
|
3952 |
+
// then it must NOT get a trailing slash.
|
3953 |
+
var last = srcPath.slice(-1)[0];
|
3954 |
+
var hasTrailingSlash = (
|
3955 |
+
(result.host || relative.host || srcPath.length > 1) &&
|
3956 |
+
(last === '.' || last === '..') || last === '');
|
3957 |
+
|
3958 |
+
// strip single dots, resolve double dots to parent dir
|
3959 |
+
// if the path tries to go above the root, `up` ends up > 0
|
3960 |
+
var up = 0;
|
3961 |
+
for (var i = srcPath.length; i >= 0; i--) {
|
3962 |
+
last = srcPath[i];
|
3963 |
+
if (last === '.') {
|
3964 |
+
srcPath.splice(i, 1);
|
3965 |
+
} else if (last === '..') {
|
3966 |
+
srcPath.splice(i, 1);
|
3967 |
+
up++;
|
3968 |
+
} else if (up) {
|
3969 |
+
srcPath.splice(i, 1);
|
3970 |
+
up--;
|
3971 |
+
}
|
3972 |
+
}
|
3973 |
+
|
3974 |
+
// if the path is allowed to go above the root, restore leading ..s
|
3975 |
+
if (!mustEndAbs && !removeAllDots) {
|
3976 |
+
for (; up--; up) {
|
3977 |
+
srcPath.unshift('..');
|
3978 |
+
}
|
3979 |
+
}
|
3980 |
+
|
3981 |
+
if (mustEndAbs && srcPath[0] !== '' &&
|
3982 |
+
(!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
|
3983 |
+
srcPath.unshift('');
|
3984 |
+
}
|
3985 |
+
|
3986 |
+
if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
|
3987 |
+
srcPath.push('');
|
3988 |
+
}
|
3989 |
+
|
3990 |
+
var isAbsolute = srcPath[0] === '' ||
|
3991 |
+
(srcPath[0] && srcPath[0].charAt(0) === '/');
|
3992 |
+
|
3993 |
+
// put the host back
|
3994 |
+
if (psychotic) {
|
3995 |
+
result.hostname = result.host = isAbsolute ? '' :
|
3996 |
+
srcPath.length ? srcPath.shift() : '';
|
3997 |
+
//occationaly the auth can get stuck only in host
|
3998 |
+
//this especially happens in cases like
|
3999 |
+
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
|
4000 |
+
var authInHost = result.host && result.host.indexOf('@') > 0 ?
|
4001 |
+
result.host.split('@') : false;
|
4002 |
+
if (authInHost) {
|
4003 |
+
result.auth = authInHost.shift();
|
4004 |
+
result.host = result.hostname = authInHost.shift();
|
4005 |
+
}
|
4006 |
+
}
|
4007 |
+
|
4008 |
+
mustEndAbs = mustEndAbs || (result.host && srcPath.length);
|
4009 |
+
|
4010 |
+
if (mustEndAbs && !isAbsolute) {
|
4011 |
+
srcPath.unshift('');
|
4012 |
+
}
|
4013 |
+
|
4014 |
+
if (!srcPath.length) {
|
4015 |
+
result.pathname = null;
|
4016 |
+
result.path = null;
|
4017 |
+
} else {
|
4018 |
+
result.pathname = srcPath.join('/');
|
4019 |
+
}
|
4020 |
+
|
4021 |
+
//to support request.http
|
4022 |
+
if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
|
4023 |
+
result.path = (result.pathname ? result.pathname : '') +
|
4024 |
+
(result.search ? result.search : '');
|
4025 |
+
}
|
4026 |
+
result.auth = relative.auth || result.auth;
|
4027 |
+
result.slashes = result.slashes || relative.slashes;
|
4028 |
+
result.href = result.format();
|
4029 |
+
return result;
|
4030 |
};
|
4031 |
|
4032 |
+
Url.prototype.parseHost = function() {
|
4033 |
+
var host = this.host;
|
4034 |
+
var port = portPattern.exec(host);
|
4035 |
+
if (port) {
|
4036 |
+
port = port[0];
|
4037 |
+
if (port !== ':') {
|
4038 |
+
this.port = port.substr(1);
|
4039 |
+
}
|
4040 |
+
host = host.substr(0, host.length - port.length);
|
4041 |
+
}
|
4042 |
+
if (host) this.hostname = host;
|
4043 |
};
|
4044 |
+
|
4045 |
+
},{"./util":13,"punycode":7,"querystring":10}],13:[function(require,module,exports){
|
4046 |
+
'use strict';
|
4047 |
+
|
4048 |
+
module.exports = {
|
4049 |
+
isString: function(arg) {
|
4050 |
+
return typeof(arg) === 'string';
|
4051 |
+
},
|
4052 |
+
isObject: function(arg) {
|
4053 |
+
return typeof(arg) === 'object' && arg !== null;
|
4054 |
+
},
|
4055 |
+
isNull: function(arg) {
|
4056 |
+
return arg === null;
|
4057 |
+
},
|
4058 |
+
isNullOrUndefined: function(arg) {
|
4059 |
+
return arg == null;
|
4060 |
+
}
|
4061 |
+
};
|
4062 |
+
|
4063 |
+
},{}],14:[function(require,module,exports){
|
4064 |
//This is for browserify to build the required CSS module into something we can use in the browser.
|
4065 |
window.css = require('css');
|
4066 |
|
4067 |
+
},{"css":16}],15:[function(require,module,exports){
|
4068 |
+
(function (Buffer){
|
4069 |
+
(function (w) {
|
4070 |
+
"use strict";
|
4071 |
+
|
4072 |
+
function findBest(atobNative) {
|
4073 |
+
// normal window
|
4074 |
+
if ('function' === typeof atobNative) { return atobNative; }
|
4075 |
+
|
4076 |
+
|
4077 |
+
// browserify (web worker)
|
4078 |
+
if ('function' === typeof Buffer) {
|
4079 |
+
return function atobBrowserify(a) {
|
4080 |
+
//!! Deliberately using an API that's deprecated in node.js because
|
4081 |
+
//!! this file is for browsers and we expect them to cope with it.
|
4082 |
+
//!! Discussion: github.com/node-browser-compat/atob/pull/9
|
4083 |
+
return new Buffer(a, 'base64').toString('binary');
|
4084 |
+
};
|
4085 |
+
}
|
4086 |
+
|
4087 |
+
// ios web worker with base64js
|
4088 |
+
if ('object' === typeof w.base64js) {
|
4089 |
+
// bufferToBinaryString
|
4090 |
+
// https://git.coolaj86.com/coolaj86/unibabel.js/blob/master/index.js#L50
|
4091 |
+
return function atobWebWorker_iOS(a) {
|
4092 |
+
var buf = w.base64js.b64ToByteArray(a);
|
4093 |
+
return Array.prototype.map.call(buf, function (ch) {
|
4094 |
+
return String.fromCharCode(ch);
|
4095 |
+
}).join('');
|
4096 |
+
};
|
4097 |
+
}
|
4098 |
+
|
4099 |
+
return function () {
|
4100 |
+
// ios web worker without base64js
|
4101 |
+
throw new Error("You're probably in an old browser or an iOS webworker." +
|
4102 |
+
" It might help to include beatgammit's base64-js.");
|
4103 |
+
};
|
4104 |
+
}
|
4105 |
+
|
4106 |
+
var atobBest = findBest(w.atob);
|
4107 |
+
w.atob = atobBest;
|
4108 |
+
|
4109 |
+
if ((typeof module === 'object') && module && module.exports) {
|
4110 |
+
module.exports = atobBest;
|
4111 |
+
}
|
4112 |
+
}(window));
|
4113 |
+
|
4114 |
+
}).call(this,require("buffer").Buffer)
|
4115 |
+
},{"buffer":3}],16:[function(require,module,exports){
|
4116 |
exports.parse = require('./lib/parse');
|
4117 |
exports.stringify = require('./lib/stringify');
|
4118 |
|
4119 |
+
},{"./lib/parse":17,"./lib/stringify":21}],17:[function(require,module,exports){
|
4120 |
// http://www.w3.org/TR/CSS21/grammar.html
|
4121 |
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
|
4122 |
var commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g
|
4721 |
return obj;
|
4722 |
}
|
4723 |
|
4724 |
+
},{}],18:[function(require,module,exports){
|
4725 |
|
4726 |
/**
|
4727 |
* Expose `Compiler`.
|
4773 |
return buf;
|
4774 |
};
|
4775 |
|
4776 |
+
},{}],19:[function(require,module,exports){
|
4777 |
|
4778 |
/**
|
4779 |
* Module dependencies.
|
4974 |
};
|
4975 |
|
4976 |
|
4977 |
+
},{"./compiler":18,"inherits":24}],20:[function(require,module,exports){
|
4978 |
|
4979 |
/**
|
4980 |
* Module dependencies.
|
5230 |
return Array(this.level).join(this.indentation || ' ');
|
5231 |
};
|
5232 |
|
5233 |
+
},{"./compiler":18,"inherits":24}],21:[function(require,module,exports){
|
5234 |
|
5235 |
/**
|
5236 |
* Module dependencies.
|
5279 |
return code;
|
5280 |
};
|
5281 |
|
5282 |
+
},{"./compress":19,"./identity":20,"./source-map-support":22}],22:[function(require,module,exports){
|
5283 |
|
5284 |
/**
|
5285 |
* Module dependencies.
|
5288 |
var SourceMap = require('source-map').SourceMapGenerator;
|
5289 |
var SourceMapConsumer = require('source-map').SourceMapConsumer;
|
5290 |
var sourceMapResolve = require('source-map-resolve');
|
|
|
5291 |
var fs = require('fs');
|
5292 |
var path = require('path');
|
5293 |
|
5297 |
|
5298 |
module.exports = mixin;
|
5299 |
|
5300 |
+
/**
|
5301 |
+
* Ensure Windows-style paths are formatted properly
|
5302 |
+
*/
|
5303 |
+
|
5304 |
+
const makeFriendlyPath = function(aPath) {
|
5305 |
+
return path.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath;
|
5306 |
+
}
|
5307 |
+
|
5308 |
/**
|
5309 |
* Mixin source map support into `compiler`.
|
5310 |
*
|
5345 |
|
5346 |
exports.emit = function(str, pos) {
|
5347 |
if (pos) {
|
5348 |
+
var sourceFile = makeFriendlyPath(pos.source || 'source.css');
|
5349 |
|
5350 |
this.map.addMapping({
|
5351 |
source: sourceFile,
|
5396 |
if (originalMap) {
|
5397 |
var map = new SourceMapConsumer(originalMap.map);
|
5398 |
var relativeTo = originalMap.sourcesRelativeTo;
|
5399 |
+
this.map.applySourceMap(map, file, makeFriendlyPath(path.dirname(relativeTo)));
|
5400 |
}
|
5401 |
}
|
5402 |
}, this);
|
5414 |
return this._comment(node);
|
5415 |
};
|
5416 |
|
5417 |
+
},{"fs":2,"path":5,"source-map":36,"source-map-resolve":25}],23:[function(require,module,exports){
|
5418 |
+
'use strict';
|
5419 |
+
var token = '%[a-f0-9]{2}';
|
5420 |
+
var singleMatcher = new RegExp(token, 'gi');
|
5421 |
+
var multiMatcher = new RegExp('(' + token + ')+', 'gi');
|
5422 |
+
|
5423 |
+
function decodeComponents(components, split) {
|
5424 |
+
try {
|
5425 |
+
// Try to decode the entire string first
|
5426 |
+
return decodeURIComponent(components.join(''));
|
5427 |
+
} catch (err) {
|
5428 |
+
// Do nothing
|
5429 |
+
}
|
5430 |
+
|
5431 |
+
if (components.length === 1) {
|
5432 |
+
return components;
|
5433 |
+
}
|
5434 |
+
|
5435 |
+
split = split || 1;
|
5436 |
+
|
5437 |
+
// Split the array in 2 parts
|
5438 |
+
var left = components.slice(0, split);
|
5439 |
+
var right = components.slice(split);
|
5440 |
+
|
5441 |
+
return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
|
5442 |
+
}
|
5443 |
+
|
5444 |
+
function decode(input) {
|
5445 |
+
try {
|
5446 |
+
return decodeURIComponent(input);
|
5447 |
+
} catch (err) {
|
5448 |
+
var tokens = input.match(singleMatcher);
|
5449 |
+
|
5450 |
+
for (var i = 1; i < tokens.length; i++) {
|
5451 |
+
input = decodeComponents(tokens, i).join('');
|
5452 |
+
|
5453 |
+
tokens = input.match(singleMatcher);
|
5454 |
+
}
|
5455 |
+
|
5456 |
+
return input;
|
5457 |
+
}
|
5458 |
+
}
|
5459 |
+
|
5460 |
+
function customDecodeURIComponent(input) {
|
5461 |
+
// Keep track of all the replacements and prefill the map with the `BOM`
|
5462 |
+
var replaceMap = {
|
5463 |
+
'%FE%FF': '\uFFFD\uFFFD',
|
5464 |
+
'%FF%FE': '\uFFFD\uFFFD'
|
5465 |
+
};
|
5466 |
+
|
5467 |
+
var match = multiMatcher.exec(input);
|
5468 |
+
while (match) {
|
5469 |
+
try {
|
5470 |
+
// Decode as big chunks as possible
|
5471 |
+
replaceMap[match[0]] = decodeURIComponent(match[0]);
|
5472 |
+
} catch (err) {
|
5473 |
+
var result = decode(match[0]);
|
5474 |
+
|
5475 |
+
if (result !== match[0]) {
|
5476 |
+
replaceMap[match[0]] = result;
|
5477 |
+
}
|
5478 |
+
}
|
5479 |
+
|
5480 |
+
match = multiMatcher.exec(input);
|
5481 |
+
}
|
5482 |
+
|
5483 |
+
// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else
|
5484 |
+
replaceMap['%C2'] = '\uFFFD';
|
5485 |
+
|
5486 |
+
var entries = Object.keys(replaceMap);
|
5487 |
+
|
5488 |
+
for (var i = 0; i < entries.length; i++) {
|
5489 |
+
// Replace all decoded components
|
5490 |
+
var key = entries[i];
|
5491 |
+
input = input.replace(new RegExp(key, 'g'), replaceMap[key]);
|
5492 |
+
}
|
5493 |
+
|
5494 |
+
return input;
|
5495 |
+
}
|
5496 |
+
|
5497 |
+
module.exports = function (encodedURI) {
|
5498 |
+
if (typeof encodedURI !== 'string') {
|
5499 |
+
throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');
|
5500 |
+
}
|
5501 |
+
|
5502 |
+
try {
|
5503 |
+
encodedURI = encodedURI.replace(/\+/g, ' ');
|
5504 |
+
|
5505 |
+
// Try the built in decoder first
|
5506 |
+
return decodeURIComponent(encodedURI);
|
5507 |
+
} catch (err) {
|
5508 |
+
// Fallback to a more advanced decoder
|
5509 |
+
return customDecodeURIComponent(encodedURI);
|
5510 |
+
}
|
5511 |
+
};
|
5512 |
+
|
5513 |
+
},{}],24:[function(require,module,exports){
|
5514 |
if (typeof Object.create === 'function') {
|
5515 |
// implementation from standard node.js 'util' module
|
5516 |
module.exports = function inherits(ctor, superCtor) {
|
5539 |
}
|
5540 |
}
|
5541 |
|
5542 |
+
},{}],25:[function(require,module,exports){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5543 |
(function (setImmediate){
|
5544 |
+
var atob = require("atob")
|
5545 |
+
var urlLib = require("url")
|
5546 |
+
var pathLib = require("path")
|
5547 |
+
var decodeUriComponentLib = require("decode-uri-component")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5548 |
|
|
|
|
|
|
|
5549 |
|
5550 |
+
|
5551 |
+
function resolveUrl(/* ...urls */) {
|
5552 |
+
return Array.prototype.reduce.call(arguments, function(resolved, nextUrl) {
|
5553 |
+
return urlLib.resolve(resolved, nextUrl)
|
5554 |
+
})
|
5555 |
+
}
|
5556 |
+
|
5557 |
+
function convertWindowsPath(aPath) {
|
5558 |
+
return pathLib.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath
|
5559 |
+
}
|
5560 |
+
|
5561 |
+
function customDecodeUriComponent(string) {
|
5562 |
+
// `decodeUriComponentLib` turns `+` into ` `, but that's not wanted.
|
5563 |
+
return decodeUriComponentLib(string.replace(/\+/g, "%2B"))
|
5564 |
+
}
|
5565 |
+
|
5566 |
+
function callbackAsync(callback, error, result) {
|
5567 |
+
setImmediate(function() { callback(error, result) })
|
5568 |
+
}
|
5569 |
+
|
5570 |
+
function parseMapToJSON(string, data) {
|
5571 |
+
try {
|
5572 |
+
return JSON.parse(string.replace(/^\)\]\}'/, ""))
|
5573 |
+
} catch (error) {
|
5574 |
+
error.sourceMapData = data
|
5575 |
+
throw error
|
5576 |
}
|
5577 |
+
}
|
5578 |
|
5579 |
+
function readSync(read, url, data) {
|
5580 |
+
var readUrl = customDecodeUriComponent(url)
|
5581 |
+
try {
|
5582 |
+
return String(read(readUrl))
|
5583 |
+
} catch (error) {
|
5584 |
+
error.sourceMapData = data
|
5585 |
+
throw error
|
|
|
5586 |
}
|
5587 |
+
}
|
5588 |
+
|
5589 |
|
5590 |
|
5591 |
+
var innerRegex = /[#@] sourceMappingURL=([^\s'"]*)/
|
5592 |
|
5593 |
+
var sourceMappingURLRegex = RegExp(
|
5594 |
+
"(?:" +
|
5595 |
+
"/\\*" +
|
5596 |
+
"(?:\\s*\r?\n(?://)?)?" +
|
5597 |
+
"(?:" + innerRegex.source + ")" +
|
5598 |
+
"\\s*" +
|
5599 |
+
"\\*/" +
|
5600 |
+
"|" +
|
5601 |
+
"//(?:" + innerRegex.source + ")" +
|
5602 |
+
")" +
|
5603 |
+
"\\s*"
|
5604 |
+
)
|
5605 |
+
|
5606 |
+
function getSourceMappingUrl(code) {
|
5607 |
+
var match = code.match(sourceMappingURLRegex)
|
5608 |
+
return match ? match[1] || match[2] || "" : null
|
5609 |
+
}
|
5610 |
+
|
5611 |
+
|
5612 |
+
|
5613 |
+
function resolveSourceMap(code, codeUrl, read, callback) {
|
5614 |
+
var mapData
|
5615 |
+
try {
|
5616 |
+
mapData = resolveSourceMapHelper(code, codeUrl)
|
5617 |
+
} catch (error) {
|
5618 |
+
return callbackAsync(callback, error)
|
5619 |
+
}
|
5620 |
+
if (!mapData || mapData.map) {
|
5621 |
+
return callbackAsync(callback, null, mapData)
|
5622 |
+
}
|
5623 |
+
var readUrl = customDecodeUriComponent(mapData.url)
|
5624 |
+
read(readUrl, function(error, result) {
|
5625 |
+
if (error) {
|
5626 |
+
error.sourceMapData = mapData
|
5627 |
+
return callback(error)
|
5628 |
+
}
|
5629 |
+
mapData.map = String(result)
|
5630 |
try {
|
5631 |
+
mapData.map = parseMapToJSON(mapData.map, mapData)
|
5632 |
} catch (error) {
|
5633 |
+
return callback(error)
|
|
|
|
|
|
|
5634 |
}
|
5635 |
+
callback(null, mapData)
|
5636 |
+
})
|
5637 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5638 |
|
5639 |
+
function resolveSourceMapSync(code, codeUrl, read) {
|
5640 |
+
var mapData = resolveSourceMapHelper(code, codeUrl)
|
5641 |
+
if (!mapData || mapData.map) {
|
|
|
|
|
|
|
|
|
5642 |
return mapData
|
5643 |
}
|
5644 |
+
mapData.map = readSync(read, mapData.url, mapData)
|
5645 |
+
mapData.map = parseMapToJSON(mapData.map, mapData)
|
5646 |
+
return mapData
|
5647 |
+
}
|
5648 |
|
5649 |
+
var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/
|
5650 |
|
5651 |
+
/**
|
5652 |
+
* The media type for JSON text is application/json.
|
5653 |
+
*
|
5654 |
+
* {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations }
|
5655 |
+
*
|
5656 |
+
* `text/json` is non-standard media type
|
5657 |
+
*/
|
5658 |
+
var jsonMimeTypeRegex = /^(?:application|text)\/json$/
|
5659 |
|
5660 |
+
/**
|
5661 |
+
* JSON text exchanged between systems that are not part of a closed ecosystem
|
5662 |
+
* MUST be encoded using UTF-8.
|
5663 |
+
*
|
5664 |
+
* {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding}
|
5665 |
+
*/
|
5666 |
+
var jsonCharacterEncoding = "utf-8"
|
5667 |
|
5668 |
+
function base64ToBuf(b64) {
|
5669 |
+
var binStr = atob(b64)
|
5670 |
+
var len = binStr.length
|
5671 |
+
var arr = new Uint8Array(len)
|
5672 |
+
for (var i = 0; i < len; i++) {
|
5673 |
+
arr[i] = binStr.charCodeAt(i)
|
|
|
|
|
5674 |
}
|
5675 |
+
return arr
|
5676 |
+
}
|
5677 |
|
5678 |
+
function decodeBase64String(b64) {
|
5679 |
+
if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") {
|
5680 |
+
return atob(b64)
|
|
|
|
|
|
|
|
|
|
|
|
|
5681 |
}
|
5682 |
+
var buf = base64ToBuf(b64);
|
5683 |
+
// Note: `decoder.decode` method will throw a `DOMException` with the
|
5684 |
+
// `"EncodingError"` value when an coding error is found.
|
5685 |
+
var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true})
|
5686 |
+
return decoder.decode(buf);
|
5687 |
+
}
|
5688 |
|
5689 |
+
function resolveSourceMapHelper(code, codeUrl) {
|
5690 |
+
codeUrl = convertWindowsPath(codeUrl)
|
|
|
|
|
|
|
5691 |
|
5692 |
+
var url = getSourceMappingUrl(code)
|
5693 |
+
if (!url) {
|
5694 |
+
return null
|
5695 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5696 |
|
5697 |
+
var dataUri = url.match(dataUriRegex)
|
5698 |
+
if (dataUri) {
|
5699 |
+
var mimeType = dataUri[1] || "text/plain"
|
5700 |
+
var lastParameter = dataUri[2] || ""
|
5701 |
+
var encoded = dataUri[3] || ""
|
5702 |
+
var data = {
|
5703 |
sourceMappingURL: url,
|
5704 |
+
url: null,
|
5705 |
+
sourcesRelativeTo: codeUrl,
|
5706 |
+
map: encoded
|
5707 |
+
}
|
5708 |
+
if (!jsonMimeTypeRegex.test(mimeType)) {
|
5709 |
+
var error = new Error("Unuseful data uri mime type: " + mimeType)
|
5710 |
+
error.sourceMapData = data
|
5711 |
+
throw error
|
5712 |
+
}
|
5713 |
+
try {
|
5714 |
+
data.map = parseMapToJSON(
|
5715 |
+
lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded),
|
5716 |
+
data
|
5717 |
+
)
|
5718 |
+
} catch (error) {
|
5719 |
+
error.sourceMapData = data
|
5720 |
+
throw error
|
5721 |
}
|
5722 |
+
return data
|
5723 |
}
|
5724 |
|
5725 |
+
var mapUrl = resolveUrl(codeUrl, url)
|
5726 |
+
return {
|
5727 |
+
sourceMappingURL: url,
|
5728 |
+
url: mapUrl,
|
5729 |
+
sourcesRelativeTo: mapUrl,
|
5730 |
+
map: null
|
5731 |
+
}
|
5732 |
+
}
|
5733 |
|
5734 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5735 |
|
5736 |
+
function resolveSources(map, mapUrl, read, options, callback) {
|
5737 |
+
if (typeof options === "function") {
|
5738 |
+
callback = options
|
5739 |
+
options = {}
|
5740 |
+
}
|
5741 |
+
var pending = map.sources ? map.sources.length : 0
|
5742 |
+
var result = {
|
5743 |
+
sourcesResolved: [],
|
5744 |
+
sourcesContent: []
|
5745 |
+
}
|
5746 |
|
5747 |
+
if (pending === 0) {
|
5748 |
+
callbackAsync(callback, null, result)
|
5749 |
+
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5750 |
}
|
5751 |
|
5752 |
+
var done = function() {
|
5753 |
+
pending--
|
5754 |
+
if (pending === 0) {
|
5755 |
+
callback(null, result)
|
5756 |
}
|
5757 |
+
}
|
5758 |
|
5759 |
+
resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) {
|
5760 |
+
result.sourcesResolved[index] = fullUrl
|
5761 |
+
if (typeof sourceContent === "string") {
|
5762 |
+
result.sourcesContent[index] = sourceContent
|
5763 |
+
callbackAsync(done, null)
|
5764 |
+
} else {
|
5765 |
+
var readUrl = customDecodeUriComponent(fullUrl)
|
5766 |
+
read(readUrl, function(error, source) {
|
5767 |
+
result.sourcesContent[index] = error ? error : String(source)
|
5768 |
+
done()
|
5769 |
+
})
|
5770 |
}
|
5771 |
+
})
|
5772 |
+
}
|
5773 |
|
5774 |
+
function resolveSourcesSync(map, mapUrl, read, options) {
|
5775 |
+
var result = {
|
5776 |
+
sourcesResolved: [],
|
5777 |
+
sourcesContent: []
|
5778 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5779 |
|
5780 |
+
if (!map.sources || map.sources.length === 0) {
|
5781 |
return result
|
5782 |
}
|
5783 |
|
5784 |
+
resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) {
|
5785 |
+
result.sourcesResolved[index] = fullUrl
|
5786 |
+
if (read !== null) {
|
5787 |
+
if (typeof sourceContent === "string") {
|
5788 |
+
result.sourcesContent[index] = sourceContent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5789 |
} else {
|
5790 |
+
var readUrl = customDecodeUriComponent(fullUrl)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5791 |
try {
|
5792 |
+
result.sourcesContent[index] = String(read(readUrl))
|
5793 |
} catch (error) {
|
5794 |
+
result.sourcesContent[index] = error
|
5795 |
}
|
5796 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5797 |
}
|
5798 |
+
})
|
5799 |
|
5800 |
+
return result
|
5801 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5802 |
|
5803 |
+
var endingSlash = /\/?$/
|
5804 |
+
|
5805 |
+
function resolveSourcesHelper(map, mapUrl, options, fn) {
|
5806 |
+
options = options || {}
|
5807 |
+
mapUrl = convertWindowsPath(mapUrl)
|
5808 |
+
var fullUrl
|
5809 |
+
var sourceContent
|
5810 |
+
var sourceRoot
|
5811 |
+
for (var index = 0, len = map.sources.length; index < len; index++) {
|
5812 |
+
sourceRoot = null
|
5813 |
+
if (typeof options.sourceRoot === "string") {
|
5814 |
+
sourceRoot = options.sourceRoot
|
5815 |
+
} else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) {
|
5816 |
+
sourceRoot = map.sourceRoot
|
5817 |
+
}
|
5818 |
+
// If the sourceRoot is the empty string, it is equivalent to not setting
|
5819 |
+
// the property at all.
|
5820 |
+
if (sourceRoot === null || sourceRoot === '') {
|
5821 |
+
fullUrl = resolveUrl(mapUrl, map.sources[index])
|
5822 |
} else {
|
5823 |
+
// Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes
|
5824 |
+
// `/scripts/subdir/<source>`, not `/scripts/<source>`. Pointing to a file as source root
|
5825 |
+
// does not make sense.
|
5826 |
+
fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index])
|
5827 |
}
|
5828 |
+
sourceContent = (map.sourcesContent || [])[index]
|
5829 |
+
fn(fullUrl, sourceContent, index)
|
|
|
|
|
5830 |
}
|
5831 |
+
}
|
5832 |
|
5833 |
|
5834 |
|
5835 |
+
function resolve(code, codeUrl, read, options, callback) {
|
5836 |
+
if (typeof options === "function") {
|
5837 |
+
callback = options
|
5838 |
+
options = {}
|
|
|
|
|
|
|
|
|
5839 |
}
|
5840 |
+
if (code === null) {
|
5841 |
+
var mapUrl = codeUrl
|
5842 |
+
var data = {
|
5843 |
+
sourceMappingURL: null,
|
5844 |
+
url: mapUrl,
|
5845 |
+
sourcesRelativeTo: mapUrl,
|
5846 |
+
map: null
|
5847 |
+
}
|
5848 |
+
var readUrl = customDecodeUriComponent(mapUrl)
|
5849 |
+
read(readUrl, function(error, result) {
|
5850 |
+
if (error) {
|
5851 |
+
error.sourceMapData = data
|
5852 |
+
return callback(error)
|
5853 |
+
}
|
5854 |
+
data.map = String(result)
|
5855 |
+
try {
|
5856 |
+
data.map = parseMapToJSON(data.map, data)
|
5857 |
+
} catch (error) {
|
5858 |
+
return callback(error)
|
5859 |
+
}
|
5860 |
+
_resolveSources(data)
|
5861 |
+
})
|
5862 |
} else {
|
5863 |
+
resolveSourceMap(code, codeUrl, read, function(error, mapData) {
|
5864 |
+
if (error) {
|
5865 |
+
return callback(error)
|
5866 |
+
}
|
5867 |
+
if (!mapData) {
|
5868 |
+
return callback(null, null)
|
5869 |
+
}
|
5870 |
+
_resolveSources(mapData)
|
5871 |
+
})
|
5872 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5873 |
|
5874 |
+
function _resolveSources(mapData) {
|
5875 |
+
resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) {
|
5876 |
+
if (error) {
|
5877 |
+
return callback(error)
|
|
|
|
|
5878 |
}
|
5879 |
+
mapData.sourcesResolved = result.sourcesResolved
|
5880 |
+
mapData.sourcesContent = result.sourcesContent
|
5881 |
+
callback(null, mapData)
|
5882 |
+
})
|
5883 |
+
}
|
5884 |
+
}
|
5885 |
+
|
5886 |
+
function resolveSync(code, codeUrl, read, options) {
|
5887 |
+
var mapData
|
5888 |
+
if (code === null) {
|
5889 |
+
var mapUrl = codeUrl
|
5890 |
+
mapData = {
|
5891 |
+
sourceMappingURL: null,
|
5892 |
+
url: mapUrl,
|
5893 |
+
sourcesRelativeTo: mapUrl,
|
5894 |
+
map: null
|
5895 |
+
}
|
5896 |
+
mapData.map = readSync(read, mapUrl, mapData)
|
5897 |
+
mapData.map = parseMapToJSON(mapData.map, mapData)
|
5898 |
+
} else {
|
5899 |
+
mapData = resolveSourceMapSync(code, codeUrl, read)
|
5900 |
+
if (!mapData) {
|
5901 |
+
return null
|
5902 |
}
|
5903 |
}
|
5904 |
+
var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options)
|
5905 |
+
mapData.sourcesResolved = result.sourcesResolved
|
5906 |
+
mapData.sourcesContent = result.sourcesContent
|
5907 |
+
return mapData
|
5908 |
+
}
|
5909 |
|
|
|
5910 |
|
5911 |
+
|
5912 |
+
module.exports = {
|
5913 |
+
resolveSourceMap: resolveSourceMap,
|
5914 |
+
resolveSourceMapSync: resolveSourceMapSync,
|
5915 |
+
resolveSources: resolveSources,
|
5916 |
+
resolveSourcesSync: resolveSourcesSync,
|
5917 |
+
resolve: resolve,
|
5918 |
+
resolveSync: resolveSync,
|
5919 |
+
parseMapToJSON: parseMapToJSON
|
5920 |
+
}
|
5921 |
+
|
5922 |
+
}).call(this,require("timers").setImmediate)
|
5923 |
+
},{"atob":15,"decode-uri-component":23,"path":5,"timers":11,"url":12}],26:[function(require,module,exports){
|
5924 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
5925 |
/*
|
5926 |
* Copyright 2011 Mozilla Foundation and contributors
|
6043 |
|
6044 |
exports.ArraySet = ArraySet;
|
6045 |
|
6046 |
+
},{"./util":35}],27:[function(require,module,exports){
|
6047 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
6048 |
/*
|
6049 |
* Copyright 2011 Mozilla Foundation and contributors
|
6185 |
aOutParam.rest = aIndex;
|
6186 |
};
|
6187 |
|
6188 |
+
},{"./base64":28}],28:[function(require,module,exports){
|
6189 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
6190 |
/*
|
6191 |
* Copyright 2011 Mozilla Foundation and contributors
|
6254 |
return -1;
|
6255 |
};
|
6256 |
|
6257 |
+
},{}],29:[function(require,module,exports){
|
6258 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
6259 |
/*
|
6260 |
* Copyright 2011 Mozilla Foundation and contributors
|
6367 |
return index;
|
6368 |
};
|
6369 |
|
6370 |
+
},{}],30:[function(require,module,exports){
|
6371 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
6372 |
/*
|
6373 |
* Copyright 2014 Mozilla Foundation and contributors
|
6448 |
|
6449 |
exports.MappingList = MappingList;
|
6450 |
|
6451 |
+
},{"./util":35}],31:[function(require,module,exports){
|
6452 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
6453 |
/*
|
6454 |
* Copyright 2011 Mozilla Foundation and contributors
|
6564 |
doQuickSort(ary, comparator, 0, ary.length - 1);
|
6565 |
};
|
6566 |
|
6567 |
+
},{}],32:[function(require,module,exports){
|
6568 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
6569 |
/*
|
6570 |
* Copyright 2011 Mozilla Foundation and contributors
|
7711 |
|
7712 |
exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
7713 |
|
7714 |
+
},{"./array-set":26,"./base64-vlq":27,"./binary-search":29,"./quick-sort":31,"./util":35}],33:[function(require,module,exports){
|
7715 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
7716 |
/*
|
7717 |
* Copyright 2011 Mozilla Foundation and contributors
|
8138 |
|
8139 |
exports.SourceMapGenerator = SourceMapGenerator;
|
8140 |
|
8141 |
+
},{"./array-set":26,"./base64-vlq":27,"./mapping-list":30,"./util":35}],34:[function(require,module,exports){
|
8142 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
8143 |
/*
|
8144 |
* Copyright 2011 Mozilla Foundation and contributors
|
8553 |
|
8554 |
exports.SourceNode = SourceNode;
|
8555 |
|
8556 |
+
},{"./source-map-generator":33,"./util":35}],35:[function(require,module,exports){
|
8557 |
/* -*- Mode: js; js-indent-level: 2; -*- */
|
8558 |
/*
|
8559 |
* Copyright 2011 Mozilla Foundation and contributors
|
9043 |
}
|
9044 |
exports.computeSourceURL = computeSourceURL;
|
9045 |
|
9046 |
+
},{}],36:[function(require,module,exports){
|
9047 |
/*
|
9048 |
* Copyright 2009-2011 Mozilla Foundation and contributors
|
9049 |
* Licensed under the New BSD license. See LICENSE.txt or:
|
9053 |
exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
|
9054 |
exports.SourceNode = require('./lib/source-node').SourceNode;
|
9055 |
|
9056 |
+
},{"./lib/source-map-consumer":32,"./lib/source-map-generator":33,"./lib/source-node":34}]},{},[14]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/css.min.js
CHANGED
@@ -1 +1,8 @@
|
|
1 |
-
!function e(t,n,r){function i(s,u){if(!n[s]){if(!t[s]){var a="function"==typeof require&&require;if(!u&&a)return a(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,i="/"===s.charAt(0))}return(i?"/":"")+(n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"))||"."},n.normalize=function(e){var o=n.isAbsolute(e),s="/"===i(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),s=Math.min(i.length,o.length),u=s,a=0;a<s;a++)if(i[a]!==o[a]){u=a;break}var l=[];for(a=u;a<i.length;a++)l.push("..");return(l=l.concat(o.slice(u))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},n.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===r&&(i=!1,r=s+1),46===u?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:3}],3:[function(e,t,n){var r,i,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(e){r=s}try{i="function"==typeof clearTimeout?clearTimeout:u}catch(e){i=u}}();var l,c=[],p=!1,f=-1;function h(){p&&l&&(p=!1,l.length?c=l.concat(c):f=-1,c.length&&m())}function m(){if(!p){var e=a(h);p=!0;for(var t=c.length;t;){for(l=c,c=[];++f<t;)l&&l[f].run();f=-1,t=c.length}l=null,p=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===u||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new g(e,t)),1!==c.length||p||a(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],4:[function(e,t,n){(function(t,r){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,u={},a=0;function l(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new l(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new l(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=a++,r=!(arguments.length<2)&&s.call(arguments,1);return u[t]=!0,i((function(){u[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":3,timers:4}],5:[function(e,t,n){window.css=e("css")},{css:6}],6:[function(e,t,n){n.parse=e("./lib/parse"),n.stringify=e("./lib/stringify")},{"./lib/parse":7,"./lib/stringify":11}],7:[function(e,t,n){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function i(e){return e?e.replace(/^\s+|\s+$/g,""):""}t.exports=function(e,t){t=t||{};var n=1,o=1;function s(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function u(){var e={line:n,column:o};return function(t){return t.position=new a(e),g(),t}}function a(e){this.start=e,this.end={line:n,column:o},this.source=t.source}a.prototype.content=e;var l=[];function c(r){var i=new Error(t.source+":"+n+":"+o+": "+r);if(i.reason=r,i.filename=t.source,i.line=n,i.column=o,i.source=e,!t.silent)throw i;l.push(i)}function p(){return m(/^{\s*/)}function f(){return m(/^}/)}function h(){var t,n=[];for(g(),d(n);e.length&&"}"!=e.charAt(0)&&(t=R()||E());)!1!==t&&(n.push(t),d(n));return n}function m(t){var n=t.exec(e);if(n){var r=n[0];return s(r),e=e.slice(r.length),n}}function g(){m(/^\s*/)}function d(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=u();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return c("End of comment missing");var r=e.slice(2,n-2);return o+=2,s(r),e=e.slice(n),o+=2,t({type:"comment",comment:r})}}function y(){var e=m(/^([^{]+)/);if(e)return i(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function _(){var e=u(),t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=i(t[0]),!m(/^:\s*/))return c("property missing ':'");var n=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(r,""),value:n?i(n[0]).replace(r,""):""});return m(/^[;\s]*/),o}}function C(){var e,t=[];if(!p())return c("missing '{'");for(d(t);e=_();)!1!==e&&(t.push(e),d(t));return f()?t:c("missing '}'")}function w(){for(var e,t=[],n=u();e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:C()})}var S,A=L("import"),b=L("charset"),M=L("namespace");function L(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=u(),r=m(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function R(){if("@"==e[0])return function(){var e=u();if(t=m(/^@([-\w]+)?keyframes\s*/)){var t,n=t[1];if(!(t=m(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,i=t[1];if(!p())return c("@keyframes missing '{'");for(var o=d();r=w();)o.push(r),o=o.concat(d());return f()?e({type:"keyframes",name:i,vendor:n,keyframes:o}):c("@keyframes missing '}'")}}()||function(){var e=u(),t=m(/^@media *([^{]+)/);if(t){var n=i(t[1]);if(!p())return c("@media missing '{'");var r=d().concat(h());return f()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=u(),t=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:i(t[1]),media:i(t[2])})}()||function(){var e=u(),t=m(/^@supports *([^{]+)/);if(t){var n=i(t[1]);if(!p())return c("@supports missing '{'");var r=d().concat(h());return f()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||A()||b()||M()||function(){var e=u(),t=m(/^@([-\w]+)?document *([^{]+)/);if(t){var n=i(t[1]),r=i(t[2]);if(!p())return c("@document missing '{'");var o=d().concat(h());return f()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=u();if(m(/^@page */)){var t=y()||[];if(!p())return c("@page missing '{'");for(var n,r=d();n=_();)r.push(n),r=r.concat(d());return f()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=u();if(m(/^@host\s*/)){if(!p())return c("@host missing '{'");var t=d().concat(h());return f()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=u();if(m(/^@font-face\s*/)){if(!p())return c("@font-face missing '{'");for(var t,n=d();t=_();)n.push(t),n=n.concat(d());return f()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function E(){var e=u(),t=y();return t?(d(),e({type:"rule",selectors:t,declarations:C()})):c("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type,i=r?t:n;for(var o in t){var s=t[o];Array.isArray(s)?s.forEach((function(t){e(t,i)})):s&&"object"==typeof s&&e(s,i)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((S=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:S,parsingErrors:l}}))}},{}],8:[function(e,t,n){function r(e){this.options=e||{}}t.exports=r,r.prototype.emit=function(e){return e},r.prototype.visit=function(e){return this[e.type](e)},r.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,i=e.length;r<i;r++)n+=this.visit(e[r]),t&&r<i-1&&(n+=this.emit(t));return n}},{}],9:[function(e,t,n){var r=e("./compiler"),i=e("inherits");function o(e){r.call(this,e)}t.exports=o,i(o,r),o.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},o.prototype.comment=function(e){return this.emit("",e.position)},o.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},o.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},o.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},o.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},o.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},o.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},o.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},o.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},o.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},o.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},o.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},o.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},o.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},o.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")}},{"./compiler":8,inherits:13}],10:[function(e,t,n){var r=e("./compiler"),i=e("inherits");function o(e){e=e||{},r.call(this,e),this.indentation=e.indent}t.exports=o,i(o,r),o.prototype.compile=function(e){return this.stylesheet(e)},o.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},o.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},o.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},o.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},o.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},o.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},o.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},o.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},o.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},o.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},o.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},o.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},o.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},o.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},o.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},o.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},o.prototype.indent=function(e){return this.level=this.level||1,null!=e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")}},{"./compiler":8,inherits:13}],11:[function(e,t,n){var r=e("./compress"),i=e("./identity");t.exports=function(t,n){var o=(n=n||{}).compress?new r(n):new i(n);if(n.sourcemap){e("./source-map-support")(o);var s=o.compile(t);return o.applySourceMaps(),{code:s,map:"generator"===n.sourcemap?o.map:o.map.toJSON()}}return s=o.compile(t)}},{"./compress":9,"./identity":10,"./source-map-support":12}],12:[function(e,t,n){var r=e("source-map").SourceMapGenerator,i=e("source-map").SourceMapConsumer,o=e("source-map-resolve"),s=e("urix"),u=e("fs"),a=e("path");t.exports=function(e){for(var t in e._comment=e.comment,e.map=new r,e.position={line:1,column:1},e.files={},n)e[t]=n[t]},n.updatePosition=function(e){var t=e.match(/\n/g);t&&(this.position.line+=t.length);var n=e.lastIndexOf("\n");this.position.column=~n?e.length-n:this.position.column+e.length},n.emit=function(e,t){if(t){var n=s(t.source||"source.css");this.map.addMapping({source:n,generated:{line:this.position.line,column:Math.max(this.position.column-1,0)},original:{line:t.start.line,column:t.start.column-1}}),this.addFile(n,t)}return this.updatePosition(e),e},n.addFile=function(e,t){"string"==typeof t.content&&(Object.prototype.hasOwnProperty.call(this.files,e)||(this.files[e]=t.content))},n.applySourceMaps=function(){Object.keys(this.files).forEach((function(e){var t=this.files[e];if(this.map.setSourceContent(e,t),!1!==this.options.inputSourcemaps){var n=o.resolveSync(t,e,u.readFileSync);if(n){var r=new i(n.map),l=n.sourcesRelativeTo;this.map.applySourceMap(r,e,s(a.dirname(l)))}}}),this)},n.comment=function(e){return/^# sourceMappingURL=/.test(e.comment)?this.emit("",e.position):this._comment(e)}},{fs:1,path:2,"source-map":27,"source-map-resolve":15,urix:28}],13:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],14:[function(e,t,n){var r,i;r=this,i=function(){return function(){var e=arguments.length;if(0===e)throw new Error("resolveUrl requires at least one argument; got none.");var t=document.createElement("base");if(t.href=arguments[0],1===e)return t.href;var n=document.getElementsByTagName("head")[0];n.insertBefore(t,n.firstChild);for(var r,i=document.createElement("a"),o=1;o<e;o++)i.href=arguments[o],r=i.href,t.href=r;return n.removeChild(t),r}},"function"==typeof define&&define.amd?define(i):"object"==typeof n?t.exports=i():r.resolveUrl=i()},{}],15:[function(e,t,n){(function(r){!function(r,i){if("function"==typeof define&&define.amd)define(["source-map-url","resolve-url"],i);else if("object"==typeof n){var o=e("source-map-url"),s=e("resolve-url");t.exports=i(o,s)}else r.sourceMapResolve=i(r.sourceMappingURL,r.resolveUrl)}(this,(function(e,t){function n(e,t,n){r((function(){e(t,n)}))}function i(e,t){try{return JSON.parse(e.replace(/^\)\]\}'/,""))}catch(e){throw e.sourceMapData=t,e}}function o(e,t,n){var r=t;try{return String(e(r))}catch(e){throw e.sourceMapData=n,e}}function s(e,t,r,o){var s;try{s=p(e,t)}catch(e){return n(o,e)}if(!s||s.map)return n(o,null,s);r(s.url,(function(e,t){if(e)return e.sourceMapData=s,o(e);s.map=String(t);try{s.map=i(s.map,s)}catch(e){return o(e)}o(null,s)}))}function u(e,t,n){var r=p(e,t);return!r||r.map?r:(r.map=o(n,r.url,r),r.map=i(r.map,r),r)}var a=/^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/,l=/^(?:application|text)\/json$/;function c(e){if("undefined"==typeof TextDecoder||"undefined"==typeof Uint8Array)return atob(e);var t=function(e){for(var t=atob(e),n=t.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}(e);return new TextDecoder("utf-8",{fatal:!0}).decode(t)}function p(n,r){var o=e.getFrom(n);if(!o)return null;var s=o.match(a);if(s){var u=s[1]||"text/plain",p=s[2]||"",f=s[3]||"",h={sourceMappingURL:o,url:null,sourcesRelativeTo:r,map:f};if(!l.test(u)){var m=new Error("Unuseful data uri mime type: "+u);throw m.sourceMapData=h,m}try{h.map=i(";base64"===p?c(f):decodeURIComponent(f),h)}catch(m){throw m.sourceMapData=h,m}return h}var g=t(r,o);return{sourceMappingURL:o,url:g,sourcesRelativeTo:g,map:null}}function f(e,t,r,i,o){"function"==typeof i&&(o=i,i={});var s=e.sources?e.sources.length:0,u={sourcesResolved:[],sourcesContent:[]};if(0!==s){var a=function(){0===--s&&o(null,u)};g(e,t,i,(function(e,t,i){(u.sourcesResolved[i]=e,"string"==typeof t)?(u.sourcesContent[i]=t,n(a,null)):r(e,(function(e,t){u.sourcesContent[i]=e||String(t),a()}))}))}else n(o,null,u)}function h(e,t,n,r){var i={sourcesResolved:[],sourcesContent:[]};return e.sources&&0!==e.sources.length?(g(e,t,r,(function(e,t,r){if(i.sourcesResolved[r]=e,null!==n)if("string"==typeof t)i.sourcesContent[r]=t;else{var o=e;try{i.sourcesContent[r]=String(n(o))}catch(e){i.sourcesContent[r]=e}}})),i):i}var m=/\/?$/;function g(e,n,r,i){var o;r=r||{};for(var s=0,u=e.sources.length;s<u;s++)o=null,"string"==typeof r.sourceRoot?o=r.sourceRoot:"string"==typeof e.sourceRoot&&!1!==r.sourceRoot&&(o=e.sourceRoot),i(null===o||""===o?t(n,e.sources[s]):t(n,o.replace(m,"/"),e.sources[s]),(e.sourcesContent||[])[s],s)}return{resolveSourceMap:s,resolveSourceMapSync:u,resolveSources:f,resolveSourcesSync:h,resolve:function(e,t,n,r,o){if("function"==typeof r&&(o=r,r={}),null===e){var u={sourceMappingURL:null,url:t,sourcesRelativeTo:t,map:null};n(t,(function(e,t){if(e)return e.sourceMapData=u,o(e);u.map=String(t);try{u.map=i(u.map,u)}catch(e){return o(e)}a(u)}))}else s(e,t,n,(function(e,t){return e?o(e):t?void a(t):o(null,null)}));function a(e){f(e.map,e.sourcesRelativeTo,n,r,(function(t,n){if(t)return o(t);e.sourcesResolved=n.sourcesResolved,e.sourcesContent=n.sourcesContent,o(null,e)}))}},resolveSync:function(e,t,n,r){var s;if(null===e){(s={sourceMappingURL:null,url:t,sourcesRelativeTo:t,map:null}).map=o(n,t,s),s.map=i(s.map,s)}else if(!(s=u(e,t,n)))return null;var a=h(s.map,s.sourcesRelativeTo,n,r);return s.sourcesResolved=a.sourcesResolved,s.sourcesContent=a.sourcesContent,s},parseMapToJSON:i}}))}).call(this,e("timers").setImmediate)},{"resolve-url":14,"source-map-url":16,timers:4}],16:[function(e,t,n){var r,i;r=this,i=function(){var e=/[#@] sourceMappingURL=([^\s'"]*)/,t=RegExp("(?:/\\*(?:\\s*\r?\n(?://)?)?(?:"+e.source+")\\s*\\*/|//(?:"+e.source+"))\\s*");return{regex:t,_innerRegex:e,getFrom:function(e){var n=e.match(t);return n?n[1]||n[2]||"":null},existsIn:function(e){return t.test(e)},removeFrom:function(e){return e.replace(t,"")},insertBefore:function(e,n){var r=e.match(t);return r?e.slice(0,r.index)+n+e.slice(r.index):e+n}}},"function"==typeof define&&define.amd?define(i):"object"==typeof n?t.exports=i():r.sourceMappingURL=i()},{}],17:[function(e,t,n){var r=e("./util"),i=Object.prototype.hasOwnProperty,o="undefined"!=typeof Map;function s(){this._array=[],this._set=o?new Map:Object.create(null)}s.fromArray=function(e,t){for(var n=new s,r=0,i=e.length;r<i;r++)n.add(e[r],t);return n},s.prototype.size=function(){return o?this._set.size:Object.getOwnPropertyNames(this._set).length},s.prototype.add=function(e,t){var n=o?e:r.toSetString(e),s=o?this.has(e):i.call(this._set,n),u=this._array.length;s&&!t||this._array.push(e),s||(o?this._set.set(e,u):this._set[n]=u)},s.prototype.has=function(e){if(o)return this._set.has(e);var t=r.toSetString(e);return i.call(this._set,t)},s.prototype.indexOf=function(e){if(o){var t=this._set.get(e);if(t>=0)return t}else{var n=r.toSetString(e);if(i.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},s.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},s.prototype.toArray=function(){return this._array.slice()},n.ArraySet=s},{"./util":26}],18:[function(e,t,n){var r=e("./base64");n.encode=function(e){var t,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var i,o,s,u,a=e.length,l=0,c=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&o),l+=(o&=31)<<c,c+=5}while(i);n.value=(u=(s=l)>>1,1==(1&s)?-u:u),n.rest=t}},{"./base64":19}],19:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},{}],20:[function(e,t,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,r,i){if(0===t.length)return-1;var o=function e(t,r,i,o,s,u){var a=Math.floor((r-t)/2)+t,l=s(i,o[a],!0);return 0===l?a:l>0?r-a>1?e(a,r,i,o,s,u):u==n.LEAST_UPPER_BOUND?r<o.length?r:-1:a:a-t>1?e(t,a,i,o,s,u):u==n.LEAST_UPPER_BOUND?a:t<0?-1:t}(-1,t.length,e,t,r,i||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===r(t[o],t[o-1],!0);)--o;return o}},{}],21:[function(e,t,n){var r=e("./util");function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){var t,n,i,o,s,u;t=this._last,n=e,i=t.generatedLine,o=n.generatedLine,s=t.generatedColumn,u=n.generatedColumn,o>i||o==i&&u>=s||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=i},{"./util":26}],22:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t,n,o){if(n<o){var s=n-1;r(e,(c=n,p=o,Math.round(c+Math.random()*(p-c))),o);for(var u=e[o],a=n;a<o;a++)t(e[a],u)<=0&&r(e,s+=1,a);r(e,s+1,a);var l=s+1;i(e,t,n,l-1),i(e,t,l+1,o)}var c,p}n.quickSort=function(e,t){i(e,t,0,e.length-1)}},{}],23:[function(e,t,n){var r=e("./util"),i=e("./binary-search"),o=e("./array-set").ArraySet,s=e("./base64-vlq"),u=e("./quick-sort").quickSort;function a(e,t){var n=e;return"string"==typeof e&&(n=r.parseSourceMapInput(e)),null!=n.sections?new p(n,t):new l(n,t)}function l(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var i=r.getArg(n,"version"),s=r.getArg(n,"sources"),u=r.getArg(n,"names",[]),a=r.getArg(n,"sourceRoot",null),l=r.getArg(n,"sourcesContent",null),c=r.getArg(n,"mappings"),p=r.getArg(n,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);a&&(a=r.normalize(a)),s=s.map(String).map(r.normalize).map((function(e){return a&&r.isAbsolute(a)&&r.isAbsolute(e)?r.relative(a,e):e})),this._names=o.fromArray(u.map(String),!0),this._sources=o.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map((function(e){return r.computeSourceURL(a,e,t)})),this.sourceRoot=a,this.sourcesContent=l,this._mappings=c,this._sourceMapURL=t,this.file=p}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function p(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var i=r.getArg(n,"version"),s=r.getArg(n,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new o,this._names=new o;var u={line:-1,column:0};this._sections=s.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=r.getArg(e,"offset"),i=r.getArg(n,"line"),o=r.getArg(n,"column");if(i<u.line||i===u.line&&o<u.column)throw new Error("Section offsets must be ordered and non-overlapping.");return u=n,{generatedOffset:{generatedLine:i+1,generatedColumn:o+1},consumer:new a(r.getArg(e,"map"),t)}}))}a.fromSourceMap=function(e,t){return l.fromSourceMap(e,t)},a.prototype._version=3,a.prototype.__generatedMappings=null,Object.defineProperty(a.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),a.prototype.__originalMappings=null,Object.defineProperty(a.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),a.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},a.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},a.GENERATED_ORDER=1,a.ORIGINAL_ORDER=2,a.GREATEST_LOWER_BOUND=1,a.LEAST_UPPER_BOUND=2,a.prototype.eachMapping=function(e,t,n){var i,o=t||null;switch(n||a.GENERATED_ORDER){case a.GENERATED_ORDER:i=this._generatedMappings;break;case a.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;i.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return{source:t=r.computeSourceURL(s,t,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,o)},a.prototype.allGeneratedPositionsFor=function(e){var t=r.getArg(e,"line"),n={source:r.getArg(e,"source"),originalLine:t,originalColumn:r.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(s>=0){var u=this._originalMappings[s];if(void 0===e.column)for(var a=u.originalLine;u&&u.originalLine===a;)o.push({line:r.getArg(u,"generatedLine",null),column:r.getArg(u,"generatedColumn",null),lastColumn:r.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++s];else for(var l=u.originalColumn;u&&u.originalLine===t&&u.originalColumn==l;)o.push({line:r.getArg(u,"generatedLine",null),column:r.getArg(u,"generatedColumn",null),lastColumn:r.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++s]}return o},n.SourceMapConsumer=a,l.prototype=Object.create(a.prototype),l.prototype.consumer=a,l.prototype._findSourceIndex=function(e){var t,n=e;if(null!=this.sourceRoot&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==e)return t;return-1},l.fromSourceMap=function(e,t){var n=Object.create(l.prototype),i=n._names=o.fromArray(e._names.toArray(),!0),s=n._sources=o.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=t,n._absoluteSources=n._sources.toArray().map((function(e){return r.computeSourceURL(n.sourceRoot,e,t)}));for(var a=e._mappings.toArray().slice(),p=n.__generatedMappings=[],f=n.__originalMappings=[],h=0,m=a.length;h<m;h++){var g=a[h],d=new c;d.generatedLine=g.generatedLine,d.generatedColumn=g.generatedColumn,g.source&&(d.source=s.indexOf(g.source),d.originalLine=g.originalLine,d.originalColumn=g.originalColumn,g.name&&(d.name=i.indexOf(g.name)),f.push(d)),p.push(d)}return u(n.__originalMappings,r.compareByOriginalPositions),n},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),l.prototype._parseMappings=function(e,t){for(var n,i,o,a,l,p=1,f=0,h=0,m=0,g=0,d=0,v=e.length,y=0,_={},C={},w=[],S=[];y<v;)if(";"===e.charAt(y))p++,y++,f=0;else if(","===e.charAt(y))y++;else{for((n=new c).generatedLine=p,a=y;a<v&&!this._charIsMappingSeparator(e,a);a++);if(o=_[i=e.slice(y,a)])y+=i.length;else{for(o=[];y<a;)s.decode(e,y,C),l=C.value,y=C.rest,o.push(l);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");_[i]=o}n.generatedColumn=f+o[0],f=n.generatedColumn,o.length>1&&(n.source=g+o[1],g+=o[1],n.originalLine=h+o[2],h=n.originalLine,n.originalLine+=1,n.originalColumn=m+o[3],m=n.originalColumn,o.length>4&&(n.name=d+o[4],d+=o[4])),S.push(n),"number"==typeof n.originalLine&&w.push(n)}u(S,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,u(w,r.compareByOriginalPositions),this.__originalMappings=w},l.prototype._findMapping=function(e,t,n,r,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,o,s)},l.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositionsDeflated,r.getArg(e,"bias",a.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var o=r.getArg(i,"source",null);null!==o&&(o=this._sources.at(o),o=r.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=r.getArg(i,"name",null);return null!==s&&(s=this._names.at(s)),{source:o,line:r.getArg(i,"originalLine",null),column:r.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},l.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i,o=e;if(null!=this.sourceRoot&&(o=r.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(i=r.urlParse(this.sourceRoot))){var s=o.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!i.path||"/"==i.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(t)return null;throw new Error('"'+o+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",a.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:r.getArg(o,"generatedLine",null),column:r.getArg(o,"generatedColumn",null),lastColumn:r.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,p.prototype=Object.create(a.prototype),p.prototype.constructor=a,p.prototype._version=3,Object.defineProperty(p.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),p.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=i.search(t,this._sections,(function(e,t){var n=e.generatedLine-t.generatedOffset.generatedLine;return n||e.generatedColumn-t.generatedOffset.generatedColumn})),o=this._sections[n];return o?o.consumer.originalPositionFor({line:t.generatedLine-(o.generatedOffset.generatedLine-1),column:t.generatedColumn-(o.generatedOffset.generatedLine===t.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},p.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},p.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},p.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer._findSourceIndex(r.getArg(e,"source"))){var i=n.consumer.generatedPositionFor(e);if(i)return{line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},p.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],l=i.consumer._sources.at(a.source);l=r.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=i.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var p={source:l,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:c};this.__generatedMappings.push(p),"number"==typeof p.originalLine&&this.__originalMappings.push(p)}u(this.__generatedMappings,r.compareByGeneratedPositionsDeflated),u(this.__originalMappings,r.compareByOriginalPositions)},n.IndexedSourceMapConsumer=p},{"./array-set":17,"./base64-vlq":18,"./binary-search":20,"./quick-sort":22,"./util":26}],24:[function(e,t,n){var r=e("./base64-vlq"),i=e("./util"),o=e("./array-set").ArraySet,s=e("./mapping-list").MappingList;function u(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new s,this._sourcesContents=null}u.prototype._version=3,u.fromSourceMap=function(e){var t=e.sourceRoot,n=new u({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=i.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var o=r;null!==t&&(o=i.relative(t,r)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(r);null!=s&&n.setSourceContent(r,s)})),n},u.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),n=i.getArg(e,"original",null),r=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,o),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:o})},u.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=i.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},u.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var s=this._sourceRoot;null!=s&&(r=i.relative(s,r));var u=new o,a=new o;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var o=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=o.source&&(t.source=o.source,null!=n&&(t.source=i.join(n,t.source)),null!=s&&(t.source=i.relative(s,t.source)),t.originalLine=o.line,t.originalColumn=o.column,null!=o.name&&(t.name=o.name))}var l=t.source;null==l||u.has(l)||u.add(l);var c=t.name;null==c||a.has(c)||a.add(c)}),this),this._sources=u,this._names=a,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=i.join(n,t)),null!=s&&(t=i.relative(s,t)),this.setSourceContent(t,r))}),this)},u.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)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((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},u.prototype._serializeMappings=function(){for(var e,t,n,o,s=0,u=1,a=0,l=0,c=0,p=0,f="",h=this._mappings.toArray(),m=0,g=h.length;m<g;m++){if(e="",(t=h[m]).generatedLine!==u)for(s=0;t.generatedLine!==u;)e+=";",u++;else if(m>0){if(!i.compareByGeneratedPositionsInflated(t,h[m-1]))continue;e+=","}e+=r.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(o=this._sources.indexOf(t.source),e+=r.encode(o-p),p=o,e+=r.encode(t.originalLine-1-l),l=t.originalLine-1,e+=r.encode(t.originalColumn-a),a=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-c),c=n)),f+=e}return f},u.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var n=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},u.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},u.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=u},{"./array-set":17,"./base64-vlq":18,"./mapping-list":21,"./util":26}],25:[function(e,t,n){var r=e("./source-map-generator").SourceMapGenerator,i=e("./util"),o=/(\r?\n)/,s="$$$isSourceNode$$$";function u(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[s]=!0,null!=r&&this.add(r)}u.fromStringWithSourceMap=function(e,t,n){var r=new u,s=e.split(o),a=0,l=function(){return e()+(e()||"");function e(){return a<s.length?s[a++]:void 0}},c=1,p=0,f=null;return t.eachMapping((function(e){if(null!==f){if(!(c<e.generatedLine)){var t=(n=s[a]||"").substr(0,e.generatedColumn-p);return s[a]=n.substr(e.generatedColumn-p),p=e.generatedColumn,h(f,t),void(f=e)}h(f,l()),c++,p=0}for(;c<e.generatedLine;)r.add(l()),c++;if(p<e.generatedColumn){var n=s[a]||"";r.add(n.substr(0,e.generatedColumn)),s[a]=n.substr(e.generatedColumn),p=e.generatedColumn}f=e}),this),a<s.length&&(f&&h(f,l()),r.add(s.splice(a).join(""))),t.sources.forEach((function(e){var o=t.sourceContentFor(e);null!=o&&(null!=n&&(e=i.join(n,e)),r.setSourceContent(e,o))})),r;function h(e,t){if(null===e||void 0===e.source)r.add(t);else{var o=n?i.join(n,e.source):e.source;r.add(new u(e.originalLine,e.originalColumn,o,t,e.name))}}},u.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[s]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},u.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[s]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},u.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)(t=this.children[n])[s]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},u.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},u.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[s]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},u.prototype.setSourceContent=function(e,t){this.sourceContents[i.toSetString(e)]=t},u.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][s]&&this.children[t].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(t=0,n=r.length;t<n;t++)e(i.fromSetString(r[t]),this.sourceContents[r[t]])},u.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},u.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new r(e),i=!1,o=null,s=null,u=null,a=null;return this.walk((function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?(o===r.source&&s===r.line&&u===r.column&&a===r.name||n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),o=r.source,s=r.line,u=r.column,a=r.name,i=!0):i&&(n.addMapping({generated:{line:t.line,column:t.column}}),o=null,i=!1);for(var l=0,c=e.length;l<c;l++)10===e.charCodeAt(l)?(t.line++,t.column=0,l+1===c?(o=null,i=!1):i&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++})),this.walkSourceContents((function(e,t){n.setSourceContent(e,t)})),{code:t.code,map:n}},n.SourceNode=u},{"./source-map-generator":24,"./util":26}],26:[function(e,t,n){n.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function o(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function s(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function u(e){var t=e,r=o(e);if(r){if(!r.path)return e;t=r.path}for(var i,u=n.isAbsolute(t),a=t.split(/\/+/),l=0,c=a.length-1;c>=0;c--)"."===(i=a[c])?a.splice(c,1):".."===i?l++:l>0&&(""===i?(a.splice(c+1,l),l=0):(a.splice(c,2),l--));return""===(t=a.join("/"))&&(t=u?"/":"."),r?(r.path=t,s(r)):t}function a(e,t){""===e&&(e="."),""===t&&(t=".");var n=o(t),r=o(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),s(n);if(n||t.match(i))return t;if(r&&!r.host&&!r.path)return r.host=t,s(r);var a="/"===t.charAt(0)?t:u(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=a,s(r)):a}n.urlParse=o,n.urlGenerate=s,n.normalize=u,n.join=a,n.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},n.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var l=!("__proto__"in Object.create(null));function c(e){return e}function p(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function f(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}n.toSetString=l?c:function(e){return p(e)?"$"+e:e},n.fromSetString=l?c:function(e){return p(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,t,n){var r=f(e.source,t.source);return 0!==r?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)||n?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=e.generatedLine-t.generatedLine)?r:f(e.name,t.name)},n.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)||n?r:0!==(r=f(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)?r:f(e.name,t.name)},n.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=f(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)?n:f(e.name,t.name)},n.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},n.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=o(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var i=r.path.lastIndexOf("/");i>=0&&(r.path=r.path.substring(0,i+1))}t=a(s(r),t)}return u(t)}},{}],27:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":23,"./lib/source-map-generator":24,"./lib/source-node":25}],28:[function(e,t,n){var r=e("path");t.exports=function(e){return"\\"===r.sep?e.replace(/\\/g,"/").replace(/^[a-z]:\/?/i,"/"):e}},{path:2}]},{},[5]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,(function(t){return o(e[s][1][t]||t)}),l,l.exports,t,e,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,r){"use strict";r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=c(t),s=n[0],a=n[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),l=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)e=o[t.charCodeAt(r)]<<18|o[t.charCodeAt(r+1)]<<12|o[t.charCodeAt(r+2)]<<6|o[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===a&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},r.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=0,a=r-o;s<a;s+=16383)i.push(l(t,s,s+16383>a?a:s+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],o[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var o,i,s=[],a=e;a<r;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){
|
2 |
+
/*!
|
3 |
+
* The buffer module from node.js, for the browser.
|
4 |
+
*
|
5 |
+
* @author Feross Aboukhadijeh <https://feross.org>
|
6 |
+
* @license MIT
|
7 |
+
*/
|
8 |
+
"use strict";var n=t("base64-js"),o=t("ieee754");r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=e.prototype,r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return s(t,e,r)}function s(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(t,r),o=i(n),s=o.write(t,r);s!==n&&(o=o.slice(0,s));return o}(t,r);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var o;o=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);return o.__proto__=e.prototype,o}(t,r,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=t.valueOf&&t.valueOf();if(null!=o&&o!==t)return e.from(o,r,n);var s=function(t){if(e.isBuffer(t)){var r=0|l(t.length),n=i(r);return 0===n.length?n:(t.copy(n,0,0,r),n)}if(void 0!==t.length)return"number"!=typeof t.length||F(t.length)?i(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return a(t),i(t<0?0:0|l(t))}function c(t){for(var e=t.length<0?0:0|l(t.length),r=i(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t){if(t>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function h(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return k(t).length;default:if(i)return o?-1:B(t).length;r=(""+r).toLowerCase(),i=!0}}function f(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return E(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,r,n,o,i){if(0===t.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),F(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=e.from(r,o)),e.isBuffer(r))return 0===r.length?-1:m(t,r,n,o,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):m(t,[r],n,o,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,o){var i,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=r;i<a;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var h=!0,f=0;f<u;f++)if(c(t,i+f)!==c(e,f)){h=!1;break}if(h)return i}return-1}function d(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(F(a))return s;t[r+s]=a}return s}function y(t,e,r,n){return P(B(e,t.length-r),t,r,n)}function v(t,e,r,n){return P(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return v(t,e,r,n)}function b(t,e,r,n){return P(k(e),t,r,n)}function _(t,e,r,n){return P(function(t,e){for(var r,n,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,a,u,c=t[o],l=null,h=c>239?4:c>223?3:c>191?2:1;if(o+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}r.kMaxLength=2147483647,e.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),e.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(t,e,r){return s(t,e,r)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,e.alloc=function(t,e,r){return function(t,e,r){return a(t),t<=0?i(t):void 0!==e?"string"==typeof r?i(t).fill(e,r):i(t).fill(e):i(t)}(t,e,r)},e.allocUnsafe=function(t){return u(t)},e.allocUnsafeSlow=function(t){return u(t)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,r){if(N(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),N(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,o=r.length,i=0,s=Math.min(n,o);i<s;++i)if(t[i]!==r[i]){n=t[i],o=r[i];break}return n<o?-1:o<n?1:0},e.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return e.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var o=e.allocUnsafe(r),i=0;for(n=0;n<t.length;++n){var s=t[n];if(N(s,Uint8Array)&&(s=e.from(s)),!e.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(o,i),i+=s.length}return o},e.byteLength=h,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)p(this,e,e+1);return this},e.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)p(this,e,e+3),p(this,e+1,e+2);return this},e.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},e.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?C(this,0,t):f.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},e.prototype.compare=function(t,r,n,o,i){if(N(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),r<0||n>t.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(o>>>=0),a=(n>>>=0)-(r>>>=0),u=Math.min(s,a),c=this.slice(o,i),l=t.slice(r,n),h=0;h<u;++h)if(c[h]!==l[h]){s=c[h],a=l[h];break}return s<a?-1:a<s?1:0},e.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},e.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},e.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},e.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return d(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function S(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function L(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=j(t[i]);return o}function R(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function O(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,r,n,o,i,s){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<s)throw new RangeError('"value" argument is out of bounds');if(n+o>t.length)throw new RangeError("Index out of range")}function T(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(t,e,r,n,i){return e=+e,r>>>=0,i||T(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return e=+e,r>>>=0,i||T(t,0,r,8),o.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t);var o=this.subarray(t,r);return o.__proto__=e.prototype,o},e.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},e.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},e.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),o.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),o.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),o.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),o.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},e.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return x(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return x(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,o){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),r>=t.length&&(r=t.length),r||(r=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r<o-n&&(o=t.length-r+n);var i=o-n;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,n,o);else if(this===t&&n<r&&r<o)for(var s=i-1;s>=0;--s)t[s+r]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,o),r);return i},e.prototype.fill=function(t,r,n,o){if("string"==typeof t){if("string"==typeof r?(o=r,r=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!e.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===t.length){var i=t.charCodeAt(0);("utf8"===o&&i<128||"latin1"===o)&&(t=i)}}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var s;if(r>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=r;s<n;++s)this[s]=t;else{var a=e.isBuffer(t)?t:e.from(t,o),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var I=/[^+/0-9A-Za-z-_]/g;function j(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function k(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function F(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(t,e,r){r.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?o-1:0,f=r?-1:1,p=t[e+h];for(h+=f,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+t[e+h],h+=f,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,h=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,g=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,o),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=g,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;t[r+p]=255&s,p+=g,s/=256,c-=8);t[r+p-g]|=128*m}},{}],5:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}r.resolve=function(){for(var r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s=i>=0?arguments[i]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,o="/"===s.charAt(0))}return(o?"/":"")+(r=e(n(r.split("/"),(function(t){return!!t})),!o).join("/"))||"."},r.normalize=function(t){var i=r.isAbsolute(t),s="/"===o(t,-1);return(t=e(n(t.split("/"),(function(t){return!!t})),!i).join("/"))||i||(t="."),t&&s&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var o=n(t.split("/")),i=n(e.split("/")),s=Math.min(o.length,i.length),a=s,u=0;u<s;u++)if(o[u]!==i[u]){a=u;break}var c=[];for(u=a;u<o.length;u++)c.push("..");return(c=c.concat(i.slice(a))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,o=!0,i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},r.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,o=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!o){r=e+1;break}}else-1===n&&(o=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,o=!0,i=0,s=t.length-1;s>=0;--s){var a=t.charCodeAt(s);if(47!==a)-1===n&&(o=!1,n=s+1),46===a?-1===e?e=s:1!==i&&(i=1):-1!==e&&(i=-1);else if(!o){r=s+1;break}}return-1===e||-1===n||0===i||1===i&&e===n-1&&e===r+1?"":t.slice(e,n)};var o="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t("_process"))},{_process:6}],6:[function(t,e,r){var n,o,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var c,l=[],h=!1,f=-1;function p(){h&&c&&(h=!1,c.length?l=c.concat(l):f=-1,l.length&&g())}function g(){if(!h){var t=u(p);h=!0;for(var e=l.length;e;){for(c=l,l=[];++f<e;)c&&c[f].run();f=-1,e=l.length}c=null,h=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new m(t,e)),1!==l.length||h||u(g)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],7:[function(t,e,r){(function(t){!function(n){var o="object"==typeof r&&r&&!r.nodeType&&r,i="object"==typeof e&&e&&!e.nodeType&&e,s="object"==typeof t&&t;s.global!==s&&s.window!==s&&s.self!==s||(n=s);var a,u,c=2147483647,l=/^xn--/,h=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function d(t){throw new RangeError(p[t])}function y(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+y((t=t.replace(f,".")).split("."),e).join(".")}function w(t){for(var e,r,n=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(r=t.charCodeAt(o++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--):n.push(e);return n}function b(t){return y(t,(function(t){var e="";return t>65535&&(e+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=m(t)})).join("")}function _(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,r){var n=0;for(t=r?g(t/700):t>>1,t+=g(t/e);t>455;n+=36)t=g(t/35);return g(n+36*t/(t+38))}function C(t){var e,r,n,o,i,s,a,u,l,h,f,p=[],m=t.length,y=0,v=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&d("not-basic"),p.push(t.charCodeAt(n));for(o=r>0?r+1:0;o<m;){for(i=y,s=1,a=36;o>=m&&d("invalid-input"),((u=(f=t.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>g((c-y)/s))&&d("overflow"),y+=u*s,!(u<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>g(c/(h=36-l))&&d("overflow"),s*=h;w=A(y-i,e=p.length+1,0==i),g(y/e)>c-v&&d("overflow"),v+=g(y/e),y%=e,p.splice(y++,0,v)}return b(p)}function E(t){var e,r,n,o,i,s,a,u,l,h,f,p,y,v,b,C=[];for(p=(t=w(t)).length,e=128,r=0,i=72,s=0;s<p;++s)(f=t[s])<128&&C.push(m(f));for(n=o=C.length,o&&C.push("-");n<p;){for(a=c,s=0;s<p;++s)(f=t[s])>=e&&f<a&&(a=f);for(a-e>g((c-r)/(y=n+1))&&d("overflow"),r+=(a-e)*y,e=a,s=0;s<p;++s)if((f=t[s])<e&&++r>c&&d("overflow"),f==e){for(u=r,l=36;!(u<(h=l<=i?1:l>=i+26?26:l-i));l+=36)b=u-h,v=36-h,C.push(m(_(h+b%v,0))),u=g(b/v);C.push(m(_(u,0))),i=A(r,y,n==o),r=0,++n}++r,++e}return C.join("")}if(a={version:"1.4.1",ucs2:{decode:w,encode:b},decode:C,encode:E,toASCII:function(t){return v(t,(function(t){return h.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return v(t,(function(t){return l.test(t)?C(t.slice(4).toLowerCase()):t}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return a}));else if(o&&i)if(e.exports==o)i.exports=a;else for(u in a)a.hasOwnProperty(u)&&(o[u]=a[u]);else n.punycode=a}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,i){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var h,f,p,g,m=t[l].replace(a,"%20"),d=m.indexOf(r);d>=0?(h=m.substr(0,d),f=m.substr(d+1)):(h=m,f=""),p=decodeURIComponent(h),g=decodeURIComponent(f),n(s,p)?o(s[p])?s[p].push(g):s[p]=[s[p],g]:s[p]=g}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],9:[function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?i(s(t),(function(s){var a=encodeURIComponent(n(s))+r;return o(t[s])?i(t[s],(function(t){return a+encodeURIComponent(n(t))})).join(e):a+encodeURIComponent(n(t[s]))})).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],10:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":8,"./encode":9}],11:[function(t,e,r){(function(e,n){var o=t("process/browser.js").nextTick,i=Function.prototype.apply,s=Array.prototype.slice,a={},u=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,n=!(arguments.length<2)&&s.call(arguments,1);return a[e]=!0,o((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":6,timers:11}],12:[function(t,e,r){"use strict";var n=t("punycode"),o=t("./util");function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=w,r.resolve=function(t,e){return w(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?w(t,!1,!0).resolveObject(e):e},r.format=function(t){o.isString(t)&&(t=w(t));return t instanceof i?t.format():i.prototype.format.call(t)},r.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=t("querystring");function w(t,e,r){if(t&&o.isObject(t)&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i<t.indexOf("#")?"?":"#",c=t.split(a);c[0]=c[0].replace(/\\/g,"/");var w=t=c.join(a);if(w=w.trim(),!r&&1===t.split("#").length){var b=u.exec(w);if(b)return this.path=w,this.href=w,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?v.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var _=s.exec(w);if(_){var A=(_=_[0]).toLowerCase();this.protocol=A,w=w.substr(_.length)}if(r||_||w.match(/^\/\/[^@\/]+@[^@\/]+/)){var C="//"===w.substr(0,2);!C||_&&d[_]||(w=w.substr(2),this.slashes=!0)}if(!d[_]&&(C||_&&!y[_])){for(var E,S,L=-1,R=0;R<f.length;R++){-1!==(O=w.indexOf(f[R]))&&(-1===L||O<L)&&(L=O)}-1!==(S=-1===L?w.lastIndexOf("@"):w.lastIndexOf("@",L))&&(E=w.slice(0,S),w=w.slice(S+1),this.auth=decodeURIComponent(E)),L=-1;for(R=0;R<h.length;R++){var O;-1!==(O=w.indexOf(h[R]))&&(-1===L||O<L)&&(L=O)}-1===L&&(L=w.length),this.host=w.slice(0,L),w=w.slice(L),this.parseHost(),this.hostname=this.hostname||"";var M="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!M)for(var T=this.hostname.split(/\./),x=(R=0,T.length);R<x;R++){var U=T[R];if(U&&!U.match(p)){for(var I="",j=0,B=U.length;j<B;j++)U.charCodeAt(j)>127?I+="x":I+=U[j];if(!I.match(p)){var k=T.slice(0,R),P=T.slice(R+1),N=U.match(g);N&&(k.push(N[1]),P.unshift(N[2])),P.length&&(w="/"+P.join(".")+w),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+F,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!m[A])for(R=0,x=l.length;R<x;R++){var D=l[R];if(-1!==w.indexOf(D)){var G=encodeURIComponent(D);G===D&&(G=escape(D)),w=w.split(D).join(G)}}var z=w.indexOf("#");-1!==z&&(this.hash=w.substr(z),w=w.slice(0,z));var V=w.indexOf("?");if(-1!==V?(this.search=w.substr(V),this.query=w.substr(V+1),e&&(this.query=v.parse(this.query)),w=w.slice(0,V)):e&&(this.search="",this.query={}),w&&(this.pathname=w),y[A]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var $=this.search||"";this.path=F+$}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+i+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+n},i.prototype.resolve=function(t){return this.resolveObject(w(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(o.isString(t)){var e=new i;e.parse(t,!1,!0),t=e}for(var r=new i,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=t[l])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!y[t.protocol]){for(var h=Object.keys(t),f=0;f<h.length;f++){var p=h[f];r[p]=t[p]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||d[t.protocol])r.pathname=t.pathname;else{for(var g=(t.pathname||"").split("/");g.length&&!(t.host=g.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==g[0]&&g.unshift(""),g.length<2&&g.unshift(""),r.pathname=g.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var m=r.pathname||"",v=r.search||"";r.path=m+v}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var w=r.pathname&&"/"===r.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=b||w||r.host&&t.pathname,A=_,C=r.pathname&&r.pathname.split("/")||[],E=(g=t.pathname&&t.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===C[0]?C[0]=r.host:C.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===g[0]?g[0]=t.host:g.unshift(t.host)),t.host=null),_=_&&(""===g[0]||""===C[0])),b)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,C=g;else if(g.length)C||(C=[]),C.pop(),C=C.concat(g),r.search=t.search,r.query=t.query;else if(!o.isNullOrUndefined(t.search)){if(E)r.hostname=r.host=C.shift(),(M=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=M.shift(),r.host=r.hostname=M.shift());return r.search=t.search,r.query=t.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!C.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=C.slice(-1)[0],L=(r.host||t.host||C.length>1)&&("."===S||".."===S)||""===S,R=0,O=C.length;O>=0;O--)"."===(S=C[O])?C.splice(O,1):".."===S?(C.splice(O,1),R++):R&&(C.splice(O,1),R--);if(!_&&!A)for(;R--;R)C.unshift("..");!_||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),L&&"/"!==C.join("/").substr(-1)&&C.push("");var M,T=""===C[0]||C[0]&&"/"===C[0].charAt(0);E&&(r.hostname=r.host=T?"":C.length?C.shift():"",(M=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=M.shift(),r.host=r.hostname=M.shift()));return(_=_||r.host&&C.length)&&!T&&C.unshift(""),C.length?r.pathname=C.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":13,punycode:7,querystring:10}],13:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],14:[function(t,e,r){window.css=t("css")},{css:16}],15:[function(t,e,r){(function(t){!function(r){"use strict";var n,o="function"==typeof(n=r.atob)?n:"function"==typeof t?function(e){return new t(e,"base64").toString("binary")}:"object"==typeof r.base64js?function(t){var e=r.base64js.b64ToByteArray(t);return Array.prototype.map.call(e,(function(t){return String.fromCharCode(t)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")};r.atob=o,"object"==typeof e&&e&&e.exports&&(e.exports=o)}(window)}).call(this,t("buffer").Buffer)},{buffer:3}],16:[function(t,e,r){r.parse=t("./lib/parse"),r.stringify=t("./lib/stringify")},{"./lib/parse":17,"./lib/stringify":21}],17:[function(t,e,r){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function o(t){return t?t.replace(/^\s+|\s+$/g,""):""}e.exports=function(t,e){e=e||{};var r=1,i=1;function s(t){var e=t.match(/\n/g);e&&(r+=e.length);var n=t.lastIndexOf("\n");i=~n?t.length-n:i+t.length}function a(){var t={line:r,column:i};return function(e){return e.position=new u(t),m(),e}}function u(t){this.start=t,this.end={line:r,column:i},this.source=e.source}u.prototype.content=t;var c=[];function l(n){var o=new Error(e.source+":"+r+":"+i+": "+n);if(o.reason=n,o.filename=e.source,o.line=r,o.column=i,o.source=t,!e.silent)throw o;c.push(o)}function h(){return g(/^{\s*/)}function f(){return g(/^}/)}function p(){var e,r=[];for(m(),d(r);t.length&&"}"!=t.charAt(0)&&(e=R()||O());)!1!==e&&(r.push(e),d(r));return r}function g(e){var r=e.exec(t);if(r){var n=r[0];return s(n),t=t.slice(n.length),r}}function m(){g(/^\s*/)}function d(t){var e;for(t=t||[];e=y();)!1!==e&&t.push(e);return t}function y(){var e=a();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var r=2;""!=t.charAt(r)&&("*"!=t.charAt(r)||"/"!=t.charAt(r+1));)++r;if(r+=2,""===t.charAt(r-1))return l("End of comment missing");var n=t.slice(2,r-2);return i+=2,s(n),t=t.slice(r),i+=2,e({type:"comment",comment:n})}}function v(){var t=g(/^([^{]+)/);if(t)return o(t[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(t){return t.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(t){return t.replace(/\u200C/g,",")}))}function w(){var t=a(),e=g(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(e){if(e=o(e[0]),!g(/^:\s*/))return l("property missing ':'");var r=g(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=t({type:"declaration",property:e.replace(n,""),value:r?o(r[0]).replace(n,""):""});return g(/^[;\s]*/),i}}function b(){var t,e=[];if(!h())return l("missing '{'");for(d(e);t=w();)!1!==t&&(e.push(t),d(e));return f()?e:l("missing '}'")}function _(){for(var t,e=[],r=a();t=g(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(t[1]),g(/^,\s*/);if(e.length)return r({type:"keyframe",values:e,declarations:b()})}var A,C=L("import"),E=L("charset"),S=L("namespace");function L(t){var e=new RegExp("^@"+t+"\\s*([^;]+);");return function(){var r=a(),n=g(e);if(n){var o={type:t};return o[t]=n[1].trim(),r(o)}}}function R(){if("@"==t[0])return function(){var t=a();if(e=g(/^@([-\w]+)?keyframes\s*/)){var e,r=e[1];if(!(e=g(/^([-\w]+)\s*/)))return l("@keyframes missing name");var n,o=e[1];if(!h())return l("@keyframes missing '{'");for(var i=d();n=_();)i.push(n),i=i.concat(d());return f()?t({type:"keyframes",name:o,vendor:r,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var t=a(),e=g(/^@media *([^{]+)/);if(e){var r=o(e[1]);if(!h())return l("@media missing '{'");var n=d().concat(p());return f()?t({type:"media",media:r,rules:n}):l("@media missing '}'")}}()||function(){var t=a(),e=g(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return t({type:"custom-media",name:o(e[1]),media:o(e[2])})}()||function(){var t=a(),e=g(/^@supports *([^{]+)/);if(e){var r=o(e[1]);if(!h())return l("@supports missing '{'");var n=d().concat(p());return f()?t({type:"supports",supports:r,rules:n}):l("@supports missing '}'")}}()||C()||E()||S()||function(){var t=a(),e=g(/^@([-\w]+)?document *([^{]+)/);if(e){var r=o(e[1]),n=o(e[2]);if(!h())return l("@document missing '{'");var i=d().concat(p());return f()?t({type:"document",document:n,vendor:r,rules:i}):l("@document missing '}'")}}()||function(){var t=a();if(g(/^@page */)){var e=v()||[];if(!h())return l("@page missing '{'");for(var r,n=d();r=w();)n.push(r),n=n.concat(d());return f()?t({type:"page",selectors:e,declarations:n}):l("@page missing '}'")}}()||function(){var t=a();if(g(/^@host\s*/)){if(!h())return l("@host missing '{'");var e=d().concat(p());return f()?t({type:"host",rules:e}):l("@host missing '}'")}}()||function(){var t=a();if(g(/^@font-face\s*/)){if(!h())return l("@font-face missing '{'");for(var e,r=d();e=w();)r.push(e),r=r.concat(d());return f()?t({type:"font-face",declarations:r}):l("@font-face missing '}'")}}()}function O(){var t=a(),e=v();return e?(d(),t({type:"rule",selectors:e,declarations:b()})):l("selector missing")}return function t(e,r){var n=e&&"string"==typeof e.type,o=n?e:r;for(var i in e){var s=e[i];Array.isArray(s)?s.forEach((function(e){t(e,o)})):s&&"object"==typeof s&&t(s,o)}n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:r||null});return e}((A=p(),{type:"stylesheet",stylesheet:{source:e.source,rules:A,parsingErrors:c}}))}},{}],18:[function(t,e,r){function n(t){this.options=t||{}}e.exports=n,n.prototype.emit=function(t){return t},n.prototype.visit=function(t){return this[t.type](t)},n.prototype.mapVisit=function(t,e){var r="";e=e||"";for(var n=0,o=t.length;n<o;n++)r+=this.visit(t[n]),e&&n<o-1&&(r+=this.emit(e));return r}},{}],19:[function(t,e,r){var n=t("./compiler"),o=t("inherits");function i(t){n.call(this,t)}e.exports=i,o(i,n),i.prototype.compile=function(t){return t.stylesheet.rules.map(this.visit,this).join("")},i.prototype.comment=function(t){return this.emit("",t.position)},i.prototype.import=function(t){return this.emit("@import "+t.import+";",t.position)},i.prototype.media=function(t){return this.emit("@media "+t.media,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},i.prototype.document=function(t){var e="@"+(t.vendor||"")+"document "+t.document;return this.emit(e,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},i.prototype.charset=function(t){return this.emit("@charset "+t.charset+";",t.position)},i.prototype.namespace=function(t){return this.emit("@namespace "+t.namespace+";",t.position)},i.prototype.supports=function(t){return this.emit("@supports "+t.supports,t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},i.prototype.keyframes=function(t){return this.emit("@"+(t.vendor||"")+"keyframes "+t.name,t.position)+this.emit("{")+this.mapVisit(t.keyframes)+this.emit("}")},i.prototype.keyframe=function(t){var e=t.declarations;return this.emit(t.values.join(","),t.position)+this.emit("{")+this.mapVisit(e)+this.emit("}")},i.prototype.page=function(t){var e=t.selectors.length?t.selectors.join(", "):"";return this.emit("@page "+e,t.position)+this.emit("{")+this.mapVisit(t.declarations)+this.emit("}")},i.prototype["font-face"]=function(t){return this.emit("@font-face",t.position)+this.emit("{")+this.mapVisit(t.declarations)+this.emit("}")},i.prototype.host=function(t){return this.emit("@host",t.position)+this.emit("{")+this.mapVisit(t.rules)+this.emit("}")},i.prototype["custom-media"]=function(t){return this.emit("@custom-media "+t.name+" "+t.media+";",t.position)},i.prototype.rule=function(t){var e=t.declarations;return e.length?this.emit(t.selectors.join(","),t.position)+this.emit("{")+this.mapVisit(e)+this.emit("}"):""},i.prototype.declaration=function(t){return this.emit(t.property+":"+t.value,t.position)+this.emit(";")}},{"./compiler":18,inherits:24}],20:[function(t,e,r){var n=t("./compiler"),o=t("inherits");function i(t){t=t||{},n.call(this,t),this.indentation=t.indent}e.exports=i,o(i,n),i.prototype.compile=function(t){return this.stylesheet(t)},i.prototype.stylesheet=function(t){return this.mapVisit(t.stylesheet.rules,"\n\n")},i.prototype.comment=function(t){return this.emit(this.indent()+"/*"+t.comment+"*/",t.position)},i.prototype.import=function(t){return this.emit("@import "+t.import+";",t.position)},i.prototype.media=function(t){return this.emit("@media "+t.media,t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},i.prototype.document=function(t){var e="@"+(t.vendor||"")+"document "+t.document;return this.emit(e,t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},i.prototype.charset=function(t){return this.emit("@charset "+t.charset+";",t.position)},i.prototype.namespace=function(t){return this.emit("@namespace "+t.namespace+";",t.position)},i.prototype.supports=function(t){return this.emit("@supports "+t.supports,t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},i.prototype.keyframes=function(t){return this.emit("@"+(t.vendor||"")+"keyframes "+t.name,t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.keyframes,"\n")+this.emit(this.indent(-1)+"}")},i.prototype.keyframe=function(t){var e=t.declarations;return this.emit(this.indent())+this.emit(t.values.join(", "),t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},i.prototype.page=function(t){var e=t.selectors.length?t.selectors.join(", ")+" ":"";return this.emit("@page "+e,t.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(t.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},i.prototype["font-face"]=function(t){return this.emit("@font-face ",t.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(t.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},i.prototype.host=function(t){return this.emit("@host",t.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},i.prototype["custom-media"]=function(t){return this.emit("@custom-media "+t.name+" "+t.media+";",t.position)},i.prototype.rule=function(t){var e=this.indent(),r=t.declarations;return r.length?this.emit(t.selectors.map((function(t){return e+t})).join(",\n"),t.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(r,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},i.prototype.declaration=function(t){return this.emit(this.indent())+this.emit(t.property+": "+t.value,t.position)+this.emit(";")},i.prototype.indent=function(t){return this.level=this.level||1,null!=t?(this.level+=t,""):Array(this.level).join(this.indentation||" ")}},{"./compiler":18,inherits:24}],21:[function(t,e,r){var n=t("./compress"),o=t("./identity");e.exports=function(e,r){var i=(r=r||{}).compress?new n(r):new o(r);if(r.sourcemap){t("./source-map-support")(i);var s=i.compile(e);return i.applySourceMaps(),{code:s,map:"generator"===r.sourcemap?i.map:i.map.toJSON()}}return s=i.compile(e)}},{"./compress":19,"./identity":20,"./source-map-support":22}],22:[function(t,e,r){var n=t("source-map").SourceMapGenerator,o=t("source-map").SourceMapConsumer,i=t("source-map-resolve"),s=t("fs"),a=t("path");e.exports=function(t){for(var e in t._comment=t.comment,t.map=new n,t.position={line:1,column:1},t.files={},r)t[e]=r[e]};const u=function(t){return"\\"===a.sep?t.replace(/\\/g,"/").replace(/^[a-z]:\/?/i,"/"):t};r.updatePosition=function(t){var e=t.match(/\n/g);e&&(this.position.line+=e.length);var r=t.lastIndexOf("\n");this.position.column=~r?t.length-r:this.position.column+t.length},r.emit=function(t,e){if(e){var r=u(e.source||"source.css");this.map.addMapping({source:r,generated:{line:this.position.line,column:Math.max(this.position.column-1,0)},original:{line:e.start.line,column:e.start.column-1}}),this.addFile(r,e)}return this.updatePosition(t),t},r.addFile=function(t,e){"string"==typeof e.content&&(Object.prototype.hasOwnProperty.call(this.files,t)||(this.files[t]=e.content))},r.applySourceMaps=function(){Object.keys(this.files).forEach((function(t){var e=this.files[t];if(this.map.setSourceContent(t,e),!1!==this.options.inputSourcemaps){var r=i.resolveSync(e,t,s.readFileSync);if(r){var n=new o(r.map),c=r.sourcesRelativeTo;this.map.applySourceMap(n,t,u(a.dirname(c)))}}}),this)},r.comment=function(t){return/^# sourceMappingURL=/.test(t.comment)?this.emit("",t.position):this._comment(t)}},{fs:2,path:5,"source-map":36,"source-map-resolve":25}],23:[function(t,e,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],i(r),i(n))}function s(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(n),r=1;r<e.length;r++)e=(t=i(e,r).join("")).match(n);return t}}e.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},r=o.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch(t){var n=s(r[0]);n!==r[0]&&(e[r[0]]=n)}r=o.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var u=i[a];t=t.replace(new RegExp(u,"g"),e[u])}return t}(t)}}},{}],24:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],25:[function(t,e,r){(function(r){var n=t("atob"),o=t("url"),i=t("path"),s=t("decode-uri-component");function a(){return Array.prototype.reduce.call(arguments,(function(t,e){return o.resolve(t,e)}))}function u(t){return"\\"===i.sep?t.replace(/\\/g,"/").replace(/^[a-z]:\/?/i,"/"):t}function c(t){return s(t.replace(/\+/g,"%2B"))}function l(t,e,n){r((function(){t(e,n)}))}function h(t,e){try{return JSON.parse(t.replace(/^\)\]\}'/,""))}catch(t){throw t.sourceMapData=e,t}}function f(t,e,r){var n=c(e);try{return String(t(n))}catch(t){throw t.sourceMapData=r,t}}var p=/[#@] sourceMappingURL=([^\s'"]*)/,g=RegExp("(?:/\\*(?:\\s*\r?\n(?://)?)?(?:"+p.source+")\\s*\\*/|//(?:"+p.source+"))\\s*");function m(t,e,r,n){var o;try{o=b(t,e)}catch(t){return l(n,t)}if(!o||o.map)return l(n,null,o);r(c(o.url),(function(t,e){if(t)return t.sourceMapData=o,n(t);o.map=String(e);try{o.map=h(o.map,o)}catch(t){return n(t)}n(null,o)}))}function d(t,e,r){var n=b(t,e);return!n||n.map?n:(n.map=f(r,n.url,n),n.map=h(n.map,n),n)}var y=/^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/,v=/^(?:application|text)\/json$/;function w(t){if("undefined"==typeof TextDecoder||"undefined"==typeof Uint8Array)return n(t);var e=function(t){for(var e=n(t),r=e.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=e.charCodeAt(i);return o}(t);return new TextDecoder("utf-8",{fatal:!0}).decode(e)}function b(t,e){e=u(e);var r=function(t){var e=t.match(g);return e?e[1]||e[2]||"":null}(t);if(!r)return null;var n=r.match(y);if(n){var o=n[1]||"text/plain",i=n[2]||"",s=n[3]||"",c={sourceMappingURL:r,url:null,sourcesRelativeTo:e,map:s};if(!v.test(o)){var l=new Error("Unuseful data uri mime type: "+o);throw l.sourceMapData=c,l}try{c.map=h(";base64"===i?w(s):decodeURIComponent(s),c)}catch(l){throw l.sourceMapData=c,l}return c}var f=a(e,r);return{sourceMappingURL:r,url:f,sourcesRelativeTo:f,map:null}}function _(t,e,r,n,o){"function"==typeof n&&(o=n,n={});var i=t.sources?t.sources.length:0,s={sourcesResolved:[],sourcesContent:[]};if(0!==i){var a=function(){0===--i&&o(null,s)};E(t,e,n,(function(t,e,n){if(s.sourcesResolved[n]=t,"string"==typeof e)s.sourcesContent[n]=e,l(a,null);else{var o=c(t);r(o,(function(t,e){s.sourcesContent[n]=t||String(e),a()}))}}))}else l(o,null,s)}function A(t,e,r,n){var o={sourcesResolved:[],sourcesContent:[]};return t.sources&&0!==t.sources.length?(E(t,e,n,(function(t,e,n){if(o.sourcesResolved[n]=t,null!==r)if("string"==typeof e)o.sourcesContent[n]=e;else{var i=c(t);try{o.sourcesContent[n]=String(r(i))}catch(t){o.sourcesContent[n]=t}}})),o):o}var C=/\/?$/;function E(t,e,r,n){var o;r=r||{},e=u(e);for(var i=0,s=t.sources.length;i<s;i++)o=null,"string"==typeof r.sourceRoot?o=r.sourceRoot:"string"==typeof t.sourceRoot&&!1!==r.sourceRoot&&(o=t.sourceRoot),n(null===o||""===o?a(e,t.sources[i]):a(e,o.replace(C,"/"),t.sources[i]),(t.sourcesContent||[])[i],i)}e.exports={resolveSourceMap:m,resolveSourceMapSync:d,resolveSources:_,resolveSourcesSync:A,resolve:function(t,e,r,n,o){if("function"==typeof n&&(o=n,n={}),null===t){var i={sourceMappingURL:null,url:e,sourcesRelativeTo:e,map:null},s=c(e);r(s,(function(t,e){if(t)return t.sourceMapData=i,o(t);i.map=String(e);try{i.map=h(i.map,i)}catch(t){return o(t)}a(i)}))}else m(t,e,r,(function(t,e){return t?o(t):e?void a(e):o(null,null)}));function a(t){_(t.map,t.sourcesRelativeTo,r,n,(function(e,r){if(e)return o(e);t.sourcesResolved=r.sourcesResolved,t.sourcesContent=r.sourcesContent,o(null,t)}))}},resolveSync:function(t,e,r,n){var o;if(null===t){(o={sourceMappingURL:null,url:e,sourcesRelativeTo:e,map:null}).map=f(r,e,o),o.map=h(o.map,o)}else if(!(o=d(t,e,r)))return null;var i=A(o.map,o.sourcesRelativeTo,r,n);return o.sourcesResolved=i.sourcesResolved,o.sourcesContent=i.sourcesContent,o},parseMapToJSON:h}}).call(this,t("timers").setImmediate)},{atob:15,"decode-uri-component":23,path:5,timers:11,url:12}],26:[function(t,e,r){var n=t("./util"),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function s(){this._array=[],this._set=i?new Map:Object.create(null)}s.fromArray=function(t,e){for(var r=new s,n=0,o=t.length;n<o;n++)r.add(t[n],e);return r},s.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},s.prototype.add=function(t,e){var r=i?t:n.toSetString(t),s=i?this.has(t):o.call(this._set,r),a=this._array.length;s&&!e||this._array.push(t),s||(i?this._set.set(t,a):this._set[r]=a)},s.prototype.has=function(t){if(i)return this._set.has(t);var e=n.toSetString(t);return o.call(this._set,e)},s.prototype.indexOf=function(t){if(i){var e=this._set.get(t);if(e>=0)return e}else{var r=n.toSetString(t);if(o.call(this._set,r))return this._set[r]}throw new Error('"'+t+'" is not in the set.')},s.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},s.prototype.toArray=function(){return this._array.slice()},r.ArraySet=s},{"./util":35}],27:[function(t,e,r){var n=t("./base64");r.encode=function(t){var e,r="",o=function(t){return t<0?1+(-t<<1):0+(t<<1)}(t);do{e=31&o,(o>>>=5)>0&&(e|=32),r+=n.encode(e)}while(o>0);return r},r.decode=function(t,e,r){var o,i,s,a,u=t.length,c=0,l=0;do{if(e>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=n.decode(t.charCodeAt(e++))))throw new Error("Invalid base64 digit: "+t.charAt(e-1));o=!!(32&i),c+=(i&=31)<<l,l+=5}while(o);r.value=(a=(s=c)>>1,1==(1&s)?-a:a),r.rest=e}},{"./base64":28}],28:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(t){if(0<=t&&t<n.length)return n[t];throw new TypeError("Must be between 0 and 63: "+t)},r.decode=function(t){return 65<=t&&t<=90?t-65:97<=t&&t<=122?t-97+26:48<=t&&t<=57?t-48+52:43==t?62:47==t?63:-1}},{}],29:[function(t,e,r){r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(t,e,n,o){if(0===e.length)return-1;var i=function t(e,n,o,i,s,a){var u=Math.floor((n-e)/2)+e,c=s(o,i[u],!0);return 0===c?u:c>0?n-u>1?t(u,n,o,i,s,a):a==r.LEAST_UPPER_BOUND?n<i.length?n:-1:u:u-e>1?t(e,u,o,i,s,a):a==r.LEAST_UPPER_BOUND?u:e<0?-1:e}(-1,e.length,t,e,n,o||r.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===n(e[i],e[i-1],!0);)--i;return i}},{}],30:[function(t,e,r){var n=t("./util");function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},o.prototype.add=function(t){var e,r,o,i,s,a;e=this._last,r=t,o=e.generatedLine,i=r.generatedLine,s=e.generatedColumn,a=r.generatedColumn,i>o||i==o&&a>=s||n.compareByGeneratedPositionsInflated(e,r)<=0?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=o},{"./util":35}],31:[function(t,e,r){function n(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function o(t,e,r,i){if(r<i){var s=r-1;n(t,(l=r,h=i,Math.round(l+Math.random()*(h-l))),i);for(var a=t[i],u=r;u<i;u++)e(t[u],a)<=0&&n(t,s+=1,u);n(t,s+1,u);var c=s+1;o(t,e,r,c-1),o(t,e,c+1,i)}var l,h}r.quickSort=function(t,e){o(t,e,0,t.length-1)}},{}],32:[function(t,e,r){var n=t("./util"),o=t("./binary-search"),i=t("./array-set").ArraySet,s=t("./base64-vlq"),a=t("./quick-sort").quickSort;function u(t,e){var r=t;return"string"==typeof t&&(r=n.parseSourceMapInput(t)),null!=r.sections?new h(r,e):new c(r,e)}function c(t,e){var r=t;"string"==typeof t&&(r=n.parseSourceMapInput(t));var o=n.getArg(r,"version"),s=n.getArg(r,"sources"),a=n.getArg(r,"names",[]),u=n.getArg(r,"sourceRoot",null),c=n.getArg(r,"sourcesContent",null),l=n.getArg(r,"mappings"),h=n.getArg(r,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);u&&(u=n.normalize(u)),s=s.map(String).map(n.normalize).map((function(t){return u&&n.isAbsolute(u)&&n.isAbsolute(t)?n.relative(u,t):t})),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map((function(t){return n.computeSourceURL(u,t,e)})),this.sourceRoot=u,this.sourcesContent=c,this._mappings=l,this._sourceMapURL=e,this.file=h}function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function h(t,e){var r=t;"string"==typeof t&&(r=n.parseSourceMapInput(t));var o=n.getArg(r,"version"),s=n.getArg(r,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=s.map((function(t){if(t.url)throw new Error("Support for url field in sections not implemented.");var r=n.getArg(t,"offset"),o=n.getArg(r,"line"),i=n.getArg(r,"column");if(o<a.line||o===a.line&&i<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=r,{generatedOffset:{generatedLine:o+1,generatedColumn:i+1},consumer:new u(n.getArg(t,"map"),e)}}))}u.fromSourceMap=function(t,e){return c.fromSourceMap(t,e)},u.prototype._version=3,u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),u.prototype._charIsMappingSeparator=function(t,e){var r=t.charAt(e);return";"===r||","===r},u.prototype._parseMappings=function(t,e){throw new Error("Subclasses must implement _parseMappings")},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,u.prototype.eachMapping=function(t,e,r){var o,i=e||null;switch(r||u.GENERATED_ORDER){case u.GENERATED_ORDER:o=this._generatedMappings;break;case u.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;o.map((function(t){var e=null===t.source?null:this._sources.at(t.source);return{source:e=n.computeSourceURL(s,e,this._sourceMapURL),generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}}),this).forEach(t,i)},u.prototype.allGeneratedPositionsFor=function(t){var e=n.getArg(t,"line"),r={source:n.getArg(t,"source"),originalLine:e,originalColumn:n.getArg(t,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,o.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(void 0===t.column)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var c=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==c;)i.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i},r.SourceMapConsumer=u,c.prototype=Object.create(u.prototype),c.prototype.consumer=u,c.prototype._findSourceIndex=function(t){var e,r=t;if(null!=this.sourceRoot&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==t)return e;return-1},c.fromSourceMap=function(t,e){var r=Object.create(c.prototype),o=r._names=i.fromArray(t._names.toArray(),!0),s=r._sources=i.fromArray(t._sources.toArray(),!0);r.sourceRoot=t._sourceRoot,r.sourcesContent=t._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=t._file,r._sourceMapURL=e,r._absoluteSources=r._sources.toArray().map((function(t){return n.computeSourceURL(r.sourceRoot,t,e)}));for(var u=t._mappings.toArray().slice(),h=r.__generatedMappings=[],f=r.__originalMappings=[],p=0,g=u.length;p<g;p++){var m=u[p],d=new l;d.generatedLine=m.generatedLine,d.generatedColumn=m.generatedColumn,m.source&&(d.source=s.indexOf(m.source),d.originalLine=m.originalLine,d.originalColumn=m.originalColumn,m.name&&(d.name=o.indexOf(m.name)),f.push(d)),h.push(d)}return a(r.__originalMappings,n.compareByOriginalPositions),r},c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),c.prototype._parseMappings=function(t,e){for(var r,o,i,u,c,h=1,f=0,p=0,g=0,m=0,d=0,y=t.length,v=0,w={},b={},_=[],A=[];v<y;)if(";"===t.charAt(v))h++,v++,f=0;else if(","===t.charAt(v))v++;else{for((r=new l).generatedLine=h,u=v;u<y&&!this._charIsMappingSeparator(t,u);u++);if(i=w[o=t.slice(v,u)])v+=o.length;else{for(i=[];v<u;)s.decode(t,v,b),c=b.value,v=b.rest,i.push(c);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");w[o]=i}r.generatedColumn=f+i[0],f=r.generatedColumn,i.length>1&&(r.source=m+i[1],m+=i[1],r.originalLine=p+i[2],p=r.originalLine,r.originalLine+=1,r.originalColumn=g+i[3],g=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),A.push(r),"number"==typeof r.originalLine&&_.push(r)}a(A,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,a(_,n.compareByOriginalPositions),this.__originalMappings=_},c.prototype._findMapping=function(t,e,r,n,i,s){if(t[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[r]);if(t[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[n]);return o.search(t,e,i,s)},c.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var e=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var r=this._generatedMappings[t+1];if(e.generatedLine===r.generatedLine){e.lastGeneratedColumn=r.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(t){var e={generatedLine:n.getArg(t,"line"),generatedColumn:n.getArg(t,"column")},r=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(t,"bias",u.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===e.generatedLine){var i=n.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=n.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=n.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:n.getArg(o,"originalLine",null),column:n.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(t){return null==t})))},c.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var o,i=t;if(null!=this.sourceRoot&&(i=n.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=n.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(e)return null;throw new Error('"'+i+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){var e=n.getArg(t,"source");if((e=this._findSourceIndex(e))<0)return{line:null,column:null,lastColumn:null};var r={source:e,originalLine:n.getArg(t,"line"),originalColumn:n.getArg(t,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(t,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:n.getArg(i,"generatedLine",null),column:n.getArg(i,"generatedColumn",null),lastColumn:n.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=c,h.prototype=Object.create(u.prototype),h.prototype.constructor=u,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}}),h.prototype.originalPositionFor=function(t){var e={generatedLine:n.getArg(t,"line"),generatedColumn:n.getArg(t,"column")},r=o.search(e,this._sections,(function(t,e){var r=t.generatedLine-e.generatedOffset.generatedLine;return r||t.generatedColumn-e.generatedOffset.generatedColumn})),i=this._sections[r];return i?i.consumer.originalPositionFor({line:e.generatedLine-(i.generatedOffset.generatedLine-1),column:e.generatedColumn-(i.generatedOffset.generatedLine===e.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(t){return t.consumer.hasContentsOfAllSources()}))},h.prototype.sourceContentFor=function(t,e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(t,!0);if(n)return n}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},h.prototype.generatedPositionFor=function(t){for(var e=0;e<this._sections.length;e++){var r=this._sections[e];if(-1!==r.consumer._findSourceIndex(n.getArg(t,"source"))){var o=r.consumer.generatedPositionFor(t);if(o)return{line:o.line+(r.generatedOffset.generatedLine-1),column:o.column+(r.generatedOffset.generatedLine===o.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},h.prototype._parseMappings=function(t,e){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var o=this._sections[r],i=o.consumer._generatedMappings,s=0;s<i.length;s++){var u=i[s],c=o.consumer._sources.at(u.source);c=n.computeSourceURL(o.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;u.name&&(l=o.consumer._names.at(u.name),this._names.add(l),l=this._names.indexOf(l));var h={source:c,generatedLine:u.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(o.generatedOffset.generatedLine===u.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:l};this.__generatedMappings.push(h),"number"==typeof h.originalLine&&this.__originalMappings.push(h)}a(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),a(this.__originalMappings,n.compareByOriginalPositions)},r.IndexedSourceMapConsumer=h},{"./array-set":26,"./base64-vlq":27,"./binary-search":29,"./quick-sort":31,"./util":35}],33:[function(t,e,r){var n=t("./base64-vlq"),o=t("./util"),i=t("./array-set").ArraySet,s=t("./mapping-list").MappingList;function a(t){t||(t={}),this._file=o.getArg(t,"file",null),this._sourceRoot=o.getArg(t,"sourceRoot",null),this._skipValidation=o.getArg(t,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new s,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(t){var e=t.sourceRoot,r=new a({file:t.file,sourceRoot:e});return t.eachMapping((function(t){var n={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(n.source=t.source,null!=e&&(n.source=o.relative(e,n.source)),n.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(n.name=t.name)),r.addMapping(n)})),t.sources.forEach((function(n){var i=n;null!==e&&(i=o.relative(e,n)),r._sources.has(i)||r._sources.add(i);var s=t.sourceContentFor(n);null!=s&&r.setSourceContent(n,s)})),r},a.prototype.addMapping=function(t){var e=o.getArg(t,"generated"),r=o.getArg(t,"original",null),n=o.getArg(t,"source",null),i=o.getArg(t,"name",null);this._skipValidation||this._validateMapping(e,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},a.prototype.setSourceContent=function(t,e){var r=t;null!=this._sourceRoot&&(r=o.relative(this._sourceRoot,r)),null!=e?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(r)]=e):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},a.prototype.applySourceMap=function(t,e,r){var n=e;if(null==e){if(null==t.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=t.file}var s=this._sourceRoot;null!=s&&(n=o.relative(s,n));var a=new i,u=new i;this._mappings.unsortedForEach((function(e){if(e.source===n&&null!=e.originalLine){var i=t.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=i.source&&(e.source=i.source,null!=r&&(e.source=o.join(r,e.source)),null!=s&&(e.source=o.relative(s,e.source)),e.originalLine=i.line,e.originalColumn=i.column,null!=i.name&&(e.name=i.name))}var c=e.source;null==c||a.has(c)||a.add(c);var l=e.name;null==l||u.has(l)||u.add(l)}),this),this._sources=a,this._names=u,t.sources.forEach((function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=o.join(r,e)),null!=s&&(e=o.relative(s,e)),this.setSourceContent(e,n))}),this)},a.prototype._validateMapping=function(t,e,r,n){if(e&&"number"!=typeof e.line&&"number"!=typeof e.column)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((!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0)||e||r||n)&&!(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:r,original:e,name:n}))},a.prototype._serializeMappings=function(){for(var t,e,r,i,s=0,a=1,u=0,c=0,l=0,h=0,f="",p=this._mappings.toArray(),g=0,m=p.length;g<m;g++){if(t="",(e=p[g]).generatedLine!==a)for(s=0;e.generatedLine!==a;)t+=";",a++;else if(g>0){if(!o.compareByGeneratedPositionsInflated(e,p[g-1]))continue;t+=","}t+=n.encode(e.generatedColumn-s),s=e.generatedColumn,null!=e.source&&(i=this._sources.indexOf(e.source),t+=n.encode(i-h),h=i,t+=n.encode(e.originalLine-1-c),c=e.originalLine-1,t+=n.encode(e.originalColumn-u),u=e.originalColumn,null!=e.name&&(r=this._names.indexOf(e.name),t+=n.encode(r-l),l=r)),f+=t}return f},a.prototype._generateSourcesContent=function(t,e){return t.map((function(t){if(!this._sourcesContents)return null;null!=e&&(t=o.relative(e,t));var r=o.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},a.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=a},{"./array-set":26,"./base64-vlq":27,"./mapping-list":30,"./util":35}],34:[function(t,e,r){var n=t("./source-map-generator").SourceMapGenerator,o=t("./util"),i=/(\r?\n)/,s="$$$isSourceNode$$$";function a(t,e,r,n,o){this.children=[],this.sourceContents={},this.line=null==t?null:t,this.column=null==e?null:e,this.source=null==r?null:r,this.name=null==o?null:o,this[s]=!0,null!=n&&this.add(n)}a.fromStringWithSourceMap=function(t,e,r){var n=new a,s=t.split(i),u=0,c=function(){return t()+(t()||"");function t(){return u<s.length?s[u++]:void 0}},l=1,h=0,f=null;return e.eachMapping((function(t){if(null!==f){if(!(l<t.generatedLine)){var e=(r=s[u]||"").substr(0,t.generatedColumn-h);return s[u]=r.substr(t.generatedColumn-h),h=t.generatedColumn,p(f,e),void(f=t)}p(f,c()),l++,h=0}for(;l<t.generatedLine;)n.add(c()),l++;if(h<t.generatedColumn){var r=s[u]||"";n.add(r.substr(0,t.generatedColumn)),s[u]=r.substr(t.generatedColumn),h=t.generatedColumn}f=t}),this),u<s.length&&(f&&p(f,c()),n.add(s.splice(u).join(""))),e.sources.forEach((function(t){var i=e.sourceContentFor(t);null!=i&&(null!=r&&(t=o.join(r,t)),n.setSourceContent(t,i))})),n;function p(t,e){if(null===t||void 0===t.source)n.add(e);else{var i=r?o.join(r,t.source):t.source;n.add(new a(t.originalLine,t.originalColumn,i,e,t.name))}}},a.prototype.add=function(t){if(Array.isArray(t))t.forEach((function(t){this.add(t)}),this);else{if(!t[s]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);t&&this.children.push(t)}return this},a.prototype.prepend=function(t){if(Array.isArray(t))for(var e=t.length-1;e>=0;e--)this.prepend(t[e]);else{if(!t[s]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this},a.prototype.walk=function(t){for(var e,r=0,n=this.children.length;r<n;r++)(e=this.children[r])[s]?e.walk(t):""!==e&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name})},a.prototype.join=function(t){var e,r,n=this.children.length;if(n>0){for(e=[],r=0;r<n-1;r++)e.push(this.children[r]),e.push(t);e.push(this.children[r]),this.children=e}return this},a.prototype.replaceRight=function(t,e){var r=this.children[this.children.length-1];return r[s]?r.replaceRight(t,e):"string"==typeof r?this.children[this.children.length-1]=r.replace(t,e):this.children.push("".replace(t,e)),this},a.prototype.setSourceContent=function(t,e){this.sourceContents[o.toSetString(t)]=e},a.prototype.walkSourceContents=function(t){for(var e=0,r=this.children.length;e<r;e++)this.children[e][s]&&this.children[e].walkSourceContents(t);var n=Object.keys(this.sourceContents);for(e=0,r=n.length;e<r;e++)t(o.fromSetString(n[e]),this.sourceContents[n[e]])},a.prototype.toString=function(){var t="";return this.walk((function(e){t+=e})),t},a.prototype.toStringWithSourceMap=function(t){var e={code:"",line:1,column:0},r=new n(t),o=!1,i=null,s=null,a=null,u=null;return this.walk((function(t,n){e.code+=t,null!==n.source&&null!==n.line&&null!==n.column?(i===n.source&&s===n.line&&a===n.column&&u===n.name||r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:e.line,column:e.column},name:n.name}),i=n.source,s=n.line,a=n.column,u=n.name,o=!0):o&&(r.addMapping({generated:{line:e.line,column:e.column}}),i=null,o=!1);for(var c=0,l=t.length;c<l;c++)10===t.charCodeAt(c)?(e.line++,e.column=0,c+1===l?(i=null,o=!1):o&&r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:e.line,column:e.column},name:n.name})):e.column++})),this.walkSourceContents((function(t,e){r.setSourceContent(t,e)})),{code:e.code,map:r}},r.SourceNode=a},{"./source-map-generator":33,"./util":35}],35:[function(t,e,r){r.getArg=function(t,e,r){if(e in t)return t[e];if(3===arguments.length)return r;throw new Error('"'+e+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,o=/^data:.+\,.+$/;function i(t){var e=t.match(n);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function s(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}function a(t){var e=t,n=i(t);if(n){if(!n.path)return t;e=n.path}for(var o,a=r.isAbsolute(e),u=e.split(/\/+/),c=0,l=u.length-1;l>=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(e=u.join("/"))&&(e=a?"/":"."),n?(n.path=e,s(n)):e}function u(t,e){""===t&&(t="."),""===e&&(e=".");var r=i(e),n=i(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),s(r);if(r||e.match(o))return e;if(n&&!n.host&&!n.path)return n.host=e,s(n);var u="/"===e.charAt(0)?e:a(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=u,s(n)):u}r.urlParse=i,r.urlGenerate=s,r.normalize=a,r.join=u,r.isAbsolute=function(t){return"/"===t.charAt(0)||n.test(t)},r.relative=function(t,e){""===t&&(t="."),t=t.replace(/\/$/,"");for(var r=0;0!==e.indexOf(t+"/");){var n=t.lastIndexOf("/");if(n<0)return e;if((t=t.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)};var c=!("__proto__"in Object.create(null));function l(t){return t}function h(t){if(!t)return!1;var e=t.length;if(e<9)return!1;if(95!==t.charCodeAt(e-1)||95!==t.charCodeAt(e-2)||111!==t.charCodeAt(e-3)||116!==t.charCodeAt(e-4)||111!==t.charCodeAt(e-5)||114!==t.charCodeAt(e-6)||112!==t.charCodeAt(e-7)||95!==t.charCodeAt(e-8)||95!==t.charCodeAt(e-9))return!1;for(var r=e-10;r>=0;r--)if(36!==t.charCodeAt(r))return!1;return!0}function f(t,e){return t===e?0:null===t?1:null===e?-1:t>e?1:-1}r.toSetString=c?l:function(t){return h(t)?"$"+t:t},r.fromSetString=c?l:function(t){return h(t)?t.slice(1):t},r.compareByOriginalPositions=function(t,e,r){var n=f(t.source,e.source);return 0!==n?n:0!==(n=t.originalLine-e.originalLine)?n:0!==(n=t.originalColumn-e.originalColumn)||r?n:0!==(n=t.generatedColumn-e.generatedColumn)?n:0!==(n=t.generatedLine-e.generatedLine)?n:f(t.name,e.name)},r.compareByGeneratedPositionsDeflated=function(t,e,r){var n=t.generatedLine-e.generatedLine;return 0!==n?n:0!==(n=t.generatedColumn-e.generatedColumn)||r?n:0!==(n=f(t.source,e.source))?n:0!==(n=t.originalLine-e.originalLine)?n:0!==(n=t.originalColumn-e.originalColumn)?n:f(t.name,e.name)},r.compareByGeneratedPositionsInflated=function(t,e){var r=t.generatedLine-e.generatedLine;return 0!==r?r:0!==(r=t.generatedColumn-e.generatedColumn)?r:0!==(r=f(t.source,e.source))?r:0!==(r=t.originalLine-e.originalLine)?r:0!==(r=t.originalColumn-e.originalColumn)?r:f(t.name,e.name)},r.parseSourceMapInput=function(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))},r.computeSourceURL=function(t,e,r){if(e=e||"",t&&("/"!==t[t.length-1]&&"/"!==e[0]&&(t+="/"),e=t+e),r){var n=i(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}e=u(s(n),e)}return a(e)}},{}],36:[function(t,e,r){r.SourceMapGenerator=t("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=t("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=t("./lib/source-node").SourceNode},{"./lib/source-map-consumer":32,"./lib/source-map-generator":33,"./lib/source-node":34}]},{},[14]);
|
js/editor.js
CHANGED
@@ -185,7 +185,7 @@
|
|
185 |
tabSize: 2,
|
186 |
lineNumbers: true,
|
187 |
mode: 'css',
|
188 |
-
theme: '
|
189 |
inputStyle: 'contenteditable', //necessary to allow context menu (right click) copy/paste etc.
|
190 |
gutters: [
|
191 |
"CodeMirror-lint-markers"
|
@@ -211,7 +211,16 @@
|
|
211 |
this.codeMirror = CodeMirror.fromTextArea( $textArea.get( 0 ), codeMirrorSettings );
|
212 |
this.setupCodeMirrorExtensions();
|
213 |
}
|
214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
this.codeMirror.on( 'change', function ( cm, change ) {
|
216 |
var selectedPost = this.model.get( 'selectedPost' );
|
217 |
if ( selectedPost && selectedPost.get( 'css' ) !== cm.getValue().trim() ) {
|
185 |
tabSize: 2,
|
186 |
lineNumbers: true,
|
187 |
mode: 'css',
|
188 |
+
theme: $textArea.data( 'theme' ),
|
189 |
inputStyle: 'contenteditable', //necessary to allow context menu (right click) copy/paste etc.
|
190 |
gutters: [
|
191 |
"CodeMirror-lint-markers"
|
211 |
this.codeMirror = CodeMirror.fromTextArea( $textArea.get( 0 ), codeMirrorSettings );
|
212 |
this.setupCodeMirrorExtensions();
|
213 |
}
|
214 |
+
|
215 |
+
var editor = this.codeMirror;
|
216 |
+
$( '#so_css_editor_theme' ).on( 'change', function() {
|
217 |
+
if ( $( this ).val() == 1 ) {
|
218 |
+
editor.setOption( 'theme', 'neat' );
|
219 |
+
} else {
|
220 |
+
editor.setOption( 'theme', 'ambiance' );
|
221 |
+
}
|
222 |
+
} );
|
223 |
+
|
224 |
this.codeMirror.on( 'change', function ( cm, change ) {
|
225 |
var selectedPost = this.model.get( 'selectedPost' );
|
226 |
if ( selectedPost && selectedPost.get( 'css' ) !== cm.getValue().trim() ) {
|
js/editor.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,t,i){var s={model:{},collection:{},view:{},fn:{}};window.socss=s,s.model.CustomCssModel=Backbone.Model.extend({defaults:{postId:null,postTitle:null,css:null},urlRoot:i.postCssUrlRoot,url:function(){return this.urlRoot+"&postId="+this.get("postId")}}),s.model.CustomCssCollection=Backbone.Collection.extend({model:s.model.CustomCssModel,modelId:function(e){return e.postId}}),s.model.CSSEditorModel=Backbone.Model.extend({defaults:{customCssPosts:null}}),s.view.toolbar=Backbone.View.extend({button:t.template('<li><a href="#<%= action %>" class="toolbar-button socss-button"><%= text %></a></li>'),events:{"click .socss-button:not(.save)":"triggerEvent"},triggerEvent:function(t){t.preventDefault();var i=e(t.currentTarget);i.trigger("blur");var s=i.attr("href").replace("#","");this.$el.trigger("click_"+s)},addButton:function(t,i){return e(this.button({text:t,action:i})).appendTo(this.$(".toolbar-function-buttons .toolbar-buttons"))}}),s.view.editor=Backbone.View.extend({codeMirror:null,snippets:null,toolbar:null,visualProperties:null,inspector:null,cssSelectors:[],initValue:null,events:{"click_expand .custom-css-toolbar":"toggleExpand","click_visual .custom-css-toolbar":"showVisualEditor","click .socss-button.save":"save",submit:"onSubmit"},initialize:function(e){this.listenTo(this.model,"change:selectedPost",this.getSelectedPostCss),this.getSelectedPostCss().then(function(){e.openVisualEditor&&this.showVisualEditor()}.bind(this))},save:function(){s.save(this)},getSelectedPostCss:function(){var t=this.model.get("selectedPost");return(t&&!t.has("css")?t.fetch():(new e.Deferred).resolve()).then(this.render.bind(this))},render:function(){var t=this.model.get("selectedPost");return t&&!t.has("css")?this:(this.codeMirror||this.setupEditor(),this.toolbar||(this.toolbar=new s.view.toolbar({el:this.$(".custom-css-toolbar"),model:this.model}),this.toolbar.render()),this.visualProperties||(this.visualProperties=new s.view.properties({editor:this,el:e("#so-custom-css-properties")}),this.visualProperties.render()),this.preview||(this.preview=new s.view.preview({editor:this,model:this.model,el:this.$(".custom-css-preview"),initURL:i.homeURL}),this.preview.render()),t&&(this.codeMirror.setValue(t.get("css")),this.codeMirror.clearHistory()),this)},setupEditor:function(){var s=this.$("textarea.css-editor");this.initValue=s.val();var o=this.initValue.match(/\n/gm),r=(o&&o.length,this.initValue);s.val(r);var n={tabSize:2,lineNumbers:!0,mode:"css",theme:"neat",inputStyle:"contenteditable",gutters:["CodeMirror-lint-markers"],lint:!0,search:!0,dialog:!0,annotateScrollbar:!0,extraKeys:{"Ctrl-F":"findPersistent","Alt-G":"jumpToLine"}};void 0!==wp.codeEditor?(n=t.extend(wp.codeEditor.defaultSettings.codemirror,n),this.codeMirror=wp.codeEditor.initialize(s.get(0),n).codemirror):(this.registerCodeMirrorAutocomplete(),this.codeMirror=CodeMirror.fromTextArea(s.get(0),n),this.setupCodeMirrorExtensions()),this.codeMirror.on("change",function(e,t){var i=this.model.get("selectedPost");i&&i.get("css")!==e.getValue().trim()&&i.set("css",e.getValue().trim())}.bind(this)),e(window).on("beforeunload",function(){if(this.codeMirror.getValue().trim()!==this.initValue)return i.loc.leave}.bind(this)),this.$el.find(".custom-css-container").css("overflow","visible"),this.scaleEditor(),e(window).on("resize",function(){this.scaleEditor()}.bind(this))},onSubmit:function(){this.initValue=this.codeMirror.getValue().trim()},registerCodeMirrorAutocomplete:function(){var e={link:1,visited:1,active:1,hover:1,focus:1,"first-letter":1,"first-line":1,"first-child":1,before:1,after:1,lang:1};CodeMirror.registerHelper("hint","css",function(t){var i=t.getCursor(),s=t.getTokenAt(i),o=CodeMirror.innerMode(t.getMode(),s.state);if("css"===o.mode.name){if("keyword"===s.type&&0==="!important".indexOf(s.string))return{list:["!important"],from:CodeMirror.Pos(i.line,s.start),to:CodeMirror.Pos(i.line,s.end)};var r=s.start,n=i.ch,l=s.string.slice(0,n-r);/[^\w$_-]/.test(l)&&(l="",r=n=i.ch);var a=CodeMirror.resolveMode("text/css"),c=[],d=o.state.state;if("top"===d){for(var p=t.getLine(i.line).trim(),h=this.cssSelectors,u=0;u<h.length;u++)-1!==h[u].selector.indexOf(p)&&c.push(h[u].selector);if(c.length)return{list:c,from:CodeMirror.Pos(i.line,0),to:CodeMirror.Pos(i.line,n)}}else if("pseudo"===d||"variable-3"===s.type?v(e):"block"===d||"maybeprop"===d?v(a.propertyKeywords):"prop"===d||"parens"===d||"at"===d||"params"===d?(v(a.valueKeywords),v(a.colorKeywords)):"media"!==d&&"media_parens"!==d||(v(a.mediaTypes),v(a.mediaFeatures)),c.length)return{list:c,from:CodeMirror.Pos(i.line,r),to:CodeMirror.Pos(i.line,n)}}function v(e){for(var t in e)l&&0!==t.lastIndexOf(l,0)||c.push(t)}}.bind(this))},setupCodeMirrorExtensions:function(){this.codeMirror.on("cursorActivity",function(e){var t=e.getCursor(),i=e.getTokenAt(t);CodeMirror.innerMode(e.getMode(),i.state);if("qualifier"===i.type||"tag"===i.type||"builtin"===i.type){var s=e.getLine(t.line).substring(0,i.end);this.preview.highlight(s)}else this.preview.clearHighlight()}.bind(this)),"function"==typeof CodeMirror.showHint&&this.codeMirror.on("keyup",(function(e,t){(t.keyCode>=65&&t.keyCode<=90||189===t.keyCode&&!t.shiftKey||190===t.keyCode&&!t.shiftKey||51===t.keyCode&&t.shiftKey||189===t.keyCode&&t.shiftKey)&&e.showHint({completeSingle:!1})}))},scaleEditor:function(){var t,i=e(window).outerHeight();if(this.$el.hasClass("expanded"))this.$el.find(".CodeMirror-scroll").css("max-height",""),t=i-this.$(".custom-css-toolbar").outerHeight(),this.codeMirror.setSize("100%",t),this.$el.find(".CodeMirror-scroll").css("height","100%");else{var s=e("#so-custom-css-form");(t=i-(e("#wpadminbar").outerHeight(!0)+e("#siteorigin-custom-css").find("> h2").outerHeight(!0)+s.find("> .custom-css-toolbar").outerHeight(!0)+s.find("> .so-css-footer").outerHeight(!0)+parseFloat(e("#wpbody-content").css("padding-bottom"))))<300&&(t=300),this.codeMirror.setSize("100%","auto"),this.$el.find(".CodeMirror-scroll").css("height",t+"px")}this.$el.find(".CodeMirror-code").css("height",t+"px")},isExpanded:function(){return this.$el.hasClass("expanded")},toggleExpand:function(){this.$el.toggleClass("expanded"),this.scaleEditor()},setExpand:function(e){e?this.$el.addClass("expanded"):this.$el.removeClass("expanded"),this.scaleEditor()},showVisualEditor:function(){this.visualProperties.loadCSS(this.codeMirror.getValue().trim()),this.visualProperties.show()},setSnippets:function(e){t.isEmpty(e)||(this.snippets=new s.view.snippets({snippets:e}),this.snippets.editor=this,this.snippets.render(),this.toolbar.addButton("Snippets","snippets"),this.toolbar.on("click_snippets",function(){this.snippets.show()}.bind(this)))},addCode:function(e){var t=this.codeMirror,i="";i=1===t.doc.lineCount()&&0===t.doc.getLine(t.doc.lastLine()).length?"":0===t.doc.getLine(t.doc.lastLine()).length?"\n":"\n\n",t.doc.setCursor(t.doc.lastLine(),t.doc.getLine(t.doc.lastLine()).length),t.doc.replaceSelection(i+e)},addEmptySelector:function(e){this.addCode(e+" {\n \n}")},setInspector:function(e){this.inspector=e,this.cssSelectors=e.pageSelectors,e.on("click_selector",function(e){this.visualProperties.isVisible()?this.visualProperties.addSelector(e):this.addEmptySelector(e)}.bind(this)),e.on("click_property",function(e){this.visualProperties.isVisible()||this.codeMirror.replaceSelection(e+";\n ")}.bind(this)),e.on("set_active_element",function(e,t){this.visualProperties.isVisible()&&t.length&&this.visualProperties.addSelector(t[0].selector)}.bind(this))}}),s.view.preview=Backbone.View.extend({template:t.template(e("#template-preview-window").html()),editor:null,originalUri:null,currentUri:null,events:{"mouseleave #preview-iframe":"clearHighlight",'keydown #preview-navigator input[type="text"]':"reloadPreview"},initialize:function(e){this.editor=e.editor,this.listenTo(this.model,"change:selectedPost",this.render.bind(this)),this.originalUri=new URI(e.initURL),this.currentUri=new URI(e.initURL),this.editor.codeMirror.on("change",function(e,t){this.updatePreviewCss()}.bind(this))},render:function(){var e=this.model.get("selectedPost");if(e&&!e.has("postUrl"))return e.fetch().then(this.render.bind(this)),this;this.$el.html(this.template()),e&&(this.currentUri=new URI(e.get("postUrl"))),this.currentUri.removeQuery("so_css_preview",1),this.$("#preview-navigator input").val(this.currentUri.toString()),this.currentUri.addQuery("so_css_preview",1),this.$("#preview-iframe").attr("src",this.currentUri.toString()).on("load",this.initPreview.bind(this))},initPreview:function(){var t=this.$("#preview-iframe");this.currentUri=new URI(t.contents().get(0).location.href),this.currentUri.removeQuery("so_css_preview"),this.$("#preview-navigator input").val(this.currentUri.toString()),this.currentUri.addQuery("so_css_preview",1);var i=t.contents().find(".single-product").length;t.contents().find("a").each((function(){var t=e(this),s=t.attr("href");if(void 0===s||i&&t.parents(".wc-tabs").length)return!0;var o=-1===s.indexOf("?")?"?":"&";t.attr("href",s+o+"so_css_preview=1")})),this.updatePreviewCss()},reloadPreview:function(e){var t=this.$('#preview-navigator input[type="text"]');if(13===e.keyCode){e.preventDefault();var i=new URI(t.val());this.originalUri.host()!==i.host()||this.originalUri.protocol()!==i.protocol()?(t.trigger("blur"),alert(t.data("invalid-uri")),t.trigger("focus")):(i.addQuery("so_css_preview",1),this.$("#preview-iframe").attr("src",i.toString()))}},updatePreviewCss:function(){var e=this.$("#preview-iframe");if(0!==e.length){var t=e.contents().find("head");0===t.find("style.siteorigin-custom-css").length&&t.append('<style class="siteorigin-custom-css" type="text/css"></style>');var i=t.find("style.siteorigin-custom-css"),s=this.editor.codeMirror.getValue().trim();i.html(s)}},highlight:function(e){try{this.editor.inspector.hl.highlight(e)}catch(e){console.log("No inspector to highlight with")}},clearHighlight:function(){try{this.editor.inspector.hl.clear()}catch(e){console.log("No inspector to highlight with")}}}),s.view.snippets=Backbone.View.extend({template:t.template(e("#template-snippet-browser").html()),snippet:t.template('<li class="snippet"><%- name %></li>'),className:"css-editor-snippet-browser",snippets:null,editor:null,events:{"click .close":"hide","click .buttons .insert-snippet":"insertSnippet","click .snippet":"clickSnippet"},currentSnippet:null,initialize:function(e){this.snippets=e.snippets},render:function(){this.$el.html(this.template());for(var t=0;t<this.snippets.length;t++)e(this.snippet({name:this.snippets[t].Name})).data({description:this.snippets[t].Description,css:this.snippets[t].css}).appendTo(this.$("ul.snippets"));return this.$(".snippets li.snippet").eq(0).trigger("click"),this.attach(),this},clickSnippet:function(t){t.preventDefault();var i=e(t.currentTarget);this.$(".snippets li.snippet").removeClass("active"),e(this).addClass("active"),this.viewSnippet({name:i.html(),description:i.data("description"),css:i.data("css")})},viewSnippet:function(e){var t=this.$(".main .snippet-view");t.find(".snippet-title").html(e.name),t.find(".snippet-description").html(e.description),t.find(".snippet-code").html(e.css),this.currentSnippet=e},insertSnippet:function(){var e=this.editor.codeMirror,t=this.currentSnippet.css,i="";i=1===e.doc.lineCount()&&0===e.doc.getLine(e.doc.lastLine()).length?"":0===e.doc.getLine(e.doc.lastLine()).length?"\n":"\n\n",e.doc.setCursor(e.doc.lastLine(),e.doc.getLine(e.doc.lastLine()).length),e.doc.replaceSelection(i+t),this.hide()},attach:function(){this.$el.appendTo("body")},show:function(){this.$el.show()},hide:function(){this.$el.hide()}}),s.save=function(t){let s=e("#siteorigin-custom-css .save");var o;s.hasClass("button-primary-disabled")||(s.addClass("button-primary-disabled"),void 0!==t.editor?(o=t.editor.codeMirror.getValue().trim(),t.updateMainEditor(!0)):o=t.codeMirror.getValue().trim(),e.post(i.ajaxurl,{action:"socss_save_css",css:o},null,"html").done((function(t){t.length&&e(".custom-revisions-list").html(t)})).fail((function(e){alert(e.responseText)})).always((function(){s.removeClass("button-primary-disabled")})))},s.view.properties=Backbone.View.extend({tabTemplate:t.template('<li data-section="<%- id %>"><span class="so-css-icon so-css-icon-<%- icon %>"></span> <%- title %></li>'),sectionTemplate:t.template('<div class="section" data-section="<%- id %>"><table class="fields-table"><tbody></tbody></table></div>'),controllerTemplate:t.template('<tr><th scope="row"><%- title %></th><td></td></tr>'),propertyControllers:[],editor:null,css:"",parsed:{},activeSelector:"",editorExpandedBefore:!1,events:{"click .close":"hide","click .save":"save","click .section-tabs li":"onTabClick","change .toolbar select":"onToolbarSelectChange"},initialize:function(e){this.parser=window.css,this.editor=e.editor},render:function(){this.$(".section-tabs").empty(),this.$(".sections").empty(),this.$(".toolbar select").off(),this.propertyControllers=[];var o=i.propertyControllers;for(var r in o){e(this.tabTemplate({id:r,icon:o[r].icon,title:o[r].title})).appendTo(this.$(".section-tabs"));var n=e(this.sectionTemplate({id:r})).appendTo(this.$(".sections"));if(!t.isEmpty(o[r].controllers))for(var l=0;l<o[r].controllers.length;l++){var a,c=e(this.controllerTemplate({title:o[r].controllers[l].title})).appendTo(n.find("tbody")),d=o[r].controllers[l];a=void 0===s.view.properties.controllers[d.type]?new s.view.propertyController({el:c.find("td"),propertiesView:this,args:void 0===d.args?{}:d.args}):new s.view.properties.controllers[d.type]({el:c.find("td"),propertiesView:this,args:void 0===d.args?{}:d.args}),this.propertyControllers.push(a),a.render()}}this.$(".section-tabs li").eq(0).trigger("click")},onTabClick:function(t){var i=e(t.currentTarget),s=this.$('.sections .section[data-section="'+i.data("section")+'"]');this.$(".sections .section").not(s).hide().removeClass("active"),s.show().addClass("active"),this.$(".section-tabs li").not(i).removeClass("active"),i.addClass("active")},onToolbarSelectChange:function(t){this.setActiveSelector(e(t.currentTarget).find(":selected").data("selector"))},setRuleValue:function(e,i){if(void 0!==this.activeSelector&&void 0!==this.activeSelector.declarations){for(var s=this.activeSelector.declarations,o=!0,r=!1,n=0;n<s.length;n++)if(s[n].property===e){o=!1;var l=s[n];l.value!==i&&(l.value=i,r=!0),t.isEmpty(l.value)&&s.splice(s.indexOf(l));break}o&&!t.isEmpty(i)&&(s.push({property:e,value:i,type:"declaration"}),r=!0),r&&this.updateMainEditor(!1)}},addImport:function(e){var i=t.filter(this.parsed.stylesheet.rules,(function(e){return"import"===e.type}));t.any(i,(function(t){return t.import===e.import}))||(this.parsed.stylesheet.rules.unshift(e),this.updateMainEditor(!1))},findImport:function(e){return t.find(this.parsed.stylesheet.rules,(function(t){return"import"===t.type&&t.import.indexOf(e)>-1}))},updateImport:function(e,t){var i=this.findImport(e);i.import!==t.import&&(i.import=t.import,this.updateMainEditor(!1))},removeImport:function(e){var i=t.findIndex(this.parsed.stylesheet.rules,(function(t){return"import"===t.type&&t.import.indexOf(e)>-1}));i>-1&&this.parsed.stylesheet.rules.splice(i,1)},getRuleValue:function(e){if(void 0===this.activeSelector||void 0===this.activeSelector.declarations)return"";for(var t=this.activeSelector.declarations,i=0;i<t.length;i++)if(t[i].property===e)return t[i].value;return""},updateMainEditor:function(e){this.editor.codeMirror.setValue(this.parser.stringify(this.parsed))},show:function(){this.editorExpandedBefore=this.editor.isExpanded(),this.editor.setExpand(!0),this.$el.show().animate({left:0},"fast")},hide:function(){this.editor.setExpand(this.editorExpandedBefore),this.$el.animate({left:-338},"fast",(function(){e(this).hide()})),this.updateMainEditor(!0)},save:function(){s.save(this)},isVisible:function(){return this.$el.is(":visible")},loadCSS:function(i,s){this.css=i,this.parsed=this.parser.parse(i,{silent:!0});for(var o=this.parsed.stylesheet.rules,r=this.$(".toolbar select").empty(),n=0;n<o.length;n++){var l=o[n];if(t.contains(["rule","media"],l.type))if("media"===l.type)for(var a=0;a<l.rules.length;a++){var c="@media "+l.media,d=l.rules[a];"rule"==d.type&&r.append(e("<option>").html(c+": "+d.selectors.join(",")).attr("val",c+": "+d.selectors.join(",")).data("selector",d))}else r.append(e("<option>").html(l.selectors.join(",")).attr("val",l.selectors.join(",")).data("selector",l))}void 0===s&&(s=r.find("option").eq(0).attr("val")),t.isEmpty(s)||r.val(s).trigger("change")},setActiveSelector:function(e){this.activeSelector=e;for(var t=0;t<this.propertyControllers.length;t++)this.propertyControllers[t].refreshFromRule()},addSelector:function(e){var t=this.$(".toolbar select");t.val(e),t.val()===e?t.trigger("change"):(this.editor.addEmptySelector(e),this.loadCSS(this.editor.codeMirror.getValue().trim(),e)),t.addClass("highlighted"),setTimeout((function(){t.removeClass("highlighted")}),2e3)}}),s.view.propertyController=Backbone.View.extend({template:t.template('<input type="text" value="" class="socss-property-controller-input"/>'),activeRule:null,args:null,propertiesView:null,events:{"change .socss-property-controller-input":"onChange","keyup input.socss-property-controller-input":"onChange"},initialize:function(e){this.args=e.args,this.propertiesView=e.propertiesView,this.events=t.extend(s.view.propertyController.prototype.events,this.events),this.delegateEvents(this.events),this.on("set_value",this.updateRule,this),this.on("change",this.updateRule,this)},render:function(){this.$el.append(e(this.template({}))),this.field=this.$("input.socss-property-controller-input")},onChange:function(){this.trigger("change",this.field.val())},updateRule:function(){this.propertiesView.setRuleValue(this.args.property,this.getValue())},refreshFromRule:function(){var e=this.propertiesView.getRuleValue(this.args.property);this.setValue(e,{silent:!0})},getValue:function(){return this.field.val()},setValue:function(e,i){i=t.extend({silent:!1},i),this.field.val(e),i.silent||this.trigger("set_value",e)},reset:function(e){e=t.extend({silent:!1},e),this.setValue("",e)}}),s.view.properties.controllers={},s.view.properties.controllers.color=s.view.propertyController.extend({render:function(){s.view.propertyController.prototype.render.apply(this,arguments),this.field.minicolors({})},onChange:function(){this.trigger("change",this.field.minicolors("value"))},getValue:function(){return this.field.minicolors("value").trim()},setValue:function(e,i){i=t.extend({silent:!1},i),this.field.minicolors("value",e),i.silent||this.trigger("set_value",e)}}),s.view.properties.controllers.select=s.view.propertyController.extend({template:t.template('<select class="socss-property-controller-input"></select>'),events:{"click .select-tab":"onSelect"},render:function(){for(var t in this.$el.append(e(this.template({}))),this.field=this.$("select"),this.field.append(e('<option value=""></option>').html("")),this.args.options)this.field.append(e("<option></option>").attr("value",t).html(this.args.options[t]));void 0!==this.args.option_icons&&this.setupVisualSelect()},setupVisualSelect:function(){this.field.hide();var t=e('<div class="select-tabs"></div>').appendTo(this.$el);for(var i in e('<div class="select-tab" data-value=""><span class="so-css-icon so-css-icon-circle"></span></div>').appendTo(t),this.args.option_icons)e('<div class="select-tab"></div>').appendTo(t).append(e('<span class="so-css-icon"></span>').addClass("so-css-icon-"+this.args.option_icons[i])).attr("data-value",i);t.find(".select-tab").css("width",100/t.find(">div").length+"%")},onSelect:function(t){this.$(".select-tab").removeClass("active");var i=e(t.currentTarget);i.addClass("active"),this.field.val(i.data("value")).trigger("change")},setValue:function(e,i){i=t.extend({silent:!1},i),this.field.val(e),this.$(".select-tabs .select-tab").removeClass("active").filter('[data-value="'+e+'"]').addClass("active"),i.silent||this.trigger("set_value",e)}}),s.view.properties.controllers.image=s.view.propertyController.extend({template:t.template('<input type="text" value="" /> <span class="select socss-button"><span class="so-css-icon so-css-icon-upload"></span></span>'),events:{"click .select":"openMedia"},render:function(){this.media=wp.media({title:i.loc.select_image,library:{type:"image"},button:{text:i.loc.select,close:!1}}),this.$el.append(e(this.template({select:i.loc.select}))),this.field=this.$el.find("input"),this.media.on("select",function(){var e=this.media.state().get("selection").first().attributes,t=this.args.value.replace("{{url}}",e.url);this.field.val(t).trigger("change"),this.trigger("set_value",t),this.media.close()}.bind(this))},openMedia:function(){this.media.open()}}),s.view.properties.controllers.measurement=s.view.propertyController.extend({wrapperClass:"socss-field-measurement",events:{"click .toggle-dropdown":"toggleUnitDropdown","click .dropdown li":"onSelectUnit","keydown .socss-field-input":"onInputKeyPress","keyup .socss-field-input":"onInputKeyUp"},render:function(){s.view.propertyController.prototype.render.apply(this,arguments),this.setupMeasurementField()},setValue:function(e,i){i=t.extend({silent:!1},i),this.field.val(e).trigger("measurement_refresh"),i.silent||this.trigger("set_value",e)},units:["px","%","em","cm","mm","in","pt","pc","ex","ch","rem","vw","vh","vmin","vmax"],parseUnits:function(e){var t=this.units.map((function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")})),i=new RegExp("([0-9\\.\\-]+)("+t.join("|")+")?","i").exec(e);return null===i?{value:"",unit:""}:{value:i[1],unit:void 0===i[2]?"":i[2]}},setupMeasurementField:function(){this.field.hide(),this.$el.addClass(this.wrapperClass).data("unit","px");var t=e('<input type="text" class="socss-field-input"/>').appendTo(this.$el);e('<span class="toggle-dropdown dashicons dashicons-arrow-down"></span>').appendTo(this.$el);for(var i=e('<ul class="dropdown"></ul>').appendTo(this.$el),s=e('<span class="units"></span>').html("px").appendTo(this.$el),o=0;o<this.units.length;o++){var r=e("<li></li>").html(this.units[o]).data("unit",this.units[o]);"px"===this.units[o]&&r.addClass("active"),i.append(r)}this.field.on("measurement_refresh",function(){var i=this.parseUnits(this.field.val());t.val(i.value);var o=""===i.unit?"px":i.unit;this.$el.data("unit",o),s.html(o);var r=e('<span class="socss-hidden-placeholder"></span>').css({"font-size":"14px"}).html(i.value).appendTo("body"),n=r.width();n=Math.min(n,63),r.remove(),s.css("left",n+12)}.bind(this));var n=e('<div class="socss-diw"></div>').appendTo(this.$el),l=e('<div class="dec-button socss-button"><span class="so-css-icon so-css-icon-minus"></span></div>').appendTo(n),a=e('<div class="inc-button socss-button"><span class="so-css-icon so-css-icon-plus"></span></div>').appendTo(n);this.setupStepButton(l),this.setupStepButton(a)},updateValue:function(){var e=this.$(".socss-field-input"),t=this.parseUnits(e.val());""!==t.unit&&t.unit!==this.$el.data("unit")&&(e.val(t.value),this.setUnit(t.unit)),""===t.value?this.field.val(""):this.field.val(t.value+this.$el.data("unit")),this.field.trigger("change")},setUnit:function(e){this.$(".units").html(e),this.$el.data("unit",e),this.$(".socss-field-input").trigger("keydown")},toggleUnitDropdown:function(){this.$(".dropdown").toggle()},onSelectUnit:function(t){this.toggleUnitDropdown(),this.setUnit(e(t.currentTarget).data("unit")),this.updateValue()},onInputKeyUp:function(e){this.onInputKeyPress(e),this.updateValue()},onInputKeyPress:function(t){var i=this.$(".socss-field-input"),s="";"keydown"===t.type&&(t.keyCode>=48&&t.keyCode<=57?s=String.fromCharCode(t.keyCode):189===t.keyCode?s="-":190===t.keyCode&&(s="."));var o=e('<span class="socss-hidden-placeholder"></span>').css({"font-size":"14px"}).html(i.val()+s).appendTo("body"),r=o.width();r=Math.min(r,63),o.remove(),this.$(".units").css("left",r+12)},stepValue:function(e){var t=Number.parseInt(this.parseUnits(this.field.val()).value);Number.isNaN(t)&&(t=0);var i=t+e;this.$(".socss-field-input").val(i),this.updateValue(),this.field.trigger("measurement_refresh")},setupStepButton:function(e){var t,i,s=e.is(".dec-button")?-1:1;e.on("mousedown",function(){this.stepValue(s),i=setTimeout(function(){t=setInterval(function(){this.stepValue(s)}.bind(this),50)}.bind(this),500)}.bind(this)).on("mouseup mouseout",(function(){i&&(clearTimeout(i),i=null),t&&(clearInterval(t),t=null)}))}}),s.view.properties.controllers.number=s.view.propertyController.extend({initialize:function(e){s.view.propertyController.prototype.initialize.apply(this,arguments),this.args=t.extend({change:null,default:0,increment:1,decrement:-1,max:null,min:null},e.args)},render:function(){s.view.propertyController.prototype.render.apply(this,arguments),this.setupNumberField()},setupNumberField:function(){this.$el.addClass("socss-field-number");var t=e('<div class="socss-diw"></div>').appendTo(this.$el),i=e('<div class="dec-button socss-button"><span class="so-css-icon so-css-icon-minus"></span></div>').appendTo(t),s=e('<div class="inc-button socss-button"><span class="so-css-icon so-css-icon-plus"></span></div>').appendTo(t);return this.setupStepButton(i),this.setupStepButton(s),this},stepValue:function(e){var t=Number.parseFloat(this.field.val());Number.isNaN(t)&&(t=this.args.default);var i=t+e;i=Math.round(100*i)/100,null!==this.args.max&&(i=Math.min(this.args.max,i)),null!==this.args.min&&(i=Math.max(this.args.min,i)),this.field.val(i),this.field.trigger("change")},setupStepButton:function(e){var t,i,s=e.is(".dec-button")?this.args.decrement:this.args.increment;e.on("mousedown",function(){this.stepValue(s),i=setTimeout(function(){t=setInterval(function(){this.stepValue(s)}.bind(this),50)}.bind(this),500)}.bind(this)).on("mouseup mouseout",(function(){i&&(clearTimeout(i),i=null),t&&(clearInterval(t),t=null)}))}}),s.view.properties.controllers.sides=s.view.propertyController.extend({template:t.template(e("#template-sides-field").html().trim()),controllers:[],events:{"click .select-tab":"onTabClick"},render:function(){s.view.propertyController.prototype.render.apply(this,arguments),this.args.hasAll||(this.$(".select-tab").eq(0).remove(),this.$(".select-tab").css("width","25%")),this.args.isRadius?this.$('.select-tabs[data-type="box"]').remove():this.$('.select-tabs[data-type="radius"]').remove(),this.$(".select-tab").each(function(i,o){for(var r=e(o).data("direction"),n=e('<li class="side">').appendTo(this.$(".sides")).hide(),l=0;l<this.args.controllers.length;l++){var a=this.args.controllers[l];s.view.properties.controllers[a.type];var c="";c="all"===r?a.args.propertyAll:a.args.property.replace("{dir}",r);var d=t.extend({},a.args,{property:c}),p=new s.view.properties.controllers[a.type]({el:e("<div>").appendTo(n),propertiesView:this.propertiesView,args:d});p.render(),this.propertiesView.propertyControllers.push(p)}}.bind(this)),this.$(".select-tab").eq(0).click()},onTabClick:function(t){var i=this.$(".select-tab");i.removeClass("active");var s=e(t.currentTarget);s.addClass("active");var o=this.$(".sides .side");o.hide(),o.eq(i.index(s)).show()}}),s.view.properties.controllers.font_select=s.view.propertyController.extend({template:t.template(e("#template-webfont-teaser").html().trim())})}(jQuery,_,socssOptions),jQuery((function(e){var t=window.socss,i=new t.model.CSSEditorModel({customCssPosts:socssOptions.customCssPosts}),s=new t.view.editor({el:e("#so-custom-css-form").get(0),model:i,openVisualEditor:socssOptions.openVisualEditor});s.setSnippets(socssOptions.snippets),e("#so-custom-css-getting-started a.hide").on("click",(function(t){t.preventDefault(),e("#so-custom-css-getting-started").slideUp(),e.get(e(this).attr("href"))})),window.socss.mainEditor=s,e(t).trigger("initialized"),e('.button-primary[name="siteorigin_custom_css_save"]').on("click",(function(){e("#so-custom-css-form").trigger("submit")}))}));
|
1 |
+
!function(e,t,i){var s={model:{},collection:{},view:{},fn:{}};window.socss=s,s.model.CustomCssModel=Backbone.Model.extend({defaults:{postId:null,postTitle:null,css:null},urlRoot:i.postCssUrlRoot,url:function(){return this.urlRoot+"&postId="+this.get("postId")}}),s.model.CustomCssCollection=Backbone.Collection.extend({model:s.model.CustomCssModel,modelId:function(e){return e.postId}}),s.model.CSSEditorModel=Backbone.Model.extend({defaults:{customCssPosts:null}}),s.view.toolbar=Backbone.View.extend({button:t.template('<li><a href="#<%= action %>" class="toolbar-button socss-button"><%= text %></a></li>'),events:{"click .socss-button:not(.save)":"triggerEvent"},triggerEvent:function(t){t.preventDefault();var i=e(t.currentTarget);i.trigger("blur");var s=i.attr("href").replace("#","");this.$el.trigger("click_"+s)},addButton:function(t,i){return e(this.button({text:t,action:i})).appendTo(this.$(".toolbar-function-buttons .toolbar-buttons"))}}),s.view.editor=Backbone.View.extend({codeMirror:null,snippets:null,toolbar:null,visualProperties:null,inspector:null,cssSelectors:[],initValue:null,events:{"click_expand .custom-css-toolbar":"toggleExpand","click_visual .custom-css-toolbar":"showVisualEditor","click .socss-button.save":"save",submit:"onSubmit"},initialize:function(e){this.listenTo(this.model,"change:selectedPost",this.getSelectedPostCss),this.getSelectedPostCss().then(function(){e.openVisualEditor&&this.showVisualEditor()}.bind(this))},save:function(){s.save(this)},getSelectedPostCss:function(){var t=this.model.get("selectedPost");return(t&&!t.has("css")?t.fetch():(new e.Deferred).resolve()).then(this.render.bind(this))},render:function(){var t=this.model.get("selectedPost");return t&&!t.has("css")?this:(this.codeMirror||this.setupEditor(),this.toolbar||(this.toolbar=new s.view.toolbar({el:this.$(".custom-css-toolbar"),model:this.model}),this.toolbar.render()),this.visualProperties||(this.visualProperties=new s.view.properties({editor:this,el:e("#so-custom-css-properties")}),this.visualProperties.render()),this.preview||(this.preview=new s.view.preview({editor:this,model:this.model,el:this.$(".custom-css-preview"),initURL:i.homeURL}),this.preview.render()),t&&(this.codeMirror.setValue(t.get("css")),this.codeMirror.clearHistory()),this)},setupEditor:function(){var s=this.$("textarea.css-editor");this.initValue=s.val();var o=this.initValue.match(/\n/gm),r=(o&&o.length,this.initValue);s.val(r);var n={tabSize:2,lineNumbers:!0,mode:"css",theme:s.data("theme"),inputStyle:"contenteditable",gutters:["CodeMirror-lint-markers"],lint:!0,search:!0,dialog:!0,annotateScrollbar:!0,extraKeys:{"Ctrl-F":"findPersistent","Alt-G":"jumpToLine"}};void 0!==wp.codeEditor?(n=t.extend(wp.codeEditor.defaultSettings.codemirror,n),this.codeMirror=wp.codeEditor.initialize(s.get(0),n).codemirror):(this.registerCodeMirrorAutocomplete(),this.codeMirror=CodeMirror.fromTextArea(s.get(0),n),this.setupCodeMirrorExtensions());var l=this.codeMirror;e("#so_css_editor_theme").on("change",(function(){1==e(this).val()?l.setOption("theme","neat"):l.setOption("theme","ambiance")})),this.codeMirror.on("change",function(e,t){var i=this.model.get("selectedPost");i&&i.get("css")!==e.getValue().trim()&&i.set("css",e.getValue().trim())}.bind(this)),e(window).on("beforeunload",function(){if(this.codeMirror.getValue().trim()!==this.initValue)return i.loc.leave}.bind(this)),this.$el.find(".custom-css-container").css("overflow","visible"),this.scaleEditor(),e(window).on("resize",function(){this.scaleEditor()}.bind(this))},onSubmit:function(){this.initValue=this.codeMirror.getValue().trim()},registerCodeMirrorAutocomplete:function(){var e={link:1,visited:1,active:1,hover:1,focus:1,"first-letter":1,"first-line":1,"first-child":1,before:1,after:1,lang:1};CodeMirror.registerHelper("hint","css",function(t){var i=t.getCursor(),s=t.getTokenAt(i),o=CodeMirror.innerMode(t.getMode(),s.state);if("css"===o.mode.name){if("keyword"===s.type&&0==="!important".indexOf(s.string))return{list:["!important"],from:CodeMirror.Pos(i.line,s.start),to:CodeMirror.Pos(i.line,s.end)};var r=s.start,n=i.ch,l=s.string.slice(0,n-r);/[^\w$_-]/.test(l)&&(l="",r=n=i.ch);var a=CodeMirror.resolveMode("text/css"),c=[],d=o.state.state;if("top"===d){for(var p=t.getLine(i.line).trim(),h=this.cssSelectors,u=0;u<h.length;u++)-1!==h[u].selector.indexOf(p)&&c.push(h[u].selector);if(c.length)return{list:c,from:CodeMirror.Pos(i.line,0),to:CodeMirror.Pos(i.line,n)}}else if("pseudo"===d||"variable-3"===s.type?v(e):"block"===d||"maybeprop"===d?v(a.propertyKeywords):"prop"===d||"parens"===d||"at"===d||"params"===d?(v(a.valueKeywords),v(a.colorKeywords)):"media"!==d&&"media_parens"!==d||(v(a.mediaTypes),v(a.mediaFeatures)),c.length)return{list:c,from:CodeMirror.Pos(i.line,r),to:CodeMirror.Pos(i.line,n)}}function v(e){for(var t in e)l&&0!==t.lastIndexOf(l,0)||c.push(t)}}.bind(this))},setupCodeMirrorExtensions:function(){this.codeMirror.on("cursorActivity",function(e){var t=e.getCursor(),i=e.getTokenAt(t);CodeMirror.innerMode(e.getMode(),i.state);if("qualifier"===i.type||"tag"===i.type||"builtin"===i.type){var s=e.getLine(t.line).substring(0,i.end);this.preview.highlight(s)}else this.preview.clearHighlight()}.bind(this)),"function"==typeof CodeMirror.showHint&&this.codeMirror.on("keyup",(function(e,t){(t.keyCode>=65&&t.keyCode<=90||189===t.keyCode&&!t.shiftKey||190===t.keyCode&&!t.shiftKey||51===t.keyCode&&t.shiftKey||189===t.keyCode&&t.shiftKey)&&e.showHint({completeSingle:!1})}))},scaleEditor:function(){var t,i=e(window).outerHeight();if(this.$el.hasClass("expanded"))this.$el.find(".CodeMirror-scroll").css("max-height",""),t=i-this.$(".custom-css-toolbar").outerHeight(),this.codeMirror.setSize("100%",t),this.$el.find(".CodeMirror-scroll").css("height","100%");else{var s=e("#so-custom-css-form");(t=i-(e("#wpadminbar").outerHeight(!0)+e("#siteorigin-custom-css").find("> h2").outerHeight(!0)+s.find("> .custom-css-toolbar").outerHeight(!0)+s.find("> .so-css-footer").outerHeight(!0)+parseFloat(e("#wpbody-content").css("padding-bottom"))))<300&&(t=300),this.codeMirror.setSize("100%","auto"),this.$el.find(".CodeMirror-scroll").css("height",t+"px")}this.$el.find(".CodeMirror-code").css("height",t+"px")},isExpanded:function(){return this.$el.hasClass("expanded")},toggleExpand:function(){this.$el.toggleClass("expanded"),this.scaleEditor()},setExpand:function(e){e?this.$el.addClass("expanded"):this.$el.removeClass("expanded"),this.scaleEditor()},showVisualEditor:function(){this.visualProperties.loadCSS(this.codeMirror.getValue().trim()),this.visualProperties.show()},setSnippets:function(e){t.isEmpty(e)||(this.snippets=new s.view.snippets({snippets:e}),this.snippets.editor=this,this.snippets.render(),this.toolbar.addButton("Snippets","snippets"),this.toolbar.on("click_snippets",function(){this.snippets.show()}.bind(this)))},addCode:function(e){var t=this.codeMirror,i="";i=1===t.doc.lineCount()&&0===t.doc.getLine(t.doc.lastLine()).length?"":0===t.doc.getLine(t.doc.lastLine()).length?"\n":"\n\n",t.doc.setCursor(t.doc.lastLine(),t.doc.getLine(t.doc.lastLine()).length),t.doc.replaceSelection(i+e)},addEmptySelector:function(e){this.addCode(e+" {\n \n}")},setInspector:function(e){this.inspector=e,this.cssSelectors=e.pageSelectors,e.on("click_selector",function(e){this.visualProperties.isVisible()?this.visualProperties.addSelector(e):this.addEmptySelector(e)}.bind(this)),e.on("click_property",function(e){this.visualProperties.isVisible()||this.codeMirror.replaceSelection(e+";\n ")}.bind(this)),e.on("set_active_element",function(e,t){this.visualProperties.isVisible()&&t.length&&this.visualProperties.addSelector(t[0].selector)}.bind(this))}}),s.view.preview=Backbone.View.extend({template:t.template(e("#template-preview-window").html()),editor:null,originalUri:null,currentUri:null,events:{"mouseleave #preview-iframe":"clearHighlight",'keydown #preview-navigator input[type="text"]':"reloadPreview"},initialize:function(e){this.editor=e.editor,this.listenTo(this.model,"change:selectedPost",this.render.bind(this)),this.originalUri=new URI(e.initURL),this.currentUri=new URI(e.initURL),this.editor.codeMirror.on("change",function(e,t){this.updatePreviewCss()}.bind(this))},render:function(){var e=this.model.get("selectedPost");if(e&&!e.has("postUrl"))return e.fetch().then(this.render.bind(this)),this;this.$el.html(this.template()),e&&(this.currentUri=new URI(e.get("postUrl"))),this.currentUri.removeQuery("so_css_preview",1),this.$("#preview-navigator input").val(this.currentUri.toString()),this.currentUri.addQuery("so_css_preview",1),this.$("#preview-iframe").attr("src",this.currentUri.toString()).on("load",this.initPreview.bind(this))},initPreview:function(){var t=this.$("#preview-iframe");this.currentUri=new URI(t.contents().get(0).location.href),this.currentUri.removeQuery("so_css_preview"),this.$("#preview-navigator input").val(this.currentUri.toString()),this.currentUri.addQuery("so_css_preview",1);var i=t.contents().find(".single-product").length;t.contents().find("a").each((function(){var t=e(this),s=t.attr("href");if(void 0===s||i&&t.parents(".wc-tabs").length)return!0;var o=-1===s.indexOf("?")?"?":"&";t.attr("href",s+o+"so_css_preview=1")})),this.updatePreviewCss()},reloadPreview:function(e){var t=this.$('#preview-navigator input[type="text"]');if(13===e.keyCode){e.preventDefault();var i=new URI(t.val());this.originalUri.host()!==i.host()||this.originalUri.protocol()!==i.protocol()?(t.trigger("blur"),alert(t.data("invalid-uri")),t.trigger("focus")):(i.addQuery("so_css_preview",1),this.$("#preview-iframe").attr("src",i.toString()))}},updatePreviewCss:function(){var e=this.$("#preview-iframe");if(0!==e.length){var t=e.contents().find("head");0===t.find("style.siteorigin-custom-css").length&&t.append('<style class="siteorigin-custom-css" type="text/css"></style>');var i=t.find("style.siteorigin-custom-css"),s=this.editor.codeMirror.getValue().trim();i.html(s)}},highlight:function(e){try{this.editor.inspector.hl.highlight(e)}catch(e){console.log("No inspector to highlight with")}},clearHighlight:function(){try{this.editor.inspector.hl.clear()}catch(e){console.log("No inspector to highlight with")}}}),s.view.snippets=Backbone.View.extend({template:t.template(e("#template-snippet-browser").html()),snippet:t.template('<li class="snippet"><%- name %></li>'),className:"css-editor-snippet-browser",snippets:null,editor:null,events:{"click .close":"hide","click .buttons .insert-snippet":"insertSnippet","click .snippet":"clickSnippet"},currentSnippet:null,initialize:function(e){this.snippets=e.snippets},render:function(){this.$el.html(this.template());for(var t=0;t<this.snippets.length;t++)e(this.snippet({name:this.snippets[t].Name})).data({description:this.snippets[t].Description,css:this.snippets[t].css}).appendTo(this.$("ul.snippets"));return this.$(".snippets li.snippet").eq(0).trigger("click"),this.attach(),this},clickSnippet:function(t){t.preventDefault();var i=e(t.currentTarget);this.$(".snippets li.snippet").removeClass("active"),e(this).addClass("active"),this.viewSnippet({name:i.html(),description:i.data("description"),css:i.data("css")})},viewSnippet:function(e){var t=this.$(".main .snippet-view");t.find(".snippet-title").html(e.name),t.find(".snippet-description").html(e.description),t.find(".snippet-code").html(e.css),this.currentSnippet=e},insertSnippet:function(){var e=this.editor.codeMirror,t=this.currentSnippet.css,i="";i=1===e.doc.lineCount()&&0===e.doc.getLine(e.doc.lastLine()).length?"":0===e.doc.getLine(e.doc.lastLine()).length?"\n":"\n\n",e.doc.setCursor(e.doc.lastLine(),e.doc.getLine(e.doc.lastLine()).length),e.doc.replaceSelection(i+t),this.hide()},attach:function(){this.$el.appendTo("body")},show:function(){this.$el.show()},hide:function(){this.$el.hide()}}),s.save=function(t){let s=e("#siteorigin-custom-css .save");var o;s.hasClass("button-primary-disabled")||(s.addClass("button-primary-disabled"),void 0!==t.editor?(o=t.editor.codeMirror.getValue().trim(),t.updateMainEditor(!0)):o=t.codeMirror.getValue().trim(),e.post(i.ajaxurl,{action:"socss_save_css",css:o},null,"html").done((function(t){t.length&&e(".custom-revisions-list").html(t)})).fail((function(e){alert(e.responseText)})).always((function(){s.removeClass("button-primary-disabled")})))},s.view.properties=Backbone.View.extend({tabTemplate:t.template('<li data-section="<%- id %>"><span class="so-css-icon so-css-icon-<%- icon %>"></span> <%- title %></li>'),sectionTemplate:t.template('<div class="section" data-section="<%- id %>"><table class="fields-table"><tbody></tbody></table></div>'),controllerTemplate:t.template('<tr><th scope="row"><%- title %></th><td></td></tr>'),propertyControllers:[],editor:null,css:"",parsed:{},activeSelector:"",editorExpandedBefore:!1,events:{"click .close":"hide","click .save":"save","click .section-tabs li":"onTabClick","change .toolbar select":"onToolbarSelectChange"},initialize:function(e){this.parser=window.css,this.editor=e.editor},render:function(){this.$(".section-tabs").empty(),this.$(".sections").empty(),this.$(".toolbar select").off(),this.propertyControllers=[];var o=i.propertyControllers;for(var r in o){e(this.tabTemplate({id:r,icon:o[r].icon,title:o[r].title})).appendTo(this.$(".section-tabs"));var n=e(this.sectionTemplate({id:r})).appendTo(this.$(".sections"));if(!t.isEmpty(o[r].controllers))for(var l=0;l<o[r].controllers.length;l++){var a,c=e(this.controllerTemplate({title:o[r].controllers[l].title})).appendTo(n.find("tbody")),d=o[r].controllers[l];a=void 0===s.view.properties.controllers[d.type]?new s.view.propertyController({el:c.find("td"),propertiesView:this,args:void 0===d.args?{}:d.args}):new s.view.properties.controllers[d.type]({el:c.find("td"),propertiesView:this,args:void 0===d.args?{}:d.args}),this.propertyControllers.push(a),a.render()}}this.$(".section-tabs li").eq(0).trigger("click")},onTabClick:function(t){var i=e(t.currentTarget),s=this.$('.sections .section[data-section="'+i.data("section")+'"]');this.$(".sections .section").not(s).hide().removeClass("active"),s.show().addClass("active"),this.$(".section-tabs li").not(i).removeClass("active"),i.addClass("active")},onToolbarSelectChange:function(t){this.setActiveSelector(e(t.currentTarget).find(":selected").data("selector"))},setRuleValue:function(e,i){if(void 0!==this.activeSelector&&void 0!==this.activeSelector.declarations){for(var s=this.activeSelector.declarations,o=!0,r=!1,n=0;n<s.length;n++)if(s[n].property===e){o=!1;var l=s[n];l.value!==i&&(l.value=i,r=!0),t.isEmpty(l.value)&&s.splice(s.indexOf(l));break}o&&!t.isEmpty(i)&&(s.push({property:e,value:i,type:"declaration"}),r=!0),r&&this.updateMainEditor(!1)}},addImport:function(e){var i=t.filter(this.parsed.stylesheet.rules,(function(e){return"import"===e.type}));t.any(i,(function(t){return t.import===e.import}))||(this.parsed.stylesheet.rules.unshift(e),this.updateMainEditor(!1))},findImport:function(e){return t.find(this.parsed.stylesheet.rules,(function(t){return"import"===t.type&&t.import.indexOf(e)>-1}))},updateImport:function(e,t){var i=this.findImport(e);i.import!==t.import&&(i.import=t.import,this.updateMainEditor(!1))},removeImport:function(e){var i=t.findIndex(this.parsed.stylesheet.rules,(function(t){return"import"===t.type&&t.import.indexOf(e)>-1}));i>-1&&this.parsed.stylesheet.rules.splice(i,1)},getRuleValue:function(e){if(void 0===this.activeSelector||void 0===this.activeSelector.declarations)return"";for(var t=this.activeSelector.declarations,i=0;i<t.length;i++)if(t[i].property===e)return t[i].value;return""},updateMainEditor:function(e){this.editor.codeMirror.setValue(this.parser.stringify(this.parsed))},show:function(){this.editorExpandedBefore=this.editor.isExpanded(),this.editor.setExpand(!0),this.$el.show().animate({left:0},"fast")},hide:function(){this.editor.setExpand(this.editorExpandedBefore),this.$el.animate({left:-338},"fast",(function(){e(this).hide()})),this.updateMainEditor(!0)},save:function(){s.save(this)},isVisible:function(){return this.$el.is(":visible")},loadCSS:function(i,s){this.css=i,this.parsed=this.parser.parse(i,{silent:!0});for(var o=this.parsed.stylesheet.rules,r=this.$(".toolbar select").empty(),n=0;n<o.length;n++){var l=o[n];if(t.contains(["rule","media"],l.type))if("media"===l.type)for(var a=0;a<l.rules.length;a++){var c="@media "+l.media,d=l.rules[a];"rule"==d.type&&r.append(e("<option>").html(c+": "+d.selectors.join(",")).attr("val",c+": "+d.selectors.join(",")).data("selector",d))}else r.append(e("<option>").html(l.selectors.join(",")).attr("val",l.selectors.join(",")).data("selector",l))}void 0===s&&(s=r.find("option").eq(0).attr("val")),t.isEmpty(s)||r.val(s).trigger("change")},setActiveSelector:function(e){this.activeSelector=e;for(var t=0;t<this.propertyControllers.length;t++)this.propertyControllers[t].refreshFromRule()},addSelector:function(e){var t=this.$(".toolbar select");t.val(e),t.val()===e?t.trigger("change"):(this.editor.addEmptySelector(e),this.loadCSS(this.editor.codeMirror.getValue().trim(),e)),t.addClass("highlighted"),setTimeout((function(){t.removeClass("highlighted")}),2e3)}}),s.view.propertyController=Backbone.View.extend({template:t.template('<input type="text" value="" class="socss-property-controller-input"/>'),activeRule:null,args:null,propertiesView:null,events:{"change .socss-property-controller-input":"onChange","keyup input.socss-property-controller-input":"onChange"},initialize:function(e){this.args=e.args,this.propertiesView=e.propertiesView,this.events=t.extend(s.view.propertyController.prototype.events,this.events),this.delegateEvents(this.events),this.on("set_value",this.updateRule,this),this.on("change",this.updateRule,this)},render:function(){this.$el.append(e(this.template({}))),this.field=this.$("input.socss-property-controller-input")},onChange:function(){this.trigger("change",this.field.val())},updateRule:function(){this.propertiesView.setRuleValue(this.args.property,this.getValue())},refreshFromRule:function(){var e=this.propertiesView.getRuleValue(this.args.property);this.setValue(e,{silent:!0})},getValue:function(){return this.field.val()},setValue:function(e,i){i=t.extend({silent:!1},i),this.field.val(e),i.silent||this.trigger("set_value",e)},reset:function(e){e=t.extend({silent:!1},e),this.setValue("",e)}}),s.view.properties.controllers={},s.view.properties.controllers.color=s.view.propertyController.extend({render:function(){s.view.propertyController.prototype.render.apply(this,arguments),this.field.minicolors({})},onChange:function(){this.trigger("change",this.field.minicolors("value"))},getValue:function(){return this.field.minicolors("value").trim()},setValue:function(e,i){i=t.extend({silent:!1},i),this.field.minicolors("value",e),i.silent||this.trigger("set_value",e)}}),s.view.properties.controllers.select=s.view.propertyController.extend({template:t.template('<select class="socss-property-controller-input"></select>'),events:{"click .select-tab":"onSelect"},render:function(){for(var t in this.$el.append(e(this.template({}))),this.field=this.$("select"),this.field.append(e('<option value=""></option>').html("")),this.args.options)this.field.append(e("<option></option>").attr("value",t).html(this.args.options[t]));void 0!==this.args.option_icons&&this.setupVisualSelect()},setupVisualSelect:function(){this.field.hide();var t=e('<div class="select-tabs"></div>').appendTo(this.$el);for(var i in e('<div class="select-tab" data-value=""><span class="so-css-icon so-css-icon-circle"></span></div>').appendTo(t),this.args.option_icons)e('<div class="select-tab"></div>').appendTo(t).append(e('<span class="so-css-icon"></span>').addClass("so-css-icon-"+this.args.option_icons[i])).attr("data-value",i);t.find(".select-tab").css("width",100/t.find(">div").length+"%")},onSelect:function(t){this.$(".select-tab").removeClass("active");var i=e(t.currentTarget);i.addClass("active"),this.field.val(i.data("value")).trigger("change")},setValue:function(e,i){i=t.extend({silent:!1},i),this.field.val(e),this.$(".select-tabs .select-tab").removeClass("active").filter('[data-value="'+e+'"]').addClass("active"),i.silent||this.trigger("set_value",e)}}),s.view.properties.controllers.image=s.view.propertyController.extend({template:t.template('<input type="text" value="" /> <span class="select socss-button"><span class="so-css-icon so-css-icon-upload"></span></span>'),events:{"click .select":"openMedia"},render:function(){this.media=wp.media({title:i.loc.select_image,library:{type:"image"},button:{text:i.loc.select,close:!1}}),this.$el.append(e(this.template({select:i.loc.select}))),this.field=this.$el.find("input"),this.media.on("select",function(){var e=this.media.state().get("selection").first().attributes,t=this.args.value.replace("{{url}}",e.url);this.field.val(t).trigger("change"),this.trigger("set_value",t),this.media.close()}.bind(this))},openMedia:function(){this.media.open()}}),s.view.properties.controllers.measurement=s.view.propertyController.extend({wrapperClass:"socss-field-measurement",events:{"click .toggle-dropdown":"toggleUnitDropdown","click .dropdown li":"onSelectUnit","keydown .socss-field-input":"onInputKeyPress","keyup .socss-field-input":"onInputKeyUp"},render:function(){s.view.propertyController.prototype.render.apply(this,arguments),this.setupMeasurementField()},setValue:function(e,i){i=t.extend({silent:!1},i),this.field.val(e).trigger("measurement_refresh"),i.silent||this.trigger("set_value",e)},units:["px","%","em","cm","mm","in","pt","pc","ex","ch","rem","vw","vh","vmin","vmax"],parseUnits:function(e){var t=this.units.map((function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")})),i=new RegExp("([0-9\\.\\-]+)("+t.join("|")+")?","i").exec(e);return null===i?{value:"",unit:""}:{value:i[1],unit:void 0===i[2]?"":i[2]}},setupMeasurementField:function(){this.field.hide(),this.$el.addClass(this.wrapperClass).data("unit","px");var t=e('<input type="text" class="socss-field-input"/>').appendTo(this.$el);e('<span class="toggle-dropdown dashicons dashicons-arrow-down"></span>').appendTo(this.$el);for(var i=e('<ul class="dropdown"></ul>').appendTo(this.$el),s=e('<span class="units"></span>').html("px").appendTo(this.$el),o=0;o<this.units.length;o++){var r=e("<li></li>").html(this.units[o]).data("unit",this.units[o]);"px"===this.units[o]&&r.addClass("active"),i.append(r)}this.field.on("measurement_refresh",function(){var i=this.parseUnits(this.field.val());t.val(i.value);var o=""===i.unit?"px":i.unit;this.$el.data("unit",o),s.html(o);var r=e('<span class="socss-hidden-placeholder"></span>').css({"font-size":"14px"}).html(i.value).appendTo("body"),n=r.width();n=Math.min(n,63),r.remove(),s.css("left",n+12)}.bind(this));var n=e('<div class="socss-diw"></div>').appendTo(this.$el),l=e('<div class="dec-button socss-button"><span class="so-css-icon so-css-icon-minus"></span></div>').appendTo(n),a=e('<div class="inc-button socss-button"><span class="so-css-icon so-css-icon-plus"></span></div>').appendTo(n);this.setupStepButton(l),this.setupStepButton(a)},updateValue:function(){var e=this.$(".socss-field-input"),t=this.parseUnits(e.val());""!==t.unit&&t.unit!==this.$el.data("unit")&&(e.val(t.value),this.setUnit(t.unit)),""===t.value?this.field.val(""):this.field.val(t.value+this.$el.data("unit")),this.field.trigger("change")},setUnit:function(e){this.$(".units").html(e),this.$el.data("unit",e),this.$(".socss-field-input").trigger("keydown")},toggleUnitDropdown:function(){this.$(".dropdown").toggle()},onSelectUnit:function(t){this.toggleUnitDropdown(),this.setUnit(e(t.currentTarget).data("unit")),this.updateValue()},onInputKeyUp:function(e){this.onInputKeyPress(e),this.updateValue()},onInputKeyPress:function(t){var i=this.$(".socss-field-input"),s="";"keydown"===t.type&&(t.keyCode>=48&&t.keyCode<=57?s=String.fromCharCode(t.keyCode):189===t.keyCode?s="-":190===t.keyCode&&(s="."));var o=e('<span class="socss-hidden-placeholder"></span>').css({"font-size":"14px"}).html(i.val()+s).appendTo("body"),r=o.width();r=Math.min(r,63),o.remove(),this.$(".units").css("left",r+12)},stepValue:function(e){var t=Number.parseInt(this.parseUnits(this.field.val()).value);Number.isNaN(t)&&(t=0);var i=t+e;this.$(".socss-field-input").val(i),this.updateValue(),this.field.trigger("measurement_refresh")},setupStepButton:function(e){var t,i,s=e.is(".dec-button")?-1:1;e.on("mousedown",function(){this.stepValue(s),i=setTimeout(function(){t=setInterval(function(){this.stepValue(s)}.bind(this),50)}.bind(this),500)}.bind(this)).on("mouseup mouseout",(function(){i&&(clearTimeout(i),i=null),t&&(clearInterval(t),t=null)}))}}),s.view.properties.controllers.number=s.view.propertyController.extend({initialize:function(e){s.view.propertyController.prototype.initialize.apply(this,arguments),this.args=t.extend({change:null,default:0,increment:1,decrement:-1,max:null,min:null},e.args)},render:function(){s.view.propertyController.prototype.render.apply(this,arguments),this.setupNumberField()},setupNumberField:function(){this.$el.addClass("socss-field-number");var t=e('<div class="socss-diw"></div>').appendTo(this.$el),i=e('<div class="dec-button socss-button"><span class="so-css-icon so-css-icon-minus"></span></div>').appendTo(t),s=e('<div class="inc-button socss-button"><span class="so-css-icon so-css-icon-plus"></span></div>').appendTo(t);return this.setupStepButton(i),this.setupStepButton(s),this},stepValue:function(e){var t=Number.parseFloat(this.field.val());Number.isNaN(t)&&(t=this.args.default);var i=t+e;i=Math.round(100*i)/100,null!==this.args.max&&(i=Math.min(this.args.max,i)),null!==this.args.min&&(i=Math.max(this.args.min,i)),this.field.val(i),this.field.trigger("change")},setupStepButton:function(e){var t,i,s=e.is(".dec-button")?this.args.decrement:this.args.increment;e.on("mousedown",function(){this.stepValue(s),i=setTimeout(function(){t=setInterval(function(){this.stepValue(s)}.bind(this),50)}.bind(this),500)}.bind(this)).on("mouseup mouseout",(function(){i&&(clearTimeout(i),i=null),t&&(clearInterval(t),t=null)}))}}),s.view.properties.controllers.sides=s.view.propertyController.extend({template:t.template(e("#template-sides-field").html().trim()),controllers:[],events:{"click .select-tab":"onTabClick"},render:function(){s.view.propertyController.prototype.render.apply(this,arguments),this.args.hasAll||(this.$(".select-tab").eq(0).remove(),this.$(".select-tab").css("width","25%")),this.args.isRadius?this.$('.select-tabs[data-type="box"]').remove():this.$('.select-tabs[data-type="radius"]').remove(),this.$(".select-tab").each(function(i,o){for(var r=e(o).data("direction"),n=e('<li class="side">').appendTo(this.$(".sides")).hide(),l=0;l<this.args.controllers.length;l++){var a=this.args.controllers[l];s.view.properties.controllers[a.type];var c="";c="all"===r?a.args.propertyAll:a.args.property.replace("{dir}",r);var d=t.extend({},a.args,{property:c}),p=new s.view.properties.controllers[a.type]({el:e("<div>").appendTo(n),propertiesView:this.propertiesView,args:d});p.render(),this.propertiesView.propertyControllers.push(p)}}.bind(this)),this.$(".select-tab").eq(0).click()},onTabClick:function(t){var i=this.$(".select-tab");i.removeClass("active");var s=e(t.currentTarget);s.addClass("active");var o=this.$(".sides .side");o.hide(),o.eq(i.index(s)).show()}}),s.view.properties.controllers.font_select=s.view.propertyController.extend({template:t.template(e("#template-webfont-teaser").html().trim())})}(jQuery,_,socssOptions),jQuery((function(e){var t=window.socss,i=new t.model.CSSEditorModel({customCssPosts:socssOptions.customCssPosts}),s=new t.view.editor({el:e("#so-custom-css-form").get(0),model:i,openVisualEditor:socssOptions.openVisualEditor});s.setSnippets(socssOptions.snippets),e("#so-custom-css-getting-started a.hide").on("click",(function(t){t.preventDefault(),e("#so-custom-css-getting-started").slideUp(),e.get(e(this).attr("href"))})),window.socss.mainEditor=s,e(t).trigger("initialized"),e('.button-primary[name="siteorigin_custom_css_save"]').on("click",(function(){e("#so-custom-css-form").trigger("submit")}))}));
|
lang/so-css.pot
CHANGED
@@ -16,7 +16,7 @@ msgstr ""
|
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
|
19 |
-
#: so-css.php:3, so-css.php:
|
20 |
msgid "SiteOrigin CSS"
|
21 |
msgstr ""
|
22 |
|
@@ -36,87 +36,87 @@ msgstr ""
|
|
36 |
msgid "https://siteorigin.com/css/"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: so-css.php:264, so-css.php:264, so-css.php:
|
40 |
msgid "Custom CSS"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: so-css.php:
|
44 |
msgid "SiteOrigin CSS adds any custom CSS you enter here into your site's header. "
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: so-css.php:
|
48 |
msgid "These changes will persist across updates so it's best to make all your changes here. "
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: so-css.php:
|
52 |
msgid "Unchanged"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: so-css.php:
|
56 |
msgid "Select"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: so-css.php:
|
60 |
msgid "Select Image"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: so-css.php:
|
64 |
msgid "Are you sure you want to leave without saving?"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: so-css.php:
|
68 |
msgid "CSS Editor"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: so-css.php:
|
72 |
msgid "Support"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: so-css.php:
|
76 |
msgid "Addons"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: so-css.php:
|
80 |
msgid "Changes apply to %s and its child themes"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: so-css.php:
|
84 |
msgid "Save CSS"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: so-css.php:
|
88 |
msgid "Editing CSS for: %s"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: so-css.php:
|
92 |
msgid "Changes apply to the %s %s when the current theme is %s or its child themes"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: so-css.php:
|
96 |
msgid "Save %s CSS"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: so-css.php:
|
100 |
msgid "Revert to this revision"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: so-css.php:
|
104 |
msgid "The supplied nonce is invalid."
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: so-css.php:
|
108 |
msgid "Invalid nonce."
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: so-css.php:
|
112 |
msgid "%d chars"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: so-css.php:
|
116 |
msgid "Latest"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: so-css.php:
|
120 |
msgid "No revisions yet."
|
121 |
msgstr ""
|
122 |
|
@@ -548,42 +548,54 @@ msgstr ""
|
|
548 |
msgid "Editing revision dated %s. Click %sRevert to this revision%s to keep using it."
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: tpl/page.php:
|
552 |
msgid "Get The Full Experience"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: tpl/page.php:
|
556 |
msgid "%sSiteOrigin Premium%s adds a <strong>Google Web Font</strong> selector to SiteOrigin CSS so you can easily change any font."
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: tpl/page.php:
|
560 |
msgid "Getting Started Video"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: tpl/page.php:
|
564 |
msgid "Dismiss"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: tpl/page.php:
|
568 |
msgid "CSS Revisions"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: tpl/page.php:
|
572 |
msgid "Are you sure you want to load this revision?"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: tpl/page.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
msgid "Open Expanded Mode"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: tpl/page.php:
|
580 |
msgid "Close Expanded Mode"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: tpl/page.php:
|
584 |
msgid "Open Visual Mode"
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: tpl/page.php:
|
588 |
msgid "Close"
|
589 |
msgstr ""
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
|
19 |
+
#: so-css.php:3, so-css.php:457
|
20 |
msgid "SiteOrigin CSS"
|
21 |
msgstr ""
|
22 |
|
36 |
msgid "https://siteorigin.com/css/"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: so-css.php:264, so-css.php:264, so-css.php:303
|
40 |
msgid "Custom CSS"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: so-css.php:305
|
44 |
msgid "SiteOrigin CSS adds any custom CSS you enter here into your site's header. "
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: so-css.php:306
|
48 |
msgid "These changes will persist across updates so it's best to make all your changes here. "
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: so-css.php:371
|
52 |
msgid "Unchanged"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: so-css.php:372
|
56 |
msgid "Select"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: so-css.php:373
|
60 |
msgid "Select Image"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: so-css.php:374
|
64 |
msgid "Are you sure you want to leave without saving?"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: so-css.php:443
|
68 |
msgid "CSS Editor"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: so-css.php:444
|
72 |
msgid "Support"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: so-css.php:446
|
76 |
msgid "Addons"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: so-css.php:460
|
80 |
msgid "Changes apply to %s and its child themes"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: so-css.php:461, tpl/page.php:114, tpl/page.php:144
|
84 |
msgid "Save CSS"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: so-css.php:468
|
88 |
msgid "Editing CSS for: %s"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: so-css.php:473
|
92 |
msgid "Changes apply to the %s %s when the current theme is %s or its child themes"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: so-css.php:480
|
96 |
msgid "Save %s CSS"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: so-css.php:493
|
100 |
msgid "Revert to this revision"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: so-css.php:548, so-css.php:569, so-css.php:588
|
104 |
msgid "The supplied nonce is invalid."
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: so-css.php:549, so-css.php:570, so-css.php:589
|
108 |
msgid "Invalid nonce."
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: so-css.php:635
|
112 |
msgid "%d chars"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: so-css.php:635
|
116 |
msgid "Latest"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: so-css.php:641
|
120 |
msgid "No revisions yet."
|
121 |
msgstr ""
|
122 |
|
548 |
msgid "Editing revision dated %s. Click %sRevert to this revision%s to keep using it."
|
549 |
msgstr ""
|
550 |
|
551 |
+
#: tpl/page.php:47
|
552 |
msgid "Get The Full Experience"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: tpl/page.php:49
|
556 |
msgid "%sSiteOrigin Premium%s adds a <strong>Google Web Font</strong> selector to SiteOrigin CSS so you can easily change any font."
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: tpl/page.php:57
|
560 |
msgid "Getting Started Video"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: tpl/page.php:58
|
564 |
msgid "Dismiss"
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: tpl/page.php:67
|
568 |
msgid "CSS Revisions"
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: tpl/page.php:69
|
572 |
msgid "Are you sure you want to load this revision?"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: tpl/page.php:78
|
576 |
+
msgid "Editor Theme"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: tpl/page.php:81
|
580 |
+
msgid "Light"
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: tpl/page.php:82
|
584 |
+
msgid "Dark"
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: tpl/page.php:106
|
588 |
msgid "Open Expanded Mode"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: tpl/page.php:107
|
592 |
msgid "Close Expanded Mode"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: tpl/page.php:110
|
596 |
msgid "Open Visual Mode"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: tpl/page.php:141
|
600 |
msgid "Close"
|
601 |
msgstr ""
|
lib/codemirror/theme/ambiance.css
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ambiance theme for codemirror */
|
2 |
+
|
3 |
+
/* Color scheme */
|
4 |
+
|
5 |
+
.cm-s-ambiance .cm-header { color: blue; }
|
6 |
+
.cm-s-ambiance .cm-quote { color: #24C2C7; }
|
7 |
+
|
8 |
+
.cm-s-ambiance .cm-keyword { color: #cda869; }
|
9 |
+
.cm-s-ambiance .cm-atom { color: #CF7EA9; }
|
10 |
+
.cm-s-ambiance .cm-number { color: #78CF8A; }
|
11 |
+
.cm-s-ambiance .cm-def { color: #aac6e3; }
|
12 |
+
.cm-s-ambiance .cm-variable { color: #ffb795; }
|
13 |
+
.cm-s-ambiance .cm-variable-2 { color: #eed1b3; }
|
14 |
+
.cm-s-ambiance .cm-variable-3, .cm-s-ambiance .cm-type { color: #faded3; }
|
15 |
+
.cm-s-ambiance .cm-property { color: #eed1b3; }
|
16 |
+
.cm-s-ambiance .cm-operator { color: #fa8d6a; }
|
17 |
+
.cm-s-ambiance .cm-comment { color: #555; font-style:italic; }
|
18 |
+
.cm-s-ambiance .cm-string { color: #8f9d6a; }
|
19 |
+
.cm-s-ambiance .cm-string-2 { color: #9d937c; }
|
20 |
+
.cm-s-ambiance .cm-meta { color: #D2A8A1; }
|
21 |
+
.cm-s-ambiance .cm-qualifier { color: yellow; }
|
22 |
+
.cm-s-ambiance .cm-builtin { color: #9999cc; }
|
23 |
+
.cm-s-ambiance .cm-bracket { color: #24C2C7; }
|
24 |
+
.cm-s-ambiance .cm-tag { color: #fee4ff; }
|
25 |
+
.cm-s-ambiance .cm-attribute { color: #9B859D; }
|
26 |
+
.cm-s-ambiance .cm-hr { color: pink; }
|
27 |
+
.cm-s-ambiance .cm-link { color: #F4C20B; }
|
28 |
+
.cm-s-ambiance .cm-special { color: #FF9D00; }
|
29 |
+
.cm-s-ambiance .cm-error { color: #AF2018; }
|
30 |
+
|
31 |
+
.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }
|
32 |
+
.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }
|
33 |
+
|
34 |
+
.cm-s-ambiance div.CodeMirror-selected { background: rgba(255, 255, 255, 0.15); }
|
35 |
+
.cm-s-ambiance.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
|
36 |
+
.cm-s-ambiance .CodeMirror-line::selection, .cm-s-ambiance .CodeMirror-line > span::selection, .cm-s-ambiance .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); }
|
37 |
+
.cm-s-ambiance .CodeMirror-line::-moz-selection, .cm-s-ambiance .CodeMirror-line > span::-moz-selection, .cm-s-ambiance .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); }
|
38 |
+
|
39 |
+
/* Editor styling */
|
40 |
+
|
41 |
+
.cm-s-ambiance.CodeMirror {
|
42 |
+
line-height: 1.40em;
|
43 |
+
color: #E6E1DC;
|
44 |
+
background-color: #202020;
|
45 |
+
-webkit-box-shadow: inset 0 0 10px black;
|
46 |
+
-moz-box-shadow: inset 0 0 10px black;
|
47 |
+
box-shadow: inset 0 0 10px black;
|
48 |
+
}
|
49 |
+
|
50 |
+
.cm-s-ambiance .CodeMirror-gutters {
|
51 |
+
background: #3D3D3D;
|
52 |
+
border-right: 1px solid #4D4D4D;
|
53 |
+
box-shadow: 0 10px 20px black;
|
54 |
+
}
|
55 |
+
|
56 |
+
.cm-s-ambiance .CodeMirror-linenumber {
|
57 |
+
text-shadow: 0px 1px 1px #4d4d4d;
|
58 |
+
color: #111;
|
59 |
+
padding: 0 5px;
|
60 |
+
}
|
61 |
+
|
62 |
+
.cm-s-ambiance .CodeMirror-guttermarker { color: #aaa; }
|
63 |
+
.cm-s-ambiance .CodeMirror-guttermarker-subtle { color: #111; }
|
64 |
+
|
65 |
+
.cm-s-ambiance .CodeMirror-cursor { border-left: 1px solid #7991E8; }
|
66 |
+
|
67 |
+
.cm-s-ambiance .CodeMirror-activeline-background {
|
68 |
+
background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031);
|
69 |
+
}
|
70 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TkSuQmCC");
|
74 |
+
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Tags: css, visual css, css editor, design, customize
|
3 |
Requires at least: 3.9
|
4 |
Tested up to: 5.8
|
5 |
-
Stable tag: 1.
|
6 |
-
Build time: 2021-
|
7 |
License: GPLv2 or later
|
8 |
Contributors: gpriday, alexgso
|
9 |
Donate link: https://siteorigin.com/downloads/premium/
|
@@ -71,6 +71,10 @@ SiteOrigin Premium includes access to our professional email support service, pe
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
74 |
= 1.4.3 - 29 November 2021 =
|
75 |
* Restored editor scrollbar.
|
76 |
* Added a fixed editor height.
|
2 |
Tags: css, visual css, css editor, design, customize
|
3 |
Requires at least: 3.9
|
4 |
Tested up to: 5.8
|
5 |
+
Stable tag: 1.5.0
|
6 |
+
Build time: 2021-12-16T17:41:49+02:00
|
7 |
License: GPLv2 or later
|
8 |
Contributors: gpriday, alexgso
|
9 |
Donate link: https://siteorigin.com/downloads/premium/
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 1.5.0 - 16 December 2021 =
|
75 |
+
* Basic Editor: Added a dark theme option.
|
76 |
+
* Ajax Saving: Resolved unintended slashes added during escaping.
|
77 |
+
|
78 |
= 1.4.3 - 29 November 2021 =
|
79 |
* Restored editor scrollbar.
|
80 |
* Added a fixed editor height.
|
so-css.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: SiteOrigin CSS
|
4 |
Description: An advanced CSS editor from SiteOrigin.
|
5 |
-
Version: 1.
|
6 |
Author: SiteOrigin
|
7 |
Author URI: https://siteorigin.com
|
8 |
Plugin URI: https://siteorigin.com/css/
|
@@ -14,7 +14,7 @@ Text Domain: so-css
|
|
14 |
// Handle the legacy CSS editor that came with SiteOrigin themes
|
15 |
include plugin_dir_path( __FILE__ ) . 'inc/legacy.php';
|
16 |
|
17 |
-
define( 'SOCSS_VERSION', '1.
|
18 |
define( 'SOCSS_JS_SUFFIX', '.min' );
|
19 |
|
20 |
/**
|
@@ -282,6 +282,14 @@ class SiteOrigin_CSS {
|
|
282 |
|
283 |
$this->save_custom_css_file( $custom_css, $this->theme, $socss_post_id );
|
284 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
}
|
286 |
}
|
287 |
|
@@ -320,7 +328,8 @@ class SiteOrigin_CSS {
|
|
320 |
} else {
|
321 |
$this->enqueue_fallback_codemirror();
|
322 |
}
|
323 |
-
wp_enqueue_style( 'socss-codemirror-theme-neat', plugin_dir_url( __FILE__ ) . 'lib/codemirror/theme/neat.css', array(),
|
|
|
324 |
|
325 |
// Enqueue the scripts for theme CSS processing
|
326 |
wp_enqueue_script( 'siteorigin-css-parser-lib', plugin_dir_url( __FILE__ ) . 'js/css' . SOCSS_JS_SUFFIX . '.js', array( 'jquery' ), SOCSS_VERSION );
|
@@ -489,6 +498,8 @@ class SiteOrigin_CSS {
|
|
489 |
}
|
490 |
|
491 |
$theme = basename( get_template_directory() );
|
|
|
|
|
492 |
|
493 |
include plugin_dir_path( __FILE__ ) . 'tpl/page.php';
|
494 |
}
|
@@ -582,7 +593,7 @@ class SiteOrigin_CSS {
|
|
582 |
|
583 |
if ( current_user_can( 'edit_theme_options' ) && isset( $_POST['css'] ) ) {
|
584 |
// Sanitize CSS input. Should keep most tags, apart from script and style tags.
|
585 |
-
$custom_css = self::sanitize_css( $_POST['css'] );
|
586 |
|
587 |
$current = $this->get_custom_css( $this->theme );
|
588 |
$this->save_custom_css( $custom_css, $this->theme );
|
2 |
/*
|
3 |
Plugin Name: SiteOrigin CSS
|
4 |
Description: An advanced CSS editor from SiteOrigin.
|
5 |
+
Version: 1.5.0
|
6 |
Author: SiteOrigin
|
7 |
Author URI: https://siteorigin.com
|
8 |
Plugin URI: https://siteorigin.com/css/
|
14 |
// Handle the legacy CSS editor that came with SiteOrigin themes
|
15 |
include plugin_dir_path( __FILE__ ) . 'inc/legacy.php';
|
16 |
|
17 |
+
define( 'SOCSS_VERSION', '1.5.0' );
|
18 |
define( 'SOCSS_JS_SUFFIX', '.min' );
|
19 |
|
20 |
/**
|
282 |
|
283 |
$this->save_custom_css_file( $custom_css, $this->theme, $socss_post_id );
|
284 |
}
|
285 |
+
|
286 |
+
// Update Editor Theme.
|
287 |
+
if (
|
288 |
+
$_POST['so_css_editor_theme'] == 'neat' ||
|
289 |
+
$_POST['so_css_editor_theme'] == 'ambiance'
|
290 |
+
) {
|
291 |
+
update_option( 'so_css_editor_theme', $_POST['so_css_editor_theme'] );
|
292 |
+
}
|
293 |
}
|
294 |
}
|
295 |
|
328 |
} else {
|
329 |
$this->enqueue_fallback_codemirror();
|
330 |
}
|
331 |
+
wp_enqueue_style( 'socss-codemirror-theme-neat', plugin_dir_url( __FILE__ ) . 'lib/codemirror/theme/neat.css', array(), SOCSS_VERSION );
|
332 |
+
wp_enqueue_style( 'socss-codemirror-theme-ambiance', plugin_dir_url( __FILE__ ) . 'lib/codemirror/theme/ambiance.css', array(), SOCSS_VERSION );
|
333 |
|
334 |
// Enqueue the scripts for theme CSS processing
|
335 |
wp_enqueue_script( 'siteorigin-css-parser-lib', plugin_dir_url( __FILE__ ) . 'js/css' . SOCSS_JS_SUFFIX . '.js', array( 'jquery' ), SOCSS_VERSION );
|
498 |
}
|
499 |
|
500 |
$theme = basename( get_template_directory() );
|
501 |
+
|
502 |
+
$editor_theme = get_option( 'so_css_editor_theme', 'neat' );
|
503 |
|
504 |
include plugin_dir_path( __FILE__ ) . 'tpl/page.php';
|
505 |
}
|
593 |
|
594 |
if ( current_user_can( 'edit_theme_options' ) && isset( $_POST['css'] ) ) {
|
595 |
// Sanitize CSS input. Should keep most tags, apart from script and style tags.
|
596 |
+
$custom_css = self::sanitize_css( stripslashes( $_POST['css'] ) );
|
597 |
|
598 |
$current = $this->get_custom_css( $this->theme );
|
599 |
$this->save_custom_css( $custom_css, $this->theme );
|
tpl/page.php
CHANGED
@@ -35,111 +35,124 @@ if ( ! empty( $current_revision ) ) {
|
|
35 |
<?php endif; ?>
|
36 |
|
37 |
<div id="poststuff">
|
38 |
-
<
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
<div class="inside">
|
47 |
-
<?php
|
|
|
|
|
|
|
|
|
48 |
</div>
|
49 |
</div>
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<div class="postbox" id="so-custom-css-getting-started">
|
54 |
-
<h3 class="hndle">
|
55 |
-
<span><?php esc_html_e( 'Getting Started Video', 'so-css' ); ?></span>
|
56 |
-
<a href="<?php echo wp_nonce_url( admin_url('admin-ajax.php?action=socss_hide_getting_started'), 'hide' ) ?>" class="hide"><?php esc_html_e( 'Dismiss', 'so-css' ); ?></a>
|
57 |
-
</h3>
|
58 |
<div class="inside">
|
59 |
-
<
|
|
|
|
|
|
|
60 |
</div>
|
61 |
</div>
|
62 |
-
<?php endif; ?>
|
63 |
-
|
64 |
-
<div class="postbox" id="so-custom-css-revisions">
|
65 |
-
<h3 class="hndle"><span><?php esc_html_e( 'CSS Revisions', 'so-css' ); ?></span></h3>
|
66 |
-
<div class="inside">
|
67 |
-
<ol class="custom-revisions-list" data-confirm="<?php esc_attr_e('Are you sure you want to load this revision?', 'so-css') ?>">
|
68 |
-
<?php
|
69 |
-
$this->custom_css_revisions_list( $theme, $socss_post_id, $current_revision );
|
70 |
-
?>
|
71 |
-
</ol>
|
72 |
-
</div>
|
73 |
-
</div>
|
74 |
|
75 |
-
|
|
|
|
|
|
|
76 |
|
77 |
-
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
83 |
</div>
|
84 |
-
|
85 |
-
<ul class="toolbar-buttons">
|
86 |
-
</ul>
|
87 |
-
</div>
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
102 |
</div>
|
103 |
-
</div>
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
<
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
<div class="custom-css-preview">
|
116 |
|
117 |
-
|
118 |
|
119 |
-
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
</div>
|
134 |
-
</div>
|
135 |
|
136 |
-
|
137 |
-
|
|
|
138 |
|
139 |
-
<div class="sections">
|
140 |
</div>
|
141 |
|
142 |
-
</
|
143 |
|
144 |
</div>
|
145 |
|
35 |
<?php endif; ?>
|
36 |
|
37 |
<div id="poststuff">
|
38 |
+
<form action="<?php echo esc_url( $form_save_url ) ?>" method="POST">
|
39 |
+
|
40 |
+
<div id="so-custom-css-info">
|
41 |
+
<p class="so-custom-css-submit">
|
42 |
+
<input type="submit" name="siteorigin_custom_css_save" class="button-primary" value="<?php esc_attr_e( $save_button_label ); ?>" />
|
43 |
+
</p>
|
44 |
+
|
45 |
+
<?php if ( $this->display_teaser() ) : ?>
|
46 |
+
<div class="postbox">
|
47 |
+
<h3 class="hndle"><span><?php esc_html_e( 'Get The Full Experience', 'so-css' ); ?></span></h3>
|
48 |
+
<div class="inside">
|
49 |
+
<?php printf( wp_kses_post( __( '%sSiteOrigin Premium%s adds a <strong>Google Web Font</strong> selector to SiteOrigin CSS so you can easily change any font.', 'so-css' ) ), '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/web-font-selector" target="_blank">', '</a>' ); ?>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
<?php endif; ?>
|
53 |
+
|
54 |
+
<?php if ( ! get_user_meta( $user->ID, 'socss_hide_gs' ) ) : ?>
|
55 |
+
<div class="postbox" id="so-custom-css-getting-started">
|
56 |
+
<h3 class="hndle">
|
57 |
+
<span><?php esc_html_e( 'Getting Started Video', 'so-css' ); ?></span>
|
58 |
+
<a href="<?php echo wp_nonce_url( admin_url('admin-ajax.php?action=socss_hide_getting_started'), 'hide' ) ?>" class="hide"><?php esc_html_e( 'Dismiss', 'so-css' ); ?></a>
|
59 |
+
</h3>
|
60 |
+
<div class="inside">
|
61 |
+
<a href="https://siteorigin.com/css/getting-started/" target="_blank"><img src="<?php echo plugin_dir_url(__FILE__).'../css/images/video.jpg' ?>" /></a>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
<?php endif; ?>
|
65 |
+
|
66 |
+
<div class="postbox" id="so-custom-css-revisions">
|
67 |
+
<h3 class="hndle"><span><?php esc_html_e( 'CSS Revisions', 'so-css' ); ?></span></h3>
|
68 |
<div class="inside">
|
69 |
+
<ol class="custom-revisions-list" data-confirm="<?php esc_attr_e( 'Are you sure you want to load this revision?', 'so-css' ); ?>">
|
70 |
+
<?php
|
71 |
+
$this->custom_css_revisions_list( $theme, $socss_post_id, $current_revision );
|
72 |
+
?>
|
73 |
+
</ol>
|
74 |
</div>
|
75 |
</div>
|
76 |
+
|
77 |
+
<div class="postbox" id="so-custom-css-editor-theme">
|
78 |
+
<h3 class="hndle"><span><?php esc_html_e( 'Editor Theme', 'so-css' ); ?></span></h3>
|
|
|
|
|
|
|
|
|
|
|
79 |
<div class="inside">
|
80 |
+
<select name="so_css_editor_theme" id="so_css_editor_theme">
|
81 |
+
<option value="neat" selected="selected"><?php esc_attr_e( 'Light', 'so-css' ); ?></option>
|
82 |
+
<option value="ambiance"><?php esc_attr_e( 'Dark', 'so-css' ); ?></option>
|
83 |
+
</select>
|
84 |
</div>
|
85 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
+
<div class="color-theme">
|
88 |
+
</div>
|
89 |
+
|
90 |
+
</div>
|
91 |
|
92 |
+
<div id="so-custom-css-form">
|
93 |
|
94 |
+
<div class="custom-css-toolbar">
|
95 |
+
<div class="toolbar-function-buttons">
|
96 |
+
<div class="toolbar-functions-dropdown">
|
97 |
+
<span class="dashicons dashicons-menu"></span>
|
98 |
+
</div>
|
99 |
+
|
100 |
+
<ul class="toolbar-buttons">
|
101 |
+
</ul>
|
102 |
</div>
|
|
|
|
|
|
|
|
|
103 |
|
104 |
+
<div class="toolbar-action-buttons">
|
105 |
+
<a href="#expand" class="editor-expand socss-button">
|
106 |
+
<span class="so-css-icon so-css-icon-expand" title="<?php esc_attr_e( 'Open Expanded Mode', 'so-css' ); ?>"></span>
|
107 |
+
<span class="so-css-icon so-css-icon-compress" title="<?php esc_attr_e( 'Close Expanded Mode', 'so-css' ); ?>"></span>
|
108 |
+
</a>
|
109 |
|
110 |
+
<a href="#visual" class="editor-visual socss-button" title="<?php esc_attr_e( 'Open Visual Mode', 'so-css' ); ?>">
|
111 |
+
<span class="so-css-icon so-css-icon-eye"></span>
|
112 |
+
</a>
|
113 |
|
114 |
+
<span class="save socss-button button-primary" title="<?php esc_attr_e( 'Save CSS', 'so-css' ); ?>">
|
115 |
+
<span class="so-css-icon so-css-icon-save"></span>
|
116 |
+
</span>
|
117 |
+
</div>
|
118 |
</div>
|
|
|
119 |
|
120 |
+
<div class="custom-css-container">
|
121 |
+
<textarea
|
122 |
+
name="siteorigin_custom_css" id="custom-css-textarea" data-theme="<?php echo esc_attr( $editor_theme ) ?>" class="css-editor" rows="<?php echo max( 10, substr_count( $custom_css, "\n" ) + 1 ) ?>"><?php echo esc_textarea( $custom_css ) ?></textarea>
|
123 |
+
<?php wp_nonce_field( 'custom_css', '_sononce' ) ?>
|
124 |
+
</div>
|
125 |
+
<div class="so-css-footer">
|
126 |
+
<p class="description">
|
127 |
+
<?php esc_html_e( $editor_description ); ?>
|
128 |
+
</p>
|
129 |
+
</div>
|
|
|
130 |
|
131 |
+
<div class="custom-css-preview"></div>
|
132 |
|
133 |
+
<div class="decoration"></div>
|
134 |
|
135 |
+
</div>
|
136 |
|
137 |
+
<div id="so-custom-css-properties">
|
138 |
|
139 |
+
<div class="toolbar">
|
140 |
+
<select></select>
|
141 |
+
<div class="close socss-button" title="<?php esc_attr_e( 'Close', 'so-css' ); ?>">
|
142 |
+
<span class="so-css-icon so-css-icon-check"></span>
|
143 |
+
</div>
|
144 |
+
<div class="save socss-button button-primary" title="<?php esc_attr_e( 'Save CSS', 'so-css' ); ?>">
|
145 |
+
<span class="so-css-icon so-css-icon-save"></span>
|
146 |
+
</div>
|
147 |
</div>
|
|
|
148 |
|
149 |
+
<ul class="section-tabs"></ul>
|
150 |
+
|
151 |
+
<div class="sections"></div>
|
152 |
|
|
|
153 |
</div>
|
154 |
|
155 |
+
</form>
|
156 |
|
157 |
</div>
|
158 |
|