jhtonyKoo commited on
Commit
29acef7
1 Parent(s): 36d6869

update yt_download

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. ROSÉ & Bruno Mars - APT. (Official Music Video).m4a +0 -0
  2. app.py +2 -2
  3. node_modules/agent-base/LICENSE +22 -0
  4. node_modules/agent-base/README.md +69 -0
  5. node_modules/agent-base/dist/helpers.d.ts +15 -0
  6. node_modules/agent-base/dist/helpers.d.ts.map +1 -0
  7. node_modules/agent-base/dist/helpers.js +66 -0
  8. node_modules/agent-base/dist/helpers.js.map +1 -0
  9. node_modules/agent-base/dist/index.d.ts +41 -0
  10. node_modules/agent-base/dist/index.d.ts.map +1 -0
  11. node_modules/agent-base/dist/index.js +175 -0
  12. node_modules/agent-base/dist/index.js.map +1 -0
  13. node_modules/agent-base/package.json +83 -0
  14. node_modules/asynckit/LICENSE +21 -0
  15. node_modules/asynckit/README.md +233 -0
  16. node_modules/asynckit/bench.js +76 -0
  17. node_modules/asynckit/index.js +6 -0
  18. node_modules/asynckit/lib/abort.js +29 -0
  19. node_modules/asynckit/lib/async.js +34 -0
  20. node_modules/asynckit/lib/defer.js +26 -0
  21. node_modules/asynckit/lib/iterate.js +75 -0
  22. node_modules/asynckit/lib/readable_asynckit.js +91 -0
  23. node_modules/asynckit/lib/readable_parallel.js +25 -0
  24. node_modules/asynckit/lib/readable_serial.js +25 -0
  25. node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  26. node_modules/asynckit/lib/state.js +37 -0
  27. node_modules/asynckit/lib/streamify.js +141 -0
  28. node_modules/asynckit/lib/terminator.js +29 -0
  29. node_modules/asynckit/package.json +91 -0
  30. node_modules/asynckit/parallel.js +43 -0
  31. node_modules/asynckit/serial.js +17 -0
  32. node_modules/asynckit/serialOrdered.js +75 -0
  33. node_modules/asynckit/stream.js +21 -0
  34. node_modules/combined-stream/License +19 -0
  35. node_modules/combined-stream/Readme.md +138 -0
  36. node_modules/combined-stream/lib/combined_stream.js +208 -0
  37. node_modules/combined-stream/package.json +57 -0
  38. node_modules/combined-stream/yarn.lock +17 -0
  39. node_modules/cssstyle/LICENSE +20 -0
  40. node_modules/cssstyle/README.md +15 -0
  41. node_modules/cssstyle/lib/CSSStyleDeclaration.js +271 -0
  42. node_modules/cssstyle/lib/allExtraProperties.js +67 -0
  43. node_modules/cssstyle/lib/allProperties.js +529 -0
  44. node_modules/cssstyle/lib/allWebkitProperties.js +194 -0
  45. node_modules/cssstyle/lib/constants.js +6 -0
  46. node_modules/cssstyle/lib/implementedProperties.js +86 -0
  47. node_modules/cssstyle/lib/named_colors.json +152 -0
  48. node_modules/cssstyle/lib/parsers.js +735 -0
  49. node_modules/cssstyle/lib/properties.js +1674 -0
  50. node_modules/cssstyle/lib/properties/azimuth.js +64 -0
ROSÉ & Bruno Mars - APT. (Official Music Video).m4a ADDED
File without changes
app.py CHANGED
@@ -194,11 +194,13 @@ with gr.Blocks() as demo:
194
  )
195
 
196
  with gr.Tab("YouTube Audio"):
 
197
  with gr.Row():
198
  input_youtube_url = gr.Textbox(label="Input YouTube URL")
199
  reference_youtube_url = gr.Textbox(label="Reference YouTube URL")
200
 
201
  download_button = gr.Button("Download YouTube Audios")
 
202
 
203
  with gr.Row():
204
  input_audio_yt = gr.Audio(label="Source Audio (Do not put when using YouTube URL)")
@@ -213,8 +215,6 @@ with gr.Blocks() as demo:
213
  normalized_input_yt = gr.Audio(label="Normalized Source Audio", type='numpy')
214
  param_output_yt = gr.Textbox(label="Predicted Parameters", lines=5)
215
 
216
- error_message_yt = gr.Textbox(label="Error Message", visible=False)
217
-
218
  def handle_download_youtube_audios(input_youtube_url, reference_youtube_url):
219
  input_audio, reference_audio, input_error, reference_error = download_youtube_audios(input_youtube_url, reference_youtube_url)
220
  if input_error or reference_error:
 
194
  )
195
 
196
  with gr.Tab("YouTube Audio"):
197
+ gr.Markdown("Seems like it's currently unavailable to download YouTube clips from HuggingFace... But you could try out yourself in your environment with the available source code.")
198
  with gr.Row():
199
  input_youtube_url = gr.Textbox(label="Input YouTube URL")
200
  reference_youtube_url = gr.Textbox(label="Reference YouTube URL")
201
 
202
  download_button = gr.Button("Download YouTube Audios")
203
+ error_message_yt = gr.Textbox(label="Error Message", visible=False)
204
 
205
  with gr.Row():
206
  input_audio_yt = gr.Audio(label="Source Audio (Do not put when using YouTube URL)")
 
215
  normalized_input_yt = gr.Audio(label="Normalized Source Audio", type='numpy')
216
  param_output_yt = gr.Textbox(label="Predicted Parameters", lines=5)
217
 
 
 
218
  def handle_download_youtube_audios(input_youtube_url, reference_youtube_url):
219
  input_audio, reference_audio, input_error, reference_error = download_youtube_audios(input_youtube_url, reference_youtube_url)
220
  if input_error or reference_error:
