@mlightcad/cad-simple-viewer 1.7.8-preview.2 → 1.7.8-preview.3

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.
@@ -2,7 +2,7 @@
2
2
  `}function Dh(s){return s?`${s.replace(/\.(dwg|dxf)$/i,"")}.measurement.json`:"drawing.measurement.json"}const ne="measurement",be="measurement-live";let Zn=!0;function xl(){return Zn}function Nh(){Zn=!0}function Bh(s,e){Zn=e;const t=s.activeLayoutBtrId,i=s.htmlTransientManager;for(const n of i.groupsOnLayer(ne))(n.layoutId==null||n.layoutId===t)&&n.setVisible(e);i.setVisible(e,be),s.isHtmlDirty=!0}const mt=new Map,Fh=new WeakMap,Ji=new Map,kl=new Set,Sl=new Set;let Xt;function Ct(s){const e=Ji.get(s);return e?Xi(e):void 0}function Xn(){return Xt}function Cl(){return Xt?Ct(Xt):void 0}function Al(s){return kl.add(s),()=>{kl.delete(s)}}function Ao(){for(const s of kl)s()}function vk(s){return Sl.add(s),()=>{Sl.delete(s)}}function Qi(){for(const s of Sl)s()}function zh(){Qi()}function xk(s){const e=s.activeLayoutBtrId;return Ll(s).filter(t=>t.layoutId==null||t.layoutId===e)}function kk(s,e){const t=mt.get(s);return!(t!=null&&t.value)||!e?"":$n(e,t.value)}function Sk(s,e){const t=sh(e.geometry,Ck(s,e.id),(i,n)=>{const o=s.viewportToCanvas({x:i,y:n});return s.screenToWorld(o)});t&&(s.zoomTo(t,1.5),s.htmlTransientManager.selectGroup(e.id))}function Ck(s,e){const t=s.htmlTransientManager.getGroup(e);if(!t)return[];const i=[];for(const n of t.children){const o=n.element;if(o.classList.contains("ml-html-dot")||o.classList.contains("ml-html-grip"))continue;const r=o.getBoundingClientRect();r.width<=0&&r.height<=0||i.push(r)}return i}function Ak(s,e){s.htmlTransientManager.getGroup(e)&&(Xe(s,"Delete Measurement",()=>{s.htmlTransientManager.detach(e)}),s.isHtmlDirty=!0)}function _l(s,e){Ji.set(s,Xi(e))}function Pl(s,e,t){var l,c,d;const i=Ji.get(e.id),n=((l=t.color)==null?void 0:l.clone())??(i==null?void 0:i.color.clone());if(!n)return;const o={color:n,lineWeight:Te,fontSize:t.fontSize??(i==null?void 0:i.fontSize)??_i,textHeightMode:t.textHeightMode??(i==null?void 0:i.textHeightMode)??"adaptive",textHeightWcs:t.textHeightWcs??(t.textHeightMode==="custom"||i==null?void 0:i.textHeightWcs)};o.textHeightMode==="custom"&&t.textHeightWcs!=null&&(o.textHeightWcs=t.textHeightWcs);const r=t.fontSize!=null&&(i==null||t.fontSize!==i.fontSize)||t.textHeightWcs!=null&&(i==null||t.textHeightWcs!==i.textHeightWcs)||t.textHeightMode!=null&&(i==null||t.textHeightMode!==i.textHeightMode);_l(e.id,o);const a=mt.get(e.id);if(a&&(a.style=Xi(o),a.snapshot)){const h=a.snapshot.style,f=Co(o),y=o.textHeightMode==="custom"&&o.textHeightWcs!=null&&o.textHeightWcs>0?o.textHeightWcs:_k(s,o.fontSize,i==null?void 0:i.fontSize,h.textHeightWcs,r),g=(i==null?void 0:i.fontSize)??_i,b=fl(h.arrowSizeWcs,g,o.fontSize);a.snapshot={...a.snapshot,style:{...f,textHeightWcs:y,...b!=null&&b>0?{arrowSizeWcs:b}:{}}}}if(r){const h=(d=(c=mt.get(e.id))==null?void 0:c.snapshot)==null?void 0:d.style;Nt(s,{textHeightWcs:h==null?void 0:h.textHeightWcs,arrowSizeWcs:h==null?void 0:h.arrowSizeWcs,fontSizePx:o.fontSize,strokeScreenPx:Ce(Te),elements:[...e.children??[]],canvases:(e.canvases??[]).map(f=>f.canvas)})}Pk(s,e,o)}function _k(s,e,t,i,n){return n&&i!=null&&i>0&&t!=null&&t>0?i*(e/t):n||i==null||!(i>0)?Ae(e,s):i}function El(s,e){const t=s.htmlTransientManager.getSelectedGroups().filter(i=>i.layer===ne);t.length!==0&&Xe(s,"Measurement Style",()=>{for(const i of t)Pl(s,i,e)})}function Pk(s,e,t){var n,o,r;for(const a of e.children){const l=a;(n=l.setColor)==null||n.call(l,t.color),(o=l.setFontSize)==null||o.call(l,t.fontSize)}if(t.fontSize>0)for(const a of e.canvases??[])a.canvas.style.fontSize=`${t.fontSize}px`;const i=mt.get(e.id);(r=i==null?void 0:i.redraw)==null||r.call(i,t),s.isHtmlDirty=!0}function Ek(s,e){var t;for(const i of s.htmlTransientManager.groupsOnLayer(ne)){const n=mt.get(i.id);if(!(n!=null&&n.value))continue;const o=$n(e,n.value);for(const r of i.children){const a=r;(t=a.setText)==null||t.call(a,o)}}s.isHtmlDirty=!0,Qi()}function Ll(s){const e=[];for(const t of s.htmlTransientManager.groupsOnLayer(ne)){const i=mt.get(t.id);if(!(i!=null&&i.snapshot))continue;const n=i.style??Ji.get(t.id),o=i.snapshot.style;let r;if(n){const a=Co(n),l=o.arrowSizeWcs!=null&&o.arrowSizeWcs>0?o.arrowSizeWcs:i.snapshot.type==="distance"?Ae(kt,s):void 0;r={...a,lineWeight:Te,textHeightWcs:o.textHeightWcs??Ae(a.fontSize,s),...l!=null&&l>0?{arrowSizeWcs:l}:{}}}else{const{strokeWidthWcs:a,...l}=o;r={...l,lineWeight:Te}}e.push({...i.snapshot,id:t.id,layoutId:t.layoutId,style:r})}return e}function Rh(){mt.clear(),Ji.clear(),Xt=void 0,Ao(),Qi()}function Tl(s){const e=Fh.get(s);e&&(mt.set(s.id,e),e.style&&_l(s.id,e.style),Qi())}function jh(s,e,t){const i=(t==null?void 0:t.entityIds)??[],n=t??{};mt.set(e.id,n),Fh.set(e,n),t!=null&&t.style&&_l(e.id,t.style);const o=e.onSelectedChanged;e.onSelectedChanged=(l,c)=>{o==null||o(l,c),l?(Xt=c.id,Ao(),i.length>0&&s.highlight(i)):(Xt===c.id&&(Xt=void 0,Ao()),i.length>0&&s.unhighlight(i))};const r=e.onVisibleChanged;e.onVisibleChanged=(l,c)=>{r==null||r(l,c);for(const d of i)s.setTransientEntityVisible(d,l)};const a=e.onDispose;e.onDispose=()=>{var l;a==null||a(),mt.delete(e.id),Ji.delete(e.id),Xt===e.id&&(Xt=void 0,Ao()),i.length>0&&s.unhighlight(i);try{(l=t==null?void 0:t.dispose)==null||l.call(t)}catch{}Qi()},Xe(s,"Create Measurement",()=>{s.htmlTransientManager.add(e)}),!Zn&&(e.layoutId==null||e.layoutId===s.activeLayoutBtrId)&&e.setVisible(!1),s.isHtmlDirty=!0,Qi()}function Il(s){var e,t;return(t=(e=mt.get(s))==null?void 0:e.snapshot)==null?void 0:t.geometry}function hi(s){var t;const e=(t=mt.get(s))==null?void 0:t.snapshot;return e?{...e,geometry:e.geometry}:void 0}function Vh(s,e,t,i){if(!Zn)return;const n={x:e,y:t},o=a=>s.worldToScreen(a),r=s.htmlTransientManager.groupsOnLayer(ne);for(let a=r.length-1;a>=0;a--){const l=r[a];if(!l.visible)continue;const c=Il(l.id);if(c&&nl(c,n,o,i))return l.id}}function en(s,e){return s.minX>=e.minX&&s.maxX<=e.maxX&&s.minY>=e.minY&&s.maxY<=e.maxY}function Lk(s){var e;return 80+(((e=s.id)==null?void 0:e.length)??0)*2}function Gh(s,e=32){const t=s.length;if(t===0)return 0;const i=Math.min(t,e);let n=0;for(let o=0;o<i;o++)n+=Lk(s[o]);return Math.round(n/i*t)}const Hh=10;function Uh(s){return{minX:s.min.x,minY:s.min.y,maxX:s.max.x,maxY:s.max.y}}function Tk(s,e){return!(s.maxX<e.minX||s.minX>e.maxX||s.maxY<e.minY||s.minY>e.maxY)}function Wh(s,e,t){const i=Uh(s);return t==="window"?en(i,e):Tk(i,e)}function Ik(s,e,t,i){const n={x:e,y:t},o=l=>s.worldToScreen(l),r=s.activeLayoutBtrId,a=te().list();for(let l=a.length-1;l>=0;l--){const c=a[l];if(c.layoutId!=null&&c.layoutId!==r)continue;const d=s.htmlTransientManager.getGroup(c.id);if(d!=null&&d.visible&&Qa(c.geometry,n,o,i))return c.id}}function $h(s,e){const t=s.worldToScreen(e),i=Math.max(s.selectionBoxSize*2,4),n=a=>s.worldToScreen(a),o=s.activeLayoutBtrId,r=te().list();for(let a=r.length-1;a>=0;a--){const l=r[a];if(l.layoutId!=null&&l.layoutId!==o)continue;const c=s.htmlTransientManager.getGroup(l.id);if(c!=null&&c.visible&&Rn(l.geometry)&&Ja(l.geometry,t,n,i))return l}}function Kh(s,e,t){const i=Uh(e),n=s.activeLayoutBtrId,o=[];for(const r of te().list()){if(r.layoutId!=null&&r.layoutId!==n)continue;const a=s.htmlTransientManager.getGroup(r.id);if(!(a!=null&&a.visible))continue;const l=qa(r.geometry);l&&Wh(l,i,t)&&o.push(r.id)}if(!xl())return o;for(const r of s.htmlTransientManager.groupsOnLayer(ne)){if(!r.visible||r.layoutId!=null&&r.layoutId!==n)continue;const a=Il(r.id);if(!a)continue;const l=il(a);l&&Wh(l,i,t)&&o.push(r.id)}return o}function Mk(s,e,t){const i=s.htmlTransientManager;return t==="remove"?i.deselectGroup(e):t==="add"?i.selectGroup(e,!1):(i.selectGroup(e,!0),!0)}function Ok(s,e,t){const i=s.htmlTransientManager;let n=!1;if(t==="replace"){const o=i.hasSelection();i.deselectAll();for(const r of e)i.selectGroup(r,!1)&&(n=!0);return o||n}if(e.length===0)return!1;if(t==="add"){for(const o of e)i.selectGroup(o,!1)&&(n=!0);return n}for(const o of e)i.deselectGroup(o)&&(n=!0);return n}function Yh(s,e,t,i){const n=Math.max(s.selectionBoxSize*2,Hh),o=Ik(s,e,t,n),r=Vh(s,e,t,n),a=o??r;if(!a)return!1;const l=Mk(s,a,i);return l&&(s.isHtmlDirty=!0),l}function Zh(s,e,t,i){const n=Kh(s,e,t),o=Ok(s,n,i);return o&&(s.isHtmlDirty=!0),o}const _o="simkai";function Dk(){return{fontFamily:_o,fontSize:24,bold:!1,italic:!1,underline:!1,overline:!1,strike:!1,script:"normal",aci:null,rgb:16777215,obliqueAngle:0,widthFactor:1,tracking:1,paragraphAlignment:q.MTextParagraphAlignment.DEFAULT}}function Xh(s,e){return s.fontFamily===e.fontFamily&&s.fontSize===e.fontSize&&s.bold===e.bold&&s.italic===e.italic&&s.underline===e.underline&&s.overline===e.overline&&s.strike===e.strike&&s.script===e.script&&s.aci===e.aci&&s.rgb===e.rgb&&s.obliqueAngle===e.obliqueAngle&&s.widthFactor===e.widthFactor&&s.tracking===e.tracking&&s.paragraphAlignment===e.paragraphAlignment}function st(s,e,t){return Math.min(t,Math.max(e,s))}function Nk(s,e){const t=Math.max(s.y-s.height/2,e.y-e.height/2),i=Math.min(s.y+s.height/2,e.y+e.height/2);return Math.max(0,i-t)}class Bk{constructor(e){z(this,"containerBox");z(this,"charBoxes");z(this,"explicitLineBreakIndices",[]);z(this,"explicitLineLayouts",[]);z(this,"cursorLineHint",null);z(this,"verticalAlign");z(this,"lineTolerance");z(this,"debug");z(this,"lines",[]);z(this,"cursorIndex",0);z(this,"selection",null);z(this,"dragAnchor",null);z(this,"preferredX",null);z(this,"handlers",{cursorMove:new Set,selectionChange:new Set,linesUpdate:new Set});this.containerBox={...e.containerBox};const t=this.normalizeCharLayout(e.charBoxes,e.lineBreakIndices);this.charBoxes=t.charBoxes,this.explicitLineBreakIndices=t.lineBreakIndices,this.explicitLineLayouts=this.normalizeLineLayouts(e.lineLayouts),this.verticalAlign=e.verticalAlign??"center",this.lineTolerance=e.lineTolerance??5,this.debug=e.debug??!1,this.cursorIndex=st(e.initialIndex??0,0,this.charBoxes.length),this.recomputeLines(),e.initialSelection&&this.setSelection(e.initialSelection.start,e.initialSelection.end)}moveLeft(){if(this.selection&&!this.selection.isCollapsed){this.cursorIndex=this.selection.start,this.cursorLineHint=null,this.clearSelection(),this.emitCursor();return}const e=this.getCurrentLineIndex();if(e>=0){const t=this.lines[e];if(t){if(this.cursorIndex>t.startIndex&&this.cursorIndex<=t.endIndex+1){this.moveTo(this.cursorIndex-1,e);return}if(this.cursorIndex===t.startIndex&&e>0){this.moveTo(this.cursorIndex,e-1);return}}}this.moveTo(this.cursorIndex-1)}moveRight(){if(this.selection&&!this.selection.isCollapsed){this.cursorIndex=this.selection.end,this.cursorLineHint=null,this.clearSelection(),this.emitCursor();return}const e=this.getCurrentLineIndex();if(e>=0){const t=this.lines[e],i=e+1;if(t&&this.cursorIndex===t.endIndex&&i<this.lines.length&&this.isHardBreakChar(t.endIndex)){this.moveTo(t.endIndex+1,i);return}if(t&&this.cursorIndex===t.endIndex+1&&i<this.lines.length){this.moveTo(this.cursorIndex,i);return}}this.cursorIndex>=this.charBoxes.length||this.moveTo(this.cursorIndex+1)}moveUp(){this.moveVertical(-1)}moveDown(){this.moveVertical(1)}moveTo(e,t=null){const i=st(e,0,this.charBoxes.length);i===this.cursorIndex&&this.cursorLineHint===t||(this.cursorIndex=i,this.cursorLineHint=t,this.preferredX=null,this.emitCursor())}moveToStart(){this.moveTo(0)}moveToEnd(){this.moveTo(this.charBoxes.length)}moveToLineStart(){const e=this.getCurrentLineIndex();if(e<0){this.moveToStart();return}const t=this.lines[e];t&&this.moveTo(t.startIndex,e)}moveToLineEnd(){const e=this.getCurrentLineIndex();if(e<0){this.moveToEnd();return}const t=this.lines[e];t&&this.moveTo(t.endIndex+1,e)}setSelection(e,t){const i=st(e,0,this.charBoxes.length),n=st(t,0,this.charBoxes.length);this.setSelectionWithDirection(i,n)}clearSelection(){this.selection&&(this.selection=null,this.dragAnchor=null,this.emit("selectionChange",null))}selectAll(){this.setSelectionWithDirection(0,this.charBoxes.length),this.cursorIndex=this.charBoxes.length,this.cursorLineHint=null,this.emitCursor()}setSelectionWithDirection(e,t){const i=st(e,0,this.charBoxes.length),n=st(t,0,this.charBoxes.length),o=Math.min(i,n),r=Math.max(i,n);this.selection={start:o,end:r,isCollapsed:o===r,anchor:i,active:n,isBackwards:n<i,selectedLines:this.resolveSelectedLines(o,r)},this.cursorIndex=n,this.cursorLineHint=null,this.emit("selectionChange",this.selection),this.emitCursor()}extendSelection(e){var n;const t=st(e,0,this.charBoxes.length),i=((n=this.selection)==null?void 0:n.anchor)??this.cursorIndex;this.setSelectionWithDirection(i,t)}getSelection(){return this.selection?{...this.selection,selectedLines:[...this.selection.selectedLines]}:null}getSelectedCharBoxes(){return!this.selection||this.selection.isCollapsed?[]:this.charBoxes.slice(this.selection.start,this.selection.end).map(e=>({...e}))}getSelectedLines(){if(!this.selection||this.selection.isCollapsed)return[];const e=[],{start:t,end:i}=this.selection;for(let n=0;n<this.lines.length;n++){const o=this.lines[n];if(!o)continue;const r=o.startIndex,a=o.endIndex+1,l=Math.max(t,r),c=Math.min(i,a);l<c&&e.push({lineIndex:n,startOffset:l-r,endOffset:c-r})}return e}hasSelection(){return!!this.selection&&!this.selection.isCollapsed}moveToClick(e,t){const i=this.hitTest(e,t);if(i<0)return!1;const n=this.hitTestLine(t);return this.clearSelection(),this.moveTo(i,n>=0?n:null),!0}extendSelectionToClick(e,t){const i=this.hitTestClamped(e,t);i<0||(this.dragAnchor===null&&(this.dragAnchor=this.cursorIndex),this.setSelectionWithDirection(this.dragAnchor,i))}updateSelectionDrag(e,t){const i=this.hitTestClamped(e,t);i<0||(this.dragAnchor===null&&(this.dragAnchor=this.cursorIndex),this.setSelectionWithDirection(this.dragAnchor,i))}hitTest(e,t){if(!this.isInContainer(e,t))return-1;if(this.charBoxes.length===0)return 0;const i=this.hitTestLine(t);return i<0?-1:this.closestIndexInLine(i,e)}hitTestLine(e){if(this.lines.length===0)return-1;let t=-1,i=Number.POSITIVE_INFINITY;for(let n=0;n<this.lines.length;n++){const o=this.lines[n];if(!o)continue;const r=o.y-o.height/2,a=o.y+o.height/2;if(e>=r&&e<=a)return n;const l=e<r?r-e:e-a;l<i&&(i=l,t=n)}return t}getLines(){return this.lines.map(e=>({...e}))}getLineCount(){return this.lines.length}getLineIndex(e){if(this.lines.length===0)return-1;const t=st(e,0,this.charBoxes.length);for(let i=0;i<this.lines.length;i++){const n=this.lines[i];if(n&&t>=n.startIndex&&t<=n.endIndex+1)return i}return this.lines.length-1}getLineInfo(e){const t=this.lines[e];if(!t)throw new Error(`Line index out of range: ${e}`);return{...t}}getCurrentLineInfo(){const e=this.getCurrentLineIndex();if(e<0)return{startIndex:0,endIndex:-1,y:this.containerBox.y,height:this.containerBox.height,charCount:0};const t=this.lines[e];return t?{...t}:{startIndex:0,endIndex:-1,y:this.containerBox.y,height:this.containerBox.height,charCount:0}}getCursorState(){var n,o;const e=this.getCurrentLineIndex(),t=this.getCursorPosition(),i=e>=0&&this.lines[e]?this.lines[e]:{startIndex:0,endIndex:-1,y:this.containerBox.y,height:this.containerBox.height,charCount:0};return{index:this.cursorIndex,position:t,lineIndex:e,lineInfo:{...i},isAtStart:this.cursorIndex===0,isAtEnd:this.cursorIndex===this.charBoxes.length,isAtLineStart:e<0?!0:this.cursorIndex===(((n=this.lines[e])==null?void 0:n.startIndex)??this.cursorIndex),isAtLineEnd:e<0?!0:this.cursorIndex===(((o=this.lines[e])==null?void 0:o.endIndex)??this.cursorIndex-1)+1}}getCurrentIndex(){return this.cursorIndex}getCursorPosition(){if(this.lines.length===0)return{x:this.containerBox.x,y:this.alignY(this.containerBox.y,this.containerBox.height)};const e=this.getCurrentLineIndex(),t=this.lines[Math.max(0,e)];if(!t)return{x:this.containerBox.x,y:this.alignY(this.containerBox.y,this.containerBox.height)};const i=this.alignY(t.y,t.height);return{x:this.indexToX(this.cursorIndex,e),y:i}}getCharBoxes(){return this.charBoxes.map(e=>({...e}))}getContainerBox(){return{...this.containerBox}}updateData(e,t,i,n){this.containerBox={...e};const o=this.normalizeCharLayout(t,i);if(this.charBoxes=o.charBoxes,this.explicitLineBreakIndices=o.lineBreakIndices,this.explicitLineLayouts=this.normalizeLineLayouts(n),this.recomputeLines(),this.cursorIndex=st(this.cursorIndex,0,this.charBoxes.length),this.cursorLineHint=null,this.selection){const r=st(this.selection.anchor,0,this.charBoxes.length),a=st(this.selection.active,0,this.charBoxes.length);r===a?this.selection=null:this.setSelectionWithDirection(r,a)}this.emit("linesUpdate",this.getLines()),this.emitCursor()}setLineTolerance(e){this.lineTolerance=Math.max(0,e),this.recomputeLines(),this.emit("linesUpdate",this.getLines()),this.emitCursor(),this.selection&&(this.selection.selectedLines=this.resolveSelectedLines(this.selection.start,this.selection.end),this.emit("selectionChange",this.selection))}on(e,t){this.handlers[e].add(t)}off(e,t){(e==="cursorMove"||e==="selectionChange"||e==="linesUpdate")&&this.handlers[e].delete(t)}enableDebug(){this.debug=!0}disableDebug(){this.debug=!1}getDebugInfo(){return{debug:this.debug,container:this.getContainerBox(),cursor:this.getCursorState(),selection:this.getSelection(),lines:this.getLines(),gaps:this.lines.map((e,t)=>this.getGapPositions(t))}}destroy(){this.handlers.cursorMove.clear(),this.handlers.selectionChange.clear(),this.handlers.linesUpdate.clear(),this.selection=null,this.dragAnchor=null,this.preferredX=null}emitCursor(){this.emit("cursorMove",this.getCursorState())}emit(e,t){for(const i of this.handlers[e])i(t)}moveVertical(e){const t=this.getCurrentLineIndex();if(t<0)return;const i=this.lines[t],n=t+e;if(n<0||n>=this.lines.length)return;(this.preferredX===null||(i==null?void 0:i.charCount)===0)&&(this.preferredX=this.getCursorPosition().x);const o=this.closestIndexInLine(n,this.preferredX);this.cursorIndex=o,this.cursorLineHint=n,this.emitCursor()}getCurrentLineIndex(){const e=this.getLineIndex(this.cursorIndex);if(e<0||this.cursorLineHint===null)return e;const t=this.lines[this.cursorLineHint];return t&&this.cursorIndex>=t.startIndex&&this.cursorIndex<=t.endIndex+1?this.cursorLineHint:e}isHardBreakChar(e){const t=this.charBoxes[e];return t?t.width===0:!1}resolveSelectedLines(e,t){if(e===t)return[];const i=[];for(let n=0;n<this.lines.length;n++){const o=this.lines[n];o&&t>o.startIndex&&e<o.endIndex+1&&i.push(n)}return i}isInContainer(e,t){return e>=this.containerBox.x&&e<=this.containerBox.x+this.containerBox.width&&t>=this.containerBox.y&&t<=this.containerBox.y+this.containerBox.height}hitTestClamped(e,t){if(this.charBoxes.length===0)return 0;const i=this.lines.length===0?-1:this.hitTestLine(t);return i<0?e<=this.containerBox.x?0:e>=this.containerBox.x+this.containerBox.width?this.charBoxes.length:st(this.cursorIndex,0,this.charBoxes.length):this.closestIndexInLine(i,e)}recomputeLines(){if(this.explicitLineBreakIndices.length>0){this.lines=this.linesFromBreakIndices(this.charBoxes,this.explicitLineBreakIndices,this.explicitLineLayouts);return}this.lines=this.detectLines(this.charBoxes,this.lineTolerance)}normalizeCharLayout(e,t){const i=[],n=[];for(const a of e){if(!a){n.push(i.length);continue}i.push({...a})}const o=[...n,...t??[]],r=this.normalizeBreakIndices(o,i.length);return{charBoxes:i,lineBreakIndices:r}}normalizeBreakIndices(e,t){if(e.length===0)return[];const i=[];for(const n of e){if(!Number.isFinite(n))continue;const o=st(Math.round(n),0,t);i.push(o)}return i.sort((n,o)=>n-o)}normalizeLineLayouts(e){if(!e||e.length===0)return[];const t=[];for(const i of e)i&&(!Number.isFinite(i.y)||!Number.isFinite(i.height)||t.push({y:i.y,height:Math.max(1,i.height)}));return t}linesFromBreakIndices(e,t,i){if(e.length===0&&t.length===0)return[];if(t.length===0)return this.detectLines(e,this.lineTolerance);const n=[];let o=0;for(const r of t)if(!(r<o||r>e.length)){if(r===o){n.push(this.createEmptyLine(o,n[n.length-1],i[n.length]));continue}n.push(this.withLineLayout(this.aggregateLine(e,o,r-1),i[n.length])),o=r}return o<e.length?n.push(this.withLineLayout(this.aggregateLine(e,o,e.length-1),i[n.length])):n.push(this.createEmptyLine(o,n[n.length-1],i[n.length])),n}detectLines(e,t){if(e.length===0)return[];const i=[],n=.65;let o=0;for(let r=1;r<e.length;r++){const a=e[r-1],l=e[r];if(!a||!l)continue;const c=Math.abs(l.y-a.y),d=l.x+t<a.x,h=Nk(a,l),f=Math.min(a.height,l.height),g=(f>0?h/f:0)<n;(d||c>t&&g)&&(i.push(this.aggregateLine(e,o,r-1)),o=r)}return i.push(this.aggregateLine(e,o,e.length-1)),i}aggregateLine(e,t,i){let n=0,o=0,r=0;for(let a=t;a<=i;a++){const l=e[a];l&&(n+=l.y,o+=1,r=Math.max(r,l.height))}return o===0?{startIndex:t,endIndex:i,y:this.containerBox.y,height:this.containerBox.height,charCount:Math.max(0,i-t+1)}:{startIndex:t,endIndex:i,y:n/o,height:r,charCount:i-t+1}}withLineLayout(e,t){return t?{...e,y:t.y,height:Math.max(1,t.height)}:e}createEmptyLine(e,t,i){if(i)return{startIndex:e,endIndex:e-1,y:i.y,height:Math.max(1,i.height),charCount:0};const n=Math.max(1,(t==null?void 0:t.height)??this.containerBox.height),o=t!==void 0?t.y+n:this.alignY(this.containerBox.y,this.containerBox.height);return{startIndex:e,endIndex:e-1,y:o,height:n,charCount:0}}alignY(e,t){return this.verticalAlign==="top"?e-t/2:this.verticalAlign==="bottom"?e+t/2:e}indexToX(e,t){if(this.charBoxes.length===0)return this.containerBox.x;if(e<=0)return this.containerBox.x;const i=t??this.getLineIndex(e);if(i<0)return this.containerBox.x;const n=this.lines[i];if(!n)return this.containerBox.x;if(e<=n.startIndex)return this.containerBox.x;if(e>n.endIndex+1){const r=this.charBoxes[this.charBoxes.length-1];return r?r.x+r.width:this.containerBox.x}const o=this.charBoxes[e-1];return o?o.x+o.width:this.containerBox.x}getGapPositions(e){const t=this.lines[e];if(!t)return[];const i=[{index:t.startIndex,x:this.containerBox.x}];for(let n=t.startIndex;n<=t.endIndex;n++){const o=this.charBoxes[n];o&&i.push({index:n+1,x:o.x+o.width})}return i}closestIndexInLine(e,t){const i=this.getGapPositions(e);if(i.length===0)return 0;let n=i[0],o=Math.abs(t-n.x);for(let r=1;r<i.length;r++){const a=i[r];if(!a)continue;const l=Math.abs(t-a.x);l<o&&(n=a,o=l)}return n.index}}const Fk={width:4,height:24,heightMode:"lineHeight",color:"#00f5ff",glowColor:"#00f5ff",glowIntensity:.9,blinkSpeed:1.05,blinkEnabled:!0,billboard:!0,depthTest:!1,renderOrder:100,mode:"plane"},zk={fillColor:"rgba(0,120,255,0.30)",blendMode:"normal",animate:!1,strategy:"perChar"},Rk={charBoxColor:"rgba(64,160,255,0.55)",charBoxFill:"rgba(64,160,255,0.10)",charIndexColor:"rgba(255,255,255,0.85)",rowHoverColor:"rgba(200,200,200,0.10)",rowBoundaryColor:"rgba(255,255,255,0.22)",gapColor:"rgba(255,153,0,0.7)",baselineColor:"rgba(255,51,51,0.55)",containerColor:"rgba(255,255,255,0.30)"},jk={showCharBoxes:!0,showLineIndices:!0,showCharIndices:!0,showChars:!0};class Vk{constructor(e){z(this,"renderer");z(this,"cursorStyle");z(this,"selectionStyle");z(this,"debugStyle");z(this,"debugVisibility");z(this,"enableSelection");z(this,"enableDebug");z(this,"debugYAxisUp");z(this,"visible",!0);z(this,"cursorState",null);z(this,"selectionBoxes",[]);z(this,"debugData",null);z(this,"viewTransform",{x:0,y:0,scaleX:1,scaleY:1,rotation:0});this.renderer=e.renderer,this.cursorStyle={...Fk,...e.cursorStyle},this.selectionStyle={...zk,...e.selectionStyle},this.debugStyle={...Rk,...e.debugStyle},this.debugVisibility={...jk,...e.debugVisibility},this.enableSelection=e.enableSelection??!0,this.enableDebug=e.enableDebug??!1,this.debugYAxisUp=e.debugYAxisUp??!1}updateCursor(e,t){this.cursorState={position:e,lineHeight:t}}updateSelection(e){this.selectionBoxes=e.map(t=>({...t}))}updateDebugInfo(e){const t={containerBox:{...e.containerBox},charBoxes:e.charBoxes.map(i=>({...i})),lines:e.lines.map(i=>({...i}))};e.chars&&(t.chars=[...e.chars]),e.gapPositions&&(t.gapPositions=[...e.gapPositions]),e.hoverLineIndex!==void 0&&(t.hoverLineIndex=e.hoverLineIndex),this.debugData=t}setCursorStyle(e){this.cursorStyle={...this.cursorStyle,...e}}setSelectionStyle(e){this.selectionStyle={...this.selectionStyle,...e}}setDebugMode(e){this.enableDebug=e}setDebugVisibility(e){this.debugVisibility={...this.debugVisibility,...e}}setViewTransform(e){this.viewTransform={...this.viewTransform,...e}}show(){this.visible=!0}hide(){this.visible=!1}toggle(){this.visible=!this.visible}render(){if(this.renderer.beginFrame(),!this.visible){this.renderer.endFrame();return}this.renderer.setTransform({x:this.viewTransform.x??0,y:this.viewTransform.y??0,scaleX:this.viewTransform.scaleX??1,scaleY:this.viewTransform.scaleY??1,rotation:this.viewTransform.rotation??0}),this.enableDebug&&this.debugData&&this.drawDebug(this.debugData),this.enableSelection&&this.selectionBoxes.length>0&&this.drawSelection(this.selectionBoxes),this.cursorState&&this.drawCursor(this.cursorState.position,this.cursorState.lineHeight),this.renderer.resetTransform(),this.renderer.endFrame()}dispose(){this.renderer.destroy(),this.selectionBoxes=[],this.cursorState=null,this.debugData=null}drawCursor(e,t){const i=Math.max(.2,this.cursorStyle.blinkSpeed)*1e3;if(!(!this.cursorStyle.blinkEnabled||Date.now()%i<i/2))return;const o=this.cursorStyle.heightMode==="fixed"?this.cursorStyle.height:Math.max(this.cursorStyle.height,t*.8);this.cursorStyle.glowColor&&(this.cursorStyle.glowIntensity??0)>0&&this.renderer.drawLine({x1:e.x,y1:e.y-o/2,x2:e.x,y2:e.y+o/2,color:this.cursorStyle.glowColor,width:this.cursorStyle.width+2,opacity:Math.min(1,this.cursorStyle.glowIntensity??0)}),this.renderer.drawLine({x1:e.x,y1:e.y-o/2,x2:e.x,y2:e.y+o/2,color:this.cursorStyle.color,width:this.cursorStyle.width,opacity:1})}drawSelection(e){if(this.selectionStyle.strategy==="merged"){this.mergeBoxes(e).forEach(t=>this.drawSelectionQuad(t));return}e.forEach(t=>this.drawSelectionQuad(t))}drawSelectionQuad(e){const t={x:e.x,y:e.y,width:e.width,height:e.height,fillColor:this.selectionStyle.fillColor,blendMode:this.selectionStyle.blendMode==="additive"?"lighter":this.selectionStyle.blendMode==="multiply"?"multiply":"source-over"};this.renderer.drawQuad({...t,...this.selectionStyle.borderColor?{borderColor:this.selectionStyle.borderColor}:{},...this.selectionStyle.borderWidth!==void 0?{borderWidth:this.selectionStyle.borderWidth}:{},...this.selectionStyle.cornerRadius!==void 0?{cornerRadius:this.selectionStyle.cornerRadius}:{}})}drawDebug(e){var i;this.renderer.drawBox({box:{x:e.containerBox.x,y:e.containerBox.y+e.containerBox.height/2,width:e.containerBox.width,height:e.containerBox.height},color:this.debugStyle.containerColor,opacity:1,lineWidth:1});const t=e.containerBox.x+e.containerBox.width+60;e.lines.forEach((n,o)=>{const r=this.debugYAxisUp?n.y+n.height/2:n.y-n.height/2,a=this.debugYAxisUp?n.y-n.height/2:n.y+n.height/2;e.hoverLineIndex===o&&this.renderer.drawQuad({x:0,y:n.y,width:t,height:n.height,fillColor:this.debugStyle.rowHoverColor}),this.renderer.drawLine({x1:0,y1:r,x2:t,y2:r,color:this.debugStyle.rowBoundaryColor,dashed:[5,5]}),this.renderer.drawLine({x1:0,y1:a,x2:t,y2:a,color:this.debugStyle.rowBoundaryColor,dashed:[5,5]}),this.debugVisibility.showLineIndices&&this.renderer.drawText({text:`L${o}`,x:8,y:r+(this.debugYAxisUp?-2:2),color:"rgba(255,255,255,0.65)",font:"12px monospace"})}),e.charBoxes.forEach((n,o)=>{var c;const r=this.debugYAxisUp?n.y+n.height/2:n.y-n.height/2,a=this.debugYAxisUp?-2:2,l=this.debugYAxisUp?-Math.max(8,n.height*.2):Math.max(8,n.height*.2);if(this.debugVisibility.showCharBoxes&&this.renderer.drawQuad({x:n.x,y:n.y,width:n.width,height:n.height,fillColor:this.debugStyle.charBoxFill,borderColor:this.debugStyle.charBoxColor,borderWidth:1}),this.debugVisibility.showCharIndices&&this.renderer.drawText({text:String(o),x:n.x+2,y:r+a,color:this.debugStyle.charIndexColor,font:"10px monospace"}),this.debugVisibility.showChars){const d=(c=e.chars)==null?void 0:c[o];if(!d)return;this.renderer.drawText({text:d,x:n.x+2,y:r+l,color:"rgba(255,255,255,0.95)",font:`${Math.max(12,Math.round(n.height*.6))}px monospace`})}}),(i=e.gapPositions)==null||i.forEach(n=>{this.renderer.drawLine({x1:n.x,y1:n.y-n.height/2,x2:n.x,y2:n.y+n.height/2,color:this.debugStyle.gapColor,opacity:n.strong?.9:.55,width:1})})}mergeBoxes(e){if(e.length===0)return[];const t=[...e].sort((n,o)=>n.y===o.y?n.x-o.x:n.y-o.y),i=[];for(const n of t){const o=i[i.length-1];if(!o){i.push({...n});continue}const r=Math.abs(o.y-n.y)<=1,a=n.x<=o.x+o.width+1,l=Math.abs(o.height-n.height)<=1;r&&a&&l?o.width=Math.max(o.x+o.width,n.x+n.width)-o.x:i.push({...n})}return i}}function Po(s){const e=s.match(/rgba?\(([^)]+)\)/i);if(e){const n=(e[1]??"").split(",").map(c=>Number(c.trim())),[o=255,r=255,a=255,l=1]=n;return{color:new V.Color(o/255,r/255,a/255),alpha:Number.isFinite(l)?l:1}}const t=new V.Color;return t.setStyle(s),{color:t,alpha:1}}class Gk{constructor(e){z(this,"scene");z(this,"camera");z(this,"frameGroup",new V.Group);z(this,"currentTransform",{x:0,y:0,scaleX:1,scaleY:1,rotation:0});z(this,"canvas",null);this.scene=e.scene,this.camera=e.camera,this.scene.add(this.frameGroup)}initialize(e){this.canvas=e}destroy(){this.clearFrame(),this.scene.remove(this.frameGroup)}beginFrame(){this.clearFrame()}endFrame(){this.camera}drawQuad(e){const t=this.currentTransform.scaleX??1,i=this.currentTransform.scaleY??1,n=this.transformPoint(e.x+e.width/2,e.y),o=this.createQuadMesh(n.x-e.width*t/2,n.y,Math.abs(e.width*t),Math.abs(e.height*i),e.fillColor,e.opacity);if(o&&this.frameGroup.add(o),e.borderColor){const r=this.createRectBorder(n.x-e.width*t/2,n.y,Math.abs(e.width*t),Math.abs(e.height*i),e.borderColor,e.borderWidth??1,e.opacity??1);this.frameGroup.add(r)}}drawLine(e){const t=this.transformPoint(e.x1,e.y1),i=this.transformPoint(e.x2,e.y2),n=Po(e.color),o=(e.opacity??1)*n.alpha;if(e.dashed&&e.dashed.length>0){const d=[new V.Vector3(t.x,t.y,0),new V.Vector3(i.x,i.y,0)],h=new V.BufferGeometry().setFromPoints(d),f=new V.LineDashedMaterial({color:n.color,linewidth:e.width??1,transparent:o<1,opacity:o,dashSize:e.dashed[0]??4,gapSize:e.dashed[1]??2,depthTest:!1}),y=new V.Line(h,f);y.computeLineDistances(),y.renderOrder=e.renderOrder??1,this.frameGroup.add(y);return}const r=new Gx.LineGeometry;r.setPositions([t.x,t.y,0,i.x,i.y,0]);const a=new Hx.LineMaterial({color:n.color,linewidth:e.width??1,worldUnits:!1,transparent:o<1,opacity:o,depthTest:!1}),l=this.getResolution();a.resolution.set(l.x,l.y);const c=new Vx.Line2(r,a);c.computeLineDistances(),c.renderOrder=e.renderOrder??1,this.frameGroup.add(c)}drawText(e){var P;const t=e.font??"20px monospace",i=Number(((P=t.match(/(\d+(?:\.\d+)?)px/))==null?void 0:P[1])??20),n=4,o=document.createElement("canvas");let r=o.getContext("2d");if(!r)return;r.font=t;const l=Math.max(1,Math.ceil(r.measureText(e.text).width))+n*2,c=Math.max(1,Math.ceil(i*1.4));if(o.width=l,o.height=c,r=o.getContext("2d"),!r)return;r.clearRect(0,0,o.width,o.height),r.font=t;const d=e.align??"left",h=e.baseline??"top";r.textAlign=d,r.textBaseline=h;const f=Po(e.color);r.fillStyle=`rgba(${Math.round(f.color.r*255)}, ${Math.round(f.color.g*255)}, ${Math.round(f.color.b*255)}, ${e.opacity??f.alpha})`;const y=d==="center"?o.width/2:d==="right"?o.width-n:n,g=h==="middle"?o.height/2:h==="bottom"?o.height-n:n;r.fillText(e.text,y,g);const b=this.isYAxisUp(),w=new V.CanvasTexture(o);w.flipY=b,w.needsUpdate=!0;const S=Math.abs(this.currentTransform.scaleX??1),x=Math.abs(this.currentTransform.scaleY??1),_=Math.max(1,o.width*S),C=Math.max(1,o.height*x),T=new V.PlaneGeometry(_,C),L=new V.MeshBasicMaterial({map:w,transparent:!0,depthTest:!1,depthWrite:!1,side:V.DoubleSide}),N=new V.Mesh(T,L),B=this.transformPoint(e.x,e.y),A=d==="center"?0:d==="right"?-_/2:_/2,O=h==="middle"?0:h==="bottom"?b?C/2:-C/2:b?-C/2:C/2;N.position.set(B.x+A,B.y+O,.2),N.renderOrder=10,this.frameGroup.add(N)}drawBox(e){const t=this.currentTransform.scaleX??1,i=this.currentTransform.scaleY??1,n=this.transformPoint(e.box.x+e.box.width/2,e.box.y),o=this.createRectBorder(n.x-e.box.width*t/2,n.y,Math.abs(e.box.width*t),Math.abs(e.box.height*i),e.color,e.lineWidth??1,e.opacity??1);o.renderOrder=e.renderOrder??2,this.frameGroup.add(o)}setTransform(e){this.currentTransform={x:e.x??0,y:e.y??0,scaleX:e.scaleX??1,scaleY:e.scaleY??1,rotation:e.rotation??0}}resetTransform(){this.currentTransform={x:0,y:0,scaleX:1,scaleY:1,rotation:0}}transformPoint(e,t){const i=this.currentTransform.scaleX??1,n=this.currentTransform.scaleY??1,o=(this.currentTransform.x??0)+e*i,r=(this.currentTransform.y??0)+t*n,a=this.currentTransform.rotation??0;if(a===0)return{x:o,y:r};const l=Math.cos(a),c=Math.sin(a);return{x:o*l-r*c,y:o*c+r*l}}isYAxisUp(){return this.camera instanceof V.OrthographicCamera?this.camera.top>=this.camera.bottom:!0}createLineQuad(e,t,i,n,o){const r=t.x-e.x,a=t.y-e.y,l=Math.max(.001,Math.hypot(r,a)),c=Math.atan2(a,r),d=new V.PlaneGeometry(l,i),h=new V.MeshBasicMaterial({color:n,transparent:o<1,opacity:o,side:V.DoubleSide,depthTest:!1}),f=new V.Mesh(d,h);return f.position.set((e.x+t.x)/2,(e.y+t.y)/2,0),f.rotation.z=c,f}createQuadMesh(e,t,i,n,o,r=1){if(!o)return null;const a=new V.PlaneGeometry(i,n),l=Po(o),c=new V.MeshBasicMaterial({color:l.color,transparent:r*l.alpha<1,opacity:r*l.alpha,side:V.DoubleSide,depthTest:!1}),d=new V.Mesh(a,c);return d.position.set(e+i/2,t,0),d.renderOrder=1,d}createRectBorder(e,t,i,n,o,r,a){const l=Po(o),c=i/2,d=n/2,h=e+c,f=t,y=[new V.Vector3(h-c,f-d,0),new V.Vector3(h+c,f-d,0),new V.Vector3(h+c,f+d,0),new V.Vector3(h-c,f+d,0)],g=new V.BufferGeometry().setFromPoints(y),b=new V.LineBasicMaterial({color:l.color,transparent:a*l.alpha<1,opacity:a*l.alpha,linewidth:r,depthTest:!1});return new V.LineLoop(g,b)}clearFrame(){for(;this.frameGroup.children.length>0;){const e=this.frameGroup.children.pop();e&&this.disposeObject(e)}}disposeObject(e){if("geometry"in e&&e.geometry instanceof V.BufferGeometry&&e.geometry.dispose(),"material"in e){const t=e.material;Array.isArray(t)?t.forEach(i=>this.disposeMaterial(i)):t&&this.disposeMaterial(t)}"children"in e&&e.children.length>0&&[...e.children].forEach(t=>this.disposeObject(t)),e.removeFromParent()}disposeMaterial(e){const t=e;t.map&&t.map.dispose(),e.dispose()}getResolution(){return this.canvas?{x:this.canvas.width||1,y:this.canvas.height||1}:typeof window<"u"?{x:window.innerWidth||1,y:window.innerHeight||1}:{x:1,y:1}}}function Hk(s){return s===q.MTextLineAlignment.TOP?"superscript":s===q.MTextLineAlignment.BOTTOM?"subscript":"normal"}function Uk(s){return s==="superscript"?q.MTextLineAlignment.TOP:s==="subscript"?q.MTextLineAlignment.BOTTOM:q.MTextLineAlignment.MIDDLE}function qh(s){return{...s,align:Uk(s.script)}}function qn(s){return{underline:s.underline,overline:s.overline,strikeThrough:s.strikeThrough,script:Hk(s.align),aci:s.aci,rgb:s.rgb?[...s.rgb]:null,align:s.align,fontFace:{...s.fontFace},capHeight:{...s.capHeight},widthFactor:{...s.widthFactor},charTrackingFactor:{...s.charTrackingFactor},oblique:s.oblique,paragraph:{indent:s.paragraph.indent,left:s.paragraph.left,right:s.paragraph.right,align:s.paragraph.align,tabs:[...s.paragraph.tabs]}}}function ze(s){return{underline:s.underline,overline:s.overline,strikeThrough:s.strikeThrough,script:s.script,aci:s.aci,rgb:s.rgb?[...s.rgb]:null,align:s.align,fontFace:{...s.fontFace},capHeight:{...s.capHeight},widthFactor:{...s.widthFactor},charTrackingFactor:{...s.charTrackingFactor},oblique:s.oblique,paragraph:{indent:s.paragraph.indent,left:s.paragraph.left,right:s.paragraph.right,align:s.paragraph.align,tabs:[...s.paragraph.tabs]}}}function Jn(s){return s.type==="char"||s.type==="stack"||s.type==="paragraphBreak"||s.type==="columnBreak"||s.type==="wrapAtDimLine"}function Wk(s,e){return s.underline===e.underline&&s.overline===e.overline&&s.strikeThrough===e.strikeThrough&&s.script===e.script&&s.aci===e.aci&&JSON.stringify(s.rgb)===JSON.stringify(e.rgb)&&s.align===e.align&&s.fontFace.family===e.fontFace.family&&s.fontFace.style===e.fontFace.style&&s.fontFace.weight===e.fontFace.weight&&s.capHeight.value===e.capHeight.value&&s.capHeight.isRelative===e.capHeight.isRelative&&s.widthFactor.value===e.widthFactor.value&&s.widthFactor.isRelative===e.widthFactor.isRelative&&s.charTrackingFactor.value===e.charTrackingFactor.value&&s.charTrackingFactor.isRelative===e.charTrackingFactor.isRelative&&s.oblique===e.oblique&&s.paragraph.indent===e.paragraph.indent&&s.paragraph.left===e.paragraph.left&&s.paragraph.right===e.paragraph.right&&s.paragraph.align===e.paragraph.align&&JSON.stringify(s.paragraph.tabs)===JSON.stringify(e.paragraph.tabs)}function Jh(s,e){const t=s??qn(new q.MTextContext),i=qh(t),n=qh(e);if(Wk(i,n))return"";let o="";if(i.underline!==n.underline&&(o+=n.underline?"\\L":"\\l"),i.overline!==n.overline&&(o+=n.overline?"\\O":"\\o"),i.strikeThrough!==n.strikeThrough&&(o+=n.strikeThrough?"\\K":"\\k"),i.align!==n.align&&(o+=`\\A${n.align};`),(i.aci!==n.aci||JSON.stringify(i.rgb)!==JSON.stringify(n.rgb))&&(n.rgb?o+=`\\c${q.rgb2int(n.rgb)};`:o+=`\\C${n.aci??256};`),i.fontFace.family!==n.fontFace.family||i.fontFace.style!==n.fontFace.style||i.fontFace.weight!==n.fontFace.weight){const r=n.fontFace.weight>=700?1:0,a=n.fontFace.style==="Italic"?1:0;o+=`\\f${n.fontFace.family}|b${r}|i${a};`}return(i.capHeight.value!==n.capHeight.value||i.capHeight.isRelative!==n.capHeight.isRelative)&&(o+=`\\H${Ml(n.capHeight)};`),(i.widthFactor.value!==n.widthFactor.value||i.widthFactor.isRelative!==n.widthFactor.isRelative)&&(o+=`\\W${Ml(n.widthFactor)};`),(i.charTrackingFactor.value!==n.charTrackingFactor.value||i.charTrackingFactor.isRelative!==n.charTrackingFactor.isRelative)&&(o+=`\\T${Ml(n.charTrackingFactor)};`),i.oblique!==n.oblique&&(o+=`\\Q${Qn(n.oblique)};`),JSON.stringify(i.paragraph)!==JSON.stringify(n.paragraph)&&(o+=`\\p${$k(n.paragraph)};`),o}function Ml(s){return`${Qn(s.value)}${s.isRelative?"x":""}`}function Qn(s){return Number.isInteger(s),s.toString()}function $k(s){const e=[`i${Qn(s.indent)}`,`l${Qn(s.left)}`,`r${Qn(s.right)}`];return s.align!==q.MTextParagraphAlignment.DEFAULT&&e.push(`q${Kk(s.align)}`),s.tabs.length>0&&e.push(`t${s.tabs.map(t=>String(t)).join(",")}`),e.join(",")}function Kk(s){switch(s){case q.MTextParagraphAlignment.LEFT:return"l";case q.MTextParagraphAlignment.RIGHT:return"r";case q.MTextParagraphAlignment.CENTER:return"c";case q.MTextParagraphAlignment.JUSTIFIED:return"j";case q.MTextParagraphAlignment.DISTRIBUTED:return"d";default:return"x"}}function Qh(s,e,t={}){const i=new q.MTextParser(s,e,{...t,yieldPropertyCommands:!1}),n=[];for(const o of i.parse()){const r=qn(o.ctx);switch(o.type){case q.TokenType.WORD:{const a=o.data;for(const l of a)n.push({type:"char",value:l,style:ze(r)});break}case q.TokenType.SPACE:n.push({type:"char",value:" ",style:ze(r)});break;case q.TokenType.NBSP:n.push({type:"char",value:" ",style:ze(r)});break;case q.TokenType.TABULATOR:n.push({type:"char",value:" ",style:ze(r)});break;case q.TokenType.STACK:{const[a,l,c]=o.data,d=ze(r);c==="^"&&(a.length===0&&l.length>0?d.script="subscript":a.length>0&&l.length===0?d.script="superscript":d.script="normal"),n.push({type:"stack",numerator:a,denominator:l,divider:c,style:d});break}case q.TokenType.NEW_PARAGRAPH:n.push({type:"paragraphBreak",style:ze(r)});break;case q.TokenType.NEW_COLUMN:n.push({type:"columnBreak",style:ze(r)});break;case q.TokenType.WRAP_AT_DIMLINE:n.push({type:"wrapAtDimLine",style:ze(r)});break}}return{nodes:n}}function Yk(s){const e=qn(new q.MTextContext);let t="",i=0;for(;i<s.nodes.length;){const n=s.nodes[i];if(!n)break;if(!Jn(n)){t+=np(n),i+=1;continue}const o=n.style;let r="",a=i;for(;a<s.nodes.length;){const l=s.nodes[a];if(!l||!Jn(l)||!ip(o,l.style))break;r+=np(l),a+=1}ip(o,e)?t+=r:t+=`{${Jh(null,o)}${r}}`,i=a}return t}function Eo(s,e,t){if(t<=0)return s;const i=Lo(e,0,s.nodes.length),n=Lo(t,0,s.nodes.length-i);return s.nodes.splice(i,n),s}function Zk(s,e,t,i,n){const o=Lo(e,0,s.nodes.length),r=Lo(t,0,s.nodes.length-o),a=n??ep(s,o)??qn(new q.MTextContext),l=Jk(i,a);return s.nodes.splice(o,r,...l),s}function ep(s,e){for(let t=e-1;t>=0;t--){const i=s.nodes[t];if(i&&Jn(i))return ze(i.style)}for(let t=e;t<s.nodes.length;t++){const i=s.nodes[t];if(i&&Jn(i))return ze(i.style)}}function Xk(s){return s===" "?"\\~":s===" "?"^I":s==="\\"?"\\\\":s==="{"?"\\{":s==="}"?"\\}":s==="^"?"\\U+005E":s==="%"?"\\U+0025":s===`
3
3
  `?"\\P":s==="\r"?"":s}function tp(s){return s.replace(/[\\;/#^]/g,"\\$&")}function ip(s,e){return Jh(s,e)===""}function np(s){switch(s.type){case"char":return Xk(s.value);case"stack":return qk(s.numerator,s.denominator,s.divider);case"paragraphBreak":return"\\P";case"columnBreak":return"\\N";case"wrapAtDimLine":return"\\X"}}function qk(s,e,t){const i=tp(s),n=tp(e);if(t==="^"){if(i.length===0&&n.length>0)return`\\S^ ${n};`;if(i.length>0&&n.length===0)return`\\S${i}^ ;`;if(i.length===0&&n.length===0)return"\\S^ ;"}return`\\S${i}${t}${n};`}function Jk(s,e){const t=[];for(const i of s){if(i===`
4
4
  `){t.push({type:"paragraphBreak",style:ze(e)});continue}t.push({type:"char",value:i,style:ze(e)})}return t}function Lo(s,e,t){return Math.max(e,Math.min(t,s))}class Re{constructor(e={nodes:[]}){z(this,"_ast");z(this,"_cursor");z(this,"_selection",null);this._ast=typeof e=="string"?Qh(e):Re.cloneAst(e),this._cursor=this._ast.nodes.length}static fromMText(e,t){return new Re(Qh(e,t))}get ast(){return this._ast}get length(){return this._ast.nodes.length}get cursor(){return this._cursor}set cursor(e){this._cursor=Re.clamp(e,0,this.length),this._selection=null}get selection(){return this._selection?{...this._selection}:null}setSelection(e,t){const i=Re.normalizeSelection(e,t,this.length);return this._selection=i.start===i.end?null:i,this._cursor=Re.clamp(t,0,this.length),this}clearSelection(){return this._selection=null,this}moveCursor(e,t=!1){const i=Re.clamp(this._cursor+e,0,this.length);if(t){const n=this._selection?this._selection.start:this._cursor;this.setSelection(n,i)}else this.cursor=i;return this}selectAll(){return this.setSelection(0,this.length),this}insertText(e,t){const{start:i,end:n}=this.getActiveRange();return Zk(this._ast,i,n-i,e,t),this._cursor=i+e.length,this._selection=null,this}deleteBackward(e=1){if(this.hasSelection()){const{start:i,end:n}=this.getActiveRange();return Eo(this._ast,i,n-i),this._cursor=i,this._selection=null,this}if(e<=0||this._cursor<=0)return this;const t=Math.min(e,this._cursor);return Eo(this._ast,this._cursor-t,t),this._cursor-=t,this}deleteForward(e=1){if(this.hasSelection()){const{start:t,end:i}=this.getActiveRange();return Eo(this._ast,t,i-t),this._cursor=t,this._selection=null,this}return e<=0||this._cursor>=this.length?this:(Eo(this._ast,this._cursor,e),this)}replaceSelection(e,t){return this.insertText(e,t)}toMText(){return Yk(this._ast)}transaction(e){const t={ast:Re.cloneAst(this._ast),cursor:this._cursor,selection:this._selection?{...this._selection}:null};try{e(this)}catch(i){throw this._ast=t.ast,this._cursor=t.cursor,this._selection=t.selection,i}return this}hasSelection(){return!!(this._selection&&this._selection.start!==this._selection.end)}getActiveRange(){return this._selection?{...this._selection}:{start:this._cursor,end:this._cursor}}getReferenceStyle(e){return ep(this._ast,e)??qn(new q.MTextContext)}static cloneAst(e){return{nodes:e.nodes.map(t=>t.type==="char"?{...t,style:ze(t.style)}:t.type==="stack"?{...t,style:ze(t.style)}:{...t,style:ze(t.style)})}}static normalizeSelection(e,t,i){const n=Re.clamp(e,0,i),o=Re.clamp(t,0,i);return n<=o?{start:n,end:o}:{start:o,end:n}}static clamp(e,t,i){return Math.max(t,Math.min(i,e))}}class To{constructor(e){z(this,"document");z(this,"selectionAnchor",null);this.document=e}get anchor(){return this.selectionAnchor}execute(e){switch(e.type){case"setCursor":this.document.cursor=e.index,this.selectionAnchor=null;break;case"setSelection":this.document.setSelection(e.start,e.end),this.selectionAnchor=e.start;break;case"clearSelection":this.document.clearSelection(),this.selectionAnchor=null;break;case"moveLeft":this.moveCursorTo(this.document.cursor-1,e.extend??!1);break;case"moveRight":this.moveCursorTo(this.document.cursor+1,e.extend??!1);break;case"moveToStart":this.moveCursorTo(0,e.extend??!1);break;case"moveToEnd":this.moveCursorTo(this.document.length,e.extend??!1);break;case"selectAll":this.document.selectAll(),this.selectionAnchor=0;break;case"insertText":this.document.insertText(e.text,e.style),this.selectionAnchor=null;break;case"replaceSelection":this.document.replaceSelection(e.text,e.style),this.selectionAnchor=null;break;case"backspace":this.document.deleteBackward(e.count??1),this.selectionAnchor=null;break;case"delete":this.document.deleteForward(e.count??1),this.selectionAnchor=null;break}return this}handleKeyEvent(e){const t=!!(e.metaKey||e.ctrlKey);return t&&!e.altKey&&e.key.toLowerCase()==="a"?(this.execute({type:"selectAll"}),!0):e.key==="ArrowLeft"?(this.execute({type:"moveLeft",extend:!!e.shiftKey}),!0):e.key==="ArrowRight"?(this.execute({type:"moveRight",extend:!!e.shiftKey}),!0):e.key==="Home"?(this.execute({type:"moveToStart",extend:!!e.shiftKey}),!0):e.key==="End"?(this.execute({type:"moveToEnd",extend:!!e.shiftKey}),!0):e.key==="Backspace"?(this.execute({type:"backspace"}),!0):e.key==="Delete"?(this.execute({type:"delete"}),!0):e.key==="Enter"?(this.execute({type:"insertText",text:`
5
- `}),!0):e.key==="Tab"?(this.execute({type:"insertText",text:" "}),!0):!t&&!e.altKey&&e.key.length===1?(this.execute({type:"insertText",text:e.key}),!0):!1}moveCursorTo(e,t){var n;const i=Math.max(0,Math.min(e,this.document.length));if(t){this.selectionAnchor===null&&(this.selectionAnchor=((n=this.document.selection)==null?void 0:n.start)??this.document.cursor),this.document.setSelection(this.selectionAnchor,i);return}this.document.cursor=i,this.selectionAnchor=null}}const Qk={bold:'<svg viewBox="0 0 24 24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8Zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4Zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4Z" fill-rule="evenodd"></path></svg>',italic:'<svg viewBox="0 0 24 24"><path d="m16.7 4.7-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8Z" fill-rule="evenodd"></path></svg>',underline:'<svg viewBox="0 0 24 24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1ZM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Z" fill-rule="evenodd"></path></svg>',overline:'<svg viewBox="0 0 24 24"><path d="M5 4h14v1.5H5V4zm7 3.5c3.04 0 5.5 2.46 5.5 5.5v4.5h-2.25v-4.5c0-1.79-1.46-3.25-3.25-3.25S8.75 11.21 8.75 13v4.5H6.5V13c0-3.04 2.46-5.5 5.5-5.5z"></path></svg>',strike:'<svg viewBox="0 0 24 24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1Z"></path><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z" fill-rule="nonzero"></path></g></svg>',superscript:'<svg viewBox="0 0 24 24"><path d="M15 9.4 10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4Zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11Z" fill-rule="nonzero"></path></svg>',subscript:'<svg viewBox="0 0 24 24"><path d="m10.4 10 4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10ZM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19Z" fill-rule="nonzero"></path></svg>',stack:'<svg viewBox="0 0 24 24"><path d="M12.4065 5.44832C12.8151 5.44832 13.1994 5.56542 13.5595 5.7996C13.9265 6.0267 14.2208 6.36024 14.4424 6.80022C14.664 7.23312 14.7748 7.74407 14.7748 8.33309C14.7748 8.9292 14.664 9.44725 14.4424 9.88724C14.2208 10.3201 13.9265 10.6501 13.5595 10.8772C13.1994 11.1043 12.8151 11.2179 12.4065 11.2179C12.0464 11.2179 11.7037 11.1291 11.3782 10.9517C11.0527 10.7743 10.7931 10.5082 10.5992 10.1534C10.5715 10.4585 10.5507 10.7743 10.5368 11.1008H9.75781V3H10.6407V6.4383C10.8415 6.11185 11.0977 5.86702 11.4094 5.7038C11.721 5.53348 12.0534 5.44832 12.4065 5.44832ZM12.2923 10.3663C12.7631 10.3663 13.1405 10.1888 13.4245 9.83402C13.7084 9.47919 13.8503 8.97888 13.8503 8.33309C13.8503 7.69439 13.7084 7.19763 13.4245 6.8428C13.1405 6.48797 12.7631 6.31056 12.2923 6.31056C11.8422 6.31056 11.4544 6.47378 11.1289 6.80022C10.8034 7.12667 10.6407 7.63762 10.6407 8.33309C10.6407 8.80856 10.7203 9.19887 10.8796 9.50402C11.0389 9.80918 11.2432 10.0292 11.4925 10.164C11.7417 10.2988 12.0083 10.3663 12.2923 10.3663Z"></path><path d="M12.0949 14.9531C12.7043 14.9531 13.2029 15.1447 13.5906 15.5279C13.9784 15.9041 14.1723 16.4434 14.1723 17.146V20.6056H13.3933C13.3725 20.2436 13.3587 20.0094 13.3517 19.903C13.1856 20.1727 12.9605 20.3785 12.6766 20.5204C12.3996 20.6552 12.0811 20.7227 11.721 20.7227C11.3747 20.7227 11.0493 20.6588 10.7446 20.531C10.4468 20.3962 10.2079 20.2011 10.0279 19.9456C9.84783 19.683 9.75781 19.3708 9.75781 19.0088C9.75781 18.4624 9.97248 18.033 10.4018 17.7208C10.8381 17.4014 11.399 17.2418 12.0845 17.2418C12.4723 17.2418 12.8739 17.295 13.2894 17.4014V17.3056C13.2894 16.7876 13.1856 16.4044 12.9778 16.156C12.777 15.9005 12.4688 15.7728 12.0534 15.7728C11.721 15.7728 11.444 15.8437 11.2224 15.9857C11.0008 16.1276 10.8138 16.337 10.6615 16.6137L9.98633 16.2199C10.1525 15.8367 10.4226 15.5315 10.7965 15.3044C11.1774 15.0702 11.6102 14.9531 12.0949 14.9531ZM13.2894 18.1572C12.8532 18.0437 12.455 17.9869 12.0949 17.9869C11.6448 17.9869 11.2951 18.0756 11.0458 18.253C10.8034 18.4305 10.6823 18.6788 10.6823 18.9982C10.6823 19.2962 10.7861 19.5304 10.9939 19.7007C11.2016 19.864 11.4717 19.9456 11.8041 19.9456C12.2126 19.9456 12.5623 19.8249 12.8532 19.5836C13.144 19.3353 13.2894 18.9946 13.2894 18.5617V18.1572Z""></path><rect x="6.02344" y="12.7119" width="11.9532" height="0.747077"></rect></svg>'},sp="mlightcad-mtext-toolbar-style",op=["Arial","Helvetica","Verdana","Tahoma","Trebuchet MS","Times New Roman","Georgia","Courier New","system-ui","sans-serif","serif","monospace"];function e0(){if(document.getElementById(sp))return;const s=document.createElement("style");s.id=sp,s.textContent=`
5
+ `}),!0):e.key==="Tab"?(this.execute({type:"insertText",text:" "}),!0):!t&&!e.altKey&&e.key.length===1?(this.execute({type:"insertText",text:e.key}),!0):!1}moveCursorTo(e,t){var n;const i=Math.max(0,Math.min(e,this.document.length));if(t){this.selectionAnchor===null&&(this.selectionAnchor=((n=this.document.selection)==null?void 0:n.start)??this.document.cursor),this.document.setSelection(this.selectionAnchor,i);return}this.document.cursor=i,this.selectionAnchor=null}}const Qk={bold:'<svg viewBox="0 0 24 24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8Zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4Zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4Z" fill-rule="evenodd"></path></svg>',italic:'<svg viewBox="0 0 24 24"><path d="m16.7 4.7-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8Z" fill-rule="evenodd"></path></svg>',underline:'<svg viewBox="0 0 24 24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1ZM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Z" fill-rule="evenodd"></path></svg>',overline:'<svg viewBox="0 0 24 24"><path d="M5 4h14v1.5H5V4zm7 3.5c3.04 0 5.5 2.46 5.5 5.5v4.5h-2.25v-4.5c0-1.79-1.46-3.25-3.25-3.25S8.75 11.21 8.75 13v4.5H6.5V13c0-3.04 2.46-5.5 5.5-5.5z"></path></svg>',strike:'<svg viewBox="0 0 24 24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1Z"></path><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z" fill-rule="nonzero"></path></g></svg>',superscript:'<svg viewBox="0 0 24 24"><path d="M15 9.4 10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4Zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11Z" fill-rule="nonzero"></path></svg>',subscript:'<svg viewBox="0 0 24 24"><path d="m10.4 10 4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10ZM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19Z" fill-rule="nonzero"></path></svg>',stack:'<svg viewBox="0 0 24 24"><path d="M12.4065 5.44832C12.8151 5.44832 13.1994 5.56542 13.5595 5.7996C13.9265 6.0267 14.2208 6.36024 14.4424 6.80022C14.664 7.23312 14.7748 7.74407 14.7748 8.33309C14.7748 8.9292 14.664 9.44725 14.4424 9.88724C14.2208 10.3201 13.9265 10.6501 13.5595 10.8772C13.1994 11.1043 12.8151 11.2179 12.4065 11.2179C12.0464 11.2179 11.7037 11.1291 11.3782 10.9517C11.0527 10.7743 10.7931 10.5082 10.5992 10.1534C10.5715 10.4585 10.5507 10.7743 10.5368 11.1008H9.75781V3H10.6407V6.4383C10.8415 6.11185 11.0977 5.86702 11.4094 5.7038C11.721 5.53348 12.0534 5.44832 12.4065 5.44832ZM12.2923 10.3663C12.7631 10.3663 13.1405 10.1888 13.4245 9.83402C13.7084 9.47919 13.8503 8.97888 13.8503 8.33309C13.8503 7.69439 13.7084 7.19763 13.4245 6.8428C13.1405 6.48797 12.7631 6.31056 12.2923 6.31056C11.8422 6.31056 11.4544 6.47378 11.1289 6.80022C10.8034 7.12667 10.6407 7.63762 10.6407 8.33309C10.6407 8.80856 10.7203 9.19887 10.8796 9.50402C11.0389 9.80918 11.2432 10.0292 11.4925 10.164C11.7417 10.2988 12.0083 10.3663 12.2923 10.3663Z"></path><path d="M12.0949 14.9531C12.7043 14.9531 13.2029 15.1447 13.5906 15.5279C13.9784 15.9041 14.1723 16.4434 14.1723 17.146V20.6056H13.3933C13.3725 20.2436 13.3587 20.0094 13.3517 19.903C13.1856 20.1727 12.9605 20.3785 12.6766 20.5204C12.3996 20.6552 12.0811 20.7227 11.721 20.7227C11.3747 20.7227 11.0493 20.6588 10.7446 20.531C10.4468 20.3962 10.2079 20.2011 10.0279 19.9456C9.84783 19.683 9.75781 19.3708 9.75781 19.0088C9.75781 18.4624 9.97248 18.033 10.4018 17.7208C10.8381 17.4014 11.399 17.2418 12.0845 17.2418C12.4723 17.2418 12.8739 17.295 13.2894 17.4014V17.3056C13.2894 16.7876 13.1856 16.4044 12.9778 16.156C12.777 15.9005 12.4688 15.7728 12.0534 15.7728C11.721 15.7728 11.444 15.8437 11.2224 15.9857C11.0008 16.1276 10.8138 16.337 10.6615 16.6137L9.98633 16.2199C10.1525 15.8367 10.4226 15.5315 10.7965 15.3044C11.1774 15.0702 11.6102 14.9531 12.0949 14.9531ZM13.2894 18.1572C12.8532 18.0437 12.455 17.9869 12.0949 17.9869C11.6448 17.9869 11.2951 18.0756 11.0458 18.253C10.8034 18.4305 10.6823 18.6788 10.6823 18.9982C10.6823 19.2962 10.7861 19.5304 10.9939 19.7007C11.2016 19.864 11.4717 19.9456 11.8041 19.9456C12.2126 19.9456 12.5623 19.8249 12.8532 19.5836C13.144 19.3353 13.2894 18.9946 13.2894 18.5617V18.1572Z""></path><rect x="6.02344" y="12.7119" width="11.9532" height="0.747077"></rect></svg>'},sp="mlightcad-mtext-toolbar-style",op=["Arial","Helvetica","Verdana","Tahoma","Trebuchet MS","Times New Roman","Georgia","Courier New","system-ui","sans-serif","serif","monospace"];function eS(){if(document.getElementById(sp))return;const s=document.createElement("style");s.id=sp,s.textContent=`
6
6
  .ml-mtext-toolbar {
7
7
  position: fixed;
8
8
  left: 0;
@@ -118,12 +118,12 @@
118
118
  .ml-mtext-toolbar[data-theme='light'] .ml-mtext-toolbar__btn:hover {
119
119
  background: #edf3ff;
120
120
  }
121
- `,document.head.appendChild(s)}function Ol(s){return Math.max(0,Math.min(16777215,Math.round(s)))}function rp(s){return`#${(s===null?16777215:Ol(s)).toString(16).padStart(6,"0")}`}function t0(s){return/^#[0-9a-fA-F]{6}$/.test(s)?Number.parseInt(s.slice(1),16):16777215}function i0(s){return s.isRgb&&s.rgbValue!==null?rp(s.rgbValue):s.isAci&&s.aci!==null?rp($.getColorByIndex(s.aci)):"#ffffff"}function ap(s){const e=new q.MTextColor;return e.rgbValue=t0(s),e}function lp(s){const e=new q.MTextColor;return s.aci!==null&&Number.isFinite(s.aci)?(e.aci=s.aci,e):s.rgb!==null?(e.rgbValue=Ol(s.rgb),e):(e.rgbValue=16777215,e)}function n0(s){const e=s.trim().toLowerCase();return/^#[0-9a-f]{6}$/.test(e)?e:/^[0-9a-f]{6}$/.test(e)?`#${e}`:null}function pi(s,e){const t=document.createElement("button");return t.type="button",t.className="ml-mtext-toolbar__btn",t.title=s,t.setAttribute("aria-label",s),t.setAttribute("aria-pressed","false"),t.innerHTML=Qk[e],t}function s0(s){const e=s&&s.length>0?s:op,t=[],i=new Set;for(const n of e){const o=n.trim();!o||i.has(o)||(i.add(o),t.push(o))}return t.length>0?t:[...op]}class o0{constructor(e){z(this,"anchorElement");z(this,"root");z(this,"controls");z(this,"onFormatChange");z(this,"onToggleStack");z(this,"onToggleSuperscript");z(this,"onToggleSubscript");z(this,"theme");z(this,"colorPicker");e0(),this.anchorElement=e.anchorElement,this.onFormatChange=e.onFormatChange,this.onToggleStack=e.onToggleStack??(()=>{}),this.onToggleSuperscript=e.onToggleSuperscript??(()=>!1),this.onToggleSubscript=e.onToggleSubscript??(()=>!1),this.theme=e.theme,this.root=document.createElement("div"),this.root.className="ml-mtext-toolbar";const t=document.createElement("div");t.className="ml-mtext-toolbar__group";const i=document.createElement("select");i.className="ml-mtext-toolbar__select";for(const b of s0(e.fontFamilies)){const w=document.createElement("option");w.value=b,w.textContent=b,i.appendChild(w)}const n=document.createElement("input");n.className="ml-mtext-toolbar__input",n.type="number",n.min="1",n.max="1024",n.step="1",this.colorPicker=this.createColorPicker(e.colorPicker,e.initialFormat),t.append(i,n,this.colorPicker.host);const o=document.createElement("div");o.className="ml-mtext-toolbar__separator";const r=document.createElement("div");r.className="ml-mtext-toolbar__group";const a=pi("Bold","bold"),l=pi("Italic","italic"),c=pi("Underline","underline"),d=pi("Overline","overline"),h=pi("Strike Through","strike"),f=pi("Superscript","superscript"),y=pi("Subscript","subscript"),g=pi("Stack","stack");r.append(a,l,c,d,h,f,y,g),this.root.append(t,o,r),this.controls={fontFamily:i,fontSize:n,boldBtn:a,italicBtn:l,underlineBtn:c,overlineBtn:d,strikeBtn:h,superscriptBtn:f,subscriptBtn:y,stackBtn:g},this.setTheme(this.theme),this.bindEvents(),(e.container??document.body).appendChild(this.root)}setTheme(e){this.theme=e,this.root.dataset.theme=e,this.colorPicker.setTheme(e)}getTheme(){return this.theme}setVisible(e){this.root.style.display=e?"inline-flex":"none"}setSession(e){this.anchorElement=e.anchorElement,this.onFormatChange=e.onFormatChange,this.onToggleStack=e.onToggleStack,this.onToggleSuperscript=e.onToggleSuperscript??(()=>!1),this.onToggleSubscript=e.onToggleSubscript??(()=>!1)}setAnchor(e,t){const i=this.root.offsetWidth||0,n=this.root.offsetHeight||0,o=8,r=8,a=Math.max(o,window.innerWidth-i-8),l=Math.max(r,window.innerHeight-n-8),c=Math.max(o,Math.min(a,Math.round(e))),d=Math.max(r,Math.min(l,Math.round(t-n)));this.root.style.left=`${c}px`,this.root.style.top=`${d}px`}setFormat(e){this.ensureSelectValue(e.fontFamily),this.controls.fontSize.value=String(Math.max(1,Math.round(e.fontSize)));const t=lp(e);this.colorPicker.setValue(t),this.setToggleState(this.controls.boldBtn,e.bold),this.setToggleState(this.controls.italicBtn,e.italic),this.setToggleState(this.controls.underlineBtn,e.underline),this.setToggleState(this.controls.overlineBtn,e.overline),this.setToggleState(this.controls.strikeBtn,e.strike),this.setToggleState(this.controls.superscriptBtn,e.script==="superscript"),this.setToggleState(this.controls.subscriptBtn,e.script==="subscript")}dispose(){this.colorPicker.dispose(),this.root.remove()}setStackActive(e){this.setToggleState(this.controls.stackBtn,e)}setToggleState(e,t){e.classList.toggle("is-active",t),e.setAttribute("aria-pressed",t?"true":"false")}ensureSelectValue(e){if(!Array.from(this.controls.fontFamily.options).some(i=>i.value===e)){const i=document.createElement("option");i.value=e,i.textContent=e,this.controls.fontFamily.appendChild(i)}this.controls.fontFamily.value=e}bindEvents(){const e=()=>{const t=Math.max(1,Number(this.controls.fontSize.value)||1);this.controls.fontSize.value=String(Math.round(t)),this.onFormatChange({fontSize:t})};this.controls.fontFamily.addEventListener("change",()=>{this.onFormatChange({fontFamily:this.controls.fontFamily.value})}),this.controls.fontSize.addEventListener("input",e),this.controls.fontSize.addEventListener("change",e),this.controls.fontSize.addEventListener("blur",e),this.controls.fontSize.addEventListener("keydown",t=>{t.key==="Enter"&&(e(),this.anchorElement.focus({preventScroll:!0}))}),this.controls.boldBtn.addEventListener("click",()=>{this.onFormatChange({bold:!this.controls.boldBtn.classList.contains("is-active")})}),this.controls.italicBtn.addEventListener("click",()=>{this.onFormatChange({italic:!this.controls.italicBtn.classList.contains("is-active")})}),this.controls.underlineBtn.addEventListener("click",()=>{this.onFormatChange({underline:!this.controls.underlineBtn.classList.contains("is-active")})}),this.controls.overlineBtn.addEventListener("click",()=>{this.onFormatChange({overline:!this.controls.overlineBtn.classList.contains("is-active")})}),this.controls.strikeBtn.addEventListener("click",()=>{this.onFormatChange({strike:!this.controls.strikeBtn.classList.contains("is-active")})}),this.controls.superscriptBtn.addEventListener("click",()=>{if(this.onToggleSuperscript())return;const t=this.controls.superscriptBtn.classList.contains("is-active");this.onFormatChange({script:t?"normal":"superscript"})}),this.controls.subscriptBtn.addEventListener("click",()=>{if(this.onToggleSubscript())return;const t=this.controls.subscriptBtn.classList.contains("is-active");this.onFormatChange({script:t?"normal":"subscript"})}),this.controls.stackBtn.addEventListener("click",()=>{this.onToggleStack()}),this.root.addEventListener("mousedown",t=>{const i=t.target;i&&(i.closest('[data-ml-mtext-toolbar-interactive="true"]')||i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="OPTION"||(t.preventDefault(),this.anchorElement.focus({preventScroll:!0})))})}createColorPicker(e,t){if(!e){const a=document.createElement("input");return a.className="ml-mtext-toolbar__color",a.type="color",a.dataset.mlMtextToolbarInteractive="true",a.addEventListener("input",()=>{this.applyColorChange(ap(a.value))}),{host:a,setValue:l=>{const c=n0(i0(l));c&&(a.value=c)},setTheme:()=>{},dispose:()=>{}}}const i=document.createElement("div");i.className="ml-mtext-toolbar__color",i.dataset.mlMtextToolbarInteractive="true";const n=t?lp(t):ap("#ffffff"),r=e({container:i,theme:this.theme,initialColor:n,onChange:a=>{this.applyColorChange(a)}})??{};return{host:i,setValue:a=>{var l;(l=r.setValue)==null||l.call(r,a)},setTheme:a=>{var l;(l=r.setTheme)==null||l.call(r,a)},dispose:()=>{var a;(a=r.dispose)==null||a.call(r)}}}applyColorChange(e){if(e.isAci&&e.aci!==null){this.onFormatChange({aci:e.aci});return}if(e.isRgb&&e.rgbValue!==null){this.onFormatChange({aci:null,rgb:Ol(e.rgbValue)});return}this.onFormatChange({aci:null,rgb:16777215})}}function Dl(s,e){const t=Math.max(Number.EPSILON,s),i=e;return i===void 0||i===1||i===4||i===7||i===10?0:i===2||i===5||i===8||i===11?-t/2:i===3||i===6||i===9||i===12?-t:0}const Io="__mlightcadMTextInputBoxSceneRoot",J=class J{constructor(e){z(this,"scene");z(this,"camera");z(this,"mtextRenderer");z(this,"cursorRenderer");z(this,"declaredWidth");z(this,"width");z(this,"position");z(this,"mtextInsertionOffset",new V.Vector3(0,0,0));z(this,"enableWordWrap");z(this,"mtextString","");z(this,"editorLineSpaceFactor",null);z(this,"editorAttachmentPoint",$.MTextAttachmentPoint.TopLeft);z(this,"editorDrawingDirection",$.MTextFlowDirection.LEFT_TO_RIGHT);z(this,"editorRotation",0);z(this,"editorDirectionVector",null);z(this,"cursorIndex",0);z(this,"selectionStart",0);z(this,"selectionEnd",0);z(this,"baseFormat");z(this,"currentFormat");z(this,"defaultTextStyle");z(this,"cursorLogic");z(this,"layoutContainer",{x:0,y:0,width:1,height:1});z(this,"isDragging",!1);z(this,"pendingCursorLineHint",null);z(this,"latestCursorLayoutData",{containerBox:{x:0,y:0,width:1,height:1},charBoxes:[]});z(this,"renderedObject",null);z(this,"boundingBoxObject",null);z(this,"boundingBoxPadding",1);z(this,"boundingBoxZOffset",.01);z(this,"rendererReady",!1);z(this,"pendingFontLoad",null);z(this,"lastFontKey","");z(this,"toolbarTheme","dark");z(this,"toolbarOffsetY",10);z(this,"debugMode",!1);z(this,"colorSettings");z(this,"debugVisibility",{showCharBoxes:!0,showLineIndices:!0,showCharIndices:!0,showChars:!0});z(this,"maxHistorySize",100);z(this,"undoStack",[]);z(this,"redoStack",[]);z(this,"document");z(this,"uiAdapter");z(this,"imeInput",null);z(this,"imeTarget",null);z(this,"lastImeTarget",null);z(this,"reopenTarget",null);z(this,"pointerTarget",null);z(this,"imeComposing",!1);z(this,"imeFocusTimer",null);z(this,"closed",!1);z(this,"toolbarEnabled",!0);z(this,"toolbarContainer",null);z(this,"toolbarFontFamilies",null);z(this,"toolbarColorPicker");z(this,"onImeKeyDown",e=>{if(!this.isActiveEditor()||!(e.ctrlKey||e.metaKey)&&!e.altKey&&e.key.length===1||e.isComposing||e.key==="Process")return;this.handleKeyDown(e)&&e.preventDefault()});z(this,"onWindowKeyDown",e=>{if(!this.isActiveEditor()||e.defaultPrevented)return;const t=e.target,i=(t==null?void 0:t.tagName)??"";if((i==="INPUT"||i==="TEXTAREA"||i==="SELECT"||!!(t!=null&&t.isContentEditable))&&t!==this.imeInput)return;if(!(e.ctrlKey||e.metaKey)&&!e.altKey&&e.key.length===1||this.imeComposing||e.isComposing||e.key==="Process"){this.refocusImeInputSoon();return}this.handleKeyDown(e)&&(e.preventDefault(),this.refocusImeInputSoon())});z(this,"onImeBeforeInput",e=>{if(!this.isActiveEditor()||e.isComposing)return;const t=e.inputType;if(t==="insertText"||t==="insertCompositionText"){this.handleTextInput(e.data??"")&&e.preventDefault();return}t==="insertParagraph"&&this.handleTextInput(`
121
+ `,document.head.appendChild(s)}function Ol(s){return Math.max(0,Math.min(16777215,Math.round(s)))}function rp(s){return`#${(s===null?16777215:Ol(s)).toString(16).padStart(6,"0")}`}function tS(s){return/^#[0-9a-fA-F]{6}$/.test(s)?Number.parseInt(s.slice(1),16):16777215}function iS(s){return s.isRgb&&s.rgbValue!==null?rp(s.rgbValue):s.isAci&&s.aci!==null?rp($.getColorByIndex(s.aci)):"#ffffff"}function ap(s){const e=new q.MTextColor;return e.rgbValue=tS(s),e}function lp(s){const e=new q.MTextColor;return s.aci!==null&&Number.isFinite(s.aci)?(e.aci=s.aci,e):s.rgb!==null?(e.rgbValue=Ol(s.rgb),e):(e.rgbValue=16777215,e)}function nS(s){const e=s.trim().toLowerCase();return/^#[0-9a-f]{6}$/.test(e)?e:/^[0-9a-f]{6}$/.test(e)?`#${e}`:null}function pi(s,e){const t=document.createElement("button");return t.type="button",t.className="ml-mtext-toolbar__btn",t.title=s,t.setAttribute("aria-label",s),t.setAttribute("aria-pressed","false"),t.innerHTML=Qk[e],t}function sS(s){const e=s&&s.length>0?s:op,t=[],i=new Set;for(const n of e){const o=n.trim();!o||i.has(o)||(i.add(o),t.push(o))}return t.length>0?t:[...op]}class oS{constructor(e){z(this,"anchorElement");z(this,"root");z(this,"controls");z(this,"onFormatChange");z(this,"onToggleStack");z(this,"onToggleSuperscript");z(this,"onToggleSubscript");z(this,"theme");z(this,"colorPicker");eS(),this.anchorElement=e.anchorElement,this.onFormatChange=e.onFormatChange,this.onToggleStack=e.onToggleStack??(()=>{}),this.onToggleSuperscript=e.onToggleSuperscript??(()=>!1),this.onToggleSubscript=e.onToggleSubscript??(()=>!1),this.theme=e.theme,this.root=document.createElement("div"),this.root.className="ml-mtext-toolbar";const t=document.createElement("div");t.className="ml-mtext-toolbar__group";const i=document.createElement("select");i.className="ml-mtext-toolbar__select";for(const b of sS(e.fontFamilies)){const w=document.createElement("option");w.value=b,w.textContent=b,i.appendChild(w)}const n=document.createElement("input");n.className="ml-mtext-toolbar__input",n.type="number",n.min="1",n.max="1024",n.step="1",this.colorPicker=this.createColorPicker(e.colorPicker,e.initialFormat),t.append(i,n,this.colorPicker.host);const o=document.createElement("div");o.className="ml-mtext-toolbar__separator";const r=document.createElement("div");r.className="ml-mtext-toolbar__group";const a=pi("Bold","bold"),l=pi("Italic","italic"),c=pi("Underline","underline"),d=pi("Overline","overline"),h=pi("Strike Through","strike"),f=pi("Superscript","superscript"),y=pi("Subscript","subscript"),g=pi("Stack","stack");r.append(a,l,c,d,h,f,y,g),this.root.append(t,o,r),this.controls={fontFamily:i,fontSize:n,boldBtn:a,italicBtn:l,underlineBtn:c,overlineBtn:d,strikeBtn:h,superscriptBtn:f,subscriptBtn:y,stackBtn:g},this.setTheme(this.theme),this.bindEvents(),(e.container??document.body).appendChild(this.root)}setTheme(e){this.theme=e,this.root.dataset.theme=e,this.colorPicker.setTheme(e)}getTheme(){return this.theme}setVisible(e){this.root.style.display=e?"inline-flex":"none"}setSession(e){this.anchorElement=e.anchorElement,this.onFormatChange=e.onFormatChange,this.onToggleStack=e.onToggleStack,this.onToggleSuperscript=e.onToggleSuperscript??(()=>!1),this.onToggleSubscript=e.onToggleSubscript??(()=>!1)}setAnchor(e,t){const i=this.root.offsetWidth||0,n=this.root.offsetHeight||0,o=8,r=8,a=Math.max(o,window.innerWidth-i-8),l=Math.max(r,window.innerHeight-n-8),c=Math.max(o,Math.min(a,Math.round(e))),d=Math.max(r,Math.min(l,Math.round(t-n)));this.root.style.left=`${c}px`,this.root.style.top=`${d}px`}setFormat(e){this.ensureSelectValue(e.fontFamily),this.controls.fontSize.value=String(Math.max(1,Math.round(e.fontSize)));const t=lp(e);this.colorPicker.setValue(t),this.setToggleState(this.controls.boldBtn,e.bold),this.setToggleState(this.controls.italicBtn,e.italic),this.setToggleState(this.controls.underlineBtn,e.underline),this.setToggleState(this.controls.overlineBtn,e.overline),this.setToggleState(this.controls.strikeBtn,e.strike),this.setToggleState(this.controls.superscriptBtn,e.script==="superscript"),this.setToggleState(this.controls.subscriptBtn,e.script==="subscript")}dispose(){this.colorPicker.dispose(),this.root.remove()}setStackActive(e){this.setToggleState(this.controls.stackBtn,e)}setToggleState(e,t){e.classList.toggle("is-active",t),e.setAttribute("aria-pressed",t?"true":"false")}ensureSelectValue(e){if(!Array.from(this.controls.fontFamily.options).some(i=>i.value===e)){const i=document.createElement("option");i.value=e,i.textContent=e,this.controls.fontFamily.appendChild(i)}this.controls.fontFamily.value=e}bindEvents(){const e=()=>{const t=Math.max(1,Number(this.controls.fontSize.value)||1);this.controls.fontSize.value=String(Math.round(t)),this.onFormatChange({fontSize:t})};this.controls.fontFamily.addEventListener("change",()=>{this.onFormatChange({fontFamily:this.controls.fontFamily.value})}),this.controls.fontSize.addEventListener("input",e),this.controls.fontSize.addEventListener("change",e),this.controls.fontSize.addEventListener("blur",e),this.controls.fontSize.addEventListener("keydown",t=>{t.key==="Enter"&&(e(),this.anchorElement.focus({preventScroll:!0}))}),this.controls.boldBtn.addEventListener("click",()=>{this.onFormatChange({bold:!this.controls.boldBtn.classList.contains("is-active")})}),this.controls.italicBtn.addEventListener("click",()=>{this.onFormatChange({italic:!this.controls.italicBtn.classList.contains("is-active")})}),this.controls.underlineBtn.addEventListener("click",()=>{this.onFormatChange({underline:!this.controls.underlineBtn.classList.contains("is-active")})}),this.controls.overlineBtn.addEventListener("click",()=>{this.onFormatChange({overline:!this.controls.overlineBtn.classList.contains("is-active")})}),this.controls.strikeBtn.addEventListener("click",()=>{this.onFormatChange({strike:!this.controls.strikeBtn.classList.contains("is-active")})}),this.controls.superscriptBtn.addEventListener("click",()=>{if(this.onToggleSuperscript())return;const t=this.controls.superscriptBtn.classList.contains("is-active");this.onFormatChange({script:t?"normal":"superscript"})}),this.controls.subscriptBtn.addEventListener("click",()=>{if(this.onToggleSubscript())return;const t=this.controls.subscriptBtn.classList.contains("is-active");this.onFormatChange({script:t?"normal":"subscript"})}),this.controls.stackBtn.addEventListener("click",()=>{this.onToggleStack()}),this.root.addEventListener("mousedown",t=>{const i=t.target;i&&(i.closest('[data-ml-mtext-toolbar-interactive="true"]')||i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="OPTION"||(t.preventDefault(),this.anchorElement.focus({preventScroll:!0})))})}createColorPicker(e,t){if(!e){const a=document.createElement("input");return a.className="ml-mtext-toolbar__color",a.type="color",a.dataset.mlMtextToolbarInteractive="true",a.addEventListener("input",()=>{this.applyColorChange(ap(a.value))}),{host:a,setValue:l=>{const c=nS(iS(l));c&&(a.value=c)},setTheme:()=>{},dispose:()=>{}}}const i=document.createElement("div");i.className="ml-mtext-toolbar__color",i.dataset.mlMtextToolbarInteractive="true";const n=t?lp(t):ap("#ffffff"),r=e({container:i,theme:this.theme,initialColor:n,onChange:a=>{this.applyColorChange(a)}})??{};return{host:i,setValue:a=>{var l;(l=r.setValue)==null||l.call(r,a)},setTheme:a=>{var l;(l=r.setTheme)==null||l.call(r,a)},dispose:()=>{var a;(a=r.dispose)==null||a.call(r)}}}applyColorChange(e){if(e.isAci&&e.aci!==null){this.onFormatChange({aci:e.aci});return}if(e.isRgb&&e.rgbValue!==null){this.onFormatChange({aci:null,rgb:Ol(e.rgbValue)});return}this.onFormatChange({aci:null,rgb:16777215})}}function Dl(s,e){const t=Math.max(Number.EPSILON,s),i=e;return i===void 0||i===1||i===4||i===7||i===10?0:i===2||i===5||i===8||i===11?-t/2:i===3||i===6||i===9||i===12?-t:0}const Io="__mlightcadMTextInputBoxSceneRoot",J=class J{constructor(e){z(this,"scene");z(this,"camera");z(this,"mtextRenderer");z(this,"cursorRenderer");z(this,"declaredWidth");z(this,"width");z(this,"position");z(this,"mtextInsertionOffset",new V.Vector3(0,0,0));z(this,"enableWordWrap");z(this,"mtextString","");z(this,"editorLineSpaceFactor",null);z(this,"editorAttachmentPoint",$.MTextAttachmentPoint.TopLeft);z(this,"editorDrawingDirection",$.MTextFlowDirection.LEFT_TO_RIGHT);z(this,"editorRotation",0);z(this,"editorDirectionVector",null);z(this,"cursorIndex",0);z(this,"selectionStart",0);z(this,"selectionEnd",0);z(this,"baseFormat");z(this,"currentFormat");z(this,"defaultTextStyle");z(this,"cursorLogic");z(this,"layoutContainer",{x:0,y:0,width:1,height:1});z(this,"isDragging",!1);z(this,"pendingCursorLineHint",null);z(this,"latestCursorLayoutData",{containerBox:{x:0,y:0,width:1,height:1},charBoxes:[]});z(this,"renderedObject",null);z(this,"boundingBoxObject",null);z(this,"boundingBoxPadding",1);z(this,"boundingBoxZOffset",.01);z(this,"rendererReady",!1);z(this,"pendingFontLoad",null);z(this,"lastFontKey","");z(this,"toolbarTheme","dark");z(this,"toolbarOffsetY",10);z(this,"debugMode",!1);z(this,"colorSettings");z(this,"debugVisibility",{showCharBoxes:!0,showLineIndices:!0,showCharIndices:!0,showChars:!0});z(this,"maxHistorySize",100);z(this,"undoStack",[]);z(this,"redoStack",[]);z(this,"document");z(this,"uiAdapter");z(this,"imeInput",null);z(this,"imeTarget",null);z(this,"lastImeTarget",null);z(this,"reopenTarget",null);z(this,"pointerTarget",null);z(this,"imeComposing",!1);z(this,"imeFocusTimer",null);z(this,"closed",!1);z(this,"toolbarEnabled",!0);z(this,"toolbarContainer",null);z(this,"toolbarFontFamilies",null);z(this,"toolbarColorPicker");z(this,"onImeKeyDown",e=>{if(!this.isActiveEditor()||!(e.ctrlKey||e.metaKey)&&!e.altKey&&e.key.length===1||e.isComposing||e.key==="Process")return;this.handleKeyDown(e)&&e.preventDefault()});z(this,"onWindowKeyDown",e=>{if(!this.isActiveEditor()||e.defaultPrevented)return;const t=e.target,i=(t==null?void 0:t.tagName)??"";if((i==="INPUT"||i==="TEXTAREA"||i==="SELECT"||!!(t!=null&&t.isContentEditable))&&t!==this.imeInput)return;if(!(e.ctrlKey||e.metaKey)&&!e.altKey&&e.key.length===1||this.imeComposing||e.isComposing||e.key==="Process"){this.refocusImeInputSoon();return}this.handleKeyDown(e)&&(e.preventDefault(),this.refocusImeInputSoon())});z(this,"onImeBeforeInput",e=>{if(!this.isActiveEditor()||e.isComposing)return;const t=e.inputType;if(t==="insertText"||t==="insertCompositionText"){this.handleTextInput(e.data??"")&&e.preventDefault();return}t==="insertParagraph"&&this.handleTextInput(`
122
122
  `)&&e.preventDefault()});z(this,"onImeCompositionStart",()=>{this.isActiveEditor()&&(this.imeComposing=!0,this.updateImeAnchorPosition(),this.refocusImeInputSoon())});z(this,"onImeCompositionEnd",e=>{if(!this.isActiveEditor())return;this.imeComposing=!1;const t=e.data??"";this.handleTextInput(t)&&this.imeInput&&(this.imeInput.value=""),this.refocusImeInputSoon()});z(this,"onImeTargetMouseDown",()=>{this.isActiveEditor()&&this.refocusImeInputSoon()});z(this,"onPointerMouseDown",e=>{if(this.closed||e.altKey||e.button===1)return;const t=this.pointerEventToEditorLocal(e);if(!t)return;if(!this.isPointInContainer(t.x,t.y)){this.isActiveEditor()&&this.closeEditor();return}this.activateEditor(),this.handleMouseDown(t.x,t.y,e.shiftKey),this.refocusImeInputSoon()});z(this,"onPointerMouseMove",e=>{if(!this.isActiveEditor()||e.buttons===0||!this.isDragging)return;const t=this.pointerEventToEditorLocal(e);t&&this.handleMouseMove(t.x,t.y)});z(this,"onPointerMouseUp",()=>{this.isActiveEditor()&&this.handleMouseUp()});z(this,"onPointerDoubleClick",e=>{if(!this.isActiveEditor())return;const t=this.pointerEventToEditorLocal(e);t&&(this.handleDoubleClick(t.x,t.y),this.refocusImeInputSoon())});z(this,"onReopenDoubleClick",e=>{this.closed&&this.shouldReopenFromDoubleClick(e)&&this.showEditor()});z(this,"handlers",{change:new Set,selectionChange:new Set,cursorMove:new Set,show:new Set,close:new Set});var r,a,l,c,d,h,f,y;J.instances.add(this),this.scene=e.scene,this.camera=e.camera,this.toolbarTheme=((r=e.toolbar)==null?void 0:r.theme)??"dark",this.toolbarOffsetY=Math.max(0,((a=e.toolbar)==null?void 0:a.offsetY)??10),this.toolbarEnabled=((l=e.toolbar)==null?void 0:l.enabled)??!0,this.toolbarContainer=((c=e.toolbar)==null?void 0:c.container)??null,this.toolbarFontFamilies=((d=e.toolbar)==null?void 0:d.fontFamilies)??null,this.toolbarColorPicker=(h=e.toolbar)==null?void 0:h.colorPicker,this.colorSettings=e.colorSettings,this.position=((f=e.position)==null?void 0:f.clone())??new V.Vector3(0,0,0),e.initialAttachmentPoint!==void 0&&(this.editorAttachmentPoint=e.initialAttachmentPoint),e.initialDrawingDirection!==void 0&&(this.editorDrawingDirection=e.initialDrawingDirection),typeof e.rotation=="number"&&Number.isFinite(e.rotation)&&(this.editorRotation=e.rotation),e.directionVector&&Number.isFinite(e.directionVector.x)&&Number.isFinite(e.directionVector.y)&&(this.editorDirectionVector={x:e.directionVector.x,y:e.directionVector.y,z:Number.isFinite(e.directionVector.z)?e.directionVector.z:0}),typeof e.initialLineSpaceFactor=="number"&&Number.isFinite(e.initialLineSpaceFactor)&&e.initialLineSpaceFactor>0&&(this.editorLineSpaceFactor=e.initialLineSpaceFactor),this.enableWordWrap=e.enableWordWrap??!0;const t=e.textStyle??J.DEFAULT_TEXT_STYLE,i=Math.max(Number.EPSILON,Number.isFinite(t.fixedTextHeight)?t.fixedTextHeight:J.DEFAULT_TEXT_STYLE.fixedTextHeight);this.declaredWidth=Number.isFinite(e.width)?e.width:0,this.width=this.resolveEditorChromeWidth(e.initialText??"",i);const n=Math.max(Number.EPSILON,Number.isFinite(t.lastHeight)?t.lastHeight:i);this.defaultTextStyle={...t,fixedTextHeight:i,lastHeight:n,widthFactor:Number.isFinite(t.widthFactor)?t.widthFactor:1,obliqueAngle:Number.isFinite(t.obliqueAngle)?t.obliqueAngle:0,textGenerationFlag:Number.isFinite(t.textGenerationFlag)?t.textGenerationFlag:0,standardFlag:Number.isFinite(t.standardFlag)?t.standardFlag:0,font:t.font||J.DEFAULT_TEXT_STYLE.font,bigFont:t.bigFont??""},this.baseFormat=this.createBaseFormatFromTextStyle(this.defaultTextStyle,this.resolveRenderColorSettings()),this.currentFormat={...this.baseFormat},this.document=new Re,this.uiAdapter=new To(this.document),this.mtextRenderer=new $.UnifiedRenderer("main",{workerUrl:typeof e.workerUrl=="string"?e.workerUrl:((y=e.workerUrl)==null?void 0:y.toString())??"./assets/mtext-renderer-worker.js"}),e.fontUrl&&this.mtextRenderer.setFontUrl(e.fontUrl),this.cursorLogic=new Bk({containerBox:{x:0,y:0,width:this.width,height:1},charBoxes:[],lineTolerance:4});const o={...e.cursorStyle??{}};o.height===void 0&&o.heightMode!=="fixed"&&(o.height=0),o.color??(o.color="#ffffff"),o.glowColor??(o.glowColor="#ffffff"),this.cursorRenderer=new Vk({renderer:new Gk({scene:this.scene,camera:this.camera}),cursorStyle:o,selectionStyle:e.selectionStyle,enableDebug:!1,enableSelection:!0,debugYAxisUp:this.camera instanceof V.OrthographicCamera?this.camera.top>=this.camera.bottom:!0,debugVisibility:this.debugVisibility}),this.cursorRenderer.setViewTransform({x:this.position.x,y:this.position.y,scaleX:1,scaleY:1}),this.createBoundingBox(e.showBoundingBox??!0,e.boundingBoxStyle),this.boundingBoxObject&&(this.boundingBoxObject.visible=!1),this.attachIme(e.imeTarget),this.initializeRenderer(e.initialText??"")}setText(e){this.document=this.createNormalizedDocument(e),this.document.cursor=0,this.uiAdapter=new To(this.document),this.clearHistory(),this.syncUiStateFromDocument(),this.relayout(),this.emit("change")}getText(){return this.syncUiStateFromDocument(),this.mtextString}getPlainText(){return this.getChars().join("")}insertText(e){if(e.length!==0){if(e===`
123
123
  `){const t=this.cursorLogic.getCursorState().lineIndex;this.pendingCursorLineHint=t>=0?t+1:0}this.commitHistoryEdit(()=>{this.syncDocumentFromUiState(),this.uiAdapter.execute({type:"insertText",text:e,style:this.toDocumentStyle(this.currentFormat)}),this.syncUiStateFromDocument(),this.relayout()})}}deleteBackward(){this.commitHistoryEdit(()=>{this.syncDocumentFromUiState(),this.uiAdapter.execute({type:"backspace"}),this.syncUiStateFromDocument(),this.relayout()})}deleteForward(){this.commitHistoryEdit(()=>{this.syncDocumentFromUiState(),this.uiAdapter.execute({type:"delete"}),this.syncUiStateFromDocument(),this.relayout()})}undo(){const e=this.undoStack.pop();return e?(this.redoStack.push(this.createHistorySnapshot()),this.restoreHistorySnapshot(e),!0):!1}redo(){const e=this.redoStack.pop();return e?(this.undoStack.push(this.createHistorySnapshot()),this.restoreHistorySnapshot(e),!0):!1}moveCursor(e){switch(e){case"left":this.cursorLogic.moveLeft();break;case"right":this.cursorLogic.moveRight();break;case"up":this.cursorLogic.moveUp();break;case"down":this.cursorLogic.moveDown();break;case"lineStart":this.cursorLogic.moveToLineStart();break;case"lineEnd":this.cursorLogic.moveToLineEnd();break;case"wordPrev":this.cursorLogic.moveTo(this.findPrevWordStart(this.cursorLogic.getCurrentIndex()));break;case"wordNext":this.cursorLogic.moveTo(this.findNextWordStart(this.cursorLogic.getCurrentIndex()));break}this.cursorLogic.clearSelection(),this.syncStateFromCursor(),this.emit("cursorMove"),this.emit("selectionChange")}extendSelection(e){const t=this.cursorLogic.getSelection(),i=t?t.anchor:this.cursorLogic.getCurrentIndex();switch(this.cursorLogic.clearSelection(),this.cursorLogic.moveTo(this.cursorIndex),e){case"left":this.cursorLogic.moveTo(this.cursorLogic.getCurrentIndex()-1);break;case"right":this.cursorLogic.moveTo(this.cursorLogic.getCurrentIndex()+1);break;case"up":this.cursorLogic.moveUp();break;case"down":this.cursorLogic.moveDown();break;case"lineStart":this.cursorLogic.moveToLineStart();break;case"lineEnd":this.cursorLogic.moveToLineEnd();break}this.cursorLogic.setSelectionWithDirection(i,this.cursorLogic.getCurrentIndex()),this.syncStateFromCursor(),this.emit("selectionChange")}selectAll(){this.cursorLogic.selectAll(),this.syncStateFromCursor(),this.emit("selectionChange")}clearSelection(){this.cursorLogic.clearSelection(),this.syncStateFromCursor(),this.emit("selectionChange")}setDebugMode(e){this.debugMode=e,this.cursorRenderer.setDebugMode(e)}isDebugMode(){return this.debugMode}setDebugVisibility(e){this.debugVisibility={...this.debugVisibility,...e},this.cursorRenderer.setDebugVisibility(e)}getDebugVisibility(){return{...this.debugVisibility}}setToolbarTheme(e){var t;this.toolbarTheme=e,this.isActiveEditor()&&((t=this.getActiveToolbar())==null||t.setTheme(e))}getToolbarTheme(){return this.toolbarTheme}attachIme(e){const t=this.closed;this.lastImeTarget=e,this.bindReopenDoubleClick(e),this.imeTarget=e,this.attachPointerInteractions(e),this.closed=!1,J.activeEditor?J.activeEditor===this?this.activateEditor():(this.cursorRenderer.hide(),this.boundingBoxObject&&(this.boundingBoxObject.visible=!1)):this.activateEditor(),t&&this.emit("show")}detachIme(){this.imeInput&&(this.imeInput.removeEventListener("keydown",this.onImeKeyDown),this.imeInput.removeEventListener("beforeinput",this.onImeBeforeInput),this.imeInput.removeEventListener("compositionstart",this.onImeCompositionStart),this.imeInput.removeEventListener("compositionend",this.onImeCompositionEnd),window.removeEventListener("keydown",this.onWindowKeyDown),this.imeTarget&&this.imeTarget.removeEventListener("mousedown",this.onImeTargetMouseDown),this.imeInput.remove(),this.imeInput=null,this.imeComposing=!1,this.imeFocusTimer!==null&&(window.clearTimeout(this.imeFocusTimer),this.imeFocusTimer=null))}getCursorIndex(){return this.cursorIndex}getSelectionRange(){const e=Math.min(this.selectionStart,this.selectionEnd),t=Math.max(this.selectionStart,this.selectionEnd);return{start:e,end:t,isCollapsed:e===t}}getCursorLayoutData(){const e={containerBox:{...this.latestCursorLayoutData.containerBox},charBoxes:this.latestCursorLayoutData.charBoxes.map(t=>({...t}))};return this.latestCursorLayoutData.lineBreakIndices&&(e.lineBreakIndices=[...this.latestCursorLayoutData.lineBreakIndices]),this.latestCursorLayoutData.lineLayouts&&(e.lineLayouts=this.latestCursorLayoutData.lineLayouts.map(t=>({...t}))),e}setCurrentFormat(e){var n;const t=this.mergeCharFormat(this.currentFormat,e);this.currentFormat=t;const i=this.getSelectionRange();i.isCollapsed||this.commitHistoryEdit(()=>{this.syncDocumentFromUiState();const o=this.getNodesByLogicalRange(i.start,i.end);for(const r of o){const a=this.toCharFormat(r.style),l=this.mergeCharFormat(a,e);r.style=this.toDocumentStyle(l,r.style)}this.syncUiStateFromDocument(),this.relayout()}),(n=this.getActiveToolbar())==null||n.setFormat(this.currentFormat)}getCurrentFormat(){return{...this.currentFormat}}setParagraphAlignment(e){const t=this.mapRibbonParagraphAlignment(e);t!==void 0&&this.commitHistoryEdit(()=>{this.syncDocumentFromUiState();const i=this.getSelectionRange(),n=this.toDocumentIndexFromLogicalIndex(Math.min(i.start,i.end),!0),o=this.toDocumentIndexFromLogicalIndex(Math.max(i.start,i.end),!1),r=this.document.ast.nodes;if(r.length===0)return;const a=f=>{var g;const y=Math.max(0,Math.min(f,r.length-1));return((g=r[y])==null?void 0:g.type)==="paragraphBreak"?Math.min(y+1,r.length):Math.min(f,r.length-1)},l=f=>{var g;const y=a(f);for(let b=y;b>=0;b--)if(((g=r[b])==null?void 0:g.type)==="paragraphBreak")return b+1;return 0},c=f=>{var g;const y=Math.min(Math.max(0,f),r.length-1);for(let b=y;b<r.length;b++)if(((g=r[b])==null?void 0:g.type)==="paragraphBreak")return b;return r.length},d=l(Math.min(n,o)),h=c(Math.max(n,o));if(!(d>=h)){for(let f=d;f<h;f++){const y=r[f];y&&Jn(y)&&(y.style.paragraph.align=t)}this.syncUiStateFromDocument(),this.relayout()}})}setAttachmentPoint(e){const t=this.mapRibbonAttachmentCode(e);if(!(t===void 0||t===this.editorAttachmentPoint)){if(Number.isFinite(this.layoutContainer.width)&&Number.isFinite(this.layoutContainer.height)){const i=this.position.x+this.layoutContainer.x,n=i+this.layoutContainer.width,o=this.position.y+this.layoutContainer.y,r=o+this.layoutContainer.height;if(Number.isFinite(i)&&Number.isFinite(n)&&Number.isFinite(o)&&Number.isFinite(r)&&n>=i-1e-9&&r>=o-1e-9){const a=this.computeAttachmentAnchorOnBounds(i,n,o,r,this.editorAttachmentPoint),l=this.computeAttachmentAnchorOnBounds(i,n,o,r,t);this.position.x+=l.x-a.x,this.position.y+=l.y-a.y,this.cursorRenderer.setViewTransform({x:this.position.x,y:this.position.y,scaleX:1,scaleY:1})}}this.editorAttachmentPoint=t,this.relayout(),this.emit("change")}}getAttachmentPointCode(){return this.attachmentPointToRibbonCode(this.editorAttachmentPoint)}getMTextAttachmentPoint(){return this.editorAttachmentPoint}toggleCase(){const e=this.getSelectionRange();e.isCollapsed||this.commitHistoryEdit(()=>{this.syncDocumentFromUiState();const t=this.toDocumentIndexFromLogicalIndex(e.start,!0),i=this.toDocumentIndexFromLogicalIndex(e.end,!1);if(i<=t)return;const n=this.document.ast.nodes.slice(t,i),o=n.map(l=>l.type==="char"?l.value:l.type==="stack"?`${l.numerator}${l.denominator}`:"").join("");if(!/[a-zA-Z]/.test(o))return;const r=/[a-z]/.test(o),a=l=>r?l.toUpperCase():l.toLowerCase();this.document.transaction(()=>{for(const l of n)l.type==="char"?l.value=a(l.value):l.type==="stack"&&(l.numerator=a(l.numerator),l.denominator=a(l.denominator));this.document.setSelection(t,i)}),this.syncUiStateFromDocument(),this.relayout()})}getDefaultTextStyle(){return{...this.defaultTextStyle}}handleKeyDown(e){if(e.isComposing||e.key==="Process")return!1;if(e.key==="Escape")return this.closeEditor(),!0;const t=this.isMacPlatform(),i=t?e.metaKey:e.ctrlKey,n=t?e.altKey:e.ctrlKey;if(i&&e.key.toLowerCase()==="a")return this.selectAll(),!0;if(i&&e.key.toLowerCase()==="z")return e.shiftKey?this.redo():this.undo();if(!t&&i&&e.key.toLowerCase()==="y")return this.redo();if(e.shiftKey){if(e.key==="ArrowLeft")return this.consumeExtend("left");if(e.key==="ArrowRight")return this.consumeExtend("right");if(e.key==="ArrowUp")return this.consumeExtend("up");if(e.key==="ArrowDown")return this.consumeExtend("down");if(e.key==="Home")return this.consumeExtend("lineStart");if(e.key==="End")return this.consumeExtend("lineEnd")}return t&&e.metaKey&&e.key==="ArrowLeft"?this.consumeMove("lineStart"):t&&e.metaKey&&e.key==="ArrowRight"?this.consumeMove("lineEnd"):e.key==="ArrowLeft"?this.consumeMove(n?"wordPrev":"left"):e.key==="ArrowRight"?this.consumeMove(n?"wordNext":"right"):e.key==="ArrowUp"?this.consumeMove("up"):e.key==="ArrowDown"?this.consumeMove("down"):e.key==="Home"?this.consumeMove("lineStart"):e.key==="End"?this.consumeMove("lineEnd"):e.key==="Backspace"?(this.deleteBackward(),!0):e.key==="Delete"?(this.deleteForward(),!0):e.key==="Enter"?(this.insertText(`
124
- `),!0):!i&&!e.altKey&&e.key.length===1?(this.insertText(e.key),!0):!1}handleTextInput(e){return e?(this.insertText(e),!0):!1}handleMouseDown(e,t,i){if(i){const n=this.cursorLogic.hitTest(e,t);if(n<0)return;this.cursorLogic.setSelectionWithDirection(this.selectionStart,n)}else if(!this.cursorLogic.moveToClick(e,t))return;this.isDragging=!0,this.syncStateFromCursor(),this.emit("cursorMove"),this.emit("selectionChange")}handleMouseMove(e,t){this.isDragging&&(this.cursorLogic.updateSelectionDrag(e,t),this.syncStateFromCursor(),this.emit("selectionChange"))}handleMouseUp(){this.isDragging=!1}handleDoubleClick(e,t){const i=this.cursorLogic.hitTest(e,t);if(i<0)return;const n=this.getChars();let o=i,r=i;for(;o>0&&!/\s/.test(n[o-1]??"");)o-=1;for(;r<n.length&&!/\s/.test(n[r]??"");)r+=1;this.cursorLogic.setSelection(o,r),this.cursorLogic.moveTo(r),this.syncStateFromCursor(),this.emit("selectionChange")}update(){const e=this.cursorLogic.getCursorState(),t=this.cursorLogic.getSelection(),i=this.getActiveCursorRenderState(e.position,e.lineInfo.height),n=this.cursorLogic.getSelectedCharBoxes();this.cursorRenderer.updateCursor(i.position,i.height),this.cursorRenderer.updateSelection(n),this.cursorRenderer.updateDebugInfo({containerBox:this.layoutContainer,charBoxes:this.cursorLogic.getCharBoxes(),chars:this.getChars(),lines:this.cursorLogic.getLines()}),this.cursorRenderer.setSelectionStyle({fillColor:t!=null&&t.isBackwards?"rgba(150,0,255,0.25)":"rgba(0,120,255,0.30)"}),this.cursorRenderer.render(),this.updateImeAnchorPosition(),this.updateToolbarPosition()}dispose(){var e;J.activeEditor===this?this.deactivateEditor():this.detachIme(),this.detachPointerInteractions(),this.unbindReopenDoubleClick(),this.disposeRenderedObject(this.renderedObject),this.renderedObject=null,this.disposeBoundingBox(),this.mtextRenderer.destroy(),this.cursorRenderer.dispose(),this.cursorLogic.destroy(),this.handlers.change.clear(),this.handlers.selectionChange.clear(),this.handlers.cursorMove.clear(),this.handlers.show.clear(),this.handlers.close.clear(),J.instances.delete(this),J.instances.size===0&&((e=J.sharedToolbar)==null||e.dispose(),J.sharedToolbar=null,J.sharedToolbarContainer=null,J.sharedToolbarFontFamiliesKey="",J.sharedToolbarColorPickerFactory=null,J.activeEditor=null)}closeEditor(){this.closed||(this.closed=!0,this.detachPointerInteractions(),this.deactivateEditor(),this.emit("close"))}showEditor(){const e=this.lastImeTarget;if(!e)return!1;const t=this.closed;return this.closed=!1,this.attachPointerInteractions(e),this.activateEditor(),t&&this.emit("show"),!0}attachPointerInteractions(e){this.detachPointerInteractions(),this.pointerTarget=e,e.addEventListener("mousedown",this.onPointerMouseDown),e.addEventListener("mousemove",this.onPointerMouseMove),e.addEventListener("dblclick",this.onPointerDoubleClick),window.addEventListener("mouseup",this.onPointerMouseUp)}detachPointerInteractions(){this.pointerTarget&&(this.pointerTarget.removeEventListener("mousedown",this.onPointerMouseDown),this.pointerTarget.removeEventListener("mousemove",this.onPointerMouseMove),this.pointerTarget.removeEventListener("dblclick",this.onPointerDoubleClick),window.removeEventListener("mouseup",this.onPointerMouseUp),this.pointerTarget=null)}on(e,t){this.handlers[e].add(t)}off(e,t){(e==="change"||e==="selectionChange"||e==="cursorMove"||e==="show"||e==="close")&&this.handlers[e].delete(t)}getCursorWorldPosition(){const e=this.cursorLogic.getCursorState(),t=this.getActiveCursorRenderState(e.position,e.lineInfo.height).position;return{x:this.position.x+t.x,y:this.position.y+t.y,z:this.position.z}}getMTextInsertionPoint(){return this.position.clone()}getState(){return{mtextString:this.getText(),cursorIndex:this.cursorIndex,selectionStart:this.selectionStart,selectionEnd:this.selectionEnd,currentFormat:this.getCurrentFormat()}}isActiveEditor(){return J.activeEditor===this}activateEditor(){var i;if(this.closed)return;const e=J.activeEditor;e&&e!==this&&e.deactivateEditor(),J.activeEditor=this;const t=this.imeTarget??this.lastImeTarget;t&&this.attachImeBridge(t),this.cursorRenderer.show(),this.boundingBoxObject&&(this.boundingBoxObject.visible=this.rendererReady),t&&this.toolbarEnabled?this.mountToolbar(t):(i=J.sharedToolbar)==null||i.setVisible(!1)}deactivateEditor(){var e;this.isDragging=!1,this.detachIme(),this.cursorRenderer.hide(),this.boundingBoxObject&&(this.boundingBoxObject.visible=!1),J.activeEditor===this&&(J.activeEditor=null,(e=J.sharedToolbar)==null||e.setVisible(!1))}attachImeBridge(e){this.detachIme(),this.imeTarget=e;const t=document.createElement("textarea");t.setAttribute("aria-hidden","true"),t.autocapitalize="off",t.autocomplete="off",t.spellcheck=!1,t.style.position="fixed",t.style.left="0px",t.style.top="0px",t.style.width="2px",t.style.height="2px",t.style.opacity="0",t.style.pointerEvents="none",t.style.zIndex="2147483647",document.body.appendChild(t),this.imeInput=t,t.addEventListener("keydown",this.onImeKeyDown),t.addEventListener("beforeinput",this.onImeBeforeInput),t.addEventListener("compositionstart",this.onImeCompositionStart),t.addEventListener("compositionend",this.onImeCompositionEnd),window.addEventListener("keydown",this.onWindowKeyDown),e.addEventListener("mousedown",this.onImeTargetMouseDown),this.updateImeAnchorPosition(),this.focusImeInput()}getActiveToolbar(){if(!this.isActiveEditor())return null;const e=J.sharedToolbar;if(!e)throw new Error("[mtext-input-box] Failed to create shared toolbar");return e}createToolbarSessionOptions(e){return{anchorElement:e,onFormatChange:t=>{this.setCurrentFormat(t)},onToggleStack:()=>{this.toggleStackSelection()},onToggleSuperscript:()=>this.toggleScriptSelection("superscript"),onToggleSubscript:()=>this.toggleScriptSelection("subscript")}}ensureSharedToolbar(e){var r,a;const t=this.toolbarContainer??document.body,i=((r=this.toolbarFontFamilies)==null?void 0:r.join("\0"))??"";if(!J.sharedToolbar||J.sharedToolbarContainer!==t||J.sharedToolbarFontFamiliesKey!==i||J.sharedToolbarColorPickerFactory!==(this.toolbarColorPicker??null)){(a=J.sharedToolbar)==null||a.dispose();const l={...this.createToolbarSessionOptions(e),container:t,theme:this.toolbarTheme,initialFormat:this.currentFormat};this.toolbarFontFamilies&&(l.fontFamilies=this.toolbarFontFamilies),this.toolbarColorPicker&&(l.colorPicker=this.toolbarColorPicker),J.sharedToolbar=new o0(l),J.sharedToolbarContainer=t,J.sharedToolbarFontFamiliesKey=i,J.sharedToolbarColorPickerFactory=this.toolbarColorPicker??null}const o=J.sharedToolbar;if(!o)throw new Error("[mtext-input-box] Failed to create shared toolbar");return o}mountToolbar(e){if(!this.toolbarEnabled||!this.isActiveEditor())return;const t=this.ensureSharedToolbar(e);t.setTheme(this.toolbarTheme),t.setSession(this.createToolbarSessionOptions(e)),t.setVisible(!0),t.setFormat(this.currentFormat),this.updateToolbarStackState(),this.updateToolbarPosition()}updateToolbarPosition(){if(!this.toolbarEnabled||!this.isActiveEditor()||!this.imeTarget)return;const e=this.getActiveToolbar();if(!e)return;const t=this.getEditorScreenBounds();t&&e.setAnchor(t.minX,t.minY-this.toolbarOffsetY)}getEditorScreenBounds(){if(!this.imeTarget)return null;const e=this.imeTarget.getBoundingClientRect(),t=this.position.x+this.layoutContainer.x,i=t+this.layoutContainer.width,n=this.position.y+this.layoutContainer.y,o=n+this.layoutContainer.height,r=[new V.Vector3(t,n,this.position.z),new V.Vector3(i,n,this.position.z),new V.Vector3(t,o,this.position.z),new V.Vector3(i,o,this.position.z)];let a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY;for(const h of r){const f=h.clone().project(this.camera),y=e.left+(f.x+1)*.5*e.width,g=e.top+(1-f.y)*.5*e.height;a=Math.min(a,y),l=Math.max(l,y),c=Math.min(c,g),d=Math.max(d,g)}return!Number.isFinite(a)||!Number.isFinite(c)?null:{minX:a,maxX:l,minY:c,maxY:d}}pointerEventToEditorLocal(e){const t=this.pointerTarget??this.imeTarget;return this.pointerEventToEditorLocalByTarget(e,t)}pointerEventToEditorLocalByTarget(e,t){if(!t)return null;const i=t.getBoundingClientRect();if(i.width<=0||i.height<=0)return null;const n=(e.clientX-i.left)/i.width*2-1,o=-((e.clientY-i.top)/i.height)*2+1,r=new V.Vector3(n,o,-1).unproject(this.camera),l=new V.Vector3(n,o,1).unproject(this.camera).sub(r);if(Math.abs(l.z)<1e-8)return null;const c=(this.position.z-r.z)/l.z,d=r.add(l.multiplyScalar(c));return{x:d.x-this.position.x,y:d.y-this.position.y}}shouldReopenFromDoubleClick(e){return this.hitTestRenderedObject(e)}hitTestRenderedObject(e){if(!this.renderedObject||!this.reopenTarget)return!1;const t=this.reopenTarget.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;const i=(e.clientX-t.left)/t.width*2-1,n=-((e.clientY-t.top)/t.height)*2+1,o=new V.Raycaster;return o.setFromCamera(new V.Vector2(i,n),this.camera),o.intersectObject(this.renderedObject,!0).length>0}bindReopenDoubleClick(e){this.reopenTarget!==e&&(this.unbindReopenDoubleClick(),this.reopenTarget=e,e.addEventListener("dblclick",this.onReopenDoubleClick))}unbindReopenDoubleClick(){this.reopenTarget&&(this.reopenTarget.removeEventListener("dblclick",this.onReopenDoubleClick),this.reopenTarget=null)}isPointInContainer(e,t){const i=this.layoutContainer,n=i.x+i.width,o=i.y+i.height;return e>=i.x&&e<=n&&t>=i.y&&t<=o}async initializeRenderer(e=""){try{this.mtextString=e,this.document=this.createNormalizedDocument(e),this.document.cursor=0,this.uiAdapter=new To(this.document),this.clearHistory(),this.syncUiStateFromDocument();const t=this.collectFontNamesForText(e),i=t.length>0?t:[_o];await this.mtextRenderer.loadFonts(i),this.lastFontKey=i.map(n=>n.toLowerCase()).sort().join("|"),this.rendererReady=!0,this.setText(e),this.boundingBoxObject&&this.isActiveEditor()&&(this.boundingBoxObject.visible=!0)}catch(t){console.error("[mtext-input-box] Failed to initialize mtext renderer fonts",t),this.rendererReady=!0,this.setText(e),this.boundingBoxObject&&this.isActiveEditor()&&(this.boundingBoxObject.visible=!0)}}relayout(){if(!this.rendererReady){this.mtextInsertionOffset.set(0,0,0);const e=this.createFallbackCharBoxes();this.layoutContainer=e.containerBox,this.updateCursorData(e.charBoxes,e.lineBreakIndices,e.lineLayouts),this.updateBoundingBoxGeometry();return}this.ensureFontsLoaded();try{const e=this.createMTextData(),t=this.createTextStyle(),i=this.resolveRenderColorSettings(),n=this.mtextRenderer.syncRenderMText(e,t,i);this.pruneExtraMTextLayoutRoots(n),this.replaceRenderedObject(n);const o=this.extractBoxesFromRenderedObject(n);this.mtextInsertionOffset.set(0,0,0),this.layoutContainer=o.containerBox,this.updateCursorData(o.charBoxes,o.lineBreakIndices,o.lineLayouts),this.updateBoundingBoxGeometry()}catch(e){console.error("[mtext-input-box] Failed to sync render MTEXT",e),this.mtextInsertionOffset.set(0,0,0);const t=this.createFallbackCharBoxes();this.layoutContainer=t.containerBox,this.updateCursorData(t.charBoxes,t.lineBreakIndices,t.lineLayouts),this.updateBoundingBoxGeometry()}}ensureFontsLoaded(){if(this.pendingFontLoad)return;const e=this.collectFontNamesForText(),t=e.map(i=>i.toLowerCase()).sort().join("|");!t||t===this.lastFontKey||(this.lastFontKey=t,this.pendingFontLoad=this.mtextRenderer.loadFonts(e).then(()=>{}).catch(i=>{console.warn("[mtext-input-box] Failed to load fonts for MTEXT",i)}).finally(()=>{this.pendingFontLoad=null,this.rendererReady&&this.relayout()}))}collectFontNamesForText(e=this.mtextString){const t=new Set,i=n=>{if(!n)return;const o=n.trim();o&&t.add(o)};i(this.defaultTextStyle.font),i(this.defaultTextStyle.bigFont);try{const n=$.MText.getFonts(e||"",!0);for(const o of n)i(o)}catch(n){console.warn("[mtext-input-box] Failed to parse fonts from MTEXT",n)}return t.size===0&&t.add(_o),[...t]}updateCursorData(e,t,i){this.latestCursorLayoutData={containerBox:{...this.layoutContainer},charBoxes:e.map(l=>({...l})),...t?{lineBreakIndices:[...t]}:{},...i?{lineLayouts:i.map(l=>({...l}))}:{}},this.cursorLogic.updateData(this.layoutContainer,e,t,i);const n=Math.min(this.cursorIndex,this.charCount()),o=Math.max(0,this.cursorLogic.getLineCount()-1),r=this.pendingCursorLineHint===null?null:Math.max(0,Math.min(this.pendingCursorLineHint,o));this.pendingCursorLineHint=null,this.cursorLogic.moveTo(n,r),this.selectionStart!==this.selectionEnd?this.cursorLogic.setSelection(this.selectionStart,this.selectionEnd):this.cursorLogic.clearSelection(),this.syncStateFromCursor();const a=this.unionLayoutContainerWithCursorLines(this.layoutContainer);(Math.abs(a.y-this.layoutContainer.y)>1e-6||Math.abs(a.height-this.layoutContainer.height)>1e-6)&&(this.layoutContainer=a,this.latestCursorLayoutData.containerBox={...this.layoutContainer},this.cursorLogic.updateData(this.layoutContainer,e,t,i),this.cursorLogic.moveTo(n,r),this.selectionStart!==this.selectionEnd?this.cursorLogic.setSelection(this.selectionStart,this.selectionEnd):this.cursorLogic.clearSelection(),this.syncStateFromCursor())}unionLayoutContainerWithCursorLines(e){const t=this.cursorLogic.getLines();if(t.length===0)return e;let i=e.y,n=e.y+e.height;for(const o of t){if(o.charCount!==0)continue;const r=o.y-o.height/2,a=o.y+o.height/2;Number.isFinite(r)&&(i=Math.min(i,r)),Number.isFinite(a)&&(n=Math.max(n,a))}return!Number.isFinite(i)||!Number.isFinite(n)||n<i?e:{...e,y:i,height:n-i}}computeEditorVerticalBounds(e,t,i){const n=()=>({minY:i.y-i.height/2,maxY:i.y+i.height/2}),o=(l,c,d,h)=>l<h+1e-4&&c>d-1e-4;if(e.length===0&&t.length===0)return n();if(e.length===0){let l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(const d of t)l=Math.min(l,d.y-d.height/2),c=Math.max(c,d.y+d.height/2);return Number.isFinite(l)&&Number.isFinite(c)&&c>=l?{minY:l,maxY:c}:n()}if(t.length===0){let l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(const d of e){const h=d.y-d.height/2,f=d.y+d.height/2;l=Math.min(l,h),c=Math.max(c,f)}return Number.isFinite(l)&&Number.isFinite(c)&&c>=l?{minY:l,maxY:c}:n()}let r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(const l of e){const c=l.y-l.height/2,d=l.y+l.height/2,h=t.filter(f=>{const y=f.y-f.height/2,g=f.y+f.height/2;return o(y,g,c,d)});if(h.length===0)r=Math.min(r,c),a=Math.max(a,d);else for(const f of h)r=Math.min(r,f.y-f.height/2),a=Math.max(a,f.y+f.height/2)}for(const l of t){const c=l.y-l.height/2,d=l.y+l.height/2;e.some(f=>{const y=f.y-f.height/2,g=f.y+f.height/2;return o(c,d,y,g)})||(r=Math.min(r,c),a=Math.max(a,d))}return!Number.isFinite(r)||!Number.isFinite(a)||a<r?n():{minY:r,maxY:a}}extractBoxesFromRenderedObject(e){const t=e.createLayoutData(),i=[],n=((t==null?void 0:t.lines)??[]).filter(y=>Number.isFinite(y.y)&&Number.isFinite(y.height)).map(y=>({y:y.y-this.position.y,height:Math.max(Number.EPSILON,y.height)}));for(const y of(t==null?void 0:t.chars)??[]){const g=y.box?this.toLocalBox(y.box):void 0;!g||!(Number.isFinite(g.x)&&Number.isFinite(g.y)&&Number.isFinite(g.width)&&Number.isFinite(g.height))||i.push(g)}const o=(t.lines??[]).map(y=>y.breakIndex).filter(y=>Number.isInteger(y)).filter(y=>y>=0&&y<=i.length),r=this.toLocalBox(e.box),{minY:a,maxY:l}=this.computeEditorVerticalBounds(n,i,r),c=this.declaredWidth>0?Math.max(Number.EPSILON,this.resolveEditorChromeWidth(this.mtextString,this.defaultTextStyle.fixedTextHeight)):Math.max((r==null?void 0:r.width)??0,this.getFallbackLineAdvance()*.6,Number.EPSILON);this.width=c;const h={x:this.declaredWidth>0?Dl(c,this.editorAttachmentPoint):Number.isFinite(r==null?void 0:r.x)?r.x:Dl(c,this.editorAttachmentPoint),y:a,width:c,height:Math.max(0,l-a)},f=this.getFallbackLineAdvance();if(h.height<f){const y=f-h.height;h.y-=y,h.height=f}return{containerBox:h,charBoxes:i,...o.length>0?{lineBreakIndices:o}:{},...n.length>0?{lineLayouts:n}:{}}}normalizeRenderedTopAlignment(...e){this.mtextInsertionOffset.set(0,0,0)}toLocalBox(e){const t=e.min.x-this.position.x,i=e.max.x-this.position.x,n=e.min.y-this.position.y,o=e.max.y-this.position.y,r=Math.max(0,i-t),a=Math.max(0,o-n);return{x:t,y:n+a/2,width:r,height:a}}createFallbackCharBoxes(){const e=this.getFallbackLineAdvance(),t=[],i=[],n=[],o=Dl(this.width,this.editorAttachmentPoint);let r=o,a=0,l=-e;n.push({y:a-e/2,height:e});for(const f of this.getChars()){if(f===`
124
+ `),!0):!i&&!e.altKey&&e.key.length===1?(this.insertText(e.key),!0):!1}handleTextInput(e){return e?(this.insertText(e),!0):!1}handleMouseDown(e,t,i){if(i){const n=this.cursorLogic.hitTest(e,t);if(n<0)return;this.cursorLogic.setSelectionWithDirection(this.selectionStart,n)}else if(!this.cursorLogic.moveToClick(e,t))return;this.isDragging=!0,this.syncStateFromCursor(),this.emit("cursorMove"),this.emit("selectionChange")}handleMouseMove(e,t){this.isDragging&&(this.cursorLogic.updateSelectionDrag(e,t),this.syncStateFromCursor(),this.emit("selectionChange"))}handleMouseUp(){this.isDragging=!1}handleDoubleClick(e,t){const i=this.cursorLogic.hitTest(e,t);if(i<0)return;const n=this.getChars();let o=i,r=i;for(;o>0&&!/\s/.test(n[o-1]??"");)o-=1;for(;r<n.length&&!/\s/.test(n[r]??"");)r+=1;this.cursorLogic.setSelection(o,r),this.cursorLogic.moveTo(r),this.syncStateFromCursor(),this.emit("selectionChange")}update(){const e=this.cursorLogic.getCursorState(),t=this.cursorLogic.getSelection(),i=this.getActiveCursorRenderState(e.position,e.lineInfo.height),n=this.cursorLogic.getSelectedCharBoxes();this.cursorRenderer.updateCursor(i.position,i.height),this.cursorRenderer.updateSelection(n),this.cursorRenderer.updateDebugInfo({containerBox:this.layoutContainer,charBoxes:this.cursorLogic.getCharBoxes(),chars:this.getChars(),lines:this.cursorLogic.getLines()}),this.cursorRenderer.setSelectionStyle({fillColor:t!=null&&t.isBackwards?"rgba(150,0,255,0.25)":"rgba(0,120,255,0.30)"}),this.cursorRenderer.render(),this.updateImeAnchorPosition(),this.updateToolbarPosition()}dispose(){var e;J.activeEditor===this?this.deactivateEditor():this.detachIme(),this.detachPointerInteractions(),this.unbindReopenDoubleClick(),this.disposeRenderedObject(this.renderedObject),this.renderedObject=null,this.disposeBoundingBox(),this.mtextRenderer.destroy(),this.cursorRenderer.dispose(),this.cursorLogic.destroy(),this.handlers.change.clear(),this.handlers.selectionChange.clear(),this.handlers.cursorMove.clear(),this.handlers.show.clear(),this.handlers.close.clear(),J.instances.delete(this),J.instances.size===0&&((e=J.sharedToolbar)==null||e.dispose(),J.sharedToolbar=null,J.sharedToolbarContainer=null,J.sharedToolbarFontFamiliesKey="",J.sharedToolbarColorPickerFactory=null,J.activeEditor=null)}closeEditor(){this.closed||(this.closed=!0,this.detachPointerInteractions(),this.deactivateEditor(),this.emit("close"))}showEditor(){const e=this.lastImeTarget;if(!e)return!1;const t=this.closed;return this.closed=!1,this.attachPointerInteractions(e),this.activateEditor(),t&&this.emit("show"),!0}attachPointerInteractions(e){this.detachPointerInteractions(),this.pointerTarget=e,e.addEventListener("mousedown",this.onPointerMouseDown),e.addEventListener("mousemove",this.onPointerMouseMove),e.addEventListener("dblclick",this.onPointerDoubleClick),window.addEventListener("mouseup",this.onPointerMouseUp)}detachPointerInteractions(){this.pointerTarget&&(this.pointerTarget.removeEventListener("mousedown",this.onPointerMouseDown),this.pointerTarget.removeEventListener("mousemove",this.onPointerMouseMove),this.pointerTarget.removeEventListener("dblclick",this.onPointerDoubleClick),window.removeEventListener("mouseup",this.onPointerMouseUp),this.pointerTarget=null)}on(e,t){this.handlers[e].add(t)}off(e,t){(e==="change"||e==="selectionChange"||e==="cursorMove"||e==="show"||e==="close")&&this.handlers[e].delete(t)}getCursorWorldPosition(){const e=this.cursorLogic.getCursorState(),t=this.getActiveCursorRenderState(e.position,e.lineInfo.height).position;return{x:this.position.x+t.x,y:this.position.y+t.y,z:this.position.z}}getMTextInsertionPoint(){return this.position.clone()}getState(){return{mtextString:this.getText(),cursorIndex:this.cursorIndex,selectionStart:this.selectionStart,selectionEnd:this.selectionEnd,currentFormat:this.getCurrentFormat()}}isActiveEditor(){return J.activeEditor===this}activateEditor(){var i;if(this.closed)return;const e=J.activeEditor;e&&e!==this&&e.deactivateEditor(),J.activeEditor=this;const t=this.imeTarget??this.lastImeTarget;t&&this.attachImeBridge(t),this.cursorRenderer.show(),this.boundingBoxObject&&(this.boundingBoxObject.visible=this.rendererReady),t&&this.toolbarEnabled?this.mountToolbar(t):(i=J.sharedToolbar)==null||i.setVisible(!1)}deactivateEditor(){var e;this.isDragging=!1,this.detachIme(),this.cursorRenderer.hide(),this.boundingBoxObject&&(this.boundingBoxObject.visible=!1),J.activeEditor===this&&(J.activeEditor=null,(e=J.sharedToolbar)==null||e.setVisible(!1))}attachImeBridge(e){this.detachIme(),this.imeTarget=e;const t=document.createElement("textarea");t.setAttribute("aria-hidden","true"),t.autocapitalize="off",t.autocomplete="off",t.spellcheck=!1,t.style.position="fixed",t.style.left="0px",t.style.top="0px",t.style.width="2px",t.style.height="2px",t.style.opacity="0",t.style.pointerEvents="none",t.style.zIndex="2147483647",document.body.appendChild(t),this.imeInput=t,t.addEventListener("keydown",this.onImeKeyDown),t.addEventListener("beforeinput",this.onImeBeforeInput),t.addEventListener("compositionstart",this.onImeCompositionStart),t.addEventListener("compositionend",this.onImeCompositionEnd),window.addEventListener("keydown",this.onWindowKeyDown),e.addEventListener("mousedown",this.onImeTargetMouseDown),this.updateImeAnchorPosition(),this.focusImeInput()}getActiveToolbar(){if(!this.isActiveEditor())return null;const e=J.sharedToolbar;if(!e)throw new Error("[mtext-input-box] Failed to create shared toolbar");return e}createToolbarSessionOptions(e){return{anchorElement:e,onFormatChange:t=>{this.setCurrentFormat(t)},onToggleStack:()=>{this.toggleStackSelection()},onToggleSuperscript:()=>this.toggleScriptSelection("superscript"),onToggleSubscript:()=>this.toggleScriptSelection("subscript")}}ensureSharedToolbar(e){var r,a;const t=this.toolbarContainer??document.body,i=((r=this.toolbarFontFamilies)==null?void 0:r.join("\0"))??"";if(!J.sharedToolbar||J.sharedToolbarContainer!==t||J.sharedToolbarFontFamiliesKey!==i||J.sharedToolbarColorPickerFactory!==(this.toolbarColorPicker??null)){(a=J.sharedToolbar)==null||a.dispose();const l={...this.createToolbarSessionOptions(e),container:t,theme:this.toolbarTheme,initialFormat:this.currentFormat};this.toolbarFontFamilies&&(l.fontFamilies=this.toolbarFontFamilies),this.toolbarColorPicker&&(l.colorPicker=this.toolbarColorPicker),J.sharedToolbar=new oS(l),J.sharedToolbarContainer=t,J.sharedToolbarFontFamiliesKey=i,J.sharedToolbarColorPickerFactory=this.toolbarColorPicker??null}const o=J.sharedToolbar;if(!o)throw new Error("[mtext-input-box] Failed to create shared toolbar");return o}mountToolbar(e){if(!this.toolbarEnabled||!this.isActiveEditor())return;const t=this.ensureSharedToolbar(e);t.setTheme(this.toolbarTheme),t.setSession(this.createToolbarSessionOptions(e)),t.setVisible(!0),t.setFormat(this.currentFormat),this.updateToolbarStackState(),this.updateToolbarPosition()}updateToolbarPosition(){if(!this.toolbarEnabled||!this.isActiveEditor()||!this.imeTarget)return;const e=this.getActiveToolbar();if(!e)return;const t=this.getEditorScreenBounds();t&&e.setAnchor(t.minX,t.minY-this.toolbarOffsetY)}getEditorScreenBounds(){if(!this.imeTarget)return null;const e=this.imeTarget.getBoundingClientRect(),t=this.position.x+this.layoutContainer.x,i=t+this.layoutContainer.width,n=this.position.y+this.layoutContainer.y,o=n+this.layoutContainer.height,r=[new V.Vector3(t,n,this.position.z),new V.Vector3(i,n,this.position.z),new V.Vector3(t,o,this.position.z),new V.Vector3(i,o,this.position.z)];let a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY;for(const h of r){const f=h.clone().project(this.camera),y=e.left+(f.x+1)*.5*e.width,g=e.top+(1-f.y)*.5*e.height;a=Math.min(a,y),l=Math.max(l,y),c=Math.min(c,g),d=Math.max(d,g)}return!Number.isFinite(a)||!Number.isFinite(c)?null:{minX:a,maxX:l,minY:c,maxY:d}}pointerEventToEditorLocal(e){const t=this.pointerTarget??this.imeTarget;return this.pointerEventToEditorLocalByTarget(e,t)}pointerEventToEditorLocalByTarget(e,t){if(!t)return null;const i=t.getBoundingClientRect();if(i.width<=0||i.height<=0)return null;const n=(e.clientX-i.left)/i.width*2-1,o=-((e.clientY-i.top)/i.height)*2+1,r=new V.Vector3(n,o,-1).unproject(this.camera),l=new V.Vector3(n,o,1).unproject(this.camera).sub(r);if(Math.abs(l.z)<1e-8)return null;const c=(this.position.z-r.z)/l.z,d=r.add(l.multiplyScalar(c));return{x:d.x-this.position.x,y:d.y-this.position.y}}shouldReopenFromDoubleClick(e){return this.hitTestRenderedObject(e)}hitTestRenderedObject(e){if(!this.renderedObject||!this.reopenTarget)return!1;const t=this.reopenTarget.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;const i=(e.clientX-t.left)/t.width*2-1,n=-((e.clientY-t.top)/t.height)*2+1,o=new V.Raycaster;return o.setFromCamera(new V.Vector2(i,n),this.camera),o.intersectObject(this.renderedObject,!0).length>0}bindReopenDoubleClick(e){this.reopenTarget!==e&&(this.unbindReopenDoubleClick(),this.reopenTarget=e,e.addEventListener("dblclick",this.onReopenDoubleClick))}unbindReopenDoubleClick(){this.reopenTarget&&(this.reopenTarget.removeEventListener("dblclick",this.onReopenDoubleClick),this.reopenTarget=null)}isPointInContainer(e,t){const i=this.layoutContainer,n=i.x+i.width,o=i.y+i.height;return e>=i.x&&e<=n&&t>=i.y&&t<=o}async initializeRenderer(e=""){try{this.mtextString=e,this.document=this.createNormalizedDocument(e),this.document.cursor=0,this.uiAdapter=new To(this.document),this.clearHistory(),this.syncUiStateFromDocument();const t=this.collectFontNamesForText(e),i=t.length>0?t:[_o];await this.mtextRenderer.loadFonts(i),this.lastFontKey=i.map(n=>n.toLowerCase()).sort().join("|"),this.rendererReady=!0,this.setText(e),this.boundingBoxObject&&this.isActiveEditor()&&(this.boundingBoxObject.visible=!0)}catch(t){console.error("[mtext-input-box] Failed to initialize mtext renderer fonts",t),this.rendererReady=!0,this.setText(e),this.boundingBoxObject&&this.isActiveEditor()&&(this.boundingBoxObject.visible=!0)}}relayout(){if(!this.rendererReady){this.mtextInsertionOffset.set(0,0,0);const e=this.createFallbackCharBoxes();this.layoutContainer=e.containerBox,this.updateCursorData(e.charBoxes,e.lineBreakIndices,e.lineLayouts),this.updateBoundingBoxGeometry();return}this.ensureFontsLoaded();try{const e=this.createMTextData(),t=this.createTextStyle(),i=this.resolveRenderColorSettings(),n=this.mtextRenderer.syncRenderMText(e,t,i);this.pruneExtraMTextLayoutRoots(n),this.replaceRenderedObject(n);const o=this.extractBoxesFromRenderedObject(n);this.mtextInsertionOffset.set(0,0,0),this.layoutContainer=o.containerBox,this.updateCursorData(o.charBoxes,o.lineBreakIndices,o.lineLayouts),this.updateBoundingBoxGeometry()}catch(e){console.error("[mtext-input-box] Failed to sync render MTEXT",e),this.mtextInsertionOffset.set(0,0,0);const t=this.createFallbackCharBoxes();this.layoutContainer=t.containerBox,this.updateCursorData(t.charBoxes,t.lineBreakIndices,t.lineLayouts),this.updateBoundingBoxGeometry()}}ensureFontsLoaded(){if(this.pendingFontLoad)return;const e=this.collectFontNamesForText(),t=e.map(i=>i.toLowerCase()).sort().join("|");!t||t===this.lastFontKey||(this.lastFontKey=t,this.pendingFontLoad=this.mtextRenderer.loadFonts(e).then(()=>{}).catch(i=>{console.warn("[mtext-input-box] Failed to load fonts for MTEXT",i)}).finally(()=>{this.pendingFontLoad=null,this.rendererReady&&this.relayout()}))}collectFontNamesForText(e=this.mtextString){const t=new Set,i=n=>{if(!n)return;const o=n.trim();o&&t.add(o)};i(this.defaultTextStyle.font),i(this.defaultTextStyle.bigFont);try{const n=$.MText.getFonts(e||"",!0);for(const o of n)i(o)}catch(n){console.warn("[mtext-input-box] Failed to parse fonts from MTEXT",n)}return t.size===0&&t.add(_o),[...t]}updateCursorData(e,t,i){this.latestCursorLayoutData={containerBox:{...this.layoutContainer},charBoxes:e.map(l=>({...l})),...t?{lineBreakIndices:[...t]}:{},...i?{lineLayouts:i.map(l=>({...l}))}:{}},this.cursorLogic.updateData(this.layoutContainer,e,t,i);const n=Math.min(this.cursorIndex,this.charCount()),o=Math.max(0,this.cursorLogic.getLineCount()-1),r=this.pendingCursorLineHint===null?null:Math.max(0,Math.min(this.pendingCursorLineHint,o));this.pendingCursorLineHint=null,this.cursorLogic.moveTo(n,r),this.selectionStart!==this.selectionEnd?this.cursorLogic.setSelection(this.selectionStart,this.selectionEnd):this.cursorLogic.clearSelection(),this.syncStateFromCursor();const a=this.unionLayoutContainerWithCursorLines(this.layoutContainer);(Math.abs(a.y-this.layoutContainer.y)>1e-6||Math.abs(a.height-this.layoutContainer.height)>1e-6)&&(this.layoutContainer=a,this.latestCursorLayoutData.containerBox={...this.layoutContainer},this.cursorLogic.updateData(this.layoutContainer,e,t,i),this.cursorLogic.moveTo(n,r),this.selectionStart!==this.selectionEnd?this.cursorLogic.setSelection(this.selectionStart,this.selectionEnd):this.cursorLogic.clearSelection(),this.syncStateFromCursor())}unionLayoutContainerWithCursorLines(e){const t=this.cursorLogic.getLines();if(t.length===0)return e;let i=e.y,n=e.y+e.height;for(const o of t){if(o.charCount!==0)continue;const r=o.y-o.height/2,a=o.y+o.height/2;Number.isFinite(r)&&(i=Math.min(i,r)),Number.isFinite(a)&&(n=Math.max(n,a))}return!Number.isFinite(i)||!Number.isFinite(n)||n<i?e:{...e,y:i,height:n-i}}computeEditorVerticalBounds(e,t,i){const n=()=>({minY:i.y-i.height/2,maxY:i.y+i.height/2}),o=(l,c,d,h)=>l<h+1e-4&&c>d-1e-4;if(e.length===0&&t.length===0)return n();if(e.length===0){let l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(const d of t)l=Math.min(l,d.y-d.height/2),c=Math.max(c,d.y+d.height/2);return Number.isFinite(l)&&Number.isFinite(c)&&c>=l?{minY:l,maxY:c}:n()}if(t.length===0){let l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(const d of e){const h=d.y-d.height/2,f=d.y+d.height/2;l=Math.min(l,h),c=Math.max(c,f)}return Number.isFinite(l)&&Number.isFinite(c)&&c>=l?{minY:l,maxY:c}:n()}let r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(const l of e){const c=l.y-l.height/2,d=l.y+l.height/2,h=t.filter(f=>{const y=f.y-f.height/2,g=f.y+f.height/2;return o(y,g,c,d)});if(h.length===0)r=Math.min(r,c),a=Math.max(a,d);else for(const f of h)r=Math.min(r,f.y-f.height/2),a=Math.max(a,f.y+f.height/2)}for(const l of t){const c=l.y-l.height/2,d=l.y+l.height/2;e.some(f=>{const y=f.y-f.height/2,g=f.y+f.height/2;return o(c,d,y,g)})||(r=Math.min(r,c),a=Math.max(a,d))}return!Number.isFinite(r)||!Number.isFinite(a)||a<r?n():{minY:r,maxY:a}}extractBoxesFromRenderedObject(e){const t=e.createLayoutData(),i=[],n=((t==null?void 0:t.lines)??[]).filter(y=>Number.isFinite(y.y)&&Number.isFinite(y.height)).map(y=>({y:y.y-this.position.y,height:Math.max(Number.EPSILON,y.height)}));for(const y of(t==null?void 0:t.chars)??[]){const g=y.box?this.toLocalBox(y.box):void 0;!g||!(Number.isFinite(g.x)&&Number.isFinite(g.y)&&Number.isFinite(g.width)&&Number.isFinite(g.height))||i.push(g)}const o=(t.lines??[]).map(y=>y.breakIndex).filter(y=>Number.isInteger(y)).filter(y=>y>=0&&y<=i.length),r=this.toLocalBox(e.box),{minY:a,maxY:l}=this.computeEditorVerticalBounds(n,i,r),c=this.declaredWidth>0?Math.max(Number.EPSILON,this.resolveEditorChromeWidth(this.mtextString,this.defaultTextStyle.fixedTextHeight)):Math.max((r==null?void 0:r.width)??0,this.getFallbackLineAdvance()*.6,Number.EPSILON);this.width=c;const h={x:this.declaredWidth>0?Dl(c,this.editorAttachmentPoint):Number.isFinite(r==null?void 0:r.x)?r.x:Dl(c,this.editorAttachmentPoint),y:a,width:c,height:Math.max(0,l-a)},f=this.getFallbackLineAdvance();if(h.height<f){const y=f-h.height;h.y-=y,h.height=f}return{containerBox:h,charBoxes:i,...o.length>0?{lineBreakIndices:o}:{},...n.length>0?{lineLayouts:n}:{}}}normalizeRenderedTopAlignment(...e){this.mtextInsertionOffset.set(0,0,0)}toLocalBox(e){const t=e.min.x-this.position.x,i=e.max.x-this.position.x,n=e.min.y-this.position.y,o=e.max.y-this.position.y,r=Math.max(0,i-t),a=Math.max(0,o-n);return{x:t,y:n+a/2,width:r,height:a}}createFallbackCharBoxes(){const e=this.getFallbackLineAdvance(),t=[],i=[],n=[],o=Dl(this.width,this.editorAttachmentPoint);let r=o,a=0,l=-e;n.push({y:a-e/2,height:e});for(const f of this.getChars()){if(f===`
125
125
  `){i.push(t.length),r=o,a-=e,l=Math.min(l,a-e),n.push({y:a-e/2,height:e});continue}const y=Math.max(Number.EPSILON,this.currentFormat.fontSize*.6);this.enableWordWrap&&this.declaredWidth>0&&r>o&&r+y>o+this.width&&(i.push(t.length),r=o,a-=e,l=Math.min(l,a-e),n.push({y:a-e/2,height:e})),t.push({x:r,y:a-e/2,width:y,height:e}),r+=y}const c=0,d=Math.max(Number.EPSILON,c-l),h=this.attachmentVerticalOffsetForLocalBox(l,c);if(h!==0){l+=h;for(const f of t)f.y+=h;for(const f of n)f.y+=h}return{containerBox:{x:o,y:l,width:this.width,height:d},charBoxes:t,lineBreakIndices:i,lineLayouts:n}}attachmentVerticalOffsetForLocalBox(e,t){const i=(e+t)/2,n=this.editorAttachmentPoint;return n===void 0||n===1||n===2||n===3?-t:n===4||n===5||n===6?-i:-e}createBoundingBox(e,t){if(!e)return;const i=typeof(t==null?void 0:t.color)=="number"?t.color:new V.Color((t==null?void 0:t.color)??"#58a6ff");this.boundingBoxPadding=Math.max(0,(t==null?void 0:t.padding)??1),this.boundingBoxZOffset=(t==null?void 0:t.zOffset)??.01;const n=new V.LineBasicMaterial({color:i,transparent:!0,opacity:(t==null?void 0:t.opacity)??.9,depthTest:!1,depthWrite:!1}),o=new V.BufferGeometry;this.boundingBoxObject=new V.LineLoop(o,n),this.boundingBoxObject.position.z=this.boundingBoxZOffset,this.scene.add(this.boundingBoxObject)}updateBoundingBoxGeometry(){if(!this.boundingBoxObject)return;this.boundingBoxObject.geometry.dispose();const t=this.boundingBoxPadding,i=this.position.x+this.layoutContainer.x-t,n=this.position.y+this.layoutContainer.y-t,o=this.position.x+this.layoutContainer.x+this.layoutContainer.width+t,r=this.position.y+this.layoutContainer.y+this.layoutContainer.height+t,a=this.position.z;this.boundingBoxObject.geometry=new V.BufferGeometry().setFromPoints([new V.Vector3(i,n,a),new V.Vector3(o,n,a),new V.Vector3(o,r,a),new V.Vector3(i,r,a)])}disposeBoundingBox(){if(!this.boundingBoxObject)return;this.boundingBoxObject.removeFromParent(),this.boundingBoxObject.geometry.dispose();const e=Array.isArray(this.boundingBoxObject.material)?this.boundingBoxObject.material:[this.boundingBoxObject.material];for(const t of e)t.dispose();this.boundingBoxObject=null}replaceRenderedObject(e){this.disposeRenderedObject(this.renderedObject),this.removeStrayInputBoxSceneRootsExcept(e),this.forceVisibleMaterialState(e),e.userData[Io]=this,this.renderedObject=e,this.scene.add(e)}removeStrayInputBoxSceneRootsExcept(e){const t=e;for(let i=this.scene.children.length-1;i>=0;i--){const n=this.scene.children[i];if(!n||n===t)continue;n.userData[Io]===this&&(this.scene.remove(n),this.disposeMTextRootResources(n),delete n.userData[Io])}}forceVisibleMaterialState(e){e.traverse(t=>{const i=t,n=i.material?Array.isArray(i.material)?i.material:[i.material]:[];for(const o of n){const r=o;typeof r.side<"u"&&(r.side=V.DoubleSide),typeof r.depthTest<"u"&&(r.depthTest=!1),typeof r.depthWrite<"u"&&(r.depthWrite=!1),typeof r.transparent<"u"&&typeof r.opacity<"u"&&(r.transparent=r.opacity<1),r.needsUpdate=!0}})}disposeDetachedThreeSubtree(e){e.traverse(t=>{const i=t;i.geometry&&i.geometry.dispose();const n=i.material?Array.isArray(i.material)?i.material:[i.material]:[];for(const o of n){const r=o;r.map&&r.map.dispose(),o.dispose()}})}pruneExtraMTextLayoutRoots(e){for(;e.children.length>1;){const t=e.children[0];if(!t)break;e.remove(t),this.disposeDetachedThreeSubtree(t)}}disposeMTextRootResources(e){const t=e;if(typeof t.dispose=="function"){t.dispose();return}this.disposeDetachedThreeSubtree(e)}disposeRenderedObject(e){e&&(e.removeFromParent(),delete e.userData[Io],this.disposeMTextRootResources(e))}isExplicitAci(e){return e!==null&&Number.isInteger(e)&&e>0&&e<256}normalizeColorNumber(e){return Math.max(0,Math.min(16777215,Math.round(e)))}resolveAciColor(e){const t=$.getColorByIndex(e);return this.normalizeColorNumber(Number.isFinite(t)?t:16777215)}resolveBaseColor(){return this.isExplicitAci(this.baseFormat.aci)?this.resolveAciColor(this.baseFormat.aci):this.baseFormat.rgb!==null?this.normalizeColorNumber(this.baseFormat.rgb):16777215}resolveBaseFormatColor(e){const t=e.color;if(t.isRgb&&t.rgbValue!==null)return{aci:null,rgb:this.normalizeColorNumber(t.rgbValue)};if(t.isAci&&t.aci!==null){const i=t.aci;return Number.isInteger(i)&&i>=1&&i<=255?{aci:i,rgb:null}:i===0?{aci:null,rgb:this.normalizeColorNumber(e.byBlockColor)}:{aci:null,rgb:this.normalizeColorNumber(e.byLayerColor)}}return{aci:null,rgb:this.normalizeColorNumber(e.byLayerColor)}}createBaseFormatFromTextStyle(e,t){const i=Dk();i.fontFamily=e.font||i.fontFamily,i.fontSize=Math.max(Number.EPSILON,e.fixedTextHeight);const n=this.resolveBaseFormatColor(t);i.aci=n.aci,i.rgb=n.rgb;const o=e.widthFactor;i.widthFactor=typeof o=="number"&&Number.isFinite(o)?Math.max(.01,o):1;const r=e.obliqueAngle;return i.obliqueAngle=typeof r=="number"&&Number.isFinite(r)?r:0,i.tracking=1,i}resolveEditorChromeWidth(e,t){const i=Math.max(Number.EPSILON,t),n=$.resolveMTextWrapWidth({text:e,height:i,width:this.declaredWidth});return typeof n=="number"&&Number.isFinite(n)&&n>0?n:Math.max($.estimateMTextWrapWidth(e,i),i*1.5,Number.EPSILON)}createMTextData(){const e=Math.max(Number.EPSILON,this.defaultTextStyle.fixedTextHeight),t=this.declaredWidth<=0?0:$.resolveMTextWrapWidth({text:this.mtextString,height:e,width:this.declaredWidth}),i={text:this.mtextString,height:e,width:typeof t=="number"&&Number.isFinite(t)?t:this.declaredWidth,position:{x:this.position.x,y:this.position.y,z:this.position.z},attachmentPoint:this.editorAttachmentPoint,drawingDirection:this.editorDrawingDirection,collectCharBoxes:!0};return this.editorDirectionVector?i.directionVector={...this.editorDirectionVector}:this.editorRotation!==0&&(i.rotation=this.editorRotation),this.editorLineSpaceFactor!=null&&Number.isFinite(this.editorLineSpaceFactor)&&(i.lineSpaceFactor=this.editorLineSpaceFactor),i}getLineSpacingFactor(){return this.editorLineSpaceFactor??J.DEFAULT_LINE_SPACE_FACTOR}setLineSpacingFactor(e){if(!Number.isFinite(e)||e<=0)return;const t=J.DEFAULT_LINE_SPACE_FACTOR,i=e>=1?Math.max(.01,t+(e-1)/$.LINE_SPACING_SCALE_FACTOR):e;this.editorLineSpaceFactor=i,this.relayout(),this.emit("change")}clearLineSpacing(){this.editorLineSpaceFactor=null,this.relayout(),this.emit("change")}getFallbackLineAdvance(){return Math.max(Number.EPSILON,this.currentFormat.fontSize*J.FALLBACK_LINE_ADVANCE_RATIO)}createTextStyle(){return{...this.defaultTextStyle}}resolveRenderColorSettings(){if(this.colorSettings)return this.colorSettings;const e=this.toolbarTheme==="light"?0:16777215;return{byLayerColor:e,byBlockColor:e,color:new q.MTextColor(256)}}focusImeInput(){this.imeInput&&this.imeInput.focus({preventScroll:!0})}refocusImeInputSoon(){this.imeInput&&(this.imeFocusTimer!==null&&window.clearTimeout(this.imeFocusTimer),this.imeFocusTimer=window.setTimeout(()=>{this.focusImeInput(),this.imeFocusTimer=null},0))}updateImeAnchorPosition(){if(!this.imeInput||!this.imeTarget)return;const e=this.getCursorWorldPosition(),i=new V.Vector3(e.x,e.y,e.z).project(this.camera),n=this.imeTarget.getBoundingClientRect(),o=n.left+(i.x+1)*.5*n.width,r=n.top+(1-i.y)*.5*n.height;this.imeInput.style.left=`${Math.round(o)}px`,this.imeInput.style.top=`${Math.round(r)}px`}syncStateFromCursor(){this.cursorIndex=this.cursorLogic.getCurrentIndex();const e=this.cursorLogic.getSelection();e?(this.selectionStart=e.start,this.selectionEnd=e.end):(this.selectionStart=this.cursorIndex,this.selectionEnd=this.cursorIndex),this.syncDocumentFromUiState(),this.refreshCurrentFormatFromDocument()}consumeMove(e){return this.moveCursor(e),!0}consumeExtend(e){return this.extendSelection(e),!0}isMacPlatform(){return typeof navigator>"u"?!1:/Mac|iPhone|iPad|iPod/i.test(navigator.platform)}emit(e){for(const t of this.handlers[e])t()}findPrevWordStart(e){const t=this.getChars();let i=Math.max(0,e-1);for(;i>0&&/\s/.test(t[i]??"");)i-=1;for(;i>0&&!/\s/.test(t[i-1]??"");)i-=1;return i}findNextWordStart(e){const t=this.getChars();let i=Math.min(t.length,e);for(;i<t.length&&!/\s/.test(t[i]??"");)i+=1;for(;i<t.length&&/\s/.test(t[i]??"");)i+=1;return i}getChars(){const e=[];for(const t of this.document.ast.nodes){if(t.type==="char"){e.push(t.value);continue}if(t.type==="stack"){e.push("");continue}(t.type==="paragraphBreak"||t.type==="columnBreak"||t.type==="wrapAtDimLine")&&e.push(`
126
- `)}return e}charCount(){return this.getChars().length}getActiveCursorRenderState(e,t){var a;const i=this.cursorLogic.getCharBoxes(),n=this.cursorLogic.getCurrentIndex(),o=this.cursorLogic.getCurrentLineInfo();if(i.length===0){const l=(a=this.latestCursorLayoutData.lineLayouts)==null?void 0:a[0];if(l&&Number.isFinite(l.y)&&Number.isFinite(l.height)){const d=Math.max(1,l.height);return{position:{x:e.x,y:l.y},height:d}}const c=Math.max(1,this.getFallbackLineAdvance());return{position:{x:e.x,y:this.layoutContainer.y+c/2},height:c}}if(n<=0||n===o.startIndex){if(!(o.charCount<=0||o.endIndex<o.startIndex)){const d=Math.max(0,Math.min(o.startIndex,i.length-1)),h=i[d];if(h)return{position:{x:e.x,y:h.y},height:Math.max(1,h.height)}}const c=o.height??t;return{position:{x:e.x,y:o.y??e.y},height:Math.max(1,c)}}const r=i[Math.min(n-1,i.length-1)];return r?{position:{x:r.x+r.width,y:r.y},height:Math.max(1,r.height)}:{position:e,height:Math.max(1,t)}}getNodeLogicalSpan(e){switch(e.type){case"char":return 1;case"stack":return 1;case"paragraphBreak":case"columnBreak":case"wrapAtDimLine":return 0;default:return 0}}toLogicalIndexFromDocumentIndex(e){const t=Math.max(0,Math.min(e,this.document.ast.nodes.length));let i=0;for(let n=0;n<t;n+=1){const o=this.document.ast.nodes[n];o&&(i+=this.getNodeLogicalSpan(o))}return i}toDocumentIndexFromLogicalIndex(e,t=!0,i){var d,h;const n=this.document.ast.nodes;if(n.length===0)return 0;const o=this.charCount(),r=Math.max(0,Math.min(e,o)),a=[];let l=0,c=0;for(let f=0;f<=n.length&&(l===r&&a.push({index:f,lineIndex:c}),f!==n.length);f+=1){const y=n[f];if(!y)continue;const g=this.getNodeLogicalSpan(y);g===0?c+=1:l+=g}if(a.length===0)return n.length;if(i!==void 0&&Number.isFinite(i)){const f=this,g=(typeof f.resolveCandidateByVisualLineHint=="function"?f.resolveCandidateByVisualLineHint:J.prototype.resolveCandidateByVisualLineHint).call(this,a,r,i);if(g!==void 0)return g;const b=((d=a[0])==null?void 0:d.lineIndex)??0,w=((h=a[a.length-1])==null?void 0:h.lineIndex)??0;if(i<b||i>w)return t?a[a.length-1].index:a[0].index;let S=a[0],x=Math.abs(S.lineIndex-i);for(let _=1;_<a.length;_+=1){const C=a[_],T=Math.abs(C.lineIndex-i);T<x&&(S=C,x=T)}return S.index}return t?a[a.length-1].index:a[0].index}resolveCandidateByVisualLineHint(e,t,i){if(e.length<=1||this.cursorLogic==null||typeof this.cursorLogic.getLines!="function")return;const n=this.cursorLogic.getLines();if(!Array.isArray(n)||n.length===0)return;const o=[];for(let l=0;l<n.length;l+=1){const c=n[l];c&&t>=c.startIndex&&t<=c.endIndex+1&&o.push(l)}if(o.length!==e.length)return;const r=o.indexOf(i);if(r<0)return;const a=e[r];return a==null?void 0:a.index}syncUiStateFromDocument(){this.mtextString=this.document.toMText();const e=this.charCount();this.cursorIndex=Math.min(this.toLogicalIndexFromDocumentIndex(this.document.cursor),e);const t=this.document.selection;t?(this.selectionStart=this.toLogicalIndexFromDocumentIndex(t.start),this.selectionEnd=this.toLogicalIndexFromDocumentIndex(t.end)):(this.selectionStart=this.cursorIndex,this.selectionEnd=this.cursorIndex),this.refreshCurrentFormatFromDocument()}syncDocumentFromUiState(){const e=this.getSelectionRange();if(!e.isCollapsed){const o=this.toDocumentIndexFromLogicalIndex(e.start,!0),r=this.toDocumentIndexFromLogicalIndex(e.end,!1);this.document.setSelection(o,r);return}this.document.clearSelection();const t=this.cursorLogic.getCursorState(),i=t.lineIndex,n=!(t.isAtLineEnd&&!t.isAtLineStart);this.document.cursor=this.toDocumentIndexFromLogicalIndex(this.cursorIndex,n,i>=0?i:void 0)}refreshCurrentFormatFromDocument(){var t,i;const e=this.inferCurrentFormatFromDocument();if(this.updateToolbarStackState(),!e){(t=this.getActiveToolbar())==null||t.setFormat(this.currentFormat);return}Xh(this.currentFormat,e)||(this.currentFormat=e),(i=this.getActiveToolbar())==null||i.setFormat(this.currentFormat)}toggleStackSelection(){const e=this.getSelectionRange();e.isCollapsed||this.commitHistoryEdit(()=>{var c;this.syncDocumentFromUiState();const t=this.toDocumentIndexFromLogicalIndex(e.start,!0),i=this.toDocumentIndexFromLogicalIndex(e.end,!1);if(i<=t)return;const n=this.document.ast.nodes.slice(t,i);if(n.length===1&&((c=n[0])==null?void 0:c.type)==="stack"){const d=n[0],h=this.stackNodeToPlainText(d.numerator,d.denominator,d.divider),f=Array.from(h).map(y=>({type:"char",value:y,style:this.cloneDocumentStyle(d.style)}));if(f.length===0)return;this.document.transaction(y=>{y.ast.nodes.splice(t,1,...f),y.setSelection(t,t+f.length)}),this.syncUiStateFromDocument(),this.relayout();return}if(!n.every(d=>(d==null?void 0:d.type)==="char"))return;const o=n.map(d=>d.value).join(""),r=this.parseStackParts(o);if(!r)return;const a=n[0];if(!a)return;const l={type:"stack",numerator:r.numerator,denominator:r.denominator,divider:r.divider,style:this.cloneDocumentStyle(a.style)};this.document.transaction(d=>{d.ast.nodes.splice(t,i-t,l),d.setSelection(t,t+1)}),this.syncUiStateFromDocument(),this.relayout()})}toggleScriptSelection(e){const t=this.getSelectionRange();if(t.isCollapsed)return!1;let i=!1;return this.commitHistoryEdit(()=>{var h;this.syncDocumentFromUiState();const n=this.toDocumentIndexFromLogicalIndex(t.start,!0),o=this.toDocumentIndexFromLogicalIndex(t.end,!1);if(o<=n)return;const r=this.document.ast.nodes.slice(n,o);if(r.length===1&&((h=r[0])==null?void 0:h.type)==="stack"){const f=r[0],y=this.scriptStackToPlainText(f.numerator,f.denominator,f.divider);if(!y)return;const g=this.cloneDocumentStyle(f.style);g.script="normal",g.align=q.MTextLineAlignment.MIDDLE;const b=Array.from(y).map(w=>({type:"char",value:w,style:this.cloneDocumentStyle(g)}));if(b.length===0)return;this.document.transaction(w=>{w.ast.nodes.splice(n,1,...b),w.setSelection(n,n+b.length)}),this.syncUiStateFromDocument(),this.relayout(),i=!0;return}if(!r.every(f=>(f==null?void 0:f.type)==="char"))return;const a=r.map(f=>f.value).join("");if(a.length===0)return;const l=r[0];if(!l)return;const c=this.cloneDocumentStyle(l.style);c.script=e,c.align=e==="superscript"?q.MTextLineAlignment.TOP:q.MTextLineAlignment.BOTTOM;const d={type:"stack",numerator:e==="superscript"?a:"",denominator:e==="subscript"?a:"",divider:"^",style:this.cloneDocumentStyle(c)};this.document.transaction(f=>{f.ast.nodes.splice(n,o-n,d),f.setSelection(n,n+1)}),this.syncUiStateFromDocument(),this.relayout(),i=!0}),i}commitHistoryEdit(e){const t=this.createHistorySnapshot();e(),!this.isSameAsCurrent(t)&&(this.undoStack.push(t),this.undoStack.length>this.maxHistorySize&&this.undoStack.splice(0,this.undoStack.length-this.maxHistorySize),this.redoStack=[],this.emit("change"),this.emit("selectionChange"),this.emit("cursorMove"))}createHistorySnapshot(){return{ast:this.cloneAst(this.document.ast),cursor:this.document.cursor,selection:this.document.selection?{...this.document.selection}:null,currentFormat:{...this.currentFormat}}}restoreHistorySnapshot(e){this.document=new Re(this.cloneAst(e.ast)),e.selection?this.document.setSelection(e.selection.start,e.selection.end):(this.document.cursor=e.cursor,this.document.clearSelection()),this.uiAdapter=new To(this.document),this.currentFormat={...e.currentFormat},this.syncUiStateFromDocument(),this.relayout(),this.emit("change"),this.emit("selectionChange"),this.emit("cursorMove")}isSameAsCurrent(e){if(e.cursor!==this.document.cursor)return!1;const t=this.document.selection;return!!e.selection!=!!t||e.selection&&t&&(e.selection.start!==t.start||e.selection.end!==t.end)||!Xh(e.currentFormat,this.currentFormat)?!1:this.document.toMText()===this.buildMTextFromAst(e.ast)}buildMTextFromAst(e){return new Re(this.cloneAst(e)).toMText()}clearHistory(){this.undoStack=[],this.redoStack=[]}cloneAst(e){return{nodes:e.nodes.map(t=>t.type==="char"?{...t,style:this.cloneDocumentStyle(t.style)}:t.type==="stack"?{...t,style:this.cloneDocumentStyle(t.style)}:{...t,style:this.cloneDocumentStyle(t.style)})}}stackNodeToPlainText(e,t,i){if(i==="^"){if(e.length===0&&t.length>0)return`^${t.trimStart()}`;if(e.length>0&&t.length===0)return`${e.trimEnd()}^`}return`${e}${i}${t}`}scriptStackToPlainText(e,t,i){if(i!=="^")return null;const n=e.trim().length>0,o=t.trim().length>0;return n===o?null:n?e.trim():t.trim()}parseStackParts(e){const t=[];for(let l=0;l<e.length;l+=1){const c=e[l];(c==="/"||c==="#"||c==="^")&&t.push({index:l,divider:c})}if(t.length!==1)return null;const i=t[0];if(!i)return null;const{index:n,divider:o}=i,r=e.slice(0,n),a=e.slice(n+1);if(o==="^"){const l=r.trim().length>0,c=a.trim().length>0;return!l&&!c?null:{numerator:r,denominator:a,divider:o}}return r.trim().length===0||a.trim().length===0?null:{numerator:r,denominator:a,divider:o}}updateToolbarStackState(){var a;const e=this.getActiveToolbar();if(!e)return;const t=this.getSelectionRange();if(t.isCollapsed){e.setStackActive(!1);return}const i=this.toDocumentIndexFromLogicalIndex(t.start,!0),n=this.toDocumentIndexFromLogicalIndex(t.end,!1),o=this.document.ast.nodes.slice(i,n),r=o.length===1&&((a=o[0])==null?void 0:a.type)==="stack"&&!this.isScriptOnlyStack(o[0]);e.setStackActive(r)}isScriptOnlyStack(e){if(e.divider!=="^")return!1;const t=e.numerator.trim().length>0,i=e.denominator.trim().length>0;return t!==i}inferCurrentFormatFromDocument(){if(this.document.ast.nodes.length===0||this.getChars().length===0)return null;const n=this.selectionStart!==this.selectionEnd?Math.min(this.selectionStart,this.selectionEnd):this.cursorIndex>0?this.cursorIndex-1:0,o=this.getNodeByLogicalCharIndex(n);if(!o)return null;if(o.type==="stack"&&this.isScriptOnlyStack(o)){const r=o.numerator.trim().length>0?"superscript":"subscript";return{...this.toCharFormat(o.style),script:r}}return this.toCharFormat(o.style)}getNodeByLogicalCharIndex(e){const t=this.document.ast.nodes;if(t.length===0)return null;let i=0;const n=Math.max(0,e);for(const o of t){const r=this.getNodeLogicalSpan(o);if(n<i+r)return o;i+=r}return t[t.length-1]??null}getNodesByLogicalRange(e,t){const i=this.document.ast.nodes;if(i.length===0)return[];const n=Math.max(0,Math.min(e,t)),o=Math.max(n,Math.max(e,t));if(n===o)return[];const r=[];let a=0;for(const l of i){const c=this.getNodeLogicalSpan(l),d=a,h=a+c;c>0&&d<o&&h>n&&r.push(l),a=h}return r}toCharFormat(e){var w,S;const t=Math.max(1,this.defaultTextStyle.fixedTextHeight),i=e.capHeight.isRelative?t*Math.max(0,e.capHeight.value):e.capHeight.value,n=this.defaultTextStyle.font||this.baseFormat.fontFamily,o=e.rgb?this.rgbArrayToColorNumber(e.rgb):this.isExplicitAci(e.aci)?this.resolveAciColor(e.aci):this.resolveBaseColor(),r=this.isExplicitAci(e.aci)?e.aci:this.isExplicitAci(this.baseFormat.aci)?this.baseFormat.aci:null,a=this.toScriptFromStyle(e,t,i),l=Math.max(1,t)*.9,c=i<=l,d=a==="normal"?i:c?i/.7:i,h=(w=e.widthFactor)==null?void 0:w.value,f=typeof h=="number"&&Number.isFinite(h)?Math.max(.01,h):1,y=(S=e.charTrackingFactor)==null?void 0:S.value,g=typeof y=="number"&&Number.isFinite(y)?Math.max(.01,y):1,b=typeof e.oblique=="number"&&Number.isFinite(e.oblique)?e.oblique:0;return{fontFamily:e.fontFace.family||n,fontSize:Math.max(1,d||t),bold:e.fontFace.weight>=700,italic:e.fontFace.style==="Italic",underline:e.underline,overline:e.overline,strike:e.strikeThrough,script:a,aci:r,rgb:o,obliqueAngle:b,widthFactor:f,tracking:g,paragraphAlignment:e.paragraph.align}}toScriptFromStyle(e,t,i){const n=Math.max(1,t)*.9,o=i<=n;return e.script&&e.script!=="normal"?o?e.script:"normal":o&&e.align===q.MTextLineAlignment.TOP?"superscript":o&&e.align===q.MTextLineAlignment.BOTTOM?"subscript":"normal"}createDefaultParseContext(){const e=new q.MTextContext;if(e.fontFace.family=this.defaultTextStyle.font||this.baseFormat.fontFamily,e.fontFace.style=this.baseFormat.italic?"Italic":"Regular",e.fontFace.weight=this.baseFormat.bold?700:400,e.capHeight={value:this.defaultTextStyle.fixedTextHeight,isRelative:!1},e.align=q.MTextLineAlignment.BOTTOM,e.widthFactor={value:this.defaultTextStyle.widthFactor??1,isRelative:!1},this.isExplicitAci(this.baseFormat.aci))e.aci=this.baseFormat.aci,e.rgb=null;else{const t=this.resolveBaseColor();e.rgb=this.colorNumberToRgbArray(t),e.aci=256}return e}createNormalizedDocument(e){const t=Re.fromMText(e,this.createDefaultParseContext()),i={nodes:[]};for(const n of t.ast.nodes)switch(n.type){case"char":i.nodes.push({type:"char",value:n.value,style:this.cloneDocumentStyle(n.style)});break;case"stack":i.nodes.push({type:"stack",numerator:n.numerator,denominator:n.denominator,divider:n.divider,style:this.cloneDocumentStyle(n.style)});break;case"paragraphBreak":i.nodes.push({type:"paragraphBreak",style:this.cloneDocumentStyle(n.style)});break;case"columnBreak":case"wrapAtDimLine":i.nodes.push({type:"paragraphBreak",style:this.cloneDocumentStyle(n.style)});break}return new Re(i)}computeAttachmentAnchorOnBounds(e,t,i,n,o){const r=(e+t)*.5,a=(i+n)*.5,l=this.position.z;switch(o){case $.MTextAttachmentPoint.TopLeft:return new V.Vector3(e,n,l);case $.MTextAttachmentPoint.TopCenter:return new V.Vector3(r,n,l);case $.MTextAttachmentPoint.TopRight:return new V.Vector3(t,n,l);case $.MTextAttachmentPoint.MiddleLeft:return new V.Vector3(e,a,l);case $.MTextAttachmentPoint.MiddleCenter:return new V.Vector3(r,a,l);case $.MTextAttachmentPoint.MiddleRight:return new V.Vector3(t,a,l);case $.MTextAttachmentPoint.BottomLeft:case $.MTextAttachmentPoint.BaselineLeft:return new V.Vector3(e,i,l);case $.MTextAttachmentPoint.BottomCenter:case $.MTextAttachmentPoint.BaselineCenter:return new V.Vector3(r,i,l);case $.MTextAttachmentPoint.BottomRight:case $.MTextAttachmentPoint.BaselineRight:return new V.Vector3(t,i,l);default:return new V.Vector3(e,n,l)}}mapRibbonParagraphAlignment(e){switch(e){case"default":return q.MTextParagraphAlignment.DEFAULT;case"left":return q.MTextParagraphAlignment.LEFT;case"center":return q.MTextParagraphAlignment.CENTER;case"right":return q.MTextParagraphAlignment.RIGHT;case"justified":return q.MTextParagraphAlignment.JUSTIFIED;case"distributed":return q.MTextParagraphAlignment.DISTRIBUTED;default:return}}mapRibbonAttachmentCode(e){switch(e.trim().toUpperCase()){case"TL":return $.MTextAttachmentPoint.TopLeft;case"TC":return $.MTextAttachmentPoint.TopCenter;case"TR":return $.MTextAttachmentPoint.TopRight;case"ML":return $.MTextAttachmentPoint.MiddleLeft;case"MC":return $.MTextAttachmentPoint.MiddleCenter;case"MR":return $.MTextAttachmentPoint.MiddleRight;case"BL":return $.MTextAttachmentPoint.BottomLeft;case"BC":return $.MTextAttachmentPoint.BottomCenter;case"BR":return $.MTextAttachmentPoint.BottomRight;default:return}}attachmentPointToRibbonCode(e){switch(e){case $.MTextAttachmentPoint.TopLeft:return"TL";case $.MTextAttachmentPoint.TopCenter:return"TC";case $.MTextAttachmentPoint.TopRight:return"TR";case $.MTextAttachmentPoint.MiddleLeft:return"ML";case $.MTextAttachmentPoint.MiddleCenter:return"MC";case $.MTextAttachmentPoint.MiddleRight:return"MR";case $.MTextAttachmentPoint.BottomLeft:case $.MTextAttachmentPoint.BaselineLeft:return"BL";case $.MTextAttachmentPoint.BottomCenter:case $.MTextAttachmentPoint.BaselineCenter:return"BC";case $.MTextAttachmentPoint.BottomRight:case $.MTextAttachmentPoint.BaselineRight:return"BR";default:return"TL"}}mergeCharFormat(e,t){const i={...e,...t};if(t.aci!==void 0)if(!this.isExplicitAci(t.aci))i.aci=null;else{const n=this.resolveAciColor(t.aci);i.aci=t.aci,i.rgb=n}return t.rgb!==void 0&&(t.rgb===null?i.rgb=null:(i.rgb=this.normalizeColorNumber(t.rgb),t.aci===void 0&&(i.aci=null))),t.paragraphAlignment!==void 0&&(i.paragraphAlignment=t.paragraphAlignment),i}cloneDocumentStyle(e){return{underline:e.underline,overline:e.overline,strikeThrough:e.strikeThrough,script:e.script,aci:e.aci,rgb:e.rgb?[...e.rgb]:null,align:e.align,fontFace:{...e.fontFace},capHeight:{...e.capHeight},widthFactor:{...e.widthFactor},charTrackingFactor:{...e.charTrackingFactor},oblique:e.oblique,paragraph:{indent:e.paragraph.indent,left:e.paragraph.left,right:e.paragraph.right,align:e.paragraph.align,tabs:[...e.paragraph.tabs]}}}toDocumentStyle(e,t){const i=this.isExplicitAci(e.aci)?e.aci:null,n=i!==null?null:this.colorNumberToRgbArray(e.rgb!==null?e.rgb:this.resolveBaseColor()),o=e.script!=="normal",r=Math.max(1,e.fontSize*(o?.7:1)),a=e.script==="superscript"?q.MTextLineAlignment.TOP:e.script==="subscript"?q.MTextLineAlignment.BOTTOM:q.MTextLineAlignment.MIDDLE,l=e.paragraphAlignment;return{underline:e.underline,overline:e.overline,strikeThrough:e.strike,script:e.script,aci:i,rgb:n,align:a,fontFace:{family:e.fontFamily,style:e.italic?"Italic":"Regular",weight:e.bold?700:400},capHeight:{value:r,isRelative:!1},widthFactor:{value:Math.max(.01,e.widthFactor),isRelative:!1},charTrackingFactor:{value:Math.max(.01,e.tracking),isRelative:!1},oblique:e.obliqueAngle,paragraph:{indent:(t==null?void 0:t.paragraph.indent)??0,left:(t==null?void 0:t.paragraph.left)??0,right:(t==null?void 0:t.paragraph.right)??0,align:l,tabs:t!=null&&t.paragraph.tabs?[...t.paragraph.tabs]:[]}}}colorNumberToRgbArray(e){const t=this.normalizeColorNumber(e);return[t>>16&255,t>>8&255,t&255]}rgbArrayToColorNumber(e){const t=Math.max(0,Math.min(255,Math.round(e[0]))),i=Math.max(0,Math.min(255,Math.round(e[1]))),n=Math.max(0,Math.min(255,Math.round(e[2])));return t<<16|i<<8|n}};z(J,"activeEditor",null),z(J,"sharedToolbar",null),z(J,"sharedToolbarContainer",null),z(J,"sharedToolbarFontFamiliesKey",""),z(J,"sharedToolbarColorPickerFactory",null),z(J,"instances",new Set),z(J,"FALLBACK_LINE_ADVANCE_RATIO",1.5),z(J,"DEFAULT_TEXT_STYLE",{name:"MTextInputBoxStyle",standardFlag:0,fixedTextHeight:24,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:24,font:_o,bigFont:""}),z(J,"DEFAULT_LINE_SPACE_FACTOR",.3);let Nl=J;function r0(s){return p.acgiContrastingForegroundColor(s)}function a0(s){if(typeof s=="number")return s===1;if(typeof s=="boolean")return s;const e=String(s).toLowerCase();return e==="light"||e==="1"||e==="true"}function cp(s){return s.currentSpaceId===s.tables.blockTable.modelSpace.objectId}function Bl(s){return s?p.AcDbSystemVariables.MODELBKCOLOR:p.AcDbSystemVariables.PAPERBKCOLOR}function dp(s,e){const t=s==null?void 0:s.RGB;return t??(e?p.ACGI_MODEL_SPACE_BACKGROUND:p.ACGI_PAPER_SPACE_BACKGROUND)}function Mo(s,e){const t=Bl(e),i=p.AcDbSysVarManager.instance().getVar(t,s);return dp(i,e)}function up(s){const e=s.RGB??p.ACGI_MODEL_SPACE_BACKGROUND,t=new p.AcCmColor(p.AcCmColorMethod.ByColor);return p.acgiIsLightBackground(e)?t.setRGB(0,0,0):t.setRGB(255,255,255),t}function l0(s){const e=new p.AcCmColor(p.AcCmColorMethod.ByColor);return e.setRGBValue(s&16777215),e}function Oo(s){return p.acgiIsLightBackground(s)?"black":"white"}function c0(s){if(s===void 0)return;const e=s;return e>=1&&e<=12?e:$.MTextAttachmentPoint.TopLeft}function ML(s){return s}function d0(s){if(s===void 0)return;const e=s;return e>=1&&e<=5?e:$.MTextFlowDirection.LEFT_TO_RIGHT}const Do="__mlightcadMTextFormatBridge",hp="__mlightcadAcEdMTextActiveInputBox__",pp="__mlightcadAcEdMTextActiveInputBoxListeners__";function Fl(){const s=globalThis;let e=s[pp];return e||(e=new Set,s[pp]=e),e}const me=class me{static setDefaultColorPicker(e){me.defaultColorPicker=e}static setDefaultToolbarEnabled(e){me.defaultToolbarEnabled=e}static getActiveInputBox(){return me.activeInputBox?me.activeInputBox:globalThis[hp]??null}static addActiveInputBoxChangeListener(e){me.activeInputBoxChangeListeners.add(e),Fl().add(e)}static removeActiveInputBoxChangeListener(e){me.activeInputBoxChangeListeners.delete(e),Fl().delete(e)}static setActiveInputBox(e){if(me.activeInputBox===e)return;me.activeInputBox=e;const t=globalThis;t[hp]=e,Fl().forEach(i=>{i(e)})}static createHiddenToolbarContainer(e){const t=e.ownerDocument.createElement("div");return t.setAttribute("aria-hidden","true"),Object.assign(t.style,{display:"none",pointerEvents:"none"}),e.appendChild(t),t}static attachFormatBridge(e){const t=e;if(t[Do])return;const i=new Set,n=[],o=()=>{i.forEach(a=>{a()})},r=a=>{const l=t[a];typeof l=="function"&&(t[a]=(...c)=>{const d=l.apply(t,c);return o(),d},n.push(()=>{t[a]=l}))};["setCurrentFormat","refreshCurrentFormatFromDocument","toggleCase","toggleStackSelection","toggleScriptSelection","setParagraphAlignment","setAttachmentPoint","setLineSpacingFactor","clearLineSpacing"].forEach(r),t.addCurrentFormatChangeListener=a=>{i.add(a)},t.removeCurrentFormatChangeListener=a=>{i.delete(a)},t.focusEditor=()=>{const a=t,l=a.focusImeInput;if(typeof l=="function"){l.call(t);return}const c=a.refocusImeInputSoon;typeof c=="function"&&c.call(t)},t.isStackSelectionActive=()=>{var _,C;const a=t,l=a.getSelectionRange,c=a.toDocumentIndexFromLogicalIndex,d=a.isScriptOnlyStack,h=a.document;if(typeof l!="function"||typeof c!="function")return!1;const f=l.call(t);if(!f||f.isCollapsed)return!1;const y=c.call(t,f.start,!0),g=c.call(t,f.end,!1),b=((C=(_=h==null?void 0:h.ast)==null?void 0:_.nodes)==null?void 0:C.slice(y,g))??[],w=b[0];if(b.length!==1||(w==null?void 0:w.type)!=="stack")return!1;if(typeof d=="function")return!d.call(t,w);if(w.divider!=="^")return!0;const S=(w.numerator??"").trim().length>0,x=(w.denominator??"").trim().length>0;return S===x},t[Do]={addCurrentFormatChangeListener:t.addCurrentFormatChangeListener,removeCurrentFormatChangeListener:t.removeCurrentFormatChangeListener,dispose:()=>{n.forEach(a=>{a()}),i.clear(),delete t.addCurrentFormatChangeListener,delete t.removeCurrentFormatChangeListener,delete t.focusEditor,delete t.isStackSelectionActive,delete t[Do]}}}static detachFormatBridge(e){var i;(i=e[Do])==null||i.dispose()}open(e){const{view:t,location:i,width:n,textHeight:o,initialText:r="",toolbarFontFamilies:a=[],toolbarColorPicker:l,toolbarEnabled:c=me.defaultToolbarEnabled,initialAttachmentPoint:d,initialDrawingDirection:h,rotation:f,directionVector:y,textStyleName:g,initialLineSpaceFactor:b}=e,w=new V.Vector3(i.x,i.y,i.z??0),x=p.acgiIsLightBackground(t.backgroundColor)?"#000000":"#ffffff",_=k.instance,C=_.curDocument.database,{layerColor:T}=_.resolveColors(),L=()=>{const Y=p.AcDbSysVarManager.instance().getVar(p.AcDbSystemVariables.COLORTHEME,C);return Y===0||Y==="0"||Y===!1||Y==="dark"?"dark":"light"},N=Array.from(new Set(a.map(Y=>Y.trim()).filter(Y=>Y.length>0))),B=()=>{const Y=C.tables.textStyleTable,ee=g==null?void 0:g.trim();if(ee){const re=typeof Y.resolveAt=="function"?Y.resolveAt(ee):Y.getAt(ee);if(re!=null&&re.textStyle)return re.textStyle}const Z=Y.getAt(C.textstyle);return Z==null?void 0:Z.textStyle},A=Math.max(Number.EPSILON,o),O=B(),P=O?{...O,fixedTextHeight:A,lastHeight:A}:void 0,E=c?null:me.createHiddenToolbarContainer(t.container),I=c0(d),j=d0(h),G=new Nl({scene:t.internalScene,camera:t.internalCamera,width:n,position:w.clone(),initialText:r,...I!==void 0?{initialAttachmentPoint:I}:{},...j!==void 0?{initialDrawingDirection:j}:{},...typeof f=="number"&&Number.isFinite(f)?{rotation:f}:{},...y?{directionVector:y}:{},...typeof b=="number"&&Number.isFinite(b)&&b>0?{initialLineSpaceFactor:b}:{},textStyle:P,cursorStyle:{color:x,glowColor:x},boundingBoxStyle:{padding:0},imeTarget:t.canvas,colorSettings:{layer:C.clayer,color:new q.MTextColor,byLayerColor:T,byBlockColor:T},toolbar:{enabled:!0,theme:L(),fontFamilies:N,container:E??t.container,offsetY:10,colorPicker:l??me.defaultColorPicker??void 0}});return me.attachFormatBridge(G),me.setActiveInputBox(G),new Promise(Y=>{let ee=!1;const Z=()=>{ee||(G.update(),t.isDirty=!0)},re=Be=>{Be.name.toLowerCase()===p.AcDbSystemVariables.COLORTHEME.toLowerCase()&&(G.setToolbarTheme(L()),t.isDirty=!0)},Se=()=>{me.activeInputBox===G&&me.setActiveInputBox(null),me.detachFormatBridge(G),G.dispose(),E==null||E.remove(),t.events.renderFrame.removeEventListener(Z),G.off("close",pt),p.AcDbSysVarManager.instance().events.sysVarChanged.removeEventListener(re),t.isDirty=!0},Ke=Be=>{ee||(ee=!0,Se(),Y(Be))},pt=()=>{var Ga;const Be=G.getMTextInsertionPoint();Ke({contents:G.getText(),location:{x:Be.x,y:Be.y,z:Be.z},width:n,height:A,lineSpacingFactor:((Ga=G.getLineSpacingFactor)==null?void 0:Ga.call(G))??me.defaultLineSpacingFactor,attachmentPoint:G.getMTextAttachmentPoint()})};G.on("close",pt),t.events.renderFrame.addEventListener(Z),p.AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(re)})}};me.defaultLineSpacingFactor=.3,me.activeInputBox=null,me.activeInputBoxChangeListeners=new Set,me.defaultColorPicker=null,me.defaultToolbarEnabled=!0;let qt=me;const Da=class Da{constructor(e){this.view=e}handleKeyDown(e){const t=this.resolveUndoRedoShortcut(e);if(this.shouldIgnoreEditableTargetShortcut(e)&&!t)return!1;if(t)return!this.shouldHandleUndoRedoShortcut(e)||qt.getActiveInputBox()||this.view.editor.isActive?!1:(k.instance.sendStringToExecute(t),e.preventDefault(),!0);switch(e.code){case"Escape":return this.view.selectionSet.clear(),this.view.htmlTransientManager.deselectAll(),this.view.isHtmlDirty=!0,!1;case"Delete":case"Backspace":if(!this.view.editor.isActive){let n=!1;const o=this.view.htmlTransientManager;if(o.hasSelection()){const r=o.getSelectedGroups(),a=r.filter(c=>c.layer===ne);a.length>0&&Xe(this.view,"Delete Measurement",()=>{for(const c of a)o.detach(c.id)&&(n=!0)}),(r.some(c=>c.layer!==ne)||r.length===0&&o.hasSelection())&&Fe(this.view,"Delete Markup",()=>{n=o.deleteSelected()||n})}if(n)return this.view.isHtmlDirty=!0,e.preventDefault(),!0;k.instance.lookupGlobalCmd("erase")&&k.instance.sendStringToExecute("erase")}return!1}return!1}resolveUndoRedoShortcut(e){return!e.ctrlKey&&!e.metaKey?null:e.code==="KeyY"?"redo":e.code==="KeyZ"?e.shiftKey?"redo":"undo":null}shouldIgnoreEditableTargetShortcut(e){if(e.isComposing||e.keyCode===229)return!0;const t=e.target;return(t==null?void 0:t.tagName)==="TEXTAREA"||t!=null&&t.isContentEditable?!0:(t==null?void 0:t.tagName)==="INPUT"}shouldHandleUndoRedoShortcut(e){if(e.isComposing||e.keyCode===229)return!1;const t=e.target;if((t==null?void 0:t.tagName)==="TEXTAREA"||t!=null&&t.isContentEditable)return!1;if((t==null?void 0:t.tagName)==="INPUT"){const i=t;return i.classList.contains(Da.COMMAND_LINE_INPUT_CLASS)?i.value.trim()===""&&!i.readOnly:!1}return!0}};Da.COMMAND_LINE_INPUT_CLASS="ml-cli-text";let No=Da;function es(s,e){if(s.length<8)return s;const t=s.map(g=>({value:e==="x"?(g.minX+g.maxX)/2:(g.minY+g.maxY)/2,box:g})).sort((g,b)=>g.value-b.value),i=t[t.length-1].value-t[0].value;if(!(i>0))return s;let n=0,o=0;for(let g=1;g<t.length;g++){const b=t[g].value-t[g-1].value;b>n&&(n=b,o=g)}if(n<i*.2)return s;const r=t.slice(0,o),a=t.slice(o),l=r.length>=a.length?r:a,c=s.map(g=>Math.max(g.maxX-g.minX,g.maxY-g.minY,1e-9));c.sort((g,b)=>g-b);const d=c[Math.floor(c.length/2)]||1,h=[];for(let g=1;g<l.length;g++)h.push(l[g].value-l[g-1].value);h.sort((g,b)=>g-b);const f=h.length>0&&h[Math.floor(h.length/2)]||d,y=Math.max(f*10,d*20);return n<y?s:l.map(g=>g.box)}function mp(s){if(s.length===0)return null;const e=Bo(s);if(s.length<8)return e;let t=s.slice(),i=-1;for(;t.length!==i;)i=t.length,t=es(t,"x"),t=es(t,"y");return Bo(t)??e}async function fp(s,e){if(s.length===0)return null;const t=Bo(s);if(s.length<8)return t;let i=s.slice(),n=-1;for(;i.length!==n;)n=i.length,await e.maybeYield(),i=es(i,"x"),await e.maybeYield(),i=es(i,"y");return Bo(i)??t}function Bo(s){if(s.length===0)return null;let e=1/0,t=1/0,i=-1/0,n=-1/0;for(const o of s)o.minX<e&&(e=o.minX),o.minY<t&&(t=o.minY),o.maxX>i&&(i=o.maxX),o.maxY>n&&(n=o.maxY);return!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(i)||!Number.isFinite(n)?null:{minX:e,minY:t,maxX:i,maxY:n}}class yp{constructor(e,t){this.getLayerTraits=e,this.renderer=t}remap(e,t,i){if(t===i)return;const n=this.getLayerTraits(i);for(const o of e)o.traverse(r=>{const a=r.userData.layerName===t;if(a&&(r.userData.layerName=i),!("material"in r)||!a)return;const l=r.material;if(Array.isArray(l)){const d=l;r.material=d.map(h=>this.shouldRemap(h,t)?this.renderer.getLayerBoundMaterial(this.promoteLayerZeroByLayerColor(h,t),i,n)??h:h),D.syncStyleMaterialIdFromMaterials(D.getSceneDrawableUserData(r),r.material);return}if(!this.shouldRemap(l,t))return;const c=this.renderer.getLayerBoundMaterial(this.promoteLayerZeroByLayerColor(l,t),i,n);c&&(r.material=c,D.syncStyleMaterialIdFromMaterials(D.getSceneDrawableUserData(r),c))})}shouldRemap(e,t){const i=D.getMaterialMetadata(e);return i.isForeground!==!0?!0:t!=="0"?!1:i.isByLayerColor===!0?!0:t==="0"&&(i.isByLayerLineType===!0||i.isByLayerLineWeight===!0||i.isByLayerTransparency===!0)}promoteLayerZeroByLayerColor(e,t){const i=D.getMaterialMetadata(e);if(i.isByLayerColor===!1&&i.isForeground!==!0)return e;const n=D.hasByLayerBinding(i)&&i.isByLayerColor!==!0;return t==="0"&&n&&D.setMaterialMetadata(e,{isByLayerColor:!0}),e}}const tn=1e-5;function je(s){return Number.isFinite(s.minX)&&Number.isFinite(s.minY)&&Number.isFinite(s.maxX)&&Number.isFinite(s.maxY)}function zl(s){const e=new V.Box3;for(const t of s.wcsChildBoxes)je(t)&&e.union(new V.Box3(new V.Vector3(t.minX,t.minY,0),new V.Vector3(t.maxX,t.maxY,0)));return e}const u0=2048;function h0(s){if(s.wcsChildBoxes.length===0||s.wcsChildBoxes.length>u0)return;const e=zl(s),t=s.wcsBbox;if(!(Math.abs(t.min.x-e.min.x)<=tn&&Math.abs(t.min.y-e.min.y)<=tn&&Math.abs(t.min.z-e.min.z)<=tn&&Math.abs(t.max.x-e.max.x)<=tn&&Math.abs(t.max.y-e.max.y)<=tn&&Math.abs(t.max.z-e.max.z)<=tn))throw new Error(`[AcTrView2d] Group wcsBbox [${t.min.x}, ${t.min.y}]–[${t.max.x}, ${t.max.y}] does not match wcsChildBoxes union [${e.min.x}, ${e.min.y}]–[${e.max.x}, ${e.max.y}]. Ensure AcDbRenderingCache.draw applied the INSERT transform before handleGroup.`)}function p0(s){h0(s)}class gp{constructor(e=8){this.budgetMs=e,this.lastYield=performance.now()}async maybeYield(){performance.now()-this.lastYield<this.budgetMs||(await p.accmYieldForPaint(),this.lastYield=performance.now())}async yieldNow(){await p.accmYieldForPaint(),this.lastYield=performance.now()}}function m0(s){const e=f0(s);if(!e)return;const t=g0(e),i=mp(t.length>0?t:e);if(i)return new p.AcGeBox2d({x:i.minX,y:i.minY},{x:i.maxX,y:i.maxY})}async function bp(s,e=new gp){const t=await y0(s,e);if(!t)return;await e.yieldNow();const i=await b0(t,e);await e.yieldNow();const n=await fp(i.length>0?i:t,e);if(n)return new p.AcGeBox2d({x:n.minX,y:n.minY},{x:n.maxX,y:n.maxY})}function f0(s){const e=s.filter(je);if(e.length===0)return;const t=e.map(r=>Math.max(r.maxX-r.minX,r.maxY-r.minY,1e-9));t.sort((r,a)=>r-a);const i=t[Math.floor(t.length/2)]||1,n=Math.max(i*50,1e10),o=[];for(const r of e)Math.max(r.maxX-r.minX,r.maxY-r.minY)>=n||o.push(r);return o.length>0?o:void 0}async function y0(s,e){const t=[];for(let a=0;a<s.length;a++){const l=s[a];je(l)&&t.push(l),(a&2047)===2047&&await e.maybeYield()}if(t.length===0)return;await e.maybeYield();const i=new Array(t.length);for(let a=0;a<t.length;a++){const l=t[a];i[a]=Math.max(l.maxX-l.minX,l.maxY-l.minY,1e-9),(a&2047)===2047&&await e.maybeYield()}i.sort((a,l)=>a-l),await e.maybeYield();const n=i[Math.floor(i.length/2)]||1,o=Math.max(n*50,1e10),r=[];for(let a=0;a<t.length;a++){const l=t[a];Math.max(l.maxX-l.minX,l.maxY-l.minY)<o&&r.push(l),(a&2047)===2047&&await e.maybeYield()}return r.length>0?r:void 0}function g0(s){if(s.length<2)return s;const e=s.map(d=>({x:(d.minX+d.maxX)/2,y:(d.minY+d.maxY)/2,box:d})),t=e.map(d=>d.x).sort((d,h)=>d-h),i=e.map(d=>d.y).sort((d,h)=>d-h),n=t[Math.floor(t.length/2)],o=i[Math.floor(i.length/2)],r=s.map(d=>Math.max(d.maxX-d.minX,d.maxY-d.minY,1e-9));r.sort((d,h)=>d-h);const a=r[Math.floor(r.length/2)]||1,l=Math.max(a*50,1e10),c=e.filter(d=>Math.hypot(d.x-n,d.y-o)<=l);return c.length>0?c.map(d=>d.box):s}async function b0(s,e){if(s.length<2)return s;const t=[],i=new Array(s.length),n=new Array(s.length),o=new Array(s.length);for(let h=0;h<s.length;h++){const f=s[h],y=(f.minX+f.maxX)/2,g=(f.minY+f.maxY)/2;t.push({x:y,y:g,box:f}),i[h]=y,n[h]=g,o[h]=Math.max(f.maxX-f.minX,f.maxY-f.minY,1e-9),(h&2047)===2047&&await e.maybeYield()}await e.maybeYield(),i.sort((h,f)=>h-f),await e.maybeYield(),n.sort((h,f)=>h-f),await e.maybeYield(),o.sort((h,f)=>h-f),await e.maybeYield();const r=i[Math.floor(i.length/2)],a=n[Math.floor(n.length/2)],l=o[Math.floor(o.length/2)]||1,c=Math.max(l*50,1e10),d=[];for(let h=0;h<t.length;h++){const f=t[h];Math.hypot(f.x-r,f.y-a)<=c&&d.push(f.box),(h&2047)===2047&&await e.maybeYield()}return d.length>0?d:s}const Rl=1,Jt=4;function jl(s){return{isOff:s.isOff,isFrozen:s.isFrozen,isLocked:((s.standardFlags??0)&Jt)!==0}}function wp(s,e){return s.isOff===e.isOff&&s.isFrozen===e.isFrozen&&s.isLocked===e.isLocked}function w0(){const s=p.AcDbLayerTableRecord.prototype,e=Object.getOwnPropertyDescriptor(s,"isLocked");!(e!=null&&e.get)||!e.set||e.configurable===!1||Object.defineProperty(s,"isLocked",{configurable:!0,enumerable:e.enumerable??!1,get:e.get,set(t){const i=this.standardFlags??0;this.standardFlags=t?i|Jt:i&~Jt}})}w0();function At(s,e){var n,o;const t=e==null?void 0:e.layer;if(!s||!t)return!1;const i=(o=(n=s.tables)==null?void 0:n.layerTable)==null?void 0:o.getAt(t);return i?((i.standardFlags??0)&Jt)!==0:!1}function Vl(s,e){var o;if(!s||e.length===0)return{ids:e,lockedCount:0};const t=(o=s.tables)==null?void 0:o.blockTable;if(!(t!=null&&t.getEntityById))return{ids:e,lockedCount:0};const i=[];let n=0;for(const r of e){const a=t.getEntityById(r);if(a&&At(s,a)){n++;continue}i.push(r)}return{ids:i,lockedCount:n}}const se="Layer",vp="Entity";function ie(s,e,t){var n;if((n=s.transactionManager)!=null&&n.hasTransaction())return t();if(typeof s.runDatabaseEdit!="function")return process.env.NODE_ENV!=="production"&&console.warn(`[cad-simple-viewer] acapRunServiceEdit("${e}"): database.runDatabaseEdit is unavailable; mutation ran without undo support.`),t();let i;return ui(s,e,()=>{i=t()}),i}const W=class W{constructor(e){this.db=e}static openLayerForWrite(e,t){const i=typeof t=="string"?e.tables.layerTable.getAt(t):t;if(i)return W.registerLayerTableRecordForWrite(e,i),i}static registerLayerTableRecordForWrite(e,t){var r,a;const i=e.transactionManager;if(!((r=i==null?void 0:i.isRecording)!=null&&r.call(i)))return;const n=(a=i.currentTransaction)==null?void 0:a.call(i);if(!n)return;W.ensureLayerUndoHooks(e);const o=t.objectId;n.openedObjects.set(o,t),n.recorder.hasModify(o)||(n.originalStates.set(o,t.clonePreservingIdentity()),n.recorder.recordModify(t)),e.getObjectById(o)!==t&&W.ensureLayerFinalizeHook(n)}static resolveLayerForHandleCollision(e,t){var o;const i=(o=t.before)==null?void 0:o.name;if(typeof i!="string")return;const n=e.tables.layerTable.getAt(i);if(!(!n||e.getObjectById(t.objectId)===n))return n}static ensureLayerUndoHooks(e){const i=e.transactionManager.changeApplier;if(!i||W.patchedChangeAppliers.has(i))return;const n=i.applyModify.bind(i);i.applyModify=(o,r)=>{const a=W.resolveLayerForHandleCollision(e,o);if(a){const l=r?o.after:o.before;if(l){a.restoreFrom(l);return}}n(o,r)},W.patchedChangeAppliers.add(i)}static ensureLayerFinalizeHook(e){const t=e.recorder;if(t.__layerFinalizePatched||typeof t.finalize!="function")return;const i=t.finalize.bind(t);t.finalize=n=>{i(n);for(const o of t.getChanges()){if(o.kind!=="modify")continue;const r=e.openedObjects.get(o.objectId);if(!r||n.getObjectById(o.objectId)===r)continue;const a=W.resolveLayerForHandleCollision(n,o);a&&(o.after=a.clonePreservingIdentity())}},t.__layerFinalizePatched=!0}static syncLayerModifiedEvent(e,t,i){Object.keys(i).length!==0&&e.getObjectById(t.objectId)!==t&&e.events.layerModified.dispatch({database:e,layer:t,changes:i})}static setLayerFrozenState(e,t){const i=e.standardFlags??0;e.standardFlags=t?i|Rl:i&~Rl}static setLayerLockedState(e,t){const i=e.standardFlags??0;e.standardFlags=t?i|Jt:i&~Jt}static isLayerLocked(e){return((e.standardFlags??0)&Jt)!==0}static isEntityOnLockedLayer(e,t){return At(e,t)}static applyLayerPreviousSnapshot(e,t){t.states.forEach(n=>{const o=W.openLayerForWrite(e,n.name);o&&(o.isOff=!n.isOn,W.setLayerFrozenState(o,n.isFrozen),W.setLayerLockedState(o,n.isLocked))});const i=W.openLayerForWrite(e,t.clayer);return i?(i.isOff=!1,W.setLayerFrozenState(i,!1),e.clayer=i.name,!0):!1}parseLayerNameInput(e){const t=[...this.db.tables.layerTable.newIterator()].map(o=>o.name),i=e.trim();if(!i)return[];if(i==="*")return[...t];const n=i.split(",").map(o=>o.trim()).filter(Boolean);return[...new Set(n)]}resolveLayers(e){const t=this.db.tables.layerTable,i=[],n=[];return e.forEach(o=>{const r=t.getAt(o);r?i.push(r):n.push(o)}),{layers:i,missing:n}}getLayerSummaries(){return[...this.db.tables.layerTable.newIterator()].map(e=>({name:e.name,current:this.db.clayer===e.name?"*":"",on:e.isOff?"No":"Yes",frozen:e.isFrozen?"Yes":"No",locked:W.isLayerLocked(e)?"Yes":"No",color:e.color.toString()}))}createLayers(e){return ie(this.db,se,()=>{const t=this.db.tables.layerTable;let i=0;const n=[];return e.forEach(o=>{if(t.has(o)){n.push(o);return}t.add(new p.AcDbLayerTableRecord({name:o,isOff:!1,isPlottable:!0,color:new p.AcCmColor(p.AcCmColorMethod.ByACI,7),linetype:"Continuous"})),i++}),{created:i,existed:n}})}setCurrentLayer(e){const t=this.db.tables.layerTable.getAt(e);return t?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,t);return i?(i.isOff=!1,W.setLayerFrozenState(i,!1),this.db.clayer=i.name,!0):!1}):!1}makeLayer(e){return ie(this.db,se,()=>{const t=this.db.tables.layerTable;let i=t.getAt(e);i||(i=new p.AcDbLayerTableRecord({name:e,isOff:!1,isPlottable:!0,color:new p.AcCmColor(p.AcCmColorMethod.ByACI,7),linetype:"Continuous"}),t.add(i));const n=W.openLayerForWrite(this.db,i);return n?(n.isOff=!1,W.setLayerFrozenState(n,!1),this.db.clayer=n.name,!0):!1})}setLayerOn(e,t,i={}){if(!e||!this.db.tables.layerTable.getAt(e))return!1;const n=i.switchCurrentLayer??!1;return ie(this.db,se,()=>{if(!t&&n&&!this.switchCurrentLayerIfNeeded(e))return!1;const o=W.openLayerForWrite(this.db,e);return o?(o.isOff=!t,W.syncLayerModifiedEvent(this.db,o,{isOff:o.isOff}),!0):!1})}setLayerFrozen(e,t,i={}){if(!e||!this.db.tables.layerTable.getAt(e))return!1;const n=i.switchCurrentLayer??!1;return ie(this.db,se,()=>{if(t&&n&&!this.switchCurrentLayerIfNeeded(e))return!1;const o=W.openLayerForWrite(this.db,e);return o?(W.setLayerFrozenState(o,t),W.syncLayerModifiedEvent(this.db,o,{standardFlags:o.standardFlags}),!0):!1})}setLayerLocked(e,t){return!e||!this.db.tables.layerTable.getAt(e)?!1:ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(W.setLayerLockedState(i,t),W.syncLayerModifiedEvent(this.db,i,{standardFlags:i.standardFlags}),!0):!1})}setLayerLineWeight(e,t){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.lineWeight=t,!0):!1}):!1}setLayerPlottable(e,t){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.isPlottable=t,!0):!1}):!1}setLayerLinetype(e,t){return!t||!this.db.tables.layerTable.getAt(e)?!1:ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.linetype=t,!0):!1})}setLayerTransparency(e,t){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.transparency=t,!0):!1}):!1}isolateSingleLayer(e){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{for(const t of this.db.tables.layerTable.newIterator()){const i=W.openLayerForWrite(this.db,t);if(!i)continue;const n=i.name===e;i.isOff=!n,n&&W.setLayerFrozenState(i,!1)}return this.db.clayer=e,!0}):!1}setLayersVisibility(e,t,i={}){const n=i.skipCurrentLayer??!0,{layers:o}=this.resolveLayers(e),r=[];return ie(this.db,se,()=>{o.forEach(a=>{if(t&&n&&a.name===this.db.clayer){r.push(a.name);return}const l=W.openLayerForWrite(this.db,a);l&&(l.isOff=t,W.syncLayerModifiedEvent(this.db,l,{isOff:l.isOff}))})}),{skippedCurrent:r}}setAllLayersOn(){return ie(this.db,se,()=>{let e=0;for(const t of this.db.tables.layerTable.newIterator()){if(!t.isOff)continue;const i=W.openLayerForWrite(this.db,t);i&&(i.isOff=!1,e++)}return e})}setAllLayersOffExceptCurrent(){return ie(this.db,se,()=>{const e=this.db.clayer;let t=0;for(const i of this.db.tables.layerTable.newIterator()){if(i.name===e||i.isOff)continue;const n=W.openLayerForWrite(this.db,i);n&&(n.isOff=!0,t++)}return t})}setLayersFrozen(e,t,i={}){const n=i.skipCurrentLayer??!0,{layers:o}=this.resolveLayers(e),r=[];return ie(this.db,se,()=>{o.forEach(a=>{if(t&&n&&a.name===this.db.clayer){r.push(a.name);return}const l=W.openLayerForWrite(this.db,a);l&&(W.setLayerFrozenState(l,t),W.syncLayerModifiedEvent(this.db,l,{standardFlags:l.standardFlags}))})}),{skippedCurrent:r}}thawAllLayers(){return ie(this.db,se,()=>{let e=0;for(const t of this.db.tables.layerTable.newIterator()){if(!t.isFrozen)continue;const i=W.openLayerForWrite(this.db,t);i&&(W.setLayerFrozenState(i,!1),W.syncLayerModifiedEvent(this.db,i,{standardFlags:i.standardFlags}),e++)}return e})}setLayersLocked(e,t){const{layers:i}=this.resolveLayers(e);ie(this.db,se,()=>{i.forEach(n=>{const o=W.openLayerForWrite(this.db,n);o&&(W.setLayerLockedState(o,t),W.syncLayerModifiedEvent(this.db,o,{standardFlags:o.standardFlags}))})})}parseColorInput(e){const t=e.trim();if(!t)return;if(/^\d+$/.test(t)){const n=Number(t);return n>=1&&n<=255?new p.AcCmColor(p.AcCmColorMethod.ByACI,n):void 0}const i=p.AcCmColor.fromString(t);if(i){if(i.isByACI){const n=i.colorIndex;if(n==null||n<1||n>255)return}if(!(i.isByLayer||i.isByBlock))return i}}setLayerColor(e,t){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.color=t.clone(),!0):!1}):!1}setLayersColor(e,t){const{layers:i}=this.resolveLayers(e);ie(this.db,se,()=>{i.forEach(n=>{const o=W.openLayerForWrite(this.db,n);o&&(o.color=t.clone())})})}setLayerDescription(e,t){const i=this.db.tables.layerTable.getAt(e);return i?ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);return n?(n.description=t,!0):!1}):!1}switchCurrentLayerIfNeeded(e){if(this.db.clayer!==e)return!0;let t,i;for(const r of this.db.tables.layerTable.newIterator())if(r.name!==e&&(t??(t=r.name),!r.isOff&&!r.isFrozen)){i=r.name;break}const n=i??t;if(!n)return!1;const o=W.openLayerForWrite(this.db,n);return o?(o.isOff=!1,W.setLayerFrozenState(o,!1),this.db.clayer=o.name,!0):!1}getLayerNameFromEntity(e){var i;const t=this.db.tables.blockTable.getEntityById(e);return((i=t==null?void 0:t.layer)==null?void 0:i.trim())||void 0}collectLayerNamesFromEntities(e){const t=new Set,i=new Set;return e.forEach(n=>{const o=this.getLayerNameFromEntity(n);if(!o)return;const r=this.db.tables.layerTable.getAt(o);r?t.add(r.name):i.add(o)}),{layerNames:[...t],missingLayerNames:[...i]}}freezeLayerByEntity(e){const t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};const i=this.db.tables.layerTable.getAt(t);if(!i)return{ok:!1,reason:"layer_not_found",layerName:t};if(i.name===this.db.clayer)return{ok:!1,reason:"cannot_change_current",layerName:t};if(i.isFrozen)return{ok:!1,reason:"already_frozen",layerName:t};const n=i.isFrozen;return ie(this.db,se,()=>{const o=W.openLayerForWrite(this.db,i);o&&W.setLayerFrozenState(o,!0)}),{ok:!0,layerName:t,previousFrozen:n}}setLayerFrozenByName(e,t){const i=this.db.tables.layerTable.getAt(e);return i?ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);return n?(W.setLayerFrozenState(n,t),!0):!1}):!1}turnOffLayerByEntity(e){const t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};const i=this.db.tables.layerTable.getAt(t);if(!i)return{ok:!1,reason:"layer_not_found",layerName:t};if(i.name===this.db.clayer)return{ok:!1,reason:"cannot_change_current",layerName:t};if(i.isOff)return{ok:!1,reason:"already_off",layerName:t};const n=i.isOff;return ie(this.db,se,()=>{const o=W.openLayerForWrite(this.db,i);o&&(o.isOff=!0)}),{ok:!0,layerName:t,previousOff:n}}setLayerOffByName(e,t){const i=this.db.tables.layerTable.getAt(e);return i?ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);return n?(n.isOff=t,!0):!1}):!1}lockLayerByEntity(e){const t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};const i=this.db.tables.layerTable.getAt(t);return i?W.isLayerLocked(i)?{ok:!1,reason:"already_locked",layerName:t}:(ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);n&&W.setLayerLockedState(n,!0)}),{ok:!0,layerName:t}):{ok:!1,reason:"layer_not_found",layerName:t}}unlockLayerByEntity(e){const t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};const i=this.db.tables.layerTable.getAt(t);return i?W.isLayerLocked(i)?(ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);n&&W.setLayerLockedState(n,!1)}),{ok:!0,layerName:t}):{ok:!1,reason:"already_unlocked",layerName:t}:{ok:!1,reason:"layer_not_found",layerName:t}}isolateLayers(e,t){if(e.length!==0)return ie(this.db,se,()=>{const i=this.db.tables.layerTable,n=new Set(e),o=i.getAt(e[0]),r=this.db.clayer,a=new Map;for(const h of i.newIterator())a.set(h.name,jl(h));o&&(this.db.clayer=o.name);const l=new Set;for(const h of i.newIterator()){const f=W.openLayerForWrite(this.db,h);if(f){if(n.has(f.name)){f.isOff&&(f.isOff=!1,l.add(f.name)),f.isFrozen&&(W.setLayerFrozenState(f,!1),l.add(f.name)),W.isLayerLocked(f)&&(W.setLayerLockedState(f,!1),l.add(f.name));continue}if(t==="Off"){f.isOff||(f.isOff=!0,l.add(f.name));continue}W.isLayerLocked(f)||(W.setLayerLockedState(f,!0),l.add(f.name))}}const c=[];for(const h of i.newIterator()){const f=a.get(h.name);if(!f)continue;const y=jl(h);wp(f,y)||c.push({name:h.name,before:f,isolated:y})}const d={currentLayerBefore:r,currentLayerAfter:this.db.clayer,layers:c};return{layerNames:e,affectedLayerCount:l.size,isoSnapshot:d}})}unisolateFromSnapshot(e){return ie(this.db,se,()=>{const t=this.db.tables.layerTable;let i=0;for(const n of e.layers)t.getAt(n.name)&&this.restoreLayerIfUnchanged(n)&&i++;return this.db.clayer===e.currentLayerAfter&&e.currentLayerBefore!==e.currentLayerAfter&&t.getAt(e.currentLayerBefore)&&(this.db.clayer=e.currentLayerBefore),i})}collectLayerEntities(e){const t=[];for(const i of this.db.tables.blockTable.newIterator())for(const n of i.newIterator())n.layer===e&&t.push({ownerId:i.objectId,objectId:n.objectId,entity:n.clone()});return t}removeLayerEntities(e){const t=new Map;e.forEach(({ownerId:i,objectId:n})=>{const o=t.get(i)??[];o.push(n),t.set(i,o)}),t.forEach((i,n)=>{var o;(o=this.db.tables.blockTable.getIdAt(n))==null||o.removeEntity(i)})}deleteLayer(e){const t=this.db.tables.layerTable.getAt(e);return t?t.name==="0"?{ok:!1,reason:"layer_0",layerName:e}:t.name===this.db.clayer?{ok:!1,reason:"current_layer",layerName:e}:ie(this.db,se,()=>{const i=this.collectLayerEntities(t.name);this.removeLayerEntities(i);const n=t.clone();return this.db.tables.layerTable.remove(t.name),this.db.events.layerErased.dispatch({database:this.db,layer:t}),{ok:!0,layerName:t.name,layer:n,entities:i}}):{ok:!1,reason:"not_found",layerName:e}}restoreDeletedLayer(e,t){ie(this.db,se,()=>{this.db.tables.layerTable.has(e.name)||this.db.tables.layerTable.add(e.clone());const i=new Map;t.forEach(({ownerId:n,entity:o})=>{const r=i.get(n)??[];r.push(o.clone()),i.set(n,r)}),i.forEach((n,o)=>{(this.db.tables.blockTable.getIdAt(o)??this.db.tables.blockTable.modelSpace).appendEntity(n)})})}restoreLayerIfUnchanged(e){const t=this.db.tables.layerTable.getAt(e.name);if(!t)return!1;const i=W.openLayerForWrite(this.db,t);if(!i)return!1;let n=!1;return i.isOff===e.isolated.isOff&&i.isOff!==e.before.isOff&&(i.isOff=e.before.isOff,n=!0),i.isFrozen===e.isolated.isFrozen&&i.isFrozen!==e.before.isFrozen&&(W.setLayerFrozenState(i,e.before.isFrozen),n=!0),W.isLayerLocked(i)===e.isolated.isLocked&&W.isLayerLocked(i)!==e.before.isLocked&&(W.setLayerLockedState(i,e.before.isLocked),n=!0),n}getEffectiveLayerTraits(e){return W.resolveLayerTraits(this.db,e)}static resolveLayerTraits(e,t){const i=e.tables.layerTable.getAt(t);if(i)return{layer:i.name,color:i.color.clone(),lineType:i.lineStyle,lineWeight:i.lineWeight,transparency:i.transparency}}};W.patchedChangeAppliers=new WeakSet;let we=W;class Gl{constructor(e,t,i){this.scene=e,this.renderer=t,this.getLayerTraits=i}layerStyleMayHaveChanged(e){return e.color!=null||e.linetype!=null||e.lineWeight!==void 0||e.transparency!=null}syncFromLiveRecord(e){const t=this.getEffectiveLayerTraits(e.name);if(!t)return;const i=this.renderer.updateLayerMaterial(e.name,t);this.scene.forEachSceneLayer(e.name,n=>n.syncAppearanceFromRecord(e.name,t,i,this.renderer))}refreshTextMaterialsInObjectTree(e,t){e.traverse(i=>{const n=i.refreshTextMaterials;typeof n=="function"&&n.call(i,t)})}getEffectiveLayerTraits(e){if(this.getLayerTraits)return this.getLayerTraits(e);const t=this.renderer.context.database;if(t)return we.resolveLayerTraits(t,e)}}function Fo(s,e){var r;let t=1/0,i=1/0,n=-1/0,o=-1/0;for(const a of s)je(a)&&(t=Math.min(t,a.minX),i=Math.min(i,a.minY),n=Math.max(n,a.maxX),o=Math.max(o,a.maxY));return{minX:t,minY:i,maxX:n,maxY:o,id:e??((r=s[0])==null?void 0:r.id)??""}}function ts(s){return!(s.children!==void 0&&s.children.length===0)}function Hl(s){const e=new Map;return s.map(t=>{const i=t.id;if(typeof i!="string"||i.length===0)return t;const n=e.get(i)??0;return e.set(i,n+1),n===0?t:{...t,id:`${i}#${n}`}})}const v0=40;class x0{constructor(){this.items=new Map,this.anonKeySeq=0}storageKey(e){return typeof e.id=="string"&&e.id.length>0?e.id:`__anon_${this.anonKeySeq++}`}insert(e){if(typeof e.id=="string"&&e.id.length>0){this.items.set(e.id,e);return}this.items.set(this.storageKey(e),e)}load(e){for(const t of e)this.insert(t)}remove(e){if(typeof e.id=="string"&&e.id.length>0){this.items.delete(e.id);return}for(const[t,i]of this.items)if(i===e||i.id===e.id&&i.minX===e.minX&&i.minY===e.minY&&i.maxX===e.maxX&&i.maxY===e.maxY){this.items.delete(t);return}}removeById(e){typeof e=="string"&&e.length>0&&this.items.delete(e)}getById(e){if(typeof e=="string"&&e.length>0)return this.items.get(e)}clear(){this.items.clear()}search(e,t){const i=[];for(const n of this.items.values())xp(n,e)&&((t==null?void 0:t.selectionMode)==="window"&&!en(n,e)||i.push(n));return i}collides(e){for(const t of this.items.values())if(xp(t,e))return!0;return!1}all(){return Array.from(this.items.values())}getStats(){const e=this.all(),t=e.length;return{kind:"linear",itemCount:t,estimatedBytes:Gh(e)+t*v0}}}function xp(s,e){return!(s.maxX<e.minX||s.minX>e.maxX||s.maxY<e.minY||s.minY>e.maxY)}function kp(s,e,t=0,i=s.length-1,n=k0){for(;i>t;){if(i-t>600){const l=i-t+1,c=e-t+1,d=Math.log(l),h=.5*Math.exp(2*d/3),f=.5*Math.sqrt(d*h*(l-h)/l)*(c-l/2<0?-1:1),y=Math.max(t,Math.floor(e-c*h/l+f)),g=Math.min(i,Math.floor(e+(l-c)*h/l+f));kp(s,e,y,g,n)}const o=s[e];let r=t,a=i;for(is(s,t,e),n(s[i],o)>0&&is(s,t,i);r<a;){for(is(s,r,a),r++,a--;n(s[r],o)<0;)r++;for(;n(s[a],o)>0;)a--}n(s[t],o)===0?is(s,t,a):(a++,is(s,a,i)),a<=e&&(t=a+1),e<=a&&(i=a-1)}}function is(s,e,t){const i=s[e];s[e]=s[t],s[t]=i}function k0(s,e){return s<e?-1:s>e?1:0}class S0{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const i=[];if(!Ro(e,t))return i;const n=this.toBBox,o=[];for(;t;){for(let r=0;r<t.children.length;r++){const a=t.children[r],l=t.leaf?n(a):a;Ro(e,l)&&(t.leaf?i.push(a):Wl(e,l)?this._all(a,i):o.push(a))}t=o.pop()}return i}collides(e){let t=this.data;if(!Ro(e,t))return!1;const i=[];for(;t;){for(let n=0;n<t.children.length;n++){const o=t.children[n],r=t.leaf?this.toBBox(o):o;if(Ro(e,r)){if(t.leaf||Wl(e,r))return!0;i.push(o)}}t=i.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let i=0;i<e.length;i++)this.insert(e[i]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const i=this.data;this.data=t,t=i}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=sn([]),this}remove(e,t){if(!e)return this;let i=this.data;const n=this.toBBox(e),o=[],r=[];let a,l,c;for(;i||o.length;){if(i||(i=o.pop(),l=o[o.length-1],a=r.pop(),c=!0),i.leaf){const d=C0(e,i.children,t);if(d!==-1)return i.children.splice(d,1),o.push(i),this._condense(o),this}!c&&!i.leaf&&Wl(i,n)?(o.push(i),r.push(a),a=0,l=i,i=i.children[0]):l?(a++,i=l.children[a],c=!1):i=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const i=[];for(;e;)e.leaf?t.push(...e.children):i.push(...e.children),e=i.pop();return t}_build(e,t,i,n){const o=i-t+1;let r=this._maxEntries,a;if(o<=r)return a=sn(e.slice(t,i+1)),nn(a,this.toBBox),a;n||(n=Math.ceil(Math.log(o)/Math.log(r)),r=Math.ceil(o/Math.pow(r,n-1))),a=sn([]),a.leaf=!1,a.height=n;const l=Math.ceil(o/r),c=l*Math.ceil(Math.sqrt(r));Sp(e,t,i,c,this.compareMinX);for(let d=t;d<=i;d+=c){const h=Math.min(d+c-1,i);Sp(e,d,h,l,this.compareMinY);for(let f=d;f<=h;f+=l){const y=Math.min(f+l-1,h);a.children.push(this._build(e,f,y,n-1))}}return nn(a,this.toBBox),a}_chooseSubtree(e,t,i,n){for(;n.push(t),!(t.leaf||n.length-1===i);){let o=1/0,r=1/0,a;for(let l=0;l<t.children.length;l++){const c=t.children[l],d=Ul(c),h=P0(e,c)-d;h<r?(r=h,o=d<o?d:o,a=c):h===r&&d<o&&(o=d,a=c)}t=a||t.children[0]}return t}_insert(e,t,i){const n=i?e:this.toBBox(e),o=[],r=this._chooseSubtree(n,this.data,t,o);for(r.children.push(e),ss(r,n);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(n,o,t)}_split(e,t){const i=e[t],n=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,n);const r=this._chooseSplitIndex(i,o,n),a=sn(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,nn(i,this.toBBox),nn(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=sn([e,t]),this.data.height=e.height+1,this.data.leaf=!1,nn(this.data,this.toBBox)}_chooseSplitIndex(e,t,i){let n,o=1/0,r=1/0;for(let a=t;a<=i-t;a++){const l=ns(e,0,a,this.toBBox),c=ns(e,a,i,this.toBBox),d=E0(l,c),h=Ul(l)+Ul(c);d<o?(o=d,n=a,r=h<r?h:r):d===o&&h<r&&(r=h,n=a)}return n||i-t}_chooseSplitAxis(e,t,i){const n=e.leaf?this.compareMinX:A0,o=e.leaf?this.compareMinY:_0,r=this._allDistMargin(e,t,i,n),a=this._allDistMargin(e,t,i,o);r<a&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const o=this.toBBox,r=ns(e,0,t,o),a=ns(e,i-t,i,o);let l=zo(r)+zo(a);for(let c=t;c<i-t;c++){const d=e.children[c];ss(r,e.leaf?o(d):d),l+=zo(r)}for(let c=i-t-1;c>=t;c--){const d=e.children[c];ss(a,e.leaf?o(d):d),l+=zo(a)}return l}_adjustParentBBoxes(e,t,i){for(let n=i;n>=0;n--)ss(t[n],e)}_condense(e){for(let t=e.length-1,i;t>=0;t--)e[t].children.length===0?t>0?(i=e[t-1].children,i.splice(i.indexOf(e[t]),1)):this.clear():nn(e[t],this.toBBox)}}function C0(s,e,t){if(!t)return e.indexOf(s);for(let i=0;i<e.length;i++)if(t(s,e[i]))return i;return-1}function nn(s,e){ns(s,0,s.children.length,e,s)}function ns(s,e,t,i,n){n||(n=sn(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let o=e;o<t;o++){const r=s.children[o];ss(n,s.leaf?i(r):r)}return n}function ss(s,e){return s.minX=Math.min(s.minX,e.minX),s.minY=Math.min(s.minY,e.minY),s.maxX=Math.max(s.maxX,e.maxX),s.maxY=Math.max(s.maxY,e.maxY),s}function A0(s,e){return s.minX-e.minX}function _0(s,e){return s.minY-e.minY}function Ul(s){return(s.maxX-s.minX)*(s.maxY-s.minY)}function zo(s){return s.maxX-s.minX+(s.maxY-s.minY)}function P0(s,e){return(Math.max(e.maxX,s.maxX)-Math.min(e.minX,s.minX))*(Math.max(e.maxY,s.maxY)-Math.min(e.minY,s.minY))}function E0(s,e){const t=Math.max(s.minX,e.minX),i=Math.max(s.minY,e.minY),n=Math.min(s.maxX,e.maxX),o=Math.min(s.maxY,e.maxY);return Math.max(0,n-t)*Math.max(0,o-i)}function Wl(s,e){return s.minX<=e.minX&&s.minY<=e.minY&&e.maxX<=s.maxX&&e.maxY<=s.maxY}function Ro(s,e){return e.minX<=s.maxX&&e.minY<=s.maxY&&e.maxX>=s.minX&&e.maxY>=s.minY}function sn(s){return{children:s,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Sp(s,e,t,i,n){const o=[e,t];for(;o.length;){if(t=o.pop(),e=o.pop(),t-e<=i)continue;const r=e+Math.ceil((t-e)/i/2)*i;kp(s,r,e,t,n),o.push(e,r,r,t)}}const L0=40,T0=1.4;class Cp{constructor(e){this.tree=new S0(e),this.idMap=new Map}insert(e){if(!je(e))return;const t=typeof e.id=="string"&&e.id.length>0;if(t){const i=this.idMap.get(e.id);if(i){if(i.minX===e.minX&&i.minY===e.minY&&i.maxX===e.maxX&&i.maxY===e.maxY)return;this.remove(i,(n,o)=>n.id===o.id),this.idMap.delete(e.id)}}this.tree.insert(e),t&&this.idMap.set(e.id,e)}load(e){const t=e.filter(je);this.tree.load(t);for(const i of t)typeof i.id=="string"&&i.id.length>0&&this.idMap.set(i.id,i)}remove(e,t){this.tree.remove(e,t??((i,n)=>i===n||i.id===n.id&&i.minX===n.minX&&i.minY===n.minY&&i.maxX===n.maxX&&i.maxY===n.maxY)),typeof e.id=="string"&&e.id.length>0&&this.idMap.delete(e.id)}removeById(e){typeof e=="string"&&e.length>0&&(this.tree.remove({minX:0,minY:0,maxX:0,maxY:0,id:e},(t,i)=>t.id===i.id),this.idMap.delete(e))}getById(e){if(typeof e=="string"&&e.length>0)return this.idMap.get(e)}clear(){this.tree.clear(),this.idMap.clear()}search(e,t){const i=this.tree.search(e);return(t==null?void 0:t.selectionMode)!=="window"?i:i.filter(n=>en(n,e))}collides(e){return this.tree.collides(e)}all(){return this.tree.all()}getStats(){const e=this.tree.all(),t=e.length,i=Gh(e),n=this.idMap.size*L0;return{kind:"rbush",itemCount:t,estimatedBytes:Math.round(i*T0+n)}}}const Na=class Na{constructor(e){this.childIndexes=new Map,this.lazyChildren=new Map,this.rootIndex=e??new Cp}setChildIndex(e,t){this.childIndexes.set(e,t)}removeChildIndex(e){this.childIndexes.delete(e)}insert(e){this.rootIndex.insert(e)}load(e){this.rootIndex.load(e)}remove(e,t){this.rootIndex.remove(e,t),this.childIndexes.delete(e.id),this.lazyChildren.delete(e.id)}removeById(e){this.rootIndex.removeById(e),this.childIndexes.delete(e),this.lazyChildren.delete(e)}clear(){this.rootIndex.clear(),this.childIndexes.forEach(e=>e.clear()),this.childIndexes.clear(),this.lazyChildren.clear()}search(e,t){const i=this.rootIndex.search(e),n=[];for(const o of i){this.materializeLazyChildren(o.id);const r=this.childIndexes.get(o.id);if(!r){((t==null?void 0:t.selectionMode)!=="window"||en(o,e))&&n.push(o);continue}const a=r.search(e),l={...o,children:a};((t==null?void 0:t.selectionMode)!=="window"||this.isWindowSelectionHit(l,e))&&n.push(l)}return n}isWindowSelectionHit(e,t){const i=this.childIndexes.get(e.id);if(!i)return en(e,t);const n=i.all().filter(je);return n.length===0?!1:n.every(o=>en(o,t))}collides(e){return this.rootIndex.collides(e)?this.rootIndex.search(e).some(i=>{this.materializeLazyChildren(i.id);const n=this.childIndexes.get(i.id);return n?n.collides(e):!0}):!1}all(){const e=[];for(const t of this.rootIndex.all()){const i=this.childIndexes.get(t.id);i?e.push(...i.all()):e.push(t)}return e}async allAsync(e){const t=[];let i=0;const n=this.rootIndex.all();for(let o=0;o<n.length;o++){const r=n[o],a=this.childIndexes.get(r.id);if(a){const l=a.all();for(let c=0;c<l.length;c++)t.push(l[c]),i++,e&&(i&2047)===2047&&await e.maybeYield()}else t.push(r),i++,e&&(i&2047)===2047&&await e.maybeYield()}return t}hasChildIndex(e){return this.childIndexes.has(e)||this.lazyChildren.has(e)}setLazyChildSource(e,t){this.lazyChildren.set(e,t)}getRootById(e){var i;const t=this.rootIndex;return(i=t.getById)==null?void 0:i.call(t,e)}getStats(){const e=this.rootIndex.getStats();let t=0,i=0,n=0,o=0;for(const a of this.childIndexes.values()){const l=a.getStats();t+=l.itemCount,i+=l.estimatedBytes,l.kind==="rbush"?n++:l.kind==="linear"&&o++}const r=this.childIndexes.size*64;return{kind:"hierarchical",itemCount:e.itemCount,estimatedBytes:e.estimatedBytes+i+r,rootItemCount:e.itemCount,childIndexCount:this.childIndexes.size,childItemCount:t,rbushChildCount:n,linearChildCount:o}}ensureChildIndex(e,t){const i=Hl(t.filter(je)).map(a=>({...a}));if(i.length===0)return;const n=Fo(i,e);je(n)&&this.insert(n);const o=this.childIndexes.get(e);if(o)return o.clear(),o.load(i),o;const r=this.createIndexBySize(i.length);if(r)return r.load(i),this.setChildIndex(e,r),r}createChildIndex(e){return this.ensureChildIndex(e.objectId,e.wcsChildBoxes)}materializeLazyChildren(e){if(this.childIndexes.has(e))return;const t=this.lazyChildren.get(e);if(!t)return;this.lazyChildren.delete(e);const i=[];for(let r=0;r<t.boxes.length;r++){const a=t.boxes[r];!a||!je(a)||i.push(I0(a,t.matrix))}const n=Hl(i);if(n.length===0)return;const o=this.createIndexBySize(n.length);o&&(o.load(n),this.setChildIndex(e,o))}createIndexBySize(e){if(e>Na.THRESHOLD)return new Cp;if(e>0)return new x0}};Na.THRESHOLD=100;let $l=Na;function I0(s,e){const t=e.elements;let i=1/0,n=1/0,o=-1/0,r=-1/0;const a=[s.minX,s.maxX],l=[s.minY,s.maxY];for(let c=0;c<2;c++)for(let d=0;d<2;d++){const h=a[c],f=l[d],y=t[0]*h+t[4]*f+t[12],g=t[1]*h+t[5]*f+t[13];i=Math.min(i,y),n=Math.min(n,g),o=Math.max(o,y),r=Math.max(r,g)}return{minX:i,minY:n,maxX:o,maxY:r,id:s.id}}class on{static isLayerVisible(e){return!(e.isFrozen||e.isOff)}constructor(e){this._group=new D.AcTrBatchedGroup,this._name=e.name,this._group.name=e.name,this._cachedBox=new V.Box3,this._boxDirty=!0,this._group.visible=on.isLayerVisible(e)}get name(){return this._name}set name(e){this._name=e,this._group.name=e}get box(){return this._boxDirty&&(this.computeBatchBoundingBox(this._cachedBox),this._boxDirty=!1),this._cachedBox}computeBatchBoundingBox(e=new V.Box3,t,i){return this.visible?this._group.computeBoundingBox(e,{excludeObjectIds:t,includeObjectIds:i}):(e.makeEmpty(),e)}get visible(){return this._group.visible}set visible(e){this._group.visible=e}get internalObject(){return this._group}get stats(){const e=this._group.stats;return{name:this._name,...e}}get entityCount(){return this._group.entityCount}update(e){const t=this.visible;this.name=e.name,this._group.visible=on.isLayerVisible(e),t!==this.visible&&(this._boxDirty=!0)}updateMaterial(e,t){this._group.updateMaterial(e,t)}syncAppearanceFromRecord(e,t,i,n){const o=Object.entries(i).some(([r,a])=>a.id!==Number(r));for(const r in i){const a=Number(r),l=i[r];this.updateMaterial(a,l)}this._group.syncAppearanceFromRecord(e,t,i,o,(r,a,l)=>n.getLayerBoundMaterial(r,a,l),n.styleManager)}rebindMaterialsForLayer(e,t,i,n){this._group.rebindMaterialsForLayer(e,t,i,n)}rematerializeLayerTextDrawables(e,t,i){this._group.rematerializeLayerTextDrawables(e,t,i)}rerenderPoints(e,t=0){this._group.rerenderPoints(e,t)}collectPointObjectWorldBoxes(e=new Map){return this._group.collectPointObjectWorldBoxes(e)}repaintForegroundMaterials(e){this._group.repaintForegroundMaterials(e)}repaintBackgroundMaterials(e){this._group.repaintBackgroundMaterials(e)}hasEntity(e){return this._group.hasEntity(e)}setEntityVisible(e,t){return this._group.setEntityVisible(e,t)}getEntityVisible(e){return this._group.getEntityVisible(e)}createPreviewSubset(e,t){return this._group.createPreviewSubset(e,t)}addEntity(e,t=!0){this._group.addEntity(e),this._boxDirty=!0}addDirectEntity(e){const t={objectId:e.objectId,visible:e.visible,position:e.position};let i=!1;return e.kind==="lineFat"?i=this._group.appendLine2Geometry(e.geometry,e.material,e.worldOffset,t):e.kind==="lineBasic"?i=this._group.appendLineGeometry(e.geometry,e.material,e.worldOffset,t):e.kind==="point"?i=this._group.appendPointGeometry(e.geometry,e.material,e.worldOffset,t):e.kind==="mesh"&&(i=this._group.appendMeshGeometry(e.geometry,e.material,e.worldOffset,t)),i&&(this._boxDirty=!0),i}isIntersectWith(e,t){return this._group.isIntersectWith(e,t)}removeEntity(e){const t=this._group.removeEntity(e);return t&&(this._boxDirty=!0),t}updateEntity(e){return e.objectId?this._group.removeEntity(e.objectId)?(this._group.addEntity(e),this._boxDirty=!0,!0):e.visible?(this._group.addEntity(e),this._boxDirty=!0,!0):!1:!1}clear(){this._group.clear(),this._cachedBox.makeEmpty(),this._boxDirty=!0,this._group.removeFromParent()}hover(e){if(e.length!==0){if(e.length===1){this._group.hover(e[0]);return}this._group.hoverMany(e)}}unhover(e){if(e.length!==0){if(e.length===1){this._group.unhover(e[0]);return}this._group.unhoverMany(e)}}select(e){if(e.length!==0){if(e.length===1){this._group.select(e[0]);return}this._group.selectMany(e)}}unselect(e){if(e.length!==0){if(e.length===1){this._group.unselect(e[0]);return}this._group.unselectMany(e)}}setCompareDisplay(e){this._group.setCompareDisplay(e)}}class Ap{constructor(){this._smartExtentsGeneration=0,this.skipSpatialIndex=!1,this.isReference=!1,this._group=new V.Group,this._spatialIndex=new $l,this._cachedBox=new V.Box3,this._cachedSmartExtents=void 0,this._boxDirty=!0,this._extentExcludedObjectIds=new Set,this._layers=new Map,this._insertLayerByObjectId=new Map,this._isLoaded=!1}get internalObject(){return this._group}get layers(){return this._layers}get box(){return this._boxDirty&&this.recomputeBox(),this._cachedBox}computeBatchBoundingBox(e=new V.Box3){return this._boxDirty&&this.recomputeBox(),e.copy(this._cachedBox)}recomputeBox(){this._cachedBox.makeEmpty();const e=new V.Box3;this._layers.forEach(t=>{t.computeBatchBoundingBox(e,this._extentExcludedObjectIds),e.isEmpty()||this._cachedBox.union(e)}),this._boxDirty=!1}invalidateBox(){this._boxDirty=!0,this.clearSmartExtentsCache()}clearSmartExtentsCache(){this._cachedSmartExtents=void 0,this._smartExtentsGeneration++}get isLoaded(){return this._isLoaded}set isLoaded(e){this._isLoaded=e}get visible(){return this._group.visible}set visible(e){this._group.visible=e}get entityCount(){let e=0;return this._layers.forEach(t=>e+=t.entityCount),e}get spatialIndexStats(){return this._spatialIndex.getStats()}get stats(){const e=[];let t=0,i=0,n=0,o=0,r=0,a=0,l=0;const c={line:0,mesh:0,point:0,other:0};return this._layers.forEach(d=>{const h=d.stats;e.push(h),n+=h.line.indexed.geometrySize+h.line.nonIndexed.geometrySize,o+=h.mesh.indexed.geometrySize+h.mesh.nonIndexed.geometrySize,r+=h.point.indexed.geometrySize+h.point.nonIndexed.geometrySize,a+=h.unbatched.geometrySize,l+=h.unbatched.count,c.line+=h.unbatched.byType.line,c.mesh+=h.unbatched.byType.mesh,c.point+=h.unbatched.byType.point,c.other+=h.unbatched.byType.other,t+=h.summary.totalGeometrySize,i+=h.summary.totalMappingSize}),{layers:e,summary:{entityCount:this.entityCount,totalSize:{line:n,mesh:o,point:r,unbatched:a,geometry:t,mapping:i,unbatchedCount:l,unbatchedByType:c}}}}clear(){return this._layers.forEach(e=>{e.clear()}),this._layers.clear(),this._cachedBox.makeEmpty(),this.clearSmartExtentsCache(),this._boxDirty=!0,this._extentExcludedObjectIds.clear(),this._insertLayerByObjectId.clear(),this._spatialIndex.clear(),this}rerenderPoints(e,t=0){this._layers.forEach(i=>{i.rerenderPoints(e,t)}),this.refreshPointSpatialIndexes()}refreshPointSpatialIndexes(){const e=new Map;this._layers.forEach(t=>{t.collectPointObjectWorldBoxes(e)}),e.forEach((t,i)=>{if(this._spatialIndex.hasChildIndex(i)){const n=this._spatialIndex.getRootById(i);if(n){this._spatialIndex.insert({id:i,minX:Math.min(n.minX,t.min.x),minY:Math.min(n.minY,t.min.y),maxX:Math.max(n.maxX,t.max.x),maxY:Math.max(n.maxY,t.max.y)});return}}this.registerSpatialIndexBox(i,t)}),this.clearSmartExtentsCache()}repaintForegroundMaterials(e){this._layers.forEach(t=>t.repaintForegroundMaterials(e))}repaintBackgroundMaterials(e){this._layers.forEach(t=>t.repaintBackgroundMaterials(e))}isIntersectWith(e,t){const i=this.getLayersByObjectId(e);for(let n=0;n<i.length;++n){const o=i[n];if(o&&o.isIntersectWith(e,t))return!0}return D.AcTrMTextRenderer.getInstance().intersectMeshGlyphObjectId(e,t)}hasVisibleEntity(e){return this.getLayersByObjectId(e).some(t=>t.visible)}addEntity(e,t=!0){if(!e.objectId)throw new Error("Object id is required to add one entity!");if(!e.layerName)throw new Error("Layer name is required to add one entity!");const i=this._layers.get(e.layerName);if(!i)throw new Error(`layer '${e.layerName}' doesn't exist!`);i.addEntity(e);const n=e.userData.insertLayerName;return n&&this._insertLayerByObjectId.set(e.objectId,n),t?this._extentExcludedObjectIds.delete(e.objectId):this._extentExcludedObjectIds.add(e.objectId),this.invalidateBox(),this.registerEntitySpatialIndex(e),this}addDirectEntity(e,t=!0){if(!e.objectId)throw new Error("Object id is required to add one entity!");if(!e.layerName)throw new Error("Layer name is required to add one entity!");const i=this._layers.get(e.layerName);if(!i)throw new Error(`layer '${e.layerName}' doesn't exist!`);return i.addDirectEntity(e)?(t?this._extentExcludedObjectIds.delete(e.objectId):this._extentExcludedObjectIds.add(e.objectId),this.invalidateBox(),this.registerSpatialIndexBox(e.objectId,e.wcsBbox),!0):!1}removeEntity(e){let t=!1;for(const[i,n]of this._layers)n.removeEntity(e)&&(t=!0);return t&&(this._spatialIndex.removeById(e),this._extentExcludedObjectIds.delete(e),this._insertLayerByObjectId.delete(e),this.invalidateBox()),t}updateEntity(e){for(const[t,i]of this._layers)if(i.updateEntity(e)){const n=e.userData.insertLayerName;return n&&this._insertLayerByObjectId.set(e.objectId,n),this._spatialIndex.removeById(e.objectId),this.registerEntitySpatialIndex(e),this.invalidateBox(),!0}return!1}hasEntity(e){for(const[t,i]of this._layers)if(i.hasEntity(e))return!0;return!1}setEntityVisible(e,t){let i=!1;for(const[n,o]of this._layers)o.setEntityVisible(e,t)&&(i=!0);return i&&this.invalidateBox(),i}getEntityVisible(e){for(const[t,i]of this._layers){const n=i.getEntityVisible(e);if(n!==void 0)return n}}canCreateEntityPreview(e,t){if(e.length===0)return!1;if((t==null?void 0:t.requireAllEntities)??!0){for(const n of e){if(!this.hasEntity(n))return!1;const o=new V.Box3;if(this.computeEntityPreviewBoundsBox([n],o),o.isEmpty())return!1}return!0}return!this.computeEntityPreviewBoundsBox(e).isEmpty()}findPreviewableEntityIds(e){const t=[];for(const i of e){if(!this.hasEntity(i))continue;const n=new V.Box3;this.computeEntityPreviewBoundsBox([i],n),n.isEmpty()||t.push(i)}return t}computeEntityPreviewBoundsBox(e,t=new V.Box3){if(t.makeEmpty(),e.length===0)return t;const i=new Set(e),n=new V.Box3;for(const o of this._layers.values())o.computeBatchBoundingBox(n,void 0,i),n.isEmpty()||t.union(n);return t}computeEntityPreviewBounds2d(e,t=1.1){const i=this.computeEntityPreviewBoundsBox(e);return D.AcTrEntityPreview.box3ToBounds2d(i,t)}createEntityPreviewRoot(e,t){const i=(t==null?void 0:t.missingEntity)??"fail",n=(t==null?void 0:t.requireAllEntities)??!1;if(n){for(const a of e)if(!this.hasEntity(a))return null}const o=new Map;for(const a of e){const l=this.getLayersByObjectId(a);if(l.length===0){if(n||i==="fail")return null;continue}for(const c of l){let d=o.get(c);d||(d=new Set,o.set(c,d)),d.add(a)}}if(o.size===0)return null;const r=new V.Group;r.name="EntityPreviewRoot";for(const[a,l]of o){const c=[...l],d=a.createPreviewSubset(c,{maxSlots:Math.max(1e4,c.length*8),missingEntity:i});if(!d||d.children.length===0){if(i==="fail")return D.disposePreviewSubset(r),null;continue}r.add(d)}return r.children.length===0?null:r}getLayer(e){return this._layers.get(e)}addLayer(e){const t=e.name;let i=this._layers.get(t);return i===void 0&&(i=new on(e),this._layers.set(t,i),this._group.add(i.internalObject),this._compareDisplayOptions&&i.setCompareDisplay(this._compareDisplayOptions)),i}updateLayer(e){const t=this._layers.get(e.name);if(t){const i=t.visible;t.update(e),i!==t.visible&&this.invalidateBox()}return t}applyInsertLayerFreeze(e,t){const i=[];for(const[n,o]of this._insertLayerByObjectId){if(o!==e)continue;let r=!1;for(const a of this.getLayersByObjectId(n))a.name!==e&&a.setEntityVisible(n,!t)&&(r=!0);r&&i.push(n)}return i.length>0&&this.invalidateBox(),i}hover(e){this.applyHighlightToLayers(e,(t,i)=>t.hover(i))}unhover(e){this.applyHighlightToLayers(e,(t,i)=>t.unhover(i))}select(e){this.applyHighlightToLayers(e,(t,i)=>t.select(i))}unselect(e){this.applyHighlightToLayers(e,(t,i)=>t.unselect(i))}setCompareDisplay(e){this._compareDisplayOptions=e,this._layers.forEach(t=>t.setCompareDisplay(e))}applyHighlightToLayers(e,t){const i=new Map;for(const n of e){const o=this.getLayersByObjectId(n);for(const r of o){const a=i.get(r);a?a.push(n):i.set(r,[n])}}i.forEach((n,o)=>t(o,n))}search(e,t){return this._spatialIndex.search({minX:e.min.x,minY:e.min.y,maxX:e.max.x,maxY:e.max.y},t)}collectSpatialExtentBoxes(){return this._spatialIndex.all().filter(je)}async collectSpatialExtentBoxesAsync(e){const t=await this._spatialIndex.allAsync(e),i=[];for(let n=0;n<t.length;n++){const o=t[n];je(o)&&i.push(o),(n&2047)===2047&&await e.maybeYield()}return i}get cachedSmartExtents(){return this._cachedSmartExtents}get smartExtentsGeneration(){return this._smartExtentsGeneration}set cachedSmartExtents(e){this._cachedSmartExtents=e}getLayersByObjectId(e){const t=[];for(const[i,n]of this._layers)n.hasEntity(e)&&t.push(n);return t}getSpatialIndexChildBoxes(e){const t=e.userData.spatialIndexChildBoxes;if(!(!t||t.length===0))return t}registerEntitySpatialIndex(e){if(this.skipSpatialIndex)return;const t=e.userData.lazySpatialChildren;if(t&&t.boxes.length>0){const o={minX:e.wcsBbox.min.x,minY:e.wcsBbox.min.y,maxX:e.wcsBbox.max.x,maxY:e.wcsBbox.max.y,id:e.objectId};je(o)&&this._spatialIndex.insert(o),this._spatialIndex.setLazyChildSource(e.objectId,t);return}const i=this.getSpatialIndexChildBoxes(e);let n;if(i&&i.length>0){const o=Fo(i);n={minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:e.objectId}}else if(e instanceof D.AcTrGroup&&e.wcsChildBoxes.length>0){const o=Fo(e.wcsChildBoxes.map(r=>({minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY,id:r.id})));n={minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:e.objectId}}else n={minX:e.wcsBbox.min.x,minY:e.wcsBbox.min.y,maxX:e.wcsBbox.max.x,maxY:e.wcsBbox.max.y,id:e.objectId};je(n)&&(this._spatialIndex.insert({minX:n.minX,minY:n.minY,maxX:n.maxX,maxY:n.maxY,id:e.objectId}),i&&i.length>0&&(e.wcsBbox.min.set(n.minX,n.minY,e.wcsBbox.min.z),e.wcsBbox.max.set(n.maxX,n.maxY,e.wcsBbox.max.z))),i?this._spatialIndex.ensureChildIndex(e.objectId,i):e instanceof D.AcTrGroup&&this._spatialIndex.createChildIndex(e)}registerSpatialIndexBox(e,t){if(this.skipSpatialIndex)return;const i={minX:t.min.x,minY:t.min.y,maxX:t.max.x,maxY:t.max.y,id:e};je(i)&&this._spatialIndex.insert(i)}}class _p{constructor(){this._skipSpatialIndex=!1,this._scene=new V.Scene,this._transientManager=new D.AcTrTransientManager(this._scene),this._htmlTransientManager=new D.AcTrHtmlTransientManager(this._scene),this._previewOverlayManager=new D.AcTrPreviewOverlayManager(this._scene),this._layers=new Map,this._layouts=new Map,this._activeLayoutBtrId="",this._modelSpaceBtrId=""}get skipSpatialIndex(){return this._skipSpatialIndex}set skipSpatialIndex(e){this._skipSpatialIndex=e;for(const t of this._layouts.values())t.skipSpatialIndex=e}get htmlTransientManager(){return this._htmlTransientManager}get layers(){return this._layers}get layouts(){return this._layouts}get box(){const e=this.activeLayout;if(!e)return;const t=e.box;return t.isEmpty()?void 0:t}get internalScene(){return this._scene}get modelSpaceBtrId(){return this._modelSpaceBtrId}set modelSpaceBtrId(e){if(this._modelSpaceBtrId=e,!this._layouts.has(e))throw new Error(`[AcTrScene] No layout assiciated with the specified block table record id '${e}'!`)}get activeLayoutBtrId(){return this._activeLayoutBtrId}set activeLayoutBtrId(e){this._activeLayoutBtrId=e,this._layouts.forEach((t,i)=>{t.visible=e==i})}get activeLayout(){if(this._activeLayoutBtrId&&this._layouts.has(this._activeLayoutBtrId))return this._layouts.get(this._activeLayoutBtrId)}get modelSpaceLayout(){if(this._modelSpaceBtrId&&this._layouts.has(this._modelSpaceBtrId))return this._layouts.get(this._modelSpaceBtrId)}get stats(){const e=[];let t=0,i=0,n=0,o=0,r=0,a=0,l=0,c=0;const d={line:0,mesh:0,point:0,other:0};return this._layouts.forEach(h=>e.push(h.stats)),e.forEach(h=>{t+=h.summary.entityCount,i+=h.summary.totalSize.line,n+=h.summary.totalSize.mesh,o+=h.summary.totalSize.point,r+=h.summary.totalSize.unbatched,a+=h.summary.totalSize.geometry,l+=h.summary.totalSize.mapping,c+=h.summary.totalSize.unbatchedCount,d.line+=h.summary.totalSize.unbatchedByType.line,d.mesh+=h.summary.totalSize.unbatchedByType.mesh,d.point+=h.summary.totalSize.unbatchedByType.point,d.other+=h.summary.totalSize.unbatchedByType.other}),{layouts:e,summary:{layoutCount:e.length,entityCount:t,totalSize:{line:i,mesh:n,point:o,unbatched:r,geometry:a,mapping:l,unbatchedCount:c,unbatchedByType:d}}}}addEmptyLayout(e){const t=this._layouts.get(e);if(t)return t;const i=new Ap;return i.skipSpatialIndex=this._skipSpatialIndex,this._layouts.set(e,i),this._scene.add(i.internalObject),i.visible=e==this._activeLayoutBtrId,this._layers.forEach(n=>{i.addLayer(n)}),i}clear(){return this._layouts.forEach(e=>{this._scene.remove(e.internalObject),e.clear()}),this._layouts.clear(),this._layers.clear(),this._transientManager.clear(),this._htmlTransientManager.clear(),this._previewOverlayManager.clear(),this._scene.clear(),this._transientManager=new D.AcTrTransientManager(this._scene),this._htmlTransientManager=new D.AcTrHtmlTransientManager(this._scene),this._previewOverlayManager=new D.AcTrPreviewOverlayManager(this._scene),this}hover(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.hover(e)),this.applyMeshGlyphHighlight(e,"hover",!0),!0)}unhover(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.unhover(e)),this.applyMeshGlyphHighlight(e,"hover",!1),!0)}select(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.select(e)),this.applyMeshGlyphHighlight(e,"select",!0),!0)}unselect(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.unselect(e)),this.applyMeshGlyphHighlight(e,"select",!1),!0)}applyMeshGlyphHighlight(e,t,i){const n=D.AcTrMTextRenderer.getInstance();if(n.getMeshGlyphInstancing())for(const o of e)n.setMeshGlyphHighlight(o,t,i)}setCompareDisplay(e){this._layouts.forEach(t=>{t.isReference||t.setCompareDisplay(e)})}search(e,t){const i=this.activeLayout;return i?i.search(e,t):[]}addLayer(e){const t=[];return this._layers.set(e.name,e),this._layouts.forEach(i=>{const n=i.addLayer(e);n&&t.push(n)}),t}updateLayer(e){const t=this._layers.get(e.name),i=(t==null?void 0:t.isFrozen)??!1,n=[];this._layers.set(e.name,e);const o=new Set;return this._layouts.forEach(r=>{const a=r.updateLayer(e);if(a&&n.push(a),e.isFrozen&&!i)for(const l of r.applyInsertLayerFreeze(e.name,!0))o.add(l);else if(!e.isFrozen&&i)for(const l of r.applyInsertLayerFreeze(e.name,!1))o.add(l)}),{updatedLayers:n,touchedObjectIds:o}}forEachSceneLayer(e,t){this._layouts.forEach(i=>{const n=i.getLayer(e);n&&t(n,i)})}repaintForegroundMaterials(e){this._layouts.forEach(t=>t.repaintForegroundMaterials(e))}repaintBackgroundMaterials(e){this._layouts.forEach(t=>t.repaintBackgroundMaterials(e))}addTransientEntity(e){this._transientManager.update(e)}removeTransientEntity(e){this._transientManager.remove(e)}setTransientEntityVisible(e,t){const i=this._transientManager.get(e);return!i||i.visible===t?!1:(i.visible=t,!0)}updateTransientPreviewTransforms(e){const t=e.map(i=>({id:i.objectId,matrix:i.matrix}));return{webgl:this._transientManager.applyTransforms(t),html:this._htmlTransientManager.applyTransforms(t)}}canCreatePreview(e){const t=this.activeLayout;return t?t.canCreateEntityPreview(e,{requireAllEntities:!0}):!1}computeEntityPreviewBounds2d(e,t=1.1,i="active-first"){const n=this.computeEntityPreviewBoundsBox(e,i);return D.AcTrEntityPreview.box3ToBounds2d(n,t)}findPreviewableEntityIds(e,t="active-first"){if(e.length===0)return[];if(t==="all"){const i=[],n=new Set(e);for(const o of this.getOrderedLayouts("all")){if(n.size===0)break;const r=o.findPreviewableEntityIds([...n]);if(r.length!==0){i.push(...r);for(const a of r)n.delete(a)}}return i}for(const i of this.getOrderedLayouts("active-first")){const n=i.findPreviewableEntityIds(e);if(n.length>0)return n}return[]}createEntityPreviewRoot(e,t){if(e.length===0)return null;const i=(t==null?void 0:t.scope)??"active-first",n={missingEntity:"skip",...t==null?void 0:t.layoutOptions};if(i==="all")return this.mergeEntityPreviewRoots(e,this.getOrderedLayouts("all"),n);for(const o of this.getOrderedLayouts("active-first")){const r=o.createEntityPreviewRoot(e,n);if(r)return r}return null}mergeEntityPreviewRoots(e,t,i){const n=new Set(e),o=new V.Group;o.name="EntityPreviewRoot";for(const r of t){if(n.size===0)break;const a=r.findPreviewableEntityIds([...n]);if(a.length===0)continue;const l=r.createEntityPreviewRoot(a,i);if(l){o.add(l);for(const c of a)n.delete(c)}}return o.children.length>0?o:null}getOrderedLayouts(e){if(e==="all")return[...this._layouts.values()];const t=[],i=this.activeLayout,n=this.modelSpaceLayout;i&&t.push(i),n&&n!==i&&t.push(n);for(const o of this._layouts.values())o!==i&&o!==n&&t.push(o);return t}computeEntityPreviewBoundsBox(e,t="active-first"){const i=new V.Box3,n=new V.Box3;if(t==="all"){const o=new Set(e);for(const r of this.getOrderedLayouts("all")){if(o.size===0)break;const a=r.findPreviewableEntityIds([...o]);if(a.length!==0){r.computeEntityPreviewBoundsBox(a,n),n.isEmpty()||i.union(n);for(const l of a)o.delete(l)}}return i}for(const o of this.getOrderedLayouts("active-first"))if(o.computeEntityPreviewBoundsBox(e,n),!n.isEmpty())return i.copy(n),i;return i.makeEmpty(),i}createPreview(e){const t=this.activeLayout;if(!t)return null;const i=t.createEntityPreviewRoot(e,{missingEntity:"fail",requireAllEntities:!0});return i?this._previewOverlayManager.add(i).id:null}updatePreview(e,t){return this._previewOverlayManager.update(e,t)}removePreview(e){return this._previewOverlayManager.remove(e)}addEntity(e,t=!0){const i=e.ownerId;if(i){let n=this._layouts.get(i);n||(n=this.addEmptyLayout(i)),n.addEntity(e,t)}else p.log.warn("[AcTrSecene] The owner id of one entity cannot be empty!");return this}addDirectEntity(e,t=!0){const i=e.ownerId;if(!i)return p.log.warn("[AcTrSecene] The owner id of one entity cannot be empty!"),!1;let n=this._layouts.get(i);return n||(n=this.addEmptyLayout(i)),n.addDirectEntity(e,t)}removeEntity(e){D.AcTrMTextRenderer.getInstance().removeMeshGlyphInstances(e);for(const[t,i]of this._layouts)if(i.removeEntity(e))return!0;return!1}updateEntity(e){for(const[t,i]of this._layouts)if(i.updateEntity(e))return!0;return!1}hasEntity(e){for(const[t,i]of this._layouts)if(i.hasEntity(e))return!0;return!1}setEntityVisible(e,t){let i=!1;for(const[n,o]of this._layouts)o.setEntityVisible(e,t)&&(i=!0);return i&&D.AcTrMTextRenderer.getInstance().setMeshGlyphVisible(e,t),i}getEntityVisible(e){for(const[t,i]of this._layouts){const n=i.getEntityVisible(e);if(n!==void 0)return n}}}var _t=(s=>(s.Extents="extents",s.Saved="saved",s))(_t||{});let Kl=null;function Pp(s){Kl=s}function os(){if(!Kl)throw new Error("[AcApCommandServices] Not bound. Create AcApDocManager before running commands.");return Kl}var U=(s=>(s[s.Read=0]="Read",s[s.Review=4]="Review",s[s.Write=8]="Write",s))(U||{});class rs extends Error{constructor(){super("session-accessory-mount-skipped"),this.name="AcEdSessionAccessoryMountSkippedError"}}class K{constructor(){this._mode=U.Read,this.recordsUndoStack=!0,this.sessionAccessory=null,this._globalName="",this._localName="",this._userData={}}get userData(){return this._userData}get globalName(){return this._globalName}set globalName(e){this._globalName=e}get localName(){return this._localName}set localName(e){this._localName=e}get mode(){return this._mode}set mode(e){this._mode=e}onCommandWillStart(e){}onCommandEnded(e){}async trigger(e){const i=e.doc.database.transactionManager,n=this.shouldRecordUndoStack(e);let o=!1,r=!1;const a=this.sessionAccessory;n&&(i.startUndoMark(this.globalName||this.localName),i.startTransaction(),o=!0);try{if(this.onCommandWillStart(e),e.view.editor.events.commandWillStart.dispatch({command:this}),a)try{const l=e.view.sessionAccessoryHost,c={host:l.host,type:l.type,view:e.view},d={command:this,accessory:a,options:c,source:"command"};e.view.editor.events.beforeMountSessionAccessory.dispatch(d),a.mount(c),e.view.editor.events.afterMountSessionAccessory.dispatch(d),r=!0}catch(l){l instanceof rs}await this.execute(e)}catch(l){throw o&&i.hasTransaction()&&i.abortTransaction(),o&&(i.cancelUndoMark(),o=!1),l}finally{if(r&&a)try{const l={command:this,accessory:a,source:"command"};e.view.editor.events.beforeUnmountSessionAccessory.dispatch(l),a.unmount(),e.view.editor.events.afterUnmountSessionAccessory.dispatch(l)}catch{}o&&i.hasTransaction()&&(i.commitTransaction(),i.endUndoMark(),o=!1,Q.emit("session-db-edit-committed",{}),di()),e.view.editor.events.commandEnded.dispatch({command:this}),this.onCommandEnded(e)}}shouldRecordUndoStack(e){return this.recordsUndoStack?e.doc.openMode>=U.Review&&this.mode>=U.Review:!1}async execute(e){}showMessage(e,t="info",i){os().showMessage(e,t,i)}notify(e,t="info"){Q.emit("message",{message:e,type:t})}showBusyIndicator(e){os().showBusyIndicator(e)}hideBusyIndicator(){os().hideBusyIndicator()}async withBusyIndicator(e,t){return os().withBusyIndicator(e,t)}}class M0{constructor(e){this._index=0,this._commands=[],e.forEach(t=>{const i=t.groupName;t.commandsByGlobalName.forEach(n=>{this._commands.push({command:n,commandGroup:i})})})}[Symbol.iterator](){return this}get command(){return this._index<this._commands.length?this._commands[this._index].command:null}get commandGroup(){return this._index<this._commands.length?this._commands[this._index].commandGroup:null}next(){for(;this._index<this._commands.length;){const e=this._commands[this._index];return this._index+=1,{value:e,done:!1}}return{value:null,done:!0}}}const Dn=class Dn{constructor(){this._activeCommand=null,this._activeView=null,this._activePromise=null,this._commandsByGroup=[],this._systemCommandGroup={groupName:Dn.SYSTEMT_COMMAND_GROUP_NAME,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._defaultCommandGroup={groupName:Dn.DEFAUT_COMMAND_GROUP_NAME,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._commandsByGroup.push(this._systemCommandGroup),this._commandsByGroup.push(this._defaultCommandGroup)}addCommand(e,t,i,n,o){if(e=e.toUpperCase(),t=t.toUpperCase(),i=i.toUpperCase(),!t)throw new Error("[AcEdCommandStack] The global name of the command is required!");i||(i=t);let r=this._defaultCommandGroup;if(e){const l=this._commandsByGroup.find(c=>c.groupName==e);l?r=l:(r={groupName:e,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._commandsByGroup.push(r))}if(r.commandsByGlobalName.has(t))throw new Error(`[AcEdCommandStack] The command with global name '${t}' already exists!`);if(r.commandsByLocalName.has(i))throw new Error(`[AcEdCommandStack] The command with local name '${i}' already exists!`);const a=this.normalizeAliases(o,t,i);for(const l of a){if(r.commandsByAlias.has(l))throw new Error(`[AcEdCommandStack] The command alias '${l}' already exists!`);if(r.commandsByGlobalName.has(l)||r.commandsByLocalName.has(l))throw new Error(`[AcEdCommandStack] The command alias '${l}' conflicts with existing command name!`)}r.commandsByGlobalName.set(t,n),r.commandsByLocalName.set(i,n),a.forEach(l=>{r.commandsByAlias.set(l,n)}),r.aliasesByCommand.set(n,new Set(a)),n.globalName=t,n.localName=i}iterator(){return new M0(this._commandsByGroup)}searchCommandsByPrefix(e,t){e=e.toUpperCase();const i=[],n=this.iterator();let o=n.next();for(;!o.done;){const{command:r}=o.value;(r.globalName.startsWith(e)||r.localName.startsWith(e)||this.commandAliasStartsWith(o.value.commandGroup,r,e))&&(t===void 0||this.isModeCompatible(t,r.mode))&&i.push(o.value),o=n.next()}return i}lookupGlobalCmd(e,t){e=e.toUpperCase();let i;for(const n of this._commandsByGroup)if(i=n.commandsByGlobalName.get(e),i||(i=n.commandsByAlias.get(e)),i){if(t===void 0||this.isModeCompatible(t,i.mode))break;i=void 0}return i}lookupLocalCmd(e,t){e=e.toUpperCase();let i;for(const n of this._commandsByGroup)if(i=n.commandsByLocalName.get(e),i||(i=n.commandsByAlias.get(e)),i){if(t===void 0||this.isModeCompatible(t,i.mode))break;i=void 0}return i}removeCmd(e,t){e=e.toUpperCase(),t=t.toUpperCase();for(const i of this._commandsByGroup)if(i.groupName==e){const n=i.commandsByGlobalName.get(t);if(!n)return!1;i.commandsByGlobalName.delete(t),i.commandsByLocalName.delete(n.localName);const o=i.aliasesByCommand.get(n);return o==null||o.forEach(r=>{i.commandsByAlias.delete(r)}),i.aliasesByCommand.delete(n),!0}return!1}removeGroup(e){e=e.toUpperCase();const t=this._commandsByGroup.findIndex(i=>i.groupName===e);return t>=0?(this._commandsByGroup.splice(t,1),!0):!1}get activeCommand(){return this._activeCommand}markActive(e,t,i){this._activeCommand=e,this._activeView=t,this._activePromise=i}async runActive(e,t,i){let n;const o=new Promise(r=>{n=r});this.markActive(e,t,o);try{await i()}finally{this.clearActive(e),n()}}clearActive(e){this._activeCommand===e&&(this._activeCommand=null,this._activeView=null,this._activePromise=null)}async cancelActive(){const e=this._activeView,t=this._activePromise;if(this._activeCommand&&(e==null||e.editor.cancelActiveInput(),t))try{await t}catch{}}removeAll(){this._defaultCommandGroup.commandsByGlobalName.clear(),this._defaultCommandGroup.commandsByLocalName.clear(),this._defaultCommandGroup.commandsByAlias.clear(),this._defaultCommandGroup.aliasesByCommand.clear(),this._systemCommandGroup.commandsByGlobalName.clear(),this._systemCommandGroup.commandsByLocalName.clear(),this._systemCommandGroup.commandsByAlias.clear(),this._systemCommandGroup.aliasesByCommand.clear(),this._commandsByGroup=[this._systemCommandGroup,this._defaultCommandGroup]}getCommandAliases(e,t){const i=t==null?void 0:t.trim().toUpperCase(),n=i?this._commandsByGroup.filter(o=>o.groupName===i):this._commandsByGroup;for(const o of n){const r=o.aliasesByCommand.get(e);if(r)return[...r]}return[]}commandAliasStartsWith(e,t,i){const n=this._commandsByGroup.find(r=>r.groupName===e);if(!n)return!1;const o=n.aliasesByCommand.get(t);if(!o)return!1;for(const r of o)if(r.startsWith(i))return!0;return!1}normalizeAliases(e,t,i){const n=Array.isArray(e)?e:e?[e]:[],o=new Set;return n.forEach(r=>{const a=r.trim().toUpperCase();a&&a!==t&&a!==i&&o.add(a)}),[...o]}isModeCompatible(e,t){return e>=t}};Dn.SYSTEMT_COMMAND_GROUP_NAME="ACAD",Dn.DEFAUT_COMMAND_GROUP_NAME="USER";let Me=Dn;const Li="draw-style";class Ep{constructor(){this.providers=new Map}set(e,t){this.providers.set(e,t)}get(e){return this.providers.get(e)}has(e){return this.providers.has(e)}delete(e){return this.providers.delete(e)}}function O0(s){Q.emit("message",{message:s,type:"warning"})}class jo{constructor(e,t,i=1e3,n=0){this.condition=e,this.action=t,this.checkInterval=i,this.timeout=n,this.timerId=null,this.timeoutId=null}start(){if(this.timerId===null){if(this.condition()){this.executeAndStop();return}this.timerId=setInterval(()=>{this.condition()&&this.executeAndStop()},this.checkInterval),this.timeout>0&&(this.timeoutId=setTimeout(()=>{p.log.warn("AcEdConditionWaiter: Timeout reached."),this.executeAndStop()},this.timeout))}}stop(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}executeAndStop(){this.stop(),this.action()}isRunning(){return this.timerId!==null}}const D0={light:{"--ml-ui-text":"#303133","--ml-ui-text-muted":"#606266","--ml-ui-bg":"#ffffff","--ml-ui-border":"#dcdfe6","--ml-ui-shadow":"0 2px 6px rgba(0, 0, 0, 0.12)","--ml-ui-overlay":"rgba(0, 0, 0, 0.18)","--ml-ui-accent":"#409eff","--ml-ui-accent-alt":"#909399","--ml-ui-danger":"#f56c6c","--ml-ui-canvas-line":"#409eff","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, #409eff 20%, transparent)"},dark:{"--ml-ui-text":"#e5eaf3","--ml-ui-text-muted":"#cfd3dc","--ml-ui-bg":"#1d1e1f","--ml-ui-border":"#4c4d4f","--ml-ui-shadow":"0 6px 18px rgba(0, 0, 0, 0.35)","--ml-ui-overlay":"rgba(0, 0, 0, 0.5)","--ml-ui-accent":"#409eff","--ml-ui-accent-alt":"#909399","--ml-ui-danger":"#f56c6c","--ml-ui-canvas-line":"#409eff","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, #409eff 20%, transparent)"}},N0={light:{"--ml-ui-text":"var(--el-text-color-primary, #303133)","--ml-ui-text-muted":"var(--el-text-color-regular, #606266)","--ml-ui-bg":"var(--el-bg-color-overlay, #ffffff)","--ml-ui-border":"var(--el-border-color, #dcdfe6)","--ml-ui-shadow":"var(--el-box-shadow, 0 2px 6px rgba(0, 0, 0, 0.12))","--ml-ui-overlay":"var(--el-overlay-color-lighter, rgba(0, 0, 0, 0.18))","--ml-ui-accent":"var(--el-color-primary, #409eff)","--ml-ui-accent-alt":"var(--el-color-info, #909399)","--ml-ui-danger":"var(--el-color-danger, #f56c6c)","--ml-ui-canvas-line":"var(--el-color-primary, #409eff)","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, var(--el-color-primary, #409eff) 20%, transparent)"},dark:{"--ml-ui-text":"var(--el-text-color-primary, #e5eaf3)","--ml-ui-text-muted":"var(--el-text-color-regular, #cfd3dc)","--ml-ui-bg":"var(--el-bg-color-overlay, #1d1e1f)","--ml-ui-border":"var(--el-border-color, #4c4d4f)","--ml-ui-shadow":"var(--el-box-shadow, 0 6px 18px rgba(0, 0, 0, 0.35))","--ml-ui-overlay":"var(--el-overlay-color-lighter, rgba(0, 0, 0, 0.5))","--ml-ui-accent":"var(--el-color-primary, #409eff)","--ml-ui-accent-alt":"var(--el-color-info, #909399)","--ml-ui-danger":"var(--el-color-danger, #f56c6c)","--ml-ui-canvas-line":"var(--el-color-primary, #409eff)","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, var(--el-color-primary, #409eff) 20%, transparent)"}},Yl=new Set;let Zl=0;function Vo(s){return Yl.add(s),()=>{Yl.delete(s)}}function ot(s,e=document.documentElement,t){const i=t!=null&&t.isolated?D0[s]:N0[s];if(Object.keys(i).forEach(o=>{e.style.setProperty(o,i[o])}),e.setAttribute("data-ml-ui-theme",s),e.style.colorScheme=s,!(!(e===document.documentElement||e.hasAttribute("data-ml-ui-theme-root"))||Zl>0)){Zl++;try{for(const o of[...Yl])try{o(s)}catch{}}finally{Zl--}}}function Lp(s){if(s.classList.contains("ml-theme-dark")||s.classList.contains("dark"))return"dark";if(s.classList.contains("ml-theme-light"))return"light"}function Oe(s){let e=s;for(;e;){const o=e.getAttribute("data-ml-ui-theme");if(o==="light"||o==="dark")return o;const r=Lp(e);if(r)return r;e=e.parentElement}const t=document.documentElement.getAttribute("data-ml-ui-theme");if(t==="light"||t==="dark")return t;const i=document.documentElement.getAttribute("data-mlcad-theme");if(i==="light"||i==="dark")return i;const n=Lp(document.documentElement);return n||"dark"}const Go=600,Xl=`(max-width: ${Go}px)`,rn=440,ql=24,Ho=`calc(100vw - ${ql}px)`,B0=1,Tp=2,Ip=45,Mp=46,Op=47,Dp=48;function as(){var s;return((s=window.matchMedia)==null?void 0:s.call(window,Xl).matches)??!1}const Np=960,Jl=`(max-width: ${Np}px)`;function Bp(){var s;return((s=window.matchMedia)==null?void 0:s.call(window,Jl).matches)??!1}const Fp="(pointer: coarse)",F0=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;function zp(){var e;if(typeof navigator>"u")return!1;const s=navigator;return F0.test(s.userAgent||"")||s.platform==="MacIntel"&&(s.maxTouchPoints??0)>1?!0:((e=window.matchMedia)==null?void 0:e.call(window,Fp).matches)??!1}function ls(){return as()?"phone":Bp()?"pad":"desktop"}function Qt(){return ls()!=="desktop"||zp()}function Rp(s){return as()?!0:s&&Qt()}function cs(s){if(typeof window.matchMedia!="function")return()=>{};const e=window.matchMedia(Xl),t=window.matchMedia(Jl);let i=ls();const n=()=>{const o=ls();o!==i&&(i=o,s(o))};return e.addEventListener("change",n),t.addEventListener("change",n),()=>{e.removeEventListener("change",n),t.removeEventListener("change",n)}}const jp="--ml-ui-grip-size",Vp="--ml-ui-grip-normal",Gp="--ml-ui-grip-hot",Hp=8,z0="#0080ff",R0="#ff0000";function Ql(s,e){s.style.setProperty(jp,`${e.size}px`),s.style.setProperty(Vp,e.colorCss),s.style.setProperty(Gp,e.hotColorCss)}function Up(s){const e=new p.AcCmColor(p.AcCmColorMethod.ByACI,s);return e.cssColor??`rgb(${e.red}, ${e.green}, ${e.blue})`}function ec(s){const e=p.AcDbSysVarManager.instance(),t=e.getVar(p.AcDbSystemVariables.GRIPSIZE,s),i=e.getVar(p.AcDbSystemVariables.GRIPCOLOR,s),n=e.getVar(p.AcDbSystemVariables.GRIPHOT,s);return{size:t>0&&Number.isFinite(t)?t:Hp,colorCss:Up(i),hotColorCss:Up(n)}}const Wp=new Set([p.AcDbSystemVariables.GRIPSIZE.toLowerCase(),p.AcDbSystemVariables.GRIPCOLOR.toLowerCase(),p.AcDbSystemVariables.GRIPHOT.toLowerCase()]);function $p(s){return Wp.has(s.toLowerCase())}const j0={isDebug:!1,isShowCommandLine:!0,isShowCoordinate:!0,isShowEntityInfo:!1,isShowLanguageSelector:!0,isShowRibbon:!0,isShowToolbar:!0,isShowShortCutToolbar:!0,isShowStats:!1,fontMapping:{},osnapModes:p.acdbOsnapModesToMask([p.AcDbOsnapMode.EndPoint,p.AcDbOsnapMode.MidPoint,p.AcDbOsnapMode.Center,p.AcDbOsnapMode.Quadrant,p.AcDbOsnapMode.Intersection,p.AcDbOsnapMode.Nearest]),hideTouchPointTutorial:!1,touchPointTutorialSnoozeDate:null,useSimulatedMouseOnTouch:!0},Kp="settings";function Yp(s){const e={...s};let t=!1;return!("isShowRibbon"in e)&&typeof e.isShowMainMenu=="boolean"&&(e.isShowRibbon=e.isShowMainMenu,t=!0),"isShowMainMenu"in e&&(delete e.isShowMainMenu,t=!0),"isShowFileName"in e&&(delete e.isShowFileName,t=!0),{settings:e,migrated:t}}const Yi=class Yi{constructor(){this.events={modified:new p.AcCmEventManager},this._user={},this._session={},this.reloadFromStorage()}static configure(e){e.storageKey!=null&&e.storageKey!==""&&(this._storageKey=e.storageKey),this._instance&&this._instance.reloadFromStorage()}static get instance(){return this._instance||(this._instance=new Yi),this._instance}static resetInstanceForTesting(){this._instance=void 0,this._storageKey=Kp}reloadFromStorage(){this._user=this.readUserFromStorage(),this._session={}}readUserFromStorage(){const e=localStorage.getItem(Yi._storageKey);if(e==null)return{};let t;try{t=JSON.parse(e)}catch{return{}}const{settings:i,migrated:n}=Yp(t);return n&&localStorage.setItem(Yi._storageKey,JSON.stringify(i)),i}persistUser(){localStorage.setItem(Yi._storageKey,JSON.stringify(this._user))}computeEffective(){return{...j0,...this._user,...this._session}}set(e,t,i){const n=(i==null?void 0:i.persist)!==!1;this._session[e]=t,n&&(this._user[e]=t,this.persistUser()),this.events.modified.dispatch({key:e,value:t})}apply(e,t){for(const i of Object.keys(e)){const n=e[i];n!==void 0&&this.set(i,n,t)}}clearSessionOverride(e){Object.prototype.hasOwnProperty.call(this._session,e)&&(delete this._session[e],this.events.modified.dispatch({key:e,value:this.get(e)}))}get(e){return this.settings[e]}toggle(e){const t=this.get(e);this.set(e,!t)}get isDebug(){return this.get("isDebug")}set isDebug(e){this.set("isDebug",e)}get isShowCommandLine(){return this.get("isShowCommandLine")}set isShowCommandLine(e){this.set("isShowCommandLine",e)}get isShowCoordinate(){return this.get("isShowCoordinate")}set isShowCoordinate(e){this.set("isShowCoordinate",e)}get isShowEntityInfo(){return this.get("isShowEntityInfo")}set isShowEntityInfo(e){this.set("isShowEntityInfo",e)}get isShowLanguageSelector(){return this.get("isShowLanguageSelector")}set isShowLanguageSelector(e){this.set("isShowLanguageSelector",e)}get isShowRibbon(){return this.get("isShowRibbon")}set isShowRibbon(e){this.set("isShowRibbon",e)}get isShowToolbar(){return this.get("isShowToolbar")}set isShowToolbar(e){this.set("isShowToolbar",e)}get isShowShortCutToolbar(){return this.get("isShowShortCutToolbar")}set isShowShortCutToolbar(e){this.set("isShowShortCutToolbar",e)}get isShowStats(){return this.get("isShowStats")}set isShowStats(e){this.set("isShowStats",e)}get fontMapping(){return this.get("fontMapping")}set fontMapping(e){this.set("fontMapping",e)}setFontMapping(e,t){const i={...this.get("fontMapping")};i[e]=t,this.set("fontMapping",i)}get osnapModes(){return this.get("osnapModes")}set osnapModes(e){this.set("osnapModes",e)}get settings(){return this.computeEffective()}};Yi._storageKey=Kp;let le=Yi;const V0=1e-10,ds=32;function Uo(s,e,t,i){return Math.hypot(s-t,e-i)}function G0(s,e,t,i,n,o){const r=n-t,a=o-i,l=r*r+a*a;if(l<1e-18)return Uo(s,e,t,i);let c=((s-t)*r+(e-i)*a)/l;return c=Math.max(0,Math.min(1,c)),Uo(s,e,t+c*r,i+c*a)}function H0(s,e,t){if(Math.abs(t)>V0)try{const i=new p.AcGeCircArc2d(s,e,t);return!(i.radius>0)||!Number.isFinite(i.radius)?void 0:i}catch{return}}function an(s){return{x:s.x,y:s.y,z:s.z??0}}function U0(s,e){const t=new p.AcGePoint3d(s.x,s.y,s.z).applyMatrix4(e);return an(t)}function W0(s){return typeof s!="string"?s:s.replace(/#\d+$/,"")}function $0(s){if(typeof s!="string")return 0;const e=/#(\d+)$/.exec(s);return e?Number(e[1]):0}function K0(s){var i;if(s instanceof p.AcDb2dPolyline){const n=s.numberOfVertices;return Array.from({length:n},(o,r)=>{const a=s.getPointAt(r);return{x:a.x,y:a.y,bulge:s.getBulgeAt(r)}})}const e=(i=s._geo)==null?void 0:i.vertices;if(e&&e.length>0)return e.map(n=>({x:n.x,y:n.y,bulge:n.bulge??0}));const t=s.numberOfVertices;return Array.from({length:t},(n,o)=>{const r=s.getPoint2dAt(o);return{x:r.x,y:r.y,bulge:0}})}function Y0(s,e){const t=K0(s);if(t.length<2)return;const i=s.closed?t.length:t.length-1;let n=Number.POSITIVE_INFINITY,o;for(let r=0;r<i;r++){const a=t[r],l=t[(r+1)%t.length],c=H0(a,l,a.bulge);let d;if(c){const h=c.nearestPoint(e);d=Uo(e.x,e.y,h.x,h.y)}else d=G0(e.x,e.y,a.x,a.y,l.x,l.y);d<n&&(n=d,o=c)}if(o)return an({x:o.center.x,y:o.center.y,z:s.elevation})}function tc(s,e,t){const i=[];return s.subGetOsnapPoints(p.AcDbOsnapMode.Center,e,e,i,t),i.map(n=>an(n))}function Z0(s){return new p.AcGeMatrix3d().setFromExtrusionDirection(s.normal).multiply(s.blockTransform)}function ic(s,e,t=new p.AcGeMatrix3d,i){const n=$0(e);return Zp(s,W0(e),n,t,i,n===0&&i!=null).found}function X0(s,e,t=1e-4){return e.x>=s.min.x-t&&e.x<=s.max.x+t&&e.y>=s.min.y-t&&e.y<=s.max.y+t}function Zp(s,e,t,i,n,o){const r=s.blockTableRecord;if(!r)return{found:void 0,remaining:t};const a=new p.AcGeMatrix3d().multiplyMatrices(i,Z0(s));let l;o&&n!=null&&t===0&&(l=new p.AcGePoint3d(n).applyMatrix4(a.clone().invert()));for(const c of r.newIterator()){if(c.objectId===e){if(t>0){t-=1;continue}return{found:{entity:c,transform:a},remaining:0}}if(c instanceof p.AcDbBlockReference){if(o&&t===0&&l){const h=c.geometricExtents;if(!h.isEmpty()&&!X0(h,l))continue}const d=Zp(c,e,t,a,n,o);if(d.found)return d;t=d.remaining}}return{found:void 0,remaining:t}}function q0(s,e,t){if(!t)return tc(s,e);const i=ic(s,t,new p.AcGeMatrix3d,e);if(!i)return tc(s,e,t);const n=i.transform.clone().invert(),o=new p.AcGePoint3d(e).applyMatrix4(n);return nc(i.entity,o).map(r=>U0(r,i.transform))}function nc(s,e,t){if(s instanceof p.AcDbBlockReference)return q0(s,e,t);if(s instanceof p.AcDbCircle)return[an(s.center)];if(s instanceof p.AcDbArc)return[an(s.center)];if(s instanceof p.AcDbEllipse)return[an(s.center)];if(s instanceof p.AcDbPolyline||s instanceof p.AcDb2dPolyline){const i=Y0(s,e);return i?[i]:[]}return tc(s,e,t)}function J0(s,e){if(e.length===0)return s.length<=ds?s:s.slice(-ds);const t=[...s];let i=s.length>ds;for(const n of e){const o=t.findIndex(r=>Xp(r,n));if(o>=0){if(o!==t.length-1){const[r]=t.splice(o,1);t.push(r),i=!0}}else t.push(n),i=!0}return t.length>ds?t.slice(t.length-ds):i?t:s}function Xp(s,e,t=1e-8){return Uo(s.x,s.y,e.x,e.y)<=t}const Q0=20,sc=16,eS=48,tS=8,iS=32;function nS(s,e){return s.min.x<=e.max.x&&s.max.x>=e.min.x&&s.min.y<=e.max.y&&s.max.y>=e.min.y}function qp(s){return new p.AcGeBox3d({x:s.minX,y:s.minY,z:-1/0},{x:s.maxX,y:s.maxY,z:1/0})}function Jp(s){return s.equals(p.AcGeMatrix3d.IDENTITY)}function Qp(s,e){if(Jp(e))return s;if(s instanceof p.AcDbLine)return new p.AcDbLine(new p.AcGePoint3d(s.startPoint).applyMatrix4(e),new p.AcGePoint3d(s.endPoint).applyMatrix4(e));if(s instanceof p.AcDbCircle){const t=e.getMaxScaleOnAxis();return!(t>0)||!Number.isFinite(t)?void 0:new p.AcDbCircle(new p.AcGePoint3d(s.center).applyMatrix4(e),s.radius*t,s.normal)}if(s instanceof p.AcDbArc){const t=e.getMaxScaleOnAxis();return!(t>0)||!Number.isFinite(t)?void 0:new p.AcDbArc(new p.AcGePoint3d(s.center).applyMatrix4(e),s.radius*t,s.startAngle,s.endAngle,s.normal)}}function sS(s){const e=s.subGetIntersectCurves().length;return e>0&&e<=iS}function oc(s,e){return Jp(e)?s:s.map(t=>new p.AcGePoint3d(t.x,t.y,t.z).applyMatrix4(e))}function oS(s,e){if(s.transform.equals(e.transform))return oc(s.entity.intersectWith(e.entity),s.transform);const t=new p.AcGeMatrix3d().multiplyMatrices(s.transform.clone().invert(),e.transform),i=Qp(e.entity,t);if(i)return oc(s.entity.intersectWith(i),s.transform);const n=new p.AcGeMatrix3d().multiplyMatrices(e.transform.clone().invert(),s.transform),o=Qp(s.entity,n);return o?oc(e.entity.intersectWith(o),e.transform):[]}class De{constructor(e){this._acquiredCenters=[],this._view=e}get acquiredCenterMarks(){return this._acquiredCenters}clearAcquiredCenters(){this._acquiredCenters=[]}static displayCenterMarks(e,t){return!t||t.type!==p.AcDbOsnapMode.Center?e:e.filter(i=>!Xp(i,t))}resolve(e){const t=e.hitRadiusPx??Q0,i=e.lastPoint??e.cursorWcs,n=this._view.screenToWorld({x:0,y:0}),o=this._view.screenToWorld({x:t,y:0}),r=Math.abs(o.x-n.x),a=this.collectOsnapPoints(e.cursorWcs,i,t,r);for(const h of this._acquiredCenters)a.push({x:h.x,y:h.y,z:h.z,type:p.AcDbOsnapMode.Center});if(a.length===0)return;let l=Number.MAX_VALUE,c=Number.MAX_VALUE,d=-1;for(let h=0;h<a.length;h++){const f=a[h],y=e.cursorWcs.x-f.x,g=e.cursorWcs.y-f.y,b=Math.hypot(y,g);if(b>=r)continue;const w=De.osnapModePriority(f.type);(w<l||w===l&&b<c)&&(l=w,c=b,d=h)}return d!==-1?a[d]:void 0}static osnapModeToMarkerType(e){switch(e){case p.AcDbOsnapMode.EndPoint:return"rect";case p.AcDbOsnapMode.MidPoint:return"triangle";case p.AcDbOsnapMode.Center:return"circle";case p.AcDbOsnapMode.Quadrant:return"diamond";case p.AcDbOsnapMode.Nearest:return"x";case p.AcDbOsnapMode.Intersection:return"intersection";default:return"rect"}}static osnapModePriority(e){switch(e){case p.AcDbOsnapMode.EndPoint:case p.AcDbOsnapMode.MidPoint:case p.AcDbOsnapMode.Center:case p.AcDbOsnapMode.Intersection:return 0;case p.AcDbOsnapMode.Quadrant:return 1;case p.AcDbOsnapMode.Nearest:return 2;default:return 1}}collectOsnapPointsByMode(e,t,i,n,o,r){const a=i.length;e.subGetOsnapPoints(t,n,o,i,r);for(let l=a;l<i.length;l++)i[l].type=t}collectOsnapPointsInAvailableModes(e,t,i,n,o){p.acdbMaskToOsnapModes(le.instance.osnapModes).forEach(a=>{a!==p.AcDbOsnapMode.Intersection&&this.collectOsnapPointsByMode(e,a,t,i,n,o)})}collectOsnapPointsFromResolvedSubEntity(e,t,i,n){const o=e.transform.clone().invert(),r=new p.AcGePoint3d(i).applyMatrix4(o),a=new p.AcGePoint3d(n).applyMatrix4(o),l=p.acdbMaskToOsnapModes(le.instance.osnapModes),c=e.entity instanceof p.AcDbBlockReference;for(const d of l){if(d===p.AcDbOsnapMode.Intersection)continue;const h=[];if(c){e.entity.subGetOsnapPoints(d,r,a,h,e.entity.objectId,e.transform);for(const f of h)t.push({x:f.x,y:f.y,z:f.z??0,type:d})}else{e.entity.subGetOsnapPoints(d,r,a,h);for(const f of h){const y=new p.AcGePoint3d(f).applyMatrix4(e.transform);t.push({x:y.x,y:y.y,z:y.z,type:d})}}}}static childBoxHint(e){if(!(e.minX==null||e.minY==null||e.maxX==null||e.maxY==null))return{x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2,z:0}}collectIntersectionOsnapPoints(e,t,i,n,o){const r=[],a=new Set,l=f=>{r.length>=sc||a.has(f.key)||f.box.isEmpty()||sS(f.entity)&&(a.add(f.key),r.push(f))};for(const f of e){if(r.length>=sc)break;if(!ts(f))continue;const y=De.getEntityById(t,f.id);if(!y)continue;const g=f.viewportId;if(!(g!=null&&!this._view.getViewportCoordinateMapper(g))){if(f.children&&f.children.length>0){for(const b of f.children){if(r.length>=sc)break;const w=`${f.id}:${b.id}`;if(y instanceof p.AcDbBlockReference){const S=ic(y,b.id,new p.AcGeMatrix3d,De.childBoxHint(b));if(!S)continue;l({key:w,box:qp(b),entity:S.entity,transform:S.transform,viewportId:g})}else l({key:w,box:qp(b),entity:y,transform:new p.AcGeMatrix3d,viewportId:g})}continue}y instanceof p.AcDbBlockReference||l({key:f.id,box:y.geometricExtents,entity:y,transform:new p.AcGeMatrix3d,viewportId:g})}}if(r.length<2)return;const c=o*o,d=performance.now();let h=0;for(let f=0;f<r.length;f++)for(let y=f+1;y<r.length;y++){if(h>=eS||performance.now()-d>tS)return;if(r[f].viewportId!==r[y].viewportId||!nS(r[f].box,r[y].box))continue;h++;const g=r[f].viewportId,b=g!=null?this._view.getViewportCoordinateMapper(g):void 0;if(g!=null&&!b)continue;const w=oS(r[f],r[y]);for(const S of w){const x=b?b.modelToPaper(S):S;if(b&&!b.containsPaperPoint(x))continue;const _=x.x-n.x,C=x.y-n.y;_*_+C*C>c||i.push({x:x.x,y:x.y,z:S.z,type:p.AcDbOsnapMode.Intersection})}}}static getEntityById(e,t){const i=e.getObjectById(t);return i instanceof p.AcDbEntity?i:void 0}collectOsnapPoints(e,t,i,n){const o=this._view.pick(e,i),r=p.acdbHostApplicationServices().workingDatabase,a=[],l=p.AcGeGeometryUtil.point2dToPoint3d(e),c=p.AcGeGeometryUtil.point2dToPoint3d(t);return o.forEach(d=>{const h=De.getEntityById(r,d.id);if(!h)return;const f=d.viewportId!=null?this._view.getViewportCoordinateMapper(d.viewportId):void 0;if(d.viewportId!=null&&!f)return;const y=f?p.AcGeGeometryUtil.point2dToPoint3d(f.paperToModel(e)):l,g=f?p.AcGeGeometryUtil.point2dToPoint3d(f.paperToModel(t)):c,b=[];if(d.children&&d.children.length>0?d.children.forEach(w=>{if(h instanceof p.AcDbBlockReference){const S=ic(h,w.id,new p.AcGeMatrix3d,De.childBoxHint(w));if(S){this.collectOsnapPointsFromResolvedSubEntity(S,b,y,g);return}}this.collectOsnapPointsInAvailableModes(h,b,y,g,w.id)}):this.collectOsnapPointsInAvailableModes(h,b,y,g),!f){a.push(...b);return}for(const w of b){const S=f.modelToPaper(w);f.containsPaperPoint(S)&&a.push({x:S.x,y:S.y,z:w.z,type:w.type})}}),p.acdbHasOsnapMode(le.instance.osnapModes,p.AcDbOsnapMode.Intersection)&&this.collectIntersectionOsnapPoints(o,r,a,e,n),this.updateAcquiredCenters(o,r,l),a}updateAcquiredCenters(e,t,i){if(!p.acdbHasOsnapMode(le.instance.osnapModes,p.AcDbOsnapMode.Center)){this._acquiredCenters=[];return}const n=[];e.forEach(o=>{const r=De.getEntityById(t,o.id);if(!r)return;const a=o.viewportId!=null?this._view.getViewportCoordinateMapper(o.viewportId):void 0;if(o.viewportId!=null&&!a)return;const l=a?p.AcGeGeometryUtil.point2dToPoint3d(a.paperToModel(i)):i,c=[];if(o.children&&o.children.length>0?o.children.forEach(d=>{c.push(...nc(r,l,d.id))}):c.push(...nc(r,l)),!a){n.push(...c);return}for(const d of c){const h=a.modelToPaper(d);a.containsPaperPoint(h)&&n.push({...d,x:h.x,y:h.y})}}),this._acquiredCenters=J0(this._acquiredCenters,n)}}class us{constructor(e="rect",t=12,i="var(--ml-ui-canvas-line, green)",n){this._type=e,this._size=t,this._color=i,this._host=n,us.injectCSS(),getComputedStyle(this._host).position==="static"&&(this._host.style.position="relative"),this._el=document.createElement("div"),this._el.classList.add("ml-marker"),this._el.style.color=i,this.applyShape(),this._host.appendChild(this._el)}get color(){return this._color}set color(e){this._color=e,this._el.style.color=e}get type(){return this._type}set type(e){this._type=e,this.applyShape()}static injectCSS(){if(document.getElementById("ml-marker-style"))return;const e=document.createElement("style");e.id="ml-marker-style",e.textContent=`
126
+ `)}return e}charCount(){return this.getChars().length}getActiveCursorRenderState(e,t){var a;const i=this.cursorLogic.getCharBoxes(),n=this.cursorLogic.getCurrentIndex(),o=this.cursorLogic.getCurrentLineInfo();if(i.length===0){const l=(a=this.latestCursorLayoutData.lineLayouts)==null?void 0:a[0];if(l&&Number.isFinite(l.y)&&Number.isFinite(l.height)){const d=Math.max(1,l.height);return{position:{x:e.x,y:l.y},height:d}}const c=Math.max(1,this.getFallbackLineAdvance());return{position:{x:e.x,y:this.layoutContainer.y+c/2},height:c}}if(n<=0||n===o.startIndex){if(!(o.charCount<=0||o.endIndex<o.startIndex)){const d=Math.max(0,Math.min(o.startIndex,i.length-1)),h=i[d];if(h)return{position:{x:e.x,y:h.y},height:Math.max(1,h.height)}}const c=o.height??t;return{position:{x:e.x,y:o.y??e.y},height:Math.max(1,c)}}const r=i[Math.min(n-1,i.length-1)];return r?{position:{x:r.x+r.width,y:r.y},height:Math.max(1,r.height)}:{position:e,height:Math.max(1,t)}}getNodeLogicalSpan(e){switch(e.type){case"char":return 1;case"stack":return 1;case"paragraphBreak":case"columnBreak":case"wrapAtDimLine":return 0;default:return 0}}toLogicalIndexFromDocumentIndex(e){const t=Math.max(0,Math.min(e,this.document.ast.nodes.length));let i=0;for(let n=0;n<t;n+=1){const o=this.document.ast.nodes[n];o&&(i+=this.getNodeLogicalSpan(o))}return i}toDocumentIndexFromLogicalIndex(e,t=!0,i){var d,h;const n=this.document.ast.nodes;if(n.length===0)return 0;const o=this.charCount(),r=Math.max(0,Math.min(e,o)),a=[];let l=0,c=0;for(let f=0;f<=n.length&&(l===r&&a.push({index:f,lineIndex:c}),f!==n.length);f+=1){const y=n[f];if(!y)continue;const g=this.getNodeLogicalSpan(y);g===0?c+=1:l+=g}if(a.length===0)return n.length;if(i!==void 0&&Number.isFinite(i)){const f=this,g=(typeof f.resolveCandidateByVisualLineHint=="function"?f.resolveCandidateByVisualLineHint:J.prototype.resolveCandidateByVisualLineHint).call(this,a,r,i);if(g!==void 0)return g;const b=((d=a[0])==null?void 0:d.lineIndex)??0,w=((h=a[a.length-1])==null?void 0:h.lineIndex)??0;if(i<b||i>w)return t?a[a.length-1].index:a[0].index;let S=a[0],x=Math.abs(S.lineIndex-i);for(let _=1;_<a.length;_+=1){const C=a[_],T=Math.abs(C.lineIndex-i);T<x&&(S=C,x=T)}return S.index}return t?a[a.length-1].index:a[0].index}resolveCandidateByVisualLineHint(e,t,i){if(e.length<=1||this.cursorLogic==null||typeof this.cursorLogic.getLines!="function")return;const n=this.cursorLogic.getLines();if(!Array.isArray(n)||n.length===0)return;const o=[];for(let l=0;l<n.length;l+=1){const c=n[l];c&&t>=c.startIndex&&t<=c.endIndex+1&&o.push(l)}if(o.length!==e.length)return;const r=o.indexOf(i);if(r<0)return;const a=e[r];return a==null?void 0:a.index}syncUiStateFromDocument(){this.mtextString=this.document.toMText();const e=this.charCount();this.cursorIndex=Math.min(this.toLogicalIndexFromDocumentIndex(this.document.cursor),e);const t=this.document.selection;t?(this.selectionStart=this.toLogicalIndexFromDocumentIndex(t.start),this.selectionEnd=this.toLogicalIndexFromDocumentIndex(t.end)):(this.selectionStart=this.cursorIndex,this.selectionEnd=this.cursorIndex),this.refreshCurrentFormatFromDocument()}syncDocumentFromUiState(){const e=this.getSelectionRange();if(!e.isCollapsed){const o=this.toDocumentIndexFromLogicalIndex(e.start,!0),r=this.toDocumentIndexFromLogicalIndex(e.end,!1);this.document.setSelection(o,r);return}this.document.clearSelection();const t=this.cursorLogic.getCursorState(),i=t.lineIndex,n=!(t.isAtLineEnd&&!t.isAtLineStart);this.document.cursor=this.toDocumentIndexFromLogicalIndex(this.cursorIndex,n,i>=0?i:void 0)}refreshCurrentFormatFromDocument(){var t,i;const e=this.inferCurrentFormatFromDocument();if(this.updateToolbarStackState(),!e){(t=this.getActiveToolbar())==null||t.setFormat(this.currentFormat);return}Xh(this.currentFormat,e)||(this.currentFormat=e),(i=this.getActiveToolbar())==null||i.setFormat(this.currentFormat)}toggleStackSelection(){const e=this.getSelectionRange();e.isCollapsed||this.commitHistoryEdit(()=>{var c;this.syncDocumentFromUiState();const t=this.toDocumentIndexFromLogicalIndex(e.start,!0),i=this.toDocumentIndexFromLogicalIndex(e.end,!1);if(i<=t)return;const n=this.document.ast.nodes.slice(t,i);if(n.length===1&&((c=n[0])==null?void 0:c.type)==="stack"){const d=n[0],h=this.stackNodeToPlainText(d.numerator,d.denominator,d.divider),f=Array.from(h).map(y=>({type:"char",value:y,style:this.cloneDocumentStyle(d.style)}));if(f.length===0)return;this.document.transaction(y=>{y.ast.nodes.splice(t,1,...f),y.setSelection(t,t+f.length)}),this.syncUiStateFromDocument(),this.relayout();return}if(!n.every(d=>(d==null?void 0:d.type)==="char"))return;const o=n.map(d=>d.value).join(""),r=this.parseStackParts(o);if(!r)return;const a=n[0];if(!a)return;const l={type:"stack",numerator:r.numerator,denominator:r.denominator,divider:r.divider,style:this.cloneDocumentStyle(a.style)};this.document.transaction(d=>{d.ast.nodes.splice(t,i-t,l),d.setSelection(t,t+1)}),this.syncUiStateFromDocument(),this.relayout()})}toggleScriptSelection(e){const t=this.getSelectionRange();if(t.isCollapsed)return!1;let i=!1;return this.commitHistoryEdit(()=>{var h;this.syncDocumentFromUiState();const n=this.toDocumentIndexFromLogicalIndex(t.start,!0),o=this.toDocumentIndexFromLogicalIndex(t.end,!1);if(o<=n)return;const r=this.document.ast.nodes.slice(n,o);if(r.length===1&&((h=r[0])==null?void 0:h.type)==="stack"){const f=r[0],y=this.scriptStackToPlainText(f.numerator,f.denominator,f.divider);if(!y)return;const g=this.cloneDocumentStyle(f.style);g.script="normal",g.align=q.MTextLineAlignment.MIDDLE;const b=Array.from(y).map(w=>({type:"char",value:w,style:this.cloneDocumentStyle(g)}));if(b.length===0)return;this.document.transaction(w=>{w.ast.nodes.splice(n,1,...b),w.setSelection(n,n+b.length)}),this.syncUiStateFromDocument(),this.relayout(),i=!0;return}if(!r.every(f=>(f==null?void 0:f.type)==="char"))return;const a=r.map(f=>f.value).join("");if(a.length===0)return;const l=r[0];if(!l)return;const c=this.cloneDocumentStyle(l.style);c.script=e,c.align=e==="superscript"?q.MTextLineAlignment.TOP:q.MTextLineAlignment.BOTTOM;const d={type:"stack",numerator:e==="superscript"?a:"",denominator:e==="subscript"?a:"",divider:"^",style:this.cloneDocumentStyle(c)};this.document.transaction(f=>{f.ast.nodes.splice(n,o-n,d),f.setSelection(n,n+1)}),this.syncUiStateFromDocument(),this.relayout(),i=!0}),i}commitHistoryEdit(e){const t=this.createHistorySnapshot();e(),!this.isSameAsCurrent(t)&&(this.undoStack.push(t),this.undoStack.length>this.maxHistorySize&&this.undoStack.splice(0,this.undoStack.length-this.maxHistorySize),this.redoStack=[],this.emit("change"),this.emit("selectionChange"),this.emit("cursorMove"))}createHistorySnapshot(){return{ast:this.cloneAst(this.document.ast),cursor:this.document.cursor,selection:this.document.selection?{...this.document.selection}:null,currentFormat:{...this.currentFormat}}}restoreHistorySnapshot(e){this.document=new Re(this.cloneAst(e.ast)),e.selection?this.document.setSelection(e.selection.start,e.selection.end):(this.document.cursor=e.cursor,this.document.clearSelection()),this.uiAdapter=new To(this.document),this.currentFormat={...e.currentFormat},this.syncUiStateFromDocument(),this.relayout(),this.emit("change"),this.emit("selectionChange"),this.emit("cursorMove")}isSameAsCurrent(e){if(e.cursor!==this.document.cursor)return!1;const t=this.document.selection;return!!e.selection!=!!t||e.selection&&t&&(e.selection.start!==t.start||e.selection.end!==t.end)||!Xh(e.currentFormat,this.currentFormat)?!1:this.document.toMText()===this.buildMTextFromAst(e.ast)}buildMTextFromAst(e){return new Re(this.cloneAst(e)).toMText()}clearHistory(){this.undoStack=[],this.redoStack=[]}cloneAst(e){return{nodes:e.nodes.map(t=>t.type==="char"?{...t,style:this.cloneDocumentStyle(t.style)}:t.type==="stack"?{...t,style:this.cloneDocumentStyle(t.style)}:{...t,style:this.cloneDocumentStyle(t.style)})}}stackNodeToPlainText(e,t,i){if(i==="^"){if(e.length===0&&t.length>0)return`^${t.trimStart()}`;if(e.length>0&&t.length===0)return`${e.trimEnd()}^`}return`${e}${i}${t}`}scriptStackToPlainText(e,t,i){if(i!=="^")return null;const n=e.trim().length>0,o=t.trim().length>0;return n===o?null:n?e.trim():t.trim()}parseStackParts(e){const t=[];for(let l=0;l<e.length;l+=1){const c=e[l];(c==="/"||c==="#"||c==="^")&&t.push({index:l,divider:c})}if(t.length!==1)return null;const i=t[0];if(!i)return null;const{index:n,divider:o}=i,r=e.slice(0,n),a=e.slice(n+1);if(o==="^"){const l=r.trim().length>0,c=a.trim().length>0;return!l&&!c?null:{numerator:r,denominator:a,divider:o}}return r.trim().length===0||a.trim().length===0?null:{numerator:r,denominator:a,divider:o}}updateToolbarStackState(){var a;const e=this.getActiveToolbar();if(!e)return;const t=this.getSelectionRange();if(t.isCollapsed){e.setStackActive(!1);return}const i=this.toDocumentIndexFromLogicalIndex(t.start,!0),n=this.toDocumentIndexFromLogicalIndex(t.end,!1),o=this.document.ast.nodes.slice(i,n),r=o.length===1&&((a=o[0])==null?void 0:a.type)==="stack"&&!this.isScriptOnlyStack(o[0]);e.setStackActive(r)}isScriptOnlyStack(e){if(e.divider!=="^")return!1;const t=e.numerator.trim().length>0,i=e.denominator.trim().length>0;return t!==i}inferCurrentFormatFromDocument(){if(this.document.ast.nodes.length===0||this.getChars().length===0)return null;const n=this.selectionStart!==this.selectionEnd?Math.min(this.selectionStart,this.selectionEnd):this.cursorIndex>0?this.cursorIndex-1:0,o=this.getNodeByLogicalCharIndex(n);if(!o)return null;if(o.type==="stack"&&this.isScriptOnlyStack(o)){const r=o.numerator.trim().length>0?"superscript":"subscript";return{...this.toCharFormat(o.style),script:r}}return this.toCharFormat(o.style)}getNodeByLogicalCharIndex(e){const t=this.document.ast.nodes;if(t.length===0)return null;let i=0;const n=Math.max(0,e);for(const o of t){const r=this.getNodeLogicalSpan(o);if(n<i+r)return o;i+=r}return t[t.length-1]??null}getNodesByLogicalRange(e,t){const i=this.document.ast.nodes;if(i.length===0)return[];const n=Math.max(0,Math.min(e,t)),o=Math.max(n,Math.max(e,t));if(n===o)return[];const r=[];let a=0;for(const l of i){const c=this.getNodeLogicalSpan(l),d=a,h=a+c;c>0&&d<o&&h>n&&r.push(l),a=h}return r}toCharFormat(e){var w,S;const t=Math.max(1,this.defaultTextStyle.fixedTextHeight),i=e.capHeight.isRelative?t*Math.max(0,e.capHeight.value):e.capHeight.value,n=this.defaultTextStyle.font||this.baseFormat.fontFamily,o=e.rgb?this.rgbArrayToColorNumber(e.rgb):this.isExplicitAci(e.aci)?this.resolveAciColor(e.aci):this.resolveBaseColor(),r=this.isExplicitAci(e.aci)?e.aci:this.isExplicitAci(this.baseFormat.aci)?this.baseFormat.aci:null,a=this.toScriptFromStyle(e,t,i),l=Math.max(1,t)*.9,c=i<=l,d=a==="normal"?i:c?i/.7:i,h=(w=e.widthFactor)==null?void 0:w.value,f=typeof h=="number"&&Number.isFinite(h)?Math.max(.01,h):1,y=(S=e.charTrackingFactor)==null?void 0:S.value,g=typeof y=="number"&&Number.isFinite(y)?Math.max(.01,y):1,b=typeof e.oblique=="number"&&Number.isFinite(e.oblique)?e.oblique:0;return{fontFamily:e.fontFace.family||n,fontSize:Math.max(1,d||t),bold:e.fontFace.weight>=700,italic:e.fontFace.style==="Italic",underline:e.underline,overline:e.overline,strike:e.strikeThrough,script:a,aci:r,rgb:o,obliqueAngle:b,widthFactor:f,tracking:g,paragraphAlignment:e.paragraph.align}}toScriptFromStyle(e,t,i){const n=Math.max(1,t)*.9,o=i<=n;return e.script&&e.script!=="normal"?o?e.script:"normal":o&&e.align===q.MTextLineAlignment.TOP?"superscript":o&&e.align===q.MTextLineAlignment.BOTTOM?"subscript":"normal"}createDefaultParseContext(){const e=new q.MTextContext;if(e.fontFace.family=this.defaultTextStyle.font||this.baseFormat.fontFamily,e.fontFace.style=this.baseFormat.italic?"Italic":"Regular",e.fontFace.weight=this.baseFormat.bold?700:400,e.capHeight={value:this.defaultTextStyle.fixedTextHeight,isRelative:!1},e.align=q.MTextLineAlignment.BOTTOM,e.widthFactor={value:this.defaultTextStyle.widthFactor??1,isRelative:!1},this.isExplicitAci(this.baseFormat.aci))e.aci=this.baseFormat.aci,e.rgb=null;else{const t=this.resolveBaseColor();e.rgb=this.colorNumberToRgbArray(t),e.aci=256}return e}createNormalizedDocument(e){const t=Re.fromMText(e,this.createDefaultParseContext()),i={nodes:[]};for(const n of t.ast.nodes)switch(n.type){case"char":i.nodes.push({type:"char",value:n.value,style:this.cloneDocumentStyle(n.style)});break;case"stack":i.nodes.push({type:"stack",numerator:n.numerator,denominator:n.denominator,divider:n.divider,style:this.cloneDocumentStyle(n.style)});break;case"paragraphBreak":i.nodes.push({type:"paragraphBreak",style:this.cloneDocumentStyle(n.style)});break;case"columnBreak":case"wrapAtDimLine":i.nodes.push({type:"paragraphBreak",style:this.cloneDocumentStyle(n.style)});break}return new Re(i)}computeAttachmentAnchorOnBounds(e,t,i,n,o){const r=(e+t)*.5,a=(i+n)*.5,l=this.position.z;switch(o){case $.MTextAttachmentPoint.TopLeft:return new V.Vector3(e,n,l);case $.MTextAttachmentPoint.TopCenter:return new V.Vector3(r,n,l);case $.MTextAttachmentPoint.TopRight:return new V.Vector3(t,n,l);case $.MTextAttachmentPoint.MiddleLeft:return new V.Vector3(e,a,l);case $.MTextAttachmentPoint.MiddleCenter:return new V.Vector3(r,a,l);case $.MTextAttachmentPoint.MiddleRight:return new V.Vector3(t,a,l);case $.MTextAttachmentPoint.BottomLeft:case $.MTextAttachmentPoint.BaselineLeft:return new V.Vector3(e,i,l);case $.MTextAttachmentPoint.BottomCenter:case $.MTextAttachmentPoint.BaselineCenter:return new V.Vector3(r,i,l);case $.MTextAttachmentPoint.BottomRight:case $.MTextAttachmentPoint.BaselineRight:return new V.Vector3(t,i,l);default:return new V.Vector3(e,n,l)}}mapRibbonParagraphAlignment(e){switch(e){case"default":return q.MTextParagraphAlignment.DEFAULT;case"left":return q.MTextParagraphAlignment.LEFT;case"center":return q.MTextParagraphAlignment.CENTER;case"right":return q.MTextParagraphAlignment.RIGHT;case"justified":return q.MTextParagraphAlignment.JUSTIFIED;case"distributed":return q.MTextParagraphAlignment.DISTRIBUTED;default:return}}mapRibbonAttachmentCode(e){switch(e.trim().toUpperCase()){case"TL":return $.MTextAttachmentPoint.TopLeft;case"TC":return $.MTextAttachmentPoint.TopCenter;case"TR":return $.MTextAttachmentPoint.TopRight;case"ML":return $.MTextAttachmentPoint.MiddleLeft;case"MC":return $.MTextAttachmentPoint.MiddleCenter;case"MR":return $.MTextAttachmentPoint.MiddleRight;case"BL":return $.MTextAttachmentPoint.BottomLeft;case"BC":return $.MTextAttachmentPoint.BottomCenter;case"BR":return $.MTextAttachmentPoint.BottomRight;default:return}}attachmentPointToRibbonCode(e){switch(e){case $.MTextAttachmentPoint.TopLeft:return"TL";case $.MTextAttachmentPoint.TopCenter:return"TC";case $.MTextAttachmentPoint.TopRight:return"TR";case $.MTextAttachmentPoint.MiddleLeft:return"ML";case $.MTextAttachmentPoint.MiddleCenter:return"MC";case $.MTextAttachmentPoint.MiddleRight:return"MR";case $.MTextAttachmentPoint.BottomLeft:case $.MTextAttachmentPoint.BaselineLeft:return"BL";case $.MTextAttachmentPoint.BottomCenter:case $.MTextAttachmentPoint.BaselineCenter:return"BC";case $.MTextAttachmentPoint.BottomRight:case $.MTextAttachmentPoint.BaselineRight:return"BR";default:return"TL"}}mergeCharFormat(e,t){const i={...e,...t};if(t.aci!==void 0)if(!this.isExplicitAci(t.aci))i.aci=null;else{const n=this.resolveAciColor(t.aci);i.aci=t.aci,i.rgb=n}return t.rgb!==void 0&&(t.rgb===null?i.rgb=null:(i.rgb=this.normalizeColorNumber(t.rgb),t.aci===void 0&&(i.aci=null))),t.paragraphAlignment!==void 0&&(i.paragraphAlignment=t.paragraphAlignment),i}cloneDocumentStyle(e){return{underline:e.underline,overline:e.overline,strikeThrough:e.strikeThrough,script:e.script,aci:e.aci,rgb:e.rgb?[...e.rgb]:null,align:e.align,fontFace:{...e.fontFace},capHeight:{...e.capHeight},widthFactor:{...e.widthFactor},charTrackingFactor:{...e.charTrackingFactor},oblique:e.oblique,paragraph:{indent:e.paragraph.indent,left:e.paragraph.left,right:e.paragraph.right,align:e.paragraph.align,tabs:[...e.paragraph.tabs]}}}toDocumentStyle(e,t){const i=this.isExplicitAci(e.aci)?e.aci:null,n=i!==null?null:this.colorNumberToRgbArray(e.rgb!==null?e.rgb:this.resolveBaseColor()),o=e.script!=="normal",r=Math.max(1,e.fontSize*(o?.7:1)),a=e.script==="superscript"?q.MTextLineAlignment.TOP:e.script==="subscript"?q.MTextLineAlignment.BOTTOM:q.MTextLineAlignment.MIDDLE,l=e.paragraphAlignment;return{underline:e.underline,overline:e.overline,strikeThrough:e.strike,script:e.script,aci:i,rgb:n,align:a,fontFace:{family:e.fontFamily,style:e.italic?"Italic":"Regular",weight:e.bold?700:400},capHeight:{value:r,isRelative:!1},widthFactor:{value:Math.max(.01,e.widthFactor),isRelative:!1},charTrackingFactor:{value:Math.max(.01,e.tracking),isRelative:!1},oblique:e.obliqueAngle,paragraph:{indent:(t==null?void 0:t.paragraph.indent)??0,left:(t==null?void 0:t.paragraph.left)??0,right:(t==null?void 0:t.paragraph.right)??0,align:l,tabs:t!=null&&t.paragraph.tabs?[...t.paragraph.tabs]:[]}}}colorNumberToRgbArray(e){const t=this.normalizeColorNumber(e);return[t>>16&255,t>>8&255,t&255]}rgbArrayToColorNumber(e){const t=Math.max(0,Math.min(255,Math.round(e[0]))),i=Math.max(0,Math.min(255,Math.round(e[1]))),n=Math.max(0,Math.min(255,Math.round(e[2])));return t<<16|i<<8|n}};z(J,"activeEditor",null),z(J,"sharedToolbar",null),z(J,"sharedToolbarContainer",null),z(J,"sharedToolbarFontFamiliesKey",""),z(J,"sharedToolbarColorPickerFactory",null),z(J,"instances",new Set),z(J,"FALLBACK_LINE_ADVANCE_RATIO",1.5),z(J,"DEFAULT_TEXT_STYLE",{name:"MTextInputBoxStyle",standardFlag:0,fixedTextHeight:24,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:24,font:_o,bigFont:""}),z(J,"DEFAULT_LINE_SPACE_FACTOR",.3);let Nl=J;function rS(s){return p.acgiContrastingForegroundColor(s)}function aS(s){if(typeof s=="number")return s===1;if(typeof s=="boolean")return s;const e=String(s).toLowerCase();return e==="light"||e==="1"||e==="true"}function cp(s){return s.currentSpaceId===s.tables.blockTable.modelSpace.objectId}function Bl(s){return s?p.AcDbSystemVariables.MODELBKCOLOR:p.AcDbSystemVariables.PAPERBKCOLOR}function dp(s,e){const t=s==null?void 0:s.RGB;return t??(e?p.ACGI_MODEL_SPACE_BACKGROUND:p.ACGI_PAPER_SPACE_BACKGROUND)}function Mo(s,e){const t=Bl(e),i=p.AcDbSysVarManager.instance().getVar(t,s);return dp(i,e)}function up(s){const e=s.RGB??p.ACGI_MODEL_SPACE_BACKGROUND,t=new p.AcCmColor(p.AcCmColorMethod.ByColor);return p.acgiIsLightBackground(e)?t.setRGB(0,0,0):t.setRGB(255,255,255),t}function lS(s){const e=new p.AcCmColor(p.AcCmColorMethod.ByColor);return e.setRGBValue(s&16777215),e}function Oo(s){return p.acgiIsLightBackground(s)?"black":"white"}function cS(s){if(s===void 0)return;const e=s;return e>=1&&e<=12?e:$.MTextAttachmentPoint.TopLeft}function ML(s){return s}function dS(s){if(s===void 0)return;const e=s;return e>=1&&e<=5?e:$.MTextFlowDirection.LEFT_TO_RIGHT}const Do="__mlightcadMTextFormatBridge",hp="__mlightcadAcEdMTextActiveInputBox__",pp="__mlightcadAcEdMTextActiveInputBoxListeners__";function Fl(){const s=globalThis;let e=s[pp];return e||(e=new Set,s[pp]=e),e}const me=class me{static setDefaultColorPicker(e){me.defaultColorPicker=e}static setDefaultToolbarEnabled(e){me.defaultToolbarEnabled=e}static getActiveInputBox(){return me.activeInputBox?me.activeInputBox:globalThis[hp]??null}static addActiveInputBoxChangeListener(e){me.activeInputBoxChangeListeners.add(e),Fl().add(e)}static removeActiveInputBoxChangeListener(e){me.activeInputBoxChangeListeners.delete(e),Fl().delete(e)}static setActiveInputBox(e){if(me.activeInputBox===e)return;me.activeInputBox=e;const t=globalThis;t[hp]=e,Fl().forEach(i=>{i(e)})}static createHiddenToolbarContainer(e){const t=e.ownerDocument.createElement("div");return t.setAttribute("aria-hidden","true"),Object.assign(t.style,{display:"none",pointerEvents:"none"}),e.appendChild(t),t}static attachFormatBridge(e){const t=e;if(t[Do])return;const i=new Set,n=[],o=()=>{i.forEach(a=>{a()})},r=a=>{const l=t[a];typeof l=="function"&&(t[a]=(...c)=>{const d=l.apply(t,c);return o(),d},n.push(()=>{t[a]=l}))};["setCurrentFormat","refreshCurrentFormatFromDocument","toggleCase","toggleStackSelection","toggleScriptSelection","setParagraphAlignment","setAttachmentPoint","setLineSpacingFactor","clearLineSpacing"].forEach(r),t.addCurrentFormatChangeListener=a=>{i.add(a)},t.removeCurrentFormatChangeListener=a=>{i.delete(a)},t.focusEditor=()=>{const a=t,l=a.focusImeInput;if(typeof l=="function"){l.call(t);return}const c=a.refocusImeInputSoon;typeof c=="function"&&c.call(t)},t.isStackSelectionActive=()=>{var _,C;const a=t,l=a.getSelectionRange,c=a.toDocumentIndexFromLogicalIndex,d=a.isScriptOnlyStack,h=a.document;if(typeof l!="function"||typeof c!="function")return!1;const f=l.call(t);if(!f||f.isCollapsed)return!1;const y=c.call(t,f.start,!0),g=c.call(t,f.end,!1),b=((C=(_=h==null?void 0:h.ast)==null?void 0:_.nodes)==null?void 0:C.slice(y,g))??[],w=b[0];if(b.length!==1||(w==null?void 0:w.type)!=="stack")return!1;if(typeof d=="function")return!d.call(t,w);if(w.divider!=="^")return!0;const S=(w.numerator??"").trim().length>0,x=(w.denominator??"").trim().length>0;return S===x},t[Do]={addCurrentFormatChangeListener:t.addCurrentFormatChangeListener,removeCurrentFormatChangeListener:t.removeCurrentFormatChangeListener,dispose:()=>{n.forEach(a=>{a()}),i.clear(),delete t.addCurrentFormatChangeListener,delete t.removeCurrentFormatChangeListener,delete t.focusEditor,delete t.isStackSelectionActive,delete t[Do]}}}static detachFormatBridge(e){var i;(i=e[Do])==null||i.dispose()}open(e){const{view:t,location:i,width:n,textHeight:o,initialText:r="",toolbarFontFamilies:a=[],toolbarColorPicker:l,toolbarEnabled:c=me.defaultToolbarEnabled,initialAttachmentPoint:d,initialDrawingDirection:h,rotation:f,directionVector:y,textStyleName:g,initialLineSpaceFactor:b}=e,w=new V.Vector3(i.x,i.y,i.z??0),x=p.acgiIsLightBackground(t.backgroundColor)?"#000000":"#ffffff",_=k.instance,C=_.curDocument.database,{layerColor:T}=_.resolveColors(),L=()=>{const Y=p.AcDbSysVarManager.instance().getVar(p.AcDbSystemVariables.COLORTHEME,C);return Y===0||Y==="0"||Y===!1||Y==="dark"?"dark":"light"},N=Array.from(new Set(a.map(Y=>Y.trim()).filter(Y=>Y.length>0))),B=()=>{const Y=C.tables.textStyleTable,ee=g==null?void 0:g.trim();if(ee){const re=typeof Y.resolveAt=="function"?Y.resolveAt(ee):Y.getAt(ee);if(re!=null&&re.textStyle)return re.textStyle}const Z=Y.getAt(C.textstyle);return Z==null?void 0:Z.textStyle},A=Math.max(Number.EPSILON,o),O=B(),P=O?{...O,fixedTextHeight:A,lastHeight:A}:void 0,E=c?null:me.createHiddenToolbarContainer(t.container),I=cS(d),j=dS(h),G=new Nl({scene:t.internalScene,camera:t.internalCamera,width:n,position:w.clone(),initialText:r,...I!==void 0?{initialAttachmentPoint:I}:{},...j!==void 0?{initialDrawingDirection:j}:{},...typeof f=="number"&&Number.isFinite(f)?{rotation:f}:{},...y?{directionVector:y}:{},...typeof b=="number"&&Number.isFinite(b)&&b>0?{initialLineSpaceFactor:b}:{},textStyle:P,cursorStyle:{color:x,glowColor:x},boundingBoxStyle:{padding:0},imeTarget:t.canvas,colorSettings:{layer:C.clayer,color:new q.MTextColor,byLayerColor:T,byBlockColor:T},toolbar:{enabled:!0,theme:L(),fontFamilies:N,container:E??t.container,offsetY:10,colorPicker:l??me.defaultColorPicker??void 0}});return me.attachFormatBridge(G),me.setActiveInputBox(G),new Promise(Y=>{let ee=!1;const Z=()=>{ee||(G.update(),t.isDirty=!0)},re=Be=>{Be.name.toLowerCase()===p.AcDbSystemVariables.COLORTHEME.toLowerCase()&&(G.setToolbarTheme(L()),t.isDirty=!0)},Se=()=>{me.activeInputBox===G&&me.setActiveInputBox(null),me.detachFormatBridge(G),G.dispose(),E==null||E.remove(),t.events.renderFrame.removeEventListener(Z),G.off("close",pt),p.AcDbSysVarManager.instance().events.sysVarChanged.removeEventListener(re),t.isDirty=!0},Ke=Be=>{ee||(ee=!0,Se(),Y(Be))},pt=()=>{var Ga;const Be=G.getMTextInsertionPoint();Ke({contents:G.getText(),location:{x:Be.x,y:Be.y,z:Be.z},width:n,height:A,lineSpacingFactor:((Ga=G.getLineSpacingFactor)==null?void 0:Ga.call(G))??me.defaultLineSpacingFactor,attachmentPoint:G.getMTextAttachmentPoint()})};G.on("close",pt),t.events.renderFrame.addEventListener(Z),p.AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(re)})}};me.defaultLineSpacingFactor=.3,me.activeInputBox=null,me.activeInputBoxChangeListeners=new Set,me.defaultColorPicker=null,me.defaultToolbarEnabled=!0;let qt=me;const Da=class Da{constructor(e){this.view=e}handleKeyDown(e){const t=this.resolveUndoRedoShortcut(e);if(this.shouldIgnoreEditableTargetShortcut(e)&&!t)return!1;if(t)return!this.shouldHandleUndoRedoShortcut(e)||qt.getActiveInputBox()||this.view.editor.isActive?!1:(k.instance.sendStringToExecute(t),e.preventDefault(),!0);switch(e.code){case"Escape":return this.view.selectionSet.clear(),this.view.htmlTransientManager.deselectAll(),this.view.isHtmlDirty=!0,!1;case"Delete":case"Backspace":if(!this.view.editor.isActive){let n=!1;const o=this.view.htmlTransientManager;if(o.hasSelection()){const r=o.getSelectedGroups(),a=r.filter(c=>c.layer===ne);a.length>0&&Xe(this.view,"Delete Measurement",()=>{for(const c of a)o.detach(c.id)&&(n=!0)}),(r.some(c=>c.layer!==ne)||r.length===0&&o.hasSelection())&&Fe(this.view,"Delete Markup",()=>{n=o.deleteSelected()||n})}if(n)return this.view.isHtmlDirty=!0,e.preventDefault(),!0;k.instance.lookupGlobalCmd("erase")&&k.instance.sendStringToExecute("erase")}return!1}return!1}resolveUndoRedoShortcut(e){return!e.ctrlKey&&!e.metaKey?null:e.code==="KeyY"?"redo":e.code==="KeyZ"?e.shiftKey?"redo":"undo":null}shouldIgnoreEditableTargetShortcut(e){if(e.isComposing||e.keyCode===229)return!0;const t=e.target;return(t==null?void 0:t.tagName)==="TEXTAREA"||t!=null&&t.isContentEditable?!0:(t==null?void 0:t.tagName)==="INPUT"}shouldHandleUndoRedoShortcut(e){if(e.isComposing||e.keyCode===229)return!1;const t=e.target;if((t==null?void 0:t.tagName)==="TEXTAREA"||t!=null&&t.isContentEditable)return!1;if((t==null?void 0:t.tagName)==="INPUT"){const i=t;return i.classList.contains(Da.COMMAND_LINE_INPUT_CLASS)?i.value.trim()===""&&!i.readOnly:!1}return!0}};Da.COMMAND_LINE_INPUT_CLASS="ml-cli-text";let No=Da;function es(s,e){if(s.length<8)return s;const t=s.map(g=>({value:e==="x"?(g.minX+g.maxX)/2:(g.minY+g.maxY)/2,box:g})).sort((g,b)=>g.value-b.value),i=t[t.length-1].value-t[0].value;if(!(i>0))return s;let n=0,o=0;for(let g=1;g<t.length;g++){const b=t[g].value-t[g-1].value;b>n&&(n=b,o=g)}if(n<i*.2)return s;const r=t.slice(0,o),a=t.slice(o),l=r.length>=a.length?r:a,c=s.map(g=>Math.max(g.maxX-g.minX,g.maxY-g.minY,1e-9));c.sort((g,b)=>g-b);const d=c[Math.floor(c.length/2)]||1,h=[];for(let g=1;g<l.length;g++)h.push(l[g].value-l[g-1].value);h.sort((g,b)=>g-b);const f=h.length>0&&h[Math.floor(h.length/2)]||d,y=Math.max(f*10,d*20);return n<y?s:l.map(g=>g.box)}function mp(s){if(s.length===0)return null;const e=Bo(s);if(s.length<8)return e;let t=s.slice(),i=-1;for(;t.length!==i;)i=t.length,t=es(t,"x"),t=es(t,"y");return Bo(t)??e}async function fp(s,e){if(s.length===0)return null;const t=Bo(s);if(s.length<8)return t;let i=s.slice(),n=-1;for(;i.length!==n;)n=i.length,await e.maybeYield(),i=es(i,"x"),await e.maybeYield(),i=es(i,"y");return Bo(i)??t}function Bo(s){if(s.length===0)return null;let e=1/0,t=1/0,i=-1/0,n=-1/0;for(const o of s)o.minX<e&&(e=o.minX),o.minY<t&&(t=o.minY),o.maxX>i&&(i=o.maxX),o.maxY>n&&(n=o.maxY);return!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(i)||!Number.isFinite(n)?null:{minX:e,minY:t,maxX:i,maxY:n}}class yp{constructor(e,t){this.getLayerTraits=e,this.renderer=t}remap(e,t,i){if(t===i)return;const n=this.getLayerTraits(i);for(const o of e)o.traverse(r=>{const a=r.userData.layerName===t;if(a&&(r.userData.layerName=i),!("material"in r)||!a)return;const l=r.material;if(Array.isArray(l)){const d=l;r.material=d.map(h=>this.shouldRemap(h,t)?this.renderer.getLayerBoundMaterial(this.promoteLayerZeroByLayerColor(h,t),i,n)??h:h),D.syncStyleMaterialIdFromMaterials(D.getSceneDrawableUserData(r),r.material);return}if(!this.shouldRemap(l,t))return;const c=this.renderer.getLayerBoundMaterial(this.promoteLayerZeroByLayerColor(l,t),i,n);c&&(r.material=c,D.syncStyleMaterialIdFromMaterials(D.getSceneDrawableUserData(r),c))})}shouldRemap(e,t){const i=D.getMaterialMetadata(e);return i.isForeground!==!0?!0:t!=="0"?!1:i.isByLayerColor===!0?!0:t==="0"&&(i.isByLayerLineType===!0||i.isByLayerLineWeight===!0||i.isByLayerTransparency===!0)}promoteLayerZeroByLayerColor(e,t){const i=D.getMaterialMetadata(e);if(i.isByLayerColor===!1&&i.isForeground!==!0)return e;const n=D.hasByLayerBinding(i)&&i.isByLayerColor!==!0;return t==="0"&&n&&D.setMaterialMetadata(e,{isByLayerColor:!0}),e}}const tn=1e-5;function je(s){return Number.isFinite(s.minX)&&Number.isFinite(s.minY)&&Number.isFinite(s.maxX)&&Number.isFinite(s.maxY)}function zl(s){const e=new V.Box3;for(const t of s.wcsChildBoxes)je(t)&&e.union(new V.Box3(new V.Vector3(t.minX,t.minY,0),new V.Vector3(t.maxX,t.maxY,0)));return e}const uS=2048;function hS(s){if(s.wcsChildBoxes.length===0||s.wcsChildBoxes.length>uS)return;const e=zl(s),t=s.wcsBbox;if(!(Math.abs(t.min.x-e.min.x)<=tn&&Math.abs(t.min.y-e.min.y)<=tn&&Math.abs(t.min.z-e.min.z)<=tn&&Math.abs(t.max.x-e.max.x)<=tn&&Math.abs(t.max.y-e.max.y)<=tn&&Math.abs(t.max.z-e.max.z)<=tn))throw new Error(`[AcTrView2d] Group wcsBbox [${t.min.x}, ${t.min.y}]–[${t.max.x}, ${t.max.y}] does not match wcsChildBoxes union [${e.min.x}, ${e.min.y}]–[${e.max.x}, ${e.max.y}]. Ensure AcDbRenderingCache.draw applied the INSERT transform before handleGroup.`)}function pS(s){hS(s)}class gp{constructor(e=8){this.budgetMs=e,this.lastYield=performance.now()}async maybeYield(){performance.now()-this.lastYield<this.budgetMs||(await p.accmYieldForPaint(),this.lastYield=performance.now())}async yieldNow(){await p.accmYieldForPaint(),this.lastYield=performance.now()}}function mS(s){const e=fS(s);if(!e)return;const t=gS(e),i=mp(t.length>0?t:e);if(i)return new p.AcGeBox2d({x:i.minX,y:i.minY},{x:i.maxX,y:i.maxY})}async function bp(s,e=new gp){const t=await yS(s,e);if(!t)return;await e.yieldNow();const i=await bS(t,e);await e.yieldNow();const n=await fp(i.length>0?i:t,e);if(n)return new p.AcGeBox2d({x:n.minX,y:n.minY},{x:n.maxX,y:n.maxY})}function fS(s){const e=s.filter(je);if(e.length===0)return;const t=e.map(r=>Math.max(r.maxX-r.minX,r.maxY-r.minY,1e-9));t.sort((r,a)=>r-a);const i=t[Math.floor(t.length/2)]||1,n=Math.max(i*50,1e10),o=[];for(const r of e)Math.max(r.maxX-r.minX,r.maxY-r.minY)>=n||o.push(r);return o.length>0?o:void 0}async function yS(s,e){const t=[];for(let a=0;a<s.length;a++){const l=s[a];je(l)&&t.push(l),(a&2047)===2047&&await e.maybeYield()}if(t.length===0)return;await e.maybeYield();const i=new Array(t.length);for(let a=0;a<t.length;a++){const l=t[a];i[a]=Math.max(l.maxX-l.minX,l.maxY-l.minY,1e-9),(a&2047)===2047&&await e.maybeYield()}i.sort((a,l)=>a-l),await e.maybeYield();const n=i[Math.floor(i.length/2)]||1,o=Math.max(n*50,1e10),r=[];for(let a=0;a<t.length;a++){const l=t[a];Math.max(l.maxX-l.minX,l.maxY-l.minY)<o&&r.push(l),(a&2047)===2047&&await e.maybeYield()}return r.length>0?r:void 0}function gS(s){if(s.length<2)return s;const e=s.map(d=>({x:(d.minX+d.maxX)/2,y:(d.minY+d.maxY)/2,box:d})),t=e.map(d=>d.x).sort((d,h)=>d-h),i=e.map(d=>d.y).sort((d,h)=>d-h),n=t[Math.floor(t.length/2)],o=i[Math.floor(i.length/2)],r=s.map(d=>Math.max(d.maxX-d.minX,d.maxY-d.minY,1e-9));r.sort((d,h)=>d-h);const a=r[Math.floor(r.length/2)]||1,l=Math.max(a*50,1e10),c=e.filter(d=>Math.hypot(d.x-n,d.y-o)<=l);return c.length>0?c.map(d=>d.box):s}async function bS(s,e){if(s.length<2)return s;const t=[],i=new Array(s.length),n=new Array(s.length),o=new Array(s.length);for(let h=0;h<s.length;h++){const f=s[h],y=(f.minX+f.maxX)/2,g=(f.minY+f.maxY)/2;t.push({x:y,y:g,box:f}),i[h]=y,n[h]=g,o[h]=Math.max(f.maxX-f.minX,f.maxY-f.minY,1e-9),(h&2047)===2047&&await e.maybeYield()}await e.maybeYield(),i.sort((h,f)=>h-f),await e.maybeYield(),n.sort((h,f)=>h-f),await e.maybeYield(),o.sort((h,f)=>h-f),await e.maybeYield();const r=i[Math.floor(i.length/2)],a=n[Math.floor(n.length/2)],l=o[Math.floor(o.length/2)]||1,c=Math.max(l*50,1e10),d=[];for(let h=0;h<t.length;h++){const f=t[h];Math.hypot(f.x-r,f.y-a)<=c&&d.push(f.box),(h&2047)===2047&&await e.maybeYield()}return d.length>0?d:s}const Rl=1,Jt=4;function jl(s){return{isOff:s.isOff,isFrozen:s.isFrozen,isLocked:((s.standardFlags??0)&Jt)!==0}}function wp(s,e){return s.isOff===e.isOff&&s.isFrozen===e.isFrozen&&s.isLocked===e.isLocked}function wS(){const s=p.AcDbLayerTableRecord.prototype,e=Object.getOwnPropertyDescriptor(s,"isLocked");!(e!=null&&e.get)||!e.set||e.configurable===!1||Object.defineProperty(s,"isLocked",{configurable:!0,enumerable:e.enumerable??!1,get:e.get,set(t){const i=this.standardFlags??0;this.standardFlags=t?i|Jt:i&~Jt}})}wS();function At(s,e){var n,o;const t=e==null?void 0:e.layer;if(!s||!t)return!1;const i=(o=(n=s.tables)==null?void 0:n.layerTable)==null?void 0:o.getAt(t);return i?((i.standardFlags??0)&Jt)!==0:!1}function Vl(s,e){var o;if(!s||e.length===0)return{ids:e,lockedCount:0};const t=(o=s.tables)==null?void 0:o.blockTable;if(!(t!=null&&t.getEntityById))return{ids:e,lockedCount:0};const i=[];let n=0;for(const r of e){const a=t.getEntityById(r);if(a&&At(s,a)){n++;continue}i.push(r)}return{ids:i,lockedCount:n}}const se="Layer",vp="Entity";function ie(s,e,t){var n;if((n=s.transactionManager)!=null&&n.hasTransaction())return t();if(typeof s.runDatabaseEdit!="function")return process.env.NODE_ENV!=="production"&&console.warn(`[cad-simple-viewer] acapRunServiceEdit("${e}"): database.runDatabaseEdit is unavailable; mutation ran without undo support.`),t();let i;return ui(s,e,()=>{i=t()}),i}const W=class W{constructor(e){this.db=e}static openLayerForWrite(e,t){const i=typeof t=="string"?e.tables.layerTable.getAt(t):t;if(i)return W.registerLayerTableRecordForWrite(e,i),i}static registerLayerTableRecordForWrite(e,t){var r,a;const i=e.transactionManager;if(!((r=i==null?void 0:i.isRecording)!=null&&r.call(i)))return;const n=(a=i.currentTransaction)==null?void 0:a.call(i);if(!n)return;W.ensureLayerUndoHooks(e);const o=t.objectId;n.openedObjects.set(o,t),n.recorder.hasModify(o)||(n.originalStates.set(o,t.clonePreservingIdentity()),n.recorder.recordModify(t)),e.getObjectById(o)!==t&&W.ensureLayerFinalizeHook(n)}static resolveLayerForHandleCollision(e,t){var o;const i=(o=t.before)==null?void 0:o.name;if(typeof i!="string")return;const n=e.tables.layerTable.getAt(i);if(!(!n||e.getObjectById(t.objectId)===n))return n}static ensureLayerUndoHooks(e){const i=e.transactionManager.changeApplier;if(!i||W.patchedChangeAppliers.has(i))return;const n=i.applyModify.bind(i);i.applyModify=(o,r)=>{const a=W.resolveLayerForHandleCollision(e,o);if(a){const l=r?o.after:o.before;if(l){a.restoreFrom(l);return}}n(o,r)},W.patchedChangeAppliers.add(i)}static ensureLayerFinalizeHook(e){const t=e.recorder;if(t.__layerFinalizePatched||typeof t.finalize!="function")return;const i=t.finalize.bind(t);t.finalize=n=>{i(n);for(const o of t.getChanges()){if(o.kind!=="modify")continue;const r=e.openedObjects.get(o.objectId);if(!r||n.getObjectById(o.objectId)===r)continue;const a=W.resolveLayerForHandleCollision(n,o);a&&(o.after=a.clonePreservingIdentity())}},t.__layerFinalizePatched=!0}static syncLayerModifiedEvent(e,t,i){Object.keys(i).length!==0&&e.getObjectById(t.objectId)!==t&&e.events.layerModified.dispatch({database:e,layer:t,changes:i})}static setLayerFrozenState(e,t){const i=e.standardFlags??0;e.standardFlags=t?i|Rl:i&~Rl}static setLayerLockedState(e,t){const i=e.standardFlags??0;e.standardFlags=t?i|Jt:i&~Jt}static isLayerLocked(e){return((e.standardFlags??0)&Jt)!==0}static isEntityOnLockedLayer(e,t){return At(e,t)}static applyLayerPreviousSnapshot(e,t){t.states.forEach(n=>{const o=W.openLayerForWrite(e,n.name);o&&(o.isOff=!n.isOn,W.setLayerFrozenState(o,n.isFrozen),W.setLayerLockedState(o,n.isLocked))});const i=W.openLayerForWrite(e,t.clayer);return i?(i.isOff=!1,W.setLayerFrozenState(i,!1),e.clayer=i.name,!0):!1}parseLayerNameInput(e){const t=[...this.db.tables.layerTable.newIterator()].map(o=>o.name),i=e.trim();if(!i)return[];if(i==="*")return[...t];const n=i.split(",").map(o=>o.trim()).filter(Boolean);return[...new Set(n)]}resolveLayers(e){const t=this.db.tables.layerTable,i=[],n=[];return e.forEach(o=>{const r=t.getAt(o);r?i.push(r):n.push(o)}),{layers:i,missing:n}}getLayerSummaries(){return[...this.db.tables.layerTable.newIterator()].map(e=>({name:e.name,current:this.db.clayer===e.name?"*":"",on:e.isOff?"No":"Yes",frozen:e.isFrozen?"Yes":"No",locked:W.isLayerLocked(e)?"Yes":"No",color:e.color.toString()}))}createLayers(e){return ie(this.db,se,()=>{const t=this.db.tables.layerTable;let i=0;const n=[];return e.forEach(o=>{if(t.has(o)){n.push(o);return}t.add(new p.AcDbLayerTableRecord({name:o,isOff:!1,isPlottable:!0,color:new p.AcCmColor(p.AcCmColorMethod.ByACI,7),linetype:"Continuous"})),i++}),{created:i,existed:n}})}setCurrentLayer(e){const t=this.db.tables.layerTable.getAt(e);return t?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,t);return i?(i.isOff=!1,W.setLayerFrozenState(i,!1),this.db.clayer=i.name,!0):!1}):!1}makeLayer(e){return ie(this.db,se,()=>{const t=this.db.tables.layerTable;let i=t.getAt(e);i||(i=new p.AcDbLayerTableRecord({name:e,isOff:!1,isPlottable:!0,color:new p.AcCmColor(p.AcCmColorMethod.ByACI,7),linetype:"Continuous"}),t.add(i));const n=W.openLayerForWrite(this.db,i);return n?(n.isOff=!1,W.setLayerFrozenState(n,!1),this.db.clayer=n.name,!0):!1})}setLayerOn(e,t,i={}){if(!e||!this.db.tables.layerTable.getAt(e))return!1;const n=i.switchCurrentLayer??!1;return ie(this.db,se,()=>{if(!t&&n&&!this.switchCurrentLayerIfNeeded(e))return!1;const o=W.openLayerForWrite(this.db,e);return o?(o.isOff=!t,W.syncLayerModifiedEvent(this.db,o,{isOff:o.isOff}),!0):!1})}setLayerFrozen(e,t,i={}){if(!e||!this.db.tables.layerTable.getAt(e))return!1;const n=i.switchCurrentLayer??!1;return ie(this.db,se,()=>{if(t&&n&&!this.switchCurrentLayerIfNeeded(e))return!1;const o=W.openLayerForWrite(this.db,e);return o?(W.setLayerFrozenState(o,t),W.syncLayerModifiedEvent(this.db,o,{standardFlags:o.standardFlags}),!0):!1})}setLayerLocked(e,t){return!e||!this.db.tables.layerTable.getAt(e)?!1:ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(W.setLayerLockedState(i,t),W.syncLayerModifiedEvent(this.db,i,{standardFlags:i.standardFlags}),!0):!1})}setLayerLineWeight(e,t){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.lineWeight=t,!0):!1}):!1}setLayerPlottable(e,t){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.isPlottable=t,!0):!1}):!1}setLayerLinetype(e,t){return!t||!this.db.tables.layerTable.getAt(e)?!1:ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.linetype=t,!0):!1})}setLayerTransparency(e,t){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.transparency=t,!0):!1}):!1}isolateSingleLayer(e){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{for(const t of this.db.tables.layerTable.newIterator()){const i=W.openLayerForWrite(this.db,t);if(!i)continue;const n=i.name===e;i.isOff=!n,n&&W.setLayerFrozenState(i,!1)}return this.db.clayer=e,!0}):!1}setLayersVisibility(e,t,i={}){const n=i.skipCurrentLayer??!0,{layers:o}=this.resolveLayers(e),r=[];return ie(this.db,se,()=>{o.forEach(a=>{if(t&&n&&a.name===this.db.clayer){r.push(a.name);return}const l=W.openLayerForWrite(this.db,a);l&&(l.isOff=t,W.syncLayerModifiedEvent(this.db,l,{isOff:l.isOff}))})}),{skippedCurrent:r}}setAllLayersOn(){return ie(this.db,se,()=>{let e=0;for(const t of this.db.tables.layerTable.newIterator()){if(!t.isOff)continue;const i=W.openLayerForWrite(this.db,t);i&&(i.isOff=!1,e++)}return e})}setAllLayersOffExceptCurrent(){return ie(this.db,se,()=>{const e=this.db.clayer;let t=0;for(const i of this.db.tables.layerTable.newIterator()){if(i.name===e||i.isOff)continue;const n=W.openLayerForWrite(this.db,i);n&&(n.isOff=!0,t++)}return t})}setLayersFrozen(e,t,i={}){const n=i.skipCurrentLayer??!0,{layers:o}=this.resolveLayers(e),r=[];return ie(this.db,se,()=>{o.forEach(a=>{if(t&&n&&a.name===this.db.clayer){r.push(a.name);return}const l=W.openLayerForWrite(this.db,a);l&&(W.setLayerFrozenState(l,t),W.syncLayerModifiedEvent(this.db,l,{standardFlags:l.standardFlags}))})}),{skippedCurrent:r}}thawAllLayers(){return ie(this.db,se,()=>{let e=0;for(const t of this.db.tables.layerTable.newIterator()){if(!t.isFrozen)continue;const i=W.openLayerForWrite(this.db,t);i&&(W.setLayerFrozenState(i,!1),W.syncLayerModifiedEvent(this.db,i,{standardFlags:i.standardFlags}),e++)}return e})}setLayersLocked(e,t){const{layers:i}=this.resolveLayers(e);ie(this.db,se,()=>{i.forEach(n=>{const o=W.openLayerForWrite(this.db,n);o&&(W.setLayerLockedState(o,t),W.syncLayerModifiedEvent(this.db,o,{standardFlags:o.standardFlags}))})})}parseColorInput(e){const t=e.trim();if(!t)return;if(/^\d+$/.test(t)){const n=Number(t);return n>=1&&n<=255?new p.AcCmColor(p.AcCmColorMethod.ByACI,n):void 0}const i=p.AcCmColor.fromString(t);if(i){if(i.isByACI){const n=i.colorIndex;if(n==null||n<1||n>255)return}if(!(i.isByLayer||i.isByBlock))return i}}setLayerColor(e,t){return this.db.tables.layerTable.getAt(e)?ie(this.db,se,()=>{const i=W.openLayerForWrite(this.db,e);return i?(i.color=t.clone(),!0):!1}):!1}setLayersColor(e,t){const{layers:i}=this.resolveLayers(e);ie(this.db,se,()=>{i.forEach(n=>{const o=W.openLayerForWrite(this.db,n);o&&(o.color=t.clone())})})}setLayerDescription(e,t){const i=this.db.tables.layerTable.getAt(e);return i?ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);return n?(n.description=t,!0):!1}):!1}switchCurrentLayerIfNeeded(e){if(this.db.clayer!==e)return!0;let t,i;for(const r of this.db.tables.layerTable.newIterator())if(r.name!==e&&(t??(t=r.name),!r.isOff&&!r.isFrozen)){i=r.name;break}const n=i??t;if(!n)return!1;const o=W.openLayerForWrite(this.db,n);return o?(o.isOff=!1,W.setLayerFrozenState(o,!1),this.db.clayer=o.name,!0):!1}getLayerNameFromEntity(e){var i;const t=this.db.tables.blockTable.getEntityById(e);return((i=t==null?void 0:t.layer)==null?void 0:i.trim())||void 0}collectLayerNamesFromEntities(e){const t=new Set,i=new Set;return e.forEach(n=>{const o=this.getLayerNameFromEntity(n);if(!o)return;const r=this.db.tables.layerTable.getAt(o);r?t.add(r.name):i.add(o)}),{layerNames:[...t],missingLayerNames:[...i]}}freezeLayerByEntity(e){const t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};const i=this.db.tables.layerTable.getAt(t);if(!i)return{ok:!1,reason:"layer_not_found",layerName:t};if(i.name===this.db.clayer)return{ok:!1,reason:"cannot_change_current",layerName:t};if(i.isFrozen)return{ok:!1,reason:"already_frozen",layerName:t};const n=i.isFrozen;return ie(this.db,se,()=>{const o=W.openLayerForWrite(this.db,i);o&&W.setLayerFrozenState(o,!0)}),{ok:!0,layerName:t,previousFrozen:n}}setLayerFrozenByName(e,t){const i=this.db.tables.layerTable.getAt(e);return i?ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);return n?(W.setLayerFrozenState(n,t),!0):!1}):!1}turnOffLayerByEntity(e){const t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};const i=this.db.tables.layerTable.getAt(t);if(!i)return{ok:!1,reason:"layer_not_found",layerName:t};if(i.name===this.db.clayer)return{ok:!1,reason:"cannot_change_current",layerName:t};if(i.isOff)return{ok:!1,reason:"already_off",layerName:t};const n=i.isOff;return ie(this.db,se,()=>{const o=W.openLayerForWrite(this.db,i);o&&(o.isOff=!0)}),{ok:!0,layerName:t,previousOff:n}}setLayerOffByName(e,t){const i=this.db.tables.layerTable.getAt(e);return i?ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);return n?(n.isOff=t,!0):!1}):!1}lockLayerByEntity(e){const t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};const i=this.db.tables.layerTable.getAt(t);return i?W.isLayerLocked(i)?{ok:!1,reason:"already_locked",layerName:t}:(ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);n&&W.setLayerLockedState(n,!0)}),{ok:!0,layerName:t}):{ok:!1,reason:"layer_not_found",layerName:t}}unlockLayerByEntity(e){const t=this.getLayerNameFromEntity(e);if(!t)return{ok:!1,reason:"invalid_selection"};const i=this.db.tables.layerTable.getAt(t);return i?W.isLayerLocked(i)?(ie(this.db,se,()=>{const n=W.openLayerForWrite(this.db,i);n&&W.setLayerLockedState(n,!1)}),{ok:!0,layerName:t}):{ok:!1,reason:"already_unlocked",layerName:t}:{ok:!1,reason:"layer_not_found",layerName:t}}isolateLayers(e,t){if(e.length!==0)return ie(this.db,se,()=>{const i=this.db.tables.layerTable,n=new Set(e),o=i.getAt(e[0]),r=this.db.clayer,a=new Map;for(const h of i.newIterator())a.set(h.name,jl(h));o&&(this.db.clayer=o.name);const l=new Set;for(const h of i.newIterator()){const f=W.openLayerForWrite(this.db,h);if(f){if(n.has(f.name)){f.isOff&&(f.isOff=!1,l.add(f.name)),f.isFrozen&&(W.setLayerFrozenState(f,!1),l.add(f.name)),W.isLayerLocked(f)&&(W.setLayerLockedState(f,!1),l.add(f.name));continue}if(t==="Off"){f.isOff||(f.isOff=!0,l.add(f.name));continue}W.isLayerLocked(f)||(W.setLayerLockedState(f,!0),l.add(f.name))}}const c=[];for(const h of i.newIterator()){const f=a.get(h.name);if(!f)continue;const y=jl(h);wp(f,y)||c.push({name:h.name,before:f,isolated:y})}const d={currentLayerBefore:r,currentLayerAfter:this.db.clayer,layers:c};return{layerNames:e,affectedLayerCount:l.size,isoSnapshot:d}})}unisolateFromSnapshot(e){return ie(this.db,se,()=>{const t=this.db.tables.layerTable;let i=0;for(const n of e.layers)t.getAt(n.name)&&this.restoreLayerIfUnchanged(n)&&i++;return this.db.clayer===e.currentLayerAfter&&e.currentLayerBefore!==e.currentLayerAfter&&t.getAt(e.currentLayerBefore)&&(this.db.clayer=e.currentLayerBefore),i})}collectLayerEntities(e){const t=[];for(const i of this.db.tables.blockTable.newIterator())for(const n of i.newIterator())n.layer===e&&t.push({ownerId:i.objectId,objectId:n.objectId,entity:n.clone()});return t}removeLayerEntities(e){const t=new Map;e.forEach(({ownerId:i,objectId:n})=>{const o=t.get(i)??[];o.push(n),t.set(i,o)}),t.forEach((i,n)=>{var o;(o=this.db.tables.blockTable.getIdAt(n))==null||o.removeEntity(i)})}deleteLayer(e){const t=this.db.tables.layerTable.getAt(e);return t?t.name==="0"?{ok:!1,reason:"layer_0",layerName:e}:t.name===this.db.clayer?{ok:!1,reason:"current_layer",layerName:e}:ie(this.db,se,()=>{const i=this.collectLayerEntities(t.name);this.removeLayerEntities(i);const n=t.clone();return this.db.tables.layerTable.remove(t.name),this.db.events.layerErased.dispatch({database:this.db,layer:t}),{ok:!0,layerName:t.name,layer:n,entities:i}}):{ok:!1,reason:"not_found",layerName:e}}restoreDeletedLayer(e,t){ie(this.db,se,()=>{this.db.tables.layerTable.has(e.name)||this.db.tables.layerTable.add(e.clone());const i=new Map;t.forEach(({ownerId:n,entity:o})=>{const r=i.get(n)??[];r.push(o.clone()),i.set(n,r)}),i.forEach((n,o)=>{(this.db.tables.blockTable.getIdAt(o)??this.db.tables.blockTable.modelSpace).appendEntity(n)})})}restoreLayerIfUnchanged(e){const t=this.db.tables.layerTable.getAt(e.name);if(!t)return!1;const i=W.openLayerForWrite(this.db,t);if(!i)return!1;let n=!1;return i.isOff===e.isolated.isOff&&i.isOff!==e.before.isOff&&(i.isOff=e.before.isOff,n=!0),i.isFrozen===e.isolated.isFrozen&&i.isFrozen!==e.before.isFrozen&&(W.setLayerFrozenState(i,e.before.isFrozen),n=!0),W.isLayerLocked(i)===e.isolated.isLocked&&W.isLayerLocked(i)!==e.before.isLocked&&(W.setLayerLockedState(i,e.before.isLocked),n=!0),n}getEffectiveLayerTraits(e){return W.resolveLayerTraits(this.db,e)}static resolveLayerTraits(e,t){const i=e.tables.layerTable.getAt(t);if(i)return{layer:i.name,color:i.color.clone(),lineType:i.lineStyle,lineWeight:i.lineWeight,transparency:i.transparency}}};W.patchedChangeAppliers=new WeakSet;let we=W;class Gl{constructor(e,t,i){this.scene=e,this.renderer=t,this.getLayerTraits=i}layerStyleMayHaveChanged(e){return e.color!=null||e.linetype!=null||e.lineWeight!==void 0||e.transparency!=null}syncFromLiveRecord(e){const t=this.getEffectiveLayerTraits(e.name);if(!t)return;const i=this.renderer.updateLayerMaterial(e.name,t);this.scene.forEachSceneLayer(e.name,n=>n.syncAppearanceFromRecord(e.name,t,i,this.renderer))}refreshTextMaterialsInObjectTree(e,t){e.traverse(i=>{const n=i.refreshTextMaterials;typeof n=="function"&&n.call(i,t)})}getEffectiveLayerTraits(e){if(this.getLayerTraits)return this.getLayerTraits(e);const t=this.renderer.context.database;if(t)return we.resolveLayerTraits(t,e)}}function Fo(s,e){var r;let t=1/0,i=1/0,n=-1/0,o=-1/0;for(const a of s)je(a)&&(t=Math.min(t,a.minX),i=Math.min(i,a.minY),n=Math.max(n,a.maxX),o=Math.max(o,a.maxY));return{minX:t,minY:i,maxX:n,maxY:o,id:e??((r=s[0])==null?void 0:r.id)??""}}function ts(s){return!(s.children!==void 0&&s.children.length===0)}function Hl(s){const e=new Map;return s.map(t=>{const i=t.id;if(typeof i!="string"||i.length===0)return t;const n=e.get(i)??0;return e.set(i,n+1),n===0?t:{...t,id:`${i}#${n}`}})}const vS=40;class xS{constructor(){this.items=new Map,this.anonKeySeq=0}storageKey(e){return typeof e.id=="string"&&e.id.length>0?e.id:`__anon_${this.anonKeySeq++}`}insert(e){if(typeof e.id=="string"&&e.id.length>0){this.items.set(e.id,e);return}this.items.set(this.storageKey(e),e)}load(e){for(const t of e)this.insert(t)}remove(e){if(typeof e.id=="string"&&e.id.length>0){this.items.delete(e.id);return}for(const[t,i]of this.items)if(i===e||i.id===e.id&&i.minX===e.minX&&i.minY===e.minY&&i.maxX===e.maxX&&i.maxY===e.maxY){this.items.delete(t);return}}removeById(e){typeof e=="string"&&e.length>0&&this.items.delete(e)}getById(e){if(typeof e=="string"&&e.length>0)return this.items.get(e)}clear(){this.items.clear()}search(e,t){const i=[];for(const n of this.items.values())xp(n,e)&&((t==null?void 0:t.selectionMode)==="window"&&!en(n,e)||i.push(n));return i}collides(e){for(const t of this.items.values())if(xp(t,e))return!0;return!1}all(){return Array.from(this.items.values())}getStats(){const e=this.all(),t=e.length;return{kind:"linear",itemCount:t,estimatedBytes:Gh(e)+t*vS}}}function xp(s,e){return!(s.maxX<e.minX||s.minX>e.maxX||s.maxY<e.minY||s.minY>e.maxY)}function kp(s,e,t=0,i=s.length-1,n=kS){for(;i>t;){if(i-t>600){const l=i-t+1,c=e-t+1,d=Math.log(l),h=.5*Math.exp(2*d/3),f=.5*Math.sqrt(d*h*(l-h)/l)*(c-l/2<0?-1:1),y=Math.max(t,Math.floor(e-c*h/l+f)),g=Math.min(i,Math.floor(e+(l-c)*h/l+f));kp(s,e,y,g,n)}const o=s[e];let r=t,a=i;for(is(s,t,e),n(s[i],o)>0&&is(s,t,i);r<a;){for(is(s,r,a),r++,a--;n(s[r],o)<0;)r++;for(;n(s[a],o)>0;)a--}n(s[t],o)===0?is(s,t,a):(a++,is(s,a,i)),a<=e&&(t=a+1),e<=a&&(i=a-1)}}function is(s,e,t){const i=s[e];s[e]=s[t],s[t]=i}function kS(s,e){return s<e?-1:s>e?1:0}class SS{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const i=[];if(!Ro(e,t))return i;const n=this.toBBox,o=[];for(;t;){for(let r=0;r<t.children.length;r++){const a=t.children[r],l=t.leaf?n(a):a;Ro(e,l)&&(t.leaf?i.push(a):Wl(e,l)?this._all(a,i):o.push(a))}t=o.pop()}return i}collides(e){let t=this.data;if(!Ro(e,t))return!1;const i=[];for(;t;){for(let n=0;n<t.children.length;n++){const o=t.children[n],r=t.leaf?this.toBBox(o):o;if(Ro(e,r)){if(t.leaf||Wl(e,r))return!0;i.push(o)}}t=i.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let i=0;i<e.length;i++)this.insert(e[i]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const i=this.data;this.data=t,t=i}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=sn([]),this}remove(e,t){if(!e)return this;let i=this.data;const n=this.toBBox(e),o=[],r=[];let a,l,c;for(;i||o.length;){if(i||(i=o.pop(),l=o[o.length-1],a=r.pop(),c=!0),i.leaf){const d=CS(e,i.children,t);if(d!==-1)return i.children.splice(d,1),o.push(i),this._condense(o),this}!c&&!i.leaf&&Wl(i,n)?(o.push(i),r.push(a),a=0,l=i,i=i.children[0]):l?(a++,i=l.children[a],c=!1):i=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const i=[];for(;e;)e.leaf?t.push(...e.children):i.push(...e.children),e=i.pop();return t}_build(e,t,i,n){const o=i-t+1;let r=this._maxEntries,a;if(o<=r)return a=sn(e.slice(t,i+1)),nn(a,this.toBBox),a;n||(n=Math.ceil(Math.log(o)/Math.log(r)),r=Math.ceil(o/Math.pow(r,n-1))),a=sn([]),a.leaf=!1,a.height=n;const l=Math.ceil(o/r),c=l*Math.ceil(Math.sqrt(r));Sp(e,t,i,c,this.compareMinX);for(let d=t;d<=i;d+=c){const h=Math.min(d+c-1,i);Sp(e,d,h,l,this.compareMinY);for(let f=d;f<=h;f+=l){const y=Math.min(f+l-1,h);a.children.push(this._build(e,f,y,n-1))}}return nn(a,this.toBBox),a}_chooseSubtree(e,t,i,n){for(;n.push(t),!(t.leaf||n.length-1===i);){let o=1/0,r=1/0,a;for(let l=0;l<t.children.length;l++){const c=t.children[l],d=Ul(c),h=PS(e,c)-d;h<r?(r=h,o=d<o?d:o,a=c):h===r&&d<o&&(o=d,a=c)}t=a||t.children[0]}return t}_insert(e,t,i){const n=i?e:this.toBBox(e),o=[],r=this._chooseSubtree(n,this.data,t,o);for(r.children.push(e),ss(r,n);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(n,o,t)}_split(e,t){const i=e[t],n=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,n);const r=this._chooseSplitIndex(i,o,n),a=sn(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,nn(i,this.toBBox),nn(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=sn([e,t]),this.data.height=e.height+1,this.data.leaf=!1,nn(this.data,this.toBBox)}_chooseSplitIndex(e,t,i){let n,o=1/0,r=1/0;for(let a=t;a<=i-t;a++){const l=ns(e,0,a,this.toBBox),c=ns(e,a,i,this.toBBox),d=ES(l,c),h=Ul(l)+Ul(c);d<o?(o=d,n=a,r=h<r?h:r):d===o&&h<r&&(r=h,n=a)}return n||i-t}_chooseSplitAxis(e,t,i){const n=e.leaf?this.compareMinX:AS,o=e.leaf?this.compareMinY:_S,r=this._allDistMargin(e,t,i,n),a=this._allDistMargin(e,t,i,o);r<a&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const o=this.toBBox,r=ns(e,0,t,o),a=ns(e,i-t,i,o);let l=zo(r)+zo(a);for(let c=t;c<i-t;c++){const d=e.children[c];ss(r,e.leaf?o(d):d),l+=zo(r)}for(let c=i-t-1;c>=t;c--){const d=e.children[c];ss(a,e.leaf?o(d):d),l+=zo(a)}return l}_adjustParentBBoxes(e,t,i){for(let n=i;n>=0;n--)ss(t[n],e)}_condense(e){for(let t=e.length-1,i;t>=0;t--)e[t].children.length===0?t>0?(i=e[t-1].children,i.splice(i.indexOf(e[t]),1)):this.clear():nn(e[t],this.toBBox)}}function CS(s,e,t){if(!t)return e.indexOf(s);for(let i=0;i<e.length;i++)if(t(s,e[i]))return i;return-1}function nn(s,e){ns(s,0,s.children.length,e,s)}function ns(s,e,t,i,n){n||(n=sn(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let o=e;o<t;o++){const r=s.children[o];ss(n,s.leaf?i(r):r)}return n}function ss(s,e){return s.minX=Math.min(s.minX,e.minX),s.minY=Math.min(s.minY,e.minY),s.maxX=Math.max(s.maxX,e.maxX),s.maxY=Math.max(s.maxY,e.maxY),s}function AS(s,e){return s.minX-e.minX}function _S(s,e){return s.minY-e.minY}function Ul(s){return(s.maxX-s.minX)*(s.maxY-s.minY)}function zo(s){return s.maxX-s.minX+(s.maxY-s.minY)}function PS(s,e){return(Math.max(e.maxX,s.maxX)-Math.min(e.minX,s.minX))*(Math.max(e.maxY,s.maxY)-Math.min(e.minY,s.minY))}function ES(s,e){const t=Math.max(s.minX,e.minX),i=Math.max(s.minY,e.minY),n=Math.min(s.maxX,e.maxX),o=Math.min(s.maxY,e.maxY);return Math.max(0,n-t)*Math.max(0,o-i)}function Wl(s,e){return s.minX<=e.minX&&s.minY<=e.minY&&e.maxX<=s.maxX&&e.maxY<=s.maxY}function Ro(s,e){return e.minX<=s.maxX&&e.minY<=s.maxY&&e.maxX>=s.minX&&e.maxY>=s.minY}function sn(s){return{children:s,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Sp(s,e,t,i,n){const o=[e,t];for(;o.length;){if(t=o.pop(),e=o.pop(),t-e<=i)continue;const r=e+Math.ceil((t-e)/i/2)*i;kp(s,r,e,t,n),o.push(e,r,r,t)}}const LS=40,TS=1.4;class Cp{constructor(e){this.tree=new SS(e),this.idMap=new Map}insert(e){if(!je(e))return;const t=typeof e.id=="string"&&e.id.length>0;if(t){const i=this.idMap.get(e.id);if(i){if(i.minX===e.minX&&i.minY===e.minY&&i.maxX===e.maxX&&i.maxY===e.maxY)return;this.remove(i,(n,o)=>n.id===o.id),this.idMap.delete(e.id)}}this.tree.insert(e),t&&this.idMap.set(e.id,e)}load(e){const t=e.filter(je);this.tree.load(t);for(const i of t)typeof i.id=="string"&&i.id.length>0&&this.idMap.set(i.id,i)}remove(e,t){this.tree.remove(e,t??((i,n)=>i===n||i.id===n.id&&i.minX===n.minX&&i.minY===n.minY&&i.maxX===n.maxX&&i.maxY===n.maxY)),typeof e.id=="string"&&e.id.length>0&&this.idMap.delete(e.id)}removeById(e){typeof e=="string"&&e.length>0&&(this.tree.remove({minX:0,minY:0,maxX:0,maxY:0,id:e},(t,i)=>t.id===i.id),this.idMap.delete(e))}getById(e){if(typeof e=="string"&&e.length>0)return this.idMap.get(e)}clear(){this.tree.clear(),this.idMap.clear()}search(e,t){const i=this.tree.search(e);return(t==null?void 0:t.selectionMode)!=="window"?i:i.filter(n=>en(n,e))}collides(e){return this.tree.collides(e)}all(){return this.tree.all()}getStats(){const e=this.tree.all(),t=e.length,i=Gh(e),n=this.idMap.size*LS;return{kind:"rbush",itemCount:t,estimatedBytes:Math.round(i*TS+n)}}}const Na=class Na{constructor(e){this.childIndexes=new Map,this.lazyChildren=new Map,this.rootIndex=e??new Cp}setChildIndex(e,t){this.childIndexes.set(e,t)}removeChildIndex(e){this.childIndexes.delete(e)}insert(e){this.rootIndex.insert(e)}load(e){this.rootIndex.load(e)}remove(e,t){this.rootIndex.remove(e,t),this.childIndexes.delete(e.id),this.lazyChildren.delete(e.id)}removeById(e){this.rootIndex.removeById(e),this.childIndexes.delete(e),this.lazyChildren.delete(e)}clear(){this.rootIndex.clear(),this.childIndexes.forEach(e=>e.clear()),this.childIndexes.clear(),this.lazyChildren.clear()}search(e,t){const i=this.rootIndex.search(e),n=[];for(const o of i){this.materializeLazyChildren(o.id);const r=this.childIndexes.get(o.id);if(!r){((t==null?void 0:t.selectionMode)!=="window"||en(o,e))&&n.push(o);continue}const a=r.search(e),l={...o,children:a};((t==null?void 0:t.selectionMode)!=="window"||this.isWindowSelectionHit(l,e))&&n.push(l)}return n}isWindowSelectionHit(e,t){const i=this.childIndexes.get(e.id);if(!i)return en(e,t);const n=i.all().filter(je);return n.length===0?!1:n.every(o=>en(o,t))}collides(e){return this.rootIndex.collides(e)?this.rootIndex.search(e).some(i=>{this.materializeLazyChildren(i.id);const n=this.childIndexes.get(i.id);return n?n.collides(e):!0}):!1}all(){const e=[];for(const t of this.rootIndex.all()){const i=this.childIndexes.get(t.id);i?e.push(...i.all()):e.push(t)}return e}async allAsync(e){const t=[];let i=0;const n=this.rootIndex.all();for(let o=0;o<n.length;o++){const r=n[o],a=this.childIndexes.get(r.id);if(a){const l=a.all();for(let c=0;c<l.length;c++)t.push(l[c]),i++,e&&(i&2047)===2047&&await e.maybeYield()}else t.push(r),i++,e&&(i&2047)===2047&&await e.maybeYield()}return t}hasChildIndex(e){return this.childIndexes.has(e)||this.lazyChildren.has(e)}setLazyChildSource(e,t){this.lazyChildren.set(e,t)}getRootById(e){var i;const t=this.rootIndex;return(i=t.getById)==null?void 0:i.call(t,e)}getStats(){const e=this.rootIndex.getStats();let t=0,i=0,n=0,o=0;for(const a of this.childIndexes.values()){const l=a.getStats();t+=l.itemCount,i+=l.estimatedBytes,l.kind==="rbush"?n++:l.kind==="linear"&&o++}const r=this.childIndexes.size*64;return{kind:"hierarchical",itemCount:e.itemCount,estimatedBytes:e.estimatedBytes+i+r,rootItemCount:e.itemCount,childIndexCount:this.childIndexes.size,childItemCount:t,rbushChildCount:n,linearChildCount:o}}ensureChildIndex(e,t){const i=Hl(t.filter(je)).map(a=>({...a}));if(i.length===0)return;const n=Fo(i,e);je(n)&&this.insert(n);const o=this.childIndexes.get(e);if(o)return o.clear(),o.load(i),o;const r=this.createIndexBySize(i.length);if(r)return r.load(i),this.setChildIndex(e,r),r}createChildIndex(e){return this.ensureChildIndex(e.objectId,e.wcsChildBoxes)}materializeLazyChildren(e){if(this.childIndexes.has(e))return;const t=this.lazyChildren.get(e);if(!t)return;this.lazyChildren.delete(e);const i=[];for(let r=0;r<t.boxes.length;r++){const a=t.boxes[r];!a||!je(a)||i.push(IS(a,t.matrix))}const n=Hl(i);if(n.length===0)return;const o=this.createIndexBySize(n.length);o&&(o.load(n),this.setChildIndex(e,o))}createIndexBySize(e){if(e>Na.THRESHOLD)return new Cp;if(e>0)return new xS}};Na.THRESHOLD=100;let $l=Na;function IS(s,e){const t=e.elements;let i=1/0,n=1/0,o=-1/0,r=-1/0;const a=[s.minX,s.maxX],l=[s.minY,s.maxY];for(let c=0;c<2;c++)for(let d=0;d<2;d++){const h=a[c],f=l[d],y=t[0]*h+t[4]*f+t[12],g=t[1]*h+t[5]*f+t[13];i=Math.min(i,y),n=Math.min(n,g),o=Math.max(o,y),r=Math.max(r,g)}return{minX:i,minY:n,maxX:o,maxY:r,id:s.id}}class on{static isLayerVisible(e){return!(e.isFrozen||e.isOff)}constructor(e){this._group=new D.AcTrBatchedGroup,this._name=e.name,this._group.name=e.name,this._cachedBox=new V.Box3,this._boxDirty=!0,this._group.visible=on.isLayerVisible(e)}get name(){return this._name}set name(e){this._name=e,this._group.name=e}get box(){return this._boxDirty&&(this.computeBatchBoundingBox(this._cachedBox),this._boxDirty=!1),this._cachedBox}computeBatchBoundingBox(e=new V.Box3,t,i){return this.visible?this._group.computeBoundingBox(e,{excludeObjectIds:t,includeObjectIds:i}):(e.makeEmpty(),e)}get visible(){return this._group.visible}set visible(e){this._group.visible=e}get internalObject(){return this._group}get stats(){const e=this._group.stats;return{name:this._name,...e}}get entityCount(){return this._group.entityCount}update(e){const t=this.visible;this.name=e.name,this._group.visible=on.isLayerVisible(e),t!==this.visible&&(this._boxDirty=!0)}updateMaterial(e,t){this._group.updateMaterial(e,t)}syncAppearanceFromRecord(e,t,i,n){const o=Object.entries(i).some(([r,a])=>a.id!==Number(r));for(const r in i){const a=Number(r),l=i[r];this.updateMaterial(a,l)}this._group.syncAppearanceFromRecord(e,t,i,o,(r,a,l)=>n.getLayerBoundMaterial(r,a,l),n.styleManager)}rebindMaterialsForLayer(e,t,i,n){this._group.rebindMaterialsForLayer(e,t,i,n)}rematerializeLayerTextDrawables(e,t,i){this._group.rematerializeLayerTextDrawables(e,t,i)}rerenderPoints(e,t=0){this._group.rerenderPoints(e,t)}collectPointObjectWorldBoxes(e=new Map){return this._group.collectPointObjectWorldBoxes(e)}repaintForegroundMaterials(e){this._group.repaintForegroundMaterials(e)}repaintBackgroundMaterials(e){this._group.repaintBackgroundMaterials(e)}hasEntity(e){return this._group.hasEntity(e)}setEntityVisible(e,t){return this._group.setEntityVisible(e,t)}getEntityVisible(e){return this._group.getEntityVisible(e)}createPreviewSubset(e,t){return this._group.createPreviewSubset(e,t)}addEntity(e,t=!0){this._group.addEntity(e),this._boxDirty=!0}addDirectEntity(e){const t={objectId:e.objectId,visible:e.visible,position:e.position};let i=!1;return e.kind==="lineFat"?i=this._group.appendLine2Geometry(e.geometry,e.material,e.worldOffset,t):e.kind==="lineBasic"?i=this._group.appendLineGeometry(e.geometry,e.material,e.worldOffset,t):e.kind==="point"?i=this._group.appendPointGeometry(e.geometry,e.material,e.worldOffset,t):e.kind==="mesh"&&(i=this._group.appendMeshGeometry(e.geometry,e.material,e.worldOffset,t)),i&&(this._boxDirty=!0),i}isIntersectWith(e,t){return this._group.isIntersectWith(e,t)}removeEntity(e){const t=this._group.removeEntity(e);return t&&(this._boxDirty=!0),t}updateEntity(e){return e.objectId?this._group.removeEntity(e.objectId)?(this._group.addEntity(e),this._boxDirty=!0,!0):e.visible?(this._group.addEntity(e),this._boxDirty=!0,!0):!1:!1}clear(){this._group.clear(),this._cachedBox.makeEmpty(),this._boxDirty=!0,this._group.removeFromParent()}hover(e){if(e.length!==0){if(e.length===1){this._group.hover(e[0]);return}this._group.hoverMany(e)}}unhover(e){if(e.length!==0){if(e.length===1){this._group.unhover(e[0]);return}this._group.unhoverMany(e)}}select(e){if(e.length!==0){if(e.length===1){this._group.select(e[0]);return}this._group.selectMany(e)}}unselect(e){if(e.length!==0){if(e.length===1){this._group.unselect(e[0]);return}this._group.unselectMany(e)}}setCompareDisplay(e){this._group.setCompareDisplay(e)}}class Ap{constructor(){this._smartExtentsGeneration=0,this.skipSpatialIndex=!1,this.isReference=!1,this._group=new V.Group,this._spatialIndex=new $l,this._cachedBox=new V.Box3,this._cachedSmartExtents=void 0,this._boxDirty=!0,this._extentExcludedObjectIds=new Set,this._layers=new Map,this._insertLayerByObjectId=new Map,this._isLoaded=!1}get internalObject(){return this._group}get layers(){return this._layers}get box(){return this._boxDirty&&this.recomputeBox(),this._cachedBox}computeBatchBoundingBox(e=new V.Box3){return this._boxDirty&&this.recomputeBox(),e.copy(this._cachedBox)}recomputeBox(){this._cachedBox.makeEmpty();const e=new V.Box3;this._layers.forEach(t=>{t.computeBatchBoundingBox(e,this._extentExcludedObjectIds),e.isEmpty()||this._cachedBox.union(e)}),this._boxDirty=!1}invalidateBox(){this._boxDirty=!0,this.clearSmartExtentsCache()}clearSmartExtentsCache(){this._cachedSmartExtents=void 0,this._smartExtentsGeneration++}get isLoaded(){return this._isLoaded}set isLoaded(e){this._isLoaded=e}get visible(){return this._group.visible}set visible(e){this._group.visible=e}get entityCount(){let e=0;return this._layers.forEach(t=>e+=t.entityCount),e}get spatialIndexStats(){return this._spatialIndex.getStats()}get stats(){const e=[];let t=0,i=0,n=0,o=0,r=0,a=0,l=0;const c={line:0,mesh:0,point:0,other:0};return this._layers.forEach(d=>{const h=d.stats;e.push(h),n+=h.line.indexed.geometrySize+h.line.nonIndexed.geometrySize,o+=h.mesh.indexed.geometrySize+h.mesh.nonIndexed.geometrySize,r+=h.point.indexed.geometrySize+h.point.nonIndexed.geometrySize,a+=h.unbatched.geometrySize,l+=h.unbatched.count,c.line+=h.unbatched.byType.line,c.mesh+=h.unbatched.byType.mesh,c.point+=h.unbatched.byType.point,c.other+=h.unbatched.byType.other,t+=h.summary.totalGeometrySize,i+=h.summary.totalMappingSize}),{layers:e,summary:{entityCount:this.entityCount,totalSize:{line:n,mesh:o,point:r,unbatched:a,geometry:t,mapping:i,unbatchedCount:l,unbatchedByType:c}}}}clear(){return this._layers.forEach(e=>{e.clear()}),this._layers.clear(),this._cachedBox.makeEmpty(),this.clearSmartExtentsCache(),this._boxDirty=!0,this._extentExcludedObjectIds.clear(),this._insertLayerByObjectId.clear(),this._spatialIndex.clear(),this}rerenderPoints(e,t=0){this._layers.forEach(i=>{i.rerenderPoints(e,t)}),this.refreshPointSpatialIndexes()}refreshPointSpatialIndexes(){const e=new Map;this._layers.forEach(t=>{t.collectPointObjectWorldBoxes(e)}),e.forEach((t,i)=>{if(this._spatialIndex.hasChildIndex(i)){const n=this._spatialIndex.getRootById(i);if(n){this._spatialIndex.insert({id:i,minX:Math.min(n.minX,t.min.x),minY:Math.min(n.minY,t.min.y),maxX:Math.max(n.maxX,t.max.x),maxY:Math.max(n.maxY,t.max.y)});return}}this.registerSpatialIndexBox(i,t)}),this.clearSmartExtentsCache()}repaintForegroundMaterials(e){this._layers.forEach(t=>t.repaintForegroundMaterials(e))}repaintBackgroundMaterials(e){this._layers.forEach(t=>t.repaintBackgroundMaterials(e))}isIntersectWith(e,t){const i=this.getLayersByObjectId(e);for(let n=0;n<i.length;++n){const o=i[n];if(o&&o.isIntersectWith(e,t))return!0}return D.AcTrMTextRenderer.getInstance().intersectMeshGlyphObjectId(e,t)}hasVisibleEntity(e){return this.getLayersByObjectId(e).some(t=>t.visible)}addEntity(e,t=!0){if(!e.objectId)throw new Error("Object id is required to add one entity!");if(!e.layerName)throw new Error("Layer name is required to add one entity!");const i=this._layers.get(e.layerName);if(!i)throw new Error(`layer '${e.layerName}' doesn't exist!`);i.addEntity(e);const n=e.userData.insertLayerName;return n&&this._insertLayerByObjectId.set(e.objectId,n),t?this._extentExcludedObjectIds.delete(e.objectId):this._extentExcludedObjectIds.add(e.objectId),this.invalidateBox(),this.registerEntitySpatialIndex(e),this}addDirectEntity(e,t=!0){if(!e.objectId)throw new Error("Object id is required to add one entity!");if(!e.layerName)throw new Error("Layer name is required to add one entity!");const i=this._layers.get(e.layerName);if(!i)throw new Error(`layer '${e.layerName}' doesn't exist!`);return i.addDirectEntity(e)?(t?this._extentExcludedObjectIds.delete(e.objectId):this._extentExcludedObjectIds.add(e.objectId),this.invalidateBox(),this.registerSpatialIndexBox(e.objectId,e.wcsBbox),!0):!1}removeEntity(e){let t=!1;for(const[i,n]of this._layers)n.removeEntity(e)&&(t=!0);return t&&(this._spatialIndex.removeById(e),this._extentExcludedObjectIds.delete(e),this._insertLayerByObjectId.delete(e),this.invalidateBox()),t}updateEntity(e){for(const[t,i]of this._layers)if(i.updateEntity(e)){const n=e.userData.insertLayerName;return n&&this._insertLayerByObjectId.set(e.objectId,n),this._spatialIndex.removeById(e.objectId),this.registerEntitySpatialIndex(e),this.invalidateBox(),!0}return!1}hasEntity(e){for(const[t,i]of this._layers)if(i.hasEntity(e))return!0;return!1}setEntityVisible(e,t){let i=!1;for(const[n,o]of this._layers)o.setEntityVisible(e,t)&&(i=!0);return i&&this.invalidateBox(),i}getEntityVisible(e){for(const[t,i]of this._layers){const n=i.getEntityVisible(e);if(n!==void 0)return n}}canCreateEntityPreview(e,t){if(e.length===0)return!1;if((t==null?void 0:t.requireAllEntities)??!0){for(const n of e){if(!this.hasEntity(n))return!1;const o=new V.Box3;if(this.computeEntityPreviewBoundsBox([n],o),o.isEmpty())return!1}return!0}return!this.computeEntityPreviewBoundsBox(e).isEmpty()}findPreviewableEntityIds(e){const t=[];for(const i of e){if(!this.hasEntity(i))continue;const n=new V.Box3;this.computeEntityPreviewBoundsBox([i],n),n.isEmpty()||t.push(i)}return t}computeEntityPreviewBoundsBox(e,t=new V.Box3){if(t.makeEmpty(),e.length===0)return t;const i=new Set(e),n=new V.Box3;for(const o of this._layers.values())o.computeBatchBoundingBox(n,void 0,i),n.isEmpty()||t.union(n);return t}computeEntityPreviewBounds2d(e,t=1.1){const i=this.computeEntityPreviewBoundsBox(e);return D.AcTrEntityPreview.box3ToBounds2d(i,t)}createEntityPreviewRoot(e,t){const i=(t==null?void 0:t.missingEntity)??"fail",n=(t==null?void 0:t.requireAllEntities)??!1;if(n){for(const a of e)if(!this.hasEntity(a))return null}const o=new Map;for(const a of e){const l=this.getLayersByObjectId(a);if(l.length===0){if(n||i==="fail")return null;continue}for(const c of l){let d=o.get(c);d||(d=new Set,o.set(c,d)),d.add(a)}}if(o.size===0)return null;const r=new V.Group;r.name="EntityPreviewRoot";for(const[a,l]of o){const c=[...l],d=a.createPreviewSubset(c,{maxSlots:Math.max(1e4,c.length*8),missingEntity:i});if(!d||d.children.length===0){if(i==="fail")return D.disposePreviewSubset(r),null;continue}r.add(d)}return r.children.length===0?null:r}getLayer(e){return this._layers.get(e)}addLayer(e){const t=e.name;let i=this._layers.get(t);return i===void 0&&(i=new on(e),this._layers.set(t,i),this._group.add(i.internalObject),this._compareDisplayOptions&&i.setCompareDisplay(this._compareDisplayOptions)),i}updateLayer(e){const t=this._layers.get(e.name);if(t){const i=t.visible;t.update(e),i!==t.visible&&this.invalidateBox()}return t}applyInsertLayerFreeze(e,t){const i=[];for(const[n,o]of this._insertLayerByObjectId){if(o!==e)continue;let r=!1;for(const a of this.getLayersByObjectId(n))a.name!==e&&a.setEntityVisible(n,!t)&&(r=!0);r&&i.push(n)}return i.length>0&&this.invalidateBox(),i}hover(e){this.applyHighlightToLayers(e,(t,i)=>t.hover(i))}unhover(e){this.applyHighlightToLayers(e,(t,i)=>t.unhover(i))}select(e){this.applyHighlightToLayers(e,(t,i)=>t.select(i))}unselect(e){this.applyHighlightToLayers(e,(t,i)=>t.unselect(i))}setCompareDisplay(e){this._compareDisplayOptions=e,this._layers.forEach(t=>t.setCompareDisplay(e))}applyHighlightToLayers(e,t){const i=new Map;for(const n of e){const o=this.getLayersByObjectId(n);for(const r of o){const a=i.get(r);a?a.push(n):i.set(r,[n])}}i.forEach((n,o)=>t(o,n))}search(e,t){return this._spatialIndex.search({minX:e.min.x,minY:e.min.y,maxX:e.max.x,maxY:e.max.y},t)}collectSpatialExtentBoxes(){return this._spatialIndex.all().filter(je)}async collectSpatialExtentBoxesAsync(e){const t=await this._spatialIndex.allAsync(e),i=[];for(let n=0;n<t.length;n++){const o=t[n];je(o)&&i.push(o),(n&2047)===2047&&await e.maybeYield()}return i}get cachedSmartExtents(){return this._cachedSmartExtents}get smartExtentsGeneration(){return this._smartExtentsGeneration}set cachedSmartExtents(e){this._cachedSmartExtents=e}getLayersByObjectId(e){const t=[];for(const[i,n]of this._layers)n.hasEntity(e)&&t.push(n);return t}getSpatialIndexChildBoxes(e){const t=e.userData.spatialIndexChildBoxes;if(!(!t||t.length===0))return t}registerEntitySpatialIndex(e){if(this.skipSpatialIndex)return;const t=e.userData.lazySpatialChildren;if(t&&t.boxes.length>0){const o={minX:e.wcsBbox.min.x,minY:e.wcsBbox.min.y,maxX:e.wcsBbox.max.x,maxY:e.wcsBbox.max.y,id:e.objectId};je(o)&&this._spatialIndex.insert(o),this._spatialIndex.setLazyChildSource(e.objectId,t);return}const i=this.getSpatialIndexChildBoxes(e);let n;if(i&&i.length>0){const o=Fo(i);n={minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:e.objectId}}else if(e instanceof D.AcTrGroup&&e.wcsChildBoxes.length>0){const o=Fo(e.wcsChildBoxes.map(r=>({minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY,id:r.id})));n={minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:e.objectId}}else n={minX:e.wcsBbox.min.x,minY:e.wcsBbox.min.y,maxX:e.wcsBbox.max.x,maxY:e.wcsBbox.max.y,id:e.objectId};je(n)&&(this._spatialIndex.insert({minX:n.minX,minY:n.minY,maxX:n.maxX,maxY:n.maxY,id:e.objectId}),i&&i.length>0&&(e.wcsBbox.min.set(n.minX,n.minY,e.wcsBbox.min.z),e.wcsBbox.max.set(n.maxX,n.maxY,e.wcsBbox.max.z))),i?this._spatialIndex.ensureChildIndex(e.objectId,i):e instanceof D.AcTrGroup&&this._spatialIndex.createChildIndex(e)}registerSpatialIndexBox(e,t){if(this.skipSpatialIndex)return;const i={minX:t.min.x,minY:t.min.y,maxX:t.max.x,maxY:t.max.y,id:e};je(i)&&this._spatialIndex.insert(i)}}class _p{constructor(){this._skipSpatialIndex=!1,this._scene=new V.Scene,this._transientManager=new D.AcTrTransientManager(this._scene),this._htmlTransientManager=new D.AcTrHtmlTransientManager(this._scene),this._previewOverlayManager=new D.AcTrPreviewOverlayManager(this._scene),this._layers=new Map,this._layouts=new Map,this._activeLayoutBtrId="",this._modelSpaceBtrId=""}get skipSpatialIndex(){return this._skipSpatialIndex}set skipSpatialIndex(e){this._skipSpatialIndex=e;for(const t of this._layouts.values())t.skipSpatialIndex=e}get htmlTransientManager(){return this._htmlTransientManager}get layers(){return this._layers}get layouts(){return this._layouts}get box(){const e=this.activeLayout;if(!e)return;const t=e.box;return t.isEmpty()?void 0:t}get internalScene(){return this._scene}get modelSpaceBtrId(){return this._modelSpaceBtrId}set modelSpaceBtrId(e){if(this._modelSpaceBtrId=e,!this._layouts.has(e))throw new Error(`[AcTrScene] No layout assiciated with the specified block table record id '${e}'!`)}get activeLayoutBtrId(){return this._activeLayoutBtrId}set activeLayoutBtrId(e){this._activeLayoutBtrId=e,this._layouts.forEach((t,i)=>{t.visible=e==i})}get activeLayout(){if(this._activeLayoutBtrId&&this._layouts.has(this._activeLayoutBtrId))return this._layouts.get(this._activeLayoutBtrId)}get modelSpaceLayout(){if(this._modelSpaceBtrId&&this._layouts.has(this._modelSpaceBtrId))return this._layouts.get(this._modelSpaceBtrId)}get stats(){const e=[];let t=0,i=0,n=0,o=0,r=0,a=0,l=0,c=0;const d={line:0,mesh:0,point:0,other:0};return this._layouts.forEach(h=>e.push(h.stats)),e.forEach(h=>{t+=h.summary.entityCount,i+=h.summary.totalSize.line,n+=h.summary.totalSize.mesh,o+=h.summary.totalSize.point,r+=h.summary.totalSize.unbatched,a+=h.summary.totalSize.geometry,l+=h.summary.totalSize.mapping,c+=h.summary.totalSize.unbatchedCount,d.line+=h.summary.totalSize.unbatchedByType.line,d.mesh+=h.summary.totalSize.unbatchedByType.mesh,d.point+=h.summary.totalSize.unbatchedByType.point,d.other+=h.summary.totalSize.unbatchedByType.other}),{layouts:e,summary:{layoutCount:e.length,entityCount:t,totalSize:{line:i,mesh:n,point:o,unbatched:r,geometry:a,mapping:l,unbatchedCount:c,unbatchedByType:d}}}}addEmptyLayout(e){const t=this._layouts.get(e);if(t)return t;const i=new Ap;return i.skipSpatialIndex=this._skipSpatialIndex,this._layouts.set(e,i),this._scene.add(i.internalObject),i.visible=e==this._activeLayoutBtrId,this._layers.forEach(n=>{i.addLayer(n)}),i}clear(){return this._layouts.forEach(e=>{this._scene.remove(e.internalObject),e.clear()}),this._layouts.clear(),this._layers.clear(),this._transientManager.clear(),this._htmlTransientManager.clear(),this._previewOverlayManager.clear(),this._scene.clear(),this._transientManager=new D.AcTrTransientManager(this._scene),this._htmlTransientManager=new D.AcTrHtmlTransientManager(this._scene),this._previewOverlayManager=new D.AcTrPreviewOverlayManager(this._scene),this}hover(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.hover(e)),this.applyMeshGlyphHighlight(e,"hover",!0),!0)}unhover(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.unhover(e)),this.applyMeshGlyphHighlight(e,"hover",!1),!0)}select(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.select(e)),this.applyMeshGlyphHighlight(e,"select",!0),!0)}unselect(e){return this._layouts.size===0?!1:(this._layouts.forEach(t=>t.unselect(e)),this.applyMeshGlyphHighlight(e,"select",!1),!0)}applyMeshGlyphHighlight(e,t,i){const n=D.AcTrMTextRenderer.getInstance();if(n.getMeshGlyphInstancing())for(const o of e)n.setMeshGlyphHighlight(o,t,i)}setCompareDisplay(e){this._layouts.forEach(t=>{t.isReference||t.setCompareDisplay(e)})}search(e,t){const i=this.activeLayout;return i?i.search(e,t):[]}addLayer(e){const t=[];return this._layers.set(e.name,e),this._layouts.forEach(i=>{const n=i.addLayer(e);n&&t.push(n)}),t}updateLayer(e){const t=this._layers.get(e.name),i=(t==null?void 0:t.isFrozen)??!1,n=[];this._layers.set(e.name,e);const o=new Set;return this._layouts.forEach(r=>{const a=r.updateLayer(e);if(a&&n.push(a),e.isFrozen&&!i)for(const l of r.applyInsertLayerFreeze(e.name,!0))o.add(l);else if(!e.isFrozen&&i)for(const l of r.applyInsertLayerFreeze(e.name,!1))o.add(l)}),{updatedLayers:n,touchedObjectIds:o}}forEachSceneLayer(e,t){this._layouts.forEach(i=>{const n=i.getLayer(e);n&&t(n,i)})}repaintForegroundMaterials(e){this._layouts.forEach(t=>t.repaintForegroundMaterials(e))}repaintBackgroundMaterials(e){this._layouts.forEach(t=>t.repaintBackgroundMaterials(e))}addTransientEntity(e){this._transientManager.update(e)}removeTransientEntity(e){this._transientManager.remove(e)}setTransientEntityVisible(e,t){const i=this._transientManager.get(e);return!i||i.visible===t?!1:(i.visible=t,!0)}updateTransientPreviewTransforms(e){const t=e.map(i=>({id:i.objectId,matrix:i.matrix}));return{webgl:this._transientManager.applyTransforms(t),html:this._htmlTransientManager.applyTransforms(t)}}canCreatePreview(e){const t=this.activeLayout;return t?t.canCreateEntityPreview(e,{requireAllEntities:!0}):!1}computeEntityPreviewBounds2d(e,t=1.1,i="active-first"){const n=this.computeEntityPreviewBoundsBox(e,i);return D.AcTrEntityPreview.box3ToBounds2d(n,t)}findPreviewableEntityIds(e,t="active-first"){if(e.length===0)return[];if(t==="all"){const i=[],n=new Set(e);for(const o of this.getOrderedLayouts("all")){if(n.size===0)break;const r=o.findPreviewableEntityIds([...n]);if(r.length!==0){i.push(...r);for(const a of r)n.delete(a)}}return i}for(const i of this.getOrderedLayouts("active-first")){const n=i.findPreviewableEntityIds(e);if(n.length>0)return n}return[]}createEntityPreviewRoot(e,t){if(e.length===0)return null;const i=(t==null?void 0:t.scope)??"active-first",n={missingEntity:"skip",...t==null?void 0:t.layoutOptions};if(i==="all")return this.mergeEntityPreviewRoots(e,this.getOrderedLayouts("all"),n);for(const o of this.getOrderedLayouts("active-first")){const r=o.createEntityPreviewRoot(e,n);if(r)return r}return null}mergeEntityPreviewRoots(e,t,i){const n=new Set(e),o=new V.Group;o.name="EntityPreviewRoot";for(const r of t){if(n.size===0)break;const a=r.findPreviewableEntityIds([...n]);if(a.length===0)continue;const l=r.createEntityPreviewRoot(a,i);if(l){o.add(l);for(const c of a)n.delete(c)}}return o.children.length>0?o:null}getOrderedLayouts(e){if(e==="all")return[...this._layouts.values()];const t=[],i=this.activeLayout,n=this.modelSpaceLayout;i&&t.push(i),n&&n!==i&&t.push(n);for(const o of this._layouts.values())o!==i&&o!==n&&t.push(o);return t}computeEntityPreviewBoundsBox(e,t="active-first"){const i=new V.Box3,n=new V.Box3;if(t==="all"){const o=new Set(e);for(const r of this.getOrderedLayouts("all")){if(o.size===0)break;const a=r.findPreviewableEntityIds([...o]);if(a.length!==0){r.computeEntityPreviewBoundsBox(a,n),n.isEmpty()||i.union(n);for(const l of a)o.delete(l)}}return i}for(const o of this.getOrderedLayouts("active-first"))if(o.computeEntityPreviewBoundsBox(e,n),!n.isEmpty())return i.copy(n),i;return i.makeEmpty(),i}createPreview(e){const t=this.activeLayout;if(!t)return null;const i=t.createEntityPreviewRoot(e,{missingEntity:"fail",requireAllEntities:!0});return i?this._previewOverlayManager.add(i).id:null}updatePreview(e,t){return this._previewOverlayManager.update(e,t)}removePreview(e){return this._previewOverlayManager.remove(e)}addEntity(e,t=!0){const i=e.ownerId;if(i){let n=this._layouts.get(i);n||(n=this.addEmptyLayout(i)),n.addEntity(e,t)}else p.log.warn("[AcTrSecene] The owner id of one entity cannot be empty!");return this}addDirectEntity(e,t=!0){const i=e.ownerId;if(!i)return p.log.warn("[AcTrSecene] The owner id of one entity cannot be empty!"),!1;let n=this._layouts.get(i);return n||(n=this.addEmptyLayout(i)),n.addDirectEntity(e,t)}removeEntity(e){D.AcTrMTextRenderer.getInstance().removeMeshGlyphInstances(e);for(const[t,i]of this._layouts)if(i.removeEntity(e))return!0;return!1}updateEntity(e){for(const[t,i]of this._layouts)if(i.updateEntity(e))return!0;return!1}hasEntity(e){for(const[t,i]of this._layouts)if(i.hasEntity(e))return!0;return!1}setEntityVisible(e,t){let i=!1;for(const[n,o]of this._layouts)o.setEntityVisible(e,t)&&(i=!0);return i&&D.AcTrMTextRenderer.getInstance().setMeshGlyphVisible(e,t),i}getEntityVisible(e){for(const[t,i]of this._layouts){const n=i.getEntityVisible(e);if(n!==void 0)return n}}}var _t=(s=>(s.Extents="extents",s.Saved="saved",s))(_t||{});let Kl=null;function Pp(s){Kl=s}function os(){if(!Kl)throw new Error("[AcApCommandServices] Not bound. Create AcApDocManager before running commands.");return Kl}var U=(s=>(s[s.Read=0]="Read",s[s.Review=4]="Review",s[s.Write=8]="Write",s))(U||{});class rs extends Error{constructor(){super("session-accessory-mount-skipped"),this.name="AcEdSessionAccessoryMountSkippedError"}}class K{constructor(){this._mode=U.Read,this.recordsUndoStack=!0,this.sessionAccessory=null,this._globalName="",this._localName="",this._userData={}}get userData(){return this._userData}get globalName(){return this._globalName}set globalName(e){this._globalName=e}get localName(){return this._localName}set localName(e){this._localName=e}get mode(){return this._mode}set mode(e){this._mode=e}onCommandWillStart(e){}onCommandEnded(e){}async trigger(e){const i=e.doc.database.transactionManager,n=this.shouldRecordUndoStack(e);let o=!1,r=!1;const a=this.sessionAccessory;n&&(i.startUndoMark(this.globalName||this.localName),i.startTransaction(),o=!0);try{if(this.onCommandWillStart(e),e.view.editor.events.commandWillStart.dispatch({command:this}),a)try{const l=e.view.sessionAccessoryHost,c={host:l.host,type:l.type,view:e.view},d={command:this,accessory:a,options:c,source:"command"};e.view.editor.events.beforeMountSessionAccessory.dispatch(d),a.mount(c),e.view.editor.events.afterMountSessionAccessory.dispatch(d),r=!0}catch(l){l instanceof rs}await this.execute(e)}catch(l){throw o&&i.hasTransaction()&&i.abortTransaction(),o&&(i.cancelUndoMark(),o=!1),l}finally{if(r&&a)try{const l={command:this,accessory:a,source:"command"};e.view.editor.events.beforeUnmountSessionAccessory.dispatch(l),a.unmount(),e.view.editor.events.afterUnmountSessionAccessory.dispatch(l)}catch{}o&&i.hasTransaction()&&(i.commitTransaction(),i.endUndoMark(),o=!1,Q.emit("session-db-edit-committed",{}),di()),e.view.editor.events.commandEnded.dispatch({command:this}),this.onCommandEnded(e)}}shouldRecordUndoStack(e){return this.recordsUndoStack?e.doc.openMode>=U.Review&&this.mode>=U.Review:!1}async execute(e){}showMessage(e,t="info",i){os().showMessage(e,t,i)}notify(e,t="info"){Q.emit("message",{message:e,type:t})}showBusyIndicator(e){os().showBusyIndicator(e)}hideBusyIndicator(){os().hideBusyIndicator()}async withBusyIndicator(e,t){return os().withBusyIndicator(e,t)}}class MS{constructor(e){this._index=0,this._commands=[],e.forEach(t=>{const i=t.groupName;t.commandsByGlobalName.forEach(n=>{this._commands.push({command:n,commandGroup:i})})})}[Symbol.iterator](){return this}get command(){return this._index<this._commands.length?this._commands[this._index].command:null}get commandGroup(){return this._index<this._commands.length?this._commands[this._index].commandGroup:null}next(){for(;this._index<this._commands.length;){const e=this._commands[this._index];return this._index+=1,{value:e,done:!1}}return{value:null,done:!0}}}const Dn=class Dn{constructor(){this._activeCommand=null,this._activeView=null,this._activePromise=null,this._commandsByGroup=[],this._systemCommandGroup={groupName:Dn.SYSTEMT_COMMAND_GROUP_NAME,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._defaultCommandGroup={groupName:Dn.DEFAUT_COMMAND_GROUP_NAME,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._commandsByGroup.push(this._systemCommandGroup),this._commandsByGroup.push(this._defaultCommandGroup)}addCommand(e,t,i,n,o){if(e=e.toUpperCase(),t=t.toUpperCase(),i=i.toUpperCase(),!t)throw new Error("[AcEdCommandStack] The global name of the command is required!");i||(i=t);let r=this._defaultCommandGroup;if(e){const l=this._commandsByGroup.find(c=>c.groupName==e);l?r=l:(r={groupName:e,commandsByGlobalName:new Map,commandsByLocalName:new Map,commandsByAlias:new Map,aliasesByCommand:new Map},this._commandsByGroup.push(r))}if(r.commandsByGlobalName.has(t))throw new Error(`[AcEdCommandStack] The command with global name '${t}' already exists!`);if(r.commandsByLocalName.has(i))throw new Error(`[AcEdCommandStack] The command with local name '${i}' already exists!`);const a=this.normalizeAliases(o,t,i);for(const l of a){if(r.commandsByAlias.has(l))throw new Error(`[AcEdCommandStack] The command alias '${l}' already exists!`);if(r.commandsByGlobalName.has(l)||r.commandsByLocalName.has(l))throw new Error(`[AcEdCommandStack] The command alias '${l}' conflicts with existing command name!`)}r.commandsByGlobalName.set(t,n),r.commandsByLocalName.set(i,n),a.forEach(l=>{r.commandsByAlias.set(l,n)}),r.aliasesByCommand.set(n,new Set(a)),n.globalName=t,n.localName=i}iterator(){return new MS(this._commandsByGroup)}searchCommandsByPrefix(e,t){e=e.toUpperCase();const i=[],n=this.iterator();let o=n.next();for(;!o.done;){const{command:r}=o.value;(r.globalName.startsWith(e)||r.localName.startsWith(e)||this.commandAliasStartsWith(o.value.commandGroup,r,e))&&(t===void 0||this.isModeCompatible(t,r.mode))&&i.push(o.value),o=n.next()}return i}lookupGlobalCmd(e,t){e=e.toUpperCase();let i;for(const n of this._commandsByGroup)if(i=n.commandsByGlobalName.get(e),i||(i=n.commandsByAlias.get(e)),i){if(t===void 0||this.isModeCompatible(t,i.mode))break;i=void 0}return i}lookupLocalCmd(e,t){e=e.toUpperCase();let i;for(const n of this._commandsByGroup)if(i=n.commandsByLocalName.get(e),i||(i=n.commandsByAlias.get(e)),i){if(t===void 0||this.isModeCompatible(t,i.mode))break;i=void 0}return i}removeCmd(e,t){e=e.toUpperCase(),t=t.toUpperCase();for(const i of this._commandsByGroup)if(i.groupName==e){const n=i.commandsByGlobalName.get(t);if(!n)return!1;i.commandsByGlobalName.delete(t),i.commandsByLocalName.delete(n.localName);const o=i.aliasesByCommand.get(n);return o==null||o.forEach(r=>{i.commandsByAlias.delete(r)}),i.aliasesByCommand.delete(n),!0}return!1}removeGroup(e){e=e.toUpperCase();const t=this._commandsByGroup.findIndex(i=>i.groupName===e);return t>=0?(this._commandsByGroup.splice(t,1),!0):!1}get activeCommand(){return this._activeCommand}markActive(e,t,i){this._activeCommand=e,this._activeView=t,this._activePromise=i}async runActive(e,t,i){let n;const o=new Promise(r=>{n=r});this.markActive(e,t,o);try{await i()}finally{this.clearActive(e),n()}}clearActive(e){this._activeCommand===e&&(this._activeCommand=null,this._activeView=null,this._activePromise=null)}async cancelActive(){const e=this._activeView,t=this._activePromise;if(this._activeCommand&&(e==null||e.editor.cancelActiveInput(),t))try{await t}catch{}}removeAll(){this._defaultCommandGroup.commandsByGlobalName.clear(),this._defaultCommandGroup.commandsByLocalName.clear(),this._defaultCommandGroup.commandsByAlias.clear(),this._defaultCommandGroup.aliasesByCommand.clear(),this._systemCommandGroup.commandsByGlobalName.clear(),this._systemCommandGroup.commandsByLocalName.clear(),this._systemCommandGroup.commandsByAlias.clear(),this._systemCommandGroup.aliasesByCommand.clear(),this._commandsByGroup=[this._systemCommandGroup,this._defaultCommandGroup]}getCommandAliases(e,t){const i=t==null?void 0:t.trim().toUpperCase(),n=i?this._commandsByGroup.filter(o=>o.groupName===i):this._commandsByGroup;for(const o of n){const r=o.aliasesByCommand.get(e);if(r)return[...r]}return[]}commandAliasStartsWith(e,t,i){const n=this._commandsByGroup.find(r=>r.groupName===e);if(!n)return!1;const o=n.aliasesByCommand.get(t);if(!o)return!1;for(const r of o)if(r.startsWith(i))return!0;return!1}normalizeAliases(e,t,i){const n=Array.isArray(e)?e:e?[e]:[],o=new Set;return n.forEach(r=>{const a=r.trim().toUpperCase();a&&a!==t&&a!==i&&o.add(a)}),[...o]}isModeCompatible(e,t){return e>=t}};Dn.SYSTEMT_COMMAND_GROUP_NAME="ACAD",Dn.DEFAUT_COMMAND_GROUP_NAME="USER";let Me=Dn;const Li="draw-style";class Ep{constructor(){this.providers=new Map}set(e,t){this.providers.set(e,t)}get(e){return this.providers.get(e)}has(e){return this.providers.has(e)}delete(e){return this.providers.delete(e)}}function OS(s){Q.emit("message",{message:s,type:"warning"})}class jo{constructor(e,t,i=1e3,n=0){this.condition=e,this.action=t,this.checkInterval=i,this.timeout=n,this.timerId=null,this.timeoutId=null}start(){if(this.timerId===null){if(this.condition()){this.executeAndStop();return}this.timerId=setInterval(()=>{this.condition()&&this.executeAndStop()},this.checkInterval),this.timeout>0&&(this.timeoutId=setTimeout(()=>{p.log.warn("AcEdConditionWaiter: Timeout reached."),this.executeAndStop()},this.timeout))}}stop(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}executeAndStop(){this.stop(),this.action()}isRunning(){return this.timerId!==null}}const DS={light:{"--ml-ui-text":"#303133","--ml-ui-text-muted":"#606266","--ml-ui-bg":"#ffffff","--ml-ui-border":"#dcdfe6","--ml-ui-shadow":"0 2px 6px rgba(0, 0, 0, 0.12)","--ml-ui-overlay":"rgba(0, 0, 0, 0.18)","--ml-ui-accent":"#409eff","--ml-ui-accent-alt":"#909399","--ml-ui-danger":"#f56c6c","--ml-ui-canvas-line":"#409eff","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, #409eff 20%, transparent)"},dark:{"--ml-ui-text":"#e5eaf3","--ml-ui-text-muted":"#cfd3dc","--ml-ui-bg":"#1d1e1f","--ml-ui-border":"#4c4d4f","--ml-ui-shadow":"0 6px 18px rgba(0, 0, 0, 0.35)","--ml-ui-overlay":"rgba(0, 0, 0, 0.5)","--ml-ui-accent":"#409eff","--ml-ui-accent-alt":"#909399","--ml-ui-danger":"#f56c6c","--ml-ui-canvas-line":"#409eff","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, #409eff 20%, transparent)"}},NS={light:{"--ml-ui-text":"var(--el-text-color-primary, #303133)","--ml-ui-text-muted":"var(--el-text-color-regular, #606266)","--ml-ui-bg":"var(--el-bg-color-overlay, #ffffff)","--ml-ui-border":"var(--el-border-color, #dcdfe6)","--ml-ui-shadow":"var(--el-box-shadow, 0 2px 6px rgba(0, 0, 0, 0.12))","--ml-ui-overlay":"var(--el-overlay-color-lighter, rgba(0, 0, 0, 0.18))","--ml-ui-accent":"var(--el-color-primary, #409eff)","--ml-ui-accent-alt":"var(--el-color-info, #909399)","--ml-ui-danger":"var(--el-color-danger, #f56c6c)","--ml-ui-canvas-line":"var(--el-color-primary, #409eff)","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, var(--el-color-primary, #409eff) 20%, transparent)"},dark:{"--ml-ui-text":"var(--el-text-color-primary, #e5eaf3)","--ml-ui-text-muted":"var(--el-text-color-regular, #cfd3dc)","--ml-ui-bg":"var(--el-bg-color-overlay, #1d1e1f)","--ml-ui-border":"var(--el-border-color, #4c4d4f)","--ml-ui-shadow":"var(--el-box-shadow, 0 6px 18px rgba(0, 0, 0, 0.35))","--ml-ui-overlay":"var(--el-overlay-color-lighter, rgba(0, 0, 0, 0.5))","--ml-ui-accent":"var(--el-color-primary, #409eff)","--ml-ui-accent-alt":"var(--el-color-info, #909399)","--ml-ui-danger":"var(--el-color-danger, #f56c6c)","--ml-ui-canvas-line":"var(--el-color-primary, #409eff)","--ml-ui-canvas-fill":"rgba(64, 158, 255, 0.2)","--ml-ui-canvas-fill-mix":"color-mix(in srgb, var(--el-color-primary, #409eff) 20%, transparent)"}},Yl=new Set;let Zl=0;function Vo(s){return Yl.add(s),()=>{Yl.delete(s)}}function ot(s,e=document.documentElement,t){const i=t!=null&&t.isolated?DS[s]:NS[s];if(Object.keys(i).forEach(o=>{e.style.setProperty(o,i[o])}),e.setAttribute("data-ml-ui-theme",s),e.style.colorScheme=s,!(!(e===document.documentElement||e.hasAttribute("data-ml-ui-theme-root"))||Zl>0)){Zl++;try{for(const o of[...Yl])try{o(s)}catch{}}finally{Zl--}}}function Lp(s){if(s.classList.contains("ml-theme-dark")||s.classList.contains("dark"))return"dark";if(s.classList.contains("ml-theme-light"))return"light"}function Oe(s){let e=s;for(;e;){const o=e.getAttribute("data-ml-ui-theme");if(o==="light"||o==="dark")return o;const r=Lp(e);if(r)return r;e=e.parentElement}const t=document.documentElement.getAttribute("data-ml-ui-theme");if(t==="light"||t==="dark")return t;const i=document.documentElement.getAttribute("data-mlcad-theme");if(i==="light"||i==="dark")return i;const n=Lp(document.documentElement);return n||"dark"}const Go=600,Xl=`(max-width: ${Go}px)`,rn=440,ql=24,Ho=`calc(100vw - ${ql}px)`,BS=1,Tp=2,Ip=45,Mp=46,Op=47,Dp=48;function as(){var s;return((s=window.matchMedia)==null?void 0:s.call(window,Xl).matches)??!1}const Np=960,Jl=`(max-width: ${Np}px)`;function Bp(){var s;return((s=window.matchMedia)==null?void 0:s.call(window,Jl).matches)??!1}const Fp="(pointer: coarse)",FS=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;function zp(){var e;if(typeof navigator>"u")return!1;const s=navigator;return FS.test(s.userAgent||"")||s.platform==="MacIntel"&&(s.maxTouchPoints??0)>1?!0:((e=window.matchMedia)==null?void 0:e.call(window,Fp).matches)??!1}function ls(){return as()?"phone":Bp()?"pad":"desktop"}function Qt(){return ls()!=="desktop"||zp()}function Rp(s){return as()?!0:s&&Qt()}function cs(s){if(typeof window.matchMedia!="function")return()=>{};const e=window.matchMedia(Xl),t=window.matchMedia(Jl);let i=ls();const n=()=>{const o=ls();o!==i&&(i=o,s(o))};return e.addEventListener("change",n),t.addEventListener("change",n),()=>{e.removeEventListener("change",n),t.removeEventListener("change",n)}}const jp="--ml-ui-grip-size",Vp="--ml-ui-grip-normal",Gp="--ml-ui-grip-hot",Hp=8,zS="#0080ff",RS="#ff0000";function Ql(s,e){s.style.setProperty(jp,`${e.size}px`),s.style.setProperty(Vp,e.colorCss),s.style.setProperty(Gp,e.hotColorCss)}function Up(s){const e=new p.AcCmColor(p.AcCmColorMethod.ByACI,s);return e.cssColor??`rgb(${e.red}, ${e.green}, ${e.blue})`}function ec(s){const e=p.AcDbSysVarManager.instance(),t=e.getVar(p.AcDbSystemVariables.GRIPSIZE,s),i=e.getVar(p.AcDbSystemVariables.GRIPCOLOR,s),n=e.getVar(p.AcDbSystemVariables.GRIPHOT,s);return{size:t>0&&Number.isFinite(t)?t:Hp,colorCss:Up(i),hotColorCss:Up(n)}}const Wp=new Set([p.AcDbSystemVariables.GRIPSIZE.toLowerCase(),p.AcDbSystemVariables.GRIPCOLOR.toLowerCase(),p.AcDbSystemVariables.GRIPHOT.toLowerCase()]);function $p(s){return Wp.has(s.toLowerCase())}const jS={isDebug:!1,isShowCommandLine:!0,isShowCoordinate:!0,isShowEntityInfo:!1,isShowLanguageSelector:!0,isShowRibbon:!0,isShowToolbar:!0,isShowShortCutToolbar:!0,isShowStats:!1,fontMapping:{},osnapModes:p.acdbOsnapModesToMask([p.AcDbOsnapMode.EndPoint,p.AcDbOsnapMode.MidPoint,p.AcDbOsnapMode.Center,p.AcDbOsnapMode.Quadrant,p.AcDbOsnapMode.Intersection,p.AcDbOsnapMode.Nearest]),hideTouchPointTutorial:!1,touchPointTutorialSnoozeDate:null,useSimulatedMouseOnTouch:!0},Kp="settings";function Yp(s){const e={...s};let t=!1;return!("isShowRibbon"in e)&&typeof e.isShowMainMenu=="boolean"&&(e.isShowRibbon=e.isShowMainMenu,t=!0),"isShowMainMenu"in e&&(delete e.isShowMainMenu,t=!0),"isShowFileName"in e&&(delete e.isShowFileName,t=!0),{settings:e,migrated:t}}const Yi=class Yi{constructor(){this.events={modified:new p.AcCmEventManager},this._user={},this._session={},this.reloadFromStorage()}static configure(e){e.storageKey!=null&&e.storageKey!==""&&(this._storageKey=e.storageKey),this._instance&&this._instance.reloadFromStorage()}static get instance(){return this._instance||(this._instance=new Yi),this._instance}static resetInstanceForTesting(){this._instance=void 0,this._storageKey=Kp}reloadFromStorage(){this._user=this.readUserFromStorage(),this._session={}}readUserFromStorage(){const e=localStorage.getItem(Yi._storageKey);if(e==null)return{};let t;try{t=JSON.parse(e)}catch{return{}}const{settings:i,migrated:n}=Yp(t);return n&&localStorage.setItem(Yi._storageKey,JSON.stringify(i)),i}persistUser(){localStorage.setItem(Yi._storageKey,JSON.stringify(this._user))}computeEffective(){return{...jS,...this._user,...this._session}}set(e,t,i){const n=(i==null?void 0:i.persist)!==!1;this._session[e]=t,n&&(this._user[e]=t,this.persistUser()),this.events.modified.dispatch({key:e,value:t})}apply(e,t){for(const i of Object.keys(e)){const n=e[i];n!==void 0&&this.set(i,n,t)}}clearSessionOverride(e){Object.prototype.hasOwnProperty.call(this._session,e)&&(delete this._session[e],this.events.modified.dispatch({key:e,value:this.get(e)}))}get(e){return this.settings[e]}toggle(e){const t=this.get(e);this.set(e,!t)}get isDebug(){return this.get("isDebug")}set isDebug(e){this.set("isDebug",e)}get isShowCommandLine(){return this.get("isShowCommandLine")}set isShowCommandLine(e){this.set("isShowCommandLine",e)}get isShowCoordinate(){return this.get("isShowCoordinate")}set isShowCoordinate(e){this.set("isShowCoordinate",e)}get isShowEntityInfo(){return this.get("isShowEntityInfo")}set isShowEntityInfo(e){this.set("isShowEntityInfo",e)}get isShowLanguageSelector(){return this.get("isShowLanguageSelector")}set isShowLanguageSelector(e){this.set("isShowLanguageSelector",e)}get isShowRibbon(){return this.get("isShowRibbon")}set isShowRibbon(e){this.set("isShowRibbon",e)}get isShowToolbar(){return this.get("isShowToolbar")}set isShowToolbar(e){this.set("isShowToolbar",e)}get isShowShortCutToolbar(){return this.get("isShowShortCutToolbar")}set isShowShortCutToolbar(e){this.set("isShowShortCutToolbar",e)}get isShowStats(){return this.get("isShowStats")}set isShowStats(e){this.set("isShowStats",e)}get fontMapping(){return this.get("fontMapping")}set fontMapping(e){this.set("fontMapping",e)}setFontMapping(e,t){const i={...this.get("fontMapping")};i[e]=t,this.set("fontMapping",i)}get osnapModes(){return this.get("osnapModes")}set osnapModes(e){this.set("osnapModes",e)}get settings(){return this.computeEffective()}};Yi._storageKey=Kp;let le=Yi;const VS=1e-10,ds=32;function Uo(s,e,t,i){return Math.hypot(s-t,e-i)}function GS(s,e,t,i,n,o){const r=n-t,a=o-i,l=r*r+a*a;if(l<1e-18)return Uo(s,e,t,i);let c=((s-t)*r+(e-i)*a)/l;return c=Math.max(0,Math.min(1,c)),Uo(s,e,t+c*r,i+c*a)}function HS(s,e,t){if(Math.abs(t)>VS)try{const i=new p.AcGeCircArc2d(s,e,t);return!(i.radius>0)||!Number.isFinite(i.radius)?void 0:i}catch{return}}function an(s){return{x:s.x,y:s.y,z:s.z??0}}function US(s,e){const t=new p.AcGePoint3d(s.x,s.y,s.z).applyMatrix4(e);return an(t)}function WS(s){return typeof s!="string"?s:s.replace(/#\d+$/,"")}function $S(s){if(typeof s!="string")return 0;const e=/#(\d+)$/.exec(s);return e?Number(e[1]):0}function KS(s){var i;if(s instanceof p.AcDb2dPolyline){const n=s.numberOfVertices;return Array.from({length:n},(o,r)=>{const a=s.getPointAt(r);return{x:a.x,y:a.y,bulge:s.getBulgeAt(r)}})}const e=(i=s._geo)==null?void 0:i.vertices;if(e&&e.length>0)return e.map(n=>({x:n.x,y:n.y,bulge:n.bulge??0}));const t=s.numberOfVertices;return Array.from({length:t},(n,o)=>{const r=s.getPoint2dAt(o);return{x:r.x,y:r.y,bulge:0}})}function YS(s,e){const t=KS(s);if(t.length<2)return;const i=s.closed?t.length:t.length-1;let n=Number.POSITIVE_INFINITY,o;for(let r=0;r<i;r++){const a=t[r],l=t[(r+1)%t.length],c=HS(a,l,a.bulge);let d;if(c){const h=c.nearestPoint(e);d=Uo(e.x,e.y,h.x,h.y)}else d=GS(e.x,e.y,a.x,a.y,l.x,l.y);d<n&&(n=d,o=c)}if(o)return an({x:o.center.x,y:o.center.y,z:s.elevation})}function tc(s,e,t){const i=[];return s.subGetOsnapPoints(p.AcDbOsnapMode.Center,e,e,i,t),i.map(n=>an(n))}function ZS(s){return new p.AcGeMatrix3d().setFromExtrusionDirection(s.normal).multiply(s.blockTransform)}function ic(s,e,t=new p.AcGeMatrix3d,i){const n=$S(e);return Zp(s,WS(e),n,t,i,n===0&&i!=null).found}function XS(s,e,t=1e-4){return e.x>=s.min.x-t&&e.x<=s.max.x+t&&e.y>=s.min.y-t&&e.y<=s.max.y+t}function Zp(s,e,t,i,n,o){const r=s.blockTableRecord;if(!r)return{found:void 0,remaining:t};const a=new p.AcGeMatrix3d().multiplyMatrices(i,ZS(s));let l;o&&n!=null&&t===0&&(l=new p.AcGePoint3d(n).applyMatrix4(a.clone().invert()));for(const c of r.newIterator()){if(c.objectId===e){if(t>0){t-=1;continue}return{found:{entity:c,transform:a},remaining:0}}if(c instanceof p.AcDbBlockReference){if(o&&t===0&&l){const h=c.geometricExtents;if(!h.isEmpty()&&!XS(h,l))continue}const d=Zp(c,e,t,a,n,o);if(d.found)return d;t=d.remaining}}return{found:void 0,remaining:t}}function qS(s,e,t){if(!t)return tc(s,e);const i=ic(s,t,new p.AcGeMatrix3d,e);if(!i)return tc(s,e,t);const n=i.transform.clone().invert(),o=new p.AcGePoint3d(e).applyMatrix4(n);return nc(i.entity,o).map(r=>US(r,i.transform))}function nc(s,e,t){if(s instanceof p.AcDbBlockReference)return qS(s,e,t);if(s instanceof p.AcDbCircle)return[an(s.center)];if(s instanceof p.AcDbArc)return[an(s.center)];if(s instanceof p.AcDbEllipse)return[an(s.center)];if(s instanceof p.AcDbPolyline||s instanceof p.AcDb2dPolyline){const i=YS(s,e);return i?[i]:[]}return tc(s,e,t)}function JS(s,e){if(e.length===0)return s.length<=ds?s:s.slice(-ds);const t=[...s];let i=s.length>ds;for(const n of e){const o=t.findIndex(r=>Xp(r,n));if(o>=0){if(o!==t.length-1){const[r]=t.splice(o,1);t.push(r),i=!0}}else t.push(n),i=!0}return t.length>ds?t.slice(t.length-ds):i?t:s}function Xp(s,e,t=1e-8){return Uo(s.x,s.y,e.x,e.y)<=t}const QS=20,sc=16,e0=48,t0=8,i0=32;function n0(s,e){return s.min.x<=e.max.x&&s.max.x>=e.min.x&&s.min.y<=e.max.y&&s.max.y>=e.min.y}function qp(s){return new p.AcGeBox3d({x:s.minX,y:s.minY,z:-1/0},{x:s.maxX,y:s.maxY,z:1/0})}function Jp(s){return s.equals(p.AcGeMatrix3d.IDENTITY)}function Qp(s,e){if(Jp(e))return s;if(s instanceof p.AcDbLine)return new p.AcDbLine(new p.AcGePoint3d(s.startPoint).applyMatrix4(e),new p.AcGePoint3d(s.endPoint).applyMatrix4(e));if(s instanceof p.AcDbCircle){const t=e.getMaxScaleOnAxis();return!(t>0)||!Number.isFinite(t)?void 0:new p.AcDbCircle(new p.AcGePoint3d(s.center).applyMatrix4(e),s.radius*t,s.normal)}if(s instanceof p.AcDbArc){const t=e.getMaxScaleOnAxis();return!(t>0)||!Number.isFinite(t)?void 0:new p.AcDbArc(new p.AcGePoint3d(s.center).applyMatrix4(e),s.radius*t,s.startAngle,s.endAngle,s.normal)}}function s0(s){const e=s.subGetIntersectCurves().length;return e>0&&e<=i0}function oc(s,e){return Jp(e)?s:s.map(t=>new p.AcGePoint3d(t.x,t.y,t.z).applyMatrix4(e))}function o0(s,e){if(s.transform.equals(e.transform))return oc(s.entity.intersectWith(e.entity),s.transform);const t=new p.AcGeMatrix3d().multiplyMatrices(s.transform.clone().invert(),e.transform),i=Qp(e.entity,t);if(i)return oc(s.entity.intersectWith(i),s.transform);const n=new p.AcGeMatrix3d().multiplyMatrices(e.transform.clone().invert(),s.transform),o=Qp(s.entity,n);return o?oc(e.entity.intersectWith(o),e.transform):[]}class De{constructor(e){this._acquiredCenters=[],this._view=e}get acquiredCenterMarks(){return this._acquiredCenters}clearAcquiredCenters(){this._acquiredCenters=[]}static displayCenterMarks(e,t){return!t||t.type!==p.AcDbOsnapMode.Center?e:e.filter(i=>!Xp(i,t))}resolve(e){const t=e.hitRadiusPx??QS,i=e.lastPoint??e.cursorWcs,n=this._view.screenToWorld({x:0,y:0}),o=this._view.screenToWorld({x:t,y:0}),r=Math.abs(o.x-n.x),a=this.collectOsnapPoints(e.cursorWcs,i,t,r);for(const h of this._acquiredCenters)a.push({x:h.x,y:h.y,z:h.z,type:p.AcDbOsnapMode.Center});if(a.length===0)return;let l=Number.MAX_VALUE,c=Number.MAX_VALUE,d=-1;for(let h=0;h<a.length;h++){const f=a[h],y=e.cursorWcs.x-f.x,g=e.cursorWcs.y-f.y,b=Math.hypot(y,g);if(b>=r)continue;const w=De.osnapModePriority(f.type);(w<l||w===l&&b<c)&&(l=w,c=b,d=h)}return d!==-1?a[d]:void 0}static osnapModeToMarkerType(e){switch(e){case p.AcDbOsnapMode.EndPoint:return"rect";case p.AcDbOsnapMode.MidPoint:return"triangle";case p.AcDbOsnapMode.Center:return"circle";case p.AcDbOsnapMode.Quadrant:return"diamond";case p.AcDbOsnapMode.Nearest:return"x";case p.AcDbOsnapMode.Intersection:return"intersection";default:return"rect"}}static osnapModePriority(e){switch(e){case p.AcDbOsnapMode.EndPoint:case p.AcDbOsnapMode.MidPoint:case p.AcDbOsnapMode.Center:case p.AcDbOsnapMode.Intersection:return 0;case p.AcDbOsnapMode.Quadrant:return 1;case p.AcDbOsnapMode.Nearest:return 2;default:return 1}}collectOsnapPointsByMode(e,t,i,n,o,r){const a=i.length;e.subGetOsnapPoints(t,n,o,i,r);for(let l=a;l<i.length;l++)i[l].type=t}collectOsnapPointsInAvailableModes(e,t,i,n,o){p.acdbMaskToOsnapModes(le.instance.osnapModes).forEach(a=>{a!==p.AcDbOsnapMode.Intersection&&this.collectOsnapPointsByMode(e,a,t,i,n,o)})}collectOsnapPointsFromResolvedSubEntity(e,t,i,n){const o=e.transform.clone().invert(),r=new p.AcGePoint3d(i).applyMatrix4(o),a=new p.AcGePoint3d(n).applyMatrix4(o),l=p.acdbMaskToOsnapModes(le.instance.osnapModes),c=e.entity instanceof p.AcDbBlockReference;for(const d of l){if(d===p.AcDbOsnapMode.Intersection)continue;const h=[];if(c){e.entity.subGetOsnapPoints(d,r,a,h,e.entity.objectId,e.transform);for(const f of h)t.push({x:f.x,y:f.y,z:f.z??0,type:d})}else{e.entity.subGetOsnapPoints(d,r,a,h);for(const f of h){const y=new p.AcGePoint3d(f).applyMatrix4(e.transform);t.push({x:y.x,y:y.y,z:y.z,type:d})}}}}static childBoxHint(e){if(!(e.minX==null||e.minY==null||e.maxX==null||e.maxY==null))return{x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2,z:0}}collectIntersectionOsnapPoints(e,t,i,n,o){const r=[],a=new Set,l=f=>{r.length>=sc||a.has(f.key)||f.box.isEmpty()||s0(f.entity)&&(a.add(f.key),r.push(f))};for(const f of e){if(r.length>=sc)break;if(!ts(f))continue;const y=De.getEntityById(t,f.id);if(!y)continue;const g=f.viewportId;if(!(g!=null&&!this._view.getViewportCoordinateMapper(g))){if(f.children&&f.children.length>0){for(const b of f.children){if(r.length>=sc)break;const w=`${f.id}:${b.id}`;if(y instanceof p.AcDbBlockReference){const S=ic(y,b.id,new p.AcGeMatrix3d,De.childBoxHint(b));if(!S)continue;l({key:w,box:qp(b),entity:S.entity,transform:S.transform,viewportId:g})}else l({key:w,box:qp(b),entity:y,transform:new p.AcGeMatrix3d,viewportId:g})}continue}y instanceof p.AcDbBlockReference||l({key:f.id,box:y.geometricExtents,entity:y,transform:new p.AcGeMatrix3d,viewportId:g})}}if(r.length<2)return;const c=o*o,d=performance.now();let h=0;for(let f=0;f<r.length;f++)for(let y=f+1;y<r.length;y++){if(h>=e0||performance.now()-d>t0)return;if(r[f].viewportId!==r[y].viewportId||!n0(r[f].box,r[y].box))continue;h++;const g=r[f].viewportId,b=g!=null?this._view.getViewportCoordinateMapper(g):void 0;if(g!=null&&!b)continue;const w=o0(r[f],r[y]);for(const S of w){const x=b?b.modelToPaper(S):S;if(b&&!b.containsPaperPoint(x))continue;const _=x.x-n.x,C=x.y-n.y;_*_+C*C>c||i.push({x:x.x,y:x.y,z:S.z,type:p.AcDbOsnapMode.Intersection})}}}static getEntityById(e,t){const i=e.getObjectById(t);return i instanceof p.AcDbEntity?i:void 0}collectOsnapPoints(e,t,i,n){const o=this._view.pick(e,i),r=p.acdbHostApplicationServices().workingDatabase,a=[],l=p.AcGeGeometryUtil.point2dToPoint3d(e),c=p.AcGeGeometryUtil.point2dToPoint3d(t);return o.forEach(d=>{const h=De.getEntityById(r,d.id);if(!h)return;const f=d.viewportId!=null?this._view.getViewportCoordinateMapper(d.viewportId):void 0;if(d.viewportId!=null&&!f)return;const y=f?p.AcGeGeometryUtil.point2dToPoint3d(f.paperToModel(e)):l,g=f?p.AcGeGeometryUtil.point2dToPoint3d(f.paperToModel(t)):c,b=[];if(d.children&&d.children.length>0?d.children.forEach(w=>{if(h instanceof p.AcDbBlockReference){const S=ic(h,w.id,new p.AcGeMatrix3d,De.childBoxHint(w));if(S){this.collectOsnapPointsFromResolvedSubEntity(S,b,y,g);return}}this.collectOsnapPointsInAvailableModes(h,b,y,g,w.id)}):this.collectOsnapPointsInAvailableModes(h,b,y,g),!f){a.push(...b);return}for(const w of b){const S=f.modelToPaper(w);f.containsPaperPoint(S)&&a.push({x:S.x,y:S.y,z:w.z,type:w.type})}}),p.acdbHasOsnapMode(le.instance.osnapModes,p.AcDbOsnapMode.Intersection)&&this.collectIntersectionOsnapPoints(o,r,a,e,n),this.updateAcquiredCenters(o,r,l),a}updateAcquiredCenters(e,t,i){if(!p.acdbHasOsnapMode(le.instance.osnapModes,p.AcDbOsnapMode.Center)){this._acquiredCenters=[];return}const n=[];e.forEach(o=>{const r=De.getEntityById(t,o.id);if(!r)return;const a=o.viewportId!=null?this._view.getViewportCoordinateMapper(o.viewportId):void 0;if(o.viewportId!=null&&!a)return;const l=a?p.AcGeGeometryUtil.point2dToPoint3d(a.paperToModel(i)):i,c=[];if(o.children&&o.children.length>0?o.children.forEach(d=>{c.push(...nc(r,l,d.id))}):c.push(...nc(r,l)),!a){n.push(...c);return}for(const d of c){const h=a.modelToPaper(d);a.containsPaperPoint(h)&&n.push({...d,x:h.x,y:h.y})}}),this._acquiredCenters=JS(this._acquiredCenters,n)}}class us{constructor(e="rect",t=12,i="var(--ml-ui-canvas-line, green)",n){this._type=e,this._size=t,this._color=i,this._host=n,us.injectCSS(),getComputedStyle(this._host).position==="static"&&(this._host.style.position="relative"),this._el=document.createElement("div"),this._el.classList.add("ml-marker"),this._el.style.color=i,this.applyShape(),this._host.appendChild(this._el)}get color(){return this._color}set color(e){this._color=e,this._el.style.color=e}get type(){return this._type}set type(e){this._type=e,this.applyShape()}static injectCSS(){if(document.getElementById("ml-marker-style"))return;const e=document.createElement("style");e.id="ml-marker-style",e.textContent=`
127
127
  .ml-marker {
128
128
  position: absolute;
129
129
  pointer-events: none;
@@ -222,7 +222,7 @@
222
222
  .ml-marker-intersection::after {
223
223
  transform: translate(-50%, -50%) rotate(-45deg);
224
224
  }
225
- `,document.head.appendChild(e)}applyShape(){switch(this._el.className="ml-marker",this._el.style.width="",this._el.style.height="",this._el.style.fontSize="",this._el.style.transform="translate(-50%, -50%)",this._type){case"circle":this._el.classList.add("ml-marker-circle"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"rect":this._el.classList.add("ml-marker-rect"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"triangle":this._el.classList.add("ml-marker-triangle"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"diamond":this._el.classList.add("ml-marker-diamond"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"x":this._el.classList.add("ml-marker-x"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"plus":this._el.classList.add("ml-marker-plus"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"intersection":this._el.classList.add("ml-marker-intersection"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break}}setPosition(e){this._el.style.left=`${e.x}px`,this._el.style.top=`${e.y}px`}destroy(){this._el.remove()}}class hs{constructor(e){this.stack=[],this.hintMarkers=[],this.hintPositions=[],this.view=e}showMarker(e,t,i,n){const o=this.createMarker(e,t,i,n);return this.stack.push(o),o}setHintMarkers(e,t="plus",i,n){if(this.hintPositionsMatch(e))return;const o=e.map(a=>({x:a.x,y:a.y})),r=Math.min(this.hintMarkers.length,o.length);for(let a=0;a<r;a++)this.hintMarkers[a].setPosition(this.toContainerPos(o[a]));if(o.length<this.hintMarkers.length){for(let a=o.length;a<this.hintMarkers.length;a++)this.hintMarkers[a].destroy();this.hintMarkers.length=o.length}else for(let a=r;a<o.length;a++)this.hintMarkers.push(this.createMarker(o[a],t,i,n));this.hintPositions=o}showOrRepositionMarker(e,t,i,n){const o=this.top();return o?(t!=null&&o.type!==t&&(o.type=t),this.repositionTop(e),o):this.showMarker(e,t,i,n)}repositionHints(){for(let e=0;e<this.hintMarkers.length;e++){const t=this.hintPositions[e];t&&this.hintMarkers[e].setPosition(this.toContainerPos(t))}}repositionTop(e){const t=this.top();if(!t)return;const i=this.view.worldToScreen(e),n=this.view.canvasToContainer(i);t.setPosition(n)}hideMarker(){const e=this.stack.pop();e&&e.destroy()}clear(){this.clearHintMarkers();for(const e of this.stack)e.destroy();this.stack=[]}top(){return this.stack[this.stack.length-1]}createMarker(e,t,i,n){const o=new us(t,i,n,this.view.container);return o.setPosition(this.toContainerPos(e)),o}toContainerPos(e){const t=this.view.worldToScreen(e);return this.view.canvasToContainer(t)}hintPositionsMatch(e){if(e.length!==this.hintPositions.length)return!1;for(let t=0;t<e.length;t++){const i=e[t],n=this.hintPositions[t];if(i.x!==n.x||i.y!==n.y)return!1}return!0}clearHintMarkers(){for(const e of this.hintMarkers)e.destroy();this.hintMarkers=[],this.hintPositions=[]}}class X{constructor(e){this.view=e}get entity(){return null}render(){this.entity&&this.view.addTransientEntity(this.entity)}end(){this.entity&&this.view.removeTransientEntity(this.entity.objectId)}}class em extends X{constructor(e,t,i,n){super(e),this._previewEntity=null,this._view=e;const o=t.clone();if(!o)throw new Error("Failed to clone entity for grip preview.");this._sourceClone=o,this._gripIndex=i,this._gripBaseWcs=new p.AcGePoint3d(n)}get entity(){return this._previewEntity}update(e){this._previewEntity&&(this._view.removeTransientEntity(this._previewEntity.objectId),this._previewEntity=null);const t=this._sourceClone.clone();t&&(t.subMoveGripPointsAt([this._gripIndex],this.computeOffset(e)),this._previewEntity=t)}computeOffset(e){return new p.AcGeVector3d(e.x-this._gripBaseWcs.x,e.y-this._gripBaseWcs.y,(e.z??0)-(this._gripBaseWcs.z??0))}render(){this._previewEntity&&this._view.addTransientEntity(this._previewEntity)}end(){this._previewEntity&&(this._view.removeTransientEntity(this._previewEntity.objectId),this._previewEntity=null)}}class tm{constructor(e,t,i,n){this._boundMouseMove=o=>this.onMouseMove(o),this._boundMouseUp=o=>this.onMouseUp(o),this._boundKeyDown=o=>this.onKeyDown(o),this._view=e,this._entity=t,this._target=i,this._onEnd=n,this._osnapMarkerManager=new hs(e),this._jig=new em(e,t,i.gripIndex,i.gripBaseWcs),document.addEventListener("mousemove",this._boundMouseMove),document.addEventListener("mouseup",this._boundMouseUp),document.addEventListener("keydown",this._boundKeyDown)}onMouseMove(e){const t=this.resolveWcs(e);this._jig.update(t),this._jig.render()}onMouseUp(e){if(e.button!==0)return;const t=this.resolveWcs(e),i=this._jig.computeOffset(t),n=this._entity.database;if(At(n,this._entity)){this.finish();return}ui(n,"Grip Edit",()=>{const o=n.openEntityForWrite(this._entity);!o||At(n,o)||o.subMoveGripPointsAt([this._target.gripIndex],i)}),this.finish()}onKeyDown(e){e.key==="Escape"&&(e.preventDefault(),this.cancel())}cancel(){this.finish()}finish(){this._jig.end(),this._osnapMarkerManager.clear(),this._view.osnapResolver.clearAcquiredCenters(),document.removeEventListener("mousemove",this._boundMouseMove),document.removeEventListener("mouseup",this._boundMouseUp),document.removeEventListener("keydown",this._boundKeyDown),this._onEnd()}resolveWcs(e){const t=this._view.viewportToCanvas({x:e.clientX,y:e.clientY}),i=this._view.screenToWorld(t),n={x:i.x,y:i.y,z:0},o=this._view.osnapResolver.resolve({cursorWcs:n,lastPoint:this._target.gripBaseWcs});return this._osnapMarkerManager.setHintMarkers(De.displayCenterMarks(this._view.osnapResolver.acquiredCenterMarks,o)),o?(this._osnapMarkerManager.showOrRepositionMarker(o,De.osnapModeToMarkerType(o.type)),{x:o.x,y:o.y,z:o.z??0}):(this._osnapMarkerManager.hideMarker(),n)}}class im{constructor(e,t){this._host=e,this._state="normal",D.injectMlGripHandleCss(),getComputedStyle(this._host).position==="static"&&(this._host.style.position="relative"),this._el=document.createElement("div"),this._el.className="ml-grip-handle ml-grip-handle-normal",this.applyAppearance(t),this._host.appendChild(this._el)}get element(){return this._el}get state(){return this._state}setState(e){this._state!==e&&(this._state=e,this._el.className=`ml-grip-handle ml-grip-handle-${e}`)}setPosition(e){this._el.style.left=`${e.x}px`,this._el.style.top=`${e.y}px`}applyAppearance(e){Ql(this._host,e)}destroy(){this._el.remove()}}function rS(s,e){return e<=0?!1:s>e}function aS(s,e,t,i,n){return s!==U.Write||e||t?!1:!rS(i,n)}class nm{constructor(e){this._entries=[],this._editSession=null,this._hotEntry=null,this._boundRefresh=()=>this.refresh(),this._boundReposition=()=>this.repositionAll(),this._boundSysVarChanged=t=>this.onGripSysVarChanged(t.name),this._view=e,this.bindEvents(),queueMicrotask(()=>this.applyAppearance())}get isDragging(){return this._editSession!=null}dispose(){this.unbindEvents(),this.clear()}refresh(){if(this.clearEntries(),this.applyAppearance(),!this.canShowGrips())return;const e=k.instance.curDocument,t=e.database.tables.blockTable,i=ec(e.database);for(const n of this._view.selectionSet.ids){const o=t.getEntityById(n);if(!o||At(e.database,o))continue;const r=o.subGetGripPoints();for(let a=0;a<r.length;++a){const l=r[a],c=new im(this._view.container,i),d={entityId:n,gripIndex:a,wcsPoint:l,handle:c};this.wireHandleEvents(d),this._entries.push(d),this.positionEntry(d)}}}canShowGrips(){const e=k.instance.curDocument,t=p.AcDbSysVarManager.instance().getVar(p.AcDbSystemVariables.GRIPOBJLIMIT,e.database);return aS(e.openMode,this._view.editor.isActive,!!qt.getActiveInputBox(),this._view.selectionSet.count,t)}bindEvents(){const{selectionSet:e,editor:t,events:i}=this._view;e.events.selectionAdded.addEventListener(this._boundRefresh),e.events.selectionRemoved.addEventListener(this._boundRefresh),i.viewChanged.addEventListener(this._boundReposition),i.viewResize.addEventListener(this._boundReposition),t.events.commandWillStart.addEventListener(this._boundRefresh),t.events.commandEnded.addEventListener(this._boundRefresh),p.AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(this._boundSysVarChanged)}unbindEvents(){const{selectionSet:e,editor:t,events:i}=this._view;e.events.selectionAdded.removeEventListener(this._boundRefresh),e.events.selectionRemoved.removeEventListener(this._boundRefresh),i.viewChanged.removeEventListener(this._boundReposition),i.viewResize.removeEventListener(this._boundReposition),t.events.commandWillStart.removeEventListener(this._boundRefresh),t.events.commandEnded.removeEventListener(this._boundRefresh),p.AcDbSysVarManager.instance().events.sysVarChanged.removeEventListener(this._boundSysVarChanged)}onGripSysVarChanged(e){const t=e.toLowerCase();if(t===p.AcDbSystemVariables.GRIPOBJLIMIT.toLowerCase()){this.refresh();return}$p(t)&&this.applyAppearance()}applyAppearance(){try{const e=k.instance.curDocument;if(!(e!=null&&e.database))return;const t=ec(e.database);Ql(this._view.container,t);for(const i of this._entries)i.handle.applyAppearance(t)}catch(e){if(e instanceof Error&&e.message.includes("instance is not created yet"))return;throw e}}wireHandleEvents(e){const{element:t}=e.handle;t.addEventListener("mouseenter",()=>{this.isDragging||e.handle.setState("hover")}),t.addEventListener("mouseleave",()=>{this._hotEntry!==e&&e.handle.setState("normal")}),t.addEventListener("mousedown",i=>{i.button===0&&this.canShowGrips()&&(i.preventDefault(),i.stopPropagation(),this._hotEntry=e,e.handle.setState("hot"),this.startEdit(e))})}startEdit(e){const t=k.instance.curDocument.database.tables.blockTable.getEntityById(e.entityId);if(!t){this.endEdit();return}this.hideEntriesForDrag();const i={entityId:e.entityId,gripIndex:e.gripIndex,gripBaseWcs:e.wcsPoint};this._editSession=new tm(this._view,t,i,()=>this.endEdit())}endEdit(){this._editSession=null,this._hotEntry=null,this.refresh()}hideEntriesForDrag(){this.clearEntries()}positionEntry(e){const t=this._view.worldToScreen(e.wcsPoint),i=this._view.canvasToContainer(t);e.handle.setPosition(i)}repositionAll(){for(const e of this._entries)this.positionEntry(e)}clearEntries(){for(const e of this._entries)e.handle.destroy();this._entries.length=0,this._hotEntry=null}clear(){var e;(e=this._editSession)==null||e.cancel(),this._editSession=null,this.clearEntries()}}var Ti=(s=>(s[s.NoSpecialCursor=-1]="NoSpecialCursor",s[s.Crosshair=0]="Crosshair",s[s.RectCursor=1]="RectCursor",s[s.RubberBand=2]="RubberBand",s[s.NotRotated=3]="NotRotated",s[s.TargetBox=4]="TargetBox",s[s.RotatedCrosshair=5]="RotatedCrosshair",s[s.CrosshairNoRotate=6]="CrosshairNoRotate",s[s.Invisible=7]="Invisible",s[s.EntitySelect=8]="EntitySelect",s[s.Parallelogram=9]="Parallelogram",s[s.EntitySelectNoPersp=10]="EntitySelectNoPersp",s[s.PkfirstOrGrips=11]="PkfirstOrGrips",s[s.CrosshairDashed=12]="CrosshairDashed",s[s.Grab=13]="Grab",s))(Ti||{});class sm{constructor(e){this._backgroundColor=p.ACGI_MODEL_SPACE_BACKGROUND,this._totalLength=20,this._view=e,this._cursorMap=new Map,this.setCursorColor(Oo(this._backgroundColor)),p.AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(t=>{if(t.name===p.AcDbSystemVariables.PICKBOX.toLowerCase()){let i=t.newVal;i=i>=0?i:0,this._cursorMap.set(0,this.createRectCrossIcon(i,this._totalLength-i,Oo(this._backgroundColor))),this.setCursor(this._currentCursor)}}),this.setCursor(0)}get currentCursor(){return this._currentCursor}setCursor(e){const t=this._view.canvas;if(e<=-1)t.style.cursor="default";else if(e==13)t.style.cursor="grab";else{const i=this._cursorMap.get(e);i&&(t.style.cursor=i)}this._currentCursor=e}syncBackgroundColor(e){this._backgroundColor=e,this.setCursorColor(Oo(e))}setCursorColor(e){const i=this.createRectCrossIcon(10,this._totalLength-10,e);this._cursorMap.set(0,i),this._currentCursor===0&&(this._view.canvas.style.cursor=i)}encodeSvgToCursor(e,t,i){return`url('data:image/svg+xml;base64,${btoa(e)}') ${t} ${i}, auto`}createRectCrossIcon(e,t,i="white"){const n=e/2,o=e+2*t,r=`
225
+ `,document.head.appendChild(e)}applyShape(){switch(this._el.className="ml-marker",this._el.style.width="",this._el.style.height="",this._el.style.fontSize="",this._el.style.transform="translate(-50%, -50%)",this._type){case"circle":this._el.classList.add("ml-marker-circle"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"rect":this._el.classList.add("ml-marker-rect"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"triangle":this._el.classList.add("ml-marker-triangle"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"diamond":this._el.classList.add("ml-marker-diamond"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"x":this._el.classList.add("ml-marker-x"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"plus":this._el.classList.add("ml-marker-plus"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"intersection":this._el.classList.add("ml-marker-intersection"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break}}setPosition(e){this._el.style.left=`${e.x}px`,this._el.style.top=`${e.y}px`}destroy(){this._el.remove()}}class hs{constructor(e){this.stack=[],this.hintMarkers=[],this.hintPositions=[],this.view=e}showMarker(e,t,i,n){const o=this.createMarker(e,t,i,n);return this.stack.push(o),o}setHintMarkers(e,t="plus",i,n){if(this.hintPositionsMatch(e))return;const o=e.map(a=>({x:a.x,y:a.y})),r=Math.min(this.hintMarkers.length,o.length);for(let a=0;a<r;a++)this.hintMarkers[a].setPosition(this.toContainerPos(o[a]));if(o.length<this.hintMarkers.length){for(let a=o.length;a<this.hintMarkers.length;a++)this.hintMarkers[a].destroy();this.hintMarkers.length=o.length}else for(let a=r;a<o.length;a++)this.hintMarkers.push(this.createMarker(o[a],t,i,n));this.hintPositions=o}showOrRepositionMarker(e,t,i,n){const o=this.top();return o?(t!=null&&o.type!==t&&(o.type=t),this.repositionTop(e),o):this.showMarker(e,t,i,n)}repositionHints(){for(let e=0;e<this.hintMarkers.length;e++){const t=this.hintPositions[e];t&&this.hintMarkers[e].setPosition(this.toContainerPos(t))}}repositionTop(e){const t=this.top();if(!t)return;const i=this.view.worldToScreen(e),n=this.view.canvasToContainer(i);t.setPosition(n)}hideMarker(){const e=this.stack.pop();e&&e.destroy()}clear(){this.clearHintMarkers();for(const e of this.stack)e.destroy();this.stack=[]}top(){return this.stack[this.stack.length-1]}createMarker(e,t,i,n){const o=new us(t,i,n,this.view.container);return o.setPosition(this.toContainerPos(e)),o}toContainerPos(e){const t=this.view.worldToScreen(e);return this.view.canvasToContainer(t)}hintPositionsMatch(e){if(e.length!==this.hintPositions.length)return!1;for(let t=0;t<e.length;t++){const i=e[t],n=this.hintPositions[t];if(i.x!==n.x||i.y!==n.y)return!1}return!0}clearHintMarkers(){for(const e of this.hintMarkers)e.destroy();this.hintMarkers=[],this.hintPositions=[]}}class X{constructor(e){this.view=e}get entity(){return null}render(){this.entity&&this.view.addTransientEntity(this.entity)}end(){this.entity&&this.view.removeTransientEntity(this.entity.objectId)}}class em extends X{constructor(e,t,i,n){super(e),this._previewEntity=null,this._view=e;const o=t.clone();if(!o)throw new Error("Failed to clone entity for grip preview.");this._sourceClone=o,this._gripIndex=i,this._gripBaseWcs=new p.AcGePoint3d(n)}get entity(){return this._previewEntity}update(e){this._previewEntity&&(this._view.removeTransientEntity(this._previewEntity.objectId),this._previewEntity=null);const t=this._sourceClone.clone();t&&(t.subMoveGripPointsAt([this._gripIndex],this.computeOffset(e)),this._previewEntity=t)}computeOffset(e){return new p.AcGeVector3d(e.x-this._gripBaseWcs.x,e.y-this._gripBaseWcs.y,(e.z??0)-(this._gripBaseWcs.z??0))}render(){this._previewEntity&&this._view.addTransientEntity(this._previewEntity)}end(){this._previewEntity&&(this._view.removeTransientEntity(this._previewEntity.objectId),this._previewEntity=null)}}class tm{constructor(e,t,i,n){this._boundMouseMove=o=>this.onMouseMove(o),this._boundMouseUp=o=>this.onMouseUp(o),this._boundKeyDown=o=>this.onKeyDown(o),this._view=e,this._entity=t,this._target=i,this._onEnd=n,this._osnapMarkerManager=new hs(e),this._jig=new em(e,t,i.gripIndex,i.gripBaseWcs),document.addEventListener("mousemove",this._boundMouseMove),document.addEventListener("mouseup",this._boundMouseUp),document.addEventListener("keydown",this._boundKeyDown)}onMouseMove(e){const t=this.resolveWcs(e);this._jig.update(t),this._jig.render()}onMouseUp(e){if(e.button!==0)return;const t=this.resolveWcs(e),i=this._jig.computeOffset(t),n=this._entity.database;if(At(n,this._entity)){this.finish();return}ui(n,"Grip Edit",()=>{const o=n.openEntityForWrite(this._entity);!o||At(n,o)||o.subMoveGripPointsAt([this._target.gripIndex],i)}),this.finish()}onKeyDown(e){e.key==="Escape"&&(e.preventDefault(),this.cancel())}cancel(){this.finish()}finish(){this._jig.end(),this._osnapMarkerManager.clear(),this._view.osnapResolver.clearAcquiredCenters(),document.removeEventListener("mousemove",this._boundMouseMove),document.removeEventListener("mouseup",this._boundMouseUp),document.removeEventListener("keydown",this._boundKeyDown),this._onEnd()}resolveWcs(e){const t=this._view.viewportToCanvas({x:e.clientX,y:e.clientY}),i=this._view.screenToWorld(t),n={x:i.x,y:i.y,z:0},o=this._view.osnapResolver.resolve({cursorWcs:n,lastPoint:this._target.gripBaseWcs});return this._osnapMarkerManager.setHintMarkers(De.displayCenterMarks(this._view.osnapResolver.acquiredCenterMarks,o)),o?(this._osnapMarkerManager.showOrRepositionMarker(o,De.osnapModeToMarkerType(o.type)),{x:o.x,y:o.y,z:o.z??0}):(this._osnapMarkerManager.hideMarker(),n)}}class im{constructor(e,t){this._host=e,this._state="normal",D.injectMlGripHandleCss(),getComputedStyle(this._host).position==="static"&&(this._host.style.position="relative"),this._el=document.createElement("div"),this._el.className="ml-grip-handle ml-grip-handle-normal",this.applyAppearance(t),this._host.appendChild(this._el)}get element(){return this._el}get state(){return this._state}setState(e){this._state!==e&&(this._state=e,this._el.className=`ml-grip-handle ml-grip-handle-${e}`)}setPosition(e){this._el.style.left=`${e.x}px`,this._el.style.top=`${e.y}px`}applyAppearance(e){Ql(this._host,e)}destroy(){this._el.remove()}}function r0(s,e){return e<=0?!1:s>e}function a0(s,e,t,i,n){return s!==U.Write||e||t?!1:!r0(i,n)}class nm{constructor(e){this._entries=[],this._editSession=null,this._hotEntry=null,this._boundRefresh=()=>this.refresh(),this._boundReposition=()=>this.repositionAll(),this._boundSysVarChanged=t=>this.onGripSysVarChanged(t.name),this._view=e,this.bindEvents(),queueMicrotask(()=>this.applyAppearance())}get isDragging(){return this._editSession!=null}dispose(){this.unbindEvents(),this.clear()}refresh(){if(this.clearEntries(),this.applyAppearance(),!this.canShowGrips())return;const e=k.instance.curDocument,t=e.database.tables.blockTable,i=ec(e.database);for(const n of this._view.selectionSet.ids){const o=t.getEntityById(n);if(!o||At(e.database,o))continue;const r=o.subGetGripPoints();for(let a=0;a<r.length;++a){const l=r[a],c=new im(this._view.container,i),d={entityId:n,gripIndex:a,wcsPoint:l,handle:c};this.wireHandleEvents(d),this._entries.push(d),this.positionEntry(d)}}}canShowGrips(){const e=k.instance.curDocument,t=p.AcDbSysVarManager.instance().getVar(p.AcDbSystemVariables.GRIPOBJLIMIT,e.database);return a0(e.openMode,this._view.editor.isActive,!!qt.getActiveInputBox(),this._view.selectionSet.count,t)}bindEvents(){const{selectionSet:e,editor:t,events:i}=this._view;e.events.selectionAdded.addEventListener(this._boundRefresh),e.events.selectionRemoved.addEventListener(this._boundRefresh),i.viewChanged.addEventListener(this._boundReposition),i.viewResize.addEventListener(this._boundReposition),t.events.commandWillStart.addEventListener(this._boundRefresh),t.events.commandEnded.addEventListener(this._boundRefresh),p.AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(this._boundSysVarChanged)}unbindEvents(){const{selectionSet:e,editor:t,events:i}=this._view;e.events.selectionAdded.removeEventListener(this._boundRefresh),e.events.selectionRemoved.removeEventListener(this._boundRefresh),i.viewChanged.removeEventListener(this._boundReposition),i.viewResize.removeEventListener(this._boundReposition),t.events.commandWillStart.removeEventListener(this._boundRefresh),t.events.commandEnded.removeEventListener(this._boundRefresh),p.AcDbSysVarManager.instance().events.sysVarChanged.removeEventListener(this._boundSysVarChanged)}onGripSysVarChanged(e){const t=e.toLowerCase();if(t===p.AcDbSystemVariables.GRIPOBJLIMIT.toLowerCase()){this.refresh();return}$p(t)&&this.applyAppearance()}applyAppearance(){try{const e=k.instance.curDocument;if(!(e!=null&&e.database))return;const t=ec(e.database);Ql(this._view.container,t);for(const i of this._entries)i.handle.applyAppearance(t)}catch(e){if(e instanceof Error&&e.message.includes("instance is not created yet"))return;throw e}}wireHandleEvents(e){const{element:t}=e.handle;t.addEventListener("mouseenter",()=>{this.isDragging||e.handle.setState("hover")}),t.addEventListener("mouseleave",()=>{this._hotEntry!==e&&e.handle.setState("normal")}),t.addEventListener("mousedown",i=>{i.button===0&&this.canShowGrips()&&(i.preventDefault(),i.stopPropagation(),this._hotEntry=e,e.handle.setState("hot"),this.startEdit(e))})}startEdit(e){const t=k.instance.curDocument.database.tables.blockTable.getEntityById(e.entityId);if(!t){this.endEdit();return}this.hideEntriesForDrag();const i={entityId:e.entityId,gripIndex:e.gripIndex,gripBaseWcs:e.wcsPoint};this._editSession=new tm(this._view,t,i,()=>this.endEdit())}endEdit(){this._editSession=null,this._hotEntry=null,this.refresh()}hideEntriesForDrag(){this.clearEntries()}positionEntry(e){const t=this._view.worldToScreen(e.wcsPoint),i=this._view.canvasToContainer(t);e.handle.setPosition(i)}repositionAll(){for(const e of this._entries)this.positionEntry(e)}clearEntries(){for(const e of this._entries)e.handle.destroy();this._entries.length=0,this._hotEntry=null}clear(){var e;(e=this._editSession)==null||e.cancel(),this._editSession=null,this.clearEntries()}}var Ti=(s=>(s[s.NoSpecialCursor=-1]="NoSpecialCursor",s[s.Crosshair=0]="Crosshair",s[s.RectCursor=1]="RectCursor",s[s.RubberBand=2]="RubberBand",s[s.NotRotated=3]="NotRotated",s[s.TargetBox=4]="TargetBox",s[s.RotatedCrosshair=5]="RotatedCrosshair",s[s.CrosshairNoRotate=6]="CrosshairNoRotate",s[s.Invisible=7]="Invisible",s[s.EntitySelect=8]="EntitySelect",s[s.Parallelogram=9]="Parallelogram",s[s.EntitySelectNoPersp=10]="EntitySelectNoPersp",s[s.PkfirstOrGrips=11]="PkfirstOrGrips",s[s.CrosshairDashed=12]="CrosshairDashed",s[s.Grab=13]="Grab",s))(Ti||{});class sm{constructor(e){this._backgroundColor=p.ACGI_MODEL_SPACE_BACKGROUND,this._totalLength=20,this._view=e,this._cursorMap=new Map,this.setCursorColor(Oo(this._backgroundColor)),p.AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(t=>{if(t.name===p.AcDbSystemVariables.PICKBOX.toLowerCase()){let i=t.newVal;i=i>=0?i:0,this._cursorMap.set(0,this.createRectCrossIcon(i,this._totalLength-i,Oo(this._backgroundColor))),this.setCursor(this._currentCursor)}}),this.setCursor(0)}get currentCursor(){return this._currentCursor}setCursor(e){const t=this._view.canvas;if(e<=-1)t.style.cursor="default";else if(e==13)t.style.cursor="grab";else{const i=this._cursorMap.get(e);i&&(t.style.cursor=i)}this._currentCursor=e}syncBackgroundColor(e){this._backgroundColor=e,this.setCursorColor(Oo(e))}setCursorColor(e){const i=this.createRectCrossIcon(10,this._totalLength-10,e);this._cursorMap.set(0,i),this._currentCursor===0&&(this._view.canvas.style.cursor=i)}encodeSvgToCursor(e,t,i){return`url('data:image/svg+xml;base64,${btoa(e)}') ${t} ${i}, auto`}createRectCrossIcon(e,t,i="white"){const n=e/2,o=e+2*t,r=`
226
226
  <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}">
227
227
  <rect x="${t}" y="${t}" width="${e}" height="${e}" fill="none" stroke="${i}" />
228
228
  <line x1="${n+t}" y1="0" x2="${n+t}" y2="${t}" stroke="${i}" />
@@ -230,7 +230,7 @@
230
230
  <line x1="${n+t}" y1="${e+t}" x2="${n+t}" y2="${e+2*t}" stroke="${i}" />
231
231
  <line x1="0" y1="${n+t}" x2="${t}" y2="${n+t}" stroke="${i}" />
232
232
  </svg>
233
- `;return this.encodeSvgToCursor(r,n+t,n+t)}}var qe=(s=>(s[s.SELECTION=0]="SELECTION",s[s.PAN=1]="PAN",s))(qe||{});const lS={showsConfirmedPointMarks:!1,usesSessionChrome:!1,swallowsPromptContextMenu:!1,showsCursorDynamicInput:!0,showsSnapLoupeOnTouchPick:!1},cS={showsConfirmedPointMarks:!0,usesSessionChrome:!0,swallowsPromptContextMenu:!0,showsCursorDynamicInput:!1,showsSnapLoupeOnTouchPick:!0};class om{constructor(){this.point=lS}canIdleTouchBox(e){return e===qe.SELECTION}acquireBox(e,t){return e.acquireTwoPointBox(t)}}class rm{constructor(){this.point=cS}canIdleTouchBox(e){return e===qe.SELECTION||e===qe.PAN}acquireBox(e,t){return e.acquireHoldDragBox(t)}}const dS=new om,uS=new rm;function Ve(){return Qt()?uS:dS}function am(s){if(!Ve().point.showsCursorDynamicInput)return!1;const e=s??p.acdbHostApplicationServices().workingDatabase;return Number(p.AcDbSysVarManager.instance().getVar(p.AcDbSystemVariables.DYNMODE,e))!==0}function lm(s){const e=s??p.acdbHostApplicationServices().workingDatabase,t=p.AcDbSysVarManager.instance().getVar(p.AcDbSystemVariables.ORTHOMODE,e);return Number(t)!==0}function cm(s,e){const t=s.x-e.x,i=s.y-e.y;return Math.abs(t)>=Math.abs(i)?{x:s.x,y:e.y}:{x:e.x,y:s.y}}const ln=2,dm=4;function ps(s){return s??p.acdbHostApplicationServices().workingDatabase}function um(s,e,t){const i=p.AcDbSysVarManager.instance().getVar(s,e),n=Number(i);return Number.isFinite(n)?n:t}function hS(s,e){const t=p.AcDbSysVarManager.instance().getVar(s,e);return t==null?"":String(t)}function Wo(s){const e=ps(s);return um(p.AcDbSystemVariables.POLARMODE,e,0)}function hm(s){const e=ps(s);return um(p.AcDbSystemVariables.POLARANG,e,90)}function pm(s){const e=ps(s);return hS(p.AcDbSystemVariables.POLARADDANG,e)}function mm(s){return(Wo(s)&ln)!==0}function pS(s,e,t){let i=s-e;return t===1&&(i=-i),p.AcGeMathUtil.normalizeAngle(i)}function mS(s,e,t){let i=s;return t===1&&(i=-i),p.AcGeMathUtil.normalizeAngle(i+e)}function fS(s){if(!s.trim())return[];const e=[];for(const t of s.split(";")){const i=t.trim();if(!i)continue;const n=Number(i);if(Number.isFinite(n)&&(e.push((n%360+360)%360),e.length>=10))break}return e}function yS(s,e){const t=Wo(s),i=(t&ln)!==0,n=(t&dm)!==0,o=new Set;if(e.includeOrtho)for(const r of[0,90,180,270])o.add(r);if(i){const r=hm(s);if(r>0){const a=Math.max(1,Math.round(360/r));for(let l=0;l<a;l++)o.add((l*r%360+360)%360)}if(n)for(const a of fS(pm(s)))o.add(a)}return[...o].map(p.AcGeMathUtil.degToRad)}function fm(s,e){const t=Math.abs(p.AcGeMathUtil.normalizeAngle(s-e));return Math.min(t,Math.PI*2-t)}function gS(s,e){let t=e[0],i=fm(s,t);for(let n=1;n<e.length;n++){const o=e[n],r=fm(s,o);r<i&&(i=r,t=o)}return t}function ym(s,e,t){const i=ps(t),n=lm(i),o=mm(i);if(!n&&!o)return s;if(n&&!o)return cm(s,e);const r=s.x-e.x,a=s.y-e.y,l=Math.hypot(r,a);if(l<1e-10)return s;const c=Math.atan2(a,r),d=pS(c,i.angbase,i.angdir),h=yS(i,{includeOrtho:n});if(h.length===0)return s;const f=gS(d,h),y=mS(f,i.angbase,i.angdir);return{x:e.x+l*Math.cos(y),y:e.y+l*Math.sin(y)}}function bS(s){const e=ps(s),t=Wo(e),i=(t&ln)!==0?t&~ln:t|ln;return p.AcDbSysVarManager.instance().setVar(p.AcDbSystemVariables.POLARMODE,i,e),i}class $o{constructor(e=[]){this.events={selectionAdded:new p.AcCmEventManager,selectionRemoved:new p.AcCmEventManager},this._ids=new Set(e)}get ids(){return Array.from(this._ids)}get count(){return this._ids.size}add(e){Array.isArray(e)?(e.forEach(t=>this._ids.add(t)),this.events.selectionAdded.dispatch({ids:e})):(this._ids.add(e),this.events.selectionAdded.dispatch({ids:[e]}))}delete(e){Array.isArray(e)?(e.forEach(t=>this._ids.delete(t)),this.events.selectionRemoved.dispatch({ids:e})):(this._ids.delete(e),this.events.selectionRemoved.dispatch({ids:[e]}))}has(e){return this._ids.has(e)}clear(){if(this._ids.size>0){const e=Array.from(this._ids);this._ids.clear(),this.events.selectionRemoved.dispatch({ids:e})}}}class rc{constructor(e,t,i,n=!0,o=!1,r=!0){this._displayName=e,this._globalName=t??e,this._localName=i??this._globalName,this._enabled=n,this._isReadOnly=o,this._visible=r}get displayName(){return this._displayName}set displayName(e){this._isReadOnly||(this._displayName=e)}get enabled(){return this._enabled}set enabled(e){this._isReadOnly||(this._enabled=e)}get globalName(){return this._globalName}set globalName(e){this._isReadOnly||(this._globalName=e)}get isReadOnly(){return this._isReadOnly}get localName(){return this._localName}set localName(e){this._isReadOnly||(this._localName=e)}get visible(){return this._visible}set visible(e){this._isReadOnly||(this._visible=e)}get alias(){return this._globalName.replace(/[^A-Z]/g,"")}}class gm{constructor(e){if(this._keywords=[],!e)return;const t=e.trim().split(/\s+/),i=[],n=[];let o=!1;for(const a of t){if(a==="_"){o=!0;continue}(o?n:i).push(a)}const r=Math.max(i.length,n.length);for(let a=0;a<r;a++){const l=i[a],c=n[a],d=x=>{if(!x)return;const _=x.indexOf(",");return _>=0?x.substring(0,_):x},h=d(c),f=d(l),y=h!==void 0,g=f!==void 0,b=y?h:"",w=g?f:void 0,S=new rc(b||w||"",b,w,!0,!1,!0);this._keywords.push(S)}}add(e,t,i,n=!0,o=!0){let r,a,l;t===void 0?(r=e,a=e,l=e):i===void 0?(r=t,a=e,l=t):(r=e,a=t,l=i);const c=new rc(r,a,l,n,!1,o);return this._keywords.push(c),c}clear(){this._keywords=[],this._defaultKeyword=void 0}toArray(){return this._keywords.slice()}get default(){return this._defaultKeyword}set default(e){if(e&&!this._keywords.includes(e))throw new Error("Default keyword must be one of the collection's keywords");this._defaultKeyword=e}getDisplayString(e=!1){return this._keywords.filter(i=>i.visible&&i.enabled).map(i=>(!e&&this._defaultKeyword===i,i.displayName)).join("/")}getPromptFormat(){const e=this._keywords.filter(o=>o.visible).map(o=>o.displayName),t=this._defaultKeyword&&this._defaultKeyword.visible?this._defaultKeyword.displayName:void 0,i=`[${e.join("/")}]`,n=t?` <${t}>`:"";return{visibleKeywords:e,defaultKeyword:t,formattedTail:`${i}${n}:`}}[Symbol.iterator](){let e=0;const t=this._keywords;return{next(){return e<t.length?{done:!1,value:t[e++]}:{done:!0,value:void 0}}}}findByDisplayName(e){return this._keywords.find(t=>t.displayName.toLowerCase()===e.toLowerCase())}findByGlobalName(e){return this._keywords.find(t=>t.globalName.toLowerCase()===e.toLowerCase())}findByName(e){if(!e)return;let t=e.trim();if(!t)return;const i=t.startsWith("_");i&&(t=t.substring(1));const n=t.toLowerCase();return this._keywords.find(o=>o.enabled?o.globalName.toLowerCase()===n?!0:i?!1:!!(o.localName&&o.localName.toLowerCase()===n||o.alias&&o.alias.toLowerCase()===n||o.displayName.toLowerCase()===n):!1)}get count(){return this._keywords.length}}class Ft{constructor(e,t){this._message="",this._appendKeywordsToMessage=!0,this._isReadOnly=!1,this._keywords=new gm,t!==void 0?this.setMessageAndKeywords(e,t):this._message=e}get jig(){return this._jig}set jig(e){this._isReadOnly||(this._jig=e)}get message(){return this._message}set message(e){this._isReadOnly||(this._message=e)}getDefaultValueDisplayText(){}getDisplayMessage(){const e=this.getDefaultValueDisplayText();return e==null?this._message:`${this._message.trim().replace(/[::]\s*$/,"")} <${e}>`}get appendKeywordsToMessage(){return this._appendKeywordsToMessage}set appendKeywordsToMessage(e){this._isReadOnly||(this._appendKeywordsToMessage=e)}get isReadOnly(){return this._isReadOnly}get keywords(){return this._keywords}getKeywordPromptFormat(){return this._keywords.getPromptFormat()}setMessageAndKeywords(e,t){if(this._isReadOnly)return this;const i=e.match(/^(.*?)\s*\[(.*?)\](.*)?$/);if(i){const[,n,o]=i;if(this._message=n.trim(),o!==void 0){const r=o.split("/").map(a=>a.trim()).filter(a=>a.length>0);this._keywords.clear();for(const a of r){let c=t.split(/\s+/).find(d=>d.toLowerCase()===a.toLowerCase());c||(c=a),this._keywords.add(a,c)}}}return this}}class Ge extends Ft{constructor(e,t){super(e,t),this._useBasePoint=!0,this._useDashedLine=!0,this._useAngleBase=!1,this._defaultValue=0,this._useDefaultValue=!1,this._allowZero=!0,this._allowNegative=!1,this._allowNone=!1}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new p.AcGePoint3d(e))}get baseAngle(){return this._baseAngle??0}set baseAngle(e){this.isReadOnly||(this._baseAngle=e)}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get useAngleBase(){return this._useAngleBase}set useAngleBase(e){this.isReadOnly||(this._useAngleBase=e)}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return String(this._defaultValue)}get allowZero(){return this._allowZero}set allowZero(e){this.isReadOnly||(this._allowZero=e)}get allowNegative(){return this._allowNegative}set allowNegative(e){this.isReadOnly||(this._allowNegative=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}}class Ko extends Ft{constructor(e,t){super(e),this._useBasePoint=!1,this._useDashedLine=!1,this._disableOSnap=!1,this._allowNone=!1,this._secondCornerMessage=t}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get firstCornerMessage(){return this.message}set firstCornerMessage(e){this.isReadOnly||(this.message=e)}get secondCornerMessage(){return this._secondCornerMessage}set secondCornerMessage(e){this.isReadOnly||(this._secondCornerMessage=e)}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get disableOSnap(){return this._disableOSnap}set disableOSnap(e){this.isReadOnly||(this._disableOSnap=e)}}class Pt{constructor(e,t){this.status=e,this.stringResult=t}}class mi extends Pt{constructor(e,t,i){super(e,i),this.value=t}}class Yo extends Ft{constructor(e,t){super(e,t),this._defaultValue=0,this._useDefaultValue=!1,this._allowNone=!1,this._allowArbitraryInput=!1,this._allowNegative=!1,this._allowZero=!0}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return String(this._defaultValue)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowArbitraryInput(){return this._allowArbitraryInput}set allowArbitraryInput(e){this.isReadOnly||(this._allowArbitraryInput=e)}get allowNegative(){return this._allowNegative}set allowNegative(e){this.isReadOnly||(this._allowNegative=e)}get allowZero(){return this._allowZero}set allowZero(e){this.isReadOnly||(this._allowZero=e)}}class Je extends Yo{constructor(e){super(e),this._useBasePoint=!1,this._useDashedLine=!0,this._only2d=!0,this.allowNegative=!1}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new p.AcGePoint3d(e))}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get only2d(){return this._only2d}set only2d(e){this.isReadOnly||(this._only2d=e)}}class ve extends Yo{}class ac extends Pt{constructor(e,t){super(e,void 0),this.value=t}}class rt extends ac{constructor(e,t){super(e,t)}}class Pe extends Ft{constructor(e,t){super(e,t),this._allowNone=!1,this._allowObjectOnLockedLayer=!1,this._rejectMessage="Invalid object selected.",this._allowedClasses=new Set}normalizeClassName(e){const t=e.trim();return t.startsWith("AcDb")?t.slice(4):t}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowObjectOnLockedLayer(){return this._allowObjectOnLockedLayer}set allowObjectOnLockedLayer(e){this.isReadOnly||(this._allowObjectOnLockedLayer=e)}get rejectMessage(){return this._rejectMessage}setRejectMessage(e){return this.isReadOnly||(this._rejectMessage=e),this}addAllowedClass(e){if(!this.isReadOnly){const t=this.normalizeClassName(e);t&&this._allowedClasses.add(t)}return this}removeAllowedClass(e){if(!this.isReadOnly){const t=this.normalizeClassName(e);t&&this._allowedClasses.delete(t)}return this}clearAllowedClasses(){return this.isReadOnly||this._allowedClasses.clear(),this}isClassAllowed(e){const t=this.normalizeClassName(e);return this._allowedClasses.size===0||this._allowedClasses.has(t)}}class Zo extends Pt{constructor(e,t,i){super(e),this.objectId=t,this.pickedPoint=i}}class lc extends Yo{constructor(e,t,i){super(e),typeof t=="number"&&(this._lowerLimit=Math.floor(t)),typeof i=="number"&&(this._upperLimit=Math.ceil(i))}get lowerLimit(){return this._lowerLimit}set lowerLimit(e){this.isReadOnly||(this._lowerLimit=typeof e=="number"?Math.floor(e):void 0)}get upperLimit(){return this._upperLimit}set upperLimit(e){this.isReadOnly||(this._upperLimit=typeof e=="number"?Math.floor(e):void 0)}}class Xo extends ac{constructor(e,t){super(e,t)}}class ye extends Ft{constructor(e,t){super(e,t),this._allowNone=!1,this._allowArbitraryInput=!1}get valueDefaultDisplayText(){return this._valueDefaultDisplayText}set valueDefaultDisplayText(e){this.isReadOnly||(this._valueDefaultDisplayText=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowArbitraryInput(){return this._allowArbitraryInput}set allowArbitraryInput(e){this.isReadOnly||(this._allowArbitraryInput=e)}}class F extends Ft{constructor(e,t){super(e,t),this._useBasePoint=!1,this._useDashedLine=!1,this._allowNone=!1,this._disableOSnap=!1,this._useDefaultValue=!1}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(e==null?this._defaultValue=e:this._defaultValue=this._defaultValue?this._defaultValue.copy(e):new p.AcGePoint3d(e))}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(!this._useDefaultValue||!this._defaultValue)return;const{x:e,y:t,z:i}=this._defaultValue;return i===0?`${e},${t}`:`${e},${t},${i}`}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new p.AcGePoint3d(e))}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get disableOSnap(){return this._disableOSnap}set disableOSnap(e){this.isReadOnly||(this._disableOSnap=e)}get showConfirmedPointMark(){return this._showConfirmedPointMark}set showConfirmedPointMark(e){this.isReadOnly||(this._showConfirmedPointMark=e)}}class qo extends Pt{constructor(e,t){super(e,void 0),this.value=t}}class Ii extends Ft{constructor(e,t){super(e,t),this._singleOnly=!1,this._allowObjectOnLockedLayer=!1}get singleOnly(){return this._singleOnly}set singleOnly(e){this._singleOnly=e}get allowObjectOnLockedLayer(){return this._allowObjectOnLockedLayer}set allowObjectOnLockedLayer(e){this._allowObjectOnLockedLayer=e}}class ms extends Pt{constructor(e,t,i){super(e,i),this.value=t}}class xe extends Ft{constructor(e,t){super(e,t),this._allowSpaces=!0,this._allowEmpty=!1,this._defaultValue="",this._useDefaultValue=!1}get allowSpaces(){return this._allowSpaces}set allowSpaces(e){this.isReadOnly||(this._allowSpaces=e)}get allowEmpty(){return this._allowEmpty}set allowEmpty(e){this.isReadOnly||(this._allowEmpty=e)}get maxLength(){return this._maxLength}set maxLength(e){this.isReadOnly||(this._maxLength=e)}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return this._defaultValue}}var v=(s=>(s[s.Cancel=-5002]="Cancel",s[s.Error=-5001]="Error",s[s.Keyword=-5005]="Keyword",s[s.Modeless=5027]="Modeless",s[s.None=5e3]="None",s[s.OK=5100]="OK",s[s.Other=5028]="Other",s))(v||{});function bm(s){s.style.touchAction="none",s.style.userSelect="none",s.style.setProperty("-webkit-user-select","none"),s.style.setProperty("-webkit-touch-callout","none"),s.style.setProperty("-webkit-tap-highlight-color","transparent")}function cc(){var e;const s=(e=window.getSelection)==null?void 0:e.call(window);s==null||s.rangeCount===0||s.removeAllRanges()}function wm(s,e){bm(s),e&&(e.style.setProperty("-webkit-touch-callout","none"),e.style.setProperty("-webkit-tap-highlight-color","transparent"));const t=o=>{o.preventDefault()},i=o=>{o.preventDefault()},n={passive:!1,capture:!0};return s.addEventListener("touchstart",t,n),s.addEventListener("selectstart",i,!0),()=>{s.removeEventListener("touchstart",t,n),s.removeEventListener("selectstart",i,!0)}}const oi=class oi{static get messages(){return this._messages}static getLocaleMessage(e){return this._messages[e]}static mergeLocaleMessage(e,t){vm(this._messages[e],t)}static registerMessage(e,t){this.mergeLocaleMessage(e,t)}static setCurrentLocale(e){if(this._currentLocale===e)return;const t=this._currentLocale;this._currentLocale=e,this.events.localeChanged.dispatch({old:t,new:this._currentLocale})}static get currentLocale(){return this._currentLocale}static t(e,t){const i=this._currentLocale,n=this._messages[i],o=e.split(".");let r=n;for(const a of o){if(!r||typeof r!="object")return(t==null?void 0:t.fallback)??e;r=r[a]}return typeof r=="string"?r:(t==null?void 0:t.fallback)??e}static cmdKey(e,t,i){return`command.${e}.${t.toLowerCase()}.${i}`}static cmd(e,t,i){return this.t(this.cmdKey(e,t,i))}static cmdDescription(e,t){return this.cmd(e,t,"description")}static cmdPrompt(e,t){return this.cmd(e,t,"prompt")}static sysCmd(e,t){return this.cmd(Me.SYSTEMT_COMMAND_GROUP_NAME,e,t)}static sysCmdKey(e,t){return this.cmdKey(Me.SYSTEMT_COMMAND_GROUP_NAME,e,t)}static userCmd(e,t){return this.cmd(Me.DEFAUT_COMMAND_GROUP_NAME,e,t)}static userCmdKey(e,t){return this.cmdKey(Me.DEFAUT_COMMAND_GROUP_NAME,e,t)}static sysCmdDescription(e){return this.cmdDescription(Me.SYSTEMT_COMMAND_GROUP_NAME,e)}static sysCmdPrompt(e){return this.cmdPrompt(Me.SYSTEMT_COMMAND_GROUP_NAME,e)}};oi._messages={en:{},zh:{},tr:{},cs:{},ar:{}},oi._currentLocale="en",oi.events={localeChanged:new p.AcCmEventManager},oi.userCmdDescription=e=>oi.cmdDescription(Me.DEFAUT_COMMAND_GROUP_NAME,e),oi.userCmdPrompt=e=>oi.cmdPrompt(Me.DEFAUT_COMMAND_GROUP_NAME,e);let m=oi;function vm(s,e){for(const t of Object.keys(e)){const i=e[t],n=s[t];xm(n)&&xm(i)?vm(n,i):s[t]=i}}function xm(s){return typeof s=="object"&&s!==null}const M={ACAD:{"-hatch":{description:"Creates hatch fills through command-line options without the ribbon UI"},"-layer":{description:"Manages layers through command-line options"},about:{description:"Displays information about mlightcad"},acadver:{description:"Stores the drawing database version identifier (read-only)"},annoallvisible:{description:"Controls whether annotative objects that do not support the current annotation scale are displayed"},angbase:{description:"Sets the base angle 0 direction with respect to the current UCS"},angdir:{description:"Sets whether positive angles are measured clockwise or counterclockwise"},arc:{description:"Creates an arc"},aunits:{description:"Sets the display format for angles"},auprec:{description:"Sets the display precision for angles, used together with AUNITS"},bmpout:{description:"Exports to BMP"},cannoscale:{description:"Sets the name of the current annotation scale"},cdxf:{description:"Exports current drawing to DXF"},cpdf:{description:"Exports current drawing to PDF"},"-cpdf":{description:"Exports current drawing to PDF using command-line options"},cecolor:{description:"Sets the current default color for newly created objects"},celtscale:{description:"Controls the linetype scale factor for newly created objects"},celtype:{description:"Sets the linetype for newly created objects"},celweight:{description:"Sets the default lineweight for newly created objects"},cetransparency:{description:"Sets the transparency for newly created objects"},cachefont:{description:"Caches a local font file into IndexedDB for text rendering"},circle:{description:"Creates one circle by center and radius"},clayer:{description:"Sets the current layer for new objects and editing operations"},cmleaderstyle:{description:"Sets the name of the current multileader style"},cmlscale:{description:"Controls the overall width of a multiline"},cmlstyle:{description:"Sets the name of the current multiline style"},colortheme:{description:"Controls the color theme of the user interface (dark or light)"},copy:{description:"Copies selected entities by cloning them to new positions",prompt:"Select entities"},csvg:{description:"Converts current drawing to SVG"},chtml:{description:"Exports current drawing to a standalone offline HTML file"},"-chtml":{description:"Exports current drawing to HTML using command-line options"},dimlinear:{description:"Creates linear dimensions"},dimaligned:{description:"Creates an aligned linear dimension"},dimradius:{description:"Creates radial dimensions for circles and arcs"},dimdiameter:{description:"Creates diameter dimensions for circles and arcs"},dimangular:{description:"Creates angular dimensions"},dimarc:{description:"Creates arc length dimensions"},dimordinate:{description:"Creates ordinate dimensions"},dimcontinue:{description:"Creates a continued dimension"},dimbaseline:{description:"Creates a baseline dimension"},dimstyle:{description:"Sets the name of the current dimension style"},dwgname:{description:"Stores the name of the current drawing file (read-only)"},loginname:{description:"Displays the user's login name (read-only)"},dynmode:{description:"Controls Dynamic Input settings at the cursor"},dynprompt:{description:"Controls display of prompts in Dynamic Input tooltips"},ellipse:{description:"Creates an ellipse or elliptical arc by axis endpoints or center"},erase:{description:"Deletes selected entities from the drawing",prompt:"Select entities"},extmax:{description:"Stores the upper-right corner of the model-space drawing extents (read-only)"},extmin:{description:"Stores the lower-left corner of the model-space drawing extents (read-only)"},entout:{description:"Exports a merged preview image for selected entities",prompt:"Select entities"},hideobjects:{description:"Temporarily suppresses the display of selected objects",prompt:"Select objects"},imageattach:{description:"Attaches a raster image as an external reference to the current drawing"},"-insert":{description:"Inserts a block definition into the current drawing (command-line)"},xattach:{description:"Attaches a DWG or DXF drawing as an external reference to the current drawing"},gripcolor:{description:"Sets the color of unselected grips displayed on selected objects"},griphot:{description:"Sets the color of selected (hot) grips"},gripobjlimit:{description:"Suppresses grip display when the selection set exceeds the specified number of objects (0 = no limit)"},grips:{description:"Controls whether grips are displayed on selected objects"},gripsize:{description:"Sets the size of grip boxes in pixels"},hatch:{description:"Fills an enclosed area or selected objects with a hatch pattern"},ipdf:{description:"Imports vector geometry from a PDF file"},hpang:{description:"Sets the default angle, in radians, for newly created hatch patterns"},hpassoc:{description:"Controls whether newly created hatches are associative"},hpbackgroundcolor:{description:"Sets the default background color for newly created hatch patterns"},hpcolor:{description:"Sets the default color for newly created hatches"},hpdouble:{description:"Controls whether user-defined hatch patterns are doubled"},hpislanddetection:{description:"Controls how islands within newly created hatch boundaries are treated"},hplayer:{description:"Sets the default layer for newly created hatches and fills"},hpname:{description:"Sets the default pattern name for newly created hatches in this session"},hpscale:{description:"Sets the default scale factor for newly created hatch patterns"},hpseparate:{description:"Controls whether one or separate hatch objects are created for multiple boundaries"},hptransparency:{description:"Sets the default transparency for newly created hatches and fills"},insunits:{description:"Specifies drawing units for automatic scaling of inserted blocks, images, or xrefs"},jpgout:{description:"Exports to JPEG"},laycur:{description:"Changes the layer property of selected objects to the current layer",prompt:"Select objects to be changed to the current layer"},laydel:{description:"Deletes a layer and all objects on that layer"},layerclose:{description:"Closes the Layer Properties Manager"},layerp:{description:"Undoes the last change or set of changes made to layer settings"},layfrz:{description:"Freezes the layer of selected objects",prompt:"Select object on layer to freeze"},layiso:{description:"Isolates the layers of selected objects",prompt:"Select objects on layers to isolate"},laylck:{description:"Locks the layer of selected objects",prompt:"Select object on layer to lock"},layoff:{description:"Turns off the layer of selected objects",prompt:"Select object on layer to turn off"},layon:{description:"Turns on all layers in the drawing"},laythw:{description:"Thaws all frozen layers in the drawing"},layulk:{description:"Unlocks the layer of selected objects",prompt:"Select object on layer to unlock"},layuniso:{description:"Restores layers hidden or locked by LAYISO"},line:{description:"Draws straight line segments between points"},log:{description:"Logs debug information in console"},ltscale:{description:"Sets the global linetype scale factor for the drawing"},lunits:{description:"Sets the display format for coordinates and distances"},luprec:{description:"Sets the display precision for linear units, used together with LUNITS"},lwdisplay:{description:"Controls whether lineweights are displayed in the drawing"},clearmeasurements:{description:"Removes all measurements from the current layout"},measurementvis:{description:"Shows or hides measurements on the current layout"},measurementpanel:{description:"Opens the measurement palette"},measurementexport:{description:"Exports measurements to a sidecar JSON file"},measurementimport:{description:"Imports measurements from a sidecar JSON file"},measurearea:{description:"Calculates the area and perimeter of selected objects or points"},measureangle:{description:"Measures the angle between two lines or three points"},measurearc:{description:"Measures the length of an arc segment"},measuredistance:{description:"Measures the distance and delta values between two points"},measurecontinuous:{description:"Measures chained distances by picking successive points until Enter or Cancel"},measurepoint:{description:"Measures the X/Y coordinates of a picked point"},measurement:{description:"Sets whether the drawing uses English (imperial) or metric units"},measurementcolor:{description:"Sets the color used for measurement overlays"},modelbkcolor:{description:"Sets the background color of the model-space drawing area"},mline:{description:"Creates multiple parallel lines as one multiline object"},move:{description:"Moves selected entities by a displacement vector",prompt:"Select entities"},objectscale:{description:"Adds or deletes supported annotation scales for selected annotative objects",prompt:"Select annotative objects"},offset:{description:"Creates parallel curves, polylines, or circles at a specified distance"},mtext:{description:"Creates one mtext entity"},open:{description:"Opens an existing drawing file"},openprof:{description:"Controls whether open-file stage timing profiles are logged to the console"},openperf:{description:"Opens the Open Performance palette with timings from the last drawing open"},orthomode:{description:"Constrains cursor movement to the horizontal or vertical axis"},osmode:{description:"Sets running Object Snap modes using a bitcode value"},pan:{description:"Shifts the view without changing the viewing direction or magnification"},paperbkcolor:{description:"Sets the background color of the paper-space (layout) drawing area"},pdmode:{description:"Controls how POINT entities are displayed"},pdsize:{description:"Sets the display size for POINT entities"},pickbox:{description:"Sets the size (in pixels) of the selection box used to pick objects"},pline:{description:"Creates a polyline by specifying multiple points"},pngout:{description:"Exports to PNG"},point:{description:"Creates points"},polaraddang:{description:"Stores additional polar tracking angles as a semicolon-separated list"},polarang:{description:"Sets the polar angle increment for polar tracking"},polarmode:{description:"Controls polar and object snap tracking settings"},polygon:{description:"Creates a regular polygon by center/radius or by one polygon edge"},qnew:{description:"Starts a new drawing"},close:{description:"Closes the current drawing"},ray:{description:"Creates a ray that starts at a point and extends to infinity"},rectang:{description:"Creates a rectangle by specifying two opposite corners"},regen:{description:"Redraws the current drawing"},revcloud:{description:"Creates or modifies a revision cloud"},markuptext:{description:"Places a text markup label"},markupline:{description:"Creates a line markup"},markuparrow:{description:"Creates an arrow markup"},markupcloud:{description:"Creates a revision cloud markup"},markuprect:{description:"Creates a rectangle markup"},markupcircle:{description:"Creates a circle markup"},markuphighlight:{description:"Creates a highlight rectangle markup"},markupcallout:{description:"Creates a callout: pick leader tip, place text box, then enter text"},markupstamp:{description:"Places a stamp or custom symbol"},markupvis:{description:"Shows or hides markups"},clearmarkups:{description:"Clears all markups on the current layout"},markupexport:{description:"Exports markups to a sidecar JSON file"},markupimport:{description:"Imports markups from a sidecar JSON file"},markuppanel:{description:"Opens the markup palette"},rotate:{description:"Rotates selected entities around a base point",prompt:"Select entities"},select:{description:"Selects entities"},shortcutmenu:{description:"Controls the availability of shortcut menus in the drawing area"},sketch:{description:"Creates a series of freehand line segments"},spline:{description:"Creates a smooth spline curve by specifying control points"},textstyle:{description:"Sets the name of the current text style"},unitmode:{description:"Controls fractional display of coordinates when LUNITS is Architectural or Fractional"},switchbg:{description:"Toggles the drawing area background between white and black"},readingmode:{description:"Toggles reading mode: black linework on a white canvas for easier review"},unisolateobjects:{description:"Redisplay all objects hidden by HIDEOBJECTS"},undo:{description:"Undoes the last database editing operation",nothingToUndo:"Nothing to undo."},redo:{description:"Redoes the last undone database editing operation",nothingToRedo:"Nothing to redo."},xline:{description:"Creates a construction line that extends infinitely in both directions"},zoom:{description:"Zooms to display the maximum extents of all entities"}},USER:{}},wS={...M,ACAD:{...M.ACAD,"-hatch":{...M.ACAD["-hatch"],description:"إنشاء تعبئة تهشير باستخدام خيارات سطر الأوامر دون واجهة الشريط"},"-layer":{...M.ACAD["-layer"],description:"إدارة الطبقات باستخدام خيارات سطر الأوامر"},about:{...M.ACAD.about,description:"عرض معلومات حول mlightcad"},acadver:{...M.ACAD.acadver,description:"عرض معرّف إصدار قاعدة بيانات الرسم (للقراءة فقط)"},angbase:{...M.ACAD.angbase,description:"تحديد اتجاه زاوية الأساس 0 بالنسبة إلى نظام الإحداثيات UCS الحالي"},angdir:{...M.ACAD.angdir,description:"تحديد ما إذا كانت الزوايا الموجبة تُقاس مع أو عكس اتجاه عقارب الساعة"},arc:{...M.ACAD.arc,description:"إنشاء قوس"},aunits:{...M.ACAD.aunits,description:"تحديد تنسيق عرض الزوايا"},auprec:{...M.ACAD.auprec,description:"تحديد دقة عرض الزوايا بالتكامل مع AUNITS"},bmpout:{...M.ACAD.bmpout,description:"تصدير الرسم إلى BMP"},cdxf:{...M.ACAD.cdxf,description:"تصدير الرسم الحالي إلى DXF"},cpdf:{...M.ACAD.cpdf,description:"تصدير الرسم الحالي إلى PDF"},"-cpdf":{...M.ACAD["-cpdf"],description:"تصدير الرسم الحالي إلى PDF باستخدام خيارات سطر الأوامر"},cecolor:{...M.ACAD.cecolor,description:"تحديد اللون الافتراضي الحالي للعناصر الجديدة"},celtscale:{...M.ACAD.celtscale,description:"التحكم في معامل مقياس نوع الخط للعناصر الجديدة"},celtype:{...M.ACAD.celtype,description:"تحديد نوع الخط للعناصر الجديدة"},celweight:{...M.ACAD.celweight,description:"تحديد سُمك الخط الافتراضي للعناصر الجديدة"},cetransparency:{...M.ACAD.cetransparency,description:"تحديد الشفافية للعناصر الجديدة"},cachefont:{...M.ACAD.cachefont,description:"تخزين ملف خط محلي مؤقتًا في IndexedDB لاستخدامه في عرض النص"},circle:{...M.ACAD.circle,description:"إنشاء دائرة باستخدام المركز ونصف القطر"},clayer:{...M.ACAD.clayer,description:"تحديد الطبقة الحالية للعناصر الجديدة وعمليات التحرير"},cmleaderstyle:{...M.ACAD.cmleaderstyle,description:"تحديد اسم نمط Multileader الحالي"},cmlscale:{...M.ACAD.cmlscale,description:"التحكم في العرض الكلي للخط متعدد المسارات"},cmlstyle:{...M.ACAD.cmlstyle,description:"تحديد اسم نمط الخط متعدد المسارات الحالي"},colortheme:{...M.ACAD.colortheme,description:"التحكم في سمة ألوان واجهة المستخدم بين الوضع الداكن والفاتح"},copy:{...M.ACAD.copy,description:"نسخ العناصر المحددة إلى مواضع جديدة",prompt:"حدد العناصر"},csvg:{...M.ACAD.csvg,description:"تحويل الرسم الحالي إلى SVG"},chtml:{...M.ACAD.chtml,description:"تصدير الرسم الحالي إلى ملف HTML مستقل يعمل دون اتصال"},"-chtml":{...M.ACAD["-chtml"],description:"تصدير الرسم الحالي إلى HTML باستخدام خيارات سطر الأوامر"},dimlinear:{...M.ACAD.dimlinear,description:"إنشاء أبعاد خطية"},dimaligned:{...M.ACAD.dimaligned},dimradius:{...M.ACAD.dimradius},dimdiameter:{...M.ACAD.dimdiameter},dimangular:{...M.ACAD.dimangular},dimarc:{...M.ACAD.dimarc},dimordinate:{...M.ACAD.dimordinate},dimcontinue:{...M.ACAD.dimcontinue},dimbaseline:{...M.ACAD.dimbaseline},dimstyle:{...M.ACAD.dimstyle,description:"تحديد اسم نمط الأبعاد الحالي"},dwgname:{...M.ACAD.dwgname,description:"عرض اسم ملف الرسم الحالي (للقراءة فقط)"},loginname:{...M.ACAD.loginname,description:"عرض اسم تسجيل دخول المستخدم (للقراءة فقط)"},dynmode:{...M.ACAD.dynmode,description:"التحكم في إعدادات الإدخال الديناميكي عند المؤشر"},dynprompt:{...M.ACAD.dynprompt,description:"التحكم في عرض رسائل الأوامر داخل تلميحات الإدخال الديناميكي"},ellipse:{...M.ACAD.ellipse,description:"إنشاء قطع ناقص أو قوس بيضاوي باستخدام نهايات المحور أو المركز"},erase:{...M.ACAD.erase,description:"حذف العناصر المحددة من الرسم",prompt:"حدد العناصر"},extmax:{...M.ACAD.extmax,description:"عرض الركن العلوي الأيمن لحدود الرسم في مساحة النموذج (للقراءة فقط)"},extmin:{...M.ACAD.extmin,description:"عرض الركن السفلي الأيسر لحدود الرسم في مساحة النموذج (للقراءة فقط)"},entout:{...M.ACAD.entout,description:"تصدير صورة معاينة مدمجة للعناصر المحددة",prompt:"حدد العناصر"},hideobjects:{...M.ACAD.hideobjects,description:"إخفاء العناصر المحددة مؤقتًا من العرض",prompt:"حدد العناصر"},imageattach:{...M.ACAD.imageattach,description:"إرفاق صورة نقطية كمرجع خارجي إلى الرسم الحالي"},"-insert":{...M.ACAD["-insert"],description:"إدراج تعريف كتلة داخل الرسم الحالي باستخدام سطر الأوامر"},xattach:{...M.ACAD.xattach,description:"إرفاق رسم DWG أو DXF كمرجع خارجي إلى الرسم الحالي"},gripcolor:{...M.ACAD.gripcolor,description:"تحديد لون مقابض التحكم غير المحددة للعناصر المحددة"},griphot:{...M.ACAD.griphot,description:"تحديد لون مقابض التحكم المحددة"},gripobjlimit:{...M.ACAD.gripobjlimit,description:"إيقاف عرض مقابض التحكم عندما يتجاوز عدد العناصر المحددة الحد المعين، والقيمة 0 تعني عدم وجود حد"},grips:{...M.ACAD.grips,description:"التحكم في عرض مقابض التحكم على العناصر المحددة"},gripsize:{...M.ACAD.gripsize,description:"تحديد حجم مربعات مقابض التحكم بالبكسل"},hatch:{...M.ACAD.hatch,description:"ملء منطقة مغلقة أو عناصر محددة بنمط تهشير"},ipdf:{...M.ACAD.ipdf,description:"استيراد الهندسة المتجهية من ملف PDF"},hpang:{...M.ACAD.hpang,description:"تحديد الزاوية الافتراضية بالراديان لأنماط التهشير الجديدة"},hpassoc:{...M.ACAD.hpassoc,description:"التحكم في كون التهشير الجديد ترابطيًا"},hpbackgroundcolor:{...M.ACAD.hpbackgroundcolor,description:"تحديد لون الخلفية الافتراضي لأنماط التهشير الجديدة"},hpcolor:{...M.ACAD.hpcolor,description:"تحديد اللون الافتراضي للتهشير الجديد"},hpdouble:{...M.ACAD.hpdouble,description:"التحكم في مضاعفة أنماط التهشير المعرفة بواسطة المستخدم"},hpislanddetection:{...M.ACAD.hpislanddetection,description:"التحكم في كيفية التعامل مع الجزر داخل حدود التهشير الجديدة"},hplayer:{...M.ACAD.hplayer,description:"تحديد الطبقة الافتراضية للتهشير والتعبئة الجديدة"},hpname:{...M.ACAD.hpname,description:"تحديد اسم نمط التهشير الافتراضي للعناصر الجديدة في الجلسة الحالية"},hpscale:{...M.ACAD.hpscale,description:"تحديد معامل المقياس الافتراضي لأنماط التهشير الجديدة"},hpseparate:{...M.ACAD.hpseparate,description:"التحكم في إنشاء عنصر تهشير واحد أو عناصر منفصلة عند وجود عدة حدود"},hptransparency:{...M.ACAD.hptransparency,description:"تحديد الشفافية الافتراضية للتهشير والتعبئة الجديدة"},insunits:{...M.ACAD.insunits,description:"تحديد وحدات الرسم المستخدمة في التحجيم التلقائي للكتل والصور والمراجع الخارجية عند الإدراج"},jpgout:{...M.ACAD.jpgout,description:"تصدير الرسم إلى JPEG"},laycur:{...M.ACAD.laycur,description:"تغيير طبقة العناصر المحددة إلى الطبقة الحالية",prompt:"حدد العناصر المطلوب نقلها إلى الطبقة الحالية"},laydel:{...M.ACAD.laydel,description:"حذف طبقة وجميع العناصر الموجودة عليها"},layerclose:{...M.ACAD.layerclose,description:"إغلاق مدير خصائص الطبقات"},layerp:{...M.ACAD.layerp,description:"التراجع عن آخر تغيير أو مجموعة تغييرات في إعدادات الطبقات"},layfrz:{...M.ACAD.layfrz,description:"تجميد طبقة العناصر المحددة",prompt:"حدد عنصرًا على الطبقة المراد تجميدها"},layiso:{...M.ACAD.layiso,description:"عزل طبقات العناصر المحددة",prompt:"حدد عناصر على الطبقات المراد عزلها"},laylck:{...M.ACAD.laylck,description:"قفل طبقة العناصر المحددة",prompt:"حدد عنصرًا على الطبقة المراد قفلها"},layoff:{...M.ACAD.layoff,description:"إيقاف طبقة العناصر المحددة",prompt:"حدد عنصرًا على الطبقة المراد إيقافها"},layon:{...M.ACAD.layon,description:"تشغيل جميع الطبقات في الرسم"},laythw:{...M.ACAD.laythw,description:"إلغاء تجميد جميع الطبقات المجمدة في الرسم"},layulk:{...M.ACAD.layulk,description:"إلغاء قفل طبقة العناصر المحددة",prompt:"حدد عنصرًا على الطبقة المراد إلغاء قفلها"},layuniso:{...M.ACAD.layuniso,description:"استعادة الطبقات التي تم إخفاؤها أو قفلها بواسطة LAYISO"},line:{...M.ACAD.line,description:"رسم مقاطع خطوط مستقيمة بين النقاط"},log:{...M.ACAD.log,description:"تسجيل معلومات تصحيح الأخطاء في وحدة التحكم"},ltscale:{...M.ACAD.ltscale,description:"تحديد معامل مقياس نوع الخط العام للرسم"},lunits:{...M.ACAD.lunits,description:"تحديد تنسيق عرض الإحداثيات والمسافات"},luprec:{...M.ACAD.luprec,description:"تحديد دقة عرض الوحدات الخطية بالتكامل مع LUNITS"},lwdisplay:{...M.ACAD.lwdisplay,description:"التحكم في عرض سُمك الخطوط داخل الرسم"},clearmeasurements:{...M.ACAD.clearmeasurements,description:"إزالة جميع القياسات من المخطط الحالي"},measurementvis:{...M.ACAD.measurementvis,description:"إظهار أو إخفاء القياسات في المخطط الحالي"},measurementpanel:{...M.ACAD.measurementpanel,description:"فتح لوحة القياس"},measurementexport:{...M.ACAD.measurementexport,description:"تصدير القياسات إلى ملف JSON جانبي"},measurementimport:{...M.ACAD.measurementimport,description:"استيراد القياسات من ملف JSON جانبي"},measurearea:{...M.ACAD.measurearea,description:"حساب المساحة والمحيط للعناصر أو النقاط المحددة"},measureangle:{...M.ACAD.measureangle,description:"قياس الزاوية بين خطين أو باستخدام ثلاث نقاط"},measurearc:{...M.ACAD.measurearc,description:"قياس طول مقطع قوس"},measuredistance:{...M.ACAD.measuredistance,description:"قياس المسافة وفروق الإحداثيات بين نقطتين"},measurecontinuous:{...M.ACAD.measurecontinuous,description:"قياس مسافات متسلسلة باختيار نقاط متتالية حتى Enter أو إلغاء"},measurepoint:{...M.ACAD.measurepoint,description:"قياس إحداثيات X وY لنقطة محددة"},measurement:{...M.ACAD.measurement,description:"تحديد ما إذا كان الرسم يستخدم الوحدات الإمبراطورية أو المترية"},measurementcolor:{...M.ACAD.measurementcolor,description:"تحديد اللون المستخدم لتراكبات القياس"},modelbkcolor:{...M.ACAD.modelbkcolor,description:"تحديد لون خلفية مساحة النموذج"},mline:{...M.ACAD.mline,description:"إنشاء عدة خطوط متوازية كعنصر متعدد الخطوط واحد"},move:{...M.ACAD.move,description:"نقل العناصر المحددة باستخدام متجه إزاحة",prompt:"حدد العناصر"},offset:{...M.ACAD.offset,description:"إنشاء منحنيات أو خطوط متعددة أو دوائر موازية على مسافة محددة"},mtext:{...M.ACAD.mtext,description:"إنشاء عنصر نص متعدد الأسطر"},open:{...M.ACAD.open,description:"فتح ملف رسم موجود"},openprof:{...M.ACAD.openprof,description:"التحكم في تسجيل أزمنة مراحل فتح الملفات داخل وحدة التحكم"},openperf:{...M.ACAD.openperf,description:"فتح لوحة أداء الفتح وعرض أزمنة آخر عملية فتح للرسم"},orthomode:{...M.ACAD.orthomode,description:"تقييد حركة المؤشر على المحور الأفقي أو الرأسي"},osmode:{...M.ACAD.osmode,description:"تحديد أوضاع Object Snap المستمرة باستخدام قيمة bitcode"},pan:{...M.ACAD.pan,description:"تحريك العرض دون تغيير اتجاه الرؤية أو مستوى التكبير"},paperbkcolor:{...M.ACAD.paperbkcolor,description:"تحديد لون خلفية مساحة الورق أو المخطط"},pdmode:{...M.ACAD.pdmode,description:"التحكم في طريقة عرض عناصر POINT"},pdsize:{...M.ACAD.pdsize,description:"تحديد حجم عرض عناصر POINT"},pickbox:{...M.ACAD.pickbox,description:"تحديد حجم مربع التحديد المستخدم لاختيار العناصر بالبكسل"},pline:{...M.ACAD.pline,description:"إنشاء متعدد خطوط باستخدام عدة نقاط"},pngout:{...M.ACAD.pngout,description:"تصدير الرسم إلى PNG"},point:{...M.ACAD.point,description:"إنشاء نقاط"},polaraddang:{...M.ACAD.polaraddang,description:"تخزين زوايا إضافية للتتبع القطبي كقائمة مفصولة بفواصل منقوطة"},polarang:{...M.ACAD.polarang,description:"تحديد مقدار زيادة الزاوية للتتبع القطبي"},polarmode:{...M.ACAD.polarmode,description:"التحكم في إعدادات التتبع القطبي وتتبع Object Snap"},polygon:{...M.ACAD.polygon,description:"إنشاء مضلع منتظم باستخدام المركز ونصف القطر أو باستخدام أحد أضلاع المضلع"},qnew:{...M.ACAD.qnew,description:"بدء رسم جديد"},close:{...M.ACAD.close,description:"إغلاق الرسم الحالي"},ray:{...M.ACAD.ray,description:"إنشاء شعاع يبدأ من نقطة ويمتد إلى ما لا نهاية"},rectang:{...M.ACAD.rectang,description:"إنشاء مستطيل بتحديد ركنين متقابلين"},regen:{...M.ACAD.regen,description:"إعادة رسم العرض الحالي"},revcloud:{...M.ACAD.revcloud,description:"إنشاء أو تعديل سحابة مراجعة"},markuptext:{...M.ACAD.markuptext,description:"وضع علامة مراجعة نصية"},markupline:{...M.ACAD.markupline,description:"إنشاء علامة مراجعة خطية"},markuparrow:{...M.ACAD.markuparrow,description:"إنشاء سهم مراجعة"},markupcloud:{...M.ACAD.markupcloud,description:"إنشاء سحابة مراجعة"},markuprect:{...M.ACAD.markuprect,description:"إنشاء مستطيل مراجعة"},markupcircle:{...M.ACAD.markupcircle,description:"إنشاء دائرة مراجعة"},markuphighlight:{...M.ACAD.markuphighlight,description:"إنشاء مستطيل تمييز"},markupcallout:{...M.ACAD.markupcallout,description:"إنشاء وسيلة شرح: حدد رأس خط التوجيه ثم موضع مربع النص ثم أدخل النص"},markupstamp:{...M.ACAD.markupstamp,description:"وضع ختم أو رمز مخصص"},markupvis:{...M.ACAD.markupvis,description:"إظهار أو إخفاء علامات المراجعة"},clearmarkups:{...M.ACAD.clearmarkups,description:"مسح جميع علامات المراجعة من المخطط الحالي"},markupexport:{...M.ACAD.markupexport,description:"تصدير علامات المراجعة إلى ملف JSON جانبي"},markupimport:{...M.ACAD.markupimport,description:"استيراد علامات المراجعة من ملف JSON جانبي"},markuppanel:{...M.ACAD.markuppanel,description:"فتح لوحة علامات المراجعة"},rotate:{...M.ACAD.rotate,description:"تدوير العناصر المحددة حول نقطة أساس",prompt:"حدد العناصر"},select:{...M.ACAD.select,description:"تحديد العناصر"},shortcutmenu:{...M.ACAD.shortcutmenu,description:"التحكم في إتاحة القوائم المختصرة داخل منطقة الرسم"},sketch:{...M.ACAD.sketch,description:"إنشاء سلسلة من مقاطع الخطوط بالرسم الحر"},spline:{...M.ACAD.spline,description:"إنشاء منحنى Spline ناعم باستخدام نقاط التحكم"},textstyle:{...M.ACAD.textstyle,description:"تحديد اسم نمط النص الحالي"},unitmode:{...M.ACAD.unitmode,description:"التحكم في عرض الكسور للإحداثيات عندما يكون LUNITS من النوع Architectural أو Fractional"},switchbg:{...M.ACAD.switchbg,description:"التبديل بين الخلفية البيضاء والسوداء لمنطقة الرسم"},unisolateobjects:{...M.ACAD.unisolateobjects,description:"إعادة عرض جميع العناصر التي تم إخفاؤها بواسطة HIDEOBJECTS"},undo:{...M.ACAD.undo,description:"التراجع عن آخر عملية تحرير في قاعدة بيانات الرسم",nothingToUndo:"لا توجد عملية يمكن التراجع عنها."},redo:{...M.ACAD.redo,description:"إعادة آخر عملية تم التراجع عنها",nothingToRedo:"لا توجد عملية يمكن إعادتها."},xline:{...M.ACAD.xline,description:"إنشاء خط إنشائي يمتد إلى ما لا نهاية في الاتجاهين"},zoom:{...M.ACAD.zoom,description:"التكبير أو التصغير لعرض أقصى امتداد لجميع العناصر"}},USER:{...M.USER}},R={arc:{startPointOrCenter:"Specify start point of arc or",secondPointOrOptions:"Specify second point of arc or",secondPoint:"Specify second point of arc",startPoint:"Specify start point of arc",centerPoint:"Specify center point of arc",endPoint:"Specify end point of arc",endPointOrOptions:"Specify end point of arc or",centerPointOrOptions:"Specify center point of arc",includedAngle:"Specify included angle",chordLength:"Specify chord length",tangentDirection:"Specify tangent direction for start point of arc",radius:"Specify radius of arc",keywords:{center:{display:"Center(C)",local:"Center",global:"Center"},end:{display:"End(E)",local:"End",global:"End"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},chordLength:{display:"chord Length(L)",local:"Chord Length",global:"ChordLength"},direction:{display:"Direction(D)",local:"Direction",global:"Direction"},radius:{display:"Radius(R)",local:"Radius",global:"Radius"}},invalid:{threePoint:"Invalid 3-point arc: points are collinear or cannot define an arc.",center:"Invalid center input: start and end points must lie on the same circle.",angle:"Invalid angle input: included angle must be greater than 0 and less than 360 degrees.",chordLength:"Invalid chord length: value is out of range for the current radius.",direction:"Invalid direction: cannot construct an arc from this tangent direction.",radius:"Invalid radius: the specified radius cannot connect start and end points."}},circle:{center:"Specify the center of circle",centerOrOptions:"Specify center point of circle or",radius:"Specify the radius of circle",radiusOrDiameter:"Specify radius of circle or",diameter:"Specify diameter of circle",twoPointFirst:"Specify first endpoint of circle diameter",twoPointSecond:"Specify second endpoint of circle diameter",threePointFirst:"Specify first point on circle",threePointSecond:"Specify second point on circle",threePointThird:"Specify third point on circle",keywords:{threeP:{display:"3P(3P)",local:"3P",global:"3P"},twoP:{display:"2P(2P)",local:"2P",global:"2P"},diameter:{display:"Diameter(D)",local:"Diameter",global:"Diameter"}}},copy:{basePointOrOptions:"Specify base point or",displacementOrArray:"Specify displacement or",secondPointOrArray:"Specify second point or",modePrompt:"Enter copy mode option",arrayItemCount:"Enter the number of items in the array including the original",arraySecondPointOrFit:"Specify second point or",arrayFitSecondPoint:"Specify second point",keywords:{displacement:{display:"Displacement(D)",local:"Displacement",global:"Displacement"},mode:{display:"Mode(O)",local:"Mode",global:"Mode"},multiple:{display:"Multiple(M)",local:"Multiple",global:"Multiple"},single:{display:"Single(S)",local:"Single",global:"Single"},array:{display:"Array(A)",local:"Array",global:"Array"},fit:{display:"Fit(F)",local:"Fit",global:"Fit"}}},dimlinear:{xLine1Point:"Specify first extension line origin or <select object>",xLine2Point:"Specify second extension line origin",dimLinePoint:"Specify dimension line location",selectObject:"Select object to dimension",rejectObject:"Object cannot be dimensioned with DIMLINEAR.",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",rotationAngle:"Specify angle of dimension line",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},horizontal:{display:"Horizontal(H)",local:"Horizontal",global:"Horizontal"},vertical:{display:"Vertical(V)",local:"Vertical",global:"Vertical"},rotated:{display:"Rotated(R)",local:"Rotated",global:"Rotated"}}},dimaligned:{xLine1Point:"Specify first extension line origin or <select object>",xLine2Point:"Specify second extension line origin",dimLinePoint:"Specify dimension line location",selectObject:"Select object to dimension",rejectObject:"Object cannot be dimensioned with DIMALIGNED.",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimradius:{selectObject:"Select arc or circle",rejectObject:"Must select an arc or circle.",dimLinePoint:"Specify dimension line location",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimdiameter:{selectObject:"Select arc or circle",rejectObject:"Must select an arc or circle.",dimLinePoint:"Specify dimension line location",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimangular:{vertexOrSelect:"Specify angle vertex or <select line>",xLine1Point:"Specify first angle endpoint",xLine2Point:"Specify second angle endpoint",arcPoint:"Specify dimension arc line location",selectFirstLine:"Select first line",selectSecondLine:"Select second line",rejectObject:"Must select a line.",linesParallel:"Lines are parallel — no angle intersection.",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimarc:{selectArc:"Select arc",rejectObject:"Must select an arc.",arcPoint:"Specify arc length dimension location",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimordinate:{featurePoint:"Specify feature location",leaderEndpoint:"Specify leader endpoint",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},xdatum:{display:"Xdatum(X)",local:"Xdatum",global:"Xdatum"},ydatum:{display:"Ydatum(Y)",local:"Ydatum",global:"Ydatum"}}},dimcontinue:{nextPoint:"Specify a second extension line origin or",selectDimension:"Select continued dimension",rejectObject:"Must select a linear or angular dimension.",keywords:{select:{display:"Select(S)",local:"Select",global:"Select"}}},dimbaseline:{nextPoint:"Specify a second extension line origin or",selectDimension:"Select base dimension",rejectObject:"Must select a linear or angular dimension.",keywords:{select:{display:"Select(S)",local:"Select",global:"Select"}}},ellipse:{axisEndpointOrOptions:"Specify axis endpoint of ellipse or",arcAxisEndpointOrCenter:"Specify axis endpoint of elliptical arc or",center:"Specify center of ellipse",firstAxisEndpoint:"Specify endpoint of axis",secondAxisEndpoint:"Specify other endpoint of axis",otherAxisOrRotation:"Specify distance to other axis or",rotationAngle:"Specify rotation angle around major axis",arcStartAngle:"Specify start angle of elliptical arc",arcEndAngle:"Specify end angle of elliptical arc",keywords:{arc:{display:"Arc(A)",local:"Arc",global:"Arc"},center:{display:"Center(C)",local:"Center",global:"Center"},rotation:{display:"Rotation(R)",local:"Rotation",global:"Rotation"}},invalid:{axis:"Invalid axis input: axis length must be greater than 0.",otherAxis:"Invalid other-axis input: distance must be greater than 0.",rotation:"Invalid rotation input: resulting minor axis must be greater than 0."}},hatch:{prompt:"Select boundary object or",pickPoint:"Specify internal point (or press Enter to finish)",select:"Select objects to hatch",patternName:"Enter hatch pattern name",scale:"Specify hatch pattern scale",angle:"Specify hatch pattern angle",style:"Enter hatch style",associative:"Specify associativity",invalidBoundary:"Selected objects do not form a closed boundary.",keywords:{pick:{display:"Pick points(P)",local:"Pick points",global:"PickPoints"},select:{display:"Select objects(S)",local:"Select objects",global:"SelectObjects"},cancel:{display:"Cancel(C)",local:"Cancel",global:"Cancel"},pattern:{display:"Pattern(P)",local:"Pattern",global:"Pattern"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},style:{display:"Style(T)",local:"Style",global:"HatchStyle"},associative:{display:"Associative(AS)",local:"Associative",global:"AssociativeMode"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},outer:{display:"Outer(O)",local:"Outer",global:"Outer"},ignore:{display:"Ignore(I)",local:"Ignore",global:"Ignore"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}},hideobjects:{hidden:"object(s) hidden",restored:"object(s) restored",nothingToRestore:"No hidden objects to restore"},entout:{longSidePrompt:"Enter preview long side size in pixels",exported:"object preview(s) exported",skipped:"object(s) skipped",failed:{"no-preview-root":"Unable to build preview geometry for the selection","no-bounds":"Unable to compute preview bounds for the selection","capture-failed":"Unable to render the entity preview image","download-failed":"Preview rendered but the PNG download failed"}},layer:{main:"Enter option",listSummary:"Layer list was printed to browser console",emptyInput:"No layer name was entered.",newPrompt:"Enter name for new layer(s)",makePrompt:"Enter name of layer to make current",setPrompt:"Enter name of layer to set current",onPrompt:"Enter layer name(s) to turn on",offPrompt:"Enter layer name(s) to turn off",freezePrompt:"Enter layer name(s) to freeze",thawPrompt:"Enter layer name(s) to thaw",lockPrompt:"Enter layer name(s) to lock",unlockPrompt:"Enter layer name(s) to unlock",colorLayerPrompt:"Enter layer name(s) to change color",colorValuePrompt:"Enter color (ACI 1-255, RGB like 255,0,0, or CSS color name)",invalidColor:"Invalid color input.",descriptionLayerPrompt:"Enter layer name to edit description",descriptionValuePrompt:"Enter new layer description",created:"Created layer count",alreadyExists:"Layer already exists",notFound:"Layer not found",cannotChangeCurrent:"Cannot turn off or freeze the current layer.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Make(M)",local:"Make",global:"Make"},set:{display:"Set(S)",local:"Set",global:"Set"},new:{display:"New(N)",local:"New",global:"New"},on:{display:"On(ON)",local:"On",global:"On"},off:{display:"Off(OF)",local:"Off",global:"Off"},color:{display:"Color(C)",local:"Color",global:"Color"},freeze:{display:"Freeze(F)",local:"Freeze",global:"Freeze"},thaw:{display:"Thaw(T)",local:"Thaw",global:"Thaw"},lock:{display:"Lock(L)",local:"Lock",global:"Lock"},unlock:{display:"Unlock(U)",local:"Unlock",global:"Unlock"},description:{display:"Description(D)",local:"Description",global:"Description"}}},layon:{alreadyOn:"All layers are already on.",turnedOn:"Turned on layers"},laycur:{prompt:"Select objects to be changed to the current layer",currentLayerNotFound:"Current layer not found.",noObjects:"No valid objects were selected.",alreadyCurrent:"Selected objects are already on the current layer.",changed:"Changed objects to current layer"},layfrz:{prompt:"Select object on layer to freeze or",invalidSelection:"Invalid object selected.",settingsPrompt:"Enter LAYFRZ setting to change",viewportPrompt:"Specify viewport freeze behavior",blockSelectionPrompt:"Specify nested block selection behavior",vpfreezeFallback:"Current viewer does not support per-viewport layer freeze; using Freeze behavior instead.",nestedSelectionLimited:"Nested block selection settings are stored, but current picking still resolves the top-level entity layer.",layerNotFound:"Layer not found",cannotFreezeCurrent:"Cannot freeze the current layer.",alreadyFrozen:"Layer is already frozen",frozen:"Frozen layer",restored:"Restored layer",nothingToUndo:"There is no LAYFRZ action to undo.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},viewports:{display:"Viewports(V)",local:"Viewports",global:"Viewports"},blockSelection:{display:"Block selection(B)",local:"Block selection",global:"BlockSelection"},freeze:{display:"Freeze(F)",local:"Freeze",global:"Freeze"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"},block:{display:"Block(B)",local:"Block",global:"Block"},entity:{display:"Entity(E)",local:"Entity",global:"Entity"},none:{display:"None(N)",local:"None",global:"None"}}},layiso:{prompt:"Select objects on the layer(s) to be isolated or",settingsPrompt:"Enter setting for layers not isolated",offModePrompt:"Enter off behavior for layers not isolated",noLayers:"No valid layers were selected.",layerNotFound:"Layer not found",isolated:"Isolated layer(s)",affectedLayers:"affected layers",vpfreezeFallback:"Current viewer does not support per-viewport layer freeze; using Off behavior instead.",lockFadeFallback:"Current viewer does not support layer fade display; non-isolated layers will be locked without fade.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},off:{display:"Off(O)",local:"Off",global:"Off"},lockAndFade:{display:"Lock and fade(L)",local:"Lock and fade",global:"LockAndFade"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"}}},layuniso:{noPrevious:"No previous LAYISO layer state to restore.",layerNotFound:"Layer not found",nothingRestored:"No LAYISO layer changes were restored.",restored:"Restored layers"},laythw:{alreadyThawed:"All layers are already thawed.",thawed:"Thawed layers"},laylck:{prompt:"Select an object on the layer to be locked",invalidSelection:"Invalid object selected.",layerNotFound:"Layer not found",alreadyLocked:"Layer is already locked",locked:"Locked layer"},layulk:{prompt:"Select an object on the layer to be unlocked",invalidSelection:"Invalid object selected.",layerNotFound:"Layer not found",alreadyUnlocked:"Layer is already unlocked",unlocked:"Unlocked layer"},layoff:{prompt:"Select object on layer to turn off or",invalidSelection:"Invalid object selected.",settingsPrompt:"Enter LAYOFF setting to change",viewportPrompt:"Specify viewport behavior",blockSelectionPrompt:"Specify nested block selection behavior",vpfreezeFallback:"Current viewer does not support per-viewport layer off; using Off behavior instead.",nestedSelectionLimited:"Nested block selection settings are stored, but current picking still resolves the top-level entity layer.",layerNotFound:"Layer not found",cannotTurnOffCurrent:"Cannot turn off the current layer.",alreadyOff:"Layer is already off",turnedOff:"Turned off layer",restored:"Restored layer",nothingToUndo:"There is no LAYOFF action to undo.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},viewports:{display:"Viewports(V)",local:"Viewports",global:"Viewports"},blockSelection:{display:"Block selection(B)",local:"Block selection",global:"BlockSelection"},off:{display:"Off(O)",local:"Off",global:"Off"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"},block:{display:"Block(B)",local:"Block",global:"Block"},entity:{display:"Entity(E)",local:"Entity",global:"Entity"},none:{display:"None(N)",local:"None",global:"None"}}},layerp:{restored:"Restored previous layer state.",noPreviousState:"There is no previous layer state to restore."},line:{firstPoint:"Specify the first point",firstPointOrContinue:"Specify first point or",nextPoint:"Specify the next point",nextPointWithOptions:"Specify next point or",keywords:{continue:{display:"Continue(C)",local:"Continue",global:"Continue"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"}}},xline:{firstPointOrOptions:"Specify a point or",secondPoint:"Specify second point",throughPoint:"Specify through point",angle:"Enter angle of xline",invalidDirection:"Invalid direction for XLINE.",keywords:{hor:{display:"Hor(H)",local:"Hor",global:"Hor"},ver:{display:"Ver(V)",local:"Ver",global:"Ver"},ang:{display:"Ang(A)",local:"Ang",global:"Ang"}}},ray:{startPoint:"Specify start point",throughPoint:"Specify through point"},mline:{startPointWithOptions:"Specify start point or",nextPointWithOptions:"Specify next point or",justificationPrompt:"Enter justification type",scalePrompt:"Specify mline scale",stylePrompt:"Enter mline style name or [?] for list",styleNotFound:"Mline style not found",styleListHeader:"Loaded mline styles",styleListEmpty:"No mline style is loaded in current drawing.",keywords:{justification:{display:"Justification(J)",local:"Justification",global:"Justification"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},style:{display:"Style(ST)",local:"Style",global:"Style"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},top:{display:"Top(T)",local:"Top",global:"Top"},zero:{display:"Zero(Z)",local:"Zero",global:"Zero"},bottom:{display:"Bottom(B)",local:"Bottom",global:"Bottom"}}},measureAngle:{vertex:"Specify vertex point",arm1:"Specify point on first arm",arm2:"Specify point on second arm"},measureArc:{startPoint:"Specify arc start point",throughPoint:"Specify a point on the arc",endPoint:"Specify arc end point",lockedEndPoint:"Specify arc end point (Ctrl to switch major/minor arc)",invalidPoints:"The three points are collinear and do not define an arc."},measureArea:{firstPoint:"Specify first point",nextPoint:"Specify next point (or press Enter to finish)"},measureDistance:{firstPoint:"Specify first point",secondPoint:"Specify second point"},measureContinuous:{firstPoint:"Specify first point",nextPoint:"Specify next point (or press Enter to finish)"},measurePoint:{point:"Specify point"},measurement:{import:{chooseFile:"Choose a measurement sidecar JSON file"}},markup:{author:"Specify review author (saved for later)",text:{point:"Specify text markup point",content:"Enter markup text"},line:{firstPoint:"Specify first point of line markup",secondPoint:"Specify second point of line markup"},arrow:{firstPoint:"Specify arrow start point",secondPoint:"Specify arrow tip"},cloud:{firstCorner:"Specify first corner of cloud",secondCorner:"Specify opposite corner of cloud"},rect:{firstCorner:"Specify first corner of rectangle",secondCorner:"Specify opposite corner of rectangle"},circle:{center:"Specify center of circle",radius:"Specify radius of circle"},shape:{calloutOn:"[Callout on]",calloutOff:"[Callout off]",calloutAnchor:"Specify callout text location",keywords:{callout:{display:"Callout(C)",local:"Callout",global:"Callout"},noCallout:{display:"NoCallout(N)",local:"NoCallout",global:"NoCallout"}}},highlight:{firstCorner:"Specify first corner of highlight",secondCorner:"Specify opposite corner of highlight"},callout:{tip:"Specify leader tip, or a cloud / rectangle / circle outline without a callout",anchor:"Specify callout text location",content:"Enter callout text"},stamp:{kind:"Enter stamp id [approved/rejected/revised/for-review/custom]",imageUrl:"Enter custom stamp image URL (optional)",caption:"Enter stamp caption (optional)",point:"Specify stamp insertion point"},import:{chooseFile:"Choose a markup sidecar JSON file"}},move:{basePointOrDisplacement:"Specify base point or",secondPointOrDisplacement:"Specify second point or",displacement:"Specify displacement",keywords:{displacement:{display:"Displacement(D)",local:"Displacement",global:"Displacement"}}},offset:{distance:"Specify offset distance",selectObject:"Select object to offset or press Enter to finish",sidePoint:"Specify point on side to offset",invalidDistance:"Offset distance must be greater than 0.",invalidSelection:"Selected object cannot be offset.",offsetFailed:"Unable to create an offset curve for the specified side."},mtext:{point:"Specify mtext insertion point"},bmpout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},jpgout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},pngout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},imageattach:{insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",decodeFailed:"Failed to read the selected image file."},insert:{blockName:"Enter block name:",insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",invalidBlockName:"Invalid block name.",blockNotFound:"Block not found",xrefNotAllowed:"Cannot insert an external reference with -INSERT."},xattach:{insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",unsupportedFile:"Please select a DWG or DXF file.",loading:"Loading external reference...",loadFailed:"Failed to read the selected drawing file."},point:{point:"Specify a point"},polygon:{numberOfSides:"Enter number of sides",centerOrEdge:"Specify center of polygon or",radiusOrType:"Enter options",edgeStart:"Specify first endpoint of edge",edgeEnd:"Specify second endpoint of edge",keywords:{edge:{display:"Edge(E)",local:"Edge",global:"Edge"},inscribed:{display:"Inscribed in circle(I)",local:"Inscribed in circle",global:"Inscribed"},circumscribed:{display:"Circumscribed about circle(C)",local:"Circumscribed about circle",global:"Circumscribed"}},invalid:{sides:"Invalid number of sides. Enter an integer between 3 and 1024.",radius:"Invalid radius. Radius must be greater than 0.",edge:"Invalid edge. The edge length must be greater than 0."}},polyline:{firstPoint:"Specify the first point",nextPoint:"Specify the next point (or press Enter to finish)",nextPointWithOptions:"Specify next point or",nextPointWithArcOptions:"Specify next point or",keywords:{arc:{display:"Arc(A)",local:"Arc",global:"Arc"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},line:{display:"Line(L)",local:"Line",global:"Line"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},center:{display:"Center(C)",local:"Center",global:"Center"},secondPoint:{display:"Second point(P)",local:"Second point",global:"SecondPoint"},radius:{display:"Radius(R)",local:"Radius",global:"Radius"}},arcAngle:"Specify arc angle",arcCenter:"Specify center point",arcSecondPoint:"Specify second point on arc",arcEndPoint:"Specify arc end point",arcRadius:"Specify arc radius"},rect:{firstPoint:"Specify first corner point",nextPoint:"Specify other corner point",firstPointWithOptions:"Specify first corner point or",otherCornerWithOptions:"Specify other corner point or",chamferFirst:"Specify first chamfer distance",chamferSecond:"Specify second chamfer distance",filletRadius:"Specify fillet radius",segmentWidth:"Specify rectangle line width",elevationValue:"Specify elevation",thicknessValue:"Specify thickness",rotationAngle:"Specify rectangle rotation angle",dimensionLength:"Specify rectangle length",dimensionWidth:"Specify rectangle width",areaValue:"Specify rectangle area",areaLengthOrWidth:"Specify rectangle length",areaSpecifyWidth:"Specify rectangle width",invalidPositive:"Invalid input. Please enter a value greater than 0.",invalidRect:"Unable to create rectangle. Please specify valid corners or dimensions.",thicknessNotSupported:"Rectangle thickness is currently not written to entity data. The thickness setting is ignored.",keywords:{chamfer:{display:"Chamfer(C)",local:"Chamfer",global:"Chamfer"},elevation:{display:"Elevation(E)",local:"Elevation",global:"Elevation"},fillet:{display:"Fillet(F)",local:"Fillet",global:"Fillet"},thickness:{display:"Thickness(T)",local:"Thickness",global:"Thickness"},width:{display:"Width(W)",local:"Width",global:"Width"},area:{display:"Area(A)",local:"Area",global:"Area"},dimensions:{display:"Dimensions(D)",local:"Dimensions",global:"Dimensions"},rotation:{display:"Rotation(R)",local:"Rotation",global:"Rotation"},length:{display:"Length(L)",local:"Length",global:"Length"},rectWidth:{display:"Width(W)",local:"Width",global:"Width"}}},rotate:{basePoint:"Specify base point",rotationAngleOrOptions:"Specify rotation angle or",referenceAngleOrPoints:"Specify reference angle or",firstReferencePoint:"Specify first point of reference angle",secondReferencePoint:"Specify second point",newAngle:"Specify new angle",keywords:{copy:{display:"Copy(C)",local:"Copy",global:"Copy"},reference:{display:"Reference(R)",local:"Reference",global:"Reference"},points:{display:"Points(P)",local:"Points",global:"Points"}},invalid:{referencePoints:"Invalid reference points: points must be different."}},revcloud:{firstCornerOrOptions:"Specify first corner point or",firstCorner:"Specify first corner point",oppositeCorner:"Specify opposite corner",startPoint:"Specify start point",nextPoint:"Specify next point",nextPointOrUndo:"Specify next point or",firstPoint:"Specify first point",guideCursor:"Guide cursor along cloud path (press Enter to finish)",arcLength:"Specify arc length",selectObject:"Select object",style:"Enter revision cloud arc style",reverseDirection:"Reverse direction",invalidArcLength:"Arc length must be greater than 0.",invalidObject:"Selected object cannot be converted to a revision cloud.",keywords:{arcLength:{display:"Arc length(A)",local:"Arc length",global:"ArcLength"},object:{display:"Object(O)",local:"Object",global:"Object"},rectangular:{display:"Rectangular(R)",local:"Rectangular",global:"Rectangular"},polygonal:{display:"Polygonal(P)",local:"Polygonal",global:"Polygonal"},freehand:{display:"Freehand(F)",local:"Freehand",global:"Freehand"},style:{display:"Style(S)",local:"Style",global:"Style"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},calligraphy:{display:"Calligraphy(C)",local:"Calligraphy",global:"Calligraphy"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}},sketch:{specifySketch:"Specify sketch or",sketching:"Move the pointer to sketch (click or press Enter to stop)",type:"Enter sketch type",increment:"Specify sketch increment",tolerance:"Specify spline tolerance",firstPoint:"Specify the first point",nextPoint:"Specify the end point",keywords:{type:{display:"Type(T)",local:"Type",global:"Type"},increment:{display:"Increment(I)",local:"Increment",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"Lines(L)",local:"Lines",global:"Lines"},polyline:{display:"Polyline(P)",local:"Polyline",global:"Polyline"},spline:{display:"Spline(S)",local:"Spline",global:"Spline"}}},spline:{firstPoint:"Specify the first point",nextPoint:"Specify the next point (or press Enter to finish)",firstPointWithOptions:"Specify first point or",nextPointWithFitOptions:"Specify next point or",nextPointWithCvOptions:"Specify next control vertex or",methodPrompt:"Enter spline creation method",knotsPrompt:"Enter knot parameterization",degreePrompt:"Specify spline degree",keywords:{method:{display:"Method(M)",local:"Method",global:"Method"},fit:{display:"Fit(F)",local:"Fit",global:"Fit"},cv:{display:"CV(C)",local:"CV",global:"CV"},knots:{display:"Knots(K)",local:"Knots",global:"Knots"},degree:{display:"Degree(D)",local:"Degree",global:"Degree"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},chord:{display:"Chord(C)",local:"Chord",global:"Chord"},sqrtChord:{display:"Sqrt chord(S)",local:"Sqrt chord",global:"SqrtChord"},uniform:{display:"Uniform(U)",local:"Uniform",global:"Uniform"}}},objectscale:{action:"Enter an option",scaleName:"Enter annotation scale name",done:"Updated objects",none:"(none)",keywords:{add:{display:"Add(A)",local:"Add",global:"Add"},delete:{display:"Delete(D)",local:"Delete",global:"Delete"},list:{display:"List(L)",local:"List",global:"List"}}},sysvar:{prompt:"Please input new value"},zoom:{mainPrompt:"Specify corner of window or",firstCorner:"Specify first corner",secondCorner:"Specify opposite corner",centerPoint:"Specify center point",heightOrScale:"Enter height or scale factor (nX or nXP)",scaleFactor:"Enter scale factor (nX or nXP)",keywords:{all:{display:"All(A)",local:"All",global:"All"},center:{display:"Center(C)",local:"Center",global:"Center"},extents:{display:"Extents(E)",local:"Extents",global:"Extents"},previous:{display:"Previous(P)",local:"Previous",global:"Previous"},original:{display:"Original(O)",local:"Original",global:"Original"},saved:{display:"Saved(V)",local:"Saved",global:"Saved"},smart:{display:"Smart(I)",local:"Smart",global:"Smart"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},window:{display:"Window(W)",local:"Window",global:"Window"}}},chtml:{exportFormat:"Export format",exportInvisibleLayers:"Export invisible layers",exportLayouts:"Export layouts",initialView:"Initial view when opening HTML",viewerMode:"Offline viewer mode",chunkSizeMiB:"Chunk size in MiB (multi-file package)",compressChunks:"Compress chunks (multi-file package)",keywords:{single:{display:"Single(S)",local:"Single",global:"Single"},multi:{display:"Multi-file package(M)",local:"Multi-file package",global:"Multi"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"},extents:{display:"Extents(E)",local:"Extents",global:"Extents"},current:{display:"Current(C)",local:"Current",global:"Current"},view:{display:"View(V)",local:"View",global:"View"},measure:{display:"Measure & Review(M)",local:"Measure & Review",global:"Measure"}}},cpdf:{modelSpaceFit:"Model space frame",exportLayouts:"Export layouts",textMode:"Text rendering",keywords:{extents:{display:"Extents(E)",local:"Extents",global:"Extents"},display:{display:"Display(D)",local:"Display",global:"Display"},text:{display:"Text(T)",local:"Text",global:"Text"},vector:{display:"Vector(V)",local:"Vector",global:"Vector"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}}},vS={...R,arc:{...R.arc,startPointOrCenter:"حدد نقطة بداية القوس أو",secondPointOrOptions:"حدد النقطة الثانية للقوس أو",secondPoint:"حدد النقطة الثانية للقوس",startPoint:"حدد نقطة بداية القوس",centerPoint:"حدد نقطة مركز القوس",endPoint:"حدد نقطة نهاية القوس",endPointOrOptions:"حدد نقطة نهاية القوس أو",centerPointOrOptions:"حدد نقطة مركز القوس",includedAngle:"حدد الزاوية المحصورة",chordLength:"حدد طول الوتر",tangentDirection:"حدد اتجاه المماس عند نقطة بداية القوس",radius:"حدد نصف قطر القوس",invalid:{...R.arc.invalid,threePoint:"قوس الثلاث نقاط غير صالح: النقاط على استقامة واحدة أو لا يمكنها تعريف قوس.",center:"إدخال المركز غير صالح: يجب أن تقع نقطتا البداية والنهاية على الدائرة نفسها.",angle:"الزاوية غير صالحة: يجب أن تكون الزاوية المحصورة أكبر من 0 وأقل من 360 درجة.",chordLength:"طول الوتر غير صالح: القيمة خارج النطاق المسموح به لنصف القطر الحالي.",direction:"الاتجاه غير صالح: لا يمكن إنشاء القوس باستخدام اتجاه المماس المحدد.",radius:"نصف القطر غير صالح: لا يمكن لنصف القطر المحدد توصيل نقطتي البداية والنهاية."},keywords:{...R.arc.keywords,center:{display:"المركز(C)",local:"المركز",global:"Center"},end:{display:"النهاية(E)",local:"النهاية",global:"End"},angle:{display:"زاوية(A)",local:"زاوية",global:"Angle"},chordLength:{display:"طول الوتر(L)",local:"طول الوتر",global:"ChordLength"},direction:{display:"الاتجاه(D)",local:"الاتجاه",global:"Direction"},radius:{display:"نصف القطر(R)",local:"نصف القطر",global:"Radius"}}},circle:{...R.circle,center:"حدد مركز الدائرة",centerOrOptions:"حدد نقطة مركز الدائرة أو",radius:"حدد نصف قطر الدائرة",radiusOrDiameter:"حدد نصف قطر الدائرة أو",diameter:"حدد قطر الدائرة",twoPointFirst:"حدد نقطة النهاية الأولى لقطر الدائرة",twoPointSecond:"حدد نقطة النهاية الثانية لقطر الدائرة",threePointFirst:"حدد النقطة الأولى على الدائرة",threePointSecond:"حدد النقطة الثانية على الدائرة",threePointThird:"حدد النقطة الثالثة على الدائرة",keywords:{...R.circle.keywords,threeP:{display:"3 نقاط(3P)",local:"3 نقاط",global:"3P"},twoP:{display:"نقطتان(2P)",local:"نقطتان",global:"2P"},diameter:{display:"القطر(D)",local:"القطر",global:"Diameter"}}},copy:{...R.copy,basePointOrOptions:"حدد نقطة الأساس أو",displacementOrArray:"حدد الإزاحة أو",secondPointOrArray:"حدد النقطة الثانية أو",modePrompt:"أدخل خيار وضع النسخ",arrayItemCount:"أدخل عدد العناصر في المصفوفة بما في ذلك العنصر الأصلي",arraySecondPointOrFit:"حدد النقطة الثانية أو",arrayFitSecondPoint:"حدد النقطة الثانية",keywords:{...R.copy.keywords,displacement:{display:"إزاحة(D)",local:"إزاحة",global:"Displacement"},mode:{display:"وضع(O)",local:"وضع",global:"Mode"},multiple:{display:"متعدد(M)",local:"متعدد",global:"Multiple"},single:{display:"مفرد(S)",local:"مفرد",global:"Single"},array:{display:"مصفوفة(A)",local:"مصفوفة",global:"Array"},fit:{display:"ملاءمة(F)",local:"ملاءمة",global:"Fit"}}},dimlinear:{...R.dimlinear,xLine1Point:"حدد نقطة أصل خط الامتداد الأول",xLine2Point:"حدد نقطة أصل خط الامتداد الثاني",dimLinePoint:"حدد موقع خط البُعد"},dimaligned:{...R.dimaligned},dimradius:{...R.dimradius},dimdiameter:{...R.dimdiameter},dimangular:{...R.dimangular},dimarc:{...R.dimarc},dimordinate:{...R.dimordinate},dimcontinue:{...R.dimcontinue},dimbaseline:{...R.dimbaseline},ellipse:{...R.ellipse,axisEndpointOrOptions:"حدد نقطة نهاية محور القطع الناقص أو",arcAxisEndpointOrCenter:"حدد نقطة نهاية محور القوس البيضاوي أو",center:"حدد مركز القطع الناقص",firstAxisEndpoint:"حدد نقطة نهاية المحور الأولى",secondAxisEndpoint:"حدد نقطة النهاية الأخرى للمحور",otherAxisOrRotation:"حدد المسافة إلى المحور الآخر أو",rotationAngle:"حدد زاوية الدوران حول المحور الأكبر",arcStartAngle:"حدد زاوية بداية القوس البيضاوي",arcEndAngle:"حدد زاوية نهاية القوس البيضاوي",invalid:{...R.ellipse.invalid,axis:"المحور غير صالح: يجب أن يكون طول المحور أكبر من 0.",otherAxis:"المحور الآخر غير صالح: يجب أن تكون المسافة أكبر من 0.",rotation:"الدوران غير صالح: يجب أن يكون المحور الأصغر الناتج أكبر من 0."},keywords:{...R.ellipse.keywords,arc:{display:"قوس(A)",local:"قوس",global:"Arc"},center:{display:"المركز(C)",local:"المركز",global:"Center"},rotation:{display:"دوران(R)",local:"دوران",global:"Rotation"}}},hatch:{...R.hatch,prompt:"حدد عنصر حدود أو",pickPoint:"حدد نقطة داخلية (أو اضغط Enter للإنهاء)",select:"حدد العناصر المطلوب تهشيرها",patternName:"أدخل اسم نمط التهشير",scale:"حدد مقياس نمط التهشير",angle:"حدد زاوية نمط التهشير",style:"أدخل نمط التهشير",associative:"حدد حالة الترابط",invalidBoundary:"العناصر المحددة لا تكوّن حدودًا مغلقة.",keywords:{...R.hatch.keywords,pick:{display:"اختيار نقاط(P)",local:"اختيار نقاط",global:"PickPoints"},select:{display:"تحديد كائنات(S)",local:"تحديد كائنات",global:"SelectObjects"},cancel:{display:"إلغاء(C)",local:"إلغاء",global:"Cancel"},pattern:{display:"نمط(P)",local:"نمط",global:"Pattern"},scale:{display:"مقياس(S)",local:"مقياس",global:"Scale"},angle:{display:"زاوية(A)",local:"زاوية",global:"Angle"},style:{display:"أسلوب(T)",local:"أسلوب",global:"HatchStyle"},associative:{display:"ترابطي(AS)",local:"ترابطي",global:"AssociativeMode"},normal:{display:"عادي(N)",local:"عادي",global:"Normal"},outer:{display:"خارجي(O)",local:"خارجي",global:"Outer"},ignore:{display:"تجاهل(I)",local:"تجاهل",global:"Ignore"},yes:{display:"نعم(Y)",local:"نعم",global:"Yes"},no:{display:"لا(N)",local:"لا",global:"No"}}},line:{...R.line,firstPoint:"حدد النقطة الأولى",firstPointOrContinue:"حدد النقطة الأولى أو",nextPoint:"حدد النقطة التالية",nextPointWithOptions:"حدد النقطة التالية أو",keywords:{...R.line.keywords,continue:{display:"متابعة(C)",local:"متابعة",global:"Continue"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},close:{display:"إغلاق(C)",local:"إغلاق",global:"Close"}}},xline:{...R.xline,firstPointOrOptions:"حدد نقطة أو",secondPoint:"حدد النقطة الثانية",throughPoint:"حدد نقطة يمر بها الخط",angle:"أدخل زاوية الخط الإنشائي",invalidDirection:"اتجاه XLINE غير صالح.",keywords:{...R.xline.keywords,hor:{display:"أفقي(H)",local:"أفقي",global:"Hor"},ver:{display:"رأسي(V)",local:"رأسي",global:"Ver"},ang:{display:"زاوية(A)",local:"زاوية",global:"Ang"}}},ray:{...R.ray,startPoint:"حدد نقطة البداية",throughPoint:"حدد نقطة يمر بها الشعاع"},move:{...R.move,basePointOrDisplacement:"حدد نقطة الأساس أو",secondPointOrDisplacement:"حدد النقطة الثانية أو",displacement:"حدد الإزاحة",keywords:{...R.move.keywords,displacement:{display:"إزاحة(D)",local:"إزاحة",global:"Displacement"}}},offset:{...R.offset,distance:"حدد مسافة الإزاحة",selectObject:"حدد العنصر المطلوب إزاحته أو اضغط Enter للإنهاء",sidePoint:"حدد نقطة في جهة الإزاحة",invalidDistance:"يجب أن تكون مسافة الإزاحة أكبر من 0.",invalidSelection:"لا يمكن إنشاء إزاحة للعنصر المحدد.",offsetFailed:"تعذر إنشاء منحنى إزاحة في الجهة المحددة."},mtext:{...R.mtext,point:"حدد نقطة إدراج النص متعدد الأسطر"},point:{...R.point,point:"حدد نقطة"},polygon:{...R.polygon,numberOfSides:"أدخل عدد الأضلاع",centerOrEdge:"حدد مركز المضلع أو",radiusOrType:"أدخل الخيارات",edgeStart:"حدد نقطة النهاية الأولى للضلع",edgeEnd:"حدد نقطة النهاية الثانية للضلع",invalid:{...R.polygon.invalid,sides:"عدد الأضلاع غير صالح. أدخل عددًا صحيحًا بين 3 و1024.",radius:"نصف القطر غير صالح. يجب أن يكون أكبر من 0.",edge:"الضلع غير صالح. يجب أن يكون طول الضلع أكبر من 0."},keywords:{...R.polygon.keywords,edge:{display:"حافة(E)",local:"حافة",global:"Edge"},inscribed:{display:"داخل الدائرة(I)",local:"داخل الدائرة",global:"Inscribed"},circumscribed:{display:"محيط بالدائرة(C)",local:"محيط بالدائرة",global:"Circumscribed"}}},polyline:{...R.polyline,firstPoint:"حدد النقطة الأولى",nextPoint:"حدد النقطة التالية (أو اضغط Enter للإنهاء)",nextPointWithOptions:"حدد النقطة التالية أو",nextPointWithArcOptions:"حدد النقطة التالية أو",arcAngle:"حدد زاوية القوس",arcCenter:"حدد نقطة مركز القوس",arcSecondPoint:"حدد النقطة الثانية على القوس",arcEndPoint:"حدد نقطة نهاية القوس",arcRadius:"حدد نصف قطر القوس",keywords:{...R.polyline.keywords,arc:{display:"قوس(A)",local:"قوس",global:"Arc"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},close:{display:"إغلاق(C)",local:"إغلاق",global:"Close"},line:{display:"خط(L)",local:"خط",global:"Line"},angle:{display:"زاوية(A)",local:"زاوية",global:"Angle"},center:{display:"المركز(C)",local:"المركز",global:"Center"},secondPoint:{display:"النقطة الثانية(P)",local:"النقطة الثانية",global:"SecondPoint"},radius:{display:"نصف القطر(R)",local:"نصف القطر",global:"Radius"}}},rect:{...R.rect,firstPoint:"حدد نقطة الركن الأول",nextPoint:"حدد نقطة الركن المقابل",firstPointWithOptions:"حدد نقطة الركن الأول أو",otherCornerWithOptions:"حدد نقطة الركن الآخر أو",chamferFirst:"حدد مسافة الشطف الأولى",chamferSecond:"حدد مسافة الشطف الثانية",filletRadius:"حدد نصف قطر التدوير",segmentWidth:"حدد عرض خط المستطيل",elevationValue:"حدد المنسوب",thicknessValue:"حدد السماكة",rotationAngle:"حدد زاوية دوران المستطيل",dimensionLength:"حدد طول المستطيل",dimensionWidth:"حدد عرض المستطيل",areaValue:"حدد مساحة المستطيل",areaLengthOrWidth:"حدد طول المستطيل",areaSpecifyWidth:"حدد عرض المستطيل",invalidPositive:"إدخال غير صالح. أدخل قيمة أكبر من 0.",invalidRect:"تعذر إنشاء المستطيل. حدد أركانًا أو أبعادًا صالحة.",thicknessNotSupported:"سماكة المستطيل لا تُكتب حاليًا إلى بيانات العنصر، لذلك سيتم تجاهل إعداد السماكة.",keywords:{...R.rect.keywords,chamfer:{display:"شطف(C)",local:"شطف",global:"Chamfer"},elevation:{display:"ارتفاع(E)",local:"ارتفاع",global:"Elevation"},fillet:{display:"تقويس(F)",local:"تقويس",global:"Fillet"},thickness:{display:"السماكة(T)",local:"السماكة",global:"Thickness"},width:{display:"العرض(W)",local:"العرض",global:"Width"},area:{display:"مساحة(A)",local:"مساحة",global:"Area"},dimensions:{display:"الأبعاد(D)",local:"الأبعاد",global:"Dimensions"},rotation:{display:"دوران(R)",local:"دوران",global:"Rotation"},length:{display:"طول(L)",local:"طول",global:"Length"},rectWidth:{display:"عرض المستطيل(W)",local:"عرض المستطيل",global:"Width"}}},rotate:{...R.rotate,basePoint:"حدد نقطة الأساس",rotationAngleOrOptions:"حدد زاوية الدوران أو",referenceAngleOrPoints:"حدد الزاوية المرجعية أو",firstReferencePoint:"حدد النقطة الأولى للزاوية المرجعية",secondReferencePoint:"حدد النقطة الثانية",newAngle:"حدد الزاوية الجديدة",invalid:{...R.rotate.invalid,referencePoints:"النقاط المرجعية غير صالحة: يجب أن تكون النقطتان مختلفتين."},keywords:{...R.rotate.keywords,copy:{display:"نسخ(C)",local:"نسخ",global:"Copy"},reference:{display:"مرجع(R)",local:"مرجع",global:"Reference"},points:{display:"نقاط(P)",local:"نقاط",global:"Points"}}},spline:{...R.spline,firstPoint:"حدد النقطة الأولى",nextPoint:"حدد النقطة التالية (أو اضغط Enter للإنهاء)",firstPointWithOptions:"حدد النقطة الأولى أو",nextPointWithFitOptions:"حدد النقطة التالية أو",nextPointWithCvOptions:"حدد نقطة التحكم التالية أو",methodPrompt:"أدخل طريقة إنشاء Spline",knotsPrompt:"أدخل طريقة توزيع العقد",degreePrompt:"حدد درجة منحنى Spline",keywords:{...R.spline.keywords,method:{display:"طريقة(M)",local:"طريقة",global:"Method"},fit:{display:"ملاءمة(F)",local:"ملاءمة",global:"Fit"},cv:{display:"نقاط التحكم(C)",local:"نقاط التحكم",global:"CV"},knots:{display:"عُقد(K)",local:"عُقد",global:"Knots"},degree:{display:"درجة(D)",local:"درجة",global:"Degree"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},close:{display:"إغلاق(C)",local:"إغلاق",global:"Close"},chord:{display:"وتر(C)",local:"وتر",global:"Chord"},sqrtChord:{display:"جذر الوتر(S)",local:"جذر الوتر",global:"SqrtChord"},uniform:{display:"منتظم(U)",local:"منتظم",global:"Uniform"}}},zoom:{...R.zoom,mainPrompt:"حدد ركن نافذة التكبير أو",firstCorner:"حدد الركن الأول",secondCorner:"حدد الركن المقابل",centerPoint:"حدد نقطة المركز",heightOrScale:"أدخل الارتفاع أو معامل المقياس (nX أو nXP)",scaleFactor:"أدخل معامل المقياس (nX أو nXP)",keywords:{...R.zoom.keywords,all:{display:"الكل(A)",local:"الكل",global:"All"},center:{display:"المركز(C)",local:"المركز",global:"Center"},extents:{display:"الحدود(E)",local:"الحدود",global:"Extents"},previous:{display:"السابق(P)",local:"السابق",global:"Previous"},original:{display:"الأصلي(O)",local:"الأصلي",global:"Original"},saved:{display:"المحفوظ(V)",local:"المحفوظ",global:"Saved"},smart:{display:"ذكي(I)",local:"ذكي",global:"Smart"},scale:{display:"مقياس(S)",local:"مقياس",global:"Scale"},window:{display:"نافذة(W)",local:"نافذة",global:"Window"}}},hideobjects:{...R.hideobjects,hidden:"تم إخفاء العناصر",restored:"تمت استعادة العناصر",nothingToRestore:"لا توجد عناصر مخفية لاستعادتها"},entout:{...R.entout,longSidePrompt:"أدخل حجم الضلع الأطول للمعاينة بالبكسل",exported:"تم تصدير معاينات العناصر",skipped:"تم تخطي بعض العناصر",failed:{...R.entout.failed,"no-preview-root":"تعذر إنشاء هندسة المعاينة للعناصر المحددة","no-bounds":"تعذر حساب حدود المعاينة للعناصر المحددة","capture-failed":"تعذر عرض صورة معاينة العناصر","download-failed":"تم إنشاء المعاينة ولكن فشل تنزيل ملف PNG"}},layer:{...R.layer,main:"أدخل خيارًا",listSummary:"تمت طباعة قائمة الطبقات في وحدة تحكم المتصفح",emptyInput:"لم يتم إدخال اسم طبقة.",newPrompt:"أدخل اسم الطبقة أو الطبقات الجديدة",makePrompt:"أدخل اسم الطبقة المطلوب إنشاؤها وجعلها حالية",setPrompt:"أدخل اسم الطبقة المطلوب جعلها حالية",onPrompt:"أدخل أسماء الطبقات المطلوب تشغيلها",offPrompt:"أدخل أسماء الطبقات المطلوب إيقافها",freezePrompt:"أدخل أسماء الطبقات المطلوب تجميدها",thawPrompt:"أدخل أسماء الطبقات المطلوب إلغاء تجميدها",lockPrompt:"أدخل أسماء الطبقات المطلوب قفلها",unlockPrompt:"أدخل أسماء الطبقات المطلوب إلغاء قفلها",colorLayerPrompt:"أدخل أسماء الطبقات المطلوب تغيير لونها",colorValuePrompt:"أدخل اللون (ACI من 1 إلى 255، أو RGB مثل 255,0,0، أو اسم لون CSS)",invalidColor:"قيمة اللون غير صالحة.",descriptionLayerPrompt:"أدخل اسم الطبقة المطلوب تعديل وصفها",descriptionValuePrompt:"أدخل وصف الطبقة الجديد",created:"عدد الطبقات التي تم إنشاؤها",alreadyExists:"الطبقة موجودة بالفعل",notFound:"الطبقة غير موجودة",cannotChangeCurrent:"لا يمكن إيقاف الطبقة الحالية أو تجميدها.",keywords:{...R.layer.keywords,list:{display:"قائمة(?)",local:"قائمة",global:"?"},make:{display:"إنشاء(M)",local:"إنشاء",global:"Make"},set:{display:"تعيين(S)",local:"تعيين",global:"Set"},new:{display:"جديد(N)",local:"جديد",global:"New"},on:{display:"تشغيل(ON)",local:"تشغيل",global:"On"},off:{display:"إيقاف(OF)",local:"إيقاف",global:"Off"},color:{display:"لون(C)",local:"لون",global:"Color"},freeze:{display:"تجميد(F)",local:"تجميد",global:"Freeze"},thaw:{display:"إلغاء التجميد(T)",local:"إلغاء التجميد",global:"Thaw"},lock:{display:"قفل(L)",local:"قفل",global:"Lock"},unlock:{display:"إلغاء القفل(U)",local:"إلغاء القفل",global:"Unlock"},description:{display:"وصف(D)",local:"وصف",global:"Description"}}},layon:{...R.layon,alreadyOn:"جميع الطبقات قيد التشغيل بالفعل.",turnedOn:"تم تشغيل الطبقات"},laycur:{...R.laycur,prompt:"حدد العناصر المطلوب نقلها إلى الطبقة الحالية",currentLayerNotFound:"الطبقة الحالية غير موجودة.",noObjects:"لم يتم تحديد عناصر صالحة.",alreadyCurrent:"العناصر المحددة موجودة بالفعل على الطبقة الحالية.",changed:"تم نقل العناصر إلى الطبقة الحالية"},layfrz:{...R.layfrz,prompt:"حدد عنصرًا على الطبقة المطلوب تجميدها أو",invalidSelection:"العنصر المحدد غير صالح.",settingsPrompt:"أدخل إعداد LAYFRZ المطلوب تغييره",viewportPrompt:"حدد سلوك التجميد داخل منفذ العرض",blockSelectionPrompt:"حدد سلوك اختيار الكتل المتداخلة",vpfreezeFallback:"العارض الحالي لا يدعم تجميد الطبقات بشكل مستقل لكل منفذ عرض؛ سيتم استخدام التجميد العادي بدلًا من ذلك.",nestedSelectionLimited:"تم حفظ إعدادات اختيار الكتل المتداخلة، لكن الاختيار الحالي ما زال يعتمد طبقة العنصر ذي المستوى الأعلى.",layerNotFound:"الطبقة غير موجودة",cannotFreezeCurrent:"لا يمكن تجميد الطبقة الحالية.",alreadyFrozen:"الطبقة مجمدة بالفعل",frozen:"تم تجميد الطبقة",restored:"تمت استعادة الطبقة",nothingToUndo:"لا توجد عملية LAYFRZ يمكن التراجع عنها.",keywords:{...R.layfrz.keywords,settings:{display:"إعدادات(S)",local:"إعدادات",global:"Settings"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},viewports:{display:"إطارات العرض(V)",local:"إطارات العرض",global:"Viewports"},blockSelection:{display:"تحديد الكتلة(B)",local:"تحديد الكتلة",global:"BlockSelection"},freeze:{display:"تجميد(F)",local:"تجميد",global:"Freeze"},vpfreeze:{display:"تجميد إطار العرض(V)",local:"تجميد إطار العرض",global:"Vpfreeze"},block:{display:"كتلة(B)",local:"كتلة",global:"Block"},entity:{display:"كيان(E)",local:"كيان",global:"Entity"},none:{display:"لا شيء(N)",local:"لا شيء",global:"None"}}},layiso:{...R.layiso,prompt:"حدد عناصر على الطبقة أو الطبقات المطلوب عزلها أو",settingsPrompt:"أدخل إعداد الطبقات غير المعزولة",offModePrompt:"حدد سلوك إيقاف الطبقات غير المعزولة",noLayers:"لم يتم تحديد طبقات صالحة.",layerNotFound:"الطبقة غير موجودة",isolated:"تم عزل الطبقات",affectedLayers:"الطبقات المتأثرة",vpfreezeFallback:"العارض الحالي لا يدعم التجميد المستقل لكل منفذ عرض؛ سيتم استخدام الإيقاف بدلًا من ذلك.",lockFadeFallback:"العارض الحالي لا يدعم إظهار الطبقات بتأثير التلاشي؛ سيتم قفل الطبقات غير المعزولة دون تلاشي.",keywords:{...R.layiso.keywords,settings:{display:"إعدادات(S)",local:"إعدادات",global:"Settings"},off:{display:"إيقاف(O)",local:"إيقاف",global:"Off"},lockAndFade:{display:"قفل وتعتيم(L)",local:"قفل وتعتيم",global:"LockAndFade"},vpfreeze:{display:"تجميد إطار العرض(V)",local:"تجميد إطار العرض",global:"Vpfreeze"}}},layuniso:{...R.layuniso,noPrevious:"لا توجد حالة LAYISO سابقة لاستعادتها.",layerNotFound:"الطبقة غير موجودة",nothingRestored:"لم تتم استعادة أي تغييرات طبقات من LAYISO.",restored:"تمت استعادة الطبقات"},laythw:{...R.laythw,alreadyThawed:"جميع الطبقات غير مجمدة بالفعل.",thawed:"تم إلغاء تجميد الطبقات"},laylck:{...R.laylck,prompt:"حدد عنصرًا على الطبقة المطلوب قفلها",invalidSelection:"العنصر المحدد غير صالح.",layerNotFound:"الطبقة غير موجودة",alreadyLocked:"الطبقة مقفلة بالفعل",locked:"تم قفل الطبقة"},layulk:{...R.layulk,prompt:"حدد عنصرًا على الطبقة المطلوب إلغاء قفلها",invalidSelection:"العنصر المحدد غير صالح.",layerNotFound:"الطبقة غير موجودة",alreadyUnlocked:"الطبقة غير مقفلة بالفعل",unlocked:"تم إلغاء قفل الطبقة"},layoff:{...R.layoff,prompt:"حدد عنصرًا على الطبقة المطلوب إيقافها أو",invalidSelection:"العنصر المحدد غير صالح.",settingsPrompt:"أدخل إعداد LAYOFF المطلوب تغييره",viewportPrompt:"حدد سلوك منفذ العرض",blockSelectionPrompt:"حدد سلوك اختيار الكتل المتداخلة",vpfreezeFallback:"العارض الحالي لا يدعم إيقاف الطبقات بشكل مستقل لكل منفذ عرض؛ سيتم استخدام الإيقاف العادي بدلًا من ذلك.",nestedSelectionLimited:"تم حفظ إعدادات اختيار الكتل المتداخلة، لكن الاختيار الحالي ما زال يعتمد طبقة العنصر ذي المستوى الأعلى.",layerNotFound:"الطبقة غير موجودة",cannotTurnOffCurrent:"لا يمكن إيقاف الطبقة الحالية.",alreadyOff:"الطبقة متوقفة بالفعل",turnedOff:"تم إيقاف الطبقة",restored:"تمت استعادة الطبقة",nothingToUndo:"لا توجد عملية LAYOFF يمكن التراجع عنها.",keywords:{...R.layoff.keywords,settings:{display:"إعدادات(S)",local:"إعدادات",global:"Settings"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},viewports:{display:"إطارات العرض(V)",local:"إطارات العرض",global:"Viewports"},blockSelection:{display:"تحديد الكتلة(B)",local:"تحديد الكتلة",global:"BlockSelection"},off:{display:"إيقاف(O)",local:"إيقاف",global:"Off"},vpfreeze:{display:"تجميد إطار العرض(V)",local:"تجميد إطار العرض",global:"Vpfreeze"},block:{display:"كتلة(B)",local:"كتلة",global:"Block"},entity:{display:"كيان(E)",local:"كيان",global:"Entity"},none:{display:"لا شيء(N)",local:"لا شيء",global:"None"}}},layerp:{...R.layerp,restored:"تمت استعادة حالة الطبقات السابقة.",noPreviousState:"لا توجد حالة طبقات سابقة لاستعادتها."},mline:{...R.mline,startPointWithOptions:"حدد نقطة البداية أو",nextPointWithOptions:"حدد النقطة التالية أو",justificationPrompt:"أدخل نوع المحاذاة",scalePrompt:"حدد مقياس الخط المتعدد",stylePrompt:"أدخل اسم نمط الخط المتعدد أو [?] لعرض القائمة",styleNotFound:"نمط الخط المتعدد غير موجود",styleListHeader:"أنماط الخطوط المتعددة المحملة",styleListEmpty:"لا توجد أنماط خطوط متعددة محملة في الرسم الحالي.",keywords:{...R.mline.keywords,justification:{display:"محاذاة(J)",local:"محاذاة",global:"Justification"},scale:{display:"مقياس(S)",local:"مقياس",global:"Scale"},style:{display:"أسلوب(ST)",local:"أسلوب",global:"Style"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},close:{display:"إغلاق(C)",local:"إغلاق",global:"Close"},top:{display:"أعلى(T)",local:"أعلى",global:"Top"},zero:{display:"صفر(Z)",local:"صفر",global:"Zero"},bottom:{display:"أسفل(B)",local:"أسفل",global:"Bottom"}}},measureAngle:{...R.measureAngle,vertex:"حدد نقطة رأس الزاوية",arm1:"حدد نقطة على الضلع الأول",arm2:"حدد نقطة على الضلع الثاني"},measureArc:{...R.measureArc,startPoint:"حدد نقطة بداية القوس",throughPoint:"حدد نقطة على القوس",endPoint:"حدد نقطة نهاية القوس",lockedEndPoint:"حدد نقطة نهاية القوس (استخدم Ctrl للتبديل بين القوس الأكبر والأصغر)",invalidPoints:"النقاط الثلاث على استقامة واحدة ولا يمكنها تعريف قوس."},measureArea:{...R.measureArea,firstPoint:"حدد النقطة الأولى",nextPoint:"حدد النقطة التالية (أو اضغط Enter للإنهاء)"},measureDistance:{...R.measureDistance,firstPoint:"حدد النقطة الأولى",secondPoint:"حدد النقطة الثانية"},measureContinuous:{...R.measureContinuous,firstPoint:"حدد النقطة الأولى",nextPoint:"حدد النقطة التالية (أو اضغط Enter للإنهاء)"},measurePoint:{...R.measurePoint,point:"حدد نقطة"},measurement:{...R.measurement,import:{...R.measurement.import,chooseFile:"اختر ملف JSON جانبيًا يحتوي على القياسات"}},markup:{...R.markup,author:"حدد اسم مؤلف المراجعة (سيتم حفظه للاستخدام لاحقًا)",text:{...R.markup.text,point:"حدد موضع علامة النص",content:"أدخل نص علامة المراجعة"},line:{...R.markup.line,firstPoint:"حدد النقطة الأولى لخط المراجعة",secondPoint:"حدد النقطة الثانية لخط المراجعة"},arrow:{...R.markup.arrow,firstPoint:"حدد نقطة بداية السهم",secondPoint:"حدد رأس السهم"},cloud:{...R.markup.cloud,firstCorner:"حدد الركن الأول للسحابة",secondCorner:"حدد الركن المقابل للسحابة"},rect:{...R.markup.rect,firstCorner:"حدد الركن الأول للمستطيل",secondCorner:"حدد الركن المقابل للمستطيل"},circle:{...R.markup.circle,center:"حدد مركز الدائرة",radius:"حدد نصف قطر الدائرة"},shape:{...R.markup.shape,calloutOn:"[وسيلة الشرح مفعلة]",calloutOff:"[وسيلة الشرح معطلة]",calloutAnchor:"حدد موضع نص وسيلة الشرح",keywords:{...R.markup.shape.keywords,callout:{display:"تعليق توضيحي(C)",local:"تعليق توضيحي",global:"Callout"},noCallout:{display:"بدون تعليق توضيحي(N)",local:"بدون تعليق توضيحي",global:"NoCallout"}}},highlight:{...R.markup.highlight,firstCorner:"حدد الركن الأول لمنطقة التمييز",secondCorner:"حدد الركن المقابل لمنطقة التمييز"},callout:{...R.markup.callout,tip:"حدد رأس خط التوجيه، أو حدد إطار سحابة/مستطيل/دائرة بدون تعليق توضيحي",anchor:"حدد موضع نص وسيلة الشرح",content:"أدخل نص وسيلة الشرح"},stamp:{...R.markup.stamp,kind:"أدخل معرّف الختم [approved/rejected/revised/for-review/custom]",imageUrl:"أدخل رابط صورة الختم المخصص (اختياري)",caption:"أدخل تسمية الختم (اختياري)",point:"حدد نقطة إدراج الختم"},import:{...R.markup.import,chooseFile:"اختر ملف JSON جانبيًا يحتوي على علامات المراجعة"}},bmpout:{...R.bmpout,boundsFirstCorner:"حدد الركن الأول لحدود الصورة",boundsSecondCorner:"حدد الركن المقابل",longSidePrompt:"أدخل حجم الضلع الأطول بالبكسل"},jpgout:{...R.jpgout,boundsFirstCorner:"حدد الركن الأول لحدود الصورة",boundsSecondCorner:"حدد الركن المقابل",longSidePrompt:"أدخل حجم الضلع الأطول بالبكسل"},pngout:{...R.pngout,boundsFirstCorner:"حدد الركن الأول لحدود الصورة",boundsSecondCorner:"حدد الركن المقابل",longSidePrompt:"أدخل حجم الضلع الأطول بالبكسل"},imageattach:{...R.imageattach,insertionPoint:"حدد نقطة الإدراج:",scale:"حدد معامل المقياس:",rotation:"حدد زاوية الدوران:",invalidScale:"يجب أن يكون معامل المقياس أكبر من 0.",decodeFailed:"فشلت قراءة ملف الصورة المحدد."},insert:{...R.insert,blockName:"أدخل اسم الكتلة:",insertionPoint:"حدد نقطة الإدراج:",scale:"حدد معامل المقياس:",rotation:"حدد زاوية الدوران:",invalidScale:"يجب أن يكون معامل المقياس أكبر من 0.",invalidBlockName:"اسم الكتلة غير صالح.",blockNotFound:"الكتلة غير موجودة",xrefNotAllowed:"لا يمكن إدراج مرجع خارجي باستخدام -INSERT."},xattach:{...R.xattach,insertionPoint:"حدد نقطة الإدراج:",scale:"حدد معامل المقياس:",rotation:"حدد زاوية الدوران:",invalidScale:"يجب أن يكون معامل المقياس أكبر من 0.",unsupportedFile:"اختر ملف DWG أو DXF.",loading:"جارٍ تحميل المرجع الخارجي...",loadFailed:"فشلت قراءة ملف الرسم المحدد."},revcloud:{...R.revcloud,firstCornerOrOptions:"حدد نقطة الركن الأول أو",firstCorner:"حدد نقطة الركن الأول",oppositeCorner:"حدد الركن المقابل",startPoint:"حدد نقطة البداية",nextPoint:"حدد النقطة التالية",nextPointOrUndo:"حدد النقطة التالية أو",firstPoint:"حدد النقطة الأولى",guideCursor:"حرّك المؤشر على مسار السحابة (اضغط Enter للإنهاء)",arcLength:"حدد طول القوس",selectObject:"حدد عنصرًا",style:"أدخل نمط أقواس سحابة المراجعة",reverseDirection:"اعكس الاتجاه",invalidArcLength:"يجب أن يكون طول القوس أكبر من 0.",invalidObject:"لا يمكن تحويل العنصر المحدد إلى سحابة مراجعة.",keywords:{...R.revcloud.keywords,arcLength:{display:"طول القوس(A)",local:"طول القوس",global:"ArcLength"},object:{display:"كائن(O)",local:"كائن",global:"Object"},rectangular:{display:"مستطيل(R)",local:"مستطيل",global:"Rectangular"},polygonal:{display:"مضلّع(P)",local:"مضلّع",global:"Polygonal"},freehand:{display:"يدوي(F)",local:"يدوي",global:"Freehand"},style:{display:"أسلوب(S)",local:"أسلوب",global:"Style"},normal:{display:"عادي(N)",local:"عادي",global:"Normal"},calligraphy:{display:"خط زخرفي(C)",local:"خط زخرفي",global:"Calligraphy"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},yes:{display:"نعم(Y)",local:"نعم",global:"Yes"},no:{display:"لا(N)",local:"لا",global:"No"}}},sketch:{...R.sketch,specifySketch:"حدد الرسم الحر أو",sketching:"حرّك المؤشر للرسم (انقر أو اضغط Enter للإيقاف)",type:"أدخل نوع الرسم الحر",increment:"حدد مقدار زيادة الرسم",tolerance:"حدد سماحية منحنى Spline",firstPoint:"حدد النقطة الأولى",nextPoint:"حدد نقطة النهاية",keywords:{...R.sketch.keywords,type:{display:"نوع(T)",local:"نوع",global:"Type"},increment:{display:"زيادة(I)",local:"زيادة",global:"Increment"},tolerance:{display:"سماحية(L)",local:"سماحية",global:"Tolerance"},line:{display:"خط(L)",local:"خط",global:"Lines"},polyline:{display:"خط متعدد(P)",local:"خط متعدد",global:"Polyline"},spline:{display:"منحنى سبلاين(S)",local:"منحنى سبلاين",global:"Spline"}}},sysvar:{...R.sysvar,prompt:"أدخل القيمة الجديدة"},chtml:{...R.chtml,exportFormat:"تنسيق التصدير",exportInvisibleLayers:"تصدير الطبقات غير المرئية",exportLayouts:"تصدير المخططات",initialView:"العرض الأولي عند فتح HTML",viewerMode:"وضع العارض دون اتصال",chunkSizeMiB:"حجم الجزء بالميبيبايت (حزمة متعددة الملفات)",compressChunks:"ضغط الأجزاء (حزمة متعددة الملفات)",keywords:{...R.chtml.keywords,single:{display:"ملف واحد(S)",local:"ملف واحد",global:"Single"},multi:{display:"حزمة متعددة الملفات(M)",local:"حزمة متعددة الملفات",global:"Multi"},yes:{display:"نعم(Y)",local:"نعم",global:"Yes"},no:{display:"لا(N)",local:"لا",global:"No"},extents:{display:"الحدود(E)",local:"الحدود",global:"Extents"},current:{display:"الحالي(C)",local:"الحالي",global:"Current"},view:{display:"عرض(V)",local:"عرض",global:"View"},measure:{display:"قياس(M)",local:"قياس",global:"Measure"}}},cpdf:{...R.cpdf,modelSpaceFit:"إطار مساحة النموذج",exportLayouts:"تصدير المخططات",textMode:"عرض النص",keywords:{...R.cpdf.keywords,extents:{display:"الامتدادات(E)",local:"الامتدادات",global:"Extents"},display:{display:"العرض(D)",local:"العرض",global:"Display"},yes:{display:"نعم(Y)",local:"نعم",global:"Yes"},no:{display:"لا(N)",local:"لا",global:"No"}}}},xS={document:{untitled:"بلا عنوان"},commandLine:{noLast:"(لا يوجد أمر سابق)",unknownCommand:"أمر غير معروف",executed:"تم تنفيذ الأمر",showHistory:"عرض سجل الأوامر",placeholder:"اكتب أمرًا",showMessages:"عرض سجل الرسائل",canceled:"*تم الإلغاء*",noHistory:"(لا يوجد سجل)",invalidInput:"إدخال غير صالح.",close:"إغلاق سطر الأوامر"},mobileCommand:{length:"الطول",angle:"الزاوية",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"تأكيد",cancel:"إلغاء",help:"مساعدة",back:"رجوع",collapse:"طي",expand:"توسيع"},inputManager:{firstCorner:"حدد الركن الأول أو",secondCorner:"حدد الركن الثاني أو"},message:{onLockedLayer:"على طبقة مقفلة.",fetchingDrawingFile:"جارٍ جلب ملف الرسم ...",exportingDxf:"جارٍ تصدير DXF ...",exportingPdf:"جارٍ تصدير PDF ...",exportingSvg:"جارٍ تصدير SVG ...",calculatingSmartExtents:"جارٍ حساب الملاءمة الذكية ...",importingPdf:"جارٍ استيراد PDF ...",exportingEntityPreview:"جارٍ تصدير الصورة ...",collectingMemoryProfile:"جارٍ تحليل الذاكرة ...",fontCached:"تم تخزين الخط بنجاح",fontCacheFailed:"فشل تخزين الخط",fontsNotFound:"خطوط غير موجودة في مستودع الخطوط: {fonts}.",fontsNotLoaded:"تعذر تحميل الخطوط: {fonts}.",fontMissedInDrawing:'الخط "{font}" مطلوب بواسطة {count} من كائنات النص ولكنه غير متاح. يتم العرض باستخدام "{replacementFont}".',fontMissedReplacement:'"{font}" (يُعرض بـ "{replacement}")',failedToGetAvaiableFonts:'تعذر الحصول على الخطوط من "{url}"!',failedToOpenFile:'فشل فتح الملف "{fileName}"!',failedToOpenFileToast:'فشل فتح "{fileName}". راجع مركز الإشعارات للتفاصيل.',failedToOpenFileWorkerOom:'فشل فتح "{fileName}". فشل التحليل بسبب نفاد الذاكرة المتاحة (محلل LibreDWG). يمكنك النقر على {dwgParserLink} لشراء محلل DWG التجاري وفتح الرسومات الكبيرة دون حدوث هذا الانهيار.',failedToOpenFileWorkerOomLink:"هذه الصفحة",failedToOpenFileWorkerTimeout:'فشل فتح "{fileName}". انتهت مهلة العملية أثناء تحليل الرسم.',failedToOpenFileFontLoadFailed:'فشل فتح "{fileName}". تعذر تحميل الخطوط المطلوبة.',failedToOpenFileLicenseExpired:'فشل فتح "{fileName}". انتهت صلاحية ترخيص محول DWG.',failedToOpenFileLicenseInvalid:'فشل فتح "{fileName}". ترخيص محول DWG مفقود أو غير صالح.',unknownEntities:"يحتوي هذا الرسم على {count} عنصر غير معروف أو غير مدعوم. لن يتم عرض هذه العناصر.",tianzhengEntities:"يحتوي هذا الرسم على كيانات مخصصة من TArch / Tianzheng (أو جهات خارجية مشابهة) (حوالي {count}). لا يمكن تحليلها بالكامل في هذه البيئة، لذلك قد لا يُعرض بعض المحتوى.",emptyProxyEntities:"يحتوي هذا الرسم على {count} كيان مخصص بدون رسومات وكيلة. لن يتم عرض هذه العناصر."},notification:{center:{title:"الإشعارات",clearAll:"مسح الكل",noNotifications:"لا توجد إشعارات"},group:{fontMissed:"خطوط مفقودة",fontMissedSummary:"{count} رسائل متعلقة بالخطوط. انقر للتفاصيل.",unsupportedEntities:"كيانات غير مدعومة",unsupportedEntitiesSummary:"{count} رسائل متعلقة بالتحليل. انقر للتفاصيل.",genericSummary:"{count} رسائل. انقر للتفاصيل."},title:{failedToOpenFile:"فشل فتح الملف",failedToOpenFileWorkerOom:"نفاد الذاكرة",failedToOpenFileWorkerTimeout:"انتهت مهلة فتح الرسم",failedToOpenFileFontLoadFailed:"فشل تحميل الخطوط",failedToOpenFileLicenseExpired:"انتهت صلاحية الترخيص",failedToOpenFileLicenseInvalid:"ترخيص غير صالح",fontNotFound:"الخط غير موجود",fontNotLoaded:"لم يتم تحميل الخط",parsingWarning:"مشكلات أثناء تحليل الرسم",systemMessage:"رسالة النظام",systemWarning:"تحذير النظام",systemError:"خطأ النظام",systemInfo:"معلومات النظام"}},progress:{start:"بدء تحليل الملف ...",parse:"جارٍ تحليل الملف ...",font:"جارٍ تنزيل الخطوط المطلوبة لهذا الرسم ...",ltype:"جارٍ تحليل أنواع الخطوط ...",style:"جارٍ تحليل أنماط النص ...",dimstyle:"جارٍ تحليل أنماط الأبعاد ...",layer:"جارٍ تحليل الطبقات ...",vport:"جارٍ تحليل منافذ العرض ...",blockrecord:"جارٍ تحليل سجلات الكتل ...",header:"جارٍ تحليل رأس الملف ...",block:"جارٍ تحليل الكتل ...",entity:"جارٍ تحليل العناصر ...",object:"جارٍ تحليل القواميس المسماة ...",rendering:"جارٍ عرض الرسم ...",end:"اكتمل!"},about:{title:"حول",close:"إغلاق",product:"عارض CAD",tagline:"عارض CAD عالي الأداء للويب لملفات DWG وDXF.",website:"الموقع الإلكتروني",docs:"التوثيق",repository:"GitHub",copyright:"© {year} mlightcad. جميع الحقوق محفوظة.",ok:"موافق"},drawStyle:{color:"اللون",fontSize:"ارتفاع النص"},shortCutToolbar:{more:"المزيد",undo:"تراجع",redo:"إعادة",erase:"حذف",collapse:"طي شريط الأدوات",expand:"توسيع شريط الأدوات"},textHeight:{title:"ارتفاع النص",close:"إغلاق",ok:"موافق",cancel:"إلغاء",adaptive:"ملاءمة الشاشة",custom:"ارتفاع نص مخصص",customPlaceholder:"ارتفاع العالم",fromScreen:"من حجم الشاشة",fromScreenHint:"أدخل حجم النص المطلوب على الشاشة عند التكبير الحالي. يُحوَّل إلى ارتفاع ثابت في إحداثيات الرسم ويبقى كما هو عند تغيير التكبير لاحقًا.",screenPxPlaceholder:"حجم الخط",screenUnit:"px",convert:"تحويل"},entityPick:{cancel:"إلغاء التحديد"},colorPicker:{title:"تحديد اللون",close:"إغلاق",ok:"موافق",cancel:"إلغاء",index:"فهرس اللون: ",rgb:"RGB: ",input:"اللون",inputPlaceholder:"1-255 أو #RRGGBB"},touchPointTutorial:{title:"كيف أختار النقاط بدقة؟",description:"اضغط مطولاً على الشاشة لمدة نصف ثانية تقريباً. يظهر صليب فوق إصبعك ويتبعه أثناء الحركة ويلتقط إلى الهندسة لاختيار أدق.",snoozeToday:"لا تذكرني اليوم",hideForever:"لا تذكرني مرة أخرى",ok:"فهمت"},dataSource:{open:"فتح",local:"ملف محلي",url:"من عنوان URL",openFrom:"فتح من {name}",signInTo:"تسجيل الدخول إلى {name}",signOutOf:"تسجيل الخروج من {name}",signOutOfAccount:"تسجيل الخروج من {name} ({account})",urlDialogTitle:"فتح من عنوان URL",urlDialogHint:"أدخل عنوان URL لملف .dwg أو .dxf.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"إلغاء",onedrive:"OneDrive",googledrive:"Google Drive",or:"أو",dropFile:"أسقط ملفًا هنا أو",browse:"تصفح",dropOrBrowse:"أسقط ملف DWG أو DXF هنا، أو تصفح",newDrawing:"رسم جديد",source:"المصدر",unavailable:"هذا المصدر غير متاح حاليًا.",selectFile:"اختيار ملف",signInRequired:"سجّل الدخول أولاً لاختيار ملف.",downloading:"جارٍ تنزيل الملف ..."}},kS={ACAD:{"-hatch":{description:"Vytváří šrafování pomocí voleb příkazového řádku bez rozhraní pásu karet"},"-layer":{description:"Spravuje hladiny pomocí voleb příkazového řádku"},about:{description:"Zobrazí informace o mlightcad"},acadver:{description:"Ukládá identifikátor verze databáze výkresu (pouze pro čtení)"},angbase:{description:"Nastaví směr základního úhlu 0 vzhledem k aktuálnímu USS"},angdir:{description:"Určuje, zda se kladné úhly měří po směru nebo proti směru hodinových ručiček"},arc:{description:"Vytvoří oblouk"},aunits:{description:"Nastaví formát zobrazení úhlů"},auprec:{description:"Nastaví přesnost zobrazení úhlů, používá se společně s AUNITS"},bmpout:{description:"Exportuje do BMP"},cdxf:{description:"Exportuje aktuální výkres do DXF"},cpdf:{description:"Exportuje aktuální výkres do PDF"},"-cpdf":{description:"Exportuje aktuální výkres do PDF pomocí příkazového řádku"},cecolor:{description:"Nastaví aktuální výchozí barvu pro nově vytvářené objekty"},celtscale:{description:"Řídí měřítko typu čáry pro nově vytvářené objekty"},celtype:{description:"Nastaví typ čáry pro nově vytvářené objekty"},celweight:{description:"Nastaví výchozí tloušťku čáry pro nově vytvářené objekty"},cetransparency:{description:"Nastaví průhlednost pro nově vytvářené objekty"},cachefont:{description:"Uloží místní soubor fontu do IndexedDB pro vykreslování textu"},circle:{description:"Vytvoří jednu kružnici zadáním středu a poloměru"},clayer:{description:"Nastaví aktuální hladinu pro nové objekty a operace úprav"},cmleaderstyle:{description:"Nastaví název aktuálního stylu multiodkazu"},cmlscale:{description:"Řídí celkovou šířku multičáry"},cmlstyle:{description:"Nastaví název aktuálního stylu multičáry"},colortheme:{description:"Řídí barevný motiv uživatelského rozhraní (tmavý nebo světlý)"},copy:{description:"Kopíruje vybrané objekty vytvořením kopií na nových pozicích",prompt:"Vyberte objekty"},csvg:{description:"Převede aktuální výkres na SVG"},chtml:{description:"Exportuje aktuální výkres do samostatného offline souboru HTML"},"-chtml":{description:"Exportuje aktuální výkres do HTML pomocí voleb příkazového řádku"},dimlinear:{description:"Vytvoří lineární kóty"},dimaligned:{description:"Vytvoří zarovnanou lineární kótu"},dimradius:{description:"Vytvoří poloměrové kóty kruhů a oblouků"},dimdiameter:{description:"Vytvoří průměrové kóty kruhů a oblouků"},dimangular:{description:"Vytvoří úhlové kóty"},dimarc:{description:"Vytvoří kótu délky oblouku"},dimordinate:{description:"Vytvoří souřadnicovou kótu"},dimcontinue:{description:"Vytvoří řetězovou kótu"},dimbaseline:{description:"Vytvoří základnovou kótu"},dimstyle:{description:"Nastaví název aktuálního stylu kótování"},dwgname:{description:"Ukládá název aktuálního souboru výkresu (pouze pro čtení)"},loginname:{description:"Zobrazí přihlašovací jméno uživatele (pouze pro čtení)"},dynmode:{description:"Řídí nastavení dynamického zadávání u kurzoru"},dynprompt:{description:"Řídí zobrazení výzev v popiscích dynamického zadávání"},ellipse:{description:"Vytvoří elipsu nebo eliptický oblouk pomocí koncových bodů os nebo středu"},erase:{description:"Odstraní vybrané objekty z výkresu",prompt:"Vyberte objekty"},extmax:{description:"Ukládá pravý horní roh rozsahu výkresu v modelovém prostoru (pouze pro čtení)"},extmin:{description:"Ukládá levý dolní roh rozsahu výkresu v modelovém prostoru (pouze pro čtení)"},entout:{description:"Exportuje sloučený náhledový obrázek vybraných objektů",prompt:"Vyberte objekty"},hideobjects:{description:"Dočasně potlačí zobrazení vybraných objektů",prompt:"Vyberte objekty"},imageattach:{description:"Připojí rastrový obrázek jako externí referenci k aktuálnímu výkresu"},"-insert":{description:"Vloží definici bloku do aktuálního výkresu (příkazový řádek)"},xattach:{description:"Připojí výkres DWG nebo DXF jako externí referenci k aktuálnímu výkresu"},gripcolor:{description:"Nastaví barvu nevybraných gripů zobrazených na vybraných objektech"},griphot:{description:"Nastaví barvu vybraných (aktivních) gripů"},gripobjlimit:{description:"Potlačí zobrazení gripů, když výběr přesáhne zadaný počet objektů (0 = bez omezení)"},grips:{description:"Řídí, zda se na vybraných objektech zobrazují gripy"},gripsize:{description:"Nastaví velikost gripů v pixelech"},hatch:{description:"Vyplní uzavřenou oblast nebo vybrané objekty vzorem šrafování"},ipdf:{description:"Importuje vektorovou geometrii ze souboru PDF"},hpang:{description:"Nastaví výchozí úhel v radiánech pro nově vytvářené vzory šrafování"},hpassoc:{description:"Řídí, zda jsou nově vytvářená šrafování asociativní"},hpbackgroundcolor:{description:"Nastaví výchozí barvu pozadí pro nově vytvářené vzory šrafování"},hpcolor:{description:"Nastaví výchozí barvu pro nově vytvářená šrafování"},hpdouble:{description:"Řídí, zda jsou uživatelsky definované vzory šrafování zdvojené"},hpislanddetection:{description:"Řídí, jak se nakládá s ostrůvky uvnitř nově vytvářených hranic šrafování"},hplayer:{description:"Nastaví výchozí hladinu pro nově vytvářená šrafování a výplně"},hpname:{description:"Nastaví výchozí název vzoru pro nově vytvářená šrafování v této relaci"},hpscale:{description:"Nastaví výchozí měřítko pro nově vytvářené vzory šrafování"},hpseparate:{description:"Řídí, zda se pro více hranic vytvoří jeden nebo samostatné objekty šrafování"},hptransparency:{description:"Nastaví výchozí průhlednost pro nově vytvářená šrafování a výplně"},insunits:{description:"Určuje jednotky výkresu pro automatické měřítko vkládaných bloků, obrázků nebo externích referencí"},jpgout:{description:"Exportuje do JPEG"},laycur:{description:"Změní hladinu vybraných objektů na aktuální hladinu",prompt:"Vyberte objekty pro změnu na aktuální hladinu"},laydel:{description:"Odstraní hladinu a všechny objekty na této hladině"},layerclose:{description:"Zavře Správce vlastností hladin"},layerp:{description:"Vrátí poslední změnu nebo sadu změn provedených v nastavení hladin"},layfrz:{description:"Zmrazí hladinu vybraných objektů",prompt:"Vyberte objekt na hladině ke zmrazení"},layiso:{description:"Izoluje hladiny vybraných objektů",prompt:"Vyberte objekty na hladinách k izolaci"},laylck:{description:"Uzamkne hladinu vybraných objektů",prompt:"Vyberte objekt na hladině k uzamčení"},layoff:{description:"Vypne hladinu vybraných objektů",prompt:"Vyberte objekt na hladině k vypnutí"},layon:{description:"Zapne všechny hladiny ve výkresu"},laythw:{description:"Rozmrazí všechny zmrazené hladiny ve výkresu"},layulk:{description:"Odemkne hladinu vybraných objektů",prompt:"Vyberte objekt na hladině k odemčení"},layuniso:{description:"Obnoví hladiny skryté nebo uzamčené příkazem LAYISO"},line:{description:"Kreslí úsečky mezi body"},log:{description:"Zaznamenává ladicí informace do konzole"},ltscale:{description:"Nastaví globální měřítko typu čáry pro výkres"},lunits:{description:"Nastaví formát zobrazení souřadnic a vzdáleností"},luprec:{description:"Nastaví přesnost zobrazení délkových jednotek, používá se společně s LUNITS"},lwdisplay:{description:"Řídí, zda se ve výkresu zobrazují tloušťky čar"},clearmeasurements:{description:"Odstraní všechna měření z aktuálního rozvržení"},measurementvis:{description:"Zobrazí nebo skryje měření na aktuálním rozvržení"},measurementpanel:{description:"Otevře paletu měření"},measurementexport:{description:"Exportuje měření do sidecar JSON souboru"},measurementimport:{description:"Importuje měření ze sidecar JSON souboru"},measurearea:{description:"Vypočítá plochu a obvod vybraných objektů nebo bodů"},measureangle:{description:"Změří úhel mezi dvěma čarami nebo třemi body"},measurearc:{description:"Změří délku oblouku"},measuredistance:{description:"Změří vzdálenost a přírůstky mezi dvěma body"},measurecontinuous:{description:"Měří řetězené vzdálenosti postupným zadáváním bodů, dokud nestisknete Enter nebo Zrušit"},measurepoint:{description:"Změří souřadnice X/Y vybraného bodu"},measurement:{description:"Nastaví, zda výkres používá anglosaské (imperiální) nebo metrické jednotky"},measurementcolor:{description:"Nastaví barvu použitou pro překryvy měření"},modelbkcolor:{description:"Nastaví barvu pozadí kreslicí oblasti modelového prostoru"},mline:{description:"Vytvoří několik rovnoběžných čar jako jeden objekt multičáry"},move:{description:"Posune vybrané objekty o vektor přemístění",prompt:"Vyberte objekty"},offset:{description:"Vytvoří rovnoběžné kopie křivek, lomených čar nebo kružnic v zadané vzdálenosti"},mtext:{description:"Vytvoří jeden objekt víceřádkového textu"},open:{description:"Otevře existující soubor výkresu"},openprof:{description:"Řídí, zda se do konzole zaznamenávají časové profily fází otevírání souboru"},openperf:{description:"Otevře paletu výkonu otevření s časy z posledního otevření výkresu"},orthomode:{description:"Omezí pohyb kurzoru na vodorovnou nebo svislou osu"},osmode:{description:"Nastaví trvalé režimy uchopení objektů pomocí bitové hodnoty"},pan:{description:"Posune pohled beze změny směru pohledu nebo zvětšení"},paperbkcolor:{description:"Nastaví barvu pozadí kreslicí oblasti výkresového prostoru (rozvržení)"},pdmode:{description:"Řídí způsob zobrazení bodových entit POINT"},pdsize:{description:"Nastaví velikost zobrazení bodových entit POINT"},pickbox:{description:"Nastaví velikost (v pixelech) výběrového rámečku pro výběr objektů"},pline:{description:"Vytvoří křivku zadáním více bodů"},pngout:{description:"Exportuje do PNG"},point:{description:"Vytvoří body"},polaraddang:{description:"Ukládá další úhly polárního sledování jako seznam oddělený středníky"},polarang:{description:"Nastaví přírůstek polárního úhlu pro polární sledování"},polarmode:{description:"Řídí nastavení polárního sledování a sledování uchopení objektů"},polygon:{description:"Vytvoří pravidelný mnohoúhelník podle středu/poloměru nebo jedné hrany"},qnew:{description:"Zahájí nový výkres"},close:{description:"Zavře aktuální výkres"},ray:{description:"Vytvoří polopřímku, která začíná v bodě a pokračuje do nekonečna"},rectang:{description:"Vytvoří obdélník zadáním dvou protilehlých rohů"},regen:{description:"Překreslí aktuální výkres"},revcloud:{description:"Vytvoří nebo upraví revizní obláček"},markuptext:{description:"Umístí textovou poznámku"},markupline:{description:"Vytvoří úsečkovou poznámku"},markuparrow:{description:"Vytvoří šipkovou poznámku"},markupcloud:{description:"Vytvoří revizní obláček"},markuprect:{description:"Vytvoří obdélníkovou poznámku"},markupcircle:{description:"Vytvoří kruhovou poznámku"},markuphighlight:{description:"Vytvoří zvýrazňovací obdélník"},markupcallout:{description:"Vytvoří odkazovou poznámku: zadejte hrot odkazu, umístěte textové pole a zadejte text"},markupstamp:{description:"Umístí razítko nebo vlastní symbol"},markupvis:{description:"Zobrazí nebo skryje poznámky"},clearmarkups:{description:"Vymaže všechny poznámky na aktuálním rozvržení"},markupexport:{description:"Exportuje poznámky do sidecar JSON souboru"},markupimport:{description:"Importuje poznámky ze sidecar JSON souboru"},markuppanel:{description:"Otevře paletu poznámek"},rotate:{description:"Otočí vybrané objekty kolem základního bodu",prompt:"Vyberte objekty"},select:{description:"Vybírá objekty"},shortcutmenu:{description:"Řídí dostupnost místních nabídek v oblasti výkresu"},sketch:{description:"Vytvoří řadu úseček kreslených od ruky"},spline:{description:"Vytvoří hladkou křivku splajn zadáním řídicích bodů"},textstyle:{description:"Nastaví název aktuálního textového stylu"},unitmode:{description:"Řídí zlomkové zobrazení souřadnic, když je LUNITS architektonický nebo zlomkový"},switchbg:{description:"Přepíná pozadí oblasti výkresu mezi bílou a černou"},unisolateobjects:{description:"Znovu zobrazí všechny objekty skryté příkazem HIDEOBJECTS"},undo:{description:"Vrátí zpět poslední operaci úpravy databáze",nothingToUndo:"Není co vrátit zpět."},redo:{description:"Zopakuje poslední vrácenou operaci úpravy databáze",nothingToRedo:"Není co zopakovat."},xline:{description:"Vytvoří konstrukční přímku, která se rozprostírá do nekonečna na obě strany"},zoom:{description:"Zvětší na maximální rozsah všech objektů"}},USER:{}},SS={arc:{startPointOrCenter:"Zadejte počáteční bod oblouku nebo",secondPointOrOptions:"Zadejte druhý bod oblouku nebo",secondPoint:"Zadejte druhý bod oblouku",startPoint:"Zadejte počáteční bod oblouku",centerPoint:"Zadejte středový bod oblouku",endPoint:"Zadejte koncový bod oblouku",endPointOrOptions:"Zadejte koncový bod oblouku nebo",centerPointOrOptions:"Zadejte středový bod oblouku",includedAngle:"Zadejte středový úhel",chordLength:"Zadejte délku tětivy",tangentDirection:"Zadejte směr tečny v počátečním bodě oblouku",radius:"Zadejte poloměr oblouku",keywords:{center:{display:"Střed(C)",local:"Střed",global:"Center"},end:{display:"Konec(E)",local:"Konec",global:"End"},angle:{display:"Úhel(A)",local:"Úhel",global:"Angle"},chordLength:{display:"délka Tětivy(L)",local:"Délka tětivy",global:"ChordLength"},direction:{display:"Směr(D)",local:"Směr",global:"Direction"},radius:{display:"Poloměr(R)",local:"Poloměr",global:"Radius"}},invalid:{threePoint:"Neplatný 3bodový oblouk: body jsou kolineární nebo nelze definovat oblouk.",center:"Neplatný vstup středu: počáteční a koncový bod musí ležet na stejné kružnici.",angle:"Neplatný vstup úhlu: středový úhel musí být větší než 0 a menší než 360 stupňů.",chordLength:"Neplatná délka tětivy: hodnota je mimo rozsah pro aktuální poloměr.",direction:"Neplatný směr: z tohoto směru tečny nelze sestrojit oblouk.",radius:"Neplatný poloměr: zadaný poloměr nemůže spojit počáteční a koncový bod."}},circle:{center:"Zadejte střed kružnice",centerOrOptions:"Zadejte středový bod kružnice nebo",radius:"Zadejte poloměr kružnice",radiusOrDiameter:"Zadejte poloměr kružnice nebo",diameter:"Zadejte průměr kružnice",twoPointFirst:"Zadejte první koncový bod průměru kružnice",twoPointSecond:"Zadejte druhý koncový bod průměru kružnice",threePointFirst:"Zadejte první bod na kružnici",threePointSecond:"Zadejte druhý bod na kružnici",threePointThird:"Zadejte třetí bod na kružnici",keywords:{threeP:{display:"3B(3P)",local:"3B",global:"3P"},twoP:{display:"2B(2P)",local:"2B",global:"2P"},diameter:{display:"Průměr(D)",local:"Průměr",global:"Diameter"}}},copy:{basePointOrOptions:"Zadejte základní bod nebo",displacementOrArray:"Zadejte přemístění nebo",secondPointOrArray:"Zadejte druhý bod nebo",modePrompt:"Zadejte volbu režimu kopírování",arrayItemCount:"Zadejte počet položek v poli včetně originálu",arraySecondPointOrFit:"Zadejte druhý bod nebo",arrayFitSecondPoint:"Zadejte druhý bod",keywords:{displacement:{display:"Přemístění(D)",local:"Přemístění",global:"Displacement"},mode:{display:"Režim(O)",local:"Režim",global:"Mode"},multiple:{display:"Vícenásobné(M)",local:"Vícenásobné",global:"Multiple"},single:{display:"Jednoduché(S)",local:"Jednoduché",global:"Single"},array:{display:"Pole(A)",local:"Pole",global:"Array"},fit:{display:"Přizpůsobit(F)",local:"Přizpůsobit",global:"Fit"}}},dimlinear:{...R.dimlinear,xLine1Point:"Zadejte počátek první pomocné čáry",xLine2Point:"Zadejte počátek druhé pomocné čáry",dimLinePoint:"Zadejte umístění kótovací čáry"},dimaligned:{...R.dimaligned},dimradius:{...R.dimradius},dimdiameter:{...R.dimdiameter},dimangular:{...R.dimangular},dimarc:{...R.dimarc},dimordinate:{...R.dimordinate},dimcontinue:{...R.dimcontinue},dimbaseline:{...R.dimbaseline},ellipse:{axisEndpointOrOptions:"Zadejte koncový bod osy elipsy nebo",arcAxisEndpointOrCenter:"Zadejte koncový bod osy eliptického oblouku nebo",center:"Zadejte střed elipsy",firstAxisEndpoint:"Zadejte koncový bod osy",secondAxisEndpoint:"Zadejte druhý koncový bod osy",otherAxisOrRotation:"Zadejte vzdálenost k druhé ose nebo",rotationAngle:"Zadejte úhel otočení kolem hlavní osy",arcStartAngle:"Zadejte počáteční úhel eliptického oblouku",arcEndAngle:"Zadejte koncový úhel eliptického oblouku",keywords:{arc:{display:"Oblouk(A)",local:"Oblouk",global:"Arc"},center:{display:"Střed(C)",local:"Střed",global:"Center"},rotation:{display:"Otočení(R)",local:"Otočení",global:"Rotation"}},invalid:{axis:"Neplatný vstup osy: délka osy musí být větší než 0.",otherAxis:"Neplatný vstup druhé osy: vzdálenost musí být větší než 0.",rotation:"Neplatný vstup otočení: výsledná vedlejší osa musí být větší než 0."}},hatch:{prompt:"Vyberte objekt hranice nebo",pickPoint:"Zadejte vnitřní bod (nebo stiskněte Enter pro dokončení)",select:"Vyberte objekty k šrafování",patternName:"Zadejte název vzoru šrafování",scale:"Zadejte měřítko vzoru šrafování",angle:"Zadejte úhel vzoru šrafování",style:"Zadejte styl šrafování",associative:"Zadejte asociativitu",invalidBoundary:"Vybrané objekty netvoří uzavřenou hranici.",keywords:{pick:{display:"Vybrat body(P)",local:"Vybrat body",global:"PickPoints"},select:{display:"Vybrat objekty(S)",local:"Vybrat objekty",global:"SelectObjects"},cancel:{display:"Zrušit(C)",local:"Zrušit",global:"Cancel"},pattern:{display:"Vzor(P)",local:"Vzor",global:"Pattern"},scale:{display:"Měřítko(S)",local:"Měřítko",global:"Scale"},angle:{display:"Úhel(A)",local:"Úhel",global:"Angle"},style:{display:"Styl(T)",local:"Styl",global:"HatchStyle"},associative:{display:"Asociativní(AS)",local:"Asociativní",global:"AssociativeMode"},normal:{display:"Normální(N)",local:"Normální",global:"Normal"},outer:{display:"Vnější(O)",local:"Vnější",global:"Outer"},ignore:{display:"Ignorovat(I)",local:"Ignorovat",global:"Ignore"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}},hideobjects:{hidden:"objekt(ů) skryto",restored:"objekt(ů) obnoveno",nothingToRestore:"Žádné skryté objekty k obnovení"},entout:{longSidePrompt:"Zadejte velikost delší strany náhledu v pixelech",exported:"náhled(ů) objektů exportováno",skipped:"objekt(ů) přeskočeno",failed:{"no-preview-root":"Nelze sestavit geometrii náhledu pro výběr","no-bounds":"Nelze vypočítat rozsah náhledu pro výběr","capture-failed":"Nelze vykreslit náhledový obrázek entity","download-failed":"Náhled byl vykreslen, ale stažení PNG selhalo"}},layer:{main:"Zadejte volbu",listSummary:"Seznam hladin byl vypsán do konzole prohlížeče",emptyInput:"Nebyl zadán žádný název hladiny.",newPrompt:"Zadejte název nové hladiny (nebo hladin)",makePrompt:"Zadejte název hladiny, která se má stát aktuální",setPrompt:"Zadejte název hladiny, která se má nastavit jako aktuální",onPrompt:"Zadejte název (názvy) hladiny k zapnutí",offPrompt:"Zadejte název (názvy) hladiny k vypnutí",freezePrompt:"Zadejte název (názvy) hladiny ke zmrazení",thawPrompt:"Zadejte název (názvy) hladiny k rozmrazení",lockPrompt:"Zadejte název (názvy) hladiny k uzamčení",unlockPrompt:"Zadejte název (názvy) hladiny k odemčení",colorLayerPrompt:"Zadejte název (názvy) hladiny ke změně barvy",colorValuePrompt:"Zadejte barvu (ACI 1-255, RGB např. 255,0,0, nebo CSS název barvy)",invalidColor:"Neplatný vstup barvy.",descriptionLayerPrompt:"Zadejte název hladiny k úpravě popisu",descriptionValuePrompt:"Zadejte nový popis hladiny",created:"Počet vytvořených hladin",alreadyExists:"Hladina již existuje",notFound:"Hladina nenalezena",cannotChangeCurrent:"Nelze vypnout ani zmrazit aktuální hladinu.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Vytvořit(M)",local:"Vytvořit",global:"Make"},set:{display:"Nastavit(S)",local:"Nastavit",global:"Set"},new:{display:"Nová(N)",local:"Nová",global:"New"},on:{display:"Zapnout(ON)",local:"Zapnout",global:"On"},off:{display:"Vypnout(OF)",local:"Vypnout",global:"Off"},color:{display:"Barva(C)",local:"Barva",global:"Color"},freeze:{display:"Zmrazit(F)",local:"Zmrazit",global:"Freeze"},thaw:{display:"Rozmrazit(T)",local:"Rozmrazit",global:"Thaw"},lock:{display:"Uzamknout(L)",local:"Uzamknout",global:"Lock"},unlock:{display:"Odemknout(U)",local:"Odemknout",global:"Unlock"},description:{display:"Popis(D)",local:"Popis",global:"Description"}}},layon:{alreadyOn:"Všechny hladiny jsou již zapnuté.",turnedOn:"Zapnuté hladiny"},laycur:{prompt:"Vyberte objekty ke změně na aktuální hladinu",currentLayerNotFound:"Aktuální hladina nenalezena.",noObjects:"Nebyly vybrány žádné platné objekty.",alreadyCurrent:"Vybrané objekty jsou již na aktuální hladině.",changed:"Objekty změněny na aktuální hladinu"},layfrz:{prompt:"Vyberte objekt na hladině ke zmrazení nebo",invalidSelection:"Vybrán neplatný objekt.",settingsPrompt:"Zadejte nastavení LAYFRZ ke změně",viewportPrompt:"Zadejte chování zmrazení ve výřezu",blockSelectionPrompt:"Zadejte chování výběru vnořeného bloku",vpfreezeFallback:"Aktuální prohlížeč nepodporuje zmrazení hladiny podle výřezu; místo toho se použije chování Zmrazit.",nestedSelectionLimited:"Nastavení výběru vnořeného bloku se uloží, ale aktuální výběr stále vyhodnocuje hladinu entity nejvyšší úrovně.",layerNotFound:"Hladina nenalezena",cannotFreezeCurrent:"Nelze zmrazit aktuální hladinu.",alreadyFrozen:"Hladina je již zmrazená",frozen:"Zmrazená hladina",restored:"Obnovená hladina",nothingToUndo:"Neexistuje žádná akce LAYFRZ k vrácení zpět.",keywords:{settings:{display:"Nastavení(S)",local:"Nastavení",global:"Settings"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},viewports:{display:"Výřezy(V)",local:"Výřezy",global:"Viewports"},blockSelection:{display:"Výběr bloku(B)",local:"Výběr bloku",global:"BlockSelection"},freeze:{display:"Zmrazit(F)",local:"Zmrazit",global:"Freeze"},vpfreeze:{display:"Zmrazit ve výřezu(V)",local:"Zmrazit ve výřezu",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Entita(E)",local:"Entita",global:"Entity"},none:{display:"Žádný(N)",local:"Žádný",global:"None"}}},layiso:{prompt:"Vyberte objekty na hladině (hladinách) k izolaci nebo",settingsPrompt:"Zadejte nastavení pro neizolované hladiny",offModePrompt:"Zadejte chování vypnutí pro neizolované hladiny",noLayers:"Nebyly vybrány žádné platné hladiny.",layerNotFound:"Hladina nenalezena",isolated:"Izolovaná hladina (hladiny)",affectedLayers:"ovlivněné hladiny",vpfreezeFallback:"Aktuální prohlížeč nepodporuje zmrazení hladiny podle výřezu; místo toho se použije chování Vypnout.",lockFadeFallback:"Aktuální prohlížeč nepodporuje ztlumení zobrazení hladiny; neizolované hladiny budou uzamčeny bez ztlumení.",keywords:{settings:{display:"Nastavení(S)",local:"Nastavení",global:"Settings"},off:{display:"Vypnout(O)",local:"Vypnout",global:"Off"},lockAndFade:{display:"Uzamknout a ztlumit(L)",local:"Uzamknout a ztlumit",global:"LockAndFade"},vpfreeze:{display:"Zmrazit ve výřezu(V)",local:"Zmrazit ve výřezu",global:"Vpfreeze"}}},layuniso:{noPrevious:"Neexistuje žádný předchozí stav hladin LAYISO k obnovení.",layerNotFound:"Hladina nenalezena",nothingRestored:"Nebyly obnoveny žádné změny hladin LAYISO.",restored:"Obnovené hladiny"},laythw:{alreadyThawed:"Všechny hladiny jsou již rozmrazené.",thawed:"Rozmrazené hladiny"},laylck:{prompt:"Vyberte objekt na hladině k uzamčení",invalidSelection:"Vybrán neplatný objekt.",layerNotFound:"Hladina nenalezena",alreadyLocked:"Hladina je již uzamčená",locked:"Uzamčená hladina"},layulk:{prompt:"Vyberte objekt na hladině k odemčení",invalidSelection:"Vybrán neplatný objekt.",layerNotFound:"Hladina nenalezena",alreadyUnlocked:"Hladina je již odemčená",unlocked:"Odemčená hladina"},layoff:{prompt:"Vyberte objekt na hladině k vypnutí nebo",invalidSelection:"Vybrán neplatný objekt.",settingsPrompt:"Zadejte nastavení LAYOFF ke změně",viewportPrompt:"Zadejte chování výřezu",blockSelectionPrompt:"Zadejte chování výběru vnořeného bloku",vpfreezeFallback:"Aktuální prohlížeč nepodporuje vypnutí hladiny podle výřezu; místo toho se použije chování Vypnout.",nestedSelectionLimited:"Nastavení výběru vnořeného bloku se uloží, ale aktuální výběr stále vyhodnocuje hladinu entity nejvyšší úrovně.",layerNotFound:"Hladina nenalezena",cannotTurnOffCurrent:"Nelze vypnout aktuální hladinu.",alreadyOff:"Hladina je již vypnutá",turnedOff:"Vypnutá hladina",restored:"Obnovená hladina",nothingToUndo:"Neexistuje žádná akce LAYOFF k vrácení zpět.",keywords:{settings:{display:"Nastavení(S)",local:"Nastavení",global:"Settings"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},viewports:{display:"Výřezy(V)",local:"Výřezy",global:"Viewports"},blockSelection:{display:"Výběr bloku(B)",local:"Výběr bloku",global:"BlockSelection"},off:{display:"Vypnout(O)",local:"Vypnout",global:"Off"},vpfreeze:{display:"Zmrazit ve výřezu(V)",local:"Zmrazit ve výřezu",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Entita(E)",local:"Entita",global:"Entity"},none:{display:"Žádný(N)",local:"Žádný",global:"None"}}},layerp:{restored:"Obnoven předchozí stav hladin.",noPreviousState:"Neexistuje žádný předchozí stav hladin k obnovení."},line:{firstPoint:"Zadejte první bod",firstPointOrContinue:"Zadejte první bod nebo",nextPoint:"Zadejte další bod",nextPointWithOptions:"Zadejte další bod nebo",keywords:{continue:{display:"Pokračovat(C)",local:"Pokračovat",global:"Continue"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},close:{display:"Uzavřít(C)",local:"Uzavřít",global:"Close"}}},xline:{firstPointOrOptions:"Zadejte bod nebo",secondPoint:"Zadejte druhý bod",throughPoint:"Zadejte bod, kterým má přímka procházet",angle:"Zadejte úhel konstrukční přímky",invalidDirection:"Neplatný směr pro XLINE.",keywords:{hor:{display:"Vodorovně(H)",local:"Vodorovně",global:"Hor"},ver:{display:"Svisle(V)",local:"Svisle",global:"Ver"},ang:{display:"Úhel(A)",local:"Úhel",global:"Ang"}}},ray:{startPoint:"Zadejte počáteční bod",throughPoint:"Zadejte bod, kterým má polopřímka procházet"},mline:{startPointWithOptions:"Zadejte počáteční bod nebo",nextPointWithOptions:"Zadejte další bod nebo",justificationPrompt:"Zadejte typ zarovnání",scalePrompt:"Zadejte měřítko multičáry",stylePrompt:"Zadejte název stylu multičáry nebo [?] pro seznam",styleNotFound:"Styl multičáry nenalezen",styleListHeader:"Načtené styly multičáry",styleListEmpty:"V aktuálním výkresu není načten žádný styl multičáry.",keywords:{justification:{display:"Zarovnání(J)",local:"Zarovnání",global:"Justification"},scale:{display:"Měřítko(S)",local:"Měřítko",global:"Scale"},style:{display:"Styl(ST)",local:"Styl",global:"Style"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},close:{display:"Uzavřít(C)",local:"Uzavřít",global:"Close"},top:{display:"Nahoře(T)",local:"Nahoře",global:"Top"},zero:{display:"Nula(Z)",local:"Nula",global:"Zero"},bottom:{display:"Dole(B)",local:"Dole",global:"Bottom"}}},measureAngle:{vertex:"Zadejte vrchol",arm1:"Zadejte bod na prvním rameni",arm2:"Zadejte bod na druhém rameni"},measureArc:{startPoint:"Zadejte počáteční bod oblouku",throughPoint:"Zadejte bod na oblouku",endPoint:"Zadejte koncový bod oblouku",lockedEndPoint:"Zadejte koncový bod oblouku (Ctrl přepne velký/malý oblouk)",invalidPoints:"Tři body jsou kolineární a nedefinují oblouk."},measureArea:{firstPoint:"Zadejte první bod",nextPoint:"Zadejte další bod (nebo stiskněte Enter pro dokončení)"},measureDistance:{firstPoint:"Zadejte první bod",secondPoint:"Zadejte druhý bod"},measureContinuous:{firstPoint:"Zadejte první bod",nextPoint:"Zadejte další bod (nebo stiskněte Enter pro dokončení)"},measurePoint:{point:"Zadejte bod"},measurement:{import:{chooseFile:"Vyberte sidecar JSON soubor měření"}},markup:{author:"Zadejte autora kontroly (uloží se pro pozdější použití)",text:{point:"Zadejte bod textové poznámky",content:"Zadejte text poznámky"},line:{firstPoint:"Zadejte první bod úsečkové poznámky",secondPoint:"Zadejte druhý bod úsečkové poznámky"},arrow:{firstPoint:"Zadejte počáteční bod šipky",secondPoint:"Zadejte hrot šipky"},cloud:{firstCorner:"Zadejte první roh obláčku",secondCorner:"Zadejte protilehlý roh obláčku"},rect:{firstCorner:"Zadejte první roh obdélníku",secondCorner:"Zadejte protilehlý roh obdélníku"},circle:{center:"Zadejte střed kružnice",radius:"Zadejte poloměr kružnice"},shape:{calloutOn:"[Odkaz zapnut]",calloutOff:"[Odkaz vypnut]",calloutAnchor:"Zadejte umístění textu odkazu",keywords:{callout:{display:"Odkaz(C)",local:"Odkaz",global:"Callout"},noCallout:{display:"BezOdkazu(N)",local:"BezOdkazu",global:"NoCallout"}}},highlight:{firstCorner:"Zadejte první roh zvýraznění",secondCorner:"Zadejte protilehlý roh zvýraznění"},callout:{tip:"Zadejte hrot vodítka, nebo obrys obláčku/obdélníku/kružnice bez odkazu",anchor:"Zadejte umístění textu odkazu",content:"Zadejte text odkazu"},stamp:{kind:"Zadejte identifikátor razítka [approved/rejected/revised/for-review/custom]",imageUrl:"Zadejte URL vlastního obrázku razítka (volitelné)",caption:"Zadejte popisek razítka (volitelné)",point:"Zadejte bod vložení razítka"},import:{chooseFile:"Vyberte sidecar JSON soubor poznámek"}},move:{basePointOrDisplacement:"Zadejte základní bod nebo",secondPointOrDisplacement:"Zadejte druhý bod nebo",displacement:"Zadejte přemístění",keywords:{displacement:{display:"Přemístění(D)",local:"Přemístění",global:"Displacement"}}},offset:{distance:"Zadejte vzdálenost offsetu",selectObject:"Vyberte objekt k offsetu nebo stiskněte Enter pro dokončení",sidePoint:"Zadejte bod na straně pro offset",invalidDistance:"Vzdálenost offsetu musí být větší než 0.",invalidSelection:"Vybraný objekt nelze offsetovat.",offsetFailed:"Nelze vytvořit offsetovou křivku na zadané straně."},mtext:{point:"Zadejte bod vložení víceřádkového textu"},bmpout:{boundsFirstCorner:"Zadejte první roh rozsahu",boundsSecondCorner:"Zadejte protilehlý roh",longSidePrompt:"Zadejte velikost delší strany v pixelech"},jpgout:{boundsFirstCorner:"Zadejte první roh rozsahu",boundsSecondCorner:"Zadejte protilehlý roh",longSidePrompt:"Zadejte velikost delší strany v pixelech"},pngout:{boundsFirstCorner:"Zadejte první roh rozsahu",boundsSecondCorner:"Zadejte protilehlý roh",longSidePrompt:"Zadejte velikost delší strany v pixelech"},imageattach:{insertionPoint:"Zadejte bod vložení:",scale:"Zadejte faktor měřítka:",rotation:"Zadejte úhel otočení:",invalidScale:"Faktor měřítka musí být větší než 0.",decodeFailed:"Nepodařilo se načíst vybraný soubor obrázku."},insert:{blockName:"Zadejte název bloku:",insertionPoint:"Zadejte bod vložení:",scale:"Zadejte faktor měřítka:",rotation:"Zadejte úhel otočení:",invalidScale:"Faktor měřítka musí být větší než 0.",invalidBlockName:"Neplatný název bloku.",blockNotFound:"Blok nenalezen",xrefNotAllowed:"Nelze vložit externí referenci pomocí -INSERT."},xattach:{insertionPoint:"Zadejte bod vložení:",scale:"Zadejte faktor měřítka:",rotation:"Zadejte úhel otočení:",invalidScale:"Faktor měřítka musí být větší než 0.",unsupportedFile:"Vyberte soubor DWG nebo DXF.",loading:"Načítám externí referenci...",loadFailed:"Nepodařilo se načíst vybraný soubor výkresu."},point:{point:"Zadejte bod"},polygon:{numberOfSides:"Zadejte počet stran",centerOrEdge:"Zadejte střed mnohoúhelníku nebo",radiusOrType:"Zadejte volby",edgeStart:"Zadejte první koncový bod hrany",edgeEnd:"Zadejte druhý koncový bod hrany",keywords:{edge:{display:"Hrana(E)",local:"Hrana",global:"Edge"},inscribed:{display:"Vepsaný do kružnice(I)",local:"Vepsaný do kružnice",global:"Inscribed"},circumscribed:{display:"Opsaný kolem kružnice(C)",local:"Opsaný kolem kružnice",global:"Circumscribed"}},invalid:{sides:"Neplatný počet stran. Zadejte celé číslo mezi 3 a 1024.",radius:"Neplatný poloměr. Poloměr musí být větší než 0.",edge:"Neplatná hrana. Délka hrany musí být větší než 0."}},polyline:{firstPoint:"Zadejte první bod",nextPoint:"Zadejte další bod (nebo stiskněte Enter pro dokončení)",nextPointWithOptions:"Zadejte další bod nebo",nextPointWithArcOptions:"Zadejte další bod nebo",keywords:{arc:{display:"Oblouk(A)",local:"Oblouk",global:"Arc"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},close:{display:"Uzavřít(C)",local:"Uzavřít",global:"Close"},line:{display:"Úsečka(L)",local:"Úsečka",global:"Line"},angle:{display:"Úhel(A)",local:"Úhel",global:"Angle"},center:{display:"Střed(C)",local:"Střed",global:"Center"},secondPoint:{display:"Druhý bod(P)",local:"Druhý bod",global:"SecondPoint"},radius:{display:"Poloměr(R)",local:"Poloměr",global:"Radius"}},arcAngle:"Zadejte úhel oblouku",arcCenter:"Zadejte středový bod",arcSecondPoint:"Zadejte druhý bod na oblouku",arcEndPoint:"Zadejte koncový bod oblouku",arcRadius:"Zadejte poloměr oblouku"},rect:{firstPoint:"Zadejte první roh",nextPoint:"Zadejte druhý roh",firstPointWithOptions:"Zadejte první roh nebo",otherCornerWithOptions:"Zadejte druhý roh nebo",chamferFirst:"Zadejte první vzdálenost zkosení",chamferSecond:"Zadejte druhou vzdálenost zkosení",filletRadius:"Zadejte poloměr zaoblení",segmentWidth:"Zadejte šířku čáry obdélníku",elevationValue:"Zadejte výšku",thicknessValue:"Zadejte tloušťku",rotationAngle:"Zadejte úhel otočení obdélníku",dimensionLength:"Zadejte délku obdélníku",dimensionWidth:"Zadejte šířku obdélníku",areaValue:"Zadejte plochu obdélníku",areaLengthOrWidth:"Zadejte délku obdélníku",areaSpecifyWidth:"Zadejte šířku obdélníku",invalidPositive:"Neplatný vstup. Zadejte hodnotu větší než 0.",invalidRect:"Nelze vytvořit obdélník. Zadejte platné rohy nebo rozměry.",thicknessNotSupported:"Tloušťka obdélníku se aktuálně nezapisuje do dat entity. Nastavení tloušťky se ignoruje.",keywords:{chamfer:{display:"Zkosení(C)",local:"Zkosení",global:"Chamfer"},elevation:{display:"Výška(E)",local:"Výška",global:"Elevation"},fillet:{display:"Zaoblení(F)",local:"Zaoblení",global:"Fillet"},thickness:{display:"Tloušťka(T)",local:"Tloušťka",global:"Thickness"},width:{display:"Šířka(W)",local:"Šířka",global:"Width"},area:{display:"Plocha(A)",local:"Plocha",global:"Area"},dimensions:{display:"Rozměry(D)",local:"Rozměry",global:"Dimensions"},rotation:{display:"Otočení(R)",local:"Otočení",global:"Rotation"},length:{display:"Délka(L)",local:"Délka",global:"Length"},rectWidth:{display:"Šířka(W)",local:"Šířka",global:"Width"}}},rotate:{basePoint:"Zadejte základní bod",rotationAngleOrOptions:"Zadejte úhel otočení nebo",referenceAngleOrPoints:"Zadejte referenční úhel nebo",firstReferencePoint:"Zadejte první bod referenčního úhlu",secondReferencePoint:"Zadejte druhý bod",newAngle:"Zadejte nový úhel",keywords:{copy:{display:"Kopírovat(C)",local:"Kopírovat",global:"Copy"},reference:{display:"Reference(R)",local:"Reference",global:"Reference"},points:{display:"Body(P)",local:"Body",global:"Points"}},invalid:{referencePoints:"Neplatné referenční body: body musí být různé."}},revcloud:{firstCornerOrOptions:"Zadejte první rohový bod nebo",firstCorner:"Zadejte první rohový bod",oppositeCorner:"Zadejte protilehlý roh",startPoint:"Zadejte počáteční bod",nextPoint:"Zadejte další bod",nextPointOrUndo:"Zadejte další bod nebo",firstPoint:"Zadejte první bod",guideCursor:"Veďte kurzor podél obláčku (Enter dokončí)",arcLength:"Zadejte délku oblouku",selectObject:"Vyberte objekt",style:"Zadejte styl oblouků revizního obláčku",reverseDirection:"Obrátit směr",invalidArcLength:"Délka oblouku musí být větší než 0.",invalidObject:"Vybraný objekt nelze převést na revizní obláček.",keywords:{arcLength:{display:"Délka oblouku(A)",local:"Délka oblouku",global:"ArcLength"},object:{display:"Objekt(O)",local:"Objekt",global:"Object"},rectangular:{display:"Obdélníkový(R)",local:"Obdélníkový",global:"Rectangular"},polygonal:{display:"Mnohoúhelníkový(P)",local:"Mnohoúhelníkový",global:"Polygonal"},freehand:{display:"Od ruky(F)",local:"Od ruky",global:"Freehand"},style:{display:"Styl(S)",local:"Styl",global:"Style"},normal:{display:"Normální(N)",local:"Normální",global:"Normal"},calligraphy:{display:"Kaligrafie(C)",local:"Kaligrafie",global:"Calligraphy"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}},sketch:{specifySketch:"Zadejte skicu nebo",sketching:"Pohybem ukazatele kreslete (kliknutím nebo Enter zastavíte)",type:"Zadejte typ skici",increment:"Zadejte přírůstek skici",tolerance:"Zadejte toleranci splajnu",firstPoint:"Zadejte první bod",nextPoint:"Zadejte koncový bod",keywords:{type:{display:"Typ(T)",local:"Typ",global:"Type"},increment:{display:"Přírůstek(I)",local:"Přírůstek",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"Úsečky(L)",local:"Úsečky",global:"Lines"},polyline:{display:"Křivka(P)",local:"Křivka",global:"Polyline"},spline:{display:"Splajn(S)",local:"Splajn",global:"Spline"}}},spline:{firstPoint:"Zadejte první bod",nextPoint:"Zadejte další bod (nebo stiskněte Enter pro dokončení)",firstPointWithOptions:"Zadejte první bod nebo",nextPointWithFitOptions:"Zadejte další bod nebo",nextPointWithCvOptions:"Zadejte další řídicí bod nebo",methodPrompt:"Zadejte metodu vytvoření splajnu",knotsPrompt:"Zadejte parametrizaci uzlů",degreePrompt:"Zadejte stupeň splajnu",keywords:{method:{display:"Metoda(M)",local:"Metoda",global:"Method"},fit:{display:"Přizpůsobit(F)",local:"Přizpůsobit",global:"Fit"},cv:{display:"ŘB(C)",local:"ŘB",global:"CV"},knots:{display:"Uzly(K)",local:"Uzly",global:"Knots"},degree:{display:"Stupeň(D)",local:"Stupeň",global:"Degree"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},close:{display:"Uzavřít(C)",local:"Uzavřít",global:"Close"},chord:{display:"Tětiva(C)",local:"Tětiva",global:"Chord"},sqrtChord:{display:"Odmocnina tětivy(S)",local:"Odmocnina tětivy",global:"SqrtChord"},uniform:{display:"Rovnoměrné(U)",local:"Rovnoměrné",global:"Uniform"}}},sysvar:{prompt:"Zadejte novou hodnotu"},zoom:{mainPrompt:"Zadejte roh okna nebo",firstCorner:"Zadejte první roh",secondCorner:"Zadejte protilehlý roh",centerPoint:"Zadejte středový bod",heightOrScale:"Zadejte výšku nebo faktor měřítka (nX nebo nXP)",scaleFactor:"Zadejte faktor měřítka (nX nebo nXP)",keywords:{all:{display:"Vše(A)",local:"Vše",global:"All"},center:{display:"Střed(C)",local:"Střed",global:"Center"},extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},previous:{display:"Předchozí(P)",local:"Předchozí",global:"Previous"},original:{display:"Původní(O)",local:"Původní",global:"Original"},saved:{display:"Uložený(V)",local:"Uložený",global:"Saved"},smart:{display:"Chytrý(I)",local:"Chytrý",global:"Smart"},scale:{display:"Měřítko(S)",local:"Měřítko",global:"Scale"},window:{display:"Okno(W)",local:"Okno",global:"Window"}}},chtml:{exportFormat:"Formát exportu",exportInvisibleLayers:"Exportovat neviditelné hladiny",exportLayouts:"Exportovat rozvržení",initialView:"Počáteční pohled při otevření HTML",viewerMode:"Režim offline prohlížeče",chunkSizeMiB:"Velikost části v MiB (vícesouborový balíček)",compressChunks:"Komprimovat části (vícesouborový balíček)",keywords:{single:{display:"Jeden soubor(S)",local:"Jeden soubor",global:"Single"},multi:{display:"Vícesouborový balíček(M)",local:"Vícesouborový balíček",global:"Multi"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"},extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},current:{display:"Aktuální(C)",local:"Aktuální",global:"Current"},view:{display:"Pohled(V)",local:"Pohled",global:"View"},measure:{display:"Měření a kontrola(M)",local:"Měření a kontrola",global:"Measure"}}},cpdf:{modelSpaceFit:"Rám modelového prostoru",exportLayouts:"Exportovat rozvržení",textMode:"Vykreslení textu",keywords:{extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},display:{display:"Zobrazení(D)",local:"Zobrazení",global:"Display"},text:{display:"Text(T)",local:"Text",global:"Text"},vector:{display:"Vektor(V)",local:"Vektor",global:"Vector"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}}},CS={document:{untitled:"Bez názvu"},commandLine:{noLast:"(žádný předchozí příkaz)",unknownCommand:"Neznámý příkaz",executed:"Provedený příkaz",showHistory:"Zobrazit historii příkazů",placeholder:"Zadejte příkaz",showMessages:"Zobrazit historii zpráv",canceled:"*Zrušeno*",noHistory:"(žádná historie)",invalidInput:"Neplatný vstup.",close:"Zavřít příkazový řádek"},mobileCommand:{length:"Délka",angle:"Úhel",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Potvrdit",cancel:"Zrušit",help:"Nápověda",back:"Zpět",collapse:"Sbalit",expand:"Rozbalit"},inputManager:{firstCorner:"Zadejte první roh nebo",secondCorner:"Zadejte druhý roh nebo"},message:{onLockedLayer:"na uzamčené hladině.",fetchingDrawingFile:"Načítám soubor…",exportingDxf:"Exportuji DXF…",exportingPdf:"Exportuji PDF…",exportingSvg:"Exportuji SVG…",calculatingSmartExtents:"Počítám chytrý rozsah…",importingPdf:"Importuji PDF…",exportingEntityPreview:"Exportuji obrázek…",collectingMemoryProfile:"Analyzuji paměť…",fontCached:"Font úspěšně uložen do mezipaměti",fontCacheFailed:"Uložení fontu do mezipaměti selhalo",fontsNotFound:"Fonty nenalezené v úložišti: {fonts}.",fontsNotLoaded:"Nepodařilo se načíst fonty: {fonts}.",fontMissedInDrawing:"Font „{font}“ vyžaduje {count} textových objektů, ale není k dispozici. Zobrazuje se jako „{replacementFont}“.",fontMissedReplacement:"„{font}“ (zobrazeno fontem „{replacement}“)",failedToGetAvaiableFonts:"Nepodařilo se získat fonty z „{url}“!",failedToOpenFile:"Nepodařilo se otevřít soubor „{fileName}“!",failedToOpenFileToast:"Nepodařilo se otevřít „{fileName}“. Podrobnosti najdete v centru oznámení.",failedToOpenFileWorkerOom:"Nepodařilo se otevřít „{fileName}“. Analýza selhala kvůli nedostatku dostupné paměti (LibreDWG parser). Kliknutím na {dwgParserLink} můžete zakoupit komerční DWG parser a otevírat velké výkresy bez tohoto pádu.",failedToOpenFileWorkerOomLink:"tuto stránku",failedToOpenFileWorkerTimeout:"Nepodařilo se otevřít „{fileName}“. Při načítání výkresu vypršel časový limit.",failedToOpenFileFontLoadFailed:"Nepodařilo se otevřít „{fileName}“. Potřebné fonty se nepodařilo načíst.",failedToOpenFileLicenseExpired:"Nepodařilo se otevřít „{fileName}“. Licence převodníku DWG vypršela.",failedToOpenFileLicenseInvalid:"Nepodařilo se otevřít „{fileName}“. Licence převodníku DWG chybí nebo je neplatná.",unknownEntities:"Tento výkres obsahuje {count} neznámých nebo nepodporovaných objektů! Tyto objekty nebudou zobrazeny.",tianzhengEntities:"Tento výkres obsahuje vlastní objekty TArch / Tianzheng (nebo podobné třetí strany) (asi {count}). V tomto prostředí je nelze plně zpracovat, takže se část obsahu nemusí zobrazit.",emptyProxyEntities:"Tento výkres obsahuje {count} vlastních objektů bez proxy grafiky! Tyto objekty nebudou zobrazeny."},notification:{center:{title:"Oznámení",clearAll:"Vymazat vše",noNotifications:"Žádná oznámení"},group:{fontMissed:"Chybějící fonty",fontMissedSummary:"{count} zpráv o fontech. Kliknutím zobrazíte podrobnosti.",unsupportedEntities:"Nepodporované objekty",unsupportedEntitiesSummary:"{count} zpráv o načítání. Kliknutím zobrazíte podrobnosti.",genericSummary:"{count} zpráv. Kliknutím zobrazíte podrobnosti."},title:{failedToOpenFile:"Nepodařilo se otevřít soubor",failedToOpenFileWorkerOom:"Nedostatek paměti",failedToOpenFileWorkerTimeout:"Vypršel časový limit otevření",failedToOpenFileFontLoadFailed:"Načtení fontu selhalo",failedToOpenFileLicenseExpired:"Licence vypršela",failedToOpenFileLicenseInvalid:"Neplatná licence",fontNotFound:"Font nenalezen",fontNotLoaded:"Font nenačten",parsingWarning:"Problémy při načítání výkresu",systemMessage:"Systémová zpráva",systemWarning:"Systémové varování",systemError:"Systémová chyba",systemInfo:"Systémové informace"}},progress:{start:"Zahajuji načítání souboru…",parse:"Načítám soubor…",font:"Stahuji fonty potřebné pro tento výkres…",ltype:"Načítám typy čar…",style:"Načítám textové styly…",dimstyle:"Načítám kótovací styly…",layer:"Načítám hladiny…",vport:"Načítám výřezy…",blockrecord:"Načítám záznamy bloků…",header:"Načítám hlavičku…",block:"Načítám bloky…",entity:"Načítám objekty…",object:"Načítám pojmenované slovníky…",rendering:"Vykreslování výkresu ...",end:"Hotovo!"},about:{title:"O aplikaci",close:"Zavřít",product:"CAD Viewer",tagline:"Vysokovýkonný webový CAD prohlížeč pro výkresy DWG a DXF.",website:"Web",docs:"Dokumentace",repository:"GitHub",copyright:"© {year} mlightcad. Všechna práva vyhrazena.",ok:"OK"},drawStyle:{color:"Barva",fontSize:"Výška textu"},shortCutToolbar:{more:"Více",undo:"Zpět",redo:"Znovu",erase:"Smazat",collapse:"Sbalit panel nástrojů",expand:"Rozbalit panel nástrojů"},textHeight:{title:"Výška textu",close:"Zavřít",ok:"OK",cancel:"Zrušit",adaptive:"Přizpůsobit obrazovce",custom:"Vlastní výška textu",customPlaceholder:"Světová výška",fromScreen:"Ze velikosti na obrazovce",fromScreenHint:"Zadejte, jak velký má text vypadat na obrazovce při aktuálním zoomu. Přepočítá se na pevnou světovou výšku, která se při pozdějším zoomování nemění.",screenPxPlaceholder:"Velikost písma",screenUnit:"px",convert:"Přepočítat"},entityPick:{cancel:"Zrušit výběr"},colorPicker:{title:"Vybrat barvu",close:"Zavřít",ok:"OK",cancel:"Zrušit",index:"Index barvy: ",rgb:"RGB: ",input:"Barva",inputPlaceholder:"1-255 nebo #RRGGBB"},touchPointTutorial:{title:"Jak přesně vybrat bod?",description:"Podržte prst na obrazovce asi 0,5 sekundy. Nad prstem se objeví kříž, který při pohybu sleduje prst a přichytává se k geometrii pro přesnější výběr.",snoozeToday:"Dnes už nepřipomínat",hideForever:"Už nepřipomínat",ok:"Rozumím"},dataSource:{open:"Otevřít",local:"Místní soubor",url:"Z URL",openFrom:"Otevřít z {name}",signInTo:"Přihlásit se k {name}",signOutOf:"Odhlásit se z {name}",signOutOfAccount:"Odhlásit se z {name} ({account})",urlDialogTitle:"Otevřít z URL",urlDialogHint:"Zadejte URL souboru .dwg nebo .dxf.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"Zrušit",onedrive:"OneDrive",googledrive:"Google Drive",or:"nebo",dropFile:"Přetáhněte soubor sem nebo",browse:"procházet",dropOrBrowse:"Přetáhněte soubor DWG nebo DXF sem, nebo procházejte",newDrawing:"Nový výkres",source:"Zdroj",unavailable:"Tento zdroj zatím není k dispozici.",selectFile:"Vybrat soubor",signInRequired:"Nejprve se přihlaste a pak vyberte soubor.",downloading:"Stahuji soubor ..."}},AS={document:{untitled:"Untitled"},commandLine:{noLast:"(no last command)",unknownCommand:"Unknown command",executed:"Executed command",showHistory:"Show command history",placeholder:"Type command",showMessages:"Show message history",canceled:"*Canceled*",noHistory:"(no history)",invalidInput:"Invalid input.",close:"Close command line"},mobileCommand:{length:"Length",angle:"Angle",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Confirm",cancel:"Cancel",help:"Help",back:"Back",collapse:"Collapse",expand:"Expand"},inputManager:{firstCorner:"Specify the first corner or",secondCorner:"Specify the second corner or"},message:{onLockedLayer:"on a locked layer.",fetchingDrawingFile:"Fetching file ...",exportingDxf:"Exporting DXF ...",exportingPdf:"Exporting PDF ...",exportingSvg:"Exporting SVG ...",calculatingSmartExtents:"Calculating smart extents ...",importingPdf:"Importing PDF ...",exportingEntityPreview:"Exporting image ...",collectingMemoryProfile:"Analyzing memory ...",fontCached:"Font cached successfully",fontCacheFailed:"Failed to cache font",fontsNotFound:"Fonts not found in the font repository: {fonts}.",fontsNotLoaded:"Failed to load fonts: {fonts}.",fontMissedInDrawing:'Font "{font}" is required by {count} text object(s) but is not available. Displaying with "{replacementFont}".',fontMissedReplacement:'"{font}" (displaying with "{replacement}")',failedToGetAvaiableFonts:'Failed to get available fonts from "{url}"!',failedToOpenFile:'Failed to open file "{fileName}"!',failedToOpenFileToast:'Failed to open "{fileName}". Check the notification center for details.',failedToOpenFileWorkerOom:'Failed to open "{fileName}". Parsing failed because available memory was insufficient (LibreDWG parser). You can click {dwgParserLink} to purchase the commercial DWG parser and open large drawings without this crash.',failedToOpenFileWorkerOomLink:"this page",failedToOpenFileWorkerTimeout:'Failed to open "{fileName}". The operation timed out while parsing the drawing.',failedToOpenFileFontLoadFailed:'Failed to open "{fileName}". Required fonts could not be loaded.',failedToOpenFileLicenseExpired:'Failed to open "{fileName}". The DWG converter license has expired.',failedToOpenFileLicenseInvalid:'Failed to open "{fileName}". The DWG converter license is missing or invalid.',unknownEntities:"This drawing contains {count} unknown or unsupported entities! Those entities will not be shown.",tianzhengEntities:"This drawing contains TArch / Tianzheng (or similar third-party) custom entities (about {count}). They cannot be fully parsed in this environment, so some content may not display.",emptyProxyEntities:"This drawing contains {count} custom entities without proxy graphics! Those entities will not be shown."},notification:{center:{title:"Notifications",clearAll:"Clear All",noNotifications:"No notifications"},group:{fontMissed:"Missing Fonts",fontMissedSummary:"{count} font-related messages. Click to expand details.",unsupportedEntities:"Unsupported Entities",unsupportedEntitiesSummary:"{count} parsing-related messages. Click to expand details.",genericSummary:"{count} messages. Click to expand details."},title:{failedToOpenFile:"Failed to Open File",failedToOpenFileWorkerOom:"Insufficient Memory",failedToOpenFileWorkerTimeout:"Open Timed Out",failedToOpenFileFontLoadFailed:"Font Load Failed",failedToOpenFileLicenseExpired:"License Expired",failedToOpenFileLicenseInvalid:"Invalid License",fontNotFound:"Font Not Found",fontNotLoaded:"Font Not Loaded",parsingWarning:"Issues on Parsing Drawing",systemMessage:"System Message",systemWarning:"System Warning",systemError:"System Error",systemInfo:"System Info"}},progress:{start:"Start parsing file ...",parse:"Parsing file ...",font:"Downloading fonts needed by this drawing ...",ltype:"Parsing line types ...",style:"Parsing text syltes ...",dimstyle:"Parsing dimension styles ...",layer:"Parsing layers ...",vport:"Parsing viewports ...",blockrecord:"Parsing block record ...",header:"Parsing header ...",block:"Parsing blocks ...",entity:"Parsing entities ...",object:"Parsing named dictionaries ...",rendering:"Rendering drawing ...",end:"Finished!"},about:{title:"About",close:"Close",product:"CAD Viewer",tagline:"High-performance web CAD viewer for DWG and DXF drawings.",website:"Website",docs:"Documentation",repository:"GitHub",copyright:"© {year} mlightcad. All rights reserved.",ok:"OK"},drawStyle:{color:"Color",fontSize:"Text height"},shortCutToolbar:{more:"More",undo:"Undo",redo:"Redo",erase:"Delete",collapse:"Collapse toolbar",expand:"Expand toolbar"},textHeight:{title:"Text Height",close:"Close",ok:"OK",cancel:"Cancel",adaptive:"Fit to screen",custom:"Custom text height",customPlaceholder:"World height",fromScreen:"From screen size",fromScreenHint:"Enter how large the text should look on screen at the current zoom. It is converted to a fixed world-space height that stays constant when you zoom later.",screenPxPlaceholder:"Font size",screenUnit:"px",convert:"Convert"},entityPick:{cancel:"Cancel selection"},colorPicker:{title:"Select Color",close:"Close",ok:"OK",cancel:"Cancel",index:"Color Index: ",rgb:"RGB: ",input:"Color",inputPlaceholder:"1-255 or #RRGGBB"},touchPointTutorial:{title:"How to pick points precisely?",description:"Long-press on the screen for about 0.5 seconds. A cross appears above your finger and follows as you move, snapping to geometry for more accurate picks.",snoozeToday:"Don't remind me today",hideForever:"Don't remind me again",ok:"Got it"},dataSource:{open:"Open",local:"Local file",url:"From URL",openFrom:"Open from {name}",signInTo:"Sign in to {name}",signOutOf:"Sign out of {name}",signOutOfAccount:"Sign out of {name} ({account})",urlDialogTitle:"Open from URL",urlDialogHint:"Enter a URL to a .dwg or .dxf file.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"Cancel",onedrive:"OneDrive",googledrive:"Google Drive",or:"or",dropFile:"Drop a file here or",browse:"browse",dropOrBrowse:"Drop a DWG or DXF file here, or browse",newDrawing:"New Drawing",source:"Source",unavailable:"This source is not available yet.",selectFile:"Select file",signInRequired:"Sign in first to select a file.",downloading:"Downloading file ..."}},_S={ACAD:{"-hatch":{description:"Şerit menüsü olmadan komut satırı seçenekleriyle tarama dolgular oluşturur"},"-layer":{description:"Komut satırı seçenekleriyle katmanları yönetir"},about:{description:"mlightcad hakkında bilgi gösterir"},acadver:{description:"Çizim veritabanı sürüm tanımlayıcısını saklar (salt okunur)"},angbase:{description:"Geçerli KKS'ye göre 0 açı temel yönünü ayarlar"},angdir:{description:"Pozitif açıların saat yönünde mi yoksa saat yönünün tersine mi ölçüleceğini ayarlar"},arc:{description:"Bir yay oluşturur"},aunits:{description:"Açılar için görüntüleme biçimini ayarlar"},auprec:{description:"AUNITS ile birlikte kullanılan, açılar için görüntüleme hassasiyetini ayarlar"},bmpout:{description:"BMP olarak dışa aktarır"},cdxf:{description:"Geçerli çizimi DXF olarak dışa aktarır"},cpdf:{description:"Geçerli çizimi PDF olarak dışa aktarır"},"-cpdf":{description:"Geçerli çizimi komut satırı seçenekleriyle PDF olarak dışa aktarır"},cecolor:{description:"Yeni oluşturulan nesneler için geçerli varsayılan rengi ayarlar"},celtscale:{description:"Yeni oluşturulan nesneler için çizgi tipi ölçek faktörünü denetler"},celtype:{description:"Yeni oluşturulan nesneler için çizgi tipini ayarlar"},celweight:{description:"Yeni oluşturulan nesneler için varsayılan çizgi kalınlığını ayarlar"},cetransparency:{description:"Yeni oluşturulan nesneler için saydamlığı ayarlar"},cachefont:{description:"Metin işleme için yerel bir yazı tipi dosyasını IndexedDB'ye önbelleğe alır"},circle:{description:"Merkez ve yarıçapa göre bir daire oluşturur"},clayer:{description:"Yeni nesneler ve düzenleme işlemleri için geçerli katmanı ayarlar"},cmleaderstyle:{description:"Geçerli çoklu lider stilinin adını ayarlar"},cmlscale:{description:"Bir çoklu çizginin genel genişliğini denetler"},cmlstyle:{description:"Geçerli çoklu çizgi stilinin adını ayarlar"},colortheme:{description:"Kullanıcı arayüzünün renk temasını denetler (koyu veya açık)"},copy:{description:"Seçili varlıkları klonlayarak yeni konumlara kopyalar",prompt:"Varlıkları seçin"},csvg:{description:"Geçerli çizimi SVG'ye dönüştürür"},chtml:{description:"Geçerli çizimi bağımsız, çevrimdışı bir HTML dosyasına dışa aktarır"},"-chtml":{description:"Komut satırı seçeneklerini kullanarak geçerli çizimi HTML'e dışa aktarır"},dimlinear:{description:"Doğrusal ölçülendirmeler oluşturur"},dimaligned:{description:"Hizalı doğrusal ölçülendirme oluşturur"},dimradius:{description:"Daire ve yaylar için yarıçap ölçülendirmesi oluşturur"},dimdiameter:{description:"Daire ve yaylar için çap ölçülendirmesi oluşturur"},dimangular:{description:"Açısal ölçülendirmeler oluşturur"},dimarc:{description:"Yay uzunluğu ölçüsü oluşturur"},dimordinate:{description:"Ordinat ölçüsü oluşturur"},dimcontinue:{description:"Sürekli ölçü oluşturur"},dimbaseline:{description:"Taban çizgisi ölçüsü oluşturur"},dimstyle:{description:"Geçerli ölçülendirme stilinin adını ayarlar"},dwgname:{description:"Geçerli çizim dosyasının adını saklar (salt okunur)"},loginname:{description:"Kullanıcının oturum açma adını görüntüler (salt okunur)"},dynmode:{description:"İmleçteki Dinamik Girdi ayarlarını denetler"},dynprompt:{description:"Dinamik Girdi araç ipuçlarında istemlerin görüntülenmesini denetler"},ellipse:{description:"Eksen uç noktalarına veya merkeze göre bir elips veya eliptik yay oluşturur"},erase:{description:"Seçili varlıkları çizimden siler",prompt:"Varlıkları seçin"},extmax:{description:"Model alanı çizim kapsamının sağ üst köşesini saklar (salt okunur)"},extmin:{description:"Model alanı çizim kapsamının sol alt köşesini saklar (salt okunur)"},entout:{description:"Seçili varlıklar için birleştirilmiş bir önizleme görüntüsü dışa aktarır",prompt:"Varlıkları seçin"},hideobjects:{description:"Seçili nesnelerin görüntülenmesini geçici olarak gizler",prompt:"Nesneleri seçin"},imageattach:{description:"Geçerli çizime harici başvuru olarak bir raster görüntü ekler"},"-insert":{description:"Bir blok tanımını geçerli çizime ekler (komut satırı)"},xattach:{description:"Geçerli çizime harici başvuru olarak bir DWG veya DXF çizimi ekler"},gripcolor:{description:"Seçili nesneler üzerinde görüntülenen seçilmemiş tutamaçların rengini ayarlar"},griphot:{description:"Seçili (sıcak) tutamaçların rengini ayarlar"},gripobjlimit:{description:"Seçim kümesi belirtilen nesne sayısını aştığında tutamaç görüntülenmesini engeller (0 = sınır yok)"},grips:{description:"Seçili nesnelerde tutamaçların görüntülenip görüntülenmeyeceğini denetler"},gripsize:{description:"Tutamaç kutularının piksel cinsinden boyutunu ayarlar"},hatch:{description:"Kapalı bir alanı veya seçili nesneleri bir tarama deseniyle doldurur"},ipdf:{description:"Bir PDF dosyasından vektör geometrisini içe aktarır"},hpang:{description:"Yeni oluşturulan tarama desenleri için varsayılan açıyı radyan cinsinden ayarlar"},hpassoc:{description:"Yeni oluşturulan taramaların ilişkisel olup olmayacağını denetler"},hpbackgroundcolor:{description:"Yeni oluşturulan tarama desenleri için varsayılan arka plan rengini ayarlar"},hpcolor:{description:"Yeni oluşturulan taramalar için varsayılan rengi ayarlar"},hpdouble:{description:"Kullanıcı tanımlı tarama desenlerinin ikiye katlanıp katlanmayacağını denetler"},hpislanddetection:{description:"Yeni oluşturulan tarama sınırları içindeki adaların nasıl işleneceğini denetler"},hplayer:{description:"Yeni oluşturulan taramalar ve dolgular için varsayılan katmanı ayarlar"},hpname:{description:"Bu oturumda yeni oluşturulan taramalar için varsayılan desen adını ayarlar"},hpscale:{description:"Yeni oluşturulan tarama desenleri için varsayılan ölçek faktörünü ayarlar"},hpseparate:{description:"Birden çok sınır için tek mi yoksa ayrı tarama nesneleri mi oluşturulacağını denetler"},hptransparency:{description:"Yeni oluşturulan taramalar ve dolgular için varsayılan saydamlığı ayarlar"},insunits:{description:"Eklenen blokların, görüntülerin veya dış referansların otomatik ölçeklendirilmesi için çizim birimlerini belirtir"},jpgout:{description:"JPEG olarak dışa aktarır"},laycur:{description:"Seçili nesnelerin katman özelliğini geçerli katman olarak değiştirir",prompt:"Geçerli katmana değiştirilecek nesneleri seçin"},laydel:{description:"Bir katmanı ve o katmandaki tüm nesneleri siler"},layerclose:{description:"Katman Özellikleri Yöneticisi'ni kapatır"},layerp:{description:"Katman ayarlarında yapılan son değişikliği veya değişiklik kümesini geri alır"},layfrz:{description:"Seçili nesnelerin katmanını dondurur",prompt:"Dondurulacak katmandaki nesneyi seçin"},layiso:{description:"Seçili nesnelerin katmanlarını izole eder",prompt:"İzole edilecek katmanlardaki nesneleri seçin"},laylck:{description:"Seçili nesnelerin katmanını kilitler",prompt:"Kilitlenecek katmandaki nesneyi seçin"},layoff:{description:"Seçili nesnelerin katmanını kapatır",prompt:"Kapatılacak katmandaki nesneyi seçin"},layon:{description:"Çizimdeki tüm katmanları açar"},laythw:{description:"Çizimdeki tüm donmuş katmanları çözer"},layulk:{description:"Seçili nesnelerin katmanının kilidini açar",prompt:"Kilidi açılacak katmandaki nesneyi seçin"},layuniso:{description:"LAYISO tarafından gizlenen veya kilitlenen katmanları geri yükler"},line:{description:"Noktalar arasında düz çizgi parçaları çizer"},log:{description:"Hata ayıklama bilgilerini konsola kaydeder"},ltscale:{description:"Çizim için genel çizgi tipi ölçek faktörünü ayarlar"},lunits:{description:"Koordinatlar ve mesafeler için görüntüleme biçimini ayarlar"},luprec:{description:"LUNITS ile birlikte kullanılan, doğrusal birimler için görüntüleme hassasiyetini ayarlar"},lwdisplay:{description:"Çizgi kalınlıklarının çizimde görüntülenip görüntülenmeyeceğini denetler"},clearmeasurements:{description:"Geçerli yerleşimdeki tüm ölçümleri kaldırır"},measurementvis:{description:"Geçerli yerleşimdeki ölçümleri gösterir veya gizler"},measurementpanel:{description:"Ölçüm paletini açar"},measurementexport:{description:"Ölçümleri sidecar JSON dosyasına dışa aktarır"},measurementimport:{description:"Ölçümleri sidecar JSON dosyasından içe aktarır"},measurearea:{description:"Seçili nesnelerin veya noktaların alanını ve çevresini hesaplar"},measureangle:{description:"İki çizgi veya üç nokta arasındaki açıyı ölçer"},measurearc:{description:"Bir yay parçasının uzunluğunu ölçer"},measuredistance:{description:"İki nokta arasındaki mesafeyi ve delta değerlerini ölçer"},measurecontinuous:{description:"Enter veya İptal edilene kadar ardışık noktalar seçerek zincirleme mesafeleri ölçer"},measurepoint:{description:"Seçilen noktanın X/Y koordinatlarını ölçer"},measurement:{description:"Çizimin İngiliz (emperyal) birimlerini mi yoksa metrik birimleri mi kullanacağını ayarlar"},measurementcolor:{description:"Ölçüm katmanları için kullanılan rengi ayarlar"},modelbkcolor:{description:"Model alanı çizim alanının arka plan rengini ayarlar"},mline:{description:"Tek bir çoklu çizgi nesnesi olarak birden çok paralel çizgi oluşturur"},move:{description:"Seçili varlıkları bir yer değiştirme vektörüne göre taşır",prompt:"Varlıkları seçin"},offset:{description:"Belirtilen bir mesafede paralel eğriler, çoklu çizgiler veya daireler oluşturur"},mtext:{description:"Bir çoklu metin varlığı oluşturur"},open:{description:"Mevcut bir çizim dosyasını açar"},openprof:{description:"Dosya açma aşaması zamanlama profillerinin konsola kaydedilip kaydedilmeyeceğini denetler"},openperf:{description:"Son çizim açılışının zamanlamalarını Open Performance paletinde gösterir"},orthomode:{description:"İmleç hareketini yatay veya dikey eksenle sınırlar"},osmode:{description:"Bit kodu değeri kullanarak çalışan Nesne Yakalama modlarını ayarlar"},pan:{description:"Görüntüleme yönünü veya büyütmeyi değiştirmeden görünümü kaydırır"},paperbkcolor:{description:"Kağıt alanı (düzen) çizim alanının arka plan rengini ayarlar"},pdmode:{description:"POINT varlıklarının nasıl görüntüleneceğini denetler"},pdsize:{description:"POINT varlıkları için görüntüleme boyutunu ayarlar"},pickbox:{description:"Nesneleri seçmek için kullanılan seçim kutusunun boyutunu (piksel cinsinden) ayarlar"},pline:{description:"Birden çok nokta belirterek bir çoklu çizgi oluşturur"},pngout:{description:"PNG olarak dışa aktarır"},point:{description:"Noktalar oluşturur"},polaraddang:{description:"Ek kutupsal izleme açılarını noktalı virgülle ayrılmış liste olarak saklar"},polarang:{description:"Kutupsal izleme için kutupsal açı artımını ayarlar"},polarmode:{description:"Kutupsal ve nesne yakalama izleme ayarlarını denetler"},polygon:{description:"Merkez/yarıçapa veya bir çokgen kenarına göre düzgün bir çokgen oluşturur"},qnew:{description:"Yeni bir çizim başlatır"},close:{description:"Geçerli çizimi kapatır"},ray:{description:"Bir noktadan başlayıp sonsuza uzanan bir ışın oluşturur"},rectang:{description:"İki karşıt köşe belirterek bir dikdörtgen oluşturur"},regen:{description:"Geçerli çizimi yeniden çizer"},revcloud:{description:"Revizyon bulutu oluşturur veya değiştirir"},markuptext:{description:"Metin işareti yerleştirir"},markupline:{description:"Çizgi işareti oluşturur"},markuparrow:{description:"Ok işareti oluşturur"},markupcloud:{description:"Revizyon bulutu işareti oluşturur"},markuprect:{description:"Dikdörtgen işareti oluşturur"},markupcircle:{description:"Daire işareti oluşturur"},markuphighlight:{description:"Vurgu dikdörtgeni işareti oluşturur"},markupcallout:{description:"Çağrı notu oluşturur: önce lider ucunu, sonra metin kutusunu belirtin, ardından metni girin"},markupstamp:{description:"Damga veya özel sembol yerleştirir"},markupvis:{description:"İşaretleri gösterir veya gizler"},clearmarkups:{description:"Geçerli yerleşimdeki tüm işaretleri temizler"},markupexport:{description:"İşaretleri sidecar JSON dosyasına dışa aktarır"},markupimport:{description:"İşaretleri sidecar JSON dosyasından içe aktarır"},markuppanel:{description:"İşaret paletini açar"},rotate:{description:"Seçili varlıkları bir taban noktası etrafında döndürür",prompt:"Varlıkları seçin"},select:{description:"Varlıkları seçer"},shortcutmenu:{description:"Çizim alanındaki kısayol menülerinin kullanılabilirliğini denetler"},sketch:{description:"Bir dizi serbest el çizgi parçası oluşturur"},spline:{description:"Kontrol noktaları belirterek düzgün bir spline eğrisi oluşturur"},textstyle:{description:"Geçerli metin stilinin adını ayarlar"},unitmode:{description:"LUNITS Mimari veya Kesirli olduğunda koordinatların kesirli görüntülenmesini denetler"},switchbg:{description:"Çizim alanı arka planını beyaz ve siyah arasında değiştirir"},unisolateobjects:{description:"HIDEOBJECTS tarafından gizlenen tüm nesneleri yeniden görüntüler"},undo:{description:"Son veritabanı düzenleme işlemini geri alır",nothingToUndo:"Geri alınacak işlem yok."},redo:{description:"Geri alınan son veritabanı düzenleme işlemini yineler",nothingToRedo:"Yinelenecek işlem yok."},xline:{description:"Her iki yönde de sonsuza uzanan bir yapı çizgisi oluşturur"},zoom:{description:"Tüm varlıkların maksimum sınırlarını görüntülemek için yakınlaştırır"}},USER:{}},PS={arc:{startPointOrCenter:"Yayın başlangıç noktasını belirtin veya",secondPointOrOptions:"Yayın ikinci noktasını belirtin veya",secondPoint:"Yayın ikinci noktasını belirtin",startPoint:"Yayın başlangıç noktasını belirtin",centerPoint:"Yayın merkez noktasını belirtin",endPoint:"Yayın bitiş noktasını belirtin",endPointOrOptions:"Yayın bitiş noktasını belirtin veya",centerPointOrOptions:"Yayın merkez noktasını belirtin",includedAngle:"İç açıyı belirtin",chordLength:"Kiriş uzunluğunu belirtin",tangentDirection:"Yayın başlangıç noktası için teğet yönünü belirtin",radius:"Yayın yarıçapını belirtin",keywords:{center:{display:"Merkez(M)",local:"Merkez",global:"Center"},end:{display:"Bitiş(B)",local:"Bitiş",global:"End"},angle:{display:"Açı(A)",local:"Açı",global:"Angle"},chordLength:{display:"kiriş Uzunluğu(U)",local:"Kiriş Uzunluğu",global:"ChordLength"},direction:{display:"Yön(Y)",local:"Yön",global:"Direction"},radius:{display:"Yarıçap(R)",local:"Yarıçap",global:"Radius"}},invalid:{threePoint:"Geçersiz 3 noktalı yay: noktalar aynı doğru üzerinde veya bir yay tanımlayamıyor.",center:"Geçersiz merkez girişi: başlangıç ve bitiş noktaları aynı çember üzerinde olmalıdır.",angle:"Geçersiz açı girişi: iç açı 0 dereceden büyük ve 360 dereceden küçük olmalıdır.",chordLength:"Geçersiz kiriş uzunluğu: değer mevcut yarıçap için geçerli aralığın dışında.",direction:"Geçersiz yön: bu teğet yönünden bir yay oluşturulamıyor.",radius:"Geçersiz yarıçap: belirtilen yarıçap başlangıç ve bitiş noktalarını birleştiremiyor."}},circle:{center:"Çemberin merkezini belirtin",centerOrOptions:"Çemberin merkez noktasını belirtin veya",radius:"Çemberin yarıçapını belirtin",radiusOrDiameter:"Çemberin yarıçapını belirtin veya",diameter:"Çemberin çapını belirtin",twoPointFirst:"Çember çapının ilk uç noktasını belirtin",twoPointSecond:"Çember çapının ikinci uç noktasını belirtin",threePointFirst:"Çember üzerindeki ilk noktayı belirtin",threePointSecond:"Çember üzerindeki ikinci noktayı belirtin",threePointThird:"Çember üzerindeki üçüncü noktayı belirtin",keywords:{threeP:{display:"3N(3N)",local:"3N",global:"3P"},twoP:{display:"2N(2N)",local:"2N",global:"2P"},diameter:{display:"Çap(Ç)",local:"Çap",global:"Diameter"}}},copy:{basePointOrOptions:"Temel noktayı belirtin veya",displacementOrArray:"Yer değiştirmeyi belirtin veya",secondPointOrArray:"İkinci noktayı belirtin veya",modePrompt:"Kopyalama modu seçeneğini girin",arrayItemCount:"Orijinal dahil dizideki öğe sayısını girin",arraySecondPointOrFit:"İkinci noktayı belirtin veya",arrayFitSecondPoint:"İkinci noktayı belirtin",keywords:{displacement:{display:"Yer değiştirme(Y)",local:"Yer değiştirme",global:"Displacement"},mode:{display:"Mod(O)",local:"Mod",global:"Mode"},multiple:{display:"Çoklu(Ç)",local:"Çoklu",global:"Multiple"},single:{display:"Tekli(T)",local:"Tekli",global:"Single"},array:{display:"Dizi(D)",local:"Dizi",global:"Array"},fit:{display:"Uydur(U)",local:"Uydur",global:"Fit"}}},dimlinear:{...R.dimlinear,xLine1Point:"İlk uzatma çizgisinin başlangıç noktasını belirtin",xLine2Point:"İkinci uzatma çizgisinin başlangıç noktasını belirtin",dimLinePoint:"Ölçü çizgisi konumunu belirtin"},dimaligned:{...R.dimaligned},dimradius:{...R.dimradius},dimdiameter:{...R.dimdiameter},dimangular:{...R.dimangular},dimarc:{...R.dimarc},dimordinate:{...R.dimordinate},dimcontinue:{...R.dimcontinue},dimbaseline:{...R.dimbaseline},ellipse:{axisEndpointOrOptions:"Elipsin eksen uç noktasını belirtin veya",arcAxisEndpointOrCenter:"Eliptik yayın eksen uç noktasını belirtin veya",center:"Elipsin merkezini belirtin",firstAxisEndpoint:"Eksenin uç noktasını belirtin",secondAxisEndpoint:"Eksenin diğer uç noktasını belirtin",otherAxisOrRotation:"Diğer eksene olan mesafeyi belirtin veya",rotationAngle:"Ana eksen etrafındaki döndürme açısını belirtin",arcStartAngle:"Eliptik yayın başlangıç açısını belirtin",arcEndAngle:"Eliptik yayın bitiş açısını belirtin",keywords:{arc:{display:"Yay(Y)",local:"Yay",global:"Arc"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},rotation:{display:"Döndürme(D)",local:"Döndürme",global:"Rotation"}},invalid:{axis:"Geçersiz eksen girişi: eksen uzunluğu 0'dan büyük olmalıdır.",otherAxis:"Geçersiz diğer eksen girişi: mesafe 0'dan büyük olmalıdır.",rotation:"Geçersiz döndürme girişi: elde edilen küçük eksen 0'dan büyük olmalıdır."}},hatch:{prompt:"Sınır nesnesini seçin veya",pickPoint:"İç noktayı belirtin (bitirmek için Enter'a basın)",select:"Tarama yapılacak nesneleri seçin",patternName:"Tarama deseni adını girin",scale:"Tarama deseni ölçeğini belirtin",angle:"Tarama deseni açısını belirtin",style:"Tarama stilini girin",associative:"İlişkiselliği belirtin",invalidBoundary:"Seçilen nesneler kapalı bir sınır oluşturmuyor.",keywords:{pick:{display:"Nokta seç(N)",local:"Nokta seç",global:"PickPoints"},select:{display:"Nesne seç(S)",local:"Nesne seç",global:"SelectObjects"},cancel:{display:"İptal(İ)",local:"İptal",global:"Cancel"},pattern:{display:"Desen(D)",local:"Desen",global:"Pattern"},scale:{display:"Ölçek(Ö)",local:"Ölçek",global:"Scale"},angle:{display:"Açı(A)",local:"Açı",global:"Angle"},style:{display:"Stil(T)",local:"Stil",global:"HatchStyle"},associative:{display:"İlişkisel(İL)",local:"İlişkisel",global:"AssociativeMode"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},outer:{display:"Dış(D)",local:"Dış",global:"Outer"},ignore:{display:"Yoksay(Y)",local:"Yoksay",global:"Ignore"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hayır(H)",local:"Hayır",global:"No"}}},hideobjects:{hidden:"nesne gizlendi",restored:"nesne geri yüklendi",nothingToRestore:"Geri yüklenecek gizli nesne yok"},entout:{longSidePrompt:"Önizleme uzun kenar boyutunu piksel olarak girin",exported:"nesne önizlemesi dışa aktarıldı",skipped:"nesne atlandı",failed:{"no-preview-root":"Seçim için önizleme geometrisi oluşturulamadı","no-bounds":"Seçim için önizleme sınırları hesaplanamadı","capture-failed":"Nesne önizleme görüntüsü oluşturulamadı","download-failed":"Önizleme oluşturuldu ancak PNG indirmesi başarısız oldu"}},layer:{main:"Seçenek girin",listSummary:"Katman listesi tarayıcı konsoluna yazdırıldı",emptyInput:"Katman adı girilmedi.",newPrompt:"Yeni katman(lar) için ad girin",makePrompt:"Geçerli yapılacak katmanın adını girin",setPrompt:"Geçerli olarak ayarlanacak katmanın adını girin",onPrompt:"Açılacak katman ad(lar)ını girin",offPrompt:"Kapatılacak katman ad(lar)ını girin",freezePrompt:"Dondurulacak katman ad(lar)ını girin",thawPrompt:"Çözülecek katman ad(lar)ını girin",lockPrompt:"Kilitlenecek katman ad(lar)ını girin",unlockPrompt:"Kilidi açılacak katman ad(lar)ını girin",colorLayerPrompt:"Rengi değiştirilecek katman ad(lar)ını girin",colorValuePrompt:"Renk girin (ACI 1-255, 255,0,0 gibi RGB veya CSS renk adı)",invalidColor:"Geçersiz renk girişi.",descriptionLayerPrompt:"Açıklaması düzenlenecek katman adını girin",descriptionValuePrompt:"Yeni katman açıklamasını girin",created:"Oluşturulan katman sayısı",alreadyExists:"Katman zaten mevcut",notFound:"Katman bulunamadı",cannotChangeCurrent:"Geçerli katman kapatılamaz veya dondurulamaz.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Yap(Y)",local:"Yap",global:"Make"},set:{display:"Ayarla(A)",local:"Ayarla",global:"Set"},new:{display:"Yeni(Y)",local:"Yeni",global:"New"},on:{display:"Aç(A)",local:"Aç",global:"On"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},color:{display:"Renk(R)",local:"Renk",global:"Color"},freeze:{display:"Dondur(D)",local:"Dondur",global:"Freeze"},thaw:{display:"Çöz(Ç)",local:"Çöz",global:"Thaw"},lock:{display:"Kilitle(K)",local:"Kilitle",global:"Lock"},unlock:{display:"Kilidi aç(A)",local:"Kilidi aç",global:"Unlock"},description:{display:"Açıklama(A)",local:"Açıklama",global:"Description"}}},layon:{alreadyOn:"Tüm katmanlar zaten açık.",turnedOn:"Açılan katmanlar"},laycur:{prompt:"Geçerli katmana değiştirilecek nesneleri seçin",currentLayerNotFound:"Geçerli katman bulunamadı.",noObjects:"Geçerli nesne seçilmedi.",alreadyCurrent:"Seçilen nesneler zaten geçerli katmanda.",changed:"Geçerli katmana değiştirilen nesneler"},layfrz:{prompt:"Dondurulacak katmandaki nesneyi seçin veya",invalidSelection:"Geçersiz nesne seçildi.",settingsPrompt:"Değiştirilecek LAYFRZ ayarını girin",viewportPrompt:"Görüntü penceresi dondurma davranışını belirtin",blockSelectionPrompt:"İç içe blok seçim davranışını belirtin",vpfreezeFallback:"Mevcut görüntüleyici, görüntü penceresi başına katman dondurmayı desteklemiyor; bunun yerine Dondur davranışı kullanılıyor.",nestedSelectionLimited:"İç içe blok seçim ayarları kaydedildi, ancak mevcut seçim işlemi yine de üst düzey nesnenin katmanını çözümlüyor.",layerNotFound:"Katman bulunamadı",cannotFreezeCurrent:"Geçerli katman dondurulamaz.",alreadyFrozen:"Katman zaten donuk",frozen:"Dondurulan katman",restored:"Geri yüklenen katman",nothingToUndo:"Geri alınacak bir LAYFRZ işlemi yok.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},viewports:{display:"Görüntü pencereleri(G)",local:"Görüntü pencereleri",global:"Viewports"},blockSelection:{display:"Blok seçimi(B)",local:"Blok seçimi",global:"BlockSelection"},freeze:{display:"Dondur(D)",local:"Dondur",global:"Freeze"},vpfreeze:{display:"Görüntü dondur(V)",local:"Görüntü dondur",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Nesne(N)",local:"Nesne",global:"Entity"},none:{display:"Hiçbiri(H)",local:"Hiçbiri",global:"None"}}},layiso:{prompt:"İzole edilecek katman(lar)daki nesneleri seçin veya",settingsPrompt:"İzole edilmeyen katmanlar için ayarı girin",offModePrompt:"İzole edilmeyen katmanlar için kapatma davranışını girin",noLayers:"Geçerli katman seçilmedi.",layerNotFound:"Katman bulunamadı",isolated:"İzole edilen katman(lar)",affectedLayers:"etkilenen katmanlar",vpfreezeFallback:"Mevcut görüntüleyici, görüntü penceresi başına katman dondurmayı desteklemiyor; bunun yerine Kapat davranışı kullanılıyor.",lockFadeFallback:"Mevcut görüntüleyici katman solma görüntüsünü desteklemiyor; izole edilmeyen katmanlar solma olmadan kilitlenecek.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},lockAndFade:{display:"Kilitle ve soldur(K)",local:"Kilitle ve soldur",global:"LockAndFade"},vpfreeze:{display:"Görüntü dondur(V)",local:"Görüntü dondur",global:"Vpfreeze"}}},layuniso:{noPrevious:"Geri yüklenecek önceki LAYISO katman durumu yok.",layerNotFound:"Katman bulunamadı",nothingRestored:"Hiçbir LAYISO katman değişikliği geri yüklenmedi.",restored:"Geri yüklenen katmanlar"},laythw:{alreadyThawed:"Tüm katmanlar zaten çözülmüş.",thawed:"Çözülen katmanlar"},laylck:{prompt:"Kilitlenecek katmandaki bir nesneyi seçin",invalidSelection:"Geçersiz nesne seçildi.",layerNotFound:"Katman bulunamadı",alreadyLocked:"Katman zaten kilitli",locked:"Kilitlenen katman"},layulk:{prompt:"Kilidi açılacak katmandaki bir nesneyi seçin",invalidSelection:"Geçersiz nesne seçildi.",layerNotFound:"Katman bulunamadı",alreadyUnlocked:"Katmanın kilidi zaten açık",unlocked:"Kilidi açılan katman"},layoff:{prompt:"Kapatılacak katmandaki nesneyi seçin veya",invalidSelection:"Geçersiz nesne seçildi.",settingsPrompt:"Değiştirilecek LAYOFF ayarını girin",viewportPrompt:"Görüntü penceresi davranışını belirtin",blockSelectionPrompt:"İç içe blok seçim davranışını belirtin",vpfreezeFallback:"Mevcut görüntüleyici, görüntü penceresi başına katman kapatmayı desteklemiyor; bunun yerine Kapat davranışı kullanılıyor.",nestedSelectionLimited:"İç içe blok seçim ayarları kaydedildi, ancak mevcut seçim işlemi yine de üst düzey nesnenin katmanını çözümlüyor.",layerNotFound:"Katman bulunamadı",cannotTurnOffCurrent:"Geçerli katman kapatılamaz.",alreadyOff:"Katman zaten kapalı",turnedOff:"Kapatılan katman",restored:"Geri yüklenen katman",nothingToUndo:"Geri alınacak bir LAYOFF işlemi yok.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},viewports:{display:"Görüntü pencereleri(G)",local:"Görüntü pencereleri",global:"Viewports"},blockSelection:{display:"Blok seçimi(B)",local:"Blok seçimi",global:"BlockSelection"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},vpfreeze:{display:"Görüntü dondur(V)",local:"Görüntü dondur",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Nesne(N)",local:"Nesne",global:"Entity"},none:{display:"Hiçbiri(H)",local:"Hiçbiri",global:"None"}}},layerp:{restored:"Önceki katman durumu geri yüklendi.",noPreviousState:"Geri yüklenecek önceki bir katman durumu yok."},line:{firstPoint:"İlk noktayı belirtin",firstPointOrContinue:"İlk noktayı belirtin veya",nextPoint:"Sonraki noktayı belirtin",nextPointWithOptions:"Sonraki noktayı belirtin veya",keywords:{continue:{display:"Devam et(D)",local:"Devam et",global:"Continue"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"}}},xline:{firstPointOrOptions:"Bir nokta belirtin veya",secondPoint:"İkinci noktayı belirtin",throughPoint:"Geçiş noktasını belirtin",angle:"Sonsuz doğru açısını girin",invalidDirection:"XLINE için geçersiz yön.",keywords:{hor:{display:"Yatay(Y)",local:"Yatay",global:"Hor"},ver:{display:"Dikey(D)",local:"Dikey",global:"Ver"},ang:{display:"Açı(A)",local:"Açı",global:"Ang"}}},ray:{startPoint:"Başlangıç noktasını belirtin",throughPoint:"Geçiş noktasını belirtin"},mline:{startPointWithOptions:"Başlangıç noktasını belirtin veya",nextPointWithOptions:"Sonraki noktayı belirtin veya",justificationPrompt:"Hizalama türünü girin",scalePrompt:"Çoklu çizgi ölçeğini belirtin",stylePrompt:"Çoklu çizgi stil adını girin veya liste için [?]",styleNotFound:"Çoklu çizgi stili bulunamadı",styleListHeader:"Yüklenen çoklu çizgi stilleri",styleListEmpty:"Mevcut çizimde yüklü çoklu çizgi stili yok.",keywords:{justification:{display:"Hizalama(H)",local:"Hizalama",global:"Justification"},scale:{display:"Ölçek(Ö)",local:"Ölçek",global:"Scale"},style:{display:"Stil(ST)",local:"Stil",global:"Style"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},top:{display:"Üst(Ü)",local:"Üst",global:"Top"},zero:{display:"Sıfır(S)",local:"Sıfır",global:"Zero"},bottom:{display:"Alt(A)",local:"Alt",global:"Bottom"}}},measureAngle:{vertex:"Köşe noktasını belirtin",arm1:"Birinci kol üzerindeki noktayı belirtin",arm2:"İkinci kol üzerindeki noktayı belirtin"},measureArc:{startPoint:"Yayın başlangıç noktasını belirtin",throughPoint:"Yay üzerinde bir nokta belirtin",endPoint:"Yayın bitiş noktasını belirtin",lockedEndPoint:"Yayın bitiş noktasını belirtin (Ctrl ile büyük/küçük yay arasında geçiş)",invalidPoints:"Üç nokta doğrusal ve bir yay tanımlamıyor."},measureArea:{firstPoint:"İlk noktayı belirtin",nextPoint:"Sonraki noktayı belirtin (bitirmek için Enter'a basın)"},measureDistance:{firstPoint:"İlk noktayı belirtin",secondPoint:"İkinci noktayı belirtin"},measureContinuous:{firstPoint:"İlk noktayı belirtin",nextPoint:"Sonraki noktayı belirtin (bitirmek için Enter'a basın)"},measurePoint:{point:"Noktayı belirtin"},measurement:{import:{chooseFile:"Bir ölçüm sidecar JSON dosyası seçin"}},markup:{author:"İnceleme yazarını belirtin (sonraki kullanımlar için kaydedilir)",text:{point:"Metin işaretinin noktasını belirtin",content:"İşaret metnini girin"},line:{firstPoint:"Çizgi işaretinin ilk noktasını belirtin",secondPoint:"Çizgi işaretinin ikinci noktasını belirtin"},arrow:{firstPoint:"Okun başlangıç noktasını belirtin",secondPoint:"Ok ucunu belirtin"},cloud:{firstCorner:"Bulutun ilk köşesini belirtin",secondCorner:"Bulutun karşı köşesini belirtin"},rect:{firstCorner:"Dikdörtgenin ilk köşesini belirtin",secondCorner:"Dikdörtgenin karşı köşesini belirtin"},circle:{center:"Dairenin merkezini belirtin",radius:"Dairenin yarıçapını belirtin"},shape:{calloutOn:"[Çağrı açık]",calloutOff:"[Çağrı kapalı]",calloutAnchor:"Çağrı metninin konumunu belirtin",keywords:{callout:{display:"Çağrı(C)",local:"Çağrı",global:"Callout"},noCallout:{display:"ÇağrıYok(N)",local:"ÇağrıYok",global:"NoCallout"}}},highlight:{firstCorner:"Vurgu dikdörtgeninin ilk köşesini belirtin",secondCorner:"Vurgu dikdörtgeninin karşı köşesini belirtin"},callout:{tip:"Lider ucunu veya çağrısı olmayan bulut/dikdörtgen/daire dış çerçevesini belirtin",anchor:"Çağrı metninin konumunu belirtin",content:"Çağrı metnini girin"},stamp:{kind:"Damga kimliğini girin [approved/rejected/revised/for-review/custom]",imageUrl:"Özel damga görüntüsü URL’sini girin (isteğe bağlı)",caption:"Damga açıklamasını girin (isteğe bağlı)",point:"Damga ekleme noktasını belirtin"},import:{chooseFile:"Bir işaret sidecar JSON dosyası seçin"}},move:{basePointOrDisplacement:"Temel noktayı belirtin veya",secondPointOrDisplacement:"İkinci noktayı belirtin veya",displacement:"Yer değiştirmeyi belirtin",keywords:{displacement:{display:"Yer değiştirme(Y)",local:"Yer değiştirme",global:"Displacement"}}},offset:{distance:"Öteleme mesafesini belirtin",selectObject:"Ötelenecek nesneyi seçin veya bitirmek için Enter'a basın",sidePoint:"Ötelenecek tarafta bir nokta belirtin",invalidDistance:"Öteleme mesafesi 0'dan büyük olmalıdır.",invalidSelection:"Seçilen nesne ötelenemez.",offsetFailed:"Belirtilen taraf için bir öteleme eğrisi oluşturulamadı."},mtext:{point:"Çok satırlı metin ekleme noktasını belirtin"},bmpout:{boundsFirstCorner:"Sınırların ilk köşesini belirtin",boundsSecondCorner:"Karşı köşeyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},jpgout:{boundsFirstCorner:"Sınırların ilk köşesini belirtin",boundsSecondCorner:"Karşı köşeyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},pngout:{boundsFirstCorner:"Sınırların ilk köşesini belirtin",boundsSecondCorner:"Karşı köşeyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},imageattach:{insertionPoint:"Ekleme noktasını belirtin:",scale:"Ölçek faktörünü belirtin:",rotation:"Döndürme açısını belirtin:",invalidScale:"Ölçek faktörü 0 dan büyük olmalıdır.",decodeFailed:"Seçilen görüntü dosyası okunamadı."},insert:{blockName:"Blok adını girin:",insertionPoint:"Ekleme noktasını belirtin:",scale:"Ölçek faktörünü belirtin:",rotation:"Döndürme açısını belirtin:",invalidScale:"Ölçek faktörü 0 dan büyük olmalıdır.",invalidBlockName:"Geçersiz blok adı.",blockNotFound:"Blok bulunamadı",xrefNotAllowed:"Harici referans -INSERT ile eklenemez."},xattach:{insertionPoint:"Ekleme noktasını belirtin:",scale:"Ölçek faktörünü belirtin:",rotation:"Döndürme açısını belirtin:",invalidScale:"Ölçek faktörü 0 dan büyük olmalıdır.",unsupportedFile:"Lütfen bir DWG veya DXF dosyası seçin.",loading:"Harici referans yükleniyor...",loadFailed:"Seçilen çizim dosyası okunamadı."},point:{point:"Bir nokta belirtin"},polygon:{numberOfSides:"Kenar sayısını girin",centerOrEdge:"Çokgenin merkezini belirtin veya",radiusOrType:"Seçenekleri girin",edgeStart:"Kenarın ilk uç noktasını belirtin",edgeEnd:"Kenarın ikinci uç noktasını belirtin",keywords:{edge:{display:"Kenar(K)",local:"Kenar",global:"Edge"},inscribed:{display:"Çembere iç teğet(İ)",local:"Çembere iç teğet",global:"Inscribed"},circumscribed:{display:"Çembere dış teğet(D)",local:"Çembere dış teğet",global:"Circumscribed"}},invalid:{sides:"Geçersiz kenar sayısı. 3 ile 1024 arasında bir tam sayı girin.",radius:"Geçersiz yarıçap. Yarıçap 0'dan büyük olmalıdır.",edge:"Geçersiz kenar. Kenar uzunluğu 0'dan büyük olmalıdır."}},polyline:{firstPoint:"İlk noktayı belirtin",nextPoint:"Sonraki noktayı belirtin (bitirmek için Enter'a basın)",nextPointWithOptions:"Sonraki noktayı belirtin veya",nextPointWithArcOptions:"Sonraki noktayı belirtin veya",keywords:{arc:{display:"Yay(Y)",local:"Yay",global:"Arc"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},line:{display:"Doğru(D)",local:"Doğru",global:"Line"},angle:{display:"Açı(A)",local:"Açı",global:"Angle"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},secondPoint:{display:"İkinci nokta(İ)",local:"İkinci nokta",global:"SecondPoint"},radius:{display:"Yarıçap(R)",local:"Yarıçap",global:"Radius"}},arcAngle:"Yay açısını belirtin",arcCenter:"Merkez noktasını belirtin",arcSecondPoint:"Yay üzerinde ikinci noktayı belirtin",arcEndPoint:"Yayın bitiş noktasını belirtin",arcRadius:"Yay yarıçapını belirtin"},rect:{firstPoint:"İlk köşe noktasını belirtin",nextPoint:"Diğer köşe noktasını belirtin",firstPointWithOptions:"İlk köşe noktasını belirtin veya",otherCornerWithOptions:"Diğer köşe noktasını belirtin veya",chamferFirst:"İlk pah mesafesini belirtin",chamferSecond:"İkinci pah mesafesini belirtin",filletRadius:"Yuvarlatma yarıçapını belirtin",segmentWidth:"Dikdörtgen çizgi genişliğini belirtin",elevationValue:"Kotu belirtin",thicknessValue:"Kalınlığı belirtin",rotationAngle:"Dikdörtgen döndürme açısını belirtin",dimensionLength:"Dikdörtgen uzunluğunu belirtin",dimensionWidth:"Dikdörtgen genişliğini belirtin",areaValue:"Dikdörtgen alanını belirtin",areaLengthOrWidth:"Dikdörtgen uzunluğunu belirtin",areaSpecifyWidth:"Dikdörtgen genişliğini belirtin",invalidPositive:"Geçersiz giriş. Lütfen 0'dan büyük bir değer girin.",invalidRect:"Dikdörtgen oluşturulamadı. Lütfen geçerli köşeler veya boyutlar belirtin.",thicknessNotSupported:"Dikdörtgen kalınlığı şu anda nesne verisine yazılmıyor. Kalınlık ayarı yok sayılıyor.",keywords:{chamfer:{display:"Pah(P)",local:"Pah",global:"Chamfer"},elevation:{display:"Kot(K)",local:"Kot",global:"Elevation"},fillet:{display:"Yuvarlatma(Y)",local:"Yuvarlatma",global:"Fillet"},thickness:{display:"Kalınlık(K)",local:"Kalınlık",global:"Thickness"},width:{display:"Genişlik(G)",local:"Genişlik",global:"Width"},area:{display:"Alan(A)",local:"Alan",global:"Area"},dimensions:{display:"Boyutlar(B)",local:"Boyutlar",global:"Dimensions"},rotation:{display:"Döndürme(D)",local:"Döndürme",global:"Rotation"},length:{display:"Uzunluk(U)",local:"Uzunluk",global:"Length"},rectWidth:{display:"Genişlik(G)",local:"Genişlik",global:"Width"}}},rotate:{basePoint:"Temel noktayı belirtin",rotationAngleOrOptions:"Döndürme açısını belirtin veya",referenceAngleOrPoints:"Referans açısını belirtin veya",firstReferencePoint:"Referans açısının ilk noktasını belirtin",secondReferencePoint:"İkinci noktayı belirtin",newAngle:"Yeni açıyı belirtin",keywords:{copy:{display:"Kopyala(K)",local:"Kopyala",global:"Copy"},reference:{display:"Referans(R)",local:"Referans",global:"Reference"},points:{display:"Noktalar(N)",local:"Noktalar",global:"Points"}},invalid:{referencePoints:"Geçersiz referans noktaları: noktalar farklı olmalıdır."}},revcloud:{firstCornerOrOptions:"İlk köşe noktasını belirtin veya",firstCorner:"İlk köşe noktasını belirtin",oppositeCorner:"Karşı köşeyi belirtin",startPoint:"Başlangıç noktasını belirtin",nextPoint:"Sonraki noktayı belirtin",nextPointOrUndo:"Sonraki noktayı belirtin veya",firstPoint:"İlk noktayı belirtin",guideCursor:"İmleci bulut yolu boyunca götürün (bitirmek için Enter)",arcLength:"Yay uzunluğunu belirtin",selectObject:"Nesne seçin",style:"Revizyon bulutu yay stilini girin",reverseDirection:"Yönü ters çevir",invalidArcLength:"Yay uzunluğu 0'dan büyük olmalıdır.",invalidObject:"Seçilen nesne revizyon bulutuna dönüştürülemez.",keywords:{arcLength:{display:"Yay uzunluğu(A)",local:"Yay uzunluğu",global:"ArcLength"},object:{display:"Nesne(O)",local:"Nesne",global:"Object"},rectangular:{display:"Dikdörtgen(R)",local:"Dikdörtgen",global:"Rectangular"},polygonal:{display:"Çokgen(P)",local:"Çokgen",global:"Polygonal"},freehand:{display:"Serbest(F)",local:"Serbest",global:"Freehand"},style:{display:"Stil(S)",local:"Stil",global:"Style"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},calligraphy:{display:"Kaligrafi(C)",local:"Kaligrafi",global:"Calligraphy"},undo:{display:"Geri al(U)",local:"Geri al",global:"Undo"},yes:{display:"Evet(Y)",local:"Evet",global:"Yes"},no:{display:"Hayır(N)",local:"Hayır",global:"No"}}},sketch:{specifySketch:"Eskizi belirtin veya",sketching:"Eskiz için işaretçiyi hareket ettirin (durdurmak için tıklayın veya Enter)",type:"Eskiz türünü girin",increment:"Eskiz artışını belirtin",tolerance:"Spline toleransını belirtin",firstPoint:"İlk noktayı belirtin",nextPoint:"Bitiş noktasını belirtin",keywords:{type:{display:"Tür(T)",local:"Tür",global:"Type"},increment:{display:"Artış(I)",local:"Artış",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"Çizgiler(L)",local:"Çizgiler",global:"Lines"},polyline:{display:"Çoklu çizgi(P)",local:"Çoklu çizgi",global:"Polyline"},spline:{display:"Spline(S)",local:"Spline",global:"Spline"}}},spline:{firstPoint:"İlk noktayı belirtin",nextPoint:"Sonraki noktayı belirtin (bitirmek için Enter'a basın)",firstPointWithOptions:"İlk noktayı belirtin veya",nextPointWithFitOptions:"Sonraki noktayı belirtin veya",nextPointWithCvOptions:"Sonraki kontrol noktasını belirtin veya",methodPrompt:"Spline oluşturma yöntemini girin",knotsPrompt:"Düğüm parametrelemesini girin",degreePrompt:"Spline derecesini belirtin",keywords:{method:{display:"Yöntem(Y)",local:"Yöntem",global:"Method"},fit:{display:"Uydur(U)",local:"Uydur",global:"Fit"},cv:{display:"KN(K)",local:"KN",global:"CV"},knots:{display:"Düğümler(D)",local:"Düğümler",global:"Knots"},degree:{display:"Derece(D)",local:"Derece",global:"Degree"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},chord:{display:"Kiriş(K)",local:"Kiriş",global:"Chord"},sqrtChord:{display:"Karekök kiriş(K)",local:"Karekök kiriş",global:"SqrtChord"},uniform:{display:"Düzgün(D)",local:"Düzgün",global:"Uniform"}}},sysvar:{prompt:"Lütfen yeni değeri girin"},zoom:{mainPrompt:"Pencerenin köşesini belirtin veya",firstCorner:"İlk köşeyi belirtin",secondCorner:"Karşı köşeyi belirtin",centerPoint:"Merkez noktasını belirtin",heightOrScale:"Yükseklik veya ölçek faktörünü girin (nX veya nXP)",scaleFactor:"Ölçek faktörünü girin (nX veya nXP)",keywords:{all:{display:"Tümü(T)",local:"Tümü",global:"All"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},previous:{display:"Önceki(Ö)",local:"Önceki",global:"Previous"},original:{display:"Orijinal(O)",local:"Orijinal",global:"Original"},saved:{display:"Kayıtlı(V)",local:"Kayıtlı",global:"Saved"},smart:{display:"Akıllı(I)",local:"Akıllı",global:"Smart"},scale:{display:"Ölçek(Ö)",local:"Ölçek",global:"Scale"},window:{display:"Pencere(P)",local:"Pencere",global:"Window"}}},chtml:{exportFormat:"Dışa aktarma biçimi",exportInvisibleLayers:"Görünmez katmanları dışa aktar",exportLayouts:"Yerleşimleri dışa aktar",initialView:"HTML açılırken başlangıç görünümü",viewerMode:"Çevrimdışı görüntüleyici modu",chunkSizeMiB:"Parça boyutu (MiB, çok dosyalı paket)",compressChunks:"Parçaları sıkıştır (çok dosyalı paket)",keywords:{single:{display:"Tek dosya(S)",local:"Tek dosya",global:"Single"},multi:{display:"Çok dosyalı paket(M)",local:"Çok dosyalı paket",global:"Multi"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hayır(H)",local:"Hayır",global:"No"},extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},current:{display:"Geçerli(G)",local:"Geçerli",global:"Current"},view:{display:"Görünüm(G)",local:"Görünüm",global:"View"},measure:{display:"Ölçüm ve İnceleme(Ö)",local:"Ölçüm ve İnceleme",global:"Measure"}}},cpdf:{modelSpaceFit:"Model alanı çerçevesi",exportLayouts:"Yerleşimleri dışa aktar",textMode:"Metin işleme",keywords:{extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},display:{display:"Görüntü(G)",local:"Görüntü",global:"Display"},text:{display:"Metin(M)",local:"Metin",global:"Text"},vector:{display:"Vektör(V)",local:"Vektör",global:"Vector"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hayır(H)",local:"Hayır",global:"No"}}}},ES={document:{untitled:"Adsız"},commandLine:{noLast:"(önceki komut yok)",unknownCommand:"Bilinmeyen komut",executed:"Komut çalıştırıldı",showHistory:"Komut geçmişini göster",placeholder:"Komut girin",showMessages:"Mesaj geçmişini göster",canceled:"*İptal edildi*",noHistory:"(geçmiş yok)",invalidInput:"Geçersiz giriş.",close:"Komut satırını kapat"},mobileCommand:{length:"Uzunluk",angle:"Açı",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Onayla",cancel:"İptal",help:"Yardım",back:"Geri",collapse:"Daralt",expand:"Genişlet"},inputManager:{firstCorner:"İlk köşeyi belirtin veya",secondCorner:"İkinci köşeyi belirtin veya"},message:{onLockedLayer:"kilitli katmandaydı.",fetchingDrawingFile:"Dosya alınıyor ...",exportingDxf:"DXF dışa aktarılıyor ...",exportingPdf:"PDF dışa aktarılıyor ...",exportingSvg:"SVG dışa aktarılıyor ...",calculatingSmartExtents:"Akıllı sınırlar hesaplanıyor ...",importingPdf:"PDF içe aktarılıyor ...",exportingEntityPreview:"Görüntü dışa aktarılıyor ...",collectingMemoryProfile:"Bellek analiz ediliyor ...",fontCached:"Yazı tipi başarıyla önbelleğe alındı",fontCacheFailed:"Yazı tipi önbelleğe alınamadı",fontsNotFound:"Yazı tipi deposunda bulunamadı: {fonts}.",fontsNotLoaded:"Yazı tipleri yüklenemedi: {fonts}.",fontMissedInDrawing:'"{font}" yazı tipi {count} metin nesnesi tarafından gerekli, ancak kullanılamıyor. "{replacementFont}" ile gösteriliyor.',fontMissedReplacement:'"{font}" ("{replacement}" ile gösteriliyor)',failedToGetAvaiableFonts:'"{url}" adresinden yazı tipleri alınamadı!',failedToOpenFile:'"{fileName}" dosyası açılamadı!',failedToOpenFileToast:'"{fileName}" açılamadı. Ayrıntılar için bildirim merkezine bakın.',failedToOpenFileWorkerOom:'"{fileName}" açılamadı. Ayrıştırma, yetersiz bellek nedeniyle başarısız oldu (LibreDWG parser). Büyük çizimleri çökmeden açmak için ticari DWG parser satın almak üzere {dwgParserLink} bağlantısına tıklayabilirsiniz.',failedToOpenFileWorkerOomLink:"bu sayfa",failedToOpenFileWorkerTimeout:'"{fileName}" açılamadı. Çizim ayrıştırılırken işlem zaman aşımına uğradı.',failedToOpenFileFontLoadFailed:'"{fileName}" açılamadı. Gerekli yazı tipleri yüklenemedi.',failedToOpenFileLicenseExpired:'"{fileName}" açılamadı. DWG dönüştürücü lisansı süresi dolmuş.',failedToOpenFileLicenseInvalid:'"{fileName}" açılamadı. DWG dönüştürücü lisansı eksik veya geçersiz.',unknownEntities:"Bu çizim {count} bilinmeyen veya desteklenmeyen varlık içeriyor! Bu varlıklar gösterilmeyecek.",tianzhengEntities:"Bu çizim TArch / Tianzheng (veya benzeri üçüncü taraf) özel varlıklar içeriyor (yaklaşık {count}). Bu ortamda tam olarak ayrıştırılamazlar, bu nedenle bazı içerikler görüntülenmeyebilir.",emptyProxyEntities:"Bu çizim proxy grafiği olmayan {count} özel varlık içeriyor! Bu varlıklar gösterilmeyecek."},notification:{center:{title:"Bildirimler",clearAll:"Tümünü Temizle",noNotifications:"Bildirim yok"},group:{fontMissed:"Eksik Yazı Tipleri",fontMissedSummary:"{count} yazı tipi ile ilgili mesaj. Ayrıntılar için tıklayın.",unsupportedEntities:"Desteklenmeyen Varlıklar",unsupportedEntitiesSummary:"{count} ayrıştırma ile ilgili mesaj. Ayrıntılar için tıklayın.",genericSummary:"{count} mesaj. Ayrıntılar için tıklayın."},title:{failedToOpenFile:"Dosya Açılamadı",failedToOpenFileWorkerOom:"Yetersiz Bellek",failedToOpenFileWorkerTimeout:"Açma Zaman Aşımı",failedToOpenFileFontLoadFailed:"Yazı Tipi Yüklenemedi",failedToOpenFileLicenseExpired:"Lisans Süresi Doldu",failedToOpenFileLicenseInvalid:"Geçersiz Lisans",fontNotFound:"Yazı Tipi Bulunamadı",fontNotLoaded:"Yazı Tipi Yüklenemedi",parsingWarning:"Çizim Ayrıştırma Sorunları",systemMessage:"Sistem Mesajı",systemWarning:"Sistem Uyarısı",systemError:"Sistem Hatası",systemInfo:"Sistem Bilgisi"}},progress:{start:"Dosya ayrıştırma başlatılıyor ...",parse:"Dosya ayrıştırılıyor ...",font:"Bu çizim için gerekli yazı tipleri indiriliyor ...",ltype:"Çizgi tipleri ayrıştırılıyor ...",style:"Metin stilleri ayrıştırılıyor ...",dimstyle:"Ölçülendirme stilleri ayrıştırılıyor ...",layer:"Katmanlar ayrıştırılıyor ...",vport:"Görüntü portları ayrıştırılıyor ...",blockrecord:"Blok kaydı ayrıştırılıyor ...",header:"Başlık ayrıştırılıyor ...",block:"Bloklar ayrıştırılıyor ...",entity:"Nesneler ayrıştırılıyor ...",object:"Adlandırılmış sözlükler ayrıştırılıyor ...",rendering:"Çizim render ediliyor ...",end:"Tamamlandı!"},about:{title:"Hakkında",close:"Kapat",product:"CAD Viewer",tagline:"DWG ve DXF çizimleri için yüksek performanslı web CAD görüntüleyici.",website:"Web sitesi",docs:"Belgeler",repository:"GitHub",copyright:"© {year} mlightcad. Tüm hakları saklıdır.",ok:"Tamam"},drawStyle:{color:"Renk",fontSize:"Yazı yüksekliği"},shortCutToolbar:{more:"Daha fazla",undo:"Geri al",redo:"Yinele",erase:"Sil",collapse:"Araç çubuğunu daralt",expand:"Araç çubuğunu genişlet"},textHeight:{title:"Yazı Yüksekliği",close:"Kapat",ok:"Tamam",cancel:"İptal",adaptive:"Ekrana uyarla",custom:"Özel yazı yüksekliği",customPlaceholder:"Dünya yüksekliği",fromScreen:"Ekran boyutundan",fromScreenHint:"Geçerli yakınlaştırmada ekranda istediğiniz yazı boyutunu girin. Sabit bir dünya yüksekliğine dönüştürülür; sonra yakınlaştırınca bu yükseklik değişmez.",screenPxPlaceholder:"Yazı boyutu",screenUnit:"px",convert:"Dönüştür"},entityPick:{cancel:"Seçimi iptal et"},colorPicker:{title:"Renk Seç",close:"Kapat",ok:"Tamam",cancel:"İptal",index:"Renk İndeksi: ",rgb:"RGB: ",input:"Renk",inputPlaceholder:"1-255 veya #RRGGBB"},touchPointTutorial:{title:"Noktalar nasıl hassas seçilir?",description:"Ekranda yaklaşık 0,5 saniye basılı tutun. Parmağınızın üstünde bir artı belirir ve hareket ederken geometriye yapışarak daha doğru seçim yapmanızı sağlar.",snoozeToday:"Bugün tekrar hatırlatma",hideForever:"Bir daha hatırlatma",ok:"Anladım"},dataSource:{open:"Aç",local:"Yerel dosya",url:"URL'den",openFrom:"{name} konumundan aç",signInTo:"{name} oturumu aç",signOutOf:"{name} oturumunu kapat",signOutOfAccount:"{name} oturumunu kapat ({account})",urlDialogTitle:"URL'den aç",urlDialogHint:".dwg veya .dxf dosyasının URL'sini girin.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"İptal",onedrive:"OneDrive",googledrive:"Google Drive",or:"veya",dropFile:"Dosyayı buraya bırakın veya",browse:"göz atın",dropOrBrowse:"DWG veya DXF dosyasını buraya bırakın veya göz atın",newDrawing:"Yeni çizim",source:"Kaynak",unavailable:"Bu kaynak henüz kullanılamıyor.",selectFile:"Dosya seç",signInRequired:"Dosya seçmek için önce oturum açın.",downloading:"Dosya indiriliyor ..."}},LS={ACAD:{"-hatch":{description:"通过命令行选项创建填充,不显示 Ribbon 界面"},"-layer":{description:"通过命令行选项管理图层"},about:{description:"显示 mlightcad 产品信息"},acadver:{description:"存储图形数据库版本标识符(只读)"},annoallvisible:{description:"控制不支持当前注释比例的注释性对象是否显示"},angbase:{description:"设置当前 UCS 中 0 度的基准角方向"},angdir:{description:"设置正角度的方向为顺时针或逆时针"},arc:{description:"创建圆弧"},aunits:{description:"设置角度显示格式"},auprec:{description:"设置角度显示精度(小数位数),与 AUNITS 配合使用"},bmpout:{description:"导出为 BMP 图片"},cannoscale:{description:"设置当前注释比例名称"},cdxf:{description:"导出当前图纸为DXF格式"},cpdf:{description:"导出当前图纸为PDF格式"},"-cpdf":{description:"使用命令行选项将当前图纸导出为PDF"},cecolor:{description:"设置新创建对象的当前默认颜色"},celtscale:{description:"控制新创建对象的线型比例系数"},celtype:{description:"设置新创建对象的线型"},celweight:{description:"设置新创建对象的默认线宽"},cetransparency:{description:"设置新创建对象的透明度"},cachefont:{description:"将本地字体文件缓存到 IndexedDB 以供文字渲染使用"},circle:{description:"使用圆心和半径创建圆"},clayer:{description:"设置新建对象和编辑操作所使用的当前图层"},cmleaderstyle:{description:"设置当前多重引线样式名称"},cmlscale:{description:"控制多线的整体宽度"},cmlstyle:{description:"设置当前多线样式名称"},colortheme:{description:"控制用户界面的颜色主题(深色或浅色)"},copy:{description:"通过克隆将所选图元复制到新位置",prompt:"选择对象"},csvg:{description:"转换当前图纸为SVG格式"},chtml:{description:"将当前图纸导出为可离线打开的 HTML 文件"},"-chtml":{description:"通过命令行选项将当前图纸导出为 HTML 文件"},dimlinear:{description:"创建线性尺寸标注"},dimaligned:{description:"创建对齐线性尺寸标注"},dimradius:{description:"为圆和圆弧创建半径尺寸标注"},dimdiameter:{description:"为圆和圆弧创建直径尺寸标注"},dimangular:{description:"创建角度尺寸标注"},dimarc:{description:"创建弧长标注"},dimordinate:{description:"创建坐标标注"},dimcontinue:{description:"创建连续标注"},dimbaseline:{description:"创建基线标注"},dimstyle:{description:"设置当前标注样式的名称"},dwgname:{description:"存储当前图形文件的名称(只读)"},loginname:{description:"显示当前用户的登录名(只读)"},dynmode:{description:"控制光标处的动态输入设置"},dynprompt:{description:"控制动态输入工具提示中提示的显示"},ellipse:{description:"通过轴端点或中心点创建椭圆或椭圆弧"},erase:{description:"从图纸中删除所选对象",prompt:"选择对象"},extmax:{description:"存储模型空间图形范围的右上角(只读)"},extmin:{description:"存储模型空间图形范围的左下角(只读)"},entout:{description:"导出所选对象的合并预览图",prompt:"选择对象"},hideobjects:{description:"临时隐藏所选对象的显示",prompt:"选择对象"},imageattach:{description:"将光栅图像作为外部参照附着到当前图形"},"-insert":{description:"将块定义插入到当前图形(命令行)"},xattach:{description:"将 DWG 或 DXF 图形作为外部参照附着到当前图形"},gripcolor:{description:"设置所选对象上未选中夹点的颜色"},griphot:{description:"设置所选(热)夹点的颜色"},gripobjlimit:{description:"当选择集中的对象数超过指定值时不显示夹点(0 表示无限制)"},grips:{description:"控制是否在所选对象上显示夹点"},gripsize:{description:"设置夹点框的大小(像素)"},hatch:{description:"用填充图案填充封闭区域或所选对象"},ipdf:{description:"从 PDF 文件导入矢量几何"},hpang:{description:"设置新创建填充图案的默认角度(弧度)"},hpassoc:{description:"控制新创建的填充是否具有关联性"},hpbackgroundcolor:{description:"设置新创建填充图案的默认背景颜色"},hpcolor:{description:"设置新创建填充的默认颜色"},hpdouble:{description:"控制用户定义的填充图案是否加倍"},hpislanddetection:{description:"控制新创建填充边界内孤岛的处理方式"},hplayer:{description:"设置新创建填充和填充区域的默认图层"},hpname:{description:"设置当前会话中新创建填充的默认图案名称"},hpscale:{description:"设置新创建填充图案的默认比例系数"},hpseparate:{description:"控制为多个边界创建单个还是独立的填充对象"},hptransparency:{description:"设置新创建填充和填充区域的默认透明度"},insunits:{description:"指定插入块、图像或外部参照时用于自动缩放的图形单位"},jpgout:{description:"导出为 JPEG 图片"},laycur:{description:"将所选对象的图层属性更改为当前图层",prompt:"选择要更改到当前图层的对象"},laydel:{description:"删除图层及该图层上的所有对象"},layerclose:{description:"关闭图层属性管理器"},layerp:{description:"撤销对图层设置的最后一次更改或一组更改"},layfrz:{description:"冻结所选对象所在的图层",prompt:"选择要冻结其图层的对象"},layiso:{description:"隔离所选对象所在的图层",prompt:"选择要隔离其图层的对象"},laylck:{description:"锁定所选对象所在的图层",prompt:"选择要锁定其图层的对象"},layoff:{description:"关闭所选对象所在的图层",prompt:"选择要关闭其图层的对象"},layon:{description:"打开图纸中的所有图层"},laythw:{description:"解冻图纸中的所有冻结图层"},layulk:{description:"解锁所选对象所在的图层",prompt:"选择要解锁其图层的对象"},layuniso:{description:"恢复由 LAYISO 隐藏或锁定的图层"},line:{description:"在指定点之间绘制直线段"},log:{description:"在控制台输出调试信息"},ltscale:{description:"设置图形的全局线型比例系数"},lunits:{description:"设置坐标和距离的显示格式"},luprec:{description:"设置线性单位的显示精度(小数位数),与 LUNITS 配合使用"},lwdisplay:{description:"用于控制是否在图纸中显示线宽效果"},clearmeasurements:{description:"清除当前布局上的所有测量标注"},measurementvis:{description:"显示或隐藏当前布局上的测量标注"},measurementpanel:{description:"打开测量面板"},measurementexport:{description:"将测量标注导出为 sidecar JSON 文件"},measurementimport:{description:"从 sidecar JSON 文件导入测量标注"},measurearea:{description:"计算所选对象或点定义区域的面积和周长"},measureangle:{description:"测量两条线或三个点之间的夹角"},measurearc:{description:"测量圆弧段的弧长"},measuredistance:{description:"测量两点之间的距离及坐标增量"},measurecontinuous:{description:"连续拾取多个点测量各段距离,直到按 Enter 或取消"},measurepoint:{description:"测量拾取点的 X/Y 坐标"},measurement:{description:"设置图形使用英制或公制单位"},measurementcolor:{description:"设置测量标注覆盖图形使用的颜色"},modelbkcolor:{description:"设置模型空间绘图区域的背景颜色"},mline:{description:"创建由多条平行线组成的多线对象"},move:{description:"通过位移向量移动所选图元",prompt:"选择对象"},objectscale:{description:"为选定的注释性对象添加或删除支持的注释比例",prompt:"选择注释性对象"},offset:{description:"按指定距离创建平行曲线、多段线或圆"},mtext:{description:"创建多行文本"},open:{description:"打开图纸"},openprof:{description:"控制是否在控制台记录文件打开阶段的耗时分析"},openperf:{description:"打开“打开性能”面板,显示最近一次打开图纸的关键耗时"},orthomode:{description:"将光标移动限制为水平或垂直方向"},osmode:{description:"使用位码设置运行中的对象捕捉模式"},pan:{description:"平移视图"},paperbkcolor:{description:"设置图纸空间(布局)绘图区域的背景颜色"},pdmode:{description:"控制点对象的显示样式"},pdsize:{description:"设置点对象的显示大小"},pickbox:{description:"控制用于选择对象的拾取框大小(像素)"},pline:{description:"通过指定多个点创建多段线"},pngout:{description:"导出为 PNG 图片"},point:{description:"连续创建点"},polaraddang:{description:"以分号分隔的列表存储附加极轴追踪角度"},polarang:{description:"设置极轴追踪的极轴角增量"},polarmode:{description:"控制极轴追踪和对象捕捉追踪设置"},polygon:{description:"通过中心和半径或指定一条边创建正多边形"},qnew:{description:"创建新图纸"},close:{description:"关闭当前图纸"},ray:{description:"创建从起点向单一方向无限延伸的射线"},rectang:{description:"通过指定两个对角点创建矩形"},regen:{description:"重绘图纸"},revcloud:{description:"创建或修改修订云线"},markuptext:{description:"放置文字批注"},markupline:{description:"创建直线批注"},markuparrow:{description:"创建箭头批注"},markupcloud:{description:"创建修订云线批注"},markuprect:{description:"创建矩形批注"},markupcircle:{description:"创建圆形批注"},markuphighlight:{description:"创建高亮矩形批注"},markupcallout:{description:"创建标注:先指定引线尖端,再放置文字框,最后输入文字"},markupstamp:{description:"放置图章或自定义符号"},markupvis:{description:"显示或隐藏批注"},clearmarkups:{description:"清除当前布局上的所有批注"},markupexport:{description:"将批注导出为 sidecar JSON 文件"},markupimport:{description:"从 sidecar JSON 文件导入批注"},markuppanel:{description:"打开批注面板"},rotate:{description:"绕基点旋转所选图元",prompt:"选择对象"},select:{description:"选择图元"},shortcutmenu:{description:"控制图形区域中快捷菜单的可用性"},sketch:{description:"创建一系列徒手线段"},spline:{description:"通过指定控制点创建平滑的样条曲线"},textstyle:{description:"设置当前文字样式的名称"},unitmode:{description:"当 LUNITS 为建筑或分数格式时,控制坐标的分数显示格式"},switchbg:{description:"切换绘图区域背景颜色,在白色和黑色背景之间切换"},readingmode:{description:"切换阅读模式:白底黑线,便于阅读复杂图纸"},unisolateobjects:{description:"重新显示 HIDEOBJECTS 隐藏的所有对象"},undo:{description:"撤销上一次数据库编辑操作",nothingToUndo:"没有可撤销的操作。"},redo:{description:"重做上一次撤销的操作",nothingToRedo:"没有可重做的操作。"},xline:{description:"创建在两个方向上无限延伸的构造线"},zoom:{description:"缩放以显示所有对象"}},USER:{}},TS={arc:{startPointOrCenter:"指定圆弧的起点或",secondPointOrOptions:"指定圆弧上的第二点或",secondPoint:"指定圆弧上的第二点",startPoint:"指定圆弧的起点",centerPoint:"指定圆弧的圆心",endPoint:"指定圆弧的端点",endPointOrOptions:"指定圆弧的端点或",centerPointOrOptions:"指定圆弧的圆心或",includedAngle:"指定圆弧的夹角",chordLength:"指定圆弧的弦长",tangentDirection:"指定圆弧起点的切线方向",radius:"指定圆弧的半径",keywords:{center:{display:"圆心(C)",local:"圆心",global:"Center"},end:{display:"端点(E)",local:"端点",global:"End"},angle:{display:"角度(A)",local:"角度",global:"Angle"},chordLength:{display:"弦长(L)",local:"弦长",global:"ChordLength"},direction:{display:"方向(D)",local:"方向",global:"Direction"},radius:{display:"半径(R)",local:"半径",global:"Radius"}},invalid:{threePoint:"三点圆弧无效:三点共线或无法确定圆弧。",center:"圆心输入无效:起点与终点必须在同一圆上。",angle:"角度输入无效:夹角必须大于 0 且小于 360 度。",chordLength:"弦长输入无效:该值超出当前半径可用范围。",direction:"方向输入无效:无法根据该切线方向构造圆弧。",radius:"半径输入无效:指定半径无法连接起点与终点。"}},circle:{center:"指定圆的圆心",centerOrOptions:"指定圆的圆心或",radius:"指定圆的半径",radiusOrDiameter:"指定圆的半径或",diameter:"指定圆的直径",twoPointFirst:"指定圆直径的第一个端点",twoPointSecond:"指定圆直径的第二个端点",threePointFirst:"指定圆上的第一个点",threePointSecond:"指定圆上的第二个点",threePointThird:"指定圆上的第三个点",keywords:{threeP:{display:"三点(3P)",local:"三点",global:"3P"},twoP:{display:"两点(2P)",local:"两点",global:"2P"},diameter:{display:"直径(D)",local:"直径",global:"Diameter"}}},copy:{basePointOrOptions:"指定基点或",displacementOrArray:"指定位移或",secondPointOrArray:"指定第二个点或",modePrompt:"输入复制模式选项",arrayItemCount:"输入阵列中的项目数(包括原对象)",arraySecondPointOrFit:"指定第二个点或",arrayFitSecondPoint:"指定第二个点",keywords:{displacement:{display:"位移(D)",local:"位移",global:"Displacement"},mode:{display:"模式(O)",local:"模式",global:"Mode"},multiple:{display:"多个(M)",local:"多个",global:"Multiple"},single:{display:"单个(S)",local:"单个",global:"Single"},array:{display:"阵列(A)",local:"阵列",global:"Array"},fit:{display:"布满(F)",local:"布满",global:"Fit"}}},dimlinear:{xLine1Point:"指定第一条尺寸界线原点或 <选择对象>",xLine2Point:"指定第二条尺寸界线原点",dimLinePoint:"指定尺寸线位置",selectObject:"选择要标注的对象",rejectObject:"无法使用 DIMLINEAR 标注该对象。",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",rotationAngle:"指定尺寸线角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"},horizontal:{display:"水平(H)",local:"水平",global:"Horizontal"},vertical:{display:"垂直(V)",local:"垂直",global:"Vertical"},rotated:{display:"旋转(R)",local:"旋转",global:"Rotated"}}},dimaligned:{xLine1Point:"指定第一条尺寸界线原点或 <选择对象>",xLine2Point:"指定第二条尺寸界线原点",dimLinePoint:"指定尺寸线位置",selectObject:"选择要标注的对象",rejectObject:"无法使用 DIMALIGNED 标注该对象。",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimradius:{selectObject:"选择圆弧或圆",rejectObject:"必须选择圆弧或圆。",dimLinePoint:"指定尺寸线位置",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimdiameter:{selectObject:"选择圆弧或圆",rejectObject:"必须选择圆弧或圆。",dimLinePoint:"指定尺寸线位置",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimangular:{vertexOrSelect:"指定角的顶点或 <选择直线>",xLine1Point:"指定第一个角度端点",xLine2Point:"指定第二个角度端点",arcPoint:"指定标注弧线位置",selectFirstLine:"选择第一条直线",selectSecondLine:"选择第二条直线",rejectObject:"必须选择直线。",linesParallel:"两条直线平行,无法求交点。",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimarc:{selectArc:"选择圆弧",rejectObject:"必须选择圆弧。",arcPoint:"指定弧长标注位置",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimordinate:{featurePoint:"指定特征位置",leaderEndpoint:"指定引线端点",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"},xdatum:{display:"X基准(X)",local:"X基准",global:"Xdatum"},ydatum:{display:"Y基准(Y)",local:"Y基准",global:"Ydatum"}}},dimcontinue:{nextPoint:"指定第二条尺寸界线原点或",selectDimension:"选择连续标注",rejectObject:"必须选择线性或角度标注。",keywords:{select:{display:"选择(S)",local:"选择",global:"Select"}}},dimbaseline:{nextPoint:"指定第二条尺寸界线原点或",selectDimension:"选择基准标注",rejectObject:"必须选择线性或角度标注。",keywords:{select:{display:"选择(S)",local:"选择",global:"Select"}}},ellipse:{axisEndpointOrOptions:"指定椭圆的轴端点或",arcAxisEndpointOrCenter:"指定椭圆弧的轴端点或",center:"指定椭圆中心点",firstAxisEndpoint:"指定轴的端点",secondAxisEndpoint:"指定轴的另一个端点",otherAxisOrRotation:"指定到另一轴的距离或",rotationAngle:"指定绕长轴的旋转角度",arcStartAngle:"指定椭圆弧起始角",arcEndAngle:"指定椭圆弧终止角",keywords:{arc:{display:"圆弧(A)",local:"圆弧",global:"Arc"},center:{display:"中心点(C)",local:"中心点",global:"Center"},rotation:{display:"旋转(R)",local:"旋转",global:"Rotation"}},invalid:{axis:"轴输入无效:轴长必须大于 0。",otherAxis:"另一轴输入无效:距离必须大于 0。",rotation:"旋转输入无效:计算得到的短轴必须大于 0。"}},hatch:{prompt:"选择边界对象或",pickPoint:"指定内部点(或按 Enter 结束)",select:"选择要填充的对象",patternName:"输入填充图案名称",scale:"指定填充图案比例",angle:"指定填充图案角度",style:"输入填充样式",associative:"指定关联性",invalidBoundary:"所选对象无法构成闭合边界。",keywords:{pick:{display:"拾取点(P)",local:"拾取点",global:"PickPoints"},select:{display:"选择对象(S)",local:"选择对象",global:"SelectObjects"},cancel:{display:"放弃(C)",local:"放弃",global:"Cancel"},pattern:{display:"图案(P)",local:"图案",global:"Pattern"},scale:{display:"比例(S)",local:"比例",global:"Scale"},angle:{display:"角度(A)",local:"角度",global:"Angle"},style:{display:"样式(T)",local:"样式",global:"HatchStyle"},associative:{display:"关联(AS)",local:"关联",global:"AssociativeMode"},normal:{display:"普通(N)",local:"普通",global:"Normal"},outer:{display:"外部(O)",local:"外部",global:"Outer"},ignore:{display:"忽略(I)",local:"忽略",global:"Ignore"},yes:{display:"是(Y)",local:"是",global:"Yes"},no:{display:"否(N)",local:"否",global:"No"}}},hideobjects:{hidden:"个对象已隐藏",restored:"个对象已恢复显示",nothingToRestore:"没有可恢复显示的对象"},entout:{longSidePrompt:"输入预览图长边像素尺寸",exported:"个对象预览已导出",skipped:"个对象已跳过",failed:{"no-preview-root":"无法为所选对象构建预览几何","no-bounds":"无法计算所选对象的预览范围","capture-failed":"无法渲染实体预览图","download-failed":"预览已渲染,但 PNG 下载失败"}},layer:{main:"输入选项",listSummary:"图层列表已输出到浏览器控制台",emptyInput:"未输入图层名。",newPrompt:"输入新建图层名称(可用逗号分隔多个)",makePrompt:"输入要创建并设为当前的图层名",setPrompt:"输入要设为当前的图层名",onPrompt:"输入要打开的图层名",offPrompt:"输入要关闭的图层名",freezePrompt:"输入要冻结的图层名",thawPrompt:"输入要解冻的图层名",lockPrompt:"输入要锁定的图层名",unlockPrompt:"输入要解锁的图层名",colorLayerPrompt:"输入要修改颜色的图层名",colorValuePrompt:"输入颜色(ACI 1-255、RGB 如 255,0,0 或颜色名)",invalidColor:"颜色输入无效。",descriptionLayerPrompt:"输入要修改说明的图层名",descriptionValuePrompt:"输入新的图层说明",created:"已创建图层数量",alreadyExists:"图层已存在",notFound:"未找到图层",cannotChangeCurrent:"不能关闭或冻结当前图层。",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"创建并置为当前(M)",local:"创建并置为当前",global:"Make"},set:{display:"置为当前(S)",local:"置为当前",global:"Set"},new:{display:"新建(N)",local:"新建",global:"New"},on:{display:"打开(ON)",local:"打开",global:"On"},off:{display:"关闭(OF)",local:"关闭",global:"Off"},color:{display:"颜色(C)",local:"颜色",global:"Color"},freeze:{display:"冻结(F)",local:"冻结",global:"Freeze"},thaw:{display:"解冻(T)",local:"解冻",global:"Thaw"},lock:{display:"锁定(L)",local:"锁定",global:"Lock"},unlock:{display:"解锁(U)",local:"解锁",global:"Unlock"},description:{display:"说明(D)",local:"说明",global:"Description"}}},layon:{alreadyOn:"所有图层都已经打开。",turnedOn:"已打开图层数量"},laycur:{prompt:"选择要更改到当前图层的对象",currentLayerNotFound:"未找到当前图层。",noObjects:"没有选择有效对象。",alreadyCurrent:"所选对象已位于当前图层。",changed:"已将对象更改到当前图层"},layfrz:{prompt:"选择要冻结其图层的对象或",invalidSelection:"所选对象无效。",settingsPrompt:"输入要修改的 LAYFRZ 设置",viewportPrompt:"指定视口冻结行为",blockSelectionPrompt:"指定嵌套块选择行为",vpfreezeFallback:"当前 viewer 不支持按视口冻结图层,已退化为普通 Freeze 行为。",nestedSelectionLimited:"嵌套块选择设置会被保存,但当前拾取仍只能解析顶层对象所在图层。",layerNotFound:"未找到图层",cannotFreezeCurrent:"不能冻结当前图层。",alreadyFrozen:"图层已处于冻结状态",frozen:"已冻结图层",restored:"已恢复图层",nothingToUndo:"当前没有可撤销的 LAYFRZ 操作。",keywords:{settings:{display:"设置(S)",local:"设置",global:"Settings"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},viewports:{display:"视口(V)",local:"视口",global:"Viewports"},blockSelection:{display:"块选择(B)",local:"块选择",global:"BlockSelection"},freeze:{display:"冻结(F)",local:"冻结",global:"Freeze"},vpfreeze:{display:"视口冻结(V)",local:"视口冻结",global:"Vpfreeze"},block:{display:"块(B)",local:"块",global:"Block"},entity:{display:"对象(E)",local:"对象",global:"Entity"},none:{display:"无(N)",local:"无",global:"None"}}},layiso:{prompt:"选择要隔离其图层的对象或",settingsPrompt:"输入未隔离图层的处理设置",offModePrompt:"输入未隔离图层的关闭行为",noLayers:"未选择有效图层。",layerNotFound:"未找到图层",isolated:"已隔离图层",affectedLayers:"受影响图层数",vpfreezeFallback:"当前 viewer 不支持按视口冻结图层,已退化为普通 Off 行为。",lockFadeFallback:"当前 viewer 不支持图层淡显显示,未隔离图层将仅被锁定。",keywords:{settings:{display:"设置(S)",local:"设置",global:"Settings"},off:{display:"关闭(O)",local:"关闭",global:"Off"},lockAndFade:{display:"锁定并淡显(L)",local:"锁定并淡显",global:"LockAndFade"},vpfreeze:{display:"视口冻结(V)",local:"视口冻结",global:"Vpfreeze"}}},laythw:{alreadyThawed:"所有图层都已经解冻。",thawed:"已解冻图层数量"},layuniso:{noPrevious:"没有可恢复的上一次 LAYISO 图层状态。",layerNotFound:"未找到图层",nothingRestored:"没有恢复任何 LAYISO 图层改动。",restored:"已恢复图层数量"},laylck:{prompt:"选择要锁定其图层的对象",invalidSelection:"所选对象无效。",layerNotFound:"未找到图层",alreadyLocked:"图层已处于锁定状态",locked:"已锁定图层"},layulk:{prompt:"选择要解锁其图层的对象",invalidSelection:"所选对象无效。",layerNotFound:"未找到图层",alreadyUnlocked:"图层已处于解锁状态",unlocked:"已解锁图层"},layoff:{prompt:"选择要关闭其图层的对象或",invalidSelection:"所选对象无效。",settingsPrompt:"输入要修改的 LAYOFF 设置",viewportPrompt:"指定视口行为",blockSelectionPrompt:"指定嵌套块选择行为",vpfreezeFallback:"当前 viewer 不支持按视口关闭图层,已退化为普通 Off 行为。",nestedSelectionLimited:"嵌套块选择设置会被保存,但当前拾取仍只能解析顶层对象所在图层。",layerNotFound:"未找到图层",cannotTurnOffCurrent:"不能关闭当前图层。",alreadyOff:"图层已处于关闭状态",turnedOff:"已关闭图层",restored:"已恢复图层",nothingToUndo:"当前没有可撤销的 LAYOFF 操作。",keywords:{settings:{display:"设置(S)",local:"设置",global:"Settings"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},viewports:{display:"视口(V)",local:"视口",global:"Viewports"},blockSelection:{display:"块选择(B)",local:"块选择",global:"BlockSelection"},off:{display:"关闭(O)",local:"关闭",global:"Off"},vpfreeze:{display:"视口冻结(V)",local:"视口冻结",global:"Vpfreeze"},block:{display:"块(B)",local:"块",global:"Block"},entity:{display:"对象(E)",local:"对象",global:"Entity"},none:{display:"无(N)",local:"无",global:"None"}}},layerp:{restored:"恢复了之前的图层状态。",noPreviousState:"没有可恢复的先前图层状态。"},line:{firstPoint:"指定第一个点",firstPointOrContinue:"请指定第一个点或",nextPoint:"指定下一个点",nextPointWithOptions:"请指定下一个点或",keywords:{continue:{display:"继续(C)",local:"继续",global:"Continue"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},close:{display:"闭合(C)",local:"闭合",global:"Close"}}},xline:{firstPointOrOptions:"指定点或",secondPoint:"指定第二个点",throughPoint:"指定穿过点",angle:"输入构造线角度",invalidDirection:"XLINE 的方向无效。",keywords:{hor:{display:"水平(H)",local:"水平",global:"Hor"},ver:{display:"垂直(V)",local:"垂直",global:"Ver"},ang:{display:"角度(A)",local:"角度",global:"Ang"}}},ray:{startPoint:"指定起点",throughPoint:"指定通过点"},mline:{startPointWithOptions:"指定起点或",nextPointWithOptions:"指定下一点或",justificationPrompt:"输入对正方式",scalePrompt:"指定多线比例",stylePrompt:"输入多线样式名或 [?] 列出样式",styleNotFound:"未找到多线样式",styleListHeader:"已加载的多线样式",styleListEmpty:"当前图纸没有已加载的多线样式。",keywords:{justification:{display:"对正(J)",local:"对正",global:"Justification"},scale:{display:"比例(S)",local:"比例",global:"Scale"},style:{display:"样式(ST)",local:"样式",global:"Style"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},close:{display:"闭合(C)",local:"闭合",global:"Close"},top:{display:"上(T)",local:"上",global:"Top"},zero:{display:"零(Z)",local:"零",global:"Zero"},bottom:{display:"下(B)",local:"下",global:"Bottom"}}},measureArc:{startPoint:"指定弧的起点",throughPoint:"指定弧上的一个点",endPoint:"指定弧的终点",lockedEndPoint:"指定弧的终点(按 Ctrl 在大弧与小弧之间切换)",invalidPoints:"三点共线,无法测量弧长。"},measureAngle:{vertex:"指定顶点",arm1:"指定第一条边上的点",arm2:"指定第二条边上的点"},measureArea:{firstPoint:"指定第一个点",nextPoint:"指定下一个点(或按 Enter 完成)"},measureDistance:{firstPoint:"指定第一个点",secondPoint:"指定第二个点"},measureContinuous:{firstPoint:"指定第一个点",nextPoint:"指定下一个点(或按 Enter 完成)"},measurePoint:{point:"指定点"},measurement:{import:{chooseFile:"选择测量 sidecar JSON 文件"}},markup:{author:"指定批注作者(将保存供以后使用)",text:{point:"指定文字批注点",content:"输入批注文字"},line:{firstPoint:"指定直线批注的第一点",secondPoint:"指定直线批注的第二点"},arrow:{firstPoint:"指定箭头起点",secondPoint:"指定箭头尖端"},cloud:{firstCorner:"指定云线的第一个角点",secondCorner:"指定云线的对角点"},rect:{firstCorner:"指定矩形的第一个角点",secondCorner:"指定矩形的对角点"},circle:{center:"指定圆心",radius:"指定圆的半径"},shape:{calloutOn:"[标注开启]",calloutOff:"[标注关闭]",calloutAnchor:"指定标注文字框位置",keywords:{callout:{display:"标注(C)",local:"标注",global:"Callout"},noCallout:{display:"无标注(N)",local:"无标注",global:"NoCallout"}}},highlight:{firstCorner:"指定高亮的第一个角点",secondCorner:"指定高亮的对角点"},callout:{tip:"指定引线起点,或选择尚无标注的云线/矩形/圆外框",anchor:"指定标注文字框位置",content:"输入标注文字"},stamp:{kind:"输入图章类型 [approved/rejected/revised/for-review/custom]",imageUrl:"输入自定义图章图片 URL(可选)",caption:"输入图章说明文字(可选)",point:"指定图章插入点"},import:{chooseFile:"选择批注 sidecar JSON 文件"}},move:{basePointOrDisplacement:"指定基点或",secondPointOrDisplacement:"指定第二个点或",displacement:"指定位移",keywords:{displacement:{display:"位移(D)",local:"位移",global:"Displacement"}}},offset:{distance:"指定偏移距离",selectObject:"选择要偏移的对象,或按 Enter 结束",sidePoint:"指定要偏移到的那一侧的点",invalidDistance:"偏移距离必须大于 0。",invalidSelection:"所选对象不能偏移。",offsetFailed:"无法在指定侧创建偏移曲线。"},mtext:{point:"指定多行文本插入点"},bmpout:{boundsFirstCorner:"指定边界的第一个角点",boundsSecondCorner:"指定对角点",longSidePrompt:"输入长边像素大小"},jpgout:{boundsFirstCorner:"指定边界的第一个角点",boundsSecondCorner:"指定对角点",longSidePrompt:"输入长边像素大小"},pngout:{boundsFirstCorner:"指定边界的第一个角点",boundsSecondCorner:"指定对角点",longSidePrompt:"输入长边像素大小"},imageattach:{insertionPoint:"指定插入点:",scale:"指定比例因子:",rotation:"指定旋转角度:",invalidScale:"比例因子必须大于 0。",decodeFailed:"无法读取所选图像文件。"},insert:{blockName:"输入块名:",insertionPoint:"指定插入点:",scale:"指定比例因子:",rotation:"指定旋转角度:",invalidScale:"比例因子必须大于 0。",invalidBlockName:"无效的块名。",blockNotFound:"未找到块",xrefNotAllowed:"不能使用 -INSERT 插入外部参照。"},xattach:{insertionPoint:"指定插入点:",scale:"指定比例因子:",rotation:"指定旋转角度:",invalidScale:"比例因子必须大于 0。",unsupportedFile:"请选择 DWG 或 DXF 文件。",loading:"正在加载外部参照...",loadFailed:"无法读取所选图形文件。"},point:{point:"指定点"},polygon:{numberOfSides:"输入边数",centerOrEdge:"指定多边形中心点或",radiusOrType:"输入选项",edgeStart:"指定边的第一个端点",edgeEnd:"指定边的第二个端点",keywords:{edge:{display:"边(E)",local:"边",global:"Edge"},inscribed:{display:"内接于圆(I)",local:"内接于圆",global:"Inscribed"},circumscribed:{display:"外切于圆(C)",local:"外切于圆",global:"Circumscribed"}},invalid:{sides:"边数无效:请输入 3 到 1024 之间的整数。",radius:"半径无效:半径必须大于 0。",edge:"边无效:边长必须大于 0。"}},polyline:{firstPoint:"指定第一个点",nextPoint:"指定下一个点(或按 Enter 完成)",nextPointWithOptions:"请指定下一个点或",nextPointWithArcOptions:"请指定下一个点或",keywords:{arc:{display:"圆弧(A)",local:"圆弧",global:"Arc"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},close:{display:"闭合(C)",local:"闭合",global:"Close"},line:{display:"直线(L)",local:"直线",global:"Line"},angle:{display:"角度(A)",local:"角度",global:"Angle"},center:{display:"圆心(C)",local:"圆心",global:"Center"},secondPoint:{display:"第二点(P)",local:"第二点",global:"SecondPoint"},radius:{display:"半径(R)",local:"半径",global:"Radius"}},arcAngle:"指定弧角度",arcCenter:"指定圆心",arcSecondPoint:"指定弧上的第二点",arcEndPoint:"指定弧的终点",arcRadius:"指定弧半径"},rotate:{basePoint:"指定基点",rotationAngleOrOptions:"指定旋转角度或",referenceAngleOrPoints:"指定参考角或",firstReferencePoint:"指定参考角的第一点",secondReferencePoint:"指定第二点",newAngle:"指定新角度",keywords:{copy:{display:"复制(C)",local:"复制",global:"Copy"},reference:{display:"参照(R)",local:"参照",global:"Reference"},points:{display:"点(P)",local:"点",global:"Points"}},invalid:{referencePoints:"参考点输入无效:两点必须不同。"}},rect:{firstPoint:"指定第一个角点",nextPoint:"指定另一个角点",firstPointWithOptions:"指定第一个角点或者",otherCornerWithOptions:"指定另一个角点或者",chamferFirst:"指定第一个倒角距离",chamferSecond:"指定第二个倒角距离",filletRadius:"指定圆角半径",segmentWidth:"指定矩形线宽",elevationValue:"指定标高",thicknessValue:"指定厚度",rotationAngle:"指定矩形旋转角度",dimensionLength:"指定矩形长度",dimensionWidth:"指定矩形宽度",areaValue:"指定矩形面积",areaLengthOrWidth:"指定矩形长度",areaSpecifyWidth:"指定矩形宽度",invalidPositive:"输入无效:请输入大于 0 的数值。",invalidRect:"无法创建矩形:请输入有效的角点或尺寸。",thicknessNotSupported:"当前版本暂不支持将矩形厚度写入图元,已忽略厚度设置。",keywords:{chamfer:{display:"倒角(C)",local:"倒角",global:"Chamfer"},elevation:{display:"标高(E)",local:"标高",global:"Elevation"},fillet:{display:"圆角(F)",local:"圆角",global:"Fillet"},thickness:{display:"厚度(T)",local:"厚度",global:"Thickness"},width:{display:"宽度(W)",local:"宽度",global:"Width"},area:{display:"面积(A)",local:"面积",global:"Area"},dimensions:{display:"尺寸(D)",local:"尺寸",global:"Dimensions"},rotation:{display:"旋转(R)",local:"旋转",global:"Rotation"},length:{display:"长度(L)",local:"长度",global:"Length"},rectWidth:{display:"宽度(W)",local:"宽度",global:"Width"}}},revcloud:{firstCornerOrOptions:"指定第一个角点或",firstCorner:"指定第一个角点",oppositeCorner:"指定对角点",startPoint:"指定起点",nextPoint:"指定下一点",nextPointOrUndo:"指定下一点或",firstPoint:"指定第一个点",guideCursor:"沿云线路径移动光标(按 Enter 结束)",arcLength:"指定圆弧长度",selectObject:"选择对象",style:"输入修订云线圆弧样式",reverseDirection:"反转方向",invalidArcLength:"圆弧长度必须大于 0。",invalidObject:"所选对象无法转换为修订云线。",keywords:{arcLength:{display:"圆弧长度(A)",local:"圆弧长度",global:"ArcLength"},object:{display:"对象(O)",local:"对象",global:"Object"},rectangular:{display:"矩形(R)",local:"矩形",global:"Rectangular"},polygonal:{display:"多边形(P)",local:"多边形",global:"Polygonal"},freehand:{display:"手绘(F)",local:"手绘",global:"Freehand"},style:{display:"样式(S)",local:"样式",global:"Style"},normal:{display:"普通(N)",local:"普通",global:"Normal"},calligraphy:{display:"书法(C)",local:"书法",global:"Calligraphy"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},yes:{display:"是(Y)",local:"是",global:"Yes"},no:{display:"否(N)",local:"否",global:"No"}}},sketch:{specifySketch:"指定草图或",sketching:"移动指针进行草图绘制(单击或按 Enter 停止)",type:"输入草图类型",increment:"指定草图增量",tolerance:"指定样条曲线公差",firstPoint:"指定第一个点",nextPoint:"指定结束点",keywords:{type:{display:"类型(T)",local:"类型",global:"Type"},increment:{display:"增量(I)",local:"增量",global:"Increment"},tolerance:{display:"公差(L)",local:"公差",global:"Tolerance"},line:{display:"直线(L)",local:"直线",global:"Lines"},polyline:{display:"多段线(P)",local:"多段线",global:"Polyline"},spline:{display:"样条曲线(S)",local:"样条曲线",global:"Spline"}}},spline:{firstPoint:"指定第一个点",nextPoint:"指定下一个点(或按 Enter 完成)",firstPointWithOptions:"指定第一个点或",nextPointWithFitOptions:"指定下一个点或",nextPointWithCvOptions:"指定下一个控制顶点或",methodPrompt:"输入样条创建方式",knotsPrompt:"输入节点参数化方式",degreePrompt:"指定样条次数",keywords:{method:{display:"方法(M)",local:"方法",global:"Method"},fit:{display:"拟合(F)",local:"拟合",global:"Fit"},cv:{display:"控制顶点(C)",local:"控制顶点",global:"CV"},knots:{display:"节点(K)",local:"节点",global:"Knots"},degree:{display:"次数(D)",local:"次数",global:"Degree"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},close:{display:"闭合(C)",local:"闭合",global:"Close"},chord:{display:"弦长(C)",local:"弦长",global:"Chord"},sqrtChord:{display:"平方根弦长(S)",local:"平方根弦长",global:"SqrtChord"},uniform:{display:"均匀(U)",local:"均匀",global:"Uniform"}}},objectscale:{action:"输入选项",scaleName:"输入注释比例名称",done:"已更新对象",none:"(无)",keywords:{add:{display:"添加(A)",local:"添加",global:"Add"},delete:{display:"删除(D)",local:"删除",global:"Delete"},list:{display:"列表(L)",local:"列表",global:"List"}}},sysvar:{prompt:"请输入新的值"},zoom:{mainPrompt:"指定窗口角点或",firstCorner:"指定第一个角点",secondCorner:"指定对角点",centerPoint:"指定缩放中心点",heightOrScale:"输入高度或比例因子(nX 或 nXP)",scaleFactor:"输入比例因子(nX 或 nXP)",keywords:{all:{display:"全部(A)",local:"全部",global:"All"},center:{display:"中心(C)",local:"中心",global:"Center"},extents:{display:"范围(E)",local:"范围",global:"Extents"},previous:{display:"上一个(P)",local:"上一个",global:"Previous"},original:{display:"原始视口(O)",local:"原始视口",global:"Original"},saved:{display:"保存的视图(V)",local:"保存的视图",global:"Saved"},smart:{display:"智能范围(I)",local:"智能范围",global:"Smart"},scale:{display:"比例(S)",local:"比例",global:"Scale"},window:{display:"窗口(W)",local:"窗口",global:"Window"}}},chtml:{exportFormat:"导出格式",exportInvisibleLayers:"是否导出不可见图层",exportLayouts:"是否导出布局",initialView:"打开 HTML 时的初始视图",viewerMode:"离线查看器模式",chunkSizeMiB:"每个分片大小(MiB,多文件包)",compressChunks:"是否压缩分片(多文件包)",keywords:{single:{display:"单文件(S)",local:"单文件",global:"Single"},multi:{display:"多文件包(M)",local:"多文件包",global:"Multi"},yes:{display:"是(Y)",local:"是",global:"Yes"},no:{display:"否(N)",local:"否",global:"No"},extents:{display:"范围(E)",local:"范围",global:"Extents"},current:{display:"当前(C)",local:"当前",global:"Current"},view:{display:"查看(V)",local:"查看",global:"View"},measure:{display:"测量与批注(M)",local:"测量与批注",global:"Measure"}}},cpdf:{modelSpaceFit:"模型空间范围",exportLayouts:"是否导出布局",textMode:"文字渲染方式",keywords:{extents:{display:"范围(E)",local:"范围",global:"Extents"},display:{display:"显示(D)",local:"显示",global:"Display"},text:{display:"文字(T)",local:"文字",global:"Text"},vector:{display:"矢量(V)",local:"矢量",global:"Vector"},yes:{display:"是(Y)",local:"是",global:"Yes"},no:{display:"否(N)",local:"否",global:"No"}}}},IS={document:{untitled:"未命名"},commandLine:{noLast:"(无上一次命令)",unknownCommand:"未知命令",executed:"已执行命令",showHistory:"显示命令历史",placeholder:"输入命令",showMessages:"显示消息历史",canceled:"*已取消*",noHistory:"(无历史记录)",invalidInput:"输入无效。",close:"关闭命令行"},mobileCommand:{length:"长度",angle:"角度",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"确定",cancel:"取消",help:"帮助",back:"返回",collapse:"收起",expand:"展开"},inputManager:{firstCorner:"指定第一个角点或",secondCorner:"指定第二个角点或"},message:{onLockedLayer:"个对象位于锁定的图层上。",fetchingDrawingFile:"正在加载图纸文件...",exportingDxf:"正在导出 DXF ...",exportingPdf:"正在导出 PDF ...",exportingSvg:"正在导出 SVG ...",calculatingSmartExtents:"正在计算智能范围 ...",importingPdf:"正在导入 PDF ...",exportingEntityPreview:"正在导出图片 ...",collectingMemoryProfile:"正在分析内存 ...",fontCached:"字体已成功缓存",fontCacheFailed:"缓存字体失败",fontsNotFound:"在字体库中找不到字体:{fonts}。",fontsNotLoaded:"无法加载字体:{fonts}。",fontMissedInDrawing:'字体 "{font}" 被 {count} 个文字对象使用,但不可用,已使用 "{replacementFont}" 显示。',fontMissedReplacement:'"{font}"(已用 "{replacement}" 显示)',failedToGetAvaiableFonts:'无法从"{url}"获取可用的字体信息!',failedToOpenFile:'无法打开文件"{fileName}"!',failedToOpenFileToast:'无法打开"{fileName}"。详情请查看通知中心。',failedToOpenFileWorkerOom:'无法打开"{fileName}"。使用 LibreDWG 解析器时内存不足,导致打开失败。可点击{dwgParserLink}购买商用 DWG Parser,以支持更大图纸并避免此问题。',failedToOpenFileWorkerOomLink:"此页面",failedToOpenFileWorkerTimeout:'无法打开"{fileName}"。解析图纸时操作超时。',failedToOpenFileFontLoadFailed:'无法打开"{fileName}"。无法加载图纸所需的字体。',failedToOpenFileLicenseExpired:'无法打开"{fileName}"。DWG 转换器许可证已过期。',failedToOpenFileLicenseInvalid:'无法打开"{fileName}"。DWG 转换器许可证缺失或无效。',unknownEntities:"这张图纸中包含了{count}个未知或不支持的实体,这些实体将无法显示!",tianzhengEntities:"检测到天正(或同类第三方)自定义图元(约 {count} 个)。当前环境无法完整解析这些图元,部分内容可能无法显示。",emptyProxyEntities:"这张图纸中包含了{count}个缺少代理图形的自定义实体,这些实体将无法显示!"},notification:{center:{title:"通知",clearAll:"清除全部",noNotifications:"暂无通知"},group:{fontMissed:"字体缺失",fontMissedSummary:"共 {count} 条字体相关消息,点击展开查看详情",unsupportedEntities:"不支持的图元",unsupportedEntitiesSummary:"共 {count} 条解析相关消息,点击展开查看详情",genericSummary:"共 {count} 条消息,点击展开查看详情"},title:{failedToOpenFile:"无法打开文件",failedToOpenFileWorkerOom:"内存不足",failedToOpenFileWorkerTimeout:"打开超时",failedToOpenFileFontLoadFailed:"字体加载失败",failedToOpenFileLicenseExpired:"许可证已过期",failedToOpenFileLicenseInvalid:"许可证无效",fontNotFound:"找不到字体",fontNotLoaded:"无法加载字体",parsingWarning:"解析图纸问题",systemMessage:"系统消息",systemWarning:"系统警告",systemError:"系统错误",systemInfo:"系统信息"}},progress:{start:"开始解析文件...",parse:"正在解析文件 ...",font:"正在下载图纸所需字体...",ltype:"正在解析线形...",style:"正在解析文字样式...",dimstyle:"正在解析标注样式...",layer:"正在解析图层...",vport:"正在解析视口...",blockrecord:"正在解析BTRs...",header:"正在解析文件头...",block:"正在解析块..",entity:"正在解析图元...",object:"正在解析NODs...",rendering:"正在渲染图纸 ...",end:"完成!"},about:{title:"关于",close:"关闭",product:"CAD 查看器",tagline:"面向 DWG/DXF 图纸的高性能 Web CAD 查看器。",website:"官网",docs:"文档",repository:"GitHub",copyright:"© {year} mlightcad。保留所有权利。",ok:"确定"},drawStyle:{color:"颜色",fontSize:"字高"},shortCutToolbar:{more:"更多",undo:"撤销",redo:"重做",erase:"删除",collapse:"收起工具栏",expand:"展开工具栏"},textHeight:{title:"字高设置",close:"关闭",ok:"确定",cancel:"取消",adaptive:"自适应屏幕",custom:"自定义字高",customPlaceholder:"世界坐标字高",fromScreen:"按屏幕字号换算",fromScreenHint:"按当前视图缩放,输入希望看到的屏幕字号(像素),换算为固定的世界坐标字高;之后缩放时字的世界高度不变。",screenPxPlaceholder:"屏幕字号",screenUnit:"px",convert:"换算"},entityPick:{cancel:"取消选择"},colorPicker:{title:"选择颜色",close:"关闭",ok:"确定",cancel:"取消",index:"颜色索引:",rgb:"RGB:",input:"颜色",inputPlaceholder:"1-255 或 #RRGGBB"},touchPointTutorial:{title:"怎样可以精确取点?",description:"手指在屏幕上长按0.5s左右,上方出现十字,手指移动时十字跟随移动并自动捕捉。取点更精准。",snoozeToday:"今日不再提醒",hideForever:"不再提醒",ok:"我知道了"},dataSource:{open:"打开",local:"本地文件",url:"从 URL 打开",openFrom:"从 {name} 打开",signInTo:"登录 {name}",signOutOf:"退出 {name}",signOutOfAccount:"退出 {name}({account})",urlDialogTitle:"从 URL 打开",urlDialogHint:"请输入 .dwg 或 .dxf 文件的网址。",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"取消",onedrive:"OneDrive",googledrive:"Google Drive",or:"或",dropFile:"将文件拖放到此处,或",browse:"浏览",dropOrBrowse:"将 DWG 或 DXF 文件拖放到此处,或浏览选择",newDrawing:"新建图纸",source:"数据源",unavailable:"该数据源暂不可用。",selectFile:"选择文件",signInRequired:"请先登录后再选择文件。",downloading:"正在下载文件 ..."}};m.mergeLocaleMessage("en",{command:M,jig:R,main:AS}),m.mergeLocaleMessage("zh",{command:LS,jig:TS,main:IS}),m.mergeLocaleMessage("tr",{command:_S,jig:PS,main:ES}),m.mergeLocaleMessage("cs",{command:kS,jig:SS,main:CS}),m.mergeLocaleMessage("ar",{command:wS,jig:vS,main:xS});const dc=(s,e)=>{const t=`command.${s}.${e}`;return m.t(t)},MS=s=>dc(Me.SYSTEMT_COMMAND_GROUP_NAME,s),OS=s=>dc(Me.DEFAUT_COMMAND_GROUP_NAME,s);class uc{constructor(e){this.options=e}parse(e){const t=e.trim();if(t.length===0)return this.options.allowNone,null;const i=this.options.keywords.findByName(t);return i?i.globalName:this.options.allowArbitraryInput?t:null}parseCommandLine(e,t){return this.parse(e)}}class km{start(){return new Promise(e=>{this.resolve=e,this.onStart()})}finish(e){this.cleanup(),this.resolve(e)}}class DS extends km{constructor(e,t,i=!0){super(),this.cli=e,this.options=t,this.allowTyping=i,this.handler=new uc(t)}onStart(){this.cli.clearInput(),this.cli.setInputReadOnly(!this.allowTyping),this.cli.renderKeywordPrompt(this.options,e=>this.finish(e)),this.cli.focusInput()}handleEnter(e){if(!this.allowTyping)return!0;if(!e.trim()){const i=this.options.keywords.default;return i!=null&&i.enabled?(this.finish(i.globalName),!0):this.options.allowNone?(this.finish(""),!0):!1}const t=this.handler.parse(e);return t!==null?(this.finish(t),!0):!1}handleEscape(){this.finish("")}cleanup(){this.cli.setInputReadOnly(!1),this.cli.clear()}}class NS extends km{constructor(e,t,i,n,o,r=!0){super(),this.cli=e,this.options=t,this.parseValue=i,this.mode=n,this.allowNone=o,this.allowTyping=r,this.options.keywords.count>0&&(this.keywordHandler=new uc(this.options))}onStart(){this.cli.clearInput(),this.cli.setInputReadOnly(!this.allowTyping),this.cli.renderKeywordPrompt(this.options,e=>this.finish({kind:"keyword",keyword:e})),this.cli.focusInput()}handleEnter(e){if(!this.allowTyping)return!0;if(!e.trim()){const i=this.options.keywords.default;return i!=null&&i.enabled?(this.finish({kind:"keyword",keyword:i.globalName}),!0):this.allowNone?(this.finish({kind:"none"}),!0):!1}if(this.mode==="keyword")return this.tryResolveKeyword(e);if(this.mode==="string"){if(this.tryResolveKeyword(e))return!0;const i=this.parseValue(e);return i!==null?(this.finish({kind:"value",value:i}),!0):!1}const t=this.parseValue(e);return t!==null?(this.finish({kind:"value",value:t}),!0):this.tryResolveKeyword(e)}handleEscape(){this.finish({kind:"none"})}cleanup(){this.cli.setInputReadOnly(!1),this.cli.clear()}tryResolveKeyword(e){if(!this.keywordHandler)return!1;const t=this.keywordHandler.parse(e);return t===null?!1:(this.finish({kind:"keyword",keyword:t}),!0)}}class Sm{constructor(e=document.body){this.isPromptActive=!1,this.recentMessages=[],this.isCommandLifecycleBound=!1,this._domAbortController=new AbortController,this._onLocaleChanged=()=>this.refreshLocale(),this._disposed=!1,this.container=e,this.history=[],this.historyIndex=-1,this.lastExecuted=null,this.isCmdPopupOpen=!1,this.isMsgPanelOpen=!1,this.minWidth=420,this.widthRatio=.66,this.autoCompleteIndex=-1,this.injectCSS(),this.createUI(),this.bindEvents(),this.bindCommandLifecycleEvents(),this.resizeHandler();const t=this._domAbortController.signal;window.addEventListener("resize",()=>this.resizeHandler(),{signal:t}),this.resizeObserver=new ResizeObserver(()=>this.resizeHandler()),this.resizeObserver.observe(this.container),m.events.localeChanged.addEventListener(this._onLocaleChanged)}dispose(){var e;if(!this._disposed){this._disposed=!0,this.cancelActiveSession(),this.cancelRecentAutoHide(),this._domAbortController.abort(),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0,m.events.localeChanged.removeEventListener(this._onLocaleChanged);try{const t=k.instance.editor.events;this._onCommandWillStart&&t.commandWillStart.removeEventListener(this._onCommandWillStart),this._onCommandEnded&&t.commandEnded.removeEventListener(this._onCommandEnded)}catch{}this.cliContainer.remove()}}get visible(){return this.cliContainer.style.display!=="none"}set visible(e){this.cliContainer.style.display=e?"block":"none"}setPrompt(e){this.isPromptActive=!0;const t=(e==null?void 0:e.trim().replace(/[::]\s*$/,""))??"";this.promptEl.innerHTML=t?`${t}: `:"",this.textInput.placeholder="",this.recordRecentMessage(t?`${t}:`:e)}clear(){this.clearPrompt(),this.clearInput()}clearPrompt(){this.promptEl.innerHTML="",this.isPromptActive=!1}clearInput(){this.textInput.value="",this.textInput.placeholder=this.isPromptActive?"":this.localize("main.commandLine.placeholder")}focusInput(){this.textInput.focus()}setInputReadOnly(e){this.textInput.readOnly=e}showMessage(e,t="info",i){this.appendMessage(e,t,i)}cancelActiveSession(){this.activeSession&&(this.activeSession.handleEscape(),this.activeSession=void 0)}async getKeywords(e,t=!0){const i=new DS(this,e,t);this.activeSession=i;try{return await i.start()}finally{this.activeSession=void 0}}async getPromptInput(e,t,i){const n=new NS(this,e,t,i.mode,i.allowNone,i.allowTyping??!0);this.activeSession=n;try{return await n.start()}finally{this.activeSession=void 0}}localize(e,t){return m.t(e,{fallback:t})}refreshLocale(){Array.from(this.msgPanel.children).forEach(e=>{var n,o,r,a;const t=e,i=t.dataset.msgKey;if(i)if(i==="main.commandLine.executed"){const l=((o=(n=t.textContent)==null?void 0:n.split(":")[1])==null?void 0:o.trim())??"";t.textContent=`${this.localize(i)}: ${l}`}else if(i==="main.commandLine.unknownCommand"){const l=((a=(r=t.textContent)==null?void 0:r.split(":")[1])==null?void 0:a.trim())??"";t.textContent=`${this.localize(i)}: ${l}`}else t.textContent=this.localize(i)}),this.centerEl.setAttribute("data-placeholder",this.localize("main.commandLine.placeholder")),!this.isPromptActive&&!this.textInput.value&&(this.textInput.placeholder=this.localize("main.commandLine.placeholder")),this.downBtn.title=this.localize("main.commandLine.showHistory"),this.upBtn.title=this.localize("main.commandLine.showMessages")}executeCommand(e){if(!e||!e.trim())if(this.lastExecuted)e=this.lastExecuted;else{this.showMessage(this.localize("main.commandLine.noLast","(no last command)"));return}const t=this.resolveCommand(e);if(!t){const n=this.localize("main.commandLine.unknownCommand");this.showMessage(`${n}: ${e}`,"warning");return}this.history.push(t.globalName),this.historyIndex=this.history.length,this.lastExecuted=t.globalName,this.printHistoryLine(e);const i=this.localize("main.commandLine.executed");this.showMessage(`${i}: ${t.localName}`),k.instance.sendStringToExecute(e),this.clearInput()}injectCSS(){const e=document.createElement("style");e.textContent=`
233
+ `;return this.encodeSvgToCursor(r,n+t,n+t)}}var qe=(s=>(s[s.SELECTION=0]="SELECTION",s[s.PAN=1]="PAN",s))(qe||{});const l0={showsConfirmedPointMarks:!1,usesSessionChrome:!1,swallowsPromptContextMenu:!1,showsCursorDynamicInput:!0,showsSnapLoupeOnTouchPick:!1},c0={showsConfirmedPointMarks:!0,usesSessionChrome:!0,swallowsPromptContextMenu:!0,showsCursorDynamicInput:!1,showsSnapLoupeOnTouchPick:!0};class om{constructor(){this.point=l0}canIdleTouchBox(e){return e===qe.SELECTION}acquireBox(e,t){return e.acquireTwoPointBox(t)}}class rm{constructor(){this.point=c0}canIdleTouchBox(e){return e===qe.SELECTION||e===qe.PAN}acquireBox(e,t){return e.acquireHoldDragBox(t)}}const d0=new om,u0=new rm;function Ve(){return Qt()?u0:d0}function am(s){if(!Ve().point.showsCursorDynamicInput)return!1;const e=s??p.acdbHostApplicationServices().workingDatabase;return Number(p.AcDbSysVarManager.instance().getVar(p.AcDbSystemVariables.DYNMODE,e))!==0}function lm(s){const e=s??p.acdbHostApplicationServices().workingDatabase,t=p.AcDbSysVarManager.instance().getVar(p.AcDbSystemVariables.ORTHOMODE,e);return Number(t)!==0}function cm(s,e){const t=s.x-e.x,i=s.y-e.y;return Math.abs(t)>=Math.abs(i)?{x:s.x,y:e.y}:{x:e.x,y:s.y}}const ln=2,dm=4;function ps(s){return s??p.acdbHostApplicationServices().workingDatabase}function um(s,e,t){const i=p.AcDbSysVarManager.instance().getVar(s,e),n=Number(i);return Number.isFinite(n)?n:t}function h0(s,e){const t=p.AcDbSysVarManager.instance().getVar(s,e);return t==null?"":String(t)}function Wo(s){const e=ps(s);return um(p.AcDbSystemVariables.POLARMODE,e,0)}function hm(s){const e=ps(s);return um(p.AcDbSystemVariables.POLARANG,e,90)}function pm(s){const e=ps(s);return h0(p.AcDbSystemVariables.POLARADDANG,e)}function mm(s){return(Wo(s)&ln)!==0}function p0(s,e,t){let i=s-e;return t===1&&(i=-i),p.AcGeMathUtil.normalizeAngle(i)}function m0(s,e,t){let i=s;return t===1&&(i=-i),p.AcGeMathUtil.normalizeAngle(i+e)}function f0(s){if(!s.trim())return[];const e=[];for(const t of s.split(";")){const i=t.trim();if(!i)continue;const n=Number(i);if(Number.isFinite(n)&&(e.push((n%360+360)%360),e.length>=10))break}return e}function y0(s,e){const t=Wo(s),i=(t&ln)!==0,n=(t&dm)!==0,o=new Set;if(e.includeOrtho)for(const r of[0,90,180,270])o.add(r);if(i){const r=hm(s);if(r>0){const a=Math.max(1,Math.round(360/r));for(let l=0;l<a;l++)o.add((l*r%360+360)%360)}if(n)for(const a of f0(pm(s)))o.add(a)}return[...o].map(p.AcGeMathUtil.degToRad)}function fm(s,e){const t=Math.abs(p.AcGeMathUtil.normalizeAngle(s-e));return Math.min(t,Math.PI*2-t)}function g0(s,e){let t=e[0],i=fm(s,t);for(let n=1;n<e.length;n++){const o=e[n],r=fm(s,o);r<i&&(i=r,t=o)}return t}function ym(s,e,t){const i=ps(t),n=lm(i),o=mm(i);if(!n&&!o)return s;if(n&&!o)return cm(s,e);const r=s.x-e.x,a=s.y-e.y,l=Math.hypot(r,a);if(l<1e-10)return s;const c=Math.atan2(a,r),d=p0(c,i.angbase,i.angdir),h=y0(i,{includeOrtho:n});if(h.length===0)return s;const f=g0(d,h),y=m0(f,i.angbase,i.angdir);return{x:e.x+l*Math.cos(y),y:e.y+l*Math.sin(y)}}function b0(s){const e=ps(s),t=Wo(e),i=(t&ln)!==0?t&~ln:t|ln;return p.AcDbSysVarManager.instance().setVar(p.AcDbSystemVariables.POLARMODE,i,e),i}class $o{constructor(e=[]){this.events={selectionAdded:new p.AcCmEventManager,selectionRemoved:new p.AcCmEventManager},this._ids=new Set(e)}get ids(){return Array.from(this._ids)}get count(){return this._ids.size}add(e){Array.isArray(e)?(e.forEach(t=>this._ids.add(t)),this.events.selectionAdded.dispatch({ids:e})):(this._ids.add(e),this.events.selectionAdded.dispatch({ids:[e]}))}delete(e){Array.isArray(e)?(e.forEach(t=>this._ids.delete(t)),this.events.selectionRemoved.dispatch({ids:e})):(this._ids.delete(e),this.events.selectionRemoved.dispatch({ids:[e]}))}has(e){return this._ids.has(e)}clear(){if(this._ids.size>0){const e=Array.from(this._ids);this._ids.clear(),this.events.selectionRemoved.dispatch({ids:e})}}}class rc{constructor(e,t,i,n=!0,o=!1,r=!0){this._displayName=e,this._globalName=t??e,this._localName=i??this._globalName,this._enabled=n,this._isReadOnly=o,this._visible=r}get displayName(){return this._displayName}set displayName(e){this._isReadOnly||(this._displayName=e)}get enabled(){return this._enabled}set enabled(e){this._isReadOnly||(this._enabled=e)}get globalName(){return this._globalName}set globalName(e){this._isReadOnly||(this._globalName=e)}get isReadOnly(){return this._isReadOnly}get localName(){return this._localName}set localName(e){this._isReadOnly||(this._localName=e)}get visible(){return this._visible}set visible(e){this._isReadOnly||(this._visible=e)}get alias(){return this._globalName.replace(/[^A-Z]/g,"")}}class gm{constructor(e){if(this._keywords=[],!e)return;const t=e.trim().split(/\s+/),i=[],n=[];let o=!1;for(const a of t){if(a==="_"){o=!0;continue}(o?n:i).push(a)}const r=Math.max(i.length,n.length);for(let a=0;a<r;a++){const l=i[a],c=n[a],d=x=>{if(!x)return;const _=x.indexOf(",");return _>=0?x.substring(0,_):x},h=d(c),f=d(l),y=h!==void 0,g=f!==void 0,b=y?h:"",w=g?f:void 0,S=new rc(b||w||"",b,w,!0,!1,!0);this._keywords.push(S)}}add(e,t,i,n=!0,o=!0){let r,a,l;t===void 0?(r=e,a=e,l=e):i===void 0?(r=t,a=e,l=t):(r=e,a=t,l=i);const c=new rc(r,a,l,n,!1,o);return this._keywords.push(c),c}clear(){this._keywords=[],this._defaultKeyword=void 0}toArray(){return this._keywords.slice()}get default(){return this._defaultKeyword}set default(e){if(e&&!this._keywords.includes(e))throw new Error("Default keyword must be one of the collection's keywords");this._defaultKeyword=e}getDisplayString(e=!1){return this._keywords.filter(i=>i.visible&&i.enabled).map(i=>(!e&&this._defaultKeyword===i,i.displayName)).join("/")}getPromptFormat(){const e=this._keywords.filter(o=>o.visible).map(o=>o.displayName),t=this._defaultKeyword&&this._defaultKeyword.visible?this._defaultKeyword.displayName:void 0,i=`[${e.join("/")}]`,n=t?` <${t}>`:"";return{visibleKeywords:e,defaultKeyword:t,formattedTail:`${i}${n}:`}}[Symbol.iterator](){let e=0;const t=this._keywords;return{next(){return e<t.length?{done:!1,value:t[e++]}:{done:!0,value:void 0}}}}findByDisplayName(e){return this._keywords.find(t=>t.displayName.toLowerCase()===e.toLowerCase())}findByGlobalName(e){return this._keywords.find(t=>t.globalName.toLowerCase()===e.toLowerCase())}findByName(e){if(!e)return;let t=e.trim();if(!t)return;const i=t.startsWith("_");i&&(t=t.substring(1));const n=t.toLowerCase();return this._keywords.find(o=>o.enabled?o.globalName.toLowerCase()===n?!0:i?!1:!!(o.localName&&o.localName.toLowerCase()===n||o.alias&&o.alias.toLowerCase()===n||o.displayName.toLowerCase()===n):!1)}get count(){return this._keywords.length}}class Ft{constructor(e,t){this._message="",this._appendKeywordsToMessage=!0,this._isReadOnly=!1,this._keywords=new gm,t!==void 0?this.setMessageAndKeywords(e,t):this._message=e}get jig(){return this._jig}set jig(e){this._isReadOnly||(this._jig=e)}get message(){return this._message}set message(e){this._isReadOnly||(this._message=e)}getDefaultValueDisplayText(){}getDisplayMessage(){const e=this.getDefaultValueDisplayText();return e==null?this._message:`${this._message.trim().replace(/[::]\s*$/,"")} <${e}>`}get appendKeywordsToMessage(){return this._appendKeywordsToMessage}set appendKeywordsToMessage(e){this._isReadOnly||(this._appendKeywordsToMessage=e)}get isReadOnly(){return this._isReadOnly}get keywords(){return this._keywords}getKeywordPromptFormat(){return this._keywords.getPromptFormat()}setMessageAndKeywords(e,t){if(this._isReadOnly)return this;const i=e.match(/^(.*?)\s*\[(.*?)\](.*)?$/);if(i){const[,n,o]=i;if(this._message=n.trim(),o!==void 0){const r=o.split("/").map(a=>a.trim()).filter(a=>a.length>0);this._keywords.clear();for(const a of r){let c=t.split(/\s+/).find(d=>d.toLowerCase()===a.toLowerCase());c||(c=a),this._keywords.add(a,c)}}}return this}}class Ge extends Ft{constructor(e,t){super(e,t),this._useBasePoint=!0,this._useDashedLine=!0,this._useAngleBase=!1,this._defaultValue=0,this._useDefaultValue=!1,this._allowZero=!0,this._allowNegative=!1,this._allowNone=!1}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new p.AcGePoint3d(e))}get baseAngle(){return this._baseAngle??0}set baseAngle(e){this.isReadOnly||(this._baseAngle=e)}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get useAngleBase(){return this._useAngleBase}set useAngleBase(e){this.isReadOnly||(this._useAngleBase=e)}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return String(this._defaultValue)}get allowZero(){return this._allowZero}set allowZero(e){this.isReadOnly||(this._allowZero=e)}get allowNegative(){return this._allowNegative}set allowNegative(e){this.isReadOnly||(this._allowNegative=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}}class Ko extends Ft{constructor(e,t){super(e),this._useBasePoint=!1,this._useDashedLine=!1,this._disableOSnap=!1,this._allowNone=!1,this._secondCornerMessage=t}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get firstCornerMessage(){return this.message}set firstCornerMessage(e){this.isReadOnly||(this.message=e)}get secondCornerMessage(){return this._secondCornerMessage}set secondCornerMessage(e){this.isReadOnly||(this._secondCornerMessage=e)}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get disableOSnap(){return this._disableOSnap}set disableOSnap(e){this.isReadOnly||(this._disableOSnap=e)}}class Pt{constructor(e,t){this.status=e,this.stringResult=t}}class mi extends Pt{constructor(e,t,i){super(e,i),this.value=t}}class Yo extends Ft{constructor(e,t){super(e,t),this._defaultValue=0,this._useDefaultValue=!1,this._allowNone=!1,this._allowArbitraryInput=!1,this._allowNegative=!1,this._allowZero=!0}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return String(this._defaultValue)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowArbitraryInput(){return this._allowArbitraryInput}set allowArbitraryInput(e){this.isReadOnly||(this._allowArbitraryInput=e)}get allowNegative(){return this._allowNegative}set allowNegative(e){this.isReadOnly||(this._allowNegative=e)}get allowZero(){return this._allowZero}set allowZero(e){this.isReadOnly||(this._allowZero=e)}}class Je extends Yo{constructor(e){super(e),this._useBasePoint=!1,this._useDashedLine=!0,this._only2d=!0,this.allowNegative=!1}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new p.AcGePoint3d(e))}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get only2d(){return this._only2d}set only2d(e){this.isReadOnly||(this._only2d=e)}}class ve extends Yo{}class ac extends Pt{constructor(e,t){super(e,void 0),this.value=t}}class rt extends ac{constructor(e,t){super(e,t)}}class Pe extends Ft{constructor(e,t){super(e,t),this._allowNone=!1,this._allowObjectOnLockedLayer=!1,this._rejectMessage="Invalid object selected.",this._allowedClasses=new Set}normalizeClassName(e){const t=e.trim();return t.startsWith("AcDb")?t.slice(4):t}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowObjectOnLockedLayer(){return this._allowObjectOnLockedLayer}set allowObjectOnLockedLayer(e){this.isReadOnly||(this._allowObjectOnLockedLayer=e)}get rejectMessage(){return this._rejectMessage}setRejectMessage(e){return this.isReadOnly||(this._rejectMessage=e),this}addAllowedClass(e){if(!this.isReadOnly){const t=this.normalizeClassName(e);t&&this._allowedClasses.add(t)}return this}removeAllowedClass(e){if(!this.isReadOnly){const t=this.normalizeClassName(e);t&&this._allowedClasses.delete(t)}return this}clearAllowedClasses(){return this.isReadOnly||this._allowedClasses.clear(),this}isClassAllowed(e){const t=this.normalizeClassName(e);return this._allowedClasses.size===0||this._allowedClasses.has(t)}}class Zo extends Pt{constructor(e,t,i){super(e),this.objectId=t,this.pickedPoint=i}}class lc extends Yo{constructor(e,t,i){super(e),typeof t=="number"&&(this._lowerLimit=Math.floor(t)),typeof i=="number"&&(this._upperLimit=Math.ceil(i))}get lowerLimit(){return this._lowerLimit}set lowerLimit(e){this.isReadOnly||(this._lowerLimit=typeof e=="number"?Math.floor(e):void 0)}get upperLimit(){return this._upperLimit}set upperLimit(e){this.isReadOnly||(this._upperLimit=typeof e=="number"?Math.floor(e):void 0)}}class Xo extends ac{constructor(e,t){super(e,t)}}class ye extends Ft{constructor(e,t){super(e,t),this._allowNone=!1,this._allowArbitraryInput=!1}get valueDefaultDisplayText(){return this._valueDefaultDisplayText}set valueDefaultDisplayText(e){this.isReadOnly||(this._valueDefaultDisplayText=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowArbitraryInput(){return this._allowArbitraryInput}set allowArbitraryInput(e){this.isReadOnly||(this._allowArbitraryInput=e)}}class F extends Ft{constructor(e,t){super(e,t),this._useBasePoint=!1,this._useDashedLine=!1,this._allowNone=!1,this._disableOSnap=!1,this._useDefaultValue=!1}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(e==null?this._defaultValue=e:this._defaultValue=this._defaultValue?this._defaultValue.copy(e):new p.AcGePoint3d(e))}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(!this._useDefaultValue||!this._defaultValue)return;const{x:e,y:t,z:i}=this._defaultValue;return i===0?`${e},${t}`:`${e},${t},${i}`}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new p.AcGePoint3d(e))}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get disableOSnap(){return this._disableOSnap}set disableOSnap(e){this.isReadOnly||(this._disableOSnap=e)}get showConfirmedPointMark(){return this._showConfirmedPointMark}set showConfirmedPointMark(e){this.isReadOnly||(this._showConfirmedPointMark=e)}}class qo extends Pt{constructor(e,t){super(e,void 0),this.value=t}}class Ii extends Ft{constructor(e,t){super(e,t),this._singleOnly=!1,this._allowObjectOnLockedLayer=!1}get singleOnly(){return this._singleOnly}set singleOnly(e){this._singleOnly=e}get allowObjectOnLockedLayer(){return this._allowObjectOnLockedLayer}set allowObjectOnLockedLayer(e){this._allowObjectOnLockedLayer=e}}class ms extends Pt{constructor(e,t,i){super(e,i),this.value=t}}class xe extends Ft{constructor(e,t){super(e,t),this._allowSpaces=!0,this._allowEmpty=!1,this._defaultValue="",this._useDefaultValue=!1}get allowSpaces(){return this._allowSpaces}set allowSpaces(e){this.isReadOnly||(this._allowSpaces=e)}get allowEmpty(){return this._allowEmpty}set allowEmpty(e){this.isReadOnly||(this._allowEmpty=e)}get maxLength(){return this._maxLength}set maxLength(e){this.isReadOnly||(this._maxLength=e)}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}getDefaultValueDisplayText(){if(this._useDefaultValue)return this._defaultValue}}var v=(s=>(s[s.Cancel=-5002]="Cancel",s[s.Error=-5001]="Error",s[s.Keyword=-5005]="Keyword",s[s.Modeless=5027]="Modeless",s[s.None=5e3]="None",s[s.OK=5100]="OK",s[s.Other=5028]="Other",s))(v||{});function bm(s){s.style.touchAction="none",s.style.userSelect="none",s.style.setProperty("-webkit-user-select","none"),s.style.setProperty("-webkit-touch-callout","none"),s.style.setProperty("-webkit-tap-highlight-color","transparent")}function cc(){var e;const s=(e=window.getSelection)==null?void 0:e.call(window);s==null||s.rangeCount===0||s.removeAllRanges()}function wm(s,e){bm(s),e&&(e.style.setProperty("-webkit-touch-callout","none"),e.style.setProperty("-webkit-tap-highlight-color","transparent"));const t=o=>{o.preventDefault()},i=o=>{o.preventDefault()},n={passive:!1,capture:!0};return s.addEventListener("touchstart",t,n),s.addEventListener("selectstart",i,!0),()=>{s.removeEventListener("touchstart",t,n),s.removeEventListener("selectstart",i,!0)}}const oi=class oi{static get messages(){return this._messages}static getLocaleMessage(e){return this._messages[e]}static mergeLocaleMessage(e,t){vm(this._messages[e],t)}static registerMessage(e,t){this.mergeLocaleMessage(e,t)}static setCurrentLocale(e){if(this._currentLocale===e)return;const t=this._currentLocale;this._currentLocale=e,this.events.localeChanged.dispatch({old:t,new:this._currentLocale})}static get currentLocale(){return this._currentLocale}static t(e,t){const i=this._currentLocale,n=this._messages[i],o=e.split(".");let r=n;for(const a of o){if(!r||typeof r!="object")return(t==null?void 0:t.fallback)??e;r=r[a]}return typeof r=="string"?r:(t==null?void 0:t.fallback)??e}static cmdKey(e,t,i){return`command.${e}.${t.toLowerCase()}.${i}`}static cmd(e,t,i){return this.t(this.cmdKey(e,t,i))}static cmdDescription(e,t){return this.cmd(e,t,"description")}static cmdPrompt(e,t){return this.cmd(e,t,"prompt")}static sysCmd(e,t){return this.cmd(Me.SYSTEMT_COMMAND_GROUP_NAME,e,t)}static sysCmdKey(e,t){return this.cmdKey(Me.SYSTEMT_COMMAND_GROUP_NAME,e,t)}static userCmd(e,t){return this.cmd(Me.DEFAUT_COMMAND_GROUP_NAME,e,t)}static userCmdKey(e,t){return this.cmdKey(Me.DEFAUT_COMMAND_GROUP_NAME,e,t)}static sysCmdDescription(e){return this.cmdDescription(Me.SYSTEMT_COMMAND_GROUP_NAME,e)}static sysCmdPrompt(e){return this.cmdPrompt(Me.SYSTEMT_COMMAND_GROUP_NAME,e)}};oi._messages={en:{},zh:{},tr:{},cs:{},ar:{}},oi._currentLocale="en",oi.events={localeChanged:new p.AcCmEventManager},oi.userCmdDescription=e=>oi.cmdDescription(Me.DEFAUT_COMMAND_GROUP_NAME,e),oi.userCmdPrompt=e=>oi.cmdPrompt(Me.DEFAUT_COMMAND_GROUP_NAME,e);let m=oi;function vm(s,e){for(const t of Object.keys(e)){const i=e[t],n=s[t];xm(n)&&xm(i)?vm(n,i):s[t]=i}}function xm(s){return typeof s=="object"&&s!==null}const M={ACAD:{"-hatch":{description:"Creates hatch fills through command-line options without the ribbon UI"},"-layer":{description:"Manages layers through command-line options"},about:{description:"Displays information about mlightcad"},acadver:{description:"Stores the drawing database version identifier (read-only)"},annoallvisible:{description:"Controls whether annotative objects that do not support the current annotation scale are displayed"},angbase:{description:"Sets the base angle 0 direction with respect to the current UCS"},angdir:{description:"Sets whether positive angles are measured clockwise or counterclockwise"},arc:{description:"Creates an arc"},aunits:{description:"Sets the display format for angles"},auprec:{description:"Sets the display precision for angles, used together with AUNITS"},bmpout:{description:"Exports to BMP"},cannoscale:{description:"Sets the name of the current annotation scale"},cdxf:{description:"Exports current drawing to DXF"},cpdf:{description:"Exports current drawing to PDF"},"-cpdf":{description:"Exports current drawing to PDF using command-line options"},cecolor:{description:"Sets the current default color for newly created objects"},celtscale:{description:"Controls the linetype scale factor for newly created objects"},celtype:{description:"Sets the linetype for newly created objects"},celweight:{description:"Sets the default lineweight for newly created objects"},cetransparency:{description:"Sets the transparency for newly created objects"},cachefont:{description:"Caches a local font file into IndexedDB for text rendering"},circle:{description:"Creates one circle by center and radius"},clayer:{description:"Sets the current layer for new objects and editing operations"},cmleaderstyle:{description:"Sets the name of the current multileader style"},cmlscale:{description:"Controls the overall width of a multiline"},cmlstyle:{description:"Sets the name of the current multiline style"},colortheme:{description:"Controls the color theme of the user interface (dark or light)"},copy:{description:"Copies selected entities by cloning them to new positions",prompt:"Select entities"},csvg:{description:"Converts current drawing to SVG"},chtml:{description:"Exports current drawing to a standalone offline HTML file"},"-chtml":{description:"Exports current drawing to HTML using command-line options"},dimlinear:{description:"Creates linear dimensions"},dimaligned:{description:"Creates an aligned linear dimension"},dimradius:{description:"Creates radial dimensions for circles and arcs"},dimdiameter:{description:"Creates diameter dimensions for circles and arcs"},dimangular:{description:"Creates angular dimensions"},dimarc:{description:"Creates arc length dimensions"},dimordinate:{description:"Creates ordinate dimensions"},dimcontinue:{description:"Creates a continued dimension"},dimbaseline:{description:"Creates a baseline dimension"},dimstyle:{description:"Sets the name of the current dimension style"},dwgname:{description:"Stores the name of the current drawing file (read-only)"},loginname:{description:"Displays the user's login name (read-only)"},dynmode:{description:"Controls Dynamic Input settings at the cursor"},dynprompt:{description:"Controls display of prompts in Dynamic Input tooltips"},ellipse:{description:"Creates an ellipse or elliptical arc by axis endpoints or center"},erase:{description:"Deletes selected entities from the drawing",prompt:"Select entities"},extmax:{description:"Stores the upper-right corner of the model-space drawing extents (read-only)"},extmin:{description:"Stores the lower-left corner of the model-space drawing extents (read-only)"},entout:{description:"Exports a merged preview image for selected entities",prompt:"Select entities"},hideobjects:{description:"Temporarily suppresses the display of selected objects",prompt:"Select objects"},imageattach:{description:"Attaches a raster image as an external reference to the current drawing"},"-insert":{description:"Inserts a block definition into the current drawing (command-line)"},xattach:{description:"Attaches a DWG or DXF drawing as an external reference to the current drawing"},gripcolor:{description:"Sets the color of unselected grips displayed on selected objects"},griphot:{description:"Sets the color of selected (hot) grips"},gripobjlimit:{description:"Suppresses grip display when the selection set exceeds the specified number of objects (0 = no limit)"},grips:{description:"Controls whether grips are displayed on selected objects"},gripsize:{description:"Sets the size of grip boxes in pixels"},hatch:{description:"Fills an enclosed area or selected objects with a hatch pattern"},ipdf:{description:"Imports vector geometry from a PDF file"},hpang:{description:"Sets the default angle, in radians, for newly created hatch patterns"},hpassoc:{description:"Controls whether newly created hatches are associative"},hpbackgroundcolor:{description:"Sets the default background color for newly created hatch patterns"},hpcolor:{description:"Sets the default color for newly created hatches"},hpdouble:{description:"Controls whether user-defined hatch patterns are doubled"},hpislanddetection:{description:"Controls how islands within newly created hatch boundaries are treated"},hplayer:{description:"Sets the default layer for newly created hatches and fills"},hpname:{description:"Sets the default pattern name for newly created hatches in this session"},hpscale:{description:"Sets the default scale factor for newly created hatch patterns"},hpseparate:{description:"Controls whether one or separate hatch objects are created for multiple boundaries"},hptransparency:{description:"Sets the default transparency for newly created hatches and fills"},insunits:{description:"Specifies drawing units for automatic scaling of inserted blocks, images, or xrefs"},jpgout:{description:"Exports to JPEG"},laycur:{description:"Changes the layer property of selected objects to the current layer",prompt:"Select objects to be changed to the current layer"},laydel:{description:"Deletes a layer and all objects on that layer"},layerclose:{description:"Closes the Layer Properties Manager"},layerp:{description:"Undoes the last change or set of changes made to layer settings"},layfrz:{description:"Freezes the layer of selected objects",prompt:"Select object on layer to freeze"},layiso:{description:"Isolates the layers of selected objects",prompt:"Select objects on layers to isolate"},laylck:{description:"Locks the layer of selected objects",prompt:"Select object on layer to lock"},layoff:{description:"Turns off the layer of selected objects",prompt:"Select object on layer to turn off"},layon:{description:"Turns on all layers in the drawing"},laythw:{description:"Thaws all frozen layers in the drawing"},layulk:{description:"Unlocks the layer of selected objects",prompt:"Select object on layer to unlock"},layuniso:{description:"Restores layers hidden or locked by LAYISO"},line:{description:"Draws straight line segments between points"},log:{description:"Logs debug information in console"},ltscale:{description:"Sets the global linetype scale factor for the drawing"},lunits:{description:"Sets the display format for coordinates and distances"},luprec:{description:"Sets the display precision for linear units, used together with LUNITS"},lwdisplay:{description:"Controls whether lineweights are displayed in the drawing"},clearmeasurements:{description:"Removes all measurements from the current layout"},measurementvis:{description:"Shows or hides measurements on the current layout"},measurementpanel:{description:"Opens the measurement palette"},measurementexport:{description:"Exports measurements to a sidecar JSON file"},measurementimport:{description:"Imports measurements from a sidecar JSON file"},measurearea:{description:"Calculates the area and perimeter of selected objects or points"},measureangle:{description:"Measures the angle between two lines or three points"},measurearc:{description:"Measures the length of an arc segment"},measuredistance:{description:"Measures the distance and delta values between two points"},measurecontinuous:{description:"Measures chained distances by picking successive points until Enter or Cancel"},measurepoint:{description:"Measures the X/Y coordinates of a picked point"},measurement:{description:"Sets whether the drawing uses English (imperial) or metric units"},measurementcolor:{description:"Sets the color used for measurement overlays"},modelbkcolor:{description:"Sets the background color of the model-space drawing area"},mline:{description:"Creates multiple parallel lines as one multiline object"},move:{description:"Moves selected entities by a displacement vector",prompt:"Select entities"},objectscale:{description:"Adds or deletes supported annotation scales for selected annotative objects",prompt:"Select annotative objects"},offset:{description:"Creates parallel curves, polylines, or circles at a specified distance"},mtext:{description:"Creates one mtext entity"},open:{description:"Opens an existing drawing file"},openprof:{description:"Controls whether open-file stage timing profiles are logged to the console"},openperf:{description:"Opens the Open Performance palette with timings from the last drawing open"},orthomode:{description:"Constrains cursor movement to the horizontal or vertical axis"},osmode:{description:"Sets running Object Snap modes using a bitcode value"},pan:{description:"Shifts the view without changing the viewing direction or magnification"},paperbkcolor:{description:"Sets the background color of the paper-space (layout) drawing area"},pdmode:{description:"Controls how POINT entities are displayed"},pdsize:{description:"Sets the display size for POINT entities"},pickbox:{description:"Sets the size (in pixels) of the selection box used to pick objects"},pline:{description:"Creates a polyline by specifying multiple points"},pngout:{description:"Exports to PNG"},point:{description:"Creates points"},polaraddang:{description:"Stores additional polar tracking angles as a semicolon-separated list"},polarang:{description:"Sets the polar angle increment for polar tracking"},polarmode:{description:"Controls polar and object snap tracking settings"},polygon:{description:"Creates a regular polygon by center/radius or by one polygon edge"},qnew:{description:"Starts a new drawing"},close:{description:"Closes the current drawing"},ray:{description:"Creates a ray that starts at a point and extends to infinity"},rectang:{description:"Creates a rectangle by specifying two opposite corners"},regen:{description:"Redraws the current drawing"},revcloud:{description:"Creates or modifies a revision cloud"},markuptext:{description:"Places a text markup label"},markupline:{description:"Creates a line markup"},markuparrow:{description:"Creates an arrow markup"},markupcloud:{description:"Creates a revision cloud markup"},markuprect:{description:"Creates a rectangle markup"},markupcircle:{description:"Creates a circle markup"},markuphighlight:{description:"Creates a highlight rectangle markup"},markupcallout:{description:"Creates a callout: pick leader tip, place text box, then enter text"},markupstamp:{description:"Places a stamp or custom symbol"},markupvis:{description:"Shows or hides markups"},clearmarkups:{description:"Clears all markups on the current layout"},markupexport:{description:"Exports markups to a sidecar JSON file"},markupimport:{description:"Imports markups from a sidecar JSON file"},markuppanel:{description:"Opens the markup palette"},rotate:{description:"Rotates selected entities around a base point",prompt:"Select entities"},select:{description:"Selects entities"},shortcutmenu:{description:"Controls the availability of shortcut menus in the drawing area"},sketch:{description:"Creates a series of freehand line segments"},spline:{description:"Creates a smooth spline curve by specifying control points"},textstyle:{description:"Sets the name of the current text style"},unitmode:{description:"Controls fractional display of coordinates when LUNITS is Architectural or Fractional"},switchbg:{description:"Toggles the drawing area background between white and black"},readingmode:{description:"Toggles reading mode: black linework on a white canvas for easier review"},unisolateobjects:{description:"Redisplay all objects hidden by HIDEOBJECTS"},undo:{description:"Undoes the last database editing operation",nothingToUndo:"Nothing to undo."},redo:{description:"Redoes the last undone database editing operation",nothingToRedo:"Nothing to redo."},xline:{description:"Creates a construction line that extends infinitely in both directions"},zoom:{description:"Zooms to display the maximum extents of all entities"}},USER:{}},w0={...M,ACAD:{...M.ACAD,"-hatch":{...M.ACAD["-hatch"],description:"إنشاء تعبئة تهشير باستخدام خيارات سطر الأوامر دون واجهة الشريط"},"-layer":{...M.ACAD["-layer"],description:"إدارة الطبقات باستخدام خيارات سطر الأوامر"},about:{...M.ACAD.about,description:"عرض معلومات حول mlightcad"},acadver:{...M.ACAD.acadver,description:"عرض معرّف إصدار قاعدة بيانات الرسم (للقراءة فقط)"},angbase:{...M.ACAD.angbase,description:"تحديد اتجاه زاوية الأساس 0 بالنسبة إلى نظام الإحداثيات UCS الحالي"},angdir:{...M.ACAD.angdir,description:"تحديد ما إذا كانت الزوايا الموجبة تُقاس مع أو عكس اتجاه عقارب الساعة"},arc:{...M.ACAD.arc,description:"إنشاء قوس"},aunits:{...M.ACAD.aunits,description:"تحديد تنسيق عرض الزوايا"},auprec:{...M.ACAD.auprec,description:"تحديد دقة عرض الزوايا بالتكامل مع AUNITS"},bmpout:{...M.ACAD.bmpout,description:"تصدير الرسم إلى BMP"},cdxf:{...M.ACAD.cdxf,description:"تصدير الرسم الحالي إلى DXF"},cpdf:{...M.ACAD.cpdf,description:"تصدير الرسم الحالي إلى PDF"},"-cpdf":{...M.ACAD["-cpdf"],description:"تصدير الرسم الحالي إلى PDF باستخدام خيارات سطر الأوامر"},cecolor:{...M.ACAD.cecolor,description:"تحديد اللون الافتراضي الحالي للعناصر الجديدة"},celtscale:{...M.ACAD.celtscale,description:"التحكم في معامل مقياس نوع الخط للعناصر الجديدة"},celtype:{...M.ACAD.celtype,description:"تحديد نوع الخط للعناصر الجديدة"},celweight:{...M.ACAD.celweight,description:"تحديد سُمك الخط الافتراضي للعناصر الجديدة"},cetransparency:{...M.ACAD.cetransparency,description:"تحديد الشفافية للعناصر الجديدة"},cachefont:{...M.ACAD.cachefont,description:"تخزين ملف خط محلي مؤقتًا في IndexedDB لاستخدامه في عرض النص"},circle:{...M.ACAD.circle,description:"إنشاء دائرة باستخدام المركز ونصف القطر"},clayer:{...M.ACAD.clayer,description:"تحديد الطبقة الحالية للعناصر الجديدة وعمليات التحرير"},cmleaderstyle:{...M.ACAD.cmleaderstyle,description:"تحديد اسم نمط Multileader الحالي"},cmlscale:{...M.ACAD.cmlscale,description:"التحكم في العرض الكلي للخط متعدد المسارات"},cmlstyle:{...M.ACAD.cmlstyle,description:"تحديد اسم نمط الخط متعدد المسارات الحالي"},colortheme:{...M.ACAD.colortheme,description:"التحكم في سمة ألوان واجهة المستخدم بين الوضع الداكن والفاتح"},copy:{...M.ACAD.copy,description:"نسخ العناصر المحددة إلى مواضع جديدة",prompt:"حدد العناصر"},csvg:{...M.ACAD.csvg,description:"تحويل الرسم الحالي إلى SVG"},chtml:{...M.ACAD.chtml,description:"تصدير الرسم الحالي إلى ملف HTML مستقل يعمل دون اتصال"},"-chtml":{...M.ACAD["-chtml"],description:"تصدير الرسم الحالي إلى HTML باستخدام خيارات سطر الأوامر"},dimlinear:{...M.ACAD.dimlinear,description:"إنشاء أبعاد خطية"},dimaligned:{...M.ACAD.dimaligned},dimradius:{...M.ACAD.dimradius},dimdiameter:{...M.ACAD.dimdiameter},dimangular:{...M.ACAD.dimangular},dimarc:{...M.ACAD.dimarc},dimordinate:{...M.ACAD.dimordinate},dimcontinue:{...M.ACAD.dimcontinue},dimbaseline:{...M.ACAD.dimbaseline},dimstyle:{...M.ACAD.dimstyle,description:"تحديد اسم نمط الأبعاد الحالي"},dwgname:{...M.ACAD.dwgname,description:"عرض اسم ملف الرسم الحالي (للقراءة فقط)"},loginname:{...M.ACAD.loginname,description:"عرض اسم تسجيل دخول المستخدم (للقراءة فقط)"},dynmode:{...M.ACAD.dynmode,description:"التحكم في إعدادات الإدخال الديناميكي عند المؤشر"},dynprompt:{...M.ACAD.dynprompt,description:"التحكم في عرض رسائل الأوامر داخل تلميحات الإدخال الديناميكي"},ellipse:{...M.ACAD.ellipse,description:"إنشاء قطع ناقص أو قوس بيضاوي باستخدام نهايات المحور أو المركز"},erase:{...M.ACAD.erase,description:"حذف العناصر المحددة من الرسم",prompt:"حدد العناصر"},extmax:{...M.ACAD.extmax,description:"عرض الركن العلوي الأيمن لحدود الرسم في مساحة النموذج (للقراءة فقط)"},extmin:{...M.ACAD.extmin,description:"عرض الركن السفلي الأيسر لحدود الرسم في مساحة النموذج (للقراءة فقط)"},entout:{...M.ACAD.entout,description:"تصدير صورة معاينة مدمجة للعناصر المحددة",prompt:"حدد العناصر"},hideobjects:{...M.ACAD.hideobjects,description:"إخفاء العناصر المحددة مؤقتًا من العرض",prompt:"حدد العناصر"},imageattach:{...M.ACAD.imageattach,description:"إرفاق صورة نقطية كمرجع خارجي إلى الرسم الحالي"},"-insert":{...M.ACAD["-insert"],description:"إدراج تعريف كتلة داخل الرسم الحالي باستخدام سطر الأوامر"},xattach:{...M.ACAD.xattach,description:"إرفاق رسم DWG أو DXF كمرجع خارجي إلى الرسم الحالي"},gripcolor:{...M.ACAD.gripcolor,description:"تحديد لون مقابض التحكم غير المحددة للعناصر المحددة"},griphot:{...M.ACAD.griphot,description:"تحديد لون مقابض التحكم المحددة"},gripobjlimit:{...M.ACAD.gripobjlimit,description:"إيقاف عرض مقابض التحكم عندما يتجاوز عدد العناصر المحددة الحد المعين، والقيمة 0 تعني عدم وجود حد"},grips:{...M.ACAD.grips,description:"التحكم في عرض مقابض التحكم على العناصر المحددة"},gripsize:{...M.ACAD.gripsize,description:"تحديد حجم مربعات مقابض التحكم بالبكسل"},hatch:{...M.ACAD.hatch,description:"ملء منطقة مغلقة أو عناصر محددة بنمط تهشير"},ipdf:{...M.ACAD.ipdf,description:"استيراد الهندسة المتجهية من ملف PDF"},hpang:{...M.ACAD.hpang,description:"تحديد الزاوية الافتراضية بالراديان لأنماط التهشير الجديدة"},hpassoc:{...M.ACAD.hpassoc,description:"التحكم في كون التهشير الجديد ترابطيًا"},hpbackgroundcolor:{...M.ACAD.hpbackgroundcolor,description:"تحديد لون الخلفية الافتراضي لأنماط التهشير الجديدة"},hpcolor:{...M.ACAD.hpcolor,description:"تحديد اللون الافتراضي للتهشير الجديد"},hpdouble:{...M.ACAD.hpdouble,description:"التحكم في مضاعفة أنماط التهشير المعرفة بواسطة المستخدم"},hpislanddetection:{...M.ACAD.hpislanddetection,description:"التحكم في كيفية التعامل مع الجزر داخل حدود التهشير الجديدة"},hplayer:{...M.ACAD.hplayer,description:"تحديد الطبقة الافتراضية للتهشير والتعبئة الجديدة"},hpname:{...M.ACAD.hpname,description:"تحديد اسم نمط التهشير الافتراضي للعناصر الجديدة في الجلسة الحالية"},hpscale:{...M.ACAD.hpscale,description:"تحديد معامل المقياس الافتراضي لأنماط التهشير الجديدة"},hpseparate:{...M.ACAD.hpseparate,description:"التحكم في إنشاء عنصر تهشير واحد أو عناصر منفصلة عند وجود عدة حدود"},hptransparency:{...M.ACAD.hptransparency,description:"تحديد الشفافية الافتراضية للتهشير والتعبئة الجديدة"},insunits:{...M.ACAD.insunits,description:"تحديد وحدات الرسم المستخدمة في التحجيم التلقائي للكتل والصور والمراجع الخارجية عند الإدراج"},jpgout:{...M.ACAD.jpgout,description:"تصدير الرسم إلى JPEG"},laycur:{...M.ACAD.laycur,description:"تغيير طبقة العناصر المحددة إلى الطبقة الحالية",prompt:"حدد العناصر المطلوب نقلها إلى الطبقة الحالية"},laydel:{...M.ACAD.laydel,description:"حذف طبقة وجميع العناصر الموجودة عليها"},layerclose:{...M.ACAD.layerclose,description:"إغلاق مدير خصائص الطبقات"},layerp:{...M.ACAD.layerp,description:"التراجع عن آخر تغيير أو مجموعة تغييرات في إعدادات الطبقات"},layfrz:{...M.ACAD.layfrz,description:"تجميد طبقة العناصر المحددة",prompt:"حدد عنصرًا على الطبقة المراد تجميدها"},layiso:{...M.ACAD.layiso,description:"عزل طبقات العناصر المحددة",prompt:"حدد عناصر على الطبقات المراد عزلها"},laylck:{...M.ACAD.laylck,description:"قفل طبقة العناصر المحددة",prompt:"حدد عنصرًا على الطبقة المراد قفلها"},layoff:{...M.ACAD.layoff,description:"إيقاف طبقة العناصر المحددة",prompt:"حدد عنصرًا على الطبقة المراد إيقافها"},layon:{...M.ACAD.layon,description:"تشغيل جميع الطبقات في الرسم"},laythw:{...M.ACAD.laythw,description:"إلغاء تجميد جميع الطبقات المجمدة في الرسم"},layulk:{...M.ACAD.layulk,description:"إلغاء قفل طبقة العناصر المحددة",prompt:"حدد عنصرًا على الطبقة المراد إلغاء قفلها"},layuniso:{...M.ACAD.layuniso,description:"استعادة الطبقات التي تم إخفاؤها أو قفلها بواسطة LAYISO"},line:{...M.ACAD.line,description:"رسم مقاطع خطوط مستقيمة بين النقاط"},log:{...M.ACAD.log,description:"تسجيل معلومات تصحيح الأخطاء في وحدة التحكم"},ltscale:{...M.ACAD.ltscale,description:"تحديد معامل مقياس نوع الخط العام للرسم"},lunits:{...M.ACAD.lunits,description:"تحديد تنسيق عرض الإحداثيات والمسافات"},luprec:{...M.ACAD.luprec,description:"تحديد دقة عرض الوحدات الخطية بالتكامل مع LUNITS"},lwdisplay:{...M.ACAD.lwdisplay,description:"التحكم في عرض سُمك الخطوط داخل الرسم"},clearmeasurements:{...M.ACAD.clearmeasurements,description:"إزالة جميع القياسات من المخطط الحالي"},measurementvis:{...M.ACAD.measurementvis,description:"إظهار أو إخفاء القياسات في المخطط الحالي"},measurementpanel:{...M.ACAD.measurementpanel,description:"فتح لوحة القياس"},measurementexport:{...M.ACAD.measurementexport,description:"تصدير القياسات إلى ملف JSON جانبي"},measurementimport:{...M.ACAD.measurementimport,description:"استيراد القياسات من ملف JSON جانبي"},measurearea:{...M.ACAD.measurearea,description:"حساب المساحة والمحيط للعناصر أو النقاط المحددة"},measureangle:{...M.ACAD.measureangle,description:"قياس الزاوية بين خطين أو باستخدام ثلاث نقاط"},measurearc:{...M.ACAD.measurearc,description:"قياس طول مقطع قوس"},measuredistance:{...M.ACAD.measuredistance,description:"قياس المسافة وفروق الإحداثيات بين نقطتين"},measurecontinuous:{...M.ACAD.measurecontinuous,description:"قياس مسافات متسلسلة باختيار نقاط متتالية حتى Enter أو إلغاء"},measurepoint:{...M.ACAD.measurepoint,description:"قياس إحداثيات X وY لنقطة محددة"},measurement:{...M.ACAD.measurement,description:"تحديد ما إذا كان الرسم يستخدم الوحدات الإمبراطورية أو المترية"},measurementcolor:{...M.ACAD.measurementcolor,description:"تحديد اللون المستخدم لتراكبات القياس"},modelbkcolor:{...M.ACAD.modelbkcolor,description:"تحديد لون خلفية مساحة النموذج"},mline:{...M.ACAD.mline,description:"إنشاء عدة خطوط متوازية كعنصر متعدد الخطوط واحد"},move:{...M.ACAD.move,description:"نقل العناصر المحددة باستخدام متجه إزاحة",prompt:"حدد العناصر"},offset:{...M.ACAD.offset,description:"إنشاء منحنيات أو خطوط متعددة أو دوائر موازية على مسافة محددة"},mtext:{...M.ACAD.mtext,description:"إنشاء عنصر نص متعدد الأسطر"},open:{...M.ACAD.open,description:"فتح ملف رسم موجود"},openprof:{...M.ACAD.openprof,description:"التحكم في تسجيل أزمنة مراحل فتح الملفات داخل وحدة التحكم"},openperf:{...M.ACAD.openperf,description:"فتح لوحة أداء الفتح وعرض أزمنة آخر عملية فتح للرسم"},orthomode:{...M.ACAD.orthomode,description:"تقييد حركة المؤشر على المحور الأفقي أو الرأسي"},osmode:{...M.ACAD.osmode,description:"تحديد أوضاع Object Snap المستمرة باستخدام قيمة bitcode"},pan:{...M.ACAD.pan,description:"تحريك العرض دون تغيير اتجاه الرؤية أو مستوى التكبير"},paperbkcolor:{...M.ACAD.paperbkcolor,description:"تحديد لون خلفية مساحة الورق أو المخطط"},pdmode:{...M.ACAD.pdmode,description:"التحكم في طريقة عرض عناصر POINT"},pdsize:{...M.ACAD.pdsize,description:"تحديد حجم عرض عناصر POINT"},pickbox:{...M.ACAD.pickbox,description:"تحديد حجم مربع التحديد المستخدم لاختيار العناصر بالبكسل"},pline:{...M.ACAD.pline,description:"إنشاء متعدد خطوط باستخدام عدة نقاط"},pngout:{...M.ACAD.pngout,description:"تصدير الرسم إلى PNG"},point:{...M.ACAD.point,description:"إنشاء نقاط"},polaraddang:{...M.ACAD.polaraddang,description:"تخزين زوايا إضافية للتتبع القطبي كقائمة مفصولة بفواصل منقوطة"},polarang:{...M.ACAD.polarang,description:"تحديد مقدار زيادة الزاوية للتتبع القطبي"},polarmode:{...M.ACAD.polarmode,description:"التحكم في إعدادات التتبع القطبي وتتبع Object Snap"},polygon:{...M.ACAD.polygon,description:"إنشاء مضلع منتظم باستخدام المركز ونصف القطر أو باستخدام أحد أضلاع المضلع"},qnew:{...M.ACAD.qnew,description:"بدء رسم جديد"},close:{...M.ACAD.close,description:"إغلاق الرسم الحالي"},ray:{...M.ACAD.ray,description:"إنشاء شعاع يبدأ من نقطة ويمتد إلى ما لا نهاية"},rectang:{...M.ACAD.rectang,description:"إنشاء مستطيل بتحديد ركنين متقابلين"},regen:{...M.ACAD.regen,description:"إعادة رسم العرض الحالي"},revcloud:{...M.ACAD.revcloud,description:"إنشاء أو تعديل سحابة مراجعة"},markuptext:{...M.ACAD.markuptext,description:"وضع علامة مراجعة نصية"},markupline:{...M.ACAD.markupline,description:"إنشاء علامة مراجعة خطية"},markuparrow:{...M.ACAD.markuparrow,description:"إنشاء سهم مراجعة"},markupcloud:{...M.ACAD.markupcloud,description:"إنشاء سحابة مراجعة"},markuprect:{...M.ACAD.markuprect,description:"إنشاء مستطيل مراجعة"},markupcircle:{...M.ACAD.markupcircle,description:"إنشاء دائرة مراجعة"},markuphighlight:{...M.ACAD.markuphighlight,description:"إنشاء مستطيل تمييز"},markupcallout:{...M.ACAD.markupcallout,description:"إنشاء وسيلة شرح: حدد رأس خط التوجيه ثم موضع مربع النص ثم أدخل النص"},markupstamp:{...M.ACAD.markupstamp,description:"وضع ختم أو رمز مخصص"},markupvis:{...M.ACAD.markupvis,description:"إظهار أو إخفاء علامات المراجعة"},clearmarkups:{...M.ACAD.clearmarkups,description:"مسح جميع علامات المراجعة من المخطط الحالي"},markupexport:{...M.ACAD.markupexport,description:"تصدير علامات المراجعة إلى ملف JSON جانبي"},markupimport:{...M.ACAD.markupimport,description:"استيراد علامات المراجعة من ملف JSON جانبي"},markuppanel:{...M.ACAD.markuppanel,description:"فتح لوحة علامات المراجعة"},rotate:{...M.ACAD.rotate,description:"تدوير العناصر المحددة حول نقطة أساس",prompt:"حدد العناصر"},select:{...M.ACAD.select,description:"تحديد العناصر"},shortcutmenu:{...M.ACAD.shortcutmenu,description:"التحكم في إتاحة القوائم المختصرة داخل منطقة الرسم"},sketch:{...M.ACAD.sketch,description:"إنشاء سلسلة من مقاطع الخطوط بالرسم الحر"},spline:{...M.ACAD.spline,description:"إنشاء منحنى Spline ناعم باستخدام نقاط التحكم"},textstyle:{...M.ACAD.textstyle,description:"تحديد اسم نمط النص الحالي"},unitmode:{...M.ACAD.unitmode,description:"التحكم في عرض الكسور للإحداثيات عندما يكون LUNITS من النوع Architectural أو Fractional"},switchbg:{...M.ACAD.switchbg,description:"التبديل بين الخلفية البيضاء والسوداء لمنطقة الرسم"},unisolateobjects:{...M.ACAD.unisolateobjects,description:"إعادة عرض جميع العناصر التي تم إخفاؤها بواسطة HIDEOBJECTS"},undo:{...M.ACAD.undo,description:"التراجع عن آخر عملية تحرير في قاعدة بيانات الرسم",nothingToUndo:"لا توجد عملية يمكن التراجع عنها."},redo:{...M.ACAD.redo,description:"إعادة آخر عملية تم التراجع عنها",nothingToRedo:"لا توجد عملية يمكن إعادتها."},xline:{...M.ACAD.xline,description:"إنشاء خط إنشائي يمتد إلى ما لا نهاية في الاتجاهين"},zoom:{...M.ACAD.zoom,description:"التكبير أو التصغير لعرض أقصى امتداد لجميع العناصر"}},USER:{...M.USER}},R={arc:{startPointOrCenter:"Specify start point of arc or",secondPointOrOptions:"Specify second point of arc or",secondPoint:"Specify second point of arc",startPoint:"Specify start point of arc",centerPoint:"Specify center point of arc",endPoint:"Specify end point of arc",endPointOrOptions:"Specify end point of arc or",centerPointOrOptions:"Specify center point of arc",includedAngle:"Specify included angle",chordLength:"Specify chord length",tangentDirection:"Specify tangent direction for start point of arc",radius:"Specify radius of arc",keywords:{center:{display:"Center(C)",local:"Center",global:"Center"},end:{display:"End(E)",local:"End",global:"End"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},chordLength:{display:"chord Length(L)",local:"Chord Length",global:"ChordLength"},direction:{display:"Direction(D)",local:"Direction",global:"Direction"},radius:{display:"Radius(R)",local:"Radius",global:"Radius"}},invalid:{threePoint:"Invalid 3-point arc: points are collinear or cannot define an arc.",center:"Invalid center input: start and end points must lie on the same circle.",angle:"Invalid angle input: included angle must be greater than 0 and less than 360 degrees.",chordLength:"Invalid chord length: value is out of range for the current radius.",direction:"Invalid direction: cannot construct an arc from this tangent direction.",radius:"Invalid radius: the specified radius cannot connect start and end points."}},circle:{center:"Specify the center of circle",centerOrOptions:"Specify center point of circle or",radius:"Specify the radius of circle",radiusOrDiameter:"Specify radius of circle or",diameter:"Specify diameter of circle",twoPointFirst:"Specify first endpoint of circle diameter",twoPointSecond:"Specify second endpoint of circle diameter",threePointFirst:"Specify first point on circle",threePointSecond:"Specify second point on circle",threePointThird:"Specify third point on circle",keywords:{threeP:{display:"3P(3P)",local:"3P",global:"3P"},twoP:{display:"2P(2P)",local:"2P",global:"2P"},diameter:{display:"Diameter(D)",local:"Diameter",global:"Diameter"}}},copy:{basePointOrOptions:"Specify base point or",displacementOrArray:"Specify displacement or",secondPointOrArray:"Specify second point or",modePrompt:"Enter copy mode option",arrayItemCount:"Enter the number of items in the array including the original",arraySecondPointOrFit:"Specify second point or",arrayFitSecondPoint:"Specify second point",keywords:{displacement:{display:"Displacement(D)",local:"Displacement",global:"Displacement"},mode:{display:"Mode(O)",local:"Mode",global:"Mode"},multiple:{display:"Multiple(M)",local:"Multiple",global:"Multiple"},single:{display:"Single(S)",local:"Single",global:"Single"},array:{display:"Array(A)",local:"Array",global:"Array"},fit:{display:"Fit(F)",local:"Fit",global:"Fit"}}},dimlinear:{xLine1Point:"Specify first extension line origin or <select object>",xLine2Point:"Specify second extension line origin",dimLinePoint:"Specify dimension line location",selectObject:"Select object to dimension",rejectObject:"Object cannot be dimensioned with DIMLINEAR.",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",rotationAngle:"Specify angle of dimension line",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},horizontal:{display:"Horizontal(H)",local:"Horizontal",global:"Horizontal"},vertical:{display:"Vertical(V)",local:"Vertical",global:"Vertical"},rotated:{display:"Rotated(R)",local:"Rotated",global:"Rotated"}}},dimaligned:{xLine1Point:"Specify first extension line origin or <select object>",xLine2Point:"Specify second extension line origin",dimLinePoint:"Specify dimension line location",selectObject:"Select object to dimension",rejectObject:"Object cannot be dimensioned with DIMALIGNED.",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimradius:{selectObject:"Select arc or circle",rejectObject:"Must select an arc or circle.",dimLinePoint:"Specify dimension line location",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimdiameter:{selectObject:"Select arc or circle",rejectObject:"Must select an arc or circle.",dimLinePoint:"Specify dimension line location",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimangular:{vertexOrSelect:"Specify angle vertex or <select line>",xLine1Point:"Specify first angle endpoint",xLine2Point:"Specify second angle endpoint",arcPoint:"Specify dimension arc line location",selectFirstLine:"Select first line",selectSecondLine:"Select second line",rejectObject:"Must select a line.",linesParallel:"Lines are parallel — no angle intersection.",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimarc:{selectArc:"Select arc",rejectObject:"Must select an arc.",arcPoint:"Specify arc length dimension location",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"}}},dimordinate:{featurePoint:"Specify feature location",leaderEndpoint:"Specify leader endpoint",dimensionText:"Enter dimension text",textAngle:"Specify angle of dimension text",keywords:{mtext:{display:"Mtext(M)",local:"Mtext",global:"Mtext"},text:{display:"Text(T)",local:"Text",global:"Text"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},xdatum:{display:"Xdatum(X)",local:"Xdatum",global:"Xdatum"},ydatum:{display:"Ydatum(Y)",local:"Ydatum",global:"Ydatum"}}},dimcontinue:{nextPoint:"Specify a second extension line origin or",selectDimension:"Select continued dimension",rejectObject:"Must select a linear or angular dimension.",keywords:{select:{display:"Select(S)",local:"Select",global:"Select"}}},dimbaseline:{nextPoint:"Specify a second extension line origin or",selectDimension:"Select base dimension",rejectObject:"Must select a linear or angular dimension.",keywords:{select:{display:"Select(S)",local:"Select",global:"Select"}}},ellipse:{axisEndpointOrOptions:"Specify axis endpoint of ellipse or",arcAxisEndpointOrCenter:"Specify axis endpoint of elliptical arc or",center:"Specify center of ellipse",firstAxisEndpoint:"Specify endpoint of axis",secondAxisEndpoint:"Specify other endpoint of axis",otherAxisOrRotation:"Specify distance to other axis or",rotationAngle:"Specify rotation angle around major axis",arcStartAngle:"Specify start angle of elliptical arc",arcEndAngle:"Specify end angle of elliptical arc",keywords:{arc:{display:"Arc(A)",local:"Arc",global:"Arc"},center:{display:"Center(C)",local:"Center",global:"Center"},rotation:{display:"Rotation(R)",local:"Rotation",global:"Rotation"}},invalid:{axis:"Invalid axis input: axis length must be greater than 0.",otherAxis:"Invalid other-axis input: distance must be greater than 0.",rotation:"Invalid rotation input: resulting minor axis must be greater than 0."}},hatch:{prompt:"Select boundary object or",pickPoint:"Specify internal point (or press Enter to finish)",select:"Select objects to hatch",patternName:"Enter hatch pattern name",scale:"Specify hatch pattern scale",angle:"Specify hatch pattern angle",style:"Enter hatch style",associative:"Specify associativity",invalidBoundary:"Selected objects do not form a closed boundary.",keywords:{pick:{display:"Pick points(P)",local:"Pick points",global:"PickPoints"},select:{display:"Select objects(S)",local:"Select objects",global:"SelectObjects"},cancel:{display:"Cancel(C)",local:"Cancel",global:"Cancel"},pattern:{display:"Pattern(P)",local:"Pattern",global:"Pattern"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},style:{display:"Style(T)",local:"Style",global:"HatchStyle"},associative:{display:"Associative(AS)",local:"Associative",global:"AssociativeMode"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},outer:{display:"Outer(O)",local:"Outer",global:"Outer"},ignore:{display:"Ignore(I)",local:"Ignore",global:"Ignore"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}},hideobjects:{hidden:"object(s) hidden",restored:"object(s) restored",nothingToRestore:"No hidden objects to restore"},entout:{longSidePrompt:"Enter preview long side size in pixels",exported:"object preview(s) exported",skipped:"object(s) skipped",failed:{"no-preview-root":"Unable to build preview geometry for the selection","no-bounds":"Unable to compute preview bounds for the selection","capture-failed":"Unable to render the entity preview image","download-failed":"Preview rendered but the PNG download failed"}},layer:{main:"Enter option",listSummary:"Layer list was printed to browser console",emptyInput:"No layer name was entered.",newPrompt:"Enter name for new layer(s)",makePrompt:"Enter name of layer to make current",setPrompt:"Enter name of layer to set current",onPrompt:"Enter layer name(s) to turn on",offPrompt:"Enter layer name(s) to turn off",freezePrompt:"Enter layer name(s) to freeze",thawPrompt:"Enter layer name(s) to thaw",lockPrompt:"Enter layer name(s) to lock",unlockPrompt:"Enter layer name(s) to unlock",colorLayerPrompt:"Enter layer name(s) to change color",colorValuePrompt:"Enter color (ACI 1-255, RGB like 255,0,0, or CSS color name)",invalidColor:"Invalid color input.",descriptionLayerPrompt:"Enter layer name to edit description",descriptionValuePrompt:"Enter new layer description",created:"Created layer count",alreadyExists:"Layer already exists",notFound:"Layer not found",cannotChangeCurrent:"Cannot turn off or freeze the current layer.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Make(M)",local:"Make",global:"Make"},set:{display:"Set(S)",local:"Set",global:"Set"},new:{display:"New(N)",local:"New",global:"New"},on:{display:"On(ON)",local:"On",global:"On"},off:{display:"Off(OF)",local:"Off",global:"Off"},color:{display:"Color(C)",local:"Color",global:"Color"},freeze:{display:"Freeze(F)",local:"Freeze",global:"Freeze"},thaw:{display:"Thaw(T)",local:"Thaw",global:"Thaw"},lock:{display:"Lock(L)",local:"Lock",global:"Lock"},unlock:{display:"Unlock(U)",local:"Unlock",global:"Unlock"},description:{display:"Description(D)",local:"Description",global:"Description"}}},layon:{alreadyOn:"All layers are already on.",turnedOn:"Turned on layers"},laycur:{prompt:"Select objects to be changed to the current layer",currentLayerNotFound:"Current layer not found.",noObjects:"No valid objects were selected.",alreadyCurrent:"Selected objects are already on the current layer.",changed:"Changed objects to current layer"},layfrz:{prompt:"Select object on layer to freeze or",invalidSelection:"Invalid object selected.",settingsPrompt:"Enter LAYFRZ setting to change",viewportPrompt:"Specify viewport freeze behavior",blockSelectionPrompt:"Specify nested block selection behavior",vpfreezeFallback:"Current viewer does not support per-viewport layer freeze; using Freeze behavior instead.",nestedSelectionLimited:"Nested block selection settings are stored, but current picking still resolves the top-level entity layer.",layerNotFound:"Layer not found",cannotFreezeCurrent:"Cannot freeze the current layer.",alreadyFrozen:"Layer is already frozen",frozen:"Frozen layer",restored:"Restored layer",nothingToUndo:"There is no LAYFRZ action to undo.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},viewports:{display:"Viewports(V)",local:"Viewports",global:"Viewports"},blockSelection:{display:"Block selection(B)",local:"Block selection",global:"BlockSelection"},freeze:{display:"Freeze(F)",local:"Freeze",global:"Freeze"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"},block:{display:"Block(B)",local:"Block",global:"Block"},entity:{display:"Entity(E)",local:"Entity",global:"Entity"},none:{display:"None(N)",local:"None",global:"None"}}},layiso:{prompt:"Select objects on the layer(s) to be isolated or",settingsPrompt:"Enter setting for layers not isolated",offModePrompt:"Enter off behavior for layers not isolated",noLayers:"No valid layers were selected.",layerNotFound:"Layer not found",isolated:"Isolated layer(s)",affectedLayers:"affected layers",vpfreezeFallback:"Current viewer does not support per-viewport layer freeze; using Off behavior instead.",lockFadeFallback:"Current viewer does not support layer fade display; non-isolated layers will be locked without fade.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},off:{display:"Off(O)",local:"Off",global:"Off"},lockAndFade:{display:"Lock and fade(L)",local:"Lock and fade",global:"LockAndFade"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"}}},layuniso:{noPrevious:"No previous LAYISO layer state to restore.",layerNotFound:"Layer not found",nothingRestored:"No LAYISO layer changes were restored.",restored:"Restored layers"},laythw:{alreadyThawed:"All layers are already thawed.",thawed:"Thawed layers"},laylck:{prompt:"Select an object on the layer to be locked",invalidSelection:"Invalid object selected.",layerNotFound:"Layer not found",alreadyLocked:"Layer is already locked",locked:"Locked layer"},layulk:{prompt:"Select an object on the layer to be unlocked",invalidSelection:"Invalid object selected.",layerNotFound:"Layer not found",alreadyUnlocked:"Layer is already unlocked",unlocked:"Unlocked layer"},layoff:{prompt:"Select object on layer to turn off or",invalidSelection:"Invalid object selected.",settingsPrompt:"Enter LAYOFF setting to change",viewportPrompt:"Specify viewport behavior",blockSelectionPrompt:"Specify nested block selection behavior",vpfreezeFallback:"Current viewer does not support per-viewport layer off; using Off behavior instead.",nestedSelectionLimited:"Nested block selection settings are stored, but current picking still resolves the top-level entity layer.",layerNotFound:"Layer not found",cannotTurnOffCurrent:"Cannot turn off the current layer.",alreadyOff:"Layer is already off",turnedOff:"Turned off layer",restored:"Restored layer",nothingToUndo:"There is no LAYOFF action to undo.",keywords:{settings:{display:"Settings(S)",local:"Settings",global:"Settings"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},viewports:{display:"Viewports(V)",local:"Viewports",global:"Viewports"},blockSelection:{display:"Block selection(B)",local:"Block selection",global:"BlockSelection"},off:{display:"Off(O)",local:"Off",global:"Off"},vpfreeze:{display:"Vpfreeze(V)",local:"Vpfreeze",global:"Vpfreeze"},block:{display:"Block(B)",local:"Block",global:"Block"},entity:{display:"Entity(E)",local:"Entity",global:"Entity"},none:{display:"None(N)",local:"None",global:"None"}}},layerp:{restored:"Restored previous layer state.",noPreviousState:"There is no previous layer state to restore."},line:{firstPoint:"Specify the first point",firstPointOrContinue:"Specify first point or",nextPoint:"Specify the next point",nextPointWithOptions:"Specify next point or",keywords:{continue:{display:"Continue(C)",local:"Continue",global:"Continue"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"}}},xline:{firstPointOrOptions:"Specify a point or",secondPoint:"Specify second point",throughPoint:"Specify through point",angle:"Enter angle of xline",invalidDirection:"Invalid direction for XLINE.",keywords:{hor:{display:"Hor(H)",local:"Hor",global:"Hor"},ver:{display:"Ver(V)",local:"Ver",global:"Ver"},ang:{display:"Ang(A)",local:"Ang",global:"Ang"}}},ray:{startPoint:"Specify start point",throughPoint:"Specify through point"},mline:{startPointWithOptions:"Specify start point or",nextPointWithOptions:"Specify next point or",justificationPrompt:"Enter justification type",scalePrompt:"Specify mline scale",stylePrompt:"Enter mline style name or [?] for list",styleNotFound:"Mline style not found",styleListHeader:"Loaded mline styles",styleListEmpty:"No mline style is loaded in current drawing.",keywords:{justification:{display:"Justification(J)",local:"Justification",global:"Justification"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},style:{display:"Style(ST)",local:"Style",global:"Style"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},top:{display:"Top(T)",local:"Top",global:"Top"},zero:{display:"Zero(Z)",local:"Zero",global:"Zero"},bottom:{display:"Bottom(B)",local:"Bottom",global:"Bottom"}}},measureAngle:{vertex:"Specify vertex point",arm1:"Specify point on first arm",arm2:"Specify point on second arm"},measureArc:{startPoint:"Specify arc start point",throughPoint:"Specify a point on the arc",endPoint:"Specify arc end point",lockedEndPoint:"Specify arc end point (Ctrl to switch major/minor arc)",invalidPoints:"The three points are collinear and do not define an arc."},measureArea:{firstPoint:"Specify first point",nextPoint:"Specify next point (or press Enter to finish)"},measureDistance:{firstPoint:"Specify first point",secondPoint:"Specify second point"},measureContinuous:{firstPoint:"Specify first point",nextPoint:"Specify next point (or press Enter to finish)"},measurePoint:{point:"Specify point"},measurement:{import:{chooseFile:"Choose a measurement sidecar JSON file"}},markup:{author:"Specify review author (saved for later)",text:{point:"Specify text markup point",content:"Enter markup text"},line:{firstPoint:"Specify first point of line markup",secondPoint:"Specify second point of line markup"},arrow:{firstPoint:"Specify arrow start point",secondPoint:"Specify arrow tip"},cloud:{firstCorner:"Specify first corner of cloud",secondCorner:"Specify opposite corner of cloud"},rect:{firstCorner:"Specify first corner of rectangle",secondCorner:"Specify opposite corner of rectangle"},circle:{center:"Specify center of circle",radius:"Specify radius of circle"},shape:{calloutOn:"[Callout on]",calloutOff:"[Callout off]",calloutAnchor:"Specify callout text location",keywords:{callout:{display:"Callout(C)",local:"Callout",global:"Callout"},noCallout:{display:"NoCallout(N)",local:"NoCallout",global:"NoCallout"}}},highlight:{firstCorner:"Specify first corner of highlight",secondCorner:"Specify opposite corner of highlight"},callout:{tip:"Specify leader tip, or a cloud / rectangle / circle outline without a callout",anchor:"Specify callout text location",content:"Enter callout text"},stamp:{kind:"Enter stamp id [approved/rejected/revised/for-review/custom]",imageUrl:"Enter custom stamp image URL (optional)",caption:"Enter stamp caption (optional)",point:"Specify stamp insertion point"},import:{chooseFile:"Choose a markup sidecar JSON file"}},move:{basePointOrDisplacement:"Specify base point or",secondPointOrDisplacement:"Specify second point or",displacement:"Specify displacement",keywords:{displacement:{display:"Displacement(D)",local:"Displacement",global:"Displacement"}}},offset:{distance:"Specify offset distance",selectObject:"Select object to offset or press Enter to finish",sidePoint:"Specify point on side to offset",invalidDistance:"Offset distance must be greater than 0.",invalidSelection:"Selected object cannot be offset.",offsetFailed:"Unable to create an offset curve for the specified side."},mtext:{point:"Specify mtext insertion point"},bmpout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},jpgout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},pngout:{boundsFirstCorner:"Specify first corner of bounds",boundsSecondCorner:"Specify opposite corner",longSidePrompt:"Enter long side size in pixels"},imageattach:{insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",decodeFailed:"Failed to read the selected image file."},insert:{blockName:"Enter block name:",insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",invalidBlockName:"Invalid block name.",blockNotFound:"Block not found",xrefNotAllowed:"Cannot insert an external reference with -INSERT."},xattach:{insertionPoint:"Specify insertion point:",scale:"Specify scale factor:",rotation:"Specify rotation angle:",invalidScale:"Scale factor must be greater than 0.",unsupportedFile:"Please select a DWG or DXF file.",loading:"Loading external reference...",loadFailed:"Failed to read the selected drawing file."},point:{point:"Specify a point"},polygon:{numberOfSides:"Enter number of sides",centerOrEdge:"Specify center of polygon or",radiusOrType:"Enter options",edgeStart:"Specify first endpoint of edge",edgeEnd:"Specify second endpoint of edge",keywords:{edge:{display:"Edge(E)",local:"Edge",global:"Edge"},inscribed:{display:"Inscribed in circle(I)",local:"Inscribed in circle",global:"Inscribed"},circumscribed:{display:"Circumscribed about circle(C)",local:"Circumscribed about circle",global:"Circumscribed"}},invalid:{sides:"Invalid number of sides. Enter an integer between 3 and 1024.",radius:"Invalid radius. Radius must be greater than 0.",edge:"Invalid edge. The edge length must be greater than 0."}},polyline:{firstPoint:"Specify the first point",nextPoint:"Specify the next point (or press Enter to finish)",nextPointWithOptions:"Specify next point or",nextPointWithArcOptions:"Specify next point or",keywords:{arc:{display:"Arc(A)",local:"Arc",global:"Arc"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},line:{display:"Line(L)",local:"Line",global:"Line"},angle:{display:"Angle(A)",local:"Angle",global:"Angle"},center:{display:"Center(C)",local:"Center",global:"Center"},secondPoint:{display:"Second point(P)",local:"Second point",global:"SecondPoint"},radius:{display:"Radius(R)",local:"Radius",global:"Radius"}},arcAngle:"Specify arc angle",arcCenter:"Specify center point",arcSecondPoint:"Specify second point on arc",arcEndPoint:"Specify arc end point",arcRadius:"Specify arc radius"},rect:{firstPoint:"Specify first corner point",nextPoint:"Specify other corner point",firstPointWithOptions:"Specify first corner point or",otherCornerWithOptions:"Specify other corner point or",chamferFirst:"Specify first chamfer distance",chamferSecond:"Specify second chamfer distance",filletRadius:"Specify fillet radius",segmentWidth:"Specify rectangle line width",elevationValue:"Specify elevation",thicknessValue:"Specify thickness",rotationAngle:"Specify rectangle rotation angle",dimensionLength:"Specify rectangle length",dimensionWidth:"Specify rectangle width",areaValue:"Specify rectangle area",areaLengthOrWidth:"Specify rectangle length",areaSpecifyWidth:"Specify rectangle width",invalidPositive:"Invalid input. Please enter a value greater than 0.",invalidRect:"Unable to create rectangle. Please specify valid corners or dimensions.",thicknessNotSupported:"Rectangle thickness is currently not written to entity data. The thickness setting is ignored.",keywords:{chamfer:{display:"Chamfer(C)",local:"Chamfer",global:"Chamfer"},elevation:{display:"Elevation(E)",local:"Elevation",global:"Elevation"},fillet:{display:"Fillet(F)",local:"Fillet",global:"Fillet"},thickness:{display:"Thickness(T)",local:"Thickness",global:"Thickness"},width:{display:"Width(W)",local:"Width",global:"Width"},area:{display:"Area(A)",local:"Area",global:"Area"},dimensions:{display:"Dimensions(D)",local:"Dimensions",global:"Dimensions"},rotation:{display:"Rotation(R)",local:"Rotation",global:"Rotation"},length:{display:"Length(L)",local:"Length",global:"Length"},rectWidth:{display:"Width(W)",local:"Width",global:"Width"}}},rotate:{basePoint:"Specify base point",rotationAngleOrOptions:"Specify rotation angle or",referenceAngleOrPoints:"Specify reference angle or",firstReferencePoint:"Specify first point of reference angle",secondReferencePoint:"Specify second point",newAngle:"Specify new angle",keywords:{copy:{display:"Copy(C)",local:"Copy",global:"Copy"},reference:{display:"Reference(R)",local:"Reference",global:"Reference"},points:{display:"Points(P)",local:"Points",global:"Points"}},invalid:{referencePoints:"Invalid reference points: points must be different."}},revcloud:{firstCornerOrOptions:"Specify first corner point or",firstCorner:"Specify first corner point",oppositeCorner:"Specify opposite corner",startPoint:"Specify start point",nextPoint:"Specify next point",nextPointOrUndo:"Specify next point or",firstPoint:"Specify first point",guideCursor:"Guide cursor along cloud path (press Enter to finish)",arcLength:"Specify arc length",selectObject:"Select object",style:"Enter revision cloud arc style",reverseDirection:"Reverse direction",invalidArcLength:"Arc length must be greater than 0.",invalidObject:"Selected object cannot be converted to a revision cloud.",keywords:{arcLength:{display:"Arc length(A)",local:"Arc length",global:"ArcLength"},object:{display:"Object(O)",local:"Object",global:"Object"},rectangular:{display:"Rectangular(R)",local:"Rectangular",global:"Rectangular"},polygonal:{display:"Polygonal(P)",local:"Polygonal",global:"Polygonal"},freehand:{display:"Freehand(F)",local:"Freehand",global:"Freehand"},style:{display:"Style(S)",local:"Style",global:"Style"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},calligraphy:{display:"Calligraphy(C)",local:"Calligraphy",global:"Calligraphy"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}},sketch:{specifySketch:"Specify sketch or",sketching:"Move the pointer to sketch (click or press Enter to stop)",type:"Enter sketch type",increment:"Specify sketch increment",tolerance:"Specify spline tolerance",firstPoint:"Specify the first point",nextPoint:"Specify the end point",keywords:{type:{display:"Type(T)",local:"Type",global:"Type"},increment:{display:"Increment(I)",local:"Increment",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"Lines(L)",local:"Lines",global:"Lines"},polyline:{display:"Polyline(P)",local:"Polyline",global:"Polyline"},spline:{display:"Spline(S)",local:"Spline",global:"Spline"}}},spline:{firstPoint:"Specify the first point",nextPoint:"Specify the next point (or press Enter to finish)",firstPointWithOptions:"Specify first point or",nextPointWithFitOptions:"Specify next point or",nextPointWithCvOptions:"Specify next control vertex or",methodPrompt:"Enter spline creation method",knotsPrompt:"Enter knot parameterization",degreePrompt:"Specify spline degree",keywords:{method:{display:"Method(M)",local:"Method",global:"Method"},fit:{display:"Fit(F)",local:"Fit",global:"Fit"},cv:{display:"CV(C)",local:"CV",global:"CV"},knots:{display:"Knots(K)",local:"Knots",global:"Knots"},degree:{display:"Degree(D)",local:"Degree",global:"Degree"},undo:{display:"Undo(U)",local:"Undo",global:"Undo"},close:{display:"Close(C)",local:"Close",global:"Close"},chord:{display:"Chord(C)",local:"Chord",global:"Chord"},sqrtChord:{display:"Sqrt chord(S)",local:"Sqrt chord",global:"SqrtChord"},uniform:{display:"Uniform(U)",local:"Uniform",global:"Uniform"}}},objectscale:{action:"Enter an option",scaleName:"Enter annotation scale name",done:"Updated objects",none:"(none)",keywords:{add:{display:"Add(A)",local:"Add",global:"Add"},delete:{display:"Delete(D)",local:"Delete",global:"Delete"},list:{display:"List(L)",local:"List",global:"List"}}},sysvar:{prompt:"Please input new value"},zoom:{mainPrompt:"Specify corner of window or",firstCorner:"Specify first corner",secondCorner:"Specify opposite corner",centerPoint:"Specify center point",heightOrScale:"Enter height or scale factor (nX or nXP)",scaleFactor:"Enter scale factor (nX or nXP)",keywords:{all:{display:"All(A)",local:"All",global:"All"},center:{display:"Center(C)",local:"Center",global:"Center"},extents:{display:"Extents(E)",local:"Extents",global:"Extents"},previous:{display:"Previous(P)",local:"Previous",global:"Previous"},original:{display:"Original(O)",local:"Original",global:"Original"},saved:{display:"Saved(V)",local:"Saved",global:"Saved"},smart:{display:"Smart(I)",local:"Smart",global:"Smart"},scale:{display:"Scale(S)",local:"Scale",global:"Scale"},window:{display:"Window(W)",local:"Window",global:"Window"}}},chtml:{exportFormat:"Export format",exportInvisibleLayers:"Export invisible layers",exportLayouts:"Export layouts",background:"Background color",initialView:"Initial view when opening HTML",viewerMode:"Offline viewer mode",chunkSizeMiB:"Chunk size in MiB (multi-file package)",compressChunks:"Compress chunks (multi-file package)",keywords:{single:{display:"Single(S)",local:"Single",global:"Single"},multi:{display:"Multi-file package(M)",local:"Multi-file package",global:"Multi"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"},extents:{display:"Extents(E)",local:"Extents",global:"Extents"},current:{display:"Current(C)",local:"Current",global:"Current"},view:{display:"View(V)",local:"View",global:"View"},measure:{display:"Measure & Review(M)",local:"Measure & Review",global:"Measure"},black:{display:"Black(B)",local:"Black",global:"Black"},white:{display:"White(W)",local:"White",global:"White"},space:{display:"Space(S)",local:"Space",global:"Space"}}},cpdf:{modelSpaceFit:"Model space frame",exportLayouts:"Export layouts",textMode:"Text rendering",keywords:{extents:{display:"Extents(E)",local:"Extents",global:"Extents"},display:{display:"Display(D)",local:"Display",global:"Display"},text:{display:"Text(T)",local:"Text",global:"Text"},vector:{display:"Vector(V)",local:"Vector",global:"Vector"},yes:{display:"Yes(Y)",local:"Yes",global:"Yes"},no:{display:"No(N)",local:"No",global:"No"}}}},v0={...R,arc:{...R.arc,startPointOrCenter:"حدد نقطة بداية القوس أو",secondPointOrOptions:"حدد النقطة الثانية للقوس أو",secondPoint:"حدد النقطة الثانية للقوس",startPoint:"حدد نقطة بداية القوس",centerPoint:"حدد نقطة مركز القوس",endPoint:"حدد نقطة نهاية القوس",endPointOrOptions:"حدد نقطة نهاية القوس أو",centerPointOrOptions:"حدد نقطة مركز القوس",includedAngle:"حدد الزاوية المحصورة",chordLength:"حدد طول الوتر",tangentDirection:"حدد اتجاه المماس عند نقطة بداية القوس",radius:"حدد نصف قطر القوس",invalid:{...R.arc.invalid,threePoint:"قوس الثلاث نقاط غير صالح: النقاط على استقامة واحدة أو لا يمكنها تعريف قوس.",center:"إدخال المركز غير صالح: يجب أن تقع نقطتا البداية والنهاية على الدائرة نفسها.",angle:"الزاوية غير صالحة: يجب أن تكون الزاوية المحصورة أكبر من 0 وأقل من 360 درجة.",chordLength:"طول الوتر غير صالح: القيمة خارج النطاق المسموح به لنصف القطر الحالي.",direction:"الاتجاه غير صالح: لا يمكن إنشاء القوس باستخدام اتجاه المماس المحدد.",radius:"نصف القطر غير صالح: لا يمكن لنصف القطر المحدد توصيل نقطتي البداية والنهاية."},keywords:{...R.arc.keywords,center:{display:"المركز(C)",local:"المركز",global:"Center"},end:{display:"النهاية(E)",local:"النهاية",global:"End"},angle:{display:"زاوية(A)",local:"زاوية",global:"Angle"},chordLength:{display:"طول الوتر(L)",local:"طول الوتر",global:"ChordLength"},direction:{display:"الاتجاه(D)",local:"الاتجاه",global:"Direction"},radius:{display:"نصف القطر(R)",local:"نصف القطر",global:"Radius"}}},circle:{...R.circle,center:"حدد مركز الدائرة",centerOrOptions:"حدد نقطة مركز الدائرة أو",radius:"حدد نصف قطر الدائرة",radiusOrDiameter:"حدد نصف قطر الدائرة أو",diameter:"حدد قطر الدائرة",twoPointFirst:"حدد نقطة النهاية الأولى لقطر الدائرة",twoPointSecond:"حدد نقطة النهاية الثانية لقطر الدائرة",threePointFirst:"حدد النقطة الأولى على الدائرة",threePointSecond:"حدد النقطة الثانية على الدائرة",threePointThird:"حدد النقطة الثالثة على الدائرة",keywords:{...R.circle.keywords,threeP:{display:"3 نقاط(3P)",local:"3 نقاط",global:"3P"},twoP:{display:"نقطتان(2P)",local:"نقطتان",global:"2P"},diameter:{display:"القطر(D)",local:"القطر",global:"Diameter"}}},copy:{...R.copy,basePointOrOptions:"حدد نقطة الأساس أو",displacementOrArray:"حدد الإزاحة أو",secondPointOrArray:"حدد النقطة الثانية أو",modePrompt:"أدخل خيار وضع النسخ",arrayItemCount:"أدخل عدد العناصر في المصفوفة بما في ذلك العنصر الأصلي",arraySecondPointOrFit:"حدد النقطة الثانية أو",arrayFitSecondPoint:"حدد النقطة الثانية",keywords:{...R.copy.keywords,displacement:{display:"إزاحة(D)",local:"إزاحة",global:"Displacement"},mode:{display:"وضع(O)",local:"وضع",global:"Mode"},multiple:{display:"متعدد(M)",local:"متعدد",global:"Multiple"},single:{display:"مفرد(S)",local:"مفرد",global:"Single"},array:{display:"مصفوفة(A)",local:"مصفوفة",global:"Array"},fit:{display:"ملاءمة(F)",local:"ملاءمة",global:"Fit"}}},dimlinear:{...R.dimlinear,xLine1Point:"حدد نقطة أصل خط الامتداد الأول",xLine2Point:"حدد نقطة أصل خط الامتداد الثاني",dimLinePoint:"حدد موقع خط البُعد"},dimaligned:{...R.dimaligned},dimradius:{...R.dimradius},dimdiameter:{...R.dimdiameter},dimangular:{...R.dimangular},dimarc:{...R.dimarc},dimordinate:{...R.dimordinate},dimcontinue:{...R.dimcontinue},dimbaseline:{...R.dimbaseline},ellipse:{...R.ellipse,axisEndpointOrOptions:"حدد نقطة نهاية محور القطع الناقص أو",arcAxisEndpointOrCenter:"حدد نقطة نهاية محور القوس البيضاوي أو",center:"حدد مركز القطع الناقص",firstAxisEndpoint:"حدد نقطة نهاية المحور الأولى",secondAxisEndpoint:"حدد نقطة النهاية الأخرى للمحور",otherAxisOrRotation:"حدد المسافة إلى المحور الآخر أو",rotationAngle:"حدد زاوية الدوران حول المحور الأكبر",arcStartAngle:"حدد زاوية بداية القوس البيضاوي",arcEndAngle:"حدد زاوية نهاية القوس البيضاوي",invalid:{...R.ellipse.invalid,axis:"المحور غير صالح: يجب أن يكون طول المحور أكبر من 0.",otherAxis:"المحور الآخر غير صالح: يجب أن تكون المسافة أكبر من 0.",rotation:"الدوران غير صالح: يجب أن يكون المحور الأصغر الناتج أكبر من 0."},keywords:{...R.ellipse.keywords,arc:{display:"قوس(A)",local:"قوس",global:"Arc"},center:{display:"المركز(C)",local:"المركز",global:"Center"},rotation:{display:"دوران(R)",local:"دوران",global:"Rotation"}}},hatch:{...R.hatch,prompt:"حدد عنصر حدود أو",pickPoint:"حدد نقطة داخلية (أو اضغط Enter للإنهاء)",select:"حدد العناصر المطلوب تهشيرها",patternName:"أدخل اسم نمط التهشير",scale:"حدد مقياس نمط التهشير",angle:"حدد زاوية نمط التهشير",style:"أدخل نمط التهشير",associative:"حدد حالة الترابط",invalidBoundary:"العناصر المحددة لا تكوّن حدودًا مغلقة.",keywords:{...R.hatch.keywords,pick:{display:"اختيار نقاط(P)",local:"اختيار نقاط",global:"PickPoints"},select:{display:"تحديد كائنات(S)",local:"تحديد كائنات",global:"SelectObjects"},cancel:{display:"إلغاء(C)",local:"إلغاء",global:"Cancel"},pattern:{display:"نمط(P)",local:"نمط",global:"Pattern"},scale:{display:"مقياس(S)",local:"مقياس",global:"Scale"},angle:{display:"زاوية(A)",local:"زاوية",global:"Angle"},style:{display:"أسلوب(T)",local:"أسلوب",global:"HatchStyle"},associative:{display:"ترابطي(AS)",local:"ترابطي",global:"AssociativeMode"},normal:{display:"عادي(N)",local:"عادي",global:"Normal"},outer:{display:"خارجي(O)",local:"خارجي",global:"Outer"},ignore:{display:"تجاهل(I)",local:"تجاهل",global:"Ignore"},yes:{display:"نعم(Y)",local:"نعم",global:"Yes"},no:{display:"لا(N)",local:"لا",global:"No"}}},line:{...R.line,firstPoint:"حدد النقطة الأولى",firstPointOrContinue:"حدد النقطة الأولى أو",nextPoint:"حدد النقطة التالية",nextPointWithOptions:"حدد النقطة التالية أو",keywords:{...R.line.keywords,continue:{display:"متابعة(C)",local:"متابعة",global:"Continue"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},close:{display:"إغلاق(C)",local:"إغلاق",global:"Close"}}},xline:{...R.xline,firstPointOrOptions:"حدد نقطة أو",secondPoint:"حدد النقطة الثانية",throughPoint:"حدد نقطة يمر بها الخط",angle:"أدخل زاوية الخط الإنشائي",invalidDirection:"اتجاه XLINE غير صالح.",keywords:{...R.xline.keywords,hor:{display:"أفقي(H)",local:"أفقي",global:"Hor"},ver:{display:"رأسي(V)",local:"رأسي",global:"Ver"},ang:{display:"زاوية(A)",local:"زاوية",global:"Ang"}}},ray:{...R.ray,startPoint:"حدد نقطة البداية",throughPoint:"حدد نقطة يمر بها الشعاع"},move:{...R.move,basePointOrDisplacement:"حدد نقطة الأساس أو",secondPointOrDisplacement:"حدد النقطة الثانية أو",displacement:"حدد الإزاحة",keywords:{...R.move.keywords,displacement:{display:"إزاحة(D)",local:"إزاحة",global:"Displacement"}}},offset:{...R.offset,distance:"حدد مسافة الإزاحة",selectObject:"حدد العنصر المطلوب إزاحته أو اضغط Enter للإنهاء",sidePoint:"حدد نقطة في جهة الإزاحة",invalidDistance:"يجب أن تكون مسافة الإزاحة أكبر من 0.",invalidSelection:"لا يمكن إنشاء إزاحة للعنصر المحدد.",offsetFailed:"تعذر إنشاء منحنى إزاحة في الجهة المحددة."},mtext:{...R.mtext,point:"حدد نقطة إدراج النص متعدد الأسطر"},point:{...R.point,point:"حدد نقطة"},polygon:{...R.polygon,numberOfSides:"أدخل عدد الأضلاع",centerOrEdge:"حدد مركز المضلع أو",radiusOrType:"أدخل الخيارات",edgeStart:"حدد نقطة النهاية الأولى للضلع",edgeEnd:"حدد نقطة النهاية الثانية للضلع",invalid:{...R.polygon.invalid,sides:"عدد الأضلاع غير صالح. أدخل عددًا صحيحًا بين 3 و1024.",radius:"نصف القطر غير صالح. يجب أن يكون أكبر من 0.",edge:"الضلع غير صالح. يجب أن يكون طول الضلع أكبر من 0."},keywords:{...R.polygon.keywords,edge:{display:"حافة(E)",local:"حافة",global:"Edge"},inscribed:{display:"داخل الدائرة(I)",local:"داخل الدائرة",global:"Inscribed"},circumscribed:{display:"محيط بالدائرة(C)",local:"محيط بالدائرة",global:"Circumscribed"}}},polyline:{...R.polyline,firstPoint:"حدد النقطة الأولى",nextPoint:"حدد النقطة التالية (أو اضغط Enter للإنهاء)",nextPointWithOptions:"حدد النقطة التالية أو",nextPointWithArcOptions:"حدد النقطة التالية أو",arcAngle:"حدد زاوية القوس",arcCenter:"حدد نقطة مركز القوس",arcSecondPoint:"حدد النقطة الثانية على القوس",arcEndPoint:"حدد نقطة نهاية القوس",arcRadius:"حدد نصف قطر القوس",keywords:{...R.polyline.keywords,arc:{display:"قوس(A)",local:"قوس",global:"Arc"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},close:{display:"إغلاق(C)",local:"إغلاق",global:"Close"},line:{display:"خط(L)",local:"خط",global:"Line"},angle:{display:"زاوية(A)",local:"زاوية",global:"Angle"},center:{display:"المركز(C)",local:"المركز",global:"Center"},secondPoint:{display:"النقطة الثانية(P)",local:"النقطة الثانية",global:"SecondPoint"},radius:{display:"نصف القطر(R)",local:"نصف القطر",global:"Radius"}}},rect:{...R.rect,firstPoint:"حدد نقطة الركن الأول",nextPoint:"حدد نقطة الركن المقابل",firstPointWithOptions:"حدد نقطة الركن الأول أو",otherCornerWithOptions:"حدد نقطة الركن الآخر أو",chamferFirst:"حدد مسافة الشطف الأولى",chamferSecond:"حدد مسافة الشطف الثانية",filletRadius:"حدد نصف قطر التدوير",segmentWidth:"حدد عرض خط المستطيل",elevationValue:"حدد المنسوب",thicknessValue:"حدد السماكة",rotationAngle:"حدد زاوية دوران المستطيل",dimensionLength:"حدد طول المستطيل",dimensionWidth:"حدد عرض المستطيل",areaValue:"حدد مساحة المستطيل",areaLengthOrWidth:"حدد طول المستطيل",areaSpecifyWidth:"حدد عرض المستطيل",invalidPositive:"إدخال غير صالح. أدخل قيمة أكبر من 0.",invalidRect:"تعذر إنشاء المستطيل. حدد أركانًا أو أبعادًا صالحة.",thicknessNotSupported:"سماكة المستطيل لا تُكتب حاليًا إلى بيانات العنصر، لذلك سيتم تجاهل إعداد السماكة.",keywords:{...R.rect.keywords,chamfer:{display:"شطف(C)",local:"شطف",global:"Chamfer"},elevation:{display:"ارتفاع(E)",local:"ارتفاع",global:"Elevation"},fillet:{display:"تقويس(F)",local:"تقويس",global:"Fillet"},thickness:{display:"السماكة(T)",local:"السماكة",global:"Thickness"},width:{display:"العرض(W)",local:"العرض",global:"Width"},area:{display:"مساحة(A)",local:"مساحة",global:"Area"},dimensions:{display:"الأبعاد(D)",local:"الأبعاد",global:"Dimensions"},rotation:{display:"دوران(R)",local:"دوران",global:"Rotation"},length:{display:"طول(L)",local:"طول",global:"Length"},rectWidth:{display:"عرض المستطيل(W)",local:"عرض المستطيل",global:"Width"}}},rotate:{...R.rotate,basePoint:"حدد نقطة الأساس",rotationAngleOrOptions:"حدد زاوية الدوران أو",referenceAngleOrPoints:"حدد الزاوية المرجعية أو",firstReferencePoint:"حدد النقطة الأولى للزاوية المرجعية",secondReferencePoint:"حدد النقطة الثانية",newAngle:"حدد الزاوية الجديدة",invalid:{...R.rotate.invalid,referencePoints:"النقاط المرجعية غير صالحة: يجب أن تكون النقطتان مختلفتين."},keywords:{...R.rotate.keywords,copy:{display:"نسخ(C)",local:"نسخ",global:"Copy"},reference:{display:"مرجع(R)",local:"مرجع",global:"Reference"},points:{display:"نقاط(P)",local:"نقاط",global:"Points"}}},spline:{...R.spline,firstPoint:"حدد النقطة الأولى",nextPoint:"حدد النقطة التالية (أو اضغط Enter للإنهاء)",firstPointWithOptions:"حدد النقطة الأولى أو",nextPointWithFitOptions:"حدد النقطة التالية أو",nextPointWithCvOptions:"حدد نقطة التحكم التالية أو",methodPrompt:"أدخل طريقة إنشاء Spline",knotsPrompt:"أدخل طريقة توزيع العقد",degreePrompt:"حدد درجة منحنى Spline",keywords:{...R.spline.keywords,method:{display:"طريقة(M)",local:"طريقة",global:"Method"},fit:{display:"ملاءمة(F)",local:"ملاءمة",global:"Fit"},cv:{display:"نقاط التحكم(C)",local:"نقاط التحكم",global:"CV"},knots:{display:"عُقد(K)",local:"عُقد",global:"Knots"},degree:{display:"درجة(D)",local:"درجة",global:"Degree"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},close:{display:"إغلاق(C)",local:"إغلاق",global:"Close"},chord:{display:"وتر(C)",local:"وتر",global:"Chord"},sqrtChord:{display:"جذر الوتر(S)",local:"جذر الوتر",global:"SqrtChord"},uniform:{display:"منتظم(U)",local:"منتظم",global:"Uniform"}}},zoom:{...R.zoom,mainPrompt:"حدد ركن نافذة التكبير أو",firstCorner:"حدد الركن الأول",secondCorner:"حدد الركن المقابل",centerPoint:"حدد نقطة المركز",heightOrScale:"أدخل الارتفاع أو معامل المقياس (nX أو nXP)",scaleFactor:"أدخل معامل المقياس (nX أو nXP)",keywords:{...R.zoom.keywords,all:{display:"الكل(A)",local:"الكل",global:"All"},center:{display:"المركز(C)",local:"المركز",global:"Center"},extents:{display:"الحدود(E)",local:"الحدود",global:"Extents"},previous:{display:"السابق(P)",local:"السابق",global:"Previous"},original:{display:"الأصلي(O)",local:"الأصلي",global:"Original"},saved:{display:"المحفوظ(V)",local:"المحفوظ",global:"Saved"},smart:{display:"ذكي(I)",local:"ذكي",global:"Smart"},scale:{display:"مقياس(S)",local:"مقياس",global:"Scale"},window:{display:"نافذة(W)",local:"نافذة",global:"Window"}}},hideobjects:{...R.hideobjects,hidden:"تم إخفاء العناصر",restored:"تمت استعادة العناصر",nothingToRestore:"لا توجد عناصر مخفية لاستعادتها"},entout:{...R.entout,longSidePrompt:"أدخل حجم الضلع الأطول للمعاينة بالبكسل",exported:"تم تصدير معاينات العناصر",skipped:"تم تخطي بعض العناصر",failed:{...R.entout.failed,"no-preview-root":"تعذر إنشاء هندسة المعاينة للعناصر المحددة","no-bounds":"تعذر حساب حدود المعاينة للعناصر المحددة","capture-failed":"تعذر عرض صورة معاينة العناصر","download-failed":"تم إنشاء المعاينة ولكن فشل تنزيل ملف PNG"}},layer:{...R.layer,main:"أدخل خيارًا",listSummary:"تمت طباعة قائمة الطبقات في وحدة تحكم المتصفح",emptyInput:"لم يتم إدخال اسم طبقة.",newPrompt:"أدخل اسم الطبقة أو الطبقات الجديدة",makePrompt:"أدخل اسم الطبقة المطلوب إنشاؤها وجعلها حالية",setPrompt:"أدخل اسم الطبقة المطلوب جعلها حالية",onPrompt:"أدخل أسماء الطبقات المطلوب تشغيلها",offPrompt:"أدخل أسماء الطبقات المطلوب إيقافها",freezePrompt:"أدخل أسماء الطبقات المطلوب تجميدها",thawPrompt:"أدخل أسماء الطبقات المطلوب إلغاء تجميدها",lockPrompt:"أدخل أسماء الطبقات المطلوب قفلها",unlockPrompt:"أدخل أسماء الطبقات المطلوب إلغاء قفلها",colorLayerPrompt:"أدخل أسماء الطبقات المطلوب تغيير لونها",colorValuePrompt:"أدخل اللون (ACI من 1 إلى 255، أو RGB مثل 255,0,0، أو اسم لون CSS)",invalidColor:"قيمة اللون غير صالحة.",descriptionLayerPrompt:"أدخل اسم الطبقة المطلوب تعديل وصفها",descriptionValuePrompt:"أدخل وصف الطبقة الجديد",created:"عدد الطبقات التي تم إنشاؤها",alreadyExists:"الطبقة موجودة بالفعل",notFound:"الطبقة غير موجودة",cannotChangeCurrent:"لا يمكن إيقاف الطبقة الحالية أو تجميدها.",keywords:{...R.layer.keywords,list:{display:"قائمة(?)",local:"قائمة",global:"?"},make:{display:"إنشاء(M)",local:"إنشاء",global:"Make"},set:{display:"تعيين(S)",local:"تعيين",global:"Set"},new:{display:"جديد(N)",local:"جديد",global:"New"},on:{display:"تشغيل(ON)",local:"تشغيل",global:"On"},off:{display:"إيقاف(OF)",local:"إيقاف",global:"Off"},color:{display:"لون(C)",local:"لون",global:"Color"},freeze:{display:"تجميد(F)",local:"تجميد",global:"Freeze"},thaw:{display:"إلغاء التجميد(T)",local:"إلغاء التجميد",global:"Thaw"},lock:{display:"قفل(L)",local:"قفل",global:"Lock"},unlock:{display:"إلغاء القفل(U)",local:"إلغاء القفل",global:"Unlock"},description:{display:"وصف(D)",local:"وصف",global:"Description"}}},layon:{...R.layon,alreadyOn:"جميع الطبقات قيد التشغيل بالفعل.",turnedOn:"تم تشغيل الطبقات"},laycur:{...R.laycur,prompt:"حدد العناصر المطلوب نقلها إلى الطبقة الحالية",currentLayerNotFound:"الطبقة الحالية غير موجودة.",noObjects:"لم يتم تحديد عناصر صالحة.",alreadyCurrent:"العناصر المحددة موجودة بالفعل على الطبقة الحالية.",changed:"تم نقل العناصر إلى الطبقة الحالية"},layfrz:{...R.layfrz,prompt:"حدد عنصرًا على الطبقة المطلوب تجميدها أو",invalidSelection:"العنصر المحدد غير صالح.",settingsPrompt:"أدخل إعداد LAYFRZ المطلوب تغييره",viewportPrompt:"حدد سلوك التجميد داخل منفذ العرض",blockSelectionPrompt:"حدد سلوك اختيار الكتل المتداخلة",vpfreezeFallback:"العارض الحالي لا يدعم تجميد الطبقات بشكل مستقل لكل منفذ عرض؛ سيتم استخدام التجميد العادي بدلًا من ذلك.",nestedSelectionLimited:"تم حفظ إعدادات اختيار الكتل المتداخلة، لكن الاختيار الحالي ما زال يعتمد طبقة العنصر ذي المستوى الأعلى.",layerNotFound:"الطبقة غير موجودة",cannotFreezeCurrent:"لا يمكن تجميد الطبقة الحالية.",alreadyFrozen:"الطبقة مجمدة بالفعل",frozen:"تم تجميد الطبقة",restored:"تمت استعادة الطبقة",nothingToUndo:"لا توجد عملية LAYFRZ يمكن التراجع عنها.",keywords:{...R.layfrz.keywords,settings:{display:"إعدادات(S)",local:"إعدادات",global:"Settings"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},viewports:{display:"إطارات العرض(V)",local:"إطارات العرض",global:"Viewports"},blockSelection:{display:"تحديد الكتلة(B)",local:"تحديد الكتلة",global:"BlockSelection"},freeze:{display:"تجميد(F)",local:"تجميد",global:"Freeze"},vpfreeze:{display:"تجميد إطار العرض(V)",local:"تجميد إطار العرض",global:"Vpfreeze"},block:{display:"كتلة(B)",local:"كتلة",global:"Block"},entity:{display:"كيان(E)",local:"كيان",global:"Entity"},none:{display:"لا شيء(N)",local:"لا شيء",global:"None"}}},layiso:{...R.layiso,prompt:"حدد عناصر على الطبقة أو الطبقات المطلوب عزلها أو",settingsPrompt:"أدخل إعداد الطبقات غير المعزولة",offModePrompt:"حدد سلوك إيقاف الطبقات غير المعزولة",noLayers:"لم يتم تحديد طبقات صالحة.",layerNotFound:"الطبقة غير موجودة",isolated:"تم عزل الطبقات",affectedLayers:"الطبقات المتأثرة",vpfreezeFallback:"العارض الحالي لا يدعم التجميد المستقل لكل منفذ عرض؛ سيتم استخدام الإيقاف بدلًا من ذلك.",lockFadeFallback:"العارض الحالي لا يدعم إظهار الطبقات بتأثير التلاشي؛ سيتم قفل الطبقات غير المعزولة دون تلاشي.",keywords:{...R.layiso.keywords,settings:{display:"إعدادات(S)",local:"إعدادات",global:"Settings"},off:{display:"إيقاف(O)",local:"إيقاف",global:"Off"},lockAndFade:{display:"قفل وتعتيم(L)",local:"قفل وتعتيم",global:"LockAndFade"},vpfreeze:{display:"تجميد إطار العرض(V)",local:"تجميد إطار العرض",global:"Vpfreeze"}}},layuniso:{...R.layuniso,noPrevious:"لا توجد حالة LAYISO سابقة لاستعادتها.",layerNotFound:"الطبقة غير موجودة",nothingRestored:"لم تتم استعادة أي تغييرات طبقات من LAYISO.",restored:"تمت استعادة الطبقات"},laythw:{...R.laythw,alreadyThawed:"جميع الطبقات غير مجمدة بالفعل.",thawed:"تم إلغاء تجميد الطبقات"},laylck:{...R.laylck,prompt:"حدد عنصرًا على الطبقة المطلوب قفلها",invalidSelection:"العنصر المحدد غير صالح.",layerNotFound:"الطبقة غير موجودة",alreadyLocked:"الطبقة مقفلة بالفعل",locked:"تم قفل الطبقة"},layulk:{...R.layulk,prompt:"حدد عنصرًا على الطبقة المطلوب إلغاء قفلها",invalidSelection:"العنصر المحدد غير صالح.",layerNotFound:"الطبقة غير موجودة",alreadyUnlocked:"الطبقة غير مقفلة بالفعل",unlocked:"تم إلغاء قفل الطبقة"},layoff:{...R.layoff,prompt:"حدد عنصرًا على الطبقة المطلوب إيقافها أو",invalidSelection:"العنصر المحدد غير صالح.",settingsPrompt:"أدخل إعداد LAYOFF المطلوب تغييره",viewportPrompt:"حدد سلوك منفذ العرض",blockSelectionPrompt:"حدد سلوك اختيار الكتل المتداخلة",vpfreezeFallback:"العارض الحالي لا يدعم إيقاف الطبقات بشكل مستقل لكل منفذ عرض؛ سيتم استخدام الإيقاف العادي بدلًا من ذلك.",nestedSelectionLimited:"تم حفظ إعدادات اختيار الكتل المتداخلة، لكن الاختيار الحالي ما زال يعتمد طبقة العنصر ذي المستوى الأعلى.",layerNotFound:"الطبقة غير موجودة",cannotTurnOffCurrent:"لا يمكن إيقاف الطبقة الحالية.",alreadyOff:"الطبقة متوقفة بالفعل",turnedOff:"تم إيقاف الطبقة",restored:"تمت استعادة الطبقة",nothingToUndo:"لا توجد عملية LAYOFF يمكن التراجع عنها.",keywords:{...R.layoff.keywords,settings:{display:"إعدادات(S)",local:"إعدادات",global:"Settings"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},viewports:{display:"إطارات العرض(V)",local:"إطارات العرض",global:"Viewports"},blockSelection:{display:"تحديد الكتلة(B)",local:"تحديد الكتلة",global:"BlockSelection"},off:{display:"إيقاف(O)",local:"إيقاف",global:"Off"},vpfreeze:{display:"تجميد إطار العرض(V)",local:"تجميد إطار العرض",global:"Vpfreeze"},block:{display:"كتلة(B)",local:"كتلة",global:"Block"},entity:{display:"كيان(E)",local:"كيان",global:"Entity"},none:{display:"لا شيء(N)",local:"لا شيء",global:"None"}}},layerp:{...R.layerp,restored:"تمت استعادة حالة الطبقات السابقة.",noPreviousState:"لا توجد حالة طبقات سابقة لاستعادتها."},mline:{...R.mline,startPointWithOptions:"حدد نقطة البداية أو",nextPointWithOptions:"حدد النقطة التالية أو",justificationPrompt:"أدخل نوع المحاذاة",scalePrompt:"حدد مقياس الخط المتعدد",stylePrompt:"أدخل اسم نمط الخط المتعدد أو [?] لعرض القائمة",styleNotFound:"نمط الخط المتعدد غير موجود",styleListHeader:"أنماط الخطوط المتعددة المحملة",styleListEmpty:"لا توجد أنماط خطوط متعددة محملة في الرسم الحالي.",keywords:{...R.mline.keywords,justification:{display:"محاذاة(J)",local:"محاذاة",global:"Justification"},scale:{display:"مقياس(S)",local:"مقياس",global:"Scale"},style:{display:"أسلوب(ST)",local:"أسلوب",global:"Style"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},close:{display:"إغلاق(C)",local:"إغلاق",global:"Close"},top:{display:"أعلى(T)",local:"أعلى",global:"Top"},zero:{display:"صفر(Z)",local:"صفر",global:"Zero"},bottom:{display:"أسفل(B)",local:"أسفل",global:"Bottom"}}},measureAngle:{...R.measureAngle,vertex:"حدد نقطة رأس الزاوية",arm1:"حدد نقطة على الضلع الأول",arm2:"حدد نقطة على الضلع الثاني"},measureArc:{...R.measureArc,startPoint:"حدد نقطة بداية القوس",throughPoint:"حدد نقطة على القوس",endPoint:"حدد نقطة نهاية القوس",lockedEndPoint:"حدد نقطة نهاية القوس (استخدم Ctrl للتبديل بين القوس الأكبر والأصغر)",invalidPoints:"النقاط الثلاث على استقامة واحدة ولا يمكنها تعريف قوس."},measureArea:{...R.measureArea,firstPoint:"حدد النقطة الأولى",nextPoint:"حدد النقطة التالية (أو اضغط Enter للإنهاء)"},measureDistance:{...R.measureDistance,firstPoint:"حدد النقطة الأولى",secondPoint:"حدد النقطة الثانية"},measureContinuous:{...R.measureContinuous,firstPoint:"حدد النقطة الأولى",nextPoint:"حدد النقطة التالية (أو اضغط Enter للإنهاء)"},measurePoint:{...R.measurePoint,point:"حدد نقطة"},measurement:{...R.measurement,import:{...R.measurement.import,chooseFile:"اختر ملف JSON جانبيًا يحتوي على القياسات"}},markup:{...R.markup,author:"حدد اسم مؤلف المراجعة (سيتم حفظه للاستخدام لاحقًا)",text:{...R.markup.text,point:"حدد موضع علامة النص",content:"أدخل نص علامة المراجعة"},line:{...R.markup.line,firstPoint:"حدد النقطة الأولى لخط المراجعة",secondPoint:"حدد النقطة الثانية لخط المراجعة"},arrow:{...R.markup.arrow,firstPoint:"حدد نقطة بداية السهم",secondPoint:"حدد رأس السهم"},cloud:{...R.markup.cloud,firstCorner:"حدد الركن الأول للسحابة",secondCorner:"حدد الركن المقابل للسحابة"},rect:{...R.markup.rect,firstCorner:"حدد الركن الأول للمستطيل",secondCorner:"حدد الركن المقابل للمستطيل"},circle:{...R.markup.circle,center:"حدد مركز الدائرة",radius:"حدد نصف قطر الدائرة"},shape:{...R.markup.shape,calloutOn:"[وسيلة الشرح مفعلة]",calloutOff:"[وسيلة الشرح معطلة]",calloutAnchor:"حدد موضع نص وسيلة الشرح",keywords:{...R.markup.shape.keywords,callout:{display:"تعليق توضيحي(C)",local:"تعليق توضيحي",global:"Callout"},noCallout:{display:"بدون تعليق توضيحي(N)",local:"بدون تعليق توضيحي",global:"NoCallout"}}},highlight:{...R.markup.highlight,firstCorner:"حدد الركن الأول لمنطقة التمييز",secondCorner:"حدد الركن المقابل لمنطقة التمييز"},callout:{...R.markup.callout,tip:"حدد رأس خط التوجيه، أو حدد إطار سحابة/مستطيل/دائرة بدون تعليق توضيحي",anchor:"حدد موضع نص وسيلة الشرح",content:"أدخل نص وسيلة الشرح"},stamp:{...R.markup.stamp,kind:"أدخل معرّف الختم [approved/rejected/revised/for-review/custom]",imageUrl:"أدخل رابط صورة الختم المخصص (اختياري)",caption:"أدخل تسمية الختم (اختياري)",point:"حدد نقطة إدراج الختم"},import:{...R.markup.import,chooseFile:"اختر ملف JSON جانبيًا يحتوي على علامات المراجعة"}},bmpout:{...R.bmpout,boundsFirstCorner:"حدد الركن الأول لحدود الصورة",boundsSecondCorner:"حدد الركن المقابل",longSidePrompt:"أدخل حجم الضلع الأطول بالبكسل"},jpgout:{...R.jpgout,boundsFirstCorner:"حدد الركن الأول لحدود الصورة",boundsSecondCorner:"حدد الركن المقابل",longSidePrompt:"أدخل حجم الضلع الأطول بالبكسل"},pngout:{...R.pngout,boundsFirstCorner:"حدد الركن الأول لحدود الصورة",boundsSecondCorner:"حدد الركن المقابل",longSidePrompt:"أدخل حجم الضلع الأطول بالبكسل"},imageattach:{...R.imageattach,insertionPoint:"حدد نقطة الإدراج:",scale:"حدد معامل المقياس:",rotation:"حدد زاوية الدوران:",invalidScale:"يجب أن يكون معامل المقياس أكبر من 0.",decodeFailed:"فشلت قراءة ملف الصورة المحدد."},insert:{...R.insert,blockName:"أدخل اسم الكتلة:",insertionPoint:"حدد نقطة الإدراج:",scale:"حدد معامل المقياس:",rotation:"حدد زاوية الدوران:",invalidScale:"يجب أن يكون معامل المقياس أكبر من 0.",invalidBlockName:"اسم الكتلة غير صالح.",blockNotFound:"الكتلة غير موجودة",xrefNotAllowed:"لا يمكن إدراج مرجع خارجي باستخدام -INSERT."},xattach:{...R.xattach,insertionPoint:"حدد نقطة الإدراج:",scale:"حدد معامل المقياس:",rotation:"حدد زاوية الدوران:",invalidScale:"يجب أن يكون معامل المقياس أكبر من 0.",unsupportedFile:"اختر ملف DWG أو DXF.",loading:"جارٍ تحميل المرجع الخارجي...",loadFailed:"فشلت قراءة ملف الرسم المحدد."},revcloud:{...R.revcloud,firstCornerOrOptions:"حدد نقطة الركن الأول أو",firstCorner:"حدد نقطة الركن الأول",oppositeCorner:"حدد الركن المقابل",startPoint:"حدد نقطة البداية",nextPoint:"حدد النقطة التالية",nextPointOrUndo:"حدد النقطة التالية أو",firstPoint:"حدد النقطة الأولى",guideCursor:"حرّك المؤشر على مسار السحابة (اضغط Enter للإنهاء)",arcLength:"حدد طول القوس",selectObject:"حدد عنصرًا",style:"أدخل نمط أقواس سحابة المراجعة",reverseDirection:"اعكس الاتجاه",invalidArcLength:"يجب أن يكون طول القوس أكبر من 0.",invalidObject:"لا يمكن تحويل العنصر المحدد إلى سحابة مراجعة.",keywords:{...R.revcloud.keywords,arcLength:{display:"طول القوس(A)",local:"طول القوس",global:"ArcLength"},object:{display:"كائن(O)",local:"كائن",global:"Object"},rectangular:{display:"مستطيل(R)",local:"مستطيل",global:"Rectangular"},polygonal:{display:"مضلّع(P)",local:"مضلّع",global:"Polygonal"},freehand:{display:"يدوي(F)",local:"يدوي",global:"Freehand"},style:{display:"أسلوب(S)",local:"أسلوب",global:"Style"},normal:{display:"عادي(N)",local:"عادي",global:"Normal"},calligraphy:{display:"خط زخرفي(C)",local:"خط زخرفي",global:"Calligraphy"},undo:{display:"تراجع(U)",local:"تراجع",global:"Undo"},yes:{display:"نعم(Y)",local:"نعم",global:"Yes"},no:{display:"لا(N)",local:"لا",global:"No"}}},sketch:{...R.sketch,specifySketch:"حدد الرسم الحر أو",sketching:"حرّك المؤشر للرسم (انقر أو اضغط Enter للإيقاف)",type:"أدخل نوع الرسم الحر",increment:"حدد مقدار زيادة الرسم",tolerance:"حدد سماحية منحنى Spline",firstPoint:"حدد النقطة الأولى",nextPoint:"حدد نقطة النهاية",keywords:{...R.sketch.keywords,type:{display:"نوع(T)",local:"نوع",global:"Type"},increment:{display:"زيادة(I)",local:"زيادة",global:"Increment"},tolerance:{display:"سماحية(L)",local:"سماحية",global:"Tolerance"},line:{display:"خط(L)",local:"خط",global:"Lines"},polyline:{display:"خط متعدد(P)",local:"خط متعدد",global:"Polyline"},spline:{display:"منحنى سبلاين(S)",local:"منحنى سبلاين",global:"Spline"}}},sysvar:{...R.sysvar,prompt:"أدخل القيمة الجديدة"},chtml:{...R.chtml,exportFormat:"تنسيق التصدير",exportInvisibleLayers:"تصدير الطبقات غير المرئية",exportLayouts:"تصدير المخططات",background:"لون الخلفية",initialView:"العرض الأولي عند فتح HTML",viewerMode:"وضع العارض دون اتصال",chunkSizeMiB:"حجم الجزء بالميبيبايت (حزمة متعددة الملفات)",compressChunks:"ضغط الأجزاء (حزمة متعددة الملفات)",keywords:{...R.chtml.keywords,single:{display:"ملف واحد(S)",local:"ملف واحد",global:"Single"},multi:{display:"حزمة متعددة الملفات(M)",local:"حزمة متعددة الملفات",global:"Multi"},yes:{display:"نعم(Y)",local:"نعم",global:"Yes"},no:{display:"لا(N)",local:"لا",global:"No"},extents:{display:"الحدود(E)",local:"الحدود",global:"Extents"},current:{display:"الحالي(C)",local:"الحالي",global:"Current"},view:{display:"عرض(V)",local:"عرض",global:"View"},measure:{display:"قياس(M)",local:"قياس",global:"Measure"},black:{display:"أسود(B)",local:"أسود",global:"Black"},white:{display:"أبيض(W)",local:"أبيض",global:"White"},space:{display:"حسب المساحة(S)",local:"حسب المساحة",global:"Space"}}},cpdf:{...R.cpdf,modelSpaceFit:"إطار مساحة النموذج",exportLayouts:"تصدير المخططات",textMode:"عرض النص",keywords:{...R.cpdf.keywords,extents:{display:"الامتدادات(E)",local:"الامتدادات",global:"Extents"},display:{display:"العرض(D)",local:"العرض",global:"Display"},yes:{display:"نعم(Y)",local:"نعم",global:"Yes"},no:{display:"لا(N)",local:"لا",global:"No"}}}},x0={document:{untitled:"بلا عنوان"},commandLine:{noLast:"(لا يوجد أمر سابق)",unknownCommand:"أمر غير معروف",executed:"تم تنفيذ الأمر",showHistory:"عرض سجل الأوامر",placeholder:"اكتب أمرًا",showMessages:"عرض سجل الرسائل",canceled:"*تم الإلغاء*",noHistory:"(لا يوجد سجل)",invalidInput:"إدخال غير صالح.",close:"إغلاق سطر الأوامر"},mobileCommand:{length:"الطول",angle:"الزاوية",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"تأكيد",cancel:"إلغاء",help:"مساعدة",back:"رجوع",collapse:"طي",expand:"توسيع"},inputManager:{firstCorner:"حدد الركن الأول أو",secondCorner:"حدد الركن الثاني أو"},message:{onLockedLayer:"على طبقة مقفلة.",fetchingDrawingFile:"جارٍ جلب ملف الرسم ...",exportingDxf:"جارٍ تصدير DXF ...",exportingPdf:"جارٍ تصدير PDF ...",exportingSvg:"جارٍ تصدير SVG ...",calculatingSmartExtents:"جارٍ حساب الملاءمة الذكية ...",importingPdf:"جارٍ استيراد PDF ...",exportingEntityPreview:"جارٍ تصدير الصورة ...",collectingMemoryProfile:"جارٍ تحليل الذاكرة ...",fontCached:"تم تخزين الخط بنجاح",fontCacheFailed:"فشل تخزين الخط",fontsNotFound:"خطوط غير موجودة في مستودع الخطوط: {fonts}.",fontsNotLoaded:"تعذر تحميل الخطوط: {fonts}.",fontMissedInDrawing:'الخط "{font}" مطلوب بواسطة {count} من كائنات النص ولكنه غير متاح. يتم العرض باستخدام "{replacementFont}".',fontMissedReplacement:'"{font}" (يُعرض بـ "{replacement}")',failedToGetAvaiableFonts:'تعذر الحصول على الخطوط من "{url}"!',failedToOpenFile:'فشل فتح الملف "{fileName}"!',failedToOpenFileToast:'فشل فتح "{fileName}". راجع مركز الإشعارات للتفاصيل.',failedToOpenFileWorkerOom:'فشل فتح "{fileName}". فشل التحليل بسبب نفاد الذاكرة المتاحة (محلل LibreDWG). يمكنك النقر على {dwgParserLink} لشراء محلل DWG التجاري وفتح الرسومات الكبيرة دون حدوث هذا الانهيار.',failedToOpenFileWorkerOomLink:"هذه الصفحة",failedToOpenFileWorkerTimeout:'فشل فتح "{fileName}". انتهت مهلة العملية أثناء تحليل الرسم.',failedToOpenFileFontLoadFailed:'فشل فتح "{fileName}". تعذر تحميل الخطوط المطلوبة.',failedToOpenFileLicenseExpired:'فشل فتح "{fileName}". انتهت صلاحية ترخيص محول DWG.',failedToOpenFileLicenseInvalid:'فشل فتح "{fileName}". ترخيص محول DWG مفقود أو غير صالح.',unknownEntities:"يحتوي هذا الرسم على {count} عنصر غير معروف أو غير مدعوم. لن يتم عرض هذه العناصر.",tianzhengEntities:"يحتوي هذا الرسم على كيانات مخصصة من TArch / Tianzheng (أو جهات خارجية مشابهة) (حوالي {count}). لا يمكن تحليلها بالكامل في هذه البيئة، لذلك قد لا يُعرض بعض المحتوى.",emptyProxyEntities:"يحتوي هذا الرسم على {count} كيان مخصص بدون رسومات وكيلة. لن يتم عرض هذه العناصر."},notification:{center:{title:"الإشعارات",clearAll:"مسح الكل",noNotifications:"لا توجد إشعارات"},group:{fontMissed:"خطوط مفقودة",fontMissedSummary:"{count} رسائل متعلقة بالخطوط. انقر للتفاصيل.",unsupportedEntities:"كيانات غير مدعومة",unsupportedEntitiesSummary:"{count} رسائل متعلقة بالتحليل. انقر للتفاصيل.",genericSummary:"{count} رسائل. انقر للتفاصيل."},title:{failedToOpenFile:"فشل فتح الملف",failedToOpenFileWorkerOom:"نفاد الذاكرة",failedToOpenFileWorkerTimeout:"انتهت مهلة فتح الرسم",failedToOpenFileFontLoadFailed:"فشل تحميل الخطوط",failedToOpenFileLicenseExpired:"انتهت صلاحية الترخيص",failedToOpenFileLicenseInvalid:"ترخيص غير صالح",fontNotFound:"الخط غير موجود",fontNotLoaded:"لم يتم تحميل الخط",parsingWarning:"مشكلات أثناء تحليل الرسم",systemMessage:"رسالة النظام",systemWarning:"تحذير النظام",systemError:"خطأ النظام",systemInfo:"معلومات النظام"}},progress:{start:"بدء تحليل الملف ...",parse:"جارٍ تحليل الملف ...",font:"جارٍ تنزيل الخطوط المطلوبة لهذا الرسم ...",ltype:"جارٍ تحليل أنواع الخطوط ...",style:"جارٍ تحليل أنماط النص ...",dimstyle:"جارٍ تحليل أنماط الأبعاد ...",layer:"جارٍ تحليل الطبقات ...",vport:"جارٍ تحليل منافذ العرض ...",blockrecord:"جارٍ تحليل سجلات الكتل ...",header:"جارٍ تحليل رأس الملف ...",block:"جارٍ تحليل الكتل ...",entity:"جارٍ تحليل العناصر ...",object:"جارٍ تحليل القواميس المسماة ...",rendering:"جارٍ عرض الرسم ...",end:"اكتمل!"},about:{title:"حول",close:"إغلاق",product:"عارض CAD",tagline:"عارض CAD عالي الأداء للويب لملفات DWG وDXF.",website:"الموقع الإلكتروني",docs:"التوثيق",repository:"GitHub",copyright:"© {year} mlightcad. جميع الحقوق محفوظة.",ok:"موافق"},drawStyle:{color:"اللون",fontSize:"ارتفاع النص"},shortCutToolbar:{more:"المزيد",undo:"تراجع",redo:"إعادة",erase:"حذف",collapse:"طي شريط الأدوات",expand:"توسيع شريط الأدوات"},textHeight:{title:"ارتفاع النص",close:"إغلاق",ok:"موافق",cancel:"إلغاء",adaptive:"ملاءمة الشاشة",custom:"ارتفاع نص مخصص",customPlaceholder:"ارتفاع العالم",fromScreen:"من حجم الشاشة",fromScreenHint:"أدخل حجم النص المطلوب على الشاشة عند التكبير الحالي. يُحوَّل إلى ارتفاع ثابت في إحداثيات الرسم ويبقى كما هو عند تغيير التكبير لاحقًا.",screenPxPlaceholder:"حجم الخط",screenUnit:"px",convert:"تحويل"},entityPick:{cancel:"إلغاء التحديد"},colorPicker:{title:"تحديد اللون",close:"إغلاق",ok:"موافق",cancel:"إلغاء",index:"فهرس اللون: ",rgb:"RGB: ",input:"اللون",inputPlaceholder:"1-255 أو #RRGGBB"},touchPointTutorial:{title:"كيف أختار النقاط بدقة؟",description:"اضغط مطولاً على الشاشة لمدة نصف ثانية تقريباً. يظهر صليب فوق إصبعك ويتبعه أثناء الحركة ويلتقط إلى الهندسة لاختيار أدق.",snoozeToday:"لا تذكرني اليوم",hideForever:"لا تذكرني مرة أخرى",ok:"فهمت"},dataSource:{open:"فتح",local:"ملف محلي",url:"من عنوان URL",openFrom:"فتح من {name}",signInTo:"تسجيل الدخول إلى {name}",signOutOf:"تسجيل الخروج من {name}",signOutOfAccount:"تسجيل الخروج من {name} ({account})",urlDialogTitle:"فتح من عنوان URL",urlDialogHint:"أدخل عنوان URL لملف .dwg أو .dxf.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"إلغاء",onedrive:"OneDrive",googledrive:"Google Drive",or:"أو",dropFile:"أسقط ملفًا هنا أو",browse:"تصفح",dropOrBrowse:"أسقط ملف DWG أو DXF هنا، أو تصفح",newDrawing:"رسم جديد",source:"المصدر",unavailable:"هذا المصدر غير متاح حاليًا.",selectFile:"اختيار ملف",signInRequired:"سجّل الدخول أولاً لاختيار ملف.",downloading:"جارٍ تنزيل الملف ..."}},k0={ACAD:{"-hatch":{description:"Vytváří šrafování pomocí voleb příkazového řádku bez rozhraní pásu karet"},"-layer":{description:"Spravuje hladiny pomocí voleb příkazového řádku"},about:{description:"Zobrazí informace o mlightcad"},acadver:{description:"Ukládá identifikátor verze databáze výkresu (pouze pro čtení)"},angbase:{description:"Nastaví směr základního úhlu 0 vzhledem k aktuálnímu USS"},angdir:{description:"Určuje, zda se kladné úhly měří po směru nebo proti směru hodinových ručiček"},arc:{description:"Vytvoří oblouk"},aunits:{description:"Nastaví formát zobrazení úhlů"},auprec:{description:"Nastaví přesnost zobrazení úhlů, používá se společně s AUNITS"},bmpout:{description:"Exportuje do BMP"},cdxf:{description:"Exportuje aktuální výkres do DXF"},cpdf:{description:"Exportuje aktuální výkres do PDF"},"-cpdf":{description:"Exportuje aktuální výkres do PDF pomocí příkazového řádku"},cecolor:{description:"Nastaví aktuální výchozí barvu pro nově vytvářené objekty"},celtscale:{description:"Řídí měřítko typu čáry pro nově vytvářené objekty"},celtype:{description:"Nastaví typ čáry pro nově vytvářené objekty"},celweight:{description:"Nastaví výchozí tloušťku čáry pro nově vytvářené objekty"},cetransparency:{description:"Nastaví průhlednost pro nově vytvářené objekty"},cachefont:{description:"Uloží místní soubor fontu do IndexedDB pro vykreslování textu"},circle:{description:"Vytvoří jednu kružnici zadáním středu a poloměru"},clayer:{description:"Nastaví aktuální hladinu pro nové objekty a operace úprav"},cmleaderstyle:{description:"Nastaví název aktuálního stylu multiodkazu"},cmlscale:{description:"Řídí celkovou šířku multičáry"},cmlstyle:{description:"Nastaví název aktuálního stylu multičáry"},colortheme:{description:"Řídí barevný motiv uživatelského rozhraní (tmavý nebo světlý)"},copy:{description:"Kopíruje vybrané objekty vytvořením kopií na nových pozicích",prompt:"Vyberte objekty"},csvg:{description:"Převede aktuální výkres na SVG"},chtml:{description:"Exportuje aktuální výkres do samostatného offline souboru HTML"},"-chtml":{description:"Exportuje aktuální výkres do HTML pomocí voleb příkazového řádku"},dimlinear:{description:"Vytvoří lineární kóty"},dimaligned:{description:"Vytvoří zarovnanou lineární kótu"},dimradius:{description:"Vytvoří poloměrové kóty kruhů a oblouků"},dimdiameter:{description:"Vytvoří průměrové kóty kruhů a oblouků"},dimangular:{description:"Vytvoří úhlové kóty"},dimarc:{description:"Vytvoří kótu délky oblouku"},dimordinate:{description:"Vytvoří souřadnicovou kótu"},dimcontinue:{description:"Vytvoří řetězovou kótu"},dimbaseline:{description:"Vytvoří základnovou kótu"},dimstyle:{description:"Nastaví název aktuálního stylu kótování"},dwgname:{description:"Ukládá název aktuálního souboru výkresu (pouze pro čtení)"},loginname:{description:"Zobrazí přihlašovací jméno uživatele (pouze pro čtení)"},dynmode:{description:"Řídí nastavení dynamického zadávání u kurzoru"},dynprompt:{description:"Řídí zobrazení výzev v popiscích dynamického zadávání"},ellipse:{description:"Vytvoří elipsu nebo eliptický oblouk pomocí koncových bodů os nebo středu"},erase:{description:"Odstraní vybrané objekty z výkresu",prompt:"Vyberte objekty"},extmax:{description:"Ukládá pravý horní roh rozsahu výkresu v modelovém prostoru (pouze pro čtení)"},extmin:{description:"Ukládá levý dolní roh rozsahu výkresu v modelovém prostoru (pouze pro čtení)"},entout:{description:"Exportuje sloučený náhledový obrázek vybraných objektů",prompt:"Vyberte objekty"},hideobjects:{description:"Dočasně potlačí zobrazení vybraných objektů",prompt:"Vyberte objekty"},imageattach:{description:"Připojí rastrový obrázek jako externí referenci k aktuálnímu výkresu"},"-insert":{description:"Vloží definici bloku do aktuálního výkresu (příkazový řádek)"},xattach:{description:"Připojí výkres DWG nebo DXF jako externí referenci k aktuálnímu výkresu"},gripcolor:{description:"Nastaví barvu nevybraných gripů zobrazených na vybraných objektech"},griphot:{description:"Nastaví barvu vybraných (aktivních) gripů"},gripobjlimit:{description:"Potlačí zobrazení gripů, když výběr přesáhne zadaný počet objektů (0 = bez omezení)"},grips:{description:"Řídí, zda se na vybraných objektech zobrazují gripy"},gripsize:{description:"Nastaví velikost gripů v pixelech"},hatch:{description:"Vyplní uzavřenou oblast nebo vybrané objekty vzorem šrafování"},ipdf:{description:"Importuje vektorovou geometrii ze souboru PDF"},hpang:{description:"Nastaví výchozí úhel v radiánech pro nově vytvářené vzory šrafování"},hpassoc:{description:"Řídí, zda jsou nově vytvářená šrafování asociativní"},hpbackgroundcolor:{description:"Nastaví výchozí barvu pozadí pro nově vytvářené vzory šrafování"},hpcolor:{description:"Nastaví výchozí barvu pro nově vytvářená šrafování"},hpdouble:{description:"Řídí, zda jsou uživatelsky definované vzory šrafování zdvojené"},hpislanddetection:{description:"Řídí, jak se nakládá s ostrůvky uvnitř nově vytvářených hranic šrafování"},hplayer:{description:"Nastaví výchozí hladinu pro nově vytvářená šrafování a výplně"},hpname:{description:"Nastaví výchozí název vzoru pro nově vytvářená šrafování v této relaci"},hpscale:{description:"Nastaví výchozí měřítko pro nově vytvářené vzory šrafování"},hpseparate:{description:"Řídí, zda se pro více hranic vytvoří jeden nebo samostatné objekty šrafování"},hptransparency:{description:"Nastaví výchozí průhlednost pro nově vytvářená šrafování a výplně"},insunits:{description:"Určuje jednotky výkresu pro automatické měřítko vkládaných bloků, obrázků nebo externích referencí"},jpgout:{description:"Exportuje do JPEG"},laycur:{description:"Změní hladinu vybraných objektů na aktuální hladinu",prompt:"Vyberte objekty pro změnu na aktuální hladinu"},laydel:{description:"Odstraní hladinu a všechny objekty na této hladině"},layerclose:{description:"Zavře Správce vlastností hladin"},layerp:{description:"Vrátí poslední změnu nebo sadu změn provedených v nastavení hladin"},layfrz:{description:"Zmrazí hladinu vybraných objektů",prompt:"Vyberte objekt na hladině ke zmrazení"},layiso:{description:"Izoluje hladiny vybraných objektů",prompt:"Vyberte objekty na hladinách k izolaci"},laylck:{description:"Uzamkne hladinu vybraných objektů",prompt:"Vyberte objekt na hladině k uzamčení"},layoff:{description:"Vypne hladinu vybraných objektů",prompt:"Vyberte objekt na hladině k vypnutí"},layon:{description:"Zapne všechny hladiny ve výkresu"},laythw:{description:"Rozmrazí všechny zmrazené hladiny ve výkresu"},layulk:{description:"Odemkne hladinu vybraných objektů",prompt:"Vyberte objekt na hladině k odemčení"},layuniso:{description:"Obnoví hladiny skryté nebo uzamčené příkazem LAYISO"},line:{description:"Kreslí úsečky mezi body"},log:{description:"Zaznamenává ladicí informace do konzole"},ltscale:{description:"Nastaví globální měřítko typu čáry pro výkres"},lunits:{description:"Nastaví formát zobrazení souřadnic a vzdáleností"},luprec:{description:"Nastaví přesnost zobrazení délkových jednotek, používá se společně s LUNITS"},lwdisplay:{description:"Řídí, zda se ve výkresu zobrazují tloušťky čar"},clearmeasurements:{description:"Odstraní všechna měření z aktuálního rozvržení"},measurementvis:{description:"Zobrazí nebo skryje měření na aktuálním rozvržení"},measurementpanel:{description:"Otevře paletu měření"},measurementexport:{description:"Exportuje měření do sidecar JSON souboru"},measurementimport:{description:"Importuje měření ze sidecar JSON souboru"},measurearea:{description:"Vypočítá plochu a obvod vybraných objektů nebo bodů"},measureangle:{description:"Změří úhel mezi dvěma čarami nebo třemi body"},measurearc:{description:"Změří délku oblouku"},measuredistance:{description:"Změří vzdálenost a přírůstky mezi dvěma body"},measurecontinuous:{description:"Měří řetězené vzdálenosti postupným zadáváním bodů, dokud nestisknete Enter nebo Zrušit"},measurepoint:{description:"Změří souřadnice X/Y vybraného bodu"},measurement:{description:"Nastaví, zda výkres používá anglosaské (imperiální) nebo metrické jednotky"},measurementcolor:{description:"Nastaví barvu použitou pro překryvy měření"},modelbkcolor:{description:"Nastaví barvu pozadí kreslicí oblasti modelového prostoru"},mline:{description:"Vytvoří několik rovnoběžných čar jako jeden objekt multičáry"},move:{description:"Posune vybrané objekty o vektor přemístění",prompt:"Vyberte objekty"},offset:{description:"Vytvoří rovnoběžné kopie křivek, lomených čar nebo kružnic v zadané vzdálenosti"},mtext:{description:"Vytvoří jeden objekt víceřádkového textu"},open:{description:"Otevře existující soubor výkresu"},openprof:{description:"Řídí, zda se do konzole zaznamenávají časové profily fází otevírání souboru"},openperf:{description:"Otevře paletu výkonu otevření s časy z posledního otevření výkresu"},orthomode:{description:"Omezí pohyb kurzoru na vodorovnou nebo svislou osu"},osmode:{description:"Nastaví trvalé režimy uchopení objektů pomocí bitové hodnoty"},pan:{description:"Posune pohled beze změny směru pohledu nebo zvětšení"},paperbkcolor:{description:"Nastaví barvu pozadí kreslicí oblasti výkresového prostoru (rozvržení)"},pdmode:{description:"Řídí způsob zobrazení bodových entit POINT"},pdsize:{description:"Nastaví velikost zobrazení bodových entit POINT"},pickbox:{description:"Nastaví velikost (v pixelech) výběrového rámečku pro výběr objektů"},pline:{description:"Vytvoří křivku zadáním více bodů"},pngout:{description:"Exportuje do PNG"},point:{description:"Vytvoří body"},polaraddang:{description:"Ukládá další úhly polárního sledování jako seznam oddělený středníky"},polarang:{description:"Nastaví přírůstek polárního úhlu pro polární sledování"},polarmode:{description:"Řídí nastavení polárního sledování a sledování uchopení objektů"},polygon:{description:"Vytvoří pravidelný mnohoúhelník podle středu/poloměru nebo jedné hrany"},qnew:{description:"Zahájí nový výkres"},close:{description:"Zavře aktuální výkres"},ray:{description:"Vytvoří polopřímku, která začíná v bodě a pokračuje do nekonečna"},rectang:{description:"Vytvoří obdélník zadáním dvou protilehlých rohů"},regen:{description:"Překreslí aktuální výkres"},revcloud:{description:"Vytvoří nebo upraví revizní obláček"},markuptext:{description:"Umístí textovou poznámku"},markupline:{description:"Vytvoří úsečkovou poznámku"},markuparrow:{description:"Vytvoří šipkovou poznámku"},markupcloud:{description:"Vytvoří revizní obláček"},markuprect:{description:"Vytvoří obdélníkovou poznámku"},markupcircle:{description:"Vytvoří kruhovou poznámku"},markuphighlight:{description:"Vytvoří zvýrazňovací obdélník"},markupcallout:{description:"Vytvoří odkazovou poznámku: zadejte hrot odkazu, umístěte textové pole a zadejte text"},markupstamp:{description:"Umístí razítko nebo vlastní symbol"},markupvis:{description:"Zobrazí nebo skryje poznámky"},clearmarkups:{description:"Vymaže všechny poznámky na aktuálním rozvržení"},markupexport:{description:"Exportuje poznámky do sidecar JSON souboru"},markupimport:{description:"Importuje poznámky ze sidecar JSON souboru"},markuppanel:{description:"Otevře paletu poznámek"},rotate:{description:"Otočí vybrané objekty kolem základního bodu",prompt:"Vyberte objekty"},select:{description:"Vybírá objekty"},shortcutmenu:{description:"Řídí dostupnost místních nabídek v oblasti výkresu"},sketch:{description:"Vytvoří řadu úseček kreslených od ruky"},spline:{description:"Vytvoří hladkou křivku splajn zadáním řídicích bodů"},textstyle:{description:"Nastaví název aktuálního textového stylu"},unitmode:{description:"Řídí zlomkové zobrazení souřadnic, když je LUNITS architektonický nebo zlomkový"},switchbg:{description:"Přepíná pozadí oblasti výkresu mezi bílou a černou"},unisolateobjects:{description:"Znovu zobrazí všechny objekty skryté příkazem HIDEOBJECTS"},undo:{description:"Vrátí zpět poslední operaci úpravy databáze",nothingToUndo:"Není co vrátit zpět."},redo:{description:"Zopakuje poslední vrácenou operaci úpravy databáze",nothingToRedo:"Není co zopakovat."},xline:{description:"Vytvoří konstrukční přímku, která se rozprostírá do nekonečna na obě strany"},zoom:{description:"Zvětší na maximální rozsah všech objektů"}},USER:{}},S0={arc:{startPointOrCenter:"Zadejte počáteční bod oblouku nebo",secondPointOrOptions:"Zadejte druhý bod oblouku nebo",secondPoint:"Zadejte druhý bod oblouku",startPoint:"Zadejte počáteční bod oblouku",centerPoint:"Zadejte středový bod oblouku",endPoint:"Zadejte koncový bod oblouku",endPointOrOptions:"Zadejte koncový bod oblouku nebo",centerPointOrOptions:"Zadejte středový bod oblouku",includedAngle:"Zadejte středový úhel",chordLength:"Zadejte délku tětivy",tangentDirection:"Zadejte směr tečny v počátečním bodě oblouku",radius:"Zadejte poloměr oblouku",keywords:{center:{display:"Střed(C)",local:"Střed",global:"Center"},end:{display:"Konec(E)",local:"Konec",global:"End"},angle:{display:"Úhel(A)",local:"Úhel",global:"Angle"},chordLength:{display:"délka Tětivy(L)",local:"Délka tětivy",global:"ChordLength"},direction:{display:"Směr(D)",local:"Směr",global:"Direction"},radius:{display:"Poloměr(R)",local:"Poloměr",global:"Radius"}},invalid:{threePoint:"Neplatný 3bodový oblouk: body jsou kolineární nebo nelze definovat oblouk.",center:"Neplatný vstup středu: počáteční a koncový bod musí ležet na stejné kružnici.",angle:"Neplatný vstup úhlu: středový úhel musí být větší než 0 a menší než 360 stupňů.",chordLength:"Neplatná délka tětivy: hodnota je mimo rozsah pro aktuální poloměr.",direction:"Neplatný směr: z tohoto směru tečny nelze sestrojit oblouk.",radius:"Neplatný poloměr: zadaný poloměr nemůže spojit počáteční a koncový bod."}},circle:{center:"Zadejte střed kružnice",centerOrOptions:"Zadejte středový bod kružnice nebo",radius:"Zadejte poloměr kružnice",radiusOrDiameter:"Zadejte poloměr kružnice nebo",diameter:"Zadejte průměr kružnice",twoPointFirst:"Zadejte první koncový bod průměru kružnice",twoPointSecond:"Zadejte druhý koncový bod průměru kružnice",threePointFirst:"Zadejte první bod na kružnici",threePointSecond:"Zadejte druhý bod na kružnici",threePointThird:"Zadejte třetí bod na kružnici",keywords:{threeP:{display:"3B(3P)",local:"3B",global:"3P"},twoP:{display:"2B(2P)",local:"2B",global:"2P"},diameter:{display:"Průměr(D)",local:"Průměr",global:"Diameter"}}},copy:{basePointOrOptions:"Zadejte základní bod nebo",displacementOrArray:"Zadejte přemístění nebo",secondPointOrArray:"Zadejte druhý bod nebo",modePrompt:"Zadejte volbu režimu kopírování",arrayItemCount:"Zadejte počet položek v poli včetně originálu",arraySecondPointOrFit:"Zadejte druhý bod nebo",arrayFitSecondPoint:"Zadejte druhý bod",keywords:{displacement:{display:"Přemístění(D)",local:"Přemístění",global:"Displacement"},mode:{display:"Režim(O)",local:"Režim",global:"Mode"},multiple:{display:"Vícenásobné(M)",local:"Vícenásobné",global:"Multiple"},single:{display:"Jednoduché(S)",local:"Jednoduché",global:"Single"},array:{display:"Pole(A)",local:"Pole",global:"Array"},fit:{display:"Přizpůsobit(F)",local:"Přizpůsobit",global:"Fit"}}},dimlinear:{...R.dimlinear,xLine1Point:"Zadejte počátek první pomocné čáry",xLine2Point:"Zadejte počátek druhé pomocné čáry",dimLinePoint:"Zadejte umístění kótovací čáry"},dimaligned:{...R.dimaligned},dimradius:{...R.dimradius},dimdiameter:{...R.dimdiameter},dimangular:{...R.dimangular},dimarc:{...R.dimarc},dimordinate:{...R.dimordinate},dimcontinue:{...R.dimcontinue},dimbaseline:{...R.dimbaseline},ellipse:{axisEndpointOrOptions:"Zadejte koncový bod osy elipsy nebo",arcAxisEndpointOrCenter:"Zadejte koncový bod osy eliptického oblouku nebo",center:"Zadejte střed elipsy",firstAxisEndpoint:"Zadejte koncový bod osy",secondAxisEndpoint:"Zadejte druhý koncový bod osy",otherAxisOrRotation:"Zadejte vzdálenost k druhé ose nebo",rotationAngle:"Zadejte úhel otočení kolem hlavní osy",arcStartAngle:"Zadejte počáteční úhel eliptického oblouku",arcEndAngle:"Zadejte koncový úhel eliptického oblouku",keywords:{arc:{display:"Oblouk(A)",local:"Oblouk",global:"Arc"},center:{display:"Střed(C)",local:"Střed",global:"Center"},rotation:{display:"Otočení(R)",local:"Otočení",global:"Rotation"}},invalid:{axis:"Neplatný vstup osy: délka osy musí být větší než 0.",otherAxis:"Neplatný vstup druhé osy: vzdálenost musí být větší než 0.",rotation:"Neplatný vstup otočení: výsledná vedlejší osa musí být větší než 0."}},hatch:{prompt:"Vyberte objekt hranice nebo",pickPoint:"Zadejte vnitřní bod (nebo stiskněte Enter pro dokončení)",select:"Vyberte objekty k šrafování",patternName:"Zadejte název vzoru šrafování",scale:"Zadejte měřítko vzoru šrafování",angle:"Zadejte úhel vzoru šrafování",style:"Zadejte styl šrafování",associative:"Zadejte asociativitu",invalidBoundary:"Vybrané objekty netvoří uzavřenou hranici.",keywords:{pick:{display:"Vybrat body(P)",local:"Vybrat body",global:"PickPoints"},select:{display:"Vybrat objekty(S)",local:"Vybrat objekty",global:"SelectObjects"},cancel:{display:"Zrušit(C)",local:"Zrušit",global:"Cancel"},pattern:{display:"Vzor(P)",local:"Vzor",global:"Pattern"},scale:{display:"Měřítko(S)",local:"Měřítko",global:"Scale"},angle:{display:"Úhel(A)",local:"Úhel",global:"Angle"},style:{display:"Styl(T)",local:"Styl",global:"HatchStyle"},associative:{display:"Asociativní(AS)",local:"Asociativní",global:"AssociativeMode"},normal:{display:"Normální(N)",local:"Normální",global:"Normal"},outer:{display:"Vnější(O)",local:"Vnější",global:"Outer"},ignore:{display:"Ignorovat(I)",local:"Ignorovat",global:"Ignore"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}},hideobjects:{hidden:"objekt(ů) skryto",restored:"objekt(ů) obnoveno",nothingToRestore:"Žádné skryté objekty k obnovení"},entout:{longSidePrompt:"Zadejte velikost delší strany náhledu v pixelech",exported:"náhled(ů) objektů exportováno",skipped:"objekt(ů) přeskočeno",failed:{"no-preview-root":"Nelze sestavit geometrii náhledu pro výběr","no-bounds":"Nelze vypočítat rozsah náhledu pro výběr","capture-failed":"Nelze vykreslit náhledový obrázek entity","download-failed":"Náhled byl vykreslen, ale stažení PNG selhalo"}},layer:{main:"Zadejte volbu",listSummary:"Seznam hladin byl vypsán do konzole prohlížeče",emptyInput:"Nebyl zadán žádný název hladiny.",newPrompt:"Zadejte název nové hladiny (nebo hladin)",makePrompt:"Zadejte název hladiny, která se má stát aktuální",setPrompt:"Zadejte název hladiny, která se má nastavit jako aktuální",onPrompt:"Zadejte název (názvy) hladiny k zapnutí",offPrompt:"Zadejte název (názvy) hladiny k vypnutí",freezePrompt:"Zadejte název (názvy) hladiny ke zmrazení",thawPrompt:"Zadejte název (názvy) hladiny k rozmrazení",lockPrompt:"Zadejte název (názvy) hladiny k uzamčení",unlockPrompt:"Zadejte název (názvy) hladiny k odemčení",colorLayerPrompt:"Zadejte název (názvy) hladiny ke změně barvy",colorValuePrompt:"Zadejte barvu (ACI 1-255, RGB např. 255,0,0, nebo CSS název barvy)",invalidColor:"Neplatný vstup barvy.",descriptionLayerPrompt:"Zadejte název hladiny k úpravě popisu",descriptionValuePrompt:"Zadejte nový popis hladiny",created:"Počet vytvořených hladin",alreadyExists:"Hladina již existuje",notFound:"Hladina nenalezena",cannotChangeCurrent:"Nelze vypnout ani zmrazit aktuální hladinu.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Vytvořit(M)",local:"Vytvořit",global:"Make"},set:{display:"Nastavit(S)",local:"Nastavit",global:"Set"},new:{display:"Nová(N)",local:"Nová",global:"New"},on:{display:"Zapnout(ON)",local:"Zapnout",global:"On"},off:{display:"Vypnout(OF)",local:"Vypnout",global:"Off"},color:{display:"Barva(C)",local:"Barva",global:"Color"},freeze:{display:"Zmrazit(F)",local:"Zmrazit",global:"Freeze"},thaw:{display:"Rozmrazit(T)",local:"Rozmrazit",global:"Thaw"},lock:{display:"Uzamknout(L)",local:"Uzamknout",global:"Lock"},unlock:{display:"Odemknout(U)",local:"Odemknout",global:"Unlock"},description:{display:"Popis(D)",local:"Popis",global:"Description"}}},layon:{alreadyOn:"Všechny hladiny jsou již zapnuté.",turnedOn:"Zapnuté hladiny"},laycur:{prompt:"Vyberte objekty ke změně na aktuální hladinu",currentLayerNotFound:"Aktuální hladina nenalezena.",noObjects:"Nebyly vybrány žádné platné objekty.",alreadyCurrent:"Vybrané objekty jsou již na aktuální hladině.",changed:"Objekty změněny na aktuální hladinu"},layfrz:{prompt:"Vyberte objekt na hladině ke zmrazení nebo",invalidSelection:"Vybrán neplatný objekt.",settingsPrompt:"Zadejte nastavení LAYFRZ ke změně",viewportPrompt:"Zadejte chování zmrazení ve výřezu",blockSelectionPrompt:"Zadejte chování výběru vnořeného bloku",vpfreezeFallback:"Aktuální prohlížeč nepodporuje zmrazení hladiny podle výřezu; místo toho se použije chování Zmrazit.",nestedSelectionLimited:"Nastavení výběru vnořeného bloku se uloží, ale aktuální výběr stále vyhodnocuje hladinu entity nejvyšší úrovně.",layerNotFound:"Hladina nenalezena",cannotFreezeCurrent:"Nelze zmrazit aktuální hladinu.",alreadyFrozen:"Hladina je již zmrazená",frozen:"Zmrazená hladina",restored:"Obnovená hladina",nothingToUndo:"Neexistuje žádná akce LAYFRZ k vrácení zpět.",keywords:{settings:{display:"Nastavení(S)",local:"Nastavení",global:"Settings"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},viewports:{display:"Výřezy(V)",local:"Výřezy",global:"Viewports"},blockSelection:{display:"Výběr bloku(B)",local:"Výběr bloku",global:"BlockSelection"},freeze:{display:"Zmrazit(F)",local:"Zmrazit",global:"Freeze"},vpfreeze:{display:"Zmrazit ve výřezu(V)",local:"Zmrazit ve výřezu",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Entita(E)",local:"Entita",global:"Entity"},none:{display:"Žádný(N)",local:"Žádný",global:"None"}}},layiso:{prompt:"Vyberte objekty na hladině (hladinách) k izolaci nebo",settingsPrompt:"Zadejte nastavení pro neizolované hladiny",offModePrompt:"Zadejte chování vypnutí pro neizolované hladiny",noLayers:"Nebyly vybrány žádné platné hladiny.",layerNotFound:"Hladina nenalezena",isolated:"Izolovaná hladina (hladiny)",affectedLayers:"ovlivněné hladiny",vpfreezeFallback:"Aktuální prohlížeč nepodporuje zmrazení hladiny podle výřezu; místo toho se použije chování Vypnout.",lockFadeFallback:"Aktuální prohlížeč nepodporuje ztlumení zobrazení hladiny; neizolované hladiny budou uzamčeny bez ztlumení.",keywords:{settings:{display:"Nastavení(S)",local:"Nastavení",global:"Settings"},off:{display:"Vypnout(O)",local:"Vypnout",global:"Off"},lockAndFade:{display:"Uzamknout a ztlumit(L)",local:"Uzamknout a ztlumit",global:"LockAndFade"},vpfreeze:{display:"Zmrazit ve výřezu(V)",local:"Zmrazit ve výřezu",global:"Vpfreeze"}}},layuniso:{noPrevious:"Neexistuje žádný předchozí stav hladin LAYISO k obnovení.",layerNotFound:"Hladina nenalezena",nothingRestored:"Nebyly obnoveny žádné změny hladin LAYISO.",restored:"Obnovené hladiny"},laythw:{alreadyThawed:"Všechny hladiny jsou již rozmrazené.",thawed:"Rozmrazené hladiny"},laylck:{prompt:"Vyberte objekt na hladině k uzamčení",invalidSelection:"Vybrán neplatný objekt.",layerNotFound:"Hladina nenalezena",alreadyLocked:"Hladina je již uzamčená",locked:"Uzamčená hladina"},layulk:{prompt:"Vyberte objekt na hladině k odemčení",invalidSelection:"Vybrán neplatný objekt.",layerNotFound:"Hladina nenalezena",alreadyUnlocked:"Hladina je již odemčená",unlocked:"Odemčená hladina"},layoff:{prompt:"Vyberte objekt na hladině k vypnutí nebo",invalidSelection:"Vybrán neplatný objekt.",settingsPrompt:"Zadejte nastavení LAYOFF ke změně",viewportPrompt:"Zadejte chování výřezu",blockSelectionPrompt:"Zadejte chování výběru vnořeného bloku",vpfreezeFallback:"Aktuální prohlížeč nepodporuje vypnutí hladiny podle výřezu; místo toho se použije chování Vypnout.",nestedSelectionLimited:"Nastavení výběru vnořeného bloku se uloží, ale aktuální výběr stále vyhodnocuje hladinu entity nejvyšší úrovně.",layerNotFound:"Hladina nenalezena",cannotTurnOffCurrent:"Nelze vypnout aktuální hladinu.",alreadyOff:"Hladina je již vypnutá",turnedOff:"Vypnutá hladina",restored:"Obnovená hladina",nothingToUndo:"Neexistuje žádná akce LAYOFF k vrácení zpět.",keywords:{settings:{display:"Nastavení(S)",local:"Nastavení",global:"Settings"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},viewports:{display:"Výřezy(V)",local:"Výřezy",global:"Viewports"},blockSelection:{display:"Výběr bloku(B)",local:"Výběr bloku",global:"BlockSelection"},off:{display:"Vypnout(O)",local:"Vypnout",global:"Off"},vpfreeze:{display:"Zmrazit ve výřezu(V)",local:"Zmrazit ve výřezu",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Entita(E)",local:"Entita",global:"Entity"},none:{display:"Žádný(N)",local:"Žádný",global:"None"}}},layerp:{restored:"Obnoven předchozí stav hladin.",noPreviousState:"Neexistuje žádný předchozí stav hladin k obnovení."},line:{firstPoint:"Zadejte první bod",firstPointOrContinue:"Zadejte první bod nebo",nextPoint:"Zadejte další bod",nextPointWithOptions:"Zadejte další bod nebo",keywords:{continue:{display:"Pokračovat(C)",local:"Pokračovat",global:"Continue"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},close:{display:"Uzavřít(C)",local:"Uzavřít",global:"Close"}}},xline:{firstPointOrOptions:"Zadejte bod nebo",secondPoint:"Zadejte druhý bod",throughPoint:"Zadejte bod, kterým má přímka procházet",angle:"Zadejte úhel konstrukční přímky",invalidDirection:"Neplatný směr pro XLINE.",keywords:{hor:{display:"Vodorovně(H)",local:"Vodorovně",global:"Hor"},ver:{display:"Svisle(V)",local:"Svisle",global:"Ver"},ang:{display:"Úhel(A)",local:"Úhel",global:"Ang"}}},ray:{startPoint:"Zadejte počáteční bod",throughPoint:"Zadejte bod, kterým má polopřímka procházet"},mline:{startPointWithOptions:"Zadejte počáteční bod nebo",nextPointWithOptions:"Zadejte další bod nebo",justificationPrompt:"Zadejte typ zarovnání",scalePrompt:"Zadejte měřítko multičáry",stylePrompt:"Zadejte název stylu multičáry nebo [?] pro seznam",styleNotFound:"Styl multičáry nenalezen",styleListHeader:"Načtené styly multičáry",styleListEmpty:"V aktuálním výkresu není načten žádný styl multičáry.",keywords:{justification:{display:"Zarovnání(J)",local:"Zarovnání",global:"Justification"},scale:{display:"Měřítko(S)",local:"Měřítko",global:"Scale"},style:{display:"Styl(ST)",local:"Styl",global:"Style"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},close:{display:"Uzavřít(C)",local:"Uzavřít",global:"Close"},top:{display:"Nahoře(T)",local:"Nahoře",global:"Top"},zero:{display:"Nula(Z)",local:"Nula",global:"Zero"},bottom:{display:"Dole(B)",local:"Dole",global:"Bottom"}}},measureAngle:{vertex:"Zadejte vrchol",arm1:"Zadejte bod na prvním rameni",arm2:"Zadejte bod na druhém rameni"},measureArc:{startPoint:"Zadejte počáteční bod oblouku",throughPoint:"Zadejte bod na oblouku",endPoint:"Zadejte koncový bod oblouku",lockedEndPoint:"Zadejte koncový bod oblouku (Ctrl přepne velký/malý oblouk)",invalidPoints:"Tři body jsou kolineární a nedefinují oblouk."},measureArea:{firstPoint:"Zadejte první bod",nextPoint:"Zadejte další bod (nebo stiskněte Enter pro dokončení)"},measureDistance:{firstPoint:"Zadejte první bod",secondPoint:"Zadejte druhý bod"},measureContinuous:{firstPoint:"Zadejte první bod",nextPoint:"Zadejte další bod (nebo stiskněte Enter pro dokončení)"},measurePoint:{point:"Zadejte bod"},measurement:{import:{chooseFile:"Vyberte sidecar JSON soubor měření"}},markup:{author:"Zadejte autora kontroly (uloží se pro pozdější použití)",text:{point:"Zadejte bod textové poznámky",content:"Zadejte text poznámky"},line:{firstPoint:"Zadejte první bod úsečkové poznámky",secondPoint:"Zadejte druhý bod úsečkové poznámky"},arrow:{firstPoint:"Zadejte počáteční bod šipky",secondPoint:"Zadejte hrot šipky"},cloud:{firstCorner:"Zadejte první roh obláčku",secondCorner:"Zadejte protilehlý roh obláčku"},rect:{firstCorner:"Zadejte první roh obdélníku",secondCorner:"Zadejte protilehlý roh obdélníku"},circle:{center:"Zadejte střed kružnice",radius:"Zadejte poloměr kružnice"},shape:{calloutOn:"[Odkaz zapnut]",calloutOff:"[Odkaz vypnut]",calloutAnchor:"Zadejte umístění textu odkazu",keywords:{callout:{display:"Odkaz(C)",local:"Odkaz",global:"Callout"},noCallout:{display:"BezOdkazu(N)",local:"BezOdkazu",global:"NoCallout"}}},highlight:{firstCorner:"Zadejte první roh zvýraznění",secondCorner:"Zadejte protilehlý roh zvýraznění"},callout:{tip:"Zadejte hrot vodítka, nebo obrys obláčku/obdélníku/kružnice bez odkazu",anchor:"Zadejte umístění textu odkazu",content:"Zadejte text odkazu"},stamp:{kind:"Zadejte identifikátor razítka [approved/rejected/revised/for-review/custom]",imageUrl:"Zadejte URL vlastního obrázku razítka (volitelné)",caption:"Zadejte popisek razítka (volitelné)",point:"Zadejte bod vložení razítka"},import:{chooseFile:"Vyberte sidecar JSON soubor poznámek"}},move:{basePointOrDisplacement:"Zadejte základní bod nebo",secondPointOrDisplacement:"Zadejte druhý bod nebo",displacement:"Zadejte přemístění",keywords:{displacement:{display:"Přemístění(D)",local:"Přemístění",global:"Displacement"}}},offset:{distance:"Zadejte vzdálenost offsetu",selectObject:"Vyberte objekt k offsetu nebo stiskněte Enter pro dokončení",sidePoint:"Zadejte bod na straně pro offset",invalidDistance:"Vzdálenost offsetu musí být větší než 0.",invalidSelection:"Vybraný objekt nelze offsetovat.",offsetFailed:"Nelze vytvořit offsetovou křivku na zadané straně."},mtext:{point:"Zadejte bod vložení víceřádkového textu"},bmpout:{boundsFirstCorner:"Zadejte první roh rozsahu",boundsSecondCorner:"Zadejte protilehlý roh",longSidePrompt:"Zadejte velikost delší strany v pixelech"},jpgout:{boundsFirstCorner:"Zadejte první roh rozsahu",boundsSecondCorner:"Zadejte protilehlý roh",longSidePrompt:"Zadejte velikost delší strany v pixelech"},pngout:{boundsFirstCorner:"Zadejte první roh rozsahu",boundsSecondCorner:"Zadejte protilehlý roh",longSidePrompt:"Zadejte velikost delší strany v pixelech"},imageattach:{insertionPoint:"Zadejte bod vložení:",scale:"Zadejte faktor měřítka:",rotation:"Zadejte úhel otočení:",invalidScale:"Faktor měřítka musí být větší než 0.",decodeFailed:"Nepodařilo se načíst vybraný soubor obrázku."},insert:{blockName:"Zadejte název bloku:",insertionPoint:"Zadejte bod vložení:",scale:"Zadejte faktor měřítka:",rotation:"Zadejte úhel otočení:",invalidScale:"Faktor měřítka musí být větší než 0.",invalidBlockName:"Neplatný název bloku.",blockNotFound:"Blok nenalezen",xrefNotAllowed:"Nelze vložit externí referenci pomocí -INSERT."},xattach:{insertionPoint:"Zadejte bod vložení:",scale:"Zadejte faktor měřítka:",rotation:"Zadejte úhel otočení:",invalidScale:"Faktor měřítka musí být větší než 0.",unsupportedFile:"Vyberte soubor DWG nebo DXF.",loading:"Načítám externí referenci...",loadFailed:"Nepodařilo se načíst vybraný soubor výkresu."},point:{point:"Zadejte bod"},polygon:{numberOfSides:"Zadejte počet stran",centerOrEdge:"Zadejte střed mnohoúhelníku nebo",radiusOrType:"Zadejte volby",edgeStart:"Zadejte první koncový bod hrany",edgeEnd:"Zadejte druhý koncový bod hrany",keywords:{edge:{display:"Hrana(E)",local:"Hrana",global:"Edge"},inscribed:{display:"Vepsaný do kružnice(I)",local:"Vepsaný do kružnice",global:"Inscribed"},circumscribed:{display:"Opsaný kolem kružnice(C)",local:"Opsaný kolem kružnice",global:"Circumscribed"}},invalid:{sides:"Neplatný počet stran. Zadejte celé číslo mezi 3 a 1024.",radius:"Neplatný poloměr. Poloměr musí být větší než 0.",edge:"Neplatná hrana. Délka hrany musí být větší než 0."}},polyline:{firstPoint:"Zadejte první bod",nextPoint:"Zadejte další bod (nebo stiskněte Enter pro dokončení)",nextPointWithOptions:"Zadejte další bod nebo",nextPointWithArcOptions:"Zadejte další bod nebo",keywords:{arc:{display:"Oblouk(A)",local:"Oblouk",global:"Arc"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},close:{display:"Uzavřít(C)",local:"Uzavřít",global:"Close"},line:{display:"Úsečka(L)",local:"Úsečka",global:"Line"},angle:{display:"Úhel(A)",local:"Úhel",global:"Angle"},center:{display:"Střed(C)",local:"Střed",global:"Center"},secondPoint:{display:"Druhý bod(P)",local:"Druhý bod",global:"SecondPoint"},radius:{display:"Poloměr(R)",local:"Poloměr",global:"Radius"}},arcAngle:"Zadejte úhel oblouku",arcCenter:"Zadejte středový bod",arcSecondPoint:"Zadejte druhý bod na oblouku",arcEndPoint:"Zadejte koncový bod oblouku",arcRadius:"Zadejte poloměr oblouku"},rect:{firstPoint:"Zadejte první roh",nextPoint:"Zadejte druhý roh",firstPointWithOptions:"Zadejte první roh nebo",otherCornerWithOptions:"Zadejte druhý roh nebo",chamferFirst:"Zadejte první vzdálenost zkosení",chamferSecond:"Zadejte druhou vzdálenost zkosení",filletRadius:"Zadejte poloměr zaoblení",segmentWidth:"Zadejte šířku čáry obdélníku",elevationValue:"Zadejte výšku",thicknessValue:"Zadejte tloušťku",rotationAngle:"Zadejte úhel otočení obdélníku",dimensionLength:"Zadejte délku obdélníku",dimensionWidth:"Zadejte šířku obdélníku",areaValue:"Zadejte plochu obdélníku",areaLengthOrWidth:"Zadejte délku obdélníku",areaSpecifyWidth:"Zadejte šířku obdélníku",invalidPositive:"Neplatný vstup. Zadejte hodnotu větší než 0.",invalidRect:"Nelze vytvořit obdélník. Zadejte platné rohy nebo rozměry.",thicknessNotSupported:"Tloušťka obdélníku se aktuálně nezapisuje do dat entity. Nastavení tloušťky se ignoruje.",keywords:{chamfer:{display:"Zkosení(C)",local:"Zkosení",global:"Chamfer"},elevation:{display:"Výška(E)",local:"Výška",global:"Elevation"},fillet:{display:"Zaoblení(F)",local:"Zaoblení",global:"Fillet"},thickness:{display:"Tloušťka(T)",local:"Tloušťka",global:"Thickness"},width:{display:"Šířka(W)",local:"Šířka",global:"Width"},area:{display:"Plocha(A)",local:"Plocha",global:"Area"},dimensions:{display:"Rozměry(D)",local:"Rozměry",global:"Dimensions"},rotation:{display:"Otočení(R)",local:"Otočení",global:"Rotation"},length:{display:"Délka(L)",local:"Délka",global:"Length"},rectWidth:{display:"Šířka(W)",local:"Šířka",global:"Width"}}},rotate:{basePoint:"Zadejte základní bod",rotationAngleOrOptions:"Zadejte úhel otočení nebo",referenceAngleOrPoints:"Zadejte referenční úhel nebo",firstReferencePoint:"Zadejte první bod referenčního úhlu",secondReferencePoint:"Zadejte druhý bod",newAngle:"Zadejte nový úhel",keywords:{copy:{display:"Kopírovat(C)",local:"Kopírovat",global:"Copy"},reference:{display:"Reference(R)",local:"Reference",global:"Reference"},points:{display:"Body(P)",local:"Body",global:"Points"}},invalid:{referencePoints:"Neplatné referenční body: body musí být různé."}},revcloud:{firstCornerOrOptions:"Zadejte první rohový bod nebo",firstCorner:"Zadejte první rohový bod",oppositeCorner:"Zadejte protilehlý roh",startPoint:"Zadejte počáteční bod",nextPoint:"Zadejte další bod",nextPointOrUndo:"Zadejte další bod nebo",firstPoint:"Zadejte první bod",guideCursor:"Veďte kurzor podél obláčku (Enter dokončí)",arcLength:"Zadejte délku oblouku",selectObject:"Vyberte objekt",style:"Zadejte styl oblouků revizního obláčku",reverseDirection:"Obrátit směr",invalidArcLength:"Délka oblouku musí být větší než 0.",invalidObject:"Vybraný objekt nelze převést na revizní obláček.",keywords:{arcLength:{display:"Délka oblouku(A)",local:"Délka oblouku",global:"ArcLength"},object:{display:"Objekt(O)",local:"Objekt",global:"Object"},rectangular:{display:"Obdélníkový(R)",local:"Obdélníkový",global:"Rectangular"},polygonal:{display:"Mnohoúhelníkový(P)",local:"Mnohoúhelníkový",global:"Polygonal"},freehand:{display:"Od ruky(F)",local:"Od ruky",global:"Freehand"},style:{display:"Styl(S)",local:"Styl",global:"Style"},normal:{display:"Normální(N)",local:"Normální",global:"Normal"},calligraphy:{display:"Kaligrafie(C)",local:"Kaligrafie",global:"Calligraphy"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}},sketch:{specifySketch:"Zadejte skicu nebo",sketching:"Pohybem ukazatele kreslete (kliknutím nebo Enter zastavíte)",type:"Zadejte typ skici",increment:"Zadejte přírůstek skici",tolerance:"Zadejte toleranci splajnu",firstPoint:"Zadejte první bod",nextPoint:"Zadejte koncový bod",keywords:{type:{display:"Typ(T)",local:"Typ",global:"Type"},increment:{display:"Přírůstek(I)",local:"Přírůstek",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"Úsečky(L)",local:"Úsečky",global:"Lines"},polyline:{display:"Křivka(P)",local:"Křivka",global:"Polyline"},spline:{display:"Splajn(S)",local:"Splajn",global:"Spline"}}},spline:{firstPoint:"Zadejte první bod",nextPoint:"Zadejte další bod (nebo stiskněte Enter pro dokončení)",firstPointWithOptions:"Zadejte první bod nebo",nextPointWithFitOptions:"Zadejte další bod nebo",nextPointWithCvOptions:"Zadejte další řídicí bod nebo",methodPrompt:"Zadejte metodu vytvoření splajnu",knotsPrompt:"Zadejte parametrizaci uzlů",degreePrompt:"Zadejte stupeň splajnu",keywords:{method:{display:"Metoda(M)",local:"Metoda",global:"Method"},fit:{display:"Přizpůsobit(F)",local:"Přizpůsobit",global:"Fit"},cv:{display:"ŘB(C)",local:"ŘB",global:"CV"},knots:{display:"Uzly(K)",local:"Uzly",global:"Knots"},degree:{display:"Stupeň(D)",local:"Stupeň",global:"Degree"},undo:{display:"Zpět(U)",local:"Zpět",global:"Undo"},close:{display:"Uzavřít(C)",local:"Uzavřít",global:"Close"},chord:{display:"Tětiva(C)",local:"Tětiva",global:"Chord"},sqrtChord:{display:"Odmocnina tětivy(S)",local:"Odmocnina tětivy",global:"SqrtChord"},uniform:{display:"Rovnoměrné(U)",local:"Rovnoměrné",global:"Uniform"}}},sysvar:{prompt:"Zadejte novou hodnotu"},zoom:{mainPrompt:"Zadejte roh okna nebo",firstCorner:"Zadejte první roh",secondCorner:"Zadejte protilehlý roh",centerPoint:"Zadejte středový bod",heightOrScale:"Zadejte výšku nebo faktor měřítka (nX nebo nXP)",scaleFactor:"Zadejte faktor měřítka (nX nebo nXP)",keywords:{all:{display:"Vše(A)",local:"Vše",global:"All"},center:{display:"Střed(C)",local:"Střed",global:"Center"},extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},previous:{display:"Předchozí(P)",local:"Předchozí",global:"Previous"},original:{display:"Původní(O)",local:"Původní",global:"Original"},saved:{display:"Uložený(V)",local:"Uložený",global:"Saved"},smart:{display:"Chytrý(I)",local:"Chytrý",global:"Smart"},scale:{display:"Měřítko(S)",local:"Měřítko",global:"Scale"},window:{display:"Okno(W)",local:"Okno",global:"Window"}}},chtml:{exportFormat:"Formát exportu",exportInvisibleLayers:"Exportovat neviditelné hladiny",exportLayouts:"Exportovat rozvržení",background:"Barva pozadí",initialView:"Počáteční pohled při otevření HTML",viewerMode:"Režim offline prohlížeče",chunkSizeMiB:"Velikost části v MiB (vícesouborový balíček)",compressChunks:"Komprimovat části (vícesouborový balíček)",keywords:{single:{display:"Jeden soubor(S)",local:"Jeden soubor",global:"Single"},multi:{display:"Vícesouborový balíček(M)",local:"Vícesouborový balíček",global:"Multi"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"},extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},current:{display:"Aktuální(C)",local:"Aktuální",global:"Current"},view:{display:"Pohled(V)",local:"Pohled",global:"View"},measure:{display:"Měření a kontrola(M)",local:"Měření a kontrola",global:"Measure"},black:{display:"Černá(B)",local:"Černá",global:"Black"},white:{display:"Bílá(W)",local:"Bílá",global:"White"},space:{display:"Prostor(S)",local:"Prostor",global:"Space"}}},cpdf:{modelSpaceFit:"Rám modelového prostoru",exportLayouts:"Exportovat rozvržení",textMode:"Vykreslení textu",keywords:{extents:{display:"Rozsah(E)",local:"Rozsah",global:"Extents"},display:{display:"Zobrazení(D)",local:"Zobrazení",global:"Display"},text:{display:"Text(T)",local:"Text",global:"Text"},vector:{display:"Vektor(V)",local:"Vektor",global:"Vector"},yes:{display:"Ano(Y)",local:"Ano",global:"Yes"},no:{display:"Ne(N)",local:"Ne",global:"No"}}}},C0={document:{untitled:"Bez názvu"},commandLine:{noLast:"(žádný předchozí příkaz)",unknownCommand:"Neznámý příkaz",executed:"Provedený příkaz",showHistory:"Zobrazit historii příkazů",placeholder:"Zadejte příkaz",showMessages:"Zobrazit historii zpráv",canceled:"*Zrušeno*",noHistory:"(žádná historie)",invalidInput:"Neplatný vstup.",close:"Zavřít příkazový řádek"},mobileCommand:{length:"Délka",angle:"Úhel",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Potvrdit",cancel:"Zrušit",help:"Nápověda",back:"Zpět",collapse:"Sbalit",expand:"Rozbalit"},inputManager:{firstCorner:"Zadejte první roh nebo",secondCorner:"Zadejte druhý roh nebo"},message:{onLockedLayer:"na uzamčené hladině.",fetchingDrawingFile:"Načítám soubor…",exportingDxf:"Exportuji DXF…",exportingPdf:"Exportuji PDF…",exportingSvg:"Exportuji SVG…",calculatingSmartExtents:"Počítám chytrý rozsah…",importingPdf:"Importuji PDF…",exportingEntityPreview:"Exportuji obrázek…",collectingMemoryProfile:"Analyzuji paměť…",fontCached:"Font úspěšně uložen do mezipaměti",fontCacheFailed:"Uložení fontu do mezipaměti selhalo",fontsNotFound:"Fonty nenalezené v úložišti: {fonts}.",fontsNotLoaded:"Nepodařilo se načíst fonty: {fonts}.",fontMissedInDrawing:"Font „{font}“ vyžaduje {count} textových objektů, ale není k dispozici. Zobrazuje se jako „{replacementFont}“.",fontMissedReplacement:"„{font}“ (zobrazeno fontem „{replacement}“)",failedToGetAvaiableFonts:"Nepodařilo se získat fonty z „{url}“!",failedToOpenFile:"Nepodařilo se otevřít soubor „{fileName}“!",failedToOpenFileToast:"Nepodařilo se otevřít „{fileName}“. Podrobnosti najdete v centru oznámení.",failedToOpenFileWorkerOom:"Nepodařilo se otevřít „{fileName}“. Analýza selhala kvůli nedostatku dostupné paměti (LibreDWG parser). Kliknutím na {dwgParserLink} můžete zakoupit komerční DWG parser a otevírat velké výkresy bez tohoto pádu.",failedToOpenFileWorkerOomLink:"tuto stránku",failedToOpenFileWorkerTimeout:"Nepodařilo se otevřít „{fileName}“. Při načítání výkresu vypršel časový limit.",failedToOpenFileFontLoadFailed:"Nepodařilo se otevřít „{fileName}“. Potřebné fonty se nepodařilo načíst.",failedToOpenFileLicenseExpired:"Nepodařilo se otevřít „{fileName}“. Licence převodníku DWG vypršela.",failedToOpenFileLicenseInvalid:"Nepodařilo se otevřít „{fileName}“. Licence převodníku DWG chybí nebo je neplatná.",unknownEntities:"Tento výkres obsahuje {count} neznámých nebo nepodporovaných objektů! Tyto objekty nebudou zobrazeny.",tianzhengEntities:"Tento výkres obsahuje vlastní objekty TArch / Tianzheng (nebo podobné třetí strany) (asi {count}). V tomto prostředí je nelze plně zpracovat, takže se část obsahu nemusí zobrazit.",emptyProxyEntities:"Tento výkres obsahuje {count} vlastních objektů bez proxy grafiky! Tyto objekty nebudou zobrazeny."},notification:{center:{title:"Oznámení",clearAll:"Vymazat vše",noNotifications:"Žádná oznámení"},group:{fontMissed:"Chybějící fonty",fontMissedSummary:"{count} zpráv o fontech. Kliknutím zobrazíte podrobnosti.",unsupportedEntities:"Nepodporované objekty",unsupportedEntitiesSummary:"{count} zpráv o načítání. Kliknutím zobrazíte podrobnosti.",genericSummary:"{count} zpráv. Kliknutím zobrazíte podrobnosti."},title:{failedToOpenFile:"Nepodařilo se otevřít soubor",failedToOpenFileWorkerOom:"Nedostatek paměti",failedToOpenFileWorkerTimeout:"Vypršel časový limit otevření",failedToOpenFileFontLoadFailed:"Načtení fontu selhalo",failedToOpenFileLicenseExpired:"Licence vypršela",failedToOpenFileLicenseInvalid:"Neplatná licence",fontNotFound:"Font nenalezen",fontNotLoaded:"Font nenačten",parsingWarning:"Problémy při načítání výkresu",systemMessage:"Systémová zpráva",systemWarning:"Systémové varování",systemError:"Systémová chyba",systemInfo:"Systémové informace"}},progress:{start:"Zahajuji načítání souboru…",parse:"Načítám soubor…",font:"Stahuji fonty potřebné pro tento výkres…",ltype:"Načítám typy čar…",style:"Načítám textové styly…",dimstyle:"Načítám kótovací styly…",layer:"Načítám hladiny…",vport:"Načítám výřezy…",blockrecord:"Načítám záznamy bloků…",header:"Načítám hlavičku…",block:"Načítám bloky…",entity:"Načítám objekty…",object:"Načítám pojmenované slovníky…",rendering:"Vykreslování výkresu ...",end:"Hotovo!"},about:{title:"O aplikaci",close:"Zavřít",product:"CAD Viewer",tagline:"Vysokovýkonný webový CAD prohlížeč pro výkresy DWG a DXF.",website:"Web",docs:"Dokumentace",repository:"GitHub",copyright:"© {year} mlightcad. Všechna práva vyhrazena.",ok:"OK"},drawStyle:{color:"Barva",fontSize:"Výška textu"},shortCutToolbar:{more:"Více",undo:"Zpět",redo:"Znovu",erase:"Smazat",collapse:"Sbalit panel nástrojů",expand:"Rozbalit panel nástrojů"},textHeight:{title:"Výška textu",close:"Zavřít",ok:"OK",cancel:"Zrušit",adaptive:"Přizpůsobit obrazovce",custom:"Vlastní výška textu",customPlaceholder:"Světová výška",fromScreen:"Ze velikosti na obrazovce",fromScreenHint:"Zadejte, jak velký má text vypadat na obrazovce při aktuálním zoomu. Přepočítá se na pevnou světovou výšku, která se při pozdějším zoomování nemění.",screenPxPlaceholder:"Velikost písma",screenUnit:"px",convert:"Přepočítat"},entityPick:{cancel:"Zrušit výběr"},colorPicker:{title:"Vybrat barvu",close:"Zavřít",ok:"OK",cancel:"Zrušit",index:"Index barvy: ",rgb:"RGB: ",input:"Barva",inputPlaceholder:"1-255 nebo #RRGGBB"},touchPointTutorial:{title:"Jak přesně vybrat bod?",description:"Podržte prst na obrazovce asi 0,5 sekundy. Nad prstem se objeví kříž, který při pohybu sleduje prst a přichytává se k geometrii pro přesnější výběr.",snoozeToday:"Dnes už nepřipomínat",hideForever:"Už nepřipomínat",ok:"Rozumím"},dataSource:{open:"Otevřít",local:"Místní soubor",url:"Z URL",openFrom:"Otevřít z {name}",signInTo:"Přihlásit se k {name}",signOutOf:"Odhlásit se z {name}",signOutOfAccount:"Odhlásit se z {name} ({account})",urlDialogTitle:"Otevřít z URL",urlDialogHint:"Zadejte URL souboru .dwg nebo .dxf.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"Zrušit",onedrive:"OneDrive",googledrive:"Google Drive",or:"nebo",dropFile:"Přetáhněte soubor sem nebo",browse:"procházet",dropOrBrowse:"Přetáhněte soubor DWG nebo DXF sem, nebo procházejte",newDrawing:"Nový výkres",source:"Zdroj",unavailable:"Tento zdroj zatím není k dispozici.",selectFile:"Vybrat soubor",signInRequired:"Nejprve se přihlaste a pak vyberte soubor.",downloading:"Stahuji soubor ..."}},A0={document:{untitled:"Untitled"},commandLine:{noLast:"(no last command)",unknownCommand:"Unknown command",executed:"Executed command",showHistory:"Show command history",placeholder:"Type command",showMessages:"Show message history",canceled:"*Canceled*",noHistory:"(no history)",invalidInput:"Invalid input.",close:"Close command line"},mobileCommand:{length:"Length",angle:"Angle",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Confirm",cancel:"Cancel",help:"Help",back:"Back",collapse:"Collapse",expand:"Expand"},inputManager:{firstCorner:"Specify the first corner or",secondCorner:"Specify the second corner or"},message:{onLockedLayer:"on a locked layer.",fetchingDrawingFile:"Fetching file ...",exportingDxf:"Exporting DXF ...",exportingPdf:"Exporting PDF ...",exportingSvg:"Exporting SVG ...",calculatingSmartExtents:"Calculating smart extents ...",importingPdf:"Importing PDF ...",exportingEntityPreview:"Exporting image ...",collectingMemoryProfile:"Analyzing memory ...",fontCached:"Font cached successfully",fontCacheFailed:"Failed to cache font",fontsNotFound:"Fonts not found in the font repository: {fonts}.",fontsNotLoaded:"Failed to load fonts: {fonts}.",fontMissedInDrawing:'Font "{font}" is required by {count} text object(s) but is not available. Displaying with "{replacementFont}".',fontMissedReplacement:'"{font}" (displaying with "{replacement}")',failedToGetAvaiableFonts:'Failed to get available fonts from "{url}"!',failedToOpenFile:'Failed to open file "{fileName}"!',failedToOpenFileToast:'Failed to open "{fileName}". Check the notification center for details.',failedToOpenFileWorkerOom:'Failed to open "{fileName}". Parsing failed because available memory was insufficient (LibreDWG parser). You can click {dwgParserLink} to purchase the commercial DWG parser and open large drawings without this crash.',failedToOpenFileWorkerOomLink:"this page",failedToOpenFileWorkerTimeout:'Failed to open "{fileName}". The operation timed out while parsing the drawing.',failedToOpenFileFontLoadFailed:'Failed to open "{fileName}". Required fonts could not be loaded.',failedToOpenFileLicenseExpired:'Failed to open "{fileName}". The DWG converter license has expired.',failedToOpenFileLicenseInvalid:'Failed to open "{fileName}". The DWG converter license is missing or invalid.',unknownEntities:"This drawing contains {count} unknown or unsupported entities! Those entities will not be shown.",tianzhengEntities:"This drawing contains TArch / Tianzheng (or similar third-party) custom entities (about {count}). They cannot be fully parsed in this environment, so some content may not display.",emptyProxyEntities:"This drawing contains {count} custom entities without proxy graphics! Those entities will not be shown."},notification:{center:{title:"Notifications",clearAll:"Clear All",noNotifications:"No notifications"},group:{fontMissed:"Missing Fonts",fontMissedSummary:"{count} font-related messages. Click to expand details.",unsupportedEntities:"Unsupported Entities",unsupportedEntitiesSummary:"{count} parsing-related messages. Click to expand details.",genericSummary:"{count} messages. Click to expand details."},title:{failedToOpenFile:"Failed to Open File",failedToOpenFileWorkerOom:"Insufficient Memory",failedToOpenFileWorkerTimeout:"Open Timed Out",failedToOpenFileFontLoadFailed:"Font Load Failed",failedToOpenFileLicenseExpired:"License Expired",failedToOpenFileLicenseInvalid:"Invalid License",fontNotFound:"Font Not Found",fontNotLoaded:"Font Not Loaded",parsingWarning:"Issues on Parsing Drawing",systemMessage:"System Message",systemWarning:"System Warning",systemError:"System Error",systemInfo:"System Info"}},progress:{start:"Start parsing file ...",parse:"Parsing file ...",font:"Downloading fonts needed by this drawing ...",ltype:"Parsing line types ...",style:"Parsing text syltes ...",dimstyle:"Parsing dimension styles ...",layer:"Parsing layers ...",vport:"Parsing viewports ...",blockrecord:"Parsing block record ...",header:"Parsing header ...",block:"Parsing blocks ...",entity:"Parsing entities ...",object:"Parsing named dictionaries ...",rendering:"Rendering drawing ...",end:"Finished!"},about:{title:"About",close:"Close",product:"CAD Viewer",tagline:"High-performance web CAD viewer for DWG and DXF drawings.",website:"Website",docs:"Documentation",repository:"GitHub",copyright:"© {year} mlightcad. All rights reserved.",ok:"OK"},drawStyle:{color:"Color",fontSize:"Text height"},shortCutToolbar:{more:"More",undo:"Undo",redo:"Redo",erase:"Delete",collapse:"Collapse toolbar",expand:"Expand toolbar"},textHeight:{title:"Text Height",close:"Close",ok:"OK",cancel:"Cancel",adaptive:"Fit to screen",custom:"Custom text height",customPlaceholder:"World height",fromScreen:"From screen size",fromScreenHint:"Enter how large the text should look on screen at the current zoom. It is converted to a fixed world-space height that stays constant when you zoom later.",screenPxPlaceholder:"Font size",screenUnit:"px",convert:"Convert"},entityPick:{cancel:"Cancel selection"},colorPicker:{title:"Select Color",close:"Close",ok:"OK",cancel:"Cancel",index:"Color Index: ",rgb:"RGB: ",input:"Color",inputPlaceholder:"1-255 or #RRGGBB"},touchPointTutorial:{title:"How to pick points precisely?",description:"Long-press on the screen for about 0.5 seconds. A cross appears above your finger and follows as you move, snapping to geometry for more accurate picks.",snoozeToday:"Don't remind me today",hideForever:"Don't remind me again",ok:"Got it"},dataSource:{open:"Open",local:"Local file",url:"From URL",openFrom:"Open from {name}",signInTo:"Sign in to {name}",signOutOf:"Sign out of {name}",signOutOfAccount:"Sign out of {name} ({account})",urlDialogTitle:"Open from URL",urlDialogHint:"Enter a URL to a .dwg or .dxf file.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"Cancel",onedrive:"OneDrive",googledrive:"Google Drive",or:"or",dropFile:"Drop a file here or",browse:"browse",dropOrBrowse:"Drop a DWG or DXF file here, or browse",newDrawing:"New Drawing",source:"Source",unavailable:"This source is not available yet.",selectFile:"Select file",signInRequired:"Sign in first to select a file.",downloading:"Downloading file ..."}},_0={ACAD:{"-hatch":{description:"Şerit menüsü olmadan komut satırı seçenekleriyle tarama dolgular oluşturur"},"-layer":{description:"Komut satırı seçenekleriyle katmanları yönetir"},about:{description:"mlightcad hakkında bilgi gösterir"},acadver:{description:"Çizim veritabanı sürüm tanımlayıcısını saklar (salt okunur)"},angbase:{description:"Geçerli KKS'ye göre 0 açı temel yönünü ayarlar"},angdir:{description:"Pozitif açıların saat yönünde mi yoksa saat yönünün tersine mi ölçüleceğini ayarlar"},arc:{description:"Bir yay oluşturur"},aunits:{description:"Açılar için görüntüleme biçimini ayarlar"},auprec:{description:"AUNITS ile birlikte kullanılan, açılar için görüntüleme hassasiyetini ayarlar"},bmpout:{description:"BMP olarak dışa aktarır"},cdxf:{description:"Geçerli çizimi DXF olarak dışa aktarır"},cpdf:{description:"Geçerli çizimi PDF olarak dışa aktarır"},"-cpdf":{description:"Geçerli çizimi komut satırı seçenekleriyle PDF olarak dışa aktarır"},cecolor:{description:"Yeni oluşturulan nesneler için geçerli varsayılan rengi ayarlar"},celtscale:{description:"Yeni oluşturulan nesneler için çizgi tipi ölçek faktörünü denetler"},celtype:{description:"Yeni oluşturulan nesneler için çizgi tipini ayarlar"},celweight:{description:"Yeni oluşturulan nesneler için varsayılan çizgi kalınlığını ayarlar"},cetransparency:{description:"Yeni oluşturulan nesneler için saydamlığı ayarlar"},cachefont:{description:"Metin işleme için yerel bir yazı tipi dosyasını IndexedDB'ye önbelleğe alır"},circle:{description:"Merkez ve yarıçapa göre bir daire oluşturur"},clayer:{description:"Yeni nesneler ve düzenleme işlemleri için geçerli katmanı ayarlar"},cmleaderstyle:{description:"Geçerli çoklu lider stilinin adını ayarlar"},cmlscale:{description:"Bir çoklu çizginin genel genişliğini denetler"},cmlstyle:{description:"Geçerli çoklu çizgi stilinin adını ayarlar"},colortheme:{description:"Kullanıcı arayüzünün renk temasını denetler (koyu veya açık)"},copy:{description:"Seçili varlıkları klonlayarak yeni konumlara kopyalar",prompt:"Varlıkları seçin"},csvg:{description:"Geçerli çizimi SVG'ye dönüştürür"},chtml:{description:"Geçerli çizimi bağımsız, çevrimdışı bir HTML dosyasına dışa aktarır"},"-chtml":{description:"Komut satırı seçeneklerini kullanarak geçerli çizimi HTML'e dışa aktarır"},dimlinear:{description:"Doğrusal ölçülendirmeler oluşturur"},dimaligned:{description:"Hizalı doğrusal ölçülendirme oluşturur"},dimradius:{description:"Daire ve yaylar için yarıçap ölçülendirmesi oluşturur"},dimdiameter:{description:"Daire ve yaylar için çap ölçülendirmesi oluşturur"},dimangular:{description:"Açısal ölçülendirmeler oluşturur"},dimarc:{description:"Yay uzunluğu ölçüsü oluşturur"},dimordinate:{description:"Ordinat ölçüsü oluşturur"},dimcontinue:{description:"Sürekli ölçü oluşturur"},dimbaseline:{description:"Taban çizgisi ölçüsü oluşturur"},dimstyle:{description:"Geçerli ölçülendirme stilinin adını ayarlar"},dwgname:{description:"Geçerli çizim dosyasının adını saklar (salt okunur)"},loginname:{description:"Kullanıcının oturum açma adını görüntüler (salt okunur)"},dynmode:{description:"İmleçteki Dinamik Girdi ayarlarını denetler"},dynprompt:{description:"Dinamik Girdi araç ipuçlarında istemlerin görüntülenmesini denetler"},ellipse:{description:"Eksen uç noktalarına veya merkeze göre bir elips veya eliptik yay oluşturur"},erase:{description:"Seçili varlıkları çizimden siler",prompt:"Varlıkları seçin"},extmax:{description:"Model alanı çizim kapsamının sağ üst köşesini saklar (salt okunur)"},extmin:{description:"Model alanı çizim kapsamının sol alt köşesini saklar (salt okunur)"},entout:{description:"Seçili varlıklar için birleştirilmiş bir önizleme görüntüsü dışa aktarır",prompt:"Varlıkları seçin"},hideobjects:{description:"Seçili nesnelerin görüntülenmesini geçici olarak gizler",prompt:"Nesneleri seçin"},imageattach:{description:"Geçerli çizime harici başvuru olarak bir raster görüntü ekler"},"-insert":{description:"Bir blok tanımını geçerli çizime ekler (komut satırı)"},xattach:{description:"Geçerli çizime harici başvuru olarak bir DWG veya DXF çizimi ekler"},gripcolor:{description:"Seçili nesneler üzerinde görüntülenen seçilmemiş tutamaçların rengini ayarlar"},griphot:{description:"Seçili (sıcak) tutamaçların rengini ayarlar"},gripobjlimit:{description:"Seçim kümesi belirtilen nesne sayısını aştığında tutamaç görüntülenmesini engeller (0 = sınır yok)"},grips:{description:"Seçili nesnelerde tutamaçların görüntülenip görüntülenmeyeceğini denetler"},gripsize:{description:"Tutamaç kutularının piksel cinsinden boyutunu ayarlar"},hatch:{description:"Kapalı bir alanı veya seçili nesneleri bir tarama deseniyle doldurur"},ipdf:{description:"Bir PDF dosyasından vektör geometrisini içe aktarır"},hpang:{description:"Yeni oluşturulan tarama desenleri için varsayılan açıyı radyan cinsinden ayarlar"},hpassoc:{description:"Yeni oluşturulan taramaların ilişkisel olup olmayacağını denetler"},hpbackgroundcolor:{description:"Yeni oluşturulan tarama desenleri için varsayılan arka plan rengini ayarlar"},hpcolor:{description:"Yeni oluşturulan taramalar için varsayılan rengi ayarlar"},hpdouble:{description:"Kullanıcı tanımlı tarama desenlerinin ikiye katlanıp katlanmayacağını denetler"},hpislanddetection:{description:"Yeni oluşturulan tarama sınırları içindeki adaların nasıl işleneceğini denetler"},hplayer:{description:"Yeni oluşturulan taramalar ve dolgular için varsayılan katmanı ayarlar"},hpname:{description:"Bu oturumda yeni oluşturulan taramalar için varsayılan desen adını ayarlar"},hpscale:{description:"Yeni oluşturulan tarama desenleri için varsayılan ölçek faktörünü ayarlar"},hpseparate:{description:"Birden çok sınır için tek mi yoksa ayrı tarama nesneleri mi oluşturulacağını denetler"},hptransparency:{description:"Yeni oluşturulan taramalar ve dolgular için varsayılan saydamlığı ayarlar"},insunits:{description:"Eklenen blokların, görüntülerin veya dış referansların otomatik ölçeklendirilmesi için çizim birimlerini belirtir"},jpgout:{description:"JPEG olarak dışa aktarır"},laycur:{description:"Seçili nesnelerin katman özelliğini geçerli katman olarak değiştirir",prompt:"Geçerli katmana değiştirilecek nesneleri seçin"},laydel:{description:"Bir katmanı ve o katmandaki tüm nesneleri siler"},layerclose:{description:"Katman Özellikleri Yöneticisi'ni kapatır"},layerp:{description:"Katman ayarlarında yapılan son değişikliği veya değişiklik kümesini geri alır"},layfrz:{description:"Seçili nesnelerin katmanını dondurur",prompt:"Dondurulacak katmandaki nesneyi seçin"},layiso:{description:"Seçili nesnelerin katmanlarını izole eder",prompt:"İzole edilecek katmanlardaki nesneleri seçin"},laylck:{description:"Seçili nesnelerin katmanını kilitler",prompt:"Kilitlenecek katmandaki nesneyi seçin"},layoff:{description:"Seçili nesnelerin katmanını kapatır",prompt:"Kapatılacak katmandaki nesneyi seçin"},layon:{description:"Çizimdeki tüm katmanları açar"},laythw:{description:"Çizimdeki tüm donmuş katmanları çözer"},layulk:{description:"Seçili nesnelerin katmanının kilidini açar",prompt:"Kilidi açılacak katmandaki nesneyi seçin"},layuniso:{description:"LAYISO tarafından gizlenen veya kilitlenen katmanları geri yükler"},line:{description:"Noktalar arasında düz çizgi parçaları çizer"},log:{description:"Hata ayıklama bilgilerini konsola kaydeder"},ltscale:{description:"Çizim için genel çizgi tipi ölçek faktörünü ayarlar"},lunits:{description:"Koordinatlar ve mesafeler için görüntüleme biçimini ayarlar"},luprec:{description:"LUNITS ile birlikte kullanılan, doğrusal birimler için görüntüleme hassasiyetini ayarlar"},lwdisplay:{description:"Çizgi kalınlıklarının çizimde görüntülenip görüntülenmeyeceğini denetler"},clearmeasurements:{description:"Geçerli yerleşimdeki tüm ölçümleri kaldırır"},measurementvis:{description:"Geçerli yerleşimdeki ölçümleri gösterir veya gizler"},measurementpanel:{description:"Ölçüm paletini açar"},measurementexport:{description:"Ölçümleri sidecar JSON dosyasına dışa aktarır"},measurementimport:{description:"Ölçümleri sidecar JSON dosyasından içe aktarır"},measurearea:{description:"Seçili nesnelerin veya noktaların alanını ve çevresini hesaplar"},measureangle:{description:"İki çizgi veya üç nokta arasındaki açıyı ölçer"},measurearc:{description:"Bir yay parçasının uzunluğunu ölçer"},measuredistance:{description:"İki nokta arasındaki mesafeyi ve delta değerlerini ölçer"},measurecontinuous:{description:"Enter veya İptal edilene kadar ardışık noktalar seçerek zincirleme mesafeleri ölçer"},measurepoint:{description:"Seçilen noktanın X/Y koordinatlarını ölçer"},measurement:{description:"Çizimin İngiliz (emperyal) birimlerini mi yoksa metrik birimleri mi kullanacağını ayarlar"},measurementcolor:{description:"Ölçüm katmanları için kullanılan rengi ayarlar"},modelbkcolor:{description:"Model alanı çizim alanının arka plan rengini ayarlar"},mline:{description:"Tek bir çoklu çizgi nesnesi olarak birden çok paralel çizgi oluşturur"},move:{description:"Seçili varlıkları bir yer değiştirme vektörüne göre taşır",prompt:"Varlıkları seçin"},offset:{description:"Belirtilen bir mesafede paralel eğriler, çoklu çizgiler veya daireler oluşturur"},mtext:{description:"Bir çoklu metin varlığı oluşturur"},open:{description:"Mevcut bir çizim dosyasını açar"},openprof:{description:"Dosya açma aşaması zamanlama profillerinin konsola kaydedilip kaydedilmeyeceğini denetler"},openperf:{description:"Son çizim açılışının zamanlamalarını Open Performance paletinde gösterir"},orthomode:{description:"İmleç hareketini yatay veya dikey eksenle sınırlar"},osmode:{description:"Bit kodu değeri kullanarak çalışan Nesne Yakalama modlarını ayarlar"},pan:{description:"Görüntüleme yönünü veya büyütmeyi değiştirmeden görünümü kaydırır"},paperbkcolor:{description:"Kağıt alanı (düzen) çizim alanının arka plan rengini ayarlar"},pdmode:{description:"POINT varlıklarının nasıl görüntüleneceğini denetler"},pdsize:{description:"POINT varlıkları için görüntüleme boyutunu ayarlar"},pickbox:{description:"Nesneleri seçmek için kullanılan seçim kutusunun boyutunu (piksel cinsinden) ayarlar"},pline:{description:"Birden çok nokta belirterek bir çoklu çizgi oluşturur"},pngout:{description:"PNG olarak dışa aktarır"},point:{description:"Noktalar oluşturur"},polaraddang:{description:"Ek kutupsal izleme açılarını noktalı virgülle ayrılmış liste olarak saklar"},polarang:{description:"Kutupsal izleme için kutupsal açı artımını ayarlar"},polarmode:{description:"Kutupsal ve nesne yakalama izleme ayarlarını denetler"},polygon:{description:"Merkez/yarıçapa veya bir çokgen kenarına göre düzgün bir çokgen oluşturur"},qnew:{description:"Yeni bir çizim başlatır"},close:{description:"Geçerli çizimi kapatır"},ray:{description:"Bir noktadan başlayıp sonsuza uzanan bir ışın oluşturur"},rectang:{description:"İki karşıt köşe belirterek bir dikdörtgen oluşturur"},regen:{description:"Geçerli çizimi yeniden çizer"},revcloud:{description:"Revizyon bulutu oluşturur veya değiştirir"},markuptext:{description:"Metin işareti yerleştirir"},markupline:{description:"Çizgi işareti oluşturur"},markuparrow:{description:"Ok işareti oluşturur"},markupcloud:{description:"Revizyon bulutu işareti oluşturur"},markuprect:{description:"Dikdörtgen işareti oluşturur"},markupcircle:{description:"Daire işareti oluşturur"},markuphighlight:{description:"Vurgu dikdörtgeni işareti oluşturur"},markupcallout:{description:"Çağrı notu oluşturur: önce lider ucunu, sonra metin kutusunu belirtin, ardından metni girin"},markupstamp:{description:"Damga veya özel sembol yerleştirir"},markupvis:{description:"İşaretleri gösterir veya gizler"},clearmarkups:{description:"Geçerli yerleşimdeki tüm işaretleri temizler"},markupexport:{description:"İşaretleri sidecar JSON dosyasına dışa aktarır"},markupimport:{description:"İşaretleri sidecar JSON dosyasından içe aktarır"},markuppanel:{description:"İşaret paletini açar"},rotate:{description:"Seçili varlıkları bir taban noktası etrafında döndürür",prompt:"Varlıkları seçin"},select:{description:"Varlıkları seçer"},shortcutmenu:{description:"Çizim alanındaki kısayol menülerinin kullanılabilirliğini denetler"},sketch:{description:"Bir dizi serbest el çizgi parçası oluşturur"},spline:{description:"Kontrol noktaları belirterek düzgün bir spline eğrisi oluşturur"},textstyle:{description:"Geçerli metin stilinin adını ayarlar"},unitmode:{description:"LUNITS Mimari veya Kesirli olduğunda koordinatların kesirli görüntülenmesini denetler"},switchbg:{description:"Çizim alanı arka planını beyaz ve siyah arasında değiştirir"},unisolateobjects:{description:"HIDEOBJECTS tarafından gizlenen tüm nesneleri yeniden görüntüler"},undo:{description:"Son veritabanı düzenleme işlemini geri alır",nothingToUndo:"Geri alınacak işlem yok."},redo:{description:"Geri alınan son veritabanı düzenleme işlemini yineler",nothingToRedo:"Yinelenecek işlem yok."},xline:{description:"Her iki yönde de sonsuza uzanan bir yapı çizgisi oluşturur"},zoom:{description:"Tüm varlıkların maksimum sınırlarını görüntülemek için yakınlaştırır"}},USER:{}},P0={arc:{startPointOrCenter:"Yayın başlangıç noktasını belirtin veya",secondPointOrOptions:"Yayın ikinci noktasını belirtin veya",secondPoint:"Yayın ikinci noktasını belirtin",startPoint:"Yayın başlangıç noktasını belirtin",centerPoint:"Yayın merkez noktasını belirtin",endPoint:"Yayın bitiş noktasını belirtin",endPointOrOptions:"Yayın bitiş noktasını belirtin veya",centerPointOrOptions:"Yayın merkez noktasını belirtin",includedAngle:"İç açıyı belirtin",chordLength:"Kiriş uzunluğunu belirtin",tangentDirection:"Yayın başlangıç noktası için teğet yönünü belirtin",radius:"Yayın yarıçapını belirtin",keywords:{center:{display:"Merkez(M)",local:"Merkez",global:"Center"},end:{display:"Bitiş(B)",local:"Bitiş",global:"End"},angle:{display:"Açı(A)",local:"Açı",global:"Angle"},chordLength:{display:"kiriş Uzunluğu(U)",local:"Kiriş Uzunluğu",global:"ChordLength"},direction:{display:"Yön(Y)",local:"Yön",global:"Direction"},radius:{display:"Yarıçap(R)",local:"Yarıçap",global:"Radius"}},invalid:{threePoint:"Geçersiz 3 noktalı yay: noktalar aynı doğru üzerinde veya bir yay tanımlayamıyor.",center:"Geçersiz merkez girişi: başlangıç ve bitiş noktaları aynı çember üzerinde olmalıdır.",angle:"Geçersiz açı girişi: iç açı 0 dereceden büyük ve 360 dereceden küçük olmalıdır.",chordLength:"Geçersiz kiriş uzunluğu: değer mevcut yarıçap için geçerli aralığın dışında.",direction:"Geçersiz yön: bu teğet yönünden bir yay oluşturulamıyor.",radius:"Geçersiz yarıçap: belirtilen yarıçap başlangıç ve bitiş noktalarını birleştiremiyor."}},circle:{center:"Çemberin merkezini belirtin",centerOrOptions:"Çemberin merkez noktasını belirtin veya",radius:"Çemberin yarıçapını belirtin",radiusOrDiameter:"Çemberin yarıçapını belirtin veya",diameter:"Çemberin çapını belirtin",twoPointFirst:"Çember çapının ilk uç noktasını belirtin",twoPointSecond:"Çember çapının ikinci uç noktasını belirtin",threePointFirst:"Çember üzerindeki ilk noktayı belirtin",threePointSecond:"Çember üzerindeki ikinci noktayı belirtin",threePointThird:"Çember üzerindeki üçüncü noktayı belirtin",keywords:{threeP:{display:"3N(3N)",local:"3N",global:"3P"},twoP:{display:"2N(2N)",local:"2N",global:"2P"},diameter:{display:"Çap(Ç)",local:"Çap",global:"Diameter"}}},copy:{basePointOrOptions:"Temel noktayı belirtin veya",displacementOrArray:"Yer değiştirmeyi belirtin veya",secondPointOrArray:"İkinci noktayı belirtin veya",modePrompt:"Kopyalama modu seçeneğini girin",arrayItemCount:"Orijinal dahil dizideki öğe sayısını girin",arraySecondPointOrFit:"İkinci noktayı belirtin veya",arrayFitSecondPoint:"İkinci noktayı belirtin",keywords:{displacement:{display:"Yer değiştirme(Y)",local:"Yer değiştirme",global:"Displacement"},mode:{display:"Mod(O)",local:"Mod",global:"Mode"},multiple:{display:"Çoklu(Ç)",local:"Çoklu",global:"Multiple"},single:{display:"Tekli(T)",local:"Tekli",global:"Single"},array:{display:"Dizi(D)",local:"Dizi",global:"Array"},fit:{display:"Uydur(U)",local:"Uydur",global:"Fit"}}},dimlinear:{...R.dimlinear,xLine1Point:"İlk uzatma çizgisinin başlangıç noktasını belirtin",xLine2Point:"İkinci uzatma çizgisinin başlangıç noktasını belirtin",dimLinePoint:"Ölçü çizgisi konumunu belirtin"},dimaligned:{...R.dimaligned},dimradius:{...R.dimradius},dimdiameter:{...R.dimdiameter},dimangular:{...R.dimangular},dimarc:{...R.dimarc},dimordinate:{...R.dimordinate},dimcontinue:{...R.dimcontinue},dimbaseline:{...R.dimbaseline},ellipse:{axisEndpointOrOptions:"Elipsin eksen uç noktasını belirtin veya",arcAxisEndpointOrCenter:"Eliptik yayın eksen uç noktasını belirtin veya",center:"Elipsin merkezini belirtin",firstAxisEndpoint:"Eksenin uç noktasını belirtin",secondAxisEndpoint:"Eksenin diğer uç noktasını belirtin",otherAxisOrRotation:"Diğer eksene olan mesafeyi belirtin veya",rotationAngle:"Ana eksen etrafındaki döndürme açısını belirtin",arcStartAngle:"Eliptik yayın başlangıç açısını belirtin",arcEndAngle:"Eliptik yayın bitiş açısını belirtin",keywords:{arc:{display:"Yay(Y)",local:"Yay",global:"Arc"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},rotation:{display:"Döndürme(D)",local:"Döndürme",global:"Rotation"}},invalid:{axis:"Geçersiz eksen girişi: eksen uzunluğu 0'dan büyük olmalıdır.",otherAxis:"Geçersiz diğer eksen girişi: mesafe 0'dan büyük olmalıdır.",rotation:"Geçersiz döndürme girişi: elde edilen küçük eksen 0'dan büyük olmalıdır."}},hatch:{prompt:"Sınır nesnesini seçin veya",pickPoint:"İç noktayı belirtin (bitirmek için Enter'a basın)",select:"Tarama yapılacak nesneleri seçin",patternName:"Tarama deseni adını girin",scale:"Tarama deseni ölçeğini belirtin",angle:"Tarama deseni açısını belirtin",style:"Tarama stilini girin",associative:"İlişkiselliği belirtin",invalidBoundary:"Seçilen nesneler kapalı bir sınır oluşturmuyor.",keywords:{pick:{display:"Nokta seç(N)",local:"Nokta seç",global:"PickPoints"},select:{display:"Nesne seç(S)",local:"Nesne seç",global:"SelectObjects"},cancel:{display:"İptal(İ)",local:"İptal",global:"Cancel"},pattern:{display:"Desen(D)",local:"Desen",global:"Pattern"},scale:{display:"Ölçek(Ö)",local:"Ölçek",global:"Scale"},angle:{display:"Açı(A)",local:"Açı",global:"Angle"},style:{display:"Stil(T)",local:"Stil",global:"HatchStyle"},associative:{display:"İlişkisel(İL)",local:"İlişkisel",global:"AssociativeMode"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},outer:{display:"Dış(D)",local:"Dış",global:"Outer"},ignore:{display:"Yoksay(Y)",local:"Yoksay",global:"Ignore"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hayır(H)",local:"Hayır",global:"No"}}},hideobjects:{hidden:"nesne gizlendi",restored:"nesne geri yüklendi",nothingToRestore:"Geri yüklenecek gizli nesne yok"},entout:{longSidePrompt:"Önizleme uzun kenar boyutunu piksel olarak girin",exported:"nesne önizlemesi dışa aktarıldı",skipped:"nesne atlandı",failed:{"no-preview-root":"Seçim için önizleme geometrisi oluşturulamadı","no-bounds":"Seçim için önizleme sınırları hesaplanamadı","capture-failed":"Nesne önizleme görüntüsü oluşturulamadı","download-failed":"Önizleme oluşturuldu ancak PNG indirmesi başarısız oldu"}},layer:{main:"Seçenek girin",listSummary:"Katman listesi tarayıcı konsoluna yazdırıldı",emptyInput:"Katman adı girilmedi.",newPrompt:"Yeni katman(lar) için ad girin",makePrompt:"Geçerli yapılacak katmanın adını girin",setPrompt:"Geçerli olarak ayarlanacak katmanın adını girin",onPrompt:"Açılacak katman ad(lar)ını girin",offPrompt:"Kapatılacak katman ad(lar)ını girin",freezePrompt:"Dondurulacak katman ad(lar)ını girin",thawPrompt:"Çözülecek katman ad(lar)ını girin",lockPrompt:"Kilitlenecek katman ad(lar)ını girin",unlockPrompt:"Kilidi açılacak katman ad(lar)ını girin",colorLayerPrompt:"Rengi değiştirilecek katman ad(lar)ını girin",colorValuePrompt:"Renk girin (ACI 1-255, 255,0,0 gibi RGB veya CSS renk adı)",invalidColor:"Geçersiz renk girişi.",descriptionLayerPrompt:"Açıklaması düzenlenecek katman adını girin",descriptionValuePrompt:"Yeni katman açıklamasını girin",created:"Oluşturulan katman sayısı",alreadyExists:"Katman zaten mevcut",notFound:"Katman bulunamadı",cannotChangeCurrent:"Geçerli katman kapatılamaz veya dondurulamaz.",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"Yap(Y)",local:"Yap",global:"Make"},set:{display:"Ayarla(A)",local:"Ayarla",global:"Set"},new:{display:"Yeni(Y)",local:"Yeni",global:"New"},on:{display:"Aç(A)",local:"Aç",global:"On"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},color:{display:"Renk(R)",local:"Renk",global:"Color"},freeze:{display:"Dondur(D)",local:"Dondur",global:"Freeze"},thaw:{display:"Çöz(Ç)",local:"Çöz",global:"Thaw"},lock:{display:"Kilitle(K)",local:"Kilitle",global:"Lock"},unlock:{display:"Kilidi aç(A)",local:"Kilidi aç",global:"Unlock"},description:{display:"Açıklama(A)",local:"Açıklama",global:"Description"}}},layon:{alreadyOn:"Tüm katmanlar zaten açık.",turnedOn:"Açılan katmanlar"},laycur:{prompt:"Geçerli katmana değiştirilecek nesneleri seçin",currentLayerNotFound:"Geçerli katman bulunamadı.",noObjects:"Geçerli nesne seçilmedi.",alreadyCurrent:"Seçilen nesneler zaten geçerli katmanda.",changed:"Geçerli katmana değiştirilen nesneler"},layfrz:{prompt:"Dondurulacak katmandaki nesneyi seçin veya",invalidSelection:"Geçersiz nesne seçildi.",settingsPrompt:"Değiştirilecek LAYFRZ ayarını girin",viewportPrompt:"Görüntü penceresi dondurma davranışını belirtin",blockSelectionPrompt:"İç içe blok seçim davranışını belirtin",vpfreezeFallback:"Mevcut görüntüleyici, görüntü penceresi başına katman dondurmayı desteklemiyor; bunun yerine Dondur davranışı kullanılıyor.",nestedSelectionLimited:"İç içe blok seçim ayarları kaydedildi, ancak mevcut seçim işlemi yine de üst düzey nesnenin katmanını çözümlüyor.",layerNotFound:"Katman bulunamadı",cannotFreezeCurrent:"Geçerli katman dondurulamaz.",alreadyFrozen:"Katman zaten donuk",frozen:"Dondurulan katman",restored:"Geri yüklenen katman",nothingToUndo:"Geri alınacak bir LAYFRZ işlemi yok.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},viewports:{display:"Görüntü pencereleri(G)",local:"Görüntü pencereleri",global:"Viewports"},blockSelection:{display:"Blok seçimi(B)",local:"Blok seçimi",global:"BlockSelection"},freeze:{display:"Dondur(D)",local:"Dondur",global:"Freeze"},vpfreeze:{display:"Görüntü dondur(V)",local:"Görüntü dondur",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Nesne(N)",local:"Nesne",global:"Entity"},none:{display:"Hiçbiri(H)",local:"Hiçbiri",global:"None"}}},layiso:{prompt:"İzole edilecek katman(lar)daki nesneleri seçin veya",settingsPrompt:"İzole edilmeyen katmanlar için ayarı girin",offModePrompt:"İzole edilmeyen katmanlar için kapatma davranışını girin",noLayers:"Geçerli katman seçilmedi.",layerNotFound:"Katman bulunamadı",isolated:"İzole edilen katman(lar)",affectedLayers:"etkilenen katmanlar",vpfreezeFallback:"Mevcut görüntüleyici, görüntü penceresi başına katman dondurmayı desteklemiyor; bunun yerine Kapat davranışı kullanılıyor.",lockFadeFallback:"Mevcut görüntüleyici katman solma görüntüsünü desteklemiyor; izole edilmeyen katmanlar solma olmadan kilitlenecek.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},lockAndFade:{display:"Kilitle ve soldur(K)",local:"Kilitle ve soldur",global:"LockAndFade"},vpfreeze:{display:"Görüntü dondur(V)",local:"Görüntü dondur",global:"Vpfreeze"}}},layuniso:{noPrevious:"Geri yüklenecek önceki LAYISO katman durumu yok.",layerNotFound:"Katman bulunamadı",nothingRestored:"Hiçbir LAYISO katman değişikliği geri yüklenmedi.",restored:"Geri yüklenen katmanlar"},laythw:{alreadyThawed:"Tüm katmanlar zaten çözülmüş.",thawed:"Çözülen katmanlar"},laylck:{prompt:"Kilitlenecek katmandaki bir nesneyi seçin",invalidSelection:"Geçersiz nesne seçildi.",layerNotFound:"Katman bulunamadı",alreadyLocked:"Katman zaten kilitli",locked:"Kilitlenen katman"},layulk:{prompt:"Kilidi açılacak katmandaki bir nesneyi seçin",invalidSelection:"Geçersiz nesne seçildi.",layerNotFound:"Katman bulunamadı",alreadyUnlocked:"Katmanın kilidi zaten açık",unlocked:"Kilidi açılan katman"},layoff:{prompt:"Kapatılacak katmandaki nesneyi seçin veya",invalidSelection:"Geçersiz nesne seçildi.",settingsPrompt:"Değiştirilecek LAYOFF ayarını girin",viewportPrompt:"Görüntü penceresi davranışını belirtin",blockSelectionPrompt:"İç içe blok seçim davranışını belirtin",vpfreezeFallback:"Mevcut görüntüleyici, görüntü penceresi başına katman kapatmayı desteklemiyor; bunun yerine Kapat davranışı kullanılıyor.",nestedSelectionLimited:"İç içe blok seçim ayarları kaydedildi, ancak mevcut seçim işlemi yine de üst düzey nesnenin katmanını çözümlüyor.",layerNotFound:"Katman bulunamadı",cannotTurnOffCurrent:"Geçerli katman kapatılamaz.",alreadyOff:"Katman zaten kapalı",turnedOff:"Kapatılan katman",restored:"Geri yüklenen katman",nothingToUndo:"Geri alınacak bir LAYOFF işlemi yok.",keywords:{settings:{display:"Ayarlar(A)",local:"Ayarlar",global:"Settings"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},viewports:{display:"Görüntü pencereleri(G)",local:"Görüntü pencereleri",global:"Viewports"},blockSelection:{display:"Blok seçimi(B)",local:"Blok seçimi",global:"BlockSelection"},off:{display:"Kapat(K)",local:"Kapat",global:"Off"},vpfreeze:{display:"Görüntü dondur(V)",local:"Görüntü dondur",global:"Vpfreeze"},block:{display:"Blok(B)",local:"Blok",global:"Block"},entity:{display:"Nesne(N)",local:"Nesne",global:"Entity"},none:{display:"Hiçbiri(H)",local:"Hiçbiri",global:"None"}}},layerp:{restored:"Önceki katman durumu geri yüklendi.",noPreviousState:"Geri yüklenecek önceki bir katman durumu yok."},line:{firstPoint:"İlk noktayı belirtin",firstPointOrContinue:"İlk noktayı belirtin veya",nextPoint:"Sonraki noktayı belirtin",nextPointWithOptions:"Sonraki noktayı belirtin veya",keywords:{continue:{display:"Devam et(D)",local:"Devam et",global:"Continue"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"}}},xline:{firstPointOrOptions:"Bir nokta belirtin veya",secondPoint:"İkinci noktayı belirtin",throughPoint:"Geçiş noktasını belirtin",angle:"Sonsuz doğru açısını girin",invalidDirection:"XLINE için geçersiz yön.",keywords:{hor:{display:"Yatay(Y)",local:"Yatay",global:"Hor"},ver:{display:"Dikey(D)",local:"Dikey",global:"Ver"},ang:{display:"Açı(A)",local:"Açı",global:"Ang"}}},ray:{startPoint:"Başlangıç noktasını belirtin",throughPoint:"Geçiş noktasını belirtin"},mline:{startPointWithOptions:"Başlangıç noktasını belirtin veya",nextPointWithOptions:"Sonraki noktayı belirtin veya",justificationPrompt:"Hizalama türünü girin",scalePrompt:"Çoklu çizgi ölçeğini belirtin",stylePrompt:"Çoklu çizgi stil adını girin veya liste için [?]",styleNotFound:"Çoklu çizgi stili bulunamadı",styleListHeader:"Yüklenen çoklu çizgi stilleri",styleListEmpty:"Mevcut çizimde yüklü çoklu çizgi stili yok.",keywords:{justification:{display:"Hizalama(H)",local:"Hizalama",global:"Justification"},scale:{display:"Ölçek(Ö)",local:"Ölçek",global:"Scale"},style:{display:"Stil(ST)",local:"Stil",global:"Style"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},top:{display:"Üst(Ü)",local:"Üst",global:"Top"},zero:{display:"Sıfır(S)",local:"Sıfır",global:"Zero"},bottom:{display:"Alt(A)",local:"Alt",global:"Bottom"}}},measureAngle:{vertex:"Köşe noktasını belirtin",arm1:"Birinci kol üzerindeki noktayı belirtin",arm2:"İkinci kol üzerindeki noktayı belirtin"},measureArc:{startPoint:"Yayın başlangıç noktasını belirtin",throughPoint:"Yay üzerinde bir nokta belirtin",endPoint:"Yayın bitiş noktasını belirtin",lockedEndPoint:"Yayın bitiş noktasını belirtin (Ctrl ile büyük/küçük yay arasında geçiş)",invalidPoints:"Üç nokta doğrusal ve bir yay tanımlamıyor."},measureArea:{firstPoint:"İlk noktayı belirtin",nextPoint:"Sonraki noktayı belirtin (bitirmek için Enter'a basın)"},measureDistance:{firstPoint:"İlk noktayı belirtin",secondPoint:"İkinci noktayı belirtin"},measureContinuous:{firstPoint:"İlk noktayı belirtin",nextPoint:"Sonraki noktayı belirtin (bitirmek için Enter'a basın)"},measurePoint:{point:"Noktayı belirtin"},measurement:{import:{chooseFile:"Bir ölçüm sidecar JSON dosyası seçin"}},markup:{author:"İnceleme yazarını belirtin (sonraki kullanımlar için kaydedilir)",text:{point:"Metin işaretinin noktasını belirtin",content:"İşaret metnini girin"},line:{firstPoint:"Çizgi işaretinin ilk noktasını belirtin",secondPoint:"Çizgi işaretinin ikinci noktasını belirtin"},arrow:{firstPoint:"Okun başlangıç noktasını belirtin",secondPoint:"Ok ucunu belirtin"},cloud:{firstCorner:"Bulutun ilk köşesini belirtin",secondCorner:"Bulutun karşı köşesini belirtin"},rect:{firstCorner:"Dikdörtgenin ilk köşesini belirtin",secondCorner:"Dikdörtgenin karşı köşesini belirtin"},circle:{center:"Dairenin merkezini belirtin",radius:"Dairenin yarıçapını belirtin"},shape:{calloutOn:"[Çağrı açık]",calloutOff:"[Çağrı kapalı]",calloutAnchor:"Çağrı metninin konumunu belirtin",keywords:{callout:{display:"Çağrı(C)",local:"Çağrı",global:"Callout"},noCallout:{display:"ÇağrıYok(N)",local:"ÇağrıYok",global:"NoCallout"}}},highlight:{firstCorner:"Vurgu dikdörtgeninin ilk köşesini belirtin",secondCorner:"Vurgu dikdörtgeninin karşı köşesini belirtin"},callout:{tip:"Lider ucunu veya çağrısı olmayan bulut/dikdörtgen/daire dış çerçevesini belirtin",anchor:"Çağrı metninin konumunu belirtin",content:"Çağrı metnini girin"},stamp:{kind:"Damga kimliğini girin [approved/rejected/revised/for-review/custom]",imageUrl:"Özel damga görüntüsü URL’sini girin (isteğe bağlı)",caption:"Damga açıklamasını girin (isteğe bağlı)",point:"Damga ekleme noktasını belirtin"},import:{chooseFile:"Bir işaret sidecar JSON dosyası seçin"}},move:{basePointOrDisplacement:"Temel noktayı belirtin veya",secondPointOrDisplacement:"İkinci noktayı belirtin veya",displacement:"Yer değiştirmeyi belirtin",keywords:{displacement:{display:"Yer değiştirme(Y)",local:"Yer değiştirme",global:"Displacement"}}},offset:{distance:"Öteleme mesafesini belirtin",selectObject:"Ötelenecek nesneyi seçin veya bitirmek için Enter'a basın",sidePoint:"Ötelenecek tarafta bir nokta belirtin",invalidDistance:"Öteleme mesafesi 0'dan büyük olmalıdır.",invalidSelection:"Seçilen nesne ötelenemez.",offsetFailed:"Belirtilen taraf için bir öteleme eğrisi oluşturulamadı."},mtext:{point:"Çok satırlı metin ekleme noktasını belirtin"},bmpout:{boundsFirstCorner:"Sınırların ilk köşesini belirtin",boundsSecondCorner:"Karşı köşeyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},jpgout:{boundsFirstCorner:"Sınırların ilk köşesini belirtin",boundsSecondCorner:"Karşı köşeyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},pngout:{boundsFirstCorner:"Sınırların ilk köşesini belirtin",boundsSecondCorner:"Karşı köşeyi belirtin",longSidePrompt:"Uzun kenar boyutunu piksel olarak girin"},imageattach:{insertionPoint:"Ekleme noktasını belirtin:",scale:"Ölçek faktörünü belirtin:",rotation:"Döndürme açısını belirtin:",invalidScale:"Ölçek faktörü 0 dan büyük olmalıdır.",decodeFailed:"Seçilen görüntü dosyası okunamadı."},insert:{blockName:"Blok adını girin:",insertionPoint:"Ekleme noktasını belirtin:",scale:"Ölçek faktörünü belirtin:",rotation:"Döndürme açısını belirtin:",invalidScale:"Ölçek faktörü 0 dan büyük olmalıdır.",invalidBlockName:"Geçersiz blok adı.",blockNotFound:"Blok bulunamadı",xrefNotAllowed:"Harici referans -INSERT ile eklenemez."},xattach:{insertionPoint:"Ekleme noktasını belirtin:",scale:"Ölçek faktörünü belirtin:",rotation:"Döndürme açısını belirtin:",invalidScale:"Ölçek faktörü 0 dan büyük olmalıdır.",unsupportedFile:"Lütfen bir DWG veya DXF dosyası seçin.",loading:"Harici referans yükleniyor...",loadFailed:"Seçilen çizim dosyası okunamadı."},point:{point:"Bir nokta belirtin"},polygon:{numberOfSides:"Kenar sayısını girin",centerOrEdge:"Çokgenin merkezini belirtin veya",radiusOrType:"Seçenekleri girin",edgeStart:"Kenarın ilk uç noktasını belirtin",edgeEnd:"Kenarın ikinci uç noktasını belirtin",keywords:{edge:{display:"Kenar(K)",local:"Kenar",global:"Edge"},inscribed:{display:"Çembere iç teğet(İ)",local:"Çembere iç teğet",global:"Inscribed"},circumscribed:{display:"Çembere dış teğet(D)",local:"Çembere dış teğet",global:"Circumscribed"}},invalid:{sides:"Geçersiz kenar sayısı. 3 ile 1024 arasında bir tam sayı girin.",radius:"Geçersiz yarıçap. Yarıçap 0'dan büyük olmalıdır.",edge:"Geçersiz kenar. Kenar uzunluğu 0'dan büyük olmalıdır."}},polyline:{firstPoint:"İlk noktayı belirtin",nextPoint:"Sonraki noktayı belirtin (bitirmek için Enter'a basın)",nextPointWithOptions:"Sonraki noktayı belirtin veya",nextPointWithArcOptions:"Sonraki noktayı belirtin veya",keywords:{arc:{display:"Yay(Y)",local:"Yay",global:"Arc"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},line:{display:"Doğru(D)",local:"Doğru",global:"Line"},angle:{display:"Açı(A)",local:"Açı",global:"Angle"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},secondPoint:{display:"İkinci nokta(İ)",local:"İkinci nokta",global:"SecondPoint"},radius:{display:"Yarıçap(R)",local:"Yarıçap",global:"Radius"}},arcAngle:"Yay açısını belirtin",arcCenter:"Merkez noktasını belirtin",arcSecondPoint:"Yay üzerinde ikinci noktayı belirtin",arcEndPoint:"Yayın bitiş noktasını belirtin",arcRadius:"Yay yarıçapını belirtin"},rect:{firstPoint:"İlk köşe noktasını belirtin",nextPoint:"Diğer köşe noktasını belirtin",firstPointWithOptions:"İlk köşe noktasını belirtin veya",otherCornerWithOptions:"Diğer köşe noktasını belirtin veya",chamferFirst:"İlk pah mesafesini belirtin",chamferSecond:"İkinci pah mesafesini belirtin",filletRadius:"Yuvarlatma yarıçapını belirtin",segmentWidth:"Dikdörtgen çizgi genişliğini belirtin",elevationValue:"Kotu belirtin",thicknessValue:"Kalınlığı belirtin",rotationAngle:"Dikdörtgen döndürme açısını belirtin",dimensionLength:"Dikdörtgen uzunluğunu belirtin",dimensionWidth:"Dikdörtgen genişliğini belirtin",areaValue:"Dikdörtgen alanını belirtin",areaLengthOrWidth:"Dikdörtgen uzunluğunu belirtin",areaSpecifyWidth:"Dikdörtgen genişliğini belirtin",invalidPositive:"Geçersiz giriş. Lütfen 0'dan büyük bir değer girin.",invalidRect:"Dikdörtgen oluşturulamadı. Lütfen geçerli köşeler veya boyutlar belirtin.",thicknessNotSupported:"Dikdörtgen kalınlığı şu anda nesne verisine yazılmıyor. Kalınlık ayarı yok sayılıyor.",keywords:{chamfer:{display:"Pah(P)",local:"Pah",global:"Chamfer"},elevation:{display:"Kot(K)",local:"Kot",global:"Elevation"},fillet:{display:"Yuvarlatma(Y)",local:"Yuvarlatma",global:"Fillet"},thickness:{display:"Kalınlık(K)",local:"Kalınlık",global:"Thickness"},width:{display:"Genişlik(G)",local:"Genişlik",global:"Width"},area:{display:"Alan(A)",local:"Alan",global:"Area"},dimensions:{display:"Boyutlar(B)",local:"Boyutlar",global:"Dimensions"},rotation:{display:"Döndürme(D)",local:"Döndürme",global:"Rotation"},length:{display:"Uzunluk(U)",local:"Uzunluk",global:"Length"},rectWidth:{display:"Genişlik(G)",local:"Genişlik",global:"Width"}}},rotate:{basePoint:"Temel noktayı belirtin",rotationAngleOrOptions:"Döndürme açısını belirtin veya",referenceAngleOrPoints:"Referans açısını belirtin veya",firstReferencePoint:"Referans açısının ilk noktasını belirtin",secondReferencePoint:"İkinci noktayı belirtin",newAngle:"Yeni açıyı belirtin",keywords:{copy:{display:"Kopyala(K)",local:"Kopyala",global:"Copy"},reference:{display:"Referans(R)",local:"Referans",global:"Reference"},points:{display:"Noktalar(N)",local:"Noktalar",global:"Points"}},invalid:{referencePoints:"Geçersiz referans noktaları: noktalar farklı olmalıdır."}},revcloud:{firstCornerOrOptions:"İlk köşe noktasını belirtin veya",firstCorner:"İlk köşe noktasını belirtin",oppositeCorner:"Karşı köşeyi belirtin",startPoint:"Başlangıç noktasını belirtin",nextPoint:"Sonraki noktayı belirtin",nextPointOrUndo:"Sonraki noktayı belirtin veya",firstPoint:"İlk noktayı belirtin",guideCursor:"İmleci bulut yolu boyunca götürün (bitirmek için Enter)",arcLength:"Yay uzunluğunu belirtin",selectObject:"Nesne seçin",style:"Revizyon bulutu yay stilini girin",reverseDirection:"Yönü ters çevir",invalidArcLength:"Yay uzunluğu 0'dan büyük olmalıdır.",invalidObject:"Seçilen nesne revizyon bulutuna dönüştürülemez.",keywords:{arcLength:{display:"Yay uzunluğu(A)",local:"Yay uzunluğu",global:"ArcLength"},object:{display:"Nesne(O)",local:"Nesne",global:"Object"},rectangular:{display:"Dikdörtgen(R)",local:"Dikdörtgen",global:"Rectangular"},polygonal:{display:"Çokgen(P)",local:"Çokgen",global:"Polygonal"},freehand:{display:"Serbest(F)",local:"Serbest",global:"Freehand"},style:{display:"Stil(S)",local:"Stil",global:"Style"},normal:{display:"Normal(N)",local:"Normal",global:"Normal"},calligraphy:{display:"Kaligrafi(C)",local:"Kaligrafi",global:"Calligraphy"},undo:{display:"Geri al(U)",local:"Geri al",global:"Undo"},yes:{display:"Evet(Y)",local:"Evet",global:"Yes"},no:{display:"Hayır(N)",local:"Hayır",global:"No"}}},sketch:{specifySketch:"Eskizi belirtin veya",sketching:"Eskiz için işaretçiyi hareket ettirin (durdurmak için tıklayın veya Enter)",type:"Eskiz türünü girin",increment:"Eskiz artışını belirtin",tolerance:"Spline toleransını belirtin",firstPoint:"İlk noktayı belirtin",nextPoint:"Bitiş noktasını belirtin",keywords:{type:{display:"Tür(T)",local:"Tür",global:"Type"},increment:{display:"Artış(I)",local:"Artış",global:"Increment"},tolerance:{display:"toLerance(L)",local:"toLerance",global:"Tolerance"},line:{display:"Çizgiler(L)",local:"Çizgiler",global:"Lines"},polyline:{display:"Çoklu çizgi(P)",local:"Çoklu çizgi",global:"Polyline"},spline:{display:"Spline(S)",local:"Spline",global:"Spline"}}},spline:{firstPoint:"İlk noktayı belirtin",nextPoint:"Sonraki noktayı belirtin (bitirmek için Enter'a basın)",firstPointWithOptions:"İlk noktayı belirtin veya",nextPointWithFitOptions:"Sonraki noktayı belirtin veya",nextPointWithCvOptions:"Sonraki kontrol noktasını belirtin veya",methodPrompt:"Spline oluşturma yöntemini girin",knotsPrompt:"Düğüm parametrelemesini girin",degreePrompt:"Spline derecesini belirtin",keywords:{method:{display:"Yöntem(Y)",local:"Yöntem",global:"Method"},fit:{display:"Uydur(U)",local:"Uydur",global:"Fit"},cv:{display:"KN(K)",local:"KN",global:"CV"},knots:{display:"Düğümler(D)",local:"Düğümler",global:"Knots"},degree:{display:"Derece(D)",local:"Derece",global:"Degree"},undo:{display:"Geri al(G)",local:"Geri al",global:"Undo"},close:{display:"Kapat(K)",local:"Kapat",global:"Close"},chord:{display:"Kiriş(K)",local:"Kiriş",global:"Chord"},sqrtChord:{display:"Karekök kiriş(K)",local:"Karekök kiriş",global:"SqrtChord"},uniform:{display:"Düzgün(D)",local:"Düzgün",global:"Uniform"}}},sysvar:{prompt:"Lütfen yeni değeri girin"},zoom:{mainPrompt:"Pencerenin köşesini belirtin veya",firstCorner:"İlk köşeyi belirtin",secondCorner:"Karşı köşeyi belirtin",centerPoint:"Merkez noktasını belirtin",heightOrScale:"Yükseklik veya ölçek faktörünü girin (nX veya nXP)",scaleFactor:"Ölçek faktörünü girin (nX veya nXP)",keywords:{all:{display:"Tümü(T)",local:"Tümü",global:"All"},center:{display:"Merkez(M)",local:"Merkez",global:"Center"},extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},previous:{display:"Önceki(Ö)",local:"Önceki",global:"Previous"},original:{display:"Orijinal(O)",local:"Orijinal",global:"Original"},saved:{display:"Kayıtlı(V)",local:"Kayıtlı",global:"Saved"},smart:{display:"Akıllı(I)",local:"Akıllı",global:"Smart"},scale:{display:"Ölçek(Ö)",local:"Ölçek",global:"Scale"},window:{display:"Pencere(P)",local:"Pencere",global:"Window"}}},chtml:{exportFormat:"Dışa aktarma biçimi",exportInvisibleLayers:"Görünmez katmanları dışa aktar",exportLayouts:"Yerleşimleri dışa aktar",background:"Arka plan rengi",initialView:"HTML açılırken başlangıç görünümü",viewerMode:"Çevrimdışı görüntüleyici modu",chunkSizeMiB:"Parça boyutu (MiB, çok dosyalı paket)",compressChunks:"Parçaları sıkıştır (çok dosyalı paket)",keywords:{single:{display:"Tek dosya(S)",local:"Tek dosya",global:"Single"},multi:{display:"Çok dosyalı paket(M)",local:"Çok dosyalı paket",global:"Multi"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hayır(H)",local:"Hayır",global:"No"},extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},current:{display:"Geçerli(G)",local:"Geçerli",global:"Current"},view:{display:"Görünüm(G)",local:"Görünüm",global:"View"},measure:{display:"Ölçüm ve İnceleme(Ö)",local:"Ölçüm ve İnceleme",global:"Measure"},black:{display:"Siyah(B)",local:"Siyah",global:"Black"},white:{display:"Beyaz(W)",local:"Beyaz",global:"White"},space:{display:"Alan(S)",local:"Alan",global:"Space"}}},cpdf:{modelSpaceFit:"Model alanı çerçevesi",exportLayouts:"Yerleşimleri dışa aktar",textMode:"Metin işleme",keywords:{extents:{display:"Kapsam(K)",local:"Kapsam",global:"Extents"},display:{display:"Görüntü(G)",local:"Görüntü",global:"Display"},text:{display:"Metin(M)",local:"Metin",global:"Text"},vector:{display:"Vektör(V)",local:"Vektör",global:"Vector"},yes:{display:"Evet(E)",local:"Evet",global:"Yes"},no:{display:"Hayır(H)",local:"Hayır",global:"No"}}}},E0={document:{untitled:"Adsız"},commandLine:{noLast:"(önceki komut yok)",unknownCommand:"Bilinmeyen komut",executed:"Komut çalıştırıldı",showHistory:"Komut geçmişini göster",placeholder:"Komut girin",showMessages:"Mesaj geçmişini göster",canceled:"*İptal edildi*",noHistory:"(geçmiş yok)",invalidInput:"Geçersiz giriş.",close:"Komut satırını kapat"},mobileCommand:{length:"Uzunluk",angle:"Açı",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"Onayla",cancel:"İptal",help:"Yardım",back:"Geri",collapse:"Daralt",expand:"Genişlet"},inputManager:{firstCorner:"İlk köşeyi belirtin veya",secondCorner:"İkinci köşeyi belirtin veya"},message:{onLockedLayer:"kilitli katmandaydı.",fetchingDrawingFile:"Dosya alınıyor ...",exportingDxf:"DXF dışa aktarılıyor ...",exportingPdf:"PDF dışa aktarılıyor ...",exportingSvg:"SVG dışa aktarılıyor ...",calculatingSmartExtents:"Akıllı sınırlar hesaplanıyor ...",importingPdf:"PDF içe aktarılıyor ...",exportingEntityPreview:"Görüntü dışa aktarılıyor ...",collectingMemoryProfile:"Bellek analiz ediliyor ...",fontCached:"Yazı tipi başarıyla önbelleğe alındı",fontCacheFailed:"Yazı tipi önbelleğe alınamadı",fontsNotFound:"Yazı tipi deposunda bulunamadı: {fonts}.",fontsNotLoaded:"Yazı tipleri yüklenemedi: {fonts}.",fontMissedInDrawing:'"{font}" yazı tipi {count} metin nesnesi tarafından gerekli, ancak kullanılamıyor. "{replacementFont}" ile gösteriliyor.',fontMissedReplacement:'"{font}" ("{replacement}" ile gösteriliyor)',failedToGetAvaiableFonts:'"{url}" adresinden yazı tipleri alınamadı!',failedToOpenFile:'"{fileName}" dosyası açılamadı!',failedToOpenFileToast:'"{fileName}" açılamadı. Ayrıntılar için bildirim merkezine bakın.',failedToOpenFileWorkerOom:'"{fileName}" açılamadı. Ayrıştırma, yetersiz bellek nedeniyle başarısız oldu (LibreDWG parser). Büyük çizimleri çökmeden açmak için ticari DWG parser satın almak üzere {dwgParserLink} bağlantısına tıklayabilirsiniz.',failedToOpenFileWorkerOomLink:"bu sayfa",failedToOpenFileWorkerTimeout:'"{fileName}" açılamadı. Çizim ayrıştırılırken işlem zaman aşımına uğradı.',failedToOpenFileFontLoadFailed:'"{fileName}" açılamadı. Gerekli yazı tipleri yüklenemedi.',failedToOpenFileLicenseExpired:'"{fileName}" açılamadı. DWG dönüştürücü lisansı süresi dolmuş.',failedToOpenFileLicenseInvalid:'"{fileName}" açılamadı. DWG dönüştürücü lisansı eksik veya geçersiz.',unknownEntities:"Bu çizim {count} bilinmeyen veya desteklenmeyen varlık içeriyor! Bu varlıklar gösterilmeyecek.",tianzhengEntities:"Bu çizim TArch / Tianzheng (veya benzeri üçüncü taraf) özel varlıklar içeriyor (yaklaşık {count}). Bu ortamda tam olarak ayrıştırılamazlar, bu nedenle bazı içerikler görüntülenmeyebilir.",emptyProxyEntities:"Bu çizim proxy grafiği olmayan {count} özel varlık içeriyor! Bu varlıklar gösterilmeyecek."},notification:{center:{title:"Bildirimler",clearAll:"Tümünü Temizle",noNotifications:"Bildirim yok"},group:{fontMissed:"Eksik Yazı Tipleri",fontMissedSummary:"{count} yazı tipi ile ilgili mesaj. Ayrıntılar için tıklayın.",unsupportedEntities:"Desteklenmeyen Varlıklar",unsupportedEntitiesSummary:"{count} ayrıştırma ile ilgili mesaj. Ayrıntılar için tıklayın.",genericSummary:"{count} mesaj. Ayrıntılar için tıklayın."},title:{failedToOpenFile:"Dosya Açılamadı",failedToOpenFileWorkerOom:"Yetersiz Bellek",failedToOpenFileWorkerTimeout:"Açma Zaman Aşımı",failedToOpenFileFontLoadFailed:"Yazı Tipi Yüklenemedi",failedToOpenFileLicenseExpired:"Lisans Süresi Doldu",failedToOpenFileLicenseInvalid:"Geçersiz Lisans",fontNotFound:"Yazı Tipi Bulunamadı",fontNotLoaded:"Yazı Tipi Yüklenemedi",parsingWarning:"Çizim Ayrıştırma Sorunları",systemMessage:"Sistem Mesajı",systemWarning:"Sistem Uyarısı",systemError:"Sistem Hatası",systemInfo:"Sistem Bilgisi"}},progress:{start:"Dosya ayrıştırma başlatılıyor ...",parse:"Dosya ayrıştırılıyor ...",font:"Bu çizim için gerekli yazı tipleri indiriliyor ...",ltype:"Çizgi tipleri ayrıştırılıyor ...",style:"Metin stilleri ayrıştırılıyor ...",dimstyle:"Ölçülendirme stilleri ayrıştırılıyor ...",layer:"Katmanlar ayrıştırılıyor ...",vport:"Görüntü portları ayrıştırılıyor ...",blockrecord:"Blok kaydı ayrıştırılıyor ...",header:"Başlık ayrıştırılıyor ...",block:"Bloklar ayrıştırılıyor ...",entity:"Nesneler ayrıştırılıyor ...",object:"Adlandırılmış sözlükler ayrıştırılıyor ...",rendering:"Çizim render ediliyor ...",end:"Tamamlandı!"},about:{title:"Hakkında",close:"Kapat",product:"CAD Viewer",tagline:"DWG ve DXF çizimleri için yüksek performanslı web CAD görüntüleyici.",website:"Web sitesi",docs:"Belgeler",repository:"GitHub",copyright:"© {year} mlightcad. Tüm hakları saklıdır.",ok:"Tamam"},drawStyle:{color:"Renk",fontSize:"Yazı yüksekliği"},shortCutToolbar:{more:"Daha fazla",undo:"Geri al",redo:"Yinele",erase:"Sil",collapse:"Araç çubuğunu daralt",expand:"Araç çubuğunu genişlet"},textHeight:{title:"Yazı Yüksekliği",close:"Kapat",ok:"Tamam",cancel:"İptal",adaptive:"Ekrana uyarla",custom:"Özel yazı yüksekliği",customPlaceholder:"Dünya yüksekliği",fromScreen:"Ekran boyutundan",fromScreenHint:"Geçerli yakınlaştırmada ekranda istediğiniz yazı boyutunu girin. Sabit bir dünya yüksekliğine dönüştürülür; sonra yakınlaştırınca bu yükseklik değişmez.",screenPxPlaceholder:"Yazı boyutu",screenUnit:"px",convert:"Dönüştür"},entityPick:{cancel:"Seçimi iptal et"},colorPicker:{title:"Renk Seç",close:"Kapat",ok:"Tamam",cancel:"İptal",index:"Renk İndeksi: ",rgb:"RGB: ",input:"Renk",inputPlaceholder:"1-255 veya #RRGGBB"},touchPointTutorial:{title:"Noktalar nasıl hassas seçilir?",description:"Ekranda yaklaşık 0,5 saniye basılı tutun. Parmağınızın üstünde bir artı belirir ve hareket ederken geometriye yapışarak daha doğru seçim yapmanızı sağlar.",snoozeToday:"Bugün tekrar hatırlatma",hideForever:"Bir daha hatırlatma",ok:"Anladım"},dataSource:{open:"Aç",local:"Yerel dosya",url:"URL'den",openFrom:"{name} konumundan aç",signInTo:"{name} oturumu aç",signOutOf:"{name} oturumunu kapat",signOutOfAccount:"{name} oturumunu kapat ({account})",urlDialogTitle:"URL'den aç",urlDialogHint:".dwg veya .dxf dosyasının URL'sini girin.",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"İptal",onedrive:"OneDrive",googledrive:"Google Drive",or:"veya",dropFile:"Dosyayı buraya bırakın veya",browse:"göz atın",dropOrBrowse:"DWG veya DXF dosyasını buraya bırakın veya göz atın",newDrawing:"Yeni çizim",source:"Kaynak",unavailable:"Bu kaynak henüz kullanılamıyor.",selectFile:"Dosya seç",signInRequired:"Dosya seçmek için önce oturum açın.",downloading:"Dosya indiriliyor ..."}},L0={ACAD:{"-hatch":{description:"通过命令行选项创建填充,不显示 Ribbon 界面"},"-layer":{description:"通过命令行选项管理图层"},about:{description:"显示 mlightcad 产品信息"},acadver:{description:"存储图形数据库版本标识符(只读)"},annoallvisible:{description:"控制不支持当前注释比例的注释性对象是否显示"},angbase:{description:"设置当前 UCS 中 0 度的基准角方向"},angdir:{description:"设置正角度的方向为顺时针或逆时针"},arc:{description:"创建圆弧"},aunits:{description:"设置角度显示格式"},auprec:{description:"设置角度显示精度(小数位数),与 AUNITS 配合使用"},bmpout:{description:"导出为 BMP 图片"},cannoscale:{description:"设置当前注释比例名称"},cdxf:{description:"导出当前图纸为DXF格式"},cpdf:{description:"导出当前图纸为PDF格式"},"-cpdf":{description:"使用命令行选项将当前图纸导出为PDF"},cecolor:{description:"设置新创建对象的当前默认颜色"},celtscale:{description:"控制新创建对象的线型比例系数"},celtype:{description:"设置新创建对象的线型"},celweight:{description:"设置新创建对象的默认线宽"},cetransparency:{description:"设置新创建对象的透明度"},cachefont:{description:"将本地字体文件缓存到 IndexedDB 以供文字渲染使用"},circle:{description:"使用圆心和半径创建圆"},clayer:{description:"设置新建对象和编辑操作所使用的当前图层"},cmleaderstyle:{description:"设置当前多重引线样式名称"},cmlscale:{description:"控制多线的整体宽度"},cmlstyle:{description:"设置当前多线样式名称"},colortheme:{description:"控制用户界面的颜色主题(深色或浅色)"},copy:{description:"通过克隆将所选图元复制到新位置",prompt:"选择对象"},csvg:{description:"转换当前图纸为SVG格式"},chtml:{description:"将当前图纸导出为可离线打开的 HTML 文件"},"-chtml":{description:"通过命令行选项将当前图纸导出为 HTML 文件"},dimlinear:{description:"创建线性尺寸标注"},dimaligned:{description:"创建对齐线性尺寸标注"},dimradius:{description:"为圆和圆弧创建半径尺寸标注"},dimdiameter:{description:"为圆和圆弧创建直径尺寸标注"},dimangular:{description:"创建角度尺寸标注"},dimarc:{description:"创建弧长标注"},dimordinate:{description:"创建坐标标注"},dimcontinue:{description:"创建连续标注"},dimbaseline:{description:"创建基线标注"},dimstyle:{description:"设置当前标注样式的名称"},dwgname:{description:"存储当前图形文件的名称(只读)"},loginname:{description:"显示当前用户的登录名(只读)"},dynmode:{description:"控制光标处的动态输入设置"},dynprompt:{description:"控制动态输入工具提示中提示的显示"},ellipse:{description:"通过轴端点或中心点创建椭圆或椭圆弧"},erase:{description:"从图纸中删除所选对象",prompt:"选择对象"},extmax:{description:"存储模型空间图形范围的右上角(只读)"},extmin:{description:"存储模型空间图形范围的左下角(只读)"},entout:{description:"导出所选对象的合并预览图",prompt:"选择对象"},hideobjects:{description:"临时隐藏所选对象的显示",prompt:"选择对象"},imageattach:{description:"将光栅图像作为外部参照附着到当前图形"},"-insert":{description:"将块定义插入到当前图形(命令行)"},xattach:{description:"将 DWG 或 DXF 图形作为外部参照附着到当前图形"},gripcolor:{description:"设置所选对象上未选中夹点的颜色"},griphot:{description:"设置所选(热)夹点的颜色"},gripobjlimit:{description:"当选择集中的对象数超过指定值时不显示夹点(0 表示无限制)"},grips:{description:"控制是否在所选对象上显示夹点"},gripsize:{description:"设置夹点框的大小(像素)"},hatch:{description:"用填充图案填充封闭区域或所选对象"},ipdf:{description:"从 PDF 文件导入矢量几何"},hpang:{description:"设置新创建填充图案的默认角度(弧度)"},hpassoc:{description:"控制新创建的填充是否具有关联性"},hpbackgroundcolor:{description:"设置新创建填充图案的默认背景颜色"},hpcolor:{description:"设置新创建填充的默认颜色"},hpdouble:{description:"控制用户定义的填充图案是否加倍"},hpislanddetection:{description:"控制新创建填充边界内孤岛的处理方式"},hplayer:{description:"设置新创建填充和填充区域的默认图层"},hpname:{description:"设置当前会话中新创建填充的默认图案名称"},hpscale:{description:"设置新创建填充图案的默认比例系数"},hpseparate:{description:"控制为多个边界创建单个还是独立的填充对象"},hptransparency:{description:"设置新创建填充和填充区域的默认透明度"},insunits:{description:"指定插入块、图像或外部参照时用于自动缩放的图形单位"},jpgout:{description:"导出为 JPEG 图片"},laycur:{description:"将所选对象的图层属性更改为当前图层",prompt:"选择要更改到当前图层的对象"},laydel:{description:"删除图层及该图层上的所有对象"},layerclose:{description:"关闭图层属性管理器"},layerp:{description:"撤销对图层设置的最后一次更改或一组更改"},layfrz:{description:"冻结所选对象所在的图层",prompt:"选择要冻结其图层的对象"},layiso:{description:"隔离所选对象所在的图层",prompt:"选择要隔离其图层的对象"},laylck:{description:"锁定所选对象所在的图层",prompt:"选择要锁定其图层的对象"},layoff:{description:"关闭所选对象所在的图层",prompt:"选择要关闭其图层的对象"},layon:{description:"打开图纸中的所有图层"},laythw:{description:"解冻图纸中的所有冻结图层"},layulk:{description:"解锁所选对象所在的图层",prompt:"选择要解锁其图层的对象"},layuniso:{description:"恢复由 LAYISO 隐藏或锁定的图层"},line:{description:"在指定点之间绘制直线段"},log:{description:"在控制台输出调试信息"},ltscale:{description:"设置图形的全局线型比例系数"},lunits:{description:"设置坐标和距离的显示格式"},luprec:{description:"设置线性单位的显示精度(小数位数),与 LUNITS 配合使用"},lwdisplay:{description:"用于控制是否在图纸中显示线宽效果"},clearmeasurements:{description:"清除当前布局上的所有测量标注"},measurementvis:{description:"显示或隐藏当前布局上的测量标注"},measurementpanel:{description:"打开测量面板"},measurementexport:{description:"将测量标注导出为 sidecar JSON 文件"},measurementimport:{description:"从 sidecar JSON 文件导入测量标注"},measurearea:{description:"计算所选对象或点定义区域的面积和周长"},measureangle:{description:"测量两条线或三个点之间的夹角"},measurearc:{description:"测量圆弧段的弧长"},measuredistance:{description:"测量两点之间的距离及坐标增量"},measurecontinuous:{description:"连续拾取多个点测量各段距离,直到按 Enter 或取消"},measurepoint:{description:"测量拾取点的 X/Y 坐标"},measurement:{description:"设置图形使用英制或公制单位"},measurementcolor:{description:"设置测量标注覆盖图形使用的颜色"},modelbkcolor:{description:"设置模型空间绘图区域的背景颜色"},mline:{description:"创建由多条平行线组成的多线对象"},move:{description:"通过位移向量移动所选图元",prompt:"选择对象"},objectscale:{description:"为选定的注释性对象添加或删除支持的注释比例",prompt:"选择注释性对象"},offset:{description:"按指定距离创建平行曲线、多段线或圆"},mtext:{description:"创建多行文本"},open:{description:"打开图纸"},openprof:{description:"控制是否在控制台记录文件打开阶段的耗时分析"},openperf:{description:"打开“打开性能”面板,显示最近一次打开图纸的关键耗时"},orthomode:{description:"将光标移动限制为水平或垂直方向"},osmode:{description:"使用位码设置运行中的对象捕捉模式"},pan:{description:"平移视图"},paperbkcolor:{description:"设置图纸空间(布局)绘图区域的背景颜色"},pdmode:{description:"控制点对象的显示样式"},pdsize:{description:"设置点对象的显示大小"},pickbox:{description:"控制用于选择对象的拾取框大小(像素)"},pline:{description:"通过指定多个点创建多段线"},pngout:{description:"导出为 PNG 图片"},point:{description:"连续创建点"},polaraddang:{description:"以分号分隔的列表存储附加极轴追踪角度"},polarang:{description:"设置极轴追踪的极轴角增量"},polarmode:{description:"控制极轴追踪和对象捕捉追踪设置"},polygon:{description:"通过中心和半径或指定一条边创建正多边形"},qnew:{description:"创建新图纸"},close:{description:"关闭当前图纸"},ray:{description:"创建从起点向单一方向无限延伸的射线"},rectang:{description:"通过指定两个对角点创建矩形"},regen:{description:"重绘图纸"},revcloud:{description:"创建或修改修订云线"},markuptext:{description:"放置文字批注"},markupline:{description:"创建直线批注"},markuparrow:{description:"创建箭头批注"},markupcloud:{description:"创建修订云线批注"},markuprect:{description:"创建矩形批注"},markupcircle:{description:"创建圆形批注"},markuphighlight:{description:"创建高亮矩形批注"},markupcallout:{description:"创建标注:先指定引线尖端,再放置文字框,最后输入文字"},markupstamp:{description:"放置图章或自定义符号"},markupvis:{description:"显示或隐藏批注"},clearmarkups:{description:"清除当前布局上的所有批注"},markupexport:{description:"将批注导出为 sidecar JSON 文件"},markupimport:{description:"从 sidecar JSON 文件导入批注"},markuppanel:{description:"打开批注面板"},rotate:{description:"绕基点旋转所选图元",prompt:"选择对象"},select:{description:"选择图元"},shortcutmenu:{description:"控制图形区域中快捷菜单的可用性"},sketch:{description:"创建一系列徒手线段"},spline:{description:"通过指定控制点创建平滑的样条曲线"},textstyle:{description:"设置当前文字样式的名称"},unitmode:{description:"当 LUNITS 为建筑或分数格式时,控制坐标的分数显示格式"},switchbg:{description:"切换绘图区域背景颜色,在白色和黑色背景之间切换"},readingmode:{description:"切换阅读模式:白底黑线,便于阅读复杂图纸"},unisolateobjects:{description:"重新显示 HIDEOBJECTS 隐藏的所有对象"},undo:{description:"撤销上一次数据库编辑操作",nothingToUndo:"没有可撤销的操作。"},redo:{description:"重做上一次撤销的操作",nothingToRedo:"没有可重做的操作。"},xline:{description:"创建在两个方向上无限延伸的构造线"},zoom:{description:"缩放以显示所有对象"}},USER:{}},T0={arc:{startPointOrCenter:"指定圆弧的起点或",secondPointOrOptions:"指定圆弧上的第二点或",secondPoint:"指定圆弧上的第二点",startPoint:"指定圆弧的起点",centerPoint:"指定圆弧的圆心",endPoint:"指定圆弧的端点",endPointOrOptions:"指定圆弧的端点或",centerPointOrOptions:"指定圆弧的圆心或",includedAngle:"指定圆弧的夹角",chordLength:"指定圆弧的弦长",tangentDirection:"指定圆弧起点的切线方向",radius:"指定圆弧的半径",keywords:{center:{display:"圆心(C)",local:"圆心",global:"Center"},end:{display:"端点(E)",local:"端点",global:"End"},angle:{display:"角度(A)",local:"角度",global:"Angle"},chordLength:{display:"弦长(L)",local:"弦长",global:"ChordLength"},direction:{display:"方向(D)",local:"方向",global:"Direction"},radius:{display:"半径(R)",local:"半径",global:"Radius"}},invalid:{threePoint:"三点圆弧无效:三点共线或无法确定圆弧。",center:"圆心输入无效:起点与终点必须在同一圆上。",angle:"角度输入无效:夹角必须大于 0 且小于 360 度。",chordLength:"弦长输入无效:该值超出当前半径可用范围。",direction:"方向输入无效:无法根据该切线方向构造圆弧。",radius:"半径输入无效:指定半径无法连接起点与终点。"}},circle:{center:"指定圆的圆心",centerOrOptions:"指定圆的圆心或",radius:"指定圆的半径",radiusOrDiameter:"指定圆的半径或",diameter:"指定圆的直径",twoPointFirst:"指定圆直径的第一个端点",twoPointSecond:"指定圆直径的第二个端点",threePointFirst:"指定圆上的第一个点",threePointSecond:"指定圆上的第二个点",threePointThird:"指定圆上的第三个点",keywords:{threeP:{display:"三点(3P)",local:"三点",global:"3P"},twoP:{display:"两点(2P)",local:"两点",global:"2P"},diameter:{display:"直径(D)",local:"直径",global:"Diameter"}}},copy:{basePointOrOptions:"指定基点或",displacementOrArray:"指定位移或",secondPointOrArray:"指定第二个点或",modePrompt:"输入复制模式选项",arrayItemCount:"输入阵列中的项目数(包括原对象)",arraySecondPointOrFit:"指定第二个点或",arrayFitSecondPoint:"指定第二个点",keywords:{displacement:{display:"位移(D)",local:"位移",global:"Displacement"},mode:{display:"模式(O)",local:"模式",global:"Mode"},multiple:{display:"多个(M)",local:"多个",global:"Multiple"},single:{display:"单个(S)",local:"单个",global:"Single"},array:{display:"阵列(A)",local:"阵列",global:"Array"},fit:{display:"布满(F)",local:"布满",global:"Fit"}}},dimlinear:{xLine1Point:"指定第一条尺寸界线原点或 <选择对象>",xLine2Point:"指定第二条尺寸界线原点",dimLinePoint:"指定尺寸线位置",selectObject:"选择要标注的对象",rejectObject:"无法使用 DIMLINEAR 标注该对象。",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",rotationAngle:"指定尺寸线角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"},horizontal:{display:"水平(H)",local:"水平",global:"Horizontal"},vertical:{display:"垂直(V)",local:"垂直",global:"Vertical"},rotated:{display:"旋转(R)",local:"旋转",global:"Rotated"}}},dimaligned:{xLine1Point:"指定第一条尺寸界线原点或 <选择对象>",xLine2Point:"指定第二条尺寸界线原点",dimLinePoint:"指定尺寸线位置",selectObject:"选择要标注的对象",rejectObject:"无法使用 DIMALIGNED 标注该对象。",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimradius:{selectObject:"选择圆弧或圆",rejectObject:"必须选择圆弧或圆。",dimLinePoint:"指定尺寸线位置",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimdiameter:{selectObject:"选择圆弧或圆",rejectObject:"必须选择圆弧或圆。",dimLinePoint:"指定尺寸线位置",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimangular:{vertexOrSelect:"指定角的顶点或 <选择直线>",xLine1Point:"指定第一个角度端点",xLine2Point:"指定第二个角度端点",arcPoint:"指定标注弧线位置",selectFirstLine:"选择第一条直线",selectSecondLine:"选择第二条直线",rejectObject:"必须选择直线。",linesParallel:"两条直线平行,无法求交点。",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimarc:{selectArc:"选择圆弧",rejectObject:"必须选择圆弧。",arcPoint:"指定弧长标注位置",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"}}},dimordinate:{featurePoint:"指定特征位置",leaderEndpoint:"指定引线端点",dimensionText:"输入标注文字",textAngle:"指定标注文字的角度",keywords:{mtext:{display:"多行文字(M)",local:"多行文字",global:"Mtext"},text:{display:"文字(T)",local:"文字",global:"Text"},angle:{display:"角度(A)",local:"角度",global:"Angle"},xdatum:{display:"X基准(X)",local:"X基准",global:"Xdatum"},ydatum:{display:"Y基准(Y)",local:"Y基准",global:"Ydatum"}}},dimcontinue:{nextPoint:"指定第二条尺寸界线原点或",selectDimension:"选择连续标注",rejectObject:"必须选择线性或角度标注。",keywords:{select:{display:"选择(S)",local:"选择",global:"Select"}}},dimbaseline:{nextPoint:"指定第二条尺寸界线原点或",selectDimension:"选择基准标注",rejectObject:"必须选择线性或角度标注。",keywords:{select:{display:"选择(S)",local:"选择",global:"Select"}}},ellipse:{axisEndpointOrOptions:"指定椭圆的轴端点或",arcAxisEndpointOrCenter:"指定椭圆弧的轴端点或",center:"指定椭圆中心点",firstAxisEndpoint:"指定轴的端点",secondAxisEndpoint:"指定轴的另一个端点",otherAxisOrRotation:"指定到另一轴的距离或",rotationAngle:"指定绕长轴的旋转角度",arcStartAngle:"指定椭圆弧起始角",arcEndAngle:"指定椭圆弧终止角",keywords:{arc:{display:"圆弧(A)",local:"圆弧",global:"Arc"},center:{display:"中心点(C)",local:"中心点",global:"Center"},rotation:{display:"旋转(R)",local:"旋转",global:"Rotation"}},invalid:{axis:"轴输入无效:轴长必须大于 0。",otherAxis:"另一轴输入无效:距离必须大于 0。",rotation:"旋转输入无效:计算得到的短轴必须大于 0。"}},hatch:{prompt:"选择边界对象或",pickPoint:"指定内部点(或按 Enter 结束)",select:"选择要填充的对象",patternName:"输入填充图案名称",scale:"指定填充图案比例",angle:"指定填充图案角度",style:"输入填充样式",associative:"指定关联性",invalidBoundary:"所选对象无法构成闭合边界。",keywords:{pick:{display:"拾取点(P)",local:"拾取点",global:"PickPoints"},select:{display:"选择对象(S)",local:"选择对象",global:"SelectObjects"},cancel:{display:"放弃(C)",local:"放弃",global:"Cancel"},pattern:{display:"图案(P)",local:"图案",global:"Pattern"},scale:{display:"比例(S)",local:"比例",global:"Scale"},angle:{display:"角度(A)",local:"角度",global:"Angle"},style:{display:"样式(T)",local:"样式",global:"HatchStyle"},associative:{display:"关联(AS)",local:"关联",global:"AssociativeMode"},normal:{display:"普通(N)",local:"普通",global:"Normal"},outer:{display:"外部(O)",local:"外部",global:"Outer"},ignore:{display:"忽略(I)",local:"忽略",global:"Ignore"},yes:{display:"是(Y)",local:"是",global:"Yes"},no:{display:"否(N)",local:"否",global:"No"}}},hideobjects:{hidden:"个对象已隐藏",restored:"个对象已恢复显示",nothingToRestore:"没有可恢复显示的对象"},entout:{longSidePrompt:"输入预览图长边像素尺寸",exported:"个对象预览已导出",skipped:"个对象已跳过",failed:{"no-preview-root":"无法为所选对象构建预览几何","no-bounds":"无法计算所选对象的预览范围","capture-failed":"无法渲染实体预览图","download-failed":"预览已渲染,但 PNG 下载失败"}},layer:{main:"输入选项",listSummary:"图层列表已输出到浏览器控制台",emptyInput:"未输入图层名。",newPrompt:"输入新建图层名称(可用逗号分隔多个)",makePrompt:"输入要创建并设为当前的图层名",setPrompt:"输入要设为当前的图层名",onPrompt:"输入要打开的图层名",offPrompt:"输入要关闭的图层名",freezePrompt:"输入要冻结的图层名",thawPrompt:"输入要解冻的图层名",lockPrompt:"输入要锁定的图层名",unlockPrompt:"输入要解锁的图层名",colorLayerPrompt:"输入要修改颜色的图层名",colorValuePrompt:"输入颜色(ACI 1-255、RGB 如 255,0,0 或颜色名)",invalidColor:"颜色输入无效。",descriptionLayerPrompt:"输入要修改说明的图层名",descriptionValuePrompt:"输入新的图层说明",created:"已创建图层数量",alreadyExists:"图层已存在",notFound:"未找到图层",cannotChangeCurrent:"不能关闭或冻结当前图层。",keywords:{list:{display:"?(?)",local:"?",global:"?"},make:{display:"创建并置为当前(M)",local:"创建并置为当前",global:"Make"},set:{display:"置为当前(S)",local:"置为当前",global:"Set"},new:{display:"新建(N)",local:"新建",global:"New"},on:{display:"打开(ON)",local:"打开",global:"On"},off:{display:"关闭(OF)",local:"关闭",global:"Off"},color:{display:"颜色(C)",local:"颜色",global:"Color"},freeze:{display:"冻结(F)",local:"冻结",global:"Freeze"},thaw:{display:"解冻(T)",local:"解冻",global:"Thaw"},lock:{display:"锁定(L)",local:"锁定",global:"Lock"},unlock:{display:"解锁(U)",local:"解锁",global:"Unlock"},description:{display:"说明(D)",local:"说明",global:"Description"}}},layon:{alreadyOn:"所有图层都已经打开。",turnedOn:"已打开图层数量"},laycur:{prompt:"选择要更改到当前图层的对象",currentLayerNotFound:"未找到当前图层。",noObjects:"没有选择有效对象。",alreadyCurrent:"所选对象已位于当前图层。",changed:"已将对象更改到当前图层"},layfrz:{prompt:"选择要冻结其图层的对象或",invalidSelection:"所选对象无效。",settingsPrompt:"输入要修改的 LAYFRZ 设置",viewportPrompt:"指定视口冻结行为",blockSelectionPrompt:"指定嵌套块选择行为",vpfreezeFallback:"当前 viewer 不支持按视口冻结图层,已退化为普通 Freeze 行为。",nestedSelectionLimited:"嵌套块选择设置会被保存,但当前拾取仍只能解析顶层对象所在图层。",layerNotFound:"未找到图层",cannotFreezeCurrent:"不能冻结当前图层。",alreadyFrozen:"图层已处于冻结状态",frozen:"已冻结图层",restored:"已恢复图层",nothingToUndo:"当前没有可撤销的 LAYFRZ 操作。",keywords:{settings:{display:"设置(S)",local:"设置",global:"Settings"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},viewports:{display:"视口(V)",local:"视口",global:"Viewports"},blockSelection:{display:"块选择(B)",local:"块选择",global:"BlockSelection"},freeze:{display:"冻结(F)",local:"冻结",global:"Freeze"},vpfreeze:{display:"视口冻结(V)",local:"视口冻结",global:"Vpfreeze"},block:{display:"块(B)",local:"块",global:"Block"},entity:{display:"对象(E)",local:"对象",global:"Entity"},none:{display:"无(N)",local:"无",global:"None"}}},layiso:{prompt:"选择要隔离其图层的对象或",settingsPrompt:"输入未隔离图层的处理设置",offModePrompt:"输入未隔离图层的关闭行为",noLayers:"未选择有效图层。",layerNotFound:"未找到图层",isolated:"已隔离图层",affectedLayers:"受影响图层数",vpfreezeFallback:"当前 viewer 不支持按视口冻结图层,已退化为普通 Off 行为。",lockFadeFallback:"当前 viewer 不支持图层淡显显示,未隔离图层将仅被锁定。",keywords:{settings:{display:"设置(S)",local:"设置",global:"Settings"},off:{display:"关闭(O)",local:"关闭",global:"Off"},lockAndFade:{display:"锁定并淡显(L)",local:"锁定并淡显",global:"LockAndFade"},vpfreeze:{display:"视口冻结(V)",local:"视口冻结",global:"Vpfreeze"}}},laythw:{alreadyThawed:"所有图层都已经解冻。",thawed:"已解冻图层数量"},layuniso:{noPrevious:"没有可恢复的上一次 LAYISO 图层状态。",layerNotFound:"未找到图层",nothingRestored:"没有恢复任何 LAYISO 图层改动。",restored:"已恢复图层数量"},laylck:{prompt:"选择要锁定其图层的对象",invalidSelection:"所选对象无效。",layerNotFound:"未找到图层",alreadyLocked:"图层已处于锁定状态",locked:"已锁定图层"},layulk:{prompt:"选择要解锁其图层的对象",invalidSelection:"所选对象无效。",layerNotFound:"未找到图层",alreadyUnlocked:"图层已处于解锁状态",unlocked:"已解锁图层"},layoff:{prompt:"选择要关闭其图层的对象或",invalidSelection:"所选对象无效。",settingsPrompt:"输入要修改的 LAYOFF 设置",viewportPrompt:"指定视口行为",blockSelectionPrompt:"指定嵌套块选择行为",vpfreezeFallback:"当前 viewer 不支持按视口关闭图层,已退化为普通 Off 行为。",nestedSelectionLimited:"嵌套块选择设置会被保存,但当前拾取仍只能解析顶层对象所在图层。",layerNotFound:"未找到图层",cannotTurnOffCurrent:"不能关闭当前图层。",alreadyOff:"图层已处于关闭状态",turnedOff:"已关闭图层",restored:"已恢复图层",nothingToUndo:"当前没有可撤销的 LAYOFF 操作。",keywords:{settings:{display:"设置(S)",local:"设置",global:"Settings"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},viewports:{display:"视口(V)",local:"视口",global:"Viewports"},blockSelection:{display:"块选择(B)",local:"块选择",global:"BlockSelection"},off:{display:"关闭(O)",local:"关闭",global:"Off"},vpfreeze:{display:"视口冻结(V)",local:"视口冻结",global:"Vpfreeze"},block:{display:"块(B)",local:"块",global:"Block"},entity:{display:"对象(E)",local:"对象",global:"Entity"},none:{display:"无(N)",local:"无",global:"None"}}},layerp:{restored:"恢复了之前的图层状态。",noPreviousState:"没有可恢复的先前图层状态。"},line:{firstPoint:"指定第一个点",firstPointOrContinue:"请指定第一个点或",nextPoint:"指定下一个点",nextPointWithOptions:"请指定下一个点或",keywords:{continue:{display:"继续(C)",local:"继续",global:"Continue"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},close:{display:"闭合(C)",local:"闭合",global:"Close"}}},xline:{firstPointOrOptions:"指定点或",secondPoint:"指定第二个点",throughPoint:"指定穿过点",angle:"输入构造线角度",invalidDirection:"XLINE 的方向无效。",keywords:{hor:{display:"水平(H)",local:"水平",global:"Hor"},ver:{display:"垂直(V)",local:"垂直",global:"Ver"},ang:{display:"角度(A)",local:"角度",global:"Ang"}}},ray:{startPoint:"指定起点",throughPoint:"指定通过点"},mline:{startPointWithOptions:"指定起点或",nextPointWithOptions:"指定下一点或",justificationPrompt:"输入对正方式",scalePrompt:"指定多线比例",stylePrompt:"输入多线样式名或 [?] 列出样式",styleNotFound:"未找到多线样式",styleListHeader:"已加载的多线样式",styleListEmpty:"当前图纸没有已加载的多线样式。",keywords:{justification:{display:"对正(J)",local:"对正",global:"Justification"},scale:{display:"比例(S)",local:"比例",global:"Scale"},style:{display:"样式(ST)",local:"样式",global:"Style"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},close:{display:"闭合(C)",local:"闭合",global:"Close"},top:{display:"上(T)",local:"上",global:"Top"},zero:{display:"零(Z)",local:"零",global:"Zero"},bottom:{display:"下(B)",local:"下",global:"Bottom"}}},measureArc:{startPoint:"指定弧的起点",throughPoint:"指定弧上的一个点",endPoint:"指定弧的终点",lockedEndPoint:"指定弧的终点(按 Ctrl 在大弧与小弧之间切换)",invalidPoints:"三点共线,无法测量弧长。"},measureAngle:{vertex:"指定顶点",arm1:"指定第一条边上的点",arm2:"指定第二条边上的点"},measureArea:{firstPoint:"指定第一个点",nextPoint:"指定下一个点(或按 Enter 完成)"},measureDistance:{firstPoint:"指定第一个点",secondPoint:"指定第二个点"},measureContinuous:{firstPoint:"指定第一个点",nextPoint:"指定下一个点(或按 Enter 完成)"},measurePoint:{point:"指定点"},measurement:{import:{chooseFile:"选择测量 sidecar JSON 文件"}},markup:{author:"指定批注作者(将保存供以后使用)",text:{point:"指定文字批注点",content:"输入批注文字"},line:{firstPoint:"指定直线批注的第一点",secondPoint:"指定直线批注的第二点"},arrow:{firstPoint:"指定箭头起点",secondPoint:"指定箭头尖端"},cloud:{firstCorner:"指定云线的第一个角点",secondCorner:"指定云线的对角点"},rect:{firstCorner:"指定矩形的第一个角点",secondCorner:"指定矩形的对角点"},circle:{center:"指定圆心",radius:"指定圆的半径"},shape:{calloutOn:"[标注开启]",calloutOff:"[标注关闭]",calloutAnchor:"指定标注文字框位置",keywords:{callout:{display:"标注(C)",local:"标注",global:"Callout"},noCallout:{display:"无标注(N)",local:"无标注",global:"NoCallout"}}},highlight:{firstCorner:"指定高亮的第一个角点",secondCorner:"指定高亮的对角点"},callout:{tip:"指定引线起点,或选择尚无标注的云线/矩形/圆外框",anchor:"指定标注文字框位置",content:"输入标注文字"},stamp:{kind:"输入图章类型 [approved/rejected/revised/for-review/custom]",imageUrl:"输入自定义图章图片 URL(可选)",caption:"输入图章说明文字(可选)",point:"指定图章插入点"},import:{chooseFile:"选择批注 sidecar JSON 文件"}},move:{basePointOrDisplacement:"指定基点或",secondPointOrDisplacement:"指定第二个点或",displacement:"指定位移",keywords:{displacement:{display:"位移(D)",local:"位移",global:"Displacement"}}},offset:{distance:"指定偏移距离",selectObject:"选择要偏移的对象,或按 Enter 结束",sidePoint:"指定要偏移到的那一侧的点",invalidDistance:"偏移距离必须大于 0。",invalidSelection:"所选对象不能偏移。",offsetFailed:"无法在指定侧创建偏移曲线。"},mtext:{point:"指定多行文本插入点"},bmpout:{boundsFirstCorner:"指定边界的第一个角点",boundsSecondCorner:"指定对角点",longSidePrompt:"输入长边像素大小"},jpgout:{boundsFirstCorner:"指定边界的第一个角点",boundsSecondCorner:"指定对角点",longSidePrompt:"输入长边像素大小"},pngout:{boundsFirstCorner:"指定边界的第一个角点",boundsSecondCorner:"指定对角点",longSidePrompt:"输入长边像素大小"},imageattach:{insertionPoint:"指定插入点:",scale:"指定比例因子:",rotation:"指定旋转角度:",invalidScale:"比例因子必须大于 0。",decodeFailed:"无法读取所选图像文件。"},insert:{blockName:"输入块名:",insertionPoint:"指定插入点:",scale:"指定比例因子:",rotation:"指定旋转角度:",invalidScale:"比例因子必须大于 0。",invalidBlockName:"无效的块名。",blockNotFound:"未找到块",xrefNotAllowed:"不能使用 -INSERT 插入外部参照。"},xattach:{insertionPoint:"指定插入点:",scale:"指定比例因子:",rotation:"指定旋转角度:",invalidScale:"比例因子必须大于 0。",unsupportedFile:"请选择 DWG 或 DXF 文件。",loading:"正在加载外部参照...",loadFailed:"无法读取所选图形文件。"},point:{point:"指定点"},polygon:{numberOfSides:"输入边数",centerOrEdge:"指定多边形中心点或",radiusOrType:"输入选项",edgeStart:"指定边的第一个端点",edgeEnd:"指定边的第二个端点",keywords:{edge:{display:"边(E)",local:"边",global:"Edge"},inscribed:{display:"内接于圆(I)",local:"内接于圆",global:"Inscribed"},circumscribed:{display:"外切于圆(C)",local:"外切于圆",global:"Circumscribed"}},invalid:{sides:"边数无效:请输入 3 到 1024 之间的整数。",radius:"半径无效:半径必须大于 0。",edge:"边无效:边长必须大于 0。"}},polyline:{firstPoint:"指定第一个点",nextPoint:"指定下一个点(或按 Enter 完成)",nextPointWithOptions:"请指定下一个点或",nextPointWithArcOptions:"请指定下一个点或",keywords:{arc:{display:"圆弧(A)",local:"圆弧",global:"Arc"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},close:{display:"闭合(C)",local:"闭合",global:"Close"},line:{display:"直线(L)",local:"直线",global:"Line"},angle:{display:"角度(A)",local:"角度",global:"Angle"},center:{display:"圆心(C)",local:"圆心",global:"Center"},secondPoint:{display:"第二点(P)",local:"第二点",global:"SecondPoint"},radius:{display:"半径(R)",local:"半径",global:"Radius"}},arcAngle:"指定弧角度",arcCenter:"指定圆心",arcSecondPoint:"指定弧上的第二点",arcEndPoint:"指定弧的终点",arcRadius:"指定弧半径"},rotate:{basePoint:"指定基点",rotationAngleOrOptions:"指定旋转角度或",referenceAngleOrPoints:"指定参考角或",firstReferencePoint:"指定参考角的第一点",secondReferencePoint:"指定第二点",newAngle:"指定新角度",keywords:{copy:{display:"复制(C)",local:"复制",global:"Copy"},reference:{display:"参照(R)",local:"参照",global:"Reference"},points:{display:"点(P)",local:"点",global:"Points"}},invalid:{referencePoints:"参考点输入无效:两点必须不同。"}},rect:{firstPoint:"指定第一个角点",nextPoint:"指定另一个角点",firstPointWithOptions:"指定第一个角点或者",otherCornerWithOptions:"指定另一个角点或者",chamferFirst:"指定第一个倒角距离",chamferSecond:"指定第二个倒角距离",filletRadius:"指定圆角半径",segmentWidth:"指定矩形线宽",elevationValue:"指定标高",thicknessValue:"指定厚度",rotationAngle:"指定矩形旋转角度",dimensionLength:"指定矩形长度",dimensionWidth:"指定矩形宽度",areaValue:"指定矩形面积",areaLengthOrWidth:"指定矩形长度",areaSpecifyWidth:"指定矩形宽度",invalidPositive:"输入无效:请输入大于 0 的数值。",invalidRect:"无法创建矩形:请输入有效的角点或尺寸。",thicknessNotSupported:"当前版本暂不支持将矩形厚度写入图元,已忽略厚度设置。",keywords:{chamfer:{display:"倒角(C)",local:"倒角",global:"Chamfer"},elevation:{display:"标高(E)",local:"标高",global:"Elevation"},fillet:{display:"圆角(F)",local:"圆角",global:"Fillet"},thickness:{display:"厚度(T)",local:"厚度",global:"Thickness"},width:{display:"宽度(W)",local:"宽度",global:"Width"},area:{display:"面积(A)",local:"面积",global:"Area"},dimensions:{display:"尺寸(D)",local:"尺寸",global:"Dimensions"},rotation:{display:"旋转(R)",local:"旋转",global:"Rotation"},length:{display:"长度(L)",local:"长度",global:"Length"},rectWidth:{display:"宽度(W)",local:"宽度",global:"Width"}}},revcloud:{firstCornerOrOptions:"指定第一个角点或",firstCorner:"指定第一个角点",oppositeCorner:"指定对角点",startPoint:"指定起点",nextPoint:"指定下一点",nextPointOrUndo:"指定下一点或",firstPoint:"指定第一个点",guideCursor:"沿云线路径移动光标(按 Enter 结束)",arcLength:"指定圆弧长度",selectObject:"选择对象",style:"输入修订云线圆弧样式",reverseDirection:"反转方向",invalidArcLength:"圆弧长度必须大于 0。",invalidObject:"所选对象无法转换为修订云线。",keywords:{arcLength:{display:"圆弧长度(A)",local:"圆弧长度",global:"ArcLength"},object:{display:"对象(O)",local:"对象",global:"Object"},rectangular:{display:"矩形(R)",local:"矩形",global:"Rectangular"},polygonal:{display:"多边形(P)",local:"多边形",global:"Polygonal"},freehand:{display:"手绘(F)",local:"手绘",global:"Freehand"},style:{display:"样式(S)",local:"样式",global:"Style"},normal:{display:"普通(N)",local:"普通",global:"Normal"},calligraphy:{display:"书法(C)",local:"书法",global:"Calligraphy"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},yes:{display:"是(Y)",local:"是",global:"Yes"},no:{display:"否(N)",local:"否",global:"No"}}},sketch:{specifySketch:"指定草图或",sketching:"移动指针进行草图绘制(单击或按 Enter 停止)",type:"输入草图类型",increment:"指定草图增量",tolerance:"指定样条曲线公差",firstPoint:"指定第一个点",nextPoint:"指定结束点",keywords:{type:{display:"类型(T)",local:"类型",global:"Type"},increment:{display:"增量(I)",local:"增量",global:"Increment"},tolerance:{display:"公差(L)",local:"公差",global:"Tolerance"},line:{display:"直线(L)",local:"直线",global:"Lines"},polyline:{display:"多段线(P)",local:"多段线",global:"Polyline"},spline:{display:"样条曲线(S)",local:"样条曲线",global:"Spline"}}},spline:{firstPoint:"指定第一个点",nextPoint:"指定下一个点(或按 Enter 完成)",firstPointWithOptions:"指定第一个点或",nextPointWithFitOptions:"指定下一个点或",nextPointWithCvOptions:"指定下一个控制顶点或",methodPrompt:"输入样条创建方式",knotsPrompt:"输入节点参数化方式",degreePrompt:"指定样条次数",keywords:{method:{display:"方法(M)",local:"方法",global:"Method"},fit:{display:"拟合(F)",local:"拟合",global:"Fit"},cv:{display:"控制顶点(C)",local:"控制顶点",global:"CV"},knots:{display:"节点(K)",local:"节点",global:"Knots"},degree:{display:"次数(D)",local:"次数",global:"Degree"},undo:{display:"放弃(U)",local:"放弃",global:"Undo"},close:{display:"闭合(C)",local:"闭合",global:"Close"},chord:{display:"弦长(C)",local:"弦长",global:"Chord"},sqrtChord:{display:"平方根弦长(S)",local:"平方根弦长",global:"SqrtChord"},uniform:{display:"均匀(U)",local:"均匀",global:"Uniform"}}},objectscale:{action:"输入选项",scaleName:"输入注释比例名称",done:"已更新对象",none:"(无)",keywords:{add:{display:"添加(A)",local:"添加",global:"Add"},delete:{display:"删除(D)",local:"删除",global:"Delete"},list:{display:"列表(L)",local:"列表",global:"List"}}},sysvar:{prompt:"请输入新的值"},zoom:{mainPrompt:"指定窗口角点或",firstCorner:"指定第一个角点",secondCorner:"指定对角点",centerPoint:"指定缩放中心点",heightOrScale:"输入高度或比例因子(nX 或 nXP)",scaleFactor:"输入比例因子(nX 或 nXP)",keywords:{all:{display:"全部(A)",local:"全部",global:"All"},center:{display:"中心(C)",local:"中心",global:"Center"},extents:{display:"范围(E)",local:"范围",global:"Extents"},previous:{display:"上一个(P)",local:"上一个",global:"Previous"},original:{display:"原始视口(O)",local:"原始视口",global:"Original"},saved:{display:"保存的视图(V)",local:"保存的视图",global:"Saved"},smart:{display:"智能范围(I)",local:"智能范围",global:"Smart"},scale:{display:"比例(S)",local:"比例",global:"Scale"},window:{display:"窗口(W)",local:"窗口",global:"Window"}}},chtml:{exportFormat:"导出格式",exportInvisibleLayers:"是否导出不可见图层",exportLayouts:"是否导出布局",background:"背景颜色",initialView:"打开 HTML 时的初始视图",viewerMode:"离线查看器模式",chunkSizeMiB:"每个分片大小(MiB,多文件包)",compressChunks:"是否压缩分片(多文件包)",keywords:{single:{display:"单文件(S)",local:"单文件",global:"Single"},multi:{display:"多文件包(M)",local:"多文件包",global:"Multi"},yes:{display:"是(Y)",local:"是",global:"Yes"},no:{display:"否(N)",local:"否",global:"No"},extents:{display:"范围(E)",local:"范围",global:"Extents"},current:{display:"当前(C)",local:"当前",global:"Current"},view:{display:"查看(V)",local:"查看",global:"View"},measure:{display:"测量与批注(M)",local:"测量与批注",global:"Measure"},black:{display:"黑色(B)",local:"黑色",global:"Black"},white:{display:"白色(W)",local:"白色",global:"White"},space:{display:"随空间(S)",local:"随空间",global:"Space"}}},cpdf:{modelSpaceFit:"模型空间范围",exportLayouts:"是否导出布局",textMode:"文字渲染方式",keywords:{extents:{display:"范围(E)",local:"范围",global:"Extents"},display:{display:"显示(D)",local:"显示",global:"Display"},text:{display:"文字(T)",local:"文字",global:"Text"},vector:{display:"矢量(V)",local:"矢量",global:"Vector"},yes:{display:"是(Y)",local:"是",global:"Yes"},no:{display:"否(N)",local:"否",global:"No"}}}},I0={document:{untitled:"未命名"},commandLine:{noLast:"(无上一次命令)",unknownCommand:"未知命令",executed:"已执行命令",showHistory:"显示命令历史",placeholder:"输入命令",showMessages:"显示消息历史",canceled:"*已取消*",noHistory:"(无历史记录)",invalidInput:"输入无效。",close:"关闭命令行"},mobileCommand:{length:"长度",angle:"角度",dx:"ΔX",dy:"ΔY",x:"X",y:"Y",confirm:"确定",cancel:"取消",help:"帮助",back:"返回",collapse:"收起",expand:"展开"},inputManager:{firstCorner:"指定第一个角点或",secondCorner:"指定第二个角点或"},message:{onLockedLayer:"个对象位于锁定的图层上。",fetchingDrawingFile:"正在加载图纸文件...",exportingDxf:"正在导出 DXF ...",exportingPdf:"正在导出 PDF ...",exportingSvg:"正在导出 SVG ...",calculatingSmartExtents:"正在计算智能范围 ...",importingPdf:"正在导入 PDF ...",exportingEntityPreview:"正在导出图片 ...",collectingMemoryProfile:"正在分析内存 ...",fontCached:"字体已成功缓存",fontCacheFailed:"缓存字体失败",fontsNotFound:"在字体库中找不到字体:{fonts}。",fontsNotLoaded:"无法加载字体:{fonts}。",fontMissedInDrawing:'字体 "{font}" 被 {count} 个文字对象使用,但不可用,已使用 "{replacementFont}" 显示。',fontMissedReplacement:'"{font}"(已用 "{replacement}" 显示)',failedToGetAvaiableFonts:'无法从"{url}"获取可用的字体信息!',failedToOpenFile:'无法打开文件"{fileName}"!',failedToOpenFileToast:'无法打开"{fileName}"。详情请查看通知中心。',failedToOpenFileWorkerOom:'无法打开"{fileName}"。使用 LibreDWG 解析器时内存不足,导致打开失败。可点击{dwgParserLink}购买商用 DWG Parser,以支持更大图纸并避免此问题。',failedToOpenFileWorkerOomLink:"此页面",failedToOpenFileWorkerTimeout:'无法打开"{fileName}"。解析图纸时操作超时。',failedToOpenFileFontLoadFailed:'无法打开"{fileName}"。无法加载图纸所需的字体。',failedToOpenFileLicenseExpired:'无法打开"{fileName}"。DWG 转换器许可证已过期。',failedToOpenFileLicenseInvalid:'无法打开"{fileName}"。DWG 转换器许可证缺失或无效。',unknownEntities:"这张图纸中包含了{count}个未知或不支持的实体,这些实体将无法显示!",tianzhengEntities:"检测到天正(或同类第三方)自定义图元(约 {count} 个)。当前环境无法完整解析这些图元,部分内容可能无法显示。",emptyProxyEntities:"这张图纸中包含了{count}个缺少代理图形的自定义实体,这些实体将无法显示!"},notification:{center:{title:"通知",clearAll:"清除全部",noNotifications:"暂无通知"},group:{fontMissed:"字体缺失",fontMissedSummary:"共 {count} 条字体相关消息,点击展开查看详情",unsupportedEntities:"不支持的图元",unsupportedEntitiesSummary:"共 {count} 条解析相关消息,点击展开查看详情",genericSummary:"共 {count} 条消息,点击展开查看详情"},title:{failedToOpenFile:"无法打开文件",failedToOpenFileWorkerOom:"内存不足",failedToOpenFileWorkerTimeout:"打开超时",failedToOpenFileFontLoadFailed:"字体加载失败",failedToOpenFileLicenseExpired:"许可证已过期",failedToOpenFileLicenseInvalid:"许可证无效",fontNotFound:"找不到字体",fontNotLoaded:"无法加载字体",parsingWarning:"解析图纸问题",systemMessage:"系统消息",systemWarning:"系统警告",systemError:"系统错误",systemInfo:"系统信息"}},progress:{start:"开始解析文件...",parse:"正在解析文件 ...",font:"正在下载图纸所需字体...",ltype:"正在解析线形...",style:"正在解析文字样式...",dimstyle:"正在解析标注样式...",layer:"正在解析图层...",vport:"正在解析视口...",blockrecord:"正在解析BTRs...",header:"正在解析文件头...",block:"正在解析块..",entity:"正在解析图元...",object:"正在解析NODs...",rendering:"正在渲染图纸 ...",end:"完成!"},about:{title:"关于",close:"关闭",product:"CAD 查看器",tagline:"面向 DWG/DXF 图纸的高性能 Web CAD 查看器。",website:"官网",docs:"文档",repository:"GitHub",copyright:"© {year} mlightcad。保留所有权利。",ok:"确定"},drawStyle:{color:"颜色",fontSize:"字高"},shortCutToolbar:{more:"更多",undo:"撤销",redo:"重做",erase:"删除",collapse:"收起工具栏",expand:"展开工具栏"},textHeight:{title:"字高设置",close:"关闭",ok:"确定",cancel:"取消",adaptive:"自适应屏幕",custom:"自定义字高",customPlaceholder:"世界坐标字高",fromScreen:"按屏幕字号换算",fromScreenHint:"按当前视图缩放,输入希望看到的屏幕字号(像素),换算为固定的世界坐标字高;之后缩放时字的世界高度不变。",screenPxPlaceholder:"屏幕字号",screenUnit:"px",convert:"换算"},entityPick:{cancel:"取消选择"},colorPicker:{title:"选择颜色",close:"关闭",ok:"确定",cancel:"取消",index:"颜色索引:",rgb:"RGB:",input:"颜色",inputPlaceholder:"1-255 或 #RRGGBB"},touchPointTutorial:{title:"怎样可以精确取点?",description:"手指在屏幕上长按0.5s左右,上方出现十字,手指移动时十字跟随移动并自动捕捉。取点更精准。",snoozeToday:"今日不再提醒",hideForever:"不再提醒",ok:"我知道了"},dataSource:{open:"打开",local:"本地文件",url:"从 URL 打开",openFrom:"从 {name} 打开",signInTo:"登录 {name}",signOutOf:"退出 {name}",signOutOfAccount:"退出 {name}({account})",urlDialogTitle:"从 URL 打开",urlDialogHint:"请输入 .dwg 或 .dxf 文件的网址。",urlPlaceholder:"https://example.com/drawing.dwg",cancel:"取消",onedrive:"OneDrive",googledrive:"Google Drive",or:"或",dropFile:"将文件拖放到此处,或",browse:"浏览",dropOrBrowse:"将 DWG 或 DXF 文件拖放到此处,或浏览选择",newDrawing:"新建图纸",source:"数据源",unavailable:"该数据源暂不可用。",selectFile:"选择文件",signInRequired:"请先登录后再选择文件。",downloading:"正在下载文件 ..."}};m.mergeLocaleMessage("en",{command:M,jig:R,main:A0}),m.mergeLocaleMessage("zh",{command:L0,jig:T0,main:I0}),m.mergeLocaleMessage("tr",{command:_0,jig:P0,main:E0}),m.mergeLocaleMessage("cs",{command:k0,jig:S0,main:C0}),m.mergeLocaleMessage("ar",{command:w0,jig:v0,main:x0});const dc=(s,e)=>{const t=`command.${s}.${e}`;return m.t(t)},M0=s=>dc(Me.SYSTEMT_COMMAND_GROUP_NAME,s),O0=s=>dc(Me.DEFAUT_COMMAND_GROUP_NAME,s);class uc{constructor(e){this.options=e}parse(e){const t=e.trim();if(t.length===0)return this.options.allowNone,null;const i=this.options.keywords.findByName(t);return i?i.globalName:this.options.allowArbitraryInput?t:null}parseCommandLine(e,t){return this.parse(e)}}class km{start(){return new Promise(e=>{this.resolve=e,this.onStart()})}finish(e){this.cleanup(),this.resolve(e)}}class D0 extends km{constructor(e,t,i=!0){super(),this.cli=e,this.options=t,this.allowTyping=i,this.handler=new uc(t)}onStart(){this.cli.clearInput(),this.cli.setInputReadOnly(!this.allowTyping),this.cli.renderKeywordPrompt(this.options,e=>this.finish(e)),this.cli.focusInput()}handleEnter(e){if(!this.allowTyping)return!0;if(!e.trim()){const i=this.options.keywords.default;return i!=null&&i.enabled?(this.finish(i.globalName),!0):this.options.allowNone?(this.finish(""),!0):!1}const t=this.handler.parse(e);return t!==null?(this.finish(t),!0):!1}handleEscape(){this.finish("")}cleanup(){this.cli.setInputReadOnly(!1),this.cli.clear()}}class N0 extends km{constructor(e,t,i,n,o,r=!0){super(),this.cli=e,this.options=t,this.parseValue=i,this.mode=n,this.allowNone=o,this.allowTyping=r,this.options.keywords.count>0&&(this.keywordHandler=new uc(this.options))}onStart(){this.cli.clearInput(),this.cli.setInputReadOnly(!this.allowTyping),this.cli.renderKeywordPrompt(this.options,e=>this.finish({kind:"keyword",keyword:e})),this.cli.focusInput()}handleEnter(e){if(!this.allowTyping)return!0;if(!e.trim()){const i=this.options.keywords.default;return i!=null&&i.enabled?(this.finish({kind:"keyword",keyword:i.globalName}),!0):this.allowNone?(this.finish({kind:"none"}),!0):!1}if(this.mode==="keyword")return this.tryResolveKeyword(e);if(this.mode==="string"){if(this.tryResolveKeyword(e))return!0;const i=this.parseValue(e);return i!==null?(this.finish({kind:"value",value:i}),!0):!1}const t=this.parseValue(e);return t!==null?(this.finish({kind:"value",value:t}),!0):this.tryResolveKeyword(e)}handleEscape(){this.finish({kind:"none"})}cleanup(){this.cli.setInputReadOnly(!1),this.cli.clear()}tryResolveKeyword(e){if(!this.keywordHandler)return!1;const t=this.keywordHandler.parse(e);return t===null?!1:(this.finish({kind:"keyword",keyword:t}),!0)}}class Sm{constructor(e=document.body){this.isPromptActive=!1,this.recentMessages=[],this.isCommandLifecycleBound=!1,this._domAbortController=new AbortController,this._onLocaleChanged=()=>this.refreshLocale(),this._disposed=!1,this.container=e,this.history=[],this.historyIndex=-1,this.lastExecuted=null,this.isCmdPopupOpen=!1,this.isMsgPanelOpen=!1,this.minWidth=420,this.widthRatio=.66,this.autoCompleteIndex=-1,this.injectCSS(),this.createUI(),this.bindEvents(),this.bindCommandLifecycleEvents(),this.resizeHandler();const t=this._domAbortController.signal;window.addEventListener("resize",()=>this.resizeHandler(),{signal:t}),this.resizeObserver=new ResizeObserver(()=>this.resizeHandler()),this.resizeObserver.observe(this.container),m.events.localeChanged.addEventListener(this._onLocaleChanged)}dispose(){var e;if(!this._disposed){this._disposed=!0,this.cancelActiveSession(),this.cancelRecentAutoHide(),this._domAbortController.abort(),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0,m.events.localeChanged.removeEventListener(this._onLocaleChanged);try{const t=k.instance.editor.events;this._onCommandWillStart&&t.commandWillStart.removeEventListener(this._onCommandWillStart),this._onCommandEnded&&t.commandEnded.removeEventListener(this._onCommandEnded)}catch{}this.cliContainer.remove()}}get visible(){return this.cliContainer.style.display!=="none"}set visible(e){this.cliContainer.style.display=e?"block":"none"}setPrompt(e){this.isPromptActive=!0;const t=(e==null?void 0:e.trim().replace(/[::]\s*$/,""))??"";this.promptEl.innerHTML=t?`${t}: `:"",this.textInput.placeholder="",this.recordRecentMessage(t?`${t}:`:e)}clear(){this.clearPrompt(),this.clearInput()}clearPrompt(){this.promptEl.innerHTML="",this.isPromptActive=!1}clearInput(){this.textInput.value="",this.textInput.placeholder=this.isPromptActive?"":this.localize("main.commandLine.placeholder")}focusInput(){this.textInput.focus()}setInputReadOnly(e){this.textInput.readOnly=e}showMessage(e,t="info",i){this.appendMessage(e,t,i)}cancelActiveSession(){this.activeSession&&(this.activeSession.handleEscape(),this.activeSession=void 0)}async getKeywords(e,t=!0){const i=new D0(this,e,t);this.activeSession=i;try{return await i.start()}finally{this.activeSession=void 0}}async getPromptInput(e,t,i){const n=new N0(this,e,t,i.mode,i.allowNone,i.allowTyping??!0);this.activeSession=n;try{return await n.start()}finally{this.activeSession=void 0}}localize(e,t){return m.t(e,{fallback:t})}refreshLocale(){Array.from(this.msgPanel.children).forEach(e=>{var n,o,r,a;const t=e,i=t.dataset.msgKey;if(i)if(i==="main.commandLine.executed"){const l=((o=(n=t.textContent)==null?void 0:n.split(":")[1])==null?void 0:o.trim())??"";t.textContent=`${this.localize(i)}: ${l}`}else if(i==="main.commandLine.unknownCommand"){const l=((a=(r=t.textContent)==null?void 0:r.split(":")[1])==null?void 0:a.trim())??"";t.textContent=`${this.localize(i)}: ${l}`}else t.textContent=this.localize(i)}),this.centerEl.setAttribute("data-placeholder",this.localize("main.commandLine.placeholder")),!this.isPromptActive&&!this.textInput.value&&(this.textInput.placeholder=this.localize("main.commandLine.placeholder")),this.downBtn.title=this.localize("main.commandLine.showHistory"),this.upBtn.title=this.localize("main.commandLine.showMessages")}executeCommand(e){if(!e||!e.trim())if(this.lastExecuted)e=this.lastExecuted;else{this.showMessage(this.localize("main.commandLine.noLast","(no last command)"));return}const t=this.resolveCommand(e);if(!t){const n=this.localize("main.commandLine.unknownCommand");this.showMessage(`${n}: ${e}`,"warning");return}this.history.push(t.globalName),this.historyIndex=this.history.length,this.lastExecuted=t.globalName,this.printHistoryLine(e);const i=this.localize("main.commandLine.executed");this.showMessage(`${i}: ${t.localName}`),k.instance.sendStringToExecute(e),this.clearInput()}injectCSS(){const e=document.createElement("style");e.textContent=`
234
234
  .ml-cli-container {
235
235
  position: fixed;
236
236
  bottom: 10px;
@@ -492,7 +492,7 @@
492
492
  background: var(--ml-ui-border, rgba(255, 255, 255, 0.2));
493
493
  border-radius: 6px;
494
494
  }
495
- `,document.head.appendChild(e)}createUI(){this.cliContainer=document.createElement("div"),this.cliContainer.className="ml-cli-container",this.cliContainer.style.position=this.useViewportPositioning()?"fixed":"absolute",this.useViewportPositioning()||getComputedStyle(this.container).position==="static"&&(this.container.style.position="relative"),this.wrapper=document.createElement("div"),this.wrapper.className="ml-cli-wrapper",this.cliContainer.appendChild(this.wrapper),this.recentPanel=document.createElement("div"),this.recentPanel.className="ml-cli-recent",this.wrapper.appendChild(this.recentPanel),this.bar=document.createElement("div"),this.bar.className="ml-cli-bar",this.wrapper.appendChild(this.bar),this.leftGroup=document.createElement("div"),this.leftGroup.className="ml-cli-left",this.bar.appendChild(this.leftGroup),this.closeBtn=document.createElement("div"),this.closeBtn.className="ml-cli-close-btn",this.closeBtn.innerHTML="&#10005;",this.leftGroup.appendChild(this.closeBtn),this.downBtn=document.createElement("button"),this.downBtn.className="ml-cli-down",this.downBtn.innerHTML="&#9662;",this.leftGroup.appendChild(this.downBtn),this.centerEl=document.createElement("div"),this.centerEl.className="ml-cli-center",this.bar.appendChild(this.centerEl),this.promptEl=document.createElement("div"),this.promptEl.className="ml-cli-prompt",this.centerEl.appendChild(this.promptEl),this.textInput=document.createElement("input"),this.textInput.className="ml-cli-text",this.textInput.type="text",this.textInput.spellcheck=!1,this.textInput.autocomplete="off",this.textInput.placeholder=this.localize("main.commandLine.placeholder"),this.centerEl.appendChild(this.textInput);const e=document.createElement("div");e.className="ml-cli-right",this.bar.appendChild(e),this.upBtn=document.createElement("button"),this.upBtn.className="ml-cli-up",this.upBtn.innerHTML="&#9662;",e.appendChild(this.upBtn),this.cmdPopup=document.createElement("div"),this.cmdPopup.className="ml-cli-cmd-popup ml-cli-hidden",this.wrapper.appendChild(this.cmdPopup),this.msgPanel=document.createElement("div"),this.msgPanel.className="ml-cli-msg-panel ml-cli-hidden",this.wrapper.appendChild(this.msgPanel),this.container.appendChild(this.cliContainer)}bindEvents(){const e=this._domAbortController.signal;this.closeBtn.addEventListener("click",t=>{t.stopPropagation(),this.visible=!1,le.instance.isShowCommandLine=!1},{signal:e}),this.downBtn.addEventListener("click",t=>{t.stopPropagation(),this.isCmdPopupOpen=!this.isCmdPopupOpen,this.updatePopups({showCmd:this.isCmdPopupOpen,showMsg:!1}),this.isCmdPopupOpen&&this.showCommandHistoryPopup()},{signal:e}),this.upBtn.addEventListener("click",t=>{t.stopPropagation(),this.isMsgPanelOpen=!this.isMsgPanelOpen,this.updatePopups({showCmd:!1,showMsg:this.isMsgPanelOpen}),this.isMsgPanelOpen&&this.showMessagePanel()},{signal:e}),document.addEventListener("click",t=>{this.cliContainer.contains(t.target)||this.updatePopups({showCmd:!1,showMsg:!1})},{signal:e}),this.textInput.addEventListener("keydown",t=>this.handleKeyDown(t),{signal:e}),this.textInput.addEventListener("input",()=>this.handleInputChange(),{signal:e}),this.centerEl.addEventListener("focus",()=>this.updatePopups({showCmd:!1,showMsg:!1}),{signal:e}),this.cmdPopup.addEventListener("click",t=>{const i=t.target.closest(".item");i&&(this.setInputText(i.dataset.value||""),this.centerEl.focus(),this.updatePopups({showCmd:!1,showMsg:!1}))},{signal:e})}handleKeyDown(e){if(!e.isComposing)switch(e.key){case"Enter":{if(e.preventDefault(),e.stopImmediatePropagation(),this.activeSession){this.activeSession.handleEnter(this.getInputText())||this.showMessage(this.localize("main.commandLine.invalidInput","Invalid input."),"warning");return}this.executeCommand(this.getInputText()),this.historyIndex=this.history.length,this.updatePopups({showCmd:!1,showMsg:!1});return}case"Escape":{if(e.preventDefault(),e.stopImmediatePropagation(),this.activeSession){this.activeSession.handleEscape(),this.activeSession=void 0;return}this.clear(),this.showMessage(this.localize("main.commandLine.canceled")),this.updatePopups({showCmd:!1,showMsg:!1});return}case"ArrowUp":{e.preventDefault(),this.isCmdPopupOpen?this.navigateAutoComplete(-1):this.navigateHistory(-1);return}case"ArrowDown":{e.preventDefault(),this.isCmdPopupOpen?this.navigateAutoComplete(1):this.navigateHistory(1);return}case"Backspace":case"Delete":{e.stopPropagation(),e.stopImmediatePropagation();return}}}handleInputChange(){const e=this.getInputText();if(!e){this.updatePopups({showCmd:!1});return}const t=k.instance.searchCommandsByPrefix(e);t.length?(this.autoCompleteIndex=-1,this.cmdPopup.innerHTML="",t.forEach((i,n)=>{const o=document.createElement("div");o.className="item",o.dataset.value=i.command.globalName;const r=m.cmdDescription(i.commandGroup,i.command.globalName),a=k.instance.commandManager.getCommandAliases(i.command,i.commandGroup),l=a.length?`(${a.join(", ")})`:"";o.innerHTML=`<strong>${i.command.globalName}${l} - ${r}</strong>`,n===this.autoCompleteIndex&&o.classList.add("selected"),this.cmdPopup.appendChild(o)}),this.updatePopups({showCmd:!0})):this.updatePopups({showCmd:!1})}navigateAutoComplete(e){const t=Array.from(this.cmdPopup.querySelectorAll(".item"));if(!t.length)return;this.autoCompleteIndex+=e,this.autoCompleteIndex<0&&(this.autoCompleteIndex=0),this.autoCompleteIndex>=t.length&&(this.autoCompleteIndex=t.length-1),t.forEach((n,o)=>{n.classList.toggle("selected",o===this.autoCompleteIndex)});const i=t[this.autoCompleteIndex];i&&this.setInputText(i.dataset.value??"")}navigateHistory(e){this.history.length&&(this.historyIndex===-1&&(this.historyIndex=this.history.length),this.historyIndex+=e,this.historyIndex<0&&(this.historyIndex=0),this.historyIndex>this.history.length&&(this.historyIndex=this.history.length),this.historyIndex>=0&&this.historyIndex<this.history.length?this.setInputText(this.history[this.historyIndex]):this.setInputText(""))}getInputText(){return this.textInput.value.trim()}setInputText(e=""){this.textInput.value=e,this.textInput.focus()}renderKeywordPrompt(e,t){var r;if(this.promptEl.innerHTML="",this.isPromptActive=!0,this.textInput.placeholder="",e.message){const a=e.message.trim().replace(/[::]\s*$/,"");this.promptEl.append(a+" ")}const i=e.getKeywordPromptFormat(),n=((r=e.keywords)==null?void 0:r.toArray().filter(a=>a.visible))??[];n.length&&(this.promptEl.append("["),n.forEach((a,l)=>{l>0&&this.promptEl.append("/");const c=document.createElement("span");c.className="ml-cli-option",c.textContent=a.displayName,a.enabled?c.onclick=()=>t(a.globalName):(c.style.opacity="0.45",c.style.pointerEvents="none"),this.promptEl.append(c)}),this.promptEl.append("]"));const o=i.defaultKeyword??e.valueDefaultDisplayText;o&&this.promptEl.append(` <${o}>`),this.promptEl.append(": "),this.recordRecentMessage(this.promptEl.textContent??e.message)}bindCommandLifecycleEvents(){if(this.isCommandLifecycleBound)return;let e;try{e=k.instance.editor.events}catch{setTimeout(()=>this.bindCommandLifecycleEvents(),0);return}this._onCommandWillStart=()=>{this.cancelRecentAutoHide(),this.showRecentPanel()},this._onCommandEnded=()=>{this.scheduleRecentAutoHide()},e.commandWillStart.addEventListener(this._onCommandWillStart),e.commandEnded.addEventListener(this._onCommandEnded),this.isCommandLifecycleBound=!0}resolveCommand(e){const i=e.trim().split(/\s+/)[0].toUpperCase();return k.instance.lookupLocalCmd(i)}updatePopups({showCmd:e=!1,showMsg:t=!1}={}){this.isCmdPopupOpen=e,this.isMsgPanelOpen=t,this.cmdPopup.classList.toggle("ml-cli-hidden",!e),this.msgPanel.classList.toggle("ml-cli-hidden",!t),this.recentPanel.classList.toggle("ml-cli-recent-covered",t),e&&this.positionCmdPopup(),t&&this.positionMsgPanel()}showCommandHistoryPopup(){if(this.cmdPopup.innerHTML="",this.history.length)for(let e=this.history.length-1;e>=0;e--){const t=document.createElement("div");t.className="item",t.dataset.value=this.history[e],t.textContent=this.history[e],this.cmdPopup.appendChild(t)}else{const e=document.createElement("div");e.className="item",e.textContent=this.localize("main.commandLine.noHistory"),this.cmdPopup.appendChild(e)}this.positionCmdPopup()}positionCmdPopup(){this.cmdPopup.style.left="0px",this.cmdPopup.style.width=this.bar.offsetWidth+"px"}showMessagePanel(){if(!this.msgPanel.children.length){const e=document.createElement("div");e.className="ml-cli-history-line",e.textContent=this.localize("main.commandLine.noHistory"),e.dataset.msgKey="main.commandLine.noHistory",this.msgPanel.appendChild(e)}this.msgPanel.scrollTop=this.msgPanel.scrollHeight,this.positionMsgPanel()}positionMsgPanel(){this.msgPanel.style.width=this.bar.offsetWidth+"px"}clearNoHistoryPlaceholder(){Array.from(this.msgPanel.children).forEach(e=>{const t=e;t.dataset.msgKey==="main.commandLine.noHistory"&&this.msgPanel.removeChild(t)})}appendMessage(e,t="info",i){this.clearNoHistoryPlaceholder();const n=document.createElement("div");n.className=t==="warning"?"ml-cli-history-line ml-cli-msg-error":"ml-cli-history-line",n.textContent=e,i&&(n.dataset.msgKey=i),this.msgPanel.appendChild(n),this.recordRecentMessage(e),this.showMessagePanel()}printHistoryLine(e){this.clearNoHistoryPlaceholder();const t=document.createElement("div");t.className="ml-cli-history-line",t.textContent="> "+e,t.dataset.msgKey="main.commandLine.executed",this.msgPanel.appendChild(t),this.showMessagePanel()}resizeHandler(){const e=this.useViewportPositioning()?window.innerWidth:this.container.getBoundingClientRect().width;let t=Math.max(this.minWidth,e*this.widthRatio);t=Math.min(t,Math.max(200,e-20)),this.bar.style.width=t+"px",this.recentPanel.style.width=t+"px",this.positionMsgPanel(),this.positionCmdPopup()}recordRecentMessage(e){const t=e==null?void 0:e.replace(/\s+/g," ").trim();t&&(this.recentMessages.push(t),this.recentMessages.length>2&&this.recentMessages.shift(),this.showRecentPanel(),this.renderRecentMessages())}renderRecentMessages(){this.recentPanel.innerHTML="",this.recentMessages.forEach(e=>{const t=document.createElement("div");t.className="ml-cli-recent-line",t.textContent=e,this.recentPanel.appendChild(t)})}scheduleRecentAutoHide(){this.cancelRecentAutoHide(),this.recentHideTimer=setTimeout(()=>{this.hideRecentPanel(),this.recentHideTimer=void 0},2e3)}cancelRecentAutoHide(){this.recentHideTimer&&(clearTimeout(this.recentHideTimer),this.recentHideTimer=void 0)}showRecentPanel(){this.recentPanel.classList.remove("ml-cli-hidden")}hideRecentPanel(){this.recentPanel.classList.add("ml-cli-hidden")}useViewportPositioning(){return this.container===document.body}}const BS="ml-desktop-session-accessory-styles",FS=`
495
+ `,document.head.appendChild(e)}createUI(){this.cliContainer=document.createElement("div"),this.cliContainer.className="ml-cli-container",this.cliContainer.style.position=this.useViewportPositioning()?"fixed":"absolute",this.useViewportPositioning()||getComputedStyle(this.container).position==="static"&&(this.container.style.position="relative"),this.wrapper=document.createElement("div"),this.wrapper.className="ml-cli-wrapper",this.cliContainer.appendChild(this.wrapper),this.recentPanel=document.createElement("div"),this.recentPanel.className="ml-cli-recent",this.wrapper.appendChild(this.recentPanel),this.bar=document.createElement("div"),this.bar.className="ml-cli-bar",this.wrapper.appendChild(this.bar),this.leftGroup=document.createElement("div"),this.leftGroup.className="ml-cli-left",this.bar.appendChild(this.leftGroup),this.closeBtn=document.createElement("div"),this.closeBtn.className="ml-cli-close-btn",this.closeBtn.innerHTML="&#10005;",this.leftGroup.appendChild(this.closeBtn),this.downBtn=document.createElement("button"),this.downBtn.className="ml-cli-down",this.downBtn.innerHTML="&#9662;",this.leftGroup.appendChild(this.downBtn),this.centerEl=document.createElement("div"),this.centerEl.className="ml-cli-center",this.bar.appendChild(this.centerEl),this.promptEl=document.createElement("div"),this.promptEl.className="ml-cli-prompt",this.centerEl.appendChild(this.promptEl),this.textInput=document.createElement("input"),this.textInput.className="ml-cli-text",this.textInput.type="text",this.textInput.spellcheck=!1,this.textInput.autocomplete="off",this.textInput.placeholder=this.localize("main.commandLine.placeholder"),this.centerEl.appendChild(this.textInput);const e=document.createElement("div");e.className="ml-cli-right",this.bar.appendChild(e),this.upBtn=document.createElement("button"),this.upBtn.className="ml-cli-up",this.upBtn.innerHTML="&#9662;",e.appendChild(this.upBtn),this.cmdPopup=document.createElement("div"),this.cmdPopup.className="ml-cli-cmd-popup ml-cli-hidden",this.wrapper.appendChild(this.cmdPopup),this.msgPanel=document.createElement("div"),this.msgPanel.className="ml-cli-msg-panel ml-cli-hidden",this.wrapper.appendChild(this.msgPanel),this.container.appendChild(this.cliContainer)}bindEvents(){const e=this._domAbortController.signal;this.closeBtn.addEventListener("click",t=>{t.stopPropagation(),this.visible=!1,le.instance.isShowCommandLine=!1},{signal:e}),this.downBtn.addEventListener("click",t=>{t.stopPropagation(),this.isCmdPopupOpen=!this.isCmdPopupOpen,this.updatePopups({showCmd:this.isCmdPopupOpen,showMsg:!1}),this.isCmdPopupOpen&&this.showCommandHistoryPopup()},{signal:e}),this.upBtn.addEventListener("click",t=>{t.stopPropagation(),this.isMsgPanelOpen=!this.isMsgPanelOpen,this.updatePopups({showCmd:!1,showMsg:this.isMsgPanelOpen}),this.isMsgPanelOpen&&this.showMessagePanel()},{signal:e}),document.addEventListener("click",t=>{this.cliContainer.contains(t.target)||this.updatePopups({showCmd:!1,showMsg:!1})},{signal:e}),this.textInput.addEventListener("keydown",t=>this.handleKeyDown(t),{signal:e}),this.textInput.addEventListener("input",()=>this.handleInputChange(),{signal:e}),this.centerEl.addEventListener("focus",()=>this.updatePopups({showCmd:!1,showMsg:!1}),{signal:e}),this.cmdPopup.addEventListener("click",t=>{const i=t.target.closest(".item");i&&(this.setInputText(i.dataset.value||""),this.centerEl.focus(),this.updatePopups({showCmd:!1,showMsg:!1}))},{signal:e})}handleKeyDown(e){if(!e.isComposing)switch(e.key){case"Enter":{if(e.preventDefault(),e.stopImmediatePropagation(),this.activeSession){this.activeSession.handleEnter(this.getInputText())||this.showMessage(this.localize("main.commandLine.invalidInput","Invalid input."),"warning");return}this.executeCommand(this.getInputText()),this.historyIndex=this.history.length,this.updatePopups({showCmd:!1,showMsg:!1});return}case"Escape":{if(e.preventDefault(),e.stopImmediatePropagation(),this.activeSession){this.activeSession.handleEscape(),this.activeSession=void 0;return}this.clear(),this.showMessage(this.localize("main.commandLine.canceled")),this.updatePopups({showCmd:!1,showMsg:!1});return}case"ArrowUp":{e.preventDefault(),this.isCmdPopupOpen?this.navigateAutoComplete(-1):this.navigateHistory(-1);return}case"ArrowDown":{e.preventDefault(),this.isCmdPopupOpen?this.navigateAutoComplete(1):this.navigateHistory(1);return}case"Backspace":case"Delete":{e.stopPropagation(),e.stopImmediatePropagation();return}}}handleInputChange(){const e=this.getInputText();if(!e){this.updatePopups({showCmd:!1});return}const t=k.instance.searchCommandsByPrefix(e);t.length?(this.autoCompleteIndex=-1,this.cmdPopup.innerHTML="",t.forEach((i,n)=>{const o=document.createElement("div");o.className="item",o.dataset.value=i.command.globalName;const r=m.cmdDescription(i.commandGroup,i.command.globalName),a=k.instance.commandManager.getCommandAliases(i.command,i.commandGroup),l=a.length?`(${a.join(", ")})`:"";o.innerHTML=`<strong>${i.command.globalName}${l} - ${r}</strong>`,n===this.autoCompleteIndex&&o.classList.add("selected"),this.cmdPopup.appendChild(o)}),this.updatePopups({showCmd:!0})):this.updatePopups({showCmd:!1})}navigateAutoComplete(e){const t=Array.from(this.cmdPopup.querySelectorAll(".item"));if(!t.length)return;this.autoCompleteIndex+=e,this.autoCompleteIndex<0&&(this.autoCompleteIndex=0),this.autoCompleteIndex>=t.length&&(this.autoCompleteIndex=t.length-1),t.forEach((n,o)=>{n.classList.toggle("selected",o===this.autoCompleteIndex)});const i=t[this.autoCompleteIndex];i&&this.setInputText(i.dataset.value??"")}navigateHistory(e){this.history.length&&(this.historyIndex===-1&&(this.historyIndex=this.history.length),this.historyIndex+=e,this.historyIndex<0&&(this.historyIndex=0),this.historyIndex>this.history.length&&(this.historyIndex=this.history.length),this.historyIndex>=0&&this.historyIndex<this.history.length?this.setInputText(this.history[this.historyIndex]):this.setInputText(""))}getInputText(){return this.textInput.value.trim()}setInputText(e=""){this.textInput.value=e,this.textInput.focus()}renderKeywordPrompt(e,t){var r;if(this.promptEl.innerHTML="",this.isPromptActive=!0,this.textInput.placeholder="",e.message){const a=e.message.trim().replace(/[::]\s*$/,"");this.promptEl.append(a+" ")}const i=e.getKeywordPromptFormat(),n=((r=e.keywords)==null?void 0:r.toArray().filter(a=>a.visible))??[];n.length&&(this.promptEl.append("["),n.forEach((a,l)=>{l>0&&this.promptEl.append("/");const c=document.createElement("span");c.className="ml-cli-option",c.textContent=a.displayName,a.enabled?c.onclick=()=>t(a.globalName):(c.style.opacity="0.45",c.style.pointerEvents="none"),this.promptEl.append(c)}),this.promptEl.append("]"));const o=i.defaultKeyword??e.valueDefaultDisplayText;o&&this.promptEl.append(` <${o}>`),this.promptEl.append(": "),this.recordRecentMessage(this.promptEl.textContent??e.message)}bindCommandLifecycleEvents(){if(this.isCommandLifecycleBound)return;let e;try{e=k.instance.editor.events}catch{setTimeout(()=>this.bindCommandLifecycleEvents(),0);return}this._onCommandWillStart=()=>{this.cancelRecentAutoHide(),this.showRecentPanel()},this._onCommandEnded=()=>{this.scheduleRecentAutoHide()},e.commandWillStart.addEventListener(this._onCommandWillStart),e.commandEnded.addEventListener(this._onCommandEnded),this.isCommandLifecycleBound=!0}resolveCommand(e){const i=e.trim().split(/\s+/)[0].toUpperCase();return k.instance.lookupLocalCmd(i)}updatePopups({showCmd:e=!1,showMsg:t=!1}={}){this.isCmdPopupOpen=e,this.isMsgPanelOpen=t,this.cmdPopup.classList.toggle("ml-cli-hidden",!e),this.msgPanel.classList.toggle("ml-cli-hidden",!t),this.recentPanel.classList.toggle("ml-cli-recent-covered",t),e&&this.positionCmdPopup(),t&&this.positionMsgPanel()}showCommandHistoryPopup(){if(this.cmdPopup.innerHTML="",this.history.length)for(let e=this.history.length-1;e>=0;e--){const t=document.createElement("div");t.className="item",t.dataset.value=this.history[e],t.textContent=this.history[e],this.cmdPopup.appendChild(t)}else{const e=document.createElement("div");e.className="item",e.textContent=this.localize("main.commandLine.noHistory"),this.cmdPopup.appendChild(e)}this.positionCmdPopup()}positionCmdPopup(){this.cmdPopup.style.left="0px",this.cmdPopup.style.width=this.bar.offsetWidth+"px"}showMessagePanel(){if(!this.msgPanel.children.length){const e=document.createElement("div");e.className="ml-cli-history-line",e.textContent=this.localize("main.commandLine.noHistory"),e.dataset.msgKey="main.commandLine.noHistory",this.msgPanel.appendChild(e)}this.msgPanel.scrollTop=this.msgPanel.scrollHeight,this.positionMsgPanel()}positionMsgPanel(){this.msgPanel.style.width=this.bar.offsetWidth+"px"}clearNoHistoryPlaceholder(){Array.from(this.msgPanel.children).forEach(e=>{const t=e;t.dataset.msgKey==="main.commandLine.noHistory"&&this.msgPanel.removeChild(t)})}appendMessage(e,t="info",i){this.clearNoHistoryPlaceholder();const n=document.createElement("div");n.className=t==="warning"?"ml-cli-history-line ml-cli-msg-error":"ml-cli-history-line",n.textContent=e,i&&(n.dataset.msgKey=i),this.msgPanel.appendChild(n),this.recordRecentMessage(e),this.showMessagePanel()}printHistoryLine(e){this.clearNoHistoryPlaceholder();const t=document.createElement("div");t.className="ml-cli-history-line",t.textContent="> "+e,t.dataset.msgKey="main.commandLine.executed",this.msgPanel.appendChild(t),this.showMessagePanel()}resizeHandler(){const e=this.useViewportPositioning()?window.innerWidth:this.container.getBoundingClientRect().width;let t=Math.max(this.minWidth,e*this.widthRatio);t=Math.min(t,Math.max(200,e-20)),this.bar.style.width=t+"px",this.recentPanel.style.width=t+"px",this.positionMsgPanel(),this.positionCmdPopup()}recordRecentMessage(e){const t=e==null?void 0:e.replace(/\s+/g," ").trim();t&&(this.recentMessages.push(t),this.recentMessages.length>2&&this.recentMessages.shift(),this.showRecentPanel(),this.renderRecentMessages())}renderRecentMessages(){this.recentPanel.innerHTML="",this.recentMessages.forEach(e=>{const t=document.createElement("div");t.className="ml-cli-recent-line",t.textContent=e,this.recentPanel.appendChild(t)})}scheduleRecentAutoHide(){this.cancelRecentAutoHide(),this.recentHideTimer=setTimeout(()=>{this.hideRecentPanel(),this.recentHideTimer=void 0},2e3)}cancelRecentAutoHide(){this.recentHideTimer&&(clearTimeout(this.recentHideTimer),this.recentHideTimer=void 0)}showRecentPanel(){this.recentPanel.classList.remove("ml-cli-hidden")}hideRecentPanel(){this.recentPanel.classList.add("ml-cli-hidden")}useViewportPositioning(){return this.container===document.body}}const B0="ml-desktop-session-accessory-styles",F0=`
496
496
  .ml-desktop-session-accessory {
497
497
  position: absolute;
498
498
  top: 20px;
@@ -519,7 +519,7 @@
519
519
  align-items: center;
520
520
  gap: 8px;
521
521
  }
522
- `,Ba=class Ba{constructor(e){Ba.injectCss(),getComputedStyle(e).position==="static"&&(e.style.position="relative"),this.root=document.createElement("div"),this.root.className="ml-desktop-session-accessory",this.root.hidden=!0,this.root.setAttribute("aria-hidden","true"),this.slot=document.createElement("div"),this.slot.className="ml-desktop-session-accessory__slot",this.root.appendChild(this.slot),this.sinkPointer(this.root),this.sinkPointer(this.slot),ot(Oe(e),this.root),e.appendChild(this.root)}get host(){return this.slot}prepare(){this.root.hidden=!1,this.root.classList.add("is-visible"),this.root.setAttribute("aria-hidden","false")}clear(){this.slot.replaceChildren(),this.root.hidden=!0,this.root.classList.remove("is-visible"),this.root.setAttribute("aria-hidden","true")}dispose(){this.clear(),this.root.remove()}sinkPointer(e){e.addEventListener("pointerdown",t=>{t.stopPropagation()})}static injectCss(){if(this.stylesInjected||typeof document>"u")return;this.stylesInjected=!0;const e=document.createElement("style");e.id=BS,e.textContent=FS,document.head.appendChild(e)}};Ba.stylesInjected=!1;let Jo=Ba;function hc(...s){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 1024 1024">${s.map(t=>`<path fill="currentColor" d="${t}"/>`).join("")}</svg>`}const zS='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.4379 15.2979h.002l4.86-4.86-9.722-4.86 4.86 9.72Zm7.562-5.298-3.434 3.434 3.2 3.2-1.132 1.132-3.2-3.2-3.434 3.434-7.6-15.6 15.6 7.6Z"/></svg>',RS='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M15.08 12.8537l.002-.002V5.5897c0-.422-.652-.414-.652 0v3.466c0 .938-1.482.95-1.482 0v-4.83c0-.414-.6381-.414-.6381 0h-.014v4.83c.014.95-1.482.95-1.482 0V3.4437c0-.42-.638-.414-.638 0v5.612c0 .95-1.494.95-1.494 0V4.2317c0-.408-.64-.42-.64 0v6.756c0 .802-1.094 1.088-1.494.388-.26-.446-.518-.892-.776-1.338-.338-.482-1.1-.15-.794.38.326.566.652 1.132.978 1.698.006.012.014.026.02.04.552.946 1.106 1.89 1.658 2.834.19.3.422.578.666.802h-.006c.672.61 1.528.964 2.418 1.052.888.06 1.7921-.124 2.5601-.612.3-.19.572-.416.816-.68.326-.368.57-.776.734-1.204.176-.482.258-.97.258-1.494Zm-.91-8.608-.004-.002c.958-.38 2.058.244 2.058 1.346v7.266c0 .652-.108 1.29-.332 1.894-.216.564-.53 1.114-.964 1.576-.318.34-.666.632-1.046.884-.978.612-2.1461.862-3.2601.774-1.128-.102-2.228-.564-3.098-1.352-.326-.292-.612-.646-.87-1.034-.558-.96-1.114-1.92-1.672-2.88l-.012-.028c-.326-.568-.652-1.138-.978-1.706-.59-1.018.068-2.186 1.156-2.336.536-.074 1.126.116 1.562.72.026.028.04.062.054.096.04.074.082.146.122.218V4.2337c0-1.176 1.244-1.788 2.202-1.278.42-1.278 2.378-1.264 2.792-.014.9721-.51 2.2221.102 2.2221 1.284v.06c.022-.014.046-.026.068-.04Z"/></svg>',Cm='<path fill="currentColor" d="M9.3333 14.125 5.875 10.6667V14.125H9.3333Zm4.7917-3.4583-3.4583 3.4583H14.125V10.6667ZM10.6667 5.875 14.125 9.3333V5.875H10.6667ZM5.875 9.3333 9.3333 5.875H5.875V9.3333Zm9.2083 5.475c1.2333-1.3 1.9083-3.0333 1.9083-4.825-.0083-3.325-2.35-6.1833-5.6083-6.8417C8.125 2.4833 4.85 4.2 3.55 7.2583c-1.3 3.0583-.275 6.6083 2.4583 8.5 2.725 1.8917 6.4167 1.6 8.8167-.6917.0917-.0833.175-.175.2583-.2583Zm1.2583.5917 2.575 2.575c-.3167.3167-.625.625-.9417.9417-.8583-.8583-1.7167-1.7167-2.575-2.575-3.4083 2.9-8.4917 2.5917-11.525-.6917S.9417 7.275 4.1083 4.1083C7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Z"/>',jS=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${Cm}</svg>`,Am='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M15.0833 14.8083c1.2333-1.3 1.9083-3.0333 1.9083-4.825-.0083-3.325-2.35-6.1833-5.6083-6.8417C8.125 2.4833 4.85 4.2 3.55 7.2583c-1.3 3.0583-.275 6.6083 2.4583 8.5 2.725 1.8917 6.4167 1.6 8.8167-.6917.0917-.0833.175-.175.2583-.2583Zm1.2583.5917 2.575 2.575c-.3167.3167-.625.625-.9417.9417-.8583-.8583-1.7167-1.7167-2.575-2.575-3.4083 2.9-8.4917 2.5917-11.525-.6917C.8417 12.3667.9417 7.275 4.1083 4.1083 7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Zm-3.55-2.6083V7.2083H7.2083v5.5833h5.5833ZM5.875 5.875h8.25v8.25H5.875V5.875Z"/></svg>',VS='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09M160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48"/></svg>',GS='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="2" y="2" width="8.2" height="5" rx="1.2" fill="currentColor"/><rect x="2" y="8.5" width="8.2" height="9.5" rx="1.2" fill="currentColor"/><rect x="11.7" y="2" width="6.3" height="10" rx="1.2" fill="currentColor"/><rect x="11.7" y="13.5" width="6.3" height="4.5" rx="1.2" fill="currentColor"/></svg>',HS='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M1.5 7h17v6h-17ZM4.25 7h1v2.5h-1ZM7.5 7h.75v1.5H7.5ZM10.25 7h1v2.5h-1ZM13.5 7h.75v1.5H13.5ZM16.25 7h1v2.5h-1Z"/></svg>',US='<path fill="currentColor" fill-rule="evenodd" d="M2.25 15h15.5v3.4H2.25Zm1.5 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Z"/>',oe="var(--el-color-primary, var(--ml-ui-accent, #409eff))";function Mi(s){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${s}${US}</svg>`}const WS=Mi(`<rect fill="${oe}" x="2.9" y="2.5" width="1.25" height="8.8" rx=".2"/><rect fill="${oe}" x="15.85" y="2.5" width="1.25" height="8.8" rx=".2"/><path fill="${oe}" d="M4.4 6.9 7.2 5.05v3.7Z"/><path fill="${oe}" d="M15.6 6.9 12.8 5.05v3.7Z"/><rect fill="${oe}" x="6.7" y="6.25" width="6.6" height="1.3"/>`),$S=Mi(`<rect fill="${oe}" x="2.9" y="2.5" width="1.25" height="8.8" rx=".2"/><rect fill="${oe}" x="15.85" y="2.5" width="1.25" height="8.8" rx=".2"/><path fill="${oe}" d="M4.4 6.9 7.2 5.05v3.7Z"/><path fill="${oe}" d="M15.6 6.9 12.8 5.05v3.7Z"/><rect fill="${oe}" x="6.7" y="6.25" width="6.6" height="1.3"/><circle fill="currentColor" cx="10" cy="3.45" r="2.2"/><text x="10" y="4.42" text-anchor="middle" font-size="3.15" font-weight="700" font-family="Arial,Helvetica,sans-serif" fill="${oe}">n</text>`),KS=Mi(`<g fill="none" stroke="${oe}" stroke-linejoin="miter"><path stroke-width="1.55" stroke-linecap="butt" d="M16.9 12.25H4.9L11.6 3.03"/><path stroke-width="1.7" stroke-linecap="butt" d="M11.05 12.25A6.15 6.15 0 0 0 8.51 7.27"/></g><path fill="${oe}" d="M11.05 12.25 9.85 10.55h2.4Z"/><path fill="${oe}" d="M8.51 7.27 10.46 7.39 9.23 9.09Z"/>`),YS=Mi(`<path fill="${oe}" d="M5 12V4.2A7.8 7.8 0 0 1 12.8 12Z"/>`),ZS=Mi(`<g fill="none" stroke-linejoin="miter"><path stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" d="M4.9 11.6A8.3 8.3 0 0 1 13.2 3.3"/><path stroke="currentColor" stroke-width="1.35" stroke-linecap="square" d="M10.4 11.6H13.2V8.8"/><path stroke="currentColor" stroke-width="1.35" stroke-linecap="butt" d="M13.2 11.6v1.7"/><rect stroke="${oe}" stroke-width="1.15" x="3.65" y="10.35" width="2.5" height="2.5"/><rect stroke="${oe}" stroke-width="1.15" x="11.95" y="2.05" width="2.5" height="2.5"/></g>`),XS=Mi(`<circle fill="none" stroke="${oe}" stroke-width="1.4" cx="9.1" cy="7.3" r="4.7"/><circle fill="${oe}" cx="9.1" cy="7.3" r="1.05"/><path fill="none" stroke="${oe}" stroke-width="1.35" stroke-linecap="round" d="M9.1 7.3 13.35 3.7"/><path fill="${oe}" d="M13.35 3.7 11.15 4.2 12.55 5.7Z"/>`),_m=Mi(`<g fill="none" stroke="${oe}" stroke-linecap="round" stroke-linejoin="round"><path stroke-width="1.4" d="M4 4.8v7.4h7.6"/><path stroke-width="1.2" stroke-dasharray="1.7 1.2" d="M4 6.9h7M11 12.2V6.9"/></g><path fill="${oe}" d="M4 2.5 2.45 4.8h3.1ZM13.8 12.2 11.5 10.7v3Z"/><circle fill="${oe}" cx="11" cy="6.9" r="1.3"/>`),pc='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true"><path d="M 459.5 0 L 475.5 0 L 476.5 1 L 479.5 1 L 485.5 3 Q 487.8 6.2 492.5 7 L 501 14.5 L 505 19.5 L 511 32.5 Q 510.2 35.8 512 36.5 L 512 52.5 L 511 53.5 L 511 56.5 L 509 62.5 L 506 68.5 L 493 89.5 L 483 108.5 L 478 115.5 L 472 127.5 L 467 134.5 L 457 153.5 L 452 160.5 L 442 179.5 L 437 186.5 L 431 198.5 L 440 213.5 L 440 215.5 L 443 220.5 L 447 232.5 L 448 240.5 L 449 241.5 L 449 245.5 L 450 246.5 L 450 254.5 L 451 255.5 L 451 274.5 L 450 275.5 L 450 283.5 L 449 284.5 L 449 289.5 L 448 290.5 L 448 294.5 L 447 295.5 L 446 302.5 L 442 314.5 L 438 322.5 L 438 324.5 L 428 345.5 L 428 347.5 L 425 352.5 L 422 361.5 L 418 368.5 L 418 370.5 L 415 375.5 L 412 384.5 L 408 391.5 L 408 393.5 L 405 398.5 L 402 407.5 L 398 414.5 L 395 423.5 L 391 430.5 L 391 432.5 L 381 453.5 L 381 455.5 L 378 460.5 L 375 469.5 L 371 476.5 L 368 485.5 L 361.5 497 L 353.5 501 L 348.5 501 L 347.5 500 L 344.5 500 L 329.5 495 L 326.5 493 L 321.5 492 L 318.5 490 L 303.5 485 L 289.5 478 L 287.5 478 L 282 473.5 L 279 467.5 L 279 459.5 L 280 458.5 L 280 455.5 L 281 454.5 L 281 451.5 L 282 450.5 L 283 442.5 L 284 441.5 L 286 431.5 L 285.5 431 L 281.5 435 L 259.5 455 L 255.5 457 L 246.5 457 L 223.5 444 L 189.5 421 L 155.5 394 L 133 373.5 L 130 367.5 L 130 359.5 L 134 352.5 L 223 233.5 L 242 206.5 L 254.5 192 L 271.5 177 L 285.5 168 L 299.5 161 L 314.5 156 L 317.5 156 L 318.5 155 L 330.5 154 L 331.5 153 L 352.5 153 L 354 151.5 L 356 146.5 L 372 120.5 L 374 115.5 L 387 94.5 L 397 75.5 L 402 68.5 L 408 56.5 L 413 49.5 L 423 30.5 L 431 17.5 L 439.5 9 L 449.5 3 L 455.5 1 L 458.5 1 L 459.5 0 Z M 466 30 L 459 33 L 454 39 L 448 51 L 443 58 L 433 77 L 428 84 L 414 110 L 409 117 L 407 122 L 405 124 L 403 129 L 401 131 L 399 136 L 384 161 L 386 162 L 388 162 L 396 166 L 409 175 L 422 153 L 424 148 L 429 141 L 431 136 L 433 134 L 435 129 L 437 127 L 439 122 L 444 115 L 454 96 L 459 89 L 469 70 L 474 63 L 482 47 L 482 43 L 480 38 L 475 32 L 469 30 L 466 30 Z M 333 183 L 332 184 L 328 184 L 327 185 L 324 185 L 323 186 L 320 186 L 314 188 L 300 195 L 286 205 L 271 220 L 267 225 L 266 228 L 410 310 L 412 307 L 412 305 L 416 296 L 418 285 L 419 284 L 419 279 L 420 278 L 420 252 L 419 251 L 419 246 L 417 241 L 417 238 L 411 224 L 402 211 L 389 198 L 371 188 L 362 185 L 352 184 L 351 183 L 333 183 Z M 248 252 L 195 322 L 193 326 L 172 353 L 167 361 L 194 384 L 228 409 L 249 422 L 256 417 L 303 372 L 310 368 L 318 368 L 322 370 L 328 378 Q 327 381 329 382 L 329 386 L 326 395 L 326 399 L 323 408 L 323 411 L 322 412 L 322 416 L 319 425 L 319 428 L 318 429 L 318 432 L 317 433 L 317 437 L 314 446 L 314 449 L 313 450 L 313 453 L 312 454 L 316 456 L 318 456 L 331 462 L 343 466 L 351 448 L 351 446 L 354 441 L 354 439 L 357 434 L 357 432 L 364 418 L 364 416 L 367 411 L 367 409 L 370 404 L 370 402 L 377 388 L 377 386 L 380 381 L 380 379 L 383 374 L 383 372 L 387 365 L 390 356 L 393 351 L 393 349 L 396 344 L 397 339 L 375 326 L 373 324 L 368 322 L 366 320 L 361 318 L 354 313 L 349 311 L 347 309 L 342 307 L 340 305 L 335 303 L 321 294 L 316 292 L 314 290 L 309 288 L 307 286 L 302 284 L 295 279 L 276 269 L 248 252 Z "/><path d="M 170.5 100 L 179.5 100 Q 185 102 188 106.5 L 190 110.5 L 190 134.5 L 184.5 142 L 177.5 145 L 171.5 145 L 166.5 143 L 162 138.5 L 159 129.5 L 159 115.5 L 160 114.5 Q 159.2 109.7 161 107.5 L 166.5 102 L 170.5 100 Z "/><path d="M 131.5 140 L 151.5 140 L 156.5 142 L 162 147.5 L 164 151.5 L 164 159.5 L 163 162.5 L 158.5 168 L 152.5 171 L 130.5 171 L 124.5 168 L 122 165.5 L 119 159.5 L 119 151.5 Q 121.3 145.3 126.5 142 L 131.5 140 Z "/><path d="M 197.5 140 L 218.5 140 L 223.5 142 L 228 146.5 L 231 152.5 L 231 158.5 L 229 163.5 L 223.5 169 L 218.5 171 L 197.5 171 L 192.5 169 L 188 164.5 L 186 160.5 L 185 153.5 L 188 146.5 L 191.5 143 L 197.5 140 Z "/><path d="M 171.5 166 L 177.5 166 L 180.5 167 L 187 171.5 L 190 176.5 L 190 200.5 Q 188 206 183.5 209 L 179.5 211 L 173.5 212 L 167.5 210 L 161 203.5 Q 159.2 201.3 160 196.5 L 159 195.5 L 159 181.5 L 162 172.5 L 165.5 169 L 171.5 166 Z "/><path d="M 50.5 223 L 60.5 223 L 68 228.5 L 71 234.5 L 71 256.5 Q 69.1 262.6 64.5 266 L 59.5 268 L 51.5 268 Q 45.3 265.7 42 260.5 L 40 255.5 L 40 235.5 L 42 230.5 L 48.5 224 L 50.5 223 Z "/><path d="M 13.5 263 L 30.5 263 Q 31.5 265 35.5 264 L 43 270.5 L 45 274.5 L 45 282.5 Q 43.1 288.6 38.5 292 L 33.5 294 L 10.5 294 Q 5 292 2 287.5 L 0 283.5 L 0 274.5 Q 2.3 268.3 7.5 265 L 13.5 263 Z "/><path d="M 80.5 263 L 97.5 263 L 103.5 265 L 108 268.5 L 111 273.5 L 112 279.5 L 109 287.5 L 104.5 292 L 100.5 294 L 77.5 294 Q 71.3 291.7 68 286.5 L 66 281.5 L 66 276.5 L 69 269.5 L 72.5 266 L 80.5 263 Z "/><path d="M 54.5 289 L 61.5 290 L 69 296.5 L 71 301.5 L 71 322.5 L 69 327.5 L 63.5 333 L 58.5 335 L 53.5 335 L 46.5 332 L 43 328.5 L 40 321.5 L 40 302.5 Q 41.8 301.8 41 298.5 L 46.5 292 L 54.5 289 Z "/><path d="M 98.5 400 L 107.5 402 L 113 407.5 L 115 411.5 L 115 434.5 Q 112.7 440.7 107.5 444 L 101.5 446 L 96.5 446 L 90.5 443 L 87 439.5 L 84 430.5 L 84 415.5 L 85 414.5 Q 84.3 410.3 86 408.5 L 92.5 402 L 98.5 400 Z "/><path d="M 55.5 441 L 77.5 441 L 80.5 442 L 86 446.5 L 89 451.5 L 89 460.5 Q 86.7 466.7 81.5 470 L 76.5 472 L 56.5 472 L 51.5 470 L 46 464.5 L 44 460.5 L 44 452.5 L 45 449.5 L 49.5 444 L 55.5 441 Z "/><path d="M 121.5 441 L 144.5 441 Q 150.7 443.3 154 448.5 L 156 453.5 L 156 458.5 L 154 464.5 L 148.5 470 L 146.5 470 L 143.5 472 L 122.5 472 L 116.5 469 L 113 465.5 L 111 461.5 L 110 455.5 Q 112 454.5 111 450.5 L 117.5 443 L 121.5 441 Z "/><path d="M 96.5 467 L 103.5 467 L 106.5 468 L 113 473.5 L 115 478.5 L 115 501.5 Q 113 507 108.5 510 L 104.5 512 L 95.5 512 Q 89.3 509.7 86 504.5 Q 84.3 502.7 85 498.5 L 84 497.5 L 84 482.5 L 87 473.5 L 91.5 469 L 96.5 467 Z "/></svg>',qS=pc,JS='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7" fill="currentColor"/><rect x="14" y="14" width="7" height="7" fill="none" stroke="currentColor" stroke-width="1"/><path d="M12 4a8 8 0 0 1 7.25 7.25" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><path d="M20.75 10 L17.25 10 L19 12.5 Z" fill="currentColor"/><path d="M12 20a8 8 0 0 1-8-8" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><path d="M6 14 L2.5 14 L4 11 Z" fill="currentColor"/></svg>',QS='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="2.5" y="2.5" width="15" height="15" rx="1.5" fill="#fff" stroke="currentColor" stroke-width="1.2"/><g fill="none" stroke="#000" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5.5 6.5h4.5M5.5 10h7M5.5 13.5h9"/><path d="M13.25 6.5v4.25h-3.25"/></g></svg>',eC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" style="fill:none"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12.4 3.25H5.5A2.25 2.25 0 0 0 3.25 5.5v9A2.25 2.25 0 0 0 5.5 16.75h9A2.25 2.25 0 0 0 16.75 14.5V8.6"/><g transform="rotate(45 13.2 6.7)"><rect x="11.7" y="1.55" width="3" height="7.45" rx="1.45"/><path d="M11.7 3.2h3"/><path d="M11.7 9 13.2 12.15 14.7 9"/><rect x="12.8" y="7.05" width="0.8" height="1.2" rx="0.4"/></g></g></svg>',tC='<path fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="butt" stroke-linejoin="miter" d="M2.6 6.8v8.5h5.2l2.2 2.4 2.2-2.4h5.2"/>',Pm='<g fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" transform="rotate(46 14.8 9)"><rect x="13.65" y="4.7" width="2.3" height="5.6" rx="1.05"/><path d="M13.65 10.3 14.8 12.9 15.95 10.3"/></g>';function cn(s){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${tC}${s}</svg>`}const Em=cn('<path fill="currentColor" d="M6.4 12.2c-1.85 0-3.3-1.25-3.3-2.85 0-1.35.95-2.5 2.3-2.8.45-1.7 1.95-2.85 3.7-2.85 1.25 0 2.35.55 3.05 1.45.55-.7 1.45-1.15 2.5-1.15 1.85 0 3.25 1.3 3.25 2.95 0 .3-.05.55-.1.8 1.2.4 2.05 1.4 2.05 2.65 0 1.55-1.5 2.8-3.4 2.8H6.4Z"/>'),Lm=cn(`<rect fill="none" stroke="currentColor" stroke-width="1.35" x="5" y="2.8" width="8.2" height="7.2"/><rect fill="${oe}" x="4.2" y="2" width="2" height="2"/><rect fill="${oe}" x="12.2" y="9" width="2" height="2"/>${Pm}`),Tm=cn(`<ellipse fill="none" stroke="currentColor" stroke-width="1.35" cx="9" cy="6.6" rx="4" ry="3.6"/><rect fill="${oe}" x="8" y="2.1" width="2" height="2"/><rect fill="${oe}" x="4" y="5.6" width="2" height="2"/>${Pm}`),iC=cn('<path fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" d="M4.4 12.6 10.2 7"/><rect fill="currentColor" x="10.2" y="1.2" width="7.8" height="5.8" rx=".35"/>'),nC=cn('<path fill="currentColor" fill-rule="evenodd" d="M10 2.2 15.3 13.1h-2.2l-1.05-2.95H7.95L6.9 13.1H4.7L10 2.2Zm0 3.4-1.15 3.2h2.3L10 5.6Z"/>'),sC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" d="M4 16 16 4"/><circle cx="4" cy="16" r="1.6" fill="currentColor"/><circle cx="16" cy="4" r="1.6" fill="currentColor"/></svg>',oC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3" y="5.5" width="14" height="9" rx="1.5" fill="currentColor" fill-opacity="0.28" stroke="currentColor" stroke-width="1.5"/></svg>',rC=cn('<g transform="rotate(-40 10 7.6)" fill="currentColor"><path d="M3.5 6.75h9V5.15L16.7 7.6 12.5 10.05V8.45h-9Z"/></g>'),aC=hc("M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"),Im=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3.5" y="3" width="13" height="14" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.5"/><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M3.5 6.5h13"/><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M6.5 9.5h7M6.5 12h7M6.5 14.5h3.2"/><g fill="none" stroke="${oe}" stroke-width="1.7" stroke-linecap="round"><circle cx="14.5" cy="14.7" r="4.2"/><path d="M17.5 17.7 19.5 19.7"/></g></svg>`,lC=Im,cC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M4.5 2h6.4L15.5 6.6V16.5A1.5 1.5 0 0 1 14 18H4.5A1.5 1.5 0 0 1 3 16.5V3.5A1.5 1.5 0 0 1 4.5 2z"/><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M10.9 2v4.6h4.6"/><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M10 5.8v6M7.2 9.6 10 12.5l2.8-2.9"/></svg>',dC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776"/></svg>',Mm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M15.5 2H9.1L4.5 6.6V16.5A1.5 1.5 0 0 0 6 18h9.5A1.5 1.5 0 0 0 17 16.5V3.5A1.5 1.5 0 0 0 15.5 2z"/><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M9.1 2v4.6H4.5"/><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M10 14.2V8M7.2 10.4 10 7.5l2.8 2.9"/></svg>',uC=pc,Om=hc("M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"),Dm=hc("M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176","M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"),hC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="m18.5 10 4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725 16.676 16.676 0 0 1 3.524 17.273l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877 16.165 16.165 0 0 0 11.91 6.001L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"/></svg>',pC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><circle cx="10" cy="10" r="4" fill="currentColor"/><path fill="none" stroke="currentColor" stroke-width="1.5" d="M10 2v2M10 16v2M2 10h2M16 10h2M4.2 4.2l1.4 1.4M14.4 14.4l1.4 1.4M4.2 15.8l1.4-1.4M14.4 5.6l1.4-1.4"/></svg>',mC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10 3a7 7 0 1 0 0 14 9 9 0 0 1 0-14Z"/></svg>',fC=Mm,yC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M4 3h12v14H4V3Zm2 2v2h8V5H6Zm0 4v6h8V9H6Z"/></svg>',gC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M5 3h7l3 3v11H5V3Zm6 0v3h3"/><text x="6" y="16" fill="currentColor" font-size="5" font-family="Arial">PDF</text></svg>',bC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-width="1.5" d="M4 4h12v12H4z"/><circle cx="8" cy="10" r="2" fill="currentColor"/></svg>',wC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3" y="3" width="14" height="14" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="15" y="5" width="1.5" height="10" rx=".5" fill="currentColor"/></svg>',vC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3" y="3" width="14" height="3" rx=".5" fill="currentColor"/><rect x="5" y="8" width="10" height="9" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',xC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="5" y="3" width="10" height="9" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="3" y="14" width="14" height="3" rx=".5" fill="currentColor"/></svg>',kC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3" y="3" width="3" height="14" rx=".5" fill="currentColor"/><rect x="8" y="5" width="9" height="10" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',SC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="5" y="5" width="9" height="10" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="14" y="3" width="3" height="14" rx=".5" fill="currentColor"/></svg>',CC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" d="M5 5l10 10M15 5 5 15"/></svg>',AC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><circle cx="10" cy="4" r="1.5" fill="currentColor"/><circle cx="10" cy="10" r="1.5" fill="currentColor"/><circle cx="10" cy="16" r="1.5" fill="currentColor"/></svg>',Nm='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 6.5 5.5 11h9L10 6.5Z"/></svg>',Bm='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 13.5 14.5 9h-9L10 13.5Z"/></svg>',mc='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M13.5 10 9 14.5V5.5L13.5 10Z"/></svg>',fc='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M6.5 10 11 14.5V5.5L6.5 10Z"/></svg>',_C='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10 2.6 18 9.8h-2.1V17h-4.4v-4.4H8.5V17H4.1V9.8H2L10 2.6Zm0 1.8L5.3 9.8V15.8h2V11.4h5.4v4.4h2V9.8L10 4.4Z"/></svg>',PC=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${Cm}<path fill="${oe}" d="M14.85 0.85 15.95 4.05 19.15 5.15 15.95 6.25 14.85 9.45 13.75 6.25 10.55 5.15 13.75 4.05Z"/><path fill="${oe}" d="M17.55 8.35 18.15 10.15 19.95 10.75 18.15 11.35 17.55 13.15 16.95 11.35 15.15 10.75 16.95 10.15Z"/></svg>`,EC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M8.08 2.1h3.84l.32 1.52a6.4 6.4 0 0 1 1.36.78l1.48-.64 1.92 1.92-.64 1.48c.3.42.54.88.78 1.36l1.52.32v3.84l-1.52.32a6.4 6.4 0 0 1-.78 1.36l.64 1.48-1.92 1.92-1.48-.64a6.4 6.4 0 0 1-1.36.78l-.32 1.52H8.08l-.32-1.52a6.4 6.4 0 0 1-1.36-.78l-1.48.64-1.92-1.92.64-1.48a6.4 6.4 0 0 1-.78-1.36L1.34 11.92V8.08l1.52-.32c.24-.48.48-.94.78-1.36l-.64-1.48 1.92-1.92 1.48.64c.42-.3.88-.54 1.36-.78L8.08 2.1ZM10 7.2A2.8 2.8 0 1 0 10 12.8 2.8 2.8 0 0 0 10 7.2Z"/></svg>',LC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-width="1.5" d="M10 2.5v6M7 5.5h6"/><circle cx="10" cy="14.5" r="3.2" fill="none" stroke="currentColor" stroke-width="1.5"/><circle cx="10" cy="14.5" r="1.1" fill="currentColor"/></svg>',TC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.09 3.53 16.09 6.97 10.09 10.29 4.18 7 10.09 3.56M10.09 2.4 2.17 7 3.31 7.65 10.09 11.45 17 7.62 18.17 7 10.08 2.37 10.09 2.4Z"/><path fill="currentColor" d="M10.25 14.83 18.17 10.22 17 9.57 10.22 13.57 3.32 9.59 2.17 10.22 10.25 14.83Z"/><path fill="currentColor" d="M10.25 17.63 18.17 13 17 12.37 10.22 16.37 3.32 12.38 2.17 13 10.25 17.63Z"/></svg>',IC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.09 5.15 16.09 8.59 10.09 11.91 4.18 8.59 10.09 5.15ZM10.09 4 2.17 8.61 3.31 9.25 10.09 13.06 17 9.24 18.16 8.61 10.08 4 10.09 4Z"/><path fill="currentColor" d="M10.25 16.46 18.17 11.85 17 11.2 10.22 15.2 3.32 11.21 2.17 11.85 10.25 16.46Z"/><path fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" d="M3.5 3.5 16.5 16.5"/></svg>',MC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M2.25 2.25h4.878v4.878H2.25V2.25Zm.978.978v2.924h2.924V3.228H3.228Z"/><path fill="currentColor" d="M5.175 20.773V7.128H4.204V21.75H21.75V4.204H7.128v.971H20.773v15.598H5.175Z"/></svg>',OC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M3 2H2v16h16v-1H8v-5H3V2zm0 11v4h4v-4H3z"/></svg>',DC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M16.98 11L18.5 11L18.5 10L16.98 10C16.86 8.13 16.05 6.44 14.8 5.2L16.88 2.83L16.12 2.17L14.05 4.54C12.79 3.57 11.21 3 9.5 3C5.36 3 2 6.36 2 10.5C2 14.64 5.36 18 9.5 18C13.47 18 16.73 14.91 16.98 11ZM15.98 10C15.86 8.43 15.18 7.01 14.14 5.95L10.6 10L15.98 10ZM13.39 5.29L8.4 11L15.98 11C15.73 14.36 12.92 17 9.5 17C5.91 17 3 14.09 3 10.5C3 6.91 5.91 4 9.5 4C10.96 4 12.31 4.48 13.39 5.29Z"/></svg>',NC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="#e75958" d="M22 12H12l5 8.66A10 10 0 0 0 22 12Z"/><path fill="#814dff" d="M17 20.66 12 12 7 20.66A10 10 0 0 0 17 20.66Z"/><path fill="#13b0ce" d="M7 20.66 12 12H2A10 10 0 0 0 7 20.66Z"/><path fill="#4ecd83" d="M2 12H12L7 3.34A10 10 0 0 0 2 12Z"/><path fill="#ffc33f" d="M7 3.34 12 12l5-8.66A10 10 0 0 0 7 3.34Z"/><path fill="#ff9543" d="M17 3.34 12 12H22A10 10 0 0 0 17 3.34Z"/></svg>',BC=Am,FC=_m,zC=Em,RC=Lm,jC=Tm,VC=Om,GC=Dm,yc='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><circle cx="4" cy="10" r="1.6" fill="currentColor"/><circle cx="10" cy="10" r="1.6" fill="currentColor"/><circle cx="16" cy="10" r="1.6" fill="currentColor"/></svg>',Fm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H11"/></svg>',zm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 14 5-5-5-5"/><path d="M20 9H9.5a5.5 5.5 0 0 0 0 11H13"/></svg>',Rm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>',jm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none"><text x="2" y="18" font-family="Georgia, Times New Roman, serif" font-size="16" font-weight="600" fill="currentColor">A</text><g stroke="#2dd4bf" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="M18 4v16"/><path d="M15.5 6.5 18 4l2.5 2.5"/><path d="M15.5 17.5 18 20l2.5-2.5"/></g></svg>',Vm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>';function ft(s,e="ml-ex-ui-icon"){if(typeof s=="function")return s();if(s instanceof HTMLElement)return s.cloneNode(!0);const t=document.createElement("span");return t.className=e,t.innerHTML=s,t}const Gm="ml-entity-pick-cancel-styles",HC=`
522
+ `,Ba=class Ba{constructor(e){Ba.injectCss(),getComputedStyle(e).position==="static"&&(e.style.position="relative"),this.root=document.createElement("div"),this.root.className="ml-desktop-session-accessory",this.root.hidden=!0,this.root.setAttribute("aria-hidden","true"),this.slot=document.createElement("div"),this.slot.className="ml-desktop-session-accessory__slot",this.root.appendChild(this.slot),this.sinkPointer(this.root),this.sinkPointer(this.slot),ot(Oe(e),this.root),e.appendChild(this.root)}get host(){return this.slot}prepare(){this.root.hidden=!1,this.root.classList.add("is-visible"),this.root.setAttribute("aria-hidden","false")}clear(){this.slot.replaceChildren(),this.root.hidden=!0,this.root.classList.remove("is-visible"),this.root.setAttribute("aria-hidden","true")}dispose(){this.clear(),this.root.remove()}sinkPointer(e){e.addEventListener("pointerdown",t=>{t.stopPropagation()})}static injectCss(){if(this.stylesInjected||typeof document>"u")return;this.stylesInjected=!0;const e=document.createElement("style");e.id=B0,e.textContent=F0,document.head.appendChild(e)}};Ba.stylesInjected=!1;let Jo=Ba;function hc(...s){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 1024 1024">${s.map(t=>`<path fill="currentColor" d="${t}"/>`).join("")}</svg>`}const z0='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.4379 15.2979h.002l4.86-4.86-9.722-4.86 4.86 9.72Zm7.562-5.298-3.434 3.434 3.2 3.2-1.132 1.132-3.2-3.2-3.434 3.434-7.6-15.6 15.6 7.6Z"/></svg>',R0='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M15.08 12.8537l.002-.002V5.5897c0-.422-.652-.414-.652 0v3.466c0 .938-1.482.95-1.482 0v-4.83c0-.414-.6381-.414-.6381 0h-.014v4.83c.014.95-1.482.95-1.482 0V3.4437c0-.42-.638-.414-.638 0v5.612c0 .95-1.494.95-1.494 0V4.2317c0-.408-.64-.42-.64 0v6.756c0 .802-1.094 1.088-1.494.388-.26-.446-.518-.892-.776-1.338-.338-.482-1.1-.15-.794.38.326.566.652 1.132.978 1.698.006.012.014.026.02.04.552.946 1.106 1.89 1.658 2.834.19.3.422.578.666.802h-.006c.672.61 1.528.964 2.418 1.052.888.06 1.7921-.124 2.5601-.612.3-.19.572-.416.816-.68.326-.368.57-.776.734-1.204.176-.482.258-.97.258-1.494Zm-.91-8.608-.004-.002c.958-.38 2.058.244 2.058 1.346v7.266c0 .652-.108 1.29-.332 1.894-.216.564-.53 1.114-.964 1.576-.318.34-.666.632-1.046.884-.978.612-2.1461.862-3.2601.774-1.128-.102-2.228-.564-3.098-1.352-.326-.292-.612-.646-.87-1.034-.558-.96-1.114-1.92-1.672-2.88l-.012-.028c-.326-.568-.652-1.138-.978-1.706-.59-1.018.068-2.186 1.156-2.336.536-.074 1.126.116 1.562.72.026.028.04.062.054.096.04.074.082.146.122.218V4.2337c0-1.176 1.244-1.788 2.202-1.278.42-1.278 2.378-1.264 2.792-.014.9721-.51 2.2221.102 2.2221 1.284v.06c.022-.014.046-.026.068-.04Z"/></svg>',Cm='<path fill="currentColor" d="M9.3333 14.125 5.875 10.6667V14.125H9.3333Zm4.7917-3.4583-3.4583 3.4583H14.125V10.6667ZM10.6667 5.875 14.125 9.3333V5.875H10.6667ZM5.875 9.3333 9.3333 5.875H5.875V9.3333Zm9.2083 5.475c1.2333-1.3 1.9083-3.0333 1.9083-4.825-.0083-3.325-2.35-6.1833-5.6083-6.8417C8.125 2.4833 4.85 4.2 3.55 7.2583c-1.3 3.0583-.275 6.6083 2.4583 8.5 2.725 1.8917 6.4167 1.6 8.8167-.6917.0917-.0833.175-.175.2583-.2583Zm1.2583.5917 2.575 2.575c-.3167.3167-.625.625-.9417.9417-.8583-.8583-1.7167-1.7167-2.575-2.575-3.4083 2.9-8.4917 2.5917-11.525-.6917S.9417 7.275 4.1083 4.1083C7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Z"/>',j0=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${Cm}</svg>`,Am='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M15.0833 14.8083c1.2333-1.3 1.9083-3.0333 1.9083-4.825-.0083-3.325-2.35-6.1833-5.6083-6.8417C8.125 2.4833 4.85 4.2 3.55 7.2583c-1.3 3.0583-.275 6.6083 2.4583 8.5 2.725 1.8917 6.4167 1.6 8.8167-.6917.0917-.0833.175-.175.2583-.2583Zm1.2583.5917 2.575 2.575c-.3167.3167-.625.625-.9417.9417-.8583-.8583-1.7167-1.7167-2.575-2.575-3.4083 2.9-8.4917 2.5917-11.525-.6917C.8417 12.3667.9417 7.275 4.1083 4.1083 7.2667.9417 12.3667.8417 15.65 3.875s3.5917 8.1167.6917 11.525Zm-3.55-2.6083V7.2083H7.2083v5.5833h5.5833ZM5.875 5.875h8.25v8.25H5.875V5.875Z"/></svg>',V0='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09M160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48"/></svg>',G0='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="2" y="2" width="8.2" height="5" rx="1.2" fill="currentColor"/><rect x="2" y="8.5" width="8.2" height="9.5" rx="1.2" fill="currentColor"/><rect x="11.7" y="2" width="6.3" height="10" rx="1.2" fill="currentColor"/><rect x="11.7" y="13.5" width="6.3" height="4.5" rx="1.2" fill="currentColor"/></svg>',H0='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M1.5 7h17v6h-17ZM4.25 7h1v2.5h-1ZM7.5 7h.75v1.5H7.5ZM10.25 7h1v2.5h-1ZM13.5 7h.75v1.5H13.5ZM16.25 7h1v2.5h-1Z"/></svg>',U0='<path fill="currentColor" fill-rule="evenodd" d="M2.25 15h15.5v3.4H2.25Zm1.5 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Zm2.95 0h.7v1.45h-.7Z"/>',oe="var(--el-color-primary, var(--ml-ui-accent, #409eff))";function Mi(s){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${s}${U0}</svg>`}const W0=Mi(`<rect fill="${oe}" x="2.9" y="2.5" width="1.25" height="8.8" rx=".2"/><rect fill="${oe}" x="15.85" y="2.5" width="1.25" height="8.8" rx=".2"/><path fill="${oe}" d="M4.4 6.9 7.2 5.05v3.7Z"/><path fill="${oe}" d="M15.6 6.9 12.8 5.05v3.7Z"/><rect fill="${oe}" x="6.7" y="6.25" width="6.6" height="1.3"/>`),$0=Mi(`<rect fill="${oe}" x="2.9" y="2.5" width="1.25" height="8.8" rx=".2"/><rect fill="${oe}" x="15.85" y="2.5" width="1.25" height="8.8" rx=".2"/><path fill="${oe}" d="M4.4 6.9 7.2 5.05v3.7Z"/><path fill="${oe}" d="M15.6 6.9 12.8 5.05v3.7Z"/><rect fill="${oe}" x="6.7" y="6.25" width="6.6" height="1.3"/><circle fill="currentColor" cx="10" cy="3.45" r="2.2"/><text x="10" y="4.42" text-anchor="middle" font-size="3.15" font-weight="700" font-family="Arial,Helvetica,sans-serif" fill="${oe}">n</text>`),K0=Mi(`<g fill="none" stroke="${oe}" stroke-linejoin="miter"><path stroke-width="1.55" stroke-linecap="butt" d="M16.9 12.25H4.9L11.6 3.03"/><path stroke-width="1.7" stroke-linecap="butt" d="M11.05 12.25A6.15 6.15 0 0 0 8.51 7.27"/></g><path fill="${oe}" d="M11.05 12.25 9.85 10.55h2.4Z"/><path fill="${oe}" d="M8.51 7.27 10.46 7.39 9.23 9.09Z"/>`),Y0=Mi(`<path fill="${oe}" d="M5 12V4.2A7.8 7.8 0 0 1 12.8 12Z"/>`),Z0=Mi(`<g fill="none" stroke-linejoin="miter"><path stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" d="M4.9 11.6A8.3 8.3 0 0 1 13.2 3.3"/><path stroke="currentColor" stroke-width="1.35" stroke-linecap="square" d="M10.4 11.6H13.2V8.8"/><path stroke="currentColor" stroke-width="1.35" stroke-linecap="butt" d="M13.2 11.6v1.7"/><rect stroke="${oe}" stroke-width="1.15" x="3.65" y="10.35" width="2.5" height="2.5"/><rect stroke="${oe}" stroke-width="1.15" x="11.95" y="2.05" width="2.5" height="2.5"/></g>`),X0=Mi(`<circle fill="none" stroke="${oe}" stroke-width="1.4" cx="9.1" cy="7.3" r="4.7"/><circle fill="${oe}" cx="9.1" cy="7.3" r="1.05"/><path fill="none" stroke="${oe}" stroke-width="1.35" stroke-linecap="round" d="M9.1 7.3 13.35 3.7"/><path fill="${oe}" d="M13.35 3.7 11.15 4.2 12.55 5.7Z"/>`),_m=Mi(`<g fill="none" stroke="${oe}" stroke-linecap="round" stroke-linejoin="round"><path stroke-width="1.4" d="M4 4.8v7.4h7.6"/><path stroke-width="1.2" stroke-dasharray="1.7 1.2" d="M4 6.9h7M11 12.2V6.9"/></g><path fill="${oe}" d="M4 2.5 2.45 4.8h3.1ZM13.8 12.2 11.5 10.7v3Z"/><circle fill="${oe}" cx="11" cy="6.9" r="1.3"/>`),pc='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true"><path d="M 459.5 0 L 475.5 0 L 476.5 1 L 479.5 1 L 485.5 3 Q 487.8 6.2 492.5 7 L 501 14.5 L 505 19.5 L 511 32.5 Q 510.2 35.8 512 36.5 L 512 52.5 L 511 53.5 L 511 56.5 L 509 62.5 L 506 68.5 L 493 89.5 L 483 108.5 L 478 115.5 L 472 127.5 L 467 134.5 L 457 153.5 L 452 160.5 L 442 179.5 L 437 186.5 L 431 198.5 L 440 213.5 L 440 215.5 L 443 220.5 L 447 232.5 L 448 240.5 L 449 241.5 L 449 245.5 L 450 246.5 L 450 254.5 L 451 255.5 L 451 274.5 L 450 275.5 L 450 283.5 L 449 284.5 L 449 289.5 L 448 290.5 L 448 294.5 L 447 295.5 L 446 302.5 L 442 314.5 L 438 322.5 L 438 324.5 L 428 345.5 L 428 347.5 L 425 352.5 L 422 361.5 L 418 368.5 L 418 370.5 L 415 375.5 L 412 384.5 L 408 391.5 L 408 393.5 L 405 398.5 L 402 407.5 L 398 414.5 L 395 423.5 L 391 430.5 L 391 432.5 L 381 453.5 L 381 455.5 L 378 460.5 L 375 469.5 L 371 476.5 L 368 485.5 L 361.5 497 L 353.5 501 L 348.5 501 L 347.5 500 L 344.5 500 L 329.5 495 L 326.5 493 L 321.5 492 L 318.5 490 L 303.5 485 L 289.5 478 L 287.5 478 L 282 473.5 L 279 467.5 L 279 459.5 L 280 458.5 L 280 455.5 L 281 454.5 L 281 451.5 L 282 450.5 L 283 442.5 L 284 441.5 L 286 431.5 L 285.5 431 L 281.5 435 L 259.5 455 L 255.5 457 L 246.5 457 L 223.5 444 L 189.5 421 L 155.5 394 L 133 373.5 L 130 367.5 L 130 359.5 L 134 352.5 L 223 233.5 L 242 206.5 L 254.5 192 L 271.5 177 L 285.5 168 L 299.5 161 L 314.5 156 L 317.5 156 L 318.5 155 L 330.5 154 L 331.5 153 L 352.5 153 L 354 151.5 L 356 146.5 L 372 120.5 L 374 115.5 L 387 94.5 L 397 75.5 L 402 68.5 L 408 56.5 L 413 49.5 L 423 30.5 L 431 17.5 L 439.5 9 L 449.5 3 L 455.5 1 L 458.5 1 L 459.5 0 Z M 466 30 L 459 33 L 454 39 L 448 51 L 443 58 L 433 77 L 428 84 L 414 110 L 409 117 L 407 122 L 405 124 L 403 129 L 401 131 L 399 136 L 384 161 L 386 162 L 388 162 L 396 166 L 409 175 L 422 153 L 424 148 L 429 141 L 431 136 L 433 134 L 435 129 L 437 127 L 439 122 L 444 115 L 454 96 L 459 89 L 469 70 L 474 63 L 482 47 L 482 43 L 480 38 L 475 32 L 469 30 L 466 30 Z M 333 183 L 332 184 L 328 184 L 327 185 L 324 185 L 323 186 L 320 186 L 314 188 L 300 195 L 286 205 L 271 220 L 267 225 L 266 228 L 410 310 L 412 307 L 412 305 L 416 296 L 418 285 L 419 284 L 419 279 L 420 278 L 420 252 L 419 251 L 419 246 L 417 241 L 417 238 L 411 224 L 402 211 L 389 198 L 371 188 L 362 185 L 352 184 L 351 183 L 333 183 Z M 248 252 L 195 322 L 193 326 L 172 353 L 167 361 L 194 384 L 228 409 L 249 422 L 256 417 L 303 372 L 310 368 L 318 368 L 322 370 L 328 378 Q 327 381 329 382 L 329 386 L 326 395 L 326 399 L 323 408 L 323 411 L 322 412 L 322 416 L 319 425 L 319 428 L 318 429 L 318 432 L 317 433 L 317 437 L 314 446 L 314 449 L 313 450 L 313 453 L 312 454 L 316 456 L 318 456 L 331 462 L 343 466 L 351 448 L 351 446 L 354 441 L 354 439 L 357 434 L 357 432 L 364 418 L 364 416 L 367 411 L 367 409 L 370 404 L 370 402 L 377 388 L 377 386 L 380 381 L 380 379 L 383 374 L 383 372 L 387 365 L 390 356 L 393 351 L 393 349 L 396 344 L 397 339 L 375 326 L 373 324 L 368 322 L 366 320 L 361 318 L 354 313 L 349 311 L 347 309 L 342 307 L 340 305 L 335 303 L 321 294 L 316 292 L 314 290 L 309 288 L 307 286 L 302 284 L 295 279 L 276 269 L 248 252 Z "/><path d="M 170.5 100 L 179.5 100 Q 185 102 188 106.5 L 190 110.5 L 190 134.5 L 184.5 142 L 177.5 145 L 171.5 145 L 166.5 143 L 162 138.5 L 159 129.5 L 159 115.5 L 160 114.5 Q 159.2 109.7 161 107.5 L 166.5 102 L 170.5 100 Z "/><path d="M 131.5 140 L 151.5 140 L 156.5 142 L 162 147.5 L 164 151.5 L 164 159.5 L 163 162.5 L 158.5 168 L 152.5 171 L 130.5 171 L 124.5 168 L 122 165.5 L 119 159.5 L 119 151.5 Q 121.3 145.3 126.5 142 L 131.5 140 Z "/><path d="M 197.5 140 L 218.5 140 L 223.5 142 L 228 146.5 L 231 152.5 L 231 158.5 L 229 163.5 L 223.5 169 L 218.5 171 L 197.5 171 L 192.5 169 L 188 164.5 L 186 160.5 L 185 153.5 L 188 146.5 L 191.5 143 L 197.5 140 Z "/><path d="M 171.5 166 L 177.5 166 L 180.5 167 L 187 171.5 L 190 176.5 L 190 200.5 Q 188 206 183.5 209 L 179.5 211 L 173.5 212 L 167.5 210 L 161 203.5 Q 159.2 201.3 160 196.5 L 159 195.5 L 159 181.5 L 162 172.5 L 165.5 169 L 171.5 166 Z "/><path d="M 50.5 223 L 60.5 223 L 68 228.5 L 71 234.5 L 71 256.5 Q 69.1 262.6 64.5 266 L 59.5 268 L 51.5 268 Q 45.3 265.7 42 260.5 L 40 255.5 L 40 235.5 L 42 230.5 L 48.5 224 L 50.5 223 Z "/><path d="M 13.5 263 L 30.5 263 Q 31.5 265 35.5 264 L 43 270.5 L 45 274.5 L 45 282.5 Q 43.1 288.6 38.5 292 L 33.5 294 L 10.5 294 Q 5 292 2 287.5 L 0 283.5 L 0 274.5 Q 2.3 268.3 7.5 265 L 13.5 263 Z "/><path d="M 80.5 263 L 97.5 263 L 103.5 265 L 108 268.5 L 111 273.5 L 112 279.5 L 109 287.5 L 104.5 292 L 100.5 294 L 77.5 294 Q 71.3 291.7 68 286.5 L 66 281.5 L 66 276.5 L 69 269.5 L 72.5 266 L 80.5 263 Z "/><path d="M 54.5 289 L 61.5 290 L 69 296.5 L 71 301.5 L 71 322.5 L 69 327.5 L 63.5 333 L 58.5 335 L 53.5 335 L 46.5 332 L 43 328.5 L 40 321.5 L 40 302.5 Q 41.8 301.8 41 298.5 L 46.5 292 L 54.5 289 Z "/><path d="M 98.5 400 L 107.5 402 L 113 407.5 L 115 411.5 L 115 434.5 Q 112.7 440.7 107.5 444 L 101.5 446 L 96.5 446 L 90.5 443 L 87 439.5 L 84 430.5 L 84 415.5 L 85 414.5 Q 84.3 410.3 86 408.5 L 92.5 402 L 98.5 400 Z "/><path d="M 55.5 441 L 77.5 441 L 80.5 442 L 86 446.5 L 89 451.5 L 89 460.5 Q 86.7 466.7 81.5 470 L 76.5 472 L 56.5 472 L 51.5 470 L 46 464.5 L 44 460.5 L 44 452.5 L 45 449.5 L 49.5 444 L 55.5 441 Z "/><path d="M 121.5 441 L 144.5 441 Q 150.7 443.3 154 448.5 L 156 453.5 L 156 458.5 L 154 464.5 L 148.5 470 L 146.5 470 L 143.5 472 L 122.5 472 L 116.5 469 L 113 465.5 L 111 461.5 L 110 455.5 Q 112 454.5 111 450.5 L 117.5 443 L 121.5 441 Z "/><path d="M 96.5 467 L 103.5 467 L 106.5 468 L 113 473.5 L 115 478.5 L 115 501.5 Q 113 507 108.5 510 L 104.5 512 L 95.5 512 Q 89.3 509.7 86 504.5 Q 84.3 502.7 85 498.5 L 84 497.5 L 84 482.5 L 87 473.5 L 91.5 469 L 96.5 467 Z "/></svg>',q0=pc,J0='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7" fill="currentColor"/><rect x="14" y="14" width="7" height="7" fill="none" stroke="currentColor" stroke-width="1"/><path d="M12 4a8 8 0 0 1 7.25 7.25" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><path d="M20.75 10 L17.25 10 L19 12.5 Z" fill="currentColor"/><path d="M12 20a8 8 0 0 1-8-8" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><path d="M6 14 L2.5 14 L4 11 Z" fill="currentColor"/></svg>',Q0='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="2.5" y="2.5" width="15" height="15" rx="1.5" fill="#fff" stroke="currentColor" stroke-width="1.2"/><g fill="none" stroke="#000" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"><path d="M5.5 6.5h4.5M5.5 10h7M5.5 13.5h9"/><path d="M13.25 6.5v4.25h-3.25"/></g></svg>',eC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" style="fill:none"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12.4 3.25H5.5A2.25 2.25 0 0 0 3.25 5.5v9A2.25 2.25 0 0 0 5.5 16.75h9A2.25 2.25 0 0 0 16.75 14.5V8.6"/><g transform="rotate(45 13.2 6.7)"><rect x="11.7" y="1.55" width="3" height="7.45" rx="1.45"/><path d="M11.7 3.2h3"/><path d="M11.7 9 13.2 12.15 14.7 9"/><rect x="12.8" y="7.05" width="0.8" height="1.2" rx="0.4"/></g></g></svg>',tC='<path fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="butt" stroke-linejoin="miter" d="M2.6 6.8v8.5h5.2l2.2 2.4 2.2-2.4h5.2"/>',Pm='<g fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" transform="rotate(46 14.8 9)"><rect x="13.65" y="4.7" width="2.3" height="5.6" rx="1.05"/><path d="M13.65 10.3 14.8 12.9 15.95 10.3"/></g>';function cn(s){return`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${tC}${s}</svg>`}const Em=cn('<path fill="currentColor" d="M6.4 12.2c-1.85 0-3.3-1.25-3.3-2.85 0-1.35.95-2.5 2.3-2.8.45-1.7 1.95-2.85 3.7-2.85 1.25 0 2.35.55 3.05 1.45.55-.7 1.45-1.15 2.5-1.15 1.85 0 3.25 1.3 3.25 2.95 0 .3-.05.55-.1.8 1.2.4 2.05 1.4 2.05 2.65 0 1.55-1.5 2.8-3.4 2.8H6.4Z"/>'),Lm=cn(`<rect fill="none" stroke="currentColor" stroke-width="1.35" x="5" y="2.8" width="8.2" height="7.2"/><rect fill="${oe}" x="4.2" y="2" width="2" height="2"/><rect fill="${oe}" x="12.2" y="9" width="2" height="2"/>${Pm}`),Tm=cn(`<ellipse fill="none" stroke="currentColor" stroke-width="1.35" cx="9" cy="6.6" rx="4" ry="3.6"/><rect fill="${oe}" x="8" y="2.1" width="2" height="2"/><rect fill="${oe}" x="4" y="5.6" width="2" height="2"/>${Pm}`),iC=cn('<path fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" d="M4.4 12.6 10.2 7"/><rect fill="currentColor" x="10.2" y="1.2" width="7.8" height="5.8" rx=".35"/>'),nC=cn('<path fill="currentColor" fill-rule="evenodd" d="M10 2.2 15.3 13.1h-2.2l-1.05-2.95H7.95L6.9 13.1H4.7L10 2.2Zm0 3.4-1.15 3.2h2.3L10 5.6Z"/>'),sC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" d="M4 16 16 4"/><circle cx="4" cy="16" r="1.6" fill="currentColor"/><circle cx="16" cy="4" r="1.6" fill="currentColor"/></svg>',oC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3" y="5.5" width="14" height="9" rx="1.5" fill="currentColor" fill-opacity="0.28" stroke="currentColor" stroke-width="1.5"/></svg>',rC=cn('<g transform="rotate(-40 10 7.6)" fill="currentColor"><path d="M3.5 6.75h9V5.15L16.7 7.6 12.5 10.05V8.45h-9Z"/></g>'),aC=hc("M624 475.968V640h144a128 128 0 0 1 128 128H128a128 128 0 0 1 128-128h144V475.968a192 192 0 1 1 224 0M128 896v-64h768v64z"),Im=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3.5" y="3" width="13" height="14" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.5"/><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M3.5 6.5h13"/><path fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" d="M6.5 9.5h7M6.5 12h7M6.5 14.5h3.2"/><g fill="none" stroke="${oe}" stroke-width="1.7" stroke-linecap="round"><circle cx="14.5" cy="14.7" r="4.2"/><path d="M17.5 17.7 19.5 19.7"/></g></svg>`,lC=Im,cC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M4.5 2h6.4L15.5 6.6V16.5A1.5 1.5 0 0 1 14 18H4.5A1.5 1.5 0 0 1 3 16.5V3.5A1.5 1.5 0 0 1 4.5 2z"/><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M10.9 2v4.6h4.6"/><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M10 5.8v6M7.2 9.6 10 12.5l2.8-2.9"/></svg>',dC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776"/></svg>',Mm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20" fill="none" aria-hidden="true"><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M15.5 2H9.1L4.5 6.6V16.5A1.5 1.5 0 0 0 6 18h9.5A1.5 1.5 0 0 0 17 16.5V3.5A1.5 1.5 0 0 0 15.5 2z"/><path stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round" d="M9.1 2v4.6H4.5"/><path stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M10 14.2V8M7.2 10.4 10 7.5l2.8 2.9"/></svg>',uC=pc,Om=hc("M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"),Dm=hc("M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176","M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"),hC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="m18.5 10 4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301 14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725 16.676 16.676 0 0 1 3.524 17.273l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877 16.165 16.165 0 0 0 11.91 6.001L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"/></svg>',pC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><circle cx="10" cy="10" r="4" fill="currentColor"/><path fill="none" stroke="currentColor" stroke-width="1.5" d="M10 2v2M10 16v2M2 10h2M16 10h2M4.2 4.2l1.4 1.4M14.4 14.4l1.4 1.4M4.2 15.8l1.4-1.4M14.4 5.6l1.4-1.4"/></svg>',mC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10 3a7 7 0 1 0 0 14 9 9 0 0 1 0-14Z"/></svg>',fC=Mm,yC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M4 3h12v14H4V3Zm2 2v2h8V5H6Zm0 4v6h8V9H6Z"/></svg>',gC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M5 3h7l3 3v11H5V3Zm6 0v3h3"/><text x="6" y="16" fill="currentColor" font-size="5" font-family="Arial">PDF</text></svg>',bC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-width="1.5" d="M4 4h12v12H4z"/><circle cx="8" cy="10" r="2" fill="currentColor"/></svg>',wC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3" y="3" width="14" height="14" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="15" y="5" width="1.5" height="10" rx=".5" fill="currentColor"/></svg>',vC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3" y="3" width="14" height="3" rx=".5" fill="currentColor"/><rect x="5" y="8" width="10" height="9" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',xC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="5" y="3" width="10" height="9" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="3" y="14" width="14" height="3" rx=".5" fill="currentColor"/></svg>',kC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="3" y="3" width="3" height="14" rx=".5" fill="currentColor"/><rect x="8" y="5" width="9" height="10" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',SC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><rect x="5" y="5" width="9" height="10" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="14" y="3" width="3" height="14" rx=".5" fill="currentColor"/></svg>',CC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" d="M5 5l10 10M15 5 5 15"/></svg>',AC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><circle cx="10" cy="4" r="1.5" fill="currentColor"/><circle cx="10" cy="10" r="1.5" fill="currentColor"/><circle cx="10" cy="16" r="1.5" fill="currentColor"/></svg>',Nm='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 6.5 5.5 11h9L10 6.5Z"/></svg>',Bm='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M10 13.5 14.5 9h-9L10 13.5Z"/></svg>',mc='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M13.5 10 9 14.5V5.5L13.5 10Z"/></svg>',fc='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true"><path fill="currentColor" d="M6.5 10 11 14.5V5.5L6.5 10Z"/></svg>',_C='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10 2.6 18 9.8h-2.1V17h-4.4v-4.4H8.5V17H4.1V9.8H2L10 2.6Zm0 1.8L5.3 9.8V15.8h2V11.4h5.4v4.4h2V9.8L10 4.4Z"/></svg>',PC=`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20">${Cm}<path fill="${oe}" d="M14.85 0.85 15.95 4.05 19.15 5.15 15.95 6.25 14.85 9.45 13.75 6.25 10.55 5.15 13.75 4.05Z"/><path fill="${oe}" d="M17.55 8.35 18.15 10.15 19.95 10.75 18.15 11.35 17.55 13.15 16.95 11.35 15.15 10.75 16.95 10.15Z"/></svg>`,EC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M8.08 2.1h3.84l.32 1.52a6.4 6.4 0 0 1 1.36.78l1.48-.64 1.92 1.92-.64 1.48c.3.42.54.88.78 1.36l1.52.32v3.84l-1.52.32a6.4 6.4 0 0 1-.78 1.36l.64 1.48-1.92 1.92-1.48-.64a6.4 6.4 0 0 1-1.36.78l-.32 1.52H8.08l-.32-1.52a6.4 6.4 0 0 1-1.36-.78l-1.48.64-1.92-1.92.64-1.48a6.4 6.4 0 0 1-.78-1.36L1.34 11.92V8.08l1.52-.32c.24-.48.48-.94.78-1.36l-.64-1.48 1.92-1.92 1.48.64c.42-.3.88-.54 1.36-.78L8.08 2.1ZM10 7.2A2.8 2.8 0 1 0 10 12.8 2.8 2.8 0 0 0 10 7.2Z"/></svg>',LC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-width="1.5" d="M10 2.5v6M7 5.5h6"/><circle cx="10" cy="14.5" r="3.2" fill="none" stroke="currentColor" stroke-width="1.5"/><circle cx="10" cy="14.5" r="1.1" fill="currentColor"/></svg>',TC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.09 3.53 16.09 6.97 10.09 10.29 4.18 7 10.09 3.56M10.09 2.4 2.17 7 3.31 7.65 10.09 11.45 17 7.62 18.17 7 10.08 2.37 10.09 2.4Z"/><path fill="currentColor" d="M10.25 14.83 18.17 10.22 17 9.57 10.22 13.57 3.32 9.59 2.17 10.22 10.25 14.83Z"/><path fill="currentColor" d="M10.25 17.63 18.17 13 17 12.37 10.22 16.37 3.32 12.38 2.17 13 10.25 17.63Z"/></svg>',IC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" d="M10.09 5.15 16.09 8.59 10.09 11.91 4.18 8.59 10.09 5.15ZM10.09 4 2.17 8.61 3.31 9.25 10.09 13.06 17 9.24 18.16 8.61 10.08 4 10.09 4Z"/><path fill="currentColor" d="M10.25 16.46 18.17 11.85 17 11.2 10.22 15.2 3.32 11.21 2.17 11.85 10.25 16.46Z"/><path fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" d="M3.5 3.5 16.5 16.5"/></svg>',MC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M2.25 2.25h4.878v4.878H2.25V2.25Zm.978.978v2.924h2.924V3.228H3.228Z"/><path fill="currentColor" d="M5.175 20.773V7.128H4.204V21.75H21.75V4.204H7.128v.971H20.773v15.598H5.175Z"/></svg>',OC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M3 2H2v16h16v-1H8v-5H3V2zm0 11v4h4v-4H3z"/></svg>',DC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M16.98 11L18.5 11L18.5 10L16.98 10C16.86 8.13 16.05 6.44 14.8 5.2L16.88 2.83L16.12 2.17L14.05 4.54C12.79 3.57 11.21 3 9.5 3C5.36 3 2 6.36 2 10.5C2 14.64 5.36 18 9.5 18C13.47 18 16.73 14.91 16.98 11ZM15.98 10C15.86 8.43 15.18 7.01 14.14 5.95L10.6 10L15.98 10ZM13.39 5.29L8.4 11L15.98 11C15.73 14.36 12.92 17 9.5 17C5.91 17 3 14.09 3 10.5C3 6.91 5.91 4 9.5 4C10.96 4 12.31 4.48 13.39 5.29Z"/></svg>',NC='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="#e75958" d="M22 12H12l5 8.66A10 10 0 0 0 22 12Z"/><path fill="#814dff" d="M17 20.66 12 12 7 20.66A10 10 0 0 0 17 20.66Z"/><path fill="#13b0ce" d="M7 20.66 12 12H2A10 10 0 0 0 7 20.66Z"/><path fill="#4ecd83" d="M2 12H12L7 3.34A10 10 0 0 0 2 12Z"/><path fill="#ffc33f" d="M7 3.34 12 12l5-8.66A10 10 0 0 0 7 3.34Z"/><path fill="#ff9543" d="M17 3.34 12 12H22A10 10 0 0 0 17 3.34Z"/></svg>',BC=Am,FC=_m,zC=Em,RC=Lm,jC=Tm,VC=Om,GC=Dm,yc='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20 20"><circle cx="4" cy="10" r="1.6" fill="currentColor"/><circle cx="10" cy="10" r="1.6" fill="currentColor"/><circle cx="16" cy="10" r="1.6" fill="currentColor"/></svg>',Fm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H11"/></svg>',zm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 14 5-5-5-5"/><path d="M20 9H9.5a5.5 5.5 0 0 0 0 11H13"/></svg>',Rm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>',jm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none"><text x="2" y="18" font-family="Georgia, Times New Roman, serif" font-size="16" font-weight="600" fill="currentColor">A</text><g stroke="#2dd4bf" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="M18 4v16"/><path d="M15.5 6.5 18 4l2.5 2.5"/><path d="M15.5 17.5 18 20l2.5-2.5"/></g></svg>',Vm='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>';function ft(s,e="ml-ex-ui-icon"){if(typeof s=="function")return s();if(s instanceof HTMLElement)return s.cloneNode(!0);const t=document.createElement("span");return t.className=e,t.innerHTML=s,t}const Gm="ml-entity-pick-cancel-styles",HC=`
523
523
  .ml-entity-pick-cancel {
524
524
  position: absolute;
525
525
  top: 48px;
@@ -2656,7 +2656,7 @@
2656
2656
  .${H}__group-body .${H}__item {
2657
2657
  padding-left: 20px;
2658
2658
  }
2659
- `,document.head.appendChild(e)}class OE{constructor(){this._center=new Ca,this._defaultStore=this._center,this._showDefaultUi=!0,this._isCustom=!1}install(e,t={}){var i;this._docManager=e,this._host=t.host,this._showDefaultUi=t.showDefaultUi!==!1,this._placement=t.placement,t.enableBridge!==!1?((i=this._bridge)==null||i.uninstall(),this._bridge=new Gv(e,()=>this.center),this._bridge.install()):this._center.setActiveSession(e.activeSessionId),!this._isCustom&&this._showDefaultUi&&this.mountDefaultUi()}get placement(){return this._placement}setPlacement(e){var t;this._placement=e,(t=this._defaultUi)==null||t.setPlacement(e)}get center(){return this._center}get isCustom(){return this._isCustom}setCenter(e){var t,i;if(e==null){this.restoreDefault();return}this._center!==e&&(this.disposeDefaultUi(),this._isCustom?(i=(t=this._center).dispose)==null||i.call(t):this._defaultStore.dispose(),this._center=e,this._isCustom=!0,this._docManager&&this._center.setActiveSession(this._docManager.activeSessionId))}restoreDefault(){var e,t;if(!this._isCustom){this._showDefaultUi&&!this._defaultUi&&this.mountDefaultUi();return}(t=(e=this._center).dispose)==null||t.call(e),this._defaultStore=new Ca,this._center=this._defaultStore,this._isCustom=!1,this._docManager&&this._center.setActiveSession(this._docManager.activeSessionId),this._showDefaultUi&&this.mountDefaultUi()}resolveHost(){var t,i;if(this._host)return this._host;const e=(i=(t=this._docManager)==null?void 0:t.curView)==null?void 0:i.container;return e||document.body}mountDefaultUi(){this.disposeDefaultUi(),!(typeof document>"u")&&(this._defaultUi=new Wv(this._center,this.resolveHost(),{placement:this._placement}))}disposeDefaultUi(){var e;(e=this._defaultUi)==null||e.dispose(),this._defaultUi=void 0}dispose(){var e,t,i;(e=this._bridge)==null||e.uninstall(),this._bridge=void 0,this.disposeDefaultUi(),(i=(t=this._center).dispose)==null||i.call(t),this._defaultStore=new Ca,this._center=this._defaultStore,this._isCustom=!1,this._docManager=void 0,this._host=void 0,this._showDefaultUi=!0,this._placement=void 0}}const Wi=new OE;function DE(){return Wi.center}function NE(s){Wi.setCenter(s)}function BE(){return Wi.placement}function FE(s){Wi.setPlacement(s??void 0)}function Xv(s,e){Wi.install(s,e)}function qv(){Wi.dispose()}function zE(s){var r;const e=s.tables.blockTable,t=e.getAt(p.AcDbBlockTableRecord.PAPER_SPACE_NAME_PREFIX);if(t)return t.objectId;const i=(r=s.objects)==null?void 0:r.layout;if(!(i!=null&&i.newIterator))return;const n=e.modelSpace.objectId;let o;for(const a of i.newIterator()){const l=a.blockTableRecordId;if(!l||l===n)continue;const c=e.getIdAt(l);if(!(!c||!p.AcDbBlockTableRecord.isPaperSapceName(c.name))){if(a.tabSelected)return l;o||(o=l)}}return o}function RE(s){const e=s.tables.blockTable.modelSpace.objectId;if(s.tilemode){s.currentSpaceId!==e&&(s.currentSpaceId=e);return}const t=zE(s);t&&t!==s.currentSpaceId&&(s.currentSpaceId=t)}const jE="https://cdn.jsdelivr.net/gh/mlightcad/cad-data",VE="templates/acadiso.dxf",GE={ARC:["A"],CIRCLE:["C"],ELLIPSE:["EL"],ERASE:["E"],DIMLINEAR:["DLI"],DIMALIGNED:["DAL","DIMALI"],DIMRADIUS:["DRA","DIMRAD"],DIMDIAMETER:["DDI","DIMDIA"],DIMANGULAR:["DAN","DIMANG"],DIMARC:["DAR"],DIMORDINATE:["DOR"],DIMCONTINUE:["DCO"],DIMBASELINE:["DBA"],MEASUREDISTANCE:["DI","DIST"],MEASUREAREA:["AA","AREA"],MEASUREANGLE:["ANG"],"-HATCH":["-H"],IMAGEATTACH:["IAT"],"-INSERT":["I"],XATTACH:["XA"],LAYER:["LA"],"-LAYER":["-LA"],LINE:["L"],MLINE:["ML"],MTEXT:["T"],MOVE:["M"],OFFSET:["O"],COPY:["CO"],ROTATE:["RO"],OPEN:["OP"],PAN:["P"],POINT:["PO"],POLYGON:["POL"],PLINE:["PL"],RAY:["RA"],RECTANG:["REC"],REGEN:["RE"],SELECT:["SE"],SPLINE:["SPL"],XLINE:["XL"],ZOOM:["Z"],UNDO:["U"],REDO:["REDO"],READINGMODE:["RM"]},HE="modern";class k{constructor(e={}){var c;this._sessions=[],this._nextSessionId=1,this._openFileProfiler=new ka,this._workersReady=null,this._nextOverlayId=1,this._presetFontsForOpenPromise=null,this._lastPresetFontsForOpen=[],this.events={documentToBeOpened:new p.AcCmEventManager,documentCreated:new p.AcCmEventManager,documentActivated:new p.AcCmEventManager,documentToBeActivated:new p.AcCmEventManager,documentToBeDestroyed:new p.AcCmEventManager,documentDestroyed:new p.AcCmEventManager,workersReady:new p.AcCmEventManager},this._baseUrl=e.baseUrl??jE,Gu(e.docsBaseUrl??ao),this._commandAliasOverrides=this.normalizeCommandAliasConfig(e.commandAliases),this._openDocumentDefaults=e.openDocumentDefaults,this._disableExport=e.disableExport===!0,e.useMainThreadDraw?D.AcTrMTextRenderer.getInstance().setRenderMode("main"):D.AcTrMTextRenderer.getInstance().setRenderMode("worker"),$.FontManager.instance.setDefaultFonts(HE),$.FontManager.instance.lazyFontLoading=!0,$.FontManager.instance.awaitFontsBeforeDraw=!0,D.AcTrMTextRenderer.getInstance().setLazyFontLoading(!0),D.AcTrMTextRenderer.getInstance().setAwaitFontsBeforeDraw(!0);const t=new ba,i=((c=e.container)==null?void 0:c.getBoundingClientRect())??{width:300,height:150},n=()=>{var d;if(e.autoResize){const h=e.container;if(h)return{width:Math.max(1,Math.floor(h.clientWidth)),height:Math.max(1,Math.floor(h.clientHeight))};const f=(d=e.container)==null?void 0:d.getBoundingClientRect();return{width:Math.max(1,Math.floor((f==null?void 0:f.width)??i.width)),height:Math.max(1,Math.floor((f==null?void 0:f.height)??i.height))}}else return{width:e.width??i.width,height:e.height??i.height}},o=new Mn({container:e.container,calculateSizeCallback:n});this._mainView=o;const r=new Ea(o,t);this._activeSession=new ya(`doc-${this._nextSessionId++}`,r),this._sessions=[this._activeSession],Hn(this._activeSession.id),this._fontLoader=new dv,$.FontManager.instance.setFontLoader(this._fontLoader.fontLoader);const a=this.resolveFontsBaseUrl();this._fontLoader.baseUrl=a,$.FontManager.instance.baseUrl=a,D.AcTrMTextRenderer.getInstance().setFontUrl(a),this.installFontFileLoadTimeout(),p.acdbHostApplicationServices().workingDatabase=t.database,this._commandManager=new Me,this.registerCommands(),p.AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(d=>{const h=d.name.toUpperCase();(h===p.AcDbSystemVariables.CANNOSCALE||h===p.AcDbSystemVariables.ANNOALLVISIBLE)&&this.regen()}),this._pluginManager=new av(this.context,this._commandManager),this._dataSourceManager=new xv,this._dataSourceManager.register(new hv),this._dataSourceManager.register(new kv);const l=e.busyIndicatorHost??o.container;if(this._busyIndicatorHost=l,this._openFileProgress=new Qd(l),this._openFileProgress.setSceneBusyGate(()=>this.openProgressView.isProcessingEntities),this._openFileProgress.setOnHidden(()=>this.onOpenProgressHidden()),this._busyIndicator=new X1(l),Pp({showMessage:(d,h,f)=>this.editor.showMessage(d,h,f),showBusyIndicator:d=>this.showBusyIndicator(d),hideBusyIndicator:()=>this.hideBusyIndicator(),withBusyIndicator:(d,h)=>this.withBusyIndicator(d,h)}),this.events.documentToBeOpened.addEventListener(()=>{this._openFileProgress.reset()}),this.bindOpenProgress(t),this.events.documentCreated.dispatch({doc:t,mode:t.openMode}),e.preloadDefaultFonts&&this.loadDefaultFonts(),this._webworkerFileUrls=e.webworkerFileUrls,this.registerWorkers(e.webworkerFileUrls),e.checkWorkersOnInit&&this.areWorkersReady(),this.loadPlugins(e.plugins).catch(d=>{p.log.error("[AcApDocManager] Error loading plugins:",d)}),mv({enabled:e.builtinOpenFileDialog!==!1,getOpenDocumentDefaults:()=>this.resolveOpenDocumentDefaults()}),e.notificationCenter!==!1){const d=typeof e.notificationCenter=="object"?e.notificationCenter:{};Xv(this,{host:d.host,showDefaultUi:d.showDefaultUi!==!1,placement:d.placement,enableBridge:!0})}}static createInstance(e={}){return k._instance==null&&(k._instance=new k(e)),this._instance}static checkWebworkerReadiness(e){return vv(e)}static get instance(){if(!k._instance)throw new Error("AcApDocManager instance is not created yet!");return k._instance}static tryGetInstance(){return k._instance}async destroy(){var e,t;this._mainView.abortConversion(),(e=this._splitView)==null||e.abortConversion(),await this._pluginManager.unloadAllPlugins();for(const i of[...this._sessions])i.context.dispose(),i.doc.destroy(),i.viewState&&this.curView.disposeSessionState(i.viewState);this._sessions=[],(t=this._splitView)==null||t.dispose(),this._splitView=void 0,this._mainView.dispose(),yv(),qv(),D.AcTrMTextRenderer.resetInstance(),uE(),k._instance=void 0}get workersReady(){return this._workersReady}areWorkersReady(){return this._workersReady===!0?Promise.resolve(!0):(this._workersReadyCheckPromise||(this._workersReadyCheckPromise=vv(this._webworkerFileUrls).then(e=>(this._workersReady=e,this._workersReadyCheckPromise=void 0,this.events.workersReady.dispatch({ready:e}),e)).catch(()=>(this._workersReady=!1,this._workersReadyCheckPromise=void 0,this.events.workersReady.dispatch({ready:!1}),!1))),this._workersReadyCheckPromise)}get context(){return this._activeSession.context}get documents(){return this._sessions.map(e=>e.doc)}get documentCount(){return this._sessions.length}get activeSessionId(){return this._activeSession.id}document(e){var t;return(t=this._sessions[e])==null?void 0:t.doc}sessionFor(e){return this._sessions.find(t=>t.doc===e)}get curDocument(){return this.context.doc}get mdiActiveDocument(){return this._activeSession.doc}async activateDocument(e){const t=this.sessionFor(e);if(!t)return!1;if(t===this._activeSession)return!0;const i=t.context.view,n=this._activeSession.context.view;return this._openingSession&&i===n?!1:(await this._commandManager.cancelActive(),this.events.documentToBeActivated.dispatch({doc:e,mode:e.openMode}),i===n?(this.parkActiveSession(),this._activeSession=t,t.context.resume(),t.viewState&&(this.curView.restoreSessionState(t.viewState),t.viewState=void 0)):(this._activeSession!==this._openingSession&&this._activeSession.context.suspend(),this._activeSession=t,t.context.resume()),Hn(t.id),p.acdbHostApplicationServices().workingDatabase=e.database,this._pluginManager.setContext(t.context),this.curView.bindDrawDatabase(e.database),this.setActiveLayout(),this.curView.syncDisplaySysVars(e.database),this.events.documentActivated.dispatch({doc:e,mode:e.openMode}),this._openingSession||this.syncProgressOverlayHost(),!0)}get mainView(){return this._mainView}get splitView(){return this._splitView}ensureSplitView(e){return this._splitView?this._splitView.container!==e&&e.appendChild(this._splitView.container):this._splitView=new Mn({container:e,calculateSizeCallback:()=>({width:Math.max(1,e.clientWidth),height:Math.max(1,e.clientHeight)})}),this._splitView}attachSatelliteView(e,t){return this.ensureSplitView(e),!0}detachSatelliteView(){}get satelliteDocument(){var e;if(this._splitView)return(e=this._sessions.find(t=>t.context.view===this._splitView))==null?void 0:e.doc}async closeDocument(e){const t=e??this.curDocument,i=this.sessionFor(t);if(!i)return!1;await this._commandManager.cancelActive(),this.events.documentToBeDestroyed.dispatch({doc:t,mode:t.openMode});const n=i===this._activeSession,o=this._sessions.indexOf(i);if(this._sessions.length===1)return this.resetActiveSessionToUntitled(i),this.events.documentDestroyed.dispatch({doc:t,mode:t.openMode}),this.events.documentCreated.dispatch({doc:this.curDocument,mode:this.curDocument.openMode}),this.events.documentActivated.dispatch({doc:this.curDocument,mode:this.curDocument.openMode}),!0;n&&this.parkActiveSession(),i.context.dispose(),t.destroy(),this.clearSessionOverlays(i),tl(i.id);const r=i.context.view;if(i.viewState?(r.disposeSessionState(i.viewState),i.viewState=void 0):r.clear(),this._sessions.splice(o,1),this.events.documentDestroyed.dispatch({doc:t,mode:t.openMode}),n){const a=this._sessions[Math.min(o,this._sessions.length-1)];await this.activateDocument(a.doc)}return!0}get curView(){return this.context.view}get editor(){return this.context.view.editor}get commandManager(){return this._commandManager}get pluginManager(){return this._pluginManager}get dataSourceManager(){return this._dataSourceManager}get drawStyleSessionAccessory(){return Vy(this._mainView)}get baseUrl(){return this._baseUrl}get disableExport(){return this._disableExport}resolveColors(){const e=this.curDocument.database,t=e.tables.layerTable.getAt(e.clayer),i=this.resolveColorToRgb(t==null?void 0:t.color);let n=e.cecolor;return n!=null&&n.isByLayer&&(n=t==null?void 0:t.color),{entityColor:this.resolveColorToRgb(n),layerColor:i}}resolveColorToRgb(e){return!e||e.isByLayer||e.isByBlock||e.isByACI&&e.colorIndex===7?this.resolveAci7ForBackground():e.RGB??this.resolveAci7ForBackground()}resolveAci7ForBackground(){return this.curView.backgroundColor===16777215?0:16777215}get avaiableFonts(){return this._fontLoader.avaiableFonts}async getAvaiableFonts(){try{return await this._fontLoader.getAvaiableFonts()}catch{return Q.emit("failed-to-get-avaiable-fonts",{url:this._fontLoader.baseUrl}),[]}}async loadFonts(e){await this._fontLoader.load(e)}async loadDefaultFonts(e){e==null?await this._fontLoader.load([...$.FontManager.instance.getFontsToLoad()]):await this._fontLoader.load(e)}ensurePresetFontsForOpen(){if(this._presetFontsForOpenPromise)return this._presetFontsForOpenPromise;const e=[...$.FontManager.instance.getFontsToLoad()];if(this._lastPresetFontsForOpen=e,e.length===0)return this._presetFontsForOpenPromise=Promise.resolve(),this._presetFontsForOpenPromise;const t=D.AcTrMTextRenderer.getInstance(),i=t.getRenderMode()==="worker"?"worker":"main",n=3e4,o=i==="worker"?t.loadFonts(e,{scope:"all"}).then(()=>{}):$.FontManager.instance.requestFonts(e).then(()=>{});return this._presetFontsForOpenPromise=new Promise(r=>{const a=setTimeout(()=>{r()},n);o.then(()=>{clearTimeout(a),r()},()=>{clearTimeout(a),r()})}),this._presetFontsForOpenPromise}async awaitPresetFontsReady(){await this.ensurePresetFontsForOpen()}get lastPresetFontsForOpen(){return this._lastPresetFontsForOpen}async openUrl(e,t){t=this.setOptions(t);const i=await this.ensureOpenSession();this.beginOpenProgress(),this.onBeforeOpenDocument(t,!i);try{await this._openFileProgress.beginOpen(this.context.doc.database);const n=await this.context.doc.openUri(e,t);return this.onAfterOpenDocument(n,t),!n&&i&&await this.closeFailedOpenSession(),n}catch(n){throw this._openFileProfiler.cancel(),i&&await this.closeFailedOpenSession(),n}}async openDocument(e,t,i,n){i=this.setOptions(i);const o=await this.ensureOpenSession(n);this.beginOpenProgress(),this.onBeforeOpenDocument(i,!o);try{await this._openFileProgress.beginOpen(this.context.doc.database);const r=await this.context.doc.openDocument(e,t,i);return this.onAfterOpenDocument(r,i),!r&&o&&await this.closeFailedOpenSession(),r}catch(r){throw this._openFileProfiler.cancel(),o&&await this.closeFailedOpenSession(),r}}async loadOverlay(e,t,i={}){var l;const{targetView:n,...o}=i,r=new p.AcDbDatabase,a=(l=e.split(".").pop())==null?void 0:l.toLocaleLowerCase();return await Fd(r,async()=>{await r.read(t,{readOnly:!0,...o},a==="dwg"?p.AcDbFileType.DWG:p.AcDbFileType.DXF)}),this.registerOverlayDatabase(r,{targetView:n})}async registerOverlayDatabase(e,t){const i=(t==null?void 0:t.targetView)??this.curView,n=await i.addOverlayEntities(e),o=`overlay-${this._nextOverlayId++}`;return(this._sessions.find(a=>a.context.view===i)??this._activeSession).overlays.set(o,{db:e,layout:n}),i.isDirty=!0,o}removeOverlay(e){for(const t of this._sessions){const i=t.overlays.get(e);if(!i)continue;return this.sessionCadScene(t).internalScene.remove(i.layout.internalObject),i.layout.clear(),t.overlays.delete(e),t.viewState||(t.context.view.isDirty=!0),!0}return!1}setOverlayVisible(e,t){for(const i of this._sessions){const n=i.overlays.get(e);if(n)return n.layout.visible=t,i.context.view.isDirty=!0,!0}return!1}clearOverlays(e){const t=e?this._sessions.filter(i=>i.context.view===e):this._sessions;for(const i of t)for(const n of[...i.overlays.keys()])this.removeOverlay(n)}getOverlayIds(e){if(!e)return Array.from(this._activeSession.overlays.keys());const t=this._sessions.find(i=>i.context.view===e);return t?Array.from(t.overlays.keys()):[]}get overlayIds(){return this.getOverlayIds()}setCompareDisplay(e,t){(t??this.curView).setCompareDisplay(e)}isReadingModeEnabled(e){return(e??this.curView).readingModeEnabled}setReadingMode(e,t){(t??this.curView).setReadingMode(e)}toggleReadingMode(e){(e??this.curView).toggleReadingMode()}setOverlayCompareDisplay(e,t,i){for(const n of this._sessions){const o=n.overlays.get(e);if(!o)continue;return(i??n.context.view??this.curView).setCompareDisplay(t,o.layout),!0}return!1}getOverlayLayout(e){for(const t of this._sessions){const i=t.overlays.get(e);if(i)return i.layout}}async newDocument(e){const i=`${this.baseUrl.endsWith("/")?this.baseUrl:`${this.baseUrl}/`}${VE}`,n=this.setOptions({...e,mode:U.Write}),o=await this.ensureOpenSession();this.beginOpenProgress(),this.onBeforeOpenDocument(n,!o),await this._openFileProgress.beginOpen(this.context.doc.database);const r=await this.context.doc.openUri(i,n);return r&&this.context.doc.resetNewDocumentIdentity(),this.onAfterOpenDocument(r,n),!r&&o&&await this.closeFailedOpenSession(),r}setOpenDocumentDefaults(e){this._openDocumentDefaults=e,fv({enabled:!0,getOpenDocumentDefaults:()=>this.resolveOpenDocumentDefaults()})}resolveOpenDocumentDefaults(){const e=this._openDocumentDefaults;return e==null?{minimumChunkSize:1e3}:typeof e=="function"?e():e}regen(){this.curView.clear(),this.context.doc.database.regen()}installFontFileLoadTimeout(){const t=$.FontManager.instance.loader;if(!t||t.__cadFontLoadTimeout)return;const i=t.loadAsync.bind(t),n=3e4;t.loadAsync=o=>new Promise((r,a)=>{const l=setTimeout(()=>{a(new Error(`Font load timed out after ${n}ms`))},n);i(o).then(c=>{clearTimeout(l),r(c)},c=>{clearTimeout(l),a(c)})}),t.__cadFontLoadTimeout=!0}resolveFontsBaseUrl(){return`${this._baseUrl.endsWith("/")?this._baseUrl:`${this._baseUrl}/`}fonts/`}lookupLocalCmd(e){return this._commandManager.lookupLocalCmd(e,this.curDocument.openMode)}lookupGlobalCmd(e){return this._commandManager.lookupGlobalCmd(e,this.curDocument.openMode)}searchCommandsByPrefix(e){return this._commandManager.searchCommandsByPrefix(e,this.curDocument.openMode)}registerCommands(){const e=this._commandManager,t=(n,o,r)=>{const a=GE[n.toUpperCase()]??[];e.addCommand(Me.SYSTEMT_COMMAND_GROUP_NAME,n,o,r,this.resolveCommandAliases(n,a))};t("about","about",new Gw),t("arc","arc",new gg),t("cachefont","cachefont",new Us),t("circle","circle",new Sg),t("close","close",new qw),this._disableExport||(t("bmpout","bmpout",new Wy),t("cdxf","cdxf",new Ky),t("jpgout","jpgout",new Yy),t("pngout","pngout",new Zy)),t("entout","entout",new Jy),t("ellipse","ellipse",new sb),t("erase","erase",new Nw),t("hideobjects","hideobjects",new Bw),t("dimlinear","dimlinear",new Xg),t("dimaligned","dimaligned",new Og),t("dimradius","dimradius",new eb),t("dimdiameter","dimdiameter",new Yg),t("dimangular","dimangular",new Ng),t("dimarc","dimarc",new zg),t("dimordinate","dimordinate",new Jg),t("dimcontinue","dimcontinue",new Wg),t("dimbaseline","dimbaseline",new $g),pw(t,{view:this._mainView,commandManager:this._commandManager}),t("-hatch","-hatch",new Zr),t("imageattach","imageattach",new ob),t("-insert","-insert",new ab),t("xattach","xattach",new Fb),t("-layer","-layer",new dg),t("laycur","laycur",new ig),t("laydel","laydel",new tg),t("layfrz","layfrz",new Fr),t("layiso","layiso",new zr),t("laylck","laylck",new ng),t("layon","layon",new sg),t("layoff","layoff",new Rr),t("laythw","laythw",new rg),t("layuniso","layuniso",new ag),t("layulk","layulk",new lg),t("layerp","layerp",new og),t("layerclose","layerclose",new cg),t("line","line",new ji),t("mline","mline",new cb),t("mtext","mtext",new db),t("copy","copy",new ha),t("move","move",new zw),t("offset","offset",new Gs),t("rotate","rotate",new ma),t("log","log",new Hw),t("objectscale","objectscale",new Xw),t("open","open",new Zw),t("pan","pan",new rv),t("point","point",new ub),t("polygon","polygon",new Jr),t("pline","pline",new fb),t("qnew","qnew",new Jw),t("ray","ray",new gb),t("rectang","rectang",new Qr),t("regen","regen",new Qw),t("revcloud","revcloud",new ea),Dw(t,{view:this._mainView,commandManager:this._commandManager}),t("select","select",new ev),t("sketch","sketch",new sa),t("spline","spline",new Ob),t("switchbg","switchbg",new iv),t("readingmode","readingmode",new nv),t("unisolateobjects","unisolateobjects",new Vw),t("xline","xline",new zb),t("undo","undo",new sv),t("redo","redo",new ov),t("zoom","zoom",new yi),p.AcDbSysVarManager.instance().getAllDescriptors().forEach(n=>{e.addCommand(Me.SYSTEMT_COMMAND_GROUP_NAME,n.name,n.name,new tv,this.resolveCommandAliases(n.name,[]))})}normalizeCommandAliasConfig(e){const t=new Map;return e&&Object.entries(e).forEach(([i,n])=>{const o=i.trim().toUpperCase();if(!o)return;const r=Array.isArray(n)?n:[n],a=new Set;r.forEach(l=>{const c=l.trim().toUpperCase();c&&c!==o&&a.add(c)}),t.set(o,[...a])}),t}resolveCommandAliases(e,t){const i=e.trim().toUpperCase(),n=this._commandAliasOverrides.get(i);if(n)return[...n];const o=new Set;return t.forEach(r=>{const a=r.trim().toUpperCase();a&&a!==i&&o.add(a)}),[...o]}sendStringToExecute(e){this.executeCommandString(e).catch(t=>{const i=t instanceof Error?t.message:String(t);this.editor.showMessage(i,"error"),p.log.error(`[AcApDocManager] Command failed: ${e}`,t)})}async executeCommandString(e){const t=this.splitCommandScript(e);if(!t.length)throw new Error("Command string is empty");const[i,...n]=t;this.editor.clearScriptInputs(),this.editor.enqueueScriptInputs(n),await this.executeNamedCommand(i,{preserveScriptInputs:!1})}async runScript(e){const t=Xd(e);for(this.editor.clearScriptInputs(),this.editor.enqueueScriptInputs(t);this.editor.hasScriptInputs();){const i=this.consumeNextScriptCommandName();if(i==null)break;if(lv(i)){this.editor.clearScriptInputs();break}await this.executeNamedCommand(i,{preserveScriptInputs:!0})}}async executeNamedCommand(e,t){const i=this.context.doc.openMode;let n=this._commandManager.lookupGlobalCmd(e)??this._commandManager.lookupLocalCmd(e,i);if(n||await this._pluginManager.loadByTrigger(e)&&(n=this._commandManager.lookupGlobalCmd(e)??this._commandManager.lookupLocalCmd(e,i)),!n)throw new Error(`Command '${e}' not found`);if(i<n.mode)throw new Error(`Command '${e}' requires mode '${U[n.mode]}' but document is in mode '${U[i]}'!`);await this._commandManager.cancelActive(),await this._commandManager.runActive(n,this.curView,async()=>{try{await n.trigger(this.context)}finally{t.preserveScriptInputs||this.editor.clearScriptInputs()}})}consumeNextScriptCommandName(){for(;this.editor.hasScriptInputs();){const e=this.editor.consumeScriptInput();if(e==null)return;const t=e.trim();if(t)return t}}splitCommandScript(e){const t=Xd(e);if(!t.length)return[];let i=0;for(;i<t.length&&!t[i].trim();)i++;return i>=t.length?[]:[t[i].trim(),...t.slice(i+1)]}setActiveLayout(e,t){const i=e??this.curView,n=t??this.curDocument.database;i.activeLayoutBtrId=n.currentSpaceId,i.modelSpaceBtrId=n.tables.blockTable.modelSpace.objectId}onBeforeOpenDocument(e,t=!0){this.events.documentToBeOpened.dispatch({doc:this.context.doc,mode:this.getDocumentEventMode(e)}),t&&(Si.instance.clearAll(),this.clearOverlays(),vl(),Jc(),yi.clearOriginalViews(),this.openProgressView.clear()),this.openProgressView.bindDrawDatabase(this.context.doc.database),this.openProgressView.progressiveRendering=(e==null?void 0:e.progressiveRendering)??!1,this._openFileProgress.setSeeThroughOverlay((e==null?void 0:e.progressiveRendering)??!1),this.openProgressView.convertInvisibleLayers=(e==null?void 0:e.convertInvisibleLayers)===!0,this.openProgressView.cooperativeYield=(e==null?void 0:e.cooperativeYield)!==!1;const i=this.openProgressView.cadScene;i&&(i.skipSpatialIndex=(e==null?void 0:e.skipSpatialIndex)===!0),this.ensurePresetFontsForOpen(),this._openFileProfiler.begin(this.context.doc.database)}onAfterOpenDocument(e,t){const i=!e&&this.hasRecoverablePartialContent();if(e||i){const n=this._openingSession??this._activeSession,o=n.context.view;n.doc.destroy();const r=n.doc,a=r.database;RE(a),this.setActiveLayout(o,a),o.syncDisplaySysVars(a),this.events.documentActivated.dispatch({doc:r,mode:this.getDocumentEventMode(t)});const l=a.tables.blockTable.modelSpace.objectId,c=a.currentSpaceId!==l,d=p.acdbHostApplicationServices().layoutManager.getActiveLayout(a),h=d==null?void 0:d.limits,f=this.resolveOpenViewMode(t);o.setOpenViewMode(f);const y=(t==null?void 0:t.progressiveRendering)??!1;let g=!1;const b=()=>{y&&o.beginProgressiveOpenFit(),o.zoomToFitDrawing(),o.requestOpenLineworkFrame()};if(c&&f===_t.Saved){const w=d==null?void 0:d.extents,S=kr({limits:h,viewportsBox:Ff(a,a.currentSpaceId),layoutExtents:w&&!w.isEmpty()?{min:{x:w.min.x,y:w.min.y},max:{x:w.max.x,y:w.max.y}}:void 0});S?(o.zoomTo(S.box),g=!0):b()}else if(!c&&f===_t.Saved){const w=o.width/Math.max(o.height,1),S=a.tables.viewportTable.getActiveVportBox(w);S?(o.zoomTo(S),g=!0):b()}else b();o.markLayoutAsInitialized(a.currentSpaceId),g&&yi.rememberOriginalView(o,a.currentSpaceId),t!=null&&t.convertAllLayouts&&o.ensureEntitiesConvertedForExport({includeInvisibleLayers:t.convertInvisibleLayers!==!1,includeLayouts:!0}).catch(w=>{p.log.error("[AcApDocManager] convertAllLayouts export convert failed",w)}),this._openFileProfiler.markReadCompleteAndScheduleReport(o)}else this._openFileProfiler.cancel(),this.openProgressView.endProgressiveOpenFit(),this.regen()}hasRecoverablePartialContent(){const e=(this._openingSession??this._activeSession).doc.database,t=e.tables.blockTable.modelSpace;return t?t.newIterator().count>0:!e.extents.isEmpty()}setOptions(e){return e==null?e={drawNoPlotLayers:!1,progressiveRendering:!1}:(this.stripObsoleteFontOpenOptions(e),this.stripDeprecatedWaitForTextGeometry(e),e.drawNoPlotLayers==null&&(e.drawNoPlotLayers=!1),e.progressiveRendering==null&&(e.progressiveRendering=!1)),e}stripDeprecatedWaitForTextGeometry(e){e.waitForTextGeometry!=null&&(delete e.waitForTextGeometry,console.warn("[AcApDocManager] Ignoring deprecated open option waitForTextGeometry; both stages of progressive rendering are controlled by progressiveRendering."))}stripObsoleteFontOpenOptions(e){const t=e,i=t.fontLoader!=null,n=t.failOnFontLoadError!=null;!i&&!n||(delete t.fontLoader,delete t.failOnFontLoadError,console.warn("[AcApDocManager] Ignoring obsolete open options "+[i?"fontLoader":null,n?"failOnFontLoadError":null].filter(Boolean).join(", ")+"; fonts load on demand via FontManager.lazyFontLoading."))}getDocumentEventMode(e){return(e==null?void 0:e.mode)??U.Read}resolveOpenViewMode(e){return(e==null?void 0:e.openViewMode)!=null?e.openViewMode:this.getDocumentEventMode(e)===U.Write?_t.Saved:_t.Extents}showBusyIndicator(e){this._busyIndicator.show(e)}setBusyIndicatorHost(e){this._busyIndicatorHost=e,this.syncProgressOverlayHost()}get openProgressView(){var e;return((e=this._openingSession)==null?void 0:e.context.view)??this.curView}beginOpenProgress(){this._openingSession=this._activeSession,this.syncProgressOverlayHost()}onOpenProgressHidden(){const e=this._openingSession;this._openingSession=void 0,e&&this._sessions.includes(e)&&e!==this._activeSession&&e.context.suspend(),this.syncProgressOverlayHost()}syncProgressOverlayHost(e=this.openProgressView){const t=this._splitView?e.container:this._busyIndicatorHost;this._openFileProgress.setHost(t),this._busyIndicator.setHost(t)}hideBusyIndicator(){this._busyIndicator.hide()}setBusyIndicatorMessage(e){this._busyIndicator.setMessage(e)}async withBusyIndicator(e,t){return this._busyIndicator.withBusyIndicator(e,t)}registerWorkers(e){const t=D.AcTrMTextRenderer.getInstance();t.initialize((e==null?void 0:e.mtextRender)??wv.mtextRender),t.setDefaultFonts([...$.FontManager.instance.defaultFonts])}async loadPlugins(e){if(e){if(e.fromConfig&&e.fromConfig.length>0)try{const t=await this._pluginManager.loadPluginsFromConfig(e.fromConfig,{continueOnError:!0});t.loaded.length>0&&p.log.info(`[AcApDocManager] Loaded ${t.loaded.length} plugin(s) from config:`,t.loaded),t.failed.length>0&&p.log.warn(`[AcApDocManager] Failed to load ${t.failed.length} plugin(s):`,t.failed.map(i=>`${i.name}: ${i.error.message}`))}catch(t){p.log.error("[AcApDocManager] Error loading plugins from config:",t)}if(e.fromFolder)try{const t=await this._pluginManager.loadPluginsFromFolder(e.fromFolder.folderPath,{pluginList:e.fromFolder.pluginList,continueOnError:e.fromFolder.continueOnError??!0});t.loaded.length>0&&p.log.info(`[AcApDocManager] Loaded ${t.loaded.length} plugin(s) from folder:`,t.loaded),t.failed.length>0&&p.log.warn(`[AcApDocManager] Failed to load ${t.failed.length} plugin(s) from folder:`,t.failed.map(i=>`${i.name}: ${i.error.message}`))}catch(t){p.log.error("[AcApDocManager] Error loading plugins from folder:",t)}}}bindOpenProgress(e){e.database.events.openProgress.addEventListener(t=>{if(this._openFileProgress.handle({database:e.database,percentage:t.percentage,stage:t.stage,subStage:t.subStage,subStageStatus:t.subStageStatus,data:t.data}),t.subStage==="STYLE"&&t.subStageStatus==="END"){const o=this._sessions.find(a=>a.doc===e),r=(o==null?void 0:o.context.view)??this.curView;r&&r.startTextStyleFontPreload(e.database)}if(t.subStage!=="HEADER")return;const i=this._sessions.find(o=>o.doc===e),n=(i==null?void 0:i.context.view)??this.curView;n.ltscale=e.database.ltscale,n.celtscale=e.database.celtscale,n.renderer.showLineWeight=e.database.lwdisplay})}parkActiveSession(){this._activeSession.context.suspend(),this._activeSession.viewState=this.curView.captureSessionState()}async ensureOpenSession(e){const t=e??this.curView;if(t===this.curView&&this.curDocument.isReusableUntitled)return!1;const i=this._sessions.find(a=>a.context.view===t);if(i!=null&&i.doc.isReusableUntitled)return i!==this._activeSession&&await this.activateDocument(i.doc),!1;await this._commandManager.cancelActive(),this._activeSession.context.suspend(),t===this.curView&&(this._activeSession.viewState=this.curView.beginNewSession());const n=new ba,o=new Ea(t,n),r=new ya(`doc-${this._nextSessionId++}`,o);return this._sessions.push(r),this._activeSession=r,Hn(r.id),p.acdbHostApplicationServices().workingDatabase=n.database,this._pluginManager.setContext(o),this.bindOpenProgress(n),this.events.documentCreated.dispatch({doc:n,mode:n.openMode}),!0}async closeFailedOpenSession(){this._sessions.length<=1||await this.closeDocument(this.curDocument)}resetActiveSessionToUntitled(e){const t=e.doc,i=e.id;Si.instance.clearAll(),this.clearOverlays(),vl(),Jc(),this.curView.clear(),e.context.dispose(),t.destroy(),tl(i);const n=new ba,o=new Ea(this.curView,n),r=new ya(`doc-${this._nextSessionId++}`,o);this._sessions=[r],this._activeSession=r,Hn(r.id),p.acdbHostApplicationServices().workingDatabase=n.database,this._pluginManager.setContext(o),this.bindOpenProgress(n),this.curView.bindDrawDatabase(n.database)}clearSessionOverlays(e){const t=this.sessionCadScene(e);for(const i of e.overlays.values())t.internalScene.remove(i.layout.internalObject),i.layout.clear();e.overlays.clear()}sessionCadScene(e){var t;return((t=e.viewState)==null?void 0:t.scene)??e.context.view.cadScene}}const UE=Object.freeze(Object.defineProperty({__proto__:null,AcApDocManager:k},Symbol.toStringTag,{value:"Module"}));class Wt{static isFontLoaded(e){return $.FontManager.instance.isFontLoaded(e)}static getFontType(e){return $.FontManager.instance.getFontType(e)}static getReplacementFontName(e){return $.FontManager.instance.findAndReplaceFont(e)}static getShxCodePoints(e){var o;const t=$.FontManager.instance.getFontByName(e,!1);if(!t||t.type!=="shx")return[];const i=t.data;return Object.keys(((o=i.content)==null?void 0:o.data)??{}).map(r=>Number(r)).filter(r=>Number.isFinite(r)).sort((r,a)=>r-a)}static getLoadedShxFontData(e){const t=$.FontManager.instance.getFontByName(e,!1);if(!(!t||t.type!=="shx"))return t.data}static createShxParserFont(e){return new $.ShxParserFont(e)}static findFontInfoByName(e){var n;const t=((n=k.instance)==null?void 0:n.avaiableFonts)??[],i=e.trim().toLowerCase();if(i)return t.find(o=>o.name.some(r=>r.trim().toLowerCase()===i))}static getCatalogFontType(e){var t;return(t=Wt.findFontInfoByName(e))==null?void 0:t.type}static async ensureDrawingFontLoaded(e){const t=k.instance;t&&(Wt.isFontLoaded(e)||await t.loadFonts([e]))}static async cacheFont(e,t,i,n){return $.FontManager.instance.cacheFont(e,t,i,n)}static async getCachedMeshFontProgram(e){const t=[e],i=Wt.findFontInfoByName(e);i!=null&&i.file&&t.push(i.file);for(const r of(i==null?void 0:i.name)??[])t.push(r);const n=Wt.getReplacementFontName(e);if(n&&n!==e){t.push(n);const r=Wt.findFontInfoByName(n);r!=null&&r.file&&t.push(r.file);for(const a of(r==null?void 0:r.name)??[])t.push(a)}const o=new Set;for(const r of t){const a=r.trim().toLowerCase();if(!a||o.has(a))continue;o.add(a);const l=await $.FontManager.instance.getCachedMeshFontProgram(r);if(l&&l.byteLength>0)return new Uint8Array(l)}}static async persistMeshFontProgram(e,t,i){await $.FontManager.instance.persistMeshFontProgram(e,t,i)}}function Jv(s){const e=[];try{const t=s.tables.textStyleTable;if(e.push(...t.fonts??[]),t.newIterator)for(const i of t.newIterator()){const n=i.textStyle;n!=null&&n.font&&e.push(n.font),n!=null&&n.bigFont&&e.push(n.bigFont),n!=null&&n.extendedFont&&e.push(n.extendedFont)}}catch{return[]}return Zs(e)}function Qv(s,e,t){const i=Zs([...s]);i.length===0&&(t!=null&&t.firstDefaultFont)&&i.push(t.firstDefaultFont);const n=new Set(i.map($i)),o=new Set(e.map($i)),r=Zs(e.filter(l=>!n.has($i(l))));let a=Zs(i.filter(l=>o.has($i(l))));if(a.length===0&&(t!=null&&t.firstDefaultFont)){const l=$i(t.firstDefaultFont);l&&n.has(l)&&(a=[t.firstDefaultFont])}return a.length>3&&(a=a.slice(0,3)),{critical:i,workerWarm:a,background:r}}function Zs(s){const e=new Set,t=[];for(const i of s){if(!i)continue;const n=$i(i);!n||e.has(n)||(e.add(n),t.push(i))}return t}function $i(s){if(s==null)return"";let e=String(s).trim();if(!e)return"";const t=e.lastIndexOf(".");return t>0&&(t===e.length-4||t===e.length-5)&&(e=e.substring(0,t)),e.toLowerCase()}const lu=13,cu=14,du=1,WE=cu*2+du*2,ex=.5,tx=.5;let In;function $E(){if(In!==void 0)return In;if(typeof document>"u")return In=null,null;try{In=document.createElement("canvas").getContext("2d")}catch{In=null}return In}function ix(s){return(s==null?void 0:s.padXEm)??cu/lu}function nx(s){const e=(s==null?void 0:s.borderEm)??du/lu;return e>0?e:0}function uu(s,e){return s>0?2*(ix(e)+nx(e))*s:0}function sx(s,e,t){const i=uu(e,t);if(!(e>0))return i;const n=$E();if(!n)return s.length*e*.6+i;const o=(t==null?void 0:t.fontWeight)??"500",r=(t==null?void 0:t.fontFamily)??"sans-serif";return n.font=`${o} ${e}px ${r}`,n.measureText(s).width+i}function ox(s,e,t,i){if(!(e>0)||!(t>0))return e;const n=(i==null?void 0:i.maxLineFraction)??ex,o=t*n,r=sx(s,e,i);if(r<=o)return e;if(!(o>0))return 1;const l=Math.max(0,r-uu(e,i))/e,c=2*(ix(i)+nx(i)),d=l+c;return d>0?Math.max(1,o/d):e}function xt(s,e,t,i){return e.textHeightMode==="custom"?e.fontSize:ox(s,e.fontSize,t,i)}function Ci(s,e,t){const i=s(e),n=s(t);return Math.hypot(n.x-i.x,n.y-i.y)}function Aa(s,e,t){return!(s>0)||!(e>0)||!(t>0)||t>=e?s:Math.max(1,s*(t/e))}function hu(s,e,t,i){return Math.min(Ci(s,e,t),Ci(s,e,i))*tx}function _a(s,e,t,i){if(!(t>0)||!(i>0))return 0;const n=s(e),o=s({x:e.x+t,y:e.y});return Math.hypot(o.x-n.x,o.y-n.y)/t*i}function KE(s,e,t){const i=t.x-e.x,n=t.y-e.y,o=i*i+n*n;if(!(o>0))return Math.hypot(s.x-e.x,s.y-e.y);let r=((s.x-e.x)*i+(s.y-e.y)*n)/o;return r=Math.max(0,Math.min(1,r)),Math.hypot(s.x-(e.x+r*i),s.y-(e.y+r*n))}function pu(s,e){const t=e.length;if(t<3)return 0;let i=1/0;for(let l=0;l<t;l++){const c=e[l],d=e[(l+1)%t];i=Math.min(i,Ci(s,c,d))}let n=0,o=0;for(const l of e)n+=l.x,o+=l.y;n/=t,o/=t;const r=s({x:n,y:o});let a=1/0;for(let l=0;l<t;l++){const c=s(e[l]),d=s(e[(l+1)%t]);a=Math.min(a,KE(r,c,d))}return Math.min(i,2*a)}const rx=s=>new p.AcGeBox3d(s.min,s.max),ax=s=>new p.AcGeBox2d(s.min,s.max),lx=s=>new V.Box3(s.min,s.max),cx=s=>new p.AcGeBox2d(s.min,s.max),dx=s=>new V.Box2(s.min,s.max),ux=s=>new p.AcGeBox2d(s.min,s.max),hx=s=>{const e=new V.Box3;return e.min.set(s.min.x,s.min.y,0),e.max.set(s.max.x,s.max.y,0),e},mu={threeBo2dToGeBox2d:cx,geBox2dToThreeBox2d:dx,threeBox3dToGeBox3d:rx,geBox3dToThreeBox3d:lx,goBox3dToGeBox2d:ax,threeBox3dToGeBox2d:ux,geBox2dToThreeBox3d:hx};function px(s,e){if(!e||s.length<2)return s;let t=-1,i=-1;for(let r=0;r<s.length&&(s[r].ownerId===e?t<0&&(t=r):i<0&&(i=r),!(t>=0&&i>=0));r++);if(t<0||i<0||t<i)return s;const n=[],o=[];for(let r=0;r<s.length;r++){const a=s[r];a.ownerId===e?n.push(a):o.push(a)}return n.concat(o)}function YE(s,e){return{pending:px(s,e),cursor:0,activeOwnerId:e}}function ZE(s,e,t){if(e.length===0&&t===s.activeOwnerId)return s;const i=s.cursor===0?s.pending:s.pending.slice(s.cursor);if(t!==s.activeOwnerId)return{pending:px(e.length>0?e.concat(i):i,t),cursor:0,activeOwnerId:t};let n=!1;const o=[],r=[];for(let a=0;a<e.length;a++)t&&e[a].ownerId===t?(n=!0,o.push(e[a])):r.push(e[a]);if(n)return{pending:o.concat(i,r),cursor:0,activeOwnerId:t};for(let a=0;a<r.length;a++)s.pending.push(r[a]);return s}function XE(s){const{pending:e,cursor:t,activeOwnerId:i}=s;if(!i)return!1;for(let n=t;n<e.length;n++)if(e[n].ownerId===i)return!0;return!1}function qE(s){const{tookMs:e,budgetMs:t,maxSlice:i,activeLayoutPending:n}=s,o=Math.max(1,s.slice),r=n?2:4;return e<t/2?Math.min(o*r,i):e>t*2?Math.max(1,o>>1):o}class JE{constructor(e){this.getLayerInfo=e}shouldConvert(e){if(!e.visibility)return!1;const t=this.getLayerInfo(e.layer);return t?this.isBlockReference(e)?!t.isFrozen:on.isLayerVisible(t):!0}shouldConvertForExport(e,t=!0){return e.visibility?t?!0:this.shouldConvert(e):!1}layerVisibilityMayHaveChanged(e){return e.isOff!==void 0||e.standardFlags!==void 0}collectMissingEntitiesOnLayer(e,t,i){return this.collectMissingEntities(t,i,n=>n.layer===e&&this.shouldConvert(n))}collectMissingEntitiesForExport(e,t,i=!0){return this.collectMissingEntities(e,t,n=>this.shouldConvertForExport(n,i))}isBlockReference(e){return e instanceof p.AcDbBlockReference}collectMissingEntities(e,t,i){const n=[],o=e.newIterator();for(const r of o)i(r)&&(t(r.objectId)||n.push(r));return n}}var Pa=(s=>(s[s.LEFT_BOTTOM=0]="LEFT_BOTTOM",s[s.LEFT_TOP=1]="LEFT_TOP",s[s.RIGHT_TOP=2]="RIGHT_TOP",s[s.RIGHT_BOTTOM=4]="RIGHT_BOTTOM",s))(Pa||{});class QE extends V.Object3D{constructor(e,t,i=150,n=2){super(),this.camera=e,this.renderer=t,this.gizmoCamera=new V.OrthographicCamera(-2,2,2,-2,0,4),this.gizmoCamera.position.set(0,0,2),this.gizmoDim=i,this.gizmoPos=n,this.initialize()}initialize(){}update(){this.updateOrientation();const e=this.renderer.autoClear;this.renderer.autoClear=!1,this.renderer.clearDepth();const t=new V.Vector4;this.renderer.getViewport(t);const i=this.calculateViewportPos();this.renderer.setViewport(i.x,i.y,this.gizmoDim,this.gizmoDim),this.renderer.render(this,this.gizmoCamera),this.renderer.setViewport(t.x,t.y,t.z,t.w),this.renderer.autoClear=e}dispose(){}updateOrientation(){this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()}calculatePosInViewport(e,t,i){const n=(e-i.min.x)/this.gizmoDim*2-1,o=-((t-i.min.y)/this.gizmoDim)*2+1;return{x:n,y:o}}calculateViewportPos(){const e=this.renderer.domElement,t=e.offsetWidth,i=e.offsetHeight,n=this.gizmoPos,o=this.gizmoDim;let r=t-o,a=i-o;switch(n){case 0:r=0,a=0;break;case 1:r=0;break;case 4:a=0;break}return{x:r,y:a}}calculateViewportBbox(){const e=this.renderer.domElement,t=e.offsetWidth,i=e.offsetHeight,n=this.gizmoPos,o=this.gizmoDim,r=new V.Box2(new V.Vector2(t-o,0),new V.Vector2(t,o));switch(n){case 0:r.set(new V.Vector2(0,i-o),new V.Vector2(o,i));break;case 1:r.set(new V.Vector2(0,0),new V.Vector2(o,o));break;case 4:r.set(new V.Vector2(t-o,i-o),new V.Vector2(t,i));break}return r}}function eL(s,e){const t=e.font||"Helvetica",i=e.fontSize||30,n=e.width||200,o=e.height||200,r=e.bgColor?e.bgColor.join(", "):"255, 255, 255, 1.0",a=e.color?e.color.join(", "):"0, 0, 0, 1.0",l=document.createElement("canvas");l.width=n,l.height=o;const c=l.getContext("2d");if(c){c.font=`bold ${i}px ${t}`,c.fillStyle=`rgba(${r})`,c.fillRect(0,0,n,o);const f=c.measureText(s).width;c.fillStyle=`rgba(${a})`,c.fillText(s,n/2-f/2,o/2+i/2-2)}const d=new V.Texture(l);return d.minFilter=V.LinearFilter,d.needsUpdate=!0,d}function fu(s){const e=eL(s,{fontSize:100,font:"Arial Narrow, sans-serif",color:[255,255,255,1],bgColor:[0,0,0,0]}),t=new V.SpriteMaterial({map:e,transparent:!0});return new V.Sprite(t)}Pa.RIGHT_TOP;const tL={pos:Pa.LEFT_BOTTOM,size:100,hasZAxis:!0};class iL extends QE{constructor(e,t,i){const n={...tL,...i};super(e,t,n.size,i.pos),this.hasZAxis=n.hasZAxis;const o=[0,0,0,2,0,0,0,0,0,0,2,0],r=[1,0,0,1,.6,0,0,1,0,.6,1,0];this.hasZAxis&&(o.push(0,0,0,0,0,2),r.push(0,0,1,0,.6,1));const a=new V.BufferGeometry;a.setAttribute("position",new V.Float32BufferAttribute(o,3)),a.setAttribute("color",new V.Float32BufferAttribute(r,3));const l=new V.LineBasicMaterial({vertexColors:!0,toneMapped:!1});this.axes=new V.LineSegments(a,l),this.axes.position.set(-1,-1,-1),this.add(this.axes),this.xText=fu("X"),this.xText.position.set(1.5,-1,-1),this.add(this.xText),this.yText=fu("Y"),this.yText.position.set(-1,1.5,-1),this.add(this.yText),this.hasZAxis&&(this.zText=fu("Z"),this.zText.position.set(-1,-1,1.5),this.add(this.zText))}setLineColors(e,t){const i=new V.Color,n=this.axes.geometry.attributes.color.array;return i.set(e),i.toArray(n,0),i.toArray(n,3),i.set(t),i.toArray(n,6),i.toArray(n,9),this.axes.geometry.attributes.color.needsUpdate=!0,this}setTextColor(e){this.xText.material.color=e,this.yText.material.color=e}dispose(){var e,t;this.axes.geometry.dispose(),this.axes.material.dispose(),this.xText.geometry.dispose(),this.xText.material.dispose(),this.yText.geometry.dispose(),this.yText.material.dispose(),this.hasZAxis&&((e=this.zText)==null||e.geometry.dispose(),(t=this.zText)==null||t.material.dispose())}}class nL extends D.AcTrBaseView{constructor(e,t,i,n){super(e,i,n),this._layoutBtrId=t,this._mode=qe.SELECTION,this._axesGizmo=this.createAxesGizmo(),this._viewportViews=new Map,this._overlayViewport=new D.AcTrOverlayViewport(e)}get layoutBtrId(){return this._layoutBtrId}get mode(){return this._mode}set mode(e){e==qe.SELECTION?this._cameraControls.mouseButtons={MIDDLE:V.MOUSE.PAN}:e==qe.PAN&&(this._cameraControls.mouseButtons={LEFT:V.MOUSE.PAN}),this._cameraControls.update(),this._mode=e}get viewportCount(){return this._viewportViews.size}get viewportViews(){return this._viewportViews.values()}get overlayViewport(){return this._overlayViewport}get internalCamera(){return this._camera.internalCamera}get viewportsBoundingBox(){if(this._viewportViews.size===0)return;const e=new p.AcGeBox2d;return this._viewportViews.forEach(t=>{const i=t.viewport.box;e.expandByPoint(i.min),e.expandByPoint(i.max)}),e.isEmpty()?void 0:e}addViewport(e){this._viewportViews.set(e.viewport.id,e)}removeViewport(e){this._viewportViews.delete(e)}resize(e,t){this._height=t,this._width=e,this._frustum=t/2,this.updateCameraFrustum(),this._viewportViews.forEach(i=>{i.update()})}render(e){var n;this._renderer.clear();const t=this._renderer.render(e.internalScene,this._camera),i=e.modelSpaceLayout;return i&&this.drawViewports(i.internalObject),this.drawOverlay(e),(n=this._axesGizmo)==null||n.update(),t}createAxesGizmo(){return new iL(this._camera.internalCamera,this._renderer.internalRenderer,{hasZAxis:!1,pos:Pa.LEFT_BOTTOM})}drawViewports(e){if(this._viewportViews.size>0){const t=this._renderer.autoClear;this._renderer.autoClear=!1;const i=new V.Vector4;this._renderer.getViewport(i),this._renderer.clearDepth();const n=e.visible;e.visible=!0,this._viewportViews.forEach(o=>{o.render(e)}),e.visible=n,this._renderer.setViewport(i.x,i.y,i.z,i.w),this._renderer.autoClear=t}}drawOverlay(e){const t=this._overlayViewport;if(!t.visible)return;t.render(e.internalScene,this._height);const i=e.modelSpaceLayout;!i||this._viewportViews.size===0||this.drawOverlayViewports(i.internalObject,t)}drawOverlayViewports(e,t){const i=t.screenRect,n=t.viewBox,o=e.visible;e.visible=!0,this._viewportViews.forEach(r=>{const a=D.acTrWcsBoxToCssRect(r.viewport.box,n,i),l=D.acTrIntersectCssRects(a,i);if(!l)return;const c=D.acTrCssRectToWcsBox(l,n,i),d=new p.AcGeBox2d;d.expandByPoint(r.paperPointToModel({x:c.minX,y:c.minY})),d.expandByPoint(r.paperPointToModel({x:c.maxX,y:c.minY})),d.expandByPoint(r.paperPointToModel({x:c.maxX,y:c.maxY})),d.expandByPoint(r.paperPointToModel({x:c.minX,y:c.maxY})),!d.isEmpty()&&r.withFrozenLayersHidden(e,()=>{t.renderNested(e,d,l,l,this._height,r.viewport.viewTwistAngle)})}),e.visible=o}}class yu{constructor(){this._activeLayoutBtrId="",this._layoutViews=new Map}get activeLayoutBtrId(){return this._activeLayoutBtrId}set activeLayoutBtrId(e){this._activeLayoutBtrId=e,this._layoutViews.forEach(t=>{t.enabled=t.layoutBtrId==e})}get activeLayoutView(){return this._layoutViews.get(this._activeLayoutBtrId)}has(e){return this._layoutViews.has(e)}getAt(e){return this._layoutViews.get(e)}resize(e,t){this._layoutViews.forEach(i=>{i.resize(e,t)})}add(e){this._layoutViews.set(e.layoutBtrId,e)}render(e){var t;return((t=this.activeLayoutView)==null?void 0:t.render(e))??!1}}function sL(s,e){return[...s].sort((t,i)=>oL(t,i,e))}function oL(s,e,t){const i=mx(s)-mx(e);if(Math.abs(i)>Number.EPSILON)return i;const n=fx(t,s)-fx(t,e);return Math.abs(n)>Number.EPSILON?n:0}function mx(s){return Math.max(s.maxX-s.minX,0)*Math.max(s.maxY-s.minY,0)}function fx(s,e){const t=s.x<e.minX?e.minX-s.x:s.x>e.maxX?s.x-e.maxX:0,i=s.y<e.minY?e.minY-s.y:s.y>e.maxY?s.y-e.maxY:0;return t*t+i*i}const ai=class ai{constructor(e){this.zoomTo=e,this.active=!1,this.userAdjusted=!1,this.programmaticDepth=0,this.incrementalEnabled=!1,this.initialPendingCount=0,this.convertedCount=0,this.lastZoomAt=0}get isActive(){return this.active}begin(e){if(this.active){this.initialPendingCount=Math.max(this.initialPendingCount,e),this.maybeEnableIncrementalFit();return}this.active=!0,this.userAdjusted=!1,this.lastZoomAt=0,this.initialPendingCount=e,this.convertedCount=0,this.lastFittedBox=void 0,this.incrementalEnabled=!1,this.maybeEnableIncrementalFit()}end(){this.active=!1,this.incrementalEnabled=!1,this.lastFittedBox=void 0,this.convertedCount=0}applyFinalFit(e){if(this.userAdjusted)return;const t=e();t&&this.applyZoom(t)}frameProgrammatically(e){this.userAdjusted||this.applyZoom(e)}onLayoutViewChanged(){!this.active||this.userAdjusted||this.programmaticDepth>0||(this.userAdjusted=!0,this.end())}afterGeometryBatch(e,t){this.active&&(this.convertedCount++,this.maybeEnableIncrementalFit(),this.maybeIncrementalFit(e))}maybeEnableIncrementalFit(){this.incrementalEnabled||(this.initialPendingCount>=ai.SMALL_ENTITY_THRESHOLD||this.convertedCount>=ai.SMALL_ENTITY_THRESHOLD)&&(this.incrementalEnabled=!0)}maybeIncrementalFit(e){if(!this.active||!this.incrementalEnabled||this.userAdjusted)return;const t=performance.now();if(t-this.lastZoomAt<ai.FIT_INTERVAL_MS)return;const i=e();!i||!this.shouldApplyIncrementalFit(i)||(this.lastZoomAt=t,this.applyZoom(i))}shouldApplyIncrementalFit(e){const t=this.lastFittedBox;if(!t)return!0;const i=this.estimateBoxArea(t);return i<=Number.EPSILON?!0:this.estimateBoxArea(e)>=i*ai.BBOX_GROWTH_RATIO}applyZoom(e,t=1.1){this.programmaticDepth++;try{this.zoomTo(e,t),this.lastFittedBox=this.snapshotFitBox(e)}finally{this.programmaticDepth--}}estimateBoxArea(e){const t=new p.AcGeVector2d;return e.getSize(t),Math.abs(t.x)*Math.abs(t.y)}snapshotFitBox(e){return new p.AcGeBox2d({x:e.min.x,y:e.min.y},{x:e.max.x,y:e.max.y})}};ai.SMALL_ENTITY_THRESHOLD=500,ai.BBOX_GROWTH_RATIO=1.5,ai.FIT_INTERVAL_MS=2500;let gu=ai;const rL=1e3;function aL(s,e,t){return s||e>0?!1:t==null?!0:t>=rL}const bu={background:p.ACGI_MODEL_SPACE_BACKGROUND},de=class de extends Cf{constructor(e=bu){const t={...bu,...e},i=t.container??document.createElement("div");t.container=i,i.style.overflow="hidden",i.hasAttribute("tabindex")||(i.tabIndex=-1);const n=new V.WebGLRenderer({antialias:!0,alpha:!0});i.appendChild(n.domElement),n.domElement.style.display="block",n.domElement.style.maxWidth="100%",n.domElement.style.maxHeight="100%";const o=wm(n.domElement,i);super(n.domElement,i),this._rafId=null,this._loadingLayouts=new Set,this._initializedLayouts=new Set,this._externallyFramedLayouts=new Set,this._openViewMode=_t.Extents,this._convertingLayers=new Set,this._claimedConvertObjectIds=new Set,this._entityConvertGeneration=new Map,this._progressiveRendering=!1,this._convertInvisibleLayers=!1,this._cooperativeYield=!0,this._convertQueue=[],this._viewportRepairOwnerIds=new Set,this._convertDrainPromise=null,this._convertEpoch=0,this._transientDrawGeneration=new Map,this._transientSkipMeshGlyphDepth=0,this._lastProgressivePaintAt=0,this._progressivePaintUrgent=!1,this._progressiveInputPauseUntil=0,this._progressivePaintCount=0,this._progressiveYieldCount=0,this._openLineworkFramePending=!1,this._openLineworkFrameTimer=null,this._pendingGeometryJobs=0,this._deferredGeometryQueue=[],this._deferredGeometryActive=0,this._fontLoadedRedrawTimer=null,this._fontLoadedRedrawEpoch=0,this._entityProcessingIdleAt=0,this._textStyleFontPreloadEpoch=-1,this._textStyleFontPreloadPromise=null,this._viewDomAbort=new AbortController,this._viewDisposed=!1,this._readingMode=new Wu({getCurrentBackgroundColor:()=>this._renderer.currentBackgroundColor,applyViewClearColor:A=>this.applyViewClearColor(A),setCompareDisplay:A=>this.setCompareDisplay(A),markDirty:()=>{this._isDirty=!0}}),this._deferredFontsReady=null,this._convertPhaseMs={finishGeometry:0,finishGeometryAsyncDraw:0,finishGeometryQueueWait:0,handleGroup:0,addEntity:0,awaitFonts:0,glyphEntityCount:0,mtextCount:0,shapeCount:0,sharedGlyphDrawCount:0},this._fontPreloadDiag=null,this.animate=()=>{var G;this._rafId=requestAnimationFrame(this.animate),this.events.renderFrame.dispatch({render:this._renderer,camera:this.internalCamera});const A=this._numOfEntitiesToProcess>0,O=A||this._pendingGeometryJobs>0,P=!this._progressiveRendering&&!this._cooperativeYield&&O;if(!this._isDirty&&!this._htmlDirty&&!O||P||!this._isDirty&&!this._htmlDirty)return;const E=this.shouldCountMidOpenPaint(A,O);if(this._isDirty&&!this._progressivePaintUrgent&&E){const Y=this._progressiveRendering?de.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS:de.NON_PROGRESSIVE_OPEN_PAINT_INTERVAL_MS;if(performance.now()-this._lastProgressivePaintAt<Y)return}let j=!1;this._isDirty&&(E&&(this._progressivePaintCount++,this._lastProgressivePaintAt=performance.now(),this._progressivePaintUrgent=!1),j=this._layoutViewManager.render(this._scene)),this.internalCamera&&(this._isDirty||this._htmlDirty)&&this._css2dRenderer.render(this._scene.internalScene,this.internalCamera),(G=this._stats)==null||G.update(),this._isDirty=j,this._htmlDirty=!1},this._meshGlyphFlushTimer=null,this._disposeCanvasTouchCallout=o;const r=()=>this.noteProgressiveUserInput(),a=()=>{r(),this.focusViewerForShortcuts()},l=()=>{r(),this.focusViewerForShortcuts()};n.domElement.addEventListener("pointerdown",a,{capture:!0}),n.domElement.addEventListener("wheel",l,{capture:!0,passive:!0}),this._disposeProgressiveInputWatch=()=>{n.domElement.removeEventListener("pointerdown",a,{capture:!0}),n.domElement.removeEventListener("wheel",l,{capture:!0})},this._gripManager=new nm(this),this._keyHandler=new No(this),e.calculateSizeCallback&&this.setCalculateSizeCallback(e.calculateSizeCallback),n.setPixelRatio(Math.min(window.devicePixelRatio,2)),n.setSize(this.width,this.height),this._renderer=new D.AcTrRenderer(n),D.setAcTrDrawOrderZAllocator(()=>this._renderer.allocateDrawOrderZ());const c=le.instance.fontMapping;this._renderer.setFontMapping(c),this._onFontNotFound=A=>{Q.emit("font-not-found",{fontName:A.fontName,count:A.count??0})},this._onFontLoaded=A=>{Q.emit("missed-data-changed",{}),this.scheduleGlyphRedrawAfterFontLoad(A==null?void 0:A.fontName)},this._renderer.events.fontNotFound.addEventListener(this._onFontNotFound),this._renderer.events.fontLoaded.addEventListener(this._onFontLoaded),this._scene=this.createScene(),this._layerAppearance=new Gl(this._scene,this._renderer),this._inheritedLayerMaterialMapper=new yp(A=>this._layerAppearance.getEffectiveLayerTraits(A),this._renderer),this.backgroundColor=t.background??p.ACGI_MODEL_SPACE_BACKGROUND,this._stats=this.createStats(le.instance.isShowStats&&(k.tryGetInstance()==null||this.isActiveManagedView()));const d=p.AcDbSysVarManager.instance(),h=p.AcDbSystemVariables.MODELBKCOLOR.toLowerCase(),f=p.AcDbSystemVariables.PAPERBKCOLOR.toLowerCase();this._onSysVarChanged=A=>{const O=A.name.toLowerCase();if(O===h||O===f){const P=A.database;if(!P)return;const E=this.isModelSpaceLayout(P);if(!(O===h&&E||O===f&&!E))return;this.applyCanvasBackground(Mo(P,E))}},d.events.sysVarChanged.addEventListener(this._onSysVarChanged),this._onSettingsModified=A=>{A.key=="isShowStats"&&this.toggleStatsVisibility(this._stats,A.value)},le.instance.events.modified.addEventListener(this._onSettingsModified);let y=null,g=null,b=null;const w=()=>!this.editor.isActive&&!qt.getActiveInputBox()&&!If()&&!this._gripManager.isDragging,S=()=>this.mode===qe.SELECTION&&w(),x=()=>w()&&Ve().canIdleTouchBox(this.mode),_=()=>{b==null||b.remove(),b=null},C=()=>{y=null,g=null,_()},T=(A,O)=>{g=this.viewportToCanvas({x:A,y:O}),y=this.screenToWorld(g),_(),b=document.createElement("div"),b.className="ml-jig-preview-rect",this.container.appendChild(b)},L=(A,O,P="replace")=>{if(!y||!b||!g)return;const E=this.viewportToCanvas({x:A,y:O}),I=this.screenToWorld(E),j=this.worldToScreen(y),G=this.worldToScreen(I),Y=Math.min(j.x,G.x),ee=Math.min(j.y,G.y),Z=Math.abs(j.x-G.x),re=Math.abs(j.y-G.y),Se=this.getSelectionMode(g,E),Ke=this.getSelectionPreviewStyle(Se,P);Object.assign(b.style,{left:`${Y}px`,top:`${ee}px`,width:`${Z}px`,height:`${re}px`,borderStyle:Ke.borderStyle,background:Ke.background}),b.style.setProperty("--line-color",Ke.lineColor)},N=(A,O,P,E)=>{if(!y||!g)return;const I=this.viewportToCanvas({x:A,y:O}),j=this.screenToWorld(I);if(_(),E)if(Yh(this,I.x,I.y,P))P==="replace"&&this.selectionSet.clear();else if(this.entitySelectionEnabled){const G=this.pick(j);G.length>0?(P==="replace"&&this.htmlTransientManager.deselectAll(),this.applySelection([G[0].id],P)):P==="replace"&&this.selectionSet.clear()}else P==="replace"&&this.selectionSet.clear();else{const G=new p.AcGeBox2d().expandByPoint(y).expandByPoint(j),Y=this.getSelectionMode(g,I);this.entitySelectionEnabled&&this.selectByBoxWithMode(G,Y,P),Zh(this,G,Y,P)}y=null,g=null},B=this._viewDomAbort.signal;this.canvas.addEventListener("mousedown",A=>{A.button===0&&S()&&(yt(A)||He()||T(A.clientX,A.clientY))},{signal:B}),this.canvas.addEventListener("mousemove",A=>{!y||!b||!g||yt(A)||He()||L(A.clientX,A.clientY,this.getPointerSelectionAction(A))},{signal:B}),this.canvas.addEventListener("mouseup",A=>{if(this._gripManager.isDragging){C();return}if(!y||!g||yt(A)||He())return;const O=this.viewportToCanvas({x:A.clientX,y:A.clientY}),P=this.getPointerSelectionAction(A);N(A.clientX,A.clientY,P,this.isSelectionClick(g,O))},{signal:B}),this._disposeMobileBoxGesture=cr({element:this.canvas,shouldStart:()=>x(),setNavigationEnabled:A=>{this.setNavigationEnabled(A)},onActivate:(A,O)=>{T(A,O),L(A,O)},onMove:(A,O)=>{L(A,O)},onBoxEnd:(A,O,P)=>{N(A,O,"replace",!P)},onTap:(A,O)=>{g=this.viewportToCanvas({x:A,y:O}),y=this.screenToWorld(g),N(A,O,"replace",!0)},onAbort:()=>{C()}}),this.canvas.addEventListener("dblclick",A=>{A.button===0&&S()&&this.entitySelectionEnabled&&k.instance.curDocument.openMode===U.Write&&this.openPickedEntityEditor(A)},{signal:B}),document.addEventListener("keydown",A=>{this.isActiveManagedView()&&this.isShortcutEventInsideViewer(A)&&this._keyHandler.handleKeyDown(A)},{signal:B}),this._onLayoutSwitched=A=>{var j,G;if(!this.isActiveManagedView())return;const O=A.layout.database,P=(G=(j=k._instance)==null?void 0:j.curDocument)==null?void 0:G.database;if(O&&P&&O!==P)return;const E=A.layout.blockTableRecordId,I=!this._initializedLayouts.has(E);this._initializedLayouts.add(E),this.activeLayoutBtrId=E,this.createLayoutViewIfNeeded(E),this.loadLayoutEntitiesIfNeeded(E),this.refreshCanvasBackgroundForActiveLayout(),this._isDirty=!0,I&&this.applyInitialZoom(E,A.layout)},p.acdbHostApplicationServices().layoutManager.events.layoutSwitched.addEventListener(this._onLayoutSwitched),this._css2dRenderer=new jx.CSS2DRenderer,this._css2dRenderer.setSize(this.width,this.height),this._css2dRenderer.domElement.style.position="absolute",this._css2dRenderer.domElement.style.top="0px",this._css2dRenderer.domElement.style.left="0px",this._css2dRenderer.domElement.style.pointerEvents="none",this._css2dRenderer.domElement.style.zIndex=String(Tp),this._css2dRenderer.domElement.style.maxWidth="100%",this._css2dRenderer.domElement.style.maxHeight="100%",i.appendChild(this._css2dRenderer.domElement),this._missedImages=new Map,this._layoutViewManager=new yu,this._progressiveOpenFit=new gu((A,O)=>{this.activeLayoutView.zoomTo(A,O??1.1),this._isDirty=!0}),this._entityDisplay=new JE(A=>this.resolveLayerInfo(A)),this.initialize(),this.onWindowResize(),this._isDirty=!0,this._htmlDirty=!1,this.startAnimationLoop(),this._numOfEntitiesToProcess=0,this.resetDeferredGeometryQueue()}ensureDeferredFontsReady(){if(!this._deferredFontsReady){const e=performance.now(),t=Promise.all([this.awaitPresetFontsReadySafe(),this.awaitTextStyleFontsReady()]).then(()=>{},()=>{});this._deferredFontsReady=t.then(()=>{this._convertPhaseMs.awaitFonts+=performance.now()-e})}return this._deferredFontsReady}async awaitPresetFontsReadySafe(){const e=k;e._instance&&await e._instance.awaitPresetFontsReady()}takeConvertPhaseTimings(){const e={...this._convertPhaseMs,fontPreload:this._fontPreloadDiag?{...this._fontPreloadDiag}:void 0};return this._convertPhaseMs={finishGeometry:0,finishGeometryAsyncDraw:0,finishGeometryQueueWait:0,handleGroup:0,addEntity:0,awaitFonts:0,glyphEntityCount:0,mtextCount:0,shapeCount:0,sharedGlyphDrawCount:0},this._fontPreloadDiag=null,e}getPointerSelectionAction(e){return Sf(e)}initialize(){this.setCursor(Ti.Crosshair),this._onCommandWillStartHitTest=()=>{this.htmlTransientManager.setHitTestEnabled(!1)},this._onCommandEndedHitTest=()=>{this.htmlTransientManager.setHitTestEnabled(!0)},this.editor.events.commandWillStart.addEventListener(this._onCommandWillStartHitTest),this.editor.events.commandEnded.addEventListener(this._onCommandEndedHitTest)}get mode(){const e=this.activeLayoutView;return e?e.mode:qe.SELECTION}set mode(e){this.activeLayoutView.mode=e}setNavigationEnabled(e){const t=this.activeLayoutView;t&&(t.enabled=e)}setSnapLoupe(e){var i;const t=(i=this.activeLayoutView)==null?void 0:i.overlayViewport;if(t){if(!e){t.visible=!1,this._isDirty=!0;return}t.setScreenRect(e.x,e.y,e.size,e.size),t.setViewBox(e.viewBox),t.visible=!0,this._isDirty=!0}}get renderer(){return this._renderer}get gripManager(){return this._gripManager}get isDirty(){return this._isDirty}get isProcessingEntities(){return this._numOfEntitiesToProcess>0||this._pendingGeometryJobs>0}get isConvertingEntities(){return this._numOfEntitiesToProcess>0}async waitUntilIdle(e=6e4){const t=Date.now()+Math.max(0,e);let i=0;for(;;){if(this.isProcessingEntities)i=0;else if(i++,i>=2)return!0;if(Date.now()>t)return!this.isProcessingEntities;await new Promise(n=>setTimeout(n,16))}}get progressiveRendering(){return this._progressiveRendering}set progressiveRendering(e){this._progressiveRendering=e,this.resetProgressiveOpenStats()}get convertInvisibleLayers(){return this._convertInvisibleLayers}set convertInvisibleLayers(e){this._convertInvisibleLayers=e}get cooperativeYield(){return this._cooperativeYield}set cooperativeYield(e){this._cooperativeYield=e}get progressiveOpenStats(){return{paintCount:this._progressivePaintCount,yieldCount:this._progressiveYieldCount}}resetProgressiveOpenStats(){this._progressivePaintCount=0,this._progressiveYieldCount=0,this._lastProgressivePaintAt=0,this._progressivePaintUrgent=!1,this._progressiveInputPauseUntil=0}isProgressiveGesturePauseActive(){return performance.now()<this._progressiveInputPauseUntil}isProgressiveDiscreteInputPending(){var t;const e=navigator.scheduling;return((t=e==null?void 0:e.isInputPending)==null?void 0:t.call(e))===!0}noteProgressiveUserInput(){!this._progressiveRendering||this._numOfEntitiesToProcess<=0||(this._progressivePaintUrgent=!0,this._isDirty=!0,this._progressiveInputPauseUntil=performance.now()+de.PROGRESSIVE_INPUT_PAUSE_MS)}async progressiveYieldForInput(e,t){if(this.isProgressiveGesturePauseActive()){for(await t();performance.now()<this._progressiveInputPauseUntil;)await new Promise(n=>setTimeout(n,16));this._progressiveYieldCount++;return}if(this.isProgressiveDiscreteInputPending()){await t(),this._progressiveYieldCount++;return}if(!e)return;await e.maybeYield(t)&&this._progressiveYieldCount++}beginProgressiveOpenFit(){this._progressiveOpenFit.begin(this._numOfEntitiesToProcess)}endProgressiveOpenFit(){this._progressiveOpenFit.end()}set isDirty(e){this._isDirty=e}get isHtmlDirty(){return this._htmlDirty}set isHtmlDirty(e){this._htmlDirty=e}get missedData(){return{fonts:this._renderer.missedFonts,images:this._missedImages,xrefs:this.collectUnresolvedXrefs()}}collectUnresolvedXrefs(){var e,t;try{const i=(t=(e=k.instance)==null?void 0:e.curDocument)==null?void 0:t.database;if(!i)return[];const n=i.tables.blockTable;return typeof n.getUnresolvedXrefs!="function"?[]:n.getUnresolvedXrefs().map(o=>({name:o.name,pathName:o.pathName,isOverlay:o.isOverlayReference}))}catch{return[]}}get center(){return this.activeLayoutView.center}set center(e){this.activeLayoutView.center=e}get backgroundColor(){return this._renderer.getClearColor()}set backgroundColor(e){this.applyCanvasBackground(e)}applyCanvasBackground(e){if(this._renderer.currentBackgroundColor=e,this._layerAppearance.refreshTextMaterialsInObjectTree(this._scene.internalScene),this._scene.repaintForegroundMaterials(p.acgiForegroundColorForBackground(e)),this._scene.repaintBackgroundMaterials(e),this.resyncForegroundLayersForBackground(),this._readingMode.isEnabled){this._readingMode.noteLayoutBackground(e),this.applyViewClearColor($a);return}this.applyViewClearColor(e)}applyViewClearColor(e){this._renderer.setClearColor(e),this.editor.syncCursorBackground(e),this._isDirty=!0}resyncForegroundLayersForBackground(){var t;const e=this._renderer.context.database;if(e)for(const i of e.tables.layerTable.newIterator())(t=i.color)!=null&&t.isForeground&&this._layerAppearance.syncFromLiveRecord(i)}isModelSpaceLayout(e){return e?cp(e):this.activeLayoutBtrId===this.modelSpaceBtrId}bindDrawDatabase(e){this._renderer.context.database=e}syncDisplaySysVars(e){this.bindDrawDatabase(e),this.applyCanvasBackground(Mo(e,this.isModelSpaceLayout(e))),this._readingMode.reapplyIfEnabled()}get readingModeEnabled(){return this._readingMode.isEnabled}toggleReadingMode(){this._readingMode.toggle()}setReadingMode(e){this._readingMode.setEnabled(e)}async addOverlayEntities(e){const t=new Ap;t.isReference=!0,t.internalObject.userData.isReference=!0,this._scene.internalScene.add(t.internalObject);for(const n of e.tables.layerTable.newIterator())t.addLayer({name:n.name,isOff:n.isOff,isFrozen:n.isFrozen,color:n.color});const i=this._renderer.context.database;this._renderer.context.database=e;try{const n=e.tables.blockTable.modelSpace;for(const o of n.newIterator())if(!(o instanceof p.AcDbViewport))try{const r=this.drawEntity(o,!1);if(!r)continue;r.objectId=o.objectId,r.ownerId=o.ownerId,r.layerName=o.layer,r.visible=o.visibility!==!1,r instanceof D.AcTrGroup&&r.isOnTheSameLayer&&(r.userData.insertLayerName=r.layerName),await this.finishEntityGeometry(r,!1),r instanceof D.AcTrGroup&&r.isOnTheSameLayer&&this._inheritedLayerMaterialMapper.remap(r.children,"0",r.layerName),t.addEntity(r),r.dispose()}catch(r){p.log.error(`[AcTrView2d] Failed to convert overlay entity ${o.objectId} (${o.type}):`,r)}}finally{this._renderer.context.database=i}return t}refreshCanvasBackgroundForActiveLayout(){var n,o;const t=(o=(n=k._instance)==null?void 0:n.curDocument)==null?void 0:o.database;if(!t)return;const i=this.activeLayoutBtrId===this.modelSpaceBtrId;this.applyCanvasBackground(Mo(t,i))}get modelSpaceBtrId(){return this._scene.modelSpaceBtrId}set modelSpaceBtrId(e){this._scene.modelSpaceBtrId=e}get activeLayoutBtrId(){return this._scene.activeLayoutBtrId}set activeLayoutBtrId(e){const t=this._scene.activeLayoutBtrId;this._layoutViewManager.activeLayoutBtrId=e,this._scene.activeLayoutBtrId=e,this.htmlTransientManager.setActiveLayoutId(e),this._isDirty=!0,t!==e&&zh()}get activeLayoutView(){return this._layoutViewManager.activeLayoutView}get stats(){return this._scene.stats}get cadScene(){return this._scene}async ensureEntitiesConvertedForExport(e){var l;const t=(e==null?void 0:e.includeInvisibleLayers)!==!1,i=(e==null?void 0:e.includeLayouts)!==!1,n=k.instance.curDocument.database,o=[];await this.drainConvertQueue();const r=(l=n.objects)==null?void 0:l.layout;if(i&&(r!=null&&r.newIterator))for(const c of r.newIterator()){const d=c.blockTableRecordId;d&&this._scene.addEmptyLayout(d)}for(const[c]of this._scene.layouts){if(!i&&c!==this._scene.modelSpaceBtrId)continue;const d=n.tables.blockTable.getIdAt(c);d&&o.push(...this._entityDisplay.collectMissingEntitiesForExport(d,h=>this.isEntityConvertScheduled(h),t))}o.length>0&&(this._numOfEntitiesToProcess+=o.length,await this.batchConvert(o,{forExport:!0})),await this.waitUntilIdle(12e4)||p.log.warn("[AcTrView2d] Timed out waiting for deferred geometry before export"),this.flushMeshGlyphWorldBatch()}get internalScene(){return this._scene.internalScene}get htmlTransientManager(){return this._scene.htmlTransientManager}get internalCamera(){var e;return(e=this.activeLayoutView)==null?void 0:e.internalCamera}set ltscale(e){this._renderer.ltscale=e}set celtscale(e){this._renderer.celtscale=e}screenToWorld(e){const t=this.activeLayoutView;return t?t.screenToWorld(e):new p.AcGePoint2d(e)}worldToScreen(e){const t=this.activeLayoutView;return t?t.worldToScreen(e):new p.AcGePoint2d(e)}zoomTo(e,t=1.1){this.activeLayoutView.zoomTo(e,t),this._isDirty=!0}rerenderPoints(e,t=0){const i=this._scene.activeLayout;i&&(i.rerenderPoints(e,t),this._isDirty=!0)}requestOpenLineworkFrame(){this._openLineworkFramePending=!0,this.scheduleOpenLineworkFrame()}cancelOpenLineworkFrame(){this._openLineworkFramePending=!1,this._openLineworkFrameTimer!=null&&(clearTimeout(this._openLineworkFrameTimer),this._openLineworkFrameTimer=null)}scheduleOpenLineworkFrame(){if(this._openLineworkFrameTimer!=null||!this._openLineworkFramePending)return;const e=this.isConvertingEntities?50:0;this._openLineworkFrameTimer=setTimeout(()=>{if(this._openLineworkFrameTimer=null,!!this._openLineworkFramePending){if(this.isConvertingEntities){this.scheduleOpenLineworkFrame();return}this.frameOpenLineworkIfReady()}},e)}zoomToFitDrawing(e=0,t){new jo(()=>!this.isProcessingEntities,()=>{if(t&&this._externallyFramedLayouts.delete(t)){this.endProgressiveOpenFit();return}this._progressiveOpenFit.applyFinalFit(()=>this.getDrawingExtents()),this.endProgressiveOpenFit();const n=t??this.activeLayoutBtrId;n&&yi.rememberOriginalView(this,n)},300,e).start()}zoomToFitLayer(e){const t=this._scene.activeLayout;if(t){const i=t.getLayer(e);if(i&&!i.box.isEmpty()){const n=mu.threeBox3dToGeBox2d(i.box);return this.zoomTo(n),this._isDirty=!0,!0}}return!1}zoomToSmartExtents(e=0){return new Promise((t,i)=>{new jo(()=>!this.isProcessingEntities,()=>{(async()=>{try{const o=await this.resolveSmartFitBox();if(o){this.zoomTo(o),this._isDirty=!0,this.endProgressiveOpenFit(),t();return}this._progressiveOpenFit.applyFinalFit(()=>this.getDrawingExtents()),this.endProgressiveOpenFit(),t()}catch(o){this.endProgressiveOpenFit(),i(o)}})()},300,e).start()})}async resolveSmartFitBox(){const e=this._scene.activeLayout;if(!e)return;const t=e.cachedSmartExtents;if(t)return t;const i=e.smartExtentsGeneration,n=new gp,o=await e.collectSpatialExtentBoxesAsync(n),r=await bp(o,n);return e.smartExtentsGeneration!==i?e.cachedSmartExtents:(r&&(e.cachedSmartExtents=r),r)}flyTo(e,t){this.activeLayoutView.flyTo(e,t),this._isDirty=!0}async openPickedEntityEditor(e){const t=this.viewportToCanvas({x:e.clientX,y:e.clientY}),i=this.screenToWorld(t),n=this.pick(i,void 0,!0);if(!n.length)return;const o=k.instance.curDocument.database.tables.blockTable.getEntityById(n[0].id);if(!o)return;const r=this.resolveAttributedBlockReference(o);if(r){e.preventDefault(),this.selectionSet.clear(),this.selectionSet.add(r.objectId),k.instance.sendStringToExecute("attedit");return}if(o instanceof p.AcDbMText){e.preventDefault(),await this.editMTextEntity(o);return}o instanceof p.AcDbText&&(e.preventDefault(),await this.editTextEntity(o))}resolveAttributedBlockReference(e){if(e instanceof p.AcDbBlockReference)return e.attributeIterator().count>0?e:void 0;if(e instanceof p.AcDbAttribute||e.type==="Attrib"||e.type==="Attribute"){const t=k.instance.curDocument.database.tables.blockTable.getEntityById(e.ownerId);if(t instanceof p.AcDbBlockReference&&t.attributeIterator().count>0)return t}}async editMTextEntity(e){const t=e.database;this.setEntitySceneVisible(e.objectId,!1),this._isDirty=!0;const i=e.resolveAnnotativePresentation,n=typeof i=="function"?i.call(e):null,o=(n==null?void 0:n.position)??e.location,r={x:o.x,y:o.y,z:o.z??0},a=(n==null?void 0:n.direction)??e.direction,l=(n==null?void 0:n.attachmentPoint)??e.attachmentPoint,c=n&&Number.isFinite(n.width)&&n.width>0?n.width:this.resolveMTextEditorWidth(e),d=n&&Number.isFinite(n.height)&&n.height>0?n.height:this.resolveMTextEditorTextHeight(e),h=new qt;let f=!1;try{const y=await h.open({view:this,location:r,width:c,textHeight:d,initialText:e.contents,initialAttachmentPoint:l,initialDrawingDirection:e.drawingDirection,rotation:e.rotation,directionVector:{x:a.x,y:a.y,z:a.z},textStyleName:e.styleName,initialLineSpaceFactor:e.lineSpacingFactor,toolbarFontFamilies:await this.getMTextToolbarFontFamilies()});if(!y)return;ui(t,"Edit MText",()=>{const g=t.openEntityForWrite(e);g instanceof p.AcDbMText&&(g.location=y.location,g.contents=y.contents,g.width=y.width,g.height=y.height,g.lineSpacingFactor=y.lineSpacingFactor,g.attachmentPoint=y.attachmentPoint)}),f=!0}finally{this.setEntitySceneVisible(e.objectId,!0),f||this.updateEntity(e),this._isDirty=!0}}async editTextEntity(e){const t=e.database;this.setEntitySceneVisible(e.objectId,!1),this._isDirty=!0;const i=Number(e.height),n=Number.isFinite(i)&&i>0?i:this.pixelsToWorldY(24),o=e.textString??"",r=Math.max(n*Math.max(o.length,1)*.6,n),a=Number(e.rotation),l=new qt;let c=!1;try{const d=await l.open({view:this,location:e.position,width:r,textHeight:n,initialText:o,initialAttachmentPoint:p.AcGiMTextAttachmentPoint.BaselineLeft,...Number.isFinite(a)?{rotation:a}:{},toolbarFontFamilies:await this.getMTextToolbarFontFamilies()});if(!d)return;ui(t,"Edit Text",()=>{const h=t.openEntityForWrite(e);h instanceof p.AcDbText&&(h.position=new p.AcGePoint3d(d.location),h.textString=d.contents,Number.isFinite(d.height)&&d.height>0&&(h.height=d.height))}),c=!0}finally{this.setEntitySceneVisible(e.objectId,!0),c||this.updateEntity(e),this._isDirty=!0}}resolveMTextEditorWidth(e){const t=Number(e.width);return Number.isFinite(t)&&t>0?t:0}resolveMTextEditorTextHeight(e){const t=Number(e.height);return Number.isFinite(t)&&t>0?t:this.pixelsToWorldY(24)}pixelsToWorldY(e){const t=this.screenToWorld({x:0,y:0}),i=this.screenToWorld({x:0,y:e});return Math.max(Math.abs(i.y-t.y),1e-4)}async getMTextToolbarFontFamilies(){const e=await k.instance.getAvaiableFonts()??[];return Array.from(new Set(e.flatMap(t=>t.name).map(t=>t.trim()).filter(t=>t.length>0)))}pick(e,t,i){e==null&&(e=this.curPos);const n=[],o=this._scene.activeLayout;if(!o)return n;const r=this.activeLayoutView,a=t??this.selectionBoxSize,l=r.pointToBox(e,a),c=Math.max(l.size.width/2,l.size.height/2),d=r.layoutBtrId!==this._scene.modelSpaceBtrId,h=(l.size.width+l.size.height)/2,f=[],y=new Set;if(d)for(const C of r.viewportViews)C.containsPaperPoint(e)&&!C.isNearPaperBorder(e,h)&&(f.push(C),y.add(C.viewport.id));const g=this._scene.search(l),b=r.resetRaycaster(e,c),w=D.AcTrMTextRenderer.getInstance(),S=new Set;g.forEach(C=>{if(y.has(C.id))return;const T=w.intersectMeshGlyphObjectId(C.id,b);!ts(C)&&!T||(o.isIntersectWith(C.id,b)||T)&&(n.push(C),S.add(C.id))});const x=w.queryMeshGlyphObjectIdsIntersectingBox({minX:l.min.x,minY:l.min.y,maxX:l.max.x,maxY:l.max.y});for(const C of x){if(S.has(C)||y.has(C)||!w.intersectMeshGlyphObjectId(C,b))continue;const T=w.getMeshGlyphWorldPickBoxes().get(C);n.push({id:C,minX:(T==null?void 0:T.min.x)??l.min.x,minY:(T==null?void 0:T.min.y)??l.min.y,maxX:(T==null?void 0:T.max.x)??l.max.x,maxY:(T==null?void 0:T.max.y)??l.max.y}),S.add(C)}f.length>0&&this.pickThroughViewports(e,l,f,n);const _=sL(n,e);return i?_.slice(0,1):_}getViewportCoordinateMapper(e){var i;let t;for(const n of((i=this.activeLayoutView)==null?void 0:i.viewportViews)??[])if(n.viewport.id===e){t=n;break}if(t)return{paperToModel:n=>t.paperPointToModel(n),modelToPaper:n=>t.modelPointToPaper(n),containsPaperPoint:n=>t.containsPaperPoint(n)}}pickThroughViewports(e,t,i,n){const o=this._scene.modelSpaceLayout;if(!o)return;const r=(t.size.width+t.size.height)/4;for(const a of i){const l=a.paperPointToModel(e),c=r*a.paperToModelScale;if(c<=0)continue;const d=new p.AcGeBox2d().setFromPoints([new p.AcGePoint2d(l.x-c,l.y-c),new p.AcGePoint2d(l.x+c,l.y+c)]),h=a.resetRaycaster(l,c);o.search(d).forEach(y=>{ts(y)&&o.isIntersectWith(y.id,h)&&n.push({...y,viewportId:a.viewport.id})})}}search(e,t){return this._scene.search(e,t)}select(e){const t=[];this.pick(e).forEach(o=>t.push(o.id));const n=this.selectableIds(t,"add");n.length>0&&this.selectionSet.add(n)}selectByBox(e){this.selectByBoxWithMode(e,"crossing","add")}refineCrossingSelectionHits(e,t){var o;const i=(o=k.instance.curDocument)==null?void 0:o.database;if(!i)return t.map(r=>r.id);const n=[];for(const r of t){if(!Ef(r)){n.push(r.id);continue}const a=new p.AcGeBox2d({x:r.minX,y:r.minY},{x:r.maxX,y:r.maxY});if(e.containsBox(a)){n.push(r.id);continue}const l=i.tables.blockTable.getEntityById(r.id);(!l||Pf(l,e))&&n.push(r.id)}return n}addLayer(e){this._scene.addLayer(this.toLayerInfo(e)),this._layerAppearance.syncFromLiveRecord(e),this._isDirty=!0}updateLayer(e,t){const{touchedObjectIds:i}=this._scene.updateLayer(this.toLayerInfo(e));if(this._layerAppearance.layerStyleMayHaveChanged(t)&&this._layerAppearance.syncFromLiveRecord(e),this._entityDisplay.layerVisibilityMayHaveChanged(t)){const n=this.toLayerInfo(e);(on.isLayerVisible(n)||!n.isFrozen)&&this.convertMissingEntitiesOnLayer(e.name)}for(const n of i)this.applySessionHiddenObjectState(n);this._isDirty=!0}addTransientEntity(e){const t=Array.isArray(e)?e:[e],i=this._convertEpoch,n=this._renderer.forceShowLineWeight;this._renderer.forceShowLineWeight=!0;const o=this._renderer.context;this._transientSkipMeshGlyphDepth++,o.skipMeshGlyphInstancing=!0;const r=()=>{this._transientSkipMeshGlyphDepth=Math.max(0,this._transientSkipMeshGlyphDepth-1),this._transientSkipMeshGlyphDepth===0&&(o.skipMeshGlyphInstancing=!1)};try{for(let a=0;a<t.length;++a){const l=t[a],c=String(l.objectId??""),d=c?(this._transientDrawGeneration.get(c)??0)+1:0;c&&(this._transientDrawGeneration.set(c,d),D.AcTrMTextRenderer.getInstance().removeMeshGlyphInstances(c));const h=this.drawEntity(l,!0);if(h){h.objectId=l.objectId,h.userData.skipMeshGlyphInstancing=!0;try{h.syncDraw()}catch(f){p.log.error("[AcTrView2d] Transient entity geometry failed:",f),h.dispose();continue}if(i!==this._convertEpoch){h.dispose();continue}if(c&&this._transientDrawGeneration.get(c)!==d){h.dispose();continue}this._scene.addTransientEntity(h),this._isDirty=!0}}}finally{this._renderer.forceShowLineWeight=n,r()}}removeTransientEntity(e){const t=String(e??"");t&&this._transientDrawGeneration.set(t,(this._transientDrawGeneration.get(t)??0)+1),this._scene.removeTransientEntity(e),this._isDirty=!0}setTransientEntityVisible(e,t){this._scene.setTransientEntityVisible(e,t)&&(this._isDirty=!0)}canCreateEntityPreview(e){return this._scene.canCreatePreview(e)}createEntityPreview(e){const t=this._scene.createPreview(e);return t&&(this._isDirty=!0),t}updateEntityPreview(e,t){this._scene.updatePreview(e,D.AcTrMatrixUtil.createMatrix4(t))&&(this._isDirty=!0)}removeEntityPreview(e){this._scene.removePreview(e)&&(this._isDirty=!0)}updateTransientPreviewTransforms(e){const t=this._scene.updateTransientPreviewTransforms(e.map(i=>({objectId:i.objectId,matrix:D.AcTrMatrixUtil.createMatrix4(i.matrix)})));t.webgl&&(this._isDirty=!0),t.html&&(this._htmlDirty=!0)}addEntity(e){var i;const t=Array.isArray(e)?e:[e];for(let n=0;n<t.length;n++){const o=(i=t[n])==null?void 0:i.ownerId;if(!o)continue;let r=this._scene.layouts.get(o);r||(this._scene.addEmptyLayout(o),r=this._scene.layouts.get(o)),r&&!r.isLoaded&&(r.isLoaded=!0)}this._numOfEntitiesToProcess+=t.length,this._convertQueue.push(...t),this.drainConvertQueue()}removeEntity(e){(Array.isArray(e)?e:[e]).forEach(i=>{this.releaseConvertClaim(i.objectId),this._scene.removeEntity(i.objectId)}),this._isDirty=!0}releaseConvertClaim(e){const t=String(e??"");t&&(this._claimedConvertObjectIds.delete(t),this._entityConvertGeneration.set(t,(this._entityConvertGeneration.get(t)??0)+1))}hasEntity(e){return this._scene.hasEntity(e)}isEntityConvertScheduled(e){const t=String(e??"");return t?this.hasEntity(e)||this._claimedConvertObjectIds.has(t):!1}getEntityVisible(e){return this._scene.getEntityVisible(e)}updateEntityVisibility(e){return this._scene.setEntityVisible(e.objectId,e.visibility)?(this._isDirty=!0,!0):!1}setEntitySceneVisible(e,t){return this._scene.setEntityVisible(e,t)?(this._isDirty=!0,!0):!1}applySessionHiddenObjectState(e){k.instance.curDocument.isObjectHidden(e)&&this._scene.setEntityVisible(e,!1)}updateEntity(e){const t=this.resolveSceneUpdateEntities(Array.isArray(e)?e:[e]);if(t.length===0)return;const i=t.map(n=>n.objectId).filter(n=>this.selectionSet.has(n));for(let n=0;n<t.length;++n){const o=t[n],r=String(o.objectId??"");r&&(this._entityConvertGeneration.set(r,(this._entityConvertGeneration.get(r)??0)+1),this._claimedConvertObjectIds.delete(r),D.AcTrMTextRenderer.getInstance().removeMeshGlyphInstances(r)),this._scene.hasEntity(o.objectId)&&this._scene.removeEntity(o.objectId)}(async()=>(await this.batchConvert(t),await this.waitUntilDeferredGeometryIdle(),i.length>0&&this.highlight(i),this._gripManager.refresh(),this._isDirty=!0))(),this._isDirty=!0,setTimeout(()=>{this._isDirty=!0},100)}resolveSceneUpdateEntities(e){var o;const t=(o=k.instance.curDocument)==null?void 0:o.database,i=[],n=new Set;for(const r of e){let a=r;if(r instanceof p.AcDbAttribute){const l=t==null?void 0:t.tables.blockTable.getEntityById(r.ownerId);if(!(l instanceof p.AcDbBlockReference))continue;a=l}n.has(a.objectId)||(n.add(a.objectId),i.push(a))}return i}addLayout(e){this._scene.addEmptyLayout(e.blockTableRecordId),this.createLayoutViewIfNeeded(e.blockTableRecordId),this._isDirty=!0}markLayoutAsInitialized(e){this._initializedLayouts.add(e),this._externallyFramedLayouts.add(e)}setOpenViewMode(e){this._openViewMode=e}isLayoutInitialized(e){return this._initializedLayouts.has(e)}getDrawingExtents(){const e=this._scene.box;if(e&&!e.isEmpty())return mu.threeBox3dToGeBox2d(e)}applyInitialZoom(e,t){new jo(()=>!this.isProcessingEntities,()=>{if(this._externallyFramedLayouts.delete(e))return;const n=this.resolveFirstVisitFrameBox(e,t);n&&this.zoomTo(n),this._isDirty=!0,yi.rememberOriginalView(this,e)},300,0).start()}resolveFirstVisitFrameBox(e,t){var d,h;const i=e===this.modelSpaceBtrId,n=this._openViewMode===_t.Saved;if(n&&i){const f=k.instance.curDocument.database,y=this.width/Math.max(this.height,1),g=f.tables.viewportTable.getActiveVportBox(y);if(g)return g}const o=this._layoutViewManager.getAt(e),r=t.extents,a=r&&!r.isEmpty()?{min:{x:r.min.x,y:r.min.y},max:{x:r.max.x,y:r.max.y}}:void 0,l=this.getDrawingExtents(),c=o==null?void 0:o.viewportsBoundingBox;return n&&!i?(d=kr({limits:t.limits,viewportsBox:c,layoutExtents:a,entityBox:l}))==null?void 0:d.box:(h=kr({limits:void 0,viewportsBox:i?void 0:c,layoutExtents:a,entityBox:l}))==null?void 0:h.box}abortConversion(){this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this.clearMeshGlyphFlushTimer(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.cancelOpenLineworkFrame(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0}clear(){this.abortConversion(),this._scene.clear(),D.AcTrMTextRenderer.getInstance().resetMeshGlyphBatch(),this._renderer.resetDrawOrderZ(),this._isDirty=!0,this._missedImages.clear(),this._initializedLayouts.clear(),this._externallyFramedLayouts.clear(),this._openViewMode=_t.Extents,this._loadingLayouts.clear(),this._renderer.dispose(),p.AcDbRenderingCache.instance.clear(),Q.emit("missed-data-changed",{})}captureSessionState(){return this.clearMeshGlyphFlushTimer(),{scene:this._scene,layoutViewManager:this._layoutViewManager,initializedLayouts:this._initializedLayouts,externallyFramedLayouts:this._externallyFramedLayouts,openViewMode:this._openViewMode,loadingLayouts:this._loadingLayouts,missedImages:this._missedImages,missedFonts:this._renderer.snapshotMissedFonts(),selectionIds:this.selectionSet.ids,meshGlyphBatch:D.AcTrMTextRenderer.getInstance().detachMeshGlyphBatch()}}restoreSessionState(e){this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this.clearMeshGlyphFlushTimer(),this.cancelOpenLineworkFrame(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0,this._scene=e.scene,this._layoutViewManager=e.layoutViewManager,this._initializedLayouts=e.initializedLayouts,this._externallyFramedLayouts=e.externallyFramedLayouts,this._openViewMode=e.openViewMode??_t.Extents,this._loadingLayouts=e.loadingLayouts,this._missedImages=e.missedImages,this._renderer.replaceMissedFonts(e.missedFonts??{}),D.AcTrMTextRenderer.getInstance().attachMeshGlyphBatch(e.meshGlyphBatch),this.rebindLayerAppearance(),this._layoutViewManager.resize(this.width,this.height),this.selectionSet.clear(),e.selectionIds.length>0&&this.selectionSet.add(e.selectionIds),this._isDirty=!0,Q.emit("missed-data-changed",{})}beginNewSession(){const e=this.captureSessionState();return this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this.cancelOpenLineworkFrame(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0,this._scene=this.createScene(),this._layoutViewManager=new yu,this._initializedLayouts=new Set,this._externallyFramedLayouts=new Set,this._openViewMode=_t.Extents,this._loadingLayouts=new Set,this._missedImages=new Map,this._renderer.clearMissedFonts(),this.rebindLayerAppearance(),this.selectionSet.clear(),this._isDirty=!0,Q.emit("missed-data-changed",{}),e}disposeSessionState(e){e.meshGlyphBatch.dispose(),e.scene.clear(),e.layoutViewManager=new yu,e.initializedLayouts.clear(),e.externallyFramedLayouts.clear(),e.loadingLayouts.clear(),e.missedImages.clear(),e.missedFonts={},e.selectionIds=[]}rebindLayerAppearance(){this._layerAppearance=new Gl(this._scene,this._renderer)}isActiveManagedView(){var i;const t=(i=k._instance)==null?void 0:i.curView;return t!=null&&t===this}focusViewerForShortcuts(){const e=document.activeElement;e instanceof Node&&this.container.contains(e)||e instanceof HTMLElement&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)||this.container.focus({preventScroll:!0})}isShortcutEventInsideViewer(e){const t=e.target;if(t instanceof Node&&this.container.contains(t))return!0;const i=document.activeElement;return i instanceof Node&&this.container.contains(i)}async drainConvertQueue(){if(this._convertDrainPromise){await this._convertDrainPromise,this._convertQueue.length>0&&await this.drainConvertQueue();return}this._convertDrainPromise=this.runConvertDrain().finally(()=>{this._convertDrainPromise=null}),await this._convertDrainPromise}async runConvertDrain(){const e=this._convertEpoch,t=this._cooperativeYield;let i=t?this.activeLayoutBtrId===this.modelSpaceBtrId?de.CONVERT_SLICE_MAX:1:Number.POSITIVE_INFINITY,n=performance.now(),o=YE(this._convertQueue.splice(0,this._convertQueue.length),this.activeLayoutBtrId);for(this.repairViewportViewsFor(o.activeOwnerId);o.cursor<o.pending.length||this._convertQueue.length>0;){if(this._convertEpoch!==e)return;const r=this._convertQueue.splice(0,this._convertQueue.length),a=this.activeLayoutBtrId,l=a!==o.activeOwnerId;if(o=ZE(o,r,a),l&&(this.repairViewportViewsFor(a),t&&(i=1)),this.flushViewportViewRepairs(),o.cursor>=o.pending.length)break;const c=Math.min(o.pending.length,o.cursor+i),d=performance.now();if(await this.batchConvert(o.pending.slice(o.cursor,c)),o.cursor=c,this._convertEpoch!==e)return;if(!t)continue;const h=performance.now()-d,f=o.activeOwnerId===this.modelSpaceBtrId,y=this._progressiveRendering?de.PROGRESSIVE_OPEN_YIELD_BUDGET_MS:de.OPEN_CONVERT_YIELD_BUDGET_MS,g=f?y:de.CONVERT_SLICE_BUDGET_MS;if(i=qE({slice:i,tookMs:h,budgetMs:g,maxSlice:de.CONVERT_SLICE_MAX,activeLayoutPending:!f&&XE(o)}),this._progressiveRendering&&this.isProgressiveGesturePauseActive()){for(await new Promise(b=>setTimeout(b,0));performance.now()<this._progressiveInputPauseUntil;)await new Promise(b=>setTimeout(b,16));if(n=performance.now(),this._convertEpoch!==e)return}else if(this._progressiveRendering&&this.isProgressiveDiscreteInputPending()){if(await new Promise(b=>setTimeout(b,0)),n=performance.now(),this._convertEpoch!==e)return}else if(performance.now()-n>=g&&(await new Promise(b=>setTimeout(b,0)),n=performance.now(),this._convertEpoch!==e))return}this.repairViewportViewsFor(this.activeLayoutBtrId),this.flushViewportViewRepairs()}repairViewportViewsFor(e){var i;if(!e||e===this.modelSpaceBtrId)return;const t=this._layoutViewManager.getAt(e);if(!t||t.viewportCount>0){t&&t.viewportCount>0&&this._viewportRepairOwnerIds.delete(e);return}try{const n=(i=k.instance.curDocument)==null?void 0:i.database,o=n==null?void 0:n.tables.blockTable.getIdAt(e);if(!o)return;const r=t.viewportCount;this.ensureViewportViews(o,t),t.viewportCount>r&&(this._isDirty=!0),this._viewportRepairOwnerIds.delete(e)}catch(n){p.log.error("[AcTrView2d] Error repairing viewport views:",n)}}flushViewportViewRepairs(){if(this._viewportRepairOwnerIds.size===0)return;const e=Array.from(this._viewportRepairOwnerIds);for(let t=0;t<e.length;t++)this.repairViewportViewsFor(e[t])}markProgressiveDirty(e=!1){const t=performance.now();(e||t-this._lastProgressivePaintAt>=de.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS)&&(this._isDirty=!0)}markInteractiveOpenDirty(){this._progressiveRendering||!this._cooperativeYield||(this._isDirty=!0)}shouldCountMidOpenPaint(e,t){return this._progressiveRendering&&e||!this._progressiveRendering&&this._cooperativeYield&&t}highlight(e){this.entitySelectionEnabled&&(this._isDirty=this._scene.select(e))}unhighlight(e){this._isDirty=this._scene.unselect(e)}setCompareDisplay(e,t){var o,r,a,l;const i=e.baseColor??((o=e.colors)==null?void 0:o.unchanged)??10265519,n={enabled:e.enabled,baseColor:i,colors:{deleted:(r=e.colors)==null?void 0:r.deleted,added:(a=e.colors)==null?void 0:a.added,modified:(l=e.colors)==null?void 0:l.modified},overrides:e.overrides};t?t.setCompareDisplay(n):this._scene.setCompareDisplay(n),this._isDirty=!0}stopAnimationLoop(){this._rafId!=null&&(cancelAnimationFrame(this._rafId),this._rafId=null)}dispose(){var t,i,n;if(this._viewDisposed)return;this._viewDisposed=!0,this.abortConversion(),(t=this._disposeCanvasTouchCallout)==null||t.call(this),this._disposeCanvasTouchCallout=void 0,(i=this._disposeProgressiveInputWatch)==null||i.call(this),this._disposeProgressiveInputWatch=void 0,(n=this._disposeMobileBoxGesture)==null||n.call(this),this._disposeMobileBoxGesture=void 0,this._viewDomAbort.abort(),this._onFontNotFound&&this._renderer.events.fontNotFound.removeEventListener(this._onFontNotFound),this._onFontLoaded&&this._renderer.events.fontLoaded.removeEventListener(this._onFontLoaded),this._onSysVarChanged&&p.AcDbSysVarManager.instance().events.sysVarChanged.removeEventListener(this._onSysVarChanged),this._onSettingsModified&&le.instance.events.modified.removeEventListener(this._onSettingsModified),this._onLayoutSwitched&&p.acdbHostApplicationServices().layoutManager.events.layoutSwitched.removeEventListener(this._onLayoutSwitched),this._onCommandWillStartHitTest&&this.editor.events.commandWillStart.removeEventListener(this._onCommandWillStartHitTest),this._onCommandEndedHitTest&&this.editor.events.commandEnded.removeEventListener(this._onCommandEndedHitTest),this._gripManager.dispose(),this.clearFontLoadedRedrawTimer(),this.cancelOpenLineworkFrame(),this.stopAnimationLoop(),this.selectionSet.clear(),this.htmlTransientManager.dispose(),this._scene.clear(),this._renderer.dispose(),p.AcDbRenderingCache.instance.clear();const e=this._renderer.internalRenderer;e.dispose(),e.forceContextLoss(),this.canvas.remove(),this._css2dRenderer.domElement.remove(),this._stats.dom.remove(),super.dispose()}onHover(e){this.entitySelectionEnabled&&(this._isDirty=this._scene.hover([e]))}onUnhover(e){this._isDirty=this._scene.unhover([e])}createScene(){return new _p}createStats(e){const t=new Rx;document.body.appendChild(t.dom);const i=t.dom;return i.style.position="fixed",i.style.inset="unset",i.style.bottom="30px",i.style.right="0px",this.toggleStatsVisibility(t,e),t}onWindowResize(){this.refreshViewSize(),this._renderer.setSize(this.width,this.height),this._css2dRenderer.setSize(this.width,this.height),this._layoutViewManager.resize(this.width,this.height),this._isDirty=!0,this.events.viewResize.dispatch({width:this.width,height:this.height}),this.events.viewChanged.dispatch()}startAnimationLoop(){this._rafId==null&&(this._rafId=requestAnimationFrame(this.animate))}createLayoutViewIfNeeded(e){let t=this._layoutViewManager.getAt(e);return t==null&&(t=new nL(this._renderer,e,this.width,this.height),t.events.viewChanged.addEventListener(()=>{this._progressiveOpenFit.onLayoutViewChanged(),this._isDirty=!0,this._progressiveRendering&&this._numOfEntitiesToProcess>0&&(this._progressivePaintUrgent=!0),this.events.viewChanged.dispatch(),this.clearHover()}),this._layoutViewManager.add(t)),this.flushViewportViewRepairs(),t}loadLayoutEntitiesIfNeeded(e){try{const i=k.instance.curDocument.database.tables.blockTable.getIdAt(e);if(!i)return;const n=this._scene.layouts.get(e);if(n&&n.isLoaded){this.repairViewportViewsFor(e);return}if(this._loadingLayouts.has(e))return;if(this.repairViewportViewsFor(e),n&&n.entityCount>0){n.isLoaded=!0;return}n||this._scene.addEmptyLayout(e);const o=[],r=i.newIterator();for(const l of r)o.push(l);if(o.length===0){const l=this._scene.layouts.get(e);l&&(l.isLoaded=!0);return}this._loadingLayouts.add(e),this._numOfEntitiesToProcess+=o.length,(async()=>{try{this._progressiveRendering?(this._convertQueue.push(...o),await this.drainConvertQueue()):await this.batchConvert(o);const l=this._scene.layouts.get(e);l&&(l.isLoaded=!0)}finally{this._loadingLayouts.delete(e)}})()}catch(t){p.log.error("[AcTrView2d] Error loading layout entities:",t)}}toggleStatsVisibility(e,t){t?e.dom.style.display="block":e.dom.style.display="none"}toLayerInfo(e){return{name:e.name,isFrozen:e.isFrozen,isOff:e.isOff,color:e.color}}resolveLayerInfo(e){const t=k.instance.curDocument.database.tables.layerTable.getAt(e);return t?this.toLayerInfo(t):void 0}async convertMissingEntitiesOnLayer(e){if(!this._convertingLayers.has(e)){this._convertingLayers.add(e);try{const i=k.instance.curDocument.database.tables.blockTable.getIdAt(this.activeLayoutBtrId);if(!i)return;const n=this._entityDisplay.collectMissingEntitiesOnLayer(e,i,o=>this.hasEntity(o));if(n.length===0)return;this._numOfEntitiesToProcess+=n.length,await this.batchConvert(n)}finally{this._convertingLayers.delete(e)}}}drawEntity(e,t){return e.worldDraw(this._renderer,t)}startTextStyleFontPreload(e){var y,g;const t=this._convertEpoch;if(this._textStyleFontPreloadEpoch===t&&this._textStyleFontPreloadPromise)return;this._textStyleFontPreloadEpoch=t;const i=Jv(e),n=$.FontManager.instance.getFontsToLoad(),o=[...$.FontManager.instance.defaultFonts][0],r=Qv(i,n,{firstDefaultFont:o}),l=D.AcTrMTextRenderer.getInstance().getRenderMode()==="worker"?"worker":"main",c=k,d=(g=(y=c._instance)==null?void 0:y.lastPresetFontsForOpen)!=null&&g.length?[...c._instance.lastPresetFontsForOpen]:[...n];if(this._fontPreloadDiag={critical:[...r.critical],workerWarm:[],background:[],preset:d,workerSkipped:0,parseSite:l},l==="worker"){this._textStyleFontPreloadPromise=Promise.resolve();return}const h=3e4;if(r.critical.length===0){this._textStyleFontPreloadPromise=Promise.resolve();return}const f=$.FontManager.instance.requestFonts(r.critical);this._textStyleFontPreloadPromise=new Promise(b=>{const w=setTimeout(()=>{b()},h);f.then(()=>{clearTimeout(w),b()},()=>{clearTimeout(w),b()})})}async awaitTextStyleFontsReady(){if(!this._textStyleFontPreloadPromise){const e=this._renderer.context.database;if(e)this.startTextStyleFontPreload(e);else return}await this._textStyleFontPreloadPromise}async finishEntityGeometry(e,t){const i=performance.now();try{const n=e instanceof D.AcTrGroup,o=n&&this.groupHasPendingGlyphGeometry(e);(o||D.hasPendingComplexLineTypeGlyphs(e)||e instanceof D.AcTrGlyphEntity&&!e.hasDrawableGeometry())&&await this.ensureDeferredFontsReady();const a=()=>{this._convertPhaseMs.glyphEntityCount++,e instanceof D.AcTrMText?this._convertPhaseMs.mtextCount++:e instanceof D.AcTrShape&&this._convertPhaseMs.shapeCount++};if(n){if(!o)return;a();const c=performance.now();await e.asyncDraw(),this._convertPhaseMs.finishGeometryAsyncDraw+=performance.now()-c;return}if(D.hasPendingComplexLineTypeGlyphs(e)){a();const c=performance.now();await e.asyncDraw(),this._convertPhaseMs.finishGeometryAsyncDraw+=performance.now()-c;return}if(e.hasDrawableGeometry())return;a();const l=performance.now();await e.asyncDraw(),this._convertPhaseMs.finishGeometryAsyncDraw+=performance.now()-l}finally{this._convertPhaseMs.finishGeometry+=performance.now()-i}}needsDeferredFontGeometry(e){return e instanceof D.AcTrGlyphEntity?!e.hasDrawableGeometry():e instanceof D.AcTrGroup?this.groupHasPendingGlyphGeometry(e):D.hasPendingComplexLineTypeGlyphs(e)}clearFontLoadedRedrawTimer(){this._fontLoadedRedrawTimer!=null&&(clearTimeout(this._fontLoadedRedrawTimer),this._fontLoadedRedrawTimer=null)}scheduleGlyphRedrawAfterFontLoad(e){this.clearFontLoadedRedrawTimer();const t=this._convertEpoch;this._fontLoadedRedrawTimer=setTimeout(()=>{this._fontLoadedRedrawTimer=null,t===this._convertEpoch&&this.redrawGlyphEntitiesAfterFontLoad(t,e)},50)}async redrawGlyphEntitiesAfterFontLoad(e,t){var a,l;if(e!==this._convertEpoch)return;const i=++this._fontLoadedRedrawEpoch,n=[];for(const c of this._scene.layouts.values())c.layers.forEach(d=>{d.internalObject.traverse(h=>{h instanceof D.AcTrGlyphEntity&&n.push(h)})});for(const c of n){if(e!==this._convertEpoch||i!==this._fontLoadedRedrawEpoch)return;await c.asyncDraw()}if(n.length>0){e===this._convertEpoch&&(this._isDirty=!0);return}if(t){const c=$.FontManager.instance.defaultFonts,d=t.toLowerCase();if(c.has(t)||c.has(d)||[...c].some(h=>h.toLowerCase()===d))return}if(e!==this._convertEpoch||i!==this._fontLoadedRedrawEpoch||this._entityProcessingIdleAt<=0)return;const o=performance.now()-this._entityProcessingIdleAt;if(!aL(this.isProcessingEntities,0,o))return;const r=(l=(a=k.instance)==null?void 0:a.curDocument)==null?void 0:l.database;r&&r.regen()}groupHasPendingGlyphGeometry(e){for(const t of e.getSourceEntities())if(t instanceof D.AcTrGlyphEntity&&!t.hasDrawableGeometry())return!0;return de.directChildrenHavePendingGlyphs(e)}static directChildrenHavePendingGlyphs(e){const t=e.children;for(let i=0;i<t.length;i++){const n=t[i];if(n instanceof D.AcTrGlyphEntity){if(!n.hasDrawableGeometry())return!0;continue}if(n instanceof D.AcTrGroup){for(const o of n.getSourceEntities())if(o instanceof D.AcTrGlyphEntity&&!o.hasDrawableGeometry())return!0;if(de.directChildrenHavePendingGlyphs(n))return!0;continue}if(n instanceof D.AcTrEntity&&de.directChildrenHavePendingGlyphs(n))return!0}return!1}enqueueDeferredGeometry(e,t){t===this._convertEpoch&&(this._pendingGeometryJobs++,this._deferredGeometryQueue.push({run:e,epoch:t,enqueuedAt:performance.now()}),this.pumpDeferredGeometryQueue())}pumpDeferredGeometryQueue(){for(;this._deferredGeometryActive<de.DEFERRED_GEOMETRY_CONCURRENCY&&this._deferredGeometryQueue.length>0;){const e=this._deferredGeometryQueue.shift();if(e.epoch!==this._convertEpoch){this._pendingGeometryJobs=Math.max(0,this._pendingGeometryJobs-1);continue}this._convertPhaseMs.finishGeometryQueueWait+=performance.now()-e.enqueuedAt,this._deferredGeometryActive++,e.run().then(()=>{e.epoch===this._convertEpoch&&(this._progressiveRendering||this._cooperativeYield)&&(this._isDirty=!0)}).catch(t=>{p.log.error("[AcTrView2d] Deferred entity geometry failed:",t)}).finally(()=>{this._deferredGeometryActive=Math.max(0,this._deferredGeometryActive-1),e.epoch===this._convertEpoch&&(this._pendingGeometryJobs=Math.max(0,this._pendingGeometryJobs-1),this._pendingGeometryJobs===0&&(this._isDirty=!0),this.stampEntityProcessingIdle()),this.pumpDeferredGeometryQueue()})}}resetDeferredGeometryQueue(){this._deferredGeometryQueue.length=0,this._pendingGeometryJobs=0,this._textStyleFontPreloadPromise=null,this._textStyleFontPreloadEpoch=-1,this._deferredFontsReady=null,this._fontPreloadDiag=null}async waitUntilDeferredGeometryIdle(){const e=this._convertEpoch;for(;e===this._convertEpoch&&this._pendingGeometryJobs>0;)await new Promise(t=>setTimeout(t,0))}attachViewportView(e){if(D.AcTrViewportView.isDefaultPaperSpaceViewport(e))return;const t=e.ownerId,i=t?this._layoutViewManager.getAt(t):void 0;if(!i){t&&this._viewportRepairOwnerIds.add(t);return}i.addViewport(new D.AcTrViewportView(i,this.toGiViewportWithFrozenLayers(e),this._renderer)),this._isDirty=!0}ensureViewportViews(e,t){const i=e.newIterator();for(const n of i){if(!(n instanceof p.AcDbViewport)||D.AcTrViewportView.isDefaultPaperSpaceViewport(n))continue;const o=new D.AcTrViewportView(t,this.toGiViewportWithFrozenLayers(n),this._renderer);t.addViewport(o)}}toGiViewportWithFrozenLayers(e){var r;const t=e.toGiViewport();if(t.frozenLayers&&t.frozenLayers.length>0)return t;const i=e.frozenLayerIds;if(!(i!=null&&i.length))return t;const n=[],o=(r=e.database)==null?void 0:r.tables.layerTable;if(o)for(const a of i){const l=o.getIdAt(a);l&&n.push(l.name)}return t.frozenLayerIds=[...i],t.frozenLayers=n,t}async batchConvert(e,t={}){const i=this._convertEpoch;if(!t.forExport&&!this._textStyleFontPreloadPromise){const l=this._renderer.context.database;l&&this.startTextStyleFontPreload(l)}const n=this._progressiveRendering&&!t.forExport,o=n?de.PROGRESSIVE_OPEN_YIELD_BUDGET_MS:de.OPEN_CONVERT_YIELD_BUDGET_MS,r=t.forExport||!this._cooperativeYield?void 0:new p.AcCmUiYieldGate(o),a=()=>new Promise(l=>setTimeout(l,0));for(let l=0;l<e.length;++l){const c=e[l];try{if(i!==this._convertEpoch||c instanceof p.AcDbViewport&&D.AcTrViewportView.isDefaultPaperSpaceViewport(c)||!(t.forExport||this._convertInvisibleLayers?this._entityDisplay.shouldConvertForExport(c):this._entityDisplay.shouldConvert(c)))continue;const h=String(c.objectId??"");let f=0;if(h&&(this.hasEntity(h)||this._claimedConvertObjectIds.has(h))){c instanceof p.AcDbViewport&&this.attachViewportView(c);continue}h&&(this._claimedConvertObjectIds.add(h),f=this._entityConvertGeneration.get(h)??0);const y=D.tryBuildDirectEntityMeta(c,this._renderer);if(y){let b=!1,w=!1;try{h&&(this._entityConvertGeneration.get(h)??0)!==f?w=!0:(b=this._scene.addDirectEntity(y,D.shouldExtendBboxForDirectEntity(c)),b&&(this.applySessionHiddenObjectState(c.objectId),n?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents(),l)):this.markInteractiveOpenDirty()))}finally{y.geometry.dispose()}if(w||b)continue}const g=this.drawEntity(c,!1);if(!g&&!(c instanceof p.AcDbViewport)){h&&this._claimedConvertObjectIds.delete(h);continue}if(g){g.objectId=c.objectId,g.ownerId=c.ownerId,g.layerName=c.layer,g.visible=c.visibility!==!1,g instanceof D.AcTrGroup&&g.isOnTheSameLayer&&(g.userData.insertLayerName=g.layerName);const b=g instanceof D.AcTrGroup&&!g.isOnTheSameLayer,w=!t.forExport&&this.needsDeferredFontGeometry(g);if(b)w?this.enqueueDeferredGeometry(()=>this.handleGroup(g,n,i,f),i):await this.handleGroup(g,n,i,f);else{const S=!(c instanceof p.AcDbRay||c instanceof p.AcDbXline),x=async()=>{if(await this.finishEntityGeometry(g,n),i!==this._convertEpoch){g.dispose();return}if(h&&(this._entityConvertGeneration.get(h)??0)!==f){g.dispose();return}g instanceof D.AcTrGroup&&(this.syncGroupSpatialBoundsForIndexing(g),g.isOnTheSameLayer&&this._inheritedLayerMaterialMapper.remap(g.children,"0",g.layerName));const _=performance.now();this._scene.addEntity(g,S),this._convertPhaseMs.addEntity+=performance.now()-_,this.applySessionHiddenObjectState(c.objectId),g.dispose(),n?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents(),l)):this.markInteractiveOpenDirty()};w?this.enqueueDeferredGeometry(x,i):await x()}}if(i!==this._convertEpoch)continue;if(c instanceof p.AcDbViewport)this.attachViewportView(c);else if(c instanceof p.AcDbRasterImage){const b=c.imageFileName;b&&!c.image?this._missedImages.set(c.objectId,b):c.image&&this._missedImages.delete(c.objectId)}}catch(d){const h=String(c.objectId??"");h&&this._claimedConvertObjectIds.delete(h),p.log.error(`[AcTrView2d] Failed to convert entity ${c.objectId} (${c.type}):`,d)}finally{i===this._convertEpoch&&this.decreaseNumOfEntitiesToProcess()}i===this._convertEpoch&&(n?await this.progressiveYieldForInput(r,a):r&&await r.maybeYield(a)&&this._progressiveYieldCount++)}}syncGroupSpatialBoundsForIndexing(e){const t=e.peekLazyChildBoxes();if(t&&t.boxes.length>0){const o=e.userData;o.lazySpatialChildren=t;return}if(e.refreshWcsChildBoxesFromChildren(),e.wcsChildBoxes.length===0)return;const i=e.wcsChildBoxes.map(o=>({minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:o.id}));e.wcsBbox=zl(e);const n=e.userData;n.spatialIndexChildBoxes=i}async handleGroup(e,t,i=this._convertEpoch,n=0){const o=performance.now();try{if(await this.finishEntityGeometry(e,t),i!==this._convertEpoch){e.dispose();return}const r=String(e.objectId??"");if(r&&(this._entityConvertGeneration.get(r)??0)!==n){e.dispose();return}this.syncGroupSpatialBoundsForIndexing(e);const a=e.children,l=new Map;a.forEach(x=>{var C;if(x.visible===!1)return;const _=x.userData.layerName;l.has(_)||l.set(_,[]),(C=l.get(_))==null||C.push(x)}),e.children=[];for(const x of a)x.parent=null;const c=e.renderContext,d=e.objectId,h=e.layerName,f=e.userData.lazySpatialChildren;process.env.NODE_ENV!=="production"&&!f&&p0(e);const y=f?[]:e.wcsChildBoxes.map(x=>({minX:x.minX,minY:x.minY,maxX:x.maxX,maxY:x.maxY,id:x.id})),g=f?e.wcsBbox.clone():y.length>0?zl(e):e.wcsBbox.clone();y.length>0&&(e.wcsBbox=g.clone());let b=!1;const w=()=>new Promise(x=>setTimeout(x,0));let S=t?performance.now():0;for(const[x,_]of l){const C=x==="0"?h:x,T=_.some(A=>(A.userData.authoredLayerName??x)==="0")?"0":x;this._inheritedLayerMaterialMapper.remap(_,T,C);const L=new D.AcTrEntity(c);L.matrix.copy(e.matrix),L.matrixAutoUpdate=!1,L.matrixWorldNeedsUpdate=!0,L.objectId=d,L.ownerId=e.ownerId,L.layerName=C,L.userData.insertLayerName=h,L.wcsBbox=g.clone();const N=L.userData;!b&&f?(L.userData.lazySpatialChildren=f,b=!0):!b&&y.length>0&&(N.spatialIndexChildBoxes=y,b=!0);for(let A=0;A<_.length;A++)L.add(_[A]);L.updateMatrixWorld(!0),this._layerAppearance.refreshTextMaterialsInObjectTree(L);const B=performance.now();this._scene.addEntity(L,!0),this._convertPhaseMs.addEntity+=performance.now()-B,this.applySessionHiddenObjectState(d),L.dispose(),t&&i===this._convertEpoch&&performance.now()-S>=de.PROGRESSIVE_OPEN_YIELD_BUDGET_MS&&(await w(),S=performance.now())}e.dispose(),t?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents())):this.markInteractiveOpenDirty()}finally{this._convertPhaseMs.handleGroup+=performance.now()-o}}decreaseNumOfEntitiesToProcess(){this._numOfEntitiesToProcess--,this._numOfEntitiesToProcess<0?(this._numOfEntitiesToProcess=0,p.log.warn("Something wrong! The number of entities to process should not be less than 0.")):this._numOfEntitiesToProcess===0&&(this._isDirty=!0,Q.emit("missed-data-changed",{})),this.stampEntityProcessingIdle()}frameOpenLineworkIfReady(){if(!this._openLineworkFramePending||this.isConvertingEntities)return;const e=this.getDrawingExtents();if(!e||e.isEmpty()){this._openLineworkFramePending=!1;return}this._openLineworkFramePending=!1,this._progressiveOpenFit.frameProgrammatically(e)}stampEntityProcessingIdle(){this._numOfEntitiesToProcess===0&&this._pendingGeometryJobs===0&&(this._entityProcessingIdleAt=performance.now(),this.scheduleMeshGlyphWorldBatchFlush(),p.AcDbRenderingCache.instance.clear())}clearMeshGlyphFlushTimer(){this._meshGlyphFlushTimer!=null&&(clearTimeout(this._meshGlyphFlushTimer),this._meshGlyphFlushTimer=null)}scheduleMeshGlyphWorldBatchFlush(){if(!D.AcTrMTextRenderer.getInstance().getMeshGlyphInstancing())return;this.clearMeshGlyphFlushTimer();const t=this._convertEpoch;this._meshGlyphFlushTimer=setTimeout(()=>{this._meshGlyphFlushTimer=null,t===this._convertEpoch&&(this._numOfEntitiesToProcess>0||this._pendingGeometryJobs>0||this.flushMeshGlyphWorldBatch())},16)}flushMeshGlyphWorldBatch(){this.clearMeshGlyphFlushTimer();const e=D.AcTrMTextRenderer.getInstance();if(!e.getMeshGlyphInstancing())return;const{placements:t,buckets:i}=e.flushMeshGlyphInstances(this._scene.internalScene,n=>this.resolveMeshGlyphLayerParent(n));t>0&&(console.log(`[cad-simple-viewer-cli] mesh glyph InstancedMesh flush: placements=${t} buckets=${i}`),this._isDirty=!0)}resolveMeshGlyphLayerParent(e){var i;const t=(i=this._scene.activeLayout)==null?void 0:i.getLayer(e);if(t)return t.internalObject;for(const n of this._scene.layouts.values()){const o=n.getLayer(e);if(o)return o.internalObject}return null}};de.OPEN_CONVERT_YIELD_BUDGET_MS=300,de.PROGRESSIVE_OPEN_YIELD_BUDGET_MS=32,de.PROGRESSIVE_INPUT_PAUSE_MS=120,de.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS=2500,de.NON_PROGRESSIVE_OPEN_PAINT_INTERVAL_MS=4e3,de.DEFERRED_GEOMETRY_CONCURRENCY=8,de.CONVERT_SLICE_BUDGET_MS=64,de.CONVERT_SLICE_MAX=512;let Mn=de;function lL(s){if(!s)return!1;const e=Object.keys(s);return e.length>0&&e.every(t=>t==="visibility")}function cL(s,e,t){const{entity:i,changes:n}=s,o=i.objectId;if(!e(o))return!1;if(lL(n))return!(n.visibility===!0&&t(o)===void 0);if(n&&Object.keys(n).length>0)return!1;const r=t(o);return r===void 0?!1:r&&!i.visibility}function yx(s){return Array.isArray(s)?s:[s]}class Ea{constructor(e,t){this._active=!0,this._disposers=[],this._view=e,this._doc=t;const i=(n,o)=>{n.addEventListener(o),this._disposers.push(()=>n.removeEventListener(o))};i(t.database.events.entityAppended,n=>{if(!this._active)return;const o=yx(n.entity).filter(r=>{if(this.view.hasEntity(r.objectId))return!1;const a=t.database.tables.blockTable.getIdAt(r.ownerId);return!!(a&&(a.isModelSapce||a.isPaperSapce))});o.length!==0&&this.view.addEntity(o.length===1?o[0]:o)}),i(t.database.events.entityModified,n=>{if(!this._active)return;const o=n,r=this.view;r instanceof Mn&&cL(o,a=>r.hasEntity(a),a=>r.getEntityVisible(a))&&r.updateEntityVisibility(o.entity)||this.view.updateEntity(o.entity)}),i(t.database.events.entityErased,n=>{if(!this._active)return;const o=yx(n.entity).filter(r=>this.view.hasEntity(r.objectId));o.length!==0&&this.view.removeEntity(o.length===1?o[0]:o)}),i(t.database.events.layerAppended,n=>{this._active&&this._view.addLayer(n.layer)}),i(t.database.events.layerModified,n=>{this._active&&this._view.updateLayer(n.layer,n.changes)}),i(p.AcDbSysVarManager.instance().events.sysVarChanged,n=>{if(!(!this._active||n.database!==this._doc.database)){if(n.name==p.AcDbSystemVariables.PDMODE.toLowerCase()||n.name==p.AcDbSystemVariables.PDSIZE.toLowerCase())this._view.rerenderPoints(n.database.pdmode,n.database.pdsize);else if(n.name==p.AcDbSystemVariables.LWDISPLAY.toLowerCase()){const o=this._view,r=!!n.database.lwdisplay;o.renderer.showLineWeight!==r&&(o.renderer.showLineWeight=r,o.clear(),n.database.regen())}}}),i(t.database.events.dictObjetSet,n=>{this._active&&n.object instanceof p.AcDbLayout&&this._view.addLayout(n.object)}),i(e.selectionSet.events.selectionAdded,n=>{this._active&&e.highlight(n.ids)}),i(e.selectionSet.events.selectionRemoved,n=>{this._active&&e.unhighlight(n.ids)})}get view(){return this._view}get doc(){return this._doc}get isActive(){return this._active}suspend(){this._active=!1}resume(){this._active=!0}dispose(){this._active=!1;for(const e of this._disposers)e();this._disposers.length=0}}function wu(s){return typeof s.hasEntity=="function"&&typeof s.setEntitySceneVisible=="function"}function dL(s,e,t){!s.isObjectHidden(t)||!wu(e)||e.setEntitySceneVisible(t,!1)}function gx(s,e){const t=s.view;if(!wu(t))return 0;const i=s.doc,n=i.database;let o=0;for(const r of e){if(i.isObjectHidden(r))continue;const a=n.tables.blockTable.getEntityById(r);!(a!=null&&a.visibility)||!t.hasEntity(r)||t.setEntitySceneVisible(r,!1)&&(i.addHiddenObject(r),o++)}return o>0&&t.selectionSet.clear(),o}function bx(s){const e=s.view;if(!wu(e))return 0;const t=s.doc,i=t.database,n=t.takeHiddenObjects();let o=0;for(const r of n){const a=i.tables.blockTable.getEntityById(r);!a||!e.hasEntity(r)||e.setEntitySceneVisible(r,a.visibility)&&o++}return e.selectionSet.clear(),o}const vu=500,uL=/[̀-ͯ]/g,xu=/\s+/g;function Xs(s,e=!1){let t=s.normalize("NFKC").replace(xu," ").trim();return e||(t=t.normalize("NFD").replace(uL,"").toLowerCase()),t}function qs(s){const e=/\\(U\+[0-9a-fA-F]{4}|[PX~SfFHWTQCcAaRrpLlOoKk\\{}])|[{}]/g,t=[];let i=0,n=!1,o;for(;o=e.exec(s);){t.push(s.slice(i,o.index));const r=o[1];let a="";if(r!=null&&r.startsWith("U+"))a=String.fromCharCode(parseInt(r.slice(2),16));else if(r==="P"||r==="X"||r==="~")a=" ";else if(r==="\\"||r==="{"||r==="}")a=r;else if(r&&/[SfFHWTQCcAaRrp]/.test(r)){const l=n?-1:s.indexOf(";",e.lastIndex);if(l===-1)n=!0,a=o[0];else{if(r==="S"){const c=s.slice(e.lastIndex,l),d=c.search(/[\^#/]/);if(d===-1)a=c;else{const h=c.slice(d+1);a=c.slice(0,d)+(h?`/${h}`:"")}}e.lastIndex=l+1}}t.push(a),i=e.lastIndex}return t.push(s.slice(i)),wx(t.join("")).replace(xu," ").trim()}function wx(s){return s.replace(/%%[cC]/g,"Ø").replace(/%%[dD]/g,"°").replace(/%%[pP]/g,"±")}function La(s){return typeof s=="string"?wx(s).normalize("NFKC").replace(xu," ").trim():""}function vx(s,e,t){var r;const i=t.get(e);if(i!==void 0)return i;const n=(r=s.tables.layerTable)==null?void 0:r.getAt(e),o=!(n!=null&&n.isOff||n!=null&&n.isFrozen);return t.set(e,o),o}function Ta(s){const e=s.position??s.location??s.textLocation??s.textPosition??{x:0,y:0};return{x:Number(e.x)||0,y:Number(e.y)||0}}function hL(s,e){const t=new Array(16);for(let i=0;i<4;i++)for(let n=0;n<4;n++){let o=0;for(let r=0;r<4;r++)o+=s[r*4+n]*e[i*4+r];t[i*4+n]=o}return t}function xx(s,e){if(!s)return{x:e.x,y:e.y};const t=Number(e.z)||0;return{x:s[0]*e.x+s[4]*e.y+s[8]*t+s[12],y:s[1]*e.x+s[5]*e.y+s[9]*t+s[13]}}function kx(s){var e;try{const t=(e=s.blockTransform)==null?void 0:e.elements;return Array.isArray(t)&&t.length===16?t:void 0}catch{return}}function pL(s,e){var n,o;let t;try{t=s.geometricExtents}catch{return}if(!t||!isFinite((n=t.min)==null?void 0:n.x)||!isFinite((o=t.max)==null?void 0:o.x))return;if(!e)return{min:{...t.min},max:{...t.max}};const i=[{x:t.min.x,y:t.min.y},{x:t.max.x,y:t.min.y},{x:t.min.x,y:t.max.y},{x:t.max.x,y:t.max.y}].map(r=>xx(e,r));return{min:{x:Math.min(...i.map(r=>r.x)),y:Math.min(...i.map(r=>r.y))},max:{x:Math.max(...i.map(r=>r.x)),y:Math.max(...i.map(r=>r.y))}}}const mL=8;function Sx(s,e,t,i={}){var w,S,x,_;const n=i.matchCase===!0,o=i.maxResults??vu,r=Xs(t,n),a={hits:[],truncated:!1};if(!r)return a;const l=s.tables.blockTable.getIdAt(e);if(!l)return a;const c=new Map,d=C=>C!==""&&Xs(C,n).includes(r);let h=!1;const f=C=>{if(a.hits.length>=o){a.truncated=!0,h=!0;return}a.hits.push(C)},y=(C,T,L,N,B,A,O={})=>{const P=pL(L,A);f({entityId:C.entity.objectId,textEntityId:`${T}/${L.objectId}`,kind:N,text:B,layer:C.layer,position:xx(A,Ta(L)),...P?{extents:P}:{},...O})},g=(C,T,L,N,B,A)=>{var O,P,E;for(const I of C){if(h)return;const j=I.dxfTypeName;if(j!=="TEXT"&&j!=="MTEXT"&&j!=="INSERT"&&j!=="ATTRIB"&&j!=="ATTDEF"||I.visibility===!1||j==="ATTDEF"&&(I.isInvisible||!(I.isConst||I.isConstMTextAttribute))||I.layer&&I.layer!=="0"&&!vx(s,I.layer,c))continue;if(j==="INSERT"){if(B>=mL)continue;const ee=kx(I),Z=L&&ee?hL(L,ee):ee??L,re=`${N}/${I.objectId}`;for(const pt of((O=I.attributeIterator)==null?void 0:O.call(I))??[]){if(h)return;if(pt.visibility===!1||pt.isInvisible)continue;const Be=La(pt.textString);d(Be)&&y(T,re,pt,"block",Be,L,{tag:pt.tag,blockName:I.blockName})}const Se=I.blockName;if(!Se||A.has(Se))continue;const Ke=(E=(P=s.tables.blockTable).getAt)==null?void 0:E.call(P,Se);if(!Ke)continue;A.add(Se),g(Ke.newIterator(),T,Z,re,B+1,A),A.delete(Se);continue}const Y=j==="MTEXT"||j==="ATTDEF"&&I.isConstMTextAttribute&&I.mtext?qs(String((j==="MTEXT"?I:I.mtext).contents??"")):La(I.textString);d(Y)&&y(T,N,I,T.kind,Y,L,j==="ATTDEF"?{tag:I.tag}:{})}},b=C=>{var T,L;try{const N=C.blockTableRecord;if(N!=null&&N.newIterator)return N;const B=C.dimBlockId,A=B?s.tables.blockTable.getIdAt(B):void 0;if(A)return A;const O=C.blockName;return O?(L=(T=s.tables.blockTable).getAt)==null?void 0:L.call(T,O):void 0}catch{return}};for(const C of l.newIterator()){if(h)break;const T=C.dxfTypeName;if(T!=="TEXT"&&T!=="MTEXT"&&T!=="INSERT"&&T!=="DIMENSION"&&T!=="MULTILEADER"&&T!=="ACAD_TABLE"||C.visibility===!1||!vx(s,C.layer,c))continue;if(T==="INSERT"){for(const A of((w=C.attributeIterator)==null?void 0:w.call(C))??[]){if(h)break;if(A.visibility===!1||A.isInvisible)continue;const O=La(A.textString);d(O)&&f({entityId:C.objectId,textEntityId:A.objectId,kind:"attribute",text:O,tag:A.tag,blockName:C.blockName,layer:C.layer,position:Ta(A)})}const N=C.blockName,B=N?(x=(S=s.tables.blockTable).getAt)==null?void 0:x.call(S,N):void 0;B&&!h&&g(B.newIterator(),{entity:C,kind:"block",layer:C.layer},kx(C),String(C.objectId),1,new Set([N]));continue}if(T==="DIMENSION"||T==="ACAD_TABLE"){const N=T==="DIMENSION"?"dimension":"table",B={entity:C,kind:N,layer:C.layer},A=b(C),O=a.hits.length;if(A&&g(A.newIterator(),B,void 0,String(C.objectId),1,new Set),A&&a.hits.length>O)continue;const P=[];if(T==="DIMENSION"){const E=String(C.dimensionText??"");E&&E!=="<>"&&E!==" "&&P.push(qs(E.replace("<>","")))}else{const E=Number(C.numRows)||0,I=Number(C.numColumns)||0;for(let j=0;j<E;j++)for(let G=0;G<I;G++)try{P.push(qs(String(((_=C.textString)==null?void 0:_.call(C,j,G))??"")))}catch{}}for(const E of P){if(h)break;d(E)&&f({entityId:C.objectId,textEntityId:`${C.objectId}/${a.hits.length}`,kind:N,text:E,layer:C.layer,position:Ta(C)})}continue}const L=T==="MTEXT"||T==="MULTILEADER"?qs(String(C.contents??"")):La(C.textString);d(L)&&f({entityId:C.objectId,textEntityId:C.objectId,kind:T==="MTEXT"?"mtext":T==="MULTILEADER"?"leader":"text",text:L,layer:C.layer,position:Ta(C)})}return a}function fL(s,e,t=!1,i=60){if(s.length<=i)return s;const n=Xs(e,t),o=Xs(s,t).indexOf(n),r=Math.max(0,Math.min(o-15,s.length-i)),a=s.slice(r,r+i);return`${r>0?"…":""}${a}${r+i<s.length?"…":""}`}function Cx(s){var i;const e=(i=s.objects)==null?void 0:i.layout;if(!(e!=null&&e.newIterator))return[];const t=[];for(const n of e.newIterator())n.blockTableRecordId&&t.push({name:n.layoutName??"",btrId:n.blockTableRecordId,tabOrder:Number(n.tabOrder)||0});return t.sort((n,o)=>n.tabOrder-o.tabOrder||n.name.localeCompare(o.name))}function yL(s,e,t){const i=t.maxResults??vu,n=Cx(s),o=l=>{var c;return((c=n.find(d=>d.btrId===l))==null?void 0:c.name)??""};let r;t.scope==="layout"||n.length===0?r=[{btrId:t.currentLayoutId,name:o(t.currentLayoutId)}]:r=n.map(l=>({btrId:l.btrId,name:l.name}));const a={hits:[],truncated:!1};for(const l of r){const c=Sx(s,l.btrId,e,{matchCase:t.matchCase,maxResults:i-a.hits.length});for(const d of c.hits)a.hits.push({...d,layoutId:l.btrId,layoutName:l.name});if(c.truncated){a.truncated=!0;break}}return a}function Ax(s,e,t){var g;const i=s.tables.blockTable.getIdAt(e),n=(g=i==null?void 0:i.getIdAt)==null?void 0:g.call(i,t.entityId);let o=n;if(t.kind==="attribute"&&(n!=null&&n.attributeIterator)){for(const b of n.attributeIterator())if(b.objectId===t.textEntityId){o=b;break}}let r,a;try{const b=t.extents??(o==null?void 0:o.geometricExtents);if(!b||!isFinite(b.min.x)||!isFinite(b.max.x))throw new Error("no extents");r=b.min,a=b.max}catch{r=a=t.position}const l=(r.x+a.x)/2,c=(r.y+a.y)/2,d=a.x-r.x,h=a.y-r.y,f=Math.max(d*3,h*10,.001),y=Math.max(h*3,f/4,.001);return{min:{x:l-f/2,y:c-y/2},max:{x:l+f/2,y:c+y/2}}}function gL(s,e,t,i){const n=Number(s.width)||0,o=Number(s.height)||0,r=Math.max(0,(i==null?void 0:i.left)??0),a=Math.max(0,(i==null?void 0:i.right)??0),l=Math.max(0,(i==null?void 0:i.top)??0),c=Math.max(0,(i==null?void 0:i.bottom)??0),d=n-r-a,h=o-l-c;if(!(n>0&&o>0&&r+a+l+c>0&&d>=n*.2&&h>=o*.2&&!!s.worldToScreen&&!!s.screenToWorld)){s.zoomTo(new p.AcGeBox2d(new p.AcGePoint2d(e.min.x,e.min.y),new p.AcGePoint2d(e.max.x,e.max.y)),t);return}const y=(e.min.x+e.max.x)/2,g=(e.min.y+e.max.y)/2,b=(e.max.x-e.min.x)/2*(n/d),w=(e.max.y-e.min.y)/2*(o/h);s.zoomTo(new p.AcGeBox2d(new p.AcGePoint2d(y-b,g-w),new p.AcGePoint2d(y+b,g+w)),t);const S=s.worldToScreen({x:y,y:g}),x=r+d/2,_=l+h/2,C=s.screenToWorld({x:n/2+(S.x-x),y:o/2+(S.y-_)});isFinite(C.x)&&isFinite(C.y)&&(s.center=new p.AcGePoint2d(C.x,C.y))}const ku=new WeakMap;async function bL(s,e,t={}){var a;const i=s.curView,n=(a=s.curDocument)==null?void 0:a.database;if(!i||!n)return"no-document";const o=(ku.get(i)??0)+1;if(ku.set(i,o),i.activeLayoutBtrId!==e.layoutId){if(t.activateLayout===!1)return"layout-mismatch";if(!n.tables.blockTable.getIdAt(e.layoutId))return"layout-missing";if(i.isLayoutInitialized(e.layoutId)||i.markLayoutAsInitialized(e.layoutId),p.acdbHostApplicationServices().layoutManager.setCurrentLayoutBtrId(e.layoutId,n),i.activeLayoutBtrId!==e.layoutId)return"layout-switch-failed";if(await i.waitUntilIdle(t.idleTimeoutMs??15e3),ku.get(i)!==o||i.activeLayoutBtrId!==e.layoutId)return"stale"}const r=Ax(n,e.layoutId,e);return gL(i,r,t.margin??1.1,t.insets),i.selectionSet.clear(),i.selectionSet.add(e.entityId),"navigated"}class wL extends K{async execute(e){p.log.info("Hello from ExamplePlugin!"),p.log.info("Current document:",e.doc),p.log.info("Current view:",e.view)}}class vL{constructor(){this.name="ExamplePlugin",this.version="1.0.0",this.description="An example plugin demonstrating the plugin system",this.registeredCommands=[]}onLoad(e,t){t.addCommand("USER","HELLO","Hello",new wL),this.registeredCommands.push({group:"USER",name:"HELLO"}),p.log.info(`[${this.name}] Plugin loaded successfully`),p.log.info(`[${this.name}] Registered command: HELLO`)}onUnload(e,t){for(const i of this.registeredCommands)t.removeCmd(i.group,i.name);this.registeredCommands=[],p.log.info(`[${this.name}] Plugin unloaded`)}}const _x=[".dxf",".dwg"],Js="local",Su="url",xL="100%",kL="150px";function Px(s,e){return s==null?e:typeof s=="number"?`${s}px`:s}const zn=class zn{constructor(e){if(this.activeView=Js,this.menuOpen=!1,this.disposed=!1,this.unsubManager=null,this.unsubTheme=null,this.onDocPointerDown=null,this.options={...e,cardSize:{...e.cardSize??{}}},zn.ensureStyles(),this.root=document.createElement("div"),this.root.className="ml-ui-file-open",this.root.setAttribute("data-ml-ui-file-open","1"),this.applyTheme(),e.title||e.subtitle){const a=document.createElement("div");if(a.className="ml-ui-file-open-header",e.title){const l=document.createElement("h2");l.className="ml-ui-file-open-title",l.textContent=e.title,a.appendChild(l)}if(e.subtitle){const l=document.createElement("p");l.className="ml-ui-file-open-subtitle",l.textContent=e.subtitle,a.appendChild(l)}this.root.appendChild(a)}if(e.showNewDrawing){const a=document.createElement("button");a.type="button",a.className="ml-ui-file-open-primary",a.textContent=m.t("main.dataSource.newDrawing"),a.addEventListener("click",()=>this.emit({kind:"new-drawing"})),this.root.appendChild(a),this.root.appendChild(this.createDivider())}this.card=document.createElement("div"),this.card.className="ml-ui-file-open-card",this.applyCardSize(),this.root.appendChild(this.card),this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.accept=e.accept??_x.join(","),this.fileInput.className="ml-ui-file-open-input-hidden",this.fileInput.addEventListener("change",()=>{var l;const a=(l=this.fileInput.files)==null?void 0:l[0];this.fileInput.value="",a&&this.isSupportedFileName(a.name)&&this.emitLocal(a)}),this.card.appendChild(this.fileInput),this.contentEl=document.createElement("div"),this.contentEl.className="ml-ui-file-open-body",this.card.appendChild(this.contentEl),this.dropzone=document.createElement("div"),this.dropzone.className="ml-ui-file-open-dropzone",this.dropzone.tabIndex=0,this.dropzone.setAttribute("role","button"),this.dropzone.setAttribute("aria-label",m.t("main.dataSource.dropOrBrowse"));const t=document.createElement("p");t.className="ml-ui-file-open-drop-title",t.append(document.createTextNode(`${m.t("main.dataSource.dropFile")} `));const i=document.createElement("span");i.className="ml-ui-file-open-drop-link",i.textContent=m.t("main.dataSource.browse"),t.appendChild(i);const n=document.createElement("div");n.className="ml-ui-file-open-tags";for(const a of["DWG","DXF"]){const l=document.createElement("span");l.className="ml-ui-file-open-tag",l.textContent=a,n.appendChild(l)}this.dropzone.appendChild(t),this.dropzone.appendChild(n),this.dropzone.addEventListener("click",()=>this.fileInput.click()),this.dropzone.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),this.fileInput.click())}),this.dropzone.addEventListener("dragenter",a=>this.onDrag(a,!0)),this.dropzone.addEventListener("dragover",a=>this.onDrag(a,!0)),this.dropzone.addEventListener("dragleave",a=>this.onDrag(a,!1)),this.dropzone.addEventListener("drop",a=>this.onDrop(a)),this.urlRow=document.createElement("div"),this.urlRow.className="ml-ui-file-open-url-row",this.urlInput=document.createElement("input"),this.urlInput.type="url",this.urlInput.className="ml-ui-file-open-url-input",this.urlInput.placeholder=m.t("main.dataSource.urlPlaceholder"),this.urlInput.autocomplete="off",this.urlInput.spellcheck=!1,this.urlInput.addEventListener("keydown",a=>{a.key==="Enter"&&(a.preventDefault(),this.submitUrl())});const o=document.createElement("button");o.type="button",o.className="ml-ui-file-open-secondary",o.textContent=m.t("main.dataSource.open"),o.addEventListener("click",()=>this.submitUrl()),this.urlRow.appendChild(this.urlInput),this.urlRow.appendChild(o),this.sourceActionsEl=document.createElement("div"),this.sourceActionsEl.className="ml-ui-file-open-sources";const r=document.createElement("div");r.className="ml-ui-file-open-footer",this.footerBtn=document.createElement("button"),this.footerBtn.type="button",this.footerBtn.className="ml-ui-file-open-footer-btn",this.footerBtn.setAttribute("aria-label",m.t("main.dataSource.source")),this.footerBtn.setAttribute("aria-haspopup","listbox"),this.footerBtn.setAttribute("aria-expanded","false"),this.footerLabel=document.createElement("span"),this.footerLabel.className="ml-ui-file-open-footer-label",this.footerChevron=document.createElement("span"),this.footerChevron.className="ml-ui-file-open-footer-chevron",this.footerChevron.setAttribute("aria-hidden","true"),this.footerChevron.textContent="▾",this.footerBtn.appendChild(this.footerLabel),this.footerBtn.appendChild(this.footerChevron),this.footerBtn.addEventListener("click",a=>{a.stopPropagation(),this.toggleMenu()}),r.appendChild(this.footerBtn),this.card.appendChild(r),this.menuEl=document.createElement("div"),this.menuEl.className="ml-ui-file-open-menu",this.menuEl.hidden=!0,this.menuEl.setAttribute("role","listbox"),this.card.appendChild(this.menuEl),this.onDocPointerDown=a=>{if(!this.menuOpen)return;const l=a.target;l instanceof Node&&(this.card.contains(l)||this.closeMenu())},document.addEventListener("pointerdown",this.onDocPointerDown),this.unsubTheme=Vo(()=>{this.options.theme||this.applyTheme()}),e.host.appendChild(this.root),this.bindManagerEvents(),this.refreshSourceButtons()}get element(){return this.root}refreshSourceButtons(){this.disposed||(this.bindManagerEvents(),this.applyTheme(),this.applyCardSize(),this.syncSourceChrome(),this.renderActiveView())}setTheme(e){this.disposed||(this.options.theme=e,this.applyTheme())}setCardSize(e){this.disposed||(this.options.cardSize={...this.options.cardSize,...e},this.applyCardSize())}dispose(){var e,t;this.disposed||(this.disposed=!0,(e=this.unsubManager)==null||e.call(this),this.unsubManager=null,(t=this.unsubTheme)==null||t.call(this),this.unsubTheme=null,this.onDocPointerDown&&(document.removeEventListener("pointerdown",this.onDocPointerDown),this.onDocPointerDown=null),this.root.remove())}applyTheme(){const e=this.options.theme!=null,t=this.options.theme??Oe(this.options.host);ot(t,this.root,{isolated:e})}applyCardSize(){const e=this.options.cardSize;this.card.style.width=Px(e==null?void 0:e.width,xL),this.card.style.height=Px(e==null?void 0:e.height,kL)}syncSourceChrome(){const e=this.resolveSourceOptions();new Set(e.map(o=>o.value)).has(this.activeView)||(this.activeView=Js,this.closeMenu());const i=e.find(o=>o.value===this.activeView)??e[0];this.footerLabel.textContent=(i==null?void 0:i.label)??"";const n=e.length>1;this.footerBtn.disabled=!n,this.footerBtn.classList.toggle("is-single",!n),this.footerChevron.hidden=!n,n||this.closeMenu(),this.menuEl.replaceChildren();for(const o of e){const r=document.createElement("button");r.type="button",r.className="ml-ui-file-open-menu-item",r.setAttribute("role","option"),r.setAttribute("aria-selected",o.value===this.activeView?"true":"false"),o.value===this.activeView&&r.classList.add("is-active"),r.textContent=o.label,r.addEventListener("click",a=>{a.stopPropagation(),this.selectSource(o.value)}),this.menuEl.appendChild(r)}}selectSource(e){this.activeView=e,this.closeMenu(),this.syncSourceChrome(),this.renderActiveView(),this.maybeAutoSignIn(e)}maybeAutoSignIn(e){if(e===Js||e===Su)return;const t=this.resolveSources().find(n=>n.id===e);if(t){t.requiresAuth&&t.getAuthState()==="signed-out"&&t.signIn().catch(()=>{}).finally(()=>this.refreshSourceButtons());return}const i=this.resolveExtraMenuItems().find(n=>n.sourceId===e&&n.action==="sign-in");i&&this.emit({kind:"data-source",item:i})}toggleMenu(){this.footerBtn.disabled||(this.menuOpen?this.closeMenu():this.openMenu())}openMenu(){this.menuOpen=!0,this.menuEl.hidden=!1,this.footerBtn.setAttribute("aria-expanded","true"),this.footerBtn.classList.add("is-open"),this.footerChevron.textContent="▴"}closeMenu(){this.menuOpen=!1,this.menuEl.hidden=!0,this.footerBtn.setAttribute("aria-expanded","false"),this.footerBtn.classList.remove("is-open"),this.footerChevron.textContent="▾"}resolveSourceOptions(){const e=[{value:Js,label:m.t("main.dataSource.local")}];this.options.showUrl!==!1&&e.push({value:Su,label:m.t("main.dataSource.url")});const t=new Set;for(const i of this.resolveMenuItems())t.has(i.sourceId)||(t.add(i.sourceId),e.push({value:i.sourceId,label:this.resolveSourceLabel(i.sourceId)}));return e}resolveSourceLabel(e){var n;const t=this.resolveSources().find(o=>o.id===e);if(t)return m.t(t.labelKey);const i=this.resolveExtraMenuItems().find(o=>o.sourceId===e);return(n=i==null?void 0:i.labelParams)!=null&&n.name?i.labelParams.name:e}renderActiveView(){if(this.contentEl.replaceChildren(),this.activeView===Js){this.contentEl.appendChild(this.dropzone);return}if(this.activeView===Su){this.contentEl.appendChild(this.urlRow),requestAnimationFrame(()=>this.urlInput.focus());return}this.renderSourceActions(this.activeView),this.contentEl.appendChild(this.sourceActionsEl)}canPickSource(e){const t=this.resolveSources().find(i=>i.id===e);return t?t.requiresAuth?t.getAuthState()==="signed-in":!0:this.resolveExtraMenuItems().some(i=>i.sourceId===e&&i.action==="pick")}buildPickMenuItem(e){const t=this.resolveSourceLabel(e),i=m.t("main.dataSource.openFrom");return{id:`${e}:pick`,sourceId:e,action:"pick",labelKey:"main.dataSource.openFrom",labelParams:{name:t},label:i.includes("{name}")?i.split("{name}").join(t):m.t("main.dataSource.selectFile")}}resolveAccountProfile(e){var r,a,l,c;const t=(a=(r=this.options).getAccountProfile)==null?void 0:a.call(r,e);if(t!=null&&t.displayName)return t;const i=this.resolveSources().find(d=>d.id===e);if(!i||i.getAuthState()!=="signed-in")return;const n=(l=i.getAccountProfile)==null?void 0:l.call(i);if(n!=null&&n.displayName)return n;const o=(c=i.getAccountLabel)==null?void 0:c.call(i);if(o)return{displayName:o}}initialsFromName(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]??""}${t[1][0]??""}`.toUpperCase()}renderSourceActions(e){this.sourceActionsEl.replaceChildren();const t=this.resolveAccountProfile(e);if(t){const o=document.createElement("div");o.className="ml-ui-file-open-account";const r=document.createElement("div");if(r.className="ml-ui-file-open-avatar",t.avatarUrl){const c=document.createElement("img");c.className="ml-ui-file-open-avatar-img",c.src=t.avatarUrl,c.alt="",c.referrerPolicy="no-referrer",r.appendChild(c)}else{const c=document.createElement("span");c.className="ml-ui-file-open-avatar-initials",c.textContent=this.initialsFromName(t.displayName),r.appendChild(c)}const a=document.createElement("div");a.className="ml-ui-file-open-account-text";const l=document.createElement("div");if(l.className="ml-ui-file-open-account-name",l.textContent=t.displayName,a.appendChild(l),t.email&&t.email!==t.displayName){const c=document.createElement("div");c.className="ml-ui-file-open-account-email",c.textContent=t.email,a.appendChild(c)}o.appendChild(r),o.appendChild(a),this.sourceActionsEl.appendChild(o)}const i=document.createElement("button");i.type="button",i.className="ml-ui-file-open-source-btn ml-ui-file-open-source-btn--primary",i.textContent=m.t("main.dataSource.selectFile");const n=this.canPickSource(e);i.disabled=!n,n||(i.title=m.t("main.dataSource.signInRequired")),i.addEventListener("click",()=>{this.canPickSource(e)&&this.emit({kind:"data-source",item:this.buildPickMenuItem(e)})}),this.sourceActionsEl.appendChild(i)}resolveMenuItems(){const e=this.resolveSources().filter(r=>r.id!==wa&&r.id!==iu),t=Sv(e),i=this.resolveExtraMenuItems(),n=new Set(t.map(r=>r.sourceId)),o=i.filter(r=>!n.has(r.sourceId));return[...t,...o]}resolveSources(){var e;return this.options.getSources?this.options.getSources():((e=k.tryGetInstance())==null?void 0:e.dataSourceManager.list())??[]}resolveExtraMenuItems(){const e=this.options.extraMenuItems;return e?typeof e=="function"?e():e:[]}bindManagerEvents(){var i;if(this.unsubManager)return;const e=(i=k.tryGetInstance())==null?void 0:i.dataSourceManager;if(!e)return;const t=()=>this.refreshSourceButtons();e.on("changed",t),e.on("auth-changed",t),this.unsubManager=()=>{e.off("changed",t),e.off("auth-changed",t)}}submitUrl(){const e=this.urlInput.value.trim();if(!e){this.urlInput.focus();return}this.emit({kind:"url",url:e})}onDrag(e,t){e.preventDefault(),e.stopPropagation(),this.dropzone.classList.toggle("is-dragover",t)}onDrop(e){var i,n;this.onDrag(e,!1);const t=(n=(i=e.dataTransfer)==null?void 0:i.files)==null?void 0:n[0];t&&this.isSupportedFileName(t.name)&&this.emitLocal(t)}isSupportedFileName(e){const t=e.toLowerCase();return _x.some(i=>t.endsWith(i))}emitLocal(e){this.emit({kind:"local",file:e})}emit(e){var t,i,n,o,r,a,l,c,d,h;switch((i=(t=this.options).onResult)==null||i.call(t,e),e.kind){case"local":(o=(n=this.options).onLocalFile)==null||o.call(n,e.file);break;case"url":(a=(r=this.options).onUrl)==null||a.call(r,e.url);break;case"data-source":(c=(l=this.options).onDataSourceAction)==null||c.call(l,e.item);break;case"new-drawing":(h=(d=this.options).onNewDrawing)==null||h.call(d);break}}createDivider(){const e=document.createElement("p");e.className="ml-ui-file-open-divider",e.setAttribute("aria-hidden","true");const t=document.createElement("span");return t.textContent=m.t("main.dataSource.or"),e.appendChild(t),e}static ensureStyles(){if(typeof document>"u"||document.getElementById(zn.styleId))return;const e=document.createElement("style");e.id=zn.styleId,e.textContent=`
2659
+ `,document.head.appendChild(e)}class OE{constructor(){this._center=new Ca,this._defaultStore=this._center,this._showDefaultUi=!0,this._isCustom=!1}install(e,t={}){var i;this._docManager=e,this._host=t.host,this._showDefaultUi=t.showDefaultUi!==!1,this._placement=t.placement,t.enableBridge!==!1?((i=this._bridge)==null||i.uninstall(),this._bridge=new Gv(e,()=>this.center),this._bridge.install()):this._center.setActiveSession(e.activeSessionId),!this._isCustom&&this._showDefaultUi&&this.mountDefaultUi()}get placement(){return this._placement}setPlacement(e){var t;this._placement=e,(t=this._defaultUi)==null||t.setPlacement(e)}get center(){return this._center}get isCustom(){return this._isCustom}setCenter(e){var t,i;if(e==null){this.restoreDefault();return}this._center!==e&&(this.disposeDefaultUi(),this._isCustom?(i=(t=this._center).dispose)==null||i.call(t):this._defaultStore.dispose(),this._center=e,this._isCustom=!0,this._docManager&&this._center.setActiveSession(this._docManager.activeSessionId))}restoreDefault(){var e,t;if(!this._isCustom){this._showDefaultUi&&!this._defaultUi&&this.mountDefaultUi();return}(t=(e=this._center).dispose)==null||t.call(e),this._defaultStore=new Ca,this._center=this._defaultStore,this._isCustom=!1,this._docManager&&this._center.setActiveSession(this._docManager.activeSessionId),this._showDefaultUi&&this.mountDefaultUi()}resolveHost(){var t,i;if(this._host)return this._host;const e=(i=(t=this._docManager)==null?void 0:t.curView)==null?void 0:i.container;return e||document.body}mountDefaultUi(){this.disposeDefaultUi(),!(typeof document>"u")&&(this._defaultUi=new Wv(this._center,this.resolveHost(),{placement:this._placement}))}disposeDefaultUi(){var e;(e=this._defaultUi)==null||e.dispose(),this._defaultUi=void 0}dispose(){var e,t,i;(e=this._bridge)==null||e.uninstall(),this._bridge=void 0,this.disposeDefaultUi(),(i=(t=this._center).dispose)==null||i.call(t),this._defaultStore=new Ca,this._center=this._defaultStore,this._isCustom=!1,this._docManager=void 0,this._host=void 0,this._showDefaultUi=!0,this._placement=void 0}}const Wi=new OE;function DE(){return Wi.center}function NE(s){Wi.setCenter(s)}function BE(){return Wi.placement}function FE(s){Wi.setPlacement(s??void 0)}function Xv(s,e){Wi.install(s,e)}function qv(){Wi.dispose()}function zE(s){var r;const e=s.tables.blockTable,t=e.getAt(p.AcDbBlockTableRecord.PAPER_SPACE_NAME_PREFIX);if(t)return t.objectId;const i=(r=s.objects)==null?void 0:r.layout;if(!(i!=null&&i.newIterator))return;const n=e.modelSpace.objectId;let o;for(const a of i.newIterator()){const l=a.blockTableRecordId;if(!l||l===n)continue;const c=e.getIdAt(l);if(!(!c||!p.AcDbBlockTableRecord.isPaperSapceName(c.name))){if(a.tabSelected)return l;o||(o=l)}}return o}function RE(s){const e=s.tables.blockTable.modelSpace.objectId;if(s.tilemode){s.currentSpaceId!==e&&(s.currentSpaceId=e);return}const t=zE(s);t&&t!==s.currentSpaceId&&(s.currentSpaceId=t)}const jE="https://cdn.jsdelivr.net/gh/mlightcad/cad-data",VE="templates/acadiso.dxf",GE={ARC:["A"],CIRCLE:["C"],ELLIPSE:["EL"],ERASE:["E"],DIMLINEAR:["DLI"],DIMALIGNED:["DAL","DIMALI"],DIMRADIUS:["DRA","DIMRAD"],DIMDIAMETER:["DDI","DIMDIA"],DIMANGULAR:["DAN","DIMANG"],DIMARC:["DAR"],DIMORDINATE:["DOR"],DIMCONTINUE:["DCO"],DIMBASELINE:["DBA"],MEASUREDISTANCE:["DI","DIST"],MEASUREAREA:["AA","AREA"],MEASUREANGLE:["ANG"],"-HATCH":["-H"],IMAGEATTACH:["IAT"],"-INSERT":["I"],XATTACH:["XA"],LAYER:["LA"],"-LAYER":["-LA"],LINE:["L"],MLINE:["ML"],MTEXT:["T"],MOVE:["M"],OFFSET:["O"],COPY:["CO"],ROTATE:["RO"],OPEN:["OP"],PAN:["P"],POINT:["PO"],POLYGON:["POL"],PLINE:["PL"],RAY:["RA"],RECTANG:["REC"],REGEN:["RE"],SELECT:["SE"],SPLINE:["SPL"],XLINE:["XL"],ZOOM:["Z"],UNDO:["U"],REDO:["REDO"],READINGMODE:["RM"]},HE="modern";class k{constructor(e={}){var c;this._sessions=[],this._nextSessionId=1,this._openFileProfiler=new ka,this._workersReady=null,this._nextOverlayId=1,this._presetFontsForOpenPromise=null,this._lastPresetFontsForOpen=[],this.events={documentToBeOpened:new p.AcCmEventManager,documentCreated:new p.AcCmEventManager,documentActivated:new p.AcCmEventManager,documentToBeActivated:new p.AcCmEventManager,documentToBeDestroyed:new p.AcCmEventManager,documentDestroyed:new p.AcCmEventManager,workersReady:new p.AcCmEventManager},this._baseUrl=e.baseUrl??jE,Gu(e.docsBaseUrl??ao),this._commandAliasOverrides=this.normalizeCommandAliasConfig(e.commandAliases),this._openDocumentDefaults=e.openDocumentDefaults,this._disableExport=e.disableExport===!0,e.useMainThreadDraw?D.AcTrMTextRenderer.getInstance().setRenderMode("main"):D.AcTrMTextRenderer.getInstance().setRenderMode("worker"),$.FontManager.instance.setDefaultFonts(HE),$.FontManager.instance.lazyFontLoading=!0,$.FontManager.instance.awaitFontsBeforeDraw=!0,D.AcTrMTextRenderer.getInstance().setLazyFontLoading(!0),D.AcTrMTextRenderer.getInstance().setAwaitFontsBeforeDraw(!0);const t=new ba,i=((c=e.container)==null?void 0:c.getBoundingClientRect())??{width:300,height:150},n=()=>{var d;if(e.autoResize){const h=e.container;if(h)return{width:Math.max(1,Math.floor(h.clientWidth)),height:Math.max(1,Math.floor(h.clientHeight))};const f=(d=e.container)==null?void 0:d.getBoundingClientRect();return{width:Math.max(1,Math.floor((f==null?void 0:f.width)??i.width)),height:Math.max(1,Math.floor((f==null?void 0:f.height)??i.height))}}else return{width:e.width??i.width,height:e.height??i.height}},o=new Mn({container:e.container,calculateSizeCallback:n});this._mainView=o;const r=new Ea(o,t);this._activeSession=new ya(`doc-${this._nextSessionId++}`,r),this._sessions=[this._activeSession],Hn(this._activeSession.id),this._fontLoader=new dv,$.FontManager.instance.setFontLoader(this._fontLoader.fontLoader);const a=this.resolveFontsBaseUrl();this._fontLoader.baseUrl=a,$.FontManager.instance.baseUrl=a,D.AcTrMTextRenderer.getInstance().setFontUrl(a),this.installFontFileLoadTimeout(),p.acdbHostApplicationServices().workingDatabase=t.database,this._commandManager=new Me,this.registerCommands(),p.AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(d=>{const h=d.name.toUpperCase();(h===p.AcDbSystemVariables.CANNOSCALE||h===p.AcDbSystemVariables.ANNOALLVISIBLE)&&this.regen()}),this._pluginManager=new av(this.context,this._commandManager),this._dataSourceManager=new xv,this._dataSourceManager.register(new hv),this._dataSourceManager.register(new kv);const l=e.busyIndicatorHost??o.container;if(this._busyIndicatorHost=l,this._openFileProgress=new Qd(l),this._openFileProgress.setSceneBusyGate(()=>this.openProgressView.isProcessingEntities),this._openFileProgress.setOnHidden(()=>this.onOpenProgressHidden()),this._busyIndicator=new X1(l),Pp({showMessage:(d,h,f)=>this.editor.showMessage(d,h,f),showBusyIndicator:d=>this.showBusyIndicator(d),hideBusyIndicator:()=>this.hideBusyIndicator(),withBusyIndicator:(d,h)=>this.withBusyIndicator(d,h)}),this.events.documentToBeOpened.addEventListener(()=>{this._openFileProgress.reset()}),this.bindOpenProgress(t),this.events.documentCreated.dispatch({doc:t,mode:t.openMode}),e.preloadDefaultFonts&&this.loadDefaultFonts(),this._webworkerFileUrls=e.webworkerFileUrls,this.registerWorkers(e.webworkerFileUrls),e.checkWorkersOnInit&&this.areWorkersReady(),this.loadPlugins(e.plugins).catch(d=>{p.log.error("[AcApDocManager] Error loading plugins:",d)}),mv({enabled:e.builtinOpenFileDialog!==!1,getOpenDocumentDefaults:()=>this.resolveOpenDocumentDefaults()}),e.notificationCenter!==!1){const d=typeof e.notificationCenter=="object"?e.notificationCenter:{};Xv(this,{host:d.host,showDefaultUi:d.showDefaultUi!==!1,placement:d.placement,enableBridge:!0})}}static createInstance(e={}){return k._instance==null&&(k._instance=new k(e)),this._instance}static checkWebworkerReadiness(e){return vv(e)}static get instance(){if(!k._instance)throw new Error("AcApDocManager instance is not created yet!");return k._instance}static tryGetInstance(){return k._instance}async destroy(){var e,t;this._mainView.abortConversion(),(e=this._splitView)==null||e.abortConversion(),await this._pluginManager.unloadAllPlugins();for(const i of[...this._sessions])i.context.dispose(),i.doc.destroy(),i.viewState&&this.curView.disposeSessionState(i.viewState);this._sessions=[],(t=this._splitView)==null||t.dispose(),this._splitView=void 0,this._mainView.dispose(),yv(),qv(),D.AcTrMTextRenderer.resetInstance(),uE(),k._instance=void 0}get workersReady(){return this._workersReady}areWorkersReady(){return this._workersReady===!0?Promise.resolve(!0):(this._workersReadyCheckPromise||(this._workersReadyCheckPromise=vv(this._webworkerFileUrls).then(e=>(this._workersReady=e,this._workersReadyCheckPromise=void 0,this.events.workersReady.dispatch({ready:e}),e)).catch(()=>(this._workersReady=!1,this._workersReadyCheckPromise=void 0,this.events.workersReady.dispatch({ready:!1}),!1))),this._workersReadyCheckPromise)}get context(){return this._activeSession.context}get documents(){return this._sessions.map(e=>e.doc)}get documentCount(){return this._sessions.length}get activeSessionId(){return this._activeSession.id}document(e){var t;return(t=this._sessions[e])==null?void 0:t.doc}sessionFor(e){return this._sessions.find(t=>t.doc===e)}get curDocument(){return this.context.doc}get mdiActiveDocument(){return this._activeSession.doc}async activateDocument(e){const t=this.sessionFor(e);if(!t)return!1;if(t===this._activeSession)return!0;const i=t.context.view,n=this._activeSession.context.view;return this._openingSession&&i===n?!1:(await this._commandManager.cancelActive(),this.events.documentToBeActivated.dispatch({doc:e,mode:e.openMode}),i===n?(this.parkActiveSession(),this._activeSession=t,t.context.resume(),t.viewState&&(this.curView.restoreSessionState(t.viewState),t.viewState=void 0)):(this._activeSession!==this._openingSession&&this._activeSession.context.suspend(),this._activeSession=t,t.context.resume()),Hn(t.id),p.acdbHostApplicationServices().workingDatabase=e.database,this._pluginManager.setContext(t.context),this.curView.bindDrawDatabase(e.database),this.setActiveLayout(),this.curView.syncDisplaySysVars(e.database),this.events.documentActivated.dispatch({doc:e,mode:e.openMode}),this._openingSession||this.syncProgressOverlayHost(),!0)}get mainView(){return this._mainView}get splitView(){return this._splitView}ensureSplitView(e){return this._splitView?this._splitView.container!==e&&e.appendChild(this._splitView.container):this._splitView=new Mn({container:e,calculateSizeCallback:()=>({width:Math.max(1,e.clientWidth),height:Math.max(1,e.clientHeight)})}),this._splitView}attachSatelliteView(e,t){return this.ensureSplitView(e),!0}detachSatelliteView(){}get satelliteDocument(){var e;if(this._splitView)return(e=this._sessions.find(t=>t.context.view===this._splitView))==null?void 0:e.doc}async closeDocument(e){const t=e??this.curDocument,i=this.sessionFor(t);if(!i)return!1;await this._commandManager.cancelActive(),this.events.documentToBeDestroyed.dispatch({doc:t,mode:t.openMode});const n=i===this._activeSession,o=this._sessions.indexOf(i);if(this._sessions.length===1)return this.resetActiveSessionToUntitled(i),this.events.documentDestroyed.dispatch({doc:t,mode:t.openMode}),this.events.documentCreated.dispatch({doc:this.curDocument,mode:this.curDocument.openMode}),this.events.documentActivated.dispatch({doc:this.curDocument,mode:this.curDocument.openMode}),!0;n&&this.parkActiveSession(),i.context.dispose(),t.destroy(),this.clearSessionOverlays(i),tl(i.id);const r=i.context.view;if(i.viewState?(r.disposeSessionState(i.viewState),i.viewState=void 0):r.clear(),this._sessions.splice(o,1),this.events.documentDestroyed.dispatch({doc:t,mode:t.openMode}),n){const a=this._sessions[Math.min(o,this._sessions.length-1)];await this.activateDocument(a.doc)}return!0}get curView(){return this.context.view}get editor(){return this.context.view.editor}get commandManager(){return this._commandManager}get pluginManager(){return this._pluginManager}get dataSourceManager(){return this._dataSourceManager}get drawStyleSessionAccessory(){return Vy(this._mainView)}get baseUrl(){return this._baseUrl}get disableExport(){return this._disableExport}resolveColors(){const e=this.curDocument.database,t=e.tables.layerTable.getAt(e.clayer),i=this.resolveColorToRgb(t==null?void 0:t.color);let n=e.cecolor;return n!=null&&n.isByLayer&&(n=t==null?void 0:t.color),{entityColor:this.resolveColorToRgb(n),layerColor:i}}resolveColorToRgb(e){return!e||e.isByLayer||e.isByBlock||e.isByACI&&e.colorIndex===7?this.resolveAci7ForBackground():e.RGB??this.resolveAci7ForBackground()}resolveAci7ForBackground(){return this.curView.backgroundColor===16777215?0:16777215}get avaiableFonts(){return this._fontLoader.avaiableFonts}async getAvaiableFonts(){try{return await this._fontLoader.getAvaiableFonts()}catch{return Q.emit("failed-to-get-avaiable-fonts",{url:this._fontLoader.baseUrl}),[]}}async loadFonts(e){await this._fontLoader.load(e)}async loadDefaultFonts(e){e==null?await this._fontLoader.load([...$.FontManager.instance.getFontsToLoad()]):await this._fontLoader.load(e)}ensurePresetFontsForOpen(){if(this._presetFontsForOpenPromise)return this._presetFontsForOpenPromise;const e=[...$.FontManager.instance.getFontsToLoad()];if(this._lastPresetFontsForOpen=e,e.length===0)return this._presetFontsForOpenPromise=Promise.resolve(),this._presetFontsForOpenPromise;const t=D.AcTrMTextRenderer.getInstance(),i=t.getRenderMode()==="worker"?"worker":"main",n=3e4,o=i==="worker"?t.loadFonts(e,{scope:"all"}).then(()=>{}):$.FontManager.instance.requestFonts(e).then(()=>{});return this._presetFontsForOpenPromise=new Promise(r=>{const a=setTimeout(()=>{r()},n);o.then(()=>{clearTimeout(a),r()},()=>{clearTimeout(a),r()})}),this._presetFontsForOpenPromise}async awaitPresetFontsReady(){await this.ensurePresetFontsForOpen()}get lastPresetFontsForOpen(){return this._lastPresetFontsForOpen}async openUrl(e,t){t=this.setOptions(t);const i=await this.ensureOpenSession();this.beginOpenProgress(),this.onBeforeOpenDocument(t,!i);try{await this._openFileProgress.beginOpen(this.context.doc.database);const n=await this.context.doc.openUri(e,t);return this.onAfterOpenDocument(n,t),!n&&i&&await this.closeFailedOpenSession(),n}catch(n){throw this._openFileProfiler.cancel(),i&&await this.closeFailedOpenSession(),n}}async openDocument(e,t,i,n){i=this.setOptions(i);const o=await this.ensureOpenSession(n);this.beginOpenProgress(),this.onBeforeOpenDocument(i,!o);try{await this._openFileProgress.beginOpen(this.context.doc.database);const r=await this.context.doc.openDocument(e,t,i);return this.onAfterOpenDocument(r,i),!r&&o&&await this.closeFailedOpenSession(),r}catch(r){throw this._openFileProfiler.cancel(),o&&await this.closeFailedOpenSession(),r}}async loadOverlay(e,t,i={}){var l;const{targetView:n,...o}=i,r=new p.AcDbDatabase,a=(l=e.split(".").pop())==null?void 0:l.toLocaleLowerCase();return await Fd(r,async()=>{await r.read(t,{readOnly:!0,...o},a==="dwg"?p.AcDbFileType.DWG:p.AcDbFileType.DXF)}),this.registerOverlayDatabase(r,{targetView:n})}async registerOverlayDatabase(e,t){const i=(t==null?void 0:t.targetView)??this.curView,n=await i.addOverlayEntities(e),o=`overlay-${this._nextOverlayId++}`;return(this._sessions.find(a=>a.context.view===i)??this._activeSession).overlays.set(o,{db:e,layout:n}),i.isDirty=!0,o}removeOverlay(e){for(const t of this._sessions){const i=t.overlays.get(e);if(!i)continue;return this.sessionCadScene(t).internalScene.remove(i.layout.internalObject),i.layout.clear(),t.overlays.delete(e),t.viewState||(t.context.view.isDirty=!0),!0}return!1}setOverlayVisible(e,t){for(const i of this._sessions){const n=i.overlays.get(e);if(n)return n.layout.visible=t,i.context.view.isDirty=!0,!0}return!1}clearOverlays(e){const t=e?this._sessions.filter(i=>i.context.view===e):this._sessions;for(const i of t)for(const n of[...i.overlays.keys()])this.removeOverlay(n)}getOverlayIds(e){if(!e)return Array.from(this._activeSession.overlays.keys());const t=this._sessions.find(i=>i.context.view===e);return t?Array.from(t.overlays.keys()):[]}get overlayIds(){return this.getOverlayIds()}setCompareDisplay(e,t){(t??this.curView).setCompareDisplay(e)}isReadingModeEnabled(e){return(e??this.curView).readingModeEnabled}setReadingMode(e,t){(t??this.curView).setReadingMode(e)}toggleReadingMode(e){(e??this.curView).toggleReadingMode()}setOverlayCompareDisplay(e,t,i){for(const n of this._sessions){const o=n.overlays.get(e);if(!o)continue;return(i??n.context.view??this.curView).setCompareDisplay(t,o.layout),!0}return!1}getOverlayLayout(e){for(const t of this._sessions){const i=t.overlays.get(e);if(i)return i.layout}}async newDocument(e){const i=`${this.baseUrl.endsWith("/")?this.baseUrl:`${this.baseUrl}/`}${VE}`,n=this.setOptions({...e,mode:U.Write}),o=await this.ensureOpenSession();this.beginOpenProgress(),this.onBeforeOpenDocument(n,!o),await this._openFileProgress.beginOpen(this.context.doc.database);const r=await this.context.doc.openUri(i,n);return r&&this.context.doc.resetNewDocumentIdentity(),this.onAfterOpenDocument(r,n),!r&&o&&await this.closeFailedOpenSession(),r}setOpenDocumentDefaults(e){this._openDocumentDefaults=e,fv({enabled:!0,getOpenDocumentDefaults:()=>this.resolveOpenDocumentDefaults()})}resolveOpenDocumentDefaults(){const e=this._openDocumentDefaults;return e==null?{minimumChunkSize:1e3}:typeof e=="function"?e():e}regen(){this.curView.clear(),this.context.doc.database.regen()}installFontFileLoadTimeout(){const t=$.FontManager.instance.loader;if(!t||t.__cadFontLoadTimeout)return;const i=t.loadAsync.bind(t),n=3e4;t.loadAsync=o=>new Promise((r,a)=>{const l=setTimeout(()=>{a(new Error(`Font load timed out after ${n}ms`))},n);i(o).then(c=>{clearTimeout(l),r(c)},c=>{clearTimeout(l),a(c)})}),t.__cadFontLoadTimeout=!0}resolveFontsBaseUrl(){return`${this._baseUrl.endsWith("/")?this._baseUrl:`${this._baseUrl}/`}fonts/`}lookupLocalCmd(e){return this._commandManager.lookupLocalCmd(e,this.curDocument.openMode)}lookupGlobalCmd(e){return this._commandManager.lookupGlobalCmd(e,this.curDocument.openMode)}searchCommandsByPrefix(e){return this._commandManager.searchCommandsByPrefix(e,this.curDocument.openMode)}registerCommands(){const e=this._commandManager,t=(n,o,r)=>{const a=GE[n.toUpperCase()]??[];e.addCommand(Me.SYSTEMT_COMMAND_GROUP_NAME,n,o,r,this.resolveCommandAliases(n,a))};t("about","about",new Gw),t("arc","arc",new gg),t("cachefont","cachefont",new Us),t("circle","circle",new Sg),t("close","close",new qw),this._disableExport||(t("bmpout","bmpout",new Wy),t("cdxf","cdxf",new Ky),t("jpgout","jpgout",new Yy),t("pngout","pngout",new Zy)),t("entout","entout",new Jy),t("ellipse","ellipse",new sb),t("erase","erase",new Nw),t("hideobjects","hideobjects",new Bw),t("dimlinear","dimlinear",new Xg),t("dimaligned","dimaligned",new Og),t("dimradius","dimradius",new eb),t("dimdiameter","dimdiameter",new Yg),t("dimangular","dimangular",new Ng),t("dimarc","dimarc",new zg),t("dimordinate","dimordinate",new Jg),t("dimcontinue","dimcontinue",new Wg),t("dimbaseline","dimbaseline",new $g),pw(t,{view:this._mainView,commandManager:this._commandManager}),t("-hatch","-hatch",new Zr),t("imageattach","imageattach",new ob),t("-insert","-insert",new ab),t("xattach","xattach",new Fb),t("-layer","-layer",new dg),t("laycur","laycur",new ig),t("laydel","laydel",new tg),t("layfrz","layfrz",new Fr),t("layiso","layiso",new zr),t("laylck","laylck",new ng),t("layon","layon",new sg),t("layoff","layoff",new Rr),t("laythw","laythw",new rg),t("layuniso","layuniso",new ag),t("layulk","layulk",new lg),t("layerp","layerp",new og),t("layerclose","layerclose",new cg),t("line","line",new ji),t("mline","mline",new cb),t("mtext","mtext",new db),t("copy","copy",new ha),t("move","move",new zw),t("offset","offset",new Gs),t("rotate","rotate",new ma),t("log","log",new Hw),t("objectscale","objectscale",new Xw),t("open","open",new Zw),t("pan","pan",new rv),t("point","point",new ub),t("polygon","polygon",new Jr),t("pline","pline",new fb),t("qnew","qnew",new Jw),t("ray","ray",new gb),t("rectang","rectang",new Qr),t("regen","regen",new Qw),t("revcloud","revcloud",new ea),Dw(t,{view:this._mainView,commandManager:this._commandManager}),t("select","select",new ev),t("sketch","sketch",new sa),t("spline","spline",new Ob),t("switchbg","switchbg",new iv),t("readingmode","readingmode",new nv),t("unisolateobjects","unisolateobjects",new Vw),t("xline","xline",new zb),t("undo","undo",new sv),t("redo","redo",new ov),t("zoom","zoom",new yi),p.AcDbSysVarManager.instance().getAllDescriptors().forEach(n=>{e.addCommand(Me.SYSTEMT_COMMAND_GROUP_NAME,n.name,n.name,new tv,this.resolveCommandAliases(n.name,[]))})}normalizeCommandAliasConfig(e){const t=new Map;return e&&Object.entries(e).forEach(([i,n])=>{const o=i.trim().toUpperCase();if(!o)return;const r=Array.isArray(n)?n:[n],a=new Set;r.forEach(l=>{const c=l.trim().toUpperCase();c&&c!==o&&a.add(c)}),t.set(o,[...a])}),t}resolveCommandAliases(e,t){const i=e.trim().toUpperCase(),n=this._commandAliasOverrides.get(i);if(n)return[...n];const o=new Set;return t.forEach(r=>{const a=r.trim().toUpperCase();a&&a!==i&&o.add(a)}),[...o]}sendStringToExecute(e){this.executeCommandString(e).catch(t=>{const i=t instanceof Error?t.message:String(t);this.editor.showMessage(i,"error"),p.log.error(`[AcApDocManager] Command failed: ${e}`,t)})}async executeCommandString(e){const t=this.splitCommandScript(e);if(!t.length)throw new Error("Command string is empty");const[i,...n]=t;this.editor.clearScriptInputs(),this.editor.enqueueScriptInputs(n),await this.executeNamedCommand(i,{preserveScriptInputs:!1})}async runScript(e){const t=Xd(e);for(this.editor.clearScriptInputs(),this.editor.enqueueScriptInputs(t);this.editor.hasScriptInputs();){const i=this.consumeNextScriptCommandName();if(i==null)break;if(lv(i)){this.editor.clearScriptInputs();break}await this.executeNamedCommand(i,{preserveScriptInputs:!0})}}async executeNamedCommand(e,t){const i=this.context.doc.openMode;let n=this._commandManager.lookupGlobalCmd(e)??this._commandManager.lookupLocalCmd(e,i);if(n||await this._pluginManager.loadByTrigger(e)&&(n=this._commandManager.lookupGlobalCmd(e)??this._commandManager.lookupLocalCmd(e,i)),!n)throw new Error(`Command '${e}' not found`);if(i<n.mode)throw new Error(`Command '${e}' requires mode '${U[n.mode]}' but document is in mode '${U[i]}'!`);await this._commandManager.cancelActive(),await this._commandManager.runActive(n,this.curView,async()=>{try{await n.trigger(this.context)}finally{t.preserveScriptInputs||this.editor.clearScriptInputs()}})}consumeNextScriptCommandName(){for(;this.editor.hasScriptInputs();){const e=this.editor.consumeScriptInput();if(e==null)return;const t=e.trim();if(t)return t}}splitCommandScript(e){const t=Xd(e);if(!t.length)return[];let i=0;for(;i<t.length&&!t[i].trim();)i++;return i>=t.length?[]:[t[i].trim(),...t.slice(i+1)]}setActiveLayout(e,t){const i=e??this.curView,n=t??this.curDocument.database;i.activeLayoutBtrId=n.currentSpaceId,i.modelSpaceBtrId=n.tables.blockTable.modelSpace.objectId}onBeforeOpenDocument(e,t=!0){this.events.documentToBeOpened.dispatch({doc:this.context.doc,mode:this.getDocumentEventMode(e)}),t&&(Si.instance.clearAll(),this.clearOverlays(),vl(),Jc(),yi.clearOriginalViews(),this.openProgressView.clear()),this.openProgressView.bindDrawDatabase(this.context.doc.database),this.openProgressView.progressiveRendering=(e==null?void 0:e.progressiveRendering)??!1,this._openFileProgress.setSeeThroughOverlay((e==null?void 0:e.progressiveRendering)??!1),this.openProgressView.convertInvisibleLayers=(e==null?void 0:e.convertInvisibleLayers)===!0,this.openProgressView.cooperativeYield=(e==null?void 0:e.cooperativeYield)!==!1;const i=this.openProgressView.cadScene;i&&(i.skipSpatialIndex=(e==null?void 0:e.skipSpatialIndex)===!0),this.ensurePresetFontsForOpen(),this._openFileProfiler.begin(this.context.doc.database)}onAfterOpenDocument(e,t){const i=!e&&this.hasRecoverablePartialContent();if(e||i){const n=this._openingSession??this._activeSession,o=n.context.view;n.doc.destroy();const r=n.doc,a=r.database;RE(a),this.setActiveLayout(o,a),o.syncDisplaySysVars(a),this.events.documentActivated.dispatch({doc:r,mode:this.getDocumentEventMode(t)});const l=a.tables.blockTable.modelSpace.objectId,c=a.currentSpaceId!==l,d=p.acdbHostApplicationServices().layoutManager.getActiveLayout(a),h=d==null?void 0:d.limits,f=this.resolveOpenViewMode(t);o.setOpenViewMode(f);const y=(t==null?void 0:t.progressiveRendering)??!1;let g=!1;const b=()=>{y&&o.beginProgressiveOpenFit(),o.zoomToFitDrawing(),o.requestOpenLineworkFrame()};if(c&&f===_t.Saved){const w=d==null?void 0:d.extents,S=kr({limits:h,viewportsBox:Ff(a,a.currentSpaceId),layoutExtents:w&&!w.isEmpty()?{min:{x:w.min.x,y:w.min.y},max:{x:w.max.x,y:w.max.y}}:void 0});S?(o.zoomTo(S.box),g=!0):b()}else if(!c&&f===_t.Saved){const w=o.width/Math.max(o.height,1),S=a.tables.viewportTable.getActiveVportBox(w);S?(o.zoomTo(S),g=!0):b()}else b();o.markLayoutAsInitialized(a.currentSpaceId),g&&yi.rememberOriginalView(o,a.currentSpaceId),t!=null&&t.convertAllLayouts&&o.ensureEntitiesConvertedForExport({includeInvisibleLayers:t.convertInvisibleLayers!==!1,includeLayouts:!0}).catch(w=>{p.log.error("[AcApDocManager] convertAllLayouts export convert failed",w)}),this._openFileProfiler.markReadCompleteAndScheduleReport(o)}else this._openFileProfiler.cancel(),this.openProgressView.endProgressiveOpenFit(),this.regen()}hasRecoverablePartialContent(){const e=(this._openingSession??this._activeSession).doc.database,t=e.tables.blockTable.modelSpace;return t?t.newIterator().count>0:!e.extents.isEmpty()}setOptions(e){return e==null?e={drawNoPlotLayers:!1,progressiveRendering:!1}:(this.stripObsoleteFontOpenOptions(e),this.stripDeprecatedWaitForTextGeometry(e),e.drawNoPlotLayers==null&&(e.drawNoPlotLayers=!1),e.progressiveRendering==null&&(e.progressiveRendering=!1)),e}stripDeprecatedWaitForTextGeometry(e){e.waitForTextGeometry!=null&&(delete e.waitForTextGeometry,console.warn("[AcApDocManager] Ignoring deprecated open option waitForTextGeometry; both stages of progressive rendering are controlled by progressiveRendering."))}stripObsoleteFontOpenOptions(e){const t=e,i=t.fontLoader!=null,n=t.failOnFontLoadError!=null;!i&&!n||(delete t.fontLoader,delete t.failOnFontLoadError,console.warn("[AcApDocManager] Ignoring obsolete open options "+[i?"fontLoader":null,n?"failOnFontLoadError":null].filter(Boolean).join(", ")+"; fonts load on demand via FontManager.lazyFontLoading."))}getDocumentEventMode(e){return(e==null?void 0:e.mode)??U.Read}resolveOpenViewMode(e){return(e==null?void 0:e.openViewMode)!=null?e.openViewMode:this.getDocumentEventMode(e)===U.Write?_t.Saved:_t.Extents}showBusyIndicator(e){this._busyIndicator.show(e)}setBusyIndicatorHost(e){this._busyIndicatorHost=e,this.syncProgressOverlayHost()}get openProgressView(){var e;return((e=this._openingSession)==null?void 0:e.context.view)??this.curView}beginOpenProgress(){this._openingSession=this._activeSession,this.syncProgressOverlayHost()}onOpenProgressHidden(){const e=this._openingSession;this._openingSession=void 0,e&&this._sessions.includes(e)&&e!==this._activeSession&&e.context.suspend(),this.syncProgressOverlayHost()}syncProgressOverlayHost(e=this.openProgressView){const t=this._splitView?e.container:this._busyIndicatorHost;this._openFileProgress.setHost(t),this._busyIndicator.setHost(t)}hideBusyIndicator(){this._busyIndicator.hide()}setBusyIndicatorMessage(e){this._busyIndicator.setMessage(e)}async withBusyIndicator(e,t){return this._busyIndicator.withBusyIndicator(e,t)}registerWorkers(e){const t=D.AcTrMTextRenderer.getInstance();t.initialize((e==null?void 0:e.mtextRender)??wv.mtextRender),t.setDefaultFonts([...$.FontManager.instance.defaultFonts])}async loadPlugins(e){if(e){if(e.fromConfig&&e.fromConfig.length>0)try{const t=await this._pluginManager.loadPluginsFromConfig(e.fromConfig,{continueOnError:!0});t.loaded.length>0&&p.log.info(`[AcApDocManager] Loaded ${t.loaded.length} plugin(s) from config:`,t.loaded),t.failed.length>0&&p.log.warn(`[AcApDocManager] Failed to load ${t.failed.length} plugin(s):`,t.failed.map(i=>`${i.name}: ${i.error.message}`))}catch(t){p.log.error("[AcApDocManager] Error loading plugins from config:",t)}if(e.fromFolder)try{const t=await this._pluginManager.loadPluginsFromFolder(e.fromFolder.folderPath,{pluginList:e.fromFolder.pluginList,continueOnError:e.fromFolder.continueOnError??!0});t.loaded.length>0&&p.log.info(`[AcApDocManager] Loaded ${t.loaded.length} plugin(s) from folder:`,t.loaded),t.failed.length>0&&p.log.warn(`[AcApDocManager] Failed to load ${t.failed.length} plugin(s) from folder:`,t.failed.map(i=>`${i.name}: ${i.error.message}`))}catch(t){p.log.error("[AcApDocManager] Error loading plugins from folder:",t)}}}bindOpenProgress(e){e.database.events.openProgress.addEventListener(t=>{if(this._openFileProgress.handle({database:e.database,percentage:t.percentage,stage:t.stage,subStage:t.subStage,subStageStatus:t.subStageStatus,data:t.data}),t.subStage==="STYLE"&&t.subStageStatus==="END"){const o=this._sessions.find(a=>a.doc===e),r=(o==null?void 0:o.context.view)??this.curView;r&&r.startTextStyleFontPreload(e.database)}if(t.subStage!=="HEADER")return;const i=this._sessions.find(o=>o.doc===e),n=(i==null?void 0:i.context.view)??this.curView;n.ltscale=e.database.ltscale,n.celtscale=e.database.celtscale,n.renderer.showLineWeight=e.database.lwdisplay})}parkActiveSession(){this._activeSession.context.suspend(),this._activeSession.viewState=this.curView.captureSessionState()}async ensureOpenSession(e){const t=e??this.curView;if(t===this.curView&&this.curDocument.isReusableUntitled)return!1;const i=this._sessions.find(a=>a.context.view===t);if(i!=null&&i.doc.isReusableUntitled)return i!==this._activeSession&&await this.activateDocument(i.doc),!1;await this._commandManager.cancelActive(),this._activeSession.context.suspend(),t===this.curView&&(this._activeSession.viewState=this.curView.beginNewSession());const n=new ba,o=new Ea(t,n),r=new ya(`doc-${this._nextSessionId++}`,o);return this._sessions.push(r),this._activeSession=r,Hn(r.id),p.acdbHostApplicationServices().workingDatabase=n.database,this._pluginManager.setContext(o),this.bindOpenProgress(n),this.events.documentCreated.dispatch({doc:n,mode:n.openMode}),!0}async closeFailedOpenSession(){this._sessions.length<=1||await this.closeDocument(this.curDocument)}resetActiveSessionToUntitled(e){const t=e.doc,i=e.id;Si.instance.clearAll(),this.clearOverlays(),vl(),Jc(),this.curView.clear(),e.context.dispose(),t.destroy(),tl(i);const n=new ba,o=new Ea(this.curView,n),r=new ya(`doc-${this._nextSessionId++}`,o);this._sessions=[r],this._activeSession=r,Hn(r.id),p.acdbHostApplicationServices().workingDatabase=n.database,this._pluginManager.setContext(o),this.bindOpenProgress(n),this.curView.bindDrawDatabase(n.database)}clearSessionOverlays(e){const t=this.sessionCadScene(e);for(const i of e.overlays.values())t.internalScene.remove(i.layout.internalObject),i.layout.clear();e.overlays.clear()}sessionCadScene(e){var t;return((t=e.viewState)==null?void 0:t.scene)??e.context.view.cadScene}}const UE=Object.freeze(Object.defineProperty({__proto__:null,AcApDocManager:k},Symbol.toStringTag,{value:"Module"}));class Wt{static isFontLoaded(e){return $.FontManager.instance.isFontLoaded(e)}static getFontType(e){return $.FontManager.instance.getFontType(e)}static getReplacementFontName(e){return $.FontManager.instance.findAndReplaceFont(e)}static getShxCodePoints(e){var o;const t=$.FontManager.instance.getFontByName(e,!1);if(!t||t.type!=="shx")return[];const i=t.data;return Object.keys(((o=i.content)==null?void 0:o.data)??{}).map(r=>Number(r)).filter(r=>Number.isFinite(r)).sort((r,a)=>r-a)}static getLoadedShxFontData(e){const t=$.FontManager.instance.getFontByName(e,!1);if(!(!t||t.type!=="shx"))return t.data}static createShxParserFont(e){return new $.ShxParserFont(e)}static findFontInfoByName(e){var n;const t=((n=k.instance)==null?void 0:n.avaiableFonts)??[],i=e.trim().toLowerCase();if(i)return t.find(o=>o.name.some(r=>r.trim().toLowerCase()===i))}static getCatalogFontType(e){var t;return(t=Wt.findFontInfoByName(e))==null?void 0:t.type}static async ensureDrawingFontLoaded(e){const t=k.instance;t&&(Wt.isFontLoaded(e)||await t.loadFonts([e]))}static async cacheFont(e,t,i,n){return $.FontManager.instance.cacheFont(e,t,i,n)}static async getCachedMeshFontProgram(e){const t=[e],i=Wt.findFontInfoByName(e);i!=null&&i.file&&t.push(i.file);for(const r of(i==null?void 0:i.name)??[])t.push(r);const n=Wt.getReplacementFontName(e);if(n&&n!==e){t.push(n);const r=Wt.findFontInfoByName(n);r!=null&&r.file&&t.push(r.file);for(const a of(r==null?void 0:r.name)??[])t.push(a)}const o=new Set;for(const r of t){const a=r.trim().toLowerCase();if(!a||o.has(a))continue;o.add(a);const l=await $.FontManager.instance.getCachedMeshFontProgram(r);if(l&&l.byteLength>0)return new Uint8Array(l)}}static async persistMeshFontProgram(e,t,i){await $.FontManager.instance.persistMeshFontProgram(e,t,i)}}function Jv(s){const e=[];try{const t=s.tables.textStyleTable;if(e.push(...t.fonts??[]),t.newIterator)for(const i of t.newIterator()){const n=i.textStyle;n!=null&&n.font&&e.push(n.font),n!=null&&n.bigFont&&e.push(n.bigFont),n!=null&&n.extendedFont&&e.push(n.extendedFont)}}catch{return[]}return Zs(e)}function Qv(s,e,t){const i=Zs([...s]);i.length===0&&(t!=null&&t.firstDefaultFont)&&i.push(t.firstDefaultFont);const n=new Set(i.map($i)),o=new Set(e.map($i)),r=Zs(e.filter(l=>!n.has($i(l))));let a=Zs(i.filter(l=>o.has($i(l))));if(a.length===0&&(t!=null&&t.firstDefaultFont)){const l=$i(t.firstDefaultFont);l&&n.has(l)&&(a=[t.firstDefaultFont])}return a.length>3&&(a=a.slice(0,3)),{critical:i,workerWarm:a,background:r}}function Zs(s){const e=new Set,t=[];for(const i of s){if(!i)continue;const n=$i(i);!n||e.has(n)||(e.add(n),t.push(i))}return t}function $i(s){if(s==null)return"";let e=String(s).trim();if(!e)return"";const t=e.lastIndexOf(".");return t>0&&(t===e.length-4||t===e.length-5)&&(e=e.substring(0,t)),e.toLowerCase()}const lu=13,cu=14,du=1,WE=cu*2+du*2,ex=.5,tx=.5;let In;function $E(){if(In!==void 0)return In;if(typeof document>"u")return In=null,null;try{In=document.createElement("canvas").getContext("2d")}catch{In=null}return In}function ix(s){return(s==null?void 0:s.padXEm)??cu/lu}function nx(s){const e=(s==null?void 0:s.borderEm)??du/lu;return e>0?e:0}function uu(s,e){return s>0?2*(ix(e)+nx(e))*s:0}function sx(s,e,t){const i=uu(e,t);if(!(e>0))return i;const n=$E();if(!n)return s.length*e*.6+i;const o=(t==null?void 0:t.fontWeight)??"500",r=(t==null?void 0:t.fontFamily)??"sans-serif";return n.font=`${o} ${e}px ${r}`,n.measureText(s).width+i}function ox(s,e,t,i){if(!(e>0)||!(t>0))return e;const n=(i==null?void 0:i.maxLineFraction)??ex,o=t*n,r=sx(s,e,i);if(r<=o)return e;if(!(o>0))return 1;const l=Math.max(0,r-uu(e,i))/e,c=2*(ix(i)+nx(i)),d=l+c;return d>0?Math.max(1,o/d):e}function xt(s,e,t,i){return e.textHeightMode==="custom"?e.fontSize:ox(s,e.fontSize,t,i)}function Ci(s,e,t){const i=s(e),n=s(t);return Math.hypot(n.x-i.x,n.y-i.y)}function Aa(s,e,t){return!(s>0)||!(e>0)||!(t>0)||t>=e?s:Math.max(1,s*(t/e))}function hu(s,e,t,i){return Math.min(Ci(s,e,t),Ci(s,e,i))*tx}function _a(s,e,t,i){if(!(t>0)||!(i>0))return 0;const n=s(e),o=s({x:e.x+t,y:e.y});return Math.hypot(o.x-n.x,o.y-n.y)/t*i}function KE(s,e,t){const i=t.x-e.x,n=t.y-e.y,o=i*i+n*n;if(!(o>0))return Math.hypot(s.x-e.x,s.y-e.y);let r=((s.x-e.x)*i+(s.y-e.y)*n)/o;return r=Math.max(0,Math.min(1,r)),Math.hypot(s.x-(e.x+r*i),s.y-(e.y+r*n))}function pu(s,e){const t=e.length;if(t<3)return 0;let i=1/0;for(let l=0;l<t;l++){const c=e[l],d=e[(l+1)%t];i=Math.min(i,Ci(s,c,d))}let n=0,o=0;for(const l of e)n+=l.x,o+=l.y;n/=t,o/=t;const r=s({x:n,y:o});let a=1/0;for(let l=0;l<t;l++){const c=s(e[l]),d=s(e[(l+1)%t]);a=Math.min(a,KE(r,c,d))}return Math.min(i,2*a)}const rx=s=>new p.AcGeBox3d(s.min,s.max),ax=s=>new p.AcGeBox2d(s.min,s.max),lx=s=>new V.Box3(s.min,s.max),cx=s=>new p.AcGeBox2d(s.min,s.max),dx=s=>new V.Box2(s.min,s.max),ux=s=>new p.AcGeBox2d(s.min,s.max),hx=s=>{const e=new V.Box3;return e.min.set(s.min.x,s.min.y,0),e.max.set(s.max.x,s.max.y,0),e},mu={threeBo2dToGeBox2d:cx,geBox2dToThreeBox2d:dx,threeBox3dToGeBox3d:rx,geBox3dToThreeBox3d:lx,goBox3dToGeBox2d:ax,threeBox3dToGeBox2d:ux,geBox2dToThreeBox3d:hx};function px(s,e){if(!e||s.length<2)return s;let t=-1,i=-1;for(let r=0;r<s.length&&(s[r].ownerId===e?t<0&&(t=r):i<0&&(i=r),!(t>=0&&i>=0));r++);if(t<0||i<0||t<i)return s;const n=[],o=[];for(let r=0;r<s.length;r++){const a=s[r];a.ownerId===e?n.push(a):o.push(a)}return n.concat(o)}function YE(s,e){return{pending:px(s,e),cursor:0,activeOwnerId:e}}function ZE(s,e,t){if(e.length===0&&t===s.activeOwnerId)return s;const i=s.cursor===0?s.pending:s.pending.slice(s.cursor);if(t!==s.activeOwnerId)return{pending:px(e.length>0?e.concat(i):i,t),cursor:0,activeOwnerId:t};let n=!1;const o=[],r=[];for(let a=0;a<e.length;a++)t&&e[a].ownerId===t?(n=!0,o.push(e[a])):r.push(e[a]);if(n)return{pending:o.concat(i,r),cursor:0,activeOwnerId:t};for(let a=0;a<r.length;a++)s.pending.push(r[a]);return s}function XE(s){const{pending:e,cursor:t,activeOwnerId:i}=s;if(!i)return!1;for(let n=t;n<e.length;n++)if(e[n].ownerId===i)return!0;return!1}function qE(s){const{tookMs:e,budgetMs:t,maxSlice:i,activeLayoutPending:n}=s,o=Math.max(1,s.slice),r=n?2:4;return e<t/2?Math.min(o*r,i):e>t*2?Math.max(1,o>>1):o}class JE{constructor(e){this.getLayerInfo=e}shouldConvert(e){if(!e.visibility)return!1;const t=this.getLayerInfo(e.layer);return t?this.isBlockReference(e)?!t.isFrozen:on.isLayerVisible(t):!0}shouldConvertForExport(e,t=!0){return e.visibility?t?!0:this.shouldConvert(e):!1}layerVisibilityMayHaveChanged(e){return e.isOff!==void 0||e.standardFlags!==void 0}collectMissingEntitiesOnLayer(e,t,i){return this.collectMissingEntities(t,i,n=>n.layer===e&&this.shouldConvert(n))}collectMissingEntitiesForExport(e,t,i=!0){return this.collectMissingEntities(e,t,n=>this.shouldConvertForExport(n,i))}isBlockReference(e){return e instanceof p.AcDbBlockReference}collectMissingEntities(e,t,i){const n=[],o=e.newIterator();for(const r of o)i(r)&&(t(r.objectId)||n.push(r));return n}}var Pa=(s=>(s[s.LEFT_BOTTOM=0]="LEFT_BOTTOM",s[s.LEFT_TOP=1]="LEFT_TOP",s[s.RIGHT_TOP=2]="RIGHT_TOP",s[s.RIGHT_BOTTOM=4]="RIGHT_BOTTOM",s))(Pa||{});class QE extends V.Object3D{constructor(e,t,i=150,n=2){super(),this.camera=e,this.renderer=t,this.gizmoCamera=new V.OrthographicCamera(-2,2,2,-2,0,4),this.gizmoCamera.position.set(0,0,2),this.gizmoDim=i,this.gizmoPos=n,this.initialize()}initialize(){}update(){this.updateOrientation();const e=this.renderer.autoClear;this.renderer.autoClear=!1,this.renderer.clearDepth();const t=new V.Vector4;this.renderer.getViewport(t);const i=this.calculateViewportPos();this.renderer.setViewport(i.x,i.y,this.gizmoDim,this.gizmoDim),this.renderer.render(this,this.gizmoCamera),this.renderer.setViewport(t.x,t.y,t.z,t.w),this.renderer.autoClear=e}dispose(){}updateOrientation(){this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()}calculatePosInViewport(e,t,i){const n=(e-i.min.x)/this.gizmoDim*2-1,o=-((t-i.min.y)/this.gizmoDim)*2+1;return{x:n,y:o}}calculateViewportPos(){const e=this.renderer.domElement,t=e.offsetWidth,i=e.offsetHeight,n=this.gizmoPos,o=this.gizmoDim;let r=t-o,a=i-o;switch(n){case 0:r=0,a=0;break;case 1:r=0;break;case 4:a=0;break}return{x:r,y:a}}calculateViewportBbox(){const e=this.renderer.domElement,t=e.offsetWidth,i=e.offsetHeight,n=this.gizmoPos,o=this.gizmoDim,r=new V.Box2(new V.Vector2(t-o,0),new V.Vector2(t,o));switch(n){case 0:r.set(new V.Vector2(0,i-o),new V.Vector2(o,i));break;case 1:r.set(new V.Vector2(0,0),new V.Vector2(o,o));break;case 4:r.set(new V.Vector2(t-o,i-o),new V.Vector2(t,i));break}return r}}function eL(s,e){const t=e.font||"Helvetica",i=e.fontSize||30,n=e.width||200,o=e.height||200,r=e.bgColor?e.bgColor.join(", "):"255, 255, 255, 1.0",a=e.color?e.color.join(", "):"0, 0, 0, 1.0",l=document.createElement("canvas");l.width=n,l.height=o;const c=l.getContext("2d");if(c){c.font=`bold ${i}px ${t}`,c.fillStyle=`rgba(${r})`,c.fillRect(0,0,n,o);const f=c.measureText(s).width;c.fillStyle=`rgba(${a})`,c.fillText(s,n/2-f/2,o/2+i/2-2)}const d=new V.Texture(l);return d.minFilter=V.LinearFilter,d.needsUpdate=!0,d}function fu(s){const e=eL(s,{fontSize:100,font:"Arial Narrow, sans-serif",color:[255,255,255,1],bgColor:[0,0,0,0]}),t=new V.SpriteMaterial({map:e,transparent:!0});return new V.Sprite(t)}Pa.RIGHT_TOP;const tL={pos:Pa.LEFT_BOTTOM,size:100,hasZAxis:!0};class iL extends QE{constructor(e,t,i){const n={...tL,...i};super(e,t,n.size,i.pos),this.hasZAxis=n.hasZAxis;const o=[0,0,0,2,0,0,0,0,0,0,2,0],r=[1,0,0,1,.6,0,0,1,0,.6,1,0];this.hasZAxis&&(o.push(0,0,0,0,0,2),r.push(0,0,1,0,.6,1));const a=new V.BufferGeometry;a.setAttribute("position",new V.Float32BufferAttribute(o,3)),a.setAttribute("color",new V.Float32BufferAttribute(r,3));const l=new V.LineBasicMaterial({vertexColors:!0,toneMapped:!1});this.axes=new V.LineSegments(a,l),this.axes.position.set(-1,-1,-1),this.add(this.axes),this.xText=fu("X"),this.xText.position.set(1.5,-1,-1),this.add(this.xText),this.yText=fu("Y"),this.yText.position.set(-1,1.5,-1),this.add(this.yText),this.hasZAxis&&(this.zText=fu("Z"),this.zText.position.set(-1,-1,1.5),this.add(this.zText))}setLineColors(e,t){const i=new V.Color,n=this.axes.geometry.attributes.color.array;return i.set(e),i.toArray(n,0),i.toArray(n,3),i.set(t),i.toArray(n,6),i.toArray(n,9),this.axes.geometry.attributes.color.needsUpdate=!0,this}setTextColor(e){this.xText.material.color=e,this.yText.material.color=e}dispose(){var e,t;this.axes.geometry.dispose(),this.axes.material.dispose(),this.xText.geometry.dispose(),this.xText.material.dispose(),this.yText.geometry.dispose(),this.yText.material.dispose(),this.hasZAxis&&((e=this.zText)==null||e.geometry.dispose(),(t=this.zText)==null||t.material.dispose())}}class nL extends D.AcTrBaseView{constructor(e,t,i,n){super(e,i,n),this._layoutBtrId=t,this._mode=qe.SELECTION,this._axesGizmo=this.createAxesGizmo(),this._viewportViews=new Map,this._overlayViewport=new D.AcTrOverlayViewport(e)}get layoutBtrId(){return this._layoutBtrId}get mode(){return this._mode}set mode(e){e==qe.SELECTION?this._cameraControls.mouseButtons={MIDDLE:V.MOUSE.PAN}:e==qe.PAN&&(this._cameraControls.mouseButtons={LEFT:V.MOUSE.PAN}),this._cameraControls.update(),this._mode=e}get viewportCount(){return this._viewportViews.size}get viewportViews(){return this._viewportViews.values()}get overlayViewport(){return this._overlayViewport}get internalCamera(){return this._camera.internalCamera}get viewportsBoundingBox(){if(this._viewportViews.size===0)return;const e=new p.AcGeBox2d;return this._viewportViews.forEach(t=>{const i=t.viewport.box;e.expandByPoint(i.min),e.expandByPoint(i.max)}),e.isEmpty()?void 0:e}addViewport(e){this._viewportViews.set(e.viewport.id,e)}removeViewport(e){this._viewportViews.delete(e)}resize(e,t){this._height=t,this._width=e,this._frustum=t/2,this.updateCameraFrustum(),this._viewportViews.forEach(i=>{i.update()})}render(e){var n;this._renderer.clear();const t=this._renderer.render(e.internalScene,this._camera),i=e.modelSpaceLayout;return i&&this.drawViewports(i.internalObject),this.drawOverlay(e),(n=this._axesGizmo)==null||n.update(),t}createAxesGizmo(){return new iL(this._camera.internalCamera,this._renderer.internalRenderer,{hasZAxis:!1,pos:Pa.LEFT_BOTTOM})}drawViewports(e){if(this._viewportViews.size>0){const t=this._renderer.autoClear;this._renderer.autoClear=!1;const i=new V.Vector4;this._renderer.getViewport(i),this._renderer.clearDepth();const n=e.visible;e.visible=!0,this._viewportViews.forEach(o=>{o.render(e)}),e.visible=n,this._renderer.setViewport(i.x,i.y,i.z,i.w),this._renderer.autoClear=t}}drawOverlay(e){const t=this._overlayViewport;if(!t.visible)return;t.render(e.internalScene,this._height);const i=e.modelSpaceLayout;!i||this._viewportViews.size===0||this.drawOverlayViewports(i.internalObject,t)}drawOverlayViewports(e,t){const i=t.screenRect,n=t.viewBox,o=e.visible;e.visible=!0,this._viewportViews.forEach(r=>{const a=D.acTrWcsBoxToCssRect(r.viewport.box,n,i),l=D.acTrIntersectCssRects(a,i);if(!l)return;const c=D.acTrCssRectToWcsBox(l,n,i),d=new p.AcGeBox2d;d.expandByPoint(r.paperPointToModel({x:c.minX,y:c.minY})),d.expandByPoint(r.paperPointToModel({x:c.maxX,y:c.minY})),d.expandByPoint(r.paperPointToModel({x:c.maxX,y:c.maxY})),d.expandByPoint(r.paperPointToModel({x:c.minX,y:c.maxY})),!d.isEmpty()&&r.withFrozenLayersHidden(e,()=>{t.renderNested(e,d,l,l,this._height,r.viewport.viewTwistAngle)})}),e.visible=o}}class yu{constructor(){this._activeLayoutBtrId="",this._layoutViews=new Map}get activeLayoutBtrId(){return this._activeLayoutBtrId}set activeLayoutBtrId(e){this._activeLayoutBtrId=e,this._layoutViews.forEach(t=>{t.enabled=t.layoutBtrId==e})}get activeLayoutView(){return this._layoutViews.get(this._activeLayoutBtrId)}has(e){return this._layoutViews.has(e)}getAt(e){return this._layoutViews.get(e)}resize(e,t){this._layoutViews.forEach(i=>{i.resize(e,t)})}add(e){this._layoutViews.set(e.layoutBtrId,e)}render(e){var t;return((t=this.activeLayoutView)==null?void 0:t.render(e))??!1}}function sL(s,e){return[...s].sort((t,i)=>oL(t,i,e))}function oL(s,e,t){const i=mx(s)-mx(e);if(Math.abs(i)>Number.EPSILON)return i;const n=fx(t,s)-fx(t,e);return Math.abs(n)>Number.EPSILON?n:0}function mx(s){return Math.max(s.maxX-s.minX,0)*Math.max(s.maxY-s.minY,0)}function fx(s,e){const t=s.x<e.minX?e.minX-s.x:s.x>e.maxX?s.x-e.maxX:0,i=s.y<e.minY?e.minY-s.y:s.y>e.maxY?s.y-e.maxY:0;return t*t+i*i}const ai=class ai{constructor(e){this.zoomTo=e,this.active=!1,this.userAdjusted=!1,this.programmaticDepth=0,this.incrementalEnabled=!1,this.initialPendingCount=0,this.convertedCount=0,this.lastZoomAt=0}get isActive(){return this.active}begin(e){if(this.active){this.initialPendingCount=Math.max(this.initialPendingCount,e),this.maybeEnableIncrementalFit();return}this.active=!0,this.userAdjusted=!1,this.lastZoomAt=0,this.initialPendingCount=e,this.convertedCount=0,this.lastFittedBox=void 0,this.incrementalEnabled=!1,this.maybeEnableIncrementalFit()}end(){this.active=!1,this.incrementalEnabled=!1,this.lastFittedBox=void 0,this.convertedCount=0}applyFinalFit(e){if(this.userAdjusted)return;const t=e();t&&this.applyZoom(t)}frameProgrammatically(e){this.userAdjusted||this.applyZoom(e)}onLayoutViewChanged(){!this.active||this.userAdjusted||this.programmaticDepth>0||(this.userAdjusted=!0,this.end())}afterGeometryBatch(e,t){this.active&&(this.convertedCount++,this.maybeEnableIncrementalFit(),this.maybeIncrementalFit(e))}maybeEnableIncrementalFit(){this.incrementalEnabled||(this.initialPendingCount>=ai.SMALL_ENTITY_THRESHOLD||this.convertedCount>=ai.SMALL_ENTITY_THRESHOLD)&&(this.incrementalEnabled=!0)}maybeIncrementalFit(e){if(!this.active||!this.incrementalEnabled||this.userAdjusted)return;const t=performance.now();if(t-this.lastZoomAt<ai.FIT_INTERVAL_MS)return;const i=e();!i||!this.shouldApplyIncrementalFit(i)||(this.lastZoomAt=t,this.applyZoom(i))}shouldApplyIncrementalFit(e){const t=this.lastFittedBox;if(!t)return!0;const i=this.estimateBoxArea(t);return i<=Number.EPSILON?!0:this.estimateBoxArea(e)>=i*ai.BBOX_GROWTH_RATIO}applyZoom(e,t=1.1){this.programmaticDepth++;try{this.zoomTo(e,t),this.lastFittedBox=this.snapshotFitBox(e)}finally{this.programmaticDepth--}}estimateBoxArea(e){const t=new p.AcGeVector2d;return e.getSize(t),Math.abs(t.x)*Math.abs(t.y)}snapshotFitBox(e){return new p.AcGeBox2d({x:e.min.x,y:e.min.y},{x:e.max.x,y:e.max.y})}};ai.SMALL_ENTITY_THRESHOLD=500,ai.BBOX_GROWTH_RATIO=1.5,ai.FIT_INTERVAL_MS=2500;let gu=ai;const rL=1e3;function aL(s,e,t){return s||e>0?!1:t==null?!0:t>=rL}const bu={background:p.ACGI_MODEL_SPACE_BACKGROUND},de=class de extends Cf{constructor(e=bu){const t={...bu,...e},i=t.container??document.createElement("div");t.container=i,i.style.overflow="hidden",i.hasAttribute("tabindex")||(i.tabIndex=-1);const n=new V.WebGLRenderer({antialias:!0,alpha:!0});i.appendChild(n.domElement),n.domElement.style.display="block",n.domElement.style.maxWidth="100%",n.domElement.style.maxHeight="100%";const o=wm(n.domElement,i);super(n.domElement,i),this._rafId=null,this._loadingLayouts=new Set,this._initializedLayouts=new Set,this._externallyFramedLayouts=new Set,this._openViewMode=_t.Extents,this._convertingLayers=new Set,this._claimedConvertObjectIds=new Set,this._entityConvertGeneration=new Map,this._progressiveRendering=!1,this._convertInvisibleLayers=!1,this._cooperativeYield=!0,this._convertQueue=[],this._viewportRepairOwnerIds=new Set,this._convertDrainPromise=null,this._convertEpoch=0,this._transientDrawGeneration=new Map,this._transientSkipMeshGlyphDepth=0,this._lastProgressivePaintAt=0,this._progressivePaintUrgent=!1,this._progressiveInputPauseUntil=0,this._progressivePaintCount=0,this._progressiveYieldCount=0,this._openLineworkFramePending=!1,this._openLineworkFrameTimer=null,this._pendingGeometryJobs=0,this._deferredGeometryQueue=[],this._deferredGeometryActive=0,this._fontLoadedRedrawTimer=null,this._fontLoadedRedrawEpoch=0,this._entityProcessingIdleAt=0,this._textStyleFontPreloadEpoch=-1,this._textStyleFontPreloadPromise=null,this._viewDomAbort=new AbortController,this._viewDisposed=!1,this._readingMode=new Wu({getCurrentBackgroundColor:()=>this._renderer.currentBackgroundColor,applyViewClearColor:A=>this.applyViewClearColor(A),setCompareDisplay:A=>this.setCompareDisplay(A),markDirty:()=>{this._isDirty=!0}}),this._deferredFontsReady=null,this._convertPhaseMs={finishGeometry:0,finishGeometryAsyncDraw:0,finishGeometryQueueWait:0,handleGroup:0,addEntity:0,awaitFonts:0,glyphEntityCount:0,mtextCount:0,shapeCount:0,sharedGlyphDrawCount:0},this._fontPreloadDiag=null,this.animate=()=>{var G;this._rafId=requestAnimationFrame(this.animate),this.events.renderFrame.dispatch({render:this._renderer,camera:this.internalCamera});const A=this._numOfEntitiesToProcess>0,O=A||this._pendingGeometryJobs>0,P=!this._progressiveRendering&&!this._cooperativeYield&&O;if(!this._isDirty&&!this._htmlDirty&&!O||P||!this._isDirty&&!this._htmlDirty)return;const E=this.shouldCountMidOpenPaint(A,O);if(this._isDirty&&!this._progressivePaintUrgent&&E){const Y=this._progressiveRendering?de.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS:de.NON_PROGRESSIVE_OPEN_PAINT_INTERVAL_MS;if(performance.now()-this._lastProgressivePaintAt<Y)return}let j=!1;this._isDirty&&(E&&(this._progressivePaintCount++,this._lastProgressivePaintAt=performance.now(),this._progressivePaintUrgent=!1),j=this._layoutViewManager.render(this._scene)),this.internalCamera&&(this._isDirty||this._htmlDirty)&&this._css2dRenderer.render(this._scene.internalScene,this.internalCamera),(G=this._stats)==null||G.update(),this._isDirty=j,this._htmlDirty=!1},this._meshGlyphFlushTimer=null,this._disposeCanvasTouchCallout=o;const r=()=>this.noteProgressiveUserInput(),a=()=>{r(),this.focusViewerForShortcuts()},l=()=>{r(),this.focusViewerForShortcuts()};n.domElement.addEventListener("pointerdown",a,{capture:!0}),n.domElement.addEventListener("wheel",l,{capture:!0,passive:!0}),this._disposeProgressiveInputWatch=()=>{n.domElement.removeEventListener("pointerdown",a,{capture:!0}),n.domElement.removeEventListener("wheel",l,{capture:!0})},this._gripManager=new nm(this),this._keyHandler=new No(this),e.calculateSizeCallback&&this.setCalculateSizeCallback(e.calculateSizeCallback),n.setPixelRatio(Math.min(window.devicePixelRatio,2)),n.setSize(this.width,this.height),this._renderer=new D.AcTrRenderer(n),D.setAcTrDrawOrderZAllocator(()=>this._renderer.allocateDrawOrderZ());const c=le.instance.fontMapping;this._renderer.setFontMapping(c),this._onFontNotFound=A=>{Q.emit("font-not-found",{fontName:A.fontName,count:A.count??0})},this._onFontLoaded=A=>{Q.emit("missed-data-changed",{}),this.scheduleGlyphRedrawAfterFontLoad(A==null?void 0:A.fontName)},this._renderer.events.fontNotFound.addEventListener(this._onFontNotFound),this._renderer.events.fontLoaded.addEventListener(this._onFontLoaded),this._scene=this.createScene(),this._layerAppearance=new Gl(this._scene,this._renderer),this._inheritedLayerMaterialMapper=new yp(A=>this._layerAppearance.getEffectiveLayerTraits(A),this._renderer),this.backgroundColor=t.background??p.ACGI_MODEL_SPACE_BACKGROUND,this._stats=this.createStats(le.instance.isShowStats&&(k.tryGetInstance()==null||this.isActiveManagedView()));const d=p.AcDbSysVarManager.instance(),h=p.AcDbSystemVariables.MODELBKCOLOR.toLowerCase(),f=p.AcDbSystemVariables.PAPERBKCOLOR.toLowerCase();this._onSysVarChanged=A=>{const O=A.name.toLowerCase();if(O===h||O===f){const P=A.database;if(!P)return;const E=this.isModelSpaceLayout(P);if(!(O===h&&E||O===f&&!E))return;this.applyCanvasBackground(Mo(P,E))}},d.events.sysVarChanged.addEventListener(this._onSysVarChanged),this._onSettingsModified=A=>{A.key=="isShowStats"&&this.toggleStatsVisibility(this._stats,A.value)},le.instance.events.modified.addEventListener(this._onSettingsModified);let y=null,g=null,b=null;const w=()=>!this.editor.isActive&&!qt.getActiveInputBox()&&!If()&&!this._gripManager.isDragging,S=()=>this.mode===qe.SELECTION&&w(),x=()=>w()&&Ve().canIdleTouchBox(this.mode),_=()=>{b==null||b.remove(),b=null},C=()=>{y=null,g=null,_()},T=(A,O)=>{g=this.viewportToCanvas({x:A,y:O}),y=this.screenToWorld(g),_(),b=document.createElement("div"),b.className="ml-jig-preview-rect",this.container.appendChild(b)},L=(A,O,P="replace")=>{if(!y||!b||!g)return;const E=this.viewportToCanvas({x:A,y:O}),I=this.screenToWorld(E),j=this.worldToScreen(y),G=this.worldToScreen(I),Y=Math.min(j.x,G.x),ee=Math.min(j.y,G.y),Z=Math.abs(j.x-G.x),re=Math.abs(j.y-G.y),Se=this.getSelectionMode(g,E),Ke=this.getSelectionPreviewStyle(Se,P);Object.assign(b.style,{left:`${Y}px`,top:`${ee}px`,width:`${Z}px`,height:`${re}px`,borderStyle:Ke.borderStyle,background:Ke.background}),b.style.setProperty("--line-color",Ke.lineColor)},N=(A,O,P,E)=>{if(!y||!g)return;const I=this.viewportToCanvas({x:A,y:O}),j=this.screenToWorld(I);if(_(),E)if(Yh(this,I.x,I.y,P))P==="replace"&&this.selectionSet.clear();else if(this.entitySelectionEnabled){const G=this.pick(j);G.length>0?(P==="replace"&&this.htmlTransientManager.deselectAll(),this.applySelection([G[0].id],P)):P==="replace"&&this.selectionSet.clear()}else P==="replace"&&this.selectionSet.clear();else{const G=new p.AcGeBox2d().expandByPoint(y).expandByPoint(j),Y=this.getSelectionMode(g,I);this.entitySelectionEnabled&&this.selectByBoxWithMode(G,Y,P),Zh(this,G,Y,P)}y=null,g=null},B=this._viewDomAbort.signal;this.canvas.addEventListener("mousedown",A=>{A.button===0&&S()&&(yt(A)||He()||T(A.clientX,A.clientY))},{signal:B}),this.canvas.addEventListener("mousemove",A=>{!y||!b||!g||yt(A)||He()||L(A.clientX,A.clientY,this.getPointerSelectionAction(A))},{signal:B}),this.canvas.addEventListener("mouseup",A=>{if(this._gripManager.isDragging){C();return}if(!y||!g||yt(A)||He())return;const O=this.viewportToCanvas({x:A.clientX,y:A.clientY}),P=this.getPointerSelectionAction(A);N(A.clientX,A.clientY,P,this.isSelectionClick(g,O))},{signal:B}),this._disposeMobileBoxGesture=cr({element:this.canvas,shouldStart:()=>x(),setNavigationEnabled:A=>{this.setNavigationEnabled(A)},onActivate:(A,O)=>{T(A,O),L(A,O)},onMove:(A,O)=>{L(A,O)},onBoxEnd:(A,O,P)=>{N(A,O,"replace",!P)},onTap:(A,O)=>{g=this.viewportToCanvas({x:A,y:O}),y=this.screenToWorld(g),N(A,O,"replace",!0)},onAbort:()=>{C()}}),this.canvas.addEventListener("dblclick",A=>{A.button===0&&S()&&this.entitySelectionEnabled&&k.instance.curDocument.openMode===U.Write&&this.openPickedEntityEditor(A)},{signal:B}),document.addEventListener("keydown",A=>{this.isActiveManagedView()&&this.isShortcutEventInsideViewer(A)&&this._keyHandler.handleKeyDown(A)},{signal:B}),this._onLayoutSwitched=A=>{var j,G;if(!this.isActiveManagedView())return;const O=A.layout.database,P=(G=(j=k._instance)==null?void 0:j.curDocument)==null?void 0:G.database;if(O&&P&&O!==P)return;const E=A.layout.blockTableRecordId,I=!this._initializedLayouts.has(E);this._initializedLayouts.add(E),this.activeLayoutBtrId=E,this.createLayoutViewIfNeeded(E),this.loadLayoutEntitiesIfNeeded(E),this.refreshCanvasBackgroundForActiveLayout(),this._isDirty=!0,I&&this.applyInitialZoom(E,A.layout)},p.acdbHostApplicationServices().layoutManager.events.layoutSwitched.addEventListener(this._onLayoutSwitched),this._css2dRenderer=new jx.CSS2DRenderer,this._css2dRenderer.setSize(this.width,this.height),this._css2dRenderer.domElement.style.position="absolute",this._css2dRenderer.domElement.style.top="0px",this._css2dRenderer.domElement.style.left="0px",this._css2dRenderer.domElement.style.pointerEvents="none",this._css2dRenderer.domElement.style.zIndex=String(Tp),this._css2dRenderer.domElement.style.maxWidth="100%",this._css2dRenderer.domElement.style.maxHeight="100%",i.appendChild(this._css2dRenderer.domElement),this._missedImages=new Map,this._layoutViewManager=new yu,this._progressiveOpenFit=new gu((A,O)=>{this.activeLayoutView.zoomTo(A,O??1.1),this._isDirty=!0}),this._entityDisplay=new JE(A=>this.resolveLayerInfo(A)),this.initialize(),this.onWindowResize(),this._isDirty=!0,this._htmlDirty=!1,this.startAnimationLoop(),this._numOfEntitiesToProcess=0,this.resetDeferredGeometryQueue()}ensureDeferredFontsReady(){if(!this._deferredFontsReady){const e=performance.now(),t=Promise.all([this.awaitPresetFontsReadySafe(),this.awaitTextStyleFontsReady()]).then(()=>{},()=>{});this._deferredFontsReady=t.then(()=>{this._convertPhaseMs.awaitFonts+=performance.now()-e})}return this._deferredFontsReady}async awaitPresetFontsReadySafe(){const e=k;e._instance&&await e._instance.awaitPresetFontsReady()}takeConvertPhaseTimings(){const e={...this._convertPhaseMs,fontPreload:this._fontPreloadDiag?{...this._fontPreloadDiag}:void 0};return this._convertPhaseMs={finishGeometry:0,finishGeometryAsyncDraw:0,finishGeometryQueueWait:0,handleGroup:0,addEntity:0,awaitFonts:0,glyphEntityCount:0,mtextCount:0,shapeCount:0,sharedGlyphDrawCount:0},this._fontPreloadDiag=null,e}getPointerSelectionAction(e){return Sf(e)}initialize(){this.setCursor(Ti.Crosshair),this._onCommandWillStartHitTest=()=>{this.htmlTransientManager.setHitTestEnabled(!1)},this._onCommandEndedHitTest=()=>{this.htmlTransientManager.setHitTestEnabled(!0)},this.editor.events.commandWillStart.addEventListener(this._onCommandWillStartHitTest),this.editor.events.commandEnded.addEventListener(this._onCommandEndedHitTest)}get mode(){const e=this.activeLayoutView;return e?e.mode:qe.SELECTION}set mode(e){this.activeLayoutView.mode=e}setNavigationEnabled(e){const t=this.activeLayoutView;t&&(t.enabled=e)}setSnapLoupe(e){var i;const t=(i=this.activeLayoutView)==null?void 0:i.overlayViewport;if(t){if(!e){t.visible=!1,this._isDirty=!0;return}t.setScreenRect(e.x,e.y,e.size,e.size),t.setViewBox(e.viewBox),t.visible=!0,this._isDirty=!0}}get renderer(){return this._renderer}get gripManager(){return this._gripManager}get isDirty(){return this._isDirty}get isProcessingEntities(){return this._numOfEntitiesToProcess>0||this._pendingGeometryJobs>0}get isConvertingEntities(){return this._numOfEntitiesToProcess>0}async waitUntilIdle(e=6e4){const t=Date.now()+Math.max(0,e);let i=0;for(;;){if(this.isProcessingEntities)i=0;else if(i++,i>=2)return!0;if(Date.now()>t)return!this.isProcessingEntities;await new Promise(n=>setTimeout(n,16))}}get progressiveRendering(){return this._progressiveRendering}set progressiveRendering(e){this._progressiveRendering=e,this.resetProgressiveOpenStats()}get convertInvisibleLayers(){return this._convertInvisibleLayers}set convertInvisibleLayers(e){this._convertInvisibleLayers=e}get cooperativeYield(){return this._cooperativeYield}set cooperativeYield(e){this._cooperativeYield=e}get progressiveOpenStats(){return{paintCount:this._progressivePaintCount,yieldCount:this._progressiveYieldCount}}resetProgressiveOpenStats(){this._progressivePaintCount=0,this._progressiveYieldCount=0,this._lastProgressivePaintAt=0,this._progressivePaintUrgent=!1,this._progressiveInputPauseUntil=0}isProgressiveGesturePauseActive(){return performance.now()<this._progressiveInputPauseUntil}isProgressiveDiscreteInputPending(){var t;const e=navigator.scheduling;return((t=e==null?void 0:e.isInputPending)==null?void 0:t.call(e))===!0}noteProgressiveUserInput(){!this._progressiveRendering||this._numOfEntitiesToProcess<=0||(this._progressivePaintUrgent=!0,this._isDirty=!0,this._progressiveInputPauseUntil=performance.now()+de.PROGRESSIVE_INPUT_PAUSE_MS)}async progressiveYieldForInput(e,t){if(this.isProgressiveGesturePauseActive()){for(await t();performance.now()<this._progressiveInputPauseUntil;)await new Promise(n=>setTimeout(n,16));this._progressiveYieldCount++;return}if(this.isProgressiveDiscreteInputPending()){await t(),this._progressiveYieldCount++;return}if(!e)return;await e.maybeYield(t)&&this._progressiveYieldCount++}beginProgressiveOpenFit(){this._progressiveOpenFit.begin(this._numOfEntitiesToProcess)}endProgressiveOpenFit(){this._progressiveOpenFit.end()}set isDirty(e){this._isDirty=e}get isHtmlDirty(){return this._htmlDirty}set isHtmlDirty(e){this._htmlDirty=e}get missedData(){return{fonts:this._renderer.missedFonts,images:this._missedImages,xrefs:this.collectUnresolvedXrefs()}}collectUnresolvedXrefs(){var e,t;try{const i=(t=(e=k.instance)==null?void 0:e.curDocument)==null?void 0:t.database;if(!i)return[];const n=i.tables.blockTable;return typeof n.getUnresolvedXrefs!="function"?[]:n.getUnresolvedXrefs().map(o=>({name:o.name,pathName:o.pathName,isOverlay:o.isOverlayReference}))}catch{return[]}}get center(){return this.activeLayoutView.center}set center(e){this.activeLayoutView.center=e}get backgroundColor(){return this._renderer.getClearColor()}set backgroundColor(e){this.applyCanvasBackground(e)}applyCanvasBackground(e){if(this._renderer.currentBackgroundColor=e,this._layerAppearance.refreshTextMaterialsInObjectTree(this._scene.internalScene),this._scene.repaintForegroundMaterials(p.acgiForegroundColorForBackground(e)),this._scene.repaintBackgroundMaterials(e),this.resyncForegroundLayersForBackground(),this._readingMode.isEnabled){this._readingMode.noteLayoutBackground(e),this.applyViewClearColor($a);return}this.applyViewClearColor(e)}applyViewClearColor(e){this._renderer.setClearColor(e),this.editor.syncCursorBackground(e),this._isDirty=!0}resyncForegroundLayersForBackground(){var t;const e=this._renderer.context.database;if(e)for(const i of e.tables.layerTable.newIterator())(t=i.color)!=null&&t.isForeground&&this._layerAppearance.syncFromLiveRecord(i)}isModelSpaceLayout(e){return e?cp(e):this.activeLayoutBtrId===this.modelSpaceBtrId}bindDrawDatabase(e){this._renderer.context.database=e}syncDisplaySysVars(e){this.bindDrawDatabase(e),this.applyCanvasBackground(Mo(e,this.isModelSpaceLayout(e))),this._readingMode.reapplyIfEnabled()}get readingModeEnabled(){return this._readingMode.isEnabled}toggleReadingMode(){this._readingMode.toggle()}setReadingMode(e){this._readingMode.setEnabled(e)}async addOverlayEntities(e){const t=new Ap;t.isReference=!0,t.internalObject.userData.isReference=!0,this._scene.internalScene.add(t.internalObject);for(const n of e.tables.layerTable.newIterator())t.addLayer({name:n.name,isOff:n.isOff,isFrozen:n.isFrozen,color:n.color});const i=this._renderer.context.database;this._renderer.context.database=e;try{const n=e.tables.blockTable.modelSpace;for(const o of n.newIterator())if(!(o instanceof p.AcDbViewport))try{const r=this.drawEntity(o,!1);if(!r)continue;r.objectId=o.objectId,r.ownerId=o.ownerId,r.layerName=o.layer,r.visible=o.visibility!==!1,r instanceof D.AcTrGroup&&r.isOnTheSameLayer&&(r.userData.insertLayerName=r.layerName),await this.finishEntityGeometry(r,!1),r instanceof D.AcTrGroup&&r.isOnTheSameLayer&&this._inheritedLayerMaterialMapper.remap(r.children,"0",r.layerName),t.addEntity(r),r.dispose()}catch(r){p.log.error(`[AcTrView2d] Failed to convert overlay entity ${o.objectId} (${o.type}):`,r)}}finally{this._renderer.context.database=i}return t}refreshCanvasBackgroundForActiveLayout(){var n,o;const t=(o=(n=k._instance)==null?void 0:n.curDocument)==null?void 0:o.database;if(!t)return;const i=this.activeLayoutBtrId===this.modelSpaceBtrId;this.applyCanvasBackground(Mo(t,i))}get modelSpaceBtrId(){return this._scene.modelSpaceBtrId}set modelSpaceBtrId(e){this._scene.modelSpaceBtrId=e}get activeLayoutBtrId(){return this._scene.activeLayoutBtrId}set activeLayoutBtrId(e){const t=this._scene.activeLayoutBtrId;this._layoutViewManager.activeLayoutBtrId=e,this._scene.activeLayoutBtrId=e,this.htmlTransientManager.setActiveLayoutId(e),this._isDirty=!0,t!==e&&zh()}get activeLayoutView(){return this._layoutViewManager.activeLayoutView}get stats(){return this._scene.stats}get cadScene(){return this._scene}async ensureEntitiesConvertedForExport(e){var l;const t=(e==null?void 0:e.includeInvisibleLayers)!==!1,i=(e==null?void 0:e.includeLayouts)!==!1,n=k.instance.curDocument.database,o=[];await this.drainConvertQueue();const r=(l=n.objects)==null?void 0:l.layout;if(i&&(r!=null&&r.newIterator))for(const c of r.newIterator()){const d=c.blockTableRecordId;d&&this._scene.addEmptyLayout(d)}for(const[c]of this._scene.layouts){if(!i&&c!==this._scene.modelSpaceBtrId)continue;const d=n.tables.blockTable.getIdAt(c);d&&o.push(...this._entityDisplay.collectMissingEntitiesForExport(d,h=>this.isEntityConvertScheduled(h),t))}o.length>0&&(this._numOfEntitiesToProcess+=o.length,await this.batchConvert(o,{forExport:!0})),await this.waitUntilIdle(12e4)||p.log.warn("[AcTrView2d] Timed out waiting for deferred geometry before export"),this.flushMeshGlyphWorldBatch()}get internalScene(){return this._scene.internalScene}get htmlTransientManager(){return this._scene.htmlTransientManager}get internalCamera(){var e;return(e=this.activeLayoutView)==null?void 0:e.internalCamera}set ltscale(e){this._renderer.ltscale=e}set celtscale(e){this._renderer.celtscale=e}screenToWorld(e){const t=this.activeLayoutView;return t?t.screenToWorld(e):new p.AcGePoint2d(e)}worldToScreen(e){const t=this.activeLayoutView;return t?t.worldToScreen(e):new p.AcGePoint2d(e)}zoomTo(e,t=1.1){this.activeLayoutView.zoomTo(e,t),this._isDirty=!0}rerenderPoints(e,t=0){const i=this._scene.activeLayout;i&&(i.rerenderPoints(e,t),this._isDirty=!0)}requestOpenLineworkFrame(){this._openLineworkFramePending=!0,this.scheduleOpenLineworkFrame()}cancelOpenLineworkFrame(){this._openLineworkFramePending=!1,this._openLineworkFrameTimer!=null&&(clearTimeout(this._openLineworkFrameTimer),this._openLineworkFrameTimer=null)}scheduleOpenLineworkFrame(){if(this._openLineworkFrameTimer!=null||!this._openLineworkFramePending)return;const e=this.isConvertingEntities?50:0;this._openLineworkFrameTimer=setTimeout(()=>{if(this._openLineworkFrameTimer=null,!!this._openLineworkFramePending){if(this.isConvertingEntities){this.scheduleOpenLineworkFrame();return}this.frameOpenLineworkIfReady()}},e)}zoomToFitDrawing(e=0,t){new jo(()=>!this.isProcessingEntities,()=>{if(t&&this._externallyFramedLayouts.delete(t)){this.endProgressiveOpenFit();return}this._progressiveOpenFit.applyFinalFit(()=>this.getDrawingExtents()),this.endProgressiveOpenFit();const n=t??this.activeLayoutBtrId;n&&yi.rememberOriginalView(this,n)},300,e).start()}zoomToFitLayer(e){const t=this._scene.activeLayout;if(t){const i=t.getLayer(e);if(i&&!i.box.isEmpty()){const n=mu.threeBox3dToGeBox2d(i.box);return this.zoomTo(n),this._isDirty=!0,!0}}return!1}zoomToSmartExtents(e=0){return new Promise((t,i)=>{new jo(()=>!this.isProcessingEntities,()=>{(async()=>{try{const o=await this.resolveSmartFitBox();if(o){this.zoomTo(o),this._isDirty=!0,this.endProgressiveOpenFit(),t();return}this._progressiveOpenFit.applyFinalFit(()=>this.getDrawingExtents()),this.endProgressiveOpenFit(),t()}catch(o){this.endProgressiveOpenFit(),i(o)}})()},300,e).start()})}async resolveSmartFitBox(){const e=this._scene.activeLayout;if(!e)return;const t=e.cachedSmartExtents;if(t)return t;const i=e.smartExtentsGeneration,n=new gp,o=await e.collectSpatialExtentBoxesAsync(n),r=await bp(o,n);return e.smartExtentsGeneration!==i?e.cachedSmartExtents:(r&&(e.cachedSmartExtents=r),r)}flyTo(e,t){this.activeLayoutView.flyTo(e,t),this._isDirty=!0}async openPickedEntityEditor(e){const t=this.viewportToCanvas({x:e.clientX,y:e.clientY}),i=this.screenToWorld(t),n=this.pick(i,void 0,!0);if(!n.length)return;const o=k.instance.curDocument.database.tables.blockTable.getEntityById(n[0].id);if(!o)return;const r=this.resolveAttributedBlockReference(o);if(r){e.preventDefault(),this.selectionSet.clear(),this.selectionSet.add(r.objectId),k.instance.sendStringToExecute("attedit");return}if(o instanceof p.AcDbMText){e.preventDefault(),await this.editMTextEntity(o);return}o instanceof p.AcDbText&&(e.preventDefault(),await this.editTextEntity(o))}resolveAttributedBlockReference(e){if(e instanceof p.AcDbBlockReference)return e.attributeIterator().count>0?e:void 0;if(e instanceof p.AcDbAttribute||e.type==="Attrib"||e.type==="Attribute"){const t=k.instance.curDocument.database.tables.blockTable.getEntityById(e.ownerId);if(t instanceof p.AcDbBlockReference&&t.attributeIterator().count>0)return t}}async editMTextEntity(e){const t=e.database;this.setEntitySceneVisible(e.objectId,!1),this._isDirty=!0;const i=e.resolveAnnotativePresentation,n=typeof i=="function"?i.call(e):null,o=(n==null?void 0:n.position)??e.location,r={x:o.x,y:o.y,z:o.z??0},a=(n==null?void 0:n.direction)??e.direction,l=(n==null?void 0:n.attachmentPoint)??e.attachmentPoint,c=n&&Number.isFinite(n.width)&&n.width>0?n.width:this.resolveMTextEditorWidth(e),d=n&&Number.isFinite(n.height)&&n.height>0?n.height:this.resolveMTextEditorTextHeight(e),h=new qt;let f=!1;try{const y=await h.open({view:this,location:r,width:c,textHeight:d,initialText:e.contents,initialAttachmentPoint:l,initialDrawingDirection:e.drawingDirection,rotation:e.rotation,directionVector:{x:a.x,y:a.y,z:a.z},textStyleName:e.styleName,initialLineSpaceFactor:e.lineSpacingFactor,toolbarFontFamilies:await this.getMTextToolbarFontFamilies()});if(!y)return;ui(t,"Edit MText",()=>{const g=t.openEntityForWrite(e);g instanceof p.AcDbMText&&(g.location=y.location,g.contents=y.contents,g.width=y.width,g.height=y.height,g.lineSpacingFactor=y.lineSpacingFactor,g.attachmentPoint=y.attachmentPoint)}),f=!0}finally{this.setEntitySceneVisible(e.objectId,!0),f||this.updateEntity(e),this._isDirty=!0}}async editTextEntity(e){const t=e.database;this.setEntitySceneVisible(e.objectId,!1),this._isDirty=!0;const i=Number(e.height),n=Number.isFinite(i)&&i>0?i:this.pixelsToWorldY(24),o=e.textString??"",r=Math.max(n*Math.max(o.length,1)*.6,n),a=Number(e.rotation),l=new qt;let c=!1;try{const d=await l.open({view:this,location:e.position,width:r,textHeight:n,initialText:o,initialAttachmentPoint:p.AcGiMTextAttachmentPoint.BaselineLeft,...Number.isFinite(a)?{rotation:a}:{},toolbarFontFamilies:await this.getMTextToolbarFontFamilies()});if(!d)return;ui(t,"Edit Text",()=>{const h=t.openEntityForWrite(e);h instanceof p.AcDbText&&(h.position=new p.AcGePoint3d(d.location),h.textString=d.contents,Number.isFinite(d.height)&&d.height>0&&(h.height=d.height))}),c=!0}finally{this.setEntitySceneVisible(e.objectId,!0),c||this.updateEntity(e),this._isDirty=!0}}resolveMTextEditorWidth(e){const t=Number(e.width);return Number.isFinite(t)&&t>0?t:0}resolveMTextEditorTextHeight(e){const t=Number(e.height);return Number.isFinite(t)&&t>0?t:this.pixelsToWorldY(24)}pixelsToWorldY(e){const t=this.screenToWorld({x:0,y:0}),i=this.screenToWorld({x:0,y:e});return Math.max(Math.abs(i.y-t.y),1e-4)}async getMTextToolbarFontFamilies(){const e=await k.instance.getAvaiableFonts()??[];return Array.from(new Set(e.flatMap(t=>t.name).map(t=>t.trim()).filter(t=>t.length>0)))}pick(e,t,i){e==null&&(e=this.curPos);const n=[],o=this._scene.activeLayout;if(!o)return n;const r=this.activeLayoutView,a=t??this.selectionBoxSize,l=r.pointToBox(e,a),c=Math.max(l.size.width/2,l.size.height/2),d=r.layoutBtrId!==this._scene.modelSpaceBtrId,h=(l.size.width+l.size.height)/2,f=[],y=new Set;if(d)for(const C of r.viewportViews)C.containsPaperPoint(e)&&!C.isNearPaperBorder(e,h)&&(f.push(C),y.add(C.viewport.id));const g=this._scene.search(l),b=r.resetRaycaster(e,c),w=D.AcTrMTextRenderer.getInstance(),S=new Set;g.forEach(C=>{if(y.has(C.id))return;const T=w.intersectMeshGlyphObjectId(C.id,b);!ts(C)&&!T||(o.isIntersectWith(C.id,b)||T)&&(n.push(C),S.add(C.id))});const x=w.queryMeshGlyphObjectIdsIntersectingBox({minX:l.min.x,minY:l.min.y,maxX:l.max.x,maxY:l.max.y});for(const C of x){if(S.has(C)||y.has(C)||!w.intersectMeshGlyphObjectId(C,b))continue;const T=w.getMeshGlyphWorldPickBoxes().get(C);n.push({id:C,minX:(T==null?void 0:T.min.x)??l.min.x,minY:(T==null?void 0:T.min.y)??l.min.y,maxX:(T==null?void 0:T.max.x)??l.max.x,maxY:(T==null?void 0:T.max.y)??l.max.y}),S.add(C)}f.length>0&&this.pickThroughViewports(e,l,f,n);const _=sL(n,e);return i?_.slice(0,1):_}getViewportCoordinateMapper(e){var i;let t;for(const n of((i=this.activeLayoutView)==null?void 0:i.viewportViews)??[])if(n.viewport.id===e){t=n;break}if(t)return{paperToModel:n=>t.paperPointToModel(n),modelToPaper:n=>t.modelPointToPaper(n),containsPaperPoint:n=>t.containsPaperPoint(n)}}pickThroughViewports(e,t,i,n){const o=this._scene.modelSpaceLayout;if(!o)return;const r=(t.size.width+t.size.height)/4;for(const a of i){const l=a.paperPointToModel(e),c=r*a.paperToModelScale;if(c<=0)continue;const d=new p.AcGeBox2d().setFromPoints([new p.AcGePoint2d(l.x-c,l.y-c),new p.AcGePoint2d(l.x+c,l.y+c)]),h=a.resetRaycaster(l,c);o.search(d).forEach(y=>{ts(y)&&o.isIntersectWith(y.id,h)&&n.push({...y,viewportId:a.viewport.id})})}}search(e,t){return this._scene.search(e,t)}select(e){const t=[];this.pick(e).forEach(o=>t.push(o.id));const n=this.selectableIds(t,"add");n.length>0&&this.selectionSet.add(n)}selectByBox(e){this.selectByBoxWithMode(e,"crossing","add")}refineCrossingSelectionHits(e,t){var o;const i=(o=k.instance.curDocument)==null?void 0:o.database;if(!i)return t.map(r=>r.id);const n=[];for(const r of t){if(!Ef(r)){n.push(r.id);continue}const a=new p.AcGeBox2d({x:r.minX,y:r.minY},{x:r.maxX,y:r.maxY});if(e.containsBox(a)){n.push(r.id);continue}const l=i.tables.blockTable.getEntityById(r.id);(!l||Pf(l,e))&&n.push(r.id)}return n}addLayer(e){this._scene.addLayer(this.toLayerInfo(e)),this._layerAppearance.syncFromLiveRecord(e),this._isDirty=!0}updateLayer(e,t){const{touchedObjectIds:i}=this._scene.updateLayer(this.toLayerInfo(e));if(this._layerAppearance.layerStyleMayHaveChanged(t)&&this._layerAppearance.syncFromLiveRecord(e),this._entityDisplay.layerVisibilityMayHaveChanged(t)){const n=this.toLayerInfo(e);(on.isLayerVisible(n)||!n.isFrozen)&&this.convertMissingEntitiesOnLayer(e.name)}for(const n of i)this.applySessionHiddenObjectState(n);this._isDirty=!0}addTransientEntity(e){const t=Array.isArray(e)?e:[e],i=this._convertEpoch,n=this._renderer.forceShowLineWeight;this._renderer.forceShowLineWeight=!0;const o=this._renderer.context;this._transientSkipMeshGlyphDepth++,o.skipMeshGlyphInstancing=!0;const r=()=>{this._transientSkipMeshGlyphDepth=Math.max(0,this._transientSkipMeshGlyphDepth-1),this._transientSkipMeshGlyphDepth===0&&(o.skipMeshGlyphInstancing=!1)};try{for(let a=0;a<t.length;++a){const l=t[a],c=String(l.objectId??""),d=c?(this._transientDrawGeneration.get(c)??0)+1:0;c&&(this._transientDrawGeneration.set(c,d),D.AcTrMTextRenderer.getInstance().removeMeshGlyphInstances(c));const h=this.drawEntity(l,!0);if(h){h.objectId=l.objectId,h.userData.skipMeshGlyphInstancing=!0;try{h.syncDraw()}catch(f){p.log.error("[AcTrView2d] Transient entity geometry failed:",f),h.dispose();continue}if(i!==this._convertEpoch){h.dispose();continue}if(c&&this._transientDrawGeneration.get(c)!==d){h.dispose();continue}this._scene.addTransientEntity(h),this._isDirty=!0}}}finally{this._renderer.forceShowLineWeight=n,r()}}removeTransientEntity(e){const t=String(e??"");t&&this._transientDrawGeneration.set(t,(this._transientDrawGeneration.get(t)??0)+1),this._scene.removeTransientEntity(e),this._isDirty=!0}setTransientEntityVisible(e,t){this._scene.setTransientEntityVisible(e,t)&&(this._isDirty=!0)}canCreateEntityPreview(e){return this._scene.canCreatePreview(e)}createEntityPreview(e){const t=this._scene.createPreview(e);return t&&(this._isDirty=!0),t}updateEntityPreview(e,t){this._scene.updatePreview(e,D.AcTrMatrixUtil.createMatrix4(t))&&(this._isDirty=!0)}removeEntityPreview(e){this._scene.removePreview(e)&&(this._isDirty=!0)}updateTransientPreviewTransforms(e){const t=this._scene.updateTransientPreviewTransforms(e.map(i=>({objectId:i.objectId,matrix:D.AcTrMatrixUtil.createMatrix4(i.matrix)})));t.webgl&&(this._isDirty=!0),t.html&&(this._htmlDirty=!0)}addEntity(e){var i;const t=Array.isArray(e)?e:[e];for(let n=0;n<t.length;n++){const o=(i=t[n])==null?void 0:i.ownerId;if(!o)continue;let r=this._scene.layouts.get(o);r||(this._scene.addEmptyLayout(o),r=this._scene.layouts.get(o)),r&&!r.isLoaded&&(r.isLoaded=!0)}this._numOfEntitiesToProcess+=t.length,this._convertQueue.push(...t),this.drainConvertQueue()}removeEntity(e){(Array.isArray(e)?e:[e]).forEach(i=>{this.releaseConvertClaim(i.objectId),this._scene.removeEntity(i.objectId)}),this._isDirty=!0}releaseConvertClaim(e){const t=String(e??"");t&&(this._claimedConvertObjectIds.delete(t),this._entityConvertGeneration.set(t,(this._entityConvertGeneration.get(t)??0)+1))}hasEntity(e){return this._scene.hasEntity(e)}isEntityConvertScheduled(e){const t=String(e??"");return t?this.hasEntity(e)||this._claimedConvertObjectIds.has(t):!1}getEntityVisible(e){return this._scene.getEntityVisible(e)}updateEntityVisibility(e){return this._scene.setEntityVisible(e.objectId,e.visibility)?(this._isDirty=!0,!0):!1}setEntitySceneVisible(e,t){return this._scene.setEntityVisible(e,t)?(this._isDirty=!0,!0):!1}applySessionHiddenObjectState(e){k.instance.curDocument.isObjectHidden(e)&&this._scene.setEntityVisible(e,!1)}updateEntity(e){const t=this.resolveSceneUpdateEntities(Array.isArray(e)?e:[e]);if(t.length===0)return;const i=t.map(n=>n.objectId).filter(n=>this.selectionSet.has(n));for(let n=0;n<t.length;++n){const o=t[n],r=String(o.objectId??"");r&&(this._entityConvertGeneration.set(r,(this._entityConvertGeneration.get(r)??0)+1),this._claimedConvertObjectIds.delete(r),D.AcTrMTextRenderer.getInstance().removeMeshGlyphInstances(r)),this._scene.hasEntity(o.objectId)&&this._scene.removeEntity(o.objectId)}(async()=>(await this.batchConvert(t),await this.waitUntilDeferredGeometryIdle(),i.length>0&&this.highlight(i),this._gripManager.refresh(),this._isDirty=!0))(),this._isDirty=!0,setTimeout(()=>{this._isDirty=!0},100)}resolveSceneUpdateEntities(e){var o;const t=(o=k.instance.curDocument)==null?void 0:o.database,i=[],n=new Set;for(const r of e){let a=r;if(r instanceof p.AcDbAttribute){const l=t==null?void 0:t.tables.blockTable.getEntityById(r.ownerId);if(!(l instanceof p.AcDbBlockReference))continue;a=l}n.has(a.objectId)||(n.add(a.objectId),i.push(a))}return i}addLayout(e){this._scene.addEmptyLayout(e.blockTableRecordId),this.createLayoutViewIfNeeded(e.blockTableRecordId),this._isDirty=!0}markLayoutAsInitialized(e){this._initializedLayouts.add(e),this._externallyFramedLayouts.add(e)}setOpenViewMode(e){this._openViewMode=e}isLayoutInitialized(e){return this._initializedLayouts.has(e)}getDrawingExtents(){const e=this._scene.box;if(e&&!e.isEmpty())return mu.threeBox3dToGeBox2d(e)}applyInitialZoom(e,t){new jo(()=>!this.isProcessingEntities,()=>{if(this._externallyFramedLayouts.delete(e))return;const n=this.resolveFirstVisitFrameBox(e,t);n&&this.zoomTo(n),this._isDirty=!0,yi.rememberOriginalView(this,e)},300,0).start()}resolveFirstVisitFrameBox(e,t){var d,h;const i=e===this.modelSpaceBtrId,n=this._openViewMode===_t.Saved;if(n&&i){const f=k.instance.curDocument.database,y=this.width/Math.max(this.height,1),g=f.tables.viewportTable.getActiveVportBox(y);if(g)return g}const o=this._layoutViewManager.getAt(e),r=t.extents,a=r&&!r.isEmpty()?{min:{x:r.min.x,y:r.min.y},max:{x:r.max.x,y:r.max.y}}:void 0,l=this.getDrawingExtents(),c=o==null?void 0:o.viewportsBoundingBox;return n&&!i?(d=kr({limits:t.limits,viewportsBox:c,layoutExtents:a,entityBox:l}))==null?void 0:d.box:(h=kr({limits:void 0,viewportsBox:i?void 0:c,layoutExtents:a,entityBox:l}))==null?void 0:h.box}abortConversion(){this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this.clearMeshGlyphFlushTimer(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.cancelOpenLineworkFrame(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0}clear(){this.abortConversion(),this._scene.clear(),D.AcTrMTextRenderer.getInstance().resetMeshGlyphBatch(),this._renderer.resetDrawOrderZ(),this._isDirty=!0,this._missedImages.clear(),this._initializedLayouts.clear(),this._externallyFramedLayouts.clear(),this._openViewMode=_t.Extents,this._loadingLayouts.clear(),this._renderer.dispose(),p.AcDbRenderingCache.instance.clear(),Q.emit("missed-data-changed",{})}captureSessionState(){return this.clearMeshGlyphFlushTimer(),{scene:this._scene,layoutViewManager:this._layoutViewManager,initializedLayouts:this._initializedLayouts,externallyFramedLayouts:this._externallyFramedLayouts,openViewMode:this._openViewMode,loadingLayouts:this._loadingLayouts,missedImages:this._missedImages,missedFonts:this._renderer.snapshotMissedFonts(),selectionIds:this.selectionSet.ids,meshGlyphBatch:D.AcTrMTextRenderer.getInstance().detachMeshGlyphBatch()}}restoreSessionState(e){this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this.clearMeshGlyphFlushTimer(),this.cancelOpenLineworkFrame(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0,this._scene=e.scene,this._layoutViewManager=e.layoutViewManager,this._initializedLayouts=e.initializedLayouts,this._externallyFramedLayouts=e.externallyFramedLayouts,this._openViewMode=e.openViewMode??_t.Extents,this._loadingLayouts=e.loadingLayouts,this._missedImages=e.missedImages,this._renderer.replaceMissedFonts(e.missedFonts??{}),D.AcTrMTextRenderer.getInstance().attachMeshGlyphBatch(e.meshGlyphBatch),this.rebindLayerAppearance(),this._layoutViewManager.resize(this.width,this.height),this.selectionSet.clear(),e.selectionIds.length>0&&this.selectionSet.add(e.selectionIds),this._isDirty=!0,Q.emit("missed-data-changed",{})}beginNewSession(){const e=this.captureSessionState();return this._convertEpoch++,this.clearFontLoadedRedrawTimer(),this.cancelOpenLineworkFrame(),this._convertQueue.length=0,this._viewportRepairOwnerIds.clear(),this._numOfEntitiesToProcess=0,this._claimedConvertObjectIds.clear(),this._entityConvertGeneration.clear(),this.resetDeferredGeometryQueue(),this._entityProcessingIdleAt=0,this._scene=this.createScene(),this._layoutViewManager=new yu,this._initializedLayouts=new Set,this._externallyFramedLayouts=new Set,this._openViewMode=_t.Extents,this._loadingLayouts=new Set,this._missedImages=new Map,this._renderer.clearMissedFonts(),this.rebindLayerAppearance(),this.selectionSet.clear(),this._isDirty=!0,Q.emit("missed-data-changed",{}),e}disposeSessionState(e){e.meshGlyphBatch.dispose(),e.scene.clear(),e.layoutViewManager=new yu,e.initializedLayouts.clear(),e.externallyFramedLayouts.clear(),e.loadingLayouts.clear(),e.missedImages.clear(),e.missedFonts={},e.selectionIds=[]}rebindLayerAppearance(){this._layerAppearance=new Gl(this._scene,this._renderer)}isActiveManagedView(){var i;const t=(i=k._instance)==null?void 0:i.curView;return t!=null&&t===this}focusViewerForShortcuts(){const e=document.activeElement;e instanceof Node&&this.container.contains(e)||e instanceof HTMLElement&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)||this.container.focus({preventScroll:!0})}isShortcutEventInsideViewer(e){const t=e.target;if(t instanceof Node&&this.container.contains(t))return!0;const i=document.activeElement;return i instanceof Node&&this.container.contains(i)}async drainConvertQueue(){if(this._convertDrainPromise){await this._convertDrainPromise,this._convertQueue.length>0&&await this.drainConvertQueue();return}this._convertDrainPromise=this.runConvertDrain().finally(()=>{this._convertDrainPromise=null}),await this._convertDrainPromise}async runConvertDrain(){const e=this._convertEpoch,t=this._cooperativeYield;let i=t?this.activeLayoutBtrId===this.modelSpaceBtrId?de.CONVERT_SLICE_MAX:1:Number.POSITIVE_INFINITY,n=performance.now(),o=YE(this._convertQueue.splice(0,this._convertQueue.length),this.activeLayoutBtrId);for(this.repairViewportViewsFor(o.activeOwnerId);o.cursor<o.pending.length||this._convertQueue.length>0;){if(this._convertEpoch!==e)return;const r=this._convertQueue.splice(0,this._convertQueue.length),a=this.activeLayoutBtrId,l=a!==o.activeOwnerId;if(o=ZE(o,r,a),l&&(this.repairViewportViewsFor(a),t&&(i=1)),this.flushViewportViewRepairs(),o.cursor>=o.pending.length)break;const c=Math.min(o.pending.length,o.cursor+i),d=performance.now();if(await this.batchConvert(o.pending.slice(o.cursor,c)),o.cursor=c,this._convertEpoch!==e)return;if(!t)continue;const h=performance.now()-d,f=o.activeOwnerId===this.modelSpaceBtrId,y=this._progressiveRendering?de.PROGRESSIVE_OPEN_YIELD_BUDGET_MS:de.OPEN_CONVERT_YIELD_BUDGET_MS,g=f?y:de.CONVERT_SLICE_BUDGET_MS;if(i=qE({slice:i,tookMs:h,budgetMs:g,maxSlice:de.CONVERT_SLICE_MAX,activeLayoutPending:!f&&XE(o)}),this._progressiveRendering&&this.isProgressiveGesturePauseActive()){for(await new Promise(b=>setTimeout(b,0));performance.now()<this._progressiveInputPauseUntil;)await new Promise(b=>setTimeout(b,16));if(n=performance.now(),this._convertEpoch!==e)return}else if(this._progressiveRendering&&this.isProgressiveDiscreteInputPending()){if(await new Promise(b=>setTimeout(b,0)),n=performance.now(),this._convertEpoch!==e)return}else if(performance.now()-n>=g&&(await new Promise(b=>setTimeout(b,0)),n=performance.now(),this._convertEpoch!==e))return}this.repairViewportViewsFor(this.activeLayoutBtrId),this.flushViewportViewRepairs()}repairViewportViewsFor(e){var i;if(!e||e===this.modelSpaceBtrId)return;const t=this._layoutViewManager.getAt(e);if(!t||t.viewportCount>0){t&&t.viewportCount>0&&this._viewportRepairOwnerIds.delete(e);return}try{const n=(i=k.instance.curDocument)==null?void 0:i.database,o=n==null?void 0:n.tables.blockTable.getIdAt(e);if(!o)return;const r=t.viewportCount;this.ensureViewportViews(o,t),t.viewportCount>r&&(this._isDirty=!0),this._viewportRepairOwnerIds.delete(e)}catch(n){p.log.error("[AcTrView2d] Error repairing viewport views:",n)}}flushViewportViewRepairs(){if(this._viewportRepairOwnerIds.size===0)return;const e=Array.from(this._viewportRepairOwnerIds);for(let t=0;t<e.length;t++)this.repairViewportViewsFor(e[t])}markProgressiveDirty(e=!1){const t=performance.now();(e||t-this._lastProgressivePaintAt>=de.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS)&&(this._isDirty=!0)}markInteractiveOpenDirty(){this._progressiveRendering||!this._cooperativeYield||(this._isDirty=!0)}shouldCountMidOpenPaint(e,t){return this._progressiveRendering&&e||!this._progressiveRendering&&this._cooperativeYield&&t}highlight(e){this.entitySelectionEnabled&&(this._isDirty=this._scene.select(e))}unhighlight(e){this._isDirty=this._scene.unselect(e)}setCompareDisplay(e,t){var o,r,a,l;const i=e.baseColor??((o=e.colors)==null?void 0:o.unchanged)??10265519,n={enabled:e.enabled,baseColor:i,colors:{deleted:(r=e.colors)==null?void 0:r.deleted,added:(a=e.colors)==null?void 0:a.added,modified:(l=e.colors)==null?void 0:l.modified},overrides:e.overrides};t?t.setCompareDisplay(n):this._scene.setCompareDisplay(n),this._isDirty=!0}stopAnimationLoop(){this._rafId!=null&&(cancelAnimationFrame(this._rafId),this._rafId=null)}dispose(){var t,i,n;if(this._viewDisposed)return;this._viewDisposed=!0,this.abortConversion(),(t=this._disposeCanvasTouchCallout)==null||t.call(this),this._disposeCanvasTouchCallout=void 0,(i=this._disposeProgressiveInputWatch)==null||i.call(this),this._disposeProgressiveInputWatch=void 0,(n=this._disposeMobileBoxGesture)==null||n.call(this),this._disposeMobileBoxGesture=void 0,this._viewDomAbort.abort(),this._onFontNotFound&&this._renderer.events.fontNotFound.removeEventListener(this._onFontNotFound),this._onFontLoaded&&this._renderer.events.fontLoaded.removeEventListener(this._onFontLoaded),this._onSysVarChanged&&p.AcDbSysVarManager.instance().events.sysVarChanged.removeEventListener(this._onSysVarChanged),this._onSettingsModified&&le.instance.events.modified.removeEventListener(this._onSettingsModified),this._onLayoutSwitched&&p.acdbHostApplicationServices().layoutManager.events.layoutSwitched.removeEventListener(this._onLayoutSwitched),this._onCommandWillStartHitTest&&this.editor.events.commandWillStart.removeEventListener(this._onCommandWillStartHitTest),this._onCommandEndedHitTest&&this.editor.events.commandEnded.removeEventListener(this._onCommandEndedHitTest),this._gripManager.dispose(),this.clearFontLoadedRedrawTimer(),this.cancelOpenLineworkFrame(),this.stopAnimationLoop(),this.selectionSet.clear(),this.htmlTransientManager.dispose(),this._scene.clear(),this._renderer.dispose(),p.AcDbRenderingCache.instance.clear();const e=this._renderer.internalRenderer;e.dispose(),e.forceContextLoss(),this.canvas.remove(),this._css2dRenderer.domElement.remove(),this._stats.dom.remove(),super.dispose()}onHover(e){this.entitySelectionEnabled&&(this._isDirty=this._scene.hover([e]))}onUnhover(e){this._isDirty=this._scene.unhover([e])}createScene(){return new _p}createStats(e){const t=new Rx;document.body.appendChild(t.dom);const i=t.dom;return i.style.position="fixed",i.style.inset="unset",i.style.bottom="30px",i.style.right="0px",this.toggleStatsVisibility(t,e),t}onWindowResize(){this.refreshViewSize(),this._renderer.setSize(this.width,this.height),this._css2dRenderer.setSize(this.width,this.height),this._layoutViewManager.resize(this.width,this.height),this._isDirty=!0,this.events.viewResize.dispatch({width:this.width,height:this.height}),this.events.viewChanged.dispatch()}startAnimationLoop(){this._rafId==null&&(this._rafId=requestAnimationFrame(this.animate))}createLayoutViewIfNeeded(e){let t=this._layoutViewManager.getAt(e);return t==null&&(t=new nL(this._renderer,e,this.width,this.height),t.events.viewChanged.addEventListener(()=>{this._progressiveOpenFit.onLayoutViewChanged(),this._isDirty=!0,this._progressiveRendering&&this._numOfEntitiesToProcess>0&&(this._progressivePaintUrgent=!0),this.events.viewChanged.dispatch(),this.clearHover()}),this._layoutViewManager.add(t)),this.flushViewportViewRepairs(),t}loadLayoutEntitiesIfNeeded(e){try{const i=k.instance.curDocument.database.tables.blockTable.getIdAt(e);if(!i)return;const n=this._scene.layouts.get(e);if(n&&n.isLoaded){this.repairViewportViewsFor(e);return}if(this._loadingLayouts.has(e))return;if(this.repairViewportViewsFor(e),n&&n.entityCount>0){n.isLoaded=!0;return}n||this._scene.addEmptyLayout(e);const o=[],r=i.newIterator();for(const l of r)o.push(l);if(o.length===0){const l=this._scene.layouts.get(e);l&&(l.isLoaded=!0);return}this._loadingLayouts.add(e),this._numOfEntitiesToProcess+=o.length,(async()=>{try{this._progressiveRendering?(this._convertQueue.push(...o),await this.drainConvertQueue()):await this.batchConvert(o);const l=this._scene.layouts.get(e);l&&(l.isLoaded=!0)}finally{this._loadingLayouts.delete(e)}})()}catch(t){p.log.error("[AcTrView2d] Error loading layout entities:",t)}}toggleStatsVisibility(e,t){t?e.dom.style.display="block":e.dom.style.display="none"}toLayerInfo(e){return{name:e.name,isFrozen:e.isFrozen,isOff:e.isOff,color:e.color}}resolveLayerInfo(e){const t=k.instance.curDocument.database.tables.layerTable.getAt(e);return t?this.toLayerInfo(t):void 0}async convertMissingEntitiesOnLayer(e){if(!this._convertingLayers.has(e)){this._convertingLayers.add(e);try{const i=k.instance.curDocument.database.tables.blockTable.getIdAt(this.activeLayoutBtrId);if(!i)return;const n=this._entityDisplay.collectMissingEntitiesOnLayer(e,i,o=>this.hasEntity(o));if(n.length===0)return;this._numOfEntitiesToProcess+=n.length,await this.batchConvert(n)}finally{this._convertingLayers.delete(e)}}}drawEntity(e,t){return e.worldDraw(this._renderer,t)}startTextStyleFontPreload(e){var y,g;const t=this._convertEpoch;if(this._textStyleFontPreloadEpoch===t&&this._textStyleFontPreloadPromise)return;this._textStyleFontPreloadEpoch=t;const i=Jv(e),n=$.FontManager.instance.getFontsToLoad(),o=[...$.FontManager.instance.defaultFonts][0],r=Qv(i,n,{firstDefaultFont:o}),l=D.AcTrMTextRenderer.getInstance().getRenderMode()==="worker"?"worker":"main",c=k,d=(g=(y=c._instance)==null?void 0:y.lastPresetFontsForOpen)!=null&&g.length?[...c._instance.lastPresetFontsForOpen]:[...n];if(this._fontPreloadDiag={critical:[...r.critical],workerWarm:[],background:[],preset:d,workerSkipped:0,parseSite:l},l==="worker"){this._textStyleFontPreloadPromise=Promise.resolve();return}const h=3e4;if(r.critical.length===0){this._textStyleFontPreloadPromise=Promise.resolve();return}const f=$.FontManager.instance.requestFonts(r.critical);this._textStyleFontPreloadPromise=new Promise(b=>{const w=setTimeout(()=>{b()},h);f.then(()=>{clearTimeout(w),b()},()=>{clearTimeout(w),b()})})}async awaitTextStyleFontsReady(){if(!this._textStyleFontPreloadPromise){const e=this._renderer.context.database;if(e)this.startTextStyleFontPreload(e);else return}await this._textStyleFontPreloadPromise}async finishEntityGeometry(e,t){const i=performance.now();try{const n=e instanceof D.AcTrGroup,o=n&&this.groupHasPendingGlyphGeometry(e);(o||D.hasPendingComplexLineTypeGlyphs(e)||e instanceof D.AcTrGlyphEntity&&!e.hasDrawableGeometry())&&await this.ensureDeferredFontsReady();const a=()=>{this._convertPhaseMs.glyphEntityCount++,e instanceof D.AcTrMText?this._convertPhaseMs.mtextCount++:e instanceof D.AcTrShape&&this._convertPhaseMs.shapeCount++};if(n){if(!o)return;a();const c=performance.now();await e.asyncDraw(),this._convertPhaseMs.finishGeometryAsyncDraw+=performance.now()-c;return}if(D.hasPendingComplexLineTypeGlyphs(e)){a();const c=performance.now();await e.asyncDraw(),this._convertPhaseMs.finishGeometryAsyncDraw+=performance.now()-c;return}if(e.hasDrawableGeometry())return;a();const l=performance.now();await e.asyncDraw(),this._convertPhaseMs.finishGeometryAsyncDraw+=performance.now()-l}finally{this._convertPhaseMs.finishGeometry+=performance.now()-i}}needsDeferredFontGeometry(e){return e instanceof D.AcTrGlyphEntity?!e.hasDrawableGeometry():e instanceof D.AcTrGroup?this.groupHasPendingGlyphGeometry(e):D.hasPendingComplexLineTypeGlyphs(e)}clearFontLoadedRedrawTimer(){this._fontLoadedRedrawTimer!=null&&(clearTimeout(this._fontLoadedRedrawTimer),this._fontLoadedRedrawTimer=null)}scheduleGlyphRedrawAfterFontLoad(e){this.clearFontLoadedRedrawTimer();const t=this._convertEpoch;this._fontLoadedRedrawTimer=setTimeout(()=>{this._fontLoadedRedrawTimer=null,t===this._convertEpoch&&this.redrawGlyphEntitiesAfterFontLoad(t,e)},50)}async redrawGlyphEntitiesAfterFontLoad(e,t){var a,l;if(e!==this._convertEpoch)return;const i=++this._fontLoadedRedrawEpoch,n=[];for(const c of this._scene.layouts.values())c.layers.forEach(d=>{d.internalObject.traverse(h=>{h instanceof D.AcTrGlyphEntity&&n.push(h)})});for(const c of n){if(e!==this._convertEpoch||i!==this._fontLoadedRedrawEpoch)return;await c.asyncDraw()}if(n.length>0){e===this._convertEpoch&&(this._isDirty=!0);return}if(t){const c=$.FontManager.instance.defaultFonts,d=t.toLowerCase();if(c.has(t)||c.has(d)||[...c].some(h=>h.toLowerCase()===d))return}if(e!==this._convertEpoch||i!==this._fontLoadedRedrawEpoch||this._entityProcessingIdleAt<=0)return;const o=performance.now()-this._entityProcessingIdleAt;if(!aL(this.isProcessingEntities,0,o))return;const r=(l=(a=k.instance)==null?void 0:a.curDocument)==null?void 0:l.database;r&&r.regen()}groupHasPendingGlyphGeometry(e){for(const t of e.getSourceEntities())if(t instanceof D.AcTrGlyphEntity&&!t.hasDrawableGeometry())return!0;return de.directChildrenHavePendingGlyphs(e)}static directChildrenHavePendingGlyphs(e){const t=e.children;for(let i=0;i<t.length;i++){const n=t[i];if(n instanceof D.AcTrGlyphEntity){if(!n.hasDrawableGeometry())return!0;continue}if(n instanceof D.AcTrGroup){for(const o of n.getSourceEntities())if(o instanceof D.AcTrGlyphEntity&&!o.hasDrawableGeometry())return!0;if(de.directChildrenHavePendingGlyphs(n))return!0;continue}if(n instanceof D.AcTrEntity&&de.directChildrenHavePendingGlyphs(n))return!0}return!1}enqueueDeferredGeometry(e,t){t===this._convertEpoch&&(this._pendingGeometryJobs++,this._deferredGeometryQueue.push({run:e,epoch:t,enqueuedAt:performance.now()}),this.pumpDeferredGeometryQueue())}pumpDeferredGeometryQueue(){for(;this._deferredGeometryActive<de.DEFERRED_GEOMETRY_CONCURRENCY&&this._deferredGeometryQueue.length>0;){const e=this._deferredGeometryQueue.shift();if(e.epoch!==this._convertEpoch){this._pendingGeometryJobs=Math.max(0,this._pendingGeometryJobs-1);continue}this._convertPhaseMs.finishGeometryQueueWait+=performance.now()-e.enqueuedAt,this._deferredGeometryActive++,e.run().then(()=>{e.epoch===this._convertEpoch&&(this._progressiveRendering||this._cooperativeYield)&&(this._isDirty=!0)}).catch(t=>{p.log.error("[AcTrView2d] Deferred entity geometry failed:",t)}).finally(()=>{this._deferredGeometryActive=Math.max(0,this._deferredGeometryActive-1),e.epoch===this._convertEpoch&&(this._pendingGeometryJobs=Math.max(0,this._pendingGeometryJobs-1),this._pendingGeometryJobs===0&&(this._isDirty=!0),this.stampEntityProcessingIdle()),this.pumpDeferredGeometryQueue()})}}resetDeferredGeometryQueue(){this._deferredGeometryQueue.length=0,this._pendingGeometryJobs=0,this._textStyleFontPreloadPromise=null,this._textStyleFontPreloadEpoch=-1,this._deferredFontsReady=null,this._fontPreloadDiag=null}async waitUntilDeferredGeometryIdle(){const e=this._convertEpoch;for(;e===this._convertEpoch&&this._pendingGeometryJobs>0;)await new Promise(t=>setTimeout(t,0))}attachViewportView(e){if(D.AcTrViewportView.isDefaultPaperSpaceViewport(e))return;const t=e.ownerId,i=t?this._layoutViewManager.getAt(t):void 0;if(!i){t&&this._viewportRepairOwnerIds.add(t);return}i.addViewport(new D.AcTrViewportView(i,this.toGiViewportWithFrozenLayers(e),this._renderer)),this._isDirty=!0}ensureViewportViews(e,t){const i=e.newIterator();for(const n of i){if(!(n instanceof p.AcDbViewport)||D.AcTrViewportView.isDefaultPaperSpaceViewport(n))continue;const o=new D.AcTrViewportView(t,this.toGiViewportWithFrozenLayers(n),this._renderer);t.addViewport(o)}}toGiViewportWithFrozenLayers(e){var r;const t=e.toGiViewport();if(t.frozenLayers&&t.frozenLayers.length>0)return t;const i=e.frozenLayerIds;if(!(i!=null&&i.length))return t;const n=[],o=(r=e.database)==null?void 0:r.tables.layerTable;if(o)for(const a of i){const l=o.getIdAt(a);l&&n.push(l.name)}return t.frozenLayerIds=[...i],t.frozenLayers=n,t}async batchConvert(e,t={}){const i=this._convertEpoch;if(!t.forExport&&!this._textStyleFontPreloadPromise){const l=this._renderer.context.database;l&&this.startTextStyleFontPreload(l)}const n=this._progressiveRendering&&!t.forExport,o=n?de.PROGRESSIVE_OPEN_YIELD_BUDGET_MS:de.OPEN_CONVERT_YIELD_BUDGET_MS,r=t.forExport||!this._cooperativeYield?void 0:new p.AcCmUiYieldGate(o),a=()=>new Promise(l=>setTimeout(l,0));for(let l=0;l<e.length;++l){const c=e[l];try{if(i!==this._convertEpoch||c instanceof p.AcDbViewport&&D.AcTrViewportView.isDefaultPaperSpaceViewport(c)||!(t.forExport||this._convertInvisibleLayers?this._entityDisplay.shouldConvertForExport(c):this._entityDisplay.shouldConvert(c)))continue;const h=String(c.objectId??"");let f=0;if(h&&(this.hasEntity(h)||this._claimedConvertObjectIds.has(h))){c instanceof p.AcDbViewport&&this.attachViewportView(c);continue}h&&(this._claimedConvertObjectIds.add(h),f=this._entityConvertGeneration.get(h)??0);const y=D.tryBuildDirectEntityMeta(c,this._renderer);if(y){let b=!1,w=!1;try{h&&(this._entityConvertGeneration.get(h)??0)!==f?w=!0:(b=this._scene.addDirectEntity(y,D.shouldExtendBboxForDirectEntity(c)),b&&(this.applySessionHiddenObjectState(c.objectId),n?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents(),l)):this.markInteractiveOpenDirty()))}finally{y.geometry.dispose()}if(w||b)continue}const g=this.drawEntity(c,!1);if(!g&&!(c instanceof p.AcDbViewport)){h&&this._claimedConvertObjectIds.delete(h);continue}if(g){g.objectId=c.objectId,g.ownerId=c.ownerId,g.layerName=c.layer,g.visible=c.visibility!==!1,g instanceof D.AcTrGroup&&g.isOnTheSameLayer&&(g.userData.insertLayerName=g.layerName);const b=g instanceof D.AcTrGroup&&!g.isOnTheSameLayer,w=!t.forExport&&this.needsDeferredFontGeometry(g);if(b)w?this.enqueueDeferredGeometry(()=>this.handleGroup(g,n,i,f),i):await this.handleGroup(g,n,i,f);else{const S=!(c instanceof p.AcDbRay||c instanceof p.AcDbXline),x=async()=>{if(await this.finishEntityGeometry(g,n),i!==this._convertEpoch){g.dispose();return}if(h&&(this._entityConvertGeneration.get(h)??0)!==f){g.dispose();return}g instanceof D.AcTrGroup&&(this.syncGroupSpatialBoundsForIndexing(g),g.isOnTheSameLayer&&this._inheritedLayerMaterialMapper.remap(g.children,"0",g.layerName));const _=performance.now();this._scene.addEntity(g,S),this._convertPhaseMs.addEntity+=performance.now()-_,this.applySessionHiddenObjectState(c.objectId),g.dispose(),n?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents(),l)):this.markInteractiveOpenDirty()};w?this.enqueueDeferredGeometry(x,i):await x()}}if(i!==this._convertEpoch)continue;if(c instanceof p.AcDbViewport)this.attachViewportView(c);else if(c instanceof p.AcDbRasterImage){const b=c.imageFileName;b&&!c.image?this._missedImages.set(c.objectId,b):c.image&&this._missedImages.delete(c.objectId)}}catch(d){const h=String(c.objectId??"");h&&this._claimedConvertObjectIds.delete(h),p.log.error(`[AcTrView2d] Failed to convert entity ${c.objectId} (${c.type}):`,d)}finally{i===this._convertEpoch&&this.decreaseNumOfEntitiesToProcess()}i===this._convertEpoch&&(n?await this.progressiveYieldForInput(r,a):r&&await r.maybeYield(a)&&this._progressiveYieldCount++)}}syncGroupSpatialBoundsForIndexing(e){const t=e.peekLazyChildBoxes();if(t&&t.boxes.length>0){const o=e.userData;o.lazySpatialChildren=t;return}if(e.refreshWcsChildBoxesFromChildren(),e.wcsChildBoxes.length===0)return;const i=e.wcsChildBoxes.map(o=>({minX:o.minX,minY:o.minY,maxX:o.maxX,maxY:o.maxY,id:o.id}));e.wcsBbox=zl(e);const n=e.userData;n.spatialIndexChildBoxes=i}async handleGroup(e,t,i=this._convertEpoch,n=0){const o=performance.now();try{if(await this.finishEntityGeometry(e,t),i!==this._convertEpoch){e.dispose();return}const r=String(e.objectId??"");if(r&&(this._entityConvertGeneration.get(r)??0)!==n){e.dispose();return}this.syncGroupSpatialBoundsForIndexing(e);const a=e.children,l=new Map;a.forEach(x=>{var C;if(x.visible===!1)return;const _=x.userData.layerName;l.has(_)||l.set(_,[]),(C=l.get(_))==null||C.push(x)}),e.children=[];for(const x of a)x.parent=null;const c=e.renderContext,d=e.objectId,h=e.layerName,f=e.userData.lazySpatialChildren;process.env.NODE_ENV!=="production"&&!f&&pS(e);const y=f?[]:e.wcsChildBoxes.map(x=>({minX:x.minX,minY:x.minY,maxX:x.maxX,maxY:x.maxY,id:x.id})),g=f?e.wcsBbox.clone():y.length>0?zl(e):e.wcsBbox.clone();y.length>0&&(e.wcsBbox=g.clone());let b=!1;const w=()=>new Promise(x=>setTimeout(x,0));let S=t?performance.now():0;for(const[x,_]of l){const C=x==="0"?h:x,T=_.some(A=>(A.userData.authoredLayerName??x)==="0")?"0":x;this._inheritedLayerMaterialMapper.remap(_,T,C);const L=new D.AcTrEntity(c);L.matrix.copy(e.matrix),L.matrixAutoUpdate=!1,L.matrixWorldNeedsUpdate=!0,L.objectId=d,L.ownerId=e.ownerId,L.layerName=C,L.userData.insertLayerName=h,L.wcsBbox=g.clone();const N=L.userData;!b&&f?(L.userData.lazySpatialChildren=f,b=!0):!b&&y.length>0&&(N.spatialIndexChildBoxes=y,b=!0);for(let A=0;A<_.length;A++)L.add(_[A]);L.updateMatrixWorld(!0),this._layerAppearance.refreshTextMaterialsInObjectTree(L);const B=performance.now();this._scene.addEntity(L,!0),this._convertPhaseMs.addEntity+=performance.now()-B,this.applySessionHiddenObjectState(d),L.dispose(),t&&i===this._convertEpoch&&performance.now()-S>=de.PROGRESSIVE_OPEN_YIELD_BUDGET_MS&&(await w(),S=performance.now())}e.dispose(),t?(this.markProgressiveDirty(),this._progressiveOpenFit.afterGeometryBatch(()=>this.getDrawingExtents())):this.markInteractiveOpenDirty()}finally{this._convertPhaseMs.handleGroup+=performance.now()-o}}decreaseNumOfEntitiesToProcess(){this._numOfEntitiesToProcess--,this._numOfEntitiesToProcess<0?(this._numOfEntitiesToProcess=0,p.log.warn("Something wrong! The number of entities to process should not be less than 0.")):this._numOfEntitiesToProcess===0&&(this._isDirty=!0,Q.emit("missed-data-changed",{})),this.stampEntityProcessingIdle()}frameOpenLineworkIfReady(){if(!this._openLineworkFramePending||this.isConvertingEntities)return;const e=this.getDrawingExtents();if(!e||e.isEmpty()){this._openLineworkFramePending=!1;return}this._openLineworkFramePending=!1,this._progressiveOpenFit.frameProgrammatically(e)}stampEntityProcessingIdle(){this._numOfEntitiesToProcess===0&&this._pendingGeometryJobs===0&&(this._entityProcessingIdleAt=performance.now(),this.scheduleMeshGlyphWorldBatchFlush(),p.AcDbRenderingCache.instance.clear())}clearMeshGlyphFlushTimer(){this._meshGlyphFlushTimer!=null&&(clearTimeout(this._meshGlyphFlushTimer),this._meshGlyphFlushTimer=null)}scheduleMeshGlyphWorldBatchFlush(){if(!D.AcTrMTextRenderer.getInstance().getMeshGlyphInstancing())return;this.clearMeshGlyphFlushTimer();const t=this._convertEpoch;this._meshGlyphFlushTimer=setTimeout(()=>{this._meshGlyphFlushTimer=null,t===this._convertEpoch&&(this._numOfEntitiesToProcess>0||this._pendingGeometryJobs>0||this.flushMeshGlyphWorldBatch())},16)}flushMeshGlyphWorldBatch(){this.clearMeshGlyphFlushTimer();const e=D.AcTrMTextRenderer.getInstance();if(!e.getMeshGlyphInstancing())return;const{placements:t,buckets:i}=e.flushMeshGlyphInstances(this._scene.internalScene,n=>this.resolveMeshGlyphLayerParent(n));t>0&&(console.log(`[cad-simple-viewer-cli] mesh glyph InstancedMesh flush: placements=${t} buckets=${i}`),this._isDirty=!0)}resolveMeshGlyphLayerParent(e){var i;const t=(i=this._scene.activeLayout)==null?void 0:i.getLayer(e);if(t)return t.internalObject;for(const n of this._scene.layouts.values()){const o=n.getLayer(e);if(o)return o.internalObject}return null}};de.OPEN_CONVERT_YIELD_BUDGET_MS=300,de.PROGRESSIVE_OPEN_YIELD_BUDGET_MS=32,de.PROGRESSIVE_INPUT_PAUSE_MS=120,de.PROGRESSIVE_OPEN_PAINT_INTERVAL_MS=2500,de.NON_PROGRESSIVE_OPEN_PAINT_INTERVAL_MS=4e3,de.DEFERRED_GEOMETRY_CONCURRENCY=8,de.CONVERT_SLICE_BUDGET_MS=64,de.CONVERT_SLICE_MAX=512;let Mn=de;function lL(s){if(!s)return!1;const e=Object.keys(s);return e.length>0&&e.every(t=>t==="visibility")}function cL(s,e,t){const{entity:i,changes:n}=s,o=i.objectId;if(!e(o))return!1;if(lL(n))return!(n.visibility===!0&&t(o)===void 0);if(n&&Object.keys(n).length>0)return!1;const r=t(o);return r===void 0?!1:r&&!i.visibility}function yx(s){return Array.isArray(s)?s:[s]}class Ea{constructor(e,t){this._active=!0,this._disposers=[],this._view=e,this._doc=t;const i=(n,o)=>{n.addEventListener(o),this._disposers.push(()=>n.removeEventListener(o))};i(t.database.events.entityAppended,n=>{if(!this._active)return;const o=yx(n.entity).filter(r=>{if(this.view.hasEntity(r.objectId))return!1;const a=t.database.tables.blockTable.getIdAt(r.ownerId);return!!(a&&(a.isModelSapce||a.isPaperSapce))});o.length!==0&&this.view.addEntity(o.length===1?o[0]:o)}),i(t.database.events.entityModified,n=>{if(!this._active)return;const o=n,r=this.view;r instanceof Mn&&cL(o,a=>r.hasEntity(a),a=>r.getEntityVisible(a))&&r.updateEntityVisibility(o.entity)||this.view.updateEntity(o.entity)}),i(t.database.events.entityErased,n=>{if(!this._active)return;const o=yx(n.entity).filter(r=>this.view.hasEntity(r.objectId));o.length!==0&&this.view.removeEntity(o.length===1?o[0]:o)}),i(t.database.events.layerAppended,n=>{this._active&&this._view.addLayer(n.layer)}),i(t.database.events.layerModified,n=>{this._active&&this._view.updateLayer(n.layer,n.changes)}),i(p.AcDbSysVarManager.instance().events.sysVarChanged,n=>{if(!(!this._active||n.database!==this._doc.database)){if(n.name==p.AcDbSystemVariables.PDMODE.toLowerCase()||n.name==p.AcDbSystemVariables.PDSIZE.toLowerCase())this._view.rerenderPoints(n.database.pdmode,n.database.pdsize);else if(n.name==p.AcDbSystemVariables.LWDISPLAY.toLowerCase()){const o=this._view,r=!!n.database.lwdisplay;o.renderer.showLineWeight!==r&&(o.renderer.showLineWeight=r,o.clear(),n.database.regen())}}}),i(t.database.events.dictObjetSet,n=>{this._active&&n.object instanceof p.AcDbLayout&&this._view.addLayout(n.object)}),i(e.selectionSet.events.selectionAdded,n=>{this._active&&e.highlight(n.ids)}),i(e.selectionSet.events.selectionRemoved,n=>{this._active&&e.unhighlight(n.ids)})}get view(){return this._view}get doc(){return this._doc}get isActive(){return this._active}suspend(){this._active=!1}resume(){this._active=!0}dispose(){this._active=!1;for(const e of this._disposers)e();this._disposers.length=0}}function wu(s){return typeof s.hasEntity=="function"&&typeof s.setEntitySceneVisible=="function"}function dL(s,e,t){!s.isObjectHidden(t)||!wu(e)||e.setEntitySceneVisible(t,!1)}function gx(s,e){const t=s.view;if(!wu(t))return 0;const i=s.doc,n=i.database;let o=0;for(const r of e){if(i.isObjectHidden(r))continue;const a=n.tables.blockTable.getEntityById(r);!(a!=null&&a.visibility)||!t.hasEntity(r)||t.setEntitySceneVisible(r,!1)&&(i.addHiddenObject(r),o++)}return o>0&&t.selectionSet.clear(),o}function bx(s){const e=s.view;if(!wu(e))return 0;const t=s.doc,i=t.database,n=t.takeHiddenObjects();let o=0;for(const r of n){const a=i.tables.blockTable.getEntityById(r);!a||!e.hasEntity(r)||e.setEntitySceneVisible(r,a.visibility)&&o++}return e.selectionSet.clear(),o}const vu=500,uL=/[̀-ͯ]/g,xu=/\s+/g;function Xs(s,e=!1){let t=s.normalize("NFKC").replace(xu," ").trim();return e||(t=t.normalize("NFD").replace(uL,"").toLowerCase()),t}function qs(s){const e=/\\(U\+[0-9a-fA-F]{4}|[PX~SfFHWTQCcAaRrpLlOoKk\\{}])|[{}]/g,t=[];let i=0,n=!1,o;for(;o=e.exec(s);){t.push(s.slice(i,o.index));const r=o[1];let a="";if(r!=null&&r.startsWith("U+"))a=String.fromCharCode(parseInt(r.slice(2),16));else if(r==="P"||r==="X"||r==="~")a=" ";else if(r==="\\"||r==="{"||r==="}")a=r;else if(r&&/[SfFHWTQCcAaRrp]/.test(r)){const l=n?-1:s.indexOf(";",e.lastIndex);if(l===-1)n=!0,a=o[0];else{if(r==="S"){const c=s.slice(e.lastIndex,l),d=c.search(/[\^#/]/);if(d===-1)a=c;else{const h=c.slice(d+1);a=c.slice(0,d)+(h?`/${h}`:"")}}e.lastIndex=l+1}}t.push(a),i=e.lastIndex}return t.push(s.slice(i)),wx(t.join("")).replace(xu," ").trim()}function wx(s){return s.replace(/%%[cC]/g,"Ø").replace(/%%[dD]/g,"°").replace(/%%[pP]/g,"±")}function La(s){return typeof s=="string"?wx(s).normalize("NFKC").replace(xu," ").trim():""}function vx(s,e,t){var r;const i=t.get(e);if(i!==void 0)return i;const n=(r=s.tables.layerTable)==null?void 0:r.getAt(e),o=!(n!=null&&n.isOff||n!=null&&n.isFrozen);return t.set(e,o),o}function Ta(s){const e=s.position??s.location??s.textLocation??s.textPosition??{x:0,y:0};return{x:Number(e.x)||0,y:Number(e.y)||0}}function hL(s,e){const t=new Array(16);for(let i=0;i<4;i++)for(let n=0;n<4;n++){let o=0;for(let r=0;r<4;r++)o+=s[r*4+n]*e[i*4+r];t[i*4+n]=o}return t}function xx(s,e){if(!s)return{x:e.x,y:e.y};const t=Number(e.z)||0;return{x:s[0]*e.x+s[4]*e.y+s[8]*t+s[12],y:s[1]*e.x+s[5]*e.y+s[9]*t+s[13]}}function kx(s){var e;try{const t=(e=s.blockTransform)==null?void 0:e.elements;return Array.isArray(t)&&t.length===16?t:void 0}catch{return}}function pL(s,e){var n,o;let t;try{t=s.geometricExtents}catch{return}if(!t||!isFinite((n=t.min)==null?void 0:n.x)||!isFinite((o=t.max)==null?void 0:o.x))return;if(!e)return{min:{...t.min},max:{...t.max}};const i=[{x:t.min.x,y:t.min.y},{x:t.max.x,y:t.min.y},{x:t.min.x,y:t.max.y},{x:t.max.x,y:t.max.y}].map(r=>xx(e,r));return{min:{x:Math.min(...i.map(r=>r.x)),y:Math.min(...i.map(r=>r.y))},max:{x:Math.max(...i.map(r=>r.x)),y:Math.max(...i.map(r=>r.y))}}}const mL=8;function Sx(s,e,t,i={}){var w,S,x,_;const n=i.matchCase===!0,o=i.maxResults??vu,r=Xs(t,n),a={hits:[],truncated:!1};if(!r)return a;const l=s.tables.blockTable.getIdAt(e);if(!l)return a;const c=new Map,d=C=>C!==""&&Xs(C,n).includes(r);let h=!1;const f=C=>{if(a.hits.length>=o){a.truncated=!0,h=!0;return}a.hits.push(C)},y=(C,T,L,N,B,A,O={})=>{const P=pL(L,A);f({entityId:C.entity.objectId,textEntityId:`${T}/${L.objectId}`,kind:N,text:B,layer:C.layer,position:xx(A,Ta(L)),...P?{extents:P}:{},...O})},g=(C,T,L,N,B,A)=>{var O,P,E;for(const I of C){if(h)return;const j=I.dxfTypeName;if(j!=="TEXT"&&j!=="MTEXT"&&j!=="INSERT"&&j!=="ATTRIB"&&j!=="ATTDEF"||I.visibility===!1||j==="ATTDEF"&&(I.isInvisible||!(I.isConst||I.isConstMTextAttribute))||I.layer&&I.layer!=="0"&&!vx(s,I.layer,c))continue;if(j==="INSERT"){if(B>=mL)continue;const ee=kx(I),Z=L&&ee?hL(L,ee):ee??L,re=`${N}/${I.objectId}`;for(const pt of((O=I.attributeIterator)==null?void 0:O.call(I))??[]){if(h)return;if(pt.visibility===!1||pt.isInvisible)continue;const Be=La(pt.textString);d(Be)&&y(T,re,pt,"block",Be,L,{tag:pt.tag,blockName:I.blockName})}const Se=I.blockName;if(!Se||A.has(Se))continue;const Ke=(E=(P=s.tables.blockTable).getAt)==null?void 0:E.call(P,Se);if(!Ke)continue;A.add(Se),g(Ke.newIterator(),T,Z,re,B+1,A),A.delete(Se);continue}const Y=j==="MTEXT"||j==="ATTDEF"&&I.isConstMTextAttribute&&I.mtext?qs(String((j==="MTEXT"?I:I.mtext).contents??"")):La(I.textString);d(Y)&&y(T,N,I,T.kind,Y,L,j==="ATTDEF"?{tag:I.tag}:{})}},b=C=>{var T,L;try{const N=C.blockTableRecord;if(N!=null&&N.newIterator)return N;const B=C.dimBlockId,A=B?s.tables.blockTable.getIdAt(B):void 0;if(A)return A;const O=C.blockName;return O?(L=(T=s.tables.blockTable).getAt)==null?void 0:L.call(T,O):void 0}catch{return}};for(const C of l.newIterator()){if(h)break;const T=C.dxfTypeName;if(T!=="TEXT"&&T!=="MTEXT"&&T!=="INSERT"&&T!=="DIMENSION"&&T!=="MULTILEADER"&&T!=="ACAD_TABLE"||C.visibility===!1||!vx(s,C.layer,c))continue;if(T==="INSERT"){for(const A of((w=C.attributeIterator)==null?void 0:w.call(C))??[]){if(h)break;if(A.visibility===!1||A.isInvisible)continue;const O=La(A.textString);d(O)&&f({entityId:C.objectId,textEntityId:A.objectId,kind:"attribute",text:O,tag:A.tag,blockName:C.blockName,layer:C.layer,position:Ta(A)})}const N=C.blockName,B=N?(x=(S=s.tables.blockTable).getAt)==null?void 0:x.call(S,N):void 0;B&&!h&&g(B.newIterator(),{entity:C,kind:"block",layer:C.layer},kx(C),String(C.objectId),1,new Set([N]));continue}if(T==="DIMENSION"||T==="ACAD_TABLE"){const N=T==="DIMENSION"?"dimension":"table",B={entity:C,kind:N,layer:C.layer},A=b(C),O=a.hits.length;if(A&&g(A.newIterator(),B,void 0,String(C.objectId),1,new Set),A&&a.hits.length>O)continue;const P=[];if(T==="DIMENSION"){const E=String(C.dimensionText??"");E&&E!=="<>"&&E!==" "&&P.push(qs(E.replace("<>","")))}else{const E=Number(C.numRows)||0,I=Number(C.numColumns)||0;for(let j=0;j<E;j++)for(let G=0;G<I;G++)try{P.push(qs(String(((_=C.textString)==null?void 0:_.call(C,j,G))??"")))}catch{}}for(const E of P){if(h)break;d(E)&&f({entityId:C.objectId,textEntityId:`${C.objectId}/${a.hits.length}`,kind:N,text:E,layer:C.layer,position:Ta(C)})}continue}const L=T==="MTEXT"||T==="MULTILEADER"?qs(String(C.contents??"")):La(C.textString);d(L)&&f({entityId:C.objectId,textEntityId:C.objectId,kind:T==="MTEXT"?"mtext":T==="MULTILEADER"?"leader":"text",text:L,layer:C.layer,position:Ta(C)})}return a}function fL(s,e,t=!1,i=60){if(s.length<=i)return s;const n=Xs(e,t),o=Xs(s,t).indexOf(n),r=Math.max(0,Math.min(o-15,s.length-i)),a=s.slice(r,r+i);return`${r>0?"…":""}${a}${r+i<s.length?"…":""}`}function Cx(s){var i;const e=(i=s.objects)==null?void 0:i.layout;if(!(e!=null&&e.newIterator))return[];const t=[];for(const n of e.newIterator())n.blockTableRecordId&&t.push({name:n.layoutName??"",btrId:n.blockTableRecordId,tabOrder:Number(n.tabOrder)||0});return t.sort((n,o)=>n.tabOrder-o.tabOrder||n.name.localeCompare(o.name))}function yL(s,e,t){const i=t.maxResults??vu,n=Cx(s),o=l=>{var c;return((c=n.find(d=>d.btrId===l))==null?void 0:c.name)??""};let r;t.scope==="layout"||n.length===0?r=[{btrId:t.currentLayoutId,name:o(t.currentLayoutId)}]:r=n.map(l=>({btrId:l.btrId,name:l.name}));const a={hits:[],truncated:!1};for(const l of r){const c=Sx(s,l.btrId,e,{matchCase:t.matchCase,maxResults:i-a.hits.length});for(const d of c.hits)a.hits.push({...d,layoutId:l.btrId,layoutName:l.name});if(c.truncated){a.truncated=!0;break}}return a}function Ax(s,e,t){var g;const i=s.tables.blockTable.getIdAt(e),n=(g=i==null?void 0:i.getIdAt)==null?void 0:g.call(i,t.entityId);let o=n;if(t.kind==="attribute"&&(n!=null&&n.attributeIterator)){for(const b of n.attributeIterator())if(b.objectId===t.textEntityId){o=b;break}}let r,a;try{const b=t.extents??(o==null?void 0:o.geometricExtents);if(!b||!isFinite(b.min.x)||!isFinite(b.max.x))throw new Error("no extents");r=b.min,a=b.max}catch{r=a=t.position}const l=(r.x+a.x)/2,c=(r.y+a.y)/2,d=a.x-r.x,h=a.y-r.y,f=Math.max(d*3,h*10,.001),y=Math.max(h*3,f/4,.001);return{min:{x:l-f/2,y:c-y/2},max:{x:l+f/2,y:c+y/2}}}function gL(s,e,t,i){const n=Number(s.width)||0,o=Number(s.height)||0,r=Math.max(0,(i==null?void 0:i.left)??0),a=Math.max(0,(i==null?void 0:i.right)??0),l=Math.max(0,(i==null?void 0:i.top)??0),c=Math.max(0,(i==null?void 0:i.bottom)??0),d=n-r-a,h=o-l-c;if(!(n>0&&o>0&&r+a+l+c>0&&d>=n*.2&&h>=o*.2&&!!s.worldToScreen&&!!s.screenToWorld)){s.zoomTo(new p.AcGeBox2d(new p.AcGePoint2d(e.min.x,e.min.y),new p.AcGePoint2d(e.max.x,e.max.y)),t);return}const y=(e.min.x+e.max.x)/2,g=(e.min.y+e.max.y)/2,b=(e.max.x-e.min.x)/2*(n/d),w=(e.max.y-e.min.y)/2*(o/h);s.zoomTo(new p.AcGeBox2d(new p.AcGePoint2d(y-b,g-w),new p.AcGePoint2d(y+b,g+w)),t);const S=s.worldToScreen({x:y,y:g}),x=r+d/2,_=l+h/2,C=s.screenToWorld({x:n/2+(S.x-x),y:o/2+(S.y-_)});isFinite(C.x)&&isFinite(C.y)&&(s.center=new p.AcGePoint2d(C.x,C.y))}const ku=new WeakMap;async function bL(s,e,t={}){var a;const i=s.curView,n=(a=s.curDocument)==null?void 0:a.database;if(!i||!n)return"no-document";const o=(ku.get(i)??0)+1;if(ku.set(i,o),i.activeLayoutBtrId!==e.layoutId){if(t.activateLayout===!1)return"layout-mismatch";if(!n.tables.blockTable.getIdAt(e.layoutId))return"layout-missing";if(i.isLayoutInitialized(e.layoutId)||i.markLayoutAsInitialized(e.layoutId),p.acdbHostApplicationServices().layoutManager.setCurrentLayoutBtrId(e.layoutId,n),i.activeLayoutBtrId!==e.layoutId)return"layout-switch-failed";if(await i.waitUntilIdle(t.idleTimeoutMs??15e3),ku.get(i)!==o||i.activeLayoutBtrId!==e.layoutId)return"stale"}const r=Ax(n,e.layoutId,e);return gL(i,r,t.margin??1.1,t.insets),i.selectionSet.clear(),i.selectionSet.add(e.entityId),"navigated"}class wL extends K{async execute(e){p.log.info("Hello from ExamplePlugin!"),p.log.info("Current document:",e.doc),p.log.info("Current view:",e.view)}}class vL{constructor(){this.name="ExamplePlugin",this.version="1.0.0",this.description="An example plugin demonstrating the plugin system",this.registeredCommands=[]}onLoad(e,t){t.addCommand("USER","HELLO","Hello",new wL),this.registeredCommands.push({group:"USER",name:"HELLO"}),p.log.info(`[${this.name}] Plugin loaded successfully`),p.log.info(`[${this.name}] Registered command: HELLO`)}onUnload(e,t){for(const i of this.registeredCommands)t.removeCmd(i.group,i.name);this.registeredCommands=[],p.log.info(`[${this.name}] Plugin unloaded`)}}const _x=[".dxf",".dwg"],Js="local",Su="url",xL="100%",kL="150px";function Px(s,e){return s==null?e:typeof s=="number"?`${s}px`:s}const zn=class zn{constructor(e){if(this.activeView=Js,this.menuOpen=!1,this.disposed=!1,this.unsubManager=null,this.unsubTheme=null,this.onDocPointerDown=null,this.options={...e,cardSize:{...e.cardSize??{}}},zn.ensureStyles(),this.root=document.createElement("div"),this.root.className="ml-ui-file-open",this.root.setAttribute("data-ml-ui-file-open","1"),this.applyTheme(),e.title||e.subtitle){const a=document.createElement("div");if(a.className="ml-ui-file-open-header",e.title){const l=document.createElement("h2");l.className="ml-ui-file-open-title",l.textContent=e.title,a.appendChild(l)}if(e.subtitle){const l=document.createElement("p");l.className="ml-ui-file-open-subtitle",l.textContent=e.subtitle,a.appendChild(l)}this.root.appendChild(a)}if(e.showNewDrawing){const a=document.createElement("button");a.type="button",a.className="ml-ui-file-open-primary",a.textContent=m.t("main.dataSource.newDrawing"),a.addEventListener("click",()=>this.emit({kind:"new-drawing"})),this.root.appendChild(a),this.root.appendChild(this.createDivider())}this.card=document.createElement("div"),this.card.className="ml-ui-file-open-card",this.applyCardSize(),this.root.appendChild(this.card),this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.accept=e.accept??_x.join(","),this.fileInput.className="ml-ui-file-open-input-hidden",this.fileInput.addEventListener("change",()=>{var l;const a=(l=this.fileInput.files)==null?void 0:l[0];this.fileInput.value="",a&&this.isSupportedFileName(a.name)&&this.emitLocal(a)}),this.card.appendChild(this.fileInput),this.contentEl=document.createElement("div"),this.contentEl.className="ml-ui-file-open-body",this.card.appendChild(this.contentEl),this.dropzone=document.createElement("div"),this.dropzone.className="ml-ui-file-open-dropzone",this.dropzone.tabIndex=0,this.dropzone.setAttribute("role","button"),this.dropzone.setAttribute("aria-label",m.t("main.dataSource.dropOrBrowse"));const t=document.createElement("p");t.className="ml-ui-file-open-drop-title",t.append(document.createTextNode(`${m.t("main.dataSource.dropFile")} `));const i=document.createElement("span");i.className="ml-ui-file-open-drop-link",i.textContent=m.t("main.dataSource.browse"),t.appendChild(i);const n=document.createElement("div");n.className="ml-ui-file-open-tags";for(const a of["DWG","DXF"]){const l=document.createElement("span");l.className="ml-ui-file-open-tag",l.textContent=a,n.appendChild(l)}this.dropzone.appendChild(t),this.dropzone.appendChild(n),this.dropzone.addEventListener("click",()=>this.fileInput.click()),this.dropzone.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),this.fileInput.click())}),this.dropzone.addEventListener("dragenter",a=>this.onDrag(a,!0)),this.dropzone.addEventListener("dragover",a=>this.onDrag(a,!0)),this.dropzone.addEventListener("dragleave",a=>this.onDrag(a,!1)),this.dropzone.addEventListener("drop",a=>this.onDrop(a)),this.urlRow=document.createElement("div"),this.urlRow.className="ml-ui-file-open-url-row",this.urlInput=document.createElement("input"),this.urlInput.type="url",this.urlInput.className="ml-ui-file-open-url-input",this.urlInput.placeholder=m.t("main.dataSource.urlPlaceholder"),this.urlInput.autocomplete="off",this.urlInput.spellcheck=!1,this.urlInput.addEventListener("keydown",a=>{a.key==="Enter"&&(a.preventDefault(),this.submitUrl())});const o=document.createElement("button");o.type="button",o.className="ml-ui-file-open-secondary",o.textContent=m.t("main.dataSource.open"),o.addEventListener("click",()=>this.submitUrl()),this.urlRow.appendChild(this.urlInput),this.urlRow.appendChild(o),this.sourceActionsEl=document.createElement("div"),this.sourceActionsEl.className="ml-ui-file-open-sources";const r=document.createElement("div");r.className="ml-ui-file-open-footer",this.footerBtn=document.createElement("button"),this.footerBtn.type="button",this.footerBtn.className="ml-ui-file-open-footer-btn",this.footerBtn.setAttribute("aria-label",m.t("main.dataSource.source")),this.footerBtn.setAttribute("aria-haspopup","listbox"),this.footerBtn.setAttribute("aria-expanded","false"),this.footerLabel=document.createElement("span"),this.footerLabel.className="ml-ui-file-open-footer-label",this.footerChevron=document.createElement("span"),this.footerChevron.className="ml-ui-file-open-footer-chevron",this.footerChevron.setAttribute("aria-hidden","true"),this.footerChevron.textContent="▾",this.footerBtn.appendChild(this.footerLabel),this.footerBtn.appendChild(this.footerChevron),this.footerBtn.addEventListener("click",a=>{a.stopPropagation(),this.toggleMenu()}),r.appendChild(this.footerBtn),this.card.appendChild(r),this.menuEl=document.createElement("div"),this.menuEl.className="ml-ui-file-open-menu",this.menuEl.hidden=!0,this.menuEl.setAttribute("role","listbox"),this.card.appendChild(this.menuEl),this.onDocPointerDown=a=>{if(!this.menuOpen)return;const l=a.target;l instanceof Node&&(this.card.contains(l)||this.closeMenu())},document.addEventListener("pointerdown",this.onDocPointerDown),this.unsubTheme=Vo(()=>{this.options.theme||this.applyTheme()}),e.host.appendChild(this.root),this.bindManagerEvents(),this.refreshSourceButtons()}get element(){return this.root}refreshSourceButtons(){this.disposed||(this.bindManagerEvents(),this.applyTheme(),this.applyCardSize(),this.syncSourceChrome(),this.renderActiveView())}setTheme(e){this.disposed||(this.options.theme=e,this.applyTheme())}setCardSize(e){this.disposed||(this.options.cardSize={...this.options.cardSize,...e},this.applyCardSize())}dispose(){var e,t;this.disposed||(this.disposed=!0,(e=this.unsubManager)==null||e.call(this),this.unsubManager=null,(t=this.unsubTheme)==null||t.call(this),this.unsubTheme=null,this.onDocPointerDown&&(document.removeEventListener("pointerdown",this.onDocPointerDown),this.onDocPointerDown=null),this.root.remove())}applyTheme(){const e=this.options.theme!=null,t=this.options.theme??Oe(this.options.host);ot(t,this.root,{isolated:e})}applyCardSize(){const e=this.options.cardSize;this.card.style.width=Px(e==null?void 0:e.width,xL),this.card.style.height=Px(e==null?void 0:e.height,kL)}syncSourceChrome(){const e=this.resolveSourceOptions();new Set(e.map(o=>o.value)).has(this.activeView)||(this.activeView=Js,this.closeMenu());const i=e.find(o=>o.value===this.activeView)??e[0];this.footerLabel.textContent=(i==null?void 0:i.label)??"";const n=e.length>1;this.footerBtn.disabled=!n,this.footerBtn.classList.toggle("is-single",!n),this.footerChevron.hidden=!n,n||this.closeMenu(),this.menuEl.replaceChildren();for(const o of e){const r=document.createElement("button");r.type="button",r.className="ml-ui-file-open-menu-item",r.setAttribute("role","option"),r.setAttribute("aria-selected",o.value===this.activeView?"true":"false"),o.value===this.activeView&&r.classList.add("is-active"),r.textContent=o.label,r.addEventListener("click",a=>{a.stopPropagation(),this.selectSource(o.value)}),this.menuEl.appendChild(r)}}selectSource(e){this.activeView=e,this.closeMenu(),this.syncSourceChrome(),this.renderActiveView(),this.maybeAutoSignIn(e)}maybeAutoSignIn(e){if(e===Js||e===Su)return;const t=this.resolveSources().find(n=>n.id===e);if(t){t.requiresAuth&&t.getAuthState()==="signed-out"&&t.signIn().catch(()=>{}).finally(()=>this.refreshSourceButtons());return}const i=this.resolveExtraMenuItems().find(n=>n.sourceId===e&&n.action==="sign-in");i&&this.emit({kind:"data-source",item:i})}toggleMenu(){this.footerBtn.disabled||(this.menuOpen?this.closeMenu():this.openMenu())}openMenu(){this.menuOpen=!0,this.menuEl.hidden=!1,this.footerBtn.setAttribute("aria-expanded","true"),this.footerBtn.classList.add("is-open"),this.footerChevron.textContent="▴"}closeMenu(){this.menuOpen=!1,this.menuEl.hidden=!0,this.footerBtn.setAttribute("aria-expanded","false"),this.footerBtn.classList.remove("is-open"),this.footerChevron.textContent="▾"}resolveSourceOptions(){const e=[{value:Js,label:m.t("main.dataSource.local")}];this.options.showUrl!==!1&&e.push({value:Su,label:m.t("main.dataSource.url")});const t=new Set;for(const i of this.resolveMenuItems())t.has(i.sourceId)||(t.add(i.sourceId),e.push({value:i.sourceId,label:this.resolveSourceLabel(i.sourceId)}));return e}resolveSourceLabel(e){var n;const t=this.resolveSources().find(o=>o.id===e);if(t)return m.t(t.labelKey);const i=this.resolveExtraMenuItems().find(o=>o.sourceId===e);return(n=i==null?void 0:i.labelParams)!=null&&n.name?i.labelParams.name:e}renderActiveView(){if(this.contentEl.replaceChildren(),this.activeView===Js){this.contentEl.appendChild(this.dropzone);return}if(this.activeView===Su){this.contentEl.appendChild(this.urlRow),requestAnimationFrame(()=>this.urlInput.focus());return}this.renderSourceActions(this.activeView),this.contentEl.appendChild(this.sourceActionsEl)}canPickSource(e){const t=this.resolveSources().find(i=>i.id===e);return t?t.requiresAuth?t.getAuthState()==="signed-in":!0:this.resolveExtraMenuItems().some(i=>i.sourceId===e&&i.action==="pick")}buildPickMenuItem(e){const t=this.resolveSourceLabel(e),i=m.t("main.dataSource.openFrom");return{id:`${e}:pick`,sourceId:e,action:"pick",labelKey:"main.dataSource.openFrom",labelParams:{name:t},label:i.includes("{name}")?i.split("{name}").join(t):m.t("main.dataSource.selectFile")}}resolveAccountProfile(e){var r,a,l,c;const t=(a=(r=this.options).getAccountProfile)==null?void 0:a.call(r,e);if(t!=null&&t.displayName)return t;const i=this.resolveSources().find(d=>d.id===e);if(!i||i.getAuthState()!=="signed-in")return;const n=(l=i.getAccountProfile)==null?void 0:l.call(i);if(n!=null&&n.displayName)return n;const o=(c=i.getAccountLabel)==null?void 0:c.call(i);if(o)return{displayName:o}}initialsFromName(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]??""}${t[1][0]??""}`.toUpperCase()}renderSourceActions(e){this.sourceActionsEl.replaceChildren();const t=this.resolveAccountProfile(e);if(t){const o=document.createElement("div");o.className="ml-ui-file-open-account";const r=document.createElement("div");if(r.className="ml-ui-file-open-avatar",t.avatarUrl){const c=document.createElement("img");c.className="ml-ui-file-open-avatar-img",c.src=t.avatarUrl,c.alt="",c.referrerPolicy="no-referrer",r.appendChild(c)}else{const c=document.createElement("span");c.className="ml-ui-file-open-avatar-initials",c.textContent=this.initialsFromName(t.displayName),r.appendChild(c)}const a=document.createElement("div");a.className="ml-ui-file-open-account-text";const l=document.createElement("div");if(l.className="ml-ui-file-open-account-name",l.textContent=t.displayName,a.appendChild(l),t.email&&t.email!==t.displayName){const c=document.createElement("div");c.className="ml-ui-file-open-account-email",c.textContent=t.email,a.appendChild(c)}o.appendChild(r),o.appendChild(a),this.sourceActionsEl.appendChild(o)}const i=document.createElement("button");i.type="button",i.className="ml-ui-file-open-source-btn ml-ui-file-open-source-btn--primary",i.textContent=m.t("main.dataSource.selectFile");const n=this.canPickSource(e);i.disabled=!n,n||(i.title=m.t("main.dataSource.signInRequired")),i.addEventListener("click",()=>{this.canPickSource(e)&&this.emit({kind:"data-source",item:this.buildPickMenuItem(e)})}),this.sourceActionsEl.appendChild(i)}resolveMenuItems(){const e=this.resolveSources().filter(r=>r.id!==wa&&r.id!==iu),t=Sv(e),i=this.resolveExtraMenuItems(),n=new Set(t.map(r=>r.sourceId)),o=i.filter(r=>!n.has(r.sourceId));return[...t,...o]}resolveSources(){var e;return this.options.getSources?this.options.getSources():((e=k.tryGetInstance())==null?void 0:e.dataSourceManager.list())??[]}resolveExtraMenuItems(){const e=this.options.extraMenuItems;return e?typeof e=="function"?e():e:[]}bindManagerEvents(){var i;if(this.unsubManager)return;const e=(i=k.tryGetInstance())==null?void 0:i.dataSourceManager;if(!e)return;const t=()=>this.refreshSourceButtons();e.on("changed",t),e.on("auth-changed",t),this.unsubManager=()=>{e.off("changed",t),e.off("auth-changed",t)}}submitUrl(){const e=this.urlInput.value.trim();if(!e){this.urlInput.focus();return}this.emit({kind:"url",url:e})}onDrag(e,t){e.preventDefault(),e.stopPropagation(),this.dropzone.classList.toggle("is-dragover",t)}onDrop(e){var i,n;this.onDrag(e,!1);const t=(n=(i=e.dataTransfer)==null?void 0:i.files)==null?void 0:n[0];t&&this.isSupportedFileName(t.name)&&this.emitLocal(t)}isSupportedFileName(e){const t=e.toLowerCase();return _x.some(i=>t.endsWith(i))}emitLocal(e){this.emit({kind:"local",file:e})}emit(e){var t,i,n,o,r,a,l,c,d,h;switch((i=(t=this.options).onResult)==null||i.call(t,e),e.kind){case"local":(o=(n=this.options).onLocalFile)==null||o.call(n,e.file);break;case"url":(a=(r=this.options).onUrl)==null||a.call(r,e.url);break;case"data-source":(c=(l=this.options).onDataSourceAction)==null||c.call(l,e.item);break;case"new-drawing":(h=(d=this.options).onNewDrawing)==null||h.call(d);break}}createDivider(){const e=document.createElement("p");e.className="ml-ui-file-open-divider",e.setAttribute("aria-hidden","true");const t=document.createElement("span");return t.textContent=m.t("main.dataSource.or"),e.appendChild(t),e}static ensureStyles(){if(typeof document>"u"||document.getElementById(zn.styleId))return;const e=document.createElement("style");e.id=zn.styleId,e.textContent=`
2660
2660
  .ml-ui-file-open {
2661
2661
  display: flex;
2662
2662
  flex-direction: column;
@@ -3526,4 +3526,4 @@
3526
3526
  .ml-ex-ui-dropdown-item.is-toggled {
3527
3527
  color: var(--ml-ui-accent, #409eff);
3528
3528
  background: var(--ml-ui-accent-soft, rgba(64, 158, 255, 0.12));
3529
- } `,document.head.appendChild(s)}function _L(){var s;document.querySelector(".ml-ex-ui-toolbar, .ml-ex-ui-subtoolbar, .ml-ex-ui-dropdown")||(s=document.getElementById(Lu))==null||s.remove()}function Fx(s,e,t=0){const i=Math.max(24,e-4);if(s<=0)return{perRow:1,slotWidth:i,preferredMaxWidth:i};const n=Math.max(1,Math.floor(s/i)),o=Math.max(0,t);return o>0&&o<=n?{perRow:n,slotWidth:s/o,preferredMaxWidth:i}:{perRow:n,slotWidth:s/n,preferredMaxWidth:i}}class Iu{constructor(e){this.options=e,this.closed=!1,this.handleDocumentClick=i=>{var n,o;this.options.sticky||i.target instanceof Node&&(this.root.contains(i.target)||this.options.anchor.contains(i.target)||(o=(n=this.options).shouldKeepOpenForTarget)!=null&&o.call(n,i.target)||this.close())},Tu(),this.items=e.items,this.commandsDisabled=e.commandsDisabled,this.root=document.createElement("div"),this.syncRootClasses(),this.root.setAttribute("role","toolbar");const t=e.anchor.getAttribute("aria-label");t&&this.root.setAttribute("aria-label",t),this.renderButtons(),this.applyChromeLayout(),e.host.appendChild(this.root),this.syncPosition(),e.sticky||document.addEventListener("mousedown",this.handleDocumentClick,!0)}get sticky(){return this.options.sticky}get anchor(){return this.options.anchor}get rootElement(){return this.root}setHidden(e){this.root.hidden=e,this.root.style.visibility=e?"hidden":"",this.root.style.pointerEvents=e?"none":""}refresh(e,t){this.items=e,t!==void 0&&(this.commandsDisabled=t),this.renderButtons(),this.applyChromeLayout(),this.syncPosition()}containsTarget(e){return this.root.contains(e)}refreshLocale(){for(const e of Array.from(this.root.querySelectorAll(".ml-ex-ui-toolbar-btn"))){const t=e.dataset.toolbarItemId;if(!t)continue;const i=this.items.find(a=>a.id===t);if(!i||ke(i))continue;const n=Ki(i),o=n.label?this.options.i18n.t(n.label):n.id;e.title=o,e.setAttribute("aria-label",o);const r=e.querySelector(".ml-ex-ui-toolbar-btn-label, .ml-ex-ui-toolbar-btn-text");r&&(r.textContent=o)}}syncPosition(){if(!this.root.isConnected)return;this.root.hidden||this.applyChromeLayout();const{host:e,toolbarRoot:t,anchor:i,placement:n,chrome:o}=this.options,r=this.options.position??"front",a=o.edgeOffset,l=e.getBoundingClientRect(),c=t.getBoundingClientRect(),d=i.getBoundingClientRect(),h=this.root.offsetWidth,f=this.root.offsetHeight,y=e.clientWidth,g=e.clientHeight,b=this.options.getCrossAxisInset(),w=n==="left"||n==="right",S=o.size==="stretch";let x,_;if(n==="right"?(x=c.left-l.left-h-a,_=S?b.near:this.resolveMainAxisOffset({position:r,axis:"vertical",toolbarRect:c,hostRect:l,anchorRect:d,subSize:f})):n==="left"?(x=c.right-l.left+a,_=S?b.near:this.resolveMainAxisOffset({position:r,axis:"vertical",toolbarRect:c,hostRect:l,anchorRect:d,subSize:f})):n==="top"?(x=S?b.near:this.resolveMainAxisOffset({position:r,axis:"horizontal",toolbarRect:c,hostRect:l,anchorRect:d,subSize:h}),_=c.bottom-l.top+a):(x=S?b.near:this.resolveMainAxisOffset({position:r,axis:"horizontal",toolbarRect:c,hostRect:l,anchorRect:d,subSize:h}),_=c.top-l.top-f-a),w){const C=b.near,T=Math.max(C,g-f-b.far);_=Math.min(Math.max(C,_),T),S&&(x=b.near)}else{const C=b.near,T=Math.max(C,y-h-b.far);if(x=S?b.near:Math.min(Math.max(C,x),T),n==="bottom"){const L=c.top-l.top-f-a,N=b.near;_=Math.min(L,Math.max(N,_))}else{const L=b.near,N=Math.max(L,g-f-b.far);_=Math.min(Math.max(L,_),N)}}this.root.style.left=`${x}px`,this.root.style.top=`${_}px`}resolveMainAxisOffset(e){const{position:t,axis:i,toolbarRect:n,hostRect:o,anchorRect:r,subSize:a}=e;if(t==="auto")return i==="horizontal"?r.left-o.left:r.top-o.top;if(t==="center")return i==="horizontal"?n.left-o.left+(n.width-a)/2:n.top-o.top+(n.height-a)/2;const l=this.queryVisibleButtons(this.options.toolbarRoot),c=this.queryVisibleButtons(this.root),d=t==="front"?l[0]:l[l.length-1],h=t==="front"?c[0]:c[c.length-1];if(!d||!h)return t==="front"?i==="horizontal"?n.left-o.left:n.top-o.top:i==="horizontal"?n.right-o.left-a:n.bottom-o.top-a;const f=d.getBoundingClientRect(),y=this.root.getBoundingClientRect(),g=h.getBoundingClientRect();if(i==="horizontal"){if(t==="front"){const S=g.left-y.left;return f.left-o.left-S}const w=g.left-y.left;return f.right-o.left-w-g.width}if(t==="front"){const w=g.top-y.top;return f.top-o.top-w}const b=g.top-y.top;return f.bottom-o.top-b-g.height}queryVisibleButtons(e){return Array.from(e.querySelectorAll(".ml-ex-ui-toolbar-btn:not([hidden])"))}close(){var e,t;this.closed||(this.closed=!0,document.removeEventListener("mousedown",this.handleDocumentClick,!0),this.root.remove(),(t=(e=this.options).onClose)==null||t.call(e))}syncRootClasses(){const{chrome:e,placement:t}=this.options,i=t==="left"||t==="right",n=["ml-ex-ui-subtoolbar",`is-${t}`,i?"is-vertical":"is-horizontal"];e.showLabels&&n.push("has-labels"),e.size==="stretch"&&n.push("is-stretch"),e.overflow==="wrap"&&n.push("is-overflow-wrap"),e.showBorder||n.push("no-border"),e.showButtonBorder&&n.push("show-button-border"),e.showChildrenIndicator&&n.push("show-children-indicator"),this.root.className=n.join(" ")}applyChromeLayout(){this.applyStretchSize(),this.applyOverflowLayout(),this.applyWrapPackLayout(),this.applyLabeledButtonMaxWidth()}applyLabeledButtonMaxWidth(){const{chrome:e}=this.options;if(!e.showLabels||this.root.classList.contains("is-wrap-pack")){if(!e.showLabels)for(const t of this.queryVisibleButtons(this.root))t.style.removeProperty("max-width");return}for(const t of this.queryVisibleButtons(this.root)){const i=t.offsetHeight;i<=0||(t.style.maxWidth=`${Math.max(24,i-4)}px`)}}applyWrapPackLayout(){const{chrome:e,placement:t,host:i}=this.options,n=t==="top"||t==="bottom",o=this.queryVisibleButtons(this.root),r=()=>{for(const b of o)b.style.removeProperty("flex"),b.style.removeProperty("width"),b.style.removeProperty("max-width"),delete b.dataset.wrapPackRow};if(!n||e.size!=="stretch"||e.overflow!=="wrap"){this.root.classList.remove("is-wrap-pack"),r();return}if(o.length===0)return;const a=this.options.getCrossAxisInset(),l=Math.max(0,i.clientWidth-a.near-a.far);l>0&&this.root.style.width!==`${l}px`&&(this.root.style.width=`${l}px`);const c=this.root.clientWidth>0?this.root.clientWidth:l;if(c<=0){this.root.classList.remove("is-wrap-pack"),r();return}for(const b of o)b.style.flex="0 0 auto",b.style.width="auto",b.style.removeProperty("max-width");const d=Math.max(...o.map(b=>b.offsetHeight),1),{perRow:h,slotWidth:f}=Fx(c,d,o.length);this.root.classList.add("is-wrap-pack");const y=o.length<=h,g=y?o.length:Math.floor(o.length/h)*h;o.forEach((b,w)=>{b.style.flex=`0 0 ${f}px`,b.style.width=`${f}px`,b.style.maxWidth=`${f}px`,b.dataset.wrapPackRow=y||w<g?"full":"last"})}applyStretchSize(){const{host:e,placement:t,chrome:i}=this.options;if(i.size!=="stretch"){this.root.style.removeProperty("width"),this.root.style.removeProperty("height");return}const n=this.options.getCrossAxisInset();if(t==="left"||t==="right"){const r=Math.max(0,e.clientHeight-n.near-n.far);this.root.style.height=`${r}px`,this.root.style.removeProperty("width")}else{const r=Math.max(0,e.clientWidth-n.near-n.far);this.root.style.width=`${r}px`,this.root.style.removeProperty("height")}}applyOverflowLayout(){const{host:e,placement:t,chrome:i}=this.options;if(i.overflow!=="wrap"){i.size!=="stretch"&&(this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height"));return}const n=this.options.getCrossAxisInset();if(t==="left"||t==="right"){const r=Math.max(0,e.clientHeight-n.near-n.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${r}px`),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width")}else{const r=Math.max(0,e.clientWidth-n.near-n.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${r}px`),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height")}}renderButtons(){this.root.replaceChildren();const{chrome:e}=this.options;this.items.forEach(t=>{var o;if(ke(t)){if(!e.showSeparators)return;const r=document.createElement("div");r.className="ml-ex-ui-toolbar-separator",r.setAttribute("role","separator"),t.id&&(r.dataset.toolbarItemId=t.id),this.root.appendChild(r);return}const i=Ki(t),n=document.createElement("button");if(n.type="button",n.className="ml-ex-ui-toolbar-btn",n.title=i.label?this.options.i18n.t(i.label):i.id,n.setAttribute("aria-label",n.title),n.dataset.toolbarItemId=i.id,i.toggle){const r=i.toggle.getValue();n.setAttribute("aria-pressed",String(r)),n.classList.toggle("is-toggled",r)}if(((o=i.children)!=null&&o.length||Ot(t))&&(n.classList.add("has-children"),n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded","false")),i.icon)n.appendChild(ft(i.icon));else if(i.label&&!e.showLabels){const r=document.createElement("span");r.className="ml-ex-ui-toolbar-btn-text",r.textContent=this.options.i18n.t(i.label),r.style.fontSize="11px",r.style.padding="0 4px",n.appendChild(r)}if(e.showLabels&&i.label){const r=document.createElement("span");r.className="ml-ex-ui-toolbar-btn-label",r.textContent=this.options.i18n.t(i.label),n.appendChild(r)}n.disabled=Pu(i)&&this.commandsDisabled||Eu(i),n.addEventListener("click",r=>{var l;if(r.stopPropagation(),n.disabled)return;this.options.onSelect(i,n);const a=!!((l=i.children)!=null&&l.length)||Ot(t);!this.options.sticky&&!a&&this.close()}),this.root.appendChild(n)})}}const Va=class Va{constructor(e){this.options=e,this.isDisabled=!1,this.openMode=U.Read,this.hasDocument=!1,this.selectedChildByParent=new Map,this.visible=!0,this.overflowItems=[],this.overflowMenuActive=!1,this.renderedEntries=[],Tu(),this.mountHost=e.host,this.themeHost=e.themeHost??e.host,this.edgeOffset=e.edgeOffset??8,this.sideOffset=e.sideOffset??0,this.showBorder=e.showBorder??!0,this.showButtonBorder=e.showButtonBorder??!1,this.showSeparators=e.showSeparators??!0,this.showChildrenIndicator=e.showChildrenIndicator??!0,this.inCanvasParent=e.inCanvasParent===!0,this.items=e.items,this.collapsed=!!e.collapsible&&!!e.defaultCollapsed,e.overflow===void 0&&(e.overflow="menu"),this.seedSelectedChildren(e.items),this.ensureMountHostLayout(),this.root=document.createElement("div"),this.syncRootClasses(),this.root.setAttribute("role","toolbar"),this.overflowButton=document.createElement("button"),this.overflowButton.type="button",this.overflowButton.className="ml-ex-ui-toolbar-btn ml-ex-ui-toolbar-overflow-btn",this.overflowButton.dataset.toolbarItemId="toolbar-overflow",this.overflowButton.hidden=!0,this.overflowButton.appendChild(ft(yc)),this.overflowButton.addEventListener("click",t=>{t.stopPropagation(),!this.overflowButton.hidden&&this.toggleOverflowMenu()}),this.mountHost.appendChild(this.root),this.ensureInParentLayout(),this.setupResizeObserver(),e.docState?this.setDocState(e.docState):this.renderButtons()}setDocState(e){e.hasDocument!==void 0&&(this.hasDocument=e.hasDocument),e.isOpening!==void 0&&(this.isDisabled=e.isOpening,e.isOpening&&this.closeChildrenUi()),e.openMode!==void 0&&(this.openMode=e.openMode),this.syncRootClasses(),this.renderButtons()}updateItems(e){this.items=e,this.seedSelectedChildren(e),this.renderButtons()}applyViewOptions(e){e.placement!==void 0&&(this.options.placement=e.placement),e.edgeOffset!==void 0&&(this.edgeOffset=Math.max(0,e.edgeOffset)),e.sideOffset!==void 0&&(this.sideOffset=Math.max(0,e.sideOffset)),e.collapsible!==void 0&&(this.options.collapsible=e.collapsible,e.collapsible||(this.collapsed=!1)),e.defaultCollapsed!==void 0&&(this.collapsed=!!this.options.collapsible&&!!e.defaultCollapsed),e.showLabels!==void 0&&(this.options.showLabels=e.showLabels),e.size!==void 0&&(this.options.size=e.size),e.overflow!==void 0&&(this.options.overflow=e.overflow),e.showBorder!==void 0&&(this.showBorder=e.showBorder),e.showButtonBorder!==void 0&&(this.showButtonBorder=e.showButtonBorder),e.showSeparators!==void 0&&(this.showSeparators=e.showSeparators),e.showChildrenIndicator!==void 0&&(this.showChildrenIndicator=e.showChildrenIndicator,this.options.showChildrenIndicator=e.showChildrenIndicator),e.subToolbar!==void 0&&(this.options.subToolbar=e.subToolbar),e.inCanvasParent!==void 0&&(this.inCanvasParent=e.inCanvasParent,this.options.inCanvasParent=e.inCanvasParent),e.items!==void 0&&(this.items=e.items,this.seedSelectedChildren(e.items)),this.syncRootClasses(),this.ensureInParentLayout(),this.renderButtons(),this.scheduleSyncPosition()}refresh(){this.renderButtons()}refreshLocale(){var e,t;this.syncOverflowButtonLabels(),this.syncCollapseToggleButton();for(const{item:i,element:n,isSeparator:o}of this.renderedEntries){if(o)continue;const r=n,a=On(i,this.selectedChildByParent.get(i.id)),l=a.label?this.options.i18n.t(a.label):a.id;r.title=l,r.setAttribute("aria-label",l);const c=r.querySelector(".ml-ex-ui-toolbar-btn-label, .ml-ex-ui-toolbar-btn-text");c&&(c.textContent=l)}(e=this.openSubToolbar)==null||e.refreshLocale(),(t=this.openNestedSubToolbar)==null||t.refreshLocale()}get replaceOnNested(){return this.resolveSubToolbarChrome().replaceOnNested===!0}dismissOpenChildren(){this.closeChildrenUi()}notifyExclusiveOpen(){var e,t;this.replaceOnNested&&((t=(e=this.options).onExclusiveOpen)==null||t.call(e))}setPlacement(e){this.options.placement!==e&&(this.options.placement=e,this.selectedChildByParent.set("toolbar-placement",`placement-${e}`),this.syncRootClasses(),this.ensureInParentLayout(),this.renderButtons())}getEdgeOffset(){return this.edgeOffset}setEdgeOffset(e){this.edgeOffset=Math.max(0,e),this.scheduleSyncPosition()}getSideOffset(){return this.sideOffset}setSideOffset(e){this.sideOffset=Math.max(0,e),this.scheduleSyncPosition()}resolveSubToolbarChrome(){return Ex({edgeOffset:this.edgeOffset,sideOffset:this.sideOffset,showLabels:this.options.showLabels,size:this.options.size,overflow:this.options.overflow,showBorder:this.showBorder,showButtonBorder:this.showButtonBorder,showSeparators:this.showSeparators,showChildrenIndicator:this.showChildrenIndicator},this.options.subToolbar)}getCrossAxisInset(){return this.getOrientationClass()==="horizontal"?this.options.placement==="top"?{near:this.edgeOffset,far:this.sideOffset}:{near:this.sideOffset,far:this.edgeOffset}:this.options.placement==="left"?{near:this.sideOffset,far:this.edgeOffset}:{near:this.edgeOffset,far:this.sideOffset}}reparentTo(e){var t;if(this.mountHost===e){!this.root.isConnected&&e.isConnected&&e.appendChild(this.root),this.syncInParentLayout();return}(t=this.resizeObserver)==null||t.disconnect(),this.releaseInParentLayout({keepRoot:!0}),this.root.remove(),this.mountHost=e,this.ensureMountHostLayout(),this.mountHost.appendChild(this.root),this.ensureInParentLayout(),this.setupResizeObserver(),this.scheduleSyncPosition()}syncInParentLayout(){this.ensureInParentLayout(),this.setupResizeObserver(),this.scheduleSyncPosition()}setSelectedChild(e,t){this.selectedChildByParent.set(e,t)}get placement(){return this.options.placement}get isCollapsed(){return this.collapsed}get isVisible(){return this.visible}isRootConnected(){return this.root.isConnected}setVisible(e){var t,i;this.visible!==e&&(this.visible=e,this.root.hidden=!e,e||(this.closeChildrenUi(),(i=(t=this.options).onCollapse)==null||i.call(t)))}getLayerButtonAnchor(){return this.options.collapsible&&this.collapsed&&this.setCollapsed(!1),this.root.querySelector('[data-toolbar-item-id="layer"]')??void 0}setCollapsed(e){var t,i;!this.options.collapsible||this.collapsed===e||(this.collapsed=e,e&&(this.closeChildrenUi(),(i=(t=this.options).onCollapse)==null||i.call(t)),this.syncRootClasses(),this.syncCollapseToggleButton(),this.scheduleSyncPosition())}destroy(){var e;this.layoutFrame!==void 0&&(cancelAnimationFrame(this.layoutFrame),this.layoutFrame=void 0),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0,this.closeChildrenUi(),this.releaseInParentLayout({keepRoot:!1}),this.root.remove()}isStretchSize(){return this.options.size==="stretch"}getOrientationClass(){return this.options.placement==="left"||this.options.placement==="right"?"vertical":"horizontal"}syncRootClasses(){const e=["ml-ex-ui-toolbar",`is-${this.getOrientationClass()}`,`is-${this.options.placement}`];this.collapsed&&e.push("is-collapsed"),this.isDisabled&&e.push("is-disabled"),this.options.showLabels&&e.push("has-labels"),this.options.size==="stretch"&&e.push("is-stretch"),this.inCanvasParent&&e.push("is-in-parent"),this.options.overflow==="wrap"&&e.push("is-overflow-wrap"),this.options.overflow==="menu"&&e.push("is-overflow-menu"),this.showBorder||e.push("no-border"),this.showButtonBorder&&e.push("show-button-border"),this.showChildrenIndicator&&e.push("show-children-indicator"),this.root.className=e.join(" ")}populateButtonContent(e,t){if(t.icon)e.appendChild(ft(t.icon));else if(t.label&&!this.options.showLabels){const i=document.createElement("span");i.className="ml-ex-ui-toolbar-btn-text",i.textContent=this.options.i18n.t(t.label),i.style.fontSize="11px",i.style.padding="0 4px",e.appendChild(i)}if(this.options.showLabels&&t.label){const i=document.createElement("span");i.className="ml-ex-ui-toolbar-btn-label",i.textContent=this.options.i18n.t(t.label),e.appendChild(i)}}toggleCollapsed(){this.setCollapsed(!this.collapsed)}getCollapseToggleIcon(){return this.options.placement==="top"||this.options.placement==="bottom"?this.collapsed?mc:fc:this.collapsed?Bm:Nm}syncCollapseToggleButton(e){const t=e??this.root.querySelector('[data-toolbar-item-id="toolbar-collapse"]');if(!t)return;const i=this.collapsed?"toolbar.expand":"toolbar.collapse";t.replaceChildren(ft(this.getCollapseToggleIcon())),t.title=this.options.i18n.t(i),t.setAttribute("aria-label",t.title),t.setAttribute("aria-expanded",String(!this.collapsed))}appendCollapseToggle(){if(!this.options.collapsible)return;if(this.showSeparators){const t=document.createElement("div");t.className="ml-ex-ui-toolbar-separator",t.setAttribute("role","separator"),this.root.appendChild(t)}const e=document.createElement("button");e.type="button",e.className="ml-ex-ui-toolbar-btn ml-ex-ui-toolbar-collapse-btn",e.dataset.toolbarItemId="toolbar-collapse",this.syncCollapseToggleButton(e),e.addEventListener("click",t=>{t.stopPropagation(),this.toggleCollapsed()}),this.root.appendChild(e)}renderButtons(){const e=this.stickyParentId;this.closeChildrenUi(),this.root.replaceChildren(),this.renderedEntries=[],this.overflowItems=[],Ma(this.items,this.openMode).forEach(i=>{var a;if(ke(i)){if(!this.showSeparators)return;const l=document.createElement("div");l.className="ml-ex-ui-toolbar-separator",l.setAttribute("role","separator"),i.id&&(l.dataset.toolbarItemId=i.id),this.root.appendChild(l),this.renderedEntries.push({item:i,element:l,isSeparator:!0});return}const n=On(i,this.selectedChildByParent.get(i.id)),o=document.createElement("button");o.type="button",o.className="ml-ex-ui-toolbar-btn",o.title=n.label?this.options.i18n.t(n.label):n.id,o.setAttribute("aria-label",o.title),o.dataset.toolbarItemId=n.id,((a=n.children)!=null&&a.length||Ot(i))&&(o.classList.add("has-children"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false")),this.populateButtonContent(o,n);const r=Pu(n)&&(this.isDisabled||!this.hasDocument)||Eu(n);o.disabled=r,o.addEventListener("click",l=>{l.stopPropagation(),!o.disabled&&this.activateToolbarItem(i,o)}),this.root.appendChild(o),this.renderedEntries.push({item:i,element:o,isSeparator:!1})}),this.options.overflow==="menu"&&(this.syncOverflowButtonLabels(),this.root.appendChild(this.overflowButton)),this.appendCollapseToggle(),this.applyOverflowLayout(),this.scheduleSyncPosition(),e&&!this.collapsed&&this.visible&&this.openStickyChildrenByParentId(e)}activateToolbarItem(e,t){var n;const i=On(e,this.selectedChildByParent.get(e.id));if((n=i.children)!=null&&n.length||Ot(e)){const o=this.resolveStripChildItems(i.children??[]);if(o.length===0)return;if(this.openParentId===e.id){this.closeChildrenUi();return}this.openChildrenUi(e,t,o);return}i.anchorAction?i.anchorAction(t):i.action?i.action():i.command&&this.options.onCommand(i.command),e.toggle&&window.setTimeout(()=>this.renderButtons(),0)}syncOverflowButtonLabels(){const e=this.options.i18n.t("toolbar.moreOverflow");this.overflowButton.title=e,this.overflowButton.setAttribute("aria-label",e)}applyOverflowLayout(){if(this.collapsed||!this.root.isConnected){this.overflowButton.hidden=!0,this.overflowMenuActive=!1;return}if(this.options.overflow==="wrap"){this.applyOverflowWrapLayout();return}this.options.overflow==="menu"&&this.applyOverflowMenuLayout()}applyOverflowWrapLayout(){this.overflowButton.hidden=!0,this.renderedEntries.forEach(o=>{o.element.hidden=!1});const e=this.inCanvasParent?this.sideOffset:this.edgeOffset,t=this.getCrossAxisInset(),i=this.getOrientationClass()==="horizontal",n=this.getLayoutHost();if(i){const o=Math.max(0,n.clientWidth-e*2);if(this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${o}px`),this.inCanvasParent)this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");else{const r=Math.max(0,n.clientHeight-t.near-t.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${r}px`)}}else{if(this.inCanvasParent)this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width");else{const r=Math.max(0,n.clientWidth-t.near-t.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${r}px`)}const o=Math.max(0,n.clientHeight-e*2);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${o}px`)}}getEntryAxisSize(e,t){const i=t?e.offsetWidth:e.offsetHeight;return i>0?i:e.classList.contains("ml-ex-ui-toolbar-separator")?9:36}applyOverflowMenuLayout(){this.closeOverflowMenu(),this.overflowItems=[],this.overflowMenuActive=!1,this.overflowButton.hidden=!0,this.renderedEntries.forEach(o=>{o.element.hidden=!1});const e=this.getOrientationClass()==="horizontal",t=this.getOverflowHostLimit(e),i=this.getToolbarOverflowMeasureSize(e);if(t<=0||this.renderedEntries.length===0){this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");return}if(i<=t){this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");return}this.overflowButton.hidden=!1;let n=this.renderedEntries.length;for(;;){for(let o=0;o<this.renderedEntries.length;o++)this.renderedEntries[o].element.hidden=o>=n;if(this.getToolbarOverflowMeasureSize(e)<=t||n===0)break;n-=1}if(n===0&&this.renderedEntries.length>0){n=1;for(let o=0;o<this.renderedEntries.length;o++)this.renderedEntries[o].element.hidden=o>=n}for(let o=n;o<this.renderedEntries.length;o++){const r=this.renderedEntries[o];r.isSeparator||this.overflowItems.push(r.item)}this.overflowButton.hidden=this.overflowItems.length===0,this.overflowMenuActive=!this.overflowButton.hidden,this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height")}flushToolbarAxisMeasure(){this.root.offsetHeight,this.root.offsetWidth}getToolbarOverflowMeasureSize(e){const t=this.isStretchSize(),i=this.root.style.width,n=this.root.style.height;t&&(this.root.classList.remove("is-stretch"),this.root.style.width=e?"max-content":i,this.root.style.height=e?n:"max-content"),this.flushToolbarAxisMeasure();const o=getComputedStyle(this.root),r=Number.parseFloat(e?o.columnGap||o.gap:o.rowGap||o.gap)||4,a=e?Number.parseFloat(o.paddingLeft)+Number.parseFloat(o.paddingRight):Number.parseFloat(o.paddingTop)+Number.parseFloat(o.paddingBottom),l=e?Number.parseFloat(o.borderLeftWidth)+Number.parseFloat(o.borderRightWidth):Number.parseFloat(o.borderTopWidth)+Number.parseFloat(o.borderBottomWidth);let c=(Number.isFinite(a)?a:0)+(Number.isFinite(l)?l:0),d=0;for(const h of Array.from(this.root.children))h instanceof HTMLElement&&!h.hidden&&(d>0&&(c+=r),c+=this.getEntryAxisSize(h,e),d+=1);return t&&(this.root.classList.add("is-stretch"),this.root.style.width=i,this.root.style.height=n,this.flushToolbarAxisMeasure()),c}getToolbarAxisSize(e){this.flushToolbarAxisMeasure();const t=e?this.root.offsetWidth:this.root.offsetHeight;return t>0?t:this.getToolbarOverflowMeasureSize(e)}getOverflowHostLimit(e){const t=this.inCanvasParent?this.sideOffset:this.edgeOffset,i=this.getLayoutHost(),n=e?i.clientWidth:i.clientHeight;return Math.max(0,n-t*2)}toggleOverflowMenu(){if(this.overflowDropdown){this.closeOverflowMenu();return}if(this.overflowItems.length===0)return;this.notifyExclusiveOpen(),this.closeChildrenUi();const e=this.overflowItems.map(t=>On(t,this.selectedChildByParent.get(t.id))).filter(t=>!ke(t));this.overflowDropdown=new Oa(this.options.i18n,e,this.overflowButton,this.themeHost),this.overflowDropdown.setOnSelect(t=>{this.activateToolbarItem(t,this.overflowButton),this.closeOverflowMenu()}),this.overflowDropdown.setOnClose(()=>{this.overflowDropdown=void 0})}closeOverflowMenu(){var e;(e=this.overflowDropdown)==null||e.close(),this.overflowDropdown=void 0}ensureMountHostLayout(){getComputedStyle(this.mountHost).position==="static"&&(this.mountHost.style.position="relative"),this.mountHost.classList.add("ml-ex-ui-toolbar-host")}getLayoutHost(){return this.inCanvasParent?this.inParentHost??this.mountHost:this.mountHost}getOverlayHost(){return this.options.overlayHost?this.options.overlayHost:this.inCanvasParent&&this.toolbarMain?this.toolbarMain:this.mountHost}ensureInParentLayout(){if(!this.inCanvasParent){this.releaseInParentLayout({keepRoot:!0});return}const e=this.resolveInParentWrapRoot();this.applyInParentHostClasses(e),this.ensureToolbarMainWrapper(e),this.placeToolbarInWrapRoot(e)}resolveInParentWrapRoot(){const e=this.mountHost.querySelector(":scope > .ml-ex-ui-dock-main");return e instanceof HTMLElement?e:this.mountHost}applyInParentHostClasses(e){this.inParentHost&&this.inParentHost!==e&&this.clearInParentHostClasses(this.inParentHost),this.inParentHost=e,e.classList.add("ml-ex-ui-toolbar-in-parent"),e.classList.remove("ml-ex-ui-toolbar-in-parent-top","ml-ex-ui-toolbar-in-parent-bottom","ml-ex-ui-toolbar-in-parent-left","ml-ex-ui-toolbar-in-parent-right"),e.classList.add(`ml-ex-ui-toolbar-in-parent-${this.options.placement}`)}clearInParentHostClasses(e){e&&e.classList.remove(...Va.IN_PARENT_HOST_CLASSES)}shouldSkipInParentMove(e){return e instanceof HTMLElement?e===this.root||e.classList.contains("ml-ex-ui-toolbar")||e.classList.contains("ml-ex-ui-toolbar-main")||e.classList.contains("ml-ex-ui-dock-panel")||e.classList.contains("ml-ex-ui-subtoolbar")||e.classList.contains("ml-ex-ui-dropdown"):!1}ensureToolbarMainWrapper(e){var o;if(((o=this.toolbarMain)==null?void 0:o.parentElement)===e)return;const t=e.querySelector(":scope > .ml-ex-ui-toolbar-main");if(t instanceof HTMLElement){this.toolbarMain=t;return}const i=[];Array.from(e.childNodes).forEach(r=>{this.shouldSkipInParentMove(r)||i.push(r)});const n=document.createElement("div");n.className="ml-ex-ui-toolbar-main",i.forEach(r=>n.appendChild(r)),e.appendChild(n),this.toolbarMain=n}placeToolbarInWrapRoot(e){const t=this.options.placement;if(t==="top"||t==="left"){e.insertBefore(this.root,e.firstChild);return}e.appendChild(this.root)}releaseInParentLayout(e){const t=!!(this.inParentHost||this.toolbarMain);this.clearInParentHostClasses(this.inParentHost),this.inParentHost=void 0,this.releaseToolbarMainWrapper(),this.clearInParentOffsetStyles(),t&&e.keepRoot&&this.root.isConnected&&this.root.parentElement!==this.mountHost&&this.mountHost.isConnected&&this.mountHost.appendChild(this.root)}releaseToolbarMainWrapper(){var t;if(!((t=this.toolbarMain)!=null&&t.isConnected)){this.toolbarMain=void 0;return}const e=this.toolbarMain.parentElement;if(e)for(;this.toolbarMain.firstChild;)e.insertBefore(this.toolbarMain.firstChild,this.toolbarMain);this.toolbarMain.remove(),this.toolbarMain=void 0}clearInParentOffsetStyles(){this.root.style.marginTop="",this.root.style.marginRight="",this.root.style.marginBottom="",this.root.style.marginLeft=""}setupResizeObserver(){var t;(t=this.resizeObserver)==null||t.disconnect(),this.resizeObserver=new ResizeObserver(()=>{this.scheduleSyncPosition()}),this.resizeObserver.observe(this.mountHost);const e=this.getLayoutHost();e!==this.mountHost&&this.resizeObserver.observe(e),this.toolbarMain&&this.toolbarMain!==e&&this.resizeObserver.observe(this.toolbarMain)}scheduleSyncPosition(){this.layoutFrame===void 0&&(this.layoutFrame=requestAnimationFrame(()=>{var e,t;if(this.layoutFrame=void 0,this.applyOverflowLayout(),this.syncPosition(),this.overflowMenuActive){const i=this.getOrientationClass()==="horizontal",n=this.getOverflowHostLimit(i);this.getToolbarOverflowMeasureSize(i)>n&&(this.applyOverflowMenuLayout(),this.syncPosition())}(e=this.openSubToolbar)==null||e.syncPosition(),(t=this.openNestedSubToolbar)==null||t.syncPosition()}))}syncPosition(){if(!this.root.isConnected||this.root.hidden)return;if(this.inCanvasParent){this.applyInParentPosition();return}this.clearInParentOffsetStyles();const e=this.edgeOffset,t=this.mountHost.clientWidth,i=this.mountHost.clientHeight;if(t<=0||i<=0)return;this.root.style.top="",this.root.style.bottom="",this.root.style.left="",this.root.style.right="",this.root.style.transform="",this.root.style.width="",this.root.style.height="",this.root.style.maxWidth="",this.root.style.maxHeight="";const n=this.getToolbarAxisSize(!0),o=this.getToolbarAxisSize(!1),r=this.options.placement,a=this.isStretchSize();if(r==="top"||r==="bottom"){if(a)this.root.style.left="0",this.root.style.right="0",this.root.style.width=`${t}px`,this.root.style.maxWidth=`${t}px`;else{const l=Math.max(e,t-n-e),c=(t-n)/2,d=Math.min(l,Math.max(e,c));this.root.style.left=`${d}px`,this.root.style.maxWidth=`${Math.max(0,t-e*2)}px`}r==="top"?this.root.style.top=`${e}px`:this.root.style.bottom=`${e}px`;return}if(a){const l=Math.max(0,i-e*2);this.root.style.height=`${l}px`,this.root.style.top=`${e}px`}else{const l=e,c=i-o-e,d=(i-o)/2,h=c>=l?Math.min(c,Math.max(l,d)):c;this.root.style.top=`${h}px`}r==="left"?this.root.style.left=`${e}px`:this.root.style.right=`${e}px`}applyInParentPosition(){this.root.style.top="",this.root.style.bottom="",this.root.style.left="",this.root.style.right="",this.root.style.transform="",this.root.style.width="",this.root.style.height="",this.root.style.maxWidth="",this.root.style.maxHeight="";const e=this.edgeOffset,t=this.sideOffset,i=this.options.placement;i==="top"||i==="bottom"?(this.root.style.marginTop=i==="bottom"?`${e}px`:"0",this.root.style.marginBottom=i==="top"?`${e}px`:"0",this.root.style.marginLeft=`${t}px`,this.root.style.marginRight=`${t}px`):(this.root.style.marginLeft=i==="right"?`${e}px`:"0",this.root.style.marginRight=i==="left"?`${e}px`:"0",this.root.style.marginTop=`${t}px`,this.root.style.marginBottom=`${t}px`)}seedSelectedChildren(e){var t;for(const i of e)ke(i)||(i.childIcon==="selected"&&i.selectedChildId&&this.selectedChildByParent.set(i.id,i.selectedChildId),!Ot(i)&&((t=i.children)!=null&&t.length)&&this.seedSelectedChildren(i.children))}resolveStripChildItems(e){return Ma(e,this.openMode).map(t=>On(t,this.selectedChildByParent.get(t.id)))}closeChildrenUi(){var e,t;this.closeOverflowMenu(),this.closeNestedSubToolbar(),(e=this.openDropdown)==null||e.close(),this.openDropdown=void 0,(t=this.openSubToolbar)==null||t.close(),this.openSubToolbar=void 0,this.clearParentOpenState(),this.openParentId=void 0,this.stickyParentId=void 0}clearParentOpenState(){this.openParentButton&&(this.openParentButton.classList.remove("is-open"),this.openParentButton.setAttribute("aria-expanded","false"),this.openParentButton instanceof HTMLElement&&this.openParentButton.blur(),this.openParentButton=void 0)}markParentOpen(e){this.clearParentOpenState(),e.classList.add("is-open"),e.setAttribute("aria-expanded","true"),this.openParentButton=e}openChildrenUi(e,t,i){var r;this.notifyExclusiveOpen(),this.closeChildrenUi();const n=Ia(e);if(this.openParentId=e.id,this.markParentOpen(t),Au(n)){const a=n==="sticky-toolbar";this.stickyParentId=a?e.id:void 0;const l=new Iu({i18n:this.options.i18n,items:i,anchor:t,toolbarRoot:this.root,host:this.getOverlayHost(),placement:this.options.placement,sticky:a,chrome:this.resolveSubToolbarChrome(),position:(r=this.options.subToolbar)==null?void 0:r.position,getCrossAxisInset:()=>this.getCrossAxisInset(),commandsDisabled:this.isDisabled||!this.hasDocument,onSelect:(c,d)=>this.handleSubToolbarSelect(e,c,d,a),onClose:()=>{this.openSubToolbar===l&&(this.closeNestedSubToolbar(),this.openSubToolbar=void 0,this.clearParentOpenState(),this.openParentId=void 0,this.stickyParentId=void 0)},shouldKeepOpenForTarget:c=>{var d;return((d=this.openNestedSubToolbar)==null?void 0:d.containsTarget(c))??!1}});this.openSubToolbar=l;return}const o=new Oa(this.options.i18n,i,t,this.themeHost);o.setOnSelect(a=>{this.activateChild(e,a,!1)}),o.setOnClose(()=>{this.openDropdown===o&&(this.openDropdown=void 0,this.clearParentOpenState(),this.openParentId=void 0)}),this.openDropdown=o}openStickyChildrenByParentId(e){var o;const t=this.items.find(r=>ke(r)?!1:r.id===e);if(!((o=t==null?void 0:t.children)!=null&&o.length)||Ia(t)!=="sticky-toolbar")return;const i=this.root.querySelector(`[data-toolbar-item-id="${e}"]`);if(!i)return;const n=this.resolveStripChildItems(t.children);n.length!==0&&this.openChildrenUi(t,i,n)}handleSubToolbarSelect(e,t,i,n){var r;if(ke(t))return;const o=Ki(t);if((r=o.children)!=null&&r.length||Ot(o)){const a=this.resolveStripChildItems(o.children??[]);if(a.length===0)return;this.openNestedSubToolbarUi(o,i,a,e,n);return}this.activateChild(e,t,n),n||this.closeChildrenUi()}openNestedSubToolbarUi(e,t,i,n,o){var h,f;if(this.openNestedSubToolbar&&this.openNestedSubToolbar.anchor===t){this.closeNestedSubToolbar();return}this.closeNestedSubToolbar();const r=Ia(e),a=this.resolveSubToolbarChrome(),l=a.replaceOnNested;if(!Au(r)){const y=new Oa(this.options.i18n,i,t,this.themeHost);y.setOnSelect(g=>{var b;this.activateChild(e,g,!1),y.close(),o?(b=this.openSubToolbar)==null||b.refresh(this.resolveStripChildItems(n.children??[]),this.isDisabled||!this.hasDocument):this.closeChildrenUi()}),y.setOnClose(()=>{});return}l&&((h=this.openSubToolbar)==null||h.setHidden(!0));const c=r==="sticky-toolbar",d=new Iu({i18n:this.options.i18n,items:i,anchor:t,toolbarRoot:l||!this.openSubToolbar?this.root:this.openSubToolbar.rootElement,host:this.getOverlayHost(),placement:this.options.placement,sticky:c,chrome:a,position:(f=this.options.subToolbar)==null?void 0:f.position,getCrossAxisInset:()=>this.getCrossAxisInset(),commandsDisabled:this.isDisabled||!this.hasDocument,onSelect:(y,g)=>this.handleSubToolbarSelect(e,y,g,c),onClose:()=>{var y,g;this.openNestedSubToolbar===d&&(this.openNestedSubToolbar=void 0,l&&((y=this.openSubToolbar)==null||y.setHidden(!1),(g=this.openSubToolbar)==null||g.syncPosition()))}});this.openNestedSubToolbar=d}closeNestedSubToolbar(){var t,i;const e=this.resolveSubToolbarChrome().replaceOnNested===!0;(t=this.openNestedSubToolbar)==null||t.close(),this.openNestedSubToolbar=void 0,e&&((i=this.openSubToolbar)==null||i.setHidden(!1))}activateChild(e,t,i){var r;if(ke(t))return;const n=Ki(t);if(e.childIcon==="selected"&&this.selectedChildByParent.set(e.id,n.id),n.action?n.action():n.command&&this.options.onCommand(n.command),!ke(t)&&n.id.startsWith("locale-")&&this.refreshLocale(),t.toggle&&i&&this.openSubToolbar){window.setTimeout(()=>{this.openSubToolbar&&this.openSubToolbar.refresh(this.resolveStripChildItems(e.children??[]),this.isDisabled||!this.hasDocument)},0);return}if(e.childIcon==="selected"&&this.openSubToolbar&&this.openParentId&&e.id!==this.openParentId){const a=this.items.find(l=>ke(l)?!1:l.id===this.openParentId);(r=a==null?void 0:a.children)!=null&&r.length&&window.setTimeout(()=>{!this.openSubToolbar||!a.children||this.openSubToolbar.refresh(this.resolveStripChildItems(a.children),this.isDisabled||!this.hasDocument)},0)}t.toggle?window.setTimeout(()=>this.renderButtons(),0):(e.childIcon==="selected"||e.toggle)&&this.renderButtons()}};Va.IN_PARENT_HOST_CLASSES=["ml-ex-ui-toolbar-in-parent","ml-ex-ui-toolbar-in-parent-top","ml-ex-ui-toolbar-in-parent-bottom","ml-ex-ui-toolbar-in-parent-left","ml-ex-ui-toolbar-in-parent-right"];let Mu=Va;Object.defineProperty(u,"ACGI_DARK_THEME_FOREGROUND",{enumerable:!0,get:()=>p.ACGI_DARK_THEME_FOREGROUND}),Object.defineProperty(u,"ACGI_LIGHT_THEME_FOREGROUND",{enumerable:!0,get:()=>p.ACGI_LIGHT_THEME_FOREGROUND}),Object.defineProperty(u,"ACGI_MODEL_SPACE_BACKGROUND",{enumerable:!0,get:()=>p.ACGI_MODEL_SPACE_BACKGROUND}),Object.defineProperty(u,"ACGI_PAPER_SPACE_BACKGROUND",{enumerable:!0,get:()=>p.ACGI_PAPER_SPACE_BACKGROUND}),Object.defineProperty(u,"acgiContrastingForegroundColor",{enumerable:!0,get:()=>p.acgiContrastingForegroundColor}),Object.defineProperty(u,"acgiForegroundColorForBackground",{enumerable:!0,get:()=>p.acgiForegroundColorForBackground}),Object.defineProperty(u,"acgiIsLightBackground",{enumerable:!0,get:()=>p.acgiIsLightBackground}),Object.defineProperty(u,"isDirectBatchCandidate",{enumerable:!0,get:()=>D.isDirectBatchCandidate}),Object.defineProperty(u,"shouldExtendBboxForDirectEntity",{enumerable:!0,get:()=>D.shouldExtendBboxForDirectEntity}),Object.defineProperty(u,"tryBuildDirectEntityMeta",{enumerable:!0,get:()=>D.tryBuildDirectEntityMeta}),Object.defineProperty(u,"ShxParserFont",{enumerable:!0,get:()=>$.ShxParserFont}),Object.defineProperty(u,"AcGiTextParagraphAlignment",{enumerable:!0,get:()=>q.MTextParagraphAlignment}),Object.defineProperty(u,"MTextColor",{enumerable:!0,get:()=>q.MTextColor}),Object.defineProperty(u,"MTextParagraphAlignment",{enumerable:!0,get:()=>q.MTextParagraphAlignment}),u.ACAP_DEFAULT_COMPARE_COLORS=$x,u.ACAP_DEFAULT_DOCS_BASE_URL=ao,u.ACAP_DOCS_PATH_MAGNIFIER=Ru,u.ACAP_DWG_PARSER_PRODUCT_URL=Ov,u.ACAP_FIND_MAX_RESULTS=vu,u.ACAP_GROUPABLE_NOTIFICATION_SOURCES=Av,u.ACAP_LOCAL_DATA_SOURCE_ID=wa,u.ACAP_MEASURE_ANGLE_BADGE_REF_ARM_FRACTION=tx,u.ACAP_MEASURE_BADGE_BORDER_PX=du,u.ACAP_MEASURE_BADGE_H_CHROME_PX=WE,u.ACAP_MEASURE_BADGE_MAX_LINE_FRACTION=ex,u.ACAP_MEASURE_BADGE_PAD_X_PX=cu,u.ACAP_MEASURE_BADGE_REF_FONT_PX=lu,u.ACAP_OVERLAY_ARROW_SIZE_PX=kt,u.ACAP_OVERLAY_ARROW_WCS=Kn,u.ACAP_OVERLAY_CLOUD_DIAMETER_PX=vo,u.ACAP_OVERLAY_CLOUD_WCS=wo,u.ACAP_OVERLAY_STROKE_WCS=ci,u.ACAP_READING_MODE_BACKGROUND=$a,u.ACAP_READING_MODE_COLOR=Uu,u.ACAP_UNTITLED_DOC_TITLE=ga,u.ACAP_URL_DATA_SOURCE_ID=iu,u.ACED_DRAW_STYLE_SESSION_PROVIDER_ID=Li,u.ACED_SHORTCUT_TOOLBAR_PROVIDER_ID=Sr,u.ACED_SIMULATED_MOUSE_OFFSET_Y_PX=of,u.ACED_SNAP_LOUPE_GAP_BELOW_PROMPT_PX=AA,u.ACED_SNAP_LOUPE_INSET_PX=Tc,u.ACED_SNAP_LOUPE_SIZE_PX=pn,u.ACED_SNAP_LOUPE_ZOOM=Lc,u.ACED_TOUCH_MOUSE_GUARD_MS=Ac,u.ACED_TOUCH_POINT_LONG_PRESS_MS=gc,u.ACED_TOUCH_POINT_MOVE_CANCEL_PX=Um,u.ACI_GRAY_PALETTE_INDICES=Bc,u.ACI_LARGE_PALETTE_INDICES=Nc,u.ACI_SMALL_PALETTE_INDICES=Dc,u.ACUI_SHORTCUT_TOOLBAR_DEFAULT_TOP_PX=Gf,u.AcApAboutCmd=Gw,u.AcApArcCmd=gg,u.AcApBlockInsertSession=Xr,u.AcApBlockPreviewConvertor=nd,u.AcApCacheFontCmd=Us,u.AcApCircleCmd=Sg,u.AcApCircleJig=pd,u.AcApClearMarkupsCmd=mw,u.AcApClearMeasurementsCmd=jb,u.AcApCloseCmd=qw,u.AcApContext=Ea,u.AcApConvertToBmpCmd=Wy,u.AcApConvertToDxfCmd=Ky,u.AcApConvertToJpgCmd=Yy,u.AcApConvertToPngCmd=Zy,u.AcApConvertToRasterImageCmd=Nr,u.AcApCopyCmd=ha,u.AcApDataSourceManager=xv,u.AcApDimAlignedCmd=Og,u.AcApDimAlignedJig=Mg,u.AcApDimAngularCmd=Ng,u.AcApDimAngularJig=Dg,u.AcApDimArcCmd=zg,u.AcApDimArcJig=Fg,u.AcApDimBaselineCmd=$g,u.AcApDimContinueCmd=Wg,u.AcApDimDiameterCmd=Yg,u.AcApDimDiameterJig=Kg,u.AcApDimLinearCmd=Xg,u.AcApDimLinearJig=Zg,u.AcApDimOrdinateCmd=Jg,u.AcApDimOrdinateJig=qg,u.AcApDimRadiusCmd=eb,u.AcApDimRadiusJig=Qg,u.AcApDocManager=k,u.AcApDocSession=ya,u.AcApDocument=ba,u.AcApDrawStyleDrawCmd=Vc,u.AcApDxfConvertor=$y,u.AcApEllipseCmd=sb,u.AcApEntityPreviewCmd=Jy,u.AcApEntityPreviewConvertor=Xy,u.AcApEntityService=sd,u.AcApEraseCmd=Nw,u.AcApExamplePlugin=vL,u.AcApFontLoader=dv,u.AcApFontUtil=Wt,u.AcApHatchCmd=Zr,u.AcApHideObjectsCmd=Bw,u.AcApI18n=m,u.AcApImageAttachCmd=ob,u.AcApInsertCmd=ab,u.AcApLayerCloseCmd=cg,u.AcApLayerCmd=dg,u.AcApLayerCurCmd=ig,u.AcApLayerDelCmd=tg,u.AcApLayerFreezeCmd=Fr,u.AcApLayerIsoCmd=zr,u.AcApLayerLockCmd=ng,u.AcApLayerOnCmd=sg,u.AcApLayerPCmd=og,u.AcApLayerService=we,u.AcApLayerStore=Qy,u.AcApLayerThawCmd=rg,u.AcApLayerUnisoCmd=ag,u.AcApLayerUnlockCmd=lg,u.AcApLayoffCmd=Rr,u.AcApLineCmd=ji,u.AcApLineJig=Wr,u.AcApLocalDataSource=hv,u.AcApLogCmd=Hw,u.AcApMLineCmd=cb,u.AcApMLineJig=lb,u.AcApMTextCmd=db,u.AcApMarkupArrowCmd=fw,u.AcApMarkupCalloutCmd=yw,u.AcApMarkupCalloutEntity=py,u.AcApMarkupCircleCmd=gw,u.AcApMarkupCloudCmd=bw,u.AcApMarkupDrawCmd=Ut,u.AcApMarkupEntity=Fi,u.AcApMarkupExportCmd=Aw,u.AcApMarkupHighlightCmd=ww,u.AcApMarkupHighlightEntity=my,u.AcApMarkupHistory=Sh,u.AcApMarkupImportCmd=_w,u.AcApMarkupLineCmd=Pw,u.AcApMarkupPresenter=wy,u.AcApMarkupRectCmd=Ew,u.AcApMarkupSegmentEntity=fy,u.AcApMarkupShapeEntity=yy,u.AcApMarkupStampCmd=Tw,u.AcApMarkupStampEntity=gy,u.AcApMarkupStore=eh,u.AcApMarkupTextCmd=Iw,u.AcApMarkupTextEntity=by,u.AcApMarkupVisibilityCmd=Ow,u.AcApMeasureAngleCmd=Jb,u.AcApMeasureAngleEntity=Fs,u.AcApMeasureArcCmd=rw,u.AcApMeasureArcEntity=zs,u.AcApMeasureAreaCmd=ew,u.AcApMeasureAreaEntity=Rs,u.AcApMeasureContinuousCmd=dw,u.AcApMeasureContinuousJig=cw,u.AcApMeasureDistanceCmd=lw,u.AcApMeasureDistanceEntity=js,u.AcApMeasureDistanceJig=aw,u.AcApMeasureDrawCmd=Hi,u.AcApMeasureEntity=Pn,u.AcApMeasurePointCmd=hw,u.AcApMeasurePointEntity=Vs,u.AcApMeasurementExportCmd=Zb,u.AcApMeasurementHistory=_h,u.AcApMeasurementImportCmd=Xb,u.AcApMeasurementVisibilityCmd=Vb,u.AcApMemoryProfiler=Y1,u.AcApMoveCmd=zw,u.AcApNotificationEventBridge=Gv,u.AcApNotificationStore=Ca,u.AcApObjectScaleCmd=Xw,u.AcApOffsetCmd=Gs,u.AcApOpenCmd=Zw,u.AcApOpenFileProfiler=ka,u.AcApOpenViewMode=_t,u.AcApOverlayEntity=$c,u.AcApPanCmd=rv,u.AcApPluginManager=av,u.AcApPointCmd=ub,u.AcApPolygonCmd=Jr,u.AcApPolylineCmd=fb,u.AcApPolylineJig=mb,u.AcApProgress=Tn,u.AcApQNewCmd=Jw,u.AcApRasterImageConvertor=Hy,u.AcApRayCmd=gb,u.AcApReadingModeCmd=nv,u.AcApReadingModeState=Wu,u.AcApRectCmd=Qr,u.AcApRectJig=wb,u.AcApRedoCmd=ov,u.AcApRegenCmd=Qw,u.AcApRevCloudCmd=ea,u.AcApRevCloudJig=Eb,u.AcApRotateCmd=ma,u.AcApSelectCmd=ev,u.AcApSessionUndo=Ch,u.AcApSettingManager=le,u.AcApSketchCmd=sa,u.AcApSketchJig=Ib,u.AcApSplineCmd=Ob,u.AcApSplineJig=Mb,u.AcApSwitchBgCmd=iv,u.AcApSysVarCmd=tv,u.AcApUndoCmd=sv,u.AcApUnisolateObjectsCmd=Vw,u.AcApUrlDataSource=kv,u.AcApXAttachCmd=Fb,u.AcApXLineCmd=zb,u.AcApXrefManager=Si,u.AcApZoomCmd=yi,u.AcEdBaseView=Cf,u.AcEdBatchedPreview=Ic,u.AcEdCommand=K,u.AcEdCommandLine=Sm,u.AcEdCommandStack=Me,u.AcEdConditionWaiter=jo,u.AcEdCorsorType=Ti,u.AcEdCursorManager=sm,u.AcEdDesktopInteractionStrategy=om,u.AcEdDesktopSessionAccessoryChrome=Jo,u.AcEdEntityPickCancelChrome=Hm,u.AcEdGripEditSession=tm,u.AcEdGripHandle=im,u.AcEdGripManager=nm,u.AcEdGripPreviewJig=em,u.AcEdHoverController=kf,u.AcEdInputManager=pr,u.AcEdKeyword=rc,u.AcEdKeywordCollection=gm,u.AcEdLoupeTouchPickStrategy=rf,u.AcEdMTextEditor=qt,u.AcEdMarker=us,u.AcEdMarkerManager=hs,u.AcEdMobileCommandChrome=uf,u.AcEdMobileInteractionStrategy=rm,u.AcEdOpenMode=U,u.AcEdOsnapResolver=De,u.AcEdPreviewJig=X,u.AcEdPromptAngleOptions=Ge,u.AcEdPromptBoxOptions=Ko,u.AcEdPromptBoxResult=mi,u.AcEdPromptDistanceOptions=Je,u.AcEdPromptDoubleOptions=ve,u.AcEdPromptDoubleResult=rt,u.AcEdPromptEntityOptions=Pe,u.AcEdPromptEntityResult=Zo,u.AcEdPromptIntegerOptions=lc,u.AcEdPromptIntegerResult=Xo,u.AcEdPromptKeywordOptions=ye,u.AcEdPromptNumericalOptions=Yo,u.AcEdPromptNumericalResult=ac,u.AcEdPromptOptions=Ft,u.AcEdPromptPointOptions=F,u.AcEdPromptPointResult=qo,u.AcEdPromptResult=Pt,u.AcEdPromptSelectionOptions=Ii,u.AcEdPromptSelectionResult=ms,u.AcEdPromptStateMachine=Rt,u.AcEdPromptStatus=v,u.AcEdPromptStringOptions=xe,u.AcEdSelectionFilter=_A,u.AcEdSelectionSet=$o,u.AcEdSelectionStaticPreviewJig=xf,u.AcEdSelectionTransformPreviewJig=mn,u.AcEdSessionAccessoryController=pf,u.AcEdSessionAccessoryMountSkippedError=rs,u.AcEdSessionProviderRegistry=Ep,u.AcEdSimulatedMouseTouchPickStrategy=af,u.AcEdSnapLoupe=mr,u.AcEdTouchPointSession=Pc,u.AcEdViewKeyHandler=No,u.AcEdViewMode=qe,u.AcEditor=vf,u.AcTrGeometryUtil=mu,u.AcTrInheritedLayerMaterialMapper=yp,u.AcTrLayerAppearanceController=Gl,u.AcTrScene=_p,u.AcTrView2d=Mn,u.AcUiAboutDialog=fa,u.AcUiAciColorDialog=Or,u.AcUiDefaultNotificationUi=Wv,u.AcUiDialog=fi,u.AcUiDrawStyleSessionAccessory=Ry,u.AcUiDropdownMenu=Oa,u.AcUiFileOpenPanel=Cu,u.AcUiFullscreenPanel=dr,u.AcUiHelpPanel=ur,u.AcUiMobileSessionPanel=hr,u.AcUiShortCutToolbar=Hf,u.AcUiSimpleToolbar=jf,u.AcUiSubToolbar=Iu,u.AcUiTextHeightDialog=Dr,u.AcUiToolbar=Mu,u.AcUiTouchPointTutorial=tr,u.AcUiTouchPointTutorialDialog=Jm,u.DEFAULT_GRIP_COLOR_CSS=z0,u.DEFAULT_GRIP_HOT_COLOR_CSS=R0,u.DEFAULT_GRIP_SIZE_PX=Hp,u.DEFAULT_VIEW_2D_OPTIONS=bu,u.DIM_PREVIEW_BLOCK=_e,u.DIM_STYLE_FIELDS=fd,u.DWG_CONVERTER_PACKAGE=cE,u.DWG_PARSER_MAIN_FILE=rE,u.DWG_PARSER_WORKER_FILE=oE,u.ENTITY_EDIT_LABEL=vp,u.GRIP_APPEARANCE_SYSVARS=Wp,u.ICON_ANNOTATION=eC,u.ICON_ANNOTATION_HIDE=Dm,u.ICON_ANNOTATION_SHOW=Om,u.ICON_CHEVRON_DOWN=Bm,u.ICON_CHEVRON_LEFT=fc,u.ICON_CHEVRON_RIGHT=mc,u.ICON_CHEVRON_UP=Nm,u.ICON_CLEAR=pc,u.ICON_CLEAR_MARKUPS=uC,u.ICON_CLEAR_MEASUREMENTS=qS,u.ICON_CLOSE=Vm,u.ICON_COLOR=NC,u.ICON_DOCK_CLOSE=CC,u.ICON_DOCK_SIDE_MENU=AC,u.ICON_ERASE=Rm,u.ICON_EXPORT=fC,u.ICON_EXPORT_HTML=yC,u.ICON_EXPORT_PDF=gC,u.ICON_EXPORT_SVG=bC,u.ICON_LANGUAGE=hC,u.ICON_LAYER=VS,u.ICON_LAYER_OFF=IC,u.ICON_LAYER_ON=TC,u.ICON_LAYOUT=GS,u.ICON_MARKUP_ARROW=rC,u.ICON_MARKUP_CALLOUT=iC,u.ICON_MARKUP_CIRCLE=jC,u.ICON_MARKUP_CLOUD=zC,u.ICON_MARKUP_EXPORT=Mm,u.ICON_MARKUP_HIDE=GC,u.ICON_MARKUP_HIGHLIGHT=oC,u.ICON_MARKUP_IMPORT=cC,u.ICON_MARKUP_LINE=sC,u.ICON_MARKUP_PANEL=Im,u.ICON_MARKUP_RECT=RC,u.ICON_MARKUP_SHOW=VC,u.ICON_MARKUP_STAMP=aC,u.ICON_MARKUP_TEXT=nC,u.ICON_MEASURE=HS,u.ICON_MEASUREMENT_PANEL=lC,u.ICON_MEASURE_ANGLE=KS,u.ICON_MEASURE_ARC=ZS,u.ICON_MEASURE_AREA=YS,u.ICON_MEASURE_CONTINUOUS=$S,u.ICON_MEASURE_COORDINATE=FC,u.ICON_MEASURE_DISTANCE=WS,u.ICON_MEASURE_POINT=_m,u.ICON_MEASURE_RADIUS=XS,u.ICON_MORE=yc,u.ICON_OPEN=dC,u.ICON_ORTHO_MODE=OC,u.ICON_OSNAP=MC,u.ICON_PAN=RS,u.ICON_PLACEMENT_BOTTOM=xC,u.ICON_PLACEMENT_LEFT=kC,u.ICON_PLACEMENT_RIGHT=SC,u.ICON_PLACEMENT_TOP=vC,u.ICON_POLAR_TRACKING=DC,u.ICON_READING_MODE=QS,u.ICON_REDO=zm,u.ICON_REV_CIRCLE=Tm,u.ICON_REV_CLOUD=Em,u.ICON_REV_RECT=Lm,u.ICON_SELECT=zS,u.ICON_SETTINGS=EC,u.ICON_SIMULATED_MOUSE=LC,u.ICON_SWITCH_BG=JS,u.ICON_TEXT_HEIGHT=jm,u.ICON_THEME_DARK=mC,u.ICON_THEME_LIGHT=pC,u.ICON_TOOLBAR_PLACEMENT=wC,u.ICON_UNDO=Fm,u.ICON_ZOOM_BOX=BC,u.ICON_ZOOM_EXTENT=jS,u.ICON_ZOOM_ORIGINAL=_C,u.ICON_ZOOM_SMART=PC,u.ICON_ZOOM_WINDOW=Am,u.LAYER_EDIT_LABEL=se,u.LAYER_FROZEN_FLAG=Rl,u.LAYER_LOCKED_FLAG=Jt,u.LIBREDWG_CONVERTER_PACKAGE=aE,u.LIBREDWG_PARSER_WASM_FILE=sE,u.LIBREDWG_PARSER_WORKER_FILE=nE,u.MARKUP_FONT_SIZE=Di,u.MARKUP_HAIRLINE_LINE_WEIGHT=Kf,u.MARKUP_LAYER=po,u.MARKUP_LINE_WEIGHT=Ie,u.MARKUP_LIVE_LAYER=Le,u.MARKUP_OPEN_MODE=ly,u.MARKUP_STATUSES=th,u.MEASUREMENT_ANGLE_FORMAT_OPTIONS=al,u.MEASUREMENT_FONT_SIZE=_i,u.MEASUREMENT_LAYER=ne,u.MEASUREMENT_LENGTH_FORMAT_OPTIONS=mo,u.MEASUREMENT_LENGTH_UNIT_FOLLOW_DRAWING=sl,u.MEASUREMENT_LINE_WEIGHT=Te,u.MEASUREMENT_LIVE_LAYER=be,u.MEASURE_ANGLE_ARC_RADIUS_FRACTION=ih,u.MLIGHTCAD_BRAND_NAME=ro,u.MLIGHTCAD_DOCS_URL=Ha,u.MLIGHTCAD_ICON_SVG=Nu,u.MLIGHTCAD_REPO_URL=Fu,u.MLIGHTCAD_WEBSITE_URL=Bu,u.ML_ACI_STACKS_FILL_CLASS=Sy,u.ML_UI_COARSE_POINTER_MEDIA_QUERY=Fp,u.ML_UI_COMPACT_MAX_WIDTH=Np,u.ML_UI_COMPACT_MEDIA_QUERY=Jl,u.ML_UI_GRIP_HOT_VAR=Gp,u.ML_UI_GRIP_NORMAL_VAR=Vp,u.ML_UI_GRIP_SIZE_VAR=jp,u.ML_UI_MOBILE_MAX_WIDTH=Go,u.ML_UI_MOBILE_MEDIA_QUERY=Xl,u.ML_UI_SESSION_PANEL_INSET=ql,u.ML_UI_SESSION_PANEL_MAX_WIDTH=Ho,u.ML_UI_SESSION_PANEL_WIDTH=rn,u.ML_UI_Z_CANVAS_HTML_OVERLAY=Tp,u.ML_UI_Z_CANVAS_HTML_STROKE=B0,u.ML_UI_Z_DRAW_STYLE_TOOLBAR=Ip,u.ML_UI_Z_ENTITY_PICK_CANCEL=Op,u.ML_UI_Z_NOTIFICATION=Dp,u.ML_UI_Z_SHORTCUT_TOOLBAR=Mp,u.MTEXT_RENDERER_PACKAGE=lE,u.MTEXT_RENDERER_WORKER_FILE=bv,u.OVERLAY_HAIRLINE_LINE_WEIGHT=uh,u.POLARMODE_ADDITIONAL_ANGLES=dm,u.POLARMODE_POLAR_TRACKING=ln,u.REVCLOUD_BULGE=Md,u.REVIEW_OVERLAY_HIT_THRESHOLD_PX=Hh,u.acCmColorToCssHex=ul,u.acapActiveMarkupSessionId=Yx,u.acapAdaptiveMeasureBadgeFontSize=xt,u.acapAnalyzeUnsupportedDrawing=su,u.acapAppendLinkedText=Bv,u.acapApplyTemplateParams=Lv,u.acapBaseZoomFromWcsSize=wh,u.acapBindCommandServices=Pp,u.acapBindMarkupSession=Hn,u.acapBindOverlayCalloutGrips=_r,u.acapBindOverlayPointerDrag=Ue,u.acapBindShortCutToolbarDocState=jy,u.acapBindToolbarDocState=Z1,u.acapBoxContains=Nf,u.acapBuildDataSourceMenu=Sv,u.acapClampMeasureBadgeFontSize=ox,u.acapCloneMeasurementStyle=Xi,u.acapCollectPaperViewportsBox=Ff,u.acapColorToCssAlpha=hl,u.acapCommandServices=os,u.acapCreateMlightcadBrandMark=zu,u.acapCreateMlightcadIcon=Ua,u.acapCssColor=nt,u.acapCssToMeasurementColor=pl,u.acapDisposeMarkupSession=tl,u.acapDisposeNotificationService=qv,u.acapDocsUrl=Hu,u.acapDrawOverlayArrowHead=Bt,u.acapDrawOverlayHighlight=gl,u.acapDrawOverlayLeader=yl,u.acapDrawStyleKindForCommand=vr,u.acapEscapeHtml=Ks,u.acapEstimateMeasureBadgeWidthPx=sx,u.acapFindExcerpt=fL,u.acapFindHitBox=Ax,u.acapFindText=yL,u.acapFindTextInLayout=Sx,u.acapFitOverlayCanvas=Ei,u.acapFitOverlayCanvasToView=vh,u.acapFormatFontMissedReplacement=SE,u.acapFormatFontsMissedReplacement=ru,u.acapFormatMessageHtml=CE,u.acapFormatOpenFileErrorMessage=jv,u.acapFormatOpenFileErrorTitle=Vv,u.acapFormatOpenFileErrorToastMessage=EE,u.acapFormatUnsupportedEntitiesMessage=Iv,u.acapFrameBoxToGeBox2d=fn,u.acapGetCameraZoom=yh,u.acapGetCurrentMeasurementStyle=ge,u.acapGetDocsBaseUrl=Vu,u.acapGetDrawStyleSessionAccessory=Vy,u.acapGetMeasurementColor=it,u.acapGetMeasurementCustomTextHeightWcs=mh,u.acapGetMeasurementFontSize=Pi,u.acapGetMeasurementTextHeightMode=ph,u.acapGetNotificationUiPlacement=BE,u.acapGroupNotifications=Pv,u.acapI18nTranslate=pe,u.acapInstallDrawStyleSessionAccessory=id,u.acapInstallNotificationService=Xv,u.acapInstallOpenFileDialog=mv,u.acapInvokeDataSourceMenuAction=Cv,u.acapIsSingleLocalOpen=yE,u.acapIsTianzhengClass=Ev,u.acapIsTianzhengClassName=$s,u.acapListFindLayouts=Cx,u.acapMTextToPlainText=qs,u.acapMarkdownLink=Nv,u.acapMeasureBadgeChromePx=uu,u.acapMeasurementCanvasLineWidth=Ce,u.acapNavigateToFindHit=bL,u.acapNormalizeFindText=Xs,u.acapNotificationCenter=DE,u.acapNotificationService=Wi,u.acapNotifyUndoStackChanged=di,u.acapOpenCenteredPopup=gE,u.acapOpenDataSourceResult=Jd,u.acapOpenUrl=AE,u.acapOverlayArrowSize=ml,u.acapOverlayDash=So,u.acapPickLocalCadFile=qd,u.acapPixelsPerWorldUnit=qi,u.acapPlaceOverlayHtml=ce,u.acapPointerEventToOverlayWorld=Ss,u.acapResetMeasurementDrawStyle=uk,u.acapResolveFontMissedReplacement=ou,u.acapResolveFontsMissedReplacement=Mv,u.acapResolveLayoutFrameBox=kr,u.acapResolveOpenFileErrorMessage=zv,u.acapResolveOpenFileErrorTitle=Rv,u.acapResolveOpenFileErrorToastMessage=Fv,u.acapResolveUnsupportedEntitiesMessage=Tv,u.acapRunDataSourceMenuAction=bE,u.acapRunDatabaseEdit=ui,u.acapRunServiceEdit=ie,u.acapScaleMeasureOverlayPx=Aa,u.acapScaleWcsWithFont=fl,u.acapScaledOverlayArrowSize=ko,u.acapScaledOverlayLineWidth=Ye,u.acapScreenAngleBadgeRefLengthPx=hu,u.acapScreenArcLengthPx=_a,u.acapScreenAreaBadgeRefLengthPx=pu,u.acapScreenPxToWcs=Ae,u.acapScreenSegmentLengthPx=Ci,u.acapSeedOverlayArrowWcs=bh,u.acapSeedOverlaySizesFromWcs=Nt,u.acapSeedOverlayStrokeWcs=gh,u.acapSetDocsBaseUrl=Gu,u.acapSetMarkupBagFactory=Ju,u.acapSetMeasurementDrawColor=hh,u.acapSetMeasurementDrawFontSize=dk,u.acapSetMeasurementTextHeight=fh,u.acapSetNotificationCenter=NE,u.acapSetNotificationUiPlacement=FE,u.acapSyncLiveOverlayTextHeight=he,u.acapUninstallOpenFileDialog=yv,u.acapUpdateOpenFileDialogOptions=fv,u.acapViewportPaperBox=Bf,u.acapWcsToScreenPx=xo,u.acapWithDataSourceBusy=wE,u.acapWithSecondaryDatabase=Fd,u.accumulateSketchPoint=Lb,u.acedAlert=O0,u.acedApplyCanvasTouchCalloutStyles=bm,u.acedApplyUiTheme=ot,u.acedArmTouchMouseGuard=gs,u.acedAttachMobileBoxGesture=cr,u.acedClearDomSelection=cc,u.acedClearFollowingClickSink=lr,u.acedComputeSessionMetrics=hf,u.acedDisposeMobileSnapLoupe=wf,u.acedDisposeSimulatedMouseCursor=dA,u.acedEntityIntersectsSelectionBox=Pf,u.acedGetUiLayout=ls,u.acedGuardCanvasTouchCallout=wm,u.acedHideMobileSnapLoupe=bf,u.acedHideSimulatedMouseCursor=Sc,u.acedInteractionStrategy=Ve,u.acedIsCompactUiLayout=Bp,u.acedIsDynamicInputEnabled=am,u.acedIsGhostClientOrigin=rr,u.acedIsHandheldDevice=zp,u.acedIsMobileOrPadUi=Qt,u.acedIsMobileUiLayout=as,u.acedIsTouchDerivedMouseEvent=yt,u.acedIsTouchLongPressContextMenu=_c,u.acedLineSegmentIntersectsBox2d=Af,u.acedLoupeLocalFromCanvasDelta=ff,u.acedLoupeViewBoxFromCanvasSample=yf,u.acedNeedsCrossingGeometryRefine=Ef,u.acedPrimitiveIntersectsSelectionBox=_f,u.acedRefreshMobileSnapLoupe=gf,u.acedRefreshSimulatedMouseCursor=sf,u.acedResetTouchMouseGuard=pA,u.acedResolveLoupePlacement=mf,u.acedShouldHideDesktopCommandLine=Rp,u.acedShouldIgnoreCompatMouse=He,u.acedSinkFollowingClick=ar,u.acedSubscribeUiLayout=cs,u.acedSubscribeUiTheme=Vo,u.acedTouchPickStrategy=Cc,u.acuiAciCssColor=Ir,u.acuiBindDrawStyleSessionAccessory=jc,u.acuiClearAciPanelViewportPin=l_,u.acuiComputeWrapPackSlot=Fx,u.acuiCopyDynamicToolbarChildren=Tx,u.acuiCreateAciIndexPicker=Ty,u.acuiCreateAciPaletteStacks=Ly,u.acuiCreateToolbarSeparator=SL,u.acuiEnsureAciPaletteStyles=Tr,u.acuiEnsureToolbarStyles=Tu,u.acuiExpandToolbarItemConfigs=Dx,u.acuiFilterVisibleToolbarItems=Ma,u.acuiIndexToolbarItems=Ox,u.acuiIsDynamicToolbarChildren=Ot,u.acuiIsToolbarChildrenStrip=Au,u.acuiIsToolbarItemDisabled=Eu,u.acuiIsToolbarItemVisible=Nx,u.acuiIsToolbarPresetRef=Lx,u.acuiIsToolbarSeparatorItem=ke,u.acuiItemRequiresDocument=Pu,u.acuiLocalIsoDate=xc,u.acuiOpenTextHeightDialog=Oy,u.acuiParseAciManualInput=_y,u.acuiPinAciPanelToViewportWidth=a_,u.acuiPreserveDynamicToolbarChildren=Ix,u.acuiRemoveToolbarStylesIfUnused=_L,u.acuiResolveDrawStyleKind=Uf,u.acuiResolveEffectiveToolbarItem=Ki,u.acuiResolveParentToolbarDisplay=On,u.acuiResolveSelectedChildItem=Bx,u.acuiResolveTextHeightDialogInitials=Dy,u.acuiResolveTextHeightPatch=Ny,u.acuiResolveToolbarChildrenUi=Ia,u.acuiResolveToolbarChrome=Ex,u.acuiShouldShowDrawStyleToolbar=Rc,u.acuiShouldShowTouchPointTutorial=qm,u.acuiShouldShowTouchPointTutorialFromPrefs=Xm,u.acuiToolbarItemsIncludeItem=Mx,u.acuiToolbarPreset=CL,u.addCommonDimKeywords=wi,u.addDimKeyword=Gt,u.advanceBaselineStep=Tg,u.advanceContinueCursor=Lg,u.allocateDimBlockName=Cg,u.applyCurrentDimStyle=$e,u.applyGripAppearanceToHost=Ql,u.applyMarkupStyleToSelection=Qc,u.applyMeasurementStyle=Pl,u.applyMeasurementStyleToSelection=El,u.applySessionHiddenObjectState=dL,u.attachCalloutToMarkup=xy,u.bindMarkupCalloutGrips=_1,u.bindMarkupCenterMove=Ps,u.bindMarkupInlineTextEdit=wr,u.bindMarkupPointerDrag=A1,u.bindMeasurementOverlayHistory=Lh,u.bindOverlayHistory=kh,u.box3dToBox2d=Of,u.buildMarkupCloud=XA,u.buildMarkupRect=qA,u.buildRevCloud=Ab,u.canvasBackgroundFromColor=dp,u.clearLayoutMeasurements=Rb,u.cmdDescription=dc,u.collectMeasurementRecords=Ll,u.collectMemorySnapshot=Yw,u.collectReviewOverlayIdsByBox=Kh,u.collectTextStyleFontNames=Jv,u.commitDimBlock=ii,u.commitMarkup=Lt,u.commitMeasurementGroup=jh,u.computeIntelligentExtents=m0,u.computeIntelligentExtentsAsync=bp,u.computeLeaderTipOnShape=wn,u.configureMarkupCommand=Zc,u.configureMarkupDrawCommand=KA,u.constrainToOrtho=cm,u.constrainToTracking=ym,u.convertAreaValue=rh,u.convertLengthValue=ol,u.createDefaultMarkupColor=$f,u.createIconElement=ft,u.createMarkupEntity=n_,u.createMarkupEntityFromRecord=qc,u.createMarkupId=ty,u.createMarkupMeta=Et,u.createMeasureEntityFromRecord=Vd,u.createRotationMatrix=yn,u.cssToMarkupColor=Wc,u.cursorColorForBackground=Oo,u.dedupeFontNames=Zs,u.defaultMarkupColor=fe,u.defaultMarkupStyle=Qe,u.defaultRevCloudArcLength=xb,u.definitionPointsFromEntity=bd,u.deserializeMeasurementStyle=Ih,u.distPointToArcPx=Za,u.distPointToCirclePx=Ya,u.distPointToPolylinePx=Ka,u.distPointToRectOutlinePx=lo,u.distPointToSegmentPx=Ai,u.distance2d=Vi,u.drawMeasureAngleArcOnCanvas=Ub,u.drawMeasureArcOnCanvas=$b,u.drawMeasureAreaOnCanvas=Wb,u.drawMeasureSegmentOnCanvas=Hb,u.editMarkupHtmlText=Oc,u.ensureCounterClockwise=Sb,u.ensureDimResources=md,u.eventBus=Q,u.excludeLockedLayerIds=Vl,u.expandMarkupBoundsByClientRects=Xu,u.focusMeasurement=Sk,u.foregroundColorFromColorTheme=r0,u.formatMeasurementAngle=Wn,u.formatMeasurementArea=Un,u.formatMeasurementLength=tt,u.formatMeasurementValue=$n,u.formatMemoryBytes=Uw,u.geBox2dToThreeBox2d=dx,u.geBox2dToThreeBox3d=hx,u.geBox3dToGeBox2d=ax,u.geBox3dToThreeBox3d=lx,u.getActiveMarkupBag=Gn,u.getActiveMeasurementStyle=Cl,u.getBaselineStep=vd,u.getChainBaseId=Eg,u.getChainCursorId=Pg,u.getDimStyleOverride=__,u.getDrawingExportBaseName=zf,u.getEffectiveMeasurementUnits=fo,u.getLastFontLoadStats=cv,u.getLayerIsoState=jl,u.getMarkupAuthor=ny,u.getMarkupCustomTextHeightWcs=Xf,u.getMarkupFontSize=gt,u.getMarkupHistory=Ze,u.getMarkupPresenter=Vt,u.getMarkupStore=te,u.getMarkupStoreForSession=Xx,u.getMarkupTextHeightMode=Zf,u.getMeasurementGeometry=Il,u.getMeasurementHistory=Zt,u.getMeasurementSnapshot=hi,u.getMeasurementStyle=Ct,u.getMeasurementUnitOverride=sk,u.getMeasurementValueText=kk,u.getPolaraddang=pm,u.getPolarang=hm,u.getPolarmode=Wo,u.getSelectedMeasurementId=Xn,u.getSessionUndo=Yt,u.handleCommonDimKeyword=vi,u.hideObjects=gx,u.hitTestMarkupGeometry=Qa,u.hitTestMarkupShapeOutline=Ja,u.hitTestMeasurementGeometry=nl,u.inferLinearRotation=Gr,u.isAlignedDimension=T_,u.isAttachableShapeMarkup=Rn,u.isEffectiveSpatialQueryHit=ts,u.isEntityOnLockedLayer=At,u.isGripAppearanceSysVar=$p,u.isInsertableBlockName=rb,u.isLightColorTheme=a0,u.isMarkupDoublePointer=Mf,u.isMarkupHtmlTextEditing=If,u.isMarkupShapeCalloutEnabled=JA,u.isMarkupVisible=j1,u.isMeasurementVisible=xl,u.isModelSpaceDatabase=cp,u.isOpenFileProgressComplete=gv,u.isOrthoModeEnabled=lm,u.isPolarTrackingEnabled=mm,u.isRevCloudCloseToStart=Dd,u.isRotatedDimension=L_,u.isSameLayerIsoState=wp,u.isScriptQuitCommand=lv,u.layoutBackgroundColorFromRgb=l0,u.layoutBackgroundSysVar=Bl,u.listLayoutMeasurements=xk,u.listMarkupsForSession=Zx,u.markupCanvasLineWidth=at,u.markupCloudVertices=Cs,u.markupColorToCss=Bi,u.markupDrawStyleFromRecord=ay,u.markupFocusExtents=vy,u.markupGeometryBounds=qa,u.markupGeometryCenter=uo,u.markupNow=iy,u.markupRectCorners=dy,u.markupShapeOutlineFromGeometry=qu,u.markupSidecarFileName=Cw,u.measureAngleBadgeWorld=jd,u.measureAngleDeg=Rd,u.measureCentroid=ca,u.measureShoelaceArea=zd,u.measurementFocusBox=sh,u.measurementGeometryBounds=il,u.measurementLengthUnitSymbol=rl,u.measurementSidecarFileName=Dh,u.migrateStoredSettings=Yp,u.newMeasureOverlayId=ra,u.normalizeDocsBaseUrl=Wa,u.normalizeFontNameKey=$i,u.notifyMeasurementLayoutChanged=zh,u.parseCssToAcCmColor=dl,u.parseMarkupSidecar=kw,u.parseMeasurementSidecar=Mh,u.parseScriptLines=Xd,u.patchMarkupStyleWcs=ey,u.pickAttachableShapeMarkupAt=$h,u.pickMeasurementAt=Vh,u.placeAngleMeasurement=qb,u.placeArcMeasurement=Wd,u.placeAreaMeasurement=Qb,u.placeDistanceMeasurement=$d,u.placeMarkupHtml=C1,u.placeMeasurementRecord=Yb,u.placePointMeasurement=uw,u.planTextStyleFontPreload=Qv,u.pointInPolygonPx=Ku,u.pointInRectPx=$u,u.pointerEventToMarkupWorld=S1,u.preferExactAciColor=cl,u.promptAttachedCallout=As,u.promptMarkupCapsuleText=Pr,u.promptMarkupText=Xc,u.promptShapeFirstCorner=Lr,u.publishAttachedCallout=hy,u.readDimStyleFields=Ag,u.readGripAppearance=ec,u.readLayoutBackgroundColor=Mo,u.rebuildPreviewBlock=ti,u.rectanglePath=Od,u.refreshMeasurementValueLabels=Ek,u.registerMarkupCommands=Dw,u.registerMarkupPublish=Wf,u.registerMeasureCommands=pw,u.registerMeasurementPublish=Gb,u.rememberCreatedDimension=bi,u.removeMeasurement=Ak,u.removePreviewBlock=ni,u.republishMarkup=vs,u.republishMeasurement=_n,u.resetExportDownloadNamesForTests=NA,u.resetMarkupSession=Jc,u.resetMeasurementSession=vl,u.resetMeasurementStyleState=Rh,u.resetMeasurementUnitOverride=ah,u.resetMeasurementVisibility=Nh,u.resolveDrawingExtents=Df,u.resolveExportDownloadName=zc,u.resolveMarkupLineWeight=ks,u.resolvePointerSelectionAction=Sf,u.resolveSelectedEntities=Br,u.resolveSelectedIds=rd,u.resolveSelectionActionFromEvent=Mc,u.resolveUiTheme=Oe,u.restoreMeasurementGroupExtras=Tl,u.runMarkupEdit=Fe,u.runMeasurementEdit=Xe,u.sampleEntityPath=Pb,u.scaleCopyDisplacement=fr,u.selectChainDimension=Ig,u.selectMarkupGroup=_s,u.selectMeasurementGroup=En,u.serializeMeasurementStyle=Co,u.setDimStyleOverride=P_,u.setMarkupDrawColor=qf,u.setMarkupDrawFontSize=jA,u.setMarkupShapeCalloutEnabled=QA,u.setMarkupTextHeight=Jf,u.setMarkupVisible=Mw,u.setMeasurementUnitOverride=ok,u.setMeasurementVisible=Bh,u.signedArea=kb,u.simplifySketchPoints=Tb,u.splitDominantCluster=es,u.stringifyMarkupSidecar=Sw,u.stringifyMeasurementSidecar=Oh,u.strokeMarkupCloud=uy,u.strokeMeasureArcOnContext=la,u.subscribeMarkupDrawStyle=Ar,u.subscribeMeasurementSelection=Al,u.subscribeMeasurements=vk,u.sysCmdDescription=MS,u.tessellateMarkupCloud=Er,u.threeBox2dToGeBox2d=cx,u.threeBox3dToGeBox2d=ux,u.threeBox3dToGeBox3d=rx,u.toggleBlackWhiteBackgroundColor=up,u.togglePolarTracking=bS,u.translateAttachedCallout=co,u.translateMarkupGeometry=Xa,u.translateMarkupPoint=Ee,u.trySelectReviewOverlay=Yh,u.trySelectReviewOverlaysByBox=Zh,u.unionDominantCluster=mp,u.unionDominantClusterAsync=fp,u.unionSpatialQueryItems=Fo,u.uniquifySpatialItemIds=Hl,u.unisolateObjects=bx,u.userCmdDescription=OS,u.viewDiagonalLength=vb,u.withMarkupInput=YA,u.withMarkupStyleWcs=Qf,u.withMeasureInput=qP,u.writeDimStyleFields=gd,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
3529
+ } `,document.head.appendChild(s)}function _L(){var s;document.querySelector(".ml-ex-ui-toolbar, .ml-ex-ui-subtoolbar, .ml-ex-ui-dropdown")||(s=document.getElementById(Lu))==null||s.remove()}function Fx(s,e,t=0){const i=Math.max(24,e-4);if(s<=0)return{perRow:1,slotWidth:i,preferredMaxWidth:i};const n=Math.max(1,Math.floor(s/i)),o=Math.max(0,t);return o>0&&o<=n?{perRow:n,slotWidth:s/o,preferredMaxWidth:i}:{perRow:n,slotWidth:s/n,preferredMaxWidth:i}}class Iu{constructor(e){this.options=e,this.closed=!1,this.handleDocumentClick=i=>{var n,o;this.options.sticky||i.target instanceof Node&&(this.root.contains(i.target)||this.options.anchor.contains(i.target)||(o=(n=this.options).shouldKeepOpenForTarget)!=null&&o.call(n,i.target)||this.close())},Tu(),this.items=e.items,this.commandsDisabled=e.commandsDisabled,this.root=document.createElement("div"),this.syncRootClasses(),this.root.setAttribute("role","toolbar");const t=e.anchor.getAttribute("aria-label");t&&this.root.setAttribute("aria-label",t),this.renderButtons(),this.applyChromeLayout(),e.host.appendChild(this.root),this.syncPosition(),e.sticky||document.addEventListener("mousedown",this.handleDocumentClick,!0)}get sticky(){return this.options.sticky}get anchor(){return this.options.anchor}get rootElement(){return this.root}setHidden(e){this.root.hidden=e,this.root.style.visibility=e?"hidden":"",this.root.style.pointerEvents=e?"none":""}refresh(e,t){this.items=e,t!==void 0&&(this.commandsDisabled=t),this.renderButtons(),this.applyChromeLayout(),this.syncPosition()}containsTarget(e){return this.root.contains(e)}refreshLocale(){for(const e of Array.from(this.root.querySelectorAll(".ml-ex-ui-toolbar-btn"))){const t=e.dataset.toolbarItemId;if(!t)continue;const i=this.items.find(a=>a.id===t);if(!i||ke(i))continue;const n=Ki(i),o=n.label?this.options.i18n.t(n.label):n.id;e.title=o,e.setAttribute("aria-label",o);const r=e.querySelector(".ml-ex-ui-toolbar-btn-label, .ml-ex-ui-toolbar-btn-text");r&&(r.textContent=o)}}syncPosition(){if(!this.root.isConnected)return;this.root.hidden||this.applyChromeLayout();const{host:e,toolbarRoot:t,anchor:i,placement:n,chrome:o}=this.options,r=this.options.position??"front",a=o.edgeOffset,l=e.getBoundingClientRect(),c=t.getBoundingClientRect(),d=i.getBoundingClientRect(),h=this.root.offsetWidth,f=this.root.offsetHeight,y=e.clientWidth,g=e.clientHeight,b=this.options.getCrossAxisInset(),w=n==="left"||n==="right",S=o.size==="stretch";let x,_;if(n==="right"?(x=c.left-l.left-h-a,_=S?b.near:this.resolveMainAxisOffset({position:r,axis:"vertical",toolbarRect:c,hostRect:l,anchorRect:d,subSize:f})):n==="left"?(x=c.right-l.left+a,_=S?b.near:this.resolveMainAxisOffset({position:r,axis:"vertical",toolbarRect:c,hostRect:l,anchorRect:d,subSize:f})):n==="top"?(x=S?b.near:this.resolveMainAxisOffset({position:r,axis:"horizontal",toolbarRect:c,hostRect:l,anchorRect:d,subSize:h}),_=c.bottom-l.top+a):(x=S?b.near:this.resolveMainAxisOffset({position:r,axis:"horizontal",toolbarRect:c,hostRect:l,anchorRect:d,subSize:h}),_=c.top-l.top-f-a),w){const C=b.near,T=Math.max(C,g-f-b.far);_=Math.min(Math.max(C,_),T),S&&(x=b.near)}else{const C=b.near,T=Math.max(C,y-h-b.far);if(x=S?b.near:Math.min(Math.max(C,x),T),n==="bottom"){const L=c.top-l.top-f-a,N=b.near;_=Math.min(L,Math.max(N,_))}else{const L=b.near,N=Math.max(L,g-f-b.far);_=Math.min(Math.max(L,_),N)}}this.root.style.left=`${x}px`,this.root.style.top=`${_}px`}resolveMainAxisOffset(e){const{position:t,axis:i,toolbarRect:n,hostRect:o,anchorRect:r,subSize:a}=e;if(t==="auto")return i==="horizontal"?r.left-o.left:r.top-o.top;if(t==="center")return i==="horizontal"?n.left-o.left+(n.width-a)/2:n.top-o.top+(n.height-a)/2;const l=this.queryVisibleButtons(this.options.toolbarRoot),c=this.queryVisibleButtons(this.root),d=t==="front"?l[0]:l[l.length-1],h=t==="front"?c[0]:c[c.length-1];if(!d||!h)return t==="front"?i==="horizontal"?n.left-o.left:n.top-o.top:i==="horizontal"?n.right-o.left-a:n.bottom-o.top-a;const f=d.getBoundingClientRect(),y=this.root.getBoundingClientRect(),g=h.getBoundingClientRect();if(i==="horizontal"){if(t==="front"){const S=g.left-y.left;return f.left-o.left-S}const w=g.left-y.left;return f.right-o.left-w-g.width}if(t==="front"){const w=g.top-y.top;return f.top-o.top-w}const b=g.top-y.top;return f.bottom-o.top-b-g.height}queryVisibleButtons(e){return Array.from(e.querySelectorAll(".ml-ex-ui-toolbar-btn:not([hidden])"))}close(){var e,t;this.closed||(this.closed=!0,document.removeEventListener("mousedown",this.handleDocumentClick,!0),this.root.remove(),(t=(e=this.options).onClose)==null||t.call(e))}syncRootClasses(){const{chrome:e,placement:t}=this.options,i=t==="left"||t==="right",n=["ml-ex-ui-subtoolbar",`is-${t}`,i?"is-vertical":"is-horizontal"];e.showLabels&&n.push("has-labels"),e.size==="stretch"&&n.push("is-stretch"),e.overflow==="wrap"&&n.push("is-overflow-wrap"),e.showBorder||n.push("no-border"),e.showButtonBorder&&n.push("show-button-border"),e.showChildrenIndicator&&n.push("show-children-indicator"),this.root.className=n.join(" ")}applyChromeLayout(){this.applyStretchSize(),this.applyOverflowLayout(),this.applyWrapPackLayout(),this.applyLabeledButtonMaxWidth()}applyLabeledButtonMaxWidth(){const{chrome:e}=this.options;if(!e.showLabels||this.root.classList.contains("is-wrap-pack")){if(!e.showLabels)for(const t of this.queryVisibleButtons(this.root))t.style.removeProperty("max-width");return}for(const t of this.queryVisibleButtons(this.root)){const i=t.offsetHeight;i<=0||(t.style.maxWidth=`${Math.max(24,i-4)}px`)}}applyWrapPackLayout(){const{chrome:e,placement:t,host:i}=this.options,n=t==="top"||t==="bottom",o=this.queryVisibleButtons(this.root),r=()=>{for(const b of o)b.style.removeProperty("flex"),b.style.removeProperty("width"),b.style.removeProperty("max-width"),delete b.dataset.wrapPackRow};if(!n||e.size!=="stretch"||e.overflow!=="wrap"){this.root.classList.remove("is-wrap-pack"),r();return}if(o.length===0)return;const a=this.options.getCrossAxisInset(),l=Math.max(0,i.clientWidth-a.near-a.far);l>0&&this.root.style.width!==`${l}px`&&(this.root.style.width=`${l}px`);const c=this.root.clientWidth>0?this.root.clientWidth:l;if(c<=0){this.root.classList.remove("is-wrap-pack"),r();return}for(const b of o)b.style.flex="0 0 auto",b.style.width="auto",b.style.removeProperty("max-width");const d=Math.max(...o.map(b=>b.offsetHeight),1),{perRow:h,slotWidth:f}=Fx(c,d,o.length);this.root.classList.add("is-wrap-pack");const y=o.length<=h,g=y?o.length:Math.floor(o.length/h)*h;o.forEach((b,w)=>{b.style.flex=`0 0 ${f}px`,b.style.width=`${f}px`,b.style.maxWidth=`${f}px`,b.dataset.wrapPackRow=y||w<g?"full":"last"})}applyStretchSize(){const{host:e,placement:t,chrome:i}=this.options;if(i.size!=="stretch"){this.root.style.removeProperty("width"),this.root.style.removeProperty("height");return}const n=this.options.getCrossAxisInset();if(t==="left"||t==="right"){const r=Math.max(0,e.clientHeight-n.near-n.far);this.root.style.height=`${r}px`,this.root.style.removeProperty("width")}else{const r=Math.max(0,e.clientWidth-n.near-n.far);this.root.style.width=`${r}px`,this.root.style.removeProperty("height")}}applyOverflowLayout(){const{host:e,placement:t,chrome:i}=this.options;if(i.overflow!=="wrap"){i.size!=="stretch"&&(this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height"));return}const n=this.options.getCrossAxisInset();if(t==="left"||t==="right"){const r=Math.max(0,e.clientHeight-n.near-n.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${r}px`),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width")}else{const r=Math.max(0,e.clientWidth-n.near-n.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${r}px`),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height")}}renderButtons(){this.root.replaceChildren();const{chrome:e}=this.options;this.items.forEach(t=>{var o;if(ke(t)){if(!e.showSeparators)return;const r=document.createElement("div");r.className="ml-ex-ui-toolbar-separator",r.setAttribute("role","separator"),t.id&&(r.dataset.toolbarItemId=t.id),this.root.appendChild(r);return}const i=Ki(t),n=document.createElement("button");if(n.type="button",n.className="ml-ex-ui-toolbar-btn",n.title=i.label?this.options.i18n.t(i.label):i.id,n.setAttribute("aria-label",n.title),n.dataset.toolbarItemId=i.id,i.toggle){const r=i.toggle.getValue();n.setAttribute("aria-pressed",String(r)),n.classList.toggle("is-toggled",r)}if(((o=i.children)!=null&&o.length||Ot(t))&&(n.classList.add("has-children"),n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded","false")),i.icon)n.appendChild(ft(i.icon));else if(i.label&&!e.showLabels){const r=document.createElement("span");r.className="ml-ex-ui-toolbar-btn-text",r.textContent=this.options.i18n.t(i.label),r.style.fontSize="11px",r.style.padding="0 4px",n.appendChild(r)}if(e.showLabels&&i.label){const r=document.createElement("span");r.className="ml-ex-ui-toolbar-btn-label",r.textContent=this.options.i18n.t(i.label),n.appendChild(r)}n.disabled=Pu(i)&&this.commandsDisabled||Eu(i),n.addEventListener("click",r=>{var l;if(r.stopPropagation(),n.disabled)return;this.options.onSelect(i,n);const a=!!((l=i.children)!=null&&l.length)||Ot(t);!this.options.sticky&&!a&&this.close()}),this.root.appendChild(n)})}}const Va=class Va{constructor(e){this.options=e,this.isDisabled=!1,this.openMode=U.Read,this.hasDocument=!1,this.selectedChildByParent=new Map,this.visible=!0,this.overflowItems=[],this.overflowMenuActive=!1,this.renderedEntries=[],Tu(),this.mountHost=e.host,this.themeHost=e.themeHost??e.host,this.edgeOffset=e.edgeOffset??8,this.sideOffset=e.sideOffset??0,this.showBorder=e.showBorder??!0,this.showButtonBorder=e.showButtonBorder??!1,this.showSeparators=e.showSeparators??!0,this.showChildrenIndicator=e.showChildrenIndicator??!0,this.inCanvasParent=e.inCanvasParent===!0,this.items=e.items,this.collapsed=!!e.collapsible&&!!e.defaultCollapsed,e.overflow===void 0&&(e.overflow="menu"),this.seedSelectedChildren(e.items),this.ensureMountHostLayout(),this.root=document.createElement("div"),this.syncRootClasses(),this.root.setAttribute("role","toolbar"),this.overflowButton=document.createElement("button"),this.overflowButton.type="button",this.overflowButton.className="ml-ex-ui-toolbar-btn ml-ex-ui-toolbar-overflow-btn",this.overflowButton.dataset.toolbarItemId="toolbar-overflow",this.overflowButton.hidden=!0,this.overflowButton.appendChild(ft(yc)),this.overflowButton.addEventListener("click",t=>{t.stopPropagation(),!this.overflowButton.hidden&&this.toggleOverflowMenu()}),this.mountHost.appendChild(this.root),this.ensureInParentLayout(),this.setupResizeObserver(),e.docState?this.setDocState(e.docState):this.renderButtons()}setDocState(e){e.hasDocument!==void 0&&(this.hasDocument=e.hasDocument),e.isOpening!==void 0&&(this.isDisabled=e.isOpening,e.isOpening&&this.closeChildrenUi()),e.openMode!==void 0&&(this.openMode=e.openMode),this.syncRootClasses(),this.renderButtons()}updateItems(e){this.items=e,this.seedSelectedChildren(e),this.renderButtons()}applyViewOptions(e){e.placement!==void 0&&(this.options.placement=e.placement),e.edgeOffset!==void 0&&(this.edgeOffset=Math.max(0,e.edgeOffset)),e.sideOffset!==void 0&&(this.sideOffset=Math.max(0,e.sideOffset)),e.collapsible!==void 0&&(this.options.collapsible=e.collapsible,e.collapsible||(this.collapsed=!1)),e.defaultCollapsed!==void 0&&(this.collapsed=!!this.options.collapsible&&!!e.defaultCollapsed),e.showLabels!==void 0&&(this.options.showLabels=e.showLabels),e.size!==void 0&&(this.options.size=e.size),e.overflow!==void 0&&(this.options.overflow=e.overflow),e.showBorder!==void 0&&(this.showBorder=e.showBorder),e.showButtonBorder!==void 0&&(this.showButtonBorder=e.showButtonBorder),e.showSeparators!==void 0&&(this.showSeparators=e.showSeparators),e.showChildrenIndicator!==void 0&&(this.showChildrenIndicator=e.showChildrenIndicator,this.options.showChildrenIndicator=e.showChildrenIndicator),e.subToolbar!==void 0&&(this.options.subToolbar=e.subToolbar),e.inCanvasParent!==void 0&&(this.inCanvasParent=e.inCanvasParent,this.options.inCanvasParent=e.inCanvasParent),e.items!==void 0&&(this.items=e.items,this.seedSelectedChildren(e.items)),this.syncRootClasses(),this.ensureInParentLayout(),this.renderButtons(),this.scheduleSyncPosition()}refresh(){this.renderButtons()}refreshLocale(){var e,t;this.syncOverflowButtonLabels(),this.syncCollapseToggleButton();for(const{item:i,element:n,isSeparator:o}of this.renderedEntries){if(o)continue;const r=n,a=On(i,this.selectedChildByParent.get(i.id)),l=a.label?this.options.i18n.t(a.label):a.id;r.title=l,r.setAttribute("aria-label",l);const c=r.querySelector(".ml-ex-ui-toolbar-btn-label, .ml-ex-ui-toolbar-btn-text");c&&(c.textContent=l)}(e=this.openSubToolbar)==null||e.refreshLocale(),(t=this.openNestedSubToolbar)==null||t.refreshLocale()}get replaceOnNested(){return this.resolveSubToolbarChrome().replaceOnNested===!0}dismissOpenChildren(){this.closeChildrenUi()}notifyExclusiveOpen(){var e,t;this.replaceOnNested&&((t=(e=this.options).onExclusiveOpen)==null||t.call(e))}setPlacement(e){this.options.placement!==e&&(this.options.placement=e,this.selectedChildByParent.set("toolbar-placement",`placement-${e}`),this.syncRootClasses(),this.ensureInParentLayout(),this.renderButtons())}getEdgeOffset(){return this.edgeOffset}setEdgeOffset(e){this.edgeOffset=Math.max(0,e),this.scheduleSyncPosition()}getSideOffset(){return this.sideOffset}setSideOffset(e){this.sideOffset=Math.max(0,e),this.scheduleSyncPosition()}resolveSubToolbarChrome(){return Ex({edgeOffset:this.edgeOffset,sideOffset:this.sideOffset,showLabels:this.options.showLabels,size:this.options.size,overflow:this.options.overflow,showBorder:this.showBorder,showButtonBorder:this.showButtonBorder,showSeparators:this.showSeparators,showChildrenIndicator:this.showChildrenIndicator},this.options.subToolbar)}getCrossAxisInset(){return this.getOrientationClass()==="horizontal"?this.options.placement==="top"?{near:this.edgeOffset,far:this.sideOffset}:{near:this.sideOffset,far:this.edgeOffset}:this.options.placement==="left"?{near:this.sideOffset,far:this.edgeOffset}:{near:this.edgeOffset,far:this.sideOffset}}reparentTo(e){var t;if(this.mountHost===e){!this.root.isConnected&&e.isConnected&&e.appendChild(this.root),this.syncInParentLayout();return}(t=this.resizeObserver)==null||t.disconnect(),this.releaseInParentLayout({keepRoot:!0}),this.root.remove(),this.mountHost=e,this.ensureMountHostLayout(),this.mountHost.appendChild(this.root),this.ensureInParentLayout(),this.setupResizeObserver(),this.scheduleSyncPosition()}syncInParentLayout(){this.ensureInParentLayout(),this.setupResizeObserver(),this.scheduleSyncPosition()}setSelectedChild(e,t){this.selectedChildByParent.set(e,t)}get placement(){return this.options.placement}get isCollapsed(){return this.collapsed}get isVisible(){return this.visible}isRootConnected(){return this.root.isConnected}setVisible(e){var t,i;this.visible!==e&&(this.visible=e,this.root.hidden=!e,e||(this.closeChildrenUi(),(i=(t=this.options).onCollapse)==null||i.call(t)))}getLayerButtonAnchor(){return this.options.collapsible&&this.collapsed&&this.setCollapsed(!1),this.root.querySelector('[data-toolbar-item-id="layer"]')??void 0}setCollapsed(e){var t,i;!this.options.collapsible||this.collapsed===e||(this.collapsed=e,e&&(this.closeChildrenUi(),(i=(t=this.options).onCollapse)==null||i.call(t)),this.syncRootClasses(),this.syncCollapseToggleButton(),this.scheduleSyncPosition())}destroy(){var e;this.layoutFrame!==void 0&&(cancelAnimationFrame(this.layoutFrame),this.layoutFrame=void 0),(e=this.resizeObserver)==null||e.disconnect(),this.resizeObserver=void 0,this.closeChildrenUi(),this.releaseInParentLayout({keepRoot:!1}),this.root.remove()}isStretchSize(){return this.options.size==="stretch"}getOrientationClass(){return this.options.placement==="left"||this.options.placement==="right"?"vertical":"horizontal"}syncRootClasses(){const e=["ml-ex-ui-toolbar",`is-${this.getOrientationClass()}`,`is-${this.options.placement}`];this.collapsed&&e.push("is-collapsed"),this.isDisabled&&e.push("is-disabled"),this.options.showLabels&&e.push("has-labels"),this.options.size==="stretch"&&e.push("is-stretch"),this.inCanvasParent&&e.push("is-in-parent"),this.options.overflow==="wrap"&&e.push("is-overflow-wrap"),this.options.overflow==="menu"&&e.push("is-overflow-menu"),this.showBorder||e.push("no-border"),this.showButtonBorder&&e.push("show-button-border"),this.showChildrenIndicator&&e.push("show-children-indicator"),this.root.className=e.join(" ")}populateButtonContent(e,t){if(t.icon)e.appendChild(ft(t.icon));else if(t.label&&!this.options.showLabels){const i=document.createElement("span");i.className="ml-ex-ui-toolbar-btn-text",i.textContent=this.options.i18n.t(t.label),i.style.fontSize="11px",i.style.padding="0 4px",e.appendChild(i)}if(this.options.showLabels&&t.label){const i=document.createElement("span");i.className="ml-ex-ui-toolbar-btn-label",i.textContent=this.options.i18n.t(t.label),e.appendChild(i)}}toggleCollapsed(){this.setCollapsed(!this.collapsed)}getCollapseToggleIcon(){return this.options.placement==="top"||this.options.placement==="bottom"?this.collapsed?mc:fc:this.collapsed?Bm:Nm}syncCollapseToggleButton(e){const t=e??this.root.querySelector('[data-toolbar-item-id="toolbar-collapse"]');if(!t)return;const i=this.collapsed?"toolbar.expand":"toolbar.collapse";t.replaceChildren(ft(this.getCollapseToggleIcon())),t.title=this.options.i18n.t(i),t.setAttribute("aria-label",t.title),t.setAttribute("aria-expanded",String(!this.collapsed))}appendCollapseToggle(){if(!this.options.collapsible)return;if(this.showSeparators){const t=document.createElement("div");t.className="ml-ex-ui-toolbar-separator",t.setAttribute("role","separator"),this.root.appendChild(t)}const e=document.createElement("button");e.type="button",e.className="ml-ex-ui-toolbar-btn ml-ex-ui-toolbar-collapse-btn",e.dataset.toolbarItemId="toolbar-collapse",this.syncCollapseToggleButton(e),e.addEventListener("click",t=>{t.stopPropagation(),this.toggleCollapsed()}),this.root.appendChild(e)}renderButtons(){const e=this.stickyParentId;this.closeChildrenUi(),this.root.replaceChildren(),this.renderedEntries=[],this.overflowItems=[],Ma(this.items,this.openMode).forEach(i=>{var a;if(ke(i)){if(!this.showSeparators)return;const l=document.createElement("div");l.className="ml-ex-ui-toolbar-separator",l.setAttribute("role","separator"),i.id&&(l.dataset.toolbarItemId=i.id),this.root.appendChild(l),this.renderedEntries.push({item:i,element:l,isSeparator:!0});return}const n=On(i,this.selectedChildByParent.get(i.id)),o=document.createElement("button");o.type="button",o.className="ml-ex-ui-toolbar-btn",o.title=n.label?this.options.i18n.t(n.label):n.id,o.setAttribute("aria-label",o.title),o.dataset.toolbarItemId=n.id,((a=n.children)!=null&&a.length||Ot(i))&&(o.classList.add("has-children"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false")),this.populateButtonContent(o,n);const r=Pu(n)&&(this.isDisabled||!this.hasDocument)||Eu(n);o.disabled=r,o.addEventListener("click",l=>{l.stopPropagation(),!o.disabled&&this.activateToolbarItem(i,o)}),this.root.appendChild(o),this.renderedEntries.push({item:i,element:o,isSeparator:!1})}),this.options.overflow==="menu"&&(this.syncOverflowButtonLabels(),this.root.appendChild(this.overflowButton)),this.appendCollapseToggle(),this.applyOverflowLayout(),this.scheduleSyncPosition(),e&&!this.collapsed&&this.visible&&this.openStickyChildrenByParentId(e)}activateToolbarItem(e,t){var n;const i=On(e,this.selectedChildByParent.get(e.id));if((n=i.children)!=null&&n.length||Ot(e)){const o=this.resolveStripChildItems(i.children??[]);if(o.length===0)return;if(this.openParentId===e.id){this.closeChildrenUi();return}this.openChildrenUi(e,t,o);return}i.anchorAction?i.anchorAction(t):i.action?i.action():i.command&&this.options.onCommand(i.command),e.toggle&&window.setTimeout(()=>this.renderButtons(),0)}syncOverflowButtonLabels(){const e=this.options.i18n.t("toolbar.moreOverflow");this.overflowButton.title=e,this.overflowButton.setAttribute("aria-label",e)}applyOverflowLayout(){if(this.collapsed||!this.root.isConnected){this.overflowButton.hidden=!0,this.overflowMenuActive=!1;return}if(this.options.overflow==="wrap"){this.applyOverflowWrapLayout();return}this.options.overflow==="menu"&&this.applyOverflowMenuLayout()}applyOverflowWrapLayout(){this.overflowButton.hidden=!0,this.renderedEntries.forEach(o=>{o.element.hidden=!1});const e=this.inCanvasParent?this.sideOffset:this.edgeOffset,t=this.getCrossAxisInset(),i=this.getOrientationClass()==="horizontal",n=this.getLayoutHost();if(i){const o=Math.max(0,n.clientWidth-e*2);if(this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${o}px`),this.inCanvasParent)this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");else{const r=Math.max(0,n.clientHeight-t.near-t.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${r}px`)}}else{if(this.inCanvasParent)this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width");else{const r=Math.max(0,n.clientWidth-t.near-t.far);this.root.style.setProperty("--ml-ex-ui-toolbar-max-width",`${r}px`)}const o=Math.max(0,n.clientHeight-e*2);this.root.style.setProperty("--ml-ex-ui-toolbar-max-height",`${o}px`)}}getEntryAxisSize(e,t){const i=t?e.offsetWidth:e.offsetHeight;return i>0?i:e.classList.contains("ml-ex-ui-toolbar-separator")?9:36}applyOverflowMenuLayout(){this.closeOverflowMenu(),this.overflowItems=[],this.overflowMenuActive=!1,this.overflowButton.hidden=!0,this.renderedEntries.forEach(o=>{o.element.hidden=!1});const e=this.getOrientationClass()==="horizontal",t=this.getOverflowHostLimit(e),i=this.getToolbarOverflowMeasureSize(e);if(t<=0||this.renderedEntries.length===0){this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");return}if(i<=t){this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height");return}this.overflowButton.hidden=!1;let n=this.renderedEntries.length;for(;;){for(let o=0;o<this.renderedEntries.length;o++)this.renderedEntries[o].element.hidden=o>=n;if(this.getToolbarOverflowMeasureSize(e)<=t||n===0)break;n-=1}if(n===0&&this.renderedEntries.length>0){n=1;for(let o=0;o<this.renderedEntries.length;o++)this.renderedEntries[o].element.hidden=o>=n}for(let o=n;o<this.renderedEntries.length;o++){const r=this.renderedEntries[o];r.isSeparator||this.overflowItems.push(r.item)}this.overflowButton.hidden=this.overflowItems.length===0,this.overflowMenuActive=!this.overflowButton.hidden,this.root.style.removeProperty("--ml-ex-ui-toolbar-max-width"),this.root.style.removeProperty("--ml-ex-ui-toolbar-max-height")}flushToolbarAxisMeasure(){this.root.offsetHeight,this.root.offsetWidth}getToolbarOverflowMeasureSize(e){const t=this.isStretchSize(),i=this.root.style.width,n=this.root.style.height;t&&(this.root.classList.remove("is-stretch"),this.root.style.width=e?"max-content":i,this.root.style.height=e?n:"max-content"),this.flushToolbarAxisMeasure();const o=getComputedStyle(this.root),r=Number.parseFloat(e?o.columnGap||o.gap:o.rowGap||o.gap)||4,a=e?Number.parseFloat(o.paddingLeft)+Number.parseFloat(o.paddingRight):Number.parseFloat(o.paddingTop)+Number.parseFloat(o.paddingBottom),l=e?Number.parseFloat(o.borderLeftWidth)+Number.parseFloat(o.borderRightWidth):Number.parseFloat(o.borderTopWidth)+Number.parseFloat(o.borderBottomWidth);let c=(Number.isFinite(a)?a:0)+(Number.isFinite(l)?l:0),d=0;for(const h of Array.from(this.root.children))h instanceof HTMLElement&&!h.hidden&&(d>0&&(c+=r),c+=this.getEntryAxisSize(h,e),d+=1);return t&&(this.root.classList.add("is-stretch"),this.root.style.width=i,this.root.style.height=n,this.flushToolbarAxisMeasure()),c}getToolbarAxisSize(e){this.flushToolbarAxisMeasure();const t=e?this.root.offsetWidth:this.root.offsetHeight;return t>0?t:this.getToolbarOverflowMeasureSize(e)}getOverflowHostLimit(e){const t=this.inCanvasParent?this.sideOffset:this.edgeOffset,i=this.getLayoutHost(),n=e?i.clientWidth:i.clientHeight;return Math.max(0,n-t*2)}toggleOverflowMenu(){if(this.overflowDropdown){this.closeOverflowMenu();return}if(this.overflowItems.length===0)return;this.notifyExclusiveOpen(),this.closeChildrenUi();const e=this.overflowItems.map(t=>On(t,this.selectedChildByParent.get(t.id))).filter(t=>!ke(t));this.overflowDropdown=new Oa(this.options.i18n,e,this.overflowButton,this.themeHost),this.overflowDropdown.setOnSelect(t=>{this.activateToolbarItem(t,this.overflowButton),this.closeOverflowMenu()}),this.overflowDropdown.setOnClose(()=>{this.overflowDropdown=void 0})}closeOverflowMenu(){var e;(e=this.overflowDropdown)==null||e.close(),this.overflowDropdown=void 0}ensureMountHostLayout(){getComputedStyle(this.mountHost).position==="static"&&(this.mountHost.style.position="relative"),this.mountHost.classList.add("ml-ex-ui-toolbar-host")}getLayoutHost(){return this.inCanvasParent?this.inParentHost??this.mountHost:this.mountHost}getOverlayHost(){return this.options.overlayHost?this.options.overlayHost:this.inCanvasParent&&this.toolbarMain?this.toolbarMain:this.mountHost}ensureInParentLayout(){if(!this.inCanvasParent){this.releaseInParentLayout({keepRoot:!0});return}const e=this.resolveInParentWrapRoot();this.applyInParentHostClasses(e),this.ensureToolbarMainWrapper(e),this.placeToolbarInWrapRoot(e)}resolveInParentWrapRoot(){const e=this.mountHost.querySelector(":scope > .ml-ex-ui-dock-main");return e instanceof HTMLElement?e:this.mountHost}applyInParentHostClasses(e){this.inParentHost&&this.inParentHost!==e&&this.clearInParentHostClasses(this.inParentHost),this.inParentHost=e,e.classList.add("ml-ex-ui-toolbar-in-parent"),e.classList.remove("ml-ex-ui-toolbar-in-parent-top","ml-ex-ui-toolbar-in-parent-bottom","ml-ex-ui-toolbar-in-parent-left","ml-ex-ui-toolbar-in-parent-right"),e.classList.add(`ml-ex-ui-toolbar-in-parent-${this.options.placement}`)}clearInParentHostClasses(e){e&&e.classList.remove(...Va.IN_PARENT_HOST_CLASSES)}shouldSkipInParentMove(e){return e instanceof HTMLElement?e===this.root||e.classList.contains("ml-ex-ui-toolbar")||e.classList.contains("ml-ex-ui-toolbar-main")||e.classList.contains("ml-ex-ui-dock-panel")||e.classList.contains("ml-ex-ui-subtoolbar")||e.classList.contains("ml-ex-ui-dropdown"):!1}ensureToolbarMainWrapper(e){var o;if(((o=this.toolbarMain)==null?void 0:o.parentElement)===e)return;const t=e.querySelector(":scope > .ml-ex-ui-toolbar-main");if(t instanceof HTMLElement){this.toolbarMain=t;return}const i=[];Array.from(e.childNodes).forEach(r=>{this.shouldSkipInParentMove(r)||i.push(r)});const n=document.createElement("div");n.className="ml-ex-ui-toolbar-main",i.forEach(r=>n.appendChild(r)),e.appendChild(n),this.toolbarMain=n}placeToolbarInWrapRoot(e){const t=this.options.placement;if(t==="top"||t==="left"){e.insertBefore(this.root,e.firstChild);return}e.appendChild(this.root)}releaseInParentLayout(e){const t=!!(this.inParentHost||this.toolbarMain);this.clearInParentHostClasses(this.inParentHost),this.inParentHost=void 0,this.releaseToolbarMainWrapper(),this.clearInParentOffsetStyles(),t&&e.keepRoot&&this.root.isConnected&&this.root.parentElement!==this.mountHost&&this.mountHost.isConnected&&this.mountHost.appendChild(this.root)}releaseToolbarMainWrapper(){var t;if(!((t=this.toolbarMain)!=null&&t.isConnected)){this.toolbarMain=void 0;return}const e=this.toolbarMain.parentElement;if(e)for(;this.toolbarMain.firstChild;)e.insertBefore(this.toolbarMain.firstChild,this.toolbarMain);this.toolbarMain.remove(),this.toolbarMain=void 0}clearInParentOffsetStyles(){this.root.style.marginTop="",this.root.style.marginRight="",this.root.style.marginBottom="",this.root.style.marginLeft=""}setupResizeObserver(){var t;(t=this.resizeObserver)==null||t.disconnect(),this.resizeObserver=new ResizeObserver(()=>{this.scheduleSyncPosition()}),this.resizeObserver.observe(this.mountHost);const e=this.getLayoutHost();e!==this.mountHost&&this.resizeObserver.observe(e),this.toolbarMain&&this.toolbarMain!==e&&this.resizeObserver.observe(this.toolbarMain)}scheduleSyncPosition(){this.layoutFrame===void 0&&(this.layoutFrame=requestAnimationFrame(()=>{var e,t;if(this.layoutFrame=void 0,this.applyOverflowLayout(),this.syncPosition(),this.overflowMenuActive){const i=this.getOrientationClass()==="horizontal",n=this.getOverflowHostLimit(i);this.getToolbarOverflowMeasureSize(i)>n&&(this.applyOverflowMenuLayout(),this.syncPosition())}(e=this.openSubToolbar)==null||e.syncPosition(),(t=this.openNestedSubToolbar)==null||t.syncPosition()}))}syncPosition(){if(!this.root.isConnected||this.root.hidden)return;if(this.inCanvasParent){this.applyInParentPosition();return}this.clearInParentOffsetStyles();const e=this.edgeOffset,t=this.mountHost.clientWidth,i=this.mountHost.clientHeight;if(t<=0||i<=0)return;this.root.style.top="",this.root.style.bottom="",this.root.style.left="",this.root.style.right="",this.root.style.transform="",this.root.style.width="",this.root.style.height="",this.root.style.maxWidth="",this.root.style.maxHeight="";const n=this.getToolbarAxisSize(!0),o=this.getToolbarAxisSize(!1),r=this.options.placement,a=this.isStretchSize();if(r==="top"||r==="bottom"){if(a)this.root.style.left="0",this.root.style.right="0",this.root.style.width=`${t}px`,this.root.style.maxWidth=`${t}px`;else{const l=Math.max(e,t-n-e),c=(t-n)/2,d=Math.min(l,Math.max(e,c));this.root.style.left=`${d}px`,this.root.style.maxWidth=`${Math.max(0,t-e*2)}px`}r==="top"?this.root.style.top=`${e}px`:this.root.style.bottom=`${e}px`;return}if(a){const l=Math.max(0,i-e*2);this.root.style.height=`${l}px`,this.root.style.top=`${e}px`}else{const l=e,c=i-o-e,d=(i-o)/2,h=c>=l?Math.min(c,Math.max(l,d)):c;this.root.style.top=`${h}px`}r==="left"?this.root.style.left=`${e}px`:this.root.style.right=`${e}px`}applyInParentPosition(){this.root.style.top="",this.root.style.bottom="",this.root.style.left="",this.root.style.right="",this.root.style.transform="",this.root.style.width="",this.root.style.height="",this.root.style.maxWidth="",this.root.style.maxHeight="";const e=this.edgeOffset,t=this.sideOffset,i=this.options.placement;i==="top"||i==="bottom"?(this.root.style.marginTop=i==="bottom"?`${e}px`:"0",this.root.style.marginBottom=i==="top"?`${e}px`:"0",this.root.style.marginLeft=`${t}px`,this.root.style.marginRight=`${t}px`):(this.root.style.marginLeft=i==="right"?`${e}px`:"0",this.root.style.marginRight=i==="left"?`${e}px`:"0",this.root.style.marginTop=`${t}px`,this.root.style.marginBottom=`${t}px`)}seedSelectedChildren(e){var t;for(const i of e)ke(i)||(i.childIcon==="selected"&&i.selectedChildId&&this.selectedChildByParent.set(i.id,i.selectedChildId),!Ot(i)&&((t=i.children)!=null&&t.length)&&this.seedSelectedChildren(i.children))}resolveStripChildItems(e){return Ma(e,this.openMode).map(t=>On(t,this.selectedChildByParent.get(t.id)))}closeChildrenUi(){var e,t;this.closeOverflowMenu(),this.closeNestedSubToolbar(),(e=this.openDropdown)==null||e.close(),this.openDropdown=void 0,(t=this.openSubToolbar)==null||t.close(),this.openSubToolbar=void 0,this.clearParentOpenState(),this.openParentId=void 0,this.stickyParentId=void 0}clearParentOpenState(){this.openParentButton&&(this.openParentButton.classList.remove("is-open"),this.openParentButton.setAttribute("aria-expanded","false"),this.openParentButton instanceof HTMLElement&&this.openParentButton.blur(),this.openParentButton=void 0)}markParentOpen(e){this.clearParentOpenState(),e.classList.add("is-open"),e.setAttribute("aria-expanded","true"),this.openParentButton=e}openChildrenUi(e,t,i){var r;this.notifyExclusiveOpen(),this.closeChildrenUi();const n=Ia(e);if(this.openParentId=e.id,this.markParentOpen(t),Au(n)){const a=n==="sticky-toolbar";this.stickyParentId=a?e.id:void 0;const l=new Iu({i18n:this.options.i18n,items:i,anchor:t,toolbarRoot:this.root,host:this.getOverlayHost(),placement:this.options.placement,sticky:a,chrome:this.resolveSubToolbarChrome(),position:(r=this.options.subToolbar)==null?void 0:r.position,getCrossAxisInset:()=>this.getCrossAxisInset(),commandsDisabled:this.isDisabled||!this.hasDocument,onSelect:(c,d)=>this.handleSubToolbarSelect(e,c,d,a),onClose:()=>{this.openSubToolbar===l&&(this.closeNestedSubToolbar(),this.openSubToolbar=void 0,this.clearParentOpenState(),this.openParentId=void 0,this.stickyParentId=void 0)},shouldKeepOpenForTarget:c=>{var d;return((d=this.openNestedSubToolbar)==null?void 0:d.containsTarget(c))??!1}});this.openSubToolbar=l;return}const o=new Oa(this.options.i18n,i,t,this.themeHost);o.setOnSelect(a=>{this.activateChild(e,a,!1)}),o.setOnClose(()=>{this.openDropdown===o&&(this.openDropdown=void 0,this.clearParentOpenState(),this.openParentId=void 0)}),this.openDropdown=o}openStickyChildrenByParentId(e){var o;const t=this.items.find(r=>ke(r)?!1:r.id===e);if(!((o=t==null?void 0:t.children)!=null&&o.length)||Ia(t)!=="sticky-toolbar")return;const i=this.root.querySelector(`[data-toolbar-item-id="${e}"]`);if(!i)return;const n=this.resolveStripChildItems(t.children);n.length!==0&&this.openChildrenUi(t,i,n)}handleSubToolbarSelect(e,t,i,n){var r;if(ke(t))return;const o=Ki(t);if((r=o.children)!=null&&r.length||Ot(o)){const a=this.resolveStripChildItems(o.children??[]);if(a.length===0)return;this.openNestedSubToolbarUi(o,i,a,e,n);return}this.activateChild(e,t,n),n||this.closeChildrenUi()}openNestedSubToolbarUi(e,t,i,n,o){var h,f;if(this.openNestedSubToolbar&&this.openNestedSubToolbar.anchor===t){this.closeNestedSubToolbar();return}this.closeNestedSubToolbar();const r=Ia(e),a=this.resolveSubToolbarChrome(),l=a.replaceOnNested;if(!Au(r)){const y=new Oa(this.options.i18n,i,t,this.themeHost);y.setOnSelect(g=>{var b;this.activateChild(e,g,!1),y.close(),o?(b=this.openSubToolbar)==null||b.refresh(this.resolveStripChildItems(n.children??[]),this.isDisabled||!this.hasDocument):this.closeChildrenUi()}),y.setOnClose(()=>{});return}l&&((h=this.openSubToolbar)==null||h.setHidden(!0));const c=r==="sticky-toolbar",d=new Iu({i18n:this.options.i18n,items:i,anchor:t,toolbarRoot:l||!this.openSubToolbar?this.root:this.openSubToolbar.rootElement,host:this.getOverlayHost(),placement:this.options.placement,sticky:c,chrome:a,position:(f=this.options.subToolbar)==null?void 0:f.position,getCrossAxisInset:()=>this.getCrossAxisInset(),commandsDisabled:this.isDisabled||!this.hasDocument,onSelect:(y,g)=>this.handleSubToolbarSelect(e,y,g,c),onClose:()=>{var y,g;this.openNestedSubToolbar===d&&(this.openNestedSubToolbar=void 0,l&&((y=this.openSubToolbar)==null||y.setHidden(!1),(g=this.openSubToolbar)==null||g.syncPosition()))}});this.openNestedSubToolbar=d}closeNestedSubToolbar(){var t,i;const e=this.resolveSubToolbarChrome().replaceOnNested===!0;(t=this.openNestedSubToolbar)==null||t.close(),this.openNestedSubToolbar=void 0,e&&((i=this.openSubToolbar)==null||i.setHidden(!1))}activateChild(e,t,i){var r;if(ke(t))return;const n=Ki(t);if(e.childIcon==="selected"&&this.selectedChildByParent.set(e.id,n.id),n.action?n.action():n.command&&this.options.onCommand(n.command),!ke(t)&&n.id.startsWith("locale-")&&this.refreshLocale(),t.toggle&&i&&this.openSubToolbar){window.setTimeout(()=>{this.openSubToolbar&&this.openSubToolbar.refresh(this.resolveStripChildItems(e.children??[]),this.isDisabled||!this.hasDocument)},0);return}if(e.childIcon==="selected"&&this.openSubToolbar&&this.openParentId&&e.id!==this.openParentId){const a=this.items.find(l=>ke(l)?!1:l.id===this.openParentId);(r=a==null?void 0:a.children)!=null&&r.length&&window.setTimeout(()=>{!this.openSubToolbar||!a.children||this.openSubToolbar.refresh(this.resolveStripChildItems(a.children),this.isDisabled||!this.hasDocument)},0)}t.toggle?window.setTimeout(()=>this.renderButtons(),0):(e.childIcon==="selected"||e.toggle)&&this.renderButtons()}};Va.IN_PARENT_HOST_CLASSES=["ml-ex-ui-toolbar-in-parent","ml-ex-ui-toolbar-in-parent-top","ml-ex-ui-toolbar-in-parent-bottom","ml-ex-ui-toolbar-in-parent-left","ml-ex-ui-toolbar-in-parent-right"];let Mu=Va;Object.defineProperty(u,"ACGI_DARK_THEME_FOREGROUND",{enumerable:!0,get:()=>p.ACGI_DARK_THEME_FOREGROUND}),Object.defineProperty(u,"ACGI_LIGHT_THEME_FOREGROUND",{enumerable:!0,get:()=>p.ACGI_LIGHT_THEME_FOREGROUND}),Object.defineProperty(u,"ACGI_MODEL_SPACE_BACKGROUND",{enumerable:!0,get:()=>p.ACGI_MODEL_SPACE_BACKGROUND}),Object.defineProperty(u,"ACGI_PAPER_SPACE_BACKGROUND",{enumerable:!0,get:()=>p.ACGI_PAPER_SPACE_BACKGROUND}),Object.defineProperty(u,"acgiContrastingForegroundColor",{enumerable:!0,get:()=>p.acgiContrastingForegroundColor}),Object.defineProperty(u,"acgiForegroundColorForBackground",{enumerable:!0,get:()=>p.acgiForegroundColorForBackground}),Object.defineProperty(u,"acgiIsLightBackground",{enumerable:!0,get:()=>p.acgiIsLightBackground}),Object.defineProperty(u,"isDirectBatchCandidate",{enumerable:!0,get:()=>D.isDirectBatchCandidate}),Object.defineProperty(u,"shouldExtendBboxForDirectEntity",{enumerable:!0,get:()=>D.shouldExtendBboxForDirectEntity}),Object.defineProperty(u,"tryBuildDirectEntityMeta",{enumerable:!0,get:()=>D.tryBuildDirectEntityMeta}),Object.defineProperty(u,"ShxParserFont",{enumerable:!0,get:()=>$.ShxParserFont}),Object.defineProperty(u,"AcGiTextParagraphAlignment",{enumerable:!0,get:()=>q.MTextParagraphAlignment}),Object.defineProperty(u,"MTextColor",{enumerable:!0,get:()=>q.MTextColor}),Object.defineProperty(u,"MTextParagraphAlignment",{enumerable:!0,get:()=>q.MTextParagraphAlignment}),u.ACAP_DEFAULT_COMPARE_COLORS=$x,u.ACAP_DEFAULT_DOCS_BASE_URL=ao,u.ACAP_DOCS_PATH_MAGNIFIER=Ru,u.ACAP_DWG_PARSER_PRODUCT_URL=Ov,u.ACAP_FIND_MAX_RESULTS=vu,u.ACAP_GROUPABLE_NOTIFICATION_SOURCES=Av,u.ACAP_LOCAL_DATA_SOURCE_ID=wa,u.ACAP_MEASURE_ANGLE_BADGE_REF_ARM_FRACTION=tx,u.ACAP_MEASURE_BADGE_BORDER_PX=du,u.ACAP_MEASURE_BADGE_H_CHROME_PX=WE,u.ACAP_MEASURE_BADGE_MAX_LINE_FRACTION=ex,u.ACAP_MEASURE_BADGE_PAD_X_PX=cu,u.ACAP_MEASURE_BADGE_REF_FONT_PX=lu,u.ACAP_OVERLAY_ARROW_SIZE_PX=kt,u.ACAP_OVERLAY_ARROW_WCS=Kn,u.ACAP_OVERLAY_CLOUD_DIAMETER_PX=vo,u.ACAP_OVERLAY_CLOUD_WCS=wo,u.ACAP_OVERLAY_STROKE_WCS=ci,u.ACAP_READING_MODE_BACKGROUND=$a,u.ACAP_READING_MODE_COLOR=Uu,u.ACAP_UNTITLED_DOC_TITLE=ga,u.ACAP_URL_DATA_SOURCE_ID=iu,u.ACED_DRAW_STYLE_SESSION_PROVIDER_ID=Li,u.ACED_SHORTCUT_TOOLBAR_PROVIDER_ID=Sr,u.ACED_SIMULATED_MOUSE_OFFSET_Y_PX=of,u.ACED_SNAP_LOUPE_GAP_BELOW_PROMPT_PX=AA,u.ACED_SNAP_LOUPE_INSET_PX=Tc,u.ACED_SNAP_LOUPE_SIZE_PX=pn,u.ACED_SNAP_LOUPE_ZOOM=Lc,u.ACED_TOUCH_MOUSE_GUARD_MS=Ac,u.ACED_TOUCH_POINT_LONG_PRESS_MS=gc,u.ACED_TOUCH_POINT_MOVE_CANCEL_PX=Um,u.ACI_GRAY_PALETTE_INDICES=Bc,u.ACI_LARGE_PALETTE_INDICES=Nc,u.ACI_SMALL_PALETTE_INDICES=Dc,u.ACUI_SHORTCUT_TOOLBAR_DEFAULT_TOP_PX=Gf,u.AcApAboutCmd=Gw,u.AcApArcCmd=gg,u.AcApBlockInsertSession=Xr,u.AcApBlockPreviewConvertor=nd,u.AcApCacheFontCmd=Us,u.AcApCircleCmd=Sg,u.AcApCircleJig=pd,u.AcApClearMarkupsCmd=mw,u.AcApClearMeasurementsCmd=jb,u.AcApCloseCmd=qw,u.AcApContext=Ea,u.AcApConvertToBmpCmd=Wy,u.AcApConvertToDxfCmd=Ky,u.AcApConvertToJpgCmd=Yy,u.AcApConvertToPngCmd=Zy,u.AcApConvertToRasterImageCmd=Nr,u.AcApCopyCmd=ha,u.AcApDataSourceManager=xv,u.AcApDimAlignedCmd=Og,u.AcApDimAlignedJig=Mg,u.AcApDimAngularCmd=Ng,u.AcApDimAngularJig=Dg,u.AcApDimArcCmd=zg,u.AcApDimArcJig=Fg,u.AcApDimBaselineCmd=$g,u.AcApDimContinueCmd=Wg,u.AcApDimDiameterCmd=Yg,u.AcApDimDiameterJig=Kg,u.AcApDimLinearCmd=Xg,u.AcApDimLinearJig=Zg,u.AcApDimOrdinateCmd=Jg,u.AcApDimOrdinateJig=qg,u.AcApDimRadiusCmd=eb,u.AcApDimRadiusJig=Qg,u.AcApDocManager=k,u.AcApDocSession=ya,u.AcApDocument=ba,u.AcApDrawStyleDrawCmd=Vc,u.AcApDxfConvertor=$y,u.AcApEllipseCmd=sb,u.AcApEntityPreviewCmd=Jy,u.AcApEntityPreviewConvertor=Xy,u.AcApEntityService=sd,u.AcApEraseCmd=Nw,u.AcApExamplePlugin=vL,u.AcApFontLoader=dv,u.AcApFontUtil=Wt,u.AcApHatchCmd=Zr,u.AcApHideObjectsCmd=Bw,u.AcApI18n=m,u.AcApImageAttachCmd=ob,u.AcApInsertCmd=ab,u.AcApLayerCloseCmd=cg,u.AcApLayerCmd=dg,u.AcApLayerCurCmd=ig,u.AcApLayerDelCmd=tg,u.AcApLayerFreezeCmd=Fr,u.AcApLayerIsoCmd=zr,u.AcApLayerLockCmd=ng,u.AcApLayerOnCmd=sg,u.AcApLayerPCmd=og,u.AcApLayerService=we,u.AcApLayerStore=Qy,u.AcApLayerThawCmd=rg,u.AcApLayerUnisoCmd=ag,u.AcApLayerUnlockCmd=lg,u.AcApLayoffCmd=Rr,u.AcApLineCmd=ji,u.AcApLineJig=Wr,u.AcApLocalDataSource=hv,u.AcApLogCmd=Hw,u.AcApMLineCmd=cb,u.AcApMLineJig=lb,u.AcApMTextCmd=db,u.AcApMarkupArrowCmd=fw,u.AcApMarkupCalloutCmd=yw,u.AcApMarkupCalloutEntity=py,u.AcApMarkupCircleCmd=gw,u.AcApMarkupCloudCmd=bw,u.AcApMarkupDrawCmd=Ut,u.AcApMarkupEntity=Fi,u.AcApMarkupExportCmd=Aw,u.AcApMarkupHighlightCmd=ww,u.AcApMarkupHighlightEntity=my,u.AcApMarkupHistory=Sh,u.AcApMarkupImportCmd=_w,u.AcApMarkupLineCmd=Pw,u.AcApMarkupPresenter=wy,u.AcApMarkupRectCmd=Ew,u.AcApMarkupSegmentEntity=fy,u.AcApMarkupShapeEntity=yy,u.AcApMarkupStampCmd=Tw,u.AcApMarkupStampEntity=gy,u.AcApMarkupStore=eh,u.AcApMarkupTextCmd=Iw,u.AcApMarkupTextEntity=by,u.AcApMarkupVisibilityCmd=Ow,u.AcApMeasureAngleCmd=Jb,u.AcApMeasureAngleEntity=Fs,u.AcApMeasureArcCmd=rw,u.AcApMeasureArcEntity=zs,u.AcApMeasureAreaCmd=ew,u.AcApMeasureAreaEntity=Rs,u.AcApMeasureContinuousCmd=dw,u.AcApMeasureContinuousJig=cw,u.AcApMeasureDistanceCmd=lw,u.AcApMeasureDistanceEntity=js,u.AcApMeasureDistanceJig=aw,u.AcApMeasureDrawCmd=Hi,u.AcApMeasureEntity=Pn,u.AcApMeasurePointCmd=hw,u.AcApMeasurePointEntity=Vs,u.AcApMeasurementExportCmd=Zb,u.AcApMeasurementHistory=_h,u.AcApMeasurementImportCmd=Xb,u.AcApMeasurementVisibilityCmd=Vb,u.AcApMemoryProfiler=Y1,u.AcApMoveCmd=zw,u.AcApNotificationEventBridge=Gv,u.AcApNotificationStore=Ca,u.AcApObjectScaleCmd=Xw,u.AcApOffsetCmd=Gs,u.AcApOpenCmd=Zw,u.AcApOpenFileProfiler=ka,u.AcApOpenViewMode=_t,u.AcApOverlayEntity=$c,u.AcApPanCmd=rv,u.AcApPluginManager=av,u.AcApPointCmd=ub,u.AcApPolygonCmd=Jr,u.AcApPolylineCmd=fb,u.AcApPolylineJig=mb,u.AcApProgress=Tn,u.AcApQNewCmd=Jw,u.AcApRasterImageConvertor=Hy,u.AcApRayCmd=gb,u.AcApReadingModeCmd=nv,u.AcApReadingModeState=Wu,u.AcApRectCmd=Qr,u.AcApRectJig=wb,u.AcApRedoCmd=ov,u.AcApRegenCmd=Qw,u.AcApRevCloudCmd=ea,u.AcApRevCloudJig=Eb,u.AcApRotateCmd=ma,u.AcApSelectCmd=ev,u.AcApSessionUndo=Ch,u.AcApSettingManager=le,u.AcApSketchCmd=sa,u.AcApSketchJig=Ib,u.AcApSplineCmd=Ob,u.AcApSplineJig=Mb,u.AcApSwitchBgCmd=iv,u.AcApSysVarCmd=tv,u.AcApUndoCmd=sv,u.AcApUnisolateObjectsCmd=Vw,u.AcApUrlDataSource=kv,u.AcApXAttachCmd=Fb,u.AcApXLineCmd=zb,u.AcApXrefManager=Si,u.AcApZoomCmd=yi,u.AcEdBaseView=Cf,u.AcEdBatchedPreview=Ic,u.AcEdCommand=K,u.AcEdCommandLine=Sm,u.AcEdCommandStack=Me,u.AcEdConditionWaiter=jo,u.AcEdCorsorType=Ti,u.AcEdCursorManager=sm,u.AcEdDesktopInteractionStrategy=om,u.AcEdDesktopSessionAccessoryChrome=Jo,u.AcEdEntityPickCancelChrome=Hm,u.AcEdGripEditSession=tm,u.AcEdGripHandle=im,u.AcEdGripManager=nm,u.AcEdGripPreviewJig=em,u.AcEdHoverController=kf,u.AcEdInputManager=pr,u.AcEdKeyword=rc,u.AcEdKeywordCollection=gm,u.AcEdLoupeTouchPickStrategy=rf,u.AcEdMTextEditor=qt,u.AcEdMarker=us,u.AcEdMarkerManager=hs,u.AcEdMobileCommandChrome=uf,u.AcEdMobileInteractionStrategy=rm,u.AcEdOpenMode=U,u.AcEdOsnapResolver=De,u.AcEdPreviewJig=X,u.AcEdPromptAngleOptions=Ge,u.AcEdPromptBoxOptions=Ko,u.AcEdPromptBoxResult=mi,u.AcEdPromptDistanceOptions=Je,u.AcEdPromptDoubleOptions=ve,u.AcEdPromptDoubleResult=rt,u.AcEdPromptEntityOptions=Pe,u.AcEdPromptEntityResult=Zo,u.AcEdPromptIntegerOptions=lc,u.AcEdPromptIntegerResult=Xo,u.AcEdPromptKeywordOptions=ye,u.AcEdPromptNumericalOptions=Yo,u.AcEdPromptNumericalResult=ac,u.AcEdPromptOptions=Ft,u.AcEdPromptPointOptions=F,u.AcEdPromptPointResult=qo,u.AcEdPromptResult=Pt,u.AcEdPromptSelectionOptions=Ii,u.AcEdPromptSelectionResult=ms,u.AcEdPromptStateMachine=Rt,u.AcEdPromptStatus=v,u.AcEdPromptStringOptions=xe,u.AcEdSelectionFilter=_A,u.AcEdSelectionSet=$o,u.AcEdSelectionStaticPreviewJig=xf,u.AcEdSelectionTransformPreviewJig=mn,u.AcEdSessionAccessoryController=pf,u.AcEdSessionAccessoryMountSkippedError=rs,u.AcEdSessionProviderRegistry=Ep,u.AcEdSimulatedMouseTouchPickStrategy=af,u.AcEdSnapLoupe=mr,u.AcEdTouchPointSession=Pc,u.AcEdViewKeyHandler=No,u.AcEdViewMode=qe,u.AcEditor=vf,u.AcTrGeometryUtil=mu,u.AcTrInheritedLayerMaterialMapper=yp,u.AcTrLayerAppearanceController=Gl,u.AcTrScene=_p,u.AcTrView2d=Mn,u.AcUiAboutDialog=fa,u.AcUiAciColorDialog=Or,u.AcUiDefaultNotificationUi=Wv,u.AcUiDialog=fi,u.AcUiDrawStyleSessionAccessory=Ry,u.AcUiDropdownMenu=Oa,u.AcUiFileOpenPanel=Cu,u.AcUiFullscreenPanel=dr,u.AcUiHelpPanel=ur,u.AcUiMobileSessionPanel=hr,u.AcUiShortCutToolbar=Hf,u.AcUiSimpleToolbar=jf,u.AcUiSubToolbar=Iu,u.AcUiTextHeightDialog=Dr,u.AcUiToolbar=Mu,u.AcUiTouchPointTutorial=tr,u.AcUiTouchPointTutorialDialog=Jm,u.DEFAULT_GRIP_COLOR_CSS=zS,u.DEFAULT_GRIP_HOT_COLOR_CSS=RS,u.DEFAULT_GRIP_SIZE_PX=Hp,u.DEFAULT_VIEW_2D_OPTIONS=bu,u.DIM_PREVIEW_BLOCK=_e,u.DIM_STYLE_FIELDS=fd,u.DWG_CONVERTER_PACKAGE=cE,u.DWG_PARSER_MAIN_FILE=rE,u.DWG_PARSER_WORKER_FILE=oE,u.ENTITY_EDIT_LABEL=vp,u.GRIP_APPEARANCE_SYSVARS=Wp,u.ICON_ANNOTATION=eC,u.ICON_ANNOTATION_HIDE=Dm,u.ICON_ANNOTATION_SHOW=Om,u.ICON_CHEVRON_DOWN=Bm,u.ICON_CHEVRON_LEFT=fc,u.ICON_CHEVRON_RIGHT=mc,u.ICON_CHEVRON_UP=Nm,u.ICON_CLEAR=pc,u.ICON_CLEAR_MARKUPS=uC,u.ICON_CLEAR_MEASUREMENTS=q0,u.ICON_CLOSE=Vm,u.ICON_COLOR=NC,u.ICON_DOCK_CLOSE=CC,u.ICON_DOCK_SIDE_MENU=AC,u.ICON_ERASE=Rm,u.ICON_EXPORT=fC,u.ICON_EXPORT_HTML=yC,u.ICON_EXPORT_PDF=gC,u.ICON_EXPORT_SVG=bC,u.ICON_LANGUAGE=hC,u.ICON_LAYER=V0,u.ICON_LAYER_OFF=IC,u.ICON_LAYER_ON=TC,u.ICON_LAYOUT=G0,u.ICON_MARKUP_ARROW=rC,u.ICON_MARKUP_CALLOUT=iC,u.ICON_MARKUP_CIRCLE=jC,u.ICON_MARKUP_CLOUD=zC,u.ICON_MARKUP_EXPORT=Mm,u.ICON_MARKUP_HIDE=GC,u.ICON_MARKUP_HIGHLIGHT=oC,u.ICON_MARKUP_IMPORT=cC,u.ICON_MARKUP_LINE=sC,u.ICON_MARKUP_PANEL=Im,u.ICON_MARKUP_RECT=RC,u.ICON_MARKUP_SHOW=VC,u.ICON_MARKUP_STAMP=aC,u.ICON_MARKUP_TEXT=nC,u.ICON_MEASURE=H0,u.ICON_MEASUREMENT_PANEL=lC,u.ICON_MEASURE_ANGLE=K0,u.ICON_MEASURE_ARC=Z0,u.ICON_MEASURE_AREA=Y0,u.ICON_MEASURE_CONTINUOUS=$0,u.ICON_MEASURE_COORDINATE=FC,u.ICON_MEASURE_DISTANCE=W0,u.ICON_MEASURE_POINT=_m,u.ICON_MEASURE_RADIUS=X0,u.ICON_MORE=yc,u.ICON_OPEN=dC,u.ICON_ORTHO_MODE=OC,u.ICON_OSNAP=MC,u.ICON_PAN=R0,u.ICON_PLACEMENT_BOTTOM=xC,u.ICON_PLACEMENT_LEFT=kC,u.ICON_PLACEMENT_RIGHT=SC,u.ICON_PLACEMENT_TOP=vC,u.ICON_POLAR_TRACKING=DC,u.ICON_READING_MODE=Q0,u.ICON_REDO=zm,u.ICON_REV_CIRCLE=Tm,u.ICON_REV_CLOUD=Em,u.ICON_REV_RECT=Lm,u.ICON_SELECT=z0,u.ICON_SETTINGS=EC,u.ICON_SIMULATED_MOUSE=LC,u.ICON_SWITCH_BG=J0,u.ICON_TEXT_HEIGHT=jm,u.ICON_THEME_DARK=mC,u.ICON_THEME_LIGHT=pC,u.ICON_TOOLBAR_PLACEMENT=wC,u.ICON_UNDO=Fm,u.ICON_ZOOM_BOX=BC,u.ICON_ZOOM_EXTENT=j0,u.ICON_ZOOM_ORIGINAL=_C,u.ICON_ZOOM_SMART=PC,u.ICON_ZOOM_WINDOW=Am,u.LAYER_EDIT_LABEL=se,u.LAYER_FROZEN_FLAG=Rl,u.LAYER_LOCKED_FLAG=Jt,u.LIBREDWG_CONVERTER_PACKAGE=aE,u.LIBREDWG_PARSER_WASM_FILE=sE,u.LIBREDWG_PARSER_WORKER_FILE=nE,u.MARKUP_FONT_SIZE=Di,u.MARKUP_HAIRLINE_LINE_WEIGHT=Kf,u.MARKUP_LAYER=po,u.MARKUP_LINE_WEIGHT=Ie,u.MARKUP_LIVE_LAYER=Le,u.MARKUP_OPEN_MODE=ly,u.MARKUP_STATUSES=th,u.MEASUREMENT_ANGLE_FORMAT_OPTIONS=al,u.MEASUREMENT_FONT_SIZE=_i,u.MEASUREMENT_LAYER=ne,u.MEASUREMENT_LENGTH_FORMAT_OPTIONS=mo,u.MEASUREMENT_LENGTH_UNIT_FOLLOW_DRAWING=sl,u.MEASUREMENT_LINE_WEIGHT=Te,u.MEASUREMENT_LIVE_LAYER=be,u.MEASURE_ANGLE_ARC_RADIUS_FRACTION=ih,u.MLIGHTCAD_BRAND_NAME=ro,u.MLIGHTCAD_DOCS_URL=Ha,u.MLIGHTCAD_ICON_SVG=Nu,u.MLIGHTCAD_REPO_URL=Fu,u.MLIGHTCAD_WEBSITE_URL=Bu,u.ML_ACI_STACKS_FILL_CLASS=Sy,u.ML_UI_COARSE_POINTER_MEDIA_QUERY=Fp,u.ML_UI_COMPACT_MAX_WIDTH=Np,u.ML_UI_COMPACT_MEDIA_QUERY=Jl,u.ML_UI_GRIP_HOT_VAR=Gp,u.ML_UI_GRIP_NORMAL_VAR=Vp,u.ML_UI_GRIP_SIZE_VAR=jp,u.ML_UI_MOBILE_MAX_WIDTH=Go,u.ML_UI_MOBILE_MEDIA_QUERY=Xl,u.ML_UI_SESSION_PANEL_INSET=ql,u.ML_UI_SESSION_PANEL_MAX_WIDTH=Ho,u.ML_UI_SESSION_PANEL_WIDTH=rn,u.ML_UI_Z_CANVAS_HTML_OVERLAY=Tp,u.ML_UI_Z_CANVAS_HTML_STROKE=BS,u.ML_UI_Z_DRAW_STYLE_TOOLBAR=Ip,u.ML_UI_Z_ENTITY_PICK_CANCEL=Op,u.ML_UI_Z_NOTIFICATION=Dp,u.ML_UI_Z_SHORTCUT_TOOLBAR=Mp,u.MTEXT_RENDERER_PACKAGE=lE,u.MTEXT_RENDERER_WORKER_FILE=bv,u.OVERLAY_HAIRLINE_LINE_WEIGHT=uh,u.POLARMODE_ADDITIONAL_ANGLES=dm,u.POLARMODE_POLAR_TRACKING=ln,u.REVCLOUD_BULGE=Md,u.REVIEW_OVERLAY_HIT_THRESHOLD_PX=Hh,u.acCmColorToCssHex=ul,u.acapActiveMarkupSessionId=Yx,u.acapAdaptiveMeasureBadgeFontSize=xt,u.acapAnalyzeUnsupportedDrawing=su,u.acapAppendLinkedText=Bv,u.acapApplyTemplateParams=Lv,u.acapBaseZoomFromWcsSize=wh,u.acapBindCommandServices=Pp,u.acapBindMarkupSession=Hn,u.acapBindOverlayCalloutGrips=_r,u.acapBindOverlayPointerDrag=Ue,u.acapBindShortCutToolbarDocState=jy,u.acapBindToolbarDocState=Z1,u.acapBoxContains=Nf,u.acapBuildDataSourceMenu=Sv,u.acapClampMeasureBadgeFontSize=ox,u.acapCloneMeasurementStyle=Xi,u.acapCollectPaperViewportsBox=Ff,u.acapColorToCssAlpha=hl,u.acapCommandServices=os,u.acapCreateMlightcadBrandMark=zu,u.acapCreateMlightcadIcon=Ua,u.acapCssColor=nt,u.acapCssToMeasurementColor=pl,u.acapDisposeMarkupSession=tl,u.acapDisposeNotificationService=qv,u.acapDocsUrl=Hu,u.acapDrawOverlayArrowHead=Bt,u.acapDrawOverlayHighlight=gl,u.acapDrawOverlayLeader=yl,u.acapDrawStyleKindForCommand=vr,u.acapEscapeHtml=Ks,u.acapEstimateMeasureBadgeWidthPx=sx,u.acapFindExcerpt=fL,u.acapFindHitBox=Ax,u.acapFindText=yL,u.acapFindTextInLayout=Sx,u.acapFitOverlayCanvas=Ei,u.acapFitOverlayCanvasToView=vh,u.acapFormatFontMissedReplacement=SE,u.acapFormatFontsMissedReplacement=ru,u.acapFormatMessageHtml=CE,u.acapFormatOpenFileErrorMessage=jv,u.acapFormatOpenFileErrorTitle=Vv,u.acapFormatOpenFileErrorToastMessage=EE,u.acapFormatUnsupportedEntitiesMessage=Iv,u.acapFrameBoxToGeBox2d=fn,u.acapGetCameraZoom=yh,u.acapGetCurrentMeasurementStyle=ge,u.acapGetDocsBaseUrl=Vu,u.acapGetDrawStyleSessionAccessory=Vy,u.acapGetMeasurementColor=it,u.acapGetMeasurementCustomTextHeightWcs=mh,u.acapGetMeasurementFontSize=Pi,u.acapGetMeasurementTextHeightMode=ph,u.acapGetNotificationUiPlacement=BE,u.acapGroupNotifications=Pv,u.acapI18nTranslate=pe,u.acapInstallDrawStyleSessionAccessory=id,u.acapInstallNotificationService=Xv,u.acapInstallOpenFileDialog=mv,u.acapInvokeDataSourceMenuAction=Cv,u.acapIsSingleLocalOpen=yE,u.acapIsTianzhengClass=Ev,u.acapIsTianzhengClassName=$s,u.acapListFindLayouts=Cx,u.acapMTextToPlainText=qs,u.acapMarkdownLink=Nv,u.acapMeasureBadgeChromePx=uu,u.acapMeasurementCanvasLineWidth=Ce,u.acapNavigateToFindHit=bL,u.acapNormalizeFindText=Xs,u.acapNotificationCenter=DE,u.acapNotificationService=Wi,u.acapNotifyUndoStackChanged=di,u.acapOpenCenteredPopup=gE,u.acapOpenDataSourceResult=Jd,u.acapOpenUrl=AE,u.acapOverlayArrowSize=ml,u.acapOverlayDash=So,u.acapPickLocalCadFile=qd,u.acapPixelsPerWorldUnit=qi,u.acapPlaceOverlayHtml=ce,u.acapPointerEventToOverlayWorld=Ss,u.acapResetMeasurementDrawStyle=uk,u.acapResolveFontMissedReplacement=ou,u.acapResolveFontsMissedReplacement=Mv,u.acapResolveLayoutFrameBox=kr,u.acapResolveOpenFileErrorMessage=zv,u.acapResolveOpenFileErrorTitle=Rv,u.acapResolveOpenFileErrorToastMessage=Fv,u.acapResolveUnsupportedEntitiesMessage=Tv,u.acapRunDataSourceMenuAction=bE,u.acapRunDatabaseEdit=ui,u.acapRunServiceEdit=ie,u.acapScaleMeasureOverlayPx=Aa,u.acapScaleWcsWithFont=fl,u.acapScaledOverlayArrowSize=ko,u.acapScaledOverlayLineWidth=Ye,u.acapScreenAngleBadgeRefLengthPx=hu,u.acapScreenArcLengthPx=_a,u.acapScreenAreaBadgeRefLengthPx=pu,u.acapScreenPxToWcs=Ae,u.acapScreenSegmentLengthPx=Ci,u.acapSeedOverlayArrowWcs=bh,u.acapSeedOverlaySizesFromWcs=Nt,u.acapSeedOverlayStrokeWcs=gh,u.acapSetDocsBaseUrl=Gu,u.acapSetMarkupBagFactory=Ju,u.acapSetMeasurementDrawColor=hh,u.acapSetMeasurementDrawFontSize=dk,u.acapSetMeasurementTextHeight=fh,u.acapSetNotificationCenter=NE,u.acapSetNotificationUiPlacement=FE,u.acapSyncLiveOverlayTextHeight=he,u.acapUninstallOpenFileDialog=yv,u.acapUpdateOpenFileDialogOptions=fv,u.acapViewportPaperBox=Bf,u.acapWcsToScreenPx=xo,u.acapWithDataSourceBusy=wE,u.acapWithSecondaryDatabase=Fd,u.accumulateSketchPoint=Lb,u.acedAlert=OS,u.acedApplyCanvasTouchCalloutStyles=bm,u.acedApplyUiTheme=ot,u.acedArmTouchMouseGuard=gs,u.acedAttachMobileBoxGesture=cr,u.acedClearDomSelection=cc,u.acedClearFollowingClickSink=lr,u.acedComputeSessionMetrics=hf,u.acedDisposeMobileSnapLoupe=wf,u.acedDisposeSimulatedMouseCursor=dA,u.acedEntityIntersectsSelectionBox=Pf,u.acedGetUiLayout=ls,u.acedGuardCanvasTouchCallout=wm,u.acedHideMobileSnapLoupe=bf,u.acedHideSimulatedMouseCursor=Sc,u.acedInteractionStrategy=Ve,u.acedIsCompactUiLayout=Bp,u.acedIsDynamicInputEnabled=am,u.acedIsGhostClientOrigin=rr,u.acedIsHandheldDevice=zp,u.acedIsMobileOrPadUi=Qt,u.acedIsMobileUiLayout=as,u.acedIsTouchDerivedMouseEvent=yt,u.acedIsTouchLongPressContextMenu=_c,u.acedLineSegmentIntersectsBox2d=Af,u.acedLoupeLocalFromCanvasDelta=ff,u.acedLoupeViewBoxFromCanvasSample=yf,u.acedNeedsCrossingGeometryRefine=Ef,u.acedPrimitiveIntersectsSelectionBox=_f,u.acedRefreshMobileSnapLoupe=gf,u.acedRefreshSimulatedMouseCursor=sf,u.acedResetTouchMouseGuard=pA,u.acedResolveLoupePlacement=mf,u.acedShouldHideDesktopCommandLine=Rp,u.acedShouldIgnoreCompatMouse=He,u.acedSinkFollowingClick=ar,u.acedSubscribeUiLayout=cs,u.acedSubscribeUiTheme=Vo,u.acedTouchPickStrategy=Cc,u.acuiAciCssColor=Ir,u.acuiBindDrawStyleSessionAccessory=jc,u.acuiClearAciPanelViewportPin=l_,u.acuiComputeWrapPackSlot=Fx,u.acuiCopyDynamicToolbarChildren=Tx,u.acuiCreateAciIndexPicker=Ty,u.acuiCreateAciPaletteStacks=Ly,u.acuiCreateToolbarSeparator=SL,u.acuiEnsureAciPaletteStyles=Tr,u.acuiEnsureToolbarStyles=Tu,u.acuiExpandToolbarItemConfigs=Dx,u.acuiFilterVisibleToolbarItems=Ma,u.acuiIndexToolbarItems=Ox,u.acuiIsDynamicToolbarChildren=Ot,u.acuiIsToolbarChildrenStrip=Au,u.acuiIsToolbarItemDisabled=Eu,u.acuiIsToolbarItemVisible=Nx,u.acuiIsToolbarPresetRef=Lx,u.acuiIsToolbarSeparatorItem=ke,u.acuiItemRequiresDocument=Pu,u.acuiLocalIsoDate=xc,u.acuiOpenTextHeightDialog=Oy,u.acuiParseAciManualInput=_y,u.acuiPinAciPanelToViewportWidth=a_,u.acuiPreserveDynamicToolbarChildren=Ix,u.acuiRemoveToolbarStylesIfUnused=_L,u.acuiResolveDrawStyleKind=Uf,u.acuiResolveEffectiveToolbarItem=Ki,u.acuiResolveParentToolbarDisplay=On,u.acuiResolveSelectedChildItem=Bx,u.acuiResolveTextHeightDialogInitials=Dy,u.acuiResolveTextHeightPatch=Ny,u.acuiResolveToolbarChildrenUi=Ia,u.acuiResolveToolbarChrome=Ex,u.acuiShouldShowDrawStyleToolbar=Rc,u.acuiShouldShowTouchPointTutorial=qm,u.acuiShouldShowTouchPointTutorialFromPrefs=Xm,u.acuiToolbarItemsIncludeItem=Mx,u.acuiToolbarPreset=CL,u.addCommonDimKeywords=wi,u.addDimKeyword=Gt,u.advanceBaselineStep=Tg,u.advanceContinueCursor=Lg,u.allocateDimBlockName=Cg,u.applyCurrentDimStyle=$e,u.applyGripAppearanceToHost=Ql,u.applyMarkupStyleToSelection=Qc,u.applyMeasurementStyle=Pl,u.applyMeasurementStyleToSelection=El,u.applySessionHiddenObjectState=dL,u.attachCalloutToMarkup=xy,u.bindMarkupCalloutGrips=_1,u.bindMarkupCenterMove=Ps,u.bindMarkupInlineTextEdit=wr,u.bindMarkupPointerDrag=A1,u.bindMeasurementOverlayHistory=Lh,u.bindOverlayHistory=kh,u.box3dToBox2d=Of,u.buildMarkupCloud=XA,u.buildMarkupRect=qA,u.buildRevCloud=Ab,u.canvasBackgroundFromColor=dp,u.clearLayoutMeasurements=Rb,u.cmdDescription=dc,u.collectMeasurementRecords=Ll,u.collectMemorySnapshot=Yw,u.collectReviewOverlayIdsByBox=Kh,u.collectTextStyleFontNames=Jv,u.commitDimBlock=ii,u.commitMarkup=Lt,u.commitMeasurementGroup=jh,u.computeIntelligentExtents=mS,u.computeIntelligentExtentsAsync=bp,u.computeLeaderTipOnShape=wn,u.configureMarkupCommand=Zc,u.configureMarkupDrawCommand=KA,u.constrainToOrtho=cm,u.constrainToTracking=ym,u.convertAreaValue=rh,u.convertLengthValue=ol,u.createDefaultMarkupColor=$f,u.createIconElement=ft,u.createMarkupEntity=n_,u.createMarkupEntityFromRecord=qc,u.createMarkupId=ty,u.createMarkupMeta=Et,u.createMeasureEntityFromRecord=Vd,u.createRotationMatrix=yn,u.cssToMarkupColor=Wc,u.cursorColorForBackground=Oo,u.dedupeFontNames=Zs,u.defaultMarkupColor=fe,u.defaultMarkupStyle=Qe,u.defaultRevCloudArcLength=xb,u.definitionPointsFromEntity=bd,u.deserializeMeasurementStyle=Ih,u.distPointToArcPx=Za,u.distPointToCirclePx=Ya,u.distPointToPolylinePx=Ka,u.distPointToRectOutlinePx=lo,u.distPointToSegmentPx=Ai,u.distance2d=Vi,u.drawMeasureAngleArcOnCanvas=Ub,u.drawMeasureArcOnCanvas=$b,u.drawMeasureAreaOnCanvas=Wb,u.drawMeasureSegmentOnCanvas=Hb,u.editMarkupHtmlText=Oc,u.ensureCounterClockwise=Sb,u.ensureDimResources=md,u.eventBus=Q,u.excludeLockedLayerIds=Vl,u.expandMarkupBoundsByClientRects=Xu,u.focusMeasurement=Sk,u.foregroundColorFromColorTheme=rS,u.formatMeasurementAngle=Wn,u.formatMeasurementArea=Un,u.formatMeasurementLength=tt,u.formatMeasurementValue=$n,u.formatMemoryBytes=Uw,u.geBox2dToThreeBox2d=dx,u.geBox2dToThreeBox3d=hx,u.geBox3dToGeBox2d=ax,u.geBox3dToThreeBox3d=lx,u.getActiveMarkupBag=Gn,u.getActiveMeasurementStyle=Cl,u.getBaselineStep=vd,u.getChainBaseId=Eg,u.getChainCursorId=Pg,u.getDimStyleOverride=__,u.getDrawingExportBaseName=zf,u.getEffectiveMeasurementUnits=fo,u.getLastFontLoadStats=cv,u.getLayerIsoState=jl,u.getMarkupAuthor=ny,u.getMarkupCustomTextHeightWcs=Xf,u.getMarkupFontSize=gt,u.getMarkupHistory=Ze,u.getMarkupPresenter=Vt,u.getMarkupStore=te,u.getMarkupStoreForSession=Xx,u.getMarkupTextHeightMode=Zf,u.getMeasurementGeometry=Il,u.getMeasurementHistory=Zt,u.getMeasurementSnapshot=hi,u.getMeasurementStyle=Ct,u.getMeasurementUnitOverride=sk,u.getMeasurementValueText=kk,u.getPolaraddang=pm,u.getPolarang=hm,u.getPolarmode=Wo,u.getSelectedMeasurementId=Xn,u.getSessionUndo=Yt,u.handleCommonDimKeyword=vi,u.hideObjects=gx,u.hitTestMarkupGeometry=Qa,u.hitTestMarkupShapeOutline=Ja,u.hitTestMeasurementGeometry=nl,u.inferLinearRotation=Gr,u.isAlignedDimension=T_,u.isAttachableShapeMarkup=Rn,u.isEffectiveSpatialQueryHit=ts,u.isEntityOnLockedLayer=At,u.isGripAppearanceSysVar=$p,u.isInsertableBlockName=rb,u.isLightColorTheme=aS,u.isMarkupDoublePointer=Mf,u.isMarkupHtmlTextEditing=If,u.isMarkupShapeCalloutEnabled=JA,u.isMarkupVisible=j1,u.isMeasurementVisible=xl,u.isModelSpaceDatabase=cp,u.isOpenFileProgressComplete=gv,u.isOrthoModeEnabled=lm,u.isPolarTrackingEnabled=mm,u.isRevCloudCloseToStart=Dd,u.isRotatedDimension=L_,u.isSameLayerIsoState=wp,u.isScriptQuitCommand=lv,u.layoutBackgroundColorFromRgb=lS,u.layoutBackgroundSysVar=Bl,u.listLayoutMeasurements=xk,u.listMarkupsForSession=Zx,u.markupCanvasLineWidth=at,u.markupCloudVertices=Cs,u.markupColorToCss=Bi,u.markupDrawStyleFromRecord=ay,u.markupFocusExtents=vy,u.markupGeometryBounds=qa,u.markupGeometryCenter=uo,u.markupNow=iy,u.markupRectCorners=dy,u.markupShapeOutlineFromGeometry=qu,u.markupSidecarFileName=Cw,u.measureAngleBadgeWorld=jd,u.measureAngleDeg=Rd,u.measureCentroid=ca,u.measureShoelaceArea=zd,u.measurementFocusBox=sh,u.measurementGeometryBounds=il,u.measurementLengthUnitSymbol=rl,u.measurementSidecarFileName=Dh,u.migrateStoredSettings=Yp,u.newMeasureOverlayId=ra,u.normalizeDocsBaseUrl=Wa,u.normalizeFontNameKey=$i,u.notifyMeasurementLayoutChanged=zh,u.parseCssToAcCmColor=dl,u.parseMarkupSidecar=kw,u.parseMeasurementSidecar=Mh,u.parseScriptLines=Xd,u.patchMarkupStyleWcs=ey,u.pickAttachableShapeMarkupAt=$h,u.pickMeasurementAt=Vh,u.placeAngleMeasurement=qb,u.placeArcMeasurement=Wd,u.placeAreaMeasurement=Qb,u.placeDistanceMeasurement=$d,u.placeMarkupHtml=C1,u.placeMeasurementRecord=Yb,u.placePointMeasurement=uw,u.planTextStyleFontPreload=Qv,u.pointInPolygonPx=Ku,u.pointInRectPx=$u,u.pointerEventToMarkupWorld=S1,u.preferExactAciColor=cl,u.promptAttachedCallout=As,u.promptMarkupCapsuleText=Pr,u.promptMarkupText=Xc,u.promptShapeFirstCorner=Lr,u.publishAttachedCallout=hy,u.readDimStyleFields=Ag,u.readGripAppearance=ec,u.readLayoutBackgroundColor=Mo,u.rebuildPreviewBlock=ti,u.rectanglePath=Od,u.refreshMeasurementValueLabels=Ek,u.registerMarkupCommands=Dw,u.registerMarkupPublish=Wf,u.registerMeasureCommands=pw,u.registerMeasurementPublish=Gb,u.rememberCreatedDimension=bi,u.removeMeasurement=Ak,u.removePreviewBlock=ni,u.republishMarkup=vs,u.republishMeasurement=_n,u.resetExportDownloadNamesForTests=NA,u.resetMarkupSession=Jc,u.resetMeasurementSession=vl,u.resetMeasurementStyleState=Rh,u.resetMeasurementUnitOverride=ah,u.resetMeasurementVisibility=Nh,u.resolveDrawingExtents=Df,u.resolveExportDownloadName=zc,u.resolveMarkupLineWeight=ks,u.resolvePointerSelectionAction=Sf,u.resolveSelectedEntities=Br,u.resolveSelectedIds=rd,u.resolveSelectionActionFromEvent=Mc,u.resolveUiTheme=Oe,u.restoreMeasurementGroupExtras=Tl,u.runMarkupEdit=Fe,u.runMeasurementEdit=Xe,u.sampleEntityPath=Pb,u.scaleCopyDisplacement=fr,u.selectChainDimension=Ig,u.selectMarkupGroup=_s,u.selectMeasurementGroup=En,u.serializeMeasurementStyle=Co,u.setDimStyleOverride=P_,u.setMarkupDrawColor=qf,u.setMarkupDrawFontSize=jA,u.setMarkupShapeCalloutEnabled=QA,u.setMarkupTextHeight=Jf,u.setMarkupVisible=Mw,u.setMeasurementUnitOverride=ok,u.setMeasurementVisible=Bh,u.signedArea=kb,u.simplifySketchPoints=Tb,u.splitDominantCluster=es,u.stringifyMarkupSidecar=Sw,u.stringifyMeasurementSidecar=Oh,u.strokeMarkupCloud=uy,u.strokeMeasureArcOnContext=la,u.subscribeMarkupDrawStyle=Ar,u.subscribeMeasurementSelection=Al,u.subscribeMeasurements=vk,u.sysCmdDescription=M0,u.tessellateMarkupCloud=Er,u.threeBox2dToGeBox2d=cx,u.threeBox3dToGeBox2d=ux,u.threeBox3dToGeBox3d=rx,u.toggleBlackWhiteBackgroundColor=up,u.togglePolarTracking=b0,u.translateAttachedCallout=co,u.translateMarkupGeometry=Xa,u.translateMarkupPoint=Ee,u.trySelectReviewOverlay=Yh,u.trySelectReviewOverlaysByBox=Zh,u.unionDominantCluster=mp,u.unionDominantClusterAsync=fp,u.unionSpatialQueryItems=Fo,u.uniquifySpatialItemIds=Hl,u.unisolateObjects=bx,u.userCmdDescription=O0,u.viewDiagonalLength=vb,u.withMarkupInput=YA,u.withMarkupStyleWcs=Qf,u.withMeasureInput=qP,u.writeDimStyleFields=gd,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));