etiquetas.js 1.0.0-alpha.4 → 1.0.0-alpha.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.
@@ -11303,7 +11303,7 @@ function(t2) {
11303
11303
  */
11304
11304
  function(t2) {
11305
11305
  function e2() {
11306
- return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-CCAzIpY-.js")).catch(function(t3) {
11306
+ return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-CKhxQJQK.js")).catch(function(t3) {
11307
11307
  return Promise.reject(new Error("Could not load canvg: " + t3));
11308
11308
  }).then(function(t3) {
11309
11309
  return t3.default ? t3.default : t3;
@@ -18539,10 +18539,10 @@ var Tokenizer = (
18539
18539
  };
18540
18540
  Tokenizer2.prototype.read = function() {
18541
18541
  var tokens = [];
18542
- var token = this.consumeToken();
18543
- while (token !== EOF_TOKEN) {
18544
- tokens.push(token);
18545
- token = this.consumeToken();
18542
+ var token2 = this.consumeToken();
18543
+ while (token2 !== EOF_TOKEN) {
18544
+ tokens.push(token2);
18545
+ token2 = this.consumeToken();
18546
18546
  }
18547
18547
  return tokens;
18548
18548
  };
@@ -18977,19 +18977,19 @@ var Parser = (
18977
18977
  return Parser2.create(value).parseComponentValues();
18978
18978
  };
18979
18979
  Parser2.prototype.parseComponentValue = function() {
18980
- var token = this.consumeToken();
18981
- while (token.type === 31) {
18982
- token = this.consumeToken();
18980
+ var token2 = this.consumeToken();
18981
+ while (token2.type === 31) {
18982
+ token2 = this.consumeToken();
18983
18983
  }
18984
- if (token.type === 32) {
18984
+ if (token2.type === 32) {
18985
18985
  throw new SyntaxError("Error parsing CSS component value, unexpected EOF");
18986
18986
  }
18987
- this.reconsumeToken(token);
18987
+ this.reconsumeToken(token2);
18988
18988
  var value = this.consumeComponentValue();
18989
18989
  do {
18990
- token = this.consumeToken();
18991
- } while (token.type === 31);
18992
- if (token.type === 32) {
18990
+ token2 = this.consumeToken();
18991
+ } while (token2.type === 31);
18992
+ if (token2.type === 32) {
18993
18993
  return value;
18994
18994
  }
18995
18995
  throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one");
@@ -19006,27 +19006,27 @@ var Parser = (
19006
19006
  }
19007
19007
  };
19008
19008
  Parser2.prototype.consumeComponentValue = function() {
19009
- var token = this.consumeToken();
19010
- switch (token.type) {
19009
+ var token2 = this.consumeToken();
19010
+ switch (token2.type) {
19011
19011
  case 11:
19012
19012
  case 28:
19013
19013
  case 2:
19014
- return this.consumeSimpleBlock(token.type);
19014
+ return this.consumeSimpleBlock(token2.type);
19015
19015
  case 19:
19016
- return this.consumeFunction(token);
19016
+ return this.consumeFunction(token2);
19017
19017
  }
19018
- return token;
19018
+ return token2;
19019
19019
  };
19020
19020
  Parser2.prototype.consumeSimpleBlock = function(type) {
19021
19021
  var block = { type, values: [] };
19022
- var token = this.consumeToken();
19022
+ var token2 = this.consumeToken();
19023
19023
  while (true) {
19024
- if (token.type === 32 || isEndingTokenFor(token, type)) {
19024
+ if (token2.type === 32 || isEndingTokenFor(token2, type)) {
19025
19025
  return block;
19026
19026
  }
19027
- this.reconsumeToken(token);
19027
+ this.reconsumeToken(token2);
19028
19028
  block.values.push(this.consumeComponentValue());
19029
- token = this.consumeToken();
19029
+ token2 = this.consumeToken();
19030
19030
  }
19031
19031
  };
19032
19032
  Parser2.prototype.consumeFunction = function(functionToken) {
@@ -19037,50 +19037,50 @@ var Parser = (
19037
19037
  /* FUNCTION */
19038
19038
  };
19039
19039
  while (true) {
19040
- var token = this.consumeToken();
19041
- if (token.type === 32 || token.type === 3) {
19040
+ var token2 = this.consumeToken();
19041
+ if (token2.type === 32 || token2.type === 3) {
19042
19042
  return cssFunction;
19043
19043
  }
19044
- this.reconsumeToken(token);
19044
+ this.reconsumeToken(token2);
19045
19045
  cssFunction.values.push(this.consumeComponentValue());
19046
19046
  }
19047
19047
  };
19048
19048
  Parser2.prototype.consumeToken = function() {
19049
- var token = this._tokens.shift();
19050
- return typeof token === "undefined" ? EOF_TOKEN : token;
19049
+ var token2 = this._tokens.shift();
19050
+ return typeof token2 === "undefined" ? EOF_TOKEN : token2;
19051
19051
  };
19052
- Parser2.prototype.reconsumeToken = function(token) {
19053
- this._tokens.unshift(token);
19052
+ Parser2.prototype.reconsumeToken = function(token2) {
19053
+ this._tokens.unshift(token2);
19054
19054
  };
19055
19055
  return Parser2;
19056
19056
  }()
19057
19057
  );
19058
- var isDimensionToken = function(token) {
19059
- return token.type === 15;
19058
+ var isDimensionToken = function(token2) {
19059
+ return token2.type === 15;
19060
19060
  };
19061
- var isNumberToken = function(token) {
19062
- return token.type === 17;
19061
+ var isNumberToken = function(token2) {
19062
+ return token2.type === 17;
19063
19063
  };
19064
- var isIdentToken = function(token) {
19065
- return token.type === 20;
19064
+ var isIdentToken = function(token2) {
19065
+ return token2.type === 20;
19066
19066
  };
19067
- var isStringToken = function(token) {
19068
- return token.type === 0;
19067
+ var isStringToken = function(token2) {
19068
+ return token2.type === 0;
19069
19069
  };
19070
- var isIdentWithValue = function(token, value) {
19071
- return isIdentToken(token) && token.value === value;
19070
+ var isIdentWithValue = function(token2, value) {
19071
+ return isIdentToken(token2) && token2.value === value;
19072
19072
  };
19073
- var nonWhiteSpace = function(token) {
19074
- return token.type !== 31;
19073
+ var nonWhiteSpace = function(token2) {
19074
+ return token2.type !== 31;
19075
19075
  };
19076
- var nonFunctionArgSeparator = function(token) {
19077
- return token.type !== 31 && token.type !== 4;
19076
+ var nonFunctionArgSeparator = function(token2) {
19077
+ return token2.type !== 31 && token2.type !== 4;
19078
19078
  };
19079
19079
  var parseFunctionArgs = function(tokens) {
19080
19080
  var args = [];
19081
19081
  var arg = [];
19082
- tokens.forEach(function(token) {
19083
- if (token.type === 4) {
19082
+ tokens.forEach(function(token2) {
19083
+ if (token2.type === 4) {
19084
19084
  if (arg.length === 0) {
19085
19085
  throw new Error("Error parsing function args, zero tokens for arg");
19086
19086
  }
@@ -19088,8 +19088,8 @@ var parseFunctionArgs = function(tokens) {
19088
19088
  arg = [];
19089
19089
  return;
19090
19090
  }
19091
- if (token.type !== 31) {
19092
- arg.push(token);
19091
+ if (token2.type !== 31) {
19092
+ arg.push(token2);
19093
19093
  }
19094
19094
  });
19095
19095
  if (arg.length) {
@@ -19097,20 +19097,20 @@ var parseFunctionArgs = function(tokens) {
19097
19097
  }
19098
19098
  return args;
19099
19099
  };
19100
- var isEndingTokenFor = function(token, type) {
19101
- if (type === 11 && token.type === 12) {
19100
+ var isEndingTokenFor = function(token2, type) {
19101
+ if (type === 11 && token2.type === 12) {
19102
19102
  return true;
19103
19103
  }
19104
- if (type === 28 && token.type === 29) {
19104
+ if (type === 28 && token2.type === 29) {
19105
19105
  return true;
19106
19106
  }
19107
- return type === 2 && token.type === 3;
19107
+ return type === 2 && token2.type === 3;
19108
19108
  };
19109
- var isLength = function(token) {
19110
- return token.type === 17 || token.type === 15;
19109
+ var isLength = function(token2) {
19110
+ return token2.type === 17 || token2.type === 15;
19111
19111
  };
19112
- var isLengthPercentage = function(token) {
19113
- return token.type === 16 || isLength(token);
19112
+ var isLengthPercentage = function(token2) {
19113
+ return token2.type === 16 || isLength(token2);
19114
19114
  };
19115
19115
  var parseLengthPercentageTuple = function(tokens) {
19116
19116
  return tokens.length > 1 ? [tokens[0], tokens[1]] : [tokens[0]];
@@ -19134,21 +19134,21 @@ var getAbsoluteValueForTuple = function(tuple, width, height) {
19134
19134
  var x2 = tuple[0], y2 = tuple[1];
19135
19135
  return [getAbsoluteValue(x2, width), getAbsoluteValue(typeof y2 !== "undefined" ? y2 : x2, height)];
19136
19136
  };
19137
- var getAbsoluteValue = function(token, parent) {
19138
- if (token.type === 16) {
19139
- return token.number / 100 * parent;
19137
+ var getAbsoluteValue = function(token2, parent) {
19138
+ if (token2.type === 16) {
19139
+ return token2.number / 100 * parent;
19140
19140
  }
19141
- if (isDimensionToken(token)) {
19142
- switch (token.unit) {
19141
+ if (isDimensionToken(token2)) {
19142
+ switch (token2.unit) {
19143
19143
  case "rem":
19144
19144
  case "em":
19145
- return 16 * token.number;
19145
+ return 16 * token2.number;
19146
19146
  case "px":
19147
19147
  default:
19148
- return token.number;
19148
+ return token2.number;
19149
19149
  }
19150
19150
  }
19151
- return token.number;
19151
+ return token2.number;
19152
19152
  };
19153
19153
  var DEG = "deg";
19154
19154
  var GRAD = "grad";
@@ -19283,13 +19283,13 @@ var asString = function(color2) {
19283
19283
  var pack = function(r, g2, b2, a2) {
19284
19284
  return (r << 24 | g2 << 16 | b2 << 8 | Math.round(a2 * 255) << 0) >>> 0;
19285
19285
  };
19286
- var getTokenColorValue = function(token, i) {
19287
- if (token.type === 17) {
19288
- return token.number;
19286
+ var getTokenColorValue = function(token2, i) {
19287
+ if (token2.type === 17) {
19288
+ return token2.number;
19289
19289
  }
19290
- if (token.type === 16) {
19290
+ if (token2.type === 16) {
19291
19291
  var max2 = i === 3 ? 1 : 255;
19292
- return i === 3 ? token.number / 100 * max2 : Math.round(token.number / 100 * max2);
19292
+ return i === 3 ? token2.number / 100 * max2 : Math.round(token2.number / 100 * max2);
19293
19293
  }
19294
19294
  return 0;
19295
19295
  };
@@ -19505,9 +19505,9 @@ var backgroundClip = {
19505
19505
  prefix: false,
19506
19506
  type: 1,
19507
19507
  parse: function(_context, tokens) {
19508
- return tokens.map(function(token) {
19509
- if (isIdentToken(token)) {
19510
- switch (token.value) {
19508
+ return tokens.map(function(token2) {
19509
+ if (isIdentToken(token2)) {
19510
+ switch (token2.value) {
19511
19511
  case "padding-box":
19512
19512
  return 1;
19513
19513
  case "content-box":
@@ -19777,10 +19777,10 @@ var radialGradient = function(context, tokens) {
19777
19777
  var isColorStop = true;
19778
19778
  if (i === 0) {
19779
19779
  var isAtPosition_1 = false;
19780
- isColorStop = arg.reduce(function(acc, token) {
19780
+ isColorStop = arg.reduce(function(acc, token2) {
19781
19781
  if (isAtPosition_1) {
19782
- if (isIdentToken(token)) {
19783
- switch (token.value) {
19782
+ if (isIdentToken(token2)) {
19783
+ switch (token2.value) {
19784
19784
  case "center":
19785
19785
  position2.push(FIFTY_PERCENT);
19786
19786
  return acc;
@@ -19793,11 +19793,11 @@ var radialGradient = function(context, tokens) {
19793
19793
  position2.push(HUNDRED_PERCENT);
19794
19794
  return acc;
19795
19795
  }
19796
- } else if (isLengthPercentage(token) || isLength(token)) {
19797
- position2.push(token);
19796
+ } else if (isLengthPercentage(token2) || isLength(token2)) {
19797
+ position2.push(token2);
19798
19798
  }
19799
- } else if (isIdentToken(token)) {
19800
- switch (token.value) {
19799
+ } else if (isIdentToken(token2)) {
19800
+ switch (token2.value) {
19801
19801
  case CIRCLE:
19802
19802
  shape = 0;
19803
19803
  return false;
@@ -19822,11 +19822,11 @@ var radialGradient = function(context, tokens) {
19822
19822
  size = 3;
19823
19823
  return false;
19824
19824
  }
19825
- } else if (isLength(token) || isLengthPercentage(token)) {
19825
+ } else if (isLength(token2) || isLengthPercentage(token2)) {
19826
19826
  if (!Array.isArray(size)) {
19827
19827
  size = [];
19828
19828
  }
19829
- size.push(token);
19829
+ size.push(token2);
19830
19830
  return false;
19831
19831
  }
19832
19832
  return acc;
@@ -19854,9 +19854,9 @@ var prefixRadialGradient = function(context, tokens) {
19854
19854
  parseFunctionArgs(tokens).forEach(function(arg, i) {
19855
19855
  var isColorStop = true;
19856
19856
  if (i === 0) {
19857
- isColorStop = arg.reduce(function(acc, token) {
19858
- if (isIdentToken(token)) {
19859
- switch (token.value) {
19857
+ isColorStop = arg.reduce(function(acc, token2) {
19858
+ if (isIdentToken(token2)) {
19859
+ switch (token2.value) {
19860
19860
  case "center":
19861
19861
  position2.push(FIFTY_PERCENT);
19862
19862
  return false;
@@ -19869,16 +19869,16 @@ var prefixRadialGradient = function(context, tokens) {
19869
19869
  position2.push(HUNDRED_PERCENT);
19870
19870
  return false;
19871
19871
  }
19872
- } else if (isLengthPercentage(token) || isLength(token)) {
19873
- position2.push(token);
19872
+ } else if (isLengthPercentage(token2) || isLength(token2)) {
19873
+ position2.push(token2);
19874
19874
  return false;
19875
19875
  }
19876
19876
  return acc;
19877
19877
  }, isColorStop);
19878
19878
  } else if (i === 1) {
19879
- isColorStop = arg.reduce(function(acc, token) {
19880
- if (isIdentToken(token)) {
19881
- switch (token.value) {
19879
+ isColorStop = arg.reduce(function(acc, token2) {
19880
+ if (isIdentToken(token2)) {
19881
+ switch (token2.value) {
19882
19882
  case CIRCLE:
19883
19883
  shape = 0;
19884
19884
  return false;
@@ -19900,11 +19900,11 @@ var prefixRadialGradient = function(context, tokens) {
19900
19900
  size = 3;
19901
19901
  return false;
19902
19902
  }
19903
- } else if (isLength(token) || isLengthPercentage(token)) {
19903
+ } else if (isLength(token2) || isLengthPercentage(token2)) {
19904
19904
  if (!Array.isArray(size)) {
19905
19905
  size = [];
19906
19906
  }
19907
- size.push(token);
19907
+ size.push(token2);
19908
19908
  return false;
19909
19909
  }
19910
19910
  return acc;
@@ -19994,9 +19994,9 @@ var backgroundOrigin = {
19994
19994
  prefix: false,
19995
19995
  type: 1,
19996
19996
  parse: function(_context, tokens) {
19997
- return tokens.map(function(token) {
19998
- if (isIdentToken(token)) {
19999
- switch (token.value) {
19997
+ return tokens.map(function(token2) {
19998
+ if (isIdentToken(token2)) {
19999
+ switch (token2.value) {
20000
20000
  case "padding-box":
20001
20001
  return 1;
20002
20002
  case "content-box":
@@ -20025,8 +20025,8 @@ var backgroundRepeat = {
20025
20025
  type: 1,
20026
20026
  parse: function(_context, tokens) {
20027
20027
  return parseFunctionArgs(tokens).map(function(values2) {
20028
- return values2.filter(isIdentToken).map(function(token) {
20029
- return token.value;
20028
+ return values2.filter(isIdentToken).map(function(token2) {
20029
+ return token2.value;
20030
20030
  }).join(" ");
20031
20031
  }).map(parseBackgroundRepeat);
20032
20032
  }
@@ -20125,9 +20125,9 @@ var borderWidthForSide = function(side) {
20125
20125
  initialValue: "0",
20126
20126
  type: 0,
20127
20127
  prefix: false,
20128
- parse: function(_context, token) {
20129
- if (isDimensionToken(token)) {
20130
- return token.number;
20128
+ parse: function(_context, token2) {
20129
+ if (isDimensionToken(token2)) {
20130
+ return token2.number;
20131
20131
  }
20132
20132
  return 0;
20133
20133
  }
@@ -20166,8 +20166,8 @@ var display = {
20166
20166
  type: 1,
20167
20167
  parse: function(_context, tokens) {
20168
20168
  return tokens.filter(isIdentToken).reduce(
20169
- function(bit, token) {
20170
- return bit | parseDisplayValue(token.value);
20169
+ function(bit, token2) {
20170
+ return bit | parseDisplayValue(token2.value);
20171
20171
  },
20172
20172
  0
20173
20173
  /* NONE */
@@ -20264,15 +20264,15 @@ var letterSpacing = {
20264
20264
  initialValue: "0",
20265
20265
  prefix: false,
20266
20266
  type: 0,
20267
- parse: function(_context, token) {
20268
- if (token.type === 20 && token.value === "normal") {
20267
+ parse: function(_context, token2) {
20268
+ if (token2.type === 20 && token2.value === "normal") {
20269
20269
  return 0;
20270
20270
  }
20271
- if (token.type === 17) {
20272
- return token.number;
20271
+ if (token2.type === 17) {
20272
+ return token2.number;
20273
20273
  }
20274
- if (token.type === 15) {
20275
- return token.number;
20274
+ if (token2.type === 15) {
20275
+ return token2.number;
20276
20276
  }
20277
20277
  return 0;
20278
20278
  }
@@ -20304,13 +20304,13 @@ var lineHeight = {
20304
20304
  type: 4
20305
20305
  /* TOKEN_VALUE */
20306
20306
  };
20307
- var computeLineHeight = function(token, fontSize2) {
20308
- if (isIdentToken(token) && token.value === "normal") {
20307
+ var computeLineHeight = function(token2, fontSize2) {
20308
+ if (isIdentToken(token2) && token2.value === "normal") {
20309
20309
  return 1.2 * fontSize2;
20310
- } else if (token.type === 17) {
20311
- return fontSize2 * token.number;
20312
- } else if (isLengthPercentage(token)) {
20313
- return getAbsoluteValue(token, fontSize2);
20310
+ } else if (token2.type === 17) {
20311
+ return fontSize2 * token2.number;
20312
+ } else if (isLengthPercentage(token2)) {
20313
+ return getAbsoluteValue(token2, fontSize2);
20314
20314
  }
20315
20315
  return fontSize2;
20316
20316
  };
@@ -20319,11 +20319,11 @@ var listStyleImage = {
20319
20319
  initialValue: "none",
20320
20320
  type: 0,
20321
20321
  prefix: false,
20322
- parse: function(context, token) {
20323
- if (token.type === 20 && token.value === "none") {
20322
+ parse: function(context, token2) {
20323
+ if (token2.type === 20 && token2.value === "none") {
20324
20324
  return null;
20325
20325
  }
20326
- return image.parse(context, token);
20326
+ return image.parse(context, token2);
20327
20327
  }
20328
20328
  };
20329
20329
  var listStylePosition = {
@@ -20579,18 +20579,18 @@ var textShadow = {
20579
20579
  };
20580
20580
  var c2 = 0;
20581
20581
  for (var i = 0; i < values2.length; i++) {
20582
- var token = values2[i];
20583
- if (isLength(token)) {
20582
+ var token2 = values2[i];
20583
+ if (isLength(token2)) {
20584
20584
  if (c2 === 0) {
20585
- shadow2.offsetX = token;
20585
+ shadow2.offsetX = token2;
20586
20586
  } else if (c2 === 1) {
20587
- shadow2.offsetY = token;
20587
+ shadow2.offsetY = token2;
20588
20588
  } else {
20589
- shadow2.blur = token;
20589
+ shadow2.blur = token2;
20590
20590
  }
20591
20591
  c2++;
20592
20592
  } else {
20593
- shadow2.color = color$1.parse(context, token);
20593
+ shadow2.color = color$1.parse(context, token2);
20594
20594
  }
20595
20595
  }
20596
20596
  return shadow2;
@@ -20619,16 +20619,16 @@ var transform$1 = {
20619
20619
  initialValue: "none",
20620
20620
  prefix: true,
20621
20621
  type: 0,
20622
- parse: function(_context, token) {
20623
- if (token.type === 20 && token.value === "none") {
20622
+ parse: function(_context, token2) {
20623
+ if (token2.type === 20 && token2.value === "none") {
20624
20624
  return null;
20625
20625
  }
20626
- if (token.type === 18) {
20627
- var transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token.name];
20626
+ if (token2.type === 18) {
20627
+ var transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token2.name];
20628
20628
  if (typeof transformFunction === "undefined") {
20629
- throw new Error('Attempting to parse an unsupported transform function "' + token.name + '"');
20629
+ throw new Error('Attempting to parse an unsupported transform function "' + token2.name + '"');
20630
20630
  }
20631
- return transformFunction(token.values);
20631
+ return transformFunction(token2.values);
20632
20632
  }
20633
20633
  return null;
20634
20634
  }
@@ -20730,12 +20730,12 @@ var zIndex = {
20730
20730
  initialValue: "auto",
20731
20731
  prefix: false,
20732
20732
  type: 0,
20733
- parse: function(_context, token) {
20734
- if (token.type === 20) {
20733
+ parse: function(_context, token2) {
20734
+ if (token2.type === 20) {
20735
20735
  return { auto: true, order: 0 };
20736
20736
  }
20737
- if (isNumberToken(token)) {
20738
- return { auto: false, order: token.number };
20737
+ if (isNumberToken(token2)) {
20738
+ return { auto: false, order: token2.number };
20739
20739
  }
20740
20740
  throw new Error("Invalid z-index number parsed");
20741
20741
  }
@@ -20759,9 +20759,9 @@ var opacity = {
20759
20759
  initialValue: "1",
20760
20760
  type: 0,
20761
20761
  prefix: false,
20762
- parse: function(_context, token) {
20763
- if (isNumberToken(token)) {
20764
- return token.number;
20762
+ parse: function(_context, token2) {
20763
+ if (isNumberToken(token2)) {
20764
+ return token2.number;
20765
20765
  }
20766
20766
  return 1;
20767
20767
  }
@@ -20779,8 +20779,8 @@ var textDecorationLine = {
20779
20779
  prefix: false,
20780
20780
  type: 1,
20781
20781
  parse: function(_context, tokens) {
20782
- return tokens.filter(isIdentToken).map(function(token) {
20783
- switch (token.value) {
20782
+ return tokens.filter(isIdentToken).map(function(token2) {
20783
+ switch (token2.value) {
20784
20784
  case "underline":
20785
20785
  return 1;
20786
20786
  case "overline":
@@ -20804,14 +20804,14 @@ var fontFamily = {
20804
20804
  parse: function(_context, tokens) {
20805
20805
  var accumulator = [];
20806
20806
  var results = [];
20807
- tokens.forEach(function(token) {
20808
- switch (token.type) {
20807
+ tokens.forEach(function(token2) {
20808
+ switch (token2.type) {
20809
20809
  case 20:
20810
20810
  case 0:
20811
- accumulator.push(token.value);
20811
+ accumulator.push(token2.value);
20812
20812
  break;
20813
20813
  case 17:
20814
- accumulator.push(token.number.toString());
20814
+ accumulator.push(token2.number.toString());
20815
20815
  break;
20816
20816
  case 4:
20817
20817
  results.push(accumulator.join(" "));
@@ -20839,12 +20839,12 @@ var fontWeight = {
20839
20839
  initialValue: "normal",
20840
20840
  type: 0,
20841
20841
  prefix: false,
20842
- parse: function(_context, token) {
20843
- if (isNumberToken(token)) {
20844
- return token.number;
20842
+ parse: function(_context, token2) {
20843
+ if (isNumberToken(token2)) {
20844
+ return token2.number;
20845
20845
  }
20846
- if (isIdentToken(token)) {
20847
- switch (token.value) {
20846
+ if (isIdentToken(token2)) {
20847
+ switch (token2.value) {
20848
20848
  case "bold":
20849
20849
  return 700;
20850
20850
  case "normal":
@@ -20861,8 +20861,8 @@ var fontVariant = {
20861
20861
  type: 1,
20862
20862
  prefix: false,
20863
20863
  parse: function(_context, tokens) {
20864
- return tokens.filter(isIdentToken).map(function(token) {
20865
- return token.value;
20864
+ return tokens.filter(isIdentToken).map(function(token2) {
20865
+ return token2.value;
20866
20866
  });
20867
20867
  }
20868
20868
  };
@@ -20956,8 +20956,8 @@ var duration = {
20956
20956
  prefix: false,
20957
20957
  type: 1,
20958
20958
  parse: function(context, tokens) {
20959
- return tokens.filter(isDimensionToken).map(function(token) {
20960
- return time.parse(context, token);
20959
+ return tokens.filter(isDimensionToken).map(function(token2) {
20960
+ return time.parse(context, token2);
20961
20961
  });
20962
20962
  }
20963
20963
  };
@@ -21017,22 +21017,22 @@ var boxShadow = {
21017
21017
  };
21018
21018
  var c2 = 0;
21019
21019
  for (var i = 0; i < values2.length; i++) {
21020
- var token = values2[i];
21021
- if (isIdentWithValue(token, "inset")) {
21020
+ var token2 = values2[i];
21021
+ if (isIdentWithValue(token2, "inset")) {
21022
21022
  shadow2.inset = true;
21023
- } else if (isLength(token)) {
21023
+ } else if (isLength(token2)) {
21024
21024
  if (c2 === 0) {
21025
- shadow2.offsetX = token;
21025
+ shadow2.offsetX = token2;
21026
21026
  } else if (c2 === 1) {
21027
- shadow2.offsetY = token;
21027
+ shadow2.offsetY = token2;
21028
21028
  } else if (c2 === 2) {
21029
- shadow2.blur = token;
21029
+ shadow2.blur = token2;
21030
21030
  } else {
21031
- shadow2.spread = token;
21031
+ shadow2.spread = token2;
21032
21032
  }
21033
21033
  c2++;
21034
21034
  } else {
21035
- shadow2.color = color$1.parse(context, token);
21035
+ shadow2.color = color$1.parse(context, token2);
21036
21036
  }
21037
21037
  }
21038
21038
  return shadow2;
@@ -21052,8 +21052,8 @@ var paintOrder = {
21052
21052
  /* MARKERS */
21053
21053
  ];
21054
21054
  var layers = [];
21055
- tokens.filter(isIdentToken).forEach(function(token) {
21056
- switch (token.value) {
21055
+ tokens.filter(isIdentToken).forEach(function(token2) {
21056
+ switch (token2.value) {
21057
21057
  case "stroke":
21058
21058
  layers.push(
21059
21059
  1
@@ -21094,9 +21094,9 @@ var webkitTextStrokeWidth = {
21094
21094
  initialValue: "0",
21095
21095
  type: 0,
21096
21096
  prefix: false,
21097
- parse: function(_context, token) {
21098
- if (isDimensionToken(token)) {
21099
- return token.number;
21097
+ parse: function(_context, token2) {
21098
+ if (isDimensionToken(token2)) {
21099
+ return token2.number;
21100
21100
  }
21101
21101
  return 0;
21102
21102
  }
@@ -21249,8 +21249,8 @@ var parse = function(context, descriptor, style) {
21249
21249
  var parser = new Parser(tokenizer.read());
21250
21250
  switch (descriptor.type) {
21251
21251
  case 2:
21252
- var token = parser.parseComponentValue();
21253
- return descriptor.parse(context, isIdentToken(token) ? token.value : descriptor.initialValue);
21252
+ var token2 = parser.parseComponentValue();
21253
+ return descriptor.parse(context, isIdentToken(token2) ? token2.value : descriptor.initialValue);
21254
21254
  case 0:
21255
21255
  return descriptor.parse(context, parser.parseComponentValue());
21256
21256
  case 1:
@@ -23020,29 +23020,29 @@ var DocumentCloner = (
23020
23020
  var declaration = new CSSParsedPseudoDeclaration(this.context, style);
23021
23021
  var anonymousReplacedElement = document2.createElement("html2canvaspseudoelement");
23022
23022
  copyCSSStyles(style, anonymousReplacedElement);
23023
- declaration.content.forEach(function(token) {
23024
- if (token.type === 0) {
23025
- anonymousReplacedElement.appendChild(document2.createTextNode(token.value));
23026
- } else if (token.type === 22) {
23023
+ declaration.content.forEach(function(token2) {
23024
+ if (token2.type === 0) {
23025
+ anonymousReplacedElement.appendChild(document2.createTextNode(token2.value));
23026
+ } else if (token2.type === 22) {
23027
23027
  var img = document2.createElement("img");
23028
- img.src = token.value;
23028
+ img.src = token2.value;
23029
23029
  img.style.opacity = "1";
23030
23030
  anonymousReplacedElement.appendChild(img);
23031
- } else if (token.type === 18) {
23032
- if (token.name === "attr") {
23033
- var attr = token.values.filter(isIdentToken);
23031
+ } else if (token2.type === 18) {
23032
+ if (token2.name === "attr") {
23033
+ var attr = token2.values.filter(isIdentToken);
23034
23034
  if (attr.length) {
23035
23035
  anonymousReplacedElement.appendChild(document2.createTextNode(node.getAttribute(attr[0].value) || ""));
23036
23036
  }
23037
- } else if (token.name === "counter") {
23038
- var _a2 = token.values.filter(nonFunctionArgSeparator), counter = _a2[0], counterStyle = _a2[1];
23037
+ } else if (token2.name === "counter") {
23038
+ var _a2 = token2.values.filter(nonFunctionArgSeparator), counter = _a2[0], counterStyle = _a2[1];
23039
23039
  if (counter && isIdentToken(counter)) {
23040
23040
  var counterState = _this.counters.getCounterValue(counter.value);
23041
23041
  var counterType = counterStyle && isIdentToken(counterStyle) ? listStyleType.parse(_this.context, counterStyle.value) : 3;
23042
23042
  anonymousReplacedElement.appendChild(document2.createTextNode(createCounterText(counterState, counterType, false)));
23043
23043
  }
23044
- } else if (token.name === "counters") {
23045
- var _b2 = token.values.filter(nonFunctionArgSeparator), counter = _b2[0], delim = _b2[1], counterStyle = _b2[2];
23044
+ } else if (token2.name === "counters") {
23045
+ var _b2 = token2.values.filter(nonFunctionArgSeparator), counter = _b2[0], delim = _b2[1], counterStyle = _b2[2];
23046
23046
  if (counter && isIdentToken(counter)) {
23047
23047
  var counterStates = _this.counters.getCounterValues(counter.value);
23048
23048
  var counterType_1 = counterStyle && isIdentToken(counterStyle) ? listStyleType.parse(_this.context, counterStyle.value) : 3;
@@ -23053,8 +23053,8 @@ var DocumentCloner = (
23053
23053
  anonymousReplacedElement.appendChild(document2.createTextNode(text));
23054
23054
  }
23055
23055
  } else ;
23056
- } else if (token.type === 20) {
23057
- switch (token.value) {
23056
+ } else if (token2.type === 20) {
23057
+ switch (token2.value) {
23058
23058
  case "open-quote":
23059
23059
  anonymousReplacedElement.appendChild(document2.createTextNode(getQuote(declaration.quotes, _this.quoteDepth++, true)));
23060
23060
  break;
@@ -23062,7 +23062,7 @@ var DocumentCloner = (
23062
23062
  anonymousReplacedElement.appendChild(document2.createTextNode(getQuote(declaration.quotes, --_this.quoteDepth, false)));
23063
23063
  break;
23064
23064
  default:
23065
- anonymousReplacedElement.appendChild(document2.createTextNode(token.value));
23065
+ anonymousReplacedElement.appendChild(document2.createTextNode(token2.value));
23066
23066
  }
23067
23067
  }
23068
23068
  });
@@ -23929,8 +23929,8 @@ var calculateBackgroundRendering = function(container, index, intrinsicSize) {
23929
23929
  var offsetY = Math.round(backgroundPositioningArea.top + position2[1]);
23930
23930
  return [path, offsetX, offsetY, sizeWidth, sizeHeight];
23931
23931
  };
23932
- var isAuto = function(token) {
23933
- return isIdentToken(token) && token.value === BACKGROUND_SIZE.AUTO;
23932
+ var isAuto = function(token2) {
23933
+ return isIdentToken(token2) && token2.value === BACKGROUND_SIZE.AUTO;
23934
23934
  };
23935
23935
  var hasIntrinsicValue = function(value) {
23936
23936
  return typeof value === "number";
@@ -58113,6 +58113,14 @@ const apiClient$1 = axios.create({
58113
58113
  "Accept": "application/json"
58114
58114
  }
58115
58115
  });
58116
+ const updateApiToken = (token2) => {
58117
+ if (token2) {
58118
+ apiClient$1.defaults.headers.common["Authorization"] = `${token2}`;
58119
+ console.log("🔑 Token de API atualizado");
58120
+ } else {
58121
+ console.warn("⚠️ Token não fornecido");
58122
+ }
58123
+ };
58116
58124
  const LABEL_TYPES$1 = {
58117
58125
  PART: "part",
58118
58126
  SCRAP: "scrap",
@@ -58128,7 +58136,7 @@ apiClient$1.interceptors.response.use(
58128
58136
  return Promise.reject(error);
58129
58137
  }
58130
58138
  );
58131
- let LabelsAPI$1 = class LabelsAPI {
58139
+ class LabelsAPI {
58132
58140
  /**
58133
58141
  * Lista etiquetas com filtros opcionais
58134
58142
  * GET /v1/labels
@@ -58304,8 +58312,8 @@ let LabelsAPI$1 = class LabelsAPI {
58304
58312
  *
58305
58313
  * @param {string} token - Token de autenticação
58306
58314
  */
58307
- static setAuthToken(token) {
58308
- apiClient$1.defaults.headers.common["Authorization"] = `${token}`;
58315
+ static setAuthToken(token2) {
58316
+ apiClient$1.defaults.headers.common["Authorization"] = `${token2}`;
58309
58317
  }
58310
58318
  /**
58311
58319
  * Remove o token de autenticação
@@ -58321,17 +58329,11 @@ let LabelsAPI$1 = class LabelsAPI {
58321
58329
  static setBaseURL(baseURL) {
58322
58330
  apiClient$1.defaults.baseURL = baseURL;
58323
58331
  }
58324
- };
58325
- const LabelsAPI2 = {
58326
- getLabel: (id) => __async(void 0, null, function* () {
58327
- console.warn("LabelsAPI não carregado - usando placeholder");
58328
- return null;
58329
- })
58330
- };
58332
+ }
58331
58333
  function getTemplateById(templateId) {
58332
58334
  return __async(this, null, function* () {
58333
58335
  try {
58334
- const labelData = yield LabelsAPI2.getLabel(templateId);
58336
+ const labelData = yield LabelsAPI.getLabel(templateId);
58335
58337
  if (!labelData) {
58336
58338
  throw new Error(`Template/etiqueta não encontrado com ID: ${templateId}`);
58337
58339
  }
@@ -58407,7 +58409,7 @@ const createSSESlice = (set, get3) => ({
58407
58409
  printer: data.printer || null
58408
58410
  });
58409
58411
  } catch (error) {
58410
- console.error("Erro ao processar dados da impressora:", error);
58412
+ console.warn("Erro ao processar dados da impressora:", error);
58411
58413
  }
58412
58414
  });
58413
58415
  newEventSource.onerror = (error) => {
@@ -58621,9 +58623,6 @@ const legacyFieldMap = {
58621
58623
  const legacyTransformer = (data) => {
58622
58624
  return applyTransformations(data, legacyFieldMap);
58623
58625
  };
58624
- const updateApiToken = (token) => {
58625
- console.warn("updateApiToken não carregado - usando placeholder");
58626
- };
58627
58626
  new VariableManager();
58628
58627
  let globalConfig = {
58629
58628
  printerName: null,
@@ -58669,7 +58668,8 @@ const init = (config = {}) => {
58669
58668
  }, config);
58670
58669
  globalConfig = __spreadValues(__spreadValues({}, globalConfig), finalConfig);
58671
58670
  if (finalConfig.token) {
58672
- updateApiToken();
58671
+ console.log("🔑 Atualizando token da API", token);
58672
+ updateApiToken(finalConfig.token);
58673
58673
  }
58674
58674
  if (finalConfig.autoConnectPrinter) {
58675
58675
  try {
@@ -59394,7 +59394,7 @@ export {
59394
59394
  labelTypeNames as p,
59395
59395
  initialState as q,
59396
59396
  reducer as r,
59397
- LabelsAPI$1 as s,
59397
+ LabelsAPI as s,
59398
59398
  init as t,
59399
59399
  useLabelData as u,
59400
59400
  getPrinterStatus as v,
@@ -59403,4 +59403,4 @@ export {
59403
59403
  downloadPDF as y,
59404
59404
  sendToPrinter as z
59405
59405
  };
59406
- //# sourceMappingURL=index-BUpKxNQ0.js.map
59406
+ //# sourceMappingURL=index-hPMt3Mo7.js.map