sldeditor 0.31.0 → 0.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sldeditor.js CHANGED
@@ -25567,7 +25567,7 @@ ${this.fmt(n)}
25567
25567
  return typeof t == "number" ? Number.isFinite(t) ? Number.isInteger(t) ? String(t) : t.toFixed(this.precision) : "0" : t;
25568
25568
  }
25569
25569
  header(t) {
25570
- this.g(0, "SECTION"), this.g(2, "HEADER"), this.g(9, "$ACADVER"), this.g(1, "AC1009"), this.g(9, "$INSUNITS"), this.g(70, 0), this.extentsSlot = this.out.length, this.out.push(""), t && (this.g(9, "$PROJECTNAME"), this.g(1, As(t))), this.g(0, "ENDSEC");
25570
+ this.g(0, "SECTION"), this.g(2, "HEADER"), this.g(9, "$ACADVER"), this.g(1, "AC1009"), this.g(9, "$DWGCODEPAGE"), this.g(3, "ANSI_1252"), this.g(9, "$INSUNITS"), this.g(70, 0), this.extentsSlot = this.out.length, this.out.push(""), t && (this.g(9, "$PROJECTNAME"), this.g(1, As(t))), this.g(0, "ENDSEC");
25571
25571
  }
25572
25572
  tables(t) {
25573
25573
  this.g(0, "SECTION"), this.g(2, "TABLES"), this.g(0, "TABLE"), this.g(2, "LAYER"), this.g(70, t.length);
@@ -25625,7 +25625,14 @@ ${this.fmt(n)}
25625
25625
  }
25626
25626
  }
25627
25627
  function As(e) {
25628
- return e.replace(/[\r\n]+/g, " ").slice(0, 250);
25628
+ const t = e.replace(/[\r\n]+/g, " ");
25629
+ let n = "", o = 0;
25630
+ for (const r of t) {
25631
+ if (o++ >= 250) break;
25632
+ const a = r.codePointAt(0);
25633
+ a >= 32 && a < 127 ? n += r : a > 65535 ? n += "?" : a >= 160 ? n += `\\U+${a.toString(16).toUpperCase().padStart(4, "0")}` : n += " ";
25634
+ }
25635
+ return n;
25629
25636
  }
25630
25637
  function $5() {
25631
25638
  const e = le(), [t, n] = Ee(!1), o = pe(null);