import{g as G}from"./index-d7fba904.js";function H(v,D){for(var d=0;df[b]})}}}return Object.freeze(Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(v,D){ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(d,f,b){var T=d("../token_iterator").TokenIterator;function s(m,k){return m.type.lastIndexOf(k+".xml")>-1}f.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],f.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],f.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},f.beautify=function(m){for(var k=new T(m,0,0),t=k.getCurrentToken(),K=m.getTabString(),M=f.singletonTags,F=f.blockTags,V=f.formatOptions||{},n,p=!1,l=!1,g=!1,r="",e="",q="",a=0,R=0,L=0,c=0,y=0,$=0,N=0,_,I=0,i=0,o,B=!1,S=!1,A=!1,h=!1,P={0:0},w=[],j=!1,x=function(){n&&n.value&&n.type!=="string.regexp"&&(n.value=n.value.replace(/^\s*/,""))},O=function(){for(var C=r.length-1;!(C==0||r[C]!==" ");)C=C-1;r=r.slice(0,C+1)},u=function(){r=r.trimRight(),p=!1};t!==null;){if(I=k.getCurrentTokenRow(),k.$rowTokens,n=k.stepForward(),typeof t<"u"){if(e=t.value,y=0,A=q==="style"||m.$modeId==="ace/mode/css",s(t,"tag-open")?(S=!0,n&&(h=F.indexOf(n.value)!==-1),e==="0;i--)r+=` `;p=!0,!s(t,"comment")&&!t.type.match(/^(comment|string)$/)&&(e=e.trimLeft())}if(e){if(t.type==="keyword"&&e.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(w[a]=e,x(),g=!0,e.match(/^(else|elseif)$/)&&r.match(/\}[\s]*$/)&&(u(),l=!0)):t.type==="paren.lparen"?(x(),e.substr(-1)==="{"&&(g=!0,B=!1,S||(i=1)),e.substr(0,1)==="{"&&(l=!0,r.substr(-1)!=="["&&r.trimRight().substr(-1)==="["?(u(),l=!1):r.trimRight().substr(-1)===")"?u():O())):t.type==="paren.rparen"?(y=1,e.substr(0,1)==="}"&&(w[a-1]==="case"&&y++,r.trimRight().substr(-1)==="{"?u():(l=!0,A&&(i+=2))),e.substr(0,1)==="]"&&r.substr(-1)!=="}"&&r.trimRight().substr(-1)==="}"&&(l=!1,c++,u()),e.substr(0,1)===")"&&r.substr(-1)!=="("&&r.trimRight().substr(-1)==="("&&(l=!1,c++,u()),O()):(t.type==="keyword.operator"||t.type==="keyword")&&e.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?(u(),x(),l=!0,g=!0):t.type==="punctuation.operator"&&e===";"?(u(),x(),g=!0,A&&i++):t.type==="punctuation.operator"&&e.match(/^(:|,)$/)?(u(),x(),e.match(/^(,)$/)&&N>0&&$===0&&V.lineBreaksAfterCommasInCurlyBlock?i++:(g=!0,p=!1)):t.type==="support.php_tag"&&e==="?>"&&!p?(u(),l=!0):s(t,"attribute-name")&&r.substr(-1).match(/^\s$/)?l=!0:s(t,"attribute-equals")?(O(),x()):s(t,"tag-close")?(O(),e==="/>"&&(l=!0)):t.type==="keyword"&&e.match(/^(case|default)$/)&&j&&(y=1),p&&!(t.type.match(/^(comment)$/)&&!e.substr(0,1).match(/^[/#]$/))&&!(t.type.match(/^(string)$/)&&!e.substr(0,1).match(/^['"@]$/))){if(c=L,a>R)for(c++,o=a;o>R;o--)P[o]=c;else a")&&(h&&n&&n.value===""&&a--),s(t,"tag-name")&&(q=e),_=I}}t=n}r=r.trim(),m.doc.setValue(r)},f.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(m){f.beautify(m.session)},bindKey:"Ctrl-Shift-B"}]}),function(){ace.require(["ace/ext/beautify"],function(d){v&&(v.exports=d)})}()})(E);var z=E.exports;const J=G(z),U=H({__proto__:null,default:J},[z]);export{U as e};