@pablopunk/tau 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/auth-storage-Dk3CUY3q.js +1814 -0
  2. package/dist/bin.js +23 -0
  3. package/dist/cli-entry-DcDpQ30L.js +13 -0
  4. package/dist/client-C91-b2CL.js +1 -0
  5. package/dist/client-y2WkNuZj.js +7977 -0
  6. package/dist/dist-BFP19NOO.js +432 -0
  7. package/dist/dist-Bh1bQHZA.js +38890 -0
  8. package/dist/dist-Cq73_r65.js +3 -0
  9. package/dist/esm-CMGh_WhC.js +9446 -0
  10. package/dist/execute-BeGXhU1O.js +1757 -0
  11. package/dist/fake-claude-connectors-DSP9UC8d.js +1 -0
  12. package/dist/fake-claude-connectors-sDLeP10T.js +107 -0
  13. package/dist/fake-claude-sdk-CvqW_1iQ.js +571 -0
  14. package/dist/fake-claude-thread-script-2iHHwUZM.js +48 -0
  15. package/dist/last-exit-write-ksHeHGrC.js +9 -0
  16. package/dist/latest-version-di9hD7cY.js +106 -0
  17. package/dist/lib-DIX7q_HJ.js +1460 -0
  18. package/dist/machines-behind-BjGgmSs_.js +257 -0
  19. package/dist/main-D-Tg9b5Y.js +1610 -0
  20. package/dist/manager-B_WHbb1U.js +589 -0
  21. package/dist/names-cTrEXB6w.js +35 -0
  22. package/dist/node-BpwblPFP.js +56269 -0
  23. package/dist/pdfjs-nTcHjDPT.js +69856 -0
  24. package/dist/photon_rs-DBr7W_rK.js +4252 -0
  25. package/dist/promise.try-CAAOYvMP.js +1426 -0
  26. package/dist/readability-DsDNO63a.js +1670 -0
  27. package/dist/real-deps-f96UmLBz.js +89 -0
  28. package/dist/rolldown-runtime-1p2KPIdQ.js +44 -0
  29. package/dist/runtime-i-oEtgAl.js +2721 -0
  30. package/dist/sdk-missing-CHbVbY1G.js +10 -0
  31. package/dist/sdk-port-BGw9ORUR.js +215 -0
  32. package/dist/serve-Cmy0rUWr.js +2932 -0
  33. package/dist/serve-Dmzn5V0l.js +1 -0
  34. package/dist/service-command-C74K0saj.js +34 -0
  35. package/dist/service-command-DqcstJ8e.js +1 -0
  36. package/dist/shell-CQa4e7rx.js +643 -0
  37. package/dist/skills/builtin/tau/SKILL.md +51 -0
  38. package/dist/src-DO9LUlhi.js +44088 -0
  39. package/dist/streamableHttp-BBaRYV9h.js +1 -0
  40. package/dist/streamableHttp-DPAoMlJd.js +1931 -0
  41. package/dist/tool-DBZK2lci.js +14335 -0
  42. package/dist/tool-server-BjP37EJg.js +40 -0
  43. package/dist/turndown.cjs-Bo1xLg2S.js +15620 -0
  44. package/dist/turndown.cjs-jpUF50AR.js +3 -0
  45. package/dist/types-C4M3CRp2.js +7592 -0
  46. package/dist/undici-8cI97lnP.js +27110 -0
  47. package/dist/wait-for-lock-B1Qx8GWg.js +1 -0
  48. package/dist/wait-for-lock-CrSl2mi1.js +25 -0
  49. package/dist/watchdog.js +47 -0
  50. package/dist/web/dist/assets/addon-fit-DIOBYJe3.js +1 -0
  51. package/dist/web/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  52. package/dist/web/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  53. package/dist/web/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  54. package/dist/web/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  55. package/dist/web/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  56. package/dist/web/dist/assets/index-BktLKZHR.js +108 -0
  57. package/dist/web/dist/assets/index-D_Aa3Oou.css +2 -0
  58. package/dist/web/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  59. package/dist/web/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  60. package/dist/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  61. package/dist/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  62. package/dist/web/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  63. package/dist/web/dist/assets/wght-DMLdVLkb.css +1 -0
  64. package/dist/web/dist/assets/xterm-BrP-ENHg.css +1 -0
  65. package/dist/web/dist/assets/xterm-CerOhKYV.js +16 -0
  66. package/dist/web/dist/favicon.svg +14 -0
  67. package/dist/web/dist/index.html +25 -0
  68. package/package.json +53 -4
  69. package/README.md +0 -3
