unplugin-env 0.1.5 → 0.1.6

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.
package/dist/index.cjs CHANGED
@@ -21584,6 +21584,4105 @@ var require_lib = __commonJS({
21584
21584
  }
21585
21585
  });
21586
21586
 
21587
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/output.js
21588
+ var require_output = __commonJS({
21589
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/output.js"(exports2, module2) {
21590
+ "use strict";
21591
+ function OutputLine(parent) {
21592
+ this.__parent = parent;
21593
+ this.__character_count = 0;
21594
+ this.__indent_count = -1;
21595
+ this.__alignment_count = 0;
21596
+ this.__wrap_point_index = 0;
21597
+ this.__wrap_point_character_count = 0;
21598
+ this.__wrap_point_indent_count = -1;
21599
+ this.__wrap_point_alignment_count = 0;
21600
+ this.__items = [];
21601
+ }
21602
+ OutputLine.prototype.clone_empty = function() {
21603
+ var line = new OutputLine(this.__parent);
21604
+ line.set_indent(this.__indent_count, this.__alignment_count);
21605
+ return line;
21606
+ };
21607
+ OutputLine.prototype.item = function(index) {
21608
+ if (index < 0) {
21609
+ return this.__items[this.__items.length + index];
21610
+ } else {
21611
+ return this.__items[index];
21612
+ }
21613
+ };
21614
+ OutputLine.prototype.has_match = function(pattern) {
21615
+ for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
21616
+ if (this.__items[lastCheckedOutput].match(pattern)) {
21617
+ return true;
21618
+ }
21619
+ }
21620
+ return false;
21621
+ };
21622
+ OutputLine.prototype.set_indent = function(indent, alignment) {
21623
+ if (this.is_empty()) {
21624
+ this.__indent_count = indent || 0;
21625
+ this.__alignment_count = alignment || 0;
21626
+ this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
21627
+ }
21628
+ };
21629
+ OutputLine.prototype._set_wrap_point = function() {
21630
+ if (this.__parent.wrap_line_length) {
21631
+ this.__wrap_point_index = this.__items.length;
21632
+ this.__wrap_point_character_count = this.__character_count;
21633
+ this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;
21634
+ this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;
21635
+ }
21636
+ };
21637
+ OutputLine.prototype._should_wrap = function() {
21638
+ return this.__wrap_point_index && this.__character_count > this.__parent.wrap_line_length && this.__wrap_point_character_count > this.__parent.next_line.__character_count;
21639
+ };
21640
+ OutputLine.prototype._allow_wrap = function() {
21641
+ if (this._should_wrap()) {
21642
+ this.__parent.add_new_line();
21643
+ var next = this.__parent.current_line;
21644
+ next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
21645
+ next.__items = this.__items.slice(this.__wrap_point_index);
21646
+ this.__items = this.__items.slice(0, this.__wrap_point_index);
21647
+ next.__character_count += this.__character_count - this.__wrap_point_character_count;
21648
+ this.__character_count = this.__wrap_point_character_count;
21649
+ if (next.__items[0] === " ") {
21650
+ next.__items.splice(0, 1);
21651
+ next.__character_count -= 1;
21652
+ }
21653
+ return true;
21654
+ }
21655
+ return false;
21656
+ };
21657
+ OutputLine.prototype.is_empty = function() {
21658
+ return this.__items.length === 0;
21659
+ };
21660
+ OutputLine.prototype.last = function() {
21661
+ if (!this.is_empty()) {
21662
+ return this.__items[this.__items.length - 1];
21663
+ } else {
21664
+ return null;
21665
+ }
21666
+ };
21667
+ OutputLine.prototype.push = function(item) {
21668
+ this.__items.push(item);
21669
+ var last_newline_index = item.lastIndexOf("\n");
21670
+ if (last_newline_index !== -1) {
21671
+ this.__character_count = item.length - last_newline_index;
21672
+ } else {
21673
+ this.__character_count += item.length;
21674
+ }
21675
+ };
21676
+ OutputLine.prototype.pop = function() {
21677
+ var item = null;
21678
+ if (!this.is_empty()) {
21679
+ item = this.__items.pop();
21680
+ this.__character_count -= item.length;
21681
+ }
21682
+ return item;
21683
+ };
21684
+ OutputLine.prototype._remove_indent = function() {
21685
+ if (this.__indent_count > 0) {
21686
+ this.__indent_count -= 1;
21687
+ this.__character_count -= this.__parent.indent_size;
21688
+ }
21689
+ };
21690
+ OutputLine.prototype._remove_wrap_indent = function() {
21691
+ if (this.__wrap_point_indent_count > 0) {
21692
+ this.__wrap_point_indent_count -= 1;
21693
+ }
21694
+ };
21695
+ OutputLine.prototype.trim = function() {
21696
+ while (this.last() === " ") {
21697
+ this.__items.pop();
21698
+ this.__character_count -= 1;
21699
+ }
21700
+ };
21701
+ OutputLine.prototype.toString = function() {
21702
+ var result = "";
21703
+ if (this.is_empty()) {
21704
+ if (this.__parent.indent_empty_lines) {
21705
+ result = this.__parent.get_indent_string(this.__indent_count);
21706
+ }
21707
+ } else {
21708
+ result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
21709
+ result += this.__items.join("");
21710
+ }
21711
+ return result;
21712
+ };
21713
+ function IndentStringCache(options, baseIndentString) {
21714
+ this.__cache = [""];
21715
+ this.__indent_size = options.indent_size;
21716
+ this.__indent_string = options.indent_char;
21717
+ if (!options.indent_with_tabs) {
21718
+ this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
21719
+ }
21720
+ baseIndentString = baseIndentString || "";
21721
+ if (options.indent_level > 0) {
21722
+ baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
21723
+ }
21724
+ this.__base_string = baseIndentString;
21725
+ this.__base_string_length = baseIndentString.length;
21726
+ }
21727
+ IndentStringCache.prototype.get_indent_size = function(indent, column) {
21728
+ var result = this.__base_string_length;
21729
+ column = column || 0;
21730
+ if (indent < 0) {
21731
+ result = 0;
21732
+ }
21733
+ result += indent * this.__indent_size;
21734
+ result += column;
21735
+ return result;
21736
+ };
21737
+ IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
21738
+ var result = this.__base_string;
21739
+ column = column || 0;
21740
+ if (indent_level < 0) {
21741
+ indent_level = 0;
21742
+ result = "";
21743
+ }
21744
+ column += indent_level * this.__indent_size;
21745
+ this.__ensure_cache(column);
21746
+ result += this.__cache[column];
21747
+ return result;
21748
+ };
21749
+ IndentStringCache.prototype.__ensure_cache = function(column) {
21750
+ while (column >= this.__cache.length) {
21751
+ this.__add_column();
21752
+ }
21753
+ };
21754
+ IndentStringCache.prototype.__add_column = function() {
21755
+ var column = this.__cache.length;
21756
+ var indent = 0;
21757
+ var result = "";
21758
+ if (this.__indent_size && column >= this.__indent_size) {
21759
+ indent = Math.floor(column / this.__indent_size);
21760
+ column -= indent * this.__indent_size;
21761
+ result = new Array(indent + 1).join(this.__indent_string);
21762
+ }
21763
+ if (column) {
21764
+ result += new Array(column + 1).join(" ");
21765
+ }
21766
+ this.__cache.push(result);
21767
+ };
21768
+ function Output(options, baseIndentString) {
21769
+ this.__indent_cache = new IndentStringCache(options, baseIndentString);
21770
+ this.raw = false;
21771
+ this._end_with_newline = options.end_with_newline;
21772
+ this.indent_size = options.indent_size;
21773
+ this.wrap_line_length = options.wrap_line_length;
21774
+ this.indent_empty_lines = options.indent_empty_lines;
21775
+ this.__lines = [];
21776
+ this.previous_line = null;
21777
+ this.current_line = null;
21778
+ this.next_line = new OutputLine(this);
21779
+ this.space_before_token = false;
21780
+ this.non_breaking_space = false;
21781
+ this.previous_token_wrapped = false;
21782
+ this.__add_outputline();
21783
+ }
21784
+ Output.prototype.__add_outputline = function() {
21785
+ this.previous_line = this.current_line;
21786
+ this.current_line = this.next_line.clone_empty();
21787
+ this.__lines.push(this.current_line);
21788
+ };
21789
+ Output.prototype.get_line_number = function() {
21790
+ return this.__lines.length;
21791
+ };
21792
+ Output.prototype.get_indent_string = function(indent, column) {
21793
+ return this.__indent_cache.get_indent_string(indent, column);
21794
+ };
21795
+ Output.prototype.get_indent_size = function(indent, column) {
21796
+ return this.__indent_cache.get_indent_size(indent, column);
21797
+ };
21798
+ Output.prototype.is_empty = function() {
21799
+ return !this.previous_line && this.current_line.is_empty();
21800
+ };
21801
+ Output.prototype.add_new_line = function(force_newline) {
21802
+ if (this.is_empty() || !force_newline && this.just_added_newline()) {
21803
+ return false;
21804
+ }
21805
+ if (!this.raw) {
21806
+ this.__add_outputline();
21807
+ }
21808
+ return true;
21809
+ };
21810
+ Output.prototype.get_code = function(eol) {
21811
+ this.trim(true);
21812
+ var last_item = this.current_line.pop();
21813
+ if (last_item) {
21814
+ if (last_item[last_item.length - 1] === "\n") {
21815
+ last_item = last_item.replace(/\n+$/g, "");
21816
+ }
21817
+ this.current_line.push(last_item);
21818
+ }
21819
+ if (this._end_with_newline) {
21820
+ this.__add_outputline();
21821
+ }
21822
+ var sweet_code = this.__lines.join("\n");
21823
+ if (eol !== "\n") {
21824
+ sweet_code = sweet_code.replace(/[\n]/g, eol);
21825
+ }
21826
+ return sweet_code;
21827
+ };
21828
+ Output.prototype.set_wrap_point = function() {
21829
+ this.current_line._set_wrap_point();
21830
+ };
21831
+ Output.prototype.set_indent = function(indent, alignment) {
21832
+ indent = indent || 0;
21833
+ alignment = alignment || 0;
21834
+ this.next_line.set_indent(indent, alignment);
21835
+ if (this.__lines.length > 1) {
21836
+ this.current_line.set_indent(indent, alignment);
21837
+ return true;
21838
+ }
21839
+ this.current_line.set_indent();
21840
+ return false;
21841
+ };
21842
+ Output.prototype.add_raw_token = function(token) {
21843
+ for (var x = 0; x < token.newlines; x++) {
21844
+ this.__add_outputline();
21845
+ }
21846
+ this.current_line.set_indent(-1);
21847
+ this.current_line.push(token.whitespace_before);
21848
+ this.current_line.push(token.text);
21849
+ this.space_before_token = false;
21850
+ this.non_breaking_space = false;
21851
+ this.previous_token_wrapped = false;
21852
+ };
21853
+ Output.prototype.add_token = function(printable_token) {
21854
+ this.__add_space_before_token();
21855
+ this.current_line.push(printable_token);
21856
+ this.space_before_token = false;
21857
+ this.non_breaking_space = false;
21858
+ this.previous_token_wrapped = this.current_line._allow_wrap();
21859
+ };
21860
+ Output.prototype.__add_space_before_token = function() {
21861
+ if (this.space_before_token && !this.just_added_newline()) {
21862
+ if (!this.non_breaking_space) {
21863
+ this.set_wrap_point();
21864
+ }
21865
+ this.current_line.push(" ");
21866
+ }
21867
+ };
21868
+ Output.prototype.remove_indent = function(index) {
21869
+ var output_length = this.__lines.length;
21870
+ while (index < output_length) {
21871
+ this.__lines[index]._remove_indent();
21872
+ index++;
21873
+ }
21874
+ this.current_line._remove_wrap_indent();
21875
+ };
21876
+ Output.prototype.trim = function(eat_newlines) {
21877
+ eat_newlines = eat_newlines === void 0 ? false : eat_newlines;
21878
+ this.current_line.trim();
21879
+ while (eat_newlines && this.__lines.length > 1 && this.current_line.is_empty()) {
21880
+ this.__lines.pop();
21881
+ this.current_line = this.__lines[this.__lines.length - 1];
21882
+ this.current_line.trim();
21883
+ }
21884
+ this.previous_line = this.__lines.length > 1 ? this.__lines[this.__lines.length - 2] : null;
21885
+ };
21886
+ Output.prototype.just_added_newline = function() {
21887
+ return this.current_line.is_empty();
21888
+ };
21889
+ Output.prototype.just_added_blankline = function() {
21890
+ return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
21891
+ };
21892
+ Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
21893
+ var index = this.__lines.length - 2;
21894
+ while (index >= 0) {
21895
+ var potentialEmptyLine = this.__lines[index];
21896
+ if (potentialEmptyLine.is_empty()) {
21897
+ break;
21898
+ } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 && potentialEmptyLine.item(-1) !== ends_with) {
21899
+ this.__lines.splice(index + 1, 0, new OutputLine(this));
21900
+ this.previous_line = this.__lines[this.__lines.length - 2];
21901
+ break;
21902
+ }
21903
+ index--;
21904
+ }
21905
+ };
21906
+ module2.exports.Output = Output;
21907
+ }
21908
+ });
21909
+
21910
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/token.js
21911
+ var require_token = __commonJS({
21912
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/token.js"(exports2, module2) {
21913
+ "use strict";
21914
+ function Token(type, text, newlines, whitespace_before) {
21915
+ this.type = type;
21916
+ this.text = text;
21917
+ this.comments_before = null;
21918
+ this.newlines = newlines || 0;
21919
+ this.whitespace_before = whitespace_before || "";
21920
+ this.parent = null;
21921
+ this.next = null;
21922
+ this.previous = null;
21923
+ this.opened = null;
21924
+ this.closed = null;
21925
+ this.directives = null;
21926
+ }
21927
+ module2.exports.Token = Token;
21928
+ }
21929
+ });
21930
+
21931
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/acorn.js
21932
+ var require_acorn = __commonJS({
21933
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/acorn.js"(exports2) {
21934
+ "use strict";
21935
+ var baseASCIIidentifierStartChars = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a";
21936
+ var baseASCIIidentifierChars = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a";
21937
+ var nonASCIIidentifierStartChars = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc";
21938
+ var nonASCIIidentifierChars = "\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f";
21939
+ var identifierStart = "(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierStartChars + nonASCIIidentifierStartChars + "])";
21940
+ var identifierChars = "(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])*";
21941
+ exports2.identifier = new RegExp(identifierStart + identifierChars, "g");
21942
+ exports2.identifierStart = new RegExp(identifierStart);
21943
+ exports2.identifierMatch = new RegExp("(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])+");
21944
+ exports2.newline = /[\n\r\u2028\u2029]/;
21945
+ exports2.lineBreak = new RegExp("\r\n|" + exports2.newline.source);
21946
+ exports2.allLineBreaks = new RegExp(exports2.lineBreak.source, "g");
21947
+ }
21948
+ });
21949
+
21950
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/options.js
21951
+ var require_options = __commonJS({
21952
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/options.js"(exports2, module2) {
21953
+ "use strict";
21954
+ function Options(options, merge_child_field) {
21955
+ this.raw_options = _mergeOpts(options, merge_child_field);
21956
+ this.disabled = this._get_boolean("disabled");
21957
+ this.eol = this._get_characters("eol", "auto");
21958
+ this.end_with_newline = this._get_boolean("end_with_newline");
21959
+ this.indent_size = this._get_number("indent_size", 4);
21960
+ this.indent_char = this._get_characters("indent_char", " ");
21961
+ this.indent_level = this._get_number("indent_level");
21962
+ this.preserve_newlines = this._get_boolean("preserve_newlines", true);
21963
+ this.max_preserve_newlines = this._get_number("max_preserve_newlines", 32786);
21964
+ if (!this.preserve_newlines) {
21965
+ this.max_preserve_newlines = 0;
21966
+ }
21967
+ this.indent_with_tabs = this._get_boolean("indent_with_tabs", this.indent_char === " ");
21968
+ if (this.indent_with_tabs) {
21969
+ this.indent_char = " ";
21970
+ if (this.indent_size === 1) {
21971
+ this.indent_size = 4;
21972
+ }
21973
+ }
21974
+ this.wrap_line_length = this._get_number("wrap_line_length", this._get_number("max_char"));
21975
+ this.indent_empty_lines = this._get_boolean("indent_empty_lines");
21976
+ this.templating = this._get_selection_list("templating", ["auto", "none", "django", "erb", "handlebars", "php", "smarty"], ["auto"]);
21977
+ }
21978
+ Options.prototype._get_array = function(name, default_value) {
21979
+ var option_value = this.raw_options[name];
21980
+ var result = default_value || [];
21981
+ if (typeof option_value === "object") {
21982
+ if (option_value !== null && typeof option_value.concat === "function") {
21983
+ result = option_value.concat();
21984
+ }
21985
+ } else if (typeof option_value === "string") {
21986
+ result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
21987
+ }
21988
+ return result;
21989
+ };
21990
+ Options.prototype._get_boolean = function(name, default_value) {
21991
+ var option_value = this.raw_options[name];
21992
+ var result = option_value === void 0 ? !!default_value : !!option_value;
21993
+ return result;
21994
+ };
21995
+ Options.prototype._get_characters = function(name, default_value) {
21996
+ var option_value = this.raw_options[name];
21997
+ var result = default_value || "";
21998
+ if (typeof option_value === "string") {
21999
+ result = option_value.replace(/\\r/, "\r").replace(/\\n/, "\n").replace(/\\t/, " ");
22000
+ }
22001
+ return result;
22002
+ };
22003
+ Options.prototype._get_number = function(name, default_value) {
22004
+ var option_value = this.raw_options[name];
22005
+ default_value = parseInt(default_value, 10);
22006
+ if (isNaN(default_value)) {
22007
+ default_value = 0;
22008
+ }
22009
+ var result = parseInt(option_value, 10);
22010
+ if (isNaN(result)) {
22011
+ result = default_value;
22012
+ }
22013
+ return result;
22014
+ };
22015
+ Options.prototype._get_selection = function(name, selection_list, default_value) {
22016
+ var result = this._get_selection_list(name, selection_list, default_value);
22017
+ if (result.length !== 1) {
22018
+ throw new Error(
22019
+ "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" + selection_list + "\nYou passed in: '" + this.raw_options[name] + "'"
22020
+ );
22021
+ }
22022
+ return result[0];
22023
+ };
22024
+ Options.prototype._get_selection_list = function(name, selection_list, default_value) {
22025
+ if (!selection_list || selection_list.length === 0) {
22026
+ throw new Error("Selection list cannot be empty.");
22027
+ }
22028
+ default_value = default_value || [selection_list[0]];
22029
+ if (!this._is_valid_selection(default_value, selection_list)) {
22030
+ throw new Error("Invalid Default Value!");
22031
+ }
22032
+ var result = this._get_array(name, default_value);
22033
+ if (!this._is_valid_selection(result, selection_list)) {
22034
+ throw new Error(
22035
+ "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" + selection_list + "\nYou passed in: '" + this.raw_options[name] + "'"
22036
+ );
22037
+ }
22038
+ return result;
22039
+ };
22040
+ Options.prototype._is_valid_selection = function(result, selection_list) {
22041
+ return result.length && selection_list.length && !result.some(function(item) {
22042
+ return selection_list.indexOf(item) === -1;
22043
+ });
22044
+ };
22045
+ function _mergeOpts(allOptions, childFieldName) {
22046
+ var finalOpts = {};
22047
+ allOptions = _normalizeOpts(allOptions);
22048
+ var name;
22049
+ for (name in allOptions) {
22050
+ if (name !== childFieldName) {
22051
+ finalOpts[name] = allOptions[name];
22052
+ }
22053
+ }
22054
+ if (childFieldName && allOptions[childFieldName]) {
22055
+ for (name in allOptions[childFieldName]) {
22056
+ finalOpts[name] = allOptions[childFieldName][name];
22057
+ }
22058
+ }
22059
+ return finalOpts;
22060
+ }
22061
+ function _normalizeOpts(options) {
22062
+ var convertedOpts = {};
22063
+ var key;
22064
+ for (key in options) {
22065
+ var newKey = key.replace(/-/g, "_");
22066
+ convertedOpts[newKey] = options[key];
22067
+ }
22068
+ return convertedOpts;
22069
+ }
22070
+ module2.exports.Options = Options;
22071
+ module2.exports.normalizeOpts = _normalizeOpts;
22072
+ module2.exports.mergeOpts = _mergeOpts;
22073
+ }
22074
+ });
22075
+
22076
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/options.js
22077
+ var require_options2 = __commonJS({
22078
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/options.js"(exports2, module2) {
22079
+ "use strict";
22080
+ var BaseOptions = require_options().Options;
22081
+ var validPositionValues = ["before-newline", "after-newline", "preserve-newline"];
22082
+ function Options(options) {
22083
+ BaseOptions.call(this, options, "js");
22084
+ var raw_brace_style = this.raw_options.brace_style || null;
22085
+ if (raw_brace_style === "expand-strict") {
22086
+ this.raw_options.brace_style = "expand";
22087
+ } else if (raw_brace_style === "collapse-preserve-inline") {
22088
+ this.raw_options.brace_style = "collapse,preserve-inline";
22089
+ } else if (this.raw_options.braces_on_own_line !== void 0) {
22090
+ this.raw_options.brace_style = this.raw_options.braces_on_own_line ? "expand" : "collapse";
22091
+ }
22092
+ var brace_style_split = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
22093
+ this.brace_preserve_inline = false;
22094
+ this.brace_style = "collapse";
22095
+ for (var bs = 0; bs < brace_style_split.length; bs++) {
22096
+ if (brace_style_split[bs] === "preserve-inline") {
22097
+ this.brace_preserve_inline = true;
22098
+ } else {
22099
+ this.brace_style = brace_style_split[bs];
22100
+ }
22101
+ }
22102
+ this.unindent_chained_methods = this._get_boolean("unindent_chained_methods");
22103
+ this.break_chained_methods = this._get_boolean("break_chained_methods");
22104
+ this.space_in_paren = this._get_boolean("space_in_paren");
22105
+ this.space_in_empty_paren = this._get_boolean("space_in_empty_paren");
22106
+ this.jslint_happy = this._get_boolean("jslint_happy");
22107
+ this.space_after_anon_function = this._get_boolean("space_after_anon_function");
22108
+ this.space_after_named_function = this._get_boolean("space_after_named_function");
22109
+ this.keep_array_indentation = this._get_boolean("keep_array_indentation");
22110
+ this.space_before_conditional = this._get_boolean("space_before_conditional", true);
22111
+ this.unescape_strings = this._get_boolean("unescape_strings");
22112
+ this.e4x = this._get_boolean("e4x");
22113
+ this.comma_first = this._get_boolean("comma_first");
22114
+ this.operator_position = this._get_selection("operator_position", validPositionValues);
22115
+ this.test_output_raw = this._get_boolean("test_output_raw");
22116
+ if (this.jslint_happy) {
22117
+ this.space_after_anon_function = true;
22118
+ }
22119
+ }
22120
+ Options.prototype = new BaseOptions();
22121
+ module2.exports.Options = Options;
22122
+ }
22123
+ });
22124
+
22125
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/inputscanner.js
22126
+ var require_inputscanner = __commonJS({
22127
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/inputscanner.js"(exports2, module2) {
22128
+ "use strict";
22129
+ var regexp_has_sticky = RegExp.prototype.hasOwnProperty("sticky");
22130
+ function InputScanner(input_string) {
22131
+ this.__input = input_string || "";
22132
+ this.__input_length = this.__input.length;
22133
+ this.__position = 0;
22134
+ }
22135
+ InputScanner.prototype.restart = function() {
22136
+ this.__position = 0;
22137
+ };
22138
+ InputScanner.prototype.back = function() {
22139
+ if (this.__position > 0) {
22140
+ this.__position -= 1;
22141
+ }
22142
+ };
22143
+ InputScanner.prototype.hasNext = function() {
22144
+ return this.__position < this.__input_length;
22145
+ };
22146
+ InputScanner.prototype.next = function() {
22147
+ var val = null;
22148
+ if (this.hasNext()) {
22149
+ val = this.__input.charAt(this.__position);
22150
+ this.__position += 1;
22151
+ }
22152
+ return val;
22153
+ };
22154
+ InputScanner.prototype.peek = function(index) {
22155
+ var val = null;
22156
+ index = index || 0;
22157
+ index += this.__position;
22158
+ if (index >= 0 && index < this.__input_length) {
22159
+ val = this.__input.charAt(index);
22160
+ }
22161
+ return val;
22162
+ };
22163
+ InputScanner.prototype.__match = function(pattern, index) {
22164
+ pattern.lastIndex = index;
22165
+ var pattern_match = pattern.exec(this.__input);
22166
+ if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
22167
+ if (pattern_match.index !== index) {
22168
+ pattern_match = null;
22169
+ }
22170
+ }
22171
+ return pattern_match;
22172
+ };
22173
+ InputScanner.prototype.test = function(pattern, index) {
22174
+ index = index || 0;
22175
+ index += this.__position;
22176
+ if (index >= 0 && index < this.__input_length) {
22177
+ return !!this.__match(pattern, index);
22178
+ } else {
22179
+ return false;
22180
+ }
22181
+ };
22182
+ InputScanner.prototype.testChar = function(pattern, index) {
22183
+ var val = this.peek(index);
22184
+ pattern.lastIndex = 0;
22185
+ return val !== null && pattern.test(val);
22186
+ };
22187
+ InputScanner.prototype.match = function(pattern) {
22188
+ var pattern_match = this.__match(pattern, this.__position);
22189
+ if (pattern_match) {
22190
+ this.__position += pattern_match[0].length;
22191
+ } else {
22192
+ pattern_match = null;
22193
+ }
22194
+ return pattern_match;
22195
+ };
22196
+ InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
22197
+ var val = "";
22198
+ var match;
22199
+ if (starting_pattern) {
22200
+ match = this.match(starting_pattern);
22201
+ if (match) {
22202
+ val += match[0];
22203
+ }
22204
+ }
22205
+ if (until_pattern && (match || !starting_pattern)) {
22206
+ val += this.readUntil(until_pattern, until_after);
22207
+ }
22208
+ return val;
22209
+ };
22210
+ InputScanner.prototype.readUntil = function(pattern, until_after) {
22211
+ var val = "";
22212
+ var match_index = this.__position;
22213
+ pattern.lastIndex = this.__position;
22214
+ var pattern_match = pattern.exec(this.__input);
22215
+ if (pattern_match) {
22216
+ match_index = pattern_match.index;
22217
+ if (until_after) {
22218
+ match_index += pattern_match[0].length;
22219
+ }
22220
+ } else {
22221
+ match_index = this.__input_length;
22222
+ }
22223
+ val = this.__input.substring(this.__position, match_index);
22224
+ this.__position = match_index;
22225
+ return val;
22226
+ };
22227
+ InputScanner.prototype.readUntilAfter = function(pattern) {
22228
+ return this.readUntil(pattern, true);
22229
+ };
22230
+ InputScanner.prototype.get_regexp = function(pattern, match_from) {
22231
+ var result = null;
22232
+ var flags = "g";
22233
+ if (match_from && regexp_has_sticky) {
22234
+ flags = "y";
22235
+ }
22236
+ if (typeof pattern === "string" && pattern !== "") {
22237
+ result = new RegExp(pattern, flags);
22238
+ } else if (pattern) {
22239
+ result = new RegExp(pattern.source, flags);
22240
+ }
22241
+ return result;
22242
+ };
22243
+ InputScanner.prototype.get_literal_regexp = function(literal_string) {
22244
+ return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
22245
+ };
22246
+ InputScanner.prototype.peekUntilAfter = function(pattern) {
22247
+ var start = this.__position;
22248
+ var val = this.readUntilAfter(pattern);
22249
+ this.__position = start;
22250
+ return val;
22251
+ };
22252
+ InputScanner.prototype.lookBack = function(testVal) {
22253
+ var start = this.__position - 1;
22254
+ return start >= testVal.length && this.__input.substring(start - testVal.length, start).toLowerCase() === testVal;
22255
+ };
22256
+ module2.exports.InputScanner = InputScanner;
22257
+ }
22258
+ });
22259
+
22260
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/tokenstream.js
22261
+ var require_tokenstream = __commonJS({
22262
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/tokenstream.js"(exports2, module2) {
22263
+ "use strict";
22264
+ function TokenStream(parent_token) {
22265
+ this.__tokens = [];
22266
+ this.__tokens_length = this.__tokens.length;
22267
+ this.__position = 0;
22268
+ this.__parent_token = parent_token;
22269
+ }
22270
+ TokenStream.prototype.restart = function() {
22271
+ this.__position = 0;
22272
+ };
22273
+ TokenStream.prototype.isEmpty = function() {
22274
+ return this.__tokens_length === 0;
22275
+ };
22276
+ TokenStream.prototype.hasNext = function() {
22277
+ return this.__position < this.__tokens_length;
22278
+ };
22279
+ TokenStream.prototype.next = function() {
22280
+ var val = null;
22281
+ if (this.hasNext()) {
22282
+ val = this.__tokens[this.__position];
22283
+ this.__position += 1;
22284
+ }
22285
+ return val;
22286
+ };
22287
+ TokenStream.prototype.peek = function(index) {
22288
+ var val = null;
22289
+ index = index || 0;
22290
+ index += this.__position;
22291
+ if (index >= 0 && index < this.__tokens_length) {
22292
+ val = this.__tokens[index];
22293
+ }
22294
+ return val;
22295
+ };
22296
+ TokenStream.prototype.add = function(token) {
22297
+ if (this.__parent_token) {
22298
+ token.parent = this.__parent_token;
22299
+ }
22300
+ this.__tokens.push(token);
22301
+ this.__tokens_length += 1;
22302
+ };
22303
+ module2.exports.TokenStream = TokenStream;
22304
+ }
22305
+ });
22306
+
22307
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/pattern.js
22308
+ var require_pattern2 = __commonJS({
22309
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/pattern.js"(exports2, module2) {
22310
+ "use strict";
22311
+ function Pattern(input_scanner, parent) {
22312
+ this._input = input_scanner;
22313
+ this._starting_pattern = null;
22314
+ this._match_pattern = null;
22315
+ this._until_pattern = null;
22316
+ this._until_after = false;
22317
+ if (parent) {
22318
+ this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true);
22319
+ this._match_pattern = this._input.get_regexp(parent._match_pattern, true);
22320
+ this._until_pattern = this._input.get_regexp(parent._until_pattern);
22321
+ this._until_after = parent._until_after;
22322
+ }
22323
+ }
22324
+ Pattern.prototype.read = function() {
22325
+ var result = this._input.read(this._starting_pattern);
22326
+ if (!this._starting_pattern || result) {
22327
+ result += this._input.read(this._match_pattern, this._until_pattern, this._until_after);
22328
+ }
22329
+ return result;
22330
+ };
22331
+ Pattern.prototype.read_match = function() {
22332
+ return this._input.match(this._match_pattern);
22333
+ };
22334
+ Pattern.prototype.until_after = function(pattern) {
22335
+ var result = this._create();
22336
+ result._until_after = true;
22337
+ result._until_pattern = this._input.get_regexp(pattern);
22338
+ result._update();
22339
+ return result;
22340
+ };
22341
+ Pattern.prototype.until = function(pattern) {
22342
+ var result = this._create();
22343
+ result._until_after = false;
22344
+ result._until_pattern = this._input.get_regexp(pattern);
22345
+ result._update();
22346
+ return result;
22347
+ };
22348
+ Pattern.prototype.starting_with = function(pattern) {
22349
+ var result = this._create();
22350
+ result._starting_pattern = this._input.get_regexp(pattern, true);
22351
+ result._update();
22352
+ return result;
22353
+ };
22354
+ Pattern.prototype.matching = function(pattern) {
22355
+ var result = this._create();
22356
+ result._match_pattern = this._input.get_regexp(pattern, true);
22357
+ result._update();
22358
+ return result;
22359
+ };
22360
+ Pattern.prototype._create = function() {
22361
+ return new Pattern(this._input, this);
22362
+ };
22363
+ Pattern.prototype._update = function() {
22364
+ };
22365
+ module2.exports.Pattern = Pattern;
22366
+ }
22367
+ });
22368
+
22369
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/whitespacepattern.js
22370
+ var require_whitespacepattern = __commonJS({
22371
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/whitespacepattern.js"(exports2, module2) {
22372
+ "use strict";
22373
+ var Pattern = require_pattern2().Pattern;
22374
+ function WhitespacePattern(input_scanner, parent) {
22375
+ Pattern.call(this, input_scanner, parent);
22376
+ if (parent) {
22377
+ this._line_regexp = this._input.get_regexp(parent._line_regexp);
22378
+ } else {
22379
+ this.__set_whitespace_patterns("", "");
22380
+ }
22381
+ this.newline_count = 0;
22382
+ this.whitespace_before_token = "";
22383
+ }
22384
+ WhitespacePattern.prototype = new Pattern();
22385
+ WhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) {
22386
+ whitespace_chars += "\\t ";
22387
+ newline_chars += "\\n\\r";
22388
+ this._match_pattern = this._input.get_regexp(
22389
+ "[" + whitespace_chars + newline_chars + "]+",
22390
+ true
22391
+ );
22392
+ this._newline_regexp = this._input.get_regexp(
22393
+ "\\r\\n|[" + newline_chars + "]"
22394
+ );
22395
+ };
22396
+ WhitespacePattern.prototype.read = function() {
22397
+ this.newline_count = 0;
22398
+ this.whitespace_before_token = "";
22399
+ var resulting_string = this._input.read(this._match_pattern);
22400
+ if (resulting_string === " ") {
22401
+ this.whitespace_before_token = " ";
22402
+ } else if (resulting_string) {
22403
+ var matches = this.__split(this._newline_regexp, resulting_string);
22404
+ this.newline_count = matches.length - 1;
22405
+ this.whitespace_before_token = matches[this.newline_count];
22406
+ }
22407
+ return resulting_string;
22408
+ };
22409
+ WhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) {
22410
+ var result = this._create();
22411
+ result.__set_whitespace_patterns(whitespace_chars, newline_chars);
22412
+ result._update();
22413
+ return result;
22414
+ };
22415
+ WhitespacePattern.prototype._create = function() {
22416
+ return new WhitespacePattern(this._input, this);
22417
+ };
22418
+ WhitespacePattern.prototype.__split = function(regexp, input_string) {
22419
+ regexp.lastIndex = 0;
22420
+ var start_index = 0;
22421
+ var result = [];
22422
+ var next_match = regexp.exec(input_string);
22423
+ while (next_match) {
22424
+ result.push(input_string.substring(start_index, next_match.index));
22425
+ start_index = next_match.index + next_match[0].length;
22426
+ next_match = regexp.exec(input_string);
22427
+ }
22428
+ if (start_index < input_string.length) {
22429
+ result.push(input_string.substring(start_index, input_string.length));
22430
+ } else {
22431
+ result.push("");
22432
+ }
22433
+ return result;
22434
+ };
22435
+ module2.exports.WhitespacePattern = WhitespacePattern;
22436
+ }
22437
+ });
22438
+
22439
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/tokenizer.js
22440
+ var require_tokenizer = __commonJS({
22441
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/tokenizer.js"(exports2, module2) {
22442
+ "use strict";
22443
+ var InputScanner = require_inputscanner().InputScanner;
22444
+ var Token = require_token().Token;
22445
+ var TokenStream = require_tokenstream().TokenStream;
22446
+ var WhitespacePattern = require_whitespacepattern().WhitespacePattern;
22447
+ var TOKEN = {
22448
+ START: "TK_START",
22449
+ RAW: "TK_RAW",
22450
+ EOF: "TK_EOF"
22451
+ };
22452
+ var Tokenizer = function(input_string, options) {
22453
+ this._input = new InputScanner(input_string);
22454
+ this._options = options || {};
22455
+ this.__tokens = null;
22456
+ this._patterns = {};
22457
+ this._patterns.whitespace = new WhitespacePattern(this._input);
22458
+ };
22459
+ Tokenizer.prototype.tokenize = function() {
22460
+ this._input.restart();
22461
+ this.__tokens = new TokenStream();
22462
+ this._reset();
22463
+ var current;
22464
+ var previous = new Token(TOKEN.START, "");
22465
+ var open_token = null;
22466
+ var open_stack = [];
22467
+ var comments = new TokenStream();
22468
+ while (previous.type !== TOKEN.EOF) {
22469
+ current = this._get_next_token(previous, open_token);
22470
+ while (this._is_comment(current)) {
22471
+ comments.add(current);
22472
+ current = this._get_next_token(previous, open_token);
22473
+ }
22474
+ if (!comments.isEmpty()) {
22475
+ current.comments_before = comments;
22476
+ comments = new TokenStream();
22477
+ }
22478
+ current.parent = open_token;
22479
+ if (this._is_opening(current)) {
22480
+ open_stack.push(open_token);
22481
+ open_token = current;
22482
+ } else if (open_token && this._is_closing(current, open_token)) {
22483
+ current.opened = open_token;
22484
+ open_token.closed = current;
22485
+ open_token = open_stack.pop();
22486
+ current.parent = open_token;
22487
+ }
22488
+ current.previous = previous;
22489
+ previous.next = current;
22490
+ this.__tokens.add(current);
22491
+ previous = current;
22492
+ }
22493
+ return this.__tokens;
22494
+ };
22495
+ Tokenizer.prototype._is_first_token = function() {
22496
+ return this.__tokens.isEmpty();
22497
+ };
22498
+ Tokenizer.prototype._reset = function() {
22499
+ };
22500
+ Tokenizer.prototype._get_next_token = function(previous_token, open_token) {
22501
+ this._readWhitespace();
22502
+ var resulting_string = this._input.read(/.+/g);
22503
+ if (resulting_string) {
22504
+ return this._create_token(TOKEN.RAW, resulting_string);
22505
+ } else {
22506
+ return this._create_token(TOKEN.EOF, "");
22507
+ }
22508
+ };
22509
+ Tokenizer.prototype._is_comment = function(current_token) {
22510
+ return false;
22511
+ };
22512
+ Tokenizer.prototype._is_opening = function(current_token) {
22513
+ return false;
22514
+ };
22515
+ Tokenizer.prototype._is_closing = function(current_token, open_token) {
22516
+ return false;
22517
+ };
22518
+ Tokenizer.prototype._create_token = function(type, text) {
22519
+ var token = new Token(
22520
+ type,
22521
+ text,
22522
+ this._patterns.whitespace.newline_count,
22523
+ this._patterns.whitespace.whitespace_before_token
22524
+ );
22525
+ return token;
22526
+ };
22527
+ Tokenizer.prototype._readWhitespace = function() {
22528
+ return this._patterns.whitespace.read();
22529
+ };
22530
+ module2.exports.Tokenizer = Tokenizer;
22531
+ module2.exports.TOKEN = TOKEN;
22532
+ }
22533
+ });
22534
+
22535
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/directives.js
22536
+ var require_directives = __commonJS({
22537
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/directives.js"(exports2, module2) {
22538
+ "use strict";
22539
+ function Directives(start_block_pattern, end_block_pattern) {
22540
+ start_block_pattern = typeof start_block_pattern === "string" ? start_block_pattern : start_block_pattern.source;
22541
+ end_block_pattern = typeof end_block_pattern === "string" ? end_block_pattern : end_block_pattern.source;
22542
+ this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, "g");
22543
+ this.__directive_pattern = / (\w+)[:](\w+)/g;
22544
+ this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, "g");
22545
+ }
22546
+ Directives.prototype.get_directives = function(text) {
22547
+ if (!text.match(this.__directives_block_pattern)) {
22548
+ return null;
22549
+ }
22550
+ var directives = {};
22551
+ this.__directive_pattern.lastIndex = 0;
22552
+ var directive_match = this.__directive_pattern.exec(text);
22553
+ while (directive_match) {
22554
+ directives[directive_match[1]] = directive_match[2];
22555
+ directive_match = this.__directive_pattern.exec(text);
22556
+ }
22557
+ return directives;
22558
+ };
22559
+ Directives.prototype.readIgnored = function(input) {
22560
+ return input.readUntilAfter(this.__directives_end_ignore_pattern);
22561
+ };
22562
+ module2.exports.Directives = Directives;
22563
+ }
22564
+ });
22565
+
22566
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/templatablepattern.js
22567
+ var require_templatablepattern = __commonJS({
22568
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/core/templatablepattern.js"(exports2, module2) {
22569
+ "use strict";
22570
+ var Pattern = require_pattern2().Pattern;
22571
+ var template_names = {
22572
+ django: false,
22573
+ erb: false,
22574
+ handlebars: false,
22575
+ php: false,
22576
+ smarty: false
22577
+ };
22578
+ function TemplatablePattern(input_scanner, parent) {
22579
+ Pattern.call(this, input_scanner, parent);
22580
+ this.__template_pattern = null;
22581
+ this._disabled = Object.assign({}, template_names);
22582
+ this._excluded = Object.assign({}, template_names);
22583
+ if (parent) {
22584
+ this.__template_pattern = this._input.get_regexp(parent.__template_pattern);
22585
+ this._excluded = Object.assign(this._excluded, parent._excluded);
22586
+ this._disabled = Object.assign(this._disabled, parent._disabled);
22587
+ }
22588
+ var pattern = new Pattern(input_scanner);
22589
+ this.__patterns = {
22590
+ handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/),
22591
+ handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/),
22592
+ handlebars: pattern.starting_with(/{{/).until_after(/}}/),
22593
+ php: pattern.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
22594
+ erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/),
22595
+ // django coflicts with handlebars a bit.
22596
+ django: pattern.starting_with(/{%/).until_after(/%}/),
22597
+ django_value: pattern.starting_with(/{{/).until_after(/}}/),
22598
+ django_comment: pattern.starting_with(/{#/).until_after(/#}/),
22599
+ smarty: pattern.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
22600
+ smarty_comment: pattern.starting_with(/{\*/).until_after(/\*}/),
22601
+ smarty_literal: pattern.starting_with(/{literal}/).until_after(/{\/literal}/)
22602
+ };
22603
+ }
22604
+ TemplatablePattern.prototype = new Pattern();
22605
+ TemplatablePattern.prototype._create = function() {
22606
+ return new TemplatablePattern(this._input, this);
22607
+ };
22608
+ TemplatablePattern.prototype._update = function() {
22609
+ this.__set_templated_pattern();
22610
+ };
22611
+ TemplatablePattern.prototype.disable = function(language) {
22612
+ var result = this._create();
22613
+ result._disabled[language] = true;
22614
+ result._update();
22615
+ return result;
22616
+ };
22617
+ TemplatablePattern.prototype.read_options = function(options) {
22618
+ var result = this._create();
22619
+ for (var language in template_names) {
22620
+ result._disabled[language] = options.templating.indexOf(language) === -1;
22621
+ }
22622
+ result._update();
22623
+ return result;
22624
+ };
22625
+ TemplatablePattern.prototype.exclude = function(language) {
22626
+ var result = this._create();
22627
+ result._excluded[language] = true;
22628
+ result._update();
22629
+ return result;
22630
+ };
22631
+ TemplatablePattern.prototype.read = function() {
22632
+ var result = "";
22633
+ if (this._match_pattern) {
22634
+ result = this._input.read(this._starting_pattern);
22635
+ } else {
22636
+ result = this._input.read(this._starting_pattern, this.__template_pattern);
22637
+ }
22638
+ var next = this._read_template();
22639
+ while (next) {
22640
+ if (this._match_pattern) {
22641
+ next += this._input.read(this._match_pattern);
22642
+ } else {
22643
+ next += this._input.readUntil(this.__template_pattern);
22644
+ }
22645
+ result += next;
22646
+ next = this._read_template();
22647
+ }
22648
+ if (this._until_after) {
22649
+ result += this._input.readUntilAfter(this._until_pattern);
22650
+ }
22651
+ return result;
22652
+ };
22653
+ TemplatablePattern.prototype.__set_templated_pattern = function() {
22654
+ var items = [];
22655
+ if (!this._disabled.php) {
22656
+ items.push(this.__patterns.php._starting_pattern.source);
22657
+ }
22658
+ if (!this._disabled.handlebars) {
22659
+ items.push(this.__patterns.handlebars._starting_pattern.source);
22660
+ }
22661
+ if (!this._disabled.erb) {
22662
+ items.push(this.__patterns.erb._starting_pattern.source);
22663
+ }
22664
+ if (!this._disabled.django) {
22665
+ items.push(this.__patterns.django._starting_pattern.source);
22666
+ items.push(this.__patterns.django_value._starting_pattern.source);
22667
+ items.push(this.__patterns.django_comment._starting_pattern.source);
22668
+ }
22669
+ if (!this._disabled.smarty) {
22670
+ items.push(this.__patterns.smarty._starting_pattern.source);
22671
+ }
22672
+ if (this._until_pattern) {
22673
+ items.push(this._until_pattern.source);
22674
+ }
22675
+ this.__template_pattern = this._input.get_regexp("(?:" + items.join("|") + ")");
22676
+ };
22677
+ TemplatablePattern.prototype._read_template = function() {
22678
+ var resulting_string = "";
22679
+ var c = this._input.peek();
22680
+ if (c === "<") {
22681
+ var peek1 = this._input.peek(1);
22682
+ if (!this._disabled.php && !this._excluded.php && peek1 === "?") {
22683
+ resulting_string = resulting_string || this.__patterns.php.read();
22684
+ }
22685
+ if (!this._disabled.erb && !this._excluded.erb && peek1 === "%") {
22686
+ resulting_string = resulting_string || this.__patterns.erb.read();
22687
+ }
22688
+ } else if (c === "{") {
22689
+ if (!this._disabled.handlebars && !this._excluded.handlebars) {
22690
+ resulting_string = resulting_string || this.__patterns.handlebars_comment.read();
22691
+ resulting_string = resulting_string || this.__patterns.handlebars_unescaped.read();
22692
+ resulting_string = resulting_string || this.__patterns.handlebars.read();
22693
+ }
22694
+ if (!this._disabled.django) {
22695
+ if (!this._excluded.django && !this._excluded.handlebars) {
22696
+ resulting_string = resulting_string || this.__patterns.django_value.read();
22697
+ }
22698
+ if (!this._excluded.django) {
22699
+ resulting_string = resulting_string || this.__patterns.django_comment.read();
22700
+ resulting_string = resulting_string || this.__patterns.django.read();
22701
+ }
22702
+ }
22703
+ if (!this._disabled.smarty) {
22704
+ if (this._disabled.django && this._disabled.handlebars) {
22705
+ resulting_string = resulting_string || this.__patterns.smarty_comment.read();
22706
+ resulting_string = resulting_string || this.__patterns.smarty_literal.read();
22707
+ resulting_string = resulting_string || this.__patterns.smarty.read();
22708
+ }
22709
+ }
22710
+ }
22711
+ return resulting_string;
22712
+ };
22713
+ module2.exports.TemplatablePattern = TemplatablePattern;
22714
+ }
22715
+ });
22716
+
22717
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/tokenizer.js
22718
+ var require_tokenizer2 = __commonJS({
22719
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/tokenizer.js"(exports2, module2) {
22720
+ "use strict";
22721
+ var InputScanner = require_inputscanner().InputScanner;
22722
+ var BaseTokenizer = require_tokenizer().Tokenizer;
22723
+ var BASETOKEN = require_tokenizer().TOKEN;
22724
+ var Directives = require_directives().Directives;
22725
+ var acorn = require_acorn();
22726
+ var Pattern = require_pattern2().Pattern;
22727
+ var TemplatablePattern = require_templatablepattern().TemplatablePattern;
22728
+ function in_array(what, arr) {
22729
+ return arr.indexOf(what) !== -1;
22730
+ }
22731
+ var TOKEN = {
22732
+ START_EXPR: "TK_START_EXPR",
22733
+ END_EXPR: "TK_END_EXPR",
22734
+ START_BLOCK: "TK_START_BLOCK",
22735
+ END_BLOCK: "TK_END_BLOCK",
22736
+ WORD: "TK_WORD",
22737
+ RESERVED: "TK_RESERVED",
22738
+ SEMICOLON: "TK_SEMICOLON",
22739
+ STRING: "TK_STRING",
22740
+ EQUALS: "TK_EQUALS",
22741
+ OPERATOR: "TK_OPERATOR",
22742
+ COMMA: "TK_COMMA",
22743
+ BLOCK_COMMENT: "TK_BLOCK_COMMENT",
22744
+ COMMENT: "TK_COMMENT",
22745
+ DOT: "TK_DOT",
22746
+ UNKNOWN: "TK_UNKNOWN",
22747
+ START: BASETOKEN.START,
22748
+ RAW: BASETOKEN.RAW,
22749
+ EOF: BASETOKEN.EOF
22750
+ };
22751
+ var directives_core = new Directives(/\/\*/, /\*\//);
22752
+ var number_pattern = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/;
22753
+ var digit = /[0-9]/;
22754
+ var dot_pattern = /[^\d\.]/;
22755
+ var positionable_operators = ">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" ");
22756
+ var punct = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
22757
+ punct = punct.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&");
22758
+ punct = "\\?\\.(?!\\d) " + punct;
22759
+ punct = punct.replace(/ /g, "|");
22760
+ var punct_pattern = new RegExp(punct);
22761
+ var line_starters = "continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");
22762
+ var reserved_words = line_starters.concat(["do", "in", "of", "else", "get", "set", "new", "catch", "finally", "typeof", "yield", "async", "await", "from", "as"]);
22763
+ var reserved_word_pattern = new RegExp("^(?:" + reserved_words.join("|") + ")$");
22764
+ var in_html_comment;
22765
+ var Tokenizer = function(input_string, options) {
22766
+ BaseTokenizer.call(this, input_string, options);
22767
+ this._patterns.whitespace = this._patterns.whitespace.matching(
22768
+ /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
22769
+ /\u2028\u2029/.source
22770
+ );
22771
+ var pattern_reader = new Pattern(this._input);
22772
+ var templatable = new TemplatablePattern(this._input).read_options(this._options);
22773
+ this.__patterns = {
22774
+ template: templatable,
22775
+ identifier: templatable.starting_with(acorn.identifier).matching(acorn.identifierMatch),
22776
+ number: pattern_reader.matching(number_pattern),
22777
+ punct: pattern_reader.matching(punct_pattern),
22778
+ // comment ends just before nearest linefeed or end of file
22779
+ comment: pattern_reader.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
22780
+ // /* ... */ comment ends with nearest */ or end of file
22781
+ block_comment: pattern_reader.starting_with(/\/\*/).until_after(/\*\//),
22782
+ html_comment_start: pattern_reader.matching(/<!--/),
22783
+ html_comment_end: pattern_reader.matching(/-->/),
22784
+ include: pattern_reader.starting_with(/#include/).until_after(acorn.lineBreak),
22785
+ shebang: pattern_reader.starting_with(/#!/).until_after(acorn.lineBreak),
22786
+ xml: pattern_reader.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),
22787
+ single_quote: templatable.until(/['\\\n\r\u2028\u2029]/),
22788
+ double_quote: templatable.until(/["\\\n\r\u2028\u2029]/),
22789
+ template_text: templatable.until(/[`\\$]/),
22790
+ template_expression: templatable.until(/[`}\\]/)
22791
+ };
22792
+ };
22793
+ Tokenizer.prototype = new BaseTokenizer();
22794
+ Tokenizer.prototype._is_comment = function(current_token) {
22795
+ return current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.BLOCK_COMMENT || current_token.type === TOKEN.UNKNOWN;
22796
+ };
22797
+ Tokenizer.prototype._is_opening = function(current_token) {
22798
+ return current_token.type === TOKEN.START_BLOCK || current_token.type === TOKEN.START_EXPR;
22799
+ };
22800
+ Tokenizer.prototype._is_closing = function(current_token, open_token) {
22801
+ return (current_token.type === TOKEN.END_BLOCK || current_token.type === TOKEN.END_EXPR) && (open_token && (current_token.text === "]" && open_token.text === "[" || current_token.text === ")" && open_token.text === "(" || current_token.text === "}" && open_token.text === "{"));
22802
+ };
22803
+ Tokenizer.prototype._reset = function() {
22804
+ in_html_comment = false;
22805
+ };
22806
+ Tokenizer.prototype._get_next_token = function(previous_token, open_token) {
22807
+ var token = null;
22808
+ this._readWhitespace();
22809
+ var c = this._input.peek();
22810
+ if (c === null) {
22811
+ return this._create_token(TOKEN.EOF, "");
22812
+ }
22813
+ token = token || this._read_non_javascript(c);
22814
+ token = token || this._read_string(c);
22815
+ token = token || this._read_word(previous_token);
22816
+ token = token || this._read_singles(c);
22817
+ token = token || this._read_comment(c);
22818
+ token = token || this._read_regexp(c, previous_token);
22819
+ token = token || this._read_xml(c, previous_token);
22820
+ token = token || this._read_punctuation();
22821
+ token = token || this._create_token(TOKEN.UNKNOWN, this._input.next());
22822
+ return token;
22823
+ };
22824
+ Tokenizer.prototype._read_word = function(previous_token) {
22825
+ var resulting_string;
22826
+ resulting_string = this.__patterns.identifier.read();
22827
+ if (resulting_string !== "") {
22828
+ resulting_string = resulting_string.replace(acorn.allLineBreaks, "\n");
22829
+ if (!(previous_token.type === TOKEN.DOT || previous_token.type === TOKEN.RESERVED && (previous_token.text === "set" || previous_token.text === "get")) && reserved_word_pattern.test(resulting_string)) {
22830
+ if (resulting_string === "in" || resulting_string === "of") {
22831
+ return this._create_token(TOKEN.OPERATOR, resulting_string);
22832
+ }
22833
+ return this._create_token(TOKEN.RESERVED, resulting_string);
22834
+ }
22835
+ return this._create_token(TOKEN.WORD, resulting_string);
22836
+ }
22837
+ resulting_string = this.__patterns.number.read();
22838
+ if (resulting_string !== "") {
22839
+ return this._create_token(TOKEN.WORD, resulting_string);
22840
+ }
22841
+ };
22842
+ Tokenizer.prototype._read_singles = function(c) {
22843
+ var token = null;
22844
+ if (c === "(" || c === "[") {
22845
+ token = this._create_token(TOKEN.START_EXPR, c);
22846
+ } else if (c === ")" || c === "]") {
22847
+ token = this._create_token(TOKEN.END_EXPR, c);
22848
+ } else if (c === "{") {
22849
+ token = this._create_token(TOKEN.START_BLOCK, c);
22850
+ } else if (c === "}") {
22851
+ token = this._create_token(TOKEN.END_BLOCK, c);
22852
+ } else if (c === ";") {
22853
+ token = this._create_token(TOKEN.SEMICOLON, c);
22854
+ } else if (c === "." && dot_pattern.test(this._input.peek(1))) {
22855
+ token = this._create_token(TOKEN.DOT, c);
22856
+ } else if (c === ",") {
22857
+ token = this._create_token(TOKEN.COMMA, c);
22858
+ }
22859
+ if (token) {
22860
+ this._input.next();
22861
+ }
22862
+ return token;
22863
+ };
22864
+ Tokenizer.prototype._read_punctuation = function() {
22865
+ var resulting_string = this.__patterns.punct.read();
22866
+ if (resulting_string !== "") {
22867
+ if (resulting_string === "=") {
22868
+ return this._create_token(TOKEN.EQUALS, resulting_string);
22869
+ } else if (resulting_string === "?.") {
22870
+ return this._create_token(TOKEN.DOT, resulting_string);
22871
+ } else {
22872
+ return this._create_token(TOKEN.OPERATOR, resulting_string);
22873
+ }
22874
+ }
22875
+ };
22876
+ Tokenizer.prototype._read_non_javascript = function(c) {
22877
+ var resulting_string = "";
22878
+ if (c === "#") {
22879
+ if (this._is_first_token()) {
22880
+ resulting_string = this.__patterns.shebang.read();
22881
+ if (resulting_string) {
22882
+ return this._create_token(TOKEN.UNKNOWN, resulting_string.trim() + "\n");
22883
+ }
22884
+ }
22885
+ resulting_string = this.__patterns.include.read();
22886
+ if (resulting_string) {
22887
+ return this._create_token(TOKEN.UNKNOWN, resulting_string.trim() + "\n");
22888
+ }
22889
+ c = this._input.next();
22890
+ var sharp = "#";
22891
+ if (this._input.hasNext() && this._input.testChar(digit)) {
22892
+ do {
22893
+ c = this._input.next();
22894
+ sharp += c;
22895
+ } while (this._input.hasNext() && c !== "#" && c !== "=");
22896
+ if (c === "#") {
22897
+ } else if (this._input.peek() === "[" && this._input.peek(1) === "]") {
22898
+ sharp += "[]";
22899
+ this._input.next();
22900
+ this._input.next();
22901
+ } else if (this._input.peek() === "{" && this._input.peek(1) === "}") {
22902
+ sharp += "{}";
22903
+ this._input.next();
22904
+ this._input.next();
22905
+ }
22906
+ return this._create_token(TOKEN.WORD, sharp);
22907
+ }
22908
+ this._input.back();
22909
+ } else if (c === "<" && this._is_first_token()) {
22910
+ resulting_string = this.__patterns.html_comment_start.read();
22911
+ if (resulting_string) {
22912
+ while (this._input.hasNext() && !this._input.testChar(acorn.newline)) {
22913
+ resulting_string += this._input.next();
22914
+ }
22915
+ in_html_comment = true;
22916
+ return this._create_token(TOKEN.COMMENT, resulting_string);
22917
+ }
22918
+ } else if (in_html_comment && c === "-") {
22919
+ resulting_string = this.__patterns.html_comment_end.read();
22920
+ if (resulting_string) {
22921
+ in_html_comment = false;
22922
+ return this._create_token(TOKEN.COMMENT, resulting_string);
22923
+ }
22924
+ }
22925
+ return null;
22926
+ };
22927
+ Tokenizer.prototype._read_comment = function(c) {
22928
+ var token = null;
22929
+ if (c === "/") {
22930
+ var comment = "";
22931
+ if (this._input.peek(1) === "*") {
22932
+ comment = this.__patterns.block_comment.read();
22933
+ var directives = directives_core.get_directives(comment);
22934
+ if (directives && directives.ignore === "start") {
22935
+ comment += directives_core.readIgnored(this._input);
22936
+ }
22937
+ comment = comment.replace(acorn.allLineBreaks, "\n");
22938
+ token = this._create_token(TOKEN.BLOCK_COMMENT, comment);
22939
+ token.directives = directives;
22940
+ } else if (this._input.peek(1) === "/") {
22941
+ comment = this.__patterns.comment.read();
22942
+ token = this._create_token(TOKEN.COMMENT, comment);
22943
+ }
22944
+ }
22945
+ return token;
22946
+ };
22947
+ Tokenizer.prototype._read_string = function(c) {
22948
+ if (c === "`" || c === "'" || c === '"') {
22949
+ var resulting_string = this._input.next();
22950
+ this.has_char_escapes = false;
22951
+ if (c === "`") {
22952
+ resulting_string += this._read_string_recursive("`", true, "${");
22953
+ } else {
22954
+ resulting_string += this._read_string_recursive(c);
22955
+ }
22956
+ if (this.has_char_escapes && this._options.unescape_strings) {
22957
+ resulting_string = unescape_string(resulting_string);
22958
+ }
22959
+ if (this._input.peek() === c) {
22960
+ resulting_string += this._input.next();
22961
+ }
22962
+ resulting_string = resulting_string.replace(acorn.allLineBreaks, "\n");
22963
+ return this._create_token(TOKEN.STRING, resulting_string);
22964
+ }
22965
+ return null;
22966
+ };
22967
+ Tokenizer.prototype._allow_regexp_or_xml = function(previous_token) {
22968
+ return previous_token.type === TOKEN.RESERVED && in_array(previous_token.text, ["return", "case", "throw", "else", "do", "typeof", "yield"]) || previous_token.type === TOKEN.END_EXPR && previous_token.text === ")" && previous_token.opened.previous.type === TOKEN.RESERVED && in_array(previous_token.opened.previous.text, ["if", "while", "for"]) || in_array(previous_token.type, [
22969
+ TOKEN.COMMENT,
22970
+ TOKEN.START_EXPR,
22971
+ TOKEN.START_BLOCK,
22972
+ TOKEN.START,
22973
+ TOKEN.END_BLOCK,
22974
+ TOKEN.OPERATOR,
22975
+ TOKEN.EQUALS,
22976
+ TOKEN.EOF,
22977
+ TOKEN.SEMICOLON,
22978
+ TOKEN.COMMA
22979
+ ]);
22980
+ };
22981
+ Tokenizer.prototype._read_regexp = function(c, previous_token) {
22982
+ if (c === "/" && this._allow_regexp_or_xml(previous_token)) {
22983
+ var resulting_string = this._input.next();
22984
+ var esc = false;
22985
+ var in_char_class = false;
22986
+ while (this._input.hasNext() && ((esc || in_char_class || this._input.peek() !== c) && !this._input.testChar(acorn.newline))) {
22987
+ resulting_string += this._input.peek();
22988
+ if (!esc) {
22989
+ esc = this._input.peek() === "\\";
22990
+ if (this._input.peek() === "[") {
22991
+ in_char_class = true;
22992
+ } else if (this._input.peek() === "]") {
22993
+ in_char_class = false;
22994
+ }
22995
+ } else {
22996
+ esc = false;
22997
+ }
22998
+ this._input.next();
22999
+ }
23000
+ if (this._input.peek() === c) {
23001
+ resulting_string += this._input.next();
23002
+ resulting_string += this._input.read(acorn.identifier);
23003
+ }
23004
+ return this._create_token(TOKEN.STRING, resulting_string);
23005
+ }
23006
+ return null;
23007
+ };
23008
+ Tokenizer.prototype._read_xml = function(c, previous_token) {
23009
+ if (this._options.e4x && c === "<" && this._allow_regexp_or_xml(previous_token)) {
23010
+ var xmlStr = "";
23011
+ var match = this.__patterns.xml.read_match();
23012
+ if (match) {
23013
+ var rootTag = match[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}");
23014
+ var isCurlyRoot = rootTag.indexOf("{") === 0;
23015
+ var depth = 0;
23016
+ while (match) {
23017
+ var isEndTag = !!match[1];
23018
+ var tagName = match[2];
23019
+ var isSingletonTag = !!match[match.length - 1] || tagName.slice(0, 8) === "![CDATA[";
23020
+ if (!isSingletonTag && (tagName === rootTag || isCurlyRoot && tagName.replace(/^{\s+/, "{").replace(/\s+}$/, "}"))) {
23021
+ if (isEndTag) {
23022
+ --depth;
23023
+ } else {
23024
+ ++depth;
23025
+ }
23026
+ }
23027
+ xmlStr += match[0];
23028
+ if (depth <= 0) {
23029
+ break;
23030
+ }
23031
+ match = this.__patterns.xml.read_match();
23032
+ }
23033
+ if (!match) {
23034
+ xmlStr += this._input.match(/[\s\S]*/g)[0];
23035
+ }
23036
+ xmlStr = xmlStr.replace(acorn.allLineBreaks, "\n");
23037
+ return this._create_token(TOKEN.STRING, xmlStr);
23038
+ }
23039
+ }
23040
+ return null;
23041
+ };
23042
+ function unescape_string(s) {
23043
+ var out = "", escaped = 0;
23044
+ var input_scan = new InputScanner(s);
23045
+ var matched = null;
23046
+ while (input_scan.hasNext()) {
23047
+ matched = input_scan.match(/([\s]|[^\\]|\\\\)+/g);
23048
+ if (matched) {
23049
+ out += matched[0];
23050
+ }
23051
+ if (input_scan.peek() === "\\") {
23052
+ input_scan.next();
23053
+ if (input_scan.peek() === "x") {
23054
+ matched = input_scan.match(/x([0-9A-Fa-f]{2})/g);
23055
+ } else if (input_scan.peek() === "u") {
23056
+ matched = input_scan.match(/u([0-9A-Fa-f]{4})/g);
23057
+ } else {
23058
+ out += "\\";
23059
+ if (input_scan.hasNext()) {
23060
+ out += input_scan.next();
23061
+ }
23062
+ continue;
23063
+ }
23064
+ if (!matched) {
23065
+ return s;
23066
+ }
23067
+ escaped = parseInt(matched[1], 16);
23068
+ if (escaped > 126 && escaped <= 255 && matched[0].indexOf("x") === 0) {
23069
+ return s;
23070
+ } else if (escaped >= 0 && escaped < 32) {
23071
+ out += "\\" + matched[0];
23072
+ continue;
23073
+ } else if (escaped === 34 || escaped === 39 || escaped === 92) {
23074
+ out += "\\" + String.fromCharCode(escaped);
23075
+ } else {
23076
+ out += String.fromCharCode(escaped);
23077
+ }
23078
+ }
23079
+ }
23080
+ return out;
23081
+ }
23082
+ Tokenizer.prototype._read_string_recursive = function(delimiter, allow_unescaped_newlines, start_sub) {
23083
+ var current_char;
23084
+ var pattern;
23085
+ if (delimiter === "'") {
23086
+ pattern = this.__patterns.single_quote;
23087
+ } else if (delimiter === '"') {
23088
+ pattern = this.__patterns.double_quote;
23089
+ } else if (delimiter === "`") {
23090
+ pattern = this.__patterns.template_text;
23091
+ } else if (delimiter === "}") {
23092
+ pattern = this.__patterns.template_expression;
23093
+ }
23094
+ var resulting_string = pattern.read();
23095
+ var next = "";
23096
+ while (this._input.hasNext()) {
23097
+ next = this._input.next();
23098
+ if (next === delimiter || !allow_unescaped_newlines && acorn.newline.test(next)) {
23099
+ this._input.back();
23100
+ break;
23101
+ } else if (next === "\\" && this._input.hasNext()) {
23102
+ current_char = this._input.peek();
23103
+ if (current_char === "x" || current_char === "u") {
23104
+ this.has_char_escapes = true;
23105
+ } else if (current_char === "\r" && this._input.peek(1) === "\n") {
23106
+ this._input.next();
23107
+ }
23108
+ next += this._input.next();
23109
+ } else if (start_sub) {
23110
+ if (start_sub === "${" && next === "$" && this._input.peek() === "{") {
23111
+ next += this._input.next();
23112
+ }
23113
+ if (start_sub === next) {
23114
+ if (delimiter === "`") {
23115
+ next += this._read_string_recursive("}", allow_unescaped_newlines, "`");
23116
+ } else {
23117
+ next += this._read_string_recursive("`", allow_unescaped_newlines, "${");
23118
+ }
23119
+ if (this._input.hasNext()) {
23120
+ next += this._input.next();
23121
+ }
23122
+ }
23123
+ }
23124
+ next += pattern.read();
23125
+ resulting_string += next;
23126
+ }
23127
+ return resulting_string;
23128
+ };
23129
+ module2.exports.Tokenizer = Tokenizer;
23130
+ module2.exports.TOKEN = TOKEN;
23131
+ module2.exports.positionable_operators = positionable_operators.slice();
23132
+ module2.exports.line_starters = line_starters.slice();
23133
+ }
23134
+ });
23135
+
23136
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/beautifier.js
23137
+ var require_beautifier = __commonJS({
23138
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/beautifier.js"(exports2, module2) {
23139
+ "use strict";
23140
+ var Output = require_output().Output;
23141
+ var Token = require_token().Token;
23142
+ var acorn = require_acorn();
23143
+ var Options = require_options2().Options;
23144
+ var Tokenizer = require_tokenizer2().Tokenizer;
23145
+ var line_starters = require_tokenizer2().line_starters;
23146
+ var positionable_operators = require_tokenizer2().positionable_operators;
23147
+ var TOKEN = require_tokenizer2().TOKEN;
23148
+ function in_array(what, arr) {
23149
+ return arr.indexOf(what) !== -1;
23150
+ }
23151
+ function ltrim(s) {
23152
+ return s.replace(/^\s+/g, "");
23153
+ }
23154
+ function generateMapFromStrings(list) {
23155
+ var result = {};
23156
+ for (var x = 0; x < list.length; x++) {
23157
+ result[list[x].replace(/-/g, "_")] = list[x];
23158
+ }
23159
+ return result;
23160
+ }
23161
+ function reserved_word(token, word) {
23162
+ return token && token.type === TOKEN.RESERVED && token.text === word;
23163
+ }
23164
+ function reserved_array(token, words) {
23165
+ return token && token.type === TOKEN.RESERVED && in_array(token.text, words);
23166
+ }
23167
+ var special_words = ["case", "return", "do", "if", "throw", "else", "await", "break", "continue", "async"];
23168
+ var validPositionValues = ["before-newline", "after-newline", "preserve-newline"];
23169
+ var OPERATOR_POSITION = generateMapFromStrings(validPositionValues);
23170
+ var OPERATOR_POSITION_BEFORE_OR_PRESERVE = [OPERATOR_POSITION.before_newline, OPERATOR_POSITION.preserve_newline];
23171
+ var MODE = {
23172
+ BlockStatement: "BlockStatement",
23173
+ // 'BLOCK'
23174
+ Statement: "Statement",
23175
+ // 'STATEMENT'
23176
+ ObjectLiteral: "ObjectLiteral",
23177
+ // 'OBJECT',
23178
+ ArrayLiteral: "ArrayLiteral",
23179
+ //'[EXPRESSION]',
23180
+ ForInitializer: "ForInitializer",
23181
+ //'(FOR-EXPRESSION)',
23182
+ Conditional: "Conditional",
23183
+ //'(COND-EXPRESSION)',
23184
+ Expression: "Expression"
23185
+ //'(EXPRESSION)'
23186
+ };
23187
+ function remove_redundant_indentation(output, frame) {
23188
+ if (frame.multiline_frame || frame.mode === MODE.ForInitializer || frame.mode === MODE.Conditional) {
23189
+ return;
23190
+ }
23191
+ output.remove_indent(frame.start_line_index);
23192
+ }
23193
+ function split_linebreaks(s) {
23194
+ s = s.replace(acorn.allLineBreaks, "\n");
23195
+ var out = [], idx = s.indexOf("\n");
23196
+ while (idx !== -1) {
23197
+ out.push(s.substring(0, idx));
23198
+ s = s.substring(idx + 1);
23199
+ idx = s.indexOf("\n");
23200
+ }
23201
+ if (s.length) {
23202
+ out.push(s);
23203
+ }
23204
+ return out;
23205
+ }
23206
+ function is_array(mode) {
23207
+ return mode === MODE.ArrayLiteral;
23208
+ }
23209
+ function is_expression(mode) {
23210
+ return in_array(mode, [MODE.Expression, MODE.ForInitializer, MODE.Conditional]);
23211
+ }
23212
+ function all_lines_start_with(lines, c) {
23213
+ for (var i = 0; i < lines.length; i++) {
23214
+ var line = lines[i].trim();
23215
+ if (line.charAt(0) !== c) {
23216
+ return false;
23217
+ }
23218
+ }
23219
+ return true;
23220
+ }
23221
+ function each_line_matches_indent(lines, indent) {
23222
+ var i = 0, len = lines.length, line;
23223
+ for (; i < len; i++) {
23224
+ line = lines[i];
23225
+ if (line && line.indexOf(indent) !== 0) {
23226
+ return false;
23227
+ }
23228
+ }
23229
+ return true;
23230
+ }
23231
+ function Beautifier(source_text, options) {
23232
+ options = options || {};
23233
+ this._source_text = source_text || "";
23234
+ this._output = null;
23235
+ this._tokens = null;
23236
+ this._last_last_text = null;
23237
+ this._flags = null;
23238
+ this._previous_flags = null;
23239
+ this._flag_store = null;
23240
+ this._options = new Options(options);
23241
+ }
23242
+ Beautifier.prototype.create_flags = function(flags_base, mode) {
23243
+ var next_indent_level = 0;
23244
+ if (flags_base) {
23245
+ next_indent_level = flags_base.indentation_level;
23246
+ if (!this._output.just_added_newline() && flags_base.line_indent_level > next_indent_level) {
23247
+ next_indent_level = flags_base.line_indent_level;
23248
+ }
23249
+ }
23250
+ var next_flags = {
23251
+ mode,
23252
+ parent: flags_base,
23253
+ last_token: flags_base ? flags_base.last_token : new Token(TOKEN.START_BLOCK, ""),
23254
+ // last token text
23255
+ last_word: flags_base ? flags_base.last_word : "",
23256
+ // last TOKEN.WORD passed
23257
+ declaration_statement: false,
23258
+ declaration_assignment: false,
23259
+ multiline_frame: false,
23260
+ inline_frame: false,
23261
+ if_block: false,
23262
+ else_block: false,
23263
+ do_block: false,
23264
+ do_while: false,
23265
+ import_block: false,
23266
+ in_case_statement: false,
23267
+ // switch(..){ INSIDE HERE }
23268
+ in_case: false,
23269
+ // we're on the exact line with "case 0:"
23270
+ case_body: false,
23271
+ // the indented case-action block
23272
+ case_block: false,
23273
+ // the indented case-action block is wrapped with {}
23274
+ indentation_level: next_indent_level,
23275
+ alignment: 0,
23276
+ line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level,
23277
+ start_line_index: this._output.get_line_number(),
23278
+ ternary_depth: 0
23279
+ };
23280
+ return next_flags;
23281
+ };
23282
+ Beautifier.prototype._reset = function(source_text) {
23283
+ var baseIndentString = source_text.match(/^[\t ]*/)[0];
23284
+ this._last_last_text = "";
23285
+ this._output = new Output(this._options, baseIndentString);
23286
+ this._output.raw = this._options.test_output_raw;
23287
+ this._flag_store = [];
23288
+ this.set_mode(MODE.BlockStatement);
23289
+ var tokenizer = new Tokenizer(source_text, this._options);
23290
+ this._tokens = tokenizer.tokenize();
23291
+ return source_text;
23292
+ };
23293
+ Beautifier.prototype.beautify = function() {
23294
+ if (this._options.disabled) {
23295
+ return this._source_text;
23296
+ }
23297
+ var sweet_code;
23298
+ var source_text = this._reset(this._source_text);
23299
+ var eol = this._options.eol;
23300
+ if (this._options.eol === "auto") {
23301
+ eol = "\n";
23302
+ if (source_text && acorn.lineBreak.test(source_text || "")) {
23303
+ eol = source_text.match(acorn.lineBreak)[0];
23304
+ }
23305
+ }
23306
+ var current_token = this._tokens.next();
23307
+ while (current_token) {
23308
+ this.handle_token(current_token);
23309
+ this._last_last_text = this._flags.last_token.text;
23310
+ this._flags.last_token = current_token;
23311
+ current_token = this._tokens.next();
23312
+ }
23313
+ sweet_code = this._output.get_code(eol);
23314
+ return sweet_code;
23315
+ };
23316
+ Beautifier.prototype.handle_token = function(current_token, preserve_statement_flags) {
23317
+ if (current_token.type === TOKEN.START_EXPR) {
23318
+ this.handle_start_expr(current_token);
23319
+ } else if (current_token.type === TOKEN.END_EXPR) {
23320
+ this.handle_end_expr(current_token);
23321
+ } else if (current_token.type === TOKEN.START_BLOCK) {
23322
+ this.handle_start_block(current_token);
23323
+ } else if (current_token.type === TOKEN.END_BLOCK) {
23324
+ this.handle_end_block(current_token);
23325
+ } else if (current_token.type === TOKEN.WORD) {
23326
+ this.handle_word(current_token);
23327
+ } else if (current_token.type === TOKEN.RESERVED) {
23328
+ this.handle_word(current_token);
23329
+ } else if (current_token.type === TOKEN.SEMICOLON) {
23330
+ this.handle_semicolon(current_token);
23331
+ } else if (current_token.type === TOKEN.STRING) {
23332
+ this.handle_string(current_token);
23333
+ } else if (current_token.type === TOKEN.EQUALS) {
23334
+ this.handle_equals(current_token);
23335
+ } else if (current_token.type === TOKEN.OPERATOR) {
23336
+ this.handle_operator(current_token);
23337
+ } else if (current_token.type === TOKEN.COMMA) {
23338
+ this.handle_comma(current_token);
23339
+ } else if (current_token.type === TOKEN.BLOCK_COMMENT) {
23340
+ this.handle_block_comment(current_token, preserve_statement_flags);
23341
+ } else if (current_token.type === TOKEN.COMMENT) {
23342
+ this.handle_comment(current_token, preserve_statement_flags);
23343
+ } else if (current_token.type === TOKEN.DOT) {
23344
+ this.handle_dot(current_token);
23345
+ } else if (current_token.type === TOKEN.EOF) {
23346
+ this.handle_eof(current_token);
23347
+ } else if (current_token.type === TOKEN.UNKNOWN) {
23348
+ this.handle_unknown(current_token, preserve_statement_flags);
23349
+ } else {
23350
+ this.handle_unknown(current_token, preserve_statement_flags);
23351
+ }
23352
+ };
23353
+ Beautifier.prototype.handle_whitespace_and_comments = function(current_token, preserve_statement_flags) {
23354
+ var newlines = current_token.newlines;
23355
+ var keep_whitespace = this._options.keep_array_indentation && is_array(this._flags.mode);
23356
+ if (current_token.comments_before) {
23357
+ var comment_token = current_token.comments_before.next();
23358
+ while (comment_token) {
23359
+ this.handle_whitespace_and_comments(comment_token, preserve_statement_flags);
23360
+ this.handle_token(comment_token, preserve_statement_flags);
23361
+ comment_token = current_token.comments_before.next();
23362
+ }
23363
+ }
23364
+ if (keep_whitespace) {
23365
+ for (var i = 0; i < newlines; i += 1) {
23366
+ this.print_newline(i > 0, preserve_statement_flags);
23367
+ }
23368
+ } else {
23369
+ if (this._options.max_preserve_newlines && newlines > this._options.max_preserve_newlines) {
23370
+ newlines = this._options.max_preserve_newlines;
23371
+ }
23372
+ if (this._options.preserve_newlines) {
23373
+ if (newlines > 1) {
23374
+ this.print_newline(false, preserve_statement_flags);
23375
+ for (var j = 1; j < newlines; j += 1) {
23376
+ this.print_newline(true, preserve_statement_flags);
23377
+ }
23378
+ }
23379
+ }
23380
+ }
23381
+ };
23382
+ var newline_restricted_tokens = ["async", "break", "continue", "return", "throw", "yield"];
23383
+ Beautifier.prototype.allow_wrap_or_preserved_newline = function(current_token, force_linewrap) {
23384
+ force_linewrap = force_linewrap === void 0 ? false : force_linewrap;
23385
+ if (this._output.just_added_newline()) {
23386
+ return;
23387
+ }
23388
+ var shouldPreserveOrForce = this._options.preserve_newlines && current_token.newlines || force_linewrap;
23389
+ var operatorLogicApplies = in_array(this._flags.last_token.text, positionable_operators) || in_array(current_token.text, positionable_operators);
23390
+ if (operatorLogicApplies) {
23391
+ var shouldPrintOperatorNewline = in_array(this._flags.last_token.text, positionable_operators) && in_array(this._options.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE) || in_array(current_token.text, positionable_operators);
23392
+ shouldPreserveOrForce = shouldPreserveOrForce && shouldPrintOperatorNewline;
23393
+ }
23394
+ if (shouldPreserveOrForce) {
23395
+ this.print_newline(false, true);
23396
+ } else if (this._options.wrap_line_length) {
23397
+ if (reserved_array(this._flags.last_token, newline_restricted_tokens)) {
23398
+ return;
23399
+ }
23400
+ this._output.set_wrap_point();
23401
+ }
23402
+ };
23403
+ Beautifier.prototype.print_newline = function(force_newline, preserve_statement_flags) {
23404
+ if (!preserve_statement_flags) {
23405
+ if (this._flags.last_token.text !== ";" && this._flags.last_token.text !== "," && this._flags.last_token.text !== "=" && (this._flags.last_token.type !== TOKEN.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++")) {
23406
+ var next_token = this._tokens.peek();
23407
+ while (this._flags.mode === MODE.Statement && !(this._flags.if_block && reserved_word(next_token, "else")) && !this._flags.do_block) {
23408
+ this.restore_mode();
23409
+ }
23410
+ }
23411
+ }
23412
+ if (this._output.add_new_line(force_newline)) {
23413
+ this._flags.multiline_frame = true;
23414
+ }
23415
+ };
23416
+ Beautifier.prototype.print_token_line_indentation = function(current_token) {
23417
+ if (this._output.just_added_newline()) {
23418
+ if (this._options.keep_array_indentation && current_token.newlines && (current_token.text === "[" || is_array(this._flags.mode))) {
23419
+ this._output.current_line.set_indent(-1);
23420
+ this._output.current_line.push(current_token.whitespace_before);
23421
+ this._output.space_before_token = false;
23422
+ } else if (this._output.set_indent(this._flags.indentation_level, this._flags.alignment)) {
23423
+ this._flags.line_indent_level = this._flags.indentation_level;
23424
+ }
23425
+ }
23426
+ };
23427
+ Beautifier.prototype.print_token = function(current_token) {
23428
+ if (this._output.raw) {
23429
+ this._output.add_raw_token(current_token);
23430
+ return;
23431
+ }
23432
+ if (this._options.comma_first && current_token.previous && current_token.previous.type === TOKEN.COMMA && this._output.just_added_newline()) {
23433
+ if (this._output.previous_line.last() === ",") {
23434
+ var popped = this._output.previous_line.pop();
23435
+ if (this._output.previous_line.is_empty()) {
23436
+ this._output.previous_line.push(popped);
23437
+ this._output.trim(true);
23438
+ this._output.current_line.pop();
23439
+ this._output.trim();
23440
+ }
23441
+ this.print_token_line_indentation(current_token);
23442
+ this._output.add_token(",");
23443
+ this._output.space_before_token = true;
23444
+ }
23445
+ }
23446
+ this.print_token_line_indentation(current_token);
23447
+ this._output.non_breaking_space = true;
23448
+ this._output.add_token(current_token.text);
23449
+ if (this._output.previous_token_wrapped) {
23450
+ this._flags.multiline_frame = true;
23451
+ }
23452
+ };
23453
+ Beautifier.prototype.indent = function() {
23454
+ this._flags.indentation_level += 1;
23455
+ this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
23456
+ };
23457
+ Beautifier.prototype.deindent = function() {
23458
+ if (this._flags.indentation_level > 0 && (!this._flags.parent || this._flags.indentation_level > this._flags.parent.indentation_level)) {
23459
+ this._flags.indentation_level -= 1;
23460
+ this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
23461
+ }
23462
+ };
23463
+ Beautifier.prototype.set_mode = function(mode) {
23464
+ if (this._flags) {
23465
+ this._flag_store.push(this._flags);
23466
+ this._previous_flags = this._flags;
23467
+ } else {
23468
+ this._previous_flags = this.create_flags(null, mode);
23469
+ }
23470
+ this._flags = this.create_flags(this._previous_flags, mode);
23471
+ this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
23472
+ };
23473
+ Beautifier.prototype.restore_mode = function() {
23474
+ if (this._flag_store.length > 0) {
23475
+ this._previous_flags = this._flags;
23476
+ this._flags = this._flag_store.pop();
23477
+ if (this._previous_flags.mode === MODE.Statement) {
23478
+ remove_redundant_indentation(this._output, this._previous_flags);
23479
+ }
23480
+ this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
23481
+ }
23482
+ };
23483
+ Beautifier.prototype.start_of_object_property = function() {
23484
+ return this._flags.parent.mode === MODE.ObjectLiteral && this._flags.mode === MODE.Statement && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || reserved_array(this._flags.last_token, ["get", "set"]));
23485
+ };
23486
+ Beautifier.prototype.start_of_statement = function(current_token) {
23487
+ var start = false;
23488
+ start = start || reserved_array(this._flags.last_token, ["var", "let", "const"]) && current_token.type === TOKEN.WORD;
23489
+ start = start || reserved_word(this._flags.last_token, "do");
23490
+ start = start || !(this._flags.parent.mode === MODE.ObjectLiteral && this._flags.mode === MODE.Statement) && reserved_array(this._flags.last_token, newline_restricted_tokens) && !current_token.newlines;
23491
+ start = start || reserved_word(this._flags.last_token, "else") && !(reserved_word(current_token, "if") && !current_token.comments_before);
23492
+ start = start || this._flags.last_token.type === TOKEN.END_EXPR && (this._previous_flags.mode === MODE.ForInitializer || this._previous_flags.mode === MODE.Conditional);
23493
+ start = start || this._flags.last_token.type === TOKEN.WORD && this._flags.mode === MODE.BlockStatement && !this._flags.in_case && !(current_token.text === "--" || current_token.text === "++") && this._last_last_text !== "function" && current_token.type !== TOKEN.WORD && current_token.type !== TOKEN.RESERVED;
23494
+ start = start || this._flags.mode === MODE.ObjectLiteral && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || reserved_array(this._flags.last_token, ["get", "set"]));
23495
+ if (start) {
23496
+ this.set_mode(MODE.Statement);
23497
+ this.indent();
23498
+ this.handle_whitespace_and_comments(current_token, true);
23499
+ if (!this.start_of_object_property()) {
23500
+ this.allow_wrap_or_preserved_newline(
23501
+ current_token,
23502
+ reserved_array(current_token, ["do", "for", "if", "while"])
23503
+ );
23504
+ }
23505
+ return true;
23506
+ }
23507
+ return false;
23508
+ };
23509
+ Beautifier.prototype.handle_start_expr = function(current_token) {
23510
+ if (!this.start_of_statement(current_token)) {
23511
+ this.handle_whitespace_and_comments(current_token);
23512
+ }
23513
+ var next_mode = MODE.Expression;
23514
+ if (current_token.text === "[") {
23515
+ if (this._flags.last_token.type === TOKEN.WORD || this._flags.last_token.text === ")") {
23516
+ if (reserved_array(this._flags.last_token, line_starters)) {
23517
+ this._output.space_before_token = true;
23518
+ }
23519
+ this.print_token(current_token);
23520
+ this.set_mode(next_mode);
23521
+ this.indent();
23522
+ if (this._options.space_in_paren) {
23523
+ this._output.space_before_token = true;
23524
+ }
23525
+ return;
23526
+ }
23527
+ next_mode = MODE.ArrayLiteral;
23528
+ if (is_array(this._flags.mode)) {
23529
+ if (this._flags.last_token.text === "[" || this._flags.last_token.text === "," && (this._last_last_text === "]" || this._last_last_text === "}")) {
23530
+ if (!this._options.keep_array_indentation) {
23531
+ this.print_newline();
23532
+ }
23533
+ }
23534
+ }
23535
+ if (!in_array(this._flags.last_token.type, [TOKEN.START_EXPR, TOKEN.END_EXPR, TOKEN.WORD, TOKEN.OPERATOR, TOKEN.DOT])) {
23536
+ this._output.space_before_token = true;
23537
+ }
23538
+ } else {
23539
+ if (this._flags.last_token.type === TOKEN.RESERVED) {
23540
+ if (this._flags.last_token.text === "for") {
23541
+ this._output.space_before_token = this._options.space_before_conditional;
23542
+ next_mode = MODE.ForInitializer;
23543
+ } else if (in_array(this._flags.last_token.text, ["if", "while", "switch"])) {
23544
+ this._output.space_before_token = this._options.space_before_conditional;
23545
+ next_mode = MODE.Conditional;
23546
+ } else if (in_array(this._flags.last_word, ["await", "async"])) {
23547
+ this._output.space_before_token = true;
23548
+ } else if (this._flags.last_token.text === "import" && current_token.whitespace_before === "") {
23549
+ this._output.space_before_token = false;
23550
+ } else if (in_array(this._flags.last_token.text, line_starters) || this._flags.last_token.text === "catch") {
23551
+ this._output.space_before_token = true;
23552
+ }
23553
+ } else if (this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) {
23554
+ if (!this.start_of_object_property()) {
23555
+ this.allow_wrap_or_preserved_newline(current_token);
23556
+ }
23557
+ } else if (this._flags.last_token.type === TOKEN.WORD) {
23558
+ this._output.space_before_token = false;
23559
+ var peek_back_two = this._tokens.peek(-3);
23560
+ if (this._options.space_after_named_function && peek_back_two) {
23561
+ var peek_back_three = this._tokens.peek(-4);
23562
+ if (reserved_array(peek_back_two, ["async", "function"]) || peek_back_two.text === "*" && reserved_array(peek_back_three, ["async", "function"])) {
23563
+ this._output.space_before_token = true;
23564
+ } else if (this._flags.mode === MODE.ObjectLiteral) {
23565
+ if (peek_back_two.text === "{" || peek_back_two.text === "," || peek_back_two.text === "*" && (peek_back_three.text === "{" || peek_back_three.text === ",")) {
23566
+ this._output.space_before_token = true;
23567
+ }
23568
+ }
23569
+ }
23570
+ } else {
23571
+ this.allow_wrap_or_preserved_newline(current_token);
23572
+ }
23573
+ if (this._flags.last_token.type === TOKEN.RESERVED && (this._flags.last_word === "function" || this._flags.last_word === "typeof") || this._flags.last_token.text === "*" && (in_array(this._last_last_text, ["function", "yield"]) || this._flags.mode === MODE.ObjectLiteral && in_array(this._last_last_text, ["{", ","]))) {
23574
+ this._output.space_before_token = this._options.space_after_anon_function;
23575
+ }
23576
+ }
23577
+ if (this._flags.last_token.text === ";" || this._flags.last_token.type === TOKEN.START_BLOCK) {
23578
+ this.print_newline();
23579
+ } else if (this._flags.last_token.type === TOKEN.END_EXPR || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.END_BLOCK || this._flags.last_token.text === "." || this._flags.last_token.type === TOKEN.COMMA) {
23580
+ this.allow_wrap_or_preserved_newline(current_token, current_token.newlines);
23581
+ }
23582
+ this.print_token(current_token);
23583
+ this.set_mode(next_mode);
23584
+ if (this._options.space_in_paren) {
23585
+ this._output.space_before_token = true;
23586
+ }
23587
+ this.indent();
23588
+ };
23589
+ Beautifier.prototype.handle_end_expr = function(current_token) {
23590
+ while (this._flags.mode === MODE.Statement) {
23591
+ this.restore_mode();
23592
+ }
23593
+ this.handle_whitespace_and_comments(current_token);
23594
+ if (this._flags.multiline_frame) {
23595
+ this.allow_wrap_or_preserved_newline(
23596
+ current_token,
23597
+ current_token.text === "]" && is_array(this._flags.mode) && !this._options.keep_array_indentation
23598
+ );
23599
+ }
23600
+ if (this._options.space_in_paren) {
23601
+ if (this._flags.last_token.type === TOKEN.START_EXPR && !this._options.space_in_empty_paren) {
23602
+ this._output.trim();
23603
+ this._output.space_before_token = false;
23604
+ } else {
23605
+ this._output.space_before_token = true;
23606
+ }
23607
+ }
23608
+ this.deindent();
23609
+ this.print_token(current_token);
23610
+ this.restore_mode();
23611
+ remove_redundant_indentation(this._output, this._previous_flags);
23612
+ if (this._flags.do_while && this._previous_flags.mode === MODE.Conditional) {
23613
+ this._previous_flags.mode = MODE.Expression;
23614
+ this._flags.do_block = false;
23615
+ this._flags.do_while = false;
23616
+ }
23617
+ };
23618
+ Beautifier.prototype.handle_start_block = function(current_token) {
23619
+ this.handle_whitespace_and_comments(current_token);
23620
+ var next_token = this._tokens.peek();
23621
+ var second_token = this._tokens.peek(1);
23622
+ if (this._flags.last_word === "switch" && this._flags.last_token.type === TOKEN.END_EXPR) {
23623
+ this.set_mode(MODE.BlockStatement);
23624
+ this._flags.in_case_statement = true;
23625
+ } else if (this._flags.case_body) {
23626
+ this.set_mode(MODE.BlockStatement);
23627
+ } else if (second_token && (in_array(second_token.text, [":", ","]) && in_array(next_token.type, [TOKEN.STRING, TOKEN.WORD, TOKEN.RESERVED]) || in_array(next_token.text, ["get", "set", "..."]) && in_array(second_token.type, [TOKEN.WORD, TOKEN.RESERVED]))) {
23628
+ if (in_array(this._last_last_text, ["class", "interface"]) && !in_array(second_token.text, [":", ","])) {
23629
+ this.set_mode(MODE.BlockStatement);
23630
+ } else {
23631
+ this.set_mode(MODE.ObjectLiteral);
23632
+ }
23633
+ } else if (this._flags.last_token.type === TOKEN.OPERATOR && this._flags.last_token.text === "=>") {
23634
+ this.set_mode(MODE.BlockStatement);
23635
+ } else if (in_array(this._flags.last_token.type, [TOKEN.EQUALS, TOKEN.START_EXPR, TOKEN.COMMA, TOKEN.OPERATOR]) || reserved_array(this._flags.last_token, ["return", "throw", "import", "default"])) {
23636
+ this.set_mode(MODE.ObjectLiteral);
23637
+ } else {
23638
+ this.set_mode(MODE.BlockStatement);
23639
+ }
23640
+ var empty_braces = !next_token.comments_before && next_token.text === "}";
23641
+ var empty_anonymous_function = empty_braces && this._flags.last_word === "function" && this._flags.last_token.type === TOKEN.END_EXPR;
23642
+ if (this._options.brace_preserve_inline) {
23643
+ var index = 0;
23644
+ var check_token = null;
23645
+ this._flags.inline_frame = true;
23646
+ do {
23647
+ index += 1;
23648
+ check_token = this._tokens.peek(index - 1);
23649
+ if (check_token.newlines) {
23650
+ this._flags.inline_frame = false;
23651
+ break;
23652
+ }
23653
+ } while (check_token.type !== TOKEN.EOF && !(check_token.type === TOKEN.END_BLOCK && check_token.opened === current_token));
23654
+ }
23655
+ if ((this._options.brace_style === "expand" || this._options.brace_style === "none" && current_token.newlines) && !this._flags.inline_frame) {
23656
+ if (this._flags.last_token.type !== TOKEN.OPERATOR && (empty_anonymous_function || this._flags.last_token.type === TOKEN.EQUALS || reserved_array(this._flags.last_token, special_words) && this._flags.last_token.text !== "else")) {
23657
+ this._output.space_before_token = true;
23658
+ } else {
23659
+ this.print_newline(false, true);
23660
+ }
23661
+ } else {
23662
+ if (is_array(this._previous_flags.mode) && (this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.COMMA)) {
23663
+ if (this._flags.last_token.type === TOKEN.COMMA || this._options.space_in_paren) {
23664
+ this._output.space_before_token = true;
23665
+ }
23666
+ if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR && this._flags.inline_frame) {
23667
+ this.allow_wrap_or_preserved_newline(current_token);
23668
+ this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame;
23669
+ this._flags.multiline_frame = false;
23670
+ }
23671
+ }
23672
+ if (this._flags.last_token.type !== TOKEN.OPERATOR && this._flags.last_token.type !== TOKEN.START_EXPR) {
23673
+ if (this._flags.last_token.type === TOKEN.START_BLOCK && !this._flags.inline_frame) {
23674
+ this.print_newline();
23675
+ } else {
23676
+ this._output.space_before_token = true;
23677
+ }
23678
+ }
23679
+ }
23680
+ this.print_token(current_token);
23681
+ this.indent();
23682
+ if (!empty_braces && !(this._options.brace_preserve_inline && this._flags.inline_frame)) {
23683
+ this.print_newline();
23684
+ }
23685
+ };
23686
+ Beautifier.prototype.handle_end_block = function(current_token) {
23687
+ this.handle_whitespace_and_comments(current_token);
23688
+ while (this._flags.mode === MODE.Statement) {
23689
+ this.restore_mode();
23690
+ }
23691
+ var empty_braces = this._flags.last_token.type === TOKEN.START_BLOCK;
23692
+ if (this._flags.inline_frame && !empty_braces) {
23693
+ this._output.space_before_token = true;
23694
+ } else if (this._options.brace_style === "expand") {
23695
+ if (!empty_braces) {
23696
+ this.print_newline();
23697
+ }
23698
+ } else {
23699
+ if (!empty_braces) {
23700
+ if (is_array(this._flags.mode) && this._options.keep_array_indentation) {
23701
+ this._options.keep_array_indentation = false;
23702
+ this.print_newline();
23703
+ this._options.keep_array_indentation = true;
23704
+ } else {
23705
+ this.print_newline();
23706
+ }
23707
+ }
23708
+ }
23709
+ this.restore_mode();
23710
+ this.print_token(current_token);
23711
+ };
23712
+ Beautifier.prototype.handle_word = function(current_token) {
23713
+ if (current_token.type === TOKEN.RESERVED) {
23714
+ if (in_array(current_token.text, ["set", "get"]) && this._flags.mode !== MODE.ObjectLiteral) {
23715
+ current_token.type = TOKEN.WORD;
23716
+ } else if (current_token.text === "import" && in_array(this._tokens.peek().text, ["(", "."])) {
23717
+ current_token.type = TOKEN.WORD;
23718
+ } else if (in_array(current_token.text, ["as", "from"]) && !this._flags.import_block) {
23719
+ current_token.type = TOKEN.WORD;
23720
+ } else if (this._flags.mode === MODE.ObjectLiteral) {
23721
+ var next_token = this._tokens.peek();
23722
+ if (next_token.text === ":") {
23723
+ current_token.type = TOKEN.WORD;
23724
+ }
23725
+ }
23726
+ }
23727
+ if (this.start_of_statement(current_token)) {
23728
+ if (reserved_array(this._flags.last_token, ["var", "let", "const"]) && current_token.type === TOKEN.WORD) {
23729
+ this._flags.declaration_statement = true;
23730
+ }
23731
+ } else if (current_token.newlines && !is_expression(this._flags.mode) && (this._flags.last_token.type !== TOKEN.OPERATOR || (this._flags.last_token.text === "--" || this._flags.last_token.text === "++")) && this._flags.last_token.type !== TOKEN.EQUALS && (this._options.preserve_newlines || !reserved_array(this._flags.last_token, ["var", "let", "const", "set", "get"]))) {
23732
+ this.handle_whitespace_and_comments(current_token);
23733
+ this.print_newline();
23734
+ } else {
23735
+ this.handle_whitespace_and_comments(current_token);
23736
+ }
23737
+ if (this._flags.do_block && !this._flags.do_while) {
23738
+ if (reserved_word(current_token, "while")) {
23739
+ this._output.space_before_token = true;
23740
+ this.print_token(current_token);
23741
+ this._output.space_before_token = true;
23742
+ this._flags.do_while = true;
23743
+ return;
23744
+ } else {
23745
+ this.print_newline();
23746
+ this._flags.do_block = false;
23747
+ }
23748
+ }
23749
+ if (this._flags.if_block) {
23750
+ if (!this._flags.else_block && reserved_word(current_token, "else")) {
23751
+ this._flags.else_block = true;
23752
+ } else {
23753
+ while (this._flags.mode === MODE.Statement) {
23754
+ this.restore_mode();
23755
+ }
23756
+ this._flags.if_block = false;
23757
+ this._flags.else_block = false;
23758
+ }
23759
+ }
23760
+ if (this._flags.in_case_statement && reserved_array(current_token, ["case", "default"])) {
23761
+ this.print_newline();
23762
+ if (!this._flags.case_block && (this._flags.case_body || this._options.jslint_happy)) {
23763
+ this.deindent();
23764
+ }
23765
+ this._flags.case_body = false;
23766
+ this.print_token(current_token);
23767
+ this._flags.in_case = true;
23768
+ return;
23769
+ }
23770
+ if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) {
23771
+ if (!this.start_of_object_property()) {
23772
+ this.allow_wrap_or_preserved_newline(current_token);
23773
+ }
23774
+ }
23775
+ if (reserved_word(current_token, "function")) {
23776
+ if (in_array(this._flags.last_token.text, ["}", ";"]) || this._output.just_added_newline() && !(in_array(this._flags.last_token.text, ["(", "[", "{", ":", "=", ","]) || this._flags.last_token.type === TOKEN.OPERATOR)) {
23777
+ if (!this._output.just_added_blankline() && !current_token.comments_before) {
23778
+ this.print_newline();
23779
+ this.print_newline(true);
23780
+ }
23781
+ }
23782
+ if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD) {
23783
+ if (reserved_array(this._flags.last_token, ["get", "set", "new", "export"]) || reserved_array(this._flags.last_token, newline_restricted_tokens)) {
23784
+ this._output.space_before_token = true;
23785
+ } else if (reserved_word(this._flags.last_token, "default") && this._last_last_text === "export") {
23786
+ this._output.space_before_token = true;
23787
+ } else if (this._flags.last_token.text === "declare") {
23788
+ this._output.space_before_token = true;
23789
+ } else {
23790
+ this.print_newline();
23791
+ }
23792
+ } else if (this._flags.last_token.type === TOKEN.OPERATOR || this._flags.last_token.text === "=") {
23793
+ this._output.space_before_token = true;
23794
+ } else if (!this._flags.multiline_frame && (is_expression(this._flags.mode) || is_array(this._flags.mode))) {
23795
+ } else {
23796
+ this.print_newline();
23797
+ }
23798
+ this.print_token(current_token);
23799
+ this._flags.last_word = current_token.text;
23800
+ return;
23801
+ }
23802
+ var prefix = "NONE";
23803
+ if (this._flags.last_token.type === TOKEN.END_BLOCK) {
23804
+ if (this._previous_flags.inline_frame) {
23805
+ prefix = "SPACE";
23806
+ } else if (!reserved_array(current_token, ["else", "catch", "finally", "from"])) {
23807
+ prefix = "NEWLINE";
23808
+ } else {
23809
+ if (this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && current_token.newlines) {
23810
+ prefix = "NEWLINE";
23811
+ } else {
23812
+ prefix = "SPACE";
23813
+ this._output.space_before_token = true;
23814
+ }
23815
+ }
23816
+ } else if (this._flags.last_token.type === TOKEN.SEMICOLON && this._flags.mode === MODE.BlockStatement) {
23817
+ prefix = "NEWLINE";
23818
+ } else if (this._flags.last_token.type === TOKEN.SEMICOLON && is_expression(this._flags.mode)) {
23819
+ prefix = "SPACE";
23820
+ } else if (this._flags.last_token.type === TOKEN.STRING) {
23821
+ prefix = "NEWLINE";
23822
+ } else if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD || this._flags.last_token.text === "*" && (in_array(this._last_last_text, ["function", "yield"]) || this._flags.mode === MODE.ObjectLiteral && in_array(this._last_last_text, ["{", ","]))) {
23823
+ prefix = "SPACE";
23824
+ } else if (this._flags.last_token.type === TOKEN.START_BLOCK) {
23825
+ if (this._flags.inline_frame) {
23826
+ prefix = "SPACE";
23827
+ } else {
23828
+ prefix = "NEWLINE";
23829
+ }
23830
+ } else if (this._flags.last_token.type === TOKEN.END_EXPR) {
23831
+ this._output.space_before_token = true;
23832
+ prefix = "NEWLINE";
23833
+ }
23834
+ if (reserved_array(current_token, line_starters) && this._flags.last_token.text !== ")") {
23835
+ if (this._flags.inline_frame || this._flags.last_token.text === "else" || this._flags.last_token.text === "export") {
23836
+ prefix = "SPACE";
23837
+ } else {
23838
+ prefix = "NEWLINE";
23839
+ }
23840
+ }
23841
+ if (reserved_array(current_token, ["else", "catch", "finally"])) {
23842
+ if ((!(this._flags.last_token.type === TOKEN.END_BLOCK && this._previous_flags.mode === MODE.BlockStatement) || this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && current_token.newlines) && !this._flags.inline_frame) {
23843
+ this.print_newline();
23844
+ } else {
23845
+ this._output.trim(true);
23846
+ var line = this._output.current_line;
23847
+ if (line.last() !== "}") {
23848
+ this.print_newline();
23849
+ }
23850
+ this._output.space_before_token = true;
23851
+ }
23852
+ } else if (prefix === "NEWLINE") {
23853
+ if (reserved_array(this._flags.last_token, special_words)) {
23854
+ this._output.space_before_token = true;
23855
+ } else if (this._flags.last_token.text === "declare" && reserved_array(current_token, ["var", "let", "const"])) {
23856
+ this._output.space_before_token = true;
23857
+ } else if (this._flags.last_token.type !== TOKEN.END_EXPR) {
23858
+ if ((this._flags.last_token.type !== TOKEN.START_EXPR || !reserved_array(current_token, ["var", "let", "const"])) && this._flags.last_token.text !== ":") {
23859
+ if (reserved_word(current_token, "if") && reserved_word(current_token.previous, "else")) {
23860
+ this._output.space_before_token = true;
23861
+ } else {
23862
+ this.print_newline();
23863
+ }
23864
+ }
23865
+ } else if (reserved_array(current_token, line_starters) && this._flags.last_token.text !== ")") {
23866
+ this.print_newline();
23867
+ }
23868
+ } else if (this._flags.multiline_frame && is_array(this._flags.mode) && this._flags.last_token.text === "," && this._last_last_text === "}") {
23869
+ this.print_newline();
23870
+ } else if (prefix === "SPACE") {
23871
+ this._output.space_before_token = true;
23872
+ }
23873
+ if (current_token.previous && (current_token.previous.type === TOKEN.WORD || current_token.previous.type === TOKEN.RESERVED)) {
23874
+ this._output.space_before_token = true;
23875
+ }
23876
+ this.print_token(current_token);
23877
+ this._flags.last_word = current_token.text;
23878
+ if (current_token.type === TOKEN.RESERVED) {
23879
+ if (current_token.text === "do") {
23880
+ this._flags.do_block = true;
23881
+ } else if (current_token.text === "if") {
23882
+ this._flags.if_block = true;
23883
+ } else if (current_token.text === "import") {
23884
+ this._flags.import_block = true;
23885
+ } else if (this._flags.import_block && reserved_word(current_token, "from")) {
23886
+ this._flags.import_block = false;
23887
+ }
23888
+ }
23889
+ };
23890
+ Beautifier.prototype.handle_semicolon = function(current_token) {
23891
+ if (this.start_of_statement(current_token)) {
23892
+ this._output.space_before_token = false;
23893
+ } else {
23894
+ this.handle_whitespace_and_comments(current_token);
23895
+ }
23896
+ var next_token = this._tokens.peek();
23897
+ while (this._flags.mode === MODE.Statement && !(this._flags.if_block && reserved_word(next_token, "else")) && !this._flags.do_block) {
23898
+ this.restore_mode();
23899
+ }
23900
+ if (this._flags.import_block) {
23901
+ this._flags.import_block = false;
23902
+ }
23903
+ this.print_token(current_token);
23904
+ };
23905
+ Beautifier.prototype.handle_string = function(current_token) {
23906
+ if (current_token.text.startsWith("`") && current_token.newlines === 0 && current_token.whitespace_before === "" && (current_token.previous.text === ")" || this._flags.last_token.type === TOKEN.WORD)) {
23907
+ } else if (this.start_of_statement(current_token)) {
23908
+ this._output.space_before_token = true;
23909
+ } else {
23910
+ this.handle_whitespace_and_comments(current_token);
23911
+ if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD || this._flags.inline_frame) {
23912
+ this._output.space_before_token = true;
23913
+ } else if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) {
23914
+ if (!this.start_of_object_property()) {
23915
+ this.allow_wrap_or_preserved_newline(current_token);
23916
+ }
23917
+ } else if (current_token.text.startsWith("`") && this._flags.last_token.type === TOKEN.END_EXPR && (current_token.previous.text === "]" || current_token.previous.text === ")") && current_token.newlines === 0) {
23918
+ this._output.space_before_token = true;
23919
+ } else {
23920
+ this.print_newline();
23921
+ }
23922
+ }
23923
+ this.print_token(current_token);
23924
+ };
23925
+ Beautifier.prototype.handle_equals = function(current_token) {
23926
+ if (this.start_of_statement(current_token)) {
23927
+ } else {
23928
+ this.handle_whitespace_and_comments(current_token);
23929
+ }
23930
+ if (this._flags.declaration_statement) {
23931
+ this._flags.declaration_assignment = true;
23932
+ }
23933
+ this._output.space_before_token = true;
23934
+ this.print_token(current_token);
23935
+ this._output.space_before_token = true;
23936
+ };
23937
+ Beautifier.prototype.handle_comma = function(current_token) {
23938
+ this.handle_whitespace_and_comments(current_token, true);
23939
+ this.print_token(current_token);
23940
+ this._output.space_before_token = true;
23941
+ if (this._flags.declaration_statement) {
23942
+ if (is_expression(this._flags.parent.mode)) {
23943
+ this._flags.declaration_assignment = false;
23944
+ }
23945
+ if (this._flags.declaration_assignment) {
23946
+ this._flags.declaration_assignment = false;
23947
+ this.print_newline(false, true);
23948
+ } else if (this._options.comma_first) {
23949
+ this.allow_wrap_or_preserved_newline(current_token);
23950
+ }
23951
+ } else if (this._flags.mode === MODE.ObjectLiteral || this._flags.mode === MODE.Statement && this._flags.parent.mode === MODE.ObjectLiteral) {
23952
+ if (this._flags.mode === MODE.Statement) {
23953
+ this.restore_mode();
23954
+ }
23955
+ if (!this._flags.inline_frame) {
23956
+ this.print_newline();
23957
+ }
23958
+ } else if (this._options.comma_first) {
23959
+ this.allow_wrap_or_preserved_newline(current_token);
23960
+ }
23961
+ };
23962
+ Beautifier.prototype.handle_operator = function(current_token) {
23963
+ var isGeneratorAsterisk = current_token.text === "*" && (reserved_array(this._flags.last_token, ["function", "yield"]) || in_array(this._flags.last_token.type, [TOKEN.START_BLOCK, TOKEN.COMMA, TOKEN.END_BLOCK, TOKEN.SEMICOLON]));
23964
+ var isUnary = in_array(current_token.text, ["-", "+"]) && (in_array(this._flags.last_token.type, [TOKEN.START_BLOCK, TOKEN.START_EXPR, TOKEN.EQUALS, TOKEN.OPERATOR]) || in_array(this._flags.last_token.text, line_starters) || this._flags.last_token.text === ",");
23965
+ if (this.start_of_statement(current_token)) {
23966
+ } else {
23967
+ var preserve_statement_flags = !isGeneratorAsterisk;
23968
+ this.handle_whitespace_and_comments(current_token, preserve_statement_flags);
23969
+ }
23970
+ if (reserved_array(this._flags.last_token, special_words)) {
23971
+ this._output.space_before_token = true;
23972
+ this.print_token(current_token);
23973
+ return;
23974
+ }
23975
+ if (current_token.text === "*" && this._flags.last_token.type === TOKEN.DOT) {
23976
+ this.print_token(current_token);
23977
+ return;
23978
+ }
23979
+ if (current_token.text === "::") {
23980
+ this.print_token(current_token);
23981
+ return;
23982
+ }
23983
+ if (this._flags.last_token.type === TOKEN.OPERATOR && in_array(this._options.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)) {
23984
+ this.allow_wrap_or_preserved_newline(current_token);
23985
+ }
23986
+ if (current_token.text === ":" && this._flags.in_case) {
23987
+ this.print_token(current_token);
23988
+ this._flags.in_case = false;
23989
+ this._flags.case_body = true;
23990
+ if (this._tokens.peek().type !== TOKEN.START_BLOCK) {
23991
+ this.indent();
23992
+ this.print_newline();
23993
+ this._flags.case_block = false;
23994
+ } else {
23995
+ this._flags.case_block = true;
23996
+ this._output.space_before_token = true;
23997
+ }
23998
+ return;
23999
+ }
24000
+ var space_before = true;
24001
+ var space_after = true;
24002
+ var in_ternary = false;
24003
+ if (current_token.text === ":") {
24004
+ if (this._flags.ternary_depth === 0) {
24005
+ space_before = false;
24006
+ } else {
24007
+ this._flags.ternary_depth -= 1;
24008
+ in_ternary = true;
24009
+ }
24010
+ } else if (current_token.text === "?") {
24011
+ this._flags.ternary_depth += 1;
24012
+ }
24013
+ if (!isUnary && !isGeneratorAsterisk && this._options.preserve_newlines && in_array(current_token.text, positionable_operators)) {
24014
+ var isColon = current_token.text === ":";
24015
+ var isTernaryColon = isColon && in_ternary;
24016
+ var isOtherColon = isColon && !in_ternary;
24017
+ switch (this._options.operator_position) {
24018
+ case OPERATOR_POSITION.before_newline:
24019
+ this._output.space_before_token = !isOtherColon;
24020
+ this.print_token(current_token);
24021
+ if (!isColon || isTernaryColon) {
24022
+ this.allow_wrap_or_preserved_newline(current_token);
24023
+ }
24024
+ this._output.space_before_token = true;
24025
+ return;
24026
+ case OPERATOR_POSITION.after_newline:
24027
+ this._output.space_before_token = true;
24028
+ if (!isColon || isTernaryColon) {
24029
+ if (this._tokens.peek().newlines) {
24030
+ this.print_newline(false, true);
24031
+ } else {
24032
+ this.allow_wrap_or_preserved_newline(current_token);
24033
+ }
24034
+ } else {
24035
+ this._output.space_before_token = false;
24036
+ }
24037
+ this.print_token(current_token);
24038
+ this._output.space_before_token = true;
24039
+ return;
24040
+ case OPERATOR_POSITION.preserve_newline:
24041
+ if (!isOtherColon) {
24042
+ this.allow_wrap_or_preserved_newline(current_token);
24043
+ }
24044
+ space_before = !(this._output.just_added_newline() || isOtherColon);
24045
+ this._output.space_before_token = space_before;
24046
+ this.print_token(current_token);
24047
+ this._output.space_before_token = true;
24048
+ return;
24049
+ }
24050
+ }
24051
+ if (isGeneratorAsterisk) {
24052
+ this.allow_wrap_or_preserved_newline(current_token);
24053
+ space_before = false;
24054
+ var next_token = this._tokens.peek();
24055
+ space_after = next_token && in_array(next_token.type, [TOKEN.WORD, TOKEN.RESERVED]);
24056
+ } else if (current_token.text === "...") {
24057
+ this.allow_wrap_or_preserved_newline(current_token);
24058
+ space_before = this._flags.last_token.type === TOKEN.START_BLOCK;
24059
+ space_after = false;
24060
+ } else if (in_array(current_token.text, ["--", "++", "!", "~"]) || isUnary) {
24061
+ if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR) {
24062
+ this.allow_wrap_or_preserved_newline(current_token);
24063
+ }
24064
+ space_before = false;
24065
+ space_after = false;
24066
+ if (current_token.newlines && (current_token.text === "--" || current_token.text === "++" || current_token.text === "~")) {
24067
+ this.print_newline(false, true);
24068
+ }
24069
+ if (this._flags.last_token.text === ";" && is_expression(this._flags.mode)) {
24070
+ space_before = true;
24071
+ }
24072
+ if (this._flags.last_token.type === TOKEN.RESERVED) {
24073
+ space_before = true;
24074
+ } else if (this._flags.last_token.type === TOKEN.END_EXPR) {
24075
+ space_before = !(this._flags.last_token.text === "]" && (current_token.text === "--" || current_token.text === "++"));
24076
+ } else if (this._flags.last_token.type === TOKEN.OPERATOR) {
24077
+ space_before = in_array(current_token.text, ["--", "-", "++", "+"]) && in_array(this._flags.last_token.text, ["--", "-", "++", "+"]);
24078
+ if (in_array(current_token.text, ["+", "-"]) && in_array(this._flags.last_token.text, ["--", "++"])) {
24079
+ space_after = true;
24080
+ }
24081
+ }
24082
+ if ((this._flags.mode === MODE.BlockStatement && !this._flags.inline_frame || this._flags.mode === MODE.Statement) && (this._flags.last_token.text === "{" || this._flags.last_token.text === ";")) {
24083
+ this.print_newline();
24084
+ }
24085
+ }
24086
+ this._output.space_before_token = this._output.space_before_token || space_before;
24087
+ this.print_token(current_token);
24088
+ this._output.space_before_token = space_after;
24089
+ };
24090
+ Beautifier.prototype.handle_block_comment = function(current_token, preserve_statement_flags) {
24091
+ if (this._output.raw) {
24092
+ this._output.add_raw_token(current_token);
24093
+ if (current_token.directives && current_token.directives.preserve === "end") {
24094
+ this._output.raw = this._options.test_output_raw;
24095
+ }
24096
+ return;
24097
+ }
24098
+ if (current_token.directives) {
24099
+ this.print_newline(false, preserve_statement_flags);
24100
+ this.print_token(current_token);
24101
+ if (current_token.directives.preserve === "start") {
24102
+ this._output.raw = true;
24103
+ }
24104
+ this.print_newline(false, true);
24105
+ return;
24106
+ }
24107
+ if (!acorn.newline.test(current_token.text) && !current_token.newlines) {
24108
+ this._output.space_before_token = true;
24109
+ this.print_token(current_token);
24110
+ this._output.space_before_token = true;
24111
+ return;
24112
+ } else {
24113
+ this.print_block_commment(current_token, preserve_statement_flags);
24114
+ }
24115
+ };
24116
+ Beautifier.prototype.print_block_commment = function(current_token, preserve_statement_flags) {
24117
+ var lines = split_linebreaks(current_token.text);
24118
+ var j;
24119
+ var javadoc = false;
24120
+ var starless = false;
24121
+ var lastIndent = current_token.whitespace_before;
24122
+ var lastIndentLength = lastIndent.length;
24123
+ this.print_newline(false, preserve_statement_flags);
24124
+ this.print_token_line_indentation(current_token);
24125
+ this._output.add_token(lines[0]);
24126
+ this.print_newline(false, preserve_statement_flags);
24127
+ if (lines.length > 1) {
24128
+ lines = lines.slice(1);
24129
+ javadoc = all_lines_start_with(lines, "*");
24130
+ starless = each_line_matches_indent(lines, lastIndent);
24131
+ if (javadoc) {
24132
+ this._flags.alignment = 1;
24133
+ }
24134
+ for (j = 0; j < lines.length; j++) {
24135
+ if (javadoc) {
24136
+ this.print_token_line_indentation(current_token);
24137
+ this._output.add_token(ltrim(lines[j]));
24138
+ } else if (starless && lines[j]) {
24139
+ this.print_token_line_indentation(current_token);
24140
+ this._output.add_token(lines[j].substring(lastIndentLength));
24141
+ } else {
24142
+ this._output.current_line.set_indent(-1);
24143
+ this._output.add_token(lines[j]);
24144
+ }
24145
+ this.print_newline(false, preserve_statement_flags);
24146
+ }
24147
+ this._flags.alignment = 0;
24148
+ }
24149
+ };
24150
+ Beautifier.prototype.handle_comment = function(current_token, preserve_statement_flags) {
24151
+ if (current_token.newlines) {
24152
+ this.print_newline(false, preserve_statement_flags);
24153
+ } else {
24154
+ this._output.trim(true);
24155
+ }
24156
+ this._output.space_before_token = true;
24157
+ this.print_token(current_token);
24158
+ this.print_newline(false, preserve_statement_flags);
24159
+ };
24160
+ Beautifier.prototype.handle_dot = function(current_token) {
24161
+ if (this.start_of_statement(current_token)) {
24162
+ } else {
24163
+ this.handle_whitespace_and_comments(current_token, true);
24164
+ }
24165
+ if (reserved_array(this._flags.last_token, special_words)) {
24166
+ this._output.space_before_token = false;
24167
+ } else {
24168
+ this.allow_wrap_or_preserved_newline(
24169
+ current_token,
24170
+ this._flags.last_token.text === ")" && this._options.break_chained_methods
24171
+ );
24172
+ }
24173
+ if (this._options.unindent_chained_methods && this._output.just_added_newline()) {
24174
+ this.deindent();
24175
+ }
24176
+ this.print_token(current_token);
24177
+ };
24178
+ Beautifier.prototype.handle_unknown = function(current_token, preserve_statement_flags) {
24179
+ this.print_token(current_token);
24180
+ if (current_token.text[current_token.text.length - 1] === "\n") {
24181
+ this.print_newline(false, preserve_statement_flags);
24182
+ }
24183
+ };
24184
+ Beautifier.prototype.handle_eof = function(current_token) {
24185
+ while (this._flags.mode === MODE.Statement) {
24186
+ this.restore_mode();
24187
+ }
24188
+ this.handle_whitespace_and_comments(current_token);
24189
+ };
24190
+ module2.exports.Beautifier = Beautifier;
24191
+ }
24192
+ });
24193
+
24194
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/index.js
24195
+ var require_javascript = __commonJS({
24196
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/javascript/index.js"(exports2, module2) {
24197
+ "use strict";
24198
+ var Beautifier = require_beautifier().Beautifier;
24199
+ var Options = require_options2().Options;
24200
+ function js_beautify2(js_source_text, options) {
24201
+ var beautifier = new Beautifier(js_source_text, options);
24202
+ return beautifier.beautify();
24203
+ }
24204
+ module2.exports = js_beautify2;
24205
+ module2.exports.defaultOptions = function() {
24206
+ return new Options();
24207
+ };
24208
+ }
24209
+ });
24210
+
24211
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/css/options.js
24212
+ var require_options3 = __commonJS({
24213
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/css/options.js"(exports2, module2) {
24214
+ "use strict";
24215
+ var BaseOptions = require_options().Options;
24216
+ function Options(options) {
24217
+ BaseOptions.call(this, options, "css");
24218
+ this.selector_separator_newline = this._get_boolean("selector_separator_newline", true);
24219
+ this.newline_between_rules = this._get_boolean("newline_between_rules", true);
24220
+ var space_around_selector_separator = this._get_boolean("space_around_selector_separator");
24221
+ this.space_around_combinator = this._get_boolean("space_around_combinator") || space_around_selector_separator;
24222
+ var brace_style_split = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
24223
+ this.brace_style = "collapse";
24224
+ for (var bs = 0; bs < brace_style_split.length; bs++) {
24225
+ if (brace_style_split[bs] !== "expand") {
24226
+ this.brace_style = "collapse";
24227
+ } else {
24228
+ this.brace_style = brace_style_split[bs];
24229
+ }
24230
+ }
24231
+ }
24232
+ Options.prototype = new BaseOptions();
24233
+ module2.exports.Options = Options;
24234
+ }
24235
+ });
24236
+
24237
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/css/beautifier.js
24238
+ var require_beautifier2 = __commonJS({
24239
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/css/beautifier.js"(exports2, module2) {
24240
+ "use strict";
24241
+ var Options = require_options3().Options;
24242
+ var Output = require_output().Output;
24243
+ var InputScanner = require_inputscanner().InputScanner;
24244
+ var Directives = require_directives().Directives;
24245
+ var directives_core = new Directives(/\/\*/, /\*\//);
24246
+ var lineBreak = /\r\n|[\r\n]/;
24247
+ var allLineBreaks = /\r\n|[\r\n]/g;
24248
+ var whitespaceChar = /\s/;
24249
+ var whitespacePattern = /(?:\s|\n)+/g;
24250
+ var block_comment_pattern = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g;
24251
+ var comment_pattern = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
24252
+ function Beautifier(source_text, options) {
24253
+ this._source_text = source_text || "";
24254
+ this._options = new Options(options);
24255
+ this._ch = null;
24256
+ this._input = null;
24257
+ this.NESTED_AT_RULE = {
24258
+ "@page": true,
24259
+ "@font-face": true,
24260
+ "@keyframes": true,
24261
+ // also in CONDITIONAL_GROUP_RULE below
24262
+ "@media": true,
24263
+ "@supports": true,
24264
+ "@document": true
24265
+ };
24266
+ this.CONDITIONAL_GROUP_RULE = {
24267
+ "@media": true,
24268
+ "@supports": true,
24269
+ "@document": true
24270
+ };
24271
+ this.NON_SEMICOLON_NEWLINE_PROPERTY = [
24272
+ "grid-template"
24273
+ ];
24274
+ }
24275
+ Beautifier.prototype.eatString = function(endChars) {
24276
+ var result = "";
24277
+ this._ch = this._input.next();
24278
+ while (this._ch) {
24279
+ result += this._ch;
24280
+ if (this._ch === "\\") {
24281
+ result += this._input.next();
24282
+ } else if (endChars.indexOf(this._ch) !== -1 || this._ch === "\n") {
24283
+ break;
24284
+ }
24285
+ this._ch = this._input.next();
24286
+ }
24287
+ return result;
24288
+ };
24289
+ Beautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) {
24290
+ var result = whitespaceChar.test(this._input.peek());
24291
+ var newline_count = 0;
24292
+ while (whitespaceChar.test(this._input.peek())) {
24293
+ this._ch = this._input.next();
24294
+ if (allowAtLeastOneNewLine && this._ch === "\n") {
24295
+ if (newline_count === 0 || newline_count < this._options.max_preserve_newlines) {
24296
+ newline_count++;
24297
+ this._output.add_new_line(true);
24298
+ }
24299
+ }
24300
+ }
24301
+ return result;
24302
+ };
24303
+ Beautifier.prototype.foundNestedPseudoClass = function() {
24304
+ var openParen = 0;
24305
+ var i = 1;
24306
+ var ch = this._input.peek(i);
24307
+ while (ch) {
24308
+ if (ch === "{") {
24309
+ return true;
24310
+ } else if (ch === "(") {
24311
+ openParen += 1;
24312
+ } else if (ch === ")") {
24313
+ if (openParen === 0) {
24314
+ return false;
24315
+ }
24316
+ openParen -= 1;
24317
+ } else if (ch === ";" || ch === "}") {
24318
+ return false;
24319
+ }
24320
+ i++;
24321
+ ch = this._input.peek(i);
24322
+ }
24323
+ return false;
24324
+ };
24325
+ Beautifier.prototype.print_string = function(output_string) {
24326
+ this._output.set_indent(this._indentLevel);
24327
+ this._output.non_breaking_space = true;
24328
+ this._output.add_token(output_string);
24329
+ };
24330
+ Beautifier.prototype.preserveSingleSpace = function(isAfterSpace) {
24331
+ if (isAfterSpace) {
24332
+ this._output.space_before_token = true;
24333
+ }
24334
+ };
24335
+ Beautifier.prototype.indent = function() {
24336
+ this._indentLevel++;
24337
+ };
24338
+ Beautifier.prototype.outdent = function() {
24339
+ if (this._indentLevel > 0) {
24340
+ this._indentLevel--;
24341
+ }
24342
+ };
24343
+ Beautifier.prototype.beautify = function() {
24344
+ if (this._options.disabled) {
24345
+ return this._source_text;
24346
+ }
24347
+ var source_text = this._source_text;
24348
+ var eol = this._options.eol;
24349
+ if (eol === "auto") {
24350
+ eol = "\n";
24351
+ if (source_text && lineBreak.test(source_text || "")) {
24352
+ eol = source_text.match(lineBreak)[0];
24353
+ }
24354
+ }
24355
+ source_text = source_text.replace(allLineBreaks, "\n");
24356
+ var baseIndentString = source_text.match(/^[\t ]*/)[0];
24357
+ this._output = new Output(this._options, baseIndentString);
24358
+ this._input = new InputScanner(source_text);
24359
+ this._indentLevel = 0;
24360
+ this._nestedLevel = 0;
24361
+ this._ch = null;
24362
+ var parenLevel = 0;
24363
+ var insideRule = false;
24364
+ var insidePropertyValue = false;
24365
+ var enteringConditionalGroup = false;
24366
+ var insideAtExtend = false;
24367
+ var insideAtImport = false;
24368
+ var insideScssMap = false;
24369
+ var topCharacter = this._ch;
24370
+ var insideNonSemiColonValues = false;
24371
+ var whitespace;
24372
+ var isAfterSpace;
24373
+ var previous_ch;
24374
+ while (true) {
24375
+ whitespace = this._input.read(whitespacePattern);
24376
+ isAfterSpace = whitespace !== "";
24377
+ previous_ch = topCharacter;
24378
+ this._ch = this._input.next();
24379
+ if (this._ch === "\\" && this._input.hasNext()) {
24380
+ this._ch += this._input.next();
24381
+ }
24382
+ topCharacter = this._ch;
24383
+ if (!this._ch) {
24384
+ break;
24385
+ } else if (this._ch === "/" && this._input.peek() === "*") {
24386
+ this._output.add_new_line();
24387
+ this._input.back();
24388
+ var comment = this._input.read(block_comment_pattern);
24389
+ var directives = directives_core.get_directives(comment);
24390
+ if (directives && directives.ignore === "start") {
24391
+ comment += directives_core.readIgnored(this._input);
24392
+ }
24393
+ this.print_string(comment);
24394
+ this.eatWhitespace(true);
24395
+ this._output.add_new_line();
24396
+ } else if (this._ch === "/" && this._input.peek() === "/") {
24397
+ this._output.space_before_token = true;
24398
+ this._input.back();
24399
+ this.print_string(this._input.read(comment_pattern));
24400
+ this.eatWhitespace(true);
24401
+ } else if (this._ch === "@" || this._ch === "$") {
24402
+ this.preserveSingleSpace(isAfterSpace);
24403
+ if (this._input.peek() === "{") {
24404
+ this.print_string(this._ch + this.eatString("}"));
24405
+ } else {
24406
+ this.print_string(this._ch);
24407
+ var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
24408
+ if (variableOrRule.match(/[ :]$/)) {
24409
+ variableOrRule = this.eatString(": ").replace(/\s$/, "");
24410
+ this.print_string(variableOrRule);
24411
+ this._output.space_before_token = true;
24412
+ }
24413
+ variableOrRule = variableOrRule.replace(/\s$/, "");
24414
+ if (variableOrRule === "extend") {
24415
+ insideAtExtend = true;
24416
+ } else if (variableOrRule === "import") {
24417
+ insideAtImport = true;
24418
+ }
24419
+ if (variableOrRule in this.NESTED_AT_RULE) {
24420
+ this._nestedLevel += 1;
24421
+ if (variableOrRule in this.CONDITIONAL_GROUP_RULE) {
24422
+ enteringConditionalGroup = true;
24423
+ }
24424
+ } else if (!insideRule && parenLevel === 0 && variableOrRule.indexOf(":") !== -1) {
24425
+ insidePropertyValue = true;
24426
+ this.indent();
24427
+ }
24428
+ }
24429
+ } else if (this._ch === "#" && this._input.peek() === "{") {
24430
+ this.preserveSingleSpace(isAfterSpace);
24431
+ this.print_string(this._ch + this.eatString("}"));
24432
+ } else if (this._ch === "{") {
24433
+ if (insidePropertyValue) {
24434
+ insidePropertyValue = false;
24435
+ this.outdent();
24436
+ }
24437
+ if (enteringConditionalGroup) {
24438
+ enteringConditionalGroup = false;
24439
+ insideRule = this._indentLevel >= this._nestedLevel;
24440
+ } else {
24441
+ insideRule = this._indentLevel >= this._nestedLevel - 1;
24442
+ }
24443
+ if (this._options.newline_between_rules && insideRule) {
24444
+ if (this._output.previous_line && this._output.previous_line.item(-1) !== "{") {
24445
+ this._output.ensure_empty_line_above("/", ",");
24446
+ }
24447
+ }
24448
+ this._output.space_before_token = true;
24449
+ if (this._options.brace_style === "expand") {
24450
+ this._output.add_new_line();
24451
+ this.print_string(this._ch);
24452
+ this.indent();
24453
+ this._output.set_indent(this._indentLevel);
24454
+ } else {
24455
+ if (previous_ch === "(") {
24456
+ this._output.space_before_token = false;
24457
+ } else if (previous_ch !== ",") {
24458
+ this.indent();
24459
+ }
24460
+ this.print_string(this._ch);
24461
+ }
24462
+ this.eatWhitespace(true);
24463
+ this._output.add_new_line();
24464
+ } else if (this._ch === "}") {
24465
+ this.outdent();
24466
+ this._output.add_new_line();
24467
+ if (previous_ch === "{") {
24468
+ this._output.trim(true);
24469
+ }
24470
+ insideAtImport = false;
24471
+ insideAtExtend = false;
24472
+ if (insidePropertyValue) {
24473
+ this.outdent();
24474
+ insidePropertyValue = false;
24475
+ }
24476
+ this.print_string(this._ch);
24477
+ insideRule = false;
24478
+ if (this._nestedLevel) {
24479
+ this._nestedLevel--;
24480
+ }
24481
+ this.eatWhitespace(true);
24482
+ this._output.add_new_line();
24483
+ if (this._options.newline_between_rules && !this._output.just_added_blankline()) {
24484
+ if (this._input.peek() !== "}") {
24485
+ this._output.add_new_line(true);
24486
+ }
24487
+ }
24488
+ if (this._input.peek() === ")") {
24489
+ this._output.trim(true);
24490
+ if (this._options.brace_style === "expand") {
24491
+ this._output.add_new_line(true);
24492
+ }
24493
+ }
24494
+ } else if (this._ch === ":") {
24495
+ for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) {
24496
+ if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) {
24497
+ insideNonSemiColonValues = true;
24498
+ break;
24499
+ }
24500
+ }
24501
+ if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) {
24502
+ this.print_string(":");
24503
+ if (!insidePropertyValue) {
24504
+ insidePropertyValue = true;
24505
+ this._output.space_before_token = true;
24506
+ this.eatWhitespace(true);
24507
+ this.indent();
24508
+ }
24509
+ } else {
24510
+ if (this._input.lookBack(" ")) {
24511
+ this._output.space_before_token = true;
24512
+ }
24513
+ if (this._input.peek() === ":") {
24514
+ this._ch = this._input.next();
24515
+ this.print_string("::");
24516
+ } else {
24517
+ this.print_string(":");
24518
+ }
24519
+ }
24520
+ } else if (this._ch === '"' || this._ch === "'") {
24521
+ this.preserveSingleSpace(isAfterSpace);
24522
+ this.print_string(this._ch + this.eatString(this._ch));
24523
+ this.eatWhitespace(true);
24524
+ } else if (this._ch === ";") {
24525
+ insideNonSemiColonValues = false;
24526
+ if (parenLevel === 0) {
24527
+ if (insidePropertyValue) {
24528
+ this.outdent();
24529
+ insidePropertyValue = false;
24530
+ }
24531
+ insideAtExtend = false;
24532
+ insideAtImport = false;
24533
+ this.print_string(this._ch);
24534
+ this.eatWhitespace(true);
24535
+ if (this._input.peek() !== "/") {
24536
+ this._output.add_new_line();
24537
+ }
24538
+ } else {
24539
+ this.print_string(this._ch);
24540
+ this.eatWhitespace(true);
24541
+ this._output.space_before_token = true;
24542
+ }
24543
+ } else if (this._ch === "(") {
24544
+ if (this._input.lookBack("url")) {
24545
+ this.print_string(this._ch);
24546
+ this.eatWhitespace();
24547
+ parenLevel++;
24548
+ this.indent();
24549
+ this._ch = this._input.next();
24550
+ if (this._ch === ")" || this._ch === '"' || this._ch === "'") {
24551
+ this._input.back();
24552
+ } else if (this._ch) {
24553
+ this.print_string(this._ch + this.eatString(")"));
24554
+ if (parenLevel) {
24555
+ parenLevel--;
24556
+ this.outdent();
24557
+ }
24558
+ }
24559
+ } else {
24560
+ this.preserveSingleSpace(isAfterSpace);
24561
+ this.print_string(this._ch);
24562
+ if (insidePropertyValue && previous_ch === "$" && this._options.selector_separator_newline) {
24563
+ this._output.add_new_line();
24564
+ insideScssMap = true;
24565
+ } else {
24566
+ this.eatWhitespace();
24567
+ parenLevel++;
24568
+ this.indent();
24569
+ }
24570
+ }
24571
+ } else if (this._ch === ")") {
24572
+ if (parenLevel) {
24573
+ parenLevel--;
24574
+ this.outdent();
24575
+ }
24576
+ if (insideScssMap && this._input.peek() === ";" && this._options.selector_separator_newline) {
24577
+ insideScssMap = false;
24578
+ this.outdent();
24579
+ this._output.add_new_line();
24580
+ }
24581
+ this.print_string(this._ch);
24582
+ } else if (this._ch === ",") {
24583
+ this.print_string(this._ch);
24584
+ this.eatWhitespace(true);
24585
+ if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideAtImport && !insideAtExtend) {
24586
+ this._output.add_new_line();
24587
+ } else {
24588
+ this._output.space_before_token = true;
24589
+ }
24590
+ } else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !insidePropertyValue && parenLevel === 0) {
24591
+ if (this._options.space_around_combinator) {
24592
+ this._output.space_before_token = true;
24593
+ this.print_string(this._ch);
24594
+ this._output.space_before_token = true;
24595
+ } else {
24596
+ this.print_string(this._ch);
24597
+ this.eatWhitespace();
24598
+ if (this._ch && whitespaceChar.test(this._ch)) {
24599
+ this._ch = "";
24600
+ }
24601
+ }
24602
+ } else if (this._ch === "]") {
24603
+ this.print_string(this._ch);
24604
+ } else if (this._ch === "[") {
24605
+ this.preserveSingleSpace(isAfterSpace);
24606
+ this.print_string(this._ch);
24607
+ } else if (this._ch === "=") {
24608
+ this.eatWhitespace();
24609
+ this.print_string("=");
24610
+ if (whitespaceChar.test(this._ch)) {
24611
+ this._ch = "";
24612
+ }
24613
+ } else if (this._ch === "!" && !this._input.lookBack("\\")) {
24614
+ this.print_string(" ");
24615
+ this.print_string(this._ch);
24616
+ } else {
24617
+ var preserveAfterSpace = previous_ch === '"' || previous_ch === "'";
24618
+ this.preserveSingleSpace(preserveAfterSpace || isAfterSpace);
24619
+ this.print_string(this._ch);
24620
+ if (!this._output.just_added_newline() && this._input.peek() === "\n" && insideNonSemiColonValues) {
24621
+ this._output.add_new_line();
24622
+ }
24623
+ }
24624
+ }
24625
+ var sweetCode = this._output.get_code(eol);
24626
+ return sweetCode;
24627
+ };
24628
+ module2.exports.Beautifier = Beautifier;
24629
+ }
24630
+ });
24631
+
24632
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/css/index.js
24633
+ var require_css = __commonJS({
24634
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/css/index.js"(exports2, module2) {
24635
+ "use strict";
24636
+ var Beautifier = require_beautifier2().Beautifier;
24637
+ var Options = require_options3().Options;
24638
+ function css_beautify(source_text, options) {
24639
+ var beautifier = new Beautifier(source_text, options);
24640
+ return beautifier.beautify();
24641
+ }
24642
+ module2.exports = css_beautify;
24643
+ module2.exports.defaultOptions = function() {
24644
+ return new Options();
24645
+ };
24646
+ }
24647
+ });
24648
+
24649
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/html/options.js
24650
+ var require_options4 = __commonJS({
24651
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/html/options.js"(exports2, module2) {
24652
+ "use strict";
24653
+ var BaseOptions = require_options().Options;
24654
+ function Options(options) {
24655
+ BaseOptions.call(this, options, "html");
24656
+ if (this.templating.length === 1 && this.templating[0] === "auto") {
24657
+ this.templating = ["django", "erb", "handlebars", "php"];
24658
+ }
24659
+ this.indent_inner_html = this._get_boolean("indent_inner_html");
24660
+ this.indent_body_inner_html = this._get_boolean("indent_body_inner_html", true);
24661
+ this.indent_head_inner_html = this._get_boolean("indent_head_inner_html", true);
24662
+ this.indent_handlebars = this._get_boolean("indent_handlebars", true);
24663
+ this.wrap_attributes = this._get_selection(
24664
+ "wrap_attributes",
24665
+ ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
24666
+ );
24667
+ this.wrap_attributes_indent_size = this._get_number("wrap_attributes_indent_size", this.indent_size);
24668
+ this.extra_liners = this._get_array("extra_liners", ["head", "body", "/html"]);
24669
+ this.inline = this._get_array("inline", [
24670
+ "a",
24671
+ "abbr",
24672
+ "area",
24673
+ "audio",
24674
+ "b",
24675
+ "bdi",
24676
+ "bdo",
24677
+ "br",
24678
+ "button",
24679
+ "canvas",
24680
+ "cite",
24681
+ "code",
24682
+ "data",
24683
+ "datalist",
24684
+ "del",
24685
+ "dfn",
24686
+ "em",
24687
+ "embed",
24688
+ "i",
24689
+ "iframe",
24690
+ "img",
24691
+ "input",
24692
+ "ins",
24693
+ "kbd",
24694
+ "keygen",
24695
+ "label",
24696
+ "map",
24697
+ "mark",
24698
+ "math",
24699
+ "meter",
24700
+ "noscript",
24701
+ "object",
24702
+ "output",
24703
+ "progress",
24704
+ "q",
24705
+ "ruby",
24706
+ "s",
24707
+ "samp",
24708
+ /* 'script', */
24709
+ "select",
24710
+ "small",
24711
+ "span",
24712
+ "strong",
24713
+ "sub",
24714
+ "sup",
24715
+ "svg",
24716
+ "template",
24717
+ "textarea",
24718
+ "time",
24719
+ "u",
24720
+ "var",
24721
+ "video",
24722
+ "wbr",
24723
+ "text",
24724
+ // obsolete inline tags
24725
+ "acronym",
24726
+ "big",
24727
+ "strike",
24728
+ "tt"
24729
+ ]);
24730
+ this.void_elements = this._get_array("void_elements", [
24731
+ // HTLM void elements - aka self-closing tags - aka singletons
24732
+ // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
24733
+ "area",
24734
+ "base",
24735
+ "br",
24736
+ "col",
24737
+ "embed",
24738
+ "hr",
24739
+ "img",
24740
+ "input",
24741
+ "keygen",
24742
+ "link",
24743
+ "menuitem",
24744
+ "meta",
24745
+ "param",
24746
+ "source",
24747
+ "track",
24748
+ "wbr",
24749
+ // NOTE: Optional tags are too complex for a simple list
24750
+ // they are hard coded in _do_optional_end_element
24751
+ // Doctype and xml elements
24752
+ "!doctype",
24753
+ "?xml",
24754
+ // obsolete tags
24755
+ // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
24756
+ // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
24757
+ "basefont",
24758
+ "isindex"
24759
+ ]);
24760
+ this.unformatted = this._get_array("unformatted", []);
24761
+ this.content_unformatted = this._get_array("content_unformatted", [
24762
+ "pre",
24763
+ "textarea"
24764
+ ]);
24765
+ this.unformatted_content_delimiter = this._get_characters("unformatted_content_delimiter");
24766
+ this.indent_scripts = this._get_selection("indent_scripts", ["normal", "keep", "separate"]);
24767
+ }
24768
+ Options.prototype = new BaseOptions();
24769
+ module2.exports.Options = Options;
24770
+ }
24771
+ });
24772
+
24773
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/html/tokenizer.js
24774
+ var require_tokenizer3 = __commonJS({
24775
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/html/tokenizer.js"(exports2, module2) {
24776
+ "use strict";
24777
+ var BaseTokenizer = require_tokenizer().Tokenizer;
24778
+ var BASETOKEN = require_tokenizer().TOKEN;
24779
+ var Directives = require_directives().Directives;
24780
+ var TemplatablePattern = require_templatablepattern().TemplatablePattern;
24781
+ var Pattern = require_pattern2().Pattern;
24782
+ var TOKEN = {
24783
+ TAG_OPEN: "TK_TAG_OPEN",
24784
+ TAG_CLOSE: "TK_TAG_CLOSE",
24785
+ ATTRIBUTE: "TK_ATTRIBUTE",
24786
+ EQUALS: "TK_EQUALS",
24787
+ VALUE: "TK_VALUE",
24788
+ COMMENT: "TK_COMMENT",
24789
+ TEXT: "TK_TEXT",
24790
+ UNKNOWN: "TK_UNKNOWN",
24791
+ START: BASETOKEN.START,
24792
+ RAW: BASETOKEN.RAW,
24793
+ EOF: BASETOKEN.EOF
24794
+ };
24795
+ var directives_core = new Directives(/<\!--/, /-->/);
24796
+ var Tokenizer = function(input_string, options) {
24797
+ BaseTokenizer.call(this, input_string, options);
24798
+ this._current_tag_name = "";
24799
+ var templatable_reader = new TemplatablePattern(this._input).read_options(this._options);
24800
+ var pattern_reader = new Pattern(this._input);
24801
+ this.__patterns = {
24802
+ word: templatable_reader.until(/[\n\r\t <]/),
24803
+ single_quote: templatable_reader.until_after(/'/),
24804
+ double_quote: templatable_reader.until_after(/"/),
24805
+ attribute: templatable_reader.until(/[\n\r\t =>]|\/>/),
24806
+ element_name: templatable_reader.until(/[\n\r\t >\/]/),
24807
+ handlebars_comment: pattern_reader.starting_with(/{{!--/).until_after(/--}}/),
24808
+ handlebars: pattern_reader.starting_with(/{{/).until_after(/}}/),
24809
+ handlebars_open: pattern_reader.until(/[\n\r\t }]/),
24810
+ handlebars_raw_close: pattern_reader.until(/}}/),
24811
+ comment: pattern_reader.starting_with(/<!--/).until_after(/-->/),
24812
+ cdata: pattern_reader.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
24813
+ // https://en.wikipedia.org/wiki/Conditional_comment
24814
+ conditional_comment: pattern_reader.starting_with(/<!\[/).until_after(/]>/),
24815
+ processing: pattern_reader.starting_with(/<\?/).until_after(/\?>/)
24816
+ };
24817
+ if (this._options.indent_handlebars) {
24818
+ this.__patterns.word = this.__patterns.word.exclude("handlebars");
24819
+ }
24820
+ this._unformatted_content_delimiter = null;
24821
+ if (this._options.unformatted_content_delimiter) {
24822
+ var literal_regexp = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
24823
+ this.__patterns.unformatted_content_delimiter = pattern_reader.matching(literal_regexp).until_after(literal_regexp);
24824
+ }
24825
+ };
24826
+ Tokenizer.prototype = new BaseTokenizer();
24827
+ Tokenizer.prototype._is_comment = function(current_token) {
24828
+ return false;
24829
+ };
24830
+ Tokenizer.prototype._is_opening = function(current_token) {
24831
+ return current_token.type === TOKEN.TAG_OPEN;
24832
+ };
24833
+ Tokenizer.prototype._is_closing = function(current_token, open_token) {
24834
+ return current_token.type === TOKEN.TAG_CLOSE && (open_token && ((current_token.text === ">" || current_token.text === "/>") && open_token.text[0] === "<" || current_token.text === "}}" && open_token.text[0] === "{" && open_token.text[1] === "{"));
24835
+ };
24836
+ Tokenizer.prototype._reset = function() {
24837
+ this._current_tag_name = "";
24838
+ };
24839
+ Tokenizer.prototype._get_next_token = function(previous_token, open_token) {
24840
+ var token = null;
24841
+ this._readWhitespace();
24842
+ var c = this._input.peek();
24843
+ if (c === null) {
24844
+ return this._create_token(TOKEN.EOF, "");
24845
+ }
24846
+ token = token || this._read_open_handlebars(c, open_token);
24847
+ token = token || this._read_attribute(c, previous_token, open_token);
24848
+ token = token || this._read_close(c, open_token);
24849
+ token = token || this._read_raw_content(c, previous_token, open_token);
24850
+ token = token || this._read_content_word(c);
24851
+ token = token || this._read_comment_or_cdata(c);
24852
+ token = token || this._read_processing(c);
24853
+ token = token || this._read_open(c, open_token);
24854
+ token = token || this._create_token(TOKEN.UNKNOWN, this._input.next());
24855
+ return token;
24856
+ };
24857
+ Tokenizer.prototype._read_comment_or_cdata = function(c) {
24858
+ var token = null;
24859
+ var resulting_string = null;
24860
+ var directives = null;
24861
+ if (c === "<") {
24862
+ var peek1 = this._input.peek(1);
24863
+ if (peek1 === "!") {
24864
+ resulting_string = this.__patterns.comment.read();
24865
+ if (resulting_string) {
24866
+ directives = directives_core.get_directives(resulting_string);
24867
+ if (directives && directives.ignore === "start") {
24868
+ resulting_string += directives_core.readIgnored(this._input);
24869
+ }
24870
+ } else {
24871
+ resulting_string = this.__patterns.cdata.read();
24872
+ }
24873
+ }
24874
+ if (resulting_string) {
24875
+ token = this._create_token(TOKEN.COMMENT, resulting_string);
24876
+ token.directives = directives;
24877
+ }
24878
+ }
24879
+ return token;
24880
+ };
24881
+ Tokenizer.prototype._read_processing = function(c) {
24882
+ var token = null;
24883
+ var resulting_string = null;
24884
+ var directives = null;
24885
+ if (c === "<") {
24886
+ var peek1 = this._input.peek(1);
24887
+ if (peek1 === "!" || peek1 === "?") {
24888
+ resulting_string = this.__patterns.conditional_comment.read();
24889
+ resulting_string = resulting_string || this.__patterns.processing.read();
24890
+ }
24891
+ if (resulting_string) {
24892
+ token = this._create_token(TOKEN.COMMENT, resulting_string);
24893
+ token.directives = directives;
24894
+ }
24895
+ }
24896
+ return token;
24897
+ };
24898
+ Tokenizer.prototype._read_open = function(c, open_token) {
24899
+ var resulting_string = null;
24900
+ var token = null;
24901
+ if (!open_token) {
24902
+ if (c === "<") {
24903
+ resulting_string = this._input.next();
24904
+ if (this._input.peek() === "/") {
24905
+ resulting_string += this._input.next();
24906
+ }
24907
+ resulting_string += this.__patterns.element_name.read();
24908
+ token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
24909
+ }
24910
+ }
24911
+ return token;
24912
+ };
24913
+ Tokenizer.prototype._read_open_handlebars = function(c, open_token) {
24914
+ var resulting_string = null;
24915
+ var token = null;
24916
+ if (!open_token) {
24917
+ if (this._options.indent_handlebars && c === "{" && this._input.peek(1) === "{") {
24918
+ if (this._input.peek(2) === "!") {
24919
+ resulting_string = this.__patterns.handlebars_comment.read();
24920
+ resulting_string = resulting_string || this.__patterns.handlebars.read();
24921
+ token = this._create_token(TOKEN.COMMENT, resulting_string);
24922
+ } else {
24923
+ resulting_string = this.__patterns.handlebars_open.read();
24924
+ token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
24925
+ }
24926
+ }
24927
+ }
24928
+ return token;
24929
+ };
24930
+ Tokenizer.prototype._read_close = function(c, open_token) {
24931
+ var resulting_string = null;
24932
+ var token = null;
24933
+ if (open_token) {
24934
+ if (open_token.text[0] === "<" && (c === ">" || c === "/" && this._input.peek(1) === ">")) {
24935
+ resulting_string = this._input.next();
24936
+ if (c === "/") {
24937
+ resulting_string += this._input.next();
24938
+ }
24939
+ token = this._create_token(TOKEN.TAG_CLOSE, resulting_string);
24940
+ } else if (open_token.text[0] === "{" && c === "}" && this._input.peek(1) === "}") {
24941
+ this._input.next();
24942
+ this._input.next();
24943
+ token = this._create_token(TOKEN.TAG_CLOSE, "}}");
24944
+ }
24945
+ }
24946
+ return token;
24947
+ };
24948
+ Tokenizer.prototype._read_attribute = function(c, previous_token, open_token) {
24949
+ var token = null;
24950
+ var resulting_string = "";
24951
+ if (open_token && open_token.text[0] === "<") {
24952
+ if (c === "=") {
24953
+ token = this._create_token(TOKEN.EQUALS, this._input.next());
24954
+ } else if (c === '"' || c === "'") {
24955
+ var content = this._input.next();
24956
+ if (c === '"') {
24957
+ content += this.__patterns.double_quote.read();
24958
+ } else {
24959
+ content += this.__patterns.single_quote.read();
24960
+ }
24961
+ token = this._create_token(TOKEN.VALUE, content);
24962
+ } else {
24963
+ resulting_string = this.__patterns.attribute.read();
24964
+ if (resulting_string) {
24965
+ if (previous_token.type === TOKEN.EQUALS) {
24966
+ token = this._create_token(TOKEN.VALUE, resulting_string);
24967
+ } else {
24968
+ token = this._create_token(TOKEN.ATTRIBUTE, resulting_string);
24969
+ }
24970
+ }
24971
+ }
24972
+ }
24973
+ return token;
24974
+ };
24975
+ Tokenizer.prototype._is_content_unformatted = function(tag_name) {
24976
+ return this._options.void_elements.indexOf(tag_name) === -1 && (this._options.content_unformatted.indexOf(tag_name) !== -1 || this._options.unformatted.indexOf(tag_name) !== -1);
24977
+ };
24978
+ Tokenizer.prototype._read_raw_content = function(c, previous_token, open_token) {
24979
+ var resulting_string = "";
24980
+ if (open_token && open_token.text[0] === "{") {
24981
+ resulting_string = this.__patterns.handlebars_raw_close.read();
24982
+ } else if (previous_token.type === TOKEN.TAG_CLOSE && previous_token.opened.text[0] === "<" && previous_token.text[0] !== "/") {
24983
+ var tag_name = previous_token.opened.text.substr(1).toLowerCase();
24984
+ if (tag_name === "script" || tag_name === "style") {
24985
+ var token = this._read_comment_or_cdata(c);
24986
+ if (token) {
24987
+ token.type = TOKEN.TEXT;
24988
+ return token;
24989
+ }
24990
+ resulting_string = this._input.readUntil(new RegExp("</" + tag_name + "[\\n\\r\\t ]*?>", "ig"));
24991
+ } else if (this._is_content_unformatted(tag_name)) {
24992
+ resulting_string = this._input.readUntil(new RegExp("</" + tag_name + "[\\n\\r\\t ]*?>", "ig"));
24993
+ }
24994
+ }
24995
+ if (resulting_string) {
24996
+ return this._create_token(TOKEN.TEXT, resulting_string);
24997
+ }
24998
+ return null;
24999
+ };
25000
+ Tokenizer.prototype._read_content_word = function(c) {
25001
+ var resulting_string = "";
25002
+ if (this._options.unformatted_content_delimiter) {
25003
+ if (c === this._options.unformatted_content_delimiter[0]) {
25004
+ resulting_string = this.__patterns.unformatted_content_delimiter.read();
25005
+ }
25006
+ }
25007
+ if (!resulting_string) {
25008
+ resulting_string = this.__patterns.word.read();
25009
+ }
25010
+ if (resulting_string) {
25011
+ return this._create_token(TOKEN.TEXT, resulting_string);
25012
+ }
25013
+ };
25014
+ module2.exports.Tokenizer = Tokenizer;
25015
+ module2.exports.TOKEN = TOKEN;
25016
+ }
25017
+ });
25018
+
25019
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/html/beautifier.js
25020
+ var require_beautifier3 = __commonJS({
25021
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/html/beautifier.js"(exports2, module2) {
25022
+ "use strict";
25023
+ var Options = require_options4().Options;
25024
+ var Output = require_output().Output;
25025
+ var Tokenizer = require_tokenizer3().Tokenizer;
25026
+ var TOKEN = require_tokenizer3().TOKEN;
25027
+ var lineBreak = /\r\n|[\r\n]/;
25028
+ var allLineBreaks = /\r\n|[\r\n]/g;
25029
+ var Printer3 = function(options, base_indent_string) {
25030
+ this.indent_level = 0;
25031
+ this.alignment_size = 0;
25032
+ this.max_preserve_newlines = options.max_preserve_newlines;
25033
+ this.preserve_newlines = options.preserve_newlines;
25034
+ this._output = new Output(options, base_indent_string);
25035
+ };
25036
+ Printer3.prototype.current_line_has_match = function(pattern) {
25037
+ return this._output.current_line.has_match(pattern);
25038
+ };
25039
+ Printer3.prototype.set_space_before_token = function(value, non_breaking) {
25040
+ this._output.space_before_token = value;
25041
+ this._output.non_breaking_space = non_breaking;
25042
+ };
25043
+ Printer3.prototype.set_wrap_point = function() {
25044
+ this._output.set_indent(this.indent_level, this.alignment_size);
25045
+ this._output.set_wrap_point();
25046
+ };
25047
+ Printer3.prototype.add_raw_token = function(token) {
25048
+ this._output.add_raw_token(token);
25049
+ };
25050
+ Printer3.prototype.print_preserved_newlines = function(raw_token) {
25051
+ var newlines = 0;
25052
+ if (raw_token.type !== TOKEN.TEXT && raw_token.previous.type !== TOKEN.TEXT) {
25053
+ newlines = raw_token.newlines ? 1 : 0;
25054
+ }
25055
+ if (this.preserve_newlines) {
25056
+ newlines = raw_token.newlines < this.max_preserve_newlines + 1 ? raw_token.newlines : this.max_preserve_newlines + 1;
25057
+ }
25058
+ for (var n2 = 0; n2 < newlines; n2++) {
25059
+ this.print_newline(n2 > 0);
25060
+ }
25061
+ return newlines !== 0;
25062
+ };
25063
+ Printer3.prototype.traverse_whitespace = function(raw_token) {
25064
+ if (raw_token.whitespace_before || raw_token.newlines) {
25065
+ if (!this.print_preserved_newlines(raw_token)) {
25066
+ this._output.space_before_token = true;
25067
+ }
25068
+ return true;
25069
+ }
25070
+ return false;
25071
+ };
25072
+ Printer3.prototype.previous_token_wrapped = function() {
25073
+ return this._output.previous_token_wrapped;
25074
+ };
25075
+ Printer3.prototype.print_newline = function(force) {
25076
+ this._output.add_new_line(force);
25077
+ };
25078
+ Printer3.prototype.print_token = function(token) {
25079
+ if (token.text) {
25080
+ this._output.set_indent(this.indent_level, this.alignment_size);
25081
+ this._output.add_token(token.text);
25082
+ }
25083
+ };
25084
+ Printer3.prototype.indent = function() {
25085
+ this.indent_level++;
25086
+ };
25087
+ Printer3.prototype.get_full_indent = function(level) {
25088
+ level = this.indent_level + (level || 0);
25089
+ if (level < 1) {
25090
+ return "";
25091
+ }
25092
+ return this._output.get_indent_string(level);
25093
+ };
25094
+ var get_type_attribute = function(start_token) {
25095
+ var result = null;
25096
+ var raw_token = start_token.next;
25097
+ while (raw_token.type !== TOKEN.EOF && start_token.closed !== raw_token) {
25098
+ if (raw_token.type === TOKEN.ATTRIBUTE && raw_token.text === "type") {
25099
+ if (raw_token.next && raw_token.next.type === TOKEN.EQUALS && raw_token.next.next && raw_token.next.next.type === TOKEN.VALUE) {
25100
+ result = raw_token.next.next.text;
25101
+ }
25102
+ break;
25103
+ }
25104
+ raw_token = raw_token.next;
25105
+ }
25106
+ return result;
25107
+ };
25108
+ var get_custom_beautifier_name = function(tag_check, raw_token) {
25109
+ var typeAttribute = null;
25110
+ var result = null;
25111
+ if (!raw_token.closed) {
25112
+ return null;
25113
+ }
25114
+ if (tag_check === "script") {
25115
+ typeAttribute = "text/javascript";
25116
+ } else if (tag_check === "style") {
25117
+ typeAttribute = "text/css";
25118
+ }
25119
+ typeAttribute = get_type_attribute(raw_token) || typeAttribute;
25120
+ if (typeAttribute.search("text/css") > -1) {
25121
+ result = "css";
25122
+ } else if (typeAttribute.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1) {
25123
+ result = "javascript";
25124
+ } else if (typeAttribute.search(/(text|application|dojo)\/(x-)?(html)/) > -1) {
25125
+ result = "html";
25126
+ } else if (typeAttribute.search(/test\/null/) > -1) {
25127
+ result = "null";
25128
+ }
25129
+ return result;
25130
+ };
25131
+ function in_array(what, arr) {
25132
+ return arr.indexOf(what) !== -1;
25133
+ }
25134
+ function TagFrame(parent, parser_token, indent_level) {
25135
+ this.parent = parent || null;
25136
+ this.tag = parser_token ? parser_token.tag_name : "";
25137
+ this.indent_level = indent_level || 0;
25138
+ this.parser_token = parser_token || null;
25139
+ }
25140
+ function TagStack(printer) {
25141
+ this._printer = printer;
25142
+ this._current_frame = null;
25143
+ }
25144
+ TagStack.prototype.get_parser_token = function() {
25145
+ return this._current_frame ? this._current_frame.parser_token : null;
25146
+ };
25147
+ TagStack.prototype.record_tag = function(parser_token) {
25148
+ var new_frame = new TagFrame(this._current_frame, parser_token, this._printer.indent_level);
25149
+ this._current_frame = new_frame;
25150
+ };
25151
+ TagStack.prototype._try_pop_frame = function(frame) {
25152
+ var parser_token = null;
25153
+ if (frame) {
25154
+ parser_token = frame.parser_token;
25155
+ this._printer.indent_level = frame.indent_level;
25156
+ this._current_frame = frame.parent;
25157
+ }
25158
+ return parser_token;
25159
+ };
25160
+ TagStack.prototype._get_frame = function(tag_list, stop_list) {
25161
+ var frame = this._current_frame;
25162
+ while (frame) {
25163
+ if (tag_list.indexOf(frame.tag) !== -1) {
25164
+ break;
25165
+ } else if (stop_list && stop_list.indexOf(frame.tag) !== -1) {
25166
+ frame = null;
25167
+ break;
25168
+ }
25169
+ frame = frame.parent;
25170
+ }
25171
+ return frame;
25172
+ };
25173
+ TagStack.prototype.try_pop = function(tag, stop_list) {
25174
+ var frame = this._get_frame([tag], stop_list);
25175
+ return this._try_pop_frame(frame);
25176
+ };
25177
+ TagStack.prototype.indent_to_tag = function(tag_list) {
25178
+ var frame = this._get_frame(tag_list);
25179
+ if (frame) {
25180
+ this._printer.indent_level = frame.indent_level;
25181
+ }
25182
+ };
25183
+ function Beautifier(source_text, options, js_beautify2, css_beautify) {
25184
+ this._source_text = source_text || "";
25185
+ options = options || {};
25186
+ this._js_beautify = js_beautify2;
25187
+ this._css_beautify = css_beautify;
25188
+ this._tag_stack = null;
25189
+ var optionHtml = new Options(options, "html");
25190
+ this._options = optionHtml;
25191
+ this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, "force".length) === "force";
25192
+ this._is_wrap_attributes_force_expand_multiline = this._options.wrap_attributes === "force-expand-multiline";
25193
+ this._is_wrap_attributes_force_aligned = this._options.wrap_attributes === "force-aligned";
25194
+ this._is_wrap_attributes_aligned_multiple = this._options.wrap_attributes === "aligned-multiple";
25195
+ this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, "preserve".length) === "preserve";
25196
+ this._is_wrap_attributes_preserve_aligned = this._options.wrap_attributes === "preserve-aligned";
25197
+ }
25198
+ Beautifier.prototype.beautify = function() {
25199
+ if (this._options.disabled) {
25200
+ return this._source_text;
25201
+ }
25202
+ var source_text = this._source_text;
25203
+ var eol = this._options.eol;
25204
+ if (this._options.eol === "auto") {
25205
+ eol = "\n";
25206
+ if (source_text && lineBreak.test(source_text)) {
25207
+ eol = source_text.match(lineBreak)[0];
25208
+ }
25209
+ }
25210
+ source_text = source_text.replace(allLineBreaks, "\n");
25211
+ var baseIndentString = source_text.match(/^[\t ]*/)[0];
25212
+ var last_token = {
25213
+ text: "",
25214
+ type: ""
25215
+ };
25216
+ var last_tag_token = new TagOpenParserToken();
25217
+ var printer = new Printer3(this._options, baseIndentString);
25218
+ var tokens = new Tokenizer(source_text, this._options).tokenize();
25219
+ this._tag_stack = new TagStack(printer);
25220
+ var parser_token = null;
25221
+ var raw_token = tokens.next();
25222
+ while (raw_token.type !== TOKEN.EOF) {
25223
+ if (raw_token.type === TOKEN.TAG_OPEN || raw_token.type === TOKEN.COMMENT) {
25224
+ parser_token = this._handle_tag_open(printer, raw_token, last_tag_token, last_token);
25225
+ last_tag_token = parser_token;
25226
+ } else if (raw_token.type === TOKEN.ATTRIBUTE || raw_token.type === TOKEN.EQUALS || raw_token.type === TOKEN.VALUE || raw_token.type === TOKEN.TEXT && !last_tag_token.tag_complete) {
25227
+ parser_token = this._handle_inside_tag(printer, raw_token, last_tag_token, tokens);
25228
+ } else if (raw_token.type === TOKEN.TAG_CLOSE) {
25229
+ parser_token = this._handle_tag_close(printer, raw_token, last_tag_token);
25230
+ } else if (raw_token.type === TOKEN.TEXT) {
25231
+ parser_token = this._handle_text(printer, raw_token, last_tag_token);
25232
+ } else {
25233
+ printer.add_raw_token(raw_token);
25234
+ }
25235
+ last_token = parser_token;
25236
+ raw_token = tokens.next();
25237
+ }
25238
+ var sweet_code = printer._output.get_code(eol);
25239
+ return sweet_code;
25240
+ };
25241
+ Beautifier.prototype._handle_tag_close = function(printer, raw_token, last_tag_token) {
25242
+ var parser_token = {
25243
+ text: raw_token.text,
25244
+ type: raw_token.type
25245
+ };
25246
+ printer.alignment_size = 0;
25247
+ last_tag_token.tag_complete = true;
25248
+ printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== "", true);
25249
+ if (last_tag_token.is_unformatted) {
25250
+ printer.add_raw_token(raw_token);
25251
+ } else {
25252
+ if (last_tag_token.tag_start_char === "<") {
25253
+ printer.set_space_before_token(raw_token.text[0] === "/", true);
25254
+ if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.has_wrapped_attrs) {
25255
+ printer.print_newline(false);
25256
+ }
25257
+ }
25258
+ printer.print_token(raw_token);
25259
+ }
25260
+ if (last_tag_token.indent_content && !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
25261
+ printer.indent();
25262
+ last_tag_token.indent_content = false;
25263
+ }
25264
+ if (!last_tag_token.is_inline_element && !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
25265
+ printer.set_wrap_point();
25266
+ }
25267
+ return parser_token;
25268
+ };
25269
+ Beautifier.prototype._handle_inside_tag = function(printer, raw_token, last_tag_token, tokens) {
25270
+ var wrapped = last_tag_token.has_wrapped_attrs;
25271
+ var parser_token = {
25272
+ text: raw_token.text,
25273
+ type: raw_token.type
25274
+ };
25275
+ printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== "", true);
25276
+ if (last_tag_token.is_unformatted) {
25277
+ printer.add_raw_token(raw_token);
25278
+ } else if (last_tag_token.tag_start_char === "{" && raw_token.type === TOKEN.TEXT) {
25279
+ if (printer.print_preserved_newlines(raw_token)) {
25280
+ raw_token.newlines = 0;
25281
+ printer.add_raw_token(raw_token);
25282
+ } else {
25283
+ printer.print_token(raw_token);
25284
+ }
25285
+ } else {
25286
+ if (raw_token.type === TOKEN.ATTRIBUTE) {
25287
+ printer.set_space_before_token(true);
25288
+ last_tag_token.attr_count += 1;
25289
+ } else if (raw_token.type === TOKEN.EQUALS) {
25290
+ printer.set_space_before_token(false);
25291
+ } else if (raw_token.type === TOKEN.VALUE && raw_token.previous.type === TOKEN.EQUALS) {
25292
+ printer.set_space_before_token(false);
25293
+ }
25294
+ if (raw_token.type === TOKEN.ATTRIBUTE && last_tag_token.tag_start_char === "<") {
25295
+ if (this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) {
25296
+ printer.traverse_whitespace(raw_token);
25297
+ wrapped = wrapped || raw_token.newlines !== 0;
25298
+ }
25299
+ if (this._is_wrap_attributes_force) {
25300
+ var force_attr_wrap = last_tag_token.attr_count > 1;
25301
+ if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.attr_count === 1) {
25302
+ var is_only_attribute = true;
25303
+ var peek_index = 0;
25304
+ var peek_token;
25305
+ do {
25306
+ peek_token = tokens.peek(peek_index);
25307
+ if (peek_token.type === TOKEN.ATTRIBUTE) {
25308
+ is_only_attribute = false;
25309
+ break;
25310
+ }
25311
+ peek_index += 1;
25312
+ } while (peek_index < 4 && peek_token.type !== TOKEN.EOF && peek_token.type !== TOKEN.TAG_CLOSE);
25313
+ force_attr_wrap = !is_only_attribute;
25314
+ }
25315
+ if (force_attr_wrap) {
25316
+ printer.print_newline(false);
25317
+ wrapped = true;
25318
+ }
25319
+ }
25320
+ }
25321
+ printer.print_token(raw_token);
25322
+ wrapped = wrapped || printer.previous_token_wrapped();
25323
+ last_tag_token.has_wrapped_attrs = wrapped;
25324
+ }
25325
+ return parser_token;
25326
+ };
25327
+ Beautifier.prototype._handle_text = function(printer, raw_token, last_tag_token) {
25328
+ var parser_token = {
25329
+ text: raw_token.text,
25330
+ type: "TK_CONTENT"
25331
+ };
25332
+ if (last_tag_token.custom_beautifier_name) {
25333
+ this._print_custom_beatifier_text(printer, raw_token, last_tag_token);
25334
+ } else if (last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) {
25335
+ printer.add_raw_token(raw_token);
25336
+ } else {
25337
+ printer.traverse_whitespace(raw_token);
25338
+ printer.print_token(raw_token);
25339
+ }
25340
+ return parser_token;
25341
+ };
25342
+ Beautifier.prototype._print_custom_beatifier_text = function(printer, raw_token, last_tag_token) {
25343
+ var local = this;
25344
+ if (raw_token.text !== "") {
25345
+ var text = raw_token.text, _beautifier, script_indent_level = 1, pre = "", post = "";
25346
+ if (last_tag_token.custom_beautifier_name === "javascript" && typeof this._js_beautify === "function") {
25347
+ _beautifier = this._js_beautify;
25348
+ } else if (last_tag_token.custom_beautifier_name === "css" && typeof this._css_beautify === "function") {
25349
+ _beautifier = this._css_beautify;
25350
+ } else if (last_tag_token.custom_beautifier_name === "html") {
25351
+ _beautifier = function(html_source, options) {
25352
+ var beautifier = new Beautifier(html_source, options, local._js_beautify, local._css_beautify);
25353
+ return beautifier.beautify();
25354
+ };
25355
+ }
25356
+ if (this._options.indent_scripts === "keep") {
25357
+ script_indent_level = 0;
25358
+ } else if (this._options.indent_scripts === "separate") {
25359
+ script_indent_level = -printer.indent_level;
25360
+ }
25361
+ var indentation = printer.get_full_indent(script_indent_level);
25362
+ text = text.replace(/\n[ \t]*$/, "");
25363
+ if (last_tag_token.custom_beautifier_name !== "html" && text[0] === "<" && text.match(/^(<!--|<!\[CDATA\[)/)) {
25364
+ var matched = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(text);
25365
+ if (!matched) {
25366
+ printer.add_raw_token(raw_token);
25367
+ return;
25368
+ }
25369
+ pre = indentation + matched[1] + "\n";
25370
+ text = matched[4];
25371
+ if (matched[5]) {
25372
+ post = indentation + matched[5];
25373
+ }
25374
+ text = text.replace(/\n[ \t]*$/, "");
25375
+ if (matched[2] || matched[3].indexOf("\n") !== -1) {
25376
+ matched = matched[3].match(/[ \t]+$/);
25377
+ if (matched) {
25378
+ raw_token.whitespace_before = matched[0];
25379
+ }
25380
+ }
25381
+ }
25382
+ if (text) {
25383
+ if (_beautifier) {
25384
+ var Child_options = function() {
25385
+ this.eol = "\n";
25386
+ };
25387
+ Child_options.prototype = this._options.raw_options;
25388
+ var child_options = new Child_options();
25389
+ text = _beautifier(indentation + text, child_options);
25390
+ } else {
25391
+ var white = raw_token.whitespace_before;
25392
+ if (white) {
25393
+ text = text.replace(new RegExp("\n(" + white + ")?", "g"), "\n");
25394
+ }
25395
+ text = indentation + text.replace(/\n/g, "\n" + indentation);
25396
+ }
25397
+ }
25398
+ if (pre) {
25399
+ if (!text) {
25400
+ text = pre + post;
25401
+ } else {
25402
+ text = pre + text + "\n" + post;
25403
+ }
25404
+ }
25405
+ printer.print_newline(false);
25406
+ if (text) {
25407
+ raw_token.text = text;
25408
+ raw_token.whitespace_before = "";
25409
+ raw_token.newlines = 0;
25410
+ printer.add_raw_token(raw_token);
25411
+ printer.print_newline(true);
25412
+ }
25413
+ }
25414
+ };
25415
+ Beautifier.prototype._handle_tag_open = function(printer, raw_token, last_tag_token, last_token) {
25416
+ var parser_token = this._get_tag_open_token(raw_token);
25417
+ if ((last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) && !last_tag_token.is_empty_element && raw_token.type === TOKEN.TAG_OPEN && raw_token.text.indexOf("</") === 0) {
25418
+ printer.add_raw_token(raw_token);
25419
+ parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name);
25420
+ } else {
25421
+ printer.traverse_whitespace(raw_token);
25422
+ this._set_tag_position(printer, raw_token, parser_token, last_tag_token, last_token);
25423
+ if (!parser_token.is_inline_element) {
25424
+ printer.set_wrap_point();
25425
+ }
25426
+ printer.print_token(raw_token);
25427
+ }
25428
+ if (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) {
25429
+ parser_token.alignment_size = raw_token.text.length + 1;
25430
+ }
25431
+ if (!parser_token.tag_complete && !parser_token.is_unformatted) {
25432
+ printer.alignment_size = parser_token.alignment_size;
25433
+ }
25434
+ return parser_token;
25435
+ };
25436
+ var TagOpenParserToken = function(parent, raw_token) {
25437
+ this.parent = parent || null;
25438
+ this.text = "";
25439
+ this.type = "TK_TAG_OPEN";
25440
+ this.tag_name = "";
25441
+ this.is_inline_element = false;
25442
+ this.is_unformatted = false;
25443
+ this.is_content_unformatted = false;
25444
+ this.is_empty_element = false;
25445
+ this.is_start_tag = false;
25446
+ this.is_end_tag = false;
25447
+ this.indent_content = false;
25448
+ this.multiline_content = false;
25449
+ this.custom_beautifier_name = null;
25450
+ this.start_tag_token = null;
25451
+ this.attr_count = 0;
25452
+ this.has_wrapped_attrs = false;
25453
+ this.alignment_size = 0;
25454
+ this.tag_complete = false;
25455
+ this.tag_start_char = "";
25456
+ this.tag_check = "";
25457
+ if (!raw_token) {
25458
+ this.tag_complete = true;
25459
+ } else {
25460
+ var tag_check_match;
25461
+ this.tag_start_char = raw_token.text[0];
25462
+ this.text = raw_token.text;
25463
+ if (this.tag_start_char === "<") {
25464
+ tag_check_match = raw_token.text.match(/^<([^\s>]*)/);
25465
+ this.tag_check = tag_check_match ? tag_check_match[1] : "";
25466
+ } else {
25467
+ tag_check_match = raw_token.text.match(/^{{(?:[\^]|#\*?)?([^\s}]+)/);
25468
+ this.tag_check = tag_check_match ? tag_check_match[1] : "";
25469
+ if (raw_token.text === "{{#>" && this.tag_check === ">" && raw_token.next !== null) {
25470
+ this.tag_check = raw_token.next.text.split(" ")[0];
25471
+ }
25472
+ }
25473
+ this.tag_check = this.tag_check.toLowerCase();
25474
+ if (raw_token.type === TOKEN.COMMENT) {
25475
+ this.tag_complete = true;
25476
+ }
25477
+ this.is_start_tag = this.tag_check.charAt(0) !== "/";
25478
+ this.tag_name = !this.is_start_tag ? this.tag_check.substr(1) : this.tag_check;
25479
+ this.is_end_tag = !this.is_start_tag || raw_token.closed && raw_token.closed.text === "/>";
25480
+ this.is_end_tag = this.is_end_tag || this.tag_start_char === "{" && (this.text.length < 3 || /[^#\^]/.test(this.text.charAt(2)));
25481
+ }
25482
+ };
25483
+ Beautifier.prototype._get_tag_open_token = function(raw_token) {
25484
+ var parser_token = new TagOpenParserToken(this._tag_stack.get_parser_token(), raw_token);
25485
+ parser_token.alignment_size = this._options.wrap_attributes_indent_size;
25486
+ parser_token.is_end_tag = parser_token.is_end_tag || in_array(parser_token.tag_check, this._options.void_elements);
25487
+ parser_token.is_empty_element = parser_token.tag_complete || parser_token.is_start_tag && parser_token.is_end_tag;
25488
+ parser_token.is_unformatted = !parser_token.tag_complete && in_array(parser_token.tag_check, this._options.unformatted);
25489
+ parser_token.is_content_unformatted = !parser_token.is_empty_element && in_array(parser_token.tag_check, this._options.content_unformatted);
25490
+ parser_token.is_inline_element = in_array(parser_token.tag_name, this._options.inline) || parser_token.tag_start_char === "{";
25491
+ return parser_token;
25492
+ };
25493
+ Beautifier.prototype._set_tag_position = function(printer, raw_token, parser_token, last_tag_token, last_token) {
25494
+ if (!parser_token.is_empty_element) {
25495
+ if (parser_token.is_end_tag) {
25496
+ parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name);
25497
+ } else {
25498
+ if (this._do_optional_end_element(parser_token)) {
25499
+ if (!parser_token.is_inline_element) {
25500
+ printer.print_newline(false);
25501
+ }
25502
+ }
25503
+ this._tag_stack.record_tag(parser_token);
25504
+ if ((parser_token.tag_name === "script" || parser_token.tag_name === "style") && !(parser_token.is_unformatted || parser_token.is_content_unformatted)) {
25505
+ parser_token.custom_beautifier_name = get_custom_beautifier_name(parser_token.tag_check, raw_token);
25506
+ }
25507
+ }
25508
+ }
25509
+ if (in_array(parser_token.tag_check, this._options.extra_liners)) {
25510
+ printer.print_newline(false);
25511
+ if (!printer._output.just_added_blankline()) {
25512
+ printer.print_newline(true);
25513
+ }
25514
+ }
25515
+ if (parser_token.is_empty_element) {
25516
+ if (parser_token.tag_start_char === "{" && parser_token.tag_check === "else") {
25517
+ this._tag_stack.indent_to_tag(["if", "unless", "each"]);
25518
+ parser_token.indent_content = true;
25519
+ var foundIfOnCurrentLine = printer.current_line_has_match(/{{#if/);
25520
+ if (!foundIfOnCurrentLine) {
25521
+ printer.print_newline(false);
25522
+ }
25523
+ }
25524
+ if (parser_token.tag_name === "!--" && last_token.type === TOKEN.TAG_CLOSE && last_tag_token.is_end_tag && parser_token.text.indexOf("\n") === -1) {
25525
+ } else {
25526
+ if (!(parser_token.is_inline_element || parser_token.is_unformatted)) {
25527
+ printer.print_newline(false);
25528
+ }
25529
+ this._calcluate_parent_multiline(printer, parser_token);
25530
+ }
25531
+ } else if (parser_token.is_end_tag) {
25532
+ var do_end_expand = false;
25533
+ do_end_expand = parser_token.start_tag_token && parser_token.start_tag_token.multiline_content;
25534
+ do_end_expand = do_end_expand || !parser_token.is_inline_element && !(last_tag_token.is_inline_element || last_tag_token.is_unformatted) && !(last_token.type === TOKEN.TAG_CLOSE && parser_token.start_tag_token === last_tag_token) && last_token.type !== "TK_CONTENT";
25535
+ if (parser_token.is_content_unformatted || parser_token.is_unformatted) {
25536
+ do_end_expand = false;
25537
+ }
25538
+ if (do_end_expand) {
25539
+ printer.print_newline(false);
25540
+ }
25541
+ } else {
25542
+ parser_token.indent_content = !parser_token.custom_beautifier_name;
25543
+ if (parser_token.tag_start_char === "<") {
25544
+ if (parser_token.tag_name === "html") {
25545
+ parser_token.indent_content = this._options.indent_inner_html;
25546
+ } else if (parser_token.tag_name === "head") {
25547
+ parser_token.indent_content = this._options.indent_head_inner_html;
25548
+ } else if (parser_token.tag_name === "body") {
25549
+ parser_token.indent_content = this._options.indent_body_inner_html;
25550
+ }
25551
+ }
25552
+ if (!(parser_token.is_inline_element || parser_token.is_unformatted) && (last_token.type !== "TK_CONTENT" || parser_token.is_content_unformatted)) {
25553
+ printer.print_newline(false);
25554
+ }
25555
+ this._calcluate_parent_multiline(printer, parser_token);
25556
+ }
25557
+ };
25558
+ Beautifier.prototype._calcluate_parent_multiline = function(printer, parser_token) {
25559
+ if (parser_token.parent && printer._output.just_added_newline() && !((parser_token.is_inline_element || parser_token.is_unformatted) && parser_token.parent.is_inline_element)) {
25560
+ parser_token.parent.multiline_content = true;
25561
+ }
25562
+ };
25563
+ var p_closers = ["address", "article", "aside", "blockquote", "details", "div", "dl", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hr", "main", "nav", "ol", "p", "pre", "section", "table", "ul"];
25564
+ var p_parent_excludes = ["a", "audio", "del", "ins", "map", "noscript", "video"];
25565
+ Beautifier.prototype._do_optional_end_element = function(parser_token) {
25566
+ var result = null;
25567
+ if (parser_token.is_empty_element || !parser_token.is_start_tag || !parser_token.parent) {
25568
+ return;
25569
+ }
25570
+ if (parser_token.tag_name === "body") {
25571
+ result = result || this._tag_stack.try_pop("head");
25572
+ } else if (parser_token.tag_name === "li") {
25573
+ result = result || this._tag_stack.try_pop("li", ["ol", "ul"]);
25574
+ } else if (parser_token.tag_name === "dd" || parser_token.tag_name === "dt") {
25575
+ result = result || this._tag_stack.try_pop("dt", ["dl"]);
25576
+ result = result || this._tag_stack.try_pop("dd", ["dl"]);
25577
+ } else if (parser_token.parent.tag_name === "p" && p_closers.indexOf(parser_token.tag_name) !== -1) {
25578
+ var p_parent = parser_token.parent.parent;
25579
+ if (!p_parent || p_parent_excludes.indexOf(p_parent.tag_name) === -1) {
25580
+ result = result || this._tag_stack.try_pop("p");
25581
+ }
25582
+ } else if (parser_token.tag_name === "rp" || parser_token.tag_name === "rt") {
25583
+ result = result || this._tag_stack.try_pop("rt", ["ruby", "rtc"]);
25584
+ result = result || this._tag_stack.try_pop("rp", ["ruby", "rtc"]);
25585
+ } else if (parser_token.tag_name === "optgroup") {
25586
+ result = result || this._tag_stack.try_pop("optgroup", ["select"]);
25587
+ } else if (parser_token.tag_name === "option") {
25588
+ result = result || this._tag_stack.try_pop("option", ["select", "datalist", "optgroup"]);
25589
+ } else if (parser_token.tag_name === "colgroup") {
25590
+ result = result || this._tag_stack.try_pop("caption", ["table"]);
25591
+ } else if (parser_token.tag_name === "thead") {
25592
+ result = result || this._tag_stack.try_pop("caption", ["table"]);
25593
+ result = result || this._tag_stack.try_pop("colgroup", ["table"]);
25594
+ } else if (parser_token.tag_name === "tbody" || parser_token.tag_name === "tfoot") {
25595
+ result = result || this._tag_stack.try_pop("caption", ["table"]);
25596
+ result = result || this._tag_stack.try_pop("colgroup", ["table"]);
25597
+ result = result || this._tag_stack.try_pop("thead", ["table"]);
25598
+ result = result || this._tag_stack.try_pop("tbody", ["table"]);
25599
+ } else if (parser_token.tag_name === "tr") {
25600
+ result = result || this._tag_stack.try_pop("caption", ["table"]);
25601
+ result = result || this._tag_stack.try_pop("colgroup", ["table"]);
25602
+ result = result || this._tag_stack.try_pop("tr", ["table", "thead", "tbody", "tfoot"]);
25603
+ } else if (parser_token.tag_name === "th" || parser_token.tag_name === "td") {
25604
+ result = result || this._tag_stack.try_pop("td", ["table", "thead", "tbody", "tfoot", "tr"]);
25605
+ result = result || this._tag_stack.try_pop("th", ["table", "thead", "tbody", "tfoot", "tr"]);
25606
+ }
25607
+ parser_token.parent = this._tag_stack.get_parser_token();
25608
+ return result;
25609
+ };
25610
+ module2.exports.Beautifier = Beautifier;
25611
+ }
25612
+ });
25613
+
25614
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/html/index.js
25615
+ var require_html = __commonJS({
25616
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/html/index.js"(exports2, module2) {
25617
+ "use strict";
25618
+ var Beautifier = require_beautifier3().Beautifier;
25619
+ var Options = require_options4().Options;
25620
+ function style_html(html_source, options, js_beautify2, css_beautify) {
25621
+ var beautifier = new Beautifier(html_source, options, js_beautify2, css_beautify);
25622
+ return beautifier.beautify();
25623
+ }
25624
+ module2.exports = style_html;
25625
+ module2.exports.defaultOptions = function() {
25626
+ return new Options();
25627
+ };
25628
+ }
25629
+ });
25630
+
25631
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/index.js
25632
+ var require_src = __commonJS({
25633
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/src/index.js"(exports2, module2) {
25634
+ "use strict";
25635
+ var js_beautify2 = require_javascript();
25636
+ var css_beautify = require_css();
25637
+ var html_beautify = require_html();
25638
+ function style_html(html_source, options, js, css) {
25639
+ js = js || js_beautify2;
25640
+ css = css || css_beautify;
25641
+ return html_beautify(html_source, options, js, css);
25642
+ }
25643
+ style_html.defaultOptions = html_beautify.defaultOptions;
25644
+ module2.exports.js = js_beautify2;
25645
+ module2.exports.css = css_beautify;
25646
+ module2.exports.html = style_html;
25647
+ }
25648
+ });
25649
+
25650
+ // node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/index.js
25651
+ var require_js = __commonJS({
25652
+ "node_modules/.pnpm/js-beautify@1.14.3/node_modules/js-beautify/js/index.js"(exports2, module2) {
25653
+ "use strict";
25654
+ function get_beautify(js_beautify2, css_beautify, html_beautify) {
25655
+ var beautify = function(src, config) {
25656
+ return js_beautify2.js_beautify(src, config);
25657
+ };
25658
+ beautify.js = js_beautify2.js_beautify;
25659
+ beautify.css = css_beautify.css_beautify;
25660
+ beautify.html = html_beautify.html_beautify;
25661
+ beautify.js_beautify = js_beautify2.js_beautify;
25662
+ beautify.css_beautify = css_beautify.css_beautify;
25663
+ beautify.html_beautify = html_beautify.html_beautify;
25664
+ return beautify;
25665
+ }
25666
+ if (typeof define === "function" && define.amd) {
25667
+ define([
25668
+ "./lib/beautify",
25669
+ "./lib/beautify-css",
25670
+ "./lib/beautify-html"
25671
+ ], function(js_beautify2, css_beautify, html_beautify) {
25672
+ return get_beautify(js_beautify2, css_beautify, html_beautify);
25673
+ });
25674
+ } else {
25675
+ (function(mod) {
25676
+ var beautifier = require_src();
25677
+ beautifier.js_beautify = beautifier.js;
25678
+ beautifier.css_beautify = beautifier.css;
25679
+ beautifier.html_beautify = beautifier.html;
25680
+ mod.exports = get_beautify(beautifier, beautifier, beautifier);
25681
+ })(module2);
25682
+ }
25683
+ }
25684
+ });
25685
+
21587
25686
  // src/index.ts
21588
25687
  var src_exports = {};
21589
25688
  __export(src_exports, {
@@ -21602,7 +25701,7 @@ var import_node_fs2 = require("fs");
21602
25701
  var import_node_process = __toESM(require("process"), 1);
21603
25702
  var import_fast_glob = __toESM(require_out4(), 1);
21604
25703
 
21605
- // node_modules/.pnpm/magicast@0.3.3/node_modules/magicast/dist/index.mjs
25704
+ // node_modules/.pnpm/magicast@0.3.4/node_modules/magicast/dist/index.mjs
21606
25705
  var import_node_fs = require("fs");
21607
25706
  var import_source_map_js = __toESM(require_source_map(), 1);
21608
25707
  var babelParser = __toESM(require_lib(), 1);
@@ -30068,6 +34167,30 @@ function proxifyIdentifier(node) {
30068
34167
  {}
30069
34168
  );
30070
34169
  }
34170
+ function proxifyLogicalExpression(node) {
34171
+ if (node.type !== "LogicalExpression") {
34172
+ throw new MagicastError("Not a logical expression");
34173
+ }
34174
+ return createProxy(
34175
+ node,
34176
+ {
34177
+ $type: "logicalExpression"
34178
+ },
34179
+ {}
34180
+ );
34181
+ }
34182
+ function proxifyMemberExpression(node) {
34183
+ if (node.type !== "MemberExpression") {
34184
+ throw new MagicastError("Not a member expression");
34185
+ }
34186
+ return createProxy(
34187
+ node,
34188
+ {
34189
+ $type: "memberExpression"
34190
+ },
34191
+ {}
34192
+ );
34193
+ }
30071
34194
  var _cache = /* @__PURE__ */ new WeakMap();
30072
34195
  function proxify(node, mod) {
30073
34196
  if (LITERALS_TYPEOF.has(typeof node)) {
@@ -30105,6 +34228,14 @@ function proxify(node, mod) {
30105
34228
  proxy = proxifyIdentifier(node);
30106
34229
  break;
30107
34230
  }
34231
+ case "LogicalExpression": {
34232
+ proxy = proxifyLogicalExpression(node);
34233
+ break;
34234
+ }
34235
+ case "MemberExpression": {
34236
+ proxy = proxifyMemberExpression(node);
34237
+ break;
34238
+ }
30108
34239
  case "TSAsExpression":
30109
34240
  case "TSSatisfiesExpression": {
30110
34241
  proxy = proxify(node.expression, mod);
@@ -30347,6 +34478,7 @@ async function loadFile(filename, options = {}) {
30347
34478
 
30348
34479
  // src/core/generate.ts
30349
34480
  var import_utils = require("@antfu/utils");
34481
+ var import_js_beautify = __toESM(require_js(), 1);
30350
34482
  async function generateScript(options, mode) {
30351
34483
  const { dir, fileName, globalName, serve, build } = options.env;
30352
34484
  const folder = await findFolder(import_node_process.default.cwd(), dir);
@@ -30373,7 +34505,7 @@ async function generateScript(options, mode) {
30373
34505
  const returnedTarget = (0, import_utils.deepMerge)({}, source, target);
30374
34506
  const versionInfo = await generateVersion(options, mode);
30375
34507
  code = `window.${globalName}=${JSON.stringify(returnedTarget)};${versionInfo}`;
30376
- const formatCode = code;
34508
+ const formatCode = import_js_beautify.default.js_beautify(code);
30377
34509
  return {
30378
34510
  code,
30379
34511
  script: ` <script type="text/javascript" src="${fileName}"></script>