node_modules/agent-base/LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2013 Nathan Rajlich <[email protected]>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/agent-base/README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ agent-base
2
+ ==========
3
+ ### Turn a function into an [`http.Agent`][http.Agent] instance
4
+
5
+ This module is a thin wrapper around the base `http.Agent` class.
6
+
7
+ It provides an abstract class that must define a `connect()` function,
8
+ which is responsible for creating the underlying socket that the HTTP
9
+ client requests will use.
10
+
11
+ The `connect()` function may return an arbitrary `Duplex` stream, or
12
+ another `http.Agent` instance to delegate the request to, and may be
13
+ asynchronous (by defining an `async` function).
14
+
15
+ Instances of this agent can be used with the `http` and `https`
16
+ modules. To differentiate, the options parameter in the `connect()`
17
+ function includes a `secureEndpoint` property, which can be checked
18
+ to determine what type of socket should be returned.
19
+
20
+ #### Some subclasses:
21
+
22
+ Here are some more interesting uses of `agent-base`.
23
+ Send a pull request to list yours!
24
+
25
+ * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
26
+ * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
27
+ * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
28
+ * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
29
+
30
+ Example
31
+ -------
32
+
33
+ Here's a minimal example that creates a new `net.Socket` or `tls.Socket`
34
+ based on the `secureEndpoint` property. This agent can be used with both
35
+ the `http` and `https` modules.
36
+
37
+ ```ts
38
+ import * as net from 'net';
39
+ import * as tls from 'tls';
40
+ import * as http from 'http';
41
+ import { Agent } from 'agent-base';
42
+
43
+ class MyAgent extends Agent {
44
+ connect(req, opts) {
45
+ // `secureEndpoint` is true when using the "https" module
46
+ if (opts.secureEndpoint) {
47
+ return tls.connect(opts);
48
+ } else {
49
+ return net.connect(opts);
50
+ }
51
+ }
52
+ });
53
+
54
+ // Keep alive enabled means that `connect()` will only be
55
+ // invoked when a new connection needs to be created
56
+ const agent = new MyAgent({ keepAlive: true });
57
+
58
+ // Pass the `agent` option when creating the HTTP request
59
+ http.get('http://nodejs.org/api/', { agent }, (res) => {
60
+ console.log('"response" event!', res.headers);
61
+ res.pipe(process.stdout);
62
+ });
63
+ ```
64
+
65
+ [http-proxy-agent]: ../http-proxy-agent
66
+ [https-proxy-agent]: ../https-proxy-agent
67
+ [pac-proxy-agent]: ../pac-proxy-agent
68
+ [socks-proxy-agent]: ../socks-proxy-agent
69
+ [http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
node_modules/agent-base/dist/helpers.d.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ /// <reference types="node" />
5
+ /// <reference types="node" />
6
+ import * as http from 'http';
7
+ import * as https from 'https';
8
+ import type { Readable } from 'stream';
9
+ export type ThenableRequest = http.ClientRequest & {
10
+ then: Promise<http.IncomingMessage>['then'];
11
+ };
12
+ export declare function toBuffer(stream: Readable): Promise<Buffer>;
13
+ export declare function json(stream: Readable): Promise<any>;
14
+ export declare function req(url: string | URL, opts?: https.RequestOptions): ThenableRequest;
15
+ //# sourceMappingURL=helpers.d.ts.map
node_modules/agent-base/dist/helpers.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,GAAG;IAClD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC;AAEF,wBAAsB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE;AAGD,wBAAsB,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAUzD;AAED,wBAAgB,GAAG,CAClB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,GAAE,KAAK,CAAC,cAAmB,GAC7B,eAAe,CAcjB"}
node_modules/agent-base/dist/helpers.js ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.req = exports.json = exports.toBuffer = void 0;
27
+ const http = __importStar(require("http"));
28
+ const https = __importStar(require("https"));
29
+ async function toBuffer(stream) {
30
+ let length = 0;
31
+ const chunks = [];
32
+ for await (const chunk of stream) {
33
+ length += chunk.length;
34
+ chunks.push(chunk);
35
+ }
36
+ return Buffer.concat(chunks, length);
37
+ }
38
+ exports.toBuffer = toBuffer;
39
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
+ async function json(stream) {
41
+ const buf = await toBuffer(stream);
42
+ const str = buf.toString('utf8');
43
+ try {
44
+ return JSON.parse(str);
45
+ }
46
+ catch (_err) {
47
+ const err = _err;
48
+ err.message += ` (input: ${str})`;
49
+ throw err;
50
+ }
51
+ }
52
+ exports.json = json;
53
+ function req(url, opts = {}) {
54
+ const href = typeof url === 'string' ? url : url.href;
55
+ const req = (href.startsWith('https:') ? https : http).request(url, opts);
56
+ const promise = new Promise((resolve, reject) => {
57
+ req
58
+ .once('response', resolve)
59
+ .once('error', reject)
60
+ .end();
61
+ });
62
+ req.then = promise.then.bind(promise);
63
+ return req;
64
+ }
65
+ exports.req = req;
66
+ //# sourceMappingURL=helpers.js.map
node_modules/agent-base/dist/helpers.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,6CAA+B;AAOxB,KAAK,UAAU,QAAQ,CAAC,MAAgB;IAC9C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,MAAM,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;QACvB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnB;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACtC,CAAC;AARD,4BAQC;AAED,8DAA8D;AACvD,KAAK,UAAU,IAAI,CAAC,MAAgB;IAC1C,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KACvB;IAAC,OAAO,IAAa,EAAE;QACvB,MAAM,GAAG,GAAG,IAAa,CAAC;QAC1B,GAAG,CAAC,OAAO,IAAI,YAAY,GAAG,GAAG,CAAC;QAClC,MAAM,GAAG,CAAC;KACV;AACF,CAAC;AAVD,oBAUC;AAED,SAAgB,GAAG,CAClB,GAAiB,EACjB,OAA6B,EAAE;IAE/B,MAAM,IAAI,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACtD,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAC7D,GAAG,EACH,IAAI,CACe,CAAC;IACrB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrE,GAAG;aACD,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;aACzB,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;aACrB,GAAG,EAAqB,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,GAAG,CAAC;AACZ,CAAC;AAjBD,kBAiBC"}
node_modules/agent-base/dist/index.d.ts ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ /// <reference types="node" />
5
+ import * as net from 'net';
6
+ import * as tls from 'tls';
7
+ import * as http from 'http';
8
+ import type { Duplex } from 'stream';
9
+ export * from './helpers';
10
+ interface HttpConnectOpts extends net.TcpNetConnectOpts {
11
+ secureEndpoint: false;
12
+ protocol?: string;
13
+ }
14
+ interface HttpsConnectOpts extends tls.ConnectionOptions {
15
+ secureEndpoint: true;
16
+ protocol?: string;
17
+ port: number;
18
+ }
19
+ export type AgentConnectOpts = HttpConnectOpts | HttpsConnectOpts;
20
+ declare const INTERNAL: unique symbol;
21
+ export declare abstract class Agent extends http.Agent {
22
+ private [INTERNAL];
23
+ options: Partial<net.TcpNetConnectOpts & tls.ConnectionOptions>;
24
+ keepAlive: boolean;
25
+ constructor(opts?: http.AgentOptions);
26
+ abstract connect(req: http.ClientRequest, options: AgentConnectOpts): Promise<Duplex | http.Agent> | Duplex | http.Agent;
27
+ /**
28
+ * Determine whether this is an `http` or `https` request.
29
+ */
30
+ isSecureEndpoint(options?: AgentConnectOpts): boolean;
31
+ private incrementSockets;
32
+ private decrementSockets;
33
+ getName(options: AgentConnectOpts): string;
34
+ createSocket(req: http.ClientRequest, options: AgentConnectOpts, cb: (err: Error | null, s?: Duplex) => void): void;
35
+ createConnection(): Duplex;
36
+ get defaultPort(): number;
37
+ set defaultPort(v: number);
38
+ get protocol(): string;
39
+ set protocol(v: string);
40
+ }
41
+ //# sourceMappingURL=index.d.ts.map
node_modules/agent-base/dist/index.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,cAAc,WAAW,CAAC;AAE1B,UAAU,eAAgB,SAAQ,GAAG,CAAC,iBAAiB;IACtD,cAAc,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,gBAAiB,SAAQ,GAAG,CAAC,iBAAiB;IACvD,cAAc,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAElE,QAAA,MAAM,QAAQ,eAAmC,CAAC;AAQlD,8BAAsB,KAAM,SAAQ,IAAI,CAAC,KAAK;IAC7C,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAgB;IAGlC,OAAO,EAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACjE,SAAS,EAAG,OAAO,CAAC;gBAER,IAAI,CAAC,EAAE,IAAI,CAAC,YAAY;IAKpC,QAAQ,CAAC,OAAO,CACf,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,OAAO,EAAE,gBAAgB,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC,KAAK;IAErD;;OAEG;IACH,gBAAgB,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO;IAqCrD,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM;IAa1C,YAAY,CACX,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,OAAO,EAAE,gBAAgB,EACzB,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;IA4B5C,gBAAgB,IAAI,MAAM;IAW1B,IAAI,WAAW,IAAI,MAAM,CAKxB;IAED,IAAI,WAAW,CAAC,CAAC,EAAE,MAAM,EAIxB;IAED,IAAI,QAAQ,IAAI,MAAM,CAKrB;IAED,IAAI,QAAQ,CAAC,CAAC,EAAE,MAAM,EAIrB;CACD"}
node_modules/agent-base/dist/index.js ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Agent = void 0;
30
+ const net = __importStar(require("net"));
31
+ const http = __importStar(require("http"));
32
+ const https_1 = require("https");
33
+ __exportStar(require("./helpers"), exports);
34
+ const INTERNAL = Symbol('AgentBaseInternalState');
35
+ class Agent extends http.Agent {
36
+ constructor(opts) {
37
+ super(opts);
38
+ this[INTERNAL] = {};
39
+ }
40
+ /**
41
+ * Determine whether this is an `http` or `https` request.
42
+ */
43
+ isSecureEndpoint(options) {
44
+ if (options) {
45
+ // First check the `secureEndpoint` property explicitly, since this
46
+ // means that a parent `Agent` is "passing through" to this instance.
47
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
+ if (typeof options.secureEndpoint === 'boolean') {
49
+ return options.secureEndpoint;
50
+ }
51
+ // If no explicit `secure` endpoint, check if `protocol` property is
52
+ // set. This will usually be the case since using a full string URL
53
+ // or `URL` instance should be the most common usage.
54
+ if (typeof options.protocol === 'string') {
55
+ return options.protocol === 'https:';
56
+ }
57
+ }
58
+ // Finally, if no `protocol` property was set, then fall back to
59
+ // checking the stack trace of the current call stack, and try to
60
+ // detect the "https" module.
61
+ const { stack } = new Error();
62
+ if (typeof stack !== 'string')
63
+ return false;
64
+ return stack
65
+ .split('\n')
66
+ .some((l) => l.indexOf('(https.js:') !== -1 ||
67
+ l.indexOf('node:https:') !== -1);
68
+ }
69
+ // In order to support async signatures in `connect()` and Node's native
70
+ // connection pooling in `http.Agent`, the array of sockets for each origin
71
+ // has to be updated synchronously. This is so the length of the array is
72
+ // accurate when `addRequest()` is next called. We achieve this by creating a
73
+ // fake socket and adding it to `sockets[origin]` and incrementing
74
+ // `totalSocketCount`.
75
+ incrementSockets(name) {
76
+ // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no
77
+ // need to create a fake socket because Node.js native connection pooling
78
+ // will never be invoked.
79
+ if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
80
+ return null;
81
+ }
82
+ // All instances of `sockets` are expected TypeScript errors. The
83
+ // alternative is to add it as a private property of this class but that
84
+ // will break TypeScript subclassing.
85
+ if (!this.sockets[name]) {
86
+ // @ts-expect-error `sockets` is readonly in `@types/node`
87
+ this.sockets[name] = [];
88
+ }
89
+ const fakeSocket = new net.Socket({ writable: false });
90
+ this.sockets[name].push(fakeSocket);
91
+ // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
92
+ this.totalSocketCount++;
93
+ return fakeSocket;
94
+ }
95
+ decrementSockets(name, socket) {
96
+ if (!this.sockets[name] || socket === null) {
97
+ return;
98
+ }
99
+ const sockets = this.sockets[name];
100
+ const index = sockets.indexOf(socket);
101
+ if (index !== -1) {
102
+ sockets.splice(index, 1);
103
+ // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
104
+ this.totalSocketCount--;
105
+ if (sockets.length === 0) {
106
+ // @ts-expect-error `sockets` is readonly in `@types/node`
107
+ delete this.sockets[name];
108
+ }
109
+ }
110
+ }
111
+ // In order to properly update the socket pool, we need to call `getName()` on
112
+ // the core `https.Agent` if it is a secureEndpoint.
113
+ getName(options) {
114
+ const secureEndpoint = typeof options.secureEndpoint === 'boolean'
115
+ ? options.secureEndpoint
116
+ : this.isSecureEndpoint(options);
117
+ if (secureEndpoint) {
118
+ // @ts-expect-error `getName()` isn't defined in `@types/node`
119
+ return https_1.Agent.prototype.getName.call(this, options);
120
+ }
121
+ // @ts-expect-error `getName()` isn't defined in `@types/node`
122
+ return super.getName(options);
123
+ }
124
+ createSocket(req, options, cb) {
125
+ const connectOpts = {
126
+ ...options,
127
+ secureEndpoint: this.isSecureEndpoint(options),
128
+ };
129
+ const name = this.getName(connectOpts);
130
+ const fakeSocket = this.incrementSockets(name);
131
+ Promise.resolve()
132
+ .then(() => this.connect(req, connectOpts))
133
+ .then((socket) => {
134
+ this.decrementSockets(name, fakeSocket);
135
+ if (socket instanceof http.Agent) {
136
+ // @ts-expect-error `addRequest()` isn't defined in `@types/node`
137
+ return socket.addRequest(req, connectOpts);
138
+ }
139
+ this[INTERNAL].currentSocket = socket;
140
+ // @ts-expect-error `createSocket()` isn't defined in `@types/node`
141
+ super.createSocket(req, options, cb);
142
+ }, (err) => {
143
+ this.decrementSockets(name, fakeSocket);
144
+ cb(err);
145
+ });
146
+ }
147
+ createConnection() {
148
+ const socket = this[INTERNAL].currentSocket;
149
+ this[INTERNAL].currentSocket = undefined;
150
+ if (!socket) {
151
+ throw new Error('No socket was returned in the `connect()` function');
152
+ }
153
+ return socket;
154
+ }
155
+ get defaultPort() {
156
+ return (this[INTERNAL].defaultPort ??
157
+ (this.protocol === 'https:' ? 443 : 80));
158
+ }
159
+ set defaultPort(v) {
160
+ if (this[INTERNAL]) {
161
+ this[INTERNAL].defaultPort = v;
162
+ }
163
+ }
164
+ get protocol() {
165
+ return (this[INTERNAL].protocol ??
166
+ (this.isSecureEndpoint() ? 'https:' : 'http:'));
167
+ }
168
+ set protocol(v) {
169
+ if (this[INTERNAL]) {
170
+ this[INTERNAL].protocol = v;
171
+ }
172
+ }
173
+ }
174
+ exports.Agent = Agent;
175
+ //# sourceMappingURL=index.js.map
node_modules/agent-base/dist/index.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,2CAA6B;AAC7B,iCAA4C;AAG5C,4CAA0B;AAe1B,MAAM,QAAQ,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAQlD,MAAsB,KAAM,SAAQ,IAAI,CAAC,KAAK;IAO7C,YAAY,IAAwB;QACnC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;IACrB,CAAC;IAOD;;OAEG;IACH,gBAAgB,CAAC,OAA0B;QAC1C,IAAI,OAAO,EAAE;YACZ,mEAAmE;YACnE,qEAAqE;YACrE,8DAA8D;YAC9D,IAAI,OAAQ,OAAe,CAAC,cAAc,KAAK,SAAS,EAAE;gBACzD,OAAO,OAAO,CAAC,cAAc,CAAC;aAC9B;YAED,oEAAoE;YACpE,mEAAmE;YACnE,qDAAqD;YACrD,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBACzC,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC;aACrC;SACD;QAED,gEAAgE;QAChE,iEAAiE;QACjE,6BAA6B;QAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,CAAC;QAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAC5C,OAAO,KAAK;aACV,KAAK,CAAC,IAAI,CAAC;aACX,IAAI,CACJ,CAAC,CAAC,EAAE,EAAE,CACL,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAC9B,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAChC,CAAC;IACJ,CAAC;IAED,wEAAwE;IACxE,2EAA2E;IAC3E,yEAAyE;IACzE,6EAA6E;IAC7E,kEAAkE;IAClE,sBAAsB;IACd,gBAAgB,CAAC,IAAY;QACpC,2EAA2E;QAC3E,yEAAyE;QACzE,yBAAyB;QACzB,IAAI,IAAI,CAAC,UAAU,KAAK,QAAQ,IAAI,IAAI,CAAC,eAAe,KAAK,QAAQ,EAAE;YACtE,OAAO,IAAI,CAAC;SACZ;QACD,iEAAiE;QACjE,wEAAwE;QACxE,qCAAqC;QACrC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACxB,0DAA0D;YAC1D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;SACxB;QACD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtD,qEAAqE;QACrE,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,OAAO,UAAU,CAAC;IACnB,CAAC;IAEO,gBAAgB,CAAC,IAAY,EAAE,MAAyB;QAC/D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,MAAM,KAAK,IAAI,EAAE;YAC3C,OAAO;SACP;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAiB,CAAC;QACnD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YACjB,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACzB,sEAAsE;YACtE,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACzB,0DAA0D;gBAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aAC1B;SACD;IACF,CAAC;IAED,8EAA8E;IAC9E,oDAAoD;IACpD,OAAO,CAAC,OAAyB;QAChC,MAAM,cAAc,GACnB,OAAO,OAAO,CAAC,cAAc,KAAK,SAAS;YAC1C,CAAC,CAAC,OAAO,CAAC,cAAc;YACxB,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,cAAc,EAAE;YACnB,8DAA8D;YAC9D,OAAO,aAAU,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACxD;QACD,8DAA8D;QAC9D,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,YAAY,CACX,GAAuB,EACvB,OAAyB,EACzB,EAA2C;QAE3C,MAAM,WAAW,GAAG;YACnB,GAAG,OAAO;YACV,cAAc,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;SAC9C,CAAC;QACF,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACvC,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC/C,OAAO,CAAC,OAAO,EAAE;aACf,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;aAC1C,IAAI,CACJ,CAAC,MAAM,EAAE,EAAE;YACV,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YACxC,IAAI,MAAM,YAAY,IAAI,CAAC,KAAK,EAAE;gBACjC,iEAAiE;gBACjE,OAAO,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;aAC3C;YACD,IAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,GAAG,MAAM,CAAC;YACtC,mEAAmE;YACnE,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACP,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YACxC,EAAE,CAAC,GAAG,CAAC,CAAC;QACT,CAAC,CACD,CAAC;IACJ,CAAC;IAED,gBAAgB;QACf,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC;QAC5C,IAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,MAAM,EAAE;YACZ,MAAM,IAAI,KAAK,CACd,oDAAoD,CACpD,CAAC;SACF;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,IAAI,WAAW;QACd,OAAO,CACN,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW;YAC1B,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CACvC,CAAC;IACH,CAAC;IAED,IAAI,WAAW,CAAC,CAAS;QACxB,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE;YACnB,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC;SAC/B;IACF,CAAC;IAED,IAAI,QAAQ;QACX,OAAO,CACN,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ;YACvB,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAC9C,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,CAAC,CAAS;QACrB,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE;YACnB,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC;SAC5B;IACF,CAAC;CACD;AAjLD,sBAiLC"}
node_modules/agent-base/package.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from": "agent-base@^7.1.0",
3
+ "_id": "[email protected]",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
6
+ "_location": "/agent-base",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "agent-base@^7.1.0",
12
+ "name": "agent-base",
13
+ "escapedName": "agent-base",
14
+ "rawSpec": "^7.1.0",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^7.1.0"
17
+ },
18
+ "_requiredBy": [
19
+ "/http-proxy-agent",
20
+ "/https-proxy-agent"
21
+ ],
22
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
23
+ "_shasum": "bdbded7dfb096b751a2a087eeeb9664725b2e317",
24
+ "_spec": "agent-base@^7.1.0",
25
+ "_where": "/home/tony/mastering_transfer/ITO-Master/node_modules/http-proxy-agent",
26
+ "author": {
27
+ "name": "Nathan Rajlich",
28
+ "email": "[email protected]",
29
+ "url": "http://n8.io/"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/TooTallNate/proxy-agents/issues"
33
+ },
34
+ "bundleDependencies": false,
35
+ "dependencies": {
36
+ "debug": "^4.3.4"
37
+ },
38
+ "deprecated": false,
39
+ "description": "Turn a function into an `http.Agent` instance",
40
+ "devDependencies": {
41
+ "@types/debug": "^4.1.7",
42
+ "@types/jest": "^29.5.1",
43
+ "@types/node": "^14.18.45",
44
+ "@types/semver": "^7.3.13",
45
+ "@types/ws": "^6.0.4",
46
+ "async-listen": "^3.0.0",
47
+ "jest": "^29.5.0",
48
+ "ts-jest": "^29.1.0",
49
+ "tsconfig": "0.0.0",
50
+ "typescript": "^5.0.4",
51
+ "ws": "^3.3.3"
52
+ },
53
+ "engines": {
54
+ "node": ">= 14"
55
+ },
56
+ "files": [
57
+ "dist"
58
+ ],
59
+ "homepage": "https://github.com/TooTallNate/proxy-agents#readme",
60
+ "keywords": [
61
+ "http",
62
+ "agent",
63
+ "base",
64
+ "barebones",
65
+ "https"
66
+ ],
67
+ "license": "MIT",
68
+ "main": "./dist/index.js",
69
+ "name": "agent-base",
70
+ "repository": {
71
+ "type": "git",
72
+ "url": "git+https://github.com/TooTallNate/proxy-agents.git",
73
+ "directory": "packages/agent-base"
74
+ },
75
+ "scripts": {
76
+ "build": "tsc",
77
+ "lint": "eslint . --ext .ts",
78
+ "pack": "node ../../scripts/pack.mjs",
79
+ "test": "jest --env node --verbose --bail"
80
+ },
81
+ "types": "./dist/index.d.ts",
82
+ "version": "7.1.1"
83
+ }
node_modules/asynckit/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Alex Indigo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
node_modules/asynckit/README.md ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit)
2
+
3
+ Minimal async jobs utility library, with streams support.
4
+
5
+ [![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit)
6
+ [![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit)
7
+ [![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit)
8
+
9
+ [![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master)
10
+ [![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit)
11
+ [![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit)
12
+
13
+ <!-- [![Readme](https://img.shields.io/badge/readme-tested-brightgreen.svg?style=flat)](https://www.npmjs.com/package/reamde) -->
14
+
15
+ AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.
16
+ Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method.
17
+
18
+ It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators.
19
+
20
+ | compression | size |
21
+ | :----------------- | -------: |
22
+ | asynckit.js | 12.34 kB |
23
+ | asynckit.min.js | 4.11 kB |
24
+ | asynckit.min.js.gz | 1.47 kB |
25
+
26
+
27
+ ## Install
28
+
29
+ ```sh
30
+ $ npm install --save asynckit
31
+ ```
32
+
33
+ ## Examples
34
+
35
+ ### Parallel Jobs
36
+
37
+ Runs iterator over provided array in parallel. Stores output in the `result` array,
38
+ on the matching positions. In unlikely event of an error from one of the jobs,
39
+ will terminate rest of the active jobs (if abort function is provided)
40
+ and return error along with salvaged data to the main callback function.
41
+
42
+ #### Input Array
43
+
44
+ ```javascript
45
+ var parallel = require('asynckit').parallel
46
+ , assert = require('assert')
47
+ ;
48
+
49
+ var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
50
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
51
+ , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
52
+ , target = []
53
+ ;
54
+
55
+ parallel(source, asyncJob, function(err, result)
56
+ {
57
+ assert.deepEqual(result, expectedResult);
58
+ assert.deepEqual(target, expectedTarget);
59
+ });
60
+
61
+ // async job accepts one element from the array
62
+ // and a callback function
63
+ function asyncJob(item, cb)
64
+ {
65
+ // different delays (in ms) per item
66
+ var delay = item * 25;
67
+
68
+ // pretend different jobs take different time to finish
69
+ // and not in consequential order
70
+ var timeoutId = setTimeout(function() {
71
+ target.push(item);
72
+ cb(null, item * 2);
73
+ }, delay);
74
+
75
+ // allow to cancel "leftover" jobs upon error
76
+ // return function, invoking of which will abort this job
77
+ return clearTimeout.bind(null, timeoutId);
78
+ }
79
+ ```
80
+
81
+ More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js).
82
+
83
+ #### Input Object
84
+
85
+ Also it supports named jobs, listed via object.
86
+
87
+ ```javascript
88
+ var parallel = require('asynckit/parallel')
89
+ , assert = require('assert')
90
+ ;
91
+
92
+ var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
93
+ , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
94
+ , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
95
+ , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ]
96
+ , target = []
97
+ , keys = []
98
+ ;
99
+
100
+ parallel(source, asyncJob, function(err, result)
101
+ {
102
+ assert.deepEqual(result, expectedResult);
103
+ assert.deepEqual(target, expectedTarget);
104
+ assert.deepEqual(keys, expectedKeys);
105
+ });
106
+
107
+ // supports full value, key, callback (shortcut) interface
108
+ function asyncJob(item, key, cb)
109
+ {
110
+ // different delays (in ms) per item
111
+ var delay = item * 25;
112
+
113
+ // pretend different jobs take different time to finish
114
+ // and not in consequential order
115
+ var timeoutId = setTimeout(function() {
116
+ keys.push(key);
117
+ target.push(item);
118
+ cb(null, item * 2);
119
+ }, delay);
120
+
121
+ // allow to cancel "leftover" jobs upon error
122
+ // return function, invoking of which will abort this job
123
+ return clearTimeout.bind(null, timeoutId);
124
+ }
125
+ ```
126
+
127
+ More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js).
128
+
129
+ ### Serial Jobs
130
+
131
+ Runs iterator over provided array sequentially. Stores output in the `result` array,
132
+ on the matching positions. In unlikely event of an error from one of the jobs,
133
+ will not proceed to the rest of the items in the list
134
+ and return error along with salvaged data to the main callback function.
135
+
136
+ #### Input Array
137
+
138
+ ```javascript
139
+ var serial = require('asynckit/serial')
140
+ , assert = require('assert')
141
+ ;
142
+
143
+ var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
144
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
145
+ , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
146
+ , target = []
147
+ ;
148
+
149
+ serial(source, asyncJob, function(err, result)
150
+ {
151
+ assert.deepEqual(result, expectedResult);
152
+ assert.deepEqual(target, expectedTarget);
153
+ });
154
+
155
+ // extended interface (item, key, callback)
156
+ // also supported for arrays
157
+ function asyncJob(item, key, cb)
158
+ {
159
+ target.push(key);
160
+
161
+ // it will be automatically made async
162
+ // even it iterator "returns" in the same event loop
163
+ cb(null, item * 2);
164
+ }
165
+ ```
166
+
167
+ More examples could be found in [test/test-serial-array.js](test/test-serial-array.js).
168
+
169
+ #### Input Object
170
+
171
+ Also it supports named jobs, listed via object.
172
+
173
+ ```javascript
174
+ var serial = require('asynckit').serial
175
+ , assert = require('assert')
176
+ ;
177
+
178
+ var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
179
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
180
+ , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
181
+ , target = []
182
+ ;
183
+
184
+ var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
185
+ , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
186
+ , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
187
+ , target = []
188
+ ;
189
+
190
+
191
+ serial(source, asyncJob, function(err, result)
192
+ {
193
+ assert.deepEqual(result, expectedResult);
194
+ assert.deepEqual(target, expectedTarget);
195
+ });
196
+
197
+ // shortcut interface (item, callback)
198
+ // works for object as well as for the arrays
199
+ function asyncJob(item, cb)
200
+ {
201
+ target.push(item);
202
+
203
+ // it will be automatically made async
204
+ // even it iterator "returns" in the same event loop
205
+ cb(null, item * 2);
206
+ }
207
+ ```
208
+
209
+ More examples could be found in [test/test-serial-object.js](test/test-serial-object.js).
210
+
211
+ _Note: Since _object_ is an _unordered_ collection of properties,
212
+ it may produce unexpected results with sequential iterations.
213
+ Whenever order of the jobs' execution is important please use `serialOrdered` method._
214
+
215
+ ### Ordered Serial Iterations
216
+
217
+ TBD
218
+
219
+ For example [compare-property](compare-property) package.
220
+
221
+ ### Streaming interface
222
+
223
+ TBD
224
+
225
+ ## Want to Know More?
226
+
227
+ More examples can be found in [test folder](test/).
228
+
229
+ Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions.
230
+
231
+ ## License
232
+
233
+ AsyncKit is licensed under the MIT license.
node_modules/asynckit/bench.js ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* eslint no-console: "off" */
2
+
3
+ var asynckit = require('./')
4
+ , async = require('async')
5
+ , assert = require('assert')
6
+ , expected = 0
7
+ ;
8
+
9
+ var Benchmark = require('benchmark');
10
+ var suite = new Benchmark.Suite;
11
+
12
+ var source = [];
13
+ for (var z = 1; z < 100; z++)
14
+ {
15
+ source.push(z);
16
+ expected += z;
17
+ }
18
+
19
+ suite
20
+ // add tests
21
+
22
+ .add('async.map', function(deferred)
23
+ {
24
+ var total = 0;
25
+
26
+ async.map(source,
27
+ function(i, cb)
28
+ {
29
+ setImmediate(function()
30
+ {
31
+ total += i;
32
+ cb(null, total);
33
+ });
34
+ },
35
+ function(err, result)
36
+ {
37
+ assert.ifError(err);
38
+ assert.equal(result[result.length - 1], expected);
39
+ deferred.resolve();
40
+ });
41
+ }, {'defer': true})
42
+
43
+
44
+ .add('asynckit.parallel', function(deferred)
45
+ {
46
+ var total = 0;
47
+
48
+ asynckit.parallel(source,
49
+ function(i, cb)
50
+ {
51
+ setImmediate(function()
52
+ {
53
+ total += i;
54
+ cb(null, total);
55
+ });
56
+ },
57
+ function(err, result)
58
+ {
59
+ assert.ifError(err);
60
+ assert.equal(result[result.length - 1], expected);
61
+ deferred.resolve();
62
+ });
63
+ }, {'defer': true})
64
+
65
+
66
+ // add listeners
67
+ .on('cycle', function(ev)
68
+ {
69
+ console.log(String(ev.target));
70
+ })
71
+ .on('complete', function()
72
+ {
73
+ console.log('Fastest is ' + this.filter('fastest').map('name'));
74
+ })
75
+ // run async
76
+ .run({ 'async': true });
node_modules/asynckit/index.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ module.exports =
2
+ {
3
+ parallel : require('./parallel.js'),
4
+ serial : require('./serial.js'),
5
+ serialOrdered : require('./serialOrdered.js')
6
+ };
node_modules/asynckit/lib/abort.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // API
2
+ module.exports = abort;
3
+
4
+ /**
5
+ * Aborts leftover active jobs
6
+ *
7
+ * @param {object} state - current state object
8
+ */
9
+ function abort(state)
10
+ {
11
+ Object.keys(state.jobs).forEach(clean.bind(state));
12
+
13
+ // reset leftover jobs
14
+ state.jobs = {};
15
+ }
16
+
17
+ /**
18
+ * Cleans up leftover job by invoking abort function for the provided job id
19
+ *
20
+ * @this state
21
+ * @param {string|number} key - job id to abort
22
+ */
23
+ function clean(key)
24
+ {
25
+ if (typeof this.jobs[key] == 'function')
26
+ {
27
+ this.jobs[key]();
28
+ }
29
+ }
node_modules/asynckit/lib/async.js ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var defer = require('./defer.js');
2
+
3
+ // API
4
+ module.exports = async;
5
+
6
+ /**
7
+ * Runs provided callback asynchronously
8
+ * even if callback itself is not
9
+ *
10
+ * @param {function} callback - callback to invoke
11
+ * @returns {function} - augmented callback
12
+ */
13
+ function async(callback)
14
+ {
15
+ var isAsync = false;
16
+
17
+ // check if async happened
18
+ defer(function() { isAsync = true; });
19
+
20
+ return function async_callback(err, result)
21
+ {
22
+ if (isAsync)
23
+ {
24
+ callback(err, result);
25
+ }
26
+ else
27
+ {
28
+ defer(function nextTick_callback()
29
+ {
30
+ callback(err, result);
31
+ });
32
+ }
33
+ };
34
+ }
node_modules/asynckit/lib/defer.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ module.exports = defer;
2
+
3
+ /**
4
+ * Runs provided function on next iteration of the event loop
5
+ *
6
+ * @param {function} fn - function to run
7
+ */
8
+ function defer(fn)
9
+ {
10
+ var nextTick = typeof setImmediate == 'function'
11
+ ? setImmediate
12
+ : (
13
+ typeof process == 'object' && typeof process.nextTick == 'function'
14
+ ? process.nextTick
15
+ : null
16
+ );
17
+
18
+ if (nextTick)
19
+ {
20
+ nextTick(fn);
21
+ }
22
+ else
23
+ {
24
+ setTimeout(fn, 0);
25
+ }
26
+ }
node_modules/asynckit/lib/iterate.js ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var async = require('./async.js')
2
+ , abort = require('./abort.js')
3
+ ;
4
+
5
+ // API
6
+ module.exports = iterate;
7
+
8
+ /**
9
+ * Iterates over each job object
10
+ *
11
+ * @param {array|object} list - array or object (named list) to iterate over
12
+ * @param {function} iterator - iterator to run
13
+ * @param {object} state - current job status
14
+ * @param {function} callback - invoked when all elements processed
15
+ */
16
+ function iterate(list, iterator, state, callback)
17
+ {
18
+ // store current index
19
+ var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;
20
+
21
+ state.jobs[key] = runJob(iterator, key, list[key], function(error, output)
22
+ {
23
+ // don't repeat yourself
24
+ // skip secondary callbacks
25
+ if (!(key in state.jobs))
26
+ {
27
+ return;
28
+ }
29
+
30
+ // clean up jobs
31
+ delete state.jobs[key];
32
+
33
+ if (error)
34
+ {
35
+ // don't process rest of the results
36
+ // stop still active jobs
37
+ // and reset the list
38
+ abort(state);
39
+ }
40
+ else
41
+ {
42
+ state.results[key] = output;
43
+ }
44
+
45
+ // return salvaged results
46
+ callback(error, state.results);
47
+ });
48
+ }
49
+
50
+ /**
51
+ * Runs iterator over provided job element
52
+ *
53
+ * @param {function} iterator - iterator to invoke
54
+ * @param {string|number} key - key/index of the element in the list of jobs
55
+ * @param {mixed} item - job description
56
+ * @param {function} callback - invoked after iterator is done with the job
57
+ * @returns {function|mixed} - job abort function or something else
58
+ */
59
+ function runJob(iterator, key, item, callback)
60
+ {
61
+ var aborter;
62
+
63
+ // allow shortcut if iterator expects only two arguments
64
+ if (iterator.length == 2)
65
+ {
66
+ aborter = iterator(item, async(callback));
67
+ }
68
+ // otherwise go with full three arguments
69
+ else
70
+ {
71
+ aborter = iterator(item, key, async(callback));
72
+ }
73
+
74
+ return aborter;
75
+ }
node_modules/asynckit/lib/readable_asynckit.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var streamify = require('./streamify.js')
2
+ , defer = require('./defer.js')
3
+ ;
4
+
5
+ // API
6
+ module.exports = ReadableAsyncKit;
7
+
8
+ /**
9
+ * Base constructor for all streams
10
+ * used to hold properties/methods
11
+ */
12
+ function ReadableAsyncKit()
13
+ {
14
+ ReadableAsyncKit.super_.apply(this, arguments);
15
+
16
+ // list of active jobs
17
+ this.jobs = {};
18
+
19
+ // add stream methods
20
+ this.destroy = destroy;
21
+ this._start = _start;
22
+ this._read = _read;
23
+ }
24
+
25
+ /**
26
+ * Destroys readable stream,
27
+ * by aborting outstanding jobs
28
+ *
29
+ * @returns {void}
30
+ */
31
+ function destroy()
32
+ {
33
+ if (this.destroyed)
34
+ {
35
+ return;
36
+ }
37
+
38
+ this.destroyed = true;
39
+
40
+ if (typeof this.terminator == 'function')
41
+ {
42
+ this.terminator();
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Starts provided jobs in async manner
48
+ *
49
+ * @private
50
+ */
51
+ function _start()
52
+ {
53
+ // first argument – runner function
54
+ var runner = arguments[0]
55
+ // take away first argument
56
+ , args = Array.prototype.slice.call(arguments, 1)
57
+ // second argument - input data
58
+ , input = args[0]
59
+ // last argument - result callback
60
+ , endCb = streamify.callback.call(this, args[args.length - 1])
61
+ ;
62
+
63
+ args[args.length - 1] = endCb;
64
+ // third argument - iterator
65
+ args[1] = streamify.iterator.call(this, args[1]);
66
+
67
+ // allow time for proper setup
68
+ defer(function()
69
+ {
70
+ if (!this.destroyed)
71
+ {
72
+ this.terminator = runner.apply(null, args);
73
+ }
74
+ else
75
+ {
76
+ endCb(null, Array.isArray(input) ? [] : {});
77
+ }
78
+ }.bind(this));
79
+ }
80
+
81
+
82
+ /**
83
+ * Implement _read to comply with Readable streams
84
+ * Doesn't really make sense for flowing object mode
85
+ *
86
+ * @private
87
+ */
88
+ function _read()
89
+ {
90
+
91
+ }
node_modules/asynckit/lib/readable_parallel.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var parallel = require('../parallel.js');
2
+
3
+ // API
4
+ module.exports = ReadableParallel;
5
+
6
+ /**
7
+ * Streaming wrapper to `asynckit.parallel`
8
+ *
9
+ * @param {array|object} list - array or object (named list) to iterate over
10
+ * @param {function} iterator - iterator to run
11
+ * @param {function} callback - invoked when all elements processed
12
+ * @returns {stream.Readable#}
13
+ */
14
+ function ReadableParallel(list, iterator, callback)
15
+ {
16
+ if (!(this instanceof ReadableParallel))
17
+ {
18
+ return new ReadableParallel(list, iterator, callback);
19
+ }
20
+
21
+ // turn on object mode
22
+ ReadableParallel.super_.call(this, {objectMode: true});
23
+
24
+ this._start(parallel, list, iterator, callback);
25
+ }
node_modules/asynckit/lib/readable_serial.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var serial = require('../serial.js');
2
+
3
+ // API
4
+ module.exports = ReadableSerial;
5
+
6
+ /**
7
+ * Streaming wrapper to `asynckit.serial`
8
+ *
9
+ * @param {array|object} list - array or object (named list) to iterate over
10
+ * @param {function} iterator - iterator to run
11
+ * @param {function} callback - invoked when all elements processed
12
+ * @returns {stream.Readable#}
13
+ */
14
+ function ReadableSerial(list, iterator, callback)
15
+ {
16
+ if (!(this instanceof ReadableSerial))
17
+ {
18
+ return new ReadableSerial(list, iterator, callback);
19
+ }
20
+
21
+ // turn on object mode
22
+ ReadableSerial.super_.call(this, {objectMode: true});
23
+
24
+ this._start(serial, list, iterator, callback);
25
+ }
node_modules/asynckit/lib/readable_serial_ordered.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var serialOrdered = require('../serialOrdered.js');
2
+
3
+ // API
4
+ module.exports = ReadableSerialOrdered;
5
+ // expose sort helpers
6
+ module.exports.ascending = serialOrdered.ascending;
7
+ module.exports.descending = serialOrdered.descending;
8
+
9
+ /**
10
+ * Streaming wrapper to `asynckit.serialOrdered`
11
+ *
12
+ * @param {array|object} list - array or object (named list) to iterate over
13
+ * @param {function} iterator - iterator to run
14
+ * @param {function} sortMethod - custom sort function
15
+ * @param {function} callback - invoked when all elements processed
16
+ * @returns {stream.Readable#}
17
+ */
18
+ function ReadableSerialOrdered(list, iterator, sortMethod, callback)
19
+ {
20
+ if (!(this instanceof ReadableSerialOrdered))
21
+ {
22
+ return new ReadableSerialOrdered(list, iterator, sortMethod, callback);
23
+ }
24
+
25
+ // turn on object mode
26
+ ReadableSerialOrdered.super_.call(this, {objectMode: true});
27
+
28
+ this._start(serialOrdered, list, iterator, sortMethod, callback);
29
+ }
node_modules/asynckit/lib/state.js ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // API
2
+ module.exports = state;
3
+
4
+ /**
5
+ * Creates initial state object
6
+ * for iteration over list
7
+ *
8
+ * @param {array|object} list - list to iterate over
9
+ * @param {function|null} sortMethod - function to use for keys sort,
10
+ * or `null` to keep them as is
11
+ * @returns {object} - initial state object
12
+ */
13
+ function state(list, sortMethod)
14
+ {
15
+ var isNamedList = !Array.isArray(list)
16
+ , initState =
17
+ {
18
+ index : 0,
19
+ keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
20
+ jobs : {},
21
+ results : isNamedList ? {} : [],
22
+ size : isNamedList ? Object.keys(list).length : list.length
23
+ }
24
+ ;
25
+
26
+ if (sortMethod)
27
+ {
28
+ // sort array keys based on it's values
29
+ // sort object's keys just on own merit
30
+ initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
31
+ {
32
+ return sortMethod(list[a], list[b]);
33
+ });
34
+ }
35
+
36
+ return initState;
37
+ }
node_modules/asynckit/lib/streamify.js ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var async = require('./async.js');
2
+
3
+ // API
4
+ module.exports = {
5
+ iterator: wrapIterator,
6
+ callback: wrapCallback
7
+ };
8
+
9
+ /**
10
+ * Wraps iterators with long signature
11
+ *
12
+ * @this ReadableAsyncKit#
13
+ * @param {function} iterator - function to wrap
14
+ * @returns {function} - wrapped function
15
+ */
16
+ function wrapIterator(iterator)
17
+ {
18
+ var stream = this;
19
+
20
+ return function(item, key, cb)
21
+ {
22
+ var aborter
23
+ , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key))
24
+ ;
25
+
26
+ stream.jobs[key] = wrappedCb;
27
+
28
+ // it's either shortcut (item, cb)
29
+ if (iterator.length == 2)
30
+ {
31
+ aborter = iterator(item, wrappedCb);
32
+ }
33
+ // or long format (item, key, cb)
34
+ else
35
+ {
36
+ aborter = iterator(item, key, wrappedCb);
37
+ }
38
+
39
+ return aborter;
40
+ };
41
+ }
42
+
43
+ /**
44
+ * Wraps provided callback function
45
+ * allowing to execute snitch function before
46
+ * real callback
47
+ *
48
+ * @this ReadableAsyncKit#
49
+ * @param {function} callback - function to wrap
50
+ * @returns {function} - wrapped function
51
+ */
52
+ function wrapCallback(callback)
53
+ {
54
+ var stream = this;
55
+
56
+ var wrapped = function(error, result)
57
+ {
58
+ return finisher.call(stream, error, result, callback);
59
+ };
60
+
61
+ return wrapped;
62
+ }
63
+
64
+ /**
65
+ * Wraps provided iterator callback function
66
+ * makes sure snitch only called once,
67
+ * but passes secondary calls to the original callback
68
+ *
69
+ * @this ReadableAsyncKit#
70
+ * @param {function} callback - callback to wrap
71
+ * @param {number|string} key - iteration key
72
+ * @returns {function} wrapped callback
73
+ */
74
+ function wrapIteratorCallback(callback, key)
75
+ {
76
+ var stream = this;
77
+
78
+ return function(error, output)
79
+ {
80
+ // don't repeat yourself
81
+ if (!(key in stream.jobs))
82
+ {
83
+ callback(error, output);
84
+ return;
85
+ }
86
+
87
+ // clean up jobs
88
+ delete stream.jobs[key];
89
+
90
+ return streamer.call(stream, error, {key: key, value: output}, callback);
91
+ };
92
+ }
93
+
94
+ /**
95
+ * Stream wrapper for iterator callback
96
+ *
97
+ * @this ReadableAsyncKit#
98
+ * @param {mixed} error - error response
99
+ * @param {mixed} output - iterator output
100
+ * @param {function} callback - callback that expects iterator results
101
+ */
102
+ function streamer(error, output, callback)
103
+ {
104
+ if (error && !this.error)
105
+ {
106
+ this.error = error;
107
+ this.pause();
108
+ this.emit('error', error);
109
+ // send back value only, as expected
110
+ callback(error, output && output.value);
111
+ return;
112
+ }
113
+
114
+ // stream stuff
115
+ this.push(output);
116
+
117
+ // back to original track
118
+ // send back value only, as expected
119
+ callback(error, output && output.value);
120
+ }
121
+
122
+ /**
123
+ * Stream wrapper for finishing callback
124
+ *
125
+ * @this ReadableAsyncKit#
126
+ * @param {mixed} error - error response
127
+ * @param {mixed} output - iterator output
128
+ * @param {function} callback - callback that expects final results
129
+ */
130
+ function finisher(error, output, callback)
131
+ {
132
+ // signal end of the stream
133
+ // only for successfully finished streams
134
+ if (!error)
135
+ {
136
+ this.push(null);
137
+ }
138
+
139
+ // back to original track
140
+ callback(error, output);
141
+ }
node_modules/asynckit/lib/terminator.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var abort = require('./abort.js')
2
+ , async = require('./async.js')
3
+ ;
4
+
5
+ // API
6
+ module.exports = terminator;
7
+
8
+ /**
9
+ * Terminates jobs in the attached state context
10
+ *
11
+ * @this AsyncKitState#
12
+ * @param {function} callback - final callback to invoke after termination
13
+ */
14
+ function terminator(callback)
15
+ {
16
+ if (!Object.keys(this.jobs).length)
17
+ {
18
+ return;
19
+ }
20
+
21
+ // fast forward iteration index
22
+ this.index = this.size;
23
+
24
+ // abort jobs
25
+ abort(this);
26
+
27
+ // send back results we have so far
28
+ async(callback)(null, this.results);
29
+ }
node_modules/asynckit/package.json ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from": "asynckit@^0.4.0",
3
+ "_id": "[email protected]",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
6
+ "_location": "/asynckit",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "asynckit@^0.4.0",
12
+ "name": "asynckit",
13
+ "escapedName": "asynckit",
14
+ "rawSpec": "^0.4.0",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^0.4.0"
17
+ },
18
+ "_requiredBy": [
19
+ "/form-data"
20
+ ],
21
+ "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
22
+ "_shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79",
23
+ "_spec": "asynckit@^0.4.0",
24
+ "_where": "/home/tony/mastering_transfer/ITO-Master/node_modules/form-data",
25
+ "author": {
26
+ "name": "Alex Indigo",
27
+ "email": "[email protected]"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/alexindigo/asynckit/issues"
31
+ },
32
+ "bundleDependencies": false,
33
+ "dependencies": {},
34
+ "deprecated": false,
35
+ "description": "Minimal async jobs utility library, with streams support",
36
+ "devDependencies": {
37
+ "browserify": "^13.0.0",
38
+ "browserify-istanbul": "^2.0.0",
39
+ "coveralls": "^2.11.9",
40
+ "eslint": "^2.9.0",
41
+ "istanbul": "^0.4.3",
42
+ "obake": "^0.1.2",
43
+ "phantomjs-prebuilt": "^2.1.7",
44
+ "pre-commit": "^1.1.3",
45
+ "reamde": "^1.1.0",
46
+ "rimraf": "^2.5.2",
47
+ "size-table": "^0.2.0",
48
+ "tap-spec": "^4.1.1",
49
+ "tape": "^4.5.1"
50
+ },
51
+ "homepage": "https://github.com/alexindigo/asynckit#readme",
52
+ "keywords": [
53
+ "async",
54
+ "jobs",
55
+ "parallel",
56
+ "serial",
57
+ "iterator",
58
+ "array",
59
+ "object",
60
+ "stream",
61
+ "destroy",
62
+ "terminate",
63
+ "abort"
64
+ ],
65
+ "license": "MIT",
66
+ "main": "index.js",
67
+ "name": "asynckit",
68
+ "pre-commit": [
69
+ "clean",
70
+ "lint",
71
+ "test",
72
+ "browser",
73
+ "report",
74
+ "size"
75
+ ],
76
+ "repository": {
77
+ "type": "git",
78
+ "url": "git+https://github.com/alexindigo/asynckit.git"
79
+ },
80
+ "scripts": {
81
+ "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec",
82
+ "clean": "rimraf coverage",
83
+ "debug": "tape test/test-*.js",
84
+ "lint": "eslint *.js lib/*.js test/*.js",
85
+ "report": "istanbul report",
86
+ "size": "browserify index.js | size-table asynckit",
87
+ "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec",
88
+ "win-test": "tape test/test-*.js"
89
+ },
90
+ "version": "0.4.0"
91
+ }
node_modules/asynckit/parallel.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var iterate = require('./lib/iterate.js')
2
+ , initState = require('./lib/state.js')
3
+ , terminator = require('./lib/terminator.js')
4
+ ;
5
+
6
+ // Public API
7
+ module.exports = parallel;
8
+
9
+ /**
10
+ * Runs iterator over provided array elements in parallel
11
+ *
12
+ * @param {array|object} list - array or object (named list) to iterate over
13
+ * @param {function} iterator - iterator to run
14
+ * @param {function} callback - invoked when all elements processed
15
+ * @returns {function} - jobs terminator
16
+ */
17
+ function parallel(list, iterator, callback)
18
+ {
19
+ var state = initState(list);
20
+
21
+ while (state.index < (state['keyedList'] || list).length)
22
+ {
23
+ iterate(list, iterator, state, function(error, result)
24
+ {
25
+ if (error)
26
+ {
27
+ callback(error, result);
28
+ return;
29
+ }
30
+
31
+ // looks like it's the last one
32
+ if (Object.keys(state.jobs).length === 0)
33
+ {
34
+ callback(null, state.results);
35
+ return;
36
+ }
37
+ });
38
+
39
+ state.index++;
40
+ }
41
+
42
+ return terminator.bind(state, callback);
43
+ }
node_modules/asynckit/serial.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var serialOrdered = require('./serialOrdered.js');
2
+
3
+ // Public API
4
+ module.exports = serial;
5
+
6
+ /**
7
+ * Runs iterator over provided array elements in series
8
+ *
9
+ * @param {array|object} list - array or object (named list) to iterate over
10
+ * @param {function} iterator - iterator to run
11
+ * @param {function} callback - invoked when all elements processed
12
+ * @returns {function} - jobs terminator
13
+ */
14
+ function serial(list, iterator, callback)
15
+ {
16
+ return serialOrdered(list, iterator, null, callback);
17
+ }
node_modules/asynckit/serialOrdered.js ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var iterate = require('./lib/iterate.js')
2
+ , initState = require('./lib/state.js')
3
+ , terminator = require('./lib/terminator.js')
4
+ ;
5
+
6
+ // Public API
7
+ module.exports = serialOrdered;
8
+ // sorting helpers
9
+ module.exports.ascending = ascending;
10
+ module.exports.descending = descending;
11
+
12
+ /**
13
+ * Runs iterator over provided sorted array elements in series
14
+ *
15
+ * @param {array|object} list - array or object (named list) to iterate over
16
+ * @param {function} iterator - iterator to run
17
+ * @param {function} sortMethod - custom sort function
18
+ * @param {function} callback - invoked when all elements processed
19
+ * @returns {function} - jobs terminator
20
+ */
21
+ function serialOrdered(list, iterator, sortMethod, callback)
22
+ {
23
+ var state = initState(list, sortMethod);
24
+
25
+ iterate(list, iterator, state, function iteratorHandler(error, result)
26
+ {
27
+ if (error)
28
+ {
29
+ callback(error, result);
30
+ return;
31
+ }
32
+
33
+ state.index++;
34
+
35
+ // are we there yet?
36
+ if (state.index < (state['keyedList'] || list).length)
37
+ {
38
+ iterate(list, iterator, state, iteratorHandler);
39
+ return;
40
+ }
41
+
42
+ // done here
43
+ callback(null, state.results);
44
+ });
45
+
46
+ return terminator.bind(state, callback);
47
+ }
48
+
49
+ /*
50
+ * -- Sort methods
51
+ */
52
+
53
+ /**
54
+ * sort helper to sort array elements in ascending order
55
+ *
56
+ * @param {mixed} a - an item to compare
57
+ * @param {mixed} b - an item to compare
58
+ * @returns {number} - comparison result
59
+ */
60
+ function ascending(a, b)
61
+ {
62
+ return a < b ? -1 : a > b ? 1 : 0;
63
+ }
64
+
65
+ /**
66
+ * sort helper to sort array elements in descending order
67
+ *
68
+ * @param {mixed} a - an item to compare
69
+ * @param {mixed} b - an item to compare
70
+ * @returns {number} - comparison result
71
+ */
72
+ function descending(a, b)
73
+ {
74
+ return -1 * ascending(a, b);
75
+ }
node_modules/asynckit/stream.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var inherits = require('util').inherits
2
+ , Readable = require('stream').Readable
3
+ , ReadableAsyncKit = require('./lib/readable_asynckit.js')
4
+ , ReadableParallel = require('./lib/readable_parallel.js')
5
+ , ReadableSerial = require('./lib/readable_serial.js')
6
+ , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js')
7
+ ;
8
+
9
+ // API
10
+ module.exports =
11
+ {
12
+ parallel : ReadableParallel,
13
+ serial : ReadableSerial,
14
+ serialOrdered : ReadableSerialOrdered,
15
+ };
16
+
17
+ inherits(ReadableAsyncKit, Readable);
18
+
19
+ inherits(ReadableParallel, ReadableAsyncKit);
20
+ inherits(ReadableSerial, ReadableAsyncKit);
21
+ inherits(ReadableSerialOrdered, ReadableAsyncKit);
node_modules/combined-stream/License ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2011 Debuggable Limited <[email protected]>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
node_modules/combined-stream/Readme.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # combined-stream
2
+
3
+ A stream that emits multiple other streams one after another.
4
+
5
+ **NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`.
6
+
7
+ - [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module.
8
+
9
+ - [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another.
10
+
11
+ ## Installation
12
+
13
+ ``` bash
14
+ npm install combined-stream
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ Here is a simple example that shows how you can use combined-stream to combine
20
+ two files into one:
21
+
22
+ ``` javascript
23
+ var CombinedStream = require('combined-stream');
24
+ var fs = require('fs');
25
+
26
+ var combinedStream = CombinedStream.create();
27
+ combinedStream.append(fs.createReadStream('file1.txt'));
28
+ combinedStream.append(fs.createReadStream('file2.txt'));
29
+
30
+ combinedStream.pipe(fs.createWriteStream('combined.txt'));
31
+ ```
32
+
33
+ While the example above works great, it will pause all source streams until
34
+ they are needed. If you don't want that to happen, you can set `pauseStreams`
35
+ to `false`:
36
+
37
+ ``` javascript
38
+ var CombinedStream = require('combined-stream');
39
+ var fs = require('fs');
40
+
41
+ var combinedStream = CombinedStream.create({pauseStreams: false});
42
+ combinedStream.append(fs.createReadStream('file1.txt'));
43
+ combinedStream.append(fs.createReadStream('file2.txt'));
44
+
45
+ combinedStream.pipe(fs.createWriteStream('combined.txt'));
46
+ ```
47
+
48
+ However, what if you don't have all the source streams yet, or you don't want
49
+ to allocate the resources (file descriptors, memory, etc.) for them right away?
50
+ Well, in that case you can simply provide a callback that supplies the stream
51
+ by calling a `next()` function:
52
+
53
+ ``` javascript
54
+ var CombinedStream = require('combined-stream');
55
+ var fs = require('fs');
56
+
57
+ var combinedStream = CombinedStream.create();
58
+ combinedStream.append(function(next) {
59
+ next(fs.createReadStream('file1.txt'));
60
+ });
61
+ combinedStream.append(function(next) {
62
+ next(fs.createReadStream('file2.txt'));
63
+ });
64
+
65
+ combinedStream.pipe(fs.createWriteStream('combined.txt'));
66
+ ```
67
+
68
+ ## API
69
+
70
+ ### CombinedStream.create([options])
71
+
72
+ Returns a new combined stream object. Available options are:
73
+
74
+ * `maxDataSize`
75
+ * `pauseStreams`
76
+
77
+ The effect of those options is described below.
78
+
79
+ ### combinedStream.pauseStreams = `true`
80
+
81
+ Whether to apply back pressure to the underlaying streams. If set to `false`,
82
+ the underlaying streams will never be paused. If set to `true`, the
83
+ underlaying streams will be paused right after being appended, as well as when
84
+ `delayedStream.pipe()` wants to throttle.
85
+
86
+ ### combinedStream.maxDataSize = `2 * 1024 * 1024`
87
+
88
+ The maximum amount of bytes (or characters) to buffer for all source streams.
89
+ If this value is exceeded, `combinedStream` emits an `'error'` event.
90
+
91
+ ### combinedStream.dataSize = `0`
92
+
93
+ The amount of bytes (or characters) currently buffered by `combinedStream`.
94
+
95
+ ### combinedStream.append(stream)
96
+
97
+ Appends the given `stream` to the combinedStream object. If `pauseStreams` is
98
+ set to `true, this stream will also be paused right away.
99
+
100
+ `streams` can also be a function that takes one parameter called `next`. `next`
101
+ is a function that must be invoked in order to provide the `next` stream, see
102
+ example above.
103
+
104
+ Regardless of how the `stream` is appended, combined-stream always attaches an
105
+ `'error'` listener to it, so you don't have to do that manually.
106
+
107
+ Special case: `stream` can also be a String or Buffer.
108
+
109
+ ### combinedStream.write(data)
110
+
111
+ You should not call this, `combinedStream` takes care of piping the appended
112
+ streams into itself for you.
113
+
114
+ ### combinedStream.resume()
115
+
116
+ Causes `combinedStream` to start drain the streams it manages. The function is
117
+ idempotent, and also emits a `'resume'` event each time which usually goes to
118
+ the stream that is currently being drained.
119
+
120
+ ### combinedStream.pause();
121
+
122
+ If `combinedStream.pauseStreams` is set to `false`, this does nothing.
123
+ Otherwise a `'pause'` event is emitted, this goes to the stream that is
124
+ currently being drained, so you can use it to apply back pressure.
125
+
126
+ ### combinedStream.end();
127
+
128
+ Sets `combinedStream.writable` to false, emits an `'end'` event, and removes
129
+ all streams from the queue.
130
+
131
+ ### combinedStream.destroy();
132
+
133
+ Same as `combinedStream.end()`, except it emits a `'close'` event instead of
134
+ `'end'`.
135
+
136
+ ## License
137
+
138
+ combined-stream is licensed under the MIT license.
node_modules/combined-stream/lib/combined_stream.js ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var util = require('util');
2
+ var Stream = require('stream').Stream;
3
+ var DelayedStream = require('delayed-stream');
4
+
5
+ module.exports = CombinedStream;
6
+ function CombinedStream() {
7
+ this.writable = false;
8
+ this.readable = true;
9
+ this.dataSize = 0;
10
+ this.maxDataSize = 2 * 1024 * 1024;
11
+ this.pauseStreams = true;
12
+
13
+ this._released = false;
14
+ this._streams = [];
15
+ this._currentStream = null;
16
+ this._insideLoop = false;
17
+ this._pendingNext = false;
18
+ }
19
+ util.inherits(CombinedStream, Stream);
20
+
21
+ CombinedStream.create = function(options) {
22
+ var combinedStream = new this();
23
+
24
+ options = options || {};
25
+ for (var option in options) {
26
+ combinedStream[option] = options[option];
27
+ }
28
+
29
+ return combinedStream;
30
+ };
31
+
32
+ CombinedStream.isStreamLike = function(stream) {
33
+ return (typeof stream !== 'function')
34
+ && (typeof stream !== 'string')
35
+ && (typeof stream !== 'boolean')
36
+ && (typeof stream !== 'number')
37
+ && (!Buffer.isBuffer(stream));
38
+ };
39
+
40
+ CombinedStream.prototype.append = function(stream) {
41
+ var isStreamLike = CombinedStream.isStreamLike(stream);
42
+
43
+ if (isStreamLike) {
44
+ if (!(stream instanceof DelayedStream)) {
45
+ var newStream = DelayedStream.create(stream, {
46
+ maxDataSize: Infinity,
47
+ pauseStream: this.pauseStreams,
48
+ });
49
+ stream.on('data', this._checkDataSize.bind(this));
50
+ stream = newStream;
51
+ }
52
+
53
+ this._handleErrors(stream);
54
+
55
+ if (this.pauseStreams) {
56
+ stream.pause();
57
+ }
58
+ }
59
+
60
+ this._streams.push(stream);
61
+ return this;
62
+ };
63
+
64
+ CombinedStream.prototype.pipe = function(dest, options) {
65
+ Stream.prototype.pipe.call(this, dest, options);
66
+ this.resume();
67
+ return dest;
68
+ };
69
+
70
+ CombinedStream.prototype._getNext = function() {
71
+ this._currentStream = null;
72
+
73
+ if (this._insideLoop) {
74
+ this._pendingNext = true;
75
+ return; // defer call
76
+ }
77
+
78
+ this._insideLoop = true;
79
+ try {
80
+ do {
81
+ this._pendingNext = false;
82
+ this._realGetNext();
83
+ } while (this._pendingNext);
84
+ } finally {
85
+ this._insideLoop = false;
86
+ }
87
+ };
88
+
89
+ CombinedStream.prototype._realGetNext = function() {
90
+ var stream = this._streams.shift();
91
+
92
+
93
+ if (typeof stream == 'undefined') {
94
+ this.end();
95
+ return;
96
+ }
97
+
98
+ if (typeof stream !== 'function') {
99
+ this._pipeNext(stream);
100
+ return;
101
+ }
102
+
103
+ var getStream = stream;
104
+ getStream(function(stream) {
105
+ var isStreamLike = CombinedStream.isStreamLike(stream);
106
+ if (isStreamLike) {
107
+ stream.on('data', this._checkDataSize.bind(this));
108
+ this._handleErrors(stream);
109
+ }
110
+
111
+ this._pipeNext(stream);
112
+ }.bind(this));
113
+ };
114
+
115
+ CombinedStream.prototype._pipeNext = function(stream) {
116
+ this._currentStream = stream;
117
+
118
+ var isStreamLike = CombinedStream.isStreamLike(stream);
119
+ if (isStreamLike) {
120
+ stream.on('end', this._getNext.bind(this));
121
+ stream.pipe(this, {end: false});
122
+ return;
123
+ }
124
+
125
+ var value = stream;
126
+ this.write(value);
127
+ this._getNext();
128
+ };
129
+
130
+ CombinedStream.prototype._handleErrors = function(stream) {
131
+ var self = this;
132
+ stream.on('error', function(err) {
133
+ self._emitError(err);
134
+ });
135
+ };
136
+
137
+ CombinedStream.prototype.write = function(data) {
138
+ this.emit('data', data);
139
+ };
140
+
141
+ CombinedStream.prototype.pause = function() {
142
+ if (!this.pauseStreams) {
143
+ return;
144
+ }
145
+
146
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
147
+ this.emit('pause');
148
+ };
149
+
150
+ CombinedStream.prototype.resume = function() {
151
+ if (!this._released) {
152
+ this._released = true;
153
+ this.writable = true;
154
+ this._getNext();
155
+ }
156
+
157
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
158
+ this.emit('resume');
159
+ };
160
+
161
+ CombinedStream.prototype.end = function() {
162
+ this._reset();
163
+ this.emit('end');
164
+ };
165
+
166
+ CombinedStream.prototype.destroy = function() {
167
+ this._reset();
168
+ this.emit('close');
169
+ };
170
+
171
+ CombinedStream.prototype._reset = function() {
172
+ this.writable = false;
173
+ this._streams = [];
174
+ this._currentStream = null;
175
+ };
176
+
177
+ CombinedStream.prototype._checkDataSize = function() {
178
+ this._updateDataSize();
179
+ if (this.dataSize <= this.maxDataSize) {
180
+ return;
181
+ }
182
+
183
+ var message =
184
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
185
+ this._emitError(new Error(message));
186
+ };
187
+
188
+ CombinedStream.prototype._updateDataSize = function() {
189
+ this.dataSize = 0;
190
+
191
+ var self = this;
192
+ this._streams.forEach(function(stream) {
193
+ if (!stream.dataSize) {
194
+ return;
195
+ }
196
+
197
+ self.dataSize += stream.dataSize;
198
+ });
199
+
200
+ if (this._currentStream && this._currentStream.dataSize) {
201
+ this.dataSize += this._currentStream.dataSize;
202
+ }
203
+ };
204
+
205
+ CombinedStream.prototype._emitError = function(err) {
206
+ this._reset();
207
+ this.emit('error', err);
208
+ };
node_modules/combined-stream/package.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from": "combined-stream@^1.0.8",
3
+ "_id": "[email protected]",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
6
+ "_location": "/combined-stream",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "combined-stream@^1.0.8",
12
+ "name": "combined-stream",
13
+ "escapedName": "combined-stream",
14
+ "rawSpec": "^1.0.8",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^1.0.8"
17
+ },
18
+ "_requiredBy": [
19
+ "/form-data"
20
+ ],
21
+ "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
22
+ "_shasum": "c3d45a8b34fd730631a110a8a2520682b31d5a7f",
23
+ "_spec": "combined-stream@^1.0.8",
24
+ "_where": "/home/tony/mastering_transfer/ITO-Master/node_modules/form-data",
25
+ "author": {
26
+ "name": "Felix Geisendörfer",
27
+ "email": "[email protected]",
28
+ "url": "http://debuggable.com/"
29
+ },
30
+ "bugs": {
31
+ "url": "https://github.com/felixge/node-combined-stream/issues"
32
+ },
33
+ "bundleDependencies": false,
34
+ "dependencies": {
35
+ "delayed-stream": "~1.0.0"
36
+ },
37
+ "deprecated": false,
38
+ "description": "A stream that emits multiple other streams one after another.",
39
+ "devDependencies": {
40
+ "far": "~0.0.7"
41
+ },
42
+ "engines": {
43
+ "node": ">= 0.8"
44
+ },
45
+ "homepage": "https://github.com/felixge/node-combined-stream",
46
+ "license": "MIT",
47
+ "main": "./lib/combined_stream",
48
+ "name": "combined-stream",
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git://github.com/felixge/node-combined-stream.git"
52
+ },
53
+ "scripts": {
54
+ "test": "node test/run.js"
55
+ },
56
+ "version": "1.0.8"
57
+ }
node_modules/combined-stream/yarn.lock ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
5
+ delayed-stream@~1.0.0:
6
+ version "1.0.0"
7
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
8
+
9
+ far@~0.0.7:
10
+ version "0.0.7"
11
+ resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7"
12
+ dependencies:
13
+ oop "0.0.3"
14
+
15
16
+ version "0.0.3"
17
+ resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401"
node_modules/cssstyle/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) Chad Walker
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
node_modules/cssstyle/README.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CSSStyleDeclaration
2
+
3
+ A Node JS implementation of the CSS Object Model [CSSStyleDeclaration interface](https://www.w3.org/TR/cssom-1/#the-cssstyledeclaration-interface).
4
+
5
+ [![NpmVersion](https://img.shields.io/npm/v/cssstyle.svg)](https://www.npmjs.com/package/cssstyle) [![Build Status](https://travis-ci.org/jsdom/cssstyle.svg?branch=main)](https://travis-ci.org/jsdom/cssstyle) [![codecov](https://codecov.io/gh/jsdom/cssstyle/branch/main/graph/badge.svg)](https://codecov.io/gh/jsdom/cssstyle)
6
+
7
+ ---
8
+
9
+ #### Background
10
+
11
+ This package is an extension of the CSSStyleDeclaration class in Nikita Vasilyev's [CSSOM](https://github.com/NV/CSSOM) with added support for CSS 2 & 3 properties. The primary use case is for testing browser code in a Node environment.
12
+
13
+ It was originally created by Chad Walker, it is now maintained by the jsdom community.
14
+
15
+ Bug reports and pull requests are welcome.
node_modules/cssstyle/lib/CSSStyleDeclaration.js ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*********************************************************************
2
+ * This is a fork from the CSS Style Declaration part of
3
+ * https://github.com/NV/CSSOM
4
+ ********************************************************************/
5
+ 'use strict';
6
+ var CSSOM = require('rrweb-cssom');
7
+ var allProperties = require('./allProperties');
8
+ var allExtraProperties = require('./allExtraProperties');
9
+ var implementedProperties = require('./implementedProperties');
10
+ var { dashedToCamelCase } = require('./parsers');
11
+ var getBasicPropertyDescriptor = require('./utils/getBasicPropertyDescriptor');
12
+
13
+ /**
14
+ * @constructor
15
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
16
+ */
17
+ var CSSStyleDeclaration = function CSSStyleDeclaration(onChangeCallback) {
18
+ this._values = {};
19
+ this._importants = {};
20
+ this._length = 0;
21
+ this._onChange = onChangeCallback;
22
+ this._setInProgress = false;
23
+ };
24
+ CSSStyleDeclaration.prototype = {
25
+ constructor: CSSStyleDeclaration,
26
+
27
+ /**
28
+ *
29
+ * @param {string} name
30
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue
31
+ * @return {string} the value of the property if it has been explicitly set for this declaration block.
32
+ * Returns the empty string if the property has not been set.
33
+ */
34
+ getPropertyValue: function (name) {
35
+ if (!this._values.hasOwnProperty(name)) {
36
+ return '';
37
+ }
38
+ return this._values[name].toString();
39
+ },
40
+
41
+ /**
42
+ *
43
+ * @param {string} name
44
+ * @param {string} value
45
+ * @param {string} [priority=null] "important" or null
46
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty
47
+ */
48
+ setProperty: function (name, value, priority) {
49
+ if (value === undefined) {
50
+ return;
51
+ }
52
+ if (value === null || value === '') {
53
+ this.removeProperty(name);
54
+ return;
55
+ }
56
+ var isCustomProperty = name.indexOf('--') === 0;
57
+ if (isCustomProperty) {
58
+ this._setProperty(name, value, priority);
59
+ return;
60
+ }
61
+ var lowercaseName = name.toLowerCase();
62
+ if (!allProperties.has(lowercaseName) && !allExtraProperties.has(lowercaseName)) {
63
+ return;
64
+ }
65
+
66
+ this[lowercaseName] = value;
67
+ this._importants[lowercaseName] = priority;
68
+ },
69
+ _setProperty: function (name, value, priority) {
70
+ if (value === undefined) {
71
+ return;
72
+ }
73
+ if (value === null || value === '') {
74
+ this.removeProperty(name);
75
+ return;
76
+ }
77
+
78
+ var originalText;
79
+ if (this._onChange) {
80
+ originalText = this.cssText;
81
+ }
82
+
83
+ if (this._values[name]) {
84
+ // Property already exist. Overwrite it.
85
+ var index = Array.prototype.indexOf.call(this, name);
86
+ if (index < 0) {
87
+ this[this._length] = name;
88
+ this._length++;
89
+ }
90
+ } else {
91
+ // New property.
92
+ this[this._length] = name;
93
+ this._length++;
94
+ }
95
+ this._values[name] = value;
96
+ this._importants[name] = priority;
97
+ if (this._onChange && this.cssText !== originalText && !this._setInProgress) {
98
+ this._onChange(this.cssText);
99
+ }
100
+ },
101
+
102
+ /**
103
+ *
104
+ * @param {string} name
105
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty
106
+ * @return {string} the value of the property if it has been explicitly set for this declaration block.
107
+ * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.
108
+ */
109
+ removeProperty: function (name) {
110
+ if (!this._values.hasOwnProperty(name)) {
111
+ return '';
112
+ }
113
+
114
+ var prevValue = this._values[name];
115
+ delete this._values[name];
116
+ delete this._importants[name];
117
+
118
+ var index = Array.prototype.indexOf.call(this, name);
119
+ if (index < 0) {
120
+ return prevValue;
121
+ }
122
+
123
+ // That's what WebKit and Opera do
124
+ Array.prototype.splice.call(this, index, 1);
125
+
126
+ // That's what Firefox does
127
+ //this[index] = ""
128
+
129
+ if (this._onChange) {
130
+ this._onChange(this.cssText);
131
+ }
132
+ return prevValue;
133
+ },
134
+
135
+ /**
136
+ *
137
+ * @param {String} name
138
+ */
139
+ getPropertyPriority: function (name) {
140
+ return this._importants[name] || '';
141
+ },
142
+
143
+ getPropertyCSSValue: function () {
144
+ //FIXME
145
+ return;
146
+ },
147
+
148
+ /**
149
+ * element.style.overflow = "auto"
150
+ * element.style.getPropertyShorthand("overflow-x")
151
+ * -> "overflow"
152
+ */
153
+ getPropertyShorthand: function () {
154
+ //FIXME
155
+ return;
156
+ },
157
+
158
+ isPropertyImplicit: function () {
159
+ //FIXME
160
+ return;
161
+ },
162
+
163
+ /**
164
+ * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-item
165
+ */
166
+ item: function (index) {
167
+ index = parseInt(index, 10);
168
+ if (index < 0 || index >= this._length) {
169
+ return '';
170
+ }
171
+ return this[index];
172
+ },
173
+ };
174
+
175
+ Object.defineProperties(CSSStyleDeclaration.prototype, {
176
+ cssText: {
177
+ get: function () {
178
+ var properties = [];
179
+ var i;
180
+ var name;
181
+ var value;
182
+ var priority;
183
+ for (i = 0; i < this._length; i++) {
184
+ name = this[i];
185
+ value = this.getPropertyValue(name);
186
+ priority = this.getPropertyPriority(name);
187
+ if (priority !== '') {
188
+ priority = ' !' + priority;
189
+ }
190
+ properties.push([name, ': ', value, priority, ';'].join(''));
191
+ }
192
+ return properties.join(' ');
193
+ },
194
+ set: function (value) {
195
+ var i;
196
+ this._values = {};
197
+ Array.prototype.splice.call(this, 0, this._length);
198
+ this._importants = {};
199
+ var dummyRule;
200
+ try {
201
+ dummyRule = CSSOM.parse('#bogus{' + value + '}').cssRules[0].style;
202
+ } catch (err) {
203
+ // malformed css, just return
204
+ return;
205
+ }
206
+ this._setInProgress = true;
207
+ var rule_length = dummyRule.length;
208
+ var name;
209
+ for (i = 0; i < rule_length; ++i) {
210
+ name = dummyRule[i];
211
+ this.setProperty(
212
+ dummyRule[i],
213
+ dummyRule.getPropertyValue(name),
214
+ dummyRule.getPropertyPriority(name)
215
+ );
216
+ }
217
+ this._setInProgress = false;
218
+ if (this._onChange) {
219
+ this._onChange(this.cssText);
220
+ }
221
+ },
222
+ enumerable: true,
223
+ configurable: true,
224
+ },
225
+ parentRule: {
226
+ get: function () {
227
+ return null;
228
+ },
229
+ enumerable: true,
230
+ configurable: true,
231
+ },
232
+ length: {
233
+ get: function () {
234
+ return this._length;
235
+ },
236
+ /**
237
+ * This deletes indices if the new length is less then the current
238
+ * length. If the new length is more, it does nothing, the new indices
239
+ * will be undefined until set.
240
+ **/
241
+ set: function (value) {
242
+ var i;
243
+ for (i = value; i < this._length; i++) {
244
+ delete this[i];
245
+ }
246
+ this._length = value;
247
+ },
248
+ enumerable: true,
249
+ configurable: true,
250
+ },
251
+ });
252
+
253
+ require('./properties')(CSSStyleDeclaration.prototype);
254
+
255
+ allProperties.forEach(function (property) {
256
+ if (!implementedProperties.has(property)) {
257
+ var declaration = getBasicPropertyDescriptor(property);
258
+ Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration);
259
+ Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration);
260
+ }
261
+ });
262
+
263
+ allExtraProperties.forEach(function (property) {
264
+ if (!implementedProperties.has(property)) {
265
+ var declaration = getBasicPropertyDescriptor(property);
266
+ Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration);
267
+ Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration);
268
+ }
269
+ });
270
+
271
+ exports.CSSStyleDeclaration = CSSStyleDeclaration;
node_modules/cssstyle/lib/allExtraProperties.js ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ /**
4
+ * This file contains all implemented properties that are not a part of any
5
+ * current specifications or drafts, but are handled by browsers nevertheless.
6
+ */
7
+
8
+ var allWebkitProperties = require('./allWebkitProperties');
9
+
10
+ module.exports = new Set(
11
+ [
12
+ 'background-position-x',
13
+ 'background-position-y',
14
+ 'background-repeat-x',
15
+ 'background-repeat-y',
16
+ 'color-interpolation',
17
+ 'color-profile',
18
+ 'color-rendering',
19
+ 'css-float',
20
+ 'enable-background',
21
+ 'fill',
22
+ 'fill-opacity',
23
+ 'fill-rule',
24
+ 'glyph-orientation-horizontal',
25
+ 'image-rendering',
26
+ 'kerning',
27
+ 'marker',
28
+ 'marker-end',
29
+ 'marker-mid',
30
+ 'marker-offset',
31
+ 'marker-start',
32
+ 'marks',
33
+ 'pointer-events',
34
+ 'shape-rendering',
35
+ 'size',
36
+ 'src',
37
+ 'stop-color',
38
+ 'stop-opacity',
39
+ 'stroke',
40
+ 'stroke-dasharray',
41
+ 'stroke-dashoffset',
42
+ 'stroke-linecap',
43
+ 'stroke-linejoin',
44
+ 'stroke-miterlimit',
45
+ 'stroke-opacity',
46
+ 'stroke-width',
47
+ 'text-anchor',
48
+ 'text-line-through',
49
+ 'text-line-through-color',
50
+ 'text-line-through-mode',
51
+ 'text-line-through-style',
52
+ 'text-line-through-width',
53
+ 'text-overline',
54
+ 'text-overline-color',
55
+ 'text-overline-mode',
56
+ 'text-overline-style',
57
+ 'text-overline-width',
58
+ 'text-rendering',
59
+ 'text-underline',
60
+ 'text-underline-color',
61
+ 'text-underline-mode',
62
+ 'text-underline-style',
63
+ 'text-underline-width',
64
+ 'unicode-range',
65
+ 'vector-effect',
66
+ ].concat(allWebkitProperties)
67
+ );
node_modules/cssstyle/lib/allProperties.js ADDED
@@ -0,0 +1,529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+ // autogenerated - 2024-09-07
3
+ // https://www.w3.org/Style/CSS/all-properties.en.html
4
+
5
+ module.exports = new Set([
6
+ '-webkit-line-clamp',
7
+ 'accent-color',
8
+ 'align-content',
9
+ 'align-items',
10
+ 'align-self',
11
+ 'alignment-baseline',
12
+ 'all',
13
+ 'anchor-name',
14
+ 'anchor-scope',
15
+ 'animation',
16
+ 'animation-composition',
17
+ 'animation-delay',
18
+ 'animation-direction',
19
+ 'animation-duration',
20
+ 'animation-fill-mode',
21
+ 'animation-iteration-count',
22
+ 'animation-name',
23
+ 'animation-play-state',
24
+ 'animation-range',
25
+ 'animation-range-end',
26
+ 'animation-range-start',
27
+ 'animation-timeline',
28
+ 'animation-timing-function',
29
+ 'appearance',
30
+ 'aspect-ratio',
31
+ 'azimuth',
32
+ 'backface-visibility',
33
+ 'background',
34
+ 'background-attachment',
35
+ 'background-blend-mode',
36
+ 'background-clip',
37
+ 'background-color',
38
+ 'background-image',
39
+ 'background-origin',
40
+ 'background-position',
41
+ 'background-repeat',
42
+ 'background-size',
43
+ 'baseline-shift',
44
+ 'baseline-source',
45
+ 'block-ellipsis',
46
+ 'block-size',
47
+ 'bookmark-label',
48
+ 'bookmark-level',
49
+ 'bookmark-state',
50
+ 'border',
51
+ 'border-block',
52
+ 'border-block-color',
53
+ 'border-block-end',
54
+ 'border-block-end-color',
55
+ 'border-block-end-style',
56
+ 'border-block-end-width',
57
+ 'border-block-start',
58
+ 'border-block-start-color',
59
+ 'border-block-start-style',
60
+ 'border-block-start-width',
61
+ 'border-block-style',
62
+ 'border-block-width',
63
+ 'border-bottom',
64
+ 'border-bottom-color',
65
+ 'border-bottom-left-radius',
66
+ 'border-bottom-right-radius',
67
+ 'border-bottom-style',
68
+ 'border-bottom-width',
69
+ 'border-boundary',
70
+ 'border-collapse',
71
+ 'border-color',
72
+ 'border-end-end-radius',
73
+ 'border-end-start-radius',
74
+ 'border-image',
75
+ 'border-image-outset',
76
+ 'border-image-repeat',
77
+ 'border-image-slice',
78
+ 'border-image-source',
79
+ 'border-image-width',
80
+ 'border-inline',
81
+ 'border-inline-color',
82
+ 'border-inline-end',
83
+ 'border-inline-end-color',
84
+ 'border-inline-end-style',
85
+ 'border-inline-end-width',
86
+ 'border-inline-start',
87
+ 'border-inline-start-color',
88
+ 'border-inline-start-style',
89
+ 'border-inline-start-width',
90
+ 'border-inline-style',
91
+ 'border-inline-width',
92
+ 'border-left',
93
+ 'border-left-color',
94
+ 'border-left-style',
95
+ 'border-left-width',
96
+ 'border-radius',
97
+ 'border-right',
98
+ 'border-right-color',
99
+ 'border-right-style',
100
+ 'border-right-width',
101
+ 'border-spacing',
102
+ 'border-start-end-radius',
103
+ 'border-start-start-radius',
104
+ 'border-style',
105
+ 'border-top',
106
+ 'border-top-color',
107
+ 'border-top-left-radius',
108
+ 'border-top-right-radius',
109
+ 'border-top-style',
110
+ 'border-top-width',
111
+ 'border-width',
112
+ 'bottom',
113
+ 'box-decoration-break',
114
+ 'box-shadow',
115
+ 'box-sizing',
116
+ 'box-snap',
117
+ 'break-after',
118
+ 'break-before',
119
+ 'break-inside',
120
+ 'caption-side',
121
+ 'caret',
122
+ 'caret-color',
123
+ 'caret-shape',
124
+ 'clear',
125
+ 'clip',
126
+ 'clip-path',
127
+ 'clip-rule',
128
+ 'color',
129
+ 'color-adjust',
130
+ 'color-interpolation-filters',
131
+ 'color-scheme',
132
+ 'column-count',
133
+ 'column-fill',
134
+ 'column-gap',
135
+ 'column-rule',
136
+ 'column-rule-color',
137
+ 'column-rule-style',
138
+ 'column-rule-width',
139
+ 'column-span',
140
+ 'column-width',
141
+ 'columns',
142
+ 'contain',
143
+ 'contain-intrinsic-block-size',
144
+ 'contain-intrinsic-height',
145
+ 'contain-intrinsic-inline-size',
146
+ 'contain-intrinsic-size',
147
+ 'contain-intrinsic-width',
148
+ 'container',
149
+ 'container-name',
150
+ 'container-type',
151
+ 'content',
152
+ 'content-visibility',
153
+ 'continue',
154
+ 'counter-increment',
155
+ 'counter-reset',
156
+ 'counter-set',
157
+ 'cue',
158
+ 'cue-after',
159
+ 'cue-before',
160
+ 'cursor',
161
+ 'direction',
162
+ 'display',
163
+ 'dominant-baseline',
164
+ 'elevation',
165
+ 'empty-cells',
166
+ 'filter',
167
+ 'flex',
168
+ 'flex-basis',
169
+ 'flex-direction',
170
+ 'flex-flow',
171
+ 'flex-grow',
172
+ 'flex-shrink',
173
+ 'flex-wrap',
174
+ 'float',
175
+ 'flood-color',
176
+ 'flood-opacity',
177
+ 'flow-from',
178
+ 'flow-into',
179
+ 'font',
180
+ 'font-family',
181
+ 'font-feature-settings',
182
+ 'font-kerning',
183
+ 'font-language-override',
184
+ 'font-optical-sizing',
185
+ 'font-palette',
186
+ 'font-size',
187
+ 'font-size-adjust',
188
+ 'font-stretch',
189
+ 'font-style',
190
+ 'font-synthesis',
191
+ 'font-synthesis-position',
192
+ 'font-synthesis-small-caps',
193
+ 'font-synthesis-style',
194
+ 'font-synthesis-weight',
195
+ 'font-variant',
196
+ 'font-variant-alternates',
197
+ 'font-variant-caps',
198
+ 'font-variant-east-asian',
199
+ 'font-variant-emoji',
200
+ 'font-variant-ligatures',
201
+ 'font-variant-numeric',
202
+ 'font-variant-position',
203
+ 'font-variation-settings',
204
+ 'font-weight',
205
+ 'font-width',
206
+ 'footnote-display',
207
+ 'footnote-policy',
208
+ 'forced-color-adjust',
209
+ 'gap',
210
+ 'glyph-orientation-vertical',
211
+ 'grid',
212
+ 'grid-area',
213
+ 'grid-auto-columns',
214
+ 'grid-auto-flow',
215
+ 'grid-auto-rows',
216
+ 'grid-column',
217
+ 'grid-column-end',
218
+ 'grid-column-start',
219
+ 'grid-row',
220
+ 'grid-row-end',
221
+ 'grid-row-start',
222
+ 'grid-template',
223
+ 'grid-template-areas',
224
+ 'grid-template-columns',
225
+ 'grid-template-rows',
226
+ 'hanging-punctuation',
227
+ 'height',
228
+ 'hyphenate-character',
229
+ 'hyphenate-limit-chars',
230
+ 'hyphenate-limit-last',
231
+ 'hyphenate-limit-lines',
232
+ 'hyphenate-limit-zone',
233
+ 'hyphens',
234
+ 'image-orientation',
235
+ 'image-rendering',
236
+ 'image-resolution',
237
+ 'initial-letter',
238
+ 'initial-letter-align',
239
+ 'initial-letter-wrap',
240
+ 'inline-size',
241
+ 'inline-sizing',
242
+ 'inset',
243
+ 'inset-area',
244
+ 'inset-block',
245
+ 'inset-block-end',
246
+ 'inset-block-start',
247
+ 'inset-inline',
248
+ 'inset-inline-end',
249
+ 'inset-inline-start',
250
+ 'isolation',
251
+ 'justify-content',
252
+ 'justify-items',
253
+ 'justify-self',
254
+ 'left',
255
+ 'letter-spacing',
256
+ 'lighting-color',
257
+ 'line-break',
258
+ 'line-clamp',
259
+ 'line-fit-edge',
260
+ 'line-grid',
261
+ 'line-height',
262
+ 'line-padding',
263
+ 'line-snap',
264
+ 'list-style',
265
+ 'list-style-image',
266
+ 'list-style-position',
267
+ 'list-style-type',
268
+ 'margin',
269
+ 'margin-block',
270
+ 'margin-block-end',
271
+ 'margin-block-start',
272
+ 'margin-bottom',
273
+ 'margin-inline',
274
+ 'margin-inline-end',
275
+ 'margin-inline-start',
276
+ 'margin-left',
277
+ 'margin-right',
278
+ 'margin-top',
279
+ 'margin-trim',
280
+ 'marker-side',
281
+ 'mask',
282
+ 'mask-border',
283
+ 'mask-border-mode',
284
+ 'mask-border-outset',
285
+ 'mask-border-repeat',
286
+ 'mask-border-slice',
287
+ 'mask-border-source',
288
+ 'mask-border-width',
289
+ 'mask-clip',
290
+ 'mask-composite',
291
+ 'mask-image',
292
+ 'mask-mode',
293
+ 'mask-origin',
294
+ 'mask-position',
295
+ 'mask-repeat',
296
+ 'mask-size',
297
+ 'mask-type',
298
+ 'max-block-size',
299
+ 'max-height',
300
+ 'max-inline-size',
301
+ 'max-lines',
302
+ 'max-width',
303
+ 'min-block-size',
304
+ 'min-height',
305
+ 'min-inline-size',
306
+ 'min-intrinsic-sizing',
307
+ 'min-width',
308
+ 'mix-blend-mode',
309
+ 'nav-down',
310
+ 'nav-left',
311
+ 'nav-right',
312
+ 'nav-up',
313
+ 'object-fit',
314
+ 'object-position',
315
+ 'offset',
316
+ 'offset-anchor',
317
+ 'offset-distance',
318
+ 'offset-path',
319
+ 'offset-position',
320
+ 'offset-rotate',
321
+ 'opacity',
322
+ 'order',
323
+ 'orphans',
324
+ 'outline',
325
+ 'outline-color',
326
+ 'outline-offset',
327
+ 'outline-style',
328
+ 'outline-width',
329
+ 'overflow',
330
+ 'overflow-anchor',
331
+ 'overflow-block',
332
+ 'overflow-clip-margin',
333
+ 'overflow-clip-margin-block',
334
+ 'overflow-clip-margin-block-end',
335
+ 'overflow-clip-margin-block-start',
336
+ 'overflow-clip-margin-bottom',
337
+ 'overflow-clip-margin-inline',
338
+ 'overflow-clip-margin-inline-end',
339
+ 'overflow-clip-margin-inline-start',
340
+ 'overflow-clip-margin-left',
341
+ 'overflow-clip-margin-right',
342
+ 'overflow-clip-margin-top',
343
+ 'overflow-inline',
344
+ 'overflow-wrap',
345
+ 'overflow-x',
346
+ 'overflow-y',
347
+ 'padding',
348
+ 'padding-block',
349
+ 'padding-block-end',
350
+ 'padding-block-start',
351
+ 'padding-bottom',
352
+ 'padding-inline',
353
+ 'padding-inline-end',
354
+ 'padding-inline-start',
355
+ 'padding-left',
356
+ 'padding-right',
357
+ 'padding-top',
358
+ 'page',
359
+ 'page-break-after',
360
+ 'page-break-before',
361
+ 'page-break-inside',
362
+ 'pause',
363
+ 'pause-after',
364
+ 'pause-before',
365
+ 'perspective',
366
+ 'perspective-origin',
367
+ 'pitch',
368
+ 'pitch-range',
369
+ 'place-content',
370
+ 'place-items',
371
+ 'place-self',
372
+ 'play-during',
373
+ 'position',
374
+ 'position-anchor',
375
+ 'position-try',
376
+ 'position-try-options',
377
+ 'position-try-order',
378
+ 'print-color-adjust',
379
+ 'quotes',
380
+ 'region-fragment',
381
+ 'resize',
382
+ 'rest',
383
+ 'rest-after',
384
+ 'rest-before',
385
+ 'richness',
386
+ 'right',
387
+ 'rotate',
388
+ 'row-gap',
389
+ 'ruby-align',
390
+ 'ruby-merge',
391
+ 'ruby-overhang',
392
+ 'ruby-position',
393
+ 'running',
394
+ 'scale',
395
+ 'scroll-behavior',
396
+ 'scroll-margin',
397
+ 'scroll-margin-block',
398
+ 'scroll-margin-block-end',
399
+ 'scroll-margin-block-start',
400
+ 'scroll-margin-bottom',
401
+ 'scroll-margin-inline',
402
+ 'scroll-margin-inline-end',
403
+ 'scroll-margin-inline-start',
404
+ 'scroll-margin-left',
405
+ 'scroll-margin-right',
406
+ 'scroll-margin-top',
407
+ 'scroll-padding',
408
+ 'scroll-padding-block',
409
+ 'scroll-padding-block-end',
410
+ 'scroll-padding-block-start',
411
+ 'scroll-padding-bottom',
412
+ 'scroll-padding-inline',
413
+ 'scroll-padding-inline-end',
414
+ 'scroll-padding-inline-start',
415
+ 'scroll-padding-left',
416
+ 'scroll-padding-right',
417
+ 'scroll-padding-top',
418
+ 'scroll-snap-align',
419
+ 'scroll-snap-stop',
420
+ 'scroll-snap-type',
421
+ 'scroll-timeline',
422
+ 'scroll-timeline-axis',
423
+ 'scroll-timeline-name',
424
+ 'scrollbar-color',
425
+ 'scrollbar-gutter',
426
+ 'scrollbar-width',
427
+ 'shape-image-threshold',
428
+ 'shape-inside',
429
+ 'shape-margin',
430
+ 'shape-outside',
431
+ 'spatial-navigation-action',
432
+ 'spatial-navigation-contain',
433
+ 'spatial-navigation-function',
434
+ 'speak',
435
+ 'speak-as',
436
+ 'speak-header',
437
+ 'speak-numeral',
438
+ 'speak-punctuation',
439
+ 'speech-rate',
440
+ 'stress',
441
+ 'string-set',
442
+ 'tab-size',
443
+ 'table-layout',
444
+ 'text-align',
445
+ 'text-align-all',
446
+ 'text-align-last',
447
+ 'text-autospace',
448
+ 'text-box',
449
+ 'text-box-edge',
450
+ 'text-box-trim',
451
+ 'text-combine-upright',
452
+ 'text-decoration',
453
+ 'text-decoration-color',
454
+ 'text-decoration-line',
455
+ 'text-decoration-skip',
456
+ 'text-decoration-skip-box',
457
+ 'text-decoration-skip-ink',
458
+ 'text-decoration-skip-inset',
459
+ 'text-decoration-skip-self',
460
+ 'text-decoration-skip-spaces',
461
+ 'text-decoration-style',
462
+ 'text-decoration-thickness',
463
+ 'text-emphasis',
464
+ 'text-emphasis-color',
465
+ 'text-emphasis-position',
466
+ 'text-emphasis-skip',
467
+ 'text-emphasis-style',
468
+ 'text-group-align',
469
+ 'text-indent',
470
+ 'text-justify',
471
+ 'text-orientation',
472
+ 'text-overflow',
473
+ 'text-shadow',
474
+ 'text-spacing',
475
+ 'text-spacing-trim',
476
+ 'text-transform',
477
+ 'text-underline-offset',
478
+ 'text-underline-position',
479
+ 'text-wrap',
480
+ 'text-wrap-mode',
481
+ 'text-wrap-style',
482
+ 'timeline-scope',
483
+ 'top',
484
+ 'transform',
485
+ 'transform-box',
486
+ 'transform-origin',
487
+ 'transform-style',
488
+ 'transition',
489
+ 'transition-delay',
490
+ 'transition-duration',
491
+ 'transition-property',
492
+ 'transition-timing-function',
493
+ 'translate',
494
+ 'unicode-bidi',
495
+ 'user-select',
496
+ 'vertical-align',
497
+ 'view-timeline',
498
+ 'view-timeline-axis',
499
+ 'view-timeline-inset',
500
+ 'view-timeline-name',
501
+ 'view-transition-name',
502
+ 'visibility',
503
+ 'voice-balance',
504
+ 'voice-duration',
505
+ 'voice-family',
506
+ 'voice-pitch',
507
+ 'voice-range',
508
+ 'voice-rate',
509
+ 'voice-stress',
510
+ 'voice-volume',
511
+ 'volume',
512
+ 'white-space',
513
+ 'white-space-collapse',
514
+ 'white-space-trim',
515
+ 'widows',
516
+ 'width',
517
+ 'will-change',
518
+ 'word-break',
519
+ 'word-space-transform',
520
+ 'word-spacing',
521
+ 'word-wrap',
522
+ 'wrap-after',
523
+ 'wrap-before',
524
+ 'wrap-flow',
525
+ 'wrap-inside',
526
+ 'wrap-through',
527
+ 'writing-mode',
528
+ 'z-index',
529
+ ]);
node_modules/cssstyle/lib/allWebkitProperties.js ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ /**
4
+ * This file contains all implemented properties that are not a part of any
5
+ * current specifications or drafts, but are handled by browsers nevertheless.
6
+ */
7
+
8
+ module.exports = [
9
+ 'animation',
10
+ 'animation-delay',
11
+ 'animation-direction',
12
+ 'animation-duration',
13
+ 'animation-fill-mode',
14
+ 'animation-iteration-count',
15
+ 'animation-name',
16
+ 'animation-play-state',
17
+ 'animation-timing-function',
18
+ 'appearance',
19
+ 'aspect-ratio',
20
+ 'backface-visibility',
21
+ 'background-clip',
22
+ 'background-composite',
23
+ 'background-origin',
24
+ 'background-size',
25
+ 'border-after',
26
+ 'border-after-color',
27
+ 'border-after-style',
28
+ 'border-after-width',
29
+ 'border-before',
30
+ 'border-before-color',
31
+ 'border-before-style',
32
+ 'border-before-width',
33
+ 'border-end',
34
+ 'border-end-color',
35
+ 'border-end-style',
36
+ 'border-end-width',
37
+ 'border-fit',
38
+ 'border-horizontal-spacing',
39
+ 'border-image',
40
+ 'border-radius',
41
+ 'border-start',
42
+ 'border-start-color',
43
+ 'border-start-style',
44
+ 'border-start-width',
45
+ 'border-vertical-spacing',
46
+ 'box-align',
47
+ 'box-direction',
48
+ 'box-flex',
49
+ 'box-flex-group',
50
+ 'box-lines',
51
+ 'box-ordinal-group',
52
+ 'box-orient',
53
+ 'box-pack',
54
+ 'box-reflect',
55
+ 'box-shadow',
56
+ 'color-correction',
57
+ 'column-axis',
58
+ 'column-break-after',
59
+ 'column-break-before',
60
+ 'column-break-inside',
61
+ 'column-count',
62
+ 'column-gap',
63
+ 'column-rule',
64
+ 'column-rule-color',
65
+ 'column-rule-style',
66
+ 'column-rule-width',
67
+ 'columns',
68
+ 'column-span',
69
+ 'column-width',
70
+ 'filter',
71
+ 'flex-align',
72
+ 'flex-direction',
73
+ 'flex-flow',
74
+ 'flex-item-align',
75
+ 'flex-line-pack',
76
+ 'flex-order',
77
+ 'flex-pack',
78
+ 'flex-wrap',
79
+ 'flow-from',
80
+ 'flow-into',
81
+ 'font-feature-settings',
82
+ 'font-kerning',
83
+ 'font-size-delta',
84
+ 'font-smoothing',
85
+ 'font-variant-ligatures',
86
+ 'highlight',
87
+ 'hyphenate-character',
88
+ 'hyphenate-limit-after',
89
+ 'hyphenate-limit-before',
90
+ 'hyphenate-limit-lines',
91
+ 'hyphens',
92
+ 'line-align',
93
+ 'line-box-contain',
94
+ 'line-break',
95
+ 'line-clamp',
96
+ 'line-grid',
97
+ 'line-snap',
98
+ 'locale',
99
+ 'logical-height',
100
+ 'logical-width',
101
+ 'margin-after',
102
+ 'margin-after-collapse',
103
+ 'margin-before',
104
+ 'margin-before-collapse',
105
+ 'margin-bottom-collapse',
106
+ 'margin-collapse',
107
+ 'margin-end',
108
+ 'margin-start',
109
+ 'margin-top-collapse',
110
+ 'marquee',
111
+ 'marquee-direction',
112
+ 'marquee-increment',
113
+ 'marquee-repetition',
114
+ 'marquee-speed',
115
+ 'marquee-style',
116
+ 'mask',
117
+ 'mask-attachment',
118
+ 'mask-box-image',
119
+ 'mask-box-image-outset',
120
+ 'mask-box-image-repeat',
121
+ 'mask-box-image-slice',
122
+ 'mask-box-image-source',
123
+ 'mask-box-image-width',
124
+ 'mask-clip',
125
+ 'mask-composite',
126
+ 'mask-image',
127
+ 'mask-origin',
128
+ 'mask-position',
129
+ 'mask-position-x',
130
+ 'mask-position-y',
131
+ 'mask-repeat',
132
+ 'mask-repeat-x',
133
+ 'mask-repeat-y',
134
+ 'mask-size',
135
+ 'match-nearest-mail-blockquote-color',
136
+ 'max-logical-height',
137
+ 'max-logical-width',
138
+ 'min-logical-height',
139
+ 'min-logical-width',
140
+ 'nbsp-mode',
141
+ 'overflow-scrolling',
142
+ 'padding-after',
143
+ 'padding-before',
144
+ 'padding-end',
145
+ 'padding-start',
146
+ 'perspective',
147
+ 'perspective-origin',
148
+ 'perspective-origin-x',
149
+ 'perspective-origin-y',
150
+ 'print-color-adjust',
151
+ 'region-break-after',
152
+ 'region-break-before',
153
+ 'region-break-inside',
154
+ 'region-overflow',
155
+ 'rtl-ordering',
156
+ 'svg-shadow',
157
+ 'tap-highlight-color',
158
+ 'text-combine',
159
+ 'text-decorations-in-effect',
160
+ 'text-emphasis',
161
+ 'text-emphasis-color',
162
+ 'text-emphasis-position',
163
+ 'text-emphasis-style',
164
+ 'text-fill-color',
165
+ 'text-orientation',
166
+ 'text-security',
167
+ 'text-size-adjust',
168
+ 'text-stroke',
169
+ 'text-stroke-color',
170
+ 'text-stroke-width',
171
+ 'transform',
172
+ 'transform-origin',
173
+ 'transform-origin-x',
174
+ 'transform-origin-y',
175
+ 'transform-origin-z',
176
+ 'transform-style',
177
+ 'transition',
178
+ 'transition-delay',
179
+ 'transition-duration',
180
+ 'transition-property',
181
+ 'transition-timing-function',
182
+ 'user-drag',
183
+ 'user-modify',
184
+ 'user-select',
185
+ 'wrap',
186
+ 'wrap-flow',
187
+ 'wrap-margin',
188
+ 'wrap-padding',
189
+ 'wrap-shape-inside',
190
+ 'wrap-shape-outside',
191
+ 'wrap-through',
192
+ 'writing-mode',
193
+ 'zoom',
194
+ ].map((prop) => 'webkit-' + prop);
node_modules/cssstyle/lib/constants.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ module.exports.POSITION_AT_SHORTHAND = {
4
+ first: 0,
5
+ second: 1,
6
+ };
node_modules/cssstyle/lib/implementedProperties.js ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ 'use strict';
3
+ // autogenerated - 2024-09-07
4
+ // https://www.w3.org/Style/CSS/all-properties.en.html
5
+
6
+ module.exports = new Set([
7
+ "azimuth",
8
+ "background",
9
+ "background-attachment",
10
+ "background-color",
11
+ "background-image",
12
+ "background-position",
13
+ "background-repeat",
14
+ "border",
15
+ "border-bottom",
16
+ "border-bottom-color",
17
+ "border-bottom-style",
18
+ "border-bottom-width",
19
+ "border-collapse",
20
+ "border-color",
21
+ "border-left",
22
+ "border-left-color",
23
+ "border-left-style",
24
+ "border-left-width",
25
+ "border-right",
26
+ "border-right-color",
27
+ "border-right-style",
28
+ "border-right-width",
29
+ "border-spacing",
30
+ "border-style",
31
+ "border-top",
32
+ "border-top-color",
33
+ "border-top-style",
34
+ "border-top-width",
35
+ "border-width",
36
+ "bottom",
37
+ "clear",
38
+ "clip",
39
+ "color",
40
+ "css-float",
41
+ "flex",
42
+ "flex-basis",
43
+ "flex-grow",
44
+ "flex-shrink",
45
+ "float",
46
+ "flood-color",
47
+ "font",
48
+ "font-family",
49
+ "font-size",
50
+ "font-style",
51
+ "font-variant",
52
+ "font-weight",
53
+ "height",
54
+ "left",
55
+ "lighting-color",
56
+ "line-height",
57
+ "margin",
58
+ "margin-bottom",
59
+ "margin-left",
60
+ "margin-right",
61
+ "margin-top",
62
+ "opacity",
63
+ "outline-color",
64
+ "padding",
65
+ "padding-bottom",
66
+ "padding-left",
67
+ "padding-right",
68
+ "padding-top",
69
+ "right",
70
+ "stop-color",
71
+ "text-line-through-color",
72
+ "text-overline-color",
73
+ "text-underline-color",
74
+ "top",
75
+ "webkit-border-after-color",
76
+ "webkit-border-before-color",
77
+ "webkit-border-end-color",
78
+ "webkit-border-start-color",
79
+ "webkit-column-rule-color",
80
+ "webkit-match-nearest-mail-blockquote-color",
81
+ "webkit-tap-highlight-color",
82
+ "webkit-text-emphasis-color",
83
+ "webkit-text-fill-color",
84
+ "webkit-text-stroke-color",
85
+ "width"
86
+ ]);
node_modules/cssstyle/lib/named_colors.json ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "aliceblue",
3
+ "antiquewhite",
4
+ "aqua",
5
+ "aquamarine",
6
+ "azure",
7
+ "beige",
8
+ "bisque",
9
+ "black",
10
+ "blanchedalmond",
11
+ "blue",
12
+ "blueviolet",
13
+ "brown",
14
+ "burlywood",
15
+ "cadetblue",
16
+ "chartreuse",
17
+ "chocolate",
18
+ "coral",
19
+ "cornflowerblue",
20
+ "cornsilk",
21
+ "crimson",
22
+ "cyan",
23
+ "darkblue",
24
+ "darkcyan",
25
+ "darkgoldenrod",
26
+ "darkgray",
27
+ "darkgreen",
28
+ "darkgrey",
29
+ "darkkhaki",
30
+ "darkmagenta",
31
+ "darkolivegreen",
32
+ "darkorange",
33
+ "darkorchid",
34
+ "darkred",
35
+ "darksalmon",
36
+ "darkseagreen",
37
+ "darkslateblue",
38
+ "darkslategray",
39
+ "darkslategrey",
40
+ "darkturquoise",
41
+ "darkviolet",
42
+ "deeppink",
43
+ "deepskyblue",
44
+ "dimgray",
45
+ "dimgrey",
46
+ "dodgerblue",
47
+ "firebrick",
48
+ "floralwhite",
49
+ "forestgreen",
50
+ "fuchsia",
51
+ "gainsboro",
52
+ "ghostwhite",
53
+ "gold",
54
+ "goldenrod",
55
+ "gray",
56
+ "green",
57
+ "greenyellow",
58
+ "grey",
59
+ "honeydew",
60
+ "hotpink",
61
+ "indianred",
62
+ "indigo",
63
+ "ivory",
64
+ "khaki",
65
+ "lavender",
66
+ "lavenderblush",
67
+ "lawngreen",
68
+ "lemonchiffon",
69
+ "lightblue",
70
+ "lightcoral",
71
+ "lightcyan",
72
+ "lightgoldenrodyellow",
73
+ "lightgray",
74
+ "lightgreen",
75
+ "lightgrey",
76
+ "lightpink",
77
+ "lightsalmon",
78
+ "lightseagreen",
79
+ "lightskyblue",
80
+ "lightslategray",
81
+ "lightslategrey",
82
+ "lightsteelblue",
83
+ "lightyellow",
84
+ "lime",
85
+ "limegreen",
86
+ "linen",
87
+ "magenta",
88
+ "maroon",
89
+ "mediumaquamarine",
90
+ "mediumblue",
91
+ "mediumorchid",
92
+ "mediumpurple",
93
+ "mediumseagreen",
94
+ "mediumslateblue",
95
+ "mediumspringgreen",
96
+ "mediumturquoise",
97
+ "mediumvioletred",
98
+ "midnightblue",
99
+ "mintcream",
100
+ "mistyrose",
101
+ "moccasin",
102
+ "navajowhite",
103
+ "navy",
104
+ "oldlace",
105
+ "olive",
106
+ "olivedrab",
107
+ "orange",
108
+ "orangered",
109
+ "orchid",
110
+ "palegoldenrod",
111
+ "palegreen",
112
+ "paleturquoise",
113
+ "palevioletred",
114
+ "papayawhip",
115
+ "peachpuff",
116
+ "peru",
117
+ "pink",
118
+ "plum",
119
+ "powderblue",
120
+ "purple",
121
+ "rebeccapurple",
122
+ "red",
123
+ "rosybrown",
124
+ "royalblue",
125
+ "saddlebrown",
126
+ "salmon",
127
+ "sandybrown",
128
+ "seagreen",
129
+ "seashell",
130
+ "sienna",
131
+ "silver",
132
+ "skyblue",
133
+ "slateblue",
134
+ "slategray",
135
+ "slategrey",
136
+ "snow",
137
+ "springgreen",
138
+ "steelblue",
139
+ "tan",
140
+ "teal",
141
+ "thistle",
142
+ "tomato",
143
+ "turquoise",
144
+ "violet",
145
+ "wheat",
146
+ "white",
147
+ "whitesmoke",
148
+ "yellow",
149
+ "yellowgreen",
150
+ "transparent",
151
+ "currentcolor"
152
+ ]
node_modules/cssstyle/lib/parsers.js ADDED
@@ -0,0 +1,735 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*********************************************************************
2
+ * These are commonly used parsers for CSS Values they take a string *
3
+ * to parse and return a string after it's been converted, if needed *
4
+ ********************************************************************/
5
+ 'use strict';
6
+
7
+ const namedColors = require('./named_colors.json');
8
+ const { hslToRgb } = require('./utils/colorSpace');
9
+
10
+ exports.TYPES = {
11
+ INTEGER: 1,
12
+ NUMBER: 2,
13
+ LENGTH: 3,
14
+ PERCENT: 4,
15
+ URL: 5,
16
+ COLOR: 6,
17
+ STRING: 7,
18
+ ANGLE: 8,
19
+ KEYWORD: 9,
20
+ NULL_OR_EMPTY_STR: 10,
21
+ CALC: 11,
22
+ };
23
+
24
+ // rough regular expressions
25
+ var integerRegEx = /^[-+]?[0-9]+$/;
26
+ var numberRegEx = /^[-+]?[0-9]*\.?[0-9]+$/;
27
+ var lengthRegEx = /^(0|[-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem|vh|vw|ch))$/;
28
+ var percentRegEx = /^[-+]?[0-9]*\.?[0-9]+%$/;
29
+ var urlRegEx = /^url\(\s*([^)]*)\s*\)$/;
30
+ var stringRegEx = /^("[^"]*"|'[^']*')$/;
31
+ var colorRegEx1 = /^#([0-9a-fA-F]{3,4}){1,2}$/;
32
+ var colorRegEx2 = /^rgb\(([^)]*)\)$/;
33
+ var colorRegEx3 = /^rgba\(([^)]*)\)$/;
34
+ var calcRegEx = /^calc\(([^)]*)\)$/;
35
+ var colorRegEx4 =
36
+ /^hsla?\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*(,\s*(-?\d+|-?\d*.\d+)\s*)?\)/;
37
+ var angleRegEx = /^([-+]?[0-9]*\.?[0-9]+)(deg|grad|rad)$/;
38
+
39
+ // This will return one of the above types based on the passed in string
40
+ exports.valueType = function valueType(val) {
41
+ if (val === '' || val === null) {
42
+ return exports.TYPES.NULL_OR_EMPTY_STR;
43
+ }
44
+ if (typeof val === 'number') {
45
+ val = val.toString();
46
+ }
47
+
48
+ if (typeof val !== 'string') {
49
+ return undefined;
50
+ }
51
+
52
+ if (integerRegEx.test(val)) {
53
+ return exports.TYPES.INTEGER;
54
+ }
55
+ if (numberRegEx.test(val)) {
56
+ return exports.TYPES.NUMBER;
57
+ }
58
+ if (lengthRegEx.test(val)) {
59
+ return exports.TYPES.LENGTH;
60
+ }
61
+ if (percentRegEx.test(val)) {
62
+ return exports.TYPES.PERCENT;
63
+ }
64
+ if (urlRegEx.test(val)) {
65
+ return exports.TYPES.URL;
66
+ }
67
+ if (calcRegEx.test(val)) {
68
+ return exports.TYPES.CALC;
69
+ }
70
+ if (stringRegEx.test(val)) {
71
+ return exports.TYPES.STRING;
72
+ }
73
+ if (angleRegEx.test(val)) {
74
+ return exports.TYPES.ANGLE;
75
+ }
76
+ if (colorRegEx1.test(val)) {
77
+ return exports.TYPES.COLOR;
78
+ }
79
+
80
+ var res = colorRegEx2.exec(val);
81
+ var parts;
82
+ if (res !== null) {
83
+ parts = res[1].split(/\s*,\s*/);
84
+ if (parts.length !== 3) {
85
+ return undefined;
86
+ }
87
+ if (
88
+ parts.every(percentRegEx.test.bind(percentRegEx)) ||
89
+ parts.every(integerRegEx.test.bind(integerRegEx))
90
+ ) {
91
+ return exports.TYPES.COLOR;
92
+ }
93
+ return undefined;
94
+ }
95
+ res = colorRegEx3.exec(val);
96
+ if (res !== null) {
97
+ parts = res[1].split(/\s*,\s*/);
98
+ if (parts.length !== 4) {
99
+ return undefined;
100
+ }
101
+ if (
102
+ parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx)) ||
103
+ parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx))
104
+ ) {
105
+ if (numberRegEx.test(parts[3])) {
106
+ return exports.TYPES.COLOR;
107
+ }
108
+ }
109
+ return undefined;
110
+ }
111
+
112
+ if (colorRegEx4.test(val)) {
113
+ return exports.TYPES.COLOR;
114
+ }
115
+
116
+ // could still be a color, one of the standard keyword colors
117
+ val = val.toLowerCase();
118
+
119
+ if (namedColors.includes(val)) {
120
+ return exports.TYPES.COLOR;
121
+ }
122
+
123
+ switch (val) {
124
+ // the following are deprecated in CSS3
125
+ case 'activeborder':
126
+ case 'activecaption':
127
+ case 'appworkspace':
128
+ case 'background':
129
+ case 'buttonface':
130
+ case 'buttonhighlight':
131
+ case 'buttonshadow':
132
+ case 'buttontext':
133
+ case 'captiontext':
134
+ case 'graytext':
135
+ case 'highlight':
136
+ case 'highlighttext':
137
+ case 'inactiveborder':
138
+ case 'inactivecaption':
139
+ case 'inactivecaptiontext':
140
+ case 'infobackground':
141
+ case 'infotext':
142
+ case 'menu':
143
+ case 'menutext':
144
+ case 'scrollbar':
145
+ case 'threeddarkshadow':
146
+ case 'threedface':
147
+ case 'threedhighlight':
148
+ case 'threedlightshadow':
149
+ case 'threedshadow':
150
+ case 'window':
151
+ case 'windowframe':
152
+ case 'windowtext':
153
+ return exports.TYPES.COLOR;
154
+ default:
155
+ return exports.TYPES.KEYWORD;
156
+ }
157
+ };
158
+
159
+ exports.parseInteger = function parseInteger(val) {
160
+ var type = exports.valueType(val);
161
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
162
+ return val;
163
+ }
164
+ if (type !== exports.TYPES.INTEGER) {
165
+ return undefined;
166
+ }
167
+ return String(parseInt(val, 10));
168
+ };
169
+
170
+ exports.parseNumber = function parseNumber(val) {
171
+ var type = exports.valueType(val);
172
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
173
+ return val;
174
+ }
175
+ if (type !== exports.TYPES.NUMBER && type !== exports.TYPES.INTEGER) {
176
+ return undefined;
177
+ }
178
+ return String(parseFloat(val));
179
+ };
180
+
181
+ exports.parseLength = function parseLength(val) {
182
+ if (val === 0 || val === '0') {
183
+ return '0px';
184
+ }
185
+ var type = exports.valueType(val);
186
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
187
+ return val;
188
+ }
189
+ if (type !== exports.TYPES.LENGTH) {
190
+ return undefined;
191
+ }
192
+ return val;
193
+ };
194
+
195
+ exports.parsePercent = function parsePercent(val) {
196
+ if (val === 0 || val === '0') {
197
+ return '0%';
198
+ }
199
+ var type = exports.valueType(val);
200
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
201
+ return val;
202
+ }
203
+ if (type !== exports.TYPES.PERCENT) {
204
+ return undefined;
205
+ }
206
+ return val;
207
+ };
208
+
209
+ // either a length or a percent
210
+ exports.parseMeasurement = function parseMeasurement(val) {
211
+ var type = exports.valueType(val);
212
+ if (type === exports.TYPES.CALC) {
213
+ return val;
214
+ }
215
+
216
+ var length = exports.parseLength(val);
217
+ if (length !== undefined) {
218
+ return length;
219
+ }
220
+ return exports.parsePercent(val);
221
+ };
222
+
223
+ exports.parseUrl = function parseUrl(val) {
224
+ var type = exports.valueType(val);
225
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
226
+ return val;
227
+ }
228
+ var res = urlRegEx.exec(val);
229
+ // does it match the regex?
230
+ if (!res) {
231
+ return undefined;
232
+ }
233
+ var str = res[1];
234
+ // if it starts with single or double quotes, does it end with the same?
235
+ if ((str[0] === '"' || str[0] === "'") && str[0] !== str[str.length - 1]) {
236
+ return undefined;
237
+ }
238
+ if (str[0] === '"' || str[0] === "'") {
239
+ str = str.substr(1, str.length - 2);
240
+ }
241
+
242
+ var i;
243
+ for (i = 0; i < str.length; i++) {
244
+ switch (str[i]) {
245
+ case '(':
246
+ case ')':
247
+ case ' ':
248
+ case '\t':
249
+ case '\n':
250
+ case "'":
251
+ case '"':
252
+ return undefined;
253
+ case '\\':
254
+ i++;
255
+ break;
256
+ }
257
+ }
258
+
259
+ return 'url(' + str + ')';
260
+ };
261
+
262
+ exports.parseString = function parseString(val) {
263
+ var type = exports.valueType(val);
264
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
265
+ return val;
266
+ }
267
+ if (type !== exports.TYPES.STRING) {
268
+ return undefined;
269
+ }
270
+ var i;
271
+ for (i = 1; i < val.length - 1; i++) {
272
+ switch (val[i]) {
273
+ case val[0]:
274
+ return undefined;
275
+ case '\\':
276
+ i++;
277
+ while (i < val.length - 1 && /[0-9A-Fa-f]/.test(val[i])) {
278
+ i++;
279
+ }
280
+ break;
281
+ }
282
+ }
283
+ if (i >= val.length) {
284
+ return undefined;
285
+ }
286
+ return val;
287
+ };
288
+
289
+ exports.parseColor = function parseColor(val) {
290
+ var type = exports.valueType(val);
291
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
292
+ return val;
293
+ }
294
+ var red,
295
+ green,
296
+ blue,
297
+ hue,
298
+ saturation,
299
+ lightness,
300
+ alpha = 1;
301
+ var parts;
302
+ var res = colorRegEx1.exec(val);
303
+ // is it #aaa, #ababab, #aaaa, #abababaa
304
+ if (res) {
305
+ var defaultHex = val.substr(1);
306
+ var hex = val.substr(1);
307
+ if (hex.length === 3 || hex.length === 4) {
308
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
309
+
310
+ if (defaultHex.length === 4) {
311
+ hex = hex + defaultHex[3] + defaultHex[3];
312
+ }
313
+ }
314
+ red = parseInt(hex.substr(0, 2), 16);
315
+ green = parseInt(hex.substr(2, 2), 16);
316
+ blue = parseInt(hex.substr(4, 2), 16);
317
+ if (hex.length === 8) {
318
+ var hexAlpha = hex.substr(6, 2);
319
+ var hexAlphaToRgbaAlpha = Number((parseInt(hexAlpha, 16) / 255).toFixed(3));
320
+
321
+ return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + hexAlphaToRgbaAlpha + ')';
322
+ }
323
+ return 'rgb(' + red + ', ' + green + ', ' + blue + ')';
324
+ }
325
+
326
+ res = colorRegEx2.exec(val);
327
+ if (res) {
328
+ parts = res[1].split(/\s*,\s*/);
329
+ if (parts.length !== 3) {
330
+ return undefined;
331
+ }
332
+ if (parts.every(percentRegEx.test.bind(percentRegEx))) {
333
+ red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100);
334
+ green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100);
335
+ blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100);
336
+ } else if (parts.every(integerRegEx.test.bind(integerRegEx))) {
337
+ red = parseInt(parts[0], 10);
338
+ green = parseInt(parts[1], 10);
339
+ blue = parseInt(parts[2], 10);
340
+ } else {
341
+ return undefined;
342
+ }
343
+ red = Math.min(255, Math.max(0, red));
344
+ green = Math.min(255, Math.max(0, green));
345
+ blue = Math.min(255, Math.max(0, blue));
346
+ return 'rgb(' + red + ', ' + green + ', ' + blue + ')';
347
+ }
348
+
349
+ res = colorRegEx3.exec(val);
350
+ if (res) {
351
+ parts = res[1].split(/\s*,\s*/);
352
+ if (parts.length !== 4) {
353
+ return undefined;
354
+ }
355
+ if (parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx))) {
356
+ red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100);
357
+ green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100);
358
+ blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100);
359
+ alpha = parseFloat(parts[3]);
360
+ } else if (parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx))) {
361
+ red = parseInt(parts[0], 10);
362
+ green = parseInt(parts[1], 10);
363
+ blue = parseInt(parts[2], 10);
364
+ alpha = parseFloat(parts[3]);
365
+ } else {
366
+ return undefined;
367
+ }
368
+ if (isNaN(alpha)) {
369
+ alpha = 1;
370
+ }
371
+ red = Math.min(255, Math.max(0, red));
372
+ green = Math.min(255, Math.max(0, green));
373
+ blue = Math.min(255, Math.max(0, blue));
374
+ alpha = Math.min(1, Math.max(0, alpha));
375
+ if (alpha === 1) {
376
+ return 'rgb(' + red + ', ' + green + ', ' + blue + ')';
377
+ }
378
+ return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + alpha + ')';
379
+ }
380
+
381
+ res = colorRegEx4.exec(val);
382
+ if (res) {
383
+ const [, _hue, _saturation, _lightness, _alphaString = ''] = res;
384
+ const _alpha = parseFloat(_alphaString.replace(',', '').trim());
385
+ if (!_hue || !_saturation || !_lightness) {
386
+ return undefined;
387
+ }
388
+ hue = parseFloat(_hue);
389
+ saturation = parseInt(_saturation, 10);
390
+ lightness = parseInt(_lightness, 10);
391
+ if (_alpha && numberRegEx.test(_alpha)) {
392
+ alpha = parseFloat(_alpha);
393
+ }
394
+
395
+ const [r, g, b] = hslToRgb(hue, saturation / 100, lightness / 100);
396
+ if (!_alphaString || alpha === 1) {
397
+ return 'rgb(' + r + ', ' + g + ', ' + b + ')';
398
+ }
399
+ return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')';
400
+ }
401
+
402
+ if (type === exports.TYPES.COLOR) {
403
+ return val;
404
+ }
405
+ return undefined;
406
+ };
407
+
408
+ exports.parseAngle = function parseAngle(val) {
409
+ var type = exports.valueType(val);
410
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
411
+ return val;
412
+ }
413
+ if (type !== exports.TYPES.ANGLE) {
414
+ return undefined;
415
+ }
416
+ var res = angleRegEx.exec(val);
417
+ var flt = parseFloat(res[1]);
418
+ if (res[2] === 'rad') {
419
+ flt *= 180 / Math.PI;
420
+ } else if (res[2] === 'grad') {
421
+ flt *= 360 / 400;
422
+ }
423
+
424
+ while (flt < 0) {
425
+ flt += 360;
426
+ }
427
+ while (flt > 360) {
428
+ flt -= 360;
429
+ }
430
+ return flt + 'deg';
431
+ };
432
+
433
+ exports.parseKeyword = function parseKeyword(val, valid_keywords) {
434
+ var type = exports.valueType(val);
435
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
436
+ return val;
437
+ }
438
+ if (type !== exports.TYPES.KEYWORD) {
439
+ return undefined;
440
+ }
441
+ val = val.toString().toLowerCase();
442
+ var i;
443
+ for (i = 0; i < valid_keywords.length; i++) {
444
+ if (valid_keywords[i].toLowerCase() === val) {
445
+ return valid_keywords[i];
446
+ }
447
+ }
448
+ return undefined;
449
+ };
450
+
451
+ // utility to translate from border-width to borderWidth
452
+ var dashedToCamelCase = function (dashed) {
453
+ var i;
454
+ var camel = '';
455
+ var nextCap = false;
456
+ for (i = 0; i < dashed.length; i++) {
457
+ if (dashed[i] !== '-') {
458
+ camel += nextCap ? dashed[i].toUpperCase() : dashed[i];
459
+ nextCap = false;
460
+ } else {
461
+ nextCap = true;
462
+ }
463
+ }
464
+ return camel;
465
+ };
466
+ exports.dashedToCamelCase = dashedToCamelCase;
467
+
468
+ var is_space = /\s/;
469
+ var opening_deliminators = ['"', "'", '('];
470
+ var closing_deliminators = ['"', "'", ')'];
471
+ // this splits on whitespace, but keeps quoted and parened parts together
472
+ var getParts = function (str) {
473
+ var deliminator_stack = [];
474
+ var length = str.length;
475
+ var i;
476
+ var parts = [];
477
+ var current_part = '';
478
+ var opening_index;
479
+ var closing_index;
480
+ for (i = 0; i < length; i++) {
481
+ opening_index = opening_deliminators.indexOf(str[i]);
482
+ closing_index = closing_deliminators.indexOf(str[i]);
483
+ if (is_space.test(str[i])) {
484
+ if (deliminator_stack.length === 0) {
485
+ if (current_part !== '') {
486
+ parts.push(current_part);
487
+ }
488
+ current_part = '';
489
+ } else {
490
+ current_part += str[i];
491
+ }
492
+ } else {
493
+ if (str[i] === '\\') {
494
+ i++;
495
+ current_part += str[i];
496
+ } else {
497
+ current_part += str[i];
498
+ if (
499
+ closing_index !== -1 &&
500
+ closing_index === deliminator_stack[deliminator_stack.length - 1]
501
+ ) {
502
+ deliminator_stack.pop();
503
+ } else if (opening_index !== -1) {
504
+ deliminator_stack.push(opening_index);
505
+ }
506
+ }
507
+ }
508
+ }
509
+ if (current_part !== '') {
510
+ parts.push(current_part);
511
+ }
512
+ return parts;
513
+ };
514
+
515
+ /*
516
+ * this either returns undefined meaning that it isn't valid
517
+ * or returns an object where the keys are dashed short
518
+ * hand properties and the values are the values to set
519
+ * on them
520
+ */
521
+ exports.shorthandParser = function parse(v, shorthand_for) {
522
+ var obj = {};
523
+ var type = exports.valueType(v);
524
+ if (type === exports.TYPES.NULL_OR_EMPTY_STR) {
525
+ Object.keys(shorthand_for).forEach(function (property) {
526
+ obj[property] = '';
527
+ });
528
+ return obj;
529
+ }
530
+
531
+ if (typeof v === 'number') {
532
+ v = v.toString();
533
+ }
534
+
535
+ if (typeof v !== 'string') {
536
+ return undefined;
537
+ }
538
+
539
+ if (v.toLowerCase() === 'inherit') {
540
+ return {};
541
+ }
542
+ var parts = getParts(v);
543
+ var valid = true;
544
+ parts.forEach(function (part, i) {
545
+ var part_valid = false;
546
+ Object.keys(shorthand_for).forEach(function (property) {
547
+ if (shorthand_for[property].isValid(part, i)) {
548
+ part_valid = true;
549
+ obj[property] = part;
550
+ }
551
+ });
552
+ valid = valid && part_valid;
553
+ });
554
+ if (!valid) {
555
+ return undefined;
556
+ }
557
+ return obj;
558
+ };
559
+
560
+ exports.shorthandSetter = function (property, shorthand_for) {
561
+ return function (v) {
562
+ var obj = exports.shorthandParser(v, shorthand_for);
563
+ if (obj === undefined) {
564
+ return;
565
+ }
566
+ //console.log('shorthandSetter for:', property, 'obj:', obj);
567
+ Object.keys(obj).forEach(function (subprop) {
568
+ // in case subprop is an implicit property, this will clear
569
+ // *its* subpropertiesX
570
+ var camel = dashedToCamelCase(subprop);
571
+ this[camel] = obj[subprop];
572
+ // in case it gets translated into something else (0 -> 0px)
573
+ obj[subprop] = this[camel];
574
+ this.removeProperty(subprop);
575
+ // don't add in empty properties
576
+ if (obj[subprop] !== '') {
577
+ this._values[subprop] = obj[subprop];
578
+ }
579
+ }, this);
580
+ Object.keys(shorthand_for).forEach(function (subprop) {
581
+ if (!obj.hasOwnProperty(subprop)) {
582
+ this.removeProperty(subprop);
583
+ delete this._values[subprop];
584
+ }
585
+ }, this);
586
+ // in case the value is something like 'none' that removes all values,
587
+ // check that the generated one is not empty, first remove the property
588
+ // if it already exists, then call the shorthandGetter, if it's an empty
589
+ // string, don't set the property
590
+ this.removeProperty(property);
591
+ var calculated = exports.shorthandGetter(property, shorthand_for).call(this);
592
+ if (calculated !== '') {
593
+ this._setProperty(property, calculated);
594
+ }
595
+ };
596
+ };
597
+
598
+ exports.shorthandGetter = function (property, shorthand_for) {
599
+ return function () {
600
+ if (this._values[property] !== undefined) {
601
+ return this.getPropertyValue(property);
602
+ }
603
+ return Object.keys(shorthand_for)
604
+ .map(function (subprop) {
605
+ return this.getPropertyValue(subprop);
606
+ }, this)
607
+ .filter(function (value) {
608
+ return value !== '';
609
+ })
610
+ .join(' ');
611
+ };
612
+ };
613
+
614
+ // isValid(){1,4} | inherit
615
+ // if one, it applies to all
616
+ // if two, the first applies to the top and bottom, and the second to left and right
617
+ // if three, the first applies to the top, the second to left and right, the third bottom
618
+ // if four, top, right, bottom, left
619
+ exports.implicitSetter = function (property_before, property_after, isValid, parser) {
620
+ property_after = property_after || '';
621
+ if (property_after !== '') {
622
+ property_after = '-' + property_after;
623
+ }
624
+ var part_names = ['top', 'right', 'bottom', 'left'];
625
+
626
+ return function (v) {
627
+ if (typeof v === 'number') {
628
+ v = v.toString();
629
+ }
630
+ if (typeof v !== 'string') {
631
+ return undefined;
632
+ }
633
+ var parts;
634
+ if (v.toLowerCase() === 'inherit' || v === '') {
635
+ parts = [v];
636
+ } else {
637
+ parts = getParts(v);
638
+ }
639
+ if (parts.length < 1 || parts.length > 4) {
640
+ return undefined;
641
+ }
642
+
643
+ if (!parts.every(isValid)) {
644
+ return undefined;
645
+ }
646
+
647
+ parts = parts.map(function (part) {
648
+ return parser(part);
649
+ });
650
+ this._setProperty(property_before + property_after, parts.join(' '));
651
+ if (parts.length === 1) {
652
+ parts[1] = parts[0];
653
+ }
654
+ if (parts.length === 2) {
655
+ parts[2] = parts[0];
656
+ }
657
+ if (parts.length === 3) {
658
+ parts[3] = parts[1];
659
+ }
660
+
661
+ for (var i = 0; i < 4; i++) {
662
+ var property = property_before + '-' + part_names[i] + property_after;
663
+ this.removeProperty(property);
664
+ if (parts[i] !== '') {
665
+ this._values[property] = parts[i];
666
+ }
667
+ }
668
+ return v;
669
+ };
670
+ };
671
+
672
+ //
673
+ // Companion to implicitSetter, but for the individual parts.
674
+ // This sets the individual value, and checks to see if all four
675
+ // sub-parts are set. If so, it sets the shorthand version and removes
676
+ // the individual parts from the cssText.
677
+ //
678
+ exports.subImplicitSetter = function (prefix, part, isValid, parser) {
679
+ var property = prefix + '-' + part;
680
+ var subparts = [prefix + '-top', prefix + '-right', prefix + '-bottom', prefix + '-left'];
681
+
682
+ return function (v) {
683
+ if (typeof v === 'number') {
684
+ v = v.toString();
685
+ }
686
+ if (v === null) {
687
+ v = '';
688
+ }
689
+ if (typeof v !== 'string') {
690
+ return undefined;
691
+ }
692
+ if (!isValid(v)) {
693
+ return undefined;
694
+ }
695
+ v = parser(v);
696
+ this._setProperty(property, v);
697
+
698
+ var combinedPriority = this.getPropertyPriority(prefix);
699
+ var parts = subparts.map((subpart) => this._values[subpart]);
700
+ var priorities = subparts.map((subpart) => this.getPropertyPriority(subpart));
701
+ // Combine into a single property if all values are set and have the same priority
702
+ if (
703
+ parts.every((p) => p !== '' && p != null) &&
704
+ priorities.every((p) => p === priorities[0]) &&
705
+ priorities[0] === combinedPriority
706
+ ) {
707
+ for (var i = 0; i < subparts.length; i++) {
708
+ this.removeProperty(subparts[i]);
709
+ this._values[subparts[i]] = parts[i];
710
+ }
711
+ this._setProperty(prefix, parts.join(' '), priorities[0]);
712
+ } else {
713
+ this.removeProperty(prefix);
714
+ for (var j = 0; j < subparts.length; j++) {
715
+ // The property we're setting won't be important, the rest will either keep their priority or inherit it from the combined property
716
+ var priority = subparts[j] === property ? '' : priorities[j] || combinedPriority;
717
+ this._setProperty(subparts[j], parts[j], priority);
718
+ }
719
+ }
720
+ return v;
721
+ };
722
+ };
723
+
724
+ var camel_to_dashed = /[A-Z]/g;
725
+ var first_segment = /^\([^-]\)-/;
726
+ var vendor_prefixes = ['o', 'moz', 'ms', 'webkit'];
727
+ exports.camelToDashed = function (camel_case) {
728
+ var match;
729
+ var dashed = camel_case.replace(camel_to_dashed, '-$&').toLowerCase();
730
+ match = dashed.match(first_segment);
731
+ if (match && vendor_prefixes.indexOf(match[1]) !== -1) {
732
+ dashed = '-' + dashed;
733
+ }
734
+ return dashed;
735
+ };
node_modules/cssstyle/lib/properties.js ADDED
@@ -0,0 +1,1674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ // autogenerated - 9/7/2024
4
+
5
+ /*
6
+ *
7
+ * https://www.w3.org/Style/CSS/all-properties.en.html
8
+ */
9
+
10
+ var external_dependency_parsers_0 = require("./parsers.js");
11
+ var external_dependency_constants_1 = require("./constants.js");
12
+ var azimuth_export_definition;
13
+ azimuth_export_definition = {
14
+ set: function (v) {
15
+ var valueType = external_dependency_parsers_0.valueType(v);
16
+ if (valueType === external_dependency_parsers_0.TYPES.ANGLE) {
17
+ return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v));
18
+ }
19
+ if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) {
20
+ var keywords = v.toLowerCase().trim().split(/\s+/);
21
+ var hasBehind = false;
22
+ if (keywords.length > 2) {
23
+ return;
24
+ }
25
+ var behindIndex = keywords.indexOf('behind');
26
+ hasBehind = behindIndex !== -1;
27
+ if (keywords.length === 2) {
28
+ if (!hasBehind) {
29
+ return;
30
+ }
31
+ keywords.splice(behindIndex, 1);
32
+ }
33
+ if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') {
34
+ if (hasBehind) {
35
+ return;
36
+ }
37
+ return this._setProperty('azimuth', keywords[0]);
38
+ }
39
+ if (keywords[0] === 'behind') {
40
+ return this._setProperty('azimuth', '180deg');
41
+ }
42
+ switch (keywords[0]) {
43
+ case 'left-side':
44
+ return this._setProperty('azimuth', '270deg');
45
+ case 'far-left':
46
+ return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg');
47
+ case 'left':
48
+ return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg');
49
+ case 'center-left':
50
+ return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg');
51
+ case 'center':
52
+ return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg');
53
+ case 'center-right':
54
+ return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg');
55
+ case 'right':
56
+ return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg');
57
+ case 'far-right':
58
+ return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg');
59
+ case 'right-side':
60
+ return this._setProperty('azimuth', '90deg');
61
+ default:
62
+ return;
63
+ }
64
+ }
65
+ },
66
+ get: function () {
67
+ return this.getPropertyValue('azimuth');
68
+ },
69
+ enumerable: true,
70
+ configurable: true
71
+ };
72
+ var backgroundColor_export_isValid, backgroundColor_export_definition;
73
+ var backgroundColor_local_var_parse = function parse(v) {
74
+ var parsed = external_dependency_parsers_0.parseColor(v);
75
+ if (parsed !== undefined) {
76
+ return parsed;
77
+ }
78
+ if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) {
79
+ return v;
80
+ }
81
+ return undefined;
82
+ };
83
+ backgroundColor_export_isValid = function isValid(v) {
84
+ return backgroundColor_local_var_parse(v) !== undefined;
85
+ };
86
+ backgroundColor_export_definition = {
87
+ set: function (v) {
88
+ var parsed = backgroundColor_local_var_parse(v);
89
+ if (parsed === undefined) {
90
+ return;
91
+ }
92
+ this._setProperty('background-color', parsed);
93
+ },
94
+ get: function () {
95
+ return this.getPropertyValue('background-color');
96
+ },
97
+ enumerable: true,
98
+ configurable: true
99
+ };
100
+ var backgroundImage_export_isValid, backgroundImage_export_definition;
101
+ var backgroundImage_local_var_parse = function parse(v) {
102
+ var parsed = external_dependency_parsers_0.parseUrl(v);
103
+ if (parsed !== undefined) {
104
+ return parsed;
105
+ }
106
+ if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) {
107
+ return v;
108
+ }
109
+ return undefined;
110
+ };
111
+ backgroundImage_export_isValid = function isValid(v) {
112
+ return backgroundImage_local_var_parse(v) !== undefined;
113
+ };
114
+ backgroundImage_export_definition = {
115
+ set: function (v) {
116
+ this._setProperty('background-image', backgroundImage_local_var_parse(v));
117
+ },
118
+ get: function () {
119
+ return this.getPropertyValue('background-image');
120
+ },
121
+ enumerable: true,
122
+ configurable: true
123
+ };
124
+ var backgroundRepeat_export_isValid, backgroundRepeat_export_definition;
125
+ var backgroundRepeat_local_var_parse = function parse(v) {
126
+ if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) {
127
+ return v;
128
+ }
129
+ return undefined;
130
+ };
131
+ backgroundRepeat_export_isValid = function isValid(v) {
132
+ return backgroundRepeat_local_var_parse(v) !== undefined;
133
+ };
134
+ backgroundRepeat_export_definition = {
135
+ set: function (v) {
136
+ this._setProperty('background-repeat', backgroundRepeat_local_var_parse(v));
137
+ },
138
+ get: function () {
139
+ return this.getPropertyValue('background-repeat');
140
+ },
141
+ enumerable: true,
142
+ configurable: true
143
+ };
144
+ var backgroundAttachment_export_isValid, backgroundAttachment_export_definition;
145
+ var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) {
146
+ return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');
147
+ };
148
+ backgroundAttachment_export_definition = {
149
+ set: function (v) {
150
+ if (!backgroundAttachment_local_var_isValid(v)) {
151
+ return;
152
+ }
153
+ this._setProperty('background-attachment', v);
154
+ },
155
+ get: function () {
156
+ return this.getPropertyValue('background-attachment');
157
+ },
158
+ enumerable: true,
159
+ configurable: true
160
+ };
161
+ var backgroundPosition_export_isValid, backgroundPosition_export_definition;
162
+ var backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right'];
163
+ var backgroundPosition_local_var_parse = function parse(v) {
164
+ if (v === '' || v === null) {
165
+ return undefined;
166
+ }
167
+ var parts = v.split(/\s+/);
168
+ if (parts.length > 2 || parts.length < 1) {
169
+ return undefined;
170
+ }
171
+ var types = [];
172
+ parts.forEach(function (part, index) {
173
+ types[index] = external_dependency_parsers_0.valueType(part);
174
+ });
175
+ if (parts.length === 1) {
176
+ if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) {
177
+ return v;
178
+ }
179
+ if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) {
180
+ if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') {
181
+ return v;
182
+ }
183
+ }
184
+ return undefined;
185
+ }
186
+ if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) {
187
+ return v;
188
+ }
189
+ if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) {
190
+ return undefined;
191
+ }
192
+ if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) {
193
+ return v;
194
+ }
195
+ return undefined;
196
+ };
197
+ backgroundPosition_export_isValid = function isValid(v) {
198
+ return backgroundPosition_local_var_parse(v) !== undefined;
199
+ };
200
+ backgroundPosition_export_definition = {
201
+ set: function (v) {
202
+ this._setProperty('background-position', backgroundPosition_local_var_parse(v));
203
+ },
204
+ get: function () {
205
+ return this.getPropertyValue('background-position');
206
+ },
207
+ enumerable: true,
208
+ configurable: true
209
+ };
210
+ var background_export_definition;
211
+ var background_local_var_shorthand_for = {
212
+ 'background-color': {
213
+ isValid: backgroundColor_export_isValid,
214
+ definition: backgroundColor_export_definition
215
+ },
216
+ 'background-image': {
217
+ isValid: backgroundImage_export_isValid,
218
+ definition: backgroundImage_export_definition
219
+ },
220
+ 'background-repeat': {
221
+ isValid: backgroundRepeat_export_isValid,
222
+ definition: backgroundRepeat_export_definition
223
+ },
224
+ 'background-attachment': {
225
+ isValid: backgroundAttachment_export_isValid,
226
+ definition: backgroundAttachment_export_definition
227
+ },
228
+ 'background-position': {
229
+ isValid: backgroundPosition_export_isValid,
230
+ definition: backgroundPosition_export_definition
231
+ }
232
+ };
233
+ background_export_definition = {
234
+ set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for),
235
+ get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for),
236
+ enumerable: true,
237
+ configurable: true
238
+ };
239
+ var borderWidth_export_isValid, borderWidth_export_definition;
240
+ // the valid border-widths:
241
+ var borderWidth_local_var_widths = ['thin', 'medium', 'thick'];
242
+ borderWidth_export_isValid = function parse(v) {
243
+ var length = external_dependency_parsers_0.parseLength(v);
244
+ if (length !== undefined) {
245
+ return true;
246
+ }
247
+ if (typeof v !== 'string') {
248
+ return false;
249
+ }
250
+ if (v === '') {
251
+ return true;
252
+ }
253
+ v = v.toLowerCase();
254
+ if (borderWidth_local_var_widths.indexOf(v) === -1) {
255
+ return false;
256
+ }
257
+ return true;
258
+ };
259
+ var borderWidth_local_var_isValid = borderWidth_export_isValid;
260
+ var borderWidth_local_var_parser = function (v) {
261
+ var length = external_dependency_parsers_0.parseLength(v);
262
+ if (length !== undefined) {
263
+ return length;
264
+ }
265
+ if (borderWidth_local_var_isValid(v)) {
266
+ return v.toLowerCase();
267
+ }
268
+ return undefined;
269
+ };
270
+ borderWidth_export_definition = {
271
+ set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser),
272
+ get: function () {
273
+ return this.getPropertyValue('border-width');
274
+ },
275
+ enumerable: true,
276
+ configurable: true
277
+ };
278
+ var borderStyle_export_isValid, borderStyle_export_definition;
279
+ // the valid border-styles:
280
+ var borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'];
281
+ borderStyle_export_isValid = function parse(v) {
282
+ return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1);
283
+ };
284
+ var borderStyle_local_var_isValid = borderStyle_export_isValid;
285
+ var borderStyle_local_var_parser = function (v) {
286
+ if (borderStyle_local_var_isValid(v)) {
287
+ return v.toLowerCase();
288
+ }
289
+ return undefined;
290
+ };
291
+ borderStyle_export_definition = {
292
+ set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser),
293
+ get: function () {
294
+ return this.getPropertyValue('border-style');
295
+ },
296
+ enumerable: true,
297
+ configurable: true
298
+ };
299
+ var borderColor_export_isValid, borderColor_export_definition;
300
+ borderColor_export_isValid = function parse(v) {
301
+ if (typeof v !== 'string') {
302
+ return false;
303
+ }
304
+ return v === '' || v.toLowerCase() === 'transparent' || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.COLOR;
305
+ };
306
+ var borderColor_local_var_isValid = borderColor_export_isValid;
307
+ var borderColor_local_var_parser = function (v) {
308
+ if (borderColor_local_var_isValid(v)) {
309
+ return v.toLowerCase();
310
+ }
311
+ return undefined;
312
+ };
313
+ borderColor_export_definition = {
314
+ set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser),
315
+ get: function () {
316
+ return this.getPropertyValue('border-color');
317
+ },
318
+ enumerable: true,
319
+ configurable: true
320
+ };
321
+ var border_export_definition;
322
+ var border_local_var_shorthand_for = {
323
+ 'border-width': {
324
+ isValid: borderWidth_export_isValid,
325
+ definition: borderWidth_export_definition
326
+ },
327
+ 'border-style': {
328
+ isValid: borderStyle_export_isValid,
329
+ definition: borderStyle_export_definition
330
+ },
331
+ 'border-color': {
332
+ isValid: borderColor_export_isValid,
333
+ definition: borderColor_export_definition
334
+ }
335
+ };
336
+ var border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for);
337
+ var border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for);
338
+ border_export_definition = {
339
+ set: function (v) {
340
+ if (v.toString().toLowerCase() === 'none') {
341
+ v = '';
342
+ }
343
+ border_local_var_myShorthandSetter.call(this, v);
344
+ this.removeProperty('border-top');
345
+ this.removeProperty('border-left');
346
+ this.removeProperty('border-right');
347
+ this.removeProperty('border-bottom');
348
+ this._values['border-top'] = this._values.border;
349
+ this._values['border-left'] = this._values.border;
350
+ this._values['border-right'] = this._values.border;
351
+ this._values['border-bottom'] = this._values.border;
352
+ },
353
+ get: border_local_var_myShorthandGetter,
354
+ enumerable: true,
355
+ configurable: true
356
+ };
357
+ var borderBottomWidth_export_isValid, borderBottomWidth_export_definition;
358
+ var borderBottomWidth_local_var_isValid = borderBottomWidth_export_isValid = borderWidth_export_isValid;
359
+ borderBottomWidth_export_definition = {
360
+ set: function (v) {
361
+ if (borderBottomWidth_local_var_isValid(v)) {
362
+ this._setProperty('border-bottom-width', v);
363
+ }
364
+ },
365
+ get: function () {
366
+ return this.getPropertyValue('border-bottom-width');
367
+ },
368
+ enumerable: true,
369
+ configurable: true
370
+ };
371
+ var borderBottomStyle_export_isValid, borderBottomStyle_export_definition;
372
+ borderBottomStyle_export_isValid = borderStyle_export_isValid;
373
+ borderBottomStyle_export_definition = {
374
+ set: function (v) {
375
+ if (borderStyle_export_isValid(v)) {
376
+ if (v.toLowerCase() === 'none') {
377
+ v = '';
378
+ this.removeProperty('border-bottom-width');
379
+ }
380
+ this._setProperty('border-bottom-style', v);
381
+ }
382
+ },
383
+ get: function () {
384
+ return this.getPropertyValue('border-bottom-style');
385
+ },
386
+ enumerable: true,
387
+ configurable: true
388
+ };
389
+ var borderBottomColor_export_isValid, borderBottomColor_export_definition;
390
+ var borderBottomColor_local_var_isValid = borderBottomColor_export_isValid = borderColor_export_isValid;
391
+ borderBottomColor_export_definition = {
392
+ set: function (v) {
393
+ if (borderBottomColor_local_var_isValid(v)) {
394
+ this._setProperty('border-bottom-color', v);
395
+ }
396
+ },
397
+ get: function () {
398
+ return this.getPropertyValue('border-bottom-color');
399
+ },
400
+ enumerable: true,
401
+ configurable: true
402
+ };
403
+ var borderBottom_export_definition;
404
+ var borderBottom_local_var_shorthand_for = {
405
+ 'border-bottom-width': {
406
+ isValid: borderBottomWidth_export_isValid,
407
+ definition: borderBottomWidth_export_definition
408
+ },
409
+ 'border-bottom-style': {
410
+ isValid: borderBottomStyle_export_isValid,
411
+ definition: borderBottomStyle_export_definition
412
+ },
413
+ 'border-bottom-color': {
414
+ isValid: borderBottomColor_export_isValid,
415
+ definition: borderBottomColor_export_definition
416
+ }
417
+ };
418
+ borderBottom_export_definition = {
419
+ set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for),
420
+ get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for),
421
+ enumerable: true,
422
+ configurable: true
423
+ };
424
+ var borderCollapse_export_definition;
425
+ var borderCollapse_local_var_parse = function parse(v) {
426
+ if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) {
427
+ return v;
428
+ }
429
+ return undefined;
430
+ };
431
+ borderCollapse_export_definition = {
432
+ set: function (v) {
433
+ this._setProperty('border-collapse', borderCollapse_local_var_parse(v));
434
+ },
435
+ get: function () {
436
+ return this.getPropertyValue('border-collapse');
437
+ },
438
+ enumerable: true,
439
+ configurable: true
440
+ };
441
+ var borderLeftWidth_export_isValid, borderLeftWidth_export_definition;
442
+ var borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid;
443
+ borderLeftWidth_export_definition = {
444
+ set: function (v) {
445
+ if (borderLeftWidth_local_var_isValid(v)) {
446
+ this._setProperty('border-left-width', v);
447
+ }
448
+ },
449
+ get: function () {
450
+ return this.getPropertyValue('border-left-width');
451
+ },
452
+ enumerable: true,
453
+ configurable: true
454
+ };
455
+ var borderLeftStyle_export_isValid, borderLeftStyle_export_definition;
456
+ borderLeftStyle_export_isValid = borderStyle_export_isValid;
457
+ borderLeftStyle_export_definition = {
458
+ set: function (v) {
459
+ if (borderStyle_export_isValid(v)) {
460
+ if (v.toLowerCase() === 'none') {
461
+ v = '';
462
+ this.removeProperty('border-left-width');
463
+ }
464
+ this._setProperty('border-left-style', v);
465
+ }
466
+ },
467
+ get: function () {
468
+ return this.getPropertyValue('border-left-style');
469
+ },
470
+ enumerable: true,
471
+ configurable: true
472
+ };
473
+ var borderLeftColor_export_isValid, borderLeftColor_export_definition;
474
+ var borderLeftColor_local_var_isValid = borderLeftColor_export_isValid = borderColor_export_isValid;
475
+ borderLeftColor_export_definition = {
476
+ set: function (v) {
477
+ if (borderLeftColor_local_var_isValid(v)) {
478
+ this._setProperty('border-left-color', v);
479
+ }
480
+ },
481
+ get: function () {
482
+ return this.getPropertyValue('border-left-color');
483
+ },
484
+ enumerable: true,
485
+ configurable: true
486
+ };
487
+ var borderLeft_export_definition;
488
+ var borderLeft_local_var_shorthand_for = {
489
+ 'border-left-width': {
490
+ isValid: borderLeftWidth_export_isValid,
491
+ definition: borderLeftWidth_export_definition
492
+ },
493
+ 'border-left-style': {
494
+ isValid: borderLeftStyle_export_isValid,
495
+ definition: borderLeftStyle_export_definition
496
+ },
497
+ 'border-left-color': {
498
+ isValid: borderLeftColor_export_isValid,
499
+ definition: borderLeftColor_export_definition
500
+ }
501
+ };
502
+ borderLeft_export_definition = {
503
+ set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for),
504
+ get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for),
505
+ enumerable: true,
506
+ configurable: true
507
+ };
508
+ var borderRightWidth_export_isValid, borderRightWidth_export_definition;
509
+ var borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid;
510
+ borderRightWidth_export_definition = {
511
+ set: function (v) {
512
+ if (borderRightWidth_local_var_isValid(v)) {
513
+ this._setProperty('border-right-width', v);
514
+ }
515
+ },
516
+ get: function () {
517
+ return this.getPropertyValue('border-right-width');
518
+ },
519
+ enumerable: true,
520
+ configurable: true
521
+ };
522
+ var borderRightStyle_export_isValid, borderRightStyle_export_definition;
523
+ borderRightStyle_export_isValid = borderStyle_export_isValid;
524
+ borderRightStyle_export_definition = {
525
+ set: function (v) {
526
+ if (borderStyle_export_isValid(v)) {
527
+ if (v.toLowerCase() === 'none') {
528
+ v = '';
529
+ this.removeProperty('border-right-width');
530
+ }
531
+ this._setProperty('border-right-style', v);
532
+ }
533
+ },
534
+ get: function () {
535
+ return this.getPropertyValue('border-right-style');
536
+ },
537
+ enumerable: true,
538
+ configurable: true
539
+ };
540
+ var borderRightColor_export_isValid, borderRightColor_export_definition;
541
+ var borderRightColor_local_var_isValid = borderRightColor_export_isValid = borderColor_export_isValid;
542
+ borderRightColor_export_definition = {
543
+ set: function (v) {
544
+ if (borderRightColor_local_var_isValid(v)) {
545
+ this._setProperty('border-right-color', v);
546
+ }
547
+ },
548
+ get: function () {
549
+ return this.getPropertyValue('border-right-color');
550
+ },
551
+ enumerable: true,
552
+ configurable: true
553
+ };
554
+ var borderRight_export_definition;
555
+ var borderRight_local_var_shorthand_for = {
556
+ 'border-right-width': {
557
+ isValid: borderRightWidth_export_isValid,
558
+ definition: borderRightWidth_export_definition
559
+ },
560
+ 'border-right-style': {
561
+ isValid: borderRightStyle_export_isValid,
562
+ definition: borderRightStyle_export_definition
563
+ },
564
+ 'border-right-color': {
565
+ isValid: borderRightColor_export_isValid,
566
+ definition: borderRightColor_export_definition
567
+ }
568
+ };
569
+ borderRight_export_definition = {
570
+ set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for),
571
+ get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for),
572
+ enumerable: true,
573
+ configurable: true
574
+ };
575
+ var borderSpacing_export_definition;
576
+ // <length> <length>? | inherit
577
+ // if one, it applies to both horizontal and verical spacing
578
+ // if two, the first applies to the horizontal and the second applies to vertical spacing
579
+
580
+ var borderSpacing_local_var_parse = function parse(v) {
581
+ if (v === '' || v === null) {
582
+ return undefined;
583
+ }
584
+ if (v === 0) {
585
+ return '0px';
586
+ }
587
+ if (v.toLowerCase() === 'inherit') {
588
+ return v;
589
+ }
590
+ var parts = v.split(/\s+/);
591
+ if (parts.length !== 1 && parts.length !== 2) {
592
+ return undefined;
593
+ }
594
+ parts.forEach(function (part) {
595
+ if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) {
596
+ return undefined;
597
+ }
598
+ });
599
+ return v;
600
+ };
601
+ borderSpacing_export_definition = {
602
+ set: function (v) {
603
+ this._setProperty('border-spacing', borderSpacing_local_var_parse(v));
604
+ },
605
+ get: function () {
606
+ return this.getPropertyValue('border-spacing');
607
+ },
608
+ enumerable: true,
609
+ configurable: true
610
+ };
611
+ var borderTopWidth_export_isValid, borderTopWidth_export_definition;
612
+ borderTopWidth_export_isValid = borderWidth_export_isValid;
613
+ borderTopWidth_export_definition = {
614
+ set: function (v) {
615
+ if (borderWidth_export_isValid(v)) {
616
+ this._setProperty('border-top-width', v);
617
+ }
618
+ },
619
+ get: function () {
620
+ return this.getPropertyValue('border-top-width');
621
+ },
622
+ enumerable: true,
623
+ configurable: true
624
+ };
625
+ var borderTopStyle_export_isValid, borderTopStyle_export_definition;
626
+ borderTopStyle_export_isValid = borderStyle_export_isValid;
627
+ borderTopStyle_export_definition = {
628
+ set: function (v) {
629
+ if (borderStyle_export_isValid(v)) {
630
+ if (v.toLowerCase() === 'none') {
631
+ v = '';
632
+ this.removeProperty('border-top-width');
633
+ }
634
+ this._setProperty('border-top-style', v);
635
+ }
636
+ },
637
+ get: function () {
638
+ return this.getPropertyValue('border-top-style');
639
+ },
640
+ enumerable: true,
641
+ configurable: true
642
+ };
643
+ var borderTopColor_export_isValid, borderTopColor_export_definition;
644
+ var borderTopColor_local_var_isValid = borderTopColor_export_isValid = borderColor_export_isValid;
645
+ borderTopColor_export_definition = {
646
+ set: function (v) {
647
+ if (borderTopColor_local_var_isValid(v)) {
648
+ this._setProperty('border-top-color', v);
649
+ }
650
+ },
651
+ get: function () {
652
+ return this.getPropertyValue('border-top-color');
653
+ },
654
+ enumerable: true,
655
+ configurable: true
656
+ };
657
+ var borderTop_export_definition;
658
+ var borderTop_local_var_shorthand_for = {
659
+ 'border-top-width': {
660
+ isValid: borderTopWidth_export_isValid,
661
+ definition: borderTopWidth_export_definition
662
+ },
663
+ 'border-top-style': {
664
+ isValid: borderTopStyle_export_isValid,
665
+ definition: borderTopStyle_export_definition
666
+ },
667
+ 'border-top-color': {
668
+ isValid: borderTopColor_export_isValid,
669
+ definition: borderTopColor_export_definition
670
+ }
671
+ };
672
+ borderTop_export_definition = {
673
+ set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for),
674
+ get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for),
675
+ enumerable: true,
676
+ configurable: true
677
+ };
678
+ var bottom_export_definition;
679
+ bottom_export_definition = {
680
+ set: function (v) {
681
+ this._setProperty('bottom', external_dependency_parsers_0.parseMeasurement(v));
682
+ },
683
+ get: function () {
684
+ return this.getPropertyValue('bottom');
685
+ },
686
+ enumerable: true,
687
+ configurable: true
688
+ };
689
+ var clear_export_definition;
690
+ var clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit'];
691
+ clear_export_definition = {
692
+ set: function (v) {
693
+ this._setProperty('clear', external_dependency_parsers_0.parseKeyword(v, clear_local_var_clear_keywords));
694
+ },
695
+ get: function () {
696
+ return this.getPropertyValue('clear');
697
+ },
698
+ enumerable: true,
699
+ configurable: true
700
+ };
701
+ var clip_export_definition;
702
+ var clip_local_var_shape_regex = /^rect\((.*)\)$/i;
703
+ var clip_local_var_parse = function (val) {
704
+ if (val === '' || val === null) {
705
+ return val;
706
+ }
707
+ if (typeof val !== 'string') {
708
+ return undefined;
709
+ }
710
+ val = val.toLowerCase();
711
+ if (val === 'auto' || val === 'inherit') {
712
+ return val;
713
+ }
714
+ var matches = val.match(clip_local_var_shape_regex);
715
+ if (!matches) {
716
+ return undefined;
717
+ }
718
+ var parts = matches[1].split(/\s*,\s*/);
719
+ if (parts.length !== 4) {
720
+ return undefined;
721
+ }
722
+ var valid = parts.every(function (part, index) {
723
+ var measurement = external_dependency_parsers_0.parseMeasurement(part);
724
+ parts[index] = measurement;
725
+ return measurement !== undefined;
726
+ });
727
+ if (!valid) {
728
+ return undefined;
729
+ }
730
+ parts = parts.join(', ');
731
+ return val.replace(matches[1], parts);
732
+ };
733
+ clip_export_definition = {
734
+ set: function (v) {
735
+ this._setProperty('clip', clip_local_var_parse(v));
736
+ },
737
+ get: function () {
738
+ return this.getPropertyValue('clip');
739
+ },
740
+ enumerable: true,
741
+ configurable: true
742
+ };
743
+ var color_export_definition;
744
+ color_export_definition = {
745
+ set: function (v) {
746
+ this._setProperty('color', external_dependency_parsers_0.parseColor(v));
747
+ },
748
+ get: function () {
749
+ return this.getPropertyValue('color');
750
+ },
751
+ enumerable: true,
752
+ configurable: true
753
+ };
754
+ var cssFloat_export_definition;
755
+ cssFloat_export_definition = {
756
+ set: function (v) {
757
+ this._setProperty('float', v);
758
+ },
759
+ get: function () {
760
+ return this.getPropertyValue('float');
761
+ },
762
+ enumerable: true,
763
+ configurable: true
764
+ };
765
+ var flexGrow_export_isValid, flexGrow_export_definition;
766
+ flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) {
767
+ return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first;
768
+ };
769
+ flexGrow_export_definition = {
770
+ set: function (v) {
771
+ this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v));
772
+ },
773
+ get: function () {
774
+ return this.getPropertyValue('flex-grow');
775
+ },
776
+ enumerable: true,
777
+ configurable: true
778
+ };
779
+ var flexShrink_export_isValid, flexShrink_export_definition;
780
+ flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) {
781
+ return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second;
782
+ };
783
+ flexShrink_export_definition = {
784
+ set: function (v) {
785
+ this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v));
786
+ },
787
+ get: function () {
788
+ return this.getPropertyValue('flex-shrink');
789
+ },
790
+ enumerable: true,
791
+ configurable: true
792
+ };
793
+ var flexBasis_export_isValid, flexBasis_export_definition;
794
+ function flexBasis_local_fn_parse(v) {
795
+ if (String(v).toLowerCase() === 'auto') {
796
+ return 'auto';
797
+ }
798
+ if (String(v).toLowerCase() === 'inherit') {
799
+ return 'inherit';
800
+ }
801
+ return external_dependency_parsers_0.parseMeasurement(v);
802
+ }
803
+ flexBasis_export_isValid = function isValid(v) {
804
+ return flexBasis_local_fn_parse(v) !== undefined;
805
+ };
806
+ flexBasis_export_definition = {
807
+ set: function (v) {
808
+ this._setProperty('flex-basis', flexBasis_local_fn_parse(v));
809
+ },
810
+ get: function () {
811
+ return this.getPropertyValue('flex-basis');
812
+ },
813
+ enumerable: true,
814
+ configurable: true
815
+ };
816
+ var flex_export_isValid, flex_export_definition;
817
+ var flex_local_var_shorthand_for = {
818
+ 'flex-grow': {
819
+ isValid: flexGrow_export_isValid,
820
+ definition: flexGrow_export_definition
821
+ },
822
+ 'flex-shrink': {
823
+ isValid: flexShrink_export_isValid,
824
+ definition: flexShrink_export_definition
825
+ },
826
+ 'flex-basis': {
827
+ isValid: flexBasis_export_isValid,
828
+ definition: flexBasis_export_definition
829
+ }
830
+ };
831
+ var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for);
832
+ flex_export_isValid = function isValid(v) {
833
+ return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined;
834
+ };
835
+ flex_export_definition = {
836
+ set: function (v) {
837
+ var normalizedValue = String(v).trim().toLowerCase();
838
+ if (normalizedValue === 'none') {
839
+ flex_local_var_myShorthandSetter.call(this, '0 0 auto');
840
+ return;
841
+ }
842
+ if (normalizedValue === 'initial') {
843
+ flex_local_var_myShorthandSetter.call(this, '0 1 auto');
844
+ return;
845
+ }
846
+ if (normalizedValue === 'auto') {
847
+ this.removeProperty('flex-grow');
848
+ this.removeProperty('flex-shrink');
849
+ this.setProperty('flex-basis', normalizedValue);
850
+ return;
851
+ }
852
+ flex_local_var_myShorthandSetter.call(this, v);
853
+ },
854
+ get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for),
855
+ enumerable: true,
856
+ configurable: true
857
+ };
858
+ var float_export_definition;
859
+ float_export_definition = {
860
+ set: function (v) {
861
+ this._setProperty('float', v);
862
+ },
863
+ get: function () {
864
+ return this.getPropertyValue('float');
865
+ },
866
+ enumerable: true,
867
+ configurable: true
868
+ };
869
+ var floodColor_export_definition;
870
+ floodColor_export_definition = {
871
+ set: function (v) {
872
+ this._setProperty('flood-color', external_dependency_parsers_0.parseColor(v));
873
+ },
874
+ get: function () {
875
+ return this.getPropertyValue('flood-color');
876
+ },
877
+ enumerable: true,
878
+ configurable: true
879
+ };
880
+ var fontFamily_export_isValid, fontFamily_export_definition;
881
+ var fontFamily_local_var_partsRegEx = /\s*,\s*/;
882
+ fontFamily_export_isValid = function isValid(v) {
883
+ if (v === '' || v === null) {
884
+ return true;
885
+ }
886
+ var parts = v.split(fontFamily_local_var_partsRegEx);
887
+ var len = parts.length;
888
+ var i;
889
+ var type;
890
+ for (i = 0; i < len; i++) {
891
+ type = external_dependency_parsers_0.valueType(parts[i]);
892
+ if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) {
893
+ return true;
894
+ }
895
+ }
896
+ return false;
897
+ };
898
+ fontFamily_export_definition = {
899
+ set: function (v) {
900
+ this._setProperty('font-family', v);
901
+ },
902
+ get: function () {
903
+ return this.getPropertyValue('font-family');
904
+ },
905
+ enumerable: true,
906
+ configurable: true
907
+ };
908
+ var fontSize_export_isValid, fontSize_export_definition;
909
+ var fontSize_local_var_absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
910
+ var fontSize_local_var_relativeSizes = ['larger', 'smaller'];
911
+ fontSize_export_isValid = function (v) {
912
+ var type = external_dependency_parsers_0.valueType(v.toLowerCase());
913
+ return type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_absoluteSizes.indexOf(v.toLowerCase()) !== -1 || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_relativeSizes.indexOf(v.toLowerCase()) !== -1;
914
+ };
915
+ function fontSize_local_fn_parse(v) {
916
+ const valueAsString = String(v).toLowerCase();
917
+ const optionalArguments = fontSize_local_var_absoluteSizes.concat(fontSize_local_var_relativeSizes);
918
+ const isOptionalArgument = optionalArguments.some(stringValue => stringValue.toLowerCase() === valueAsString);
919
+ return isOptionalArgument ? valueAsString : external_dependency_parsers_0.parseMeasurement(v);
920
+ }
921
+ fontSize_export_definition = {
922
+ set: function (v) {
923
+ this._setProperty('font-size', fontSize_local_fn_parse(v));
924
+ },
925
+ get: function () {
926
+ return this.getPropertyValue('font-size');
927
+ },
928
+ enumerable: true,
929
+ configurable: true
930
+ };
931
+ var fontStyle_export_isValid, fontStyle_export_definition;
932
+ var fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit'];
933
+ fontStyle_export_isValid = function (v) {
934
+ return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1;
935
+ };
936
+ fontStyle_export_definition = {
937
+ set: function (v) {
938
+ this._setProperty('font-style', v);
939
+ },
940
+ get: function () {
941
+ return this.getPropertyValue('font-style');
942
+ },
943
+ enumerable: true,
944
+ configurable: true
945
+ };
946
+ var fontVariant_export_isValid, fontVariant_export_definition;
947
+ var fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit'];
948
+ fontVariant_export_isValid = function isValid(v) {
949
+ return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1;
950
+ };
951
+ fontVariant_export_definition = {
952
+ set: function (v) {
953
+ this._setProperty('font-variant', v);
954
+ },
955
+ get: function () {
956
+ return this.getPropertyValue('font-variant');
957
+ },
958
+ enumerable: true,
959
+ configurable: true
960
+ };
961
+ var fontWeight_export_isValid, fontWeight_export_definition;
962
+ var fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit'];
963
+ fontWeight_export_isValid = function isValid(v) {
964
+ return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1;
965
+ };
966
+ fontWeight_export_definition = {
967
+ set: function (v) {
968
+ this._setProperty('font-weight', v);
969
+ },
970
+ get: function () {
971
+ return this.getPropertyValue('font-weight');
972
+ },
973
+ enumerable: true,
974
+ configurable: true
975
+ };
976
+ var lineHeight_export_isValid, lineHeight_export_definition;
977
+ lineHeight_export_isValid = function isValid(v) {
978
+ var type = external_dependency_parsers_0.valueType(v);
979
+ return type === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'normal' || v.toLowerCase() === 'inherit' || type === external_dependency_parsers_0.TYPES.NUMBER || type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT;
980
+ };
981
+ lineHeight_export_definition = {
982
+ set: function (v) {
983
+ this._setProperty('line-height', v);
984
+ },
985
+ get: function () {
986
+ return this.getPropertyValue('line-height');
987
+ },
988
+ enumerable: true,
989
+ configurable: true
990
+ };
991
+ var font_export_definition;
992
+ var font_local_var_shorthand_for = {
993
+ 'font-family': {
994
+ isValid: fontFamily_export_isValid,
995
+ definition: fontFamily_export_definition
996
+ },
997
+ 'font-size': {
998
+ isValid: fontSize_export_isValid,
999
+ definition: fontSize_export_definition
1000
+ },
1001
+ 'font-style': {
1002
+ isValid: fontStyle_export_isValid,
1003
+ definition: fontStyle_export_definition
1004
+ },
1005
+ 'font-variant': {
1006
+ isValid: fontVariant_export_isValid,
1007
+ definition: fontVariant_export_definition
1008
+ },
1009
+ 'font-weight': {
1010
+ isValid: fontWeight_export_isValid,
1011
+ definition: fontWeight_export_definition
1012
+ },
1013
+ 'line-height': {
1014
+ isValid: lineHeight_export_isValid,
1015
+ definition: lineHeight_export_definition
1016
+ }
1017
+ };
1018
+ var font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit'];
1019
+ var font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for);
1020
+ font_export_definition = {
1021
+ set: function (v) {
1022
+ var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for);
1023
+ if (short !== undefined) {
1024
+ return font_local_var_setter.call(this, v);
1025
+ }
1026
+ if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) {
1027
+ this._setProperty('font', v);
1028
+ }
1029
+ },
1030
+ get: external_dependency_parsers_0.shorthandGetter('font', font_local_var_shorthand_for),
1031
+ enumerable: true,
1032
+ configurable: true
1033
+ };
1034
+ var height_export_definition;
1035
+ function height_local_fn_parse(v) {
1036
+ if (String(v).toLowerCase() === 'auto') {
1037
+ return 'auto';
1038
+ }
1039
+ if (String(v).toLowerCase() === 'inherit') {
1040
+ return 'inherit';
1041
+ }
1042
+ return external_dependency_parsers_0.parseMeasurement(v);
1043
+ }
1044
+ height_export_definition = {
1045
+ set: function (v) {
1046
+ this._setProperty('height', height_local_fn_parse(v));
1047
+ },
1048
+ get: function () {
1049
+ return this.getPropertyValue('height');
1050
+ },
1051
+ enumerable: true,
1052
+ configurable: true
1053
+ };
1054
+ var left_export_definition;
1055
+ left_export_definition = {
1056
+ set: function (v) {
1057
+ this._setProperty('left', external_dependency_parsers_0.parseMeasurement(v));
1058
+ },
1059
+ get: function () {
1060
+ return this.getPropertyValue('left');
1061
+ },
1062
+ enumerable: true,
1063
+ configurable: true
1064
+ };
1065
+ var lightingColor_export_definition;
1066
+ lightingColor_export_definition = {
1067
+ set: function (v) {
1068
+ this._setProperty('lighting-color', external_dependency_parsers_0.parseColor(v));
1069
+ },
1070
+ get: function () {
1071
+ return this.getPropertyValue('lighting-color');
1072
+ },
1073
+ enumerable: true,
1074
+ configurable: true
1075
+ };
1076
+ var margin_export_definition, margin_export_isValid, margin_export_parser;
1077
+ var margin_local_var_TYPES = external_dependency_parsers_0.TYPES;
1078
+ var margin_local_var_isValid = function (v) {
1079
+ if (v.toLowerCase() === 'auto') {
1080
+ return true;
1081
+ }
1082
+ var type = external_dependency_parsers_0.valueType(v);
1083
+ return type === margin_local_var_TYPES.NULL_OR_EMPTY_STR || type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.CALC || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);
1084
+ };
1085
+ var margin_local_var_parser = function (v) {
1086
+ var V = v.toLowerCase();
1087
+ if (V === 'auto') {
1088
+ return V;
1089
+ }
1090
+ return external_dependency_parsers_0.parseMeasurement(v);
1091
+ };
1092
+ var margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser);
1093
+ var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () {
1094
+ return true;
1095
+ }, function (v) {
1096
+ return v;
1097
+ });
1098
+ margin_export_definition = {
1099
+ set: function (v) {
1100
+ if (typeof v === 'number') {
1101
+ v = String(v);
1102
+ }
1103
+ if (v === null) {
1104
+ v = '';
1105
+ }
1106
+ if (typeof v !== 'string') {
1107
+ return;
1108
+ }
1109
+ var V = v.toLowerCase();
1110
+ switch (V) {
1111
+ case 'inherit':
1112
+ case 'initial':
1113
+ case 'unset':
1114
+ case '':
1115
+ margin_local_var_myGlobal.call(this, V);
1116
+ break;
1117
+ default:
1118
+ margin_local_var_mySetter.call(this, v);
1119
+ break;
1120
+ }
1121
+ },
1122
+ get: function () {
1123
+ return this.getPropertyValue('margin');
1124
+ },
1125
+ enumerable: true,
1126
+ configurable: true
1127
+ };
1128
+ margin_export_isValid = margin_local_var_isValid;
1129
+ margin_export_parser = margin_local_var_parser;
1130
+ var marginBottom_export_definition;
1131
+ marginBottom_export_definition = {
1132
+ set: external_dependency_parsers_0.subImplicitSetter('margin', 'bottom', {
1133
+ definition: margin_export_definition,
1134
+ isValid: margin_export_isValid,
1135
+ parser: margin_export_parser
1136
+ }.isValid, {
1137
+ definition: margin_export_definition,
1138
+ isValid: margin_export_isValid,
1139
+ parser: margin_export_parser
1140
+ }.parser),
1141
+ get: function () {
1142
+ return this.getPropertyValue('margin-bottom');
1143
+ },
1144
+ enumerable: true,
1145
+ configurable: true
1146
+ };
1147
+ var marginLeft_export_definition;
1148
+ marginLeft_export_definition = {
1149
+ set: external_dependency_parsers_0.subImplicitSetter('margin', 'left', {
1150
+ definition: margin_export_definition,
1151
+ isValid: margin_export_isValid,
1152
+ parser: margin_export_parser
1153
+ }.isValid, {
1154
+ definition: margin_export_definition,
1155
+ isValid: margin_export_isValid,
1156
+ parser: margin_export_parser
1157
+ }.parser),
1158
+ get: function () {
1159
+ return this.getPropertyValue('margin-left');
1160
+ },
1161
+ enumerable: true,
1162
+ configurable: true
1163
+ };
1164
+ var marginRight_export_definition;
1165
+ marginRight_export_definition = {
1166
+ set: external_dependency_parsers_0.subImplicitSetter('margin', 'right', {
1167
+ definition: margin_export_definition,
1168
+ isValid: margin_export_isValid,
1169
+ parser: margin_export_parser
1170
+ }.isValid, {
1171
+ definition: margin_export_definition,
1172
+ isValid: margin_export_isValid,
1173
+ parser: margin_export_parser
1174
+ }.parser),
1175
+ get: function () {
1176
+ return this.getPropertyValue('margin-right');
1177
+ },
1178
+ enumerable: true,
1179
+ configurable: true
1180
+ };
1181
+ var marginTop_export_definition;
1182
+ marginTop_export_definition = {
1183
+ set: external_dependency_parsers_0.subImplicitSetter('margin', 'top', {
1184
+ definition: margin_export_definition,
1185
+ isValid: margin_export_isValid,
1186
+ parser: margin_export_parser
1187
+ }.isValid, {
1188
+ definition: margin_export_definition,
1189
+ isValid: margin_export_isValid,
1190
+ parser: margin_export_parser
1191
+ }.parser),
1192
+ get: function () {
1193
+ return this.getPropertyValue('margin-top');
1194
+ },
1195
+ enumerable: true,
1196
+ configurable: true
1197
+ };
1198
+ var opacity_export_definition;
1199
+ opacity_export_definition = {
1200
+ set: function (v) {
1201
+ this._setProperty('opacity', external_dependency_parsers_0.parseNumber(v));
1202
+ },
1203
+ get: function () {
1204
+ return this.getPropertyValue('opacity');
1205
+ },
1206
+ enumerable: true,
1207
+ configurable: true
1208
+ };
1209
+ var outlineColor_export_definition;
1210
+ outlineColor_export_definition = {
1211
+ set: function (v) {
1212
+ this._setProperty('outline-color', external_dependency_parsers_0.parseColor(v));
1213
+ },
1214
+ get: function () {
1215
+ return this.getPropertyValue('outline-color');
1216
+ },
1217
+ enumerable: true,
1218
+ configurable: true
1219
+ };
1220
+ var padding_export_definition, padding_export_isValid, padding_export_parser;
1221
+ var padding_local_var_TYPES = external_dependency_parsers_0.TYPES;
1222
+ var padding_local_var_isValid = function (v) {
1223
+ var type = external_dependency_parsers_0.valueType(v);
1224
+ return type === padding_local_var_TYPES.NULL_OR_EMPTY_STR || type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.CALC || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0);
1225
+ };
1226
+ var padding_local_var_parser = function (v) {
1227
+ return external_dependency_parsers_0.parseMeasurement(v);
1228
+ };
1229
+ var padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser);
1230
+ var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () {
1231
+ return true;
1232
+ }, function (v) {
1233
+ return v;
1234
+ });
1235
+ padding_export_definition = {
1236
+ set: function (v) {
1237
+ if (typeof v === 'number') {
1238
+ v = String(v);
1239
+ }
1240
+ if (v === null) {
1241
+ v = '';
1242
+ }
1243
+ if (typeof v !== 'string') {
1244
+ return;
1245
+ }
1246
+ var V = v.toLowerCase();
1247
+ switch (V) {
1248
+ case 'inherit':
1249
+ case 'initial':
1250
+ case 'unset':
1251
+ case '':
1252
+ padding_local_var_myGlobal.call(this, V);
1253
+ break;
1254
+ default:
1255
+ padding_local_var_mySetter.call(this, v);
1256
+ break;
1257
+ }
1258
+ },
1259
+ get: function () {
1260
+ return this.getPropertyValue('padding');
1261
+ },
1262
+ enumerable: true,
1263
+ configurable: true
1264
+ };
1265
+ padding_export_isValid = padding_local_var_isValid;
1266
+ padding_export_parser = padding_local_var_parser;
1267
+ var paddingBottom_export_definition;
1268
+ paddingBottom_export_definition = {
1269
+ set: external_dependency_parsers_0.subImplicitSetter('padding', 'bottom', {
1270
+ definition: padding_export_definition,
1271
+ isValid: padding_export_isValid,
1272
+ parser: padding_export_parser
1273
+ }.isValid, {
1274
+ definition: padding_export_definition,
1275
+ isValid: padding_export_isValid,
1276
+ parser: padding_export_parser
1277
+ }.parser),
1278
+ get: function () {
1279
+ return this.getPropertyValue('padding-bottom');
1280
+ },
1281
+ enumerable: true,
1282
+ configurable: true
1283
+ };
1284
+ var paddingLeft_export_definition;
1285
+ paddingLeft_export_definition = {
1286
+ set: external_dependency_parsers_0.subImplicitSetter('padding', 'left', {
1287
+ definition: padding_export_definition,
1288
+ isValid: padding_export_isValid,
1289
+ parser: padding_export_parser
1290
+ }.isValid, {
1291
+ definition: padding_export_definition,
1292
+ isValid: padding_export_isValid,
1293
+ parser: padding_export_parser
1294
+ }.parser),
1295
+ get: function () {
1296
+ return this.getPropertyValue('padding-left');
1297
+ },
1298
+ enumerable: true,
1299
+ configurable: true
1300
+ };
1301
+ var paddingRight_export_definition;
1302
+ paddingRight_export_definition = {
1303
+ set: external_dependency_parsers_0.subImplicitSetter('padding', 'right', {
1304
+ definition: padding_export_definition,
1305
+ isValid: padding_export_isValid,
1306
+ parser: padding_export_parser
1307
+ }.isValid, {
1308
+ definition: padding_export_definition,
1309
+ isValid: padding_export_isValid,
1310
+ parser: padding_export_parser
1311
+ }.parser),
1312
+ get: function () {
1313
+ return this.getPropertyValue('padding-right');
1314
+ },
1315
+ enumerable: true,
1316
+ configurable: true
1317
+ };
1318
+ var paddingTop_export_definition;
1319
+ paddingTop_export_definition = {
1320
+ set: external_dependency_parsers_0.subImplicitSetter('padding', 'top', {
1321
+ definition: padding_export_definition,
1322
+ isValid: padding_export_isValid,
1323
+ parser: padding_export_parser
1324
+ }.isValid, {
1325
+ definition: padding_export_definition,
1326
+ isValid: padding_export_isValid,
1327
+ parser: padding_export_parser
1328
+ }.parser),
1329
+ get: function () {
1330
+ return this.getPropertyValue('padding-top');
1331
+ },
1332
+ enumerable: true,
1333
+ configurable: true
1334
+ };
1335
+ var right_export_definition;
1336
+ right_export_definition = {
1337
+ set: function (v) {
1338
+ this._setProperty('right', external_dependency_parsers_0.parseMeasurement(v));
1339
+ },
1340
+ get: function () {
1341
+ return this.getPropertyValue('right');
1342
+ },
1343
+ enumerable: true,
1344
+ configurable: true
1345
+ };
1346
+ var stopColor_export_definition;
1347
+ stopColor_export_definition = {
1348
+ set: function (v) {
1349
+ this._setProperty('stop-color', external_dependency_parsers_0.parseColor(v));
1350
+ },
1351
+ get: function () {
1352
+ return this.getPropertyValue('stop-color');
1353
+ },
1354
+ enumerable: true,
1355
+ configurable: true
1356
+ };
1357
+ var textLineThroughColor_export_definition;
1358
+ textLineThroughColor_export_definition = {
1359
+ set: function (v) {
1360
+ this._setProperty('text-line-through-color', external_dependency_parsers_0.parseColor(v));
1361
+ },
1362
+ get: function () {
1363
+ return this.getPropertyValue('text-line-through-color');
1364
+ },
1365
+ enumerable: true,
1366
+ configurable: true
1367
+ };
1368
+ var textOverlineColor_export_definition;
1369
+ textOverlineColor_export_definition = {
1370
+ set: function (v) {
1371
+ this._setProperty('text-overline-color', external_dependency_parsers_0.parseColor(v));
1372
+ },
1373
+ get: function () {
1374
+ return this.getPropertyValue('text-overline-color');
1375
+ },
1376
+ enumerable: true,
1377
+ configurable: true
1378
+ };
1379
+ var textUnderlineColor_export_definition;
1380
+ textUnderlineColor_export_definition = {
1381
+ set: function (v) {
1382
+ this._setProperty('text-underline-color', external_dependency_parsers_0.parseColor(v));
1383
+ },
1384
+ get: function () {
1385
+ return this.getPropertyValue('text-underline-color');
1386
+ },
1387
+ enumerable: true,
1388
+ configurable: true
1389
+ };
1390
+ var top_export_definition;
1391
+ top_export_definition = {
1392
+ set: function (v) {
1393
+ this._setProperty('top', external_dependency_parsers_0.parseMeasurement(v));
1394
+ },
1395
+ get: function () {
1396
+ return this.getPropertyValue('top');
1397
+ },
1398
+ enumerable: true,
1399
+ configurable: true
1400
+ };
1401
+ var webkitBorderAfterColor_export_definition;
1402
+ webkitBorderAfterColor_export_definition = {
1403
+ set: function (v) {
1404
+ this._setProperty('-webkit-border-after-color', external_dependency_parsers_0.parseColor(v));
1405
+ },
1406
+ get: function () {
1407
+ return this.getPropertyValue('-webkit-border-after-color');
1408
+ },
1409
+ enumerable: true,
1410
+ configurable: true
1411
+ };
1412
+ var webkitBorderBeforeColor_export_definition;
1413
+ webkitBorderBeforeColor_export_definition = {
1414
+ set: function (v) {
1415
+ this._setProperty('-webkit-border-before-color', external_dependency_parsers_0.parseColor(v));
1416
+ },
1417
+ get: function () {
1418
+ return this.getPropertyValue('-webkit-border-before-color');
1419
+ },
1420
+ enumerable: true,
1421
+ configurable: true
1422
+ };
1423
+ var webkitBorderEndColor_export_definition;
1424
+ webkitBorderEndColor_export_definition = {
1425
+ set: function (v) {
1426
+ this._setProperty('-webkit-border-end-color', external_dependency_parsers_0.parseColor(v));
1427
+ },
1428
+ get: function () {
1429
+ return this.getPropertyValue('-webkit-border-end-color');
1430
+ },
1431
+ enumerable: true,
1432
+ configurable: true
1433
+ };
1434
+ var webkitBorderStartColor_export_definition;
1435
+ webkitBorderStartColor_export_definition = {
1436
+ set: function (v) {
1437
+ this._setProperty('-webkit-border-start-color', external_dependency_parsers_0.parseColor(v));
1438
+ },
1439
+ get: function () {
1440
+ return this.getPropertyValue('-webkit-border-start-color');
1441
+ },
1442
+ enumerable: true,
1443
+ configurable: true
1444
+ };
1445
+ var webkitColumnRuleColor_export_definition;
1446
+ webkitColumnRuleColor_export_definition = {
1447
+ set: function (v) {
1448
+ this._setProperty('-webkit-column-rule-color', external_dependency_parsers_0.parseColor(v));
1449
+ },
1450
+ get: function () {
1451
+ return this.getPropertyValue('-webkit-column-rule-color');
1452
+ },
1453
+ enumerable: true,
1454
+ configurable: true
1455
+ };
1456
+ var webkitMatchNearestMailBlockquoteColor_export_definition;
1457
+ webkitMatchNearestMailBlockquoteColor_export_definition = {
1458
+ set: function (v) {
1459
+ this._setProperty('-webkit-match-nearest-mail-blockquote-color', external_dependency_parsers_0.parseColor(v));
1460
+ },
1461
+ get: function () {
1462
+ return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color');
1463
+ },
1464
+ enumerable: true,
1465
+ configurable: true
1466
+ };
1467
+ var webkitTapHighlightColor_export_definition;
1468
+ webkitTapHighlightColor_export_definition = {
1469
+ set: function (v) {
1470
+ this._setProperty('-webkit-tap-highlight-color', external_dependency_parsers_0.parseColor(v));
1471
+ },
1472
+ get: function () {
1473
+ return this.getPropertyValue('-webkit-tap-highlight-color');
1474
+ },
1475
+ enumerable: true,
1476
+ configurable: true
1477
+ };
1478
+ var webkitTextEmphasisColor_export_definition;
1479
+ webkitTextEmphasisColor_export_definition = {
1480
+ set: function (v) {
1481
+ this._setProperty('-webkit-text-emphasis-color', external_dependency_parsers_0.parseColor(v));
1482
+ },
1483
+ get: function () {
1484
+ return this.getPropertyValue('-webkit-text-emphasis-color');
1485
+ },
1486
+ enumerable: true,
1487
+ configurable: true
1488
+ };
1489
+ var webkitTextFillColor_export_definition;
1490
+ webkitTextFillColor_export_definition = {
1491
+ set: function (v) {
1492
+ this._setProperty('-webkit-text-fill-color', external_dependency_parsers_0.parseColor(v));
1493
+ },
1494
+ get: function () {
1495
+ return this.getPropertyValue('-webkit-text-fill-color');
1496
+ },
1497
+ enumerable: true,
1498
+ configurable: true
1499
+ };
1500
+ var webkitTextStrokeColor_export_definition;
1501
+ webkitTextStrokeColor_export_definition = {
1502
+ set: function (v) {
1503
+ this._setProperty('-webkit-text-stroke-color', external_dependency_parsers_0.parseColor(v));
1504
+ },
1505
+ get: function () {
1506
+ return this.getPropertyValue('-webkit-text-stroke-color');
1507
+ },
1508
+ enumerable: true,
1509
+ configurable: true
1510
+ };
1511
+ var width_export_definition;
1512
+ function width_local_fn_parse(v) {
1513
+ if (String(v).toLowerCase() === 'auto') {
1514
+ return 'auto';
1515
+ }
1516
+ if (String(v).toLowerCase() === 'inherit') {
1517
+ return 'inherit';
1518
+ }
1519
+ return external_dependency_parsers_0.parseMeasurement(v);
1520
+ }
1521
+ width_export_definition = {
1522
+ set: function (v) {
1523
+ this._setProperty('width', width_local_fn_parse(v));
1524
+ },
1525
+ get: function () {
1526
+ return this.getPropertyValue('width');
1527
+ },
1528
+ enumerable: true,
1529
+ configurable: true
1530
+ };
1531
+ module.exports = function (prototype) {
1532
+ Object.defineProperties(prototype, {
1533
+ azimuth: azimuth_export_definition,
1534
+ backgroundColor: backgroundColor_export_definition,
1535
+ "background-color": backgroundColor_export_definition,
1536
+ backgroundImage: backgroundImage_export_definition,
1537
+ "background-image": backgroundImage_export_definition,
1538
+ backgroundRepeat: backgroundRepeat_export_definition,
1539
+ "background-repeat": backgroundRepeat_export_definition,
1540
+ backgroundAttachment: backgroundAttachment_export_definition,
1541
+ "background-attachment": backgroundAttachment_export_definition,
1542
+ backgroundPosition: backgroundPosition_export_definition,
1543
+ "background-position": backgroundPosition_export_definition,
1544
+ background: background_export_definition,
1545
+ borderWidth: borderWidth_export_definition,
1546
+ "border-width": borderWidth_export_definition,
1547
+ borderStyle: borderStyle_export_definition,
1548
+ "border-style": borderStyle_export_definition,
1549
+ borderColor: borderColor_export_definition,
1550
+ "border-color": borderColor_export_definition,
1551
+ border: border_export_definition,
1552
+ borderBottomWidth: borderBottomWidth_export_definition,
1553
+ "border-bottom-width": borderBottomWidth_export_definition,
1554
+ borderBottomStyle: borderBottomStyle_export_definition,
1555
+ "border-bottom-style": borderBottomStyle_export_definition,
1556
+ borderBottomColor: borderBottomColor_export_definition,
1557
+ "border-bottom-color": borderBottomColor_export_definition,
1558
+ borderBottom: borderBottom_export_definition,
1559
+ "border-bottom": borderBottom_export_definition,
1560
+ borderCollapse: borderCollapse_export_definition,
1561
+ "border-collapse": borderCollapse_export_definition,
1562
+ borderLeftWidth: borderLeftWidth_export_definition,
1563
+ "border-left-width": borderLeftWidth_export_definition,
1564
+ borderLeftStyle: borderLeftStyle_export_definition,
1565
+ "border-left-style": borderLeftStyle_export_definition,
1566
+ borderLeftColor: borderLeftColor_export_definition,
1567
+ "border-left-color": borderLeftColor_export_definition,
1568
+ borderLeft: borderLeft_export_definition,
1569
+ "border-left": borderLeft_export_definition,
1570
+ borderRightWidth: borderRightWidth_export_definition,
1571
+ "border-right-width": borderRightWidth_export_definition,
1572
+ borderRightStyle: borderRightStyle_export_definition,
1573
+ "border-right-style": borderRightStyle_export_definition,
1574
+ borderRightColor: borderRightColor_export_definition,
1575
+ "border-right-color": borderRightColor_export_definition,
1576
+ borderRight: borderRight_export_definition,
1577
+ "border-right": borderRight_export_definition,
1578
+ borderSpacing: borderSpacing_export_definition,
1579
+ "border-spacing": borderSpacing_export_definition,
1580
+ borderTopWidth: borderTopWidth_export_definition,
1581
+ "border-top-width": borderTopWidth_export_definition,
1582
+ borderTopStyle: borderTopStyle_export_definition,
1583
+ "border-top-style": borderTopStyle_export_definition,
1584
+ borderTopColor: borderTopColor_export_definition,
1585
+ "border-top-color": borderTopColor_export_definition,
1586
+ borderTop: borderTop_export_definition,
1587
+ "border-top": borderTop_export_definition,
1588
+ bottom: bottom_export_definition,
1589
+ clear: clear_export_definition,
1590
+ clip: clip_export_definition,
1591
+ color: color_export_definition,
1592
+ cssFloat: cssFloat_export_definition,
1593
+ "css-float": cssFloat_export_definition,
1594
+ flexGrow: flexGrow_export_definition,
1595
+ "flex-grow": flexGrow_export_definition,
1596
+ flexShrink: flexShrink_export_definition,
1597
+ "flex-shrink": flexShrink_export_definition,
1598
+ flexBasis: flexBasis_export_definition,
1599
+ "flex-basis": flexBasis_export_definition,
1600
+ flex: flex_export_definition,
1601
+ float: float_export_definition,
1602
+ floodColor: floodColor_export_definition,
1603
+ "flood-color": floodColor_export_definition,
1604
+ fontFamily: fontFamily_export_definition,
1605
+ "font-family": fontFamily_export_definition,
1606
+ fontSize: fontSize_export_definition,
1607
+ "font-size": fontSize_export_definition,
1608
+ fontStyle: fontStyle_export_definition,
1609
+ "font-style": fontStyle_export_definition,
1610
+ fontVariant: fontVariant_export_definition,
1611
+ "font-variant": fontVariant_export_definition,
1612
+ fontWeight: fontWeight_export_definition,
1613
+ "font-weight": fontWeight_export_definition,
1614
+ lineHeight: lineHeight_export_definition,
1615
+ "line-height": lineHeight_export_definition,
1616
+ font: font_export_definition,
1617
+ height: height_export_definition,
1618
+ left: left_export_definition,
1619
+ lightingColor: lightingColor_export_definition,
1620
+ "lighting-color": lightingColor_export_definition,
1621
+ margin: margin_export_definition,
1622
+ marginBottom: marginBottom_export_definition,
1623
+ "margin-bottom": marginBottom_export_definition,
1624
+ marginLeft: marginLeft_export_definition,
1625
+ "margin-left": marginLeft_export_definition,
1626
+ marginRight: marginRight_export_definition,
1627
+ "margin-right": marginRight_export_definition,
1628
+ marginTop: marginTop_export_definition,
1629
+ "margin-top": marginTop_export_definition,
1630
+ opacity: opacity_export_definition,
1631
+ outlineColor: outlineColor_export_definition,
1632
+ "outline-color": outlineColor_export_definition,
1633
+ padding: padding_export_definition,
1634
+ paddingBottom: paddingBottom_export_definition,
1635
+ "padding-bottom": paddingBottom_export_definition,
1636
+ paddingLeft: paddingLeft_export_definition,
1637
+ "padding-left": paddingLeft_export_definition,
1638
+ paddingRight: paddingRight_export_definition,
1639
+ "padding-right": paddingRight_export_definition,
1640
+ paddingTop: paddingTop_export_definition,
1641
+ "padding-top": paddingTop_export_definition,
1642
+ right: right_export_definition,
1643
+ stopColor: stopColor_export_definition,
1644
+ "stop-color": stopColor_export_definition,
1645
+ textLineThroughColor: textLineThroughColor_export_definition,
1646
+ "text-line-through-color": textLineThroughColor_export_definition,
1647
+ textOverlineColor: textOverlineColor_export_definition,
1648
+ "text-overline-color": textOverlineColor_export_definition,
1649
+ textUnderlineColor: textUnderlineColor_export_definition,
1650
+ "text-underline-color": textUnderlineColor_export_definition,
1651
+ top: top_export_definition,
1652
+ webkitBorderAfterColor: webkitBorderAfterColor_export_definition,
1653
+ "webkit-border-after-color": webkitBorderAfterColor_export_definition,
1654
+ webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition,
1655
+ "webkit-border-before-color": webkitBorderBeforeColor_export_definition,
1656
+ webkitBorderEndColor: webkitBorderEndColor_export_definition,
1657
+ "webkit-border-end-color": webkitBorderEndColor_export_definition,
1658
+ webkitBorderStartColor: webkitBorderStartColor_export_definition,
1659
+ "webkit-border-start-color": webkitBorderStartColor_export_definition,
1660
+ webkitColumnRuleColor: webkitColumnRuleColor_export_definition,
1661
+ "webkit-column-rule-color": webkitColumnRuleColor_export_definition,
1662
+ webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition,
1663
+ "webkit-match-nearest-mail-blockquote-color": webkitMatchNearestMailBlockquoteColor_export_definition,
1664
+ webkitTapHighlightColor: webkitTapHighlightColor_export_definition,
1665
+ "webkit-tap-highlight-color": webkitTapHighlightColor_export_definition,
1666
+ webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition,
1667
+ "webkit-text-emphasis-color": webkitTextEmphasisColor_export_definition,
1668
+ webkitTextFillColor: webkitTextFillColor_export_definition,
1669
+ "webkit-text-fill-color": webkitTextFillColor_export_definition,
1670
+ webkitTextStrokeColor: webkitTextStrokeColor_export_definition,
1671
+ "webkit-text-stroke-color": webkitTextStrokeColor_export_definition,
1672
+ width: width_export_definition
1673
+ });
1674
+ };
node_modules/cssstyle/lib/properties/azimuth.js ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var parsers = require('../parsers');
4
+
5
+ module.exports.definition = {
6
+ set: function (v) {
7
+ var valueType = parsers.valueType(v);
8
+ if (valueType === parsers.TYPES.ANGLE) {
9
+ return this._setProperty('azimuth', parsers.parseAngle(v));
10
+ }
11
+ if (valueType === parsers.TYPES.KEYWORD) {
12
+ var keywords = v.toLowerCase().trim().split(/\s+/);
13
+ var hasBehind = false;
14
+ if (keywords.length > 2) {
15
+ return;
16
+ }
17
+ var behindIndex = keywords.indexOf('behind');
18
+ hasBehind = behindIndex !== -1;
19
+
20
+ if (keywords.length === 2) {
21
+ if (!hasBehind) {
22
+ return;
23
+ }
24
+ keywords.splice(behindIndex, 1);
25
+ }
26
+ if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') {
27
+ if (hasBehind) {
28
+ return;
29
+ }
30
+ return this._setProperty('azimuth', keywords[0]);
31
+ }
32
+ if (keywords[0] === 'behind') {
33
+ return this._setProperty('azimuth', '180deg');
34
+ }
35
+ switch (keywords[0]) {
36
+ case 'left-side':
37
+ return this._setProperty('azimuth', '270deg');
38
+ case 'far-left':
39
+ return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg');
40
+ case 'left':
41
+ return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg');
42
+ case 'center-left':
43
+ return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg');
44
+ case 'center':
45
+ return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg');
46
+ case 'center-right':
47
+ return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg');
48
+ case 'right':
49
+ return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg');
50
+ case 'far-right':
51
+ return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg');
52
+ case 'right-side':
53
+ return this._setProperty('azimuth', '90deg');
54
+ default:
55
+ return;
56
+ }
57
+ }
58
+ },
59
+ get: function () {
60
+ return this.getPropertyValue('azimuth');
61
+ },
62
+ enumerable: true,
63
+ configurable: true,
64
+ };