@@ -0,0 +1,1460 @@
1
+ import { t as __commonJSMin } from "./rolldown-runtime-1p2KPIdQ.js";
2
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/StyleSheet.js
3
+ var require_StyleSheet = /* @__PURE__ */ __commonJSMin(((exports) => {
4
+ var CSSOM = {};
5
+ /**
6
+ * @constructor
7
+ * @see http://dev.w3.org/csswg/cssom/#the-stylesheet-interface
8
+ */
9
+ CSSOM.StyleSheet = function StyleSheet() {
10
+ this.parentStyleSheet = null;
11
+ };
12
+ exports.StyleSheet = CSSOM.StyleSheet;
13
+ }));
14
+ //#endregion
15
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSRule.js
16
+ var require_CSSRule = /* @__PURE__ */ __commonJSMin(((exports) => {
17
+ var CSSOM = {};
18
+ /**
19
+ * @constructor
20
+ * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface
21
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule
22
+ */
23
+ CSSOM.CSSRule = function CSSRule() {
24
+ this.parentRule = null;
25
+ this.parentStyleSheet = null;
26
+ };
27
+ CSSOM.CSSRule.UNKNOWN_RULE = 0;
28
+ CSSOM.CSSRule.STYLE_RULE = 1;
29
+ CSSOM.CSSRule.CHARSET_RULE = 2;
30
+ CSSOM.CSSRule.IMPORT_RULE = 3;
31
+ CSSOM.CSSRule.MEDIA_RULE = 4;
32
+ CSSOM.CSSRule.FONT_FACE_RULE = 5;
33
+ CSSOM.CSSRule.PAGE_RULE = 6;
34
+ CSSOM.CSSRule.KEYFRAMES_RULE = 7;
35
+ CSSOM.CSSRule.KEYFRAME_RULE = 8;
36
+ CSSOM.CSSRule.MARGIN_RULE = 9;
37
+ CSSOM.CSSRule.NAMESPACE_RULE = 10;
38
+ CSSOM.CSSRule.COUNTER_STYLE_RULE = 11;
39
+ CSSOM.CSSRule.SUPPORTS_RULE = 12;
40
+ CSSOM.CSSRule.DOCUMENT_RULE = 13;
41
+ CSSOM.CSSRule.FONT_FEATURE_VALUES_RULE = 14;
42
+ CSSOM.CSSRule.VIEWPORT_RULE = 15;
43
+ CSSOM.CSSRule.REGION_STYLE_RULE = 16;
44
+ CSSOM.CSSRule.prototype = { constructor: CSSOM.CSSRule };
45
+ exports.CSSRule = CSSOM.CSSRule;
46
+ }));
47
+ //#endregion
48
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSStyleRule.js
49
+ var require_CSSStyleRule = /* @__PURE__ */ __commonJSMin(((exports) => {
50
+ var CSSOM = {
51
+ CSSStyleDeclaration: require_CSSStyleDeclaration().CSSStyleDeclaration,
52
+ CSSRule: require_CSSRule().CSSRule
53
+ };
54
+ /**
55
+ * @constructor
56
+ * @see http://dev.w3.org/csswg/cssom/#cssstylerule
57
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule
58
+ */
59
+ CSSOM.CSSStyleRule = function CSSStyleRule() {
60
+ CSSOM.CSSRule.call(this);
61
+ this.selectorText = "";
62
+ this.style = new CSSOM.CSSStyleDeclaration();
63
+ this.style.parentRule = this;
64
+ };
65
+ CSSOM.CSSStyleRule.prototype = new CSSOM.CSSRule();
66
+ CSSOM.CSSStyleRule.prototype.constructor = CSSOM.CSSStyleRule;
67
+ CSSOM.CSSStyleRule.prototype.type = 1;
68
+ Object.defineProperty(CSSOM.CSSStyleRule.prototype, "cssText", {
69
+ get: function() {
70
+ var text;
71
+ if (this.selectorText) text = this.selectorText + " {" + this.style.cssText + "}";
72
+ else text = "";
73
+ return text;
74
+ },
75
+ set: function(cssText) {
76
+ var rule = CSSOM.CSSStyleRule.parse(cssText);
77
+ this.style = rule.style;
78
+ this.selectorText = rule.selectorText;
79
+ }
80
+ });
81
+ /**
82
+ * NON-STANDARD
83
+ * lightweight version of parse.js.
84
+ * @param {string} ruleText
85
+ * @return CSSStyleRule
86
+ */
87
+ CSSOM.CSSStyleRule.parse = function(ruleText) {
88
+ var i = 0;
89
+ var state = "selector";
90
+ var index;
91
+ var j = i;
92
+ var buffer = "";
93
+ var SIGNIFICANT_WHITESPACE = {
94
+ "selector": true,
95
+ "value": true
96
+ };
97
+ var styleRule = new CSSOM.CSSStyleRule();
98
+ var name, priority = "";
99
+ for (var character; character = ruleText.charAt(i); i++) switch (character) {
100
+ case " ":
101
+ case " ":
102
+ case "\r":
103
+ case "\n":
104
+ case "\f":
105
+ if (SIGNIFICANT_WHITESPACE[state]) switch (ruleText.charAt(i - 1)) {
106
+ case " ":
107
+ case " ":
108
+ case "\r":
109
+ case "\n":
110
+ case "\f": break;
111
+ default: buffer += " ";
112
+ }
113
+ break;
114
+ case "\"":
115
+ j = i + 1;
116
+ index = ruleText.indexOf("\"", j) + 1;
117
+ if (!index) throw "\" is missing";
118
+ buffer += ruleText.slice(i, index);
119
+ i = index - 1;
120
+ break;
121
+ case "'":
122
+ j = i + 1;
123
+ index = ruleText.indexOf("'", j) + 1;
124
+ if (!index) throw "' is missing";
125
+ buffer += ruleText.slice(i, index);
126
+ i = index - 1;
127
+ break;
128
+ case "/":
129
+ if (ruleText.charAt(i + 1) === "*") {
130
+ i += 2;
131
+ index = ruleText.indexOf("*/", i);
132
+ if (index === -1) throw new SyntaxError("Missing */");
133
+ else i = index + 1;
134
+ } else buffer += character;
135
+ break;
136
+ case "{":
137
+ if (state === "selector") {
138
+ styleRule.selectorText = buffer.trim();
139
+ buffer = "";
140
+ state = "name";
141
+ }
142
+ break;
143
+ case ":":
144
+ if (state === "name") {
145
+ name = buffer.trim();
146
+ buffer = "";
147
+ state = "value";
148
+ } else buffer += character;
149
+ break;
150
+ case "!":
151
+ if (state === "value" && ruleText.indexOf("!important", i) === i) {
152
+ priority = "important";
153
+ i += 9;
154
+ } else buffer += character;
155
+ break;
156
+ case ";":
157
+ if (state === "value") {
158
+ styleRule.style.setProperty(name, buffer.trim(), priority);
159
+ priority = "";
160
+ buffer = "";
161
+ state = "name";
162
+ } else buffer += character;
163
+ break;
164
+ case "}":
165
+ if (state === "value") {
166
+ styleRule.style.setProperty(name, buffer.trim(), priority);
167
+ priority = "";
168
+ buffer = "";
169
+ } else if (state === "name") break;
170
+ else buffer += character;
171
+ state = "selector";
172
+ break;
173
+ default: buffer += character;
174
+ }
175
+ return styleRule;
176
+ };
177
+ exports.CSSStyleRule = CSSOM.CSSStyleRule;
178
+ }));
179
+ //#endregion
180
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSStyleSheet.js
181
+ var require_CSSStyleSheet = /* @__PURE__ */ __commonJSMin(((exports) => {
182
+ var CSSOM = {
183
+ StyleSheet: require_StyleSheet().StyleSheet,
184
+ CSSStyleRule: require_CSSStyleRule().CSSStyleRule
185
+ };
186
+ /**
187
+ * @constructor
188
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet
189
+ */
190
+ CSSOM.CSSStyleSheet = function CSSStyleSheet() {
191
+ CSSOM.StyleSheet.call(this);
192
+ this.cssRules = [];
193
+ };
194
+ CSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet();
195
+ CSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet;
196
+ /**
197
+ * Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade.
198
+ *
199
+ * sheet = new Sheet("body {margin: 0}")
200
+ * sheet.toString()
201
+ * -> "body{margin:0;}"
202
+ * sheet.insertRule("img {border: none}", 0)
203
+ * -> 0
204
+ * sheet.toString()
205
+ * -> "img{border:none;}body{margin:0;}"
206
+ *
207
+ * @param {string} rule
208
+ * @param {number} index
209
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule
210
+ * @return {number} The index within the style sheet's rule collection of the newly inserted rule.
211
+ */
212
+ CSSOM.CSSStyleSheet.prototype.insertRule = function(rule, index) {
213
+ if (index < 0 || index > this.cssRules.length) throw new RangeError("INDEX_SIZE_ERR");
214
+ var cssRule = CSSOM.parse(rule).cssRules[0];
215
+ cssRule.parentStyleSheet = this;
216
+ this.cssRules.splice(index, 0, cssRule);
217
+ return index;
218
+ };
219
+ /**
220
+ * Used to delete a rule from the style sheet.
221
+ *
222
+ * sheet = new Sheet("img{border:none} body{margin:0}")
223
+ * sheet.toString()
224
+ * -> "img{border:none;}body{margin:0;}"
225
+ * sheet.deleteRule(0)
226
+ * sheet.toString()
227
+ * -> "body{margin:0;}"
228
+ *
229
+ * @param {number} index within the style sheet's rule list of the rule to remove.
230
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule
231
+ */
232
+ CSSOM.CSSStyleSheet.prototype.deleteRule = function(index) {
233
+ if (index < 0 || index >= this.cssRules.length) throw new RangeError("INDEX_SIZE_ERR");
234
+ this.cssRules.splice(index, 1);
235
+ };
236
+ /**
237
+ * NON-STANDARD
238
+ * @return {string} serialize stylesheet
239
+ */
240
+ CSSOM.CSSStyleSheet.prototype.toString = function() {
241
+ var result = "";
242
+ var rules = this.cssRules;
243
+ for (var i = 0; i < rules.length; i++) result += rules[i].cssText + "\n";
244
+ return result;
245
+ };
246
+ exports.CSSStyleSheet = CSSOM.CSSStyleSheet;
247
+ CSSOM.parse = require_parse().parse;
248
+ }));
249
+ //#endregion
250
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/MediaList.js
251
+ var require_MediaList = /* @__PURE__ */ __commonJSMin(((exports) => {
252
+ var CSSOM = {};
253
+ /**
254
+ * @constructor
255
+ * @see http://dev.w3.org/csswg/cssom/#the-medialist-interface
256
+ */
257
+ CSSOM.MediaList = function MediaList() {
258
+ this.length = 0;
259
+ };
260
+ CSSOM.MediaList.prototype = {
261
+ constructor: CSSOM.MediaList,
262
+ /**
263
+ * @return {string}
264
+ */
265
+ get mediaText() {
266
+ return Array.prototype.join.call(this, ", ");
267
+ },
268
+ /**
269
+ * @param {string} value
270
+ */
271
+ set mediaText(value) {
272
+ var values = value.split(",");
273
+ var length = this.length = values.length;
274
+ for (var i = 0; i < length; i++) this[i] = values[i].trim();
275
+ },
276
+ /**
277
+ * @param {string} medium
278
+ */
279
+ appendMedium: function(medium) {
280
+ if (Array.prototype.indexOf.call(this, medium) === -1) {
281
+ this[this.length] = medium;
282
+ this.length++;
283
+ }
284
+ },
285
+ /**
286
+ * @param {string} medium
287
+ */
288
+ deleteMedium: function(medium) {
289
+ var index = Array.prototype.indexOf.call(this, medium);
290
+ if (index !== -1) Array.prototype.splice.call(this, index, 1);
291
+ }
292
+ };
293
+ exports.MediaList = CSSOM.MediaList;
294
+ }));
295
+ //#endregion
296
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSImportRule.js
297
+ var require_CSSImportRule = /* @__PURE__ */ __commonJSMin(((exports) => {
298
+ var CSSOM = {
299
+ CSSRule: require_CSSRule().CSSRule,
300
+ CSSStyleSheet: require_CSSStyleSheet().CSSStyleSheet,
301
+ MediaList: require_MediaList().MediaList
302
+ };
303
+ /**
304
+ * @constructor
305
+ * @see http://dev.w3.org/csswg/cssom/#cssimportrule
306
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule
307
+ */
308
+ CSSOM.CSSImportRule = function CSSImportRule() {
309
+ CSSOM.CSSRule.call(this);
310
+ this.href = "";
311
+ this.media = new CSSOM.MediaList();
312
+ this.styleSheet = new CSSOM.CSSStyleSheet();
313
+ };
314
+ CSSOM.CSSImportRule.prototype = new CSSOM.CSSRule();
315
+ CSSOM.CSSImportRule.prototype.constructor = CSSOM.CSSImportRule;
316
+ CSSOM.CSSImportRule.prototype.type = 3;
317
+ Object.defineProperty(CSSOM.CSSImportRule.prototype, "cssText", {
318
+ get: function() {
319
+ var mediaText = this.media.mediaText;
320
+ return "@import url(" + this.href + ")" + (mediaText ? " " + mediaText : "") + ";";
321
+ },
322
+ set: function(cssText) {
323
+ var i = 0;
324
+ /**
325
+ * @import url(partial.css) screen, handheld;
326
+ * || |
327
+ * after-import media
328
+ * |
329
+ * url
330
+ */
331
+ var state = "";
332
+ var buffer = "";
333
+ var index;
334
+ for (var character; character = cssText.charAt(i); i++) switch (character) {
335
+ case " ":
336
+ case " ":
337
+ case "\r":
338
+ case "\n":
339
+ case "\f":
340
+ if (state === "after-import") state = "url";
341
+ else buffer += character;
342
+ break;
343
+ case "@":
344
+ if (!state && cssText.indexOf("@import", i) === i) {
345
+ state = "after-import";
346
+ i += 6;
347
+ buffer = "";
348
+ }
349
+ break;
350
+ case "u":
351
+ if (state === "url" && cssText.indexOf("url(", i) === i) {
352
+ index = cssText.indexOf(")", i + 1);
353
+ if (index === -1) throw i + ": \")\" not found";
354
+ i += 4;
355
+ var url = cssText.slice(i, index);
356
+ if (url[0] === url[url.length - 1]) {
357
+ if (url[0] === "\"" || url[0] === "'") url = url.slice(1, -1);
358
+ }
359
+ this.href = url;
360
+ i = index;
361
+ state = "media";
362
+ }
363
+ break;
364
+ case "\"":
365
+ if (state === "url") {
366
+ index = cssText.indexOf("\"", i + 1);
367
+ if (!index) throw i + ": '\"' not found";
368
+ this.href = cssText.slice(i + 1, index);
369
+ i = index;
370
+ state = "media";
371
+ }
372
+ break;
373
+ case "'":
374
+ if (state === "url") {
375
+ index = cssText.indexOf("'", i + 1);
376
+ if (!index) throw i + ": \"'\" not found";
377
+ this.href = cssText.slice(i + 1, index);
378
+ i = index;
379
+ state = "media";
380
+ }
381
+ break;
382
+ case ";":
383
+ if (state === "media") {
384
+ if (buffer) this.media.mediaText = buffer.trim();
385
+ }
386
+ break;
387
+ default: if (state === "media") buffer += character;
388
+ }
389
+ }
390
+ });
391
+ exports.CSSImportRule = CSSOM.CSSImportRule;
392
+ }));
393
+ //#endregion
394
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSGroupingRule.js
395
+ var require_CSSGroupingRule = /* @__PURE__ */ __commonJSMin(((exports) => {
396
+ var CSSOM = { CSSRule: require_CSSRule().CSSRule };
397
+ /**
398
+ * @constructor
399
+ * @see https://drafts.csswg.org/cssom/#the-cssgroupingrule-interface
400
+ */
401
+ CSSOM.CSSGroupingRule = function CSSGroupingRule() {
402
+ CSSOM.CSSRule.call(this);
403
+ this.cssRules = [];
404
+ };
405
+ CSSOM.CSSGroupingRule.prototype = new CSSOM.CSSRule();
406
+ CSSOM.CSSGroupingRule.prototype.constructor = CSSOM.CSSGroupingRule;
407
+ /**
408
+ * Used to insert a new CSS rule to a list of CSS rules.
409
+ *
410
+ * @example
411
+ * cssGroupingRule.cssText
412
+ * -> "body{margin:0;}"
413
+ * cssGroupingRule.insertRule("img{border:none;}", 1)
414
+ * -> 1
415
+ * cssGroupingRule.cssText
416
+ * -> "body{margin:0;}img{border:none;}"
417
+ *
418
+ * @param {string} rule
419
+ * @param {number} [index]
420
+ * @see https://www.w3.org/TR/cssom-1/#dom-cssgroupingrule-insertrule
421
+ * @return {number} The index within the grouping rule's collection of the newly inserted rule.
422
+ */
423
+ CSSOM.CSSGroupingRule.prototype.insertRule = function insertRule(rule, index) {
424
+ if (index < 0 || index > this.cssRules.length) throw new RangeError("INDEX_SIZE_ERR");
425
+ var cssRule = CSSOM.parse(rule).cssRules[0];
426
+ cssRule.parentRule = this;
427
+ this.cssRules.splice(index, 0, cssRule);
428
+ return index;
429
+ };
430
+ /**
431
+ * Used to delete a rule from the grouping rule.
432
+ *
433
+ * cssGroupingRule.cssText
434
+ * -> "img{border:none;}body{margin:0;}"
435
+ * cssGroupingRule.deleteRule(0)
436
+ * cssGroupingRule.cssText
437
+ * -> "body{margin:0;}"
438
+ *
439
+ * @param {number} index within the grouping rule's rule list of the rule to remove.
440
+ * @see https://www.w3.org/TR/cssom-1/#dom-cssgroupingrule-deleterule
441
+ */
442
+ CSSOM.CSSGroupingRule.prototype.deleteRule = function deleteRule(index) {
443
+ if (index < 0 || index >= this.cssRules.length) throw new RangeError("INDEX_SIZE_ERR");
444
+ this.cssRules.splice(index, 1)[0].parentRule = null;
445
+ };
446
+ exports.CSSGroupingRule = CSSOM.CSSGroupingRule;
447
+ }));
448
+ //#endregion
449
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSConditionRule.js
450
+ var require_CSSConditionRule = /* @__PURE__ */ __commonJSMin(((exports) => {
451
+ var CSSOM = {
452
+ CSSRule: require_CSSRule().CSSRule,
453
+ CSSGroupingRule: require_CSSGroupingRule().CSSGroupingRule
454
+ };
455
+ /**
456
+ * @constructor
457
+ * @see https://www.w3.org/TR/css-conditional-3/#the-cssconditionrule-interface
458
+ */
459
+ CSSOM.CSSConditionRule = function CSSConditionRule() {
460
+ CSSOM.CSSGroupingRule.call(this);
461
+ this.cssRules = [];
462
+ };
463
+ CSSOM.CSSConditionRule.prototype = new CSSOM.CSSGroupingRule();
464
+ CSSOM.CSSConditionRule.prototype.constructor = CSSOM.CSSConditionRule;
465
+ CSSOM.CSSConditionRule.prototype.conditionText = "";
466
+ CSSOM.CSSConditionRule.prototype.cssText = "";
467
+ exports.CSSConditionRule = CSSOM.CSSConditionRule;
468
+ }));
469
+ //#endregion
470
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSMediaRule.js
471
+ var require_CSSMediaRule = /* @__PURE__ */ __commonJSMin(((exports) => {
472
+ var CSSOM = {
473
+ CSSRule: require_CSSRule().CSSRule,
474
+ CSSGroupingRule: require_CSSGroupingRule().CSSGroupingRule,
475
+ CSSConditionRule: require_CSSConditionRule().CSSConditionRule,
476
+ MediaList: require_MediaList().MediaList
477
+ };
478
+ /**
479
+ * @constructor
480
+ * @see http://dev.w3.org/csswg/cssom/#cssmediarule
481
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule
482
+ */
483
+ CSSOM.CSSMediaRule = function CSSMediaRule() {
484
+ CSSOM.CSSConditionRule.call(this);
485
+ this.media = new CSSOM.MediaList();
486
+ };
487
+ CSSOM.CSSMediaRule.prototype = new CSSOM.CSSConditionRule();
488
+ CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule;
489
+ CSSOM.CSSMediaRule.prototype.type = 4;
490
+ Object.defineProperties(CSSOM.CSSMediaRule.prototype, {
491
+ "conditionText": {
492
+ get: function() {
493
+ return this.media.mediaText;
494
+ },
495
+ set: function(value) {
496
+ this.media.mediaText = value;
497
+ },
498
+ configurable: true,
499
+ enumerable: true
500
+ },
501
+ "cssText": {
502
+ get: function() {
503
+ var cssTexts = [];
504
+ for (var i = 0, length = this.cssRules.length; i < length; i++) cssTexts.push(this.cssRules[i].cssText);
505
+ return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}";
506
+ },
507
+ configurable: true,
508
+ enumerable: true
509
+ }
510
+ });
511
+ exports.CSSMediaRule = CSSOM.CSSMediaRule;
512
+ }));
513
+ //#endregion
514
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSSupportsRule.js
515
+ var require_CSSSupportsRule = /* @__PURE__ */ __commonJSMin(((exports) => {
516
+ var CSSOM = {
517
+ CSSRule: require_CSSRule().CSSRule,
518
+ CSSGroupingRule: require_CSSGroupingRule().CSSGroupingRule,
519
+ CSSConditionRule: require_CSSConditionRule().CSSConditionRule
520
+ };
521
+ /**
522
+ * @constructor
523
+ * @see https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface
524
+ */
525
+ CSSOM.CSSSupportsRule = function CSSSupportsRule() {
526
+ CSSOM.CSSConditionRule.call(this);
527
+ };
528
+ CSSOM.CSSSupportsRule.prototype = new CSSOM.CSSConditionRule();
529
+ CSSOM.CSSSupportsRule.prototype.constructor = CSSOM.CSSSupportsRule;
530
+ CSSOM.CSSSupportsRule.prototype.type = 12;
531
+ Object.defineProperty(CSSOM.CSSSupportsRule.prototype, "cssText", { get: function() {
532
+ var cssTexts = [];
533
+ for (var i = 0, length = this.cssRules.length; i < length; i++) cssTexts.push(this.cssRules[i].cssText);
534
+ return "@supports " + this.conditionText + " {" + cssTexts.join("") + "}";
535
+ } });
536
+ exports.CSSSupportsRule = CSSOM.CSSSupportsRule;
537
+ }));
538
+ //#endregion
539
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSFontFaceRule.js
540
+ var require_CSSFontFaceRule = /* @__PURE__ */ __commonJSMin(((exports) => {
541
+ var CSSOM = {
542
+ CSSStyleDeclaration: require_CSSStyleDeclaration().CSSStyleDeclaration,
543
+ CSSRule: require_CSSRule().CSSRule
544
+ };
545
+ /**
546
+ * @constructor
547
+ * @see http://dev.w3.org/csswg/cssom/#css-font-face-rule
548
+ */
549
+ CSSOM.CSSFontFaceRule = function CSSFontFaceRule() {
550
+ CSSOM.CSSRule.call(this);
551
+ this.style = new CSSOM.CSSStyleDeclaration();
552
+ this.style.parentRule = this;
553
+ };
554
+ CSSOM.CSSFontFaceRule.prototype = new CSSOM.CSSRule();
555
+ CSSOM.CSSFontFaceRule.prototype.constructor = CSSOM.CSSFontFaceRule;
556
+ CSSOM.CSSFontFaceRule.prototype.type = 5;
557
+ Object.defineProperty(CSSOM.CSSFontFaceRule.prototype, "cssText", { get: function() {
558
+ return "@font-face {" + this.style.cssText + "}";
559
+ } });
560
+ exports.CSSFontFaceRule = CSSOM.CSSFontFaceRule;
561
+ }));
562
+ //#endregion
563
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSHostRule.js
564
+ var require_CSSHostRule = /* @__PURE__ */ __commonJSMin(((exports) => {
565
+ var CSSOM = { CSSRule: require_CSSRule().CSSRule };
566
+ /**
567
+ * @constructor
568
+ * @see http://www.w3.org/TR/shadow-dom/#host-at-rule
569
+ */
570
+ CSSOM.CSSHostRule = function CSSHostRule() {
571
+ CSSOM.CSSRule.call(this);
572
+ this.cssRules = [];
573
+ };
574
+ CSSOM.CSSHostRule.prototype = new CSSOM.CSSRule();
575
+ CSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule;
576
+ CSSOM.CSSHostRule.prototype.type = 1001;
577
+ Object.defineProperty(CSSOM.CSSHostRule.prototype, "cssText", { get: function() {
578
+ var cssTexts = [];
579
+ for (var i = 0, length = this.cssRules.length; i < length; i++) cssTexts.push(this.cssRules[i].cssText);
580
+ return "@host {" + cssTexts.join("") + "}";
581
+ } });
582
+ exports.CSSHostRule = CSSOM.CSSHostRule;
583
+ }));
584
+ //#endregion
585
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSKeyframeRule.js
586
+ var require_CSSKeyframeRule = /* @__PURE__ */ __commonJSMin(((exports) => {
587
+ var CSSOM = {
588
+ CSSRule: require_CSSRule().CSSRule,
589
+ CSSStyleDeclaration: require_CSSStyleDeclaration().CSSStyleDeclaration
590
+ };
591
+ /**
592
+ * @constructor
593
+ * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframeRule
594
+ */
595
+ CSSOM.CSSKeyframeRule = function CSSKeyframeRule() {
596
+ CSSOM.CSSRule.call(this);
597
+ this.keyText = "";
598
+ this.style = new CSSOM.CSSStyleDeclaration();
599
+ this.style.parentRule = this;
600
+ };
601
+ CSSOM.CSSKeyframeRule.prototype = new CSSOM.CSSRule();
602
+ CSSOM.CSSKeyframeRule.prototype.constructor = CSSOM.CSSKeyframeRule;
603
+ CSSOM.CSSKeyframeRule.prototype.type = 8;
604
+ Object.defineProperty(CSSOM.CSSKeyframeRule.prototype, "cssText", { get: function() {
605
+ return this.keyText + " {" + this.style.cssText + "} ";
606
+ } });
607
+ exports.CSSKeyframeRule = CSSOM.CSSKeyframeRule;
608
+ }));
609
+ //#endregion
610
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSKeyframesRule.js
611
+ var require_CSSKeyframesRule = /* @__PURE__ */ __commonJSMin(((exports) => {
612
+ var CSSOM = { CSSRule: require_CSSRule().CSSRule };
613
+ /**
614
+ * @constructor
615
+ * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframesRule
616
+ */
617
+ CSSOM.CSSKeyframesRule = function CSSKeyframesRule() {
618
+ CSSOM.CSSRule.call(this);
619
+ this.name = "";
620
+ this.cssRules = [];
621
+ };
622
+ CSSOM.CSSKeyframesRule.prototype = new CSSOM.CSSRule();
623
+ CSSOM.CSSKeyframesRule.prototype.constructor = CSSOM.CSSKeyframesRule;
624
+ CSSOM.CSSKeyframesRule.prototype.type = 7;
625
+ Object.defineProperty(CSSOM.CSSKeyframesRule.prototype, "cssText", { get: function() {
626
+ var cssTexts = [];
627
+ for (var i = 0, length = this.cssRules.length; i < length; i++) cssTexts.push(" " + this.cssRules[i].cssText);
628
+ return "@" + (this._vendorPrefix || "") + "keyframes " + this.name + " { \n" + cssTexts.join("\n") + "\n}";
629
+ } });
630
+ exports.CSSKeyframesRule = CSSOM.CSSKeyframesRule;
631
+ }));
632
+ //#endregion
633
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSValue.js
634
+ var require_CSSValue = /* @__PURE__ */ __commonJSMin(((exports) => {
635
+ var CSSOM = {};
636
+ /**
637
+ * @constructor
638
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue
639
+ *
640
+ * TODO: add if needed
641
+ */
642
+ CSSOM.CSSValue = function CSSValue() {};
643
+ CSSOM.CSSValue.prototype = {
644
+ constructor: CSSOM.CSSValue,
645
+ set cssText(text) {
646
+ var name = this._getConstructorName();
647
+ throw new Error("DOMException: property \"cssText\" of \"" + name + "\" is readonly and can not be replaced with \"" + text + "\"!");
648
+ },
649
+ get cssText() {
650
+ var name = this._getConstructorName();
651
+ throw new Error("getter \"cssText\" of \"" + name + "\" is not implemented!");
652
+ },
653
+ _getConstructorName: function() {
654
+ return this.constructor.toString().match(/function\s([^\(]+)/)[1];
655
+ }
656
+ };
657
+ exports.CSSValue = CSSOM.CSSValue;
658
+ }));
659
+ //#endregion
660
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSValueExpression.js
661
+ var require_CSSValueExpression = /* @__PURE__ */ __commonJSMin(((exports) => {
662
+ var CSSOM = { CSSValue: require_CSSValue().CSSValue };
663
+ /**
664
+ * @constructor
665
+ * @see http://msdn.microsoft.com/en-us/library/ms537634(v=vs.85).aspx
666
+ *
667
+ */
668
+ CSSOM.CSSValueExpression = function CSSValueExpression(token, idx) {
669
+ this._token = token;
670
+ this._idx = idx;
671
+ };
672
+ CSSOM.CSSValueExpression.prototype = new CSSOM.CSSValue();
673
+ CSSOM.CSSValueExpression.prototype.constructor = CSSOM.CSSValueExpression;
674
+ /**
675
+ * parse css expression() value
676
+ *
677
+ * @return {Object}
678
+ * - error:
679
+ * or
680
+ * - idx:
681
+ * - expression:
682
+ *
683
+ * Example:
684
+ *
685
+ * .selector {
686
+ * zoom: expression(documentElement.clientWidth > 1000 ? '1000px' : 'auto');
687
+ * }
688
+ */
689
+ CSSOM.CSSValueExpression.prototype.parse = function() {
690
+ var token = this._token, idx = this._idx;
691
+ var character = "", expression = "", error = "", info, paren = [];
692
+ for (;; ++idx) {
693
+ character = token.charAt(idx);
694
+ if (character === "") {
695
+ error = "css expression error: unfinished expression!";
696
+ break;
697
+ }
698
+ switch (character) {
699
+ case "(":
700
+ paren.push(character);
701
+ expression += character;
702
+ break;
703
+ case ")":
704
+ paren.pop(character);
705
+ expression += character;
706
+ break;
707
+ case "/":
708
+ if (info = this._parseJSComment(token, idx)) {
709
+ if (info.error) error = "css expression error: unfinished comment in expression!";
710
+ else idx = info.idx;
711
+ } else if (info = this._parseJSRexExp(token, idx)) {
712
+ idx = info.idx;
713
+ expression += info.text;
714
+ } else expression += character;
715
+ break;
716
+ case "'":
717
+ case "\"":
718
+ info = this._parseJSString(token, idx, character);
719
+ if (info) {
720
+ idx = info.idx;
721
+ expression += info.text;
722
+ } else expression += character;
723
+ break;
724
+ default: expression += character;
725
+ }
726
+ if (error) break;
727
+ if (paren.length === 0) break;
728
+ }
729
+ var ret;
730
+ if (error) ret = { error };
731
+ else ret = {
732
+ idx,
733
+ expression
734
+ };
735
+ return ret;
736
+ };
737
+ /**
738
+ *
739
+ * @return {Object|false}
740
+ * - idx:
741
+ * - text:
742
+ * or
743
+ * - error:
744
+ * or
745
+ * false
746
+ *
747
+ */
748
+ CSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) {
749
+ var nextChar = token.charAt(idx + 1), text;
750
+ if (nextChar === "/" || nextChar === "*") {
751
+ var startIdx = idx, endIdx, commentEndChar;
752
+ if (nextChar === "/") commentEndChar = "\n";
753
+ else if (nextChar === "*") commentEndChar = "*/";
754
+ endIdx = token.indexOf(commentEndChar, startIdx + 1 + 1);
755
+ if (endIdx !== -1) {
756
+ endIdx = endIdx + commentEndChar.length - 1;
757
+ text = token.substring(idx, endIdx + 1);
758
+ return {
759
+ idx: endIdx,
760
+ text
761
+ };
762
+ } else return { error: "css expression error: unfinished comment in expression!" };
763
+ } else return false;
764
+ };
765
+ /**
766
+ *
767
+ * @return {Object|false}
768
+ * - idx:
769
+ * - text:
770
+ * or
771
+ * false
772
+ *
773
+ */
774
+ CSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep) {
775
+ var endIdx = this._findMatchedIdx(token, idx, sep), text;
776
+ if (endIdx === -1) return false;
777
+ else {
778
+ text = token.substring(idx, endIdx + sep.length);
779
+ return {
780
+ idx: endIdx,
781
+ text
782
+ };
783
+ }
784
+ };
785
+ /**
786
+ * parse regexp in css expression
787
+ *
788
+ * @return {Object|false}
789
+ * - idx:
790
+ * - regExp:
791
+ * or
792
+ * false
793
+ */
794
+ CSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) {
795
+ var before = token.substring(0, idx).replace(/\s+$/, "");
796
+ if (![
797
+ /^$/,
798
+ /\($/,
799
+ /\[$/,
800
+ /\!$/,
801
+ /\+$/,
802
+ /\-$/,
803
+ /\*$/,
804
+ /\/\s+/,
805
+ /\%$/,
806
+ /\=$/,
807
+ /\>$/,
808
+ /<$/,
809
+ /\&$/,
810
+ /\|$/,
811
+ /\^$/,
812
+ /\~$/,
813
+ /\?$/,
814
+ /\,$/,
815
+ /delete$/,
816
+ /in$/,
817
+ /instanceof$/,
818
+ /new$/,
819
+ /typeof$/,
820
+ /void$/
821
+ ].some(function(reg) {
822
+ return reg.test(before);
823
+ })) return false;
824
+ else return this._parseJSString(token, idx, "/");
825
+ };
826
+ /**
827
+ *
828
+ * find next sep(same line) index in `token`
829
+ *
830
+ * @return {Number}
831
+ *
832
+ */
833
+ CSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx, sep) {
834
+ var startIdx = idx, endIdx;
835
+ var NOT_FOUND = -1;
836
+ while (true) {
837
+ endIdx = token.indexOf(sep, startIdx + 1);
838
+ if (endIdx === -1) {
839
+ endIdx = NOT_FOUND;
840
+ break;
841
+ } else {
842
+ var matched = token.substring(idx + 1, endIdx).match(/\\+$/);
843
+ if (!matched || matched[0] % 2 === 0) break;
844
+ else startIdx = endIdx;
845
+ }
846
+ }
847
+ if (token.indexOf("\n", idx + 1) < endIdx) endIdx = NOT_FOUND;
848
+ return endIdx;
849
+ };
850
+ exports.CSSValueExpression = CSSOM.CSSValueExpression;
851
+ }));
852
+ //#endregion
853
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/MatcherList.js
854
+ var require_MatcherList = /* @__PURE__ */ __commonJSMin(((exports) => {
855
+ var CSSOM = {};
856
+ /**
857
+ * @constructor
858
+ * @see https://developer.mozilla.org/en/CSS/@-moz-document
859
+ */
860
+ CSSOM.MatcherList = function MatcherList() {
861
+ this.length = 0;
862
+ };
863
+ CSSOM.MatcherList.prototype = {
864
+ constructor: CSSOM.MatcherList,
865
+ /**
866
+ * @return {string}
867
+ */
868
+ get matcherText() {
869
+ return Array.prototype.join.call(this, ", ");
870
+ },
871
+ /**
872
+ * @param {string} value
873
+ */
874
+ set matcherText(value) {
875
+ var values = value.split(",");
876
+ var length = this.length = values.length;
877
+ for (var i = 0; i < length; i++) this[i] = values[i].trim();
878
+ },
879
+ /**
880
+ * @param {string} matcher
881
+ */
882
+ appendMatcher: function(matcher) {
883
+ if (Array.prototype.indexOf.call(this, matcher) === -1) {
884
+ this[this.length] = matcher;
885
+ this.length++;
886
+ }
887
+ },
888
+ /**
889
+ * @param {string} matcher
890
+ */
891
+ deleteMatcher: function(matcher) {
892
+ var index = Array.prototype.indexOf.call(this, matcher);
893
+ if (index !== -1) Array.prototype.splice.call(this, index, 1);
894
+ }
895
+ };
896
+ exports.MatcherList = CSSOM.MatcherList;
897
+ }));
898
+ //#endregion
899
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSDocumentRule.js
900
+ var require_CSSDocumentRule = /* @__PURE__ */ __commonJSMin(((exports) => {
901
+ var CSSOM = {
902
+ CSSRule: require_CSSRule().CSSRule,
903
+ MatcherList: require_MatcherList().MatcherList
904
+ };
905
+ /**
906
+ * @constructor
907
+ * @see https://developer.mozilla.org/en/CSS/@-moz-document
908
+ */
909
+ CSSOM.CSSDocumentRule = function CSSDocumentRule() {
910
+ CSSOM.CSSRule.call(this);
911
+ this.matcher = new CSSOM.MatcherList();
912
+ this.cssRules = [];
913
+ };
914
+ CSSOM.CSSDocumentRule.prototype = new CSSOM.CSSRule();
915
+ CSSOM.CSSDocumentRule.prototype.constructor = CSSOM.CSSDocumentRule;
916
+ CSSOM.CSSDocumentRule.prototype.type = 10;
917
+ Object.defineProperty(CSSOM.CSSDocumentRule.prototype, "cssText", { get: function() {
918
+ var cssTexts = [];
919
+ for (var i = 0, length = this.cssRules.length; i < length; i++) cssTexts.push(this.cssRules[i].cssText);
920
+ return "@-moz-document " + this.matcher.matcherText + " {" + cssTexts.join("") + "}";
921
+ } });
922
+ exports.CSSDocumentRule = CSSOM.CSSDocumentRule;
923
+ }));
924
+ //#endregion
925
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/parse.js
926
+ var require_parse = /* @__PURE__ */ __commonJSMin(((exports) => {
927
+ var CSSOM = {};
928
+ /**
929
+ * @param {string} token
930
+ */
931
+ CSSOM.parse = function parse(token) {
932
+ var i = 0;
933
+ /**
934
+ "before-selector" or
935
+ "selector" or
936
+ "atRule" or
937
+ "atBlock" or
938
+ "conditionBlock" or
939
+ "before-name" or
940
+ "name" or
941
+ "before-value" or
942
+ "value"
943
+ */
944
+ var state = "before-selector";
945
+ var index;
946
+ var buffer = "";
947
+ var valueParenthesisDepth = 0;
948
+ var SIGNIFICANT_WHITESPACE = {
949
+ "selector": true,
950
+ "value": true,
951
+ "value-parenthesis": true,
952
+ "atRule": true,
953
+ "importRule-begin": true,
954
+ "importRule": true,
955
+ "atBlock": true,
956
+ "conditionBlock": true,
957
+ "documentRule-begin": true
958
+ };
959
+ var styleSheet = new CSSOM.CSSStyleSheet();
960
+ var currentScope = styleSheet;
961
+ var parentRule;
962
+ var ancestorRules = [];
963
+ var hasAncestors = false;
964
+ var prevScope;
965
+ var name, priority = "", styleRule, mediaRule, supportsRule, importRule, fontFaceRule, keyframesRule, documentRule, hostRule;
966
+ var atKeyframesRegExp = /@(-(?:\w+-)+)?keyframes/g;
967
+ var parseError = function(message) {
968
+ var lines = token.substring(0, i).split("\n");
969
+ var lineCount = lines.length;
970
+ var charCount = lines.pop().length + 1;
971
+ var error = /* @__PURE__ */ new Error(message + " (line " + lineCount + ", char " + charCount + ")");
972
+ error.line = lineCount;
973
+ error["char"] = charCount;
974
+ error.styleSheet = styleSheet;
975
+ throw error;
976
+ };
977
+ for (var character; character = token.charAt(i); i++) switch (character) {
978
+ case " ":
979
+ case " ":
980
+ case "\r":
981
+ case "\n":
982
+ case "\f":
983
+ if (SIGNIFICANT_WHITESPACE[state]) buffer += character;
984
+ break;
985
+ case "\"":
986
+ index = i + 1;
987
+ do {
988
+ index = token.indexOf("\"", index) + 1;
989
+ if (!index) parseError("Unmatched \"");
990
+ } while (token[index - 2] === "\\");
991
+ buffer += token.slice(i, index);
992
+ i = index - 1;
993
+ switch (state) {
994
+ case "before-value":
995
+ state = "value";
996
+ break;
997
+ case "importRule-begin": state = "importRule";
998
+ }
999
+ break;
1000
+ case "'":
1001
+ index = i + 1;
1002
+ do {
1003
+ index = token.indexOf("'", index) + 1;
1004
+ if (!index) parseError("Unmatched '");
1005
+ } while (token[index - 2] === "\\");
1006
+ buffer += token.slice(i, index);
1007
+ i = index - 1;
1008
+ switch (state) {
1009
+ case "before-value":
1010
+ state = "value";
1011
+ break;
1012
+ case "importRule-begin": state = "importRule";
1013
+ }
1014
+ break;
1015
+ case "/":
1016
+ if (token.charAt(i + 1) === "*") {
1017
+ i += 2;
1018
+ index = token.indexOf("*/", i);
1019
+ if (index === -1) parseError("Missing */");
1020
+ else i = index + 1;
1021
+ } else buffer += character;
1022
+ if (state === "importRule-begin") {
1023
+ buffer += " ";
1024
+ state = "importRule";
1025
+ }
1026
+ break;
1027
+ case "@":
1028
+ if (token.indexOf("@-moz-document", i) === i) {
1029
+ state = "documentRule-begin";
1030
+ documentRule = new CSSOM.CSSDocumentRule();
1031
+ documentRule.__starts = i;
1032
+ i += 13;
1033
+ buffer = "";
1034
+ break;
1035
+ } else if (token.indexOf("@media", i) === i) {
1036
+ state = "atBlock";
1037
+ mediaRule = new CSSOM.CSSMediaRule();
1038
+ mediaRule.__starts = i;
1039
+ i += 5;
1040
+ buffer = "";
1041
+ break;
1042
+ } else if (token.indexOf("@supports", i) === i) {
1043
+ state = "conditionBlock";
1044
+ supportsRule = new CSSOM.CSSSupportsRule();
1045
+ supportsRule.__starts = i;
1046
+ i += 8;
1047
+ buffer = "";
1048
+ break;
1049
+ } else if (token.indexOf("@host", i) === i) {
1050
+ state = "hostRule-begin";
1051
+ i += 4;
1052
+ hostRule = new CSSOM.CSSHostRule();
1053
+ hostRule.__starts = i;
1054
+ buffer = "";
1055
+ break;
1056
+ } else if (token.indexOf("@import", i) === i) {
1057
+ state = "importRule-begin";
1058
+ i += 6;
1059
+ buffer += "@import";
1060
+ break;
1061
+ } else if (token.indexOf("@font-face", i) === i) {
1062
+ state = "fontFaceRule-begin";
1063
+ i += 9;
1064
+ fontFaceRule = new CSSOM.CSSFontFaceRule();
1065
+ fontFaceRule.__starts = i;
1066
+ buffer = "";
1067
+ break;
1068
+ } else {
1069
+ atKeyframesRegExp.lastIndex = i;
1070
+ var matchKeyframes = atKeyframesRegExp.exec(token);
1071
+ if (matchKeyframes && matchKeyframes.index === i) {
1072
+ state = "keyframesRule-begin";
1073
+ keyframesRule = new CSSOM.CSSKeyframesRule();
1074
+ keyframesRule.__starts = i;
1075
+ keyframesRule._vendorPrefix = matchKeyframes[1];
1076
+ i += matchKeyframes[0].length - 1;
1077
+ buffer = "";
1078
+ break;
1079
+ } else if (state === "selector") state = "atRule";
1080
+ }
1081
+ buffer += character;
1082
+ break;
1083
+ case "{":
1084
+ if (state === "selector" || state === "atRule") {
1085
+ styleRule.selectorText = buffer.trim();
1086
+ styleRule.style.__starts = i;
1087
+ buffer = "";
1088
+ state = "before-name";
1089
+ } else if (state === "atBlock") {
1090
+ mediaRule.media.mediaText = buffer.trim();
1091
+ if (parentRule) ancestorRules.push(parentRule);
1092
+ currentScope = parentRule = mediaRule;
1093
+ mediaRule.parentStyleSheet = styleSheet;
1094
+ buffer = "";
1095
+ state = "before-selector";
1096
+ } else if (state === "conditionBlock") {
1097
+ supportsRule.conditionText = buffer.trim();
1098
+ if (parentRule) ancestorRules.push(parentRule);
1099
+ currentScope = parentRule = supportsRule;
1100
+ supportsRule.parentStyleSheet = styleSheet;
1101
+ buffer = "";
1102
+ state = "before-selector";
1103
+ } else if (state === "hostRule-begin") {
1104
+ if (parentRule) ancestorRules.push(parentRule);
1105
+ currentScope = parentRule = hostRule;
1106
+ hostRule.parentStyleSheet = styleSheet;
1107
+ buffer = "";
1108
+ state = "before-selector";
1109
+ } else if (state === "fontFaceRule-begin") {
1110
+ if (parentRule) fontFaceRule.parentRule = parentRule;
1111
+ fontFaceRule.parentStyleSheet = styleSheet;
1112
+ styleRule = fontFaceRule;
1113
+ buffer = "";
1114
+ state = "before-name";
1115
+ } else if (state === "keyframesRule-begin") {
1116
+ keyframesRule.name = buffer.trim();
1117
+ if (parentRule) {
1118
+ ancestorRules.push(parentRule);
1119
+ keyframesRule.parentRule = parentRule;
1120
+ }
1121
+ keyframesRule.parentStyleSheet = styleSheet;
1122
+ currentScope = parentRule = keyframesRule;
1123
+ buffer = "";
1124
+ state = "keyframeRule-begin";
1125
+ } else if (state === "keyframeRule-begin") {
1126
+ styleRule = new CSSOM.CSSKeyframeRule();
1127
+ styleRule.keyText = buffer.trim();
1128
+ styleRule.__starts = i;
1129
+ buffer = "";
1130
+ state = "before-name";
1131
+ } else if (state === "documentRule-begin") {
1132
+ documentRule.matcher.matcherText = buffer.trim();
1133
+ if (parentRule) {
1134
+ ancestorRules.push(parentRule);
1135
+ documentRule.parentRule = parentRule;
1136
+ }
1137
+ currentScope = parentRule = documentRule;
1138
+ documentRule.parentStyleSheet = styleSheet;
1139
+ buffer = "";
1140
+ state = "before-selector";
1141
+ }
1142
+ break;
1143
+ case ":":
1144
+ if (state === "name") {
1145
+ name = buffer.trim();
1146
+ buffer = "";
1147
+ state = "before-value";
1148
+ } else buffer += character;
1149
+ break;
1150
+ case "(":
1151
+ if (state === "value") {
1152
+ if (buffer.trim() === "expression") {
1153
+ var info = new CSSOM.CSSValueExpression(token, i).parse();
1154
+ if (info.error) parseError(info.error);
1155
+ else {
1156
+ buffer += info.expression;
1157
+ i = info.idx;
1158
+ }
1159
+ } else {
1160
+ state = "value-parenthesis";
1161
+ valueParenthesisDepth = 1;
1162
+ buffer += character;
1163
+ }
1164
+ } else if (state === "value-parenthesis") {
1165
+ valueParenthesisDepth++;
1166
+ buffer += character;
1167
+ } else buffer += character;
1168
+ break;
1169
+ case ")":
1170
+ if (state === "value-parenthesis") {
1171
+ valueParenthesisDepth--;
1172
+ if (valueParenthesisDepth === 0) state = "value";
1173
+ }
1174
+ buffer += character;
1175
+ break;
1176
+ case "!":
1177
+ if (state === "value" && token.indexOf("!important", i) === i) {
1178
+ priority = "important";
1179
+ i += 9;
1180
+ } else buffer += character;
1181
+ break;
1182
+ case ";":
1183
+ switch (state) {
1184
+ case "value":
1185
+ styleRule.style.setProperty(name, buffer.trim(), priority);
1186
+ priority = "";
1187
+ buffer = "";
1188
+ state = "before-name";
1189
+ break;
1190
+ case "atRule":
1191
+ buffer = "";
1192
+ state = "before-selector";
1193
+ break;
1194
+ case "importRule":
1195
+ importRule = new CSSOM.CSSImportRule();
1196
+ importRule.parentStyleSheet = importRule.styleSheet.parentStyleSheet = styleSheet;
1197
+ importRule.cssText = buffer + character;
1198
+ styleSheet.cssRules.push(importRule);
1199
+ buffer = "";
1200
+ state = "before-selector";
1201
+ break;
1202
+ default: buffer += character;
1203
+ }
1204
+ break;
1205
+ case "}":
1206
+ switch (state) {
1207
+ case "value":
1208
+ styleRule.style.setProperty(name, buffer.trim(), priority);
1209
+ priority = "";
1210
+ case "before-name":
1211
+ case "name":
1212
+ styleRule.__ends = i + 1;
1213
+ if (parentRule) styleRule.parentRule = parentRule;
1214
+ styleRule.parentStyleSheet = styleSheet;
1215
+ currentScope.cssRules.push(styleRule);
1216
+ buffer = "";
1217
+ if (currentScope.constructor === CSSOM.CSSKeyframesRule) state = "keyframeRule-begin";
1218
+ else state = "before-selector";
1219
+ break;
1220
+ case "keyframeRule-begin":
1221
+ case "before-selector":
1222
+ case "selector":
1223
+ if (!parentRule) parseError("Unexpected }");
1224
+ hasAncestors = ancestorRules.length > 0;
1225
+ while (ancestorRules.length > 0) {
1226
+ parentRule = ancestorRules.pop();
1227
+ if (parentRule.constructor.name === "CSSMediaRule" || parentRule.constructor.name === "CSSSupportsRule") {
1228
+ prevScope = currentScope;
1229
+ currentScope = parentRule;
1230
+ currentScope.cssRules.push(prevScope);
1231
+ break;
1232
+ }
1233
+ if (ancestorRules.length === 0) hasAncestors = false;
1234
+ }
1235
+ if (!hasAncestors) {
1236
+ currentScope.__ends = i + 1;
1237
+ styleSheet.cssRules.push(currentScope);
1238
+ currentScope = styleSheet;
1239
+ parentRule = null;
1240
+ }
1241
+ buffer = "";
1242
+ state = "before-selector";
1243
+ }
1244
+ break;
1245
+ default:
1246
+ switch (state) {
1247
+ case "before-selector":
1248
+ state = "selector";
1249
+ styleRule = new CSSOM.CSSStyleRule();
1250
+ styleRule.__starts = i;
1251
+ break;
1252
+ case "before-name":
1253
+ state = "name";
1254
+ break;
1255
+ case "before-value":
1256
+ state = "value";
1257
+ break;
1258
+ case "importRule-begin": state = "importRule";
1259
+ }
1260
+ buffer += character;
1261
+ }
1262
+ return styleSheet;
1263
+ };
1264
+ exports.parse = CSSOM.parse;
1265
+ CSSOM.CSSStyleSheet = require_CSSStyleSheet().CSSStyleSheet;
1266
+ CSSOM.CSSStyleRule = require_CSSStyleRule().CSSStyleRule;
1267
+ CSSOM.CSSImportRule = require_CSSImportRule().CSSImportRule;
1268
+ CSSOM.CSSGroupingRule = require_CSSGroupingRule().CSSGroupingRule;
1269
+ CSSOM.CSSMediaRule = require_CSSMediaRule().CSSMediaRule;
1270
+ CSSOM.CSSConditionRule = require_CSSConditionRule().CSSConditionRule;
1271
+ CSSOM.CSSSupportsRule = require_CSSSupportsRule().CSSSupportsRule;
1272
+ CSSOM.CSSFontFaceRule = require_CSSFontFaceRule().CSSFontFaceRule;
1273
+ CSSOM.CSSHostRule = require_CSSHostRule().CSSHostRule;
1274
+ CSSOM.CSSStyleDeclaration = require_CSSStyleDeclaration().CSSStyleDeclaration;
1275
+ CSSOM.CSSKeyframeRule = require_CSSKeyframeRule().CSSKeyframeRule;
1276
+ CSSOM.CSSKeyframesRule = require_CSSKeyframesRule().CSSKeyframesRule;
1277
+ CSSOM.CSSValueExpression = require_CSSValueExpression().CSSValueExpression;
1278
+ CSSOM.CSSDocumentRule = require_CSSDocumentRule().CSSDocumentRule;
1279
+ }));
1280
+ //#endregion
1281
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/CSSStyleDeclaration.js
1282
+ var require_CSSStyleDeclaration = /* @__PURE__ */ __commonJSMin(((exports) => {
1283
+ var CSSOM = {};
1284
+ /**
1285
+ * @constructor
1286
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
1287
+ */
1288
+ CSSOM.CSSStyleDeclaration = function CSSStyleDeclaration() {
1289
+ this.length = 0;
1290
+ this.parentRule = null;
1291
+ this._importants = {};
1292
+ };
1293
+ CSSOM.CSSStyleDeclaration.prototype = {
1294
+ constructor: CSSOM.CSSStyleDeclaration,
1295
+ /**
1296
+ *
1297
+ * @param {string} name
1298
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue
1299
+ * @return {string} the value of the property if it has been explicitly set for this declaration block.
1300
+ * Returns the empty string if the property has not been set.
1301
+ */
1302
+ getPropertyValue: function(name) {
1303
+ return this[name] || "";
1304
+ },
1305
+ /**
1306
+ *
1307
+ * @param {string} name
1308
+ * @param {string} value
1309
+ * @param {string} [priority=null] "important" or null
1310
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty
1311
+ */
1312
+ setProperty: function(name, value, priority) {
1313
+ if (this[name]) {
1314
+ if (Array.prototype.indexOf.call(this, name) < 0) {
1315
+ this[this.length] = name;
1316
+ this.length++;
1317
+ }
1318
+ } else {
1319
+ this[this.length] = name;
1320
+ this.length++;
1321
+ }
1322
+ this[name] = value + "";
1323
+ this._importants[name] = priority;
1324
+ },
1325
+ /**
1326
+ *
1327
+ * @param {string} name
1328
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty
1329
+ * @return {string} the value of the property if it has been explicitly set for this declaration block.
1330
+ * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.
1331
+ */
1332
+ removeProperty: function(name) {
1333
+ if (!(name in this)) return "";
1334
+ var index = Array.prototype.indexOf.call(this, name);
1335
+ if (index < 0) return "";
1336
+ var prevValue = this[name];
1337
+ this[name] = "";
1338
+ Array.prototype.splice.call(this, index, 1);
1339
+ return prevValue;
1340
+ },
1341
+ getPropertyCSSValue: function() {},
1342
+ /**
1343
+ *
1344
+ * @param {String} name
1345
+ */
1346
+ getPropertyPriority: function(name) {
1347
+ return this._importants[name] || "";
1348
+ },
1349
+ /**
1350
+ * element.style.overflow = "auto"
1351
+ * element.style.getPropertyShorthand("overflow-x")
1352
+ * -> "overflow"
1353
+ */
1354
+ getPropertyShorthand: function() {},
1355
+ isPropertyImplicit: function() {},
1356
+ get cssText() {
1357
+ var properties = [];
1358
+ for (var i = 0, length = this.length; i < length; ++i) {
1359
+ var name = this[i];
1360
+ var value = this.getPropertyValue(name);
1361
+ var priority = this.getPropertyPriority(name);
1362
+ if (priority) priority = " !" + priority;
1363
+ properties[i] = name + ": " + value + priority + ";";
1364
+ }
1365
+ return properties.join(" ");
1366
+ },
1367
+ set cssText(text) {
1368
+ var i = this.length, name;
1369
+ for (; i--;) {
1370
+ name = this[i];
1371
+ this[name] = "";
1372
+ }
1373
+ Array.prototype.splice.call(this, 0, this.length);
1374
+ this._importants = {};
1375
+ var dummyRule = CSSOM.parse("#bogus{" + text + "}").cssRules[0].style;
1376
+ var length = dummyRule.length;
1377
+ for (i = 0; i < length; ++i) {
1378
+ name = dummyRule[i];
1379
+ this.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name));
1380
+ }
1381
+ }
1382
+ };
1383
+ exports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration;
1384
+ CSSOM.parse = require_parse().parse;
1385
+ }));
1386
+ //#endregion
1387
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/clone.js
1388
+ var require_clone = /* @__PURE__ */ __commonJSMin(((exports) => {
1389
+ var CSSOM = {
1390
+ CSSStyleSheet: require_CSSStyleSheet().CSSStyleSheet,
1391
+ CSSRule: require_CSSRule().CSSRule,
1392
+ CSSStyleRule: require_CSSStyleRule().CSSStyleRule,
1393
+ CSSGroupingRule: require_CSSGroupingRule().CSSGroupingRule,
1394
+ CSSConditionRule: require_CSSConditionRule().CSSConditionRule,
1395
+ CSSMediaRule: require_CSSMediaRule().CSSMediaRule,
1396
+ CSSSupportsRule: require_CSSSupportsRule().CSSSupportsRule,
1397
+ CSSStyleDeclaration: require_CSSStyleDeclaration().CSSStyleDeclaration,
1398
+ CSSKeyframeRule: require_CSSKeyframeRule().CSSKeyframeRule,
1399
+ CSSKeyframesRule: require_CSSKeyframesRule().CSSKeyframesRule
1400
+ };
1401
+ /**
1402
+ * Produces a deep copy of stylesheet — the instance variables of stylesheet are copied recursively.
1403
+ * @param {CSSStyleSheet|CSSOM.CSSStyleSheet} stylesheet
1404
+ * @nosideeffects
1405
+ * @return {CSSOM.CSSStyleSheet}
1406
+ */
1407
+ CSSOM.clone = function clone(stylesheet) {
1408
+ var cloned = new CSSOM.CSSStyleSheet();
1409
+ var rules = stylesheet.cssRules;
1410
+ if (!rules) return cloned;
1411
+ for (var i = 0, rulesLength = rules.length; i < rulesLength; i++) {
1412
+ var rule = rules[i];
1413
+ var ruleClone = cloned.cssRules[i] = new rule.constructor();
1414
+ var style = rule.style;
1415
+ if (style) {
1416
+ var styleClone = ruleClone.style = new CSSOM.CSSStyleDeclaration();
1417
+ for (var j = 0, styleLength = style.length; j < styleLength; j++) {
1418
+ var name = styleClone[j] = style[j];
1419
+ styleClone[name] = style[name];
1420
+ styleClone._importants[name] = style.getPropertyPriority(name);
1421
+ }
1422
+ styleClone.length = style.length;
1423
+ }
1424
+ if (rule.hasOwnProperty("keyText")) ruleClone.keyText = rule.keyText;
1425
+ if (rule.hasOwnProperty("selectorText")) ruleClone.selectorText = rule.selectorText;
1426
+ if (rule.hasOwnProperty("mediaText")) ruleClone.mediaText = rule.mediaText;
1427
+ if (rule.hasOwnProperty("conditionText")) ruleClone.conditionText = rule.conditionText;
1428
+ if (rule.hasOwnProperty("cssRules")) ruleClone.cssRules = clone(rule).cssRules;
1429
+ }
1430
+ return cloned;
1431
+ };
1432
+ exports.clone = CSSOM.clone;
1433
+ }));
1434
+ //#endregion
1435
+ //#region ../../node_modules/.pnpm/cssom@0.5.0/node_modules/cssom/lib/index.js
1436
+ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
1437
+ exports.CSSStyleDeclaration = require_CSSStyleDeclaration().CSSStyleDeclaration;
1438
+ exports.CSSRule = require_CSSRule().CSSRule;
1439
+ exports.CSSGroupingRule = require_CSSGroupingRule().CSSGroupingRule;
1440
+ exports.CSSConditionRule = require_CSSConditionRule().CSSConditionRule;
1441
+ exports.CSSStyleRule = require_CSSStyleRule().CSSStyleRule;
1442
+ exports.MediaList = require_MediaList().MediaList;
1443
+ exports.CSSMediaRule = require_CSSMediaRule().CSSMediaRule;
1444
+ exports.CSSSupportsRule = require_CSSSupportsRule().CSSSupportsRule;
1445
+ exports.CSSImportRule = require_CSSImportRule().CSSImportRule;
1446
+ exports.CSSFontFaceRule = require_CSSFontFaceRule().CSSFontFaceRule;
1447
+ exports.CSSHostRule = require_CSSHostRule().CSSHostRule;
1448
+ exports.StyleSheet = require_StyleSheet().StyleSheet;
1449
+ exports.CSSStyleSheet = require_CSSStyleSheet().CSSStyleSheet;
1450
+ exports.CSSKeyframesRule = require_CSSKeyframesRule().CSSKeyframesRule;
1451
+ exports.CSSKeyframeRule = require_CSSKeyframeRule().CSSKeyframeRule;
1452
+ exports.MatcherList = require_MatcherList().MatcherList;
1453
+ exports.CSSDocumentRule = require_CSSDocumentRule().CSSDocumentRule;
1454
+ exports.CSSValue = require_CSSValue().CSSValue;
1455
+ exports.CSSValueExpression = require_CSSValueExpression().CSSValueExpression;
1456
+ exports.parse = require_parse().parse;
1457
+ exports.clone = require_clone().clone;
1458
+ }));
1459
+ //#endregion
1460
+ export { require_lib as t };