@mlightcad/cad-simple-viewer-cli 1.6.0 → 1.6.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-runner/assets/cad-html-plugin-k7CVaAuj.js +675 -0
- package/dist-runner/assets/{cad-pdf-plugin-Dy_9cUDz.js → cad-pdf-plugin-CqZVmSm2.js} +2 -2
- package/dist-runner/assets/{cad-svg-plugin-H_1erBTJ.js → cad-svg-plugin-BvSmrelr.js} +2 -2
- package/dist-runner/assets/{index-DBlYvCOi.js → index-BvxDFe8e.js} +229 -229
- package/dist-runner/index.html +1 -1
- package/dist-runner/viewer-runtime.iife.js +271 -154
- package/package.json +5 -5
- package/dist-runner/assets/cad-html-plugin-gRQM9D29.js +0 -477
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as et,F as it,l as st,a6 as nt,ac as N,ad as rt,ae as at,af as J,ag as ot,ah as K,a8 as ht,ai as P,aj as x,ak as ct,al as lt}from"./index-DBlYvCOi.js";import{am as ye,an as Se}from"./index-DBlYvCOi.js";var f;(function(r){r[r.NONE=0]="NONE",r[r.WORD=1]="WORD",r[r.STACK=2]="STACK",r[r.SPACE=3]="SPACE",r[r.NBSP=4]="NBSP",r[r.TABULATOR=5]="TABULATOR",r[r.NEW_PARAGRAPH=6]="NEW_PARAGRAPH",r[r.NEW_COLUMN=7]="NEW_COLUMN",r[r.WRAP_AT_DIMLINE=8]="WRAP_AT_DIMLINE",r[r.PROPERTIES_CHANGED=9]="PROPERTIES_CHANGED"})(f||(f={}));var H;(function(r){r[r.BOTTOM=0]="BOTTOM",r[r.MIDDLE=1]="MIDDLE",r[r.TOP=2]="TOP"})(H||(H={}));var d;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r[r.CENTER=3]="CENTER",r[r.JUSTIFIED=4]="JUSTIFIED",r[r.DISTRIBUTED=5]="DISTRIBUTED"})(d||(d={}));var k;(function(r){r[r.NONE=0]="NONE",r[r.UNDERLINE=1]="UNDERLINE",r[r.OVERLINE=2]="OVERLINE",r[r.STRIKE_THROUGH=4]="STRIKE_THROUGH"})(k||(k={}));const ut={c:"Ø",d:"°",p:"±","%":"%"},gt={l:d.LEFT,r:d.RIGHT,c:d.CENTER,j:d.JUSTIFIED,d:d.DISTRIBUTED};function ft(r){const[t,e,i]=r;return t<<16|e<<8|i}function X(r){return Math.max(0,Math.min(255,Math.round(r)))}function Q(r){return Math.max(0,Math.min(16777215,Math.round(r)))}function pt(r){return r===null?null:`#${Q(r).toString(16).padStart(6,"0")}`}function mt(r){if(!r)return null;const t=r.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(t))return t;if(/^[0-9a-f]{6}$/.test(t))return`#${t}`;if(/^#[0-9a-f]{3}$/.test(t)){const e=t[1],i=t[2],s=t[3];return`#${e}${e}${i}${i}${s}${s}`}if(/^[0-9a-f]{3}$/.test(t)){const e=t[0],i=t[1],s=t[2];return`#${e}${e}${i}${i}${s}${s}`}return null}function dt(r){if(!r)return null;const t=r.trim().toLowerCase();if(t==="transparent")return null;const e=mt(t);if(e)return Q(Number.parseInt(e.slice(1),16));const i=t.match(/^rgba?\((.*)\)$/);if(!i)return null;const s=i[1].replace(/\s*\/\s*/g," ").split(/[,\s]+/).map(c=>c.trim()).filter(Boolean);if(s.length<3)return null;const a=c=>{if(c.endsWith("%")){const l=Number.parseFloat(c.slice(0,-1));return X(l/100*255)}const u=Number.parseFloat(c);return X(u)},n=a(s[0]),h=a(s[1]),o=a(s[2]);return ft([n,h,o])}class xt{constructor(t){this.stack=[],this.stack.push(t)}push(t){this.stack.push(t)}pop(){if(this.stack.length<=1)return;const t=this.stack.pop(),e=this.stack[this.stack.length-1];return JSON.stringify(e.paragraph)!==JSON.stringify(t.paragraph)&&(e.paragraph={...t.paragraph}),t}get current(){return this.stack[this.stack.length-1]}get depth(){return this.stack.length-1}get root(){return this.stack[0]}setCurrent(t){this.stack[this.stack.length-1]=t}}class bt{constructor(t,e,i={}){this.continueStroke=!1,this.inStackContext=!1,this.scanner=new B(t);const s=e??new C;this.ctxStack=new xt(s),this.yieldPropertyCommands=i.yieldPropertyCommands??!1,this.resetParagraphParameters=i.resetParagraphParameters??!1,this.mifDecoder=i.mifDecoder??this.decodeMultiByteChar.bind(this),this.mifCodeLength=i.mifCodeLength??"auto"}decodeMultiByteChar(t){try{if(t.length===5){const e=t[0];let i="gbk";e==="1"?i="shift-jis":e==="2"&&(i="big5");const s=new Uint8Array([parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16)]);return new TextDecoder(i).decode(s)}else if(t.length===4){const e=new Uint8Array([parseInt(t.substr(0,2),16),parseInt(t.substr(2,2),16)]),s=new TextDecoder("gbk").decode(e);if(s!=="▯")return s;const n=new TextDecoder("big5").decode(e);if(n!=="▯")return n}return"▯"}catch{return"▯"}}extractMifCode(t){var e,i,s;if(t==="auto"){const a=(e=this.scanner.tail.match(/^[0-9A-Fa-f]{5}/))==null?void 0:e[0];if(a)return a;const n=(i=this.scanner.tail.match(/^[0-9A-Fa-f]{4}/))==null?void 0:i[0];return n||null}else return((s=this.scanner.tail.match(new RegExp(`^[0-9A-Fa-f]{${t}}`)))==null?void 0:s[0])??null}pushCtx(){this.ctxStack.push(this.ctxStack.current)}popCtx(){this.ctxStack.pop()}parseStacking(){const t=new B(this.extractExpression(!0));let e="",i="",s="";const a=()=>{let o=t.peek(),c=!1;return o.charCodeAt(0)<32&&(o=" "),o==="\\"&&(c=!0,t.consume(1),o=t.peek()),t.consume(1),[o,c]},n=()=>{let o="";for(;t.hasData;){const[c,u]=a();if(!u&&(c==="/"||c==="#"||c==="^"))return[o,c];o+=c}return[o,""]},h=o=>{let c="",u=o;for(;t.hasData;){const[l,g]=a();if(!(u&&l===" ")){if(u=!1,!g&&l===";")break;c+=l}}return c};return[e,s]=n(),s&&(i=h(s==="^")),e===""&&i.includes("I/")?[f.STACK,[" "," ","/"]]:s==="^"?[f.STACK,[e,i,"^"]]:[f.STACK,[e,i,s]]}parseProperties(t){const e=this.ctxStack.current.copy(),i=this.ctxStack.current.copy();switch(t){case"L":i.underline=!0,this.continueStroke=!0;break;case"l":i.underline=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"O":i.overline=!0,this.continueStroke=!0;break;case"o":i.overline=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"K":i.strikeThrough=!0,this.continueStroke=!0;break;case"k":i.strikeThrough=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"A":this.parseAlign(i);break;case"C":this.parseAciColor(i);break;case"c":this.parseRgbColor(i);break;case"H":this.parseHeight(i);break;case"W":this.parseWidth(i);break;case"Q":this.parseOblique(i);break;case"T":this.parseCharTracking(i);break;case"p":this.parseParagraphProperties(i);break;case"f":case"F":this.parseFontProperties(i);break;default:throw new Error(`Unknown command: ${t}`)}if(this.continueStroke=i.hasAnyStroke,i.continueStroke=this.continueStroke,this.ctxStack.setCurrent(i),this.yieldPropertyCommands){const s=this.getPropertyChanges(e,i);if(Object.keys(s).length>0)return{command:t,changes:s,depth:this.ctxStack.depth}}}getPropertyChanges(t,e){const i={};if(t.underline!==e.underline&&(i.underline=e.underline),t.overline!==e.overline&&(i.overline=e.overline),t.strikeThrough!==e.strikeThrough&&(i.strikeThrough=e.strikeThrough),t.color.aci!==e.color.aci&&(i.aci=e.color.aci),t.color.rgbValue!==e.color.rgbValue&&(i.rgb=e.color.rgb),t.align!==e.align&&(i.align=e.align),JSON.stringify(t.fontFace)!==JSON.stringify(e.fontFace)&&(i.fontFace=e.fontFace),(t.capHeight.value!==e.capHeight.value||t.capHeight.isRelative!==e.capHeight.isRelative)&&(i.capHeight=e.capHeight),(t.widthFactor.value!==e.widthFactor.value||t.widthFactor.isRelative!==e.widthFactor.isRelative)&&(i.widthFactor=e.widthFactor),(t.charTrackingFactor.value!==e.charTrackingFactor.value||t.charTrackingFactor.isRelative!==e.charTrackingFactor.isRelative)&&(i.charTrackingFactor=e.charTrackingFactor),t.oblique!==e.oblique&&(i.oblique=e.oblique),JSON.stringify(t.paragraph)!==JSON.stringify(e.paragraph)){const s={};t.paragraph.indent!==e.paragraph.indent&&(s.indent=e.paragraph.indent),t.paragraph.align!==e.paragraph.align&&(s.align=e.paragraph.align),t.paragraph.left!==e.paragraph.left&&(s.left=e.paragraph.left),t.paragraph.right!==e.paragraph.right&&(s.right=e.paragraph.right),JSON.stringify(t.paragraph.tabs)!==JSON.stringify(e.paragraph.tabs)&&(s.tabs=e.paragraph.tabs),Object.keys(s).length>0&&(i.paragraph=s)}return i}parseAlign(t){const e=this.scanner.get();"012".includes(e)?t.align=parseInt(e):t.align=H.BOTTOM,this.consumeOptionalTerminator()}parseHeight(t){const e=this.extractFloatExpression(!0);if(e)try{e.endsWith("x")?t.capHeight={value:parseFloat(e.slice(0,-1)),isRelative:!0}:t.capHeight={value:parseFloat(e),isRelative:!1}}catch{this.scanner.consume(-e.length);return}this.consumeOptionalTerminator()}parseWidth(t){const e=this.extractFloatExpression(!0);if(e)try{e.endsWith("x")?t.widthFactor={value:parseFloat(e.slice(0,-1)),isRelative:!0}:t.widthFactor={value:parseFloat(e),isRelative:!1}}catch{this.scanner.consume(-e.length);return}this.consumeOptionalTerminator()}parseCharTracking(t){const e=this.extractFloatExpression(!0);if(e)try{e.endsWith("x")?t.charTrackingFactor={value:Math.abs(parseFloat(e.slice(0,-1))),isRelative:!0}:t.charTrackingFactor={value:Math.abs(parseFloat(e)),isRelative:!1}}catch{this.scanner.consume(-e.length);return}this.consumeOptionalTerminator()}parseFloatValueOrFactor(t){const e=this.extractFloatExpression(!0);if(e)if(e.endsWith("x")){const i=parseFloat(e.slice(0,-1));t*=i}else t=parseFloat(e);return t}parseOblique(t){const e=this.extractFloatExpression(!1);e&&(t.oblique=parseFloat(e)),this.consumeOptionalTerminator()}parseAciColor(t){const e=this.extractIntExpression();if(e){const i=parseInt(e);i<257&&(t.color.aci=i)}this.consumeOptionalTerminator()}parseRgbColor(t){const e=this.extractIntExpression();if(e){const i=parseInt(e)&16777215;t.color.rgbValue=i}this.consumeOptionalTerminator()}extractFloatExpression(t=!1){const e=t?/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?x?/:/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,i=this.scanner.tail.match(e);if(i){const s=i[0];return this.scanner.consume(s.length),s}return""}extractIntExpression(){const t=this.scanner.tail.match(/^\d+/);if(t){const e=t[0];return this.scanner.consume(e.length),e}return""}extractExpression(t=!1){const e=this.scanner.find(";",t);if(e<0){const n=this.scanner.tail;return this.scanner.consume(n.length),n}const s=this.scanner.peek(e-this.scanner.currentIndex-1)==="\\",a=this.scanner.tail.slice(0,e-this.scanner.currentIndex+(s?1:0));return this.scanner.consume(a.length+1),a}parseFontProperties(t){const e=this.extractExpression().split("|");if(e.length>0&&e[0]){const i=e[0];let s="Regular",a=400;for(const n of e.slice(1))n.startsWith("b1")?a=700:n==="i"||n.startsWith("i1")?s="Italic":(n==="i0"||n.startsWith("i0"))&&(s="Regular");t.fontFace={family:i,style:s,weight:a}}}parseParagraphProperties(t){const e=new B(this.extractExpression());let i=t.paragraph.indent,s=t.paragraph.left,a=t.paragraph.right,n=t.paragraph.align,h=[];const o=()=>{const c=e.tail.match(/^[+-]?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/);if(c){const u=parseFloat(c[0]);for(e.consume(c[0].length);e.peek()===",";)e.consume(1);return u}return 0};for(;e.hasData;)switch(e.get()){case"i":i=o();break;case"l":s=o();break;case"r":a=o();break;case"x":break;case"q":{const u=e.get();for(n=gt[u]||d.DEFAULT;e.peek()===",";)e.consume(1);break}case"t":for(h=[];e.hasData;){const u=e.peek();if(u==="r"||u==="c"){e.consume(1);const l=o();h.push(u+l.toString())}else{const l=o();isNaN(l)?e.consume(1):h.push(l)}}break}t.paragraph={indent:i,left:s,right:a,align:n,tabs:h}}consumeOptionalTerminator(){this.scanner.peek()===";"&&this.scanner.consume(1)}*parse(){const t=f.WORD,e=f.SPACE;let i=null;function s(n){const h={...n.paragraph};n.paragraph={indent:0,left:0,right:0,align:d.DEFAULT,tabs:[]};const o={};return h.indent!==0&&(o.indent=0),h.left!==0&&(o.left=0),h.right!==0&&(o.right=0),h.align!==d.DEFAULT&&(o.align=d.DEFAULT),JSON.stringify(h.tabs)!==JSON.stringify([])&&(o.tabs=[]),o}const a=()=>{let n="";for(;this.scanner.hasData;){let h=!1,o=this.scanner.peek();const c=this.scanner.currentIndex;if(o.charCodeAt(0)<32){if(this.scanner.consume(1),o===" ")return[f.TABULATOR,null];if(o===`
|
|
1
|
+
import{v as et,F as it,l as st,a6 as nt,ac as N,ad as rt,ae as at,af as J,ag as ot,ah as K,a8 as ht,ai as P,aj as x,ak as ct,al as lt}from"./index-BvxDFe8e.js";import{am as ye,an as Se}from"./index-BvxDFe8e.js";var f;(function(r){r[r.NONE=0]="NONE",r[r.WORD=1]="WORD",r[r.STACK=2]="STACK",r[r.SPACE=3]="SPACE",r[r.NBSP=4]="NBSP",r[r.TABULATOR=5]="TABULATOR",r[r.NEW_PARAGRAPH=6]="NEW_PARAGRAPH",r[r.NEW_COLUMN=7]="NEW_COLUMN",r[r.WRAP_AT_DIMLINE=8]="WRAP_AT_DIMLINE",r[r.PROPERTIES_CHANGED=9]="PROPERTIES_CHANGED"})(f||(f={}));var H;(function(r){r[r.BOTTOM=0]="BOTTOM",r[r.MIDDLE=1]="MIDDLE",r[r.TOP=2]="TOP"})(H||(H={}));var d;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r[r.CENTER=3]="CENTER",r[r.JUSTIFIED=4]="JUSTIFIED",r[r.DISTRIBUTED=5]="DISTRIBUTED"})(d||(d={}));var k;(function(r){r[r.NONE=0]="NONE",r[r.UNDERLINE=1]="UNDERLINE",r[r.OVERLINE=2]="OVERLINE",r[r.STRIKE_THROUGH=4]="STRIKE_THROUGH"})(k||(k={}));const ut={c:"Ø",d:"°",p:"±","%":"%"},gt={l:d.LEFT,r:d.RIGHT,c:d.CENTER,j:d.JUSTIFIED,d:d.DISTRIBUTED};function ft(r){const[t,e,i]=r;return t<<16|e<<8|i}function X(r){return Math.max(0,Math.min(255,Math.round(r)))}function Q(r){return Math.max(0,Math.min(16777215,Math.round(r)))}function pt(r){return r===null?null:`#${Q(r).toString(16).padStart(6,"0")}`}function mt(r){if(!r)return null;const t=r.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(t))return t;if(/^[0-9a-f]{6}$/.test(t))return`#${t}`;if(/^#[0-9a-f]{3}$/.test(t)){const e=t[1],i=t[2],s=t[3];return`#${e}${e}${i}${i}${s}${s}`}if(/^[0-9a-f]{3}$/.test(t)){const e=t[0],i=t[1],s=t[2];return`#${e}${e}${i}${i}${s}${s}`}return null}function dt(r){if(!r)return null;const t=r.trim().toLowerCase();if(t==="transparent")return null;const e=mt(t);if(e)return Q(Number.parseInt(e.slice(1),16));const i=t.match(/^rgba?\((.*)\)$/);if(!i)return null;const s=i[1].replace(/\s*\/\s*/g," ").split(/[,\s]+/).map(c=>c.trim()).filter(Boolean);if(s.length<3)return null;const a=c=>{if(c.endsWith("%")){const l=Number.parseFloat(c.slice(0,-1));return X(l/100*255)}const u=Number.parseFloat(c);return X(u)},n=a(s[0]),h=a(s[1]),o=a(s[2]);return ft([n,h,o])}class xt{constructor(t){this.stack=[],this.stack.push(t)}push(t){this.stack.push(t)}pop(){if(this.stack.length<=1)return;const t=this.stack.pop(),e=this.stack[this.stack.length-1];return JSON.stringify(e.paragraph)!==JSON.stringify(t.paragraph)&&(e.paragraph={...t.paragraph}),t}get current(){return this.stack[this.stack.length-1]}get depth(){return this.stack.length-1}get root(){return this.stack[0]}setCurrent(t){this.stack[this.stack.length-1]=t}}class bt{constructor(t,e,i={}){this.continueStroke=!1,this.inStackContext=!1,this.scanner=new B(t);const s=e??new C;this.ctxStack=new xt(s),this.yieldPropertyCommands=i.yieldPropertyCommands??!1,this.resetParagraphParameters=i.resetParagraphParameters??!1,this.mifDecoder=i.mifDecoder??this.decodeMultiByteChar.bind(this),this.mifCodeLength=i.mifCodeLength??"auto"}decodeMultiByteChar(t){try{if(t.length===5){const e=t[0];let i="gbk";e==="1"?i="shift-jis":e==="2"&&(i="big5");const s=new Uint8Array([parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16)]);return new TextDecoder(i).decode(s)}else if(t.length===4){const e=new Uint8Array([parseInt(t.substr(0,2),16),parseInt(t.substr(2,2),16)]),s=new TextDecoder("gbk").decode(e);if(s!=="▯")return s;const n=new TextDecoder("big5").decode(e);if(n!=="▯")return n}return"▯"}catch{return"▯"}}extractMifCode(t){var e,i,s;if(t==="auto"){const a=(e=this.scanner.tail.match(/^[0-9A-Fa-f]{5}/))==null?void 0:e[0];if(a)return a;const n=(i=this.scanner.tail.match(/^[0-9A-Fa-f]{4}/))==null?void 0:i[0];return n||null}else return((s=this.scanner.tail.match(new RegExp(`^[0-9A-Fa-f]{${t}}`)))==null?void 0:s[0])??null}pushCtx(){this.ctxStack.push(this.ctxStack.current)}popCtx(){this.ctxStack.pop()}parseStacking(){const t=new B(this.extractExpression(!0));let e="",i="",s="";const a=()=>{let o=t.peek(),c=!1;return o.charCodeAt(0)<32&&(o=" "),o==="\\"&&(c=!0,t.consume(1),o=t.peek()),t.consume(1),[o,c]},n=()=>{let o="";for(;t.hasData;){const[c,u]=a();if(!u&&(c==="/"||c==="#"||c==="^"))return[o,c];o+=c}return[o,""]},h=o=>{let c="",u=o;for(;t.hasData;){const[l,g]=a();if(!(u&&l===" ")){if(u=!1,!g&&l===";")break;c+=l}}return c};return[e,s]=n(),s&&(i=h(s==="^")),e===""&&i.includes("I/")?[f.STACK,[" "," ","/"]]:s==="^"?[f.STACK,[e,i,"^"]]:[f.STACK,[e,i,s]]}parseProperties(t){const e=this.ctxStack.current.copy(),i=this.ctxStack.current.copy();switch(t){case"L":i.underline=!0,this.continueStroke=!0;break;case"l":i.underline=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"O":i.overline=!0,this.continueStroke=!0;break;case"o":i.overline=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"K":i.strikeThrough=!0,this.continueStroke=!0;break;case"k":i.strikeThrough=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"A":this.parseAlign(i);break;case"C":this.parseAciColor(i);break;case"c":this.parseRgbColor(i);break;case"H":this.parseHeight(i);break;case"W":this.parseWidth(i);break;case"Q":this.parseOblique(i);break;case"T":this.parseCharTracking(i);break;case"p":this.parseParagraphProperties(i);break;case"f":case"F":this.parseFontProperties(i);break;default:throw new Error(`Unknown command: ${t}`)}if(this.continueStroke=i.hasAnyStroke,i.continueStroke=this.continueStroke,this.ctxStack.setCurrent(i),this.yieldPropertyCommands){const s=this.getPropertyChanges(e,i);if(Object.keys(s).length>0)return{command:t,changes:s,depth:this.ctxStack.depth}}}getPropertyChanges(t,e){const i={};if(t.underline!==e.underline&&(i.underline=e.underline),t.overline!==e.overline&&(i.overline=e.overline),t.strikeThrough!==e.strikeThrough&&(i.strikeThrough=e.strikeThrough),t.color.aci!==e.color.aci&&(i.aci=e.color.aci),t.color.rgbValue!==e.color.rgbValue&&(i.rgb=e.color.rgb),t.align!==e.align&&(i.align=e.align),JSON.stringify(t.fontFace)!==JSON.stringify(e.fontFace)&&(i.fontFace=e.fontFace),(t.capHeight.value!==e.capHeight.value||t.capHeight.isRelative!==e.capHeight.isRelative)&&(i.capHeight=e.capHeight),(t.widthFactor.value!==e.widthFactor.value||t.widthFactor.isRelative!==e.widthFactor.isRelative)&&(i.widthFactor=e.widthFactor),(t.charTrackingFactor.value!==e.charTrackingFactor.value||t.charTrackingFactor.isRelative!==e.charTrackingFactor.isRelative)&&(i.charTrackingFactor=e.charTrackingFactor),t.oblique!==e.oblique&&(i.oblique=e.oblique),JSON.stringify(t.paragraph)!==JSON.stringify(e.paragraph)){const s={};t.paragraph.indent!==e.paragraph.indent&&(s.indent=e.paragraph.indent),t.paragraph.align!==e.paragraph.align&&(s.align=e.paragraph.align),t.paragraph.left!==e.paragraph.left&&(s.left=e.paragraph.left),t.paragraph.right!==e.paragraph.right&&(s.right=e.paragraph.right),JSON.stringify(t.paragraph.tabs)!==JSON.stringify(e.paragraph.tabs)&&(s.tabs=e.paragraph.tabs),Object.keys(s).length>0&&(i.paragraph=s)}return i}parseAlign(t){const e=this.scanner.get();"012".includes(e)?t.align=parseInt(e):t.align=H.BOTTOM,this.consumeOptionalTerminator()}parseHeight(t){const e=this.extractFloatExpression(!0);if(e)try{e.endsWith("x")?t.capHeight={value:parseFloat(e.slice(0,-1)),isRelative:!0}:t.capHeight={value:parseFloat(e),isRelative:!1}}catch{this.scanner.consume(-e.length);return}this.consumeOptionalTerminator()}parseWidth(t){const e=this.extractFloatExpression(!0);if(e)try{e.endsWith("x")?t.widthFactor={value:parseFloat(e.slice(0,-1)),isRelative:!0}:t.widthFactor={value:parseFloat(e),isRelative:!1}}catch{this.scanner.consume(-e.length);return}this.consumeOptionalTerminator()}parseCharTracking(t){const e=this.extractFloatExpression(!0);if(e)try{e.endsWith("x")?t.charTrackingFactor={value:Math.abs(parseFloat(e.slice(0,-1))),isRelative:!0}:t.charTrackingFactor={value:Math.abs(parseFloat(e)),isRelative:!1}}catch{this.scanner.consume(-e.length);return}this.consumeOptionalTerminator()}parseFloatValueOrFactor(t){const e=this.extractFloatExpression(!0);if(e)if(e.endsWith("x")){const i=parseFloat(e.slice(0,-1));t*=i}else t=parseFloat(e);return t}parseOblique(t){const e=this.extractFloatExpression(!1);e&&(t.oblique=parseFloat(e)),this.consumeOptionalTerminator()}parseAciColor(t){const e=this.extractIntExpression();if(e){const i=parseInt(e);i<257&&(t.color.aci=i)}this.consumeOptionalTerminator()}parseRgbColor(t){const e=this.extractIntExpression();if(e){const i=parseInt(e)&16777215;t.color.rgbValue=i}this.consumeOptionalTerminator()}extractFloatExpression(t=!1){const e=t?/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?x?/:/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,i=this.scanner.tail.match(e);if(i){const s=i[0];return this.scanner.consume(s.length),s}return""}extractIntExpression(){const t=this.scanner.tail.match(/^\d+/);if(t){const e=t[0];return this.scanner.consume(e.length),e}return""}extractExpression(t=!1){const e=this.scanner.find(";",t);if(e<0){const n=this.scanner.tail;return this.scanner.consume(n.length),n}const s=this.scanner.peek(e-this.scanner.currentIndex-1)==="\\",a=this.scanner.tail.slice(0,e-this.scanner.currentIndex+(s?1:0));return this.scanner.consume(a.length+1),a}parseFontProperties(t){const e=this.extractExpression().split("|");if(e.length>0&&e[0]){const i=e[0];let s="Regular",a=400;for(const n of e.slice(1))n.startsWith("b1")?a=700:n==="i"||n.startsWith("i1")?s="Italic":(n==="i0"||n.startsWith("i0"))&&(s="Regular");t.fontFace={family:i,style:s,weight:a}}}parseParagraphProperties(t){const e=new B(this.extractExpression());let i=t.paragraph.indent,s=t.paragraph.left,a=t.paragraph.right,n=t.paragraph.align,h=[];const o=()=>{const c=e.tail.match(/^[+-]?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/);if(c){const u=parseFloat(c[0]);for(e.consume(c[0].length);e.peek()===",";)e.consume(1);return u}return 0};for(;e.hasData;)switch(e.get()){case"i":i=o();break;case"l":s=o();break;case"r":a=o();break;case"x":break;case"q":{const u=e.get();for(n=gt[u]||d.DEFAULT;e.peek()===",";)e.consume(1);break}case"t":for(h=[];e.hasData;){const u=e.peek();if(u==="r"||u==="c"){e.consume(1);const l=o();h.push(u+l.toString())}else{const l=o();isNaN(l)?e.consume(1):h.push(l)}}break}t.paragraph={indent:i,left:s,right:a,align:n,tabs:h}}consumeOptionalTerminator(){this.scanner.peek()===";"&&this.scanner.consume(1)}*parse(){const t=f.WORD,e=f.SPACE;let i=null;function s(n){const h={...n.paragraph};n.paragraph={indent:0,left:0,right:0,align:d.DEFAULT,tabs:[]};const o={};return h.indent!==0&&(o.indent=0),h.left!==0&&(o.left=0),h.right!==0&&(o.right=0),h.align!==d.DEFAULT&&(o.align=d.DEFAULT),JSON.stringify(h.tabs)!==JSON.stringify([])&&(o.tabs=[]),o}const a=()=>{let n="";for(;this.scanner.hasData;){let h=!1,o=this.scanner.peek();const c=this.scanner.currentIndex;if(o.charCodeAt(0)<32){if(this.scanner.consume(1),o===" ")return[f.TABULATOR,null];if(o===`
|
|
2
2
|
`)return[f.NEW_PARAGRAPH,null];o=" "}if(o==="\\")if("\\{}".includes(this.scanner.peek(1)))h=!0,this.scanner.consume(1),o=this.scanner.peek();else{if(n)return[t,n];this.scanner.consume(1);const u=this.scanner.get();switch(u){case"~":return[f.NBSP,null];case"P":return[f.NEW_PARAGRAPH,null];case"N":return[f.NEW_COLUMN,null];case"X":return[f.WRAP_AT_DIMLINE,null];case"S":{this.inStackContext=!0;const l=this.parseStacking();return this.inStackContext=!1,l}case"m":case"M":if(this.scanner.peek()==="+"){this.scanner.consume(1);const l=this.extractMifCode(this.mifCodeLength);if(l){this.scanner.consume(l.length);const g=this.mifDecoder(l);return n?[t,n]:[t,g]}this.scanner.consume(-1)}n+="\\M";continue;case"U":if(this.scanner.peek()==="+"){this.scanner.consume(1);const l=this.scanner.tail.match(/^[0-9A-Fa-f]{4,8}/);if(l){const g=l[0];this.scanner.consume(g.length);const p=parseInt(g,16);let b="";try{b=String.fromCodePoint(p)}catch{b="▯"}return n?[t,n]:[t,b]}this.scanner.consume(-1)}n+="\\U";continue;default:if(u)try{const l=this.parseProperties(u);if(this.yieldPropertyCommands&&l)return[f.PROPERTIES_CHANGED,l];continue}catch{const l=this.scanner.tail.slice(c,this.scanner.currentIndex);n+=l}}continue}if(o==="%"&&this.scanner.peek(1)==="%"){const u=this.scanner.peek(2).toLowerCase(),l=ut[u];if(l){this.scanner.consume(3),n+=l;continue}else{const g=[u,this.scanner.peek(3),this.scanner.peek(4)];if(g.every(p=>p>="0"&&p<="9")){const p=Number.parseInt(g.join(""),10);this.scanner.consume(5),n+=String.fromCharCode(p)}else this.scanner.consume(3);continue}}if(o===" ")return n?(this.scanner.consume(1),i=e,[t,n]):(this.scanner.consume(1),[e,null]);if(!h){if(o==="{"){if(n)return[t,n];this.scanner.consume(1),this.pushCtx();continue}else if(o==="}"){if(n)return[t,n];if(this.scanner.consume(1),this.yieldPropertyCommands){const u=this.ctxStack.current;this.popCtx();const l=this.getPropertyChanges(u,this.ctxStack.current);if(Object.keys(l).length>0)return[f.PROPERTIES_CHANGED,{command:void 0,changes:l,depth:this.ctxStack.depth}]}else this.popCtx();continue}}if(!this.inStackContext&&o==="^"){const u=this.scanner.peek(1);if(u){const l=u.charCodeAt(0);if(this.scanner.consume(2),l===32)n+="^";else{if(l===73)return n?[t,n]:[f.TABULATOR,null];if(l===74)return n?[t,n]:[f.NEW_PARAGRAPH,null];if(l===77)continue;n+="▯"}continue}}this.scanner.consume(1),o.charCodeAt(0)>=32&&(n+=o)}return n?[t,n]:[f.NONE,null]};for(;;){const[n,h]=a.call(this);if(n){if(yield new $(n,this.ctxStack.current.copy(),h),n===f.NEW_PARAGRAPH&&this.resetParagraphParameters){const o=this.ctxStack.current,c=s(o);this.yieldPropertyCommands&&Object.keys(c).length>0&&(yield new $(f.PROPERTIES_CHANGED,o.copy(),{command:void 0,changes:{paragraph:c},depth:this.ctxStack.depth}))}i&&(yield new $(i,this.ctxStack.current.copy(),null),i=null)}else break}}}class B{constructor(t){this.text=t,this.textLen=t.length,this._index=0}get currentIndex(){return this._index}get isEmpty(){return this._index>=this.textLen}get hasData(){return this._index<this.textLen}get(){if(this.isEmpty)return"";const t=this.text[this._index];return this._index++,t}consume(t=1){this._index=Math.max(0,Math.min(this._index+t,this.textLen))}peek(t=0){const e=this._index+t;return e>=this.textLen||e<0?"":this.text[e]}find(t,e=!1){let i=this._index;for(;i<this.textLen;){if(e&&this.text[i]==="\\"){if(i+1<this.textLen){if(this.text[i+1]===t)return i+1;i+=2;continue}i++;continue}if(this.text[i]===t)return i;i++}return-1}get tail(){return this.text.slice(this._index)}isNextSpace(){return this.peek()===" "}consumeSpaces(){let t=0;for(;this.isNextSpace();)this.consume(),t++;return t}}class M{constructor(t){this._aci=256,this._rgbValue=null,Array.isArray(t)?this.rgb=t:typeof t=="number"?this.aci=t:this.aci=256}get aci(){return this._aci}set aci(t){if(t===null)this._aci=null;else if(t>=0&&t<=256)this._aci=t,this._rgbValue=null;else throw new Error("ACI not in range [0, 256]")}get rgb(){if(this._rgbValue===null)return null;const t=this._rgbValue>>16&255,e=this._rgbValue>>8&255,i=this._rgbValue&255;return[t,e,i]}set rgb(t){if(t){const[e,i,s]=t;this._rgbValue=(e&255)<<16|(i&255)<<8|s&255,this._aci=null}else this._rgbValue=null}get isRgb(){return this._rgbValue!==null}get isAci(){return this._rgbValue===null&&this._aci!==null}get rgbValue(){return this._rgbValue}set rgbValue(t){t===null?this._rgbValue=null:(this._rgbValue=t&16777215,this._aci=null)}copy(){const t=new M;return t._aci=this._aci,t._rgbValue=this._rgbValue,t}toObject(){return{aci:this._aci,rgb:this.rgb,rgbValue:this._rgbValue}}toCssColor(){return this._rgbValue!==null?pt(this._rgbValue):null}static fromCssColor(t){const e=dt(t);if(e===null)return null;const i=new M;return i.rgbValue=e,i}equals(t){return this._aci===t._aci&&this._rgbValue===t._rgbValue}}class C{constructor(){this._stroke=0,this.continueStroke=!1,this.color=new M,this.align=H.BOTTOM,this.fontFace={family:"",style:"Regular",weight:400},this._capHeight={value:1,isRelative:!1},this._widthFactor={value:1,isRelative:!1},this._charTrackingFactor={value:1,isRelative:!1},this.oblique=0,this.paragraph={indent:0,left:0,right:0,align:d.DEFAULT,tabs:[]}}get capHeight(){return this._capHeight}set capHeight(t){this._capHeight={value:Math.abs(t.value),isRelative:t.isRelative}}get widthFactor(){return this._widthFactor}set widthFactor(t){this._widthFactor={value:Math.abs(t.value),isRelative:t.isRelative}}get charTrackingFactor(){return this._charTrackingFactor}set charTrackingFactor(t){this._charTrackingFactor={value:Math.abs(t.value),isRelative:t.isRelative}}get aci(){return this.color.aci}set aci(t){this.color.aci=t}get rgb(){return this.color.rgb}set rgb(t){this.color.rgb=t}get italic(){return this.fontFace.style==="Italic"}set italic(t){this.fontFace.style=t?"Italic":"Regular"}get bold(){return(this.fontFace.weight||400)>=700}set bold(t){this.fontFace.weight=t?700:400}get underline(){return!!(this._stroke&k.UNDERLINE)}set underline(t){this._setStrokeState(k.UNDERLINE,t)}get strikeThrough(){return!!(this._stroke&k.STRIKE_THROUGH)}set strikeThrough(t){this._setStrokeState(k.STRIKE_THROUGH,t)}get overline(){return!!(this._stroke&k.OVERLINE)}set overline(t){this._setStrokeState(k.OVERLINE,t)}get hasAnyStroke(){return!!this._stroke}_setStrokeState(t,e=!0){e?this._stroke|=t:this._stroke&=~t}copy(){const t=new C;return t._stroke=this._stroke,t.continueStroke=this.continueStroke,t.color=this.color.copy(),t.align=this.align,t.fontFace={...this.fontFace},t._capHeight={...this._capHeight},t._widthFactor={...this._widthFactor},t._charTrackingFactor={...this._charTrackingFactor},t.oblique=this.oblique,t.paragraph={...this.paragraph},t}}class ${constructor(t,e,i){this.type=t,this.ctx=e,this.data=i}}class U{static toSvgTransform(t){const e=t.elements;return`matrix(${e[0]},${e[1]},${e[4]},${e[5]},${e[12]},${e[13]})`}static transformPoint(t,e){const i=t.elements,s=e.x,a=e.y,n=e.z??0,h=i[3]*s+i[7]*a+i[11]*n+i[15],o=h===0?1:1/h;return{x:(i[0]*s+i[4]*a+i[8]*n+i[12])*o,y:(i[1]*s+i[5]*a+i[9]*n+i[13])*o}}static transformBox(t,e){if(t.isEmpty())return;const i=t.min,s=t.max,a=[{x:i.x,y:i.y,z:0},{x:s.x,y:i.y,z:0},{x:s.x,y:s.y,z:0},{x:i.x,y:s.y,z:0}];let n=1/0,h=1/0,o=-1/0,c=-1/0;for(const u of a){const l=this.transformPoint(e,u);n=Math.min(n,l.x),h=Math.min(h,l.y),o=Math.max(o,l.x),c=Math.max(c,l.y)}t.min.set(n,h),t.max.set(o,c)}}class S{constructor(){this._objectId="",this._ownerId="",this._layerName="",this._visible=!0,this._userData={},this._box=new N,this._localSvg=""}get box(){return this._box}set box(t){this._box.copy(t)}get basePoint(){return this._basePoint}set basePoint(t){t==null?this._basePoint=t:this._basePoint=this._basePoint?this._basePoint.copy(t):new ht(t)}get svg(){return this.renderSvg()}set svg(t){this._localSvg=t}getLocalSvg(){return this._localSvg}renderSvg(){return this._localSvg?this._matrix?`<g transform="${U.toSvgTransform(this._matrix)}">
|
|
3
3
|
${this._localSvg}
|
|
4
4
|
</g>`:this._localSvg:""}get objectId(){return this._objectId}set objectId(t){this._objectId=t}get ownerId(){return this._ownerId}set ownerId(t){this._ownerId=t}get layerName(){return this._layerName}set layerName(t){this._layerName=t}get visible(){return this._visible}set visible(t){this._visible=t}get userData(){return this._userData}set userData(t){this._userData=t}applyMatrix(t){this._matrix?this._matrix=t.clone().multiply(this._matrix):this._matrix=t.clone(),U.transformBox(this._box,t)}recomputeBoundingBox(){}highlight(){}unhighlight(){}fastDeepClone(){return this}addChild(t){}}class m{static rgbToHex(t){const e=t>>16&255,i=t>>8&255,s=t&255;return`#${e.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}static resolveRgb(t,e,i){return i==="fill"&&t.color.isForeground&&this.isSolidBackgroundHatch(t)?e.backgroundColor:K.fromBackgroundColor(e.backgroundColor).resolveSubEntityTraitsRgb(t)}static strokeAttributes(t,e){const i={stroke:this.rgbToHex(this.resolveRgb(t,e,"line")),fill:"none"};if(!e.showLineWeight)i["stroke-width"]="1",i["vector-effect"]="non-scaling-stroke";else{const n=this.resolveStrokeWidth(t.lineWeight);n!=null&&(i["stroke-width"]=String(n))}const s=this.resolveOpacity(t);s!=null&&s<1&&(i["stroke-opacity"]=String(s));const a=this.strokeDasharray(t,e);return a&&(i["stroke-dasharray"]=a),i}static fillAttributes(t,e){const i={fill:this.rgbToHex(this.resolveRgb(t,e,"fill")),stroke:"none"},s=this.resolveOpacity(t);return s!=null&&s<1&&(i["fill-opacity"]=String(s)),i}static textAttributes(t,e){const i={fill:this.rgbToHex(this.resolveRgb(t,e,"text")),stroke:"none"},s=this.resolveOpacity(t);return s!=null&&s<1&&(i["fill-opacity"]=String(s)),i}static pointAttributes(t,e){return this.textAttributes(t,e)}static formatAttributes(t){return Object.entries(t).map(([e,i])=>`${e}="${yt(i)}"`).join(" ")}static tag(t,e,i){const s=this.formatAttributes(e);return i==null?`<${t} ${s}/>`:`<${t} ${s}>${i}</${t}>`}static isSolidBackgroundHatch(t){if((t.drawOrder??0)>=0)return!1;const e=t.fillType;return e.gradient?!1:!e.definitionLines||e.definitionLines.length===0}static resolveStrokeWidth(t){return t<0?null:Math.max(.01,t/100)}static resolveOpacity(t){var e;const i=(e=t.transparency)==null?void 0:e.alpha;return i==null||Number.isNaN(i)?null:Math.min(1,Math.max(0,i))}static strokeDasharray(t,e){const i=t.lineType.pattern;if(!i||i.length===0)return;const s=e.ltscale*e.celtscale*t.lineTypeScale,a=this.patternToDashSegments(i,s);if(a.length!==0)return a.join(" ")}static patternToDashSegments(t,e){const i=[];for(const s of t){let a=s.elementLength;a<0&&s.elementTypeFlag!==0&&(a=Math.abs(a)),a*=e,a===0&&(a=.5*e),i.push(Math.abs(a))}return i}}function yt(r){return r.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}const St=32;class vt extends S{constructor(t,e,i){super();const s=t.getPoints(St);let a="";for(const n of s){if(n.length===0)continue;const[h,...o]=n;a+=`M${h.x},${h.y}`;for(const c of o)a+=` L${c.x},${c.y}`;a+=" Z";for(const c of n)this._box.expandByPoint(c)}if(a){const n={d:a,"fill-rule":"evenodd",...m.fillAttributes(e,i)};this.svg=m.tag("path",n)}}}const _t=100;class kt extends S{constructor(t,e,i){super();const s=t.getPoints(_t).reduce((n,h,o)=>(n+=o===0?"M":"L",n+=`${h.x},${h.y}`,n),"");if(s){const n={d:s,...m.strokeAttributes(e,i)};this.svg=m.tag("path",n)}const a=t.box;this._box.min.copy(a.min),this._box.max.copy(a.max)}}const Tt=100;class wt extends S{constructor(t,e,i){super();const s=t.getPoints(Tt).reduce((n,h,o)=>(n+=o===0?"M":"L",n+=`${h.x},${h.y}`,n),"");if(s){const n={d:s,...m.strokeAttributes(e,i)};this.svg=m.tag("path",n)}const a=t.box;this._box.min.copy(a.min),this._box.max.copy(a.max)}}class D{static isSafeEmbeddedUrl(t){const e=t.trim();return e.startsWith("data:")||e.startsWith("#")}static sanitizeExternalReferences(t){return t.replace(/<(?:image|use)\b[^>]*\s(?:xlink:)?href="(?!data:|#)[^"]*"[^>]*\/?>\s*/gi,"")}static async rasterizeSvgDataUrl(t){return typeof document>"u"?t:new Promise((e,i)=>{const s=new Image;s.onload=()=>{const a=Math.max(1,s.naturalWidth||1),n=Math.max(1,s.naturalHeight||1),h=document.createElement("canvas");h.width=a,h.height=n;const o=h.getContext("2d");if(!o){i(new Error("Canvas 2D context unavailable"));return}o.drawImage(s,0,0,a,n),e(h.toDataURL("image/png"))},s.onerror=()=>i(new Error("Failed to rasterize embedded SVG image")),s.src=t})}}class Lt extends S{constructor(t){super(),this._childCount=t.length;const e=t.map(i=>i.renderSvg()).filter(Boolean).join(`
|
|
@@ -14,4 +14,4 @@ ${o}
|
|
|
14
14
|
<g transform="matrix(1,0,0,-1,0,0)">
|
|
15
15
|
${i}
|
|
16
16
|
</g>
|
|
17
|
-
</svg>`)}buildBackgroundRect(t){const e=m.rgbToHex(this._currentBackgroundColor),i=Math.max(t.width,1),s=Math.max(t.height,1);return` <rect x="${t.x}" y="${t.y}" width="${i}" height="${s}" fill="${e}"/>`}}const ce=new S;class le{async convert(t){q.prepareExport();const e=t.doc.database.tables.blockTable.modelSpace.newIterator(),i=new q;this.configureRenderer(i,t);for(const n of e)n.worldDraw(i);const s=await i.exportAsync(),a=st(t.doc.fileName||t.doc.docTitle,"svg");this.createFileAndDownloadIt(s,a)}configureRenderer(t,e){const i=e.doc.database;t.ltscale=i.ltscale,t.celtscale=i.celtscale,t.showLineWeight=!!i.lwdisplay,t.setFontMapping(nt.instance.fontMapping);const s=e.view,a=(s==null?void 0:s.backgroundColor)??16777215;t.currentBackgroundColor=a,t.changeForeground(a===0?16777215:0)}createFileAndDownloadIt(t,e){const i=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.setTimeout(()=>URL.revokeObjectURL(s),6e4)}}class ue extends it{async execute(t){await new le().convert(t)}}const ge="1.6.
|
|
17
|
+
</svg>`)}buildBackgroundRect(t){const e=m.rgbToHex(this._currentBackgroundColor),i=Math.max(t.width,1),s=Math.max(t.height,1);return` <rect x="${t.x}" y="${t.y}" width="${i}" height="${s}" fill="${e}"/>`}}const ce=new S;class le{async convert(t){q.prepareExport();const e=t.doc.database.tables.blockTable.modelSpace.newIterator(),i=new q;this.configureRenderer(i,t);for(const n of e)n.worldDraw(i);const s=await i.exportAsync(),a=st(t.doc.fileName||t.doc.docTitle,"svg");this.createFileAndDownloadIt(s,a)}configureRenderer(t,e){const i=e.doc.database;t.ltscale=i.ltscale,t.celtscale=i.celtscale,t.showLineWeight=!!i.lwdisplay,t.setFontMapping(nt.instance.fontMapping);const s=e.view,a=(s==null?void 0:s.backgroundColor)??16777215;t.currentBackgroundColor=a,t.changeForeground(a===0?16777215:0)}createFileAndDownloadIt(t,e){const i=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.setTimeout(()=>URL.revokeObjectURL(s),6e4)}}class ue extends it{async execute(t){await new le().convert(t)}}const ge="1.6.1",fe={version:ge};class pe{constructor(){this.name="SvgPlugin",this.version=fe.version,this.description="SVG export (csvg) command",this.registeredCommands=[]}onLoad(t,e){const i=et.SYSTEMT_COMMAND_GROUP_NAME;e.addCommand(i,"csvg","csvg",new ue),this.registeredCommands.push({group:i,name:"csvg"})}onUnload(t,e){for(const i of this.registeredCommands)e.removeCmd(i.group,i.name);this.registeredCommands=[]}}async function de(){return new pe}export{ue as AcApConvertToSvgCmd,le as AcApSvgConvertor,q as AcSvgRenderer,ye as SVG_PLUGIN_NAME,Se as SVG_PLUGIN_TRIGGERS,de as createSvgPlugin};
|