@qaecy/cue-ui 0.0.38 → 0.0.40

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/953.js DELETED
@@ -1 +0,0 @@
1
- (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[953],{5448(L,B,h){"use strict";h.d(B,{L:()=>D});var g=h(7705),S=h(2245),u=h(5547);const k=["*"];let D=(()=>{class l{fontSize=(0,g.hFB)("m");italic=(0,g.hFB)(!1);noWrap=(0,g.hFB)(!0);static \u0275fac=function(v){return new(v||l)};static \u0275cmp=u.VBU({type:l,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:k,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(v,f){1&v&&(u.NAR(),u.j41(0,"div")(1,"cue-typography",0),u.SdG(2),u.k0s()()),2&v&&(u.R7$(),u.Y8G("size",f.fontSize())("italic",f.italic())("noWrap",f.noWrap()))},dependencies:[S.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return l})()},9695(L,B,h){"use strict";h.d(B,{d:()=>l});var g=h(7705),S=h(29),u=h(5547);function k(e,s){if(1&e&&u.nrm(0,"cue-svg-icon",2),2&e){const v=u.XpG();u.Y8G("name",v.iconChecked())}}function D(e,s){if(1&e&&u.nrm(0,"cue-svg-icon",2),2&e){const v=u.XpG();u.Y8G("name",v.icon())}}let l=(()=>{class e{size=(0,g.hFB)("m");icon=(0,g.hFB)(void 0);iconChecked=(0,g.hFB)(void 0);disabled=(0,g.hFB)(!1);checked=(0,g.geq)(!1);toggleChange=(0,g.CGW)();toggle(){this.checked.set(!this.checked()),this.toggleChange.emit(this.checked())}static \u0275fac=function(f){return new(f||e)};static \u0275cmp=u.VBU({type:e,selectors:[["cue-input-switch"]],hostVars:5,hostBindings:function(f,M){2&f&&(u.BMQ("size",M.size()),u.AVh("checked",M.checked())("disabled",M.disabled()))},inputs:{size:[1,"size"],icon:[1,"icon"],iconChecked:[1,"iconChecked"],disabled:[1,"disabled"],checked:[1,"checked"]},outputs:{checked:"checkedChange",toggleChange:"toggleChange"},decls:4,vars:3,consts:[["type","checkbox",3,"click","checked","disabled"],[1,"indicator"],[3,"name"]],template:function(f,M){1&f&&(u.j41(0,"input",0),u.bIt("click",function(){return M.toggle()}),u.k0s(),u.j41(1,"div",1),u.nVh(2,k,1,1,"cue-svg-icon",2)(3,D,1,1,"cue-svg-icon",2),u.k0s()),2&f&&(u.Y8G("checked",M.checked())("disabled",M.disabled()),u.R7$(2),u.vxM(M.checked()&&M.iconChecked()?2:M.icon()?3:-1))},dependencies:[S.A],styles:["[_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-width: calc(var(--cue-input-switch-height) * 1.7);--cue-input-switch-inset: 2px;--cue-input-switch-indicator-width: calc( var(--cue-input-switch-height) - (2 * var(--cue-input-switch-inset)) );--cue-input-switch-icon-width: calc( var(--cue-input-switch-indicator-width) - (2 * var(--cue-input-switch-inset)) );display:block;flex-shrink:0;position:relative;height:var(--cue-input-switch-height);width:var(--cue-input-switch-width);border-radius:var(--cue-input-switch-height);--cue-icon-width: var(--cue-input-switch-icon-width);background:var(--cue-input-switch-background);transition:background-color .4s ease}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 12px;--cue-input-switch-inset: 1px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 14px;--cue-input-switch-inset: 1px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-inset: 2px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 22px;--cue-input-switch-inset: 3px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 28px;--cue-input-switch-inset: 3px}@container cue-container (width < 20em){[_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 10px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 12px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 18px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 20px}}.checked[_nghost-%COMP%]{background:var(--cue-input-switch-checked-background)}.disabled[_nghost-%COMP%]{background:var(--cue-input-switch-disabled-background);cursor:default}[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{pointer-events:none;position:absolute;left:var(--cue-input-switch-inset);top:var(--cue-input-switch-inset);width:var(--cue-input-switch-indicator-width);aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;background-color:var(--cue-input-switch-indicator-background);color:var(--cue-input-switch-indicator-foreground);transition:left .4s ease,background-color .4s ease,color .4s ease}.checked[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{left:calc(var(--cue-input-switch-width) - var(--cue-input-switch-inset) - var( --cue-input-switch-indicator-width ));background:var(--cue-input-switch-checked-indicator-background);color:var(--cue-input-switch-checked-indicator-foreground)}.disabled[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{background:var(--cue-input-switch-disabled-indicator-background);color:var(--cue-input-switch-disabled-indicator-foreground)}input[_ngcontent-%COMP%]{all:unset;position:absolute;inset:0;cursor:pointer;border-radius:var(--cue-input-switch-height)}input[_ngcontent-%COMP%]:focus-visible:not(:disabled) + .indicator[_ngcontent-%COMP%]{outline:1px solid var(--cue-input-switch-focus-color);outline-offset:2px}"]})}return e})()},5745(L,B,h){"use strict";h.d(B,{a:()=>K});var g=h(7705),S=h(5802),u=h(5187),k=h(5381),D=h(29),l=h(2245),e=h(5547);const s=["dialog"],v=["*"];function f($,j){if(1&$&&(e.j41(0,"cue-typography",4),e.EFF(1),e.k0s()),2&$){const _=e.XpG(2);e.R7$(),e.JRh(_.label())}}function M($,j){if(1&$){const _=e.RV6();e.j41(0,"cue-svg-icon",7),e.bIt("click",function(){S.eBV(_);const P=e.XpG(2);return S.Njj(P.onClose())}),e.k0s()}}function U($,j){if(1&$&&(e.j41(0,"cue-flexcontainer",3),e.bIt("click",function(y){return y.stopPropagation()}),e.nVh(1,f,2,1,"cue-typography",4),e.j41(2,"cue-card",5),e.bIt("click",function(y){return y.stopPropagation()}),e.nVh(3,M,1,0,"cue-svg-icon",6),e.j41(4,"cue-flexcontainer"),e.SdG(5),e.k0s()()()),2&$){const _=e.XpG();e.R7$(),e.vxM(_.label()?1:-1),e.R7$(),e.Aen(_.minWidth()?"position: relative; min-width: min("+_.minWidth()+", 80vw)":"position: relative"),e.R7$(),e.vxM(_.displayCloseBtn()?3:-1),e.R7$(),e.Aen("width: 100%; margin-top: "+(_.displayCloseBtn()?"16px":"0"))}}let K=(()=>{class ${visible=(0,g.geq)(!0);closeOnBackgroundClick=(0,g.hFB)(!0);displayCloseBtn=(0,g.hFB)(!0);label=(0,g.hFB)("");minWidth=(0,g.hFB)();close=(0,g.CGW)();dialogRef=g.ebz.required("dialog");constructor(){(0,S.QZP)(()=>{const _=this.dialogRef().nativeElement;this.visible()?_.open||_.showModal():_.open&&_.close()})}onBackdropClick(){this.closeOnBackgroundClick()&&this.onClose()}onClose(){this.visible.set(!1),this.close.emit()}static \u0275fac=function(y){return new(y||$)};static \u0275cmp=e.VBU({type:$,selectors:[["cue-modal"]],viewQuery:function(y,P){1&y&&e.wEZ(P.dialogRef,s,5),2&y&&e.NyB()},inputs:{visible:[1,"visible"],closeOnBackgroundClick:[1,"closeOnBackgroundClick"],displayCloseBtn:[1,"displayCloseBtn"],label:[1,"label"],minWidth:[1,"minWidth"]},outputs:{visible:"visibleChange",close:"close"},ngContentSelectors:v,decls:3,vars:1,consts:[["dialog",""],[1,"modal-dialog",3,"cancel","click"],["direction","column","gap","s","align","center",2,"max-width","80vw"],["direction","column","gap","s","align","center",2,"max-width","80vw",3,"click"],["weight","medium"],[3,"click"],["name","close",1,"close-btn"],["name","close",1,"close-btn",3,"click"]],template:function(y,P){1&y&&(e.NAR(),e.j41(0,"dialog",1,0),e.bIt("cancel",function(){return P.onClose()})("click",function(){return P.onBackdropClick()}),e.nVh(2,U,6,6,"cue-flexcontainer",2),e.k0s()),2&y&&(e.R7$(2),e.vxM(P.visible()?2:-1))},dependencies:[u.Z,k.n,D.A,l.Typography],styles:[".close-btn[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;cursor:pointer}.modal-dialog[_ngcontent-%COMP%]{padding:0;border:none;background:transparent;overflow:visible;margin:auto;outline:none}.modal-dialog[_ngcontent-%COMP%]::backdrop{background-color:var(--cue-modal-overlay-color, rgba(0, 0, 0, .5))}"]})}return $})()},2065(L,B,h){"use strict";function u(l,e,s="text/plain"){return function g(l,e="data.zip"){const s=document.createElement("a"),v=URL.createObjectURL(l);s.href=v,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(v)}(new Blob([l],{type:s}),e)}function k(l,e){const s=document.createElement("a");s.style.display="hidden",s.setAttribute("href",window.URL.createObjectURL(l)),s.setAttribute("download",e),document.body.appendChild(s),s.click(),s.remove()}h.d(B,{KE:()=>k,YN:()=>u})},7374(L){L.exports=function(){"use strict";var h=6e4,g=36e5,S="millisecond",u="second",k="minute",D="hour",l="day",e="week",s="month",v="quarter",f="year",M="date",U="Invalid Date",K=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(o){var i=["th","st","nd","rd"],t=o%100;return"["+o+(i[(t-20)%10]||i[t]||i[0])+"]"}},_=function(o,i,t){var c=String(o);return!c||c.length>=i?o:""+Array(i+1-c.length).join(t)+o},y={s:_,z:function(o){var i=-o.utcOffset(),t=Math.abs(i),c=Math.floor(t/60),n=t%60;return(i<=0?"+":"-")+_(c,2,"0")+":"+_(n,2,"0")},m:function o(i,t){if(i.date()<t.date())return-o(t,i);var c=12*(t.year()-i.year())+(t.month()-i.month()),n=i.clone().add(c,s),r=t-n<0,a=i.clone().add(c+(r?-1:1),s);return+(-(c+(t-n)/(r?n-a:a-n))||0)},a:function(o){return o<0?Math.ceil(o)||0:Math.floor(o)},p:function(o){return{M:s,y:f,w:e,d:l,D:M,h:D,m:k,s:u,ms:S,Q:v}[o]||String(o||"").toLowerCase().replace(/s$/,"")},u:function(o){return void 0===o}},P="en",E={};E[P]=j;var G="$isDayjsObject",V=function(o){return o instanceof F||!(!o||!o[G])},N=function o(i,t,c){var n;if(!i)return P;if("string"==typeof i){var r=i.toLowerCase();E[r]&&(n=r),t&&(E[r]=t,n=r);var a=i.split("-");if(!n&&a.length>1)return o(a[0])}else{var p=i.name;E[p]=i,n=p}return!c&&n&&(P=n),n||!c&&P},w=function(o,i){if(V(o))return o.clone();var t="object"==typeof i?i:{};return t.date=o,t.args=arguments,new F(t)},d=y;d.l=N,d.i=V,d.w=function(o,i){return w(o,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var F=function(){function o(t){this.$L=N(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[G]=!0}var i=o.prototype;return i.parse=function(t){this.$d=function(c){var n=c.date,r=c.utc;if(null===n)return new Date(NaN);if(d.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var a=n.match(K);if(a){var p=a[2]-1||0,m=(a[7]||"0").substring(0,3);return r?new Date(Date.UTC(a[1],p,a[3]||1,a[4]||0,a[5]||0,a[6]||0,m)):new Date(a[1],p,a[3]||1,a[4]||0,a[5]||0,a[6]||0,m)}}return new Date(n)}(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return d},i.isValid=function(){return this.$d.toString()!==U},i.isSame=function(t,c){var n=w(t);return this.startOf(c)<=n&&n<=this.endOf(c)},i.isAfter=function(t,c){return w(t)<this.startOf(c)},i.isBefore=function(t,c){return this.endOf(c)<w(t)},i.$g=function(t,c,n){return d.u(t)?this[c]:this.set(n,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,c){var n=this,r=!!d.u(c)||c,a=d.p(t),p=function(R,O){var T=d.w(n.$u?Date.UTC(n.$y,O,R):new Date(n.$y,O,R),n);return r?T:T.endOf(l)},m=function(R,O){return d.w(n.toDate()[R].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(O)),n)},b=this.$W,C=this.$M,x=this.$D,A="set"+(this.$u?"UTC":"");switch(a){case f:return r?p(1,0):p(31,11);case s:return r?p(1,C):p(0,C+1);case e:var W=this.$locale().weekStart||0,z=(b<W?b+7:b)-W;return p(r?x-z:x+(6-z),C);case l:case M:return m(A+"Hours",0);case D:return m(A+"Minutes",1);case k:return m(A+"Seconds",2);case u:return m(A+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,c){var n,r=d.p(t),a="set"+(this.$u?"UTC":""),p=(n={},n[l]=a+"Date",n[M]=a+"Date",n[s]=a+"Month",n[f]=a+"FullYear",n[D]=a+"Hours",n[k]=a+"Minutes",n[u]=a+"Seconds",n[S]=a+"Milliseconds",n)[r],m=r===l?this.$D+(c-this.$W):c;if(r===s||r===f){var b=this.clone().set(M,1);b.$d[p](m),b.init(),this.$d=b.set(M,Math.min(this.$D,b.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},i.set=function(t,c){return this.clone().$set(t,c)},i.get=function(t){return this[d.p(t)]()},i.add=function(t,c){var n,r=this;t=Number(t);var a=d.p(c),p=function(C){var x=w(r);return d.w(x.date(x.date()+Math.round(C*t)),r)};if(a===s)return this.set(s,this.$M+t);if(a===f)return this.set(f,this.$y+t);if(a===l)return p(1);if(a===e)return p(7);var m=(n={},n[k]=h,n[D]=g,n[u]=1e3,n)[a]||1,b=this.$d.getTime()+t*m;return d.w(b,this)},i.subtract=function(t,c){return this.add(-1*t,c)},i.format=function(t){var c=this,n=this.$locale();if(!this.isValid())return n.invalidDate||U;var r=t||"YYYY-MM-DDTHH:mm:ssZ",a=d.z(this),p=this.$H,m=this.$m,b=this.$M,C=n.weekdays,x=n.months,W=function(O,T,I,Y){return O&&(O[T]||O(c,r))||I[T].slice(0,Y)},z=function(O){return d.s(p%12||12,O,"0")},R=n.meridiem||function(O,T,I){var Y=O<12?"AM":"PM";return I?Y.toLowerCase():Y};return r.replace($,function(O,T){return T||function(I){switch(I){case"YY":return String(c.$y).slice(-2);case"YYYY":return d.s(c.$y,4,"0");case"M":return b+1;case"MM":return d.s(b+1,2,"0");case"MMM":return W(n.monthsShort,b,x,3);case"MMMM":return W(x,b);case"D":return c.$D;case"DD":return d.s(c.$D,2,"0");case"d":return String(c.$W);case"dd":return W(n.weekdaysMin,c.$W,C,2);case"ddd":return W(n.weekdaysShort,c.$W,C,3);case"dddd":return C[c.$W];case"H":return String(p);case"HH":return d.s(p,2,"0");case"h":return z(1);case"hh":return z(2);case"a":return R(p,m,!0);case"A":return R(p,m,!1);case"m":return String(m);case"mm":return d.s(m,2,"0");case"s":return String(c.$s);case"ss":return d.s(c.$s,2,"0");case"SSS":return d.s(c.$ms,3,"0");case"Z":return a}return null}(O)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,c,n){var r,a=this,p=d.p(c),m=w(t),b=(m.utcOffset()-this.utcOffset())*h,C=this-m,x=function(){return d.m(a,m)};switch(p){case f:r=x()/12;break;case s:r=x();break;case v:r=x()/3;break;case e:r=(C-b)/6048e5;break;case l:r=(C-b)/864e5;break;case D:r=C/g;break;case k:r=C/h;break;case u:r=C/1e3;break;default:r=C}return n?r:d.a(r)},i.daysInMonth=function(){return this.endOf(s).$D},i.$locale=function(){return E[this.$L]},i.locale=function(t,c){if(!t)return this.$L;var n=this.clone(),r=N(t,c,!0);return r&&(n.$L=r),n},i.clone=function(){return d.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},o}(),H=F.prototype;return w.prototype=H,[["$ms",S],["$s",u],["$m",k],["$H",D],["$W",l],["$M",s],["$y",f],["$D",M]].forEach(function(o){H[o[1]]=function(i){return this.$g(i,o[0],o[1])}}),w.extend=function(o,i){return o.$i||(o(i,F,w),o.$i=!0),w},w.locale=N,w.isDayjs=V,w.unix=function(o){return w(1e3*o)},w.en=E[P],w.Ls=E,w.p={},w}()}}]);
package/995.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[995],{6376(k,g,b){function d(s,e){let t=function m(s,e){let r=0;return s.color?r=s.color:e.tables&&e.tables.layer&&e.tables.layer.layers[s.layer]&&(r=e.tables.layer.layers[s.layer].color),(null==r||16777215===r)&&(r=0),r}(s,e).toString(16);for(;t.length<6;)t="0"+t;return"#"+t}function A(s){if(s=function T(s){let e=s.replace(/\\P/g,"\n");return e=e.replace(/\\X/g,"\n"),e}(s),!s.includes(";"))return{text:w(s)};let e=s;const r={};["f","A","Q","H","W","T"].forEach(i=>{r[i]=function $(s,e,r){const t=new RegExp(`(?<=${e})(.*?)(?=${r})`,"s"),i=s.match(t);return i?i[1].trim():void 0}(s,`\\\\${i}`,";"),void 0!==r[i]&&(e=e.replace(`\\${i}${r[i]};`,""))});const t=s.lastIndexOf(";");return s=w(s.substring(t+1)),e=e.replace(s,""),{text:s,formatting:r}}function w(s){return(s=(s=(s=(s=s.replace(/\\{/g,"\0LBRACE")).replace(/\\}/g,"\0RBRACE")).replace(/[{}]/g,"")).replace(/__LBRACE__/g,"{")).replace(/__RBRACE__/g,"}")}b.r(g),b.d(g,{DrawEntitySVG:()=>x});const f="http://www.w3.org/2000/svg";class x{_svg;_currentGroup;entityMap=new Map;_idCounter=0;constructor(){this._svg=document.createElementNS(f,"svg"),this._svg.setAttribute("xmlns",f)}fromEntity(e,r,t=!0){t||this._resetSVG(),Array.isArray(e)?e.forEach(i=>this.fromEntity(i,r,!0)):"ARC"===e.type?this._drawArc(e,r):"CIRCLE"===e.type?this._drawCircle(e,r):"INSERT"===e.type?this._drawBlock(e,r):"LINE"===e.type?this._drawLine(e,r):"LWPOLYLINE"===e.type||"POLYLINE"===e.type?this._drawPath(e,r):"POINT"===e.type?this._drawPoint(e,r):"SPLINE"===e.type?this._drawSpline(e,r):"SOLID"===e.type?this._drawSolid(e,r):"ELLIPSE"===e.type?this._drawEllipse(e,r):"TEXT"===e.type?this._drawText(e,r):"MTEXT"===e.type?this._drawMtext(e,r):"DIMENSION"===e.type&&!(7&e.dimensionType)&&this._drawDimension(e,r)}asString(){return this._svg.outerHTML}asElement(){return this._svg}_resetSVG(){this._svg=document.createElementNS(f,"svg"),this._svg.setAttribute("xmlns",f),this.entityMap.clear(),this._idCounter=0}_drawBlock(e,r){const t=r.blocks[e.name];if(!t||!t.entities)return;const i=this._appendElementOfType("g",e);this._currentGroup=i;const n=this._buildGroupTransformation(e);""!==n&&i.setAttribute("transform",n),t.entities.forEach(o=>{this.fromEntity(o,r)}),this._currentGroup=void 0}_drawLine(e,r){const t=this._appendElementOfType("line",e);t.setAttribute("x1",e.vertices[0].x.toString()),t.setAttribute("y1",e.vertices[0].y.toString()),t.setAttribute("x2",e.vertices[1].x.toString()),t.setAttribute("y2",e.vertices[1].y.toString()),this._setStrokeFill(e,r,t)}_drawPath(e,r){const t=e.vertices.some(c=>void 0!==c.bulge&&Math.abs(c.bulge)>1e-4);if(2===e.vertices.length&&!t)return this._drawLine(e,r);const i=this._appendElementOfType("path",e);let n=!0===e.shape||!0===e.closed,o=e.vertices;if(!n&&o.length>3){const c=o[0],a=o[o.length-1];Math.abs(c.x-a.x)<.001&&Math.abs(c.y-a.y)<.001&&(n=!0,o=o.slice(0,-1))}const u=this._verticeArrayToPath(o,n,e.extrusion);i.setAttribute("d",u),this._setStrokeFill(e,r,i)}_drawArc(e,r){const t=this._appendElementOfType("path",e),i=this._arcPath(e.center,e.radius,e.startAngle,e.endAngle,e.extrusion);t.setAttribute("d",i),this._setStrokeFill(e,r,t)}_drawCircle(e,r){const t=this._appendElementOfType("circle",e);t.setAttribute("cx",e.center.x.toString()),t.setAttribute("cy",e.center.y.toString()),t.setAttribute("r",e.radius.toString()),this._setStrokeFill(e,r,t)}_drawText(e,r){const t=this._appendElementOfType("text",e);t.setAttribute("x",e.startPoint.x.toString()),t.setAttribute("y",e.startPoint.y.toString());const i=A(e.text);t.innerHTML=i.text,this._setTextAppearance(e,r,t)}_drawPoint(e,r){const t=this._appendElementOfType("circle",e);t.setAttribute("cx",e.position.x.toString()),t.setAttribute("cy",e.position.y.toString()),t.setAttribute("r","0.0001"),t.setAttribute("stroke",d(e,r)),t.setAttribute("fill","none"),t.setAttribute("vector-effect","non-scaling-stroke"),t.setAttribute("stroke-width","2"),t.classList.add("dxf-path")}_drawDimension(e,r){const t=r.blocks[e.block];if(!t||!t.entities)return;const i=this._appendElementOfType("g",e);this._currentGroup=i,t.entities.forEach(n=>{this.fromEntity(n,r)}),this._currentGroup=void 0}_drawEllipse(e,r){}_drawSpline(e,r){}_drawSolid(e,r){}_drawMtext(e,r){const t=this._appendElementOfType("text",e);t.setAttribute("x",e.position.x.toString()),t.setAttribute("y",e.position.y.toString());const i=A(e.text);t.innerHTML=i.text,this._setMTextAppearance(e,r,t)}_setStrokeFill(e,r,t){t.setAttribute("stroke",d(e,r)),t.setAttribute("fill","none"),t.setAttribute("stroke-width",((void 0!==e.lineweight&&e.lineweight>0?e.lineweight:25)/1e5).toString()),t.setAttribute("vector-effect","non-scaling-stroke"),t.classList.add("dxf-path")}_setTextAppearance(e,r,t){t.setAttribute("fill",d(e,r)),t.setAttribute("font-size",(e.textHeight/1e3).toString()),e.rotation&&t.setAttribute("transform",`rotate(${e.rotation})`)}_setMTextAppearance(e,r,t){t.setAttribute("fill",d(e,r)),t.setAttribute("font-size",(e.height/1e3).toString()),e.rotation&&t.setAttribute("transform",`rotate(${e.rotation})`)}_buildGroupTransformation(e){let r="";return void 0!==e.position&&(r+=` translate(${e.position.x} ${e.position.y})`),void 0!==e.xScale&&void 0!==e.yScale&&(r+=` scale(${e.xScale} ${e.yScale})`),void 0!==e.rotation&&(r+=` rotate(${e.rotation})`),r.trim()}_appendElementOfType(e,r){const t=document.createElementNS(f,e);if(r){const i="dxf-entity-"+this._idCounter++;t.setAttribute("data-dxf-id",i),this.entityMap.set(i,r)}return void 0!==this._currentGroup?this._currentGroup.appendChild(t):this._svg.appendChild(t),t}_arcPath(e,r,t,i,n){const o=e.x+r*Math.cos(t),u=e.y+r*Math.sin(t),c=e.x+r*Math.cos(i),a=e.y+r*Math.sin(i),h=n&&n.z<0;let l=i-t;for(;l<0;)l+=2*Math.PI;for(;l>2*Math.PI;)l-=2*Math.PI;return l<1e-4?`M ${o} ${u}`:`M ${o} ${u} A ${r} ${r} 0 ${l>Math.PI?1:0} ${h?0:1} ${c} ${a}`}_verticeArrayToPath(e,r=!1,t){let i="";const n=r?e.length:e.length-1;for(let o=0;o<n;o++){const{x:u,y:c,bulge:a}=e[o],{x:h,y:l}=e[(o+1)%e.length];if(void 0!==a&&Math.abs(a)>1e-4){const _=Math.sqrt((u-h)**2+(c-l)**2),p=Math.abs(a),S=_/2*(1+p*p)/(2*p),E=t&&t.z<0;0===o&&(i+=`M ${u} ${c} `),i+=`A ${S} ${S} 0 ${p>1?1:0} ${a>0?E?0:1:E?1:0} ${h} ${l} `}else 0===o&&(i+=`M ${u} ${c} `),i+=`L ${h} ${l} `}return r&&(i+=" Z"),i.trim()}}}}]);