formeo 5.0.1 → 5.0.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.
Files changed (81) hide show
  1. package/dist/demo/assets/css/demo.min.css +2 -2
  2. package/dist/demo/assets/css/demo.min.css.gz +0 -0
  3. package/dist/demo/assets/css/formeo.min.css +3 -2
  4. package/dist/demo/assets/js/demo.min.js +94 -77
  5. package/dist/demo/assets/js/demo.min.js.gz +0 -0
  6. package/dist/demo/assets/js/form.min.js +8 -0
  7. package/dist/demo/assets/js/formeo.cjs.js +18302 -12122
  8. package/dist/demo/assets/js/formeo.es.js +18301 -12123
  9. package/dist/demo/assets/js/formeo.min.cjs.js +2 -2
  10. package/dist/demo/assets/js/formeo.min.es.js +2 -3
  11. package/dist/demo/assets/js/formeo.min.js +18459 -12279
  12. package/dist/demo/assets/js/formeo.min.umd.js +2 -2
  13. package/dist/demo/assets/js/formeo.umd.js +18459 -12279
  14. package/dist/demo/assets/js/html.min.js +8 -0
  15. package/dist/demo/assets/js/layout.min.js +8 -0
  16. package/dist/demo/assets/js/mode-json.min.js +1 -1
  17. package/dist/demo/assets/js/mode-json.min.js.gz +0 -0
  18. package/dist/demo/assets/js/theme-github_light_default.min.js +1 -1
  19. package/dist/demo/assets/lang/af-ZA.json +1 -1
  20. package/dist/demo/assets/lang/af-ZA.lang +2 -0
  21. package/dist/demo/assets/lang/ar-TN.json +1 -1
  22. package/dist/demo/assets/lang/ar-TN.lang +2 -0
  23. package/dist/demo/assets/lang/cs-CZ.json +1 -1
  24. package/dist/demo/assets/lang/cs-CZ.lang +2 -0
  25. package/dist/demo/assets/lang/de-DE.json +1 -1
  26. package/dist/demo/assets/lang/de-DE.lang +2 -0
  27. package/dist/demo/assets/lang/en-US.json +1 -1
  28. package/dist/demo/assets/lang/en-US.lang +2 -0
  29. package/dist/demo/assets/lang/es-ES.json +1 -1
  30. package/dist/demo/assets/lang/es-ES.lang +2 -0
  31. package/dist/demo/assets/lang/fa-IR.json +1 -1
  32. package/dist/demo/assets/lang/fa-IR.lang +2 -0
  33. package/dist/demo/assets/lang/fi-FI.json +1 -1
  34. package/dist/demo/assets/lang/fi-FI.lang +2 -0
  35. package/dist/demo/assets/lang/fr-FR.json +1 -1
  36. package/dist/demo/assets/lang/fr-FR.lang +2 -0
  37. package/dist/demo/assets/lang/he-IL.json +1 -1
  38. package/dist/demo/assets/lang/he-IL.lang +2 -0
  39. package/dist/demo/assets/lang/hi-IN.json +1 -1
  40. package/dist/demo/assets/lang/hi-IN.lang +2 -0
  41. package/dist/demo/assets/lang/hu-HU.json +1 -1
  42. package/dist/demo/assets/lang/hu-HU.lang +2 -0
  43. package/dist/demo/assets/lang/it-IT.json +1 -1
  44. package/dist/demo/assets/lang/it-IT.lang +2 -0
  45. package/dist/demo/assets/lang/ja-JP.json +1 -1
  46. package/dist/demo/assets/lang/ja-JP.lang +2 -0
  47. package/dist/demo/assets/lang/nb-NO.json +1 -1
  48. package/dist/demo/assets/lang/nb-NO.lang +2 -0
  49. package/dist/demo/assets/lang/pl-PL.json +1 -1
  50. package/dist/demo/assets/lang/pl-PL.lang +2 -0
  51. package/dist/demo/assets/lang/pt-BR.json +1 -1
  52. package/dist/demo/assets/lang/pt-BR.lang +2 -0
  53. package/dist/demo/assets/lang/pt-PT.json +1 -1
  54. package/dist/demo/assets/lang/pt-PT.lang +2 -0
  55. package/dist/demo/assets/lang/ro-RO.json +1 -1
  56. package/dist/demo/assets/lang/ro-RO.lang +2 -0
  57. package/dist/demo/assets/lang/ru-RU.json +1 -1
  58. package/dist/demo/assets/lang/ru-RU.lang +2 -0
  59. package/dist/demo/assets/lang/th-TH.json +1 -1
  60. package/dist/demo/assets/lang/th-TH.lang +2 -0
  61. package/dist/demo/assets/lang/tr-TR.json +1 -1
  62. package/dist/demo/assets/lang/tr-TR.lang +2 -0
  63. package/dist/demo/assets/lang/zh-CN.json +1 -1
  64. package/dist/demo/assets/lang/zh-CN.lang +2 -0
  65. package/dist/demo/assets/lang/zh-HK.json +1 -1
  66. package/dist/demo/assets/lang/zh-HK.lang +2 -0
  67. package/dist/demo/index.html +1 -1
  68. package/dist/formData_schema.json +1 -360
  69. package/dist/formeo.cjs.js +18302 -12122
  70. package/dist/formeo.css +50 -36
  71. package/dist/formeo.es.js +18301 -12123
  72. package/dist/formeo.min.cjs.js +2 -2
  73. package/dist/formeo.min.css +3 -2
  74. package/dist/formeo.min.es.js +2 -3
  75. package/dist/formeo.min.js +18459 -12279
  76. package/dist/formeo.min.umd.js +2 -2
  77. package/dist/formeo.umd.js +18459 -12279
  78. package/package.json +11 -10
  79. package/dist/demo/assets/js/index.min.js +0 -8
  80. package/dist/demo/assets/js/index.min2.js +0 -8
  81. package/dist/demo/assets/js/index.min3.js +0 -8
@@ -1,13 +1,15 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 5.0.0
4
+ Version: 5.0.2
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7
 
8
- (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))n(p);new MutationObserver(p=>{for(const h of p)if(h.type==="childList")for(const g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&n(g)}).observe(document,{childList:!0,subtree:!0});function t(p){const h={};return p.integrity&&(h.integrity=p.integrity),p.referrerPolicy&&(h.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?h.credentials="include":p.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function n(p){if(p.ep)return;p.ep=!0;const h=t(p);fetch(p.href,h)}})();const pd={"en-US":{"en-US":"English",dir:"ltr","af-ZA":"Afrikaans (South Africa)","ar-TN":"Arabic (Tunisia)","cs-CZ":"Czech (Czechia)","de-DE":"German (Germany)","es-ES":"European Spanish","fa-IR":"Persian (Iran)","fi-FI":"Finnish (Finland)","fr-FR":"French (France)","hu-HU":"Hungarian (Hungary)","it-IT":"Italian (Italy)","ja-JP":"Japanese (Japan)","nb-NO":"Norwegian Bokmål (Norway)","pl-PL":"Polish (Poland)","pt-BR":"Brazilian Portuguese","pt-PT":"European Portuguese","ro-RO":"Romanian (Romania)","ru-RU":"Russian (Russia)","th-TH":"Thai (Thailand)","tr-TR":"Turkish (Türkiye)","zh-CN":"Chinese (China)","zh-HK":"Chinese (Hong Kong SAR China)","action.add.attrs.attr":"What attribute would you like to add?","action.add.attrs.value":"Default Value",addOption:"Add Option",allFieldsRemoved:"All fields were removed.",allowSelect:"Allow Select",and:"and",attribute:"Attribute",attributeNotPermitted:'Attribute "{attribute}" is not permitted, please choose another.',attributes:"Attributes","attrs.class":"Class","attrs.className":"Class","attrs.dir":"Direction","attrs.id":"Id","attrs.required":"Required","attrs.style":"Style","attrs.title":"Title","attrs.type":"Type","attrs.value":"Value",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",cannotClearFields:"There are no fields to clear",checkbox:"Checkbox",checkboxes:"Checkboxes",class:"Class",clear:"Clear",clearAllMessage:"Are you sure you want to clear all fields?",close:"Close",column:"Column","condition.target.placeholder":"target","condition.type.and":"And","condition.type.if":"If","condition.type.or":"Or","condition.type.then":"Then","condition.value.placeholder":"value",confirmClearAll:"Are you sure you want to remove all fields?",content:"Content",control:"Control","controlGroups.nextGroup":"Next Group","controlGroups.prevGroup":"Previous Group","controls.filteringTerm":'Filtering "{term}"',"controls.form.button":"Button","controls.form.checkbox-group":"Checkbox Group","controls.form.input.date":"Date","controls.form.input.email":"Email","controls.form.input.file":"File Upload","controls.form.input.hidden":"Hidden Input","controls.form.input.number":"Number","controls.form.input.text":"Text Input","controls.form.radio-group":"Radio Group","controls.form.select":"Select","controls.form.textarea":"TextArea","controls.groups.form":"Form Fields","controls.groups.html":"HTML Elements","controls.groups.layout":"Layout","controls.html.divider":"Divider","controls.html.header":"Header","controls.html.paragraph":"Paragraph","controls.layout.column":"Column","controls.layout.row":"Row",copy:"Copy To Clipboard",danger:"Danger",defineColumnLayout:"Define a column layout",defineColumnWidths:"Define column widths",description:"Help Text",descriptionField:"Description","editing.row":"Editing Row",editorTitle:"Form Elements",field:"Field","field.property.invalid":"not valid","field.property.isChecked":"is checked","field.property.isNotVisible":"is not visible","field.property.isVisible":"is visible","field.property.label":"label","field.property.valid":"valid","field.property.value":"value",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to get started.",group:"Group",grouped:"Grouped",hidden:"Hidden Input",hide:"Edit",htmlElements:"HTML Elements",if:"If","if.condition.source.placeholder":"source","if.condition.target.placeholder":"target / value",info:"Info","input.date":"Date","input.text":"Text",label:"Label",labelCount:"{label} {count}",labelEmpty:"Field Label cannot be empty","lang.af":"Afrikaans","lang.ar":"Arabic","lang.cs":"Czech","lang.de":"German","lang.en":"English","lang.es":"Spanish","lang.fa":"Persian","lang.fi":"Finnish","lang.fr":"French","lang.hu":"Hungarian","lang.it":"Italian","lang.ja":"Japanese","lang.nb":"Norwegian Bokmål","lang.pl":"Polish","lang.pt":"Portuguese","lang.ro":"Romanian","lang.ru":"Russian","lang.th":"Thai","lang.tr":"Turkish","lang.zh":"Chinese",layout:"Layout",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length","meta.group":"Group","meta.icon":"Ico","meta.label":"Label",minOptionMessage:"This field requires a minimum of 2 options",name:"Name",newOptionLabel:"New {type}",no:"No",number:"Number",off:"Off",on:"On","operator.contains":"contains","operator.equals":"equals","operator.notContains":"not contains","operator.notEquals":"not equal","operator.notVisible":"not visible","operator.visible":"visible",option:"Option",optional:"optional",optionEmpty:"Option value required",optionLabel:"Option {count}",options:"Options",or:"or",order:"Order","panel.label.attrs":"Attributes","panel.label.conditions":"Conditions","panel.label.config":"Configuration","panel.label.meta":"Meta","panel.label.options":"Options","panelEditButtons.attrs":"+ Attribute","panelEditButtons.conditions":"+ Condition","panelEditButtons.options":"+ Option",placeholder:"Placeholder","placeholder.className":"space separated classes","placeholder.email":"Enter you email","placeholder.label":"Label","placeholder.password":"Enter your password","placeholder.placeholder":"Placeholder","placeholder.text":"Enter some Text","placeholder.textarea":"Enter a lot of text","placeholder.value":"Value",preview:"Preview",primary:"Primary",remove:"Remove",removeMessage:"Remove Element",removeType:"Remove {type}",required:"Required",reset:"Reset",richText:"Rich Text Editor",roles:"Access",row:"Row","row.makeInputGroup":"Make this row an input group.","row.makeInputGroupDesc":"Input Groups enable users to add sets of inputs at a time.","row.settings.fieldsetWrap":"Wrap row in a <fieldset> tag","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset",save:"Save",secondary:"Secondary",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",selectOptions:"Options",separator:"Separator",settings:"Settings",size:"Size",sizes:"Sizes","sizes.lg":"Large","sizes.m":"Default","sizes.sm":"Small","sizes.xs":"Extra Small",style:"Style",styles:"Styles","styles.btn":"Button Style","styles.btn.danger":"Danger","styles.btn.default":"Default","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",success:"Success",text:"Text Field",then:"Then","then.condition.target.placeholder":"target",toggle:"Toggle",ungrouped:"Un-Grouped",warning:"Warning",yes:"Yes"}},gd=pd["en-US"];async function md(l){try{const e=await fetch(l);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=l.endsWith(".lang")?"text":"json";return await e[t]()}catch(e){throw console.error("There has been a problem with your fetch operation:",e),e}}const ma={extension:".lang",location:"assets/lang/",langs:["en-US"],locale:"en-US",override:{}};class Xt{constructor(e=ma){this.langs=Object.create(null),this.loaded=[],this.processConfig(e)}processConfig(e){const{location:t,...n}={...ma,...e},p=t.replace(/\/?$/,"/");this.config={location:p,...n};const{override:h,preloaded:g={}}=this.config,m=Object.entries(this.langs).concat(Object.entries(h||g));this.langs=m.reduce((c,[d,r])=>(c[d]=this.applyLanguage(d,r),c),{}),this.locale=this.config.locale||this.config.langs[0]}init(e){return this.processConfig({...this.config,...e}),this.setCurrent(this.locale)}addLanguage(e,t={}){t=typeof t=="string"?Xt.processFile(t):t,this.applyLanguage(e,t),this.config.langs.push("locale")}getValue(e,t=this.locale){var n;return((n=this.langs[t])==null?void 0:n[e])||this.getFallbackValue(e)}getFallbackValue(e){const t=Object.values(this.langs).find(n=>n[e]);return t?.[e]}makeSafe(e){const t={"{":"\\{","}":"\\}","|":"\\|"};return e=e.replace(/[{}|]/g,n=>t[n]),new RegExp(e,"g")}put(e,t){return this.current[e]=t,t}get(e,t){const n=this;let p=this.getValue(e);if(!p)return;const h=p.match(/\{[^}]+?\}/g);if(t&&h)if(typeof t=="object")for(const g of h){const m=g.substring(1,g.length-1);p=p.replace(n.makeSafe(g),t[m]||"")}else p=p.replace(/\{[^}]+?\}/g,t);return p}static processFile(e){return Xt.fromFile(e.replace(/\n\n/g,`
9
- `))}static fromFile(e){const t=e.split(`
10
- `),n={};for(let p,h=0;h<t.length;h++)p=/^(.+?) *?= *?([^\n]+)/.exec(t[h]),p&&(n[p[1]]=p[2].replace(/(^\s+|\s+$)/g,""));return n}loadLang(e,t=!0){const n=this;return new Promise(function(p,h){if(n.loaded.indexOf(e)!==-1&&t)return n.applyLanguage(n.langs[e]),p(n.langs[e]);{const g=[n.config.location,e,n.config.extension].join("");return md(g).then(m=>{const c=Xt.processFile(m);return n.applyLanguage(e,c),n.loaded.push(e),p(n.langs[e])}).catch(m=>{console.error(m);const c=n.applyLanguage(e);p(c)})}})}applyLanguage(e,t={}){const n=this.config.override[e]||{},p=this.langs[e]||{};return this.langs[e]={...p,...t,...n},this.langs[e]}get getLangs(){return this.config.langs}async setCurrent(e="en-US"){return await this.loadLang(e),this.locale=e,this.current=this.langs[e],this.current}}const X=new Xt;(function(){try{if(typeof document<"u"){var l=document.createElement("style");l.appendChild(document.createTextNode('._3x4ZIcu-{position:absolute;background:#1f2937;color:#fff;padding:.75rem;border-radius:.375rem;max-width:200px;z-index:50;visibility:hidden;opacity:0;transition:opacity .2s;pointer-events:none;left:0;top:0}._3x4ZIcu-.JIt36hCJ{visibility:visible;opacity:1;pointer-events:all}._3x4ZIcu-:before{content:"";position:absolute;width:0;height:0;border:6px solid transparent}._3x4ZIcu-[data-position=top]:before{border-top-color:#1f2937;bottom:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=bottom]:before{border-bottom-color:#1f2937;top:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=left]:before{border-left-color:#1f2937;right:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=right]:before{border-right-color:#1f2937;left:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=top-left]:before{border-top-color:#1f2937;bottom:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=top-right]:before{border-top-color:#1f2937;bottom:-12px;right:12px;left:auto;transform:none}._3x4ZIcu-[data-position=bottom-left]:before{border-bottom-color:#1f2937;top:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=bottom-right]:before{border-bottom-color:#1f2937;top:-12px;right:12px;left:auto;transform:none}')),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var vd=Object.defineProperty,yd=(l,e,t)=>e in l?vd(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,Xe=(l,e,t)=>yd(l,typeof e!="symbol"?e+"":e,t);const bd="_3x4ZIcu-",wd="JIt36hCJ",zt={tooltip:bd,visible:wd},Cd={triggerName:"tooltip"};class Uu{constructor(e=Cd){Xe(this,"triggerName"),Xe(this,"tooltip"),Xe(this,"activeTriggerType",null),Xe(this,"spacing",12),Xe(this,"handleClick",t=>{const n=this.triggerName,p=t.target.closest(`[${n}][${n}-type="click"]`);if(p)if(this.isVisible())this.hide();else{const h=p.getAttribute(`${n}`);this.show(p,h),this.activeTriggerType="click"}else this.hide()}),Xe(this,"handleMouseOver",t=>{const n=this.triggerName,p=t.target.closest(`[${n}]`);if(this.activeTriggerType!=="click"&&p?.getAttribute(`${n}-type`)!=="click"){const h=p?.getAttribute(`${n}`);h&&(this.show(p,h),this.activeTriggerType="hover")}}),Xe(this,"handleMouseOut",t=>{const n=this.triggerName,p=t.target.closest(`[${n}]`);this.activeTriggerType!=="click"&&p?.getAttribute(`${n}-type`)!=="click"&&this.hide()}),Xe(this,"handleResize",()=>{this.isVisible()&&this.hide()}),Xe(this,"handleScroll",()=>{this.isVisible()&&this.hide()}),this.triggerName=`data-${e.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${zt.tooltip}`,document.body.appendChild(this.tooltip),this.setupEventListeners()}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("touchstart",this.handleMouseOver),document.addEventListener("touchend",this.handleMouseOut),document.addEventListener("click",this.handleClick),window.addEventListener("resize",this.handleResize),window.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(zt.visible)}calculatePosition(e){const t=e.getBoundingClientRect(),n=this.tooltip.getBoundingClientRect(),p=[{name:"top",x:t.left+(t.width-n.width)/2,y:t.top-n.height-this.spacing},{name:"bottom",x:t.left+(t.width-n.width)/2,y:t.bottom+this.spacing},{name:"left",x:t.left-n.width-this.spacing,y:t.top+(t.height-n.height)/2},{name:"right",x:t.right+this.spacing,y:t.top+(t.height-n.height)/2},{name:"top-left",x:t.left,y:t.top-n.height-this.spacing},{name:"top-right",x:t.right-n.width,y:t.top-n.height-this.spacing},{name:"bottom-left",x:t.left,y:t.bottom+this.spacing},{name:"bottom-right",x:t.right-n.width,y:t.bottom+this.spacing}];return p.find(h=>this.fitsInViewport(h,n))||p[0]}fitsInViewport(e,t){return e.x>=0&&e.y>=0&&e.x+t.width<=window.innerWidth&&e.y+t.height<=window.innerHeight?[[e.x,e.y],[e.x+t.width,e.y],[e.x,e.y+t.height],[e.x+t.width,e.y+t.height],[e.x+t.width/2,e.y+t.height/2]].flatMap(([m,c])=>Array.from(document.elementsFromPoint(m,c))).filter(m=>{if(this.tooltip.contains(m)||m===this.tooltip||m.classList.contains(zt.tooltip)||getComputedStyle(m).pointerEvents==="none")return!1}).length===0:!1}show(e,t){this.tooltip.innerHTML=t??"",this.tooltip.classList.add(zt.visible);const n=this.calculatePosition(e);this.tooltip.style.left=`${n.x}px`,this.tooltip.style.top=`${n.y}px`,this.tooltip.dataset.position=n.name}hide(){this.tooltip.classList.remove(zt.visible),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("touchstart",this.handleMouseOver),document.removeEventListener("touchend",this.handleMouseOut),document.removeEventListener("click",this.handleClick),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove()}}window!==void 0&&(window.SmartTooltip=Uu);const Sd="formeo",Ad="5.0.0",Gu={name:Sd,version:Ad};var dn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nt(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var ri,va;function $d(){if(va)return ri;va=1;function l(){this.__data__=[],this.size=0}return ri=l,ri}var oi,ya;function ln(){if(ya)return oi;ya=1;function l(e,t){return e===t||e!==e&&t!==t}return oi=l,oi}var si,ba;function zn(){if(ba)return si;ba=1;var l=ln();function e(t,n){for(var p=t.length;p--;)if(l(t[p][0],n))return p;return-1}return si=e,si}var ai,wa;function xd(){if(wa)return ai;wa=1;var l=zn(),e=Array.prototype,t=e.splice;function n(p){var h=this.__data__,g=l(h,p);if(g<0)return!1;var m=h.length-1;return g==m?h.pop():t.call(h,g,1),--this.size,!0}return ai=n,ai}var li,Ca;function Ed(){if(Ca)return li;Ca=1;var l=zn();function e(t){var n=this.__data__,p=l(n,t);return p<0?void 0:n[p][1]}return li=e,li}var ci,Sa;function Md(){if(Sa)return ci;Sa=1;var l=zn();function e(t){return l(this.__data__,t)>-1}return ci=e,ci}var ui,Aa;function Td(){if(Aa)return ui;Aa=1;var l=zn();function e(t,n){var p=this.__data__,h=l(p,t);return h<0?(++this.size,p.push([t,n])):p[h][1]=n,this}return ui=e,ui}var hi,$a;function Bn(){if($a)return hi;$a=1;var l=$d(),e=xd(),t=Ed(),n=Md(),p=Td();function h(g){var m=-1,c=g==null?0:g.length;for(this.clear();++m<c;){var d=g[m];this.set(d[0],d[1])}}return h.prototype.clear=l,h.prototype.delete=e,h.prototype.get=t,h.prototype.has=n,h.prototype.set=p,hi=h,hi}var di,xa;function _d(){if(xa)return di;xa=1;var l=Bn();function e(){this.__data__=new l,this.size=0}return di=e,di}var fi,Ea;function Ld(){if(Ea)return fi;Ea=1;function l(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}return fi=l,fi}var pi,Ma;function Rd(){if(Ma)return pi;Ma=1;function l(e){return this.__data__.get(e)}return pi=l,pi}var gi,Ta;function kd(){if(Ta)return gi;Ta=1;function l(e){return this.__data__.has(e)}return gi=l,gi}var mi,_a;function qu(){if(_a)return mi;_a=1;var l=typeof dn=="object"&&dn&&dn.Object===Object&&dn;return mi=l,mi}var vi,La;function Ze(){if(La)return vi;La=1;var l=qu(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=l||e||Function("return this")();return vi=t,vi}var yi,Ra;function jn(){if(Ra)return yi;Ra=1;var l=Ze(),e=l.Symbol;return yi=e,yi}var bi,ka;function Dd(){if(ka)return bi;ka=1;var l=jn(),e=Object.prototype,t=e.hasOwnProperty,n=e.toString,p=l?l.toStringTag:void 0;function h(g){var m=t.call(g,p),c=g[p];try{g[p]=void 0;var d=!0}catch{}var r=n.call(g);return d&&(m?g[p]=c:delete g[p]),r}return bi=h,bi}var wi,Da;function Od(){if(Da)return wi;Da=1;var l=Object.prototype,e=l.toString;function t(n){return e.call(n)}return wi=t,wi}var Ci,Oa;function Ft(){if(Oa)return Ci;Oa=1;var l=jn(),e=Dd(),t=Od(),n="[object Null]",p="[object Undefined]",h=l?l.toStringTag:void 0;function g(m){return m==null?m===void 0?p:n:h&&h in Object(m)?e(m):t(m)}return Ci=g,Ci}var Si,Ia;function ht(){if(Ia)return Si;Ia=1;function l(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return Si=l,Si}var Ai,Na;function ks(){if(Na)return Ai;Na=1;var l=Ft(),e=ht(),t="[object AsyncFunction]",n="[object Function]",p="[object GeneratorFunction]",h="[object Proxy]";function g(m){if(!e(m))return!1;var c=l(m);return c==n||c==p||c==t||c==h}return Ai=g,Ai}var $i,Fa;function Id(){if(Fa)return $i;Fa=1;var l=Ze(),e=l["__core-js_shared__"];return $i=e,$i}var xi,Pa;function Nd(){if(Pa)return xi;Pa=1;var l=Id(),e=(function(){var n=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function t(n){return!!e&&e in n}return xi=t,xi}var Ei,Ha;function Ku(){if(Ha)return Ei;Ha=1;var l=Function.prototype,e=l.toString;function t(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return Ei=t,Ei}var Mi,Wa;function Fd(){if(Wa)return Mi;Wa=1;var l=ks(),e=Nd(),t=ht(),n=Ku(),p=/[\\^$.*+?()[\]{}|]/g,h=/^\[object .+?Constructor\]$/,g=Function.prototype,m=Object.prototype,c=g.toString,d=m.hasOwnProperty,r=RegExp("^"+c.call(d).replace(p,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function o(a){if(!t(a)||e(a))return!1;var s=l(a)?r:h;return s.test(n(a))}return Mi=o,Mi}var Ti,za;function Pd(){if(za)return Ti;za=1;function l(e,t){return e?.[t]}return Ti=l,Ti}var _i,Ba;function St(){if(Ba)return _i;Ba=1;var l=Fd(),e=Pd();function t(n,p){var h=e(n,p);return l(h)?h:void 0}return _i=t,_i}var Li,ja;function Ds(){if(ja)return Li;ja=1;var l=St(),e=Ze(),t=l(e,"Map");return Li=t,Li}var Ri,Va;function Vn(){if(Va)return Ri;Va=1;var l=St(),e=l(Object,"create");return Ri=e,Ri}var ki,Ua;function Hd(){if(Ua)return ki;Ua=1;var l=Vn();function e(){this.__data__=l?l(null):{},this.size=0}return ki=e,ki}var Di,Ga;function Wd(){if(Ga)return Di;Ga=1;function l(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return Di=l,Di}var Oi,qa;function zd(){if(qa)return Oi;qa=1;var l=Vn(),e="__lodash_hash_undefined__",t=Object.prototype,n=t.hasOwnProperty;function p(h){var g=this.__data__;if(l){var m=g[h];return m===e?void 0:m}return n.call(g,h)?g[h]:void 0}return Oi=p,Oi}var Ii,Ka;function Bd(){if(Ka)return Ii;Ka=1;var l=Vn(),e=Object.prototype,t=e.hasOwnProperty;function n(p){var h=this.__data__;return l?h[p]!==void 0:t.call(h,p)}return Ii=n,Ii}var Ni,Ya;function jd(){if(Ya)return Ni;Ya=1;var l=Vn(),e="__lodash_hash_undefined__";function t(n,p){var h=this.__data__;return this.size+=this.has(n)?0:1,h[n]=l&&p===void 0?e:p,this}return Ni=t,Ni}var Fi,Za;function Vd(){if(Za)return Fi;Za=1;var l=Hd(),e=Wd(),t=zd(),n=Bd(),p=jd();function h(g){var m=-1,c=g==null?0:g.length;for(this.clear();++m<c;){var d=g[m];this.set(d[0],d[1])}}return h.prototype.clear=l,h.prototype.delete=e,h.prototype.get=t,h.prototype.has=n,h.prototype.set=p,Fi=h,Fi}var Pi,Xa;function Ud(){if(Xa)return Pi;Xa=1;var l=Vd(),e=Bn(),t=Ds();function n(){this.size=0,this.__data__={hash:new l,map:new(t||e),string:new l}}return Pi=n,Pi}var Hi,Qa;function Gd(){if(Qa)return Hi;Qa=1;function l(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return Hi=l,Hi}var Wi,Ja;function Un(){if(Ja)return Wi;Ja=1;var l=Gd();function e(t,n){var p=t.__data__;return l(n)?p[typeof n=="string"?"string":"hash"]:p.map}return Wi=e,Wi}var zi,el;function qd(){if(el)return zi;el=1;var l=Un();function e(t){var n=l(this,t).delete(t);return this.size-=n?1:0,n}return zi=e,zi}var Bi,tl;function Kd(){if(tl)return Bi;tl=1;var l=Un();function e(t){return l(this,t).get(t)}return Bi=e,Bi}var ji,nl;function Yd(){if(nl)return ji;nl=1;var l=Un();function e(t){return l(this,t).has(t)}return ji=e,ji}var Vi,il;function Zd(){if(il)return Vi;il=1;var l=Un();function e(t,n){var p=l(this,t),h=p.size;return p.set(t,n),this.size+=p.size==h?0:1,this}return Vi=e,Vi}var Ui,rl;function Os(){if(rl)return Ui;rl=1;var l=Ud(),e=qd(),t=Kd(),n=Yd(),p=Zd();function h(g){var m=-1,c=g==null?0:g.length;for(this.clear();++m<c;){var d=g[m];this.set(d[0],d[1])}}return h.prototype.clear=l,h.prototype.delete=e,h.prototype.get=t,h.prototype.has=n,h.prototype.set=p,Ui=h,Ui}var Gi,ol;function Xd(){if(ol)return Gi;ol=1;var l=Bn(),e=Ds(),t=Os(),n=200;function p(h,g){var m=this.__data__;if(m instanceof l){var c=m.__data__;if(!e||c.length<n-1)return c.push([h,g]),this.size=++m.size,this;m=this.__data__=new t(c)}return m.set(h,g),this.size=m.size,this}return Gi=p,Gi}var qi,sl;function Yu(){if(sl)return qi;sl=1;var l=Bn(),e=_d(),t=Ld(),n=Rd(),p=kd(),h=Xd();function g(m){var c=this.__data__=new l(m);this.size=c.size}return g.prototype.clear=e,g.prototype.delete=t,g.prototype.get=n,g.prototype.has=p,g.prototype.set=h,qi=g,qi}var Ki,al;function Zu(){if(al)return Ki;al=1;var l=St(),e=(function(){try{var t=l(Object,"defineProperty");return t({},"",{}),t}catch{}})();return Ki=e,Ki}var Yi,ll;function Is(){if(ll)return Yi;ll=1;var l=Zu();function e(t,n,p){n=="__proto__"&&l?l(t,n,{configurable:!0,enumerable:!0,value:p,writable:!0}):t[n]=p}return Yi=e,Yi}var Zi,cl;function Xu(){if(cl)return Zi;cl=1;var l=Is(),e=ln();function t(n,p,h){(h!==void 0&&!e(n[p],h)||h===void 0&&!(p in n))&&l(n,p,h)}return Zi=t,Zi}var Xi,ul;function Qd(){if(ul)return Xi;ul=1;function l(e){return function(t,n,p){for(var h=-1,g=Object(t),m=p(t),c=m.length;c--;){var d=m[e?c:++h];if(n(g[d],d,g)===!1)break}return t}}return Xi=l,Xi}var Qi,hl;function Jd(){if(hl)return Qi;hl=1;var l=Qd(),e=l();return Qi=e,Qi}var Ut={exports:{}};Ut.exports;var dl;function ef(){return dl||(dl=1,(function(l,e){var t=Ze(),n=e&&!e.nodeType&&e,p=n&&!0&&l&&!l.nodeType&&l,h=p&&p.exports===n,g=h?t.Buffer:void 0,m=g?g.allocUnsafe:void 0;function c(d,r){if(r)return d.slice();var o=d.length,a=m?m(o):new d.constructor(o);return d.copy(a),a}l.exports=c})(Ut,Ut.exports)),Ut.exports}var Ji,fl;function Qu(){if(fl)return Ji;fl=1;var l=Ze(),e=l.Uint8Array;return Ji=e,Ji}var er,pl;function tf(){if(pl)return er;pl=1;var l=Qu();function e(t){var n=new t.constructor(t.byteLength);return new l(n).set(new l(t)),n}return er=e,er}var tr,gl;function nf(){if(gl)return tr;gl=1;var l=tf();function e(t,n){var p=n?l(t.buffer):t.buffer;return new t.constructor(p,t.byteOffset,t.length)}return tr=e,tr}var nr,ml;function rf(){if(ml)return nr;ml=1;function l(e,t){var n=-1,p=e.length;for(t||(t=Array(p));++n<p;)t[n]=e[n];return t}return nr=l,nr}var ir,vl;function of(){if(vl)return ir;vl=1;var l=ht(),e=Object.create,t=(function(){function n(){}return function(p){if(!l(p))return{};if(e)return e(p);n.prototype=p;var h=new n;return n.prototype=void 0,h}})();return ir=t,ir}var rr,yl;function Ju(){if(yl)return rr;yl=1;function l(e,t){return function(n){return e(t(n))}}return rr=l,rr}var or,bl;function eh(){if(bl)return or;bl=1;var l=Ju(),e=l(Object.getPrototypeOf,Object);return or=e,or}var sr,wl;function Ns(){if(wl)return sr;wl=1;var l=Object.prototype;function e(t){var n=t&&t.constructor,p=typeof n=="function"&&n.prototype||l;return t===p}return sr=e,sr}var ar,Cl;function sf(){if(Cl)return ar;Cl=1;var l=of(),e=eh(),t=Ns();function n(p){return typeof p.constructor=="function"&&!t(p)?l(e(p)):{}}return ar=n,ar}var lr,Sl;function At(){if(Sl)return lr;Sl=1;function l(e){return e!=null&&typeof e=="object"}return lr=l,lr}var cr,Al;function af(){if(Al)return cr;Al=1;var l=Ft(),e=At(),t="[object Arguments]";function n(p){return e(p)&&l(p)==t}return cr=n,cr}var ur,$l;function th(){if($l)return ur;$l=1;var l=af(),e=At(),t=Object.prototype,n=t.hasOwnProperty,p=t.propertyIsEnumerable,h=l((function(){return arguments})())?l:function(g){return e(g)&&n.call(g,"callee")&&!p.call(g,"callee")};return ur=h,ur}var hr,xl;function $t(){if(xl)return hr;xl=1;var l=Array.isArray;return hr=l,hr}var dr,El;function nh(){if(El)return dr;El=1;var l=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=l}return dr=e,dr}var fr,Ml;function Gn(){if(Ml)return fr;Ml=1;var l=ks(),e=nh();function t(n){return n!=null&&e(n.length)&&!l(n)}return fr=t,fr}var pr,Tl;function lf(){if(Tl)return pr;Tl=1;var l=Gn(),e=At();function t(n){return e(n)&&l(n)}return pr=t,pr}var Gt={exports:{}},gr,_l;function cf(){if(_l)return gr;_l=1;function l(){return!1}return gr=l,gr}Gt.exports;var Ll;function Fs(){return Ll||(Ll=1,(function(l,e){var t=Ze(),n=cf(),p=e&&!e.nodeType&&e,h=p&&!0&&l&&!l.nodeType&&l,g=h&&h.exports===p,m=g?t.Buffer:void 0,c=m?m.isBuffer:void 0,d=c||n;l.exports=d})(Gt,Gt.exports)),Gt.exports}var mr,Rl;function uf(){if(Rl)return mr;Rl=1;var l=Ft(),e=eh(),t=At(),n="[object Object]",p=Function.prototype,h=Object.prototype,g=p.toString,m=h.hasOwnProperty,c=g.call(Object);function d(r){if(!t(r)||l(r)!=n)return!1;var o=e(r);if(o===null)return!0;var a=m.call(o,"constructor")&&o.constructor;return typeof a=="function"&&a instanceof a&&g.call(a)==c}return mr=d,mr}var vr,kl;function hf(){if(kl)return vr;kl=1;var l=Ft(),e=nh(),t=At(),n="[object Arguments]",p="[object Array]",h="[object Boolean]",g="[object Date]",m="[object Error]",c="[object Function]",d="[object Map]",r="[object Number]",o="[object Object]",a="[object RegExp]",s="[object Set]",i="[object String]",u="[object WeakMap]",f="[object ArrayBuffer]",y="[object DataView]",b="[object Float32Array]",E="[object Float64Array]",$="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",M="[object Uint8Array]",R="[object Uint8ClampedArray]",L="[object Uint16Array]",T="[object Uint32Array]",D={};D[b]=D[E]=D[$]=D[A]=D[S]=D[M]=D[R]=D[L]=D[T]=!0,D[n]=D[p]=D[f]=D[h]=D[y]=D[g]=D[m]=D[c]=D[d]=D[r]=D[o]=D[a]=D[s]=D[i]=D[u]=!1;function w(v){return t(v)&&e(v.length)&&!!D[l(v)]}return vr=w,vr}var yr,Dl;function df(){if(Dl)return yr;Dl=1;function l(e){return function(t){return e(t)}}return yr=l,yr}var qt={exports:{}};qt.exports;var Ol;function ff(){return Ol||(Ol=1,(function(l,e){var t=qu(),n=e&&!e.nodeType&&e,p=n&&!0&&l&&!l.nodeType&&l,h=p&&p.exports===n,g=h&&t.process,m=(function(){try{var c=p&&p.require&&p.require("util").types;return c||g&&g.binding&&g.binding("util")}catch{}})();l.exports=m})(qt,qt.exports)),qt.exports}var br,Il;function Ps(){if(Il)return br;Il=1;var l=hf(),e=df(),t=ff(),n=t&&t.isTypedArray,p=n?e(n):l;return br=p,br}var wr,Nl;function ih(){if(Nl)return wr;Nl=1;function l(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}return wr=l,wr}var Cr,Fl;function rh(){if(Fl)return Cr;Fl=1;var l=Is(),e=ln(),t=Object.prototype,n=t.hasOwnProperty;function p(h,g,m){var c=h[g];(!(n.call(h,g)&&e(c,m))||m===void 0&&!(g in h))&&l(h,g,m)}return Cr=p,Cr}var Sr,Pl;function pf(){if(Pl)return Sr;Pl=1;var l=rh(),e=Is();function t(n,p,h,g){var m=!h;h||(h={});for(var c=-1,d=p.length;++c<d;){var r=p[c],o=g?g(h[r],n[r],r,h,n):void 0;o===void 0&&(o=n[r]),m?e(h,r,o):l(h,r,o)}return h}return Sr=t,Sr}var Ar,Hl;function gf(){if(Hl)return Ar;Hl=1;function l(e,t){for(var n=-1,p=Array(e);++n<e;)p[n]=t(n);return p}return Ar=l,Ar}var $r,Wl;function Hs(){if(Wl)return $r;Wl=1;var l=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(n,p){var h=typeof n;return p=p??l,!!p&&(h=="number"||h!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<p}return $r=t,$r}var xr,zl;function oh(){if(zl)return xr;zl=1;var l=gf(),e=th(),t=$t(),n=Fs(),p=Hs(),h=Ps(),g=Object.prototype,m=g.hasOwnProperty;function c(d,r){var o=t(d),a=!o&&e(d),s=!o&&!a&&n(d),i=!o&&!a&&!s&&h(d),u=o||a||s||i,f=u?l(d.length,String):[],y=f.length;for(var b in d)(r||m.call(d,b))&&!(u&&(b=="length"||s&&(b=="offset"||b=="parent")||i&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||p(b,y)))&&f.push(b);return f}return xr=c,xr}var Er,Bl;function mf(){if(Bl)return Er;Bl=1;function l(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}return Er=l,Er}var Mr,jl;function vf(){if(jl)return Mr;jl=1;var l=ht(),e=Ns(),t=mf(),n=Object.prototype,p=n.hasOwnProperty;function h(g){if(!l(g))return t(g);var m=e(g),c=[];for(var d in g)d=="constructor"&&(m||!p.call(g,d))||c.push(d);return c}return Mr=h,Mr}var Tr,Vl;function sh(){if(Vl)return Tr;Vl=1;var l=oh(),e=vf(),t=Gn();function n(p){return t(p)?l(p,!0):e(p)}return Tr=n,Tr}var _r,Ul;function yf(){if(Ul)return _r;Ul=1;var l=pf(),e=sh();function t(n){return l(n,e(n))}return _r=t,_r}var Lr,Gl;function bf(){if(Gl)return Lr;Gl=1;var l=Xu(),e=ef(),t=nf(),n=rf(),p=sf(),h=th(),g=$t(),m=lf(),c=Fs(),d=ks(),r=ht(),o=uf(),a=Ps(),s=ih(),i=yf();function u(f,y,b,E,$,A,S){var M=s(f,b),R=s(y,b),L=S.get(R);if(L){l(f,b,L);return}var T=A?A(M,R,b+"",f,y,S):void 0,D=T===void 0;if(D){var w=g(R),v=!w&&c(R),C=!w&&!v&&a(R);T=R,w||v||C?g(M)?T=M:m(M)?T=n(M):v?(D=!1,T=e(R,!0)):C?(D=!1,T=t(R,!0)):T=[]:o(R)||h(R)?(T=M,h(M)?T=i(M):(!r(M)||d(M))&&(T=p(R))):D=!1}D&&(S.set(R,T),$(T,R,E,A,S),S.delete(R)),l(f,b,T)}return Lr=u,Lr}var Rr,ql;function wf(){if(ql)return Rr;ql=1;var l=Yu(),e=Xu(),t=Jd(),n=bf(),p=ht(),h=sh(),g=ih();function m(c,d,r,o,a){c!==d&&t(d,function(s,i){if(a||(a=new l),p(s))n(c,d,i,r,m,o,a);else{var u=o?o(g(c,i),s,i+"",c,d,a):void 0;u===void 0&&(u=s),e(c,i,u)}},h)}return Rr=m,Rr}var kr,Kl;function ah(){if(Kl)return kr;Kl=1;function l(e){return e}return kr=l,kr}var Dr,Yl;function Cf(){if(Yl)return Dr;Yl=1;function l(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}return Dr=l,Dr}var Or,Zl;function Sf(){if(Zl)return Or;Zl=1;var l=Cf(),e=Math.max;function t(n,p,h){return p=e(p===void 0?n.length-1:p,0),function(){for(var g=arguments,m=-1,c=e(g.length-p,0),d=Array(c);++m<c;)d[m]=g[p+m];m=-1;for(var r=Array(p+1);++m<p;)r[m]=g[m];return r[p]=h(d),l(n,this,r)}}return Or=t,Or}var Ir,Xl;function Af(){if(Xl)return Ir;Xl=1;function l(e){return function(){return e}}return Ir=l,Ir}var Nr,Ql;function $f(){if(Ql)return Nr;Ql=1;var l=Af(),e=Zu(),t=ah(),n=e?function(p,h){return e(p,"toString",{configurable:!0,enumerable:!1,value:l(h),writable:!0})}:t;return Nr=n,Nr}var Fr,Jl;function xf(){if(Jl)return Fr;Jl=1;var l=800,e=16,t=Date.now;function n(p){var h=0,g=0;return function(){var m=t(),c=e-(m-g);if(g=m,c>0){if(++h>=l)return arguments[0]}else h=0;return p.apply(void 0,arguments)}}return Fr=n,Fr}var Pr,ec;function Ef(){if(ec)return Pr;ec=1;var l=$f(),e=xf(),t=e(l);return Pr=t,Pr}var Hr,tc;function Mf(){if(tc)return Hr;tc=1;var l=ah(),e=Sf(),t=Ef();function n(p,h){return t(e(p,h,l),p+"")}return Hr=n,Hr}var Wr,nc;function Tf(){if(nc)return Wr;nc=1;var l=ln(),e=Gn(),t=Hs(),n=ht();function p(h,g,m){if(!n(m))return!1;var c=typeof g;return(c=="number"?e(m)&&t(g,m.length):c=="string"&&g in m)?l(m[g],h):!1}return Wr=p,Wr}var zr,ic;function _f(){if(ic)return zr;ic=1;var l=Mf(),e=Tf();function t(n){return l(function(p,h){var g=-1,m=h.length,c=m>1?h[m-1]:void 0,d=m>2?h[2]:void 0;for(c=n.length>3&&typeof c=="function"?(m--,c):void 0,d&&e(h[0],h[1],d)&&(c=m<3?void 0:c,m=1),p=Object(p);++g<m;){var r=h[g];r&&n(p,r,g,c)}return p})}return zr=t,zr}var Br,rc;function Lf(){if(rc)return Br;rc=1;var l=wf(),e=_f(),t=e(function(n,p,h,g){l(n,p,h,g)});return Br=t,Br}var Rf=Lf();const kf=Nt(Rf),Df=()=>crypto.randomUUID().slice(0,8),Of=()=>Df().slice(0,8),oc=(l="",e)=>{if(!e)return console.warn("utils.match missing argument 2."),!1;const t=/[|\\{}()[\]^*$+?.]/g;let n=typeof e=="string"?[e]:e;n=n.map(h=>h==="*"?"":h.replace(t,"\\$&"));let p=!0;return n.length&&(p=!new RegExp(n.join("|"),"i").exec(l)),p},If=(l,e)=>{const t=l.indexOf(e);t!==-1&&l.splice(t,1)},Le=l=>{const e=l.className?.match(Zf);return e&&Kf[e[0]]},yt=l=>Array.from(new Set(l)),We=l=>l?.attrs?.id||l?.id||Of(),Ue=(l,e)=>kf({},l,e,(n,p)=>{if(Array.isArray(n))return p!=null?yt(n.concat(p)):p;if(Array.isArray(p))return n!=null?yt(p.concat(n)):p}),Ke=l=>{let e;const t=l instanceof Promise;if(l===null||!(typeof l=="object")||t)return l;if(l instanceof Date)return e=new Date,e.setTime(l.getTime()),e;if(Array.isArray(l)){e=[];for(let p=0,h=l.length;p<h;p++)e[p]=Ke(l[p]);return e}if(l instanceof Object){e={};for(const p in l)Object.hasOwn(l,p)&&(e[p]=Ke(l[p]));return e}throw new Error("Unable to copy Object, type not supported.")},jr=(l,e)=>l/e*100,Cs=l=>`${l.toString()}%`,Ws=Object.create(null,{get:{value:l=>{const e=window.sessionStorage?.getItem(l);try{return JSON.parse(e)}catch{return e}}},set:{value:(l,e)=>{try{return window.sessionStorage?.setItem(l,JSON.stringify(e))}catch(t){console.error(t)}}}}),He=l=>/^(stage|row|column|field)s./.test(l),Nf=l=>Vf.test(l);function Ff(l,e=qs){let t=0;return function(...n){const p=Date.now();p-t>=e&&(t=p,l.apply(this,n))}}function Ln(l,e=bt){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>l.apply(this,n),e)}}function Ss(l){return l}function As(){}function qn(l=Object.create(null)){if(typeof l=="string")try{return JSON.parse(l)}catch(e){return console.error("Invalid JSON string provided:",e),Object.create(null)}return l}const vt=l=>l?Ke(qn(l)):Rt();function lh(l,e,t,n={}){if(!e||!l[t][e])return n;const p=`${t}.${e}`;n[p]=l[t][e];const h=Jf.get(t);if(h){const g=l[t][e].data?.children||[];for(const m of g)lh(l,m,h,n)}return n}const Pf='<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acprefix__rect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="acprefix__layer1"><g id="acprefix__text4203"><g id="acprefix__g4212" transform="translate(0.10112835,0.1001358)"><path id="acprefix__path4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acprefix__path4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agprefix__rect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="aiprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="aiprefix__rect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol fill="#000000" viewBox="0 0 24 24" id="f-i-email" xmlns="http://www.w3.org/2000/svg"><path d="M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="aqprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="aqprefix__g4220"><rect id="aqprefix__rect4191" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="aqprefix__g4220-6"><rect id="aqprefix__rect4191-40" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-column" xmlns="http://www.w3.org/2000/svg"><path d="M2 7h2v2H2zM7 7h2v2H7zM12 7h2v2h-2zM2 12h2v2H2zM7 12h2v2H7zM12 12h2v2h-2z" transform="rotate(90 9.25 9.25)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-field" xmlns="http://www.w3.org/2000/svg"><path d="M9.5-6.5h2v2h-2zm-5 0h2v2h-2zm5-5h2v2h-2zm-5 0h2v2h-2z" transform="rotate(90)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-row" xmlns="http://www.w3.org/2000/svg"><path d="M12 9.5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Zm10-5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-stage" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5h2v2H2zM7 4.5h2v2H7zM12 4.5h2v2h-2zM2 9.5h2v2H2zM7 9.5h2v2H7zM12 9.5h2v2h-2zM2-.5h2v2H2zM7-.5h2v2H7zM12-.5h2v2h-2z" transform="translate(0 2.5)"/></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="arprefix__icomoon-ignore"/><path fill="#000" d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><path d="M0 12h1v-1H0Zm15-7h1V4h-1zm-1 7h1v-1h-1zm-2 0h1v-1h-1zm-2 0h1v-1h-1Zm-2 0h1v-1H8Zm-2 0h1v-1H6Zm-2 0h1v-1H4Zm-2 0h1v-1H2Zm13-1h1v-1h-1ZM0 10h1V9H0Zm15-1h1V8h-1ZM0 8h1V7H0Zm15-1h1V6h-1ZM0 6h1V5H0Zm13-1h1V4h-1zm-2 0h1V4h-1ZM9 5h1V4H9ZM7 5h1V4H7ZM5 5h1V4H5ZM3 5h1V4H3ZM1 5h1V4H1Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 32 32" id="f-i-info-circle" xmlns="http://www.w3.org/2000/svg"><path d="m17.962 24.725 1.806.096v2.531h-7.534v-2.406l1.045-.094c.568-.063.916-.254.916-1.014v-8.801c0-.699-.188-.92-.791-.92l-1.106-.062v-2.626h5.666zM15.747 4.648c1.394 0 2.405 1.047 2.405 2.374 0 1.331-1.014 2.313-2.438 2.313-1.454 0-2.404-.982-2.404-2.313 0-1.327.95-2.374 2.437-2.374M16 32C7.178 32 0 24.822 0 16S7.178 0 16 0c8.82 0 16 7.178 16 16s-7.18 16-16 16m0-29C8.832 3 3 8.832 3 16s5.832 13 13 13 13-5.832 13-13S23.168 3 16 3"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="avprefix__icomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L18 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="axprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="axprefix__namedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="axprefix__path4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-plus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12H18M12 6V18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><path d="M193.694-139.2h87.322v510.916h-87.322zM-18.103 159.92V72.597h510.915v87.322z" transform="rotate(45 77.994 208.636)"/></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="bfprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="bfprefix__g7209"><path id="bfprefix__rect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bgprefix__XMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="bhprefix__icomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="biprefix__XMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bjprefix__XMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="boprefix__icomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>',zs=Gu.name,Bs=Gu.version,Kn=zs,Hf="formeo-sprite",Wf=null,zf=`https://cdn.jsdelivr.net/npm/formeo@${Bs}/dist/${Hf}.svg`,Bf=`https://cdn.jsdelivr.net/npm/formeo@${Bs}/dist/formeo.min.css`,sc="https://draggable.github.io/formeo/assets/css/formeo.min.css",ch="f-panel",ct="control-group",Pt=`${Kn}-stage`,tt=`${Kn}-row`,nt=`${Kn}-column`,Ht=`${Kn}-field`,$s="custom-column-widths",uh="column-preset",Vr="resizing-columns",jf=new Map([[Pt,tt],[tt,nt],[nt,Ht]]),js=["stage","row","column","field"],Vs=js.map(l=>`${l}s`);new Map(Vs.map((l,e)=>[l,js[e]]));const Vf=new RegExp(`^${Vs.join("|")}.`),hh=[...js],Uf=[...Vs],Gf=new Map(Uf.map((l,e)=>[l,hh[e]])),Ur=hh.reduce((l,e)=>(l[e]=e,l),{}),qf=[{name:"controls",className:ct},{name:"stage",className:Pt},{name:"row",className:tt},{name:"column",className:nt},{name:"field",className:Ht}],Us={controls:ct,stage:Pt,row:tt,column:nt,field:Ht},Kf=Object.entries(Us).reduce((l,[e,t])=>(l[t]=e,l),{}),Yf=Object.values(Us),Zf=new RegExp(`${Yf.join("|")}`,"g"),{childTypeMapVals:dh,childTypeIndexMapVals:Xf}=qf.reduce((l,{name:e},t,n)=>{const{name:p}=n[t+1]||{};return p&&(l.childTypeMapVals.push([e,p]),l.childTypeIndexMapVals.push([`${e}s`,`${p}s`])),l},{childTypeMapVals:[],childTypeIndexMapVals:[]}),Qf=dh.slice().map(l=>l.slice().reverse()).reverse(),ac=new Map(dh),Jf=new Map(Xf),ep=new Map(Qf.slice()),tp=[[{value:"100.0",label:"100%"}],[{value:"50.0,50.0",label:"50 | 50"},{value:"33.3,66.6",label:"33 | 66"},{value:"66.6,33.3",label:"66 | 33"}],[{value:"33.3,33.3,33.3",label:"33 | 33 | 33"},{value:"25.0,25.0,50.0",label:"25 | 25 | 50"},{value:"50.0,25.0,25.0",label:"50 | 25 | 25"},{value:"25.0,50.0,25.0",label:"25 | 50 | 25"}],[{value:"25.0,25.0,25.0,25.0",label:"25 | 25 | 25 | 25"}],[{value:"20.0,20.0,20.0,20.0,20.0",label:"20 | 20 | 20 | 20 | 20"}],[{value:"16.66,16.66,16.66,16.66,16.66,16.66",label:"16.66 | 16.66 | 16.66 | 16.66 | 16.66 | 16.66"}]],np=new Map(tp.reduce((l,e,t)=>(l.push([t,e]),l),[])),Gs=`${zs}-formData`,lc=`${zs}-locale`,Qe=333,bt=Math.round(Qe/2),qs=Math.round(Qe*2),fh="formeoSaved",on="formeoUpdated",ip="formeoChanged",ph="formeoUpdatedStage",gh="formeoUpdatedRow",mh="formeoUpdatedColumn",vh="formeoUpdatedField",rp="formeoCleared",yh="formeoOnRender",op="formeoConditionUpdated",Ks="formeoAddedRow",Ys="formeoAddedColumn",Zs="formeoAddedField",Xs="formeoRemovedRow",Qs="formeoRemovedColumn",Js="formeoRemovedField",bh={equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},sp={and:"&&",or:"||"},wh={equals:"="},ap=["logical","source","sourceProperty","comparison","target","targetProperty","assignment","value"],cc=["isChecked","isNotChecked"],uc=["isVisible","isNotVisible"],wn=["value"],lp={comparison:bh,assignment:wh,logical:sp},Ch="if",cp="then",ea=()=>({[Ch]:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],[cp]:[{target:"",targetProperty:"",assignment:"",value:""}]}),up=/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)|(\b[0-9a-f]{8}\b)/g,xs=/\bcol-\w+-\d+/g,Sh="f-i-",Rt=()=>({id:We(),stages:{[We()]:{}},rows:{},columns:{},fields:{}}),Rn=["selected","checked"],hp=Rn.toReversed(),dp=new Map([["config",new Set(["label","helpText","hideLabel","labelAfter","disableHtmlLabel","tooltip"])]]),fp="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map(l=>String.raw`\s${l}\s`),pp=new RegExp(String.raw`(?!${fp.join("|")})\w\S*`,"g"),gp=/\s+/g;function Je(l){return typeof l!="string"||l.trim().match(gp)?l:l.replace(pp,t=>t.charAt(0).toUpperCase()+t.substring(1).replace(/[A-Z]/g,n=>` ${n}`))}const Ah=(l,e="-")=>l.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,e),wt=l=>{if(Array.isArray(l))return l;const e=/[.[\]]/g,t=[];let n=0,p=e.exec(l);for(;p!==null;)t.push(l.slice(n,p.index)),n=p.index+p[0].length,p=e.exec(l);return n<l.length&&t.push(l.slice(n)),t.filter(Boolean)},hc=(l,e="-")=>wt(l).join(e),mp=l=>{const e=document.createElement("div");return e.innerHTML=l,e.textContent||e.innerText||""},vp=(l,e,t="…")=>{if(l.length<=e)return l;const n=l.slice(0,e),p=n.lastIndexOf(" ");let h=`${p>0?n.slice(0,p):n}`;return t&&(h+=t),h},yp=/^attrs\.|^meta\.|^options\.|^config\./g;function kn(l){return l.replaceAll(yp,"")}var Gr,dc;function ta(){if(dc)return Gr;dc=1;var l=Ft(),e=At(),t="[object Symbol]";function n(p){return typeof p=="symbol"||e(p)&&l(p)==t}return Gr=n,Gr}var qr,fc;function bp(){if(fc)return qr;fc=1;var l=$t(),e=ta(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function p(h,g){if(l(h))return!1;var m=typeof h;return m=="number"||m=="symbol"||m=="boolean"||h==null||e(h)?!0:n.test(h)||!t.test(h)||g!=null&&h in Object(g)}return qr=p,qr}var Kr,pc;function wp(){if(pc)return Kr;pc=1;var l=Os(),e="Expected a function";function t(n,p){if(typeof n!="function"||p!=null&&typeof p!="function")throw new TypeError(e);var h=function(){var g=arguments,m=p?p.apply(this,g):g[0],c=h.cache;if(c.has(m))return c.get(m);var d=n.apply(this,g);return h.cache=c.set(m,d)||c,d};return h.cache=new(t.Cache||l),h}return t.Cache=l,Kr=t,Kr}var Yr,gc;function Cp(){if(gc)return Yr;gc=1;var l=wp(),e=500;function t(n){var p=l(n,function(g){return h.size===e&&h.clear(),g}),h=p.cache;return p}return Yr=t,Yr}var Zr,mc;function Sp(){if(mc)return Zr;mc=1;var l=Cp(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t=/\\(\\)?/g,n=l(function(p){var h=[];return p.charCodeAt(0)===46&&h.push(""),p.replace(e,function(g,m,c,d){h.push(c?d.replace(t,"$1"):m||g)}),h});return Zr=n,Zr}var Xr,vc;function Ap(){if(vc)return Xr;vc=1;function l(e,t){for(var n=-1,p=e==null?0:e.length,h=Array(p);++n<p;)h[n]=t(e[n],n,e);return h}return Xr=l,Xr}var Qr,yc;function $p(){if(yc)return Qr;yc=1;var l=jn(),e=Ap(),t=$t(),n=ta(),p=l?l.prototype:void 0,h=p?p.toString:void 0;function g(m){if(typeof m=="string")return m;if(t(m))return e(m,g)+"";if(n(m))return h?h.call(m):"";var c=m+"";return c=="0"&&1/m==-1/0?"-0":c}return Qr=g,Qr}var Jr,bc;function Yn(){if(bc)return Jr;bc=1;var l=$p();function e(t){return t==null?"":l(t)}return Jr=e,Jr}var eo,wc;function $h(){if(wc)return eo;wc=1;var l=$t(),e=bp(),t=Sp(),n=Yn();function p(h,g){return l(h)?h:e(h,g)?[h]:t(n(h))}return eo=p,eo}var to,Cc;function xh(){if(Cc)return to;Cc=1;var l=ta();function e(t){if(typeof t=="string"||l(t))return t;var n=t+"";return n=="0"&&1/t==-1/0?"-0":n}return to=e,to}var no,Sc;function xp(){if(Sc)return no;Sc=1;var l=$h(),e=xh();function t(n,p){p=l(p,n);for(var h=0,g=p.length;n!=null&&h<g;)n=n[e(p[h++])];return h&&h==g?n:void 0}return no=t,no}var io,Ac;function Ep(){if(Ac)return io;Ac=1;var l=xp();function e(t,n,p){var h=t==null?void 0:l(t,n);return h===void 0?p:h}return io=e,io}var Mp=Ep();const Tp=Nt(Mp);var ro,$c;function _p(){if($c)return ro;$c=1;var l=rh(),e=$h(),t=Hs(),n=ht(),p=xh();function h(g,m,c,d){if(!n(g))return g;m=e(m,g);for(var r=-1,o=m.length,a=o-1,s=g;s!=null&&++r<o;){var i=p(m[r]),u=c;if(i==="__proto__"||i==="constructor"||i==="prototype")return g;if(r!=a){var f=s[i];u=d?d(f,i,s):void 0,u===void 0&&(u=n(f)?f:t(m[r+1])?[]:{})}l(s,i,u),s=s[i]}return g}return ro=h,ro}var oo,xc;function Lp(){if(xc)return oo;xc=1;var l=_p();function e(t,n,p){return t==null?t:l(t,n,p)}return oo=e,oo}var Rp=Lp();const kp=Nt(Rp),Re=Tp,Zn=kp;function Dp(l,e={}){const t={...l};for(const n in e)Object.hasOwn(e,n)&&(Object.hasOwn(t,n)?Array.isArray(t[n])?t[n].push(e[n]):t[n]=[t[n],e[n]]:t[n]=e[n]);return t}function Cn(...l){return l.flat().reduce((e,t)=>(e[t]=t,e),{})}var so,Ec;function Op(){if(Ec)return so;Ec=1;var l="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,l),this}return so=e,so}var ao,Mc;function Ip(){if(Mc)return ao;Mc=1;function l(e){return this.__data__.has(e)}return ao=l,ao}var lo,Tc;function Np(){if(Tc)return lo;Tc=1;var l=Os(),e=Op(),t=Ip();function n(p){var h=-1,g=p==null?0:p.length;for(this.__data__=new l;++h<g;)this.add(p[h])}return n.prototype.add=n.prototype.push=e,n.prototype.has=t,lo=n,lo}var co,_c;function Fp(){if(_c)return co;_c=1;function l(e,t){for(var n=-1,p=e==null?0:e.length;++n<p;)if(t(e[n],n,e))return!0;return!1}return co=l,co}var uo,Lc;function Pp(){if(Lc)return uo;Lc=1;function l(e,t){return e.has(t)}return uo=l,uo}var ho,Rc;function Eh(){if(Rc)return ho;Rc=1;var l=Np(),e=Fp(),t=Pp(),n=1,p=2;function h(g,m,c,d,r,o){var a=c&n,s=g.length,i=m.length;if(s!=i&&!(a&&i>s))return!1;var u=o.get(g),f=o.get(m);if(u&&f)return u==m&&f==g;var y=-1,b=!0,E=c&p?new l:void 0;for(o.set(g,m),o.set(m,g);++y<s;){var $=g[y],A=m[y];if(d)var S=a?d(A,$,y,m,g,o):d($,A,y,g,m,o);if(S!==void 0){if(S)continue;b=!1;break}if(E){if(!e(m,function(M,R){if(!t(E,R)&&($===M||r($,M,c,d,o)))return E.push(R)})){b=!1;break}}else if(!($===A||r($,A,c,d,o))){b=!1;break}}return o.delete(g),o.delete(m),b}return ho=h,ho}var fo,kc;function Hp(){if(kc)return fo;kc=1;function l(e){var t=-1,n=Array(e.size);return e.forEach(function(p,h){n[++t]=[h,p]}),n}return fo=l,fo}var po,Dc;function Wp(){if(Dc)return po;Dc=1;function l(e){var t=-1,n=Array(e.size);return e.forEach(function(p){n[++t]=p}),n}return po=l,po}var go,Oc;function zp(){if(Oc)return go;Oc=1;var l=jn(),e=Qu(),t=ln(),n=Eh(),p=Hp(),h=Wp(),g=1,m=2,c="[object Boolean]",d="[object Date]",r="[object Error]",o="[object Map]",a="[object Number]",s="[object RegExp]",i="[object Set]",u="[object String]",f="[object Symbol]",y="[object ArrayBuffer]",b="[object DataView]",E=l?l.prototype:void 0,$=E?E.valueOf:void 0;function A(S,M,R,L,T,D,w){switch(R){case b:if(S.byteLength!=M.byteLength||S.byteOffset!=M.byteOffset)return!1;S=S.buffer,M=M.buffer;case y:return!(S.byteLength!=M.byteLength||!D(new e(S),new e(M)));case c:case d:case a:return t(+S,+M);case r:return S.name==M.name&&S.message==M.message;case s:case u:return S==M+"";case o:var v=p;case i:var C=L&g;if(v||(v=h),S.size!=M.size&&!C)return!1;var x=w.get(S);if(x)return x==M;L|=m,w.set(S,M);var _=n(v(S),v(M),L,T,D,w);return w.delete(S),_;case f:if($)return $.call(S)==$.call(M)}return!1}return go=A,go}var mo,Ic;function Bp(){if(Ic)return mo;Ic=1;function l(e,t){for(var n=-1,p=t.length,h=e.length;++n<p;)e[h+n]=t[n];return e}return mo=l,mo}var vo,Nc;function jp(){if(Nc)return vo;Nc=1;var l=Bp(),e=$t();function t(n,p,h){var g=p(n);return e(n)?g:l(g,h(n))}return vo=t,vo}var yo,Fc;function Vp(){if(Fc)return yo;Fc=1;function l(e,t){for(var n=-1,p=e==null?0:e.length,h=0,g=[];++n<p;){var m=e[n];t(m,n,e)&&(g[h++]=m)}return g}return yo=l,yo}var bo,Pc;function Up(){if(Pc)return bo;Pc=1;function l(){return[]}return bo=l,bo}var wo,Hc;function Gp(){if(Hc)return wo;Hc=1;var l=Vp(),e=Up(),t=Object.prototype,n=t.propertyIsEnumerable,p=Object.getOwnPropertySymbols,h=p?function(g){return g==null?[]:(g=Object(g),l(p(g),function(m){return n.call(g,m)}))}:e;return wo=h,wo}var Co,Wc;function qp(){if(Wc)return Co;Wc=1;var l=Ju(),e=l(Object.keys,Object);return Co=e,Co}var So,zc;function Kp(){if(zc)return So;zc=1;var l=Ns(),e=qp(),t=Object.prototype,n=t.hasOwnProperty;function p(h){if(!l(h))return e(h);var g=[];for(var m in Object(h))n.call(h,m)&&m!="constructor"&&g.push(m);return g}return So=p,So}var Ao,Bc;function Yp(){if(Bc)return Ao;Bc=1;var l=oh(),e=Kp(),t=Gn();function n(p){return t(p)?l(p):e(p)}return Ao=n,Ao}var $o,jc;function Zp(){if(jc)return $o;jc=1;var l=jp(),e=Gp(),t=Yp();function n(p){return l(p,t,e)}return $o=n,$o}var xo,Vc;function Xp(){if(Vc)return xo;Vc=1;var l=Zp(),e=1,t=Object.prototype,n=t.hasOwnProperty;function p(h,g,m,c,d,r){var o=m&e,a=l(h),s=a.length,i=l(g),u=i.length;if(s!=u&&!o)return!1;for(var f=s;f--;){var y=a[f];if(!(o?y in g:n.call(g,y)))return!1}var b=r.get(h),E=r.get(g);if(b&&E)return b==g&&E==h;var $=!0;r.set(h,g),r.set(g,h);for(var A=o;++f<s;){y=a[f];var S=h[y],M=g[y];if(c)var R=o?c(M,S,y,g,h,r):c(S,M,y,h,g,r);if(!(R===void 0?S===M||d(S,M,m,c,r):R)){$=!1;break}A||(A=y=="constructor")}if($&&!A){var L=h.constructor,T=g.constructor;L!=T&&"constructor"in h&&"constructor"in g&&!(typeof L=="function"&&L instanceof L&&typeof T=="function"&&T instanceof T)&&($=!1)}return r.delete(h),r.delete(g),$}return xo=p,xo}var Eo,Uc;function Qp(){if(Uc)return Eo;Uc=1;var l=St(),e=Ze(),t=l(e,"DataView");return Eo=t,Eo}var Mo,Gc;function Jp(){if(Gc)return Mo;Gc=1;var l=St(),e=Ze(),t=l(e,"Promise");return Mo=t,Mo}var To,qc;function eg(){if(qc)return To;qc=1;var l=St(),e=Ze(),t=l(e,"Set");return To=t,To}var _o,Kc;function tg(){if(Kc)return _o;Kc=1;var l=St(),e=Ze(),t=l(e,"WeakMap");return _o=t,_o}var Lo,Yc;function ng(){if(Yc)return Lo;Yc=1;var l=Qp(),e=Ds(),t=Jp(),n=eg(),p=tg(),h=Ft(),g=Ku(),m="[object Map]",c="[object Object]",d="[object Promise]",r="[object Set]",o="[object WeakMap]",a="[object DataView]",s=g(l),i=g(e),u=g(t),f=g(n),y=g(p),b=h;return(l&&b(new l(new ArrayBuffer(1)))!=a||e&&b(new e)!=m||t&&b(t.resolve())!=d||n&&b(new n)!=r||p&&b(new p)!=o)&&(b=function(E){var $=h(E),A=$==c?E.constructor:void 0,S=A?g(A):"";if(S)switch(S){case s:return a;case i:return m;case u:return d;case f:return r;case y:return o}return $}),Lo=b,Lo}var Ro,Zc;function ig(){if(Zc)return Ro;Zc=1;var l=Yu(),e=Eh(),t=zp(),n=Xp(),p=ng(),h=$t(),g=Fs(),m=Ps(),c=1,d="[object Arguments]",r="[object Array]",o="[object Object]",a=Object.prototype,s=a.hasOwnProperty;function i(u,f,y,b,E,$){var A=h(u),S=h(f),M=A?r:p(u),R=S?r:p(f);M=M==d?o:M,R=R==d?o:R;var L=M==o,T=R==o,D=M==R;if(D&&g(u)){if(!g(f))return!1;A=!0,L=!1}if(D&&!L)return $||($=new l),A||m(u)?e(u,f,y,b,E,$):t(u,f,M,y,b,E,$);if(!(y&c)){var w=L&&s.call(u,"__wrapped__"),v=T&&s.call(f,"__wrapped__");if(w||v){var C=w?u.value():u,x=v?f.value():f;return $||($=new l),E(C,x,y,b,$)}}return D?($||($=new l),n(u,f,y,b,E,$)):!1}return Ro=i,Ro}var ko,Xc;function rg(){if(Xc)return ko;Xc=1;var l=ig(),e=At();function t(n,p,h,g,m){return n===p?!0:n==null||p==null||!e(n)&&!e(p)?n!==n&&p!==p:l(n,p,h,g,t,m)}return ko=t,ko}var Do,Qc;function og(){if(Qc)return Do;Qc=1;var l=rg();function e(t,n){return l(t,n)}return Do=e,Do}var sg=og();const Es=Nt(sg),ag=(l,e)=>l===void 0?"added":e===void 0?"removed":Es(l,e)?"unchanged":"changed";class na{constructor(e,t=Object.create(null)){this.name=e,this.data=t,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}toJSON=(e,t)=>JSON.stringify(e,null,t);get=e=>Re(this.data,e);set(e,t){const n=Re(this.data,e),p=Zn(this.data,e,t),h=Array.isArray(e)?e.join("."):e,g=Object.keys(this.setCallbacks).filter(c=>new RegExp(c).test(h)),m={newVal:t,oldVal:n,path:e};for(const c of g)for(const d of this.setCallbacks[c])d(m);if(!this.disableEvents){const c={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+e,value:t,data:p,changeType:ag(n,t),src:this.dom};if(n&&(c.previousValue=n),J.formeoUpdated(c),this.name){const r={stage:ph,row:gh,column:mh,field:vh}[this.name];r&&J.formeoUpdated(c,r)}}return p}addSetCallback(e,t){this.setCallbacks[e]?this.setCallbacks[e].push(t):this.setCallbacks[e]=[t]}removeSetCallback(e,t){this.setCallbacks[e]=this.setCallbacks[e].filter(n=>n!==t)}add=(e,t=Object.create(null))=>{const{id:n}=t,p=e||n||We();return this.set(p,t)};remove=e=>{const t=wt(e),n=t.pop(),p=this.get(t);return Array.isArray(p)?p.splice(Number(n),1):p&&delete p[n],p};empty(){this.data=Object.create(null)}getData=()=>Object.entries(this.data).reduce((e,[t,n])=>(e[t]=n?.data?n.getData():n,e),{});setCallbacks={};configVal=Object.create(null)}class Xn extends na{load=e=>{const t=qn(e);this.empty();for(const[n,p]of Object.entries(t))this.add(n,p);return this.data};get=e=>e?Re(this.data,e):this.add();add=(e,t=Object.create(null))=>{const n=e||We(),p=this.Component({...t,id:n});this.data[n]=p,this.active=p;const g={row:Ks,column:Ys,field:Zs}[this.name];return g&&J.formeoUpdated({entity:p,componentId:n,componentType:this.name,data:p.data},g),p};remove=e=>{if(Array.isArray(e))for(const t of e)this.get(t).remove();else this.get(e).remove();return this.data};delete=e=>(delete this.data[e],e);clearAll=(e=!0)=>{const t=Object.values(this.data).map(n=>n.empty(e));return Promise.all(t)};set config(e){this.configVal=Ue(this.configVal,Ke(e))}get config(){return this.configVal}conditionMap=new Map}function Jc(l,e){var t=Object.keys(l);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(l);e&&(n=n.filter(function(p){return Object.getOwnPropertyDescriptor(l,p).enumerable})),t.push.apply(t,n)}return t}function Ye(l){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Jc(Object(t),!0).forEach(function(n){lg(l,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(t)):Jc(Object(t)).forEach(function(n){Object.defineProperty(l,n,Object.getOwnPropertyDescriptor(t,n))})}return l}function Sn(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sn=function(e){return typeof e}:Sn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(l)}function lg(l,e,t){return e in l?Object.defineProperty(l,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):l[e]=t,l}function it(){return it=Object.assign||function(l){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(l[n]=t[n])}return l},it.apply(this,arguments)}function cg(l,e){if(l==null)return{};var t={},n=Object.keys(l),p,h;for(h=0;h<n.length;h++)p=n[h],!(e.indexOf(p)>=0)&&(t[p]=l[p]);return t}function ug(l,e){if(l==null)return{};var t=cg(l,e),n,p;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(l);for(p=0;p<h.length;p++)n=h[p],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(l,n)&&(t[n]=l[n])}return t}var hg="1.15.3";function et(l){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(l)}var ot=et(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),cn=et(/Edge/i),eu=et(/firefox/i),Qt=et(/safari/i)&&!et(/chrome/i)&&!et(/android/i),Mh=et(/iP(ad|od|hone)/i),Th=et(/chrome/i)&&et(/android/i),_h={capture:!1,passive:!1};function se(l,e,t){l.addEventListener(e,t,!ot&&_h)}function oe(l,e,t){l.removeEventListener(e,t,!ot&&_h)}function Dn(l,e){if(e){if(e[0]===">"&&(e=e.substring(1)),l)try{if(l.matches)return l.matches(e);if(l.msMatchesSelector)return l.msMatchesSelector(e);if(l.webkitMatchesSelector)return l.webkitMatchesSelector(e)}catch{return!1}return!1}}function Lh(l){return l.host&&l!==document&&l.host.nodeType?l.host:l.parentNode}function Ve(l,e,t,n){if(l){t=t||document;do{if(e!=null&&(e[0]===">"?l.parentNode===t&&Dn(l,e):Dn(l,e))||n&&l===t)return l;if(l===t)break}while(l=Lh(l))}return null}var tu=/\s+/g;function Ie(l,e,t){if(l&&e)if(l.classList)l.classList[t?"add":"remove"](e);else{var n=(" "+l.className+" ").replace(tu," ").replace(" "+e+" "," ");l.className=(n+(t?" "+e:"")).replace(tu," ")}}function ne(l,e,t){var n=l&&l.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(l,""):l.currentStyle&&(t=l.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function kt(l,e){var t="";if(typeof l=="string")t=l;else do{var n=ne(l,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(l=l.parentNode));var p=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return p&&new p(t)}function Rh(l,e,t){if(l){var n=l.getElementsByTagName(e),p=0,h=n.length;if(t)for(;p<h;p++)t(n[p],p);return n}return[]}function qe(){var l=document.scrollingElement;return l||document.documentElement}function we(l,e,t,n,p){if(!(!l.getBoundingClientRect&&l!==window)){var h,g,m,c,d,r,o;if(l!==window&&l.parentNode&&l!==qe()?(h=l.getBoundingClientRect(),g=h.top,m=h.left,c=h.bottom,d=h.right,r=h.height,o=h.width):(g=0,m=0,c=window.innerHeight,d=window.innerWidth,r=window.innerHeight,o=window.innerWidth),(e||t)&&l!==window&&(p=p||l.parentNode,!ot))do if(p&&p.getBoundingClientRect&&(ne(p,"transform")!=="none"||t&&ne(p,"position")!=="static")){var a=p.getBoundingClientRect();g-=a.top+parseInt(ne(p,"border-top-width")),m-=a.left+parseInt(ne(p,"border-left-width")),c=g+h.height,d=m+h.width;break}while(p=p.parentNode);if(n&&l!==window){var s=kt(p||l),i=s&&s.a,u=s&&s.d;s&&(g/=u,m/=i,o/=i,r/=u,c=g+r,d=m+o)}return{top:g,left:m,bottom:c,right:d,width:o,height:r}}}function nu(l,e,t){for(var n=lt(l,!0),p=we(l)[e];n;){var h=we(n)[t],g=void 0;if(g=p>=h,!g)return n;if(n===qe())break;n=lt(n,!1)}return!1}function Ot(l,e,t,n){for(var p=0,h=0,g=l.children;h<g.length;){if(g[h].style.display!=="none"&&g[h]!==te.ghost&&(n||g[h]!==te.dragged)&&Ve(g[h],t.draggable,l,!1)){if(p===e)return g[h];p++}h++}return null}function ia(l,e){for(var t=l.lastElementChild;t&&(t===te.ghost||ne(t,"display")==="none"||e&&!Dn(t,e));)t=t.previousElementSibling;return t||null}function Pe(l,e){var t=0;if(!l||!l.parentNode)return-1;for(;l=l.previousElementSibling;)l.nodeName.toUpperCase()!=="TEMPLATE"&&l!==te.clone&&(!e||Dn(l,e))&&t++;return t}function iu(l){var e=0,t=0,n=qe();if(l)do{var p=kt(l),h=p.a,g=p.d;e+=l.scrollLeft*h,t+=l.scrollTop*g}while(l!==n&&(l=l.parentNode));return[e,t]}function dg(l,e){for(var t in l)if(l.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===l[t][n])return Number(t)}return-1}function lt(l,e){if(!l||!l.getBoundingClientRect)return qe();var t=l,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var p=ne(t);if(t.clientWidth<t.scrollWidth&&(p.overflowX=="auto"||p.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(p.overflowY=="auto"||p.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return qe();if(n||e)return t;n=!0}}while(t=t.parentNode);return qe()}function fg(l,e){if(l&&e)for(var t in e)e.hasOwnProperty(t)&&(l[t]=e[t]);return l}function Oo(l,e){return Math.round(l.top)===Math.round(e.top)&&Math.round(l.left)===Math.round(e.left)&&Math.round(l.height)===Math.round(e.height)&&Math.round(l.width)===Math.round(e.width)}var Jt;function kh(l,e){return function(){if(!Jt){var t=arguments,n=this;t.length===1?l.call(n,t[0]):l.apply(n,t),Jt=setTimeout(function(){Jt=void 0},e)}}}function pg(){clearTimeout(Jt),Jt=void 0}function Dh(l,e,t){l.scrollLeft+=e,l.scrollTop+=t}function Oh(l){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(l).cloneNode(!0):t?t(l).clone(!0)[0]:l.cloneNode(!0)}function Ih(l,e,t){var n={};return Array.from(l.children).forEach(function(p){var h,g,m,c;if(!(!Ve(p,e.draggable,l,!1)||p.animated||p===t)){var d=we(p);n.left=Math.min((h=n.left)!==null&&h!==void 0?h:1/0,d.left),n.top=Math.min((g=n.top)!==null&&g!==void 0?g:1/0,d.top),n.right=Math.max((m=n.right)!==null&&m!==void 0?m:-1/0,d.right),n.bottom=Math.max((c=n.bottom)!==null&&c!==void 0?c:-1/0,d.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var ke="Sortable"+new Date().getTime();function gg(){var l=[],e;return{captureAnimationState:function(){if(l=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(p){if(!(ne(p,"display")==="none"||p===te.ghost)){l.push({target:p,rect:we(p)});var h=Ye({},l[l.length-1].rect);if(p.thisAnimationDuration){var g=kt(p,!0);g&&(h.top-=g.f,h.left-=g.e)}p.fromRect=h}})}},addAnimationState:function(n){l.push(n)},removeAnimationState:function(n){l.splice(dg(l,{target:n}),1)},animateAll:function(n){var p=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var h=!1,g=0;l.forEach(function(m){var c=0,d=m.target,r=d.fromRect,o=we(d),a=d.prevFromRect,s=d.prevToRect,i=m.rect,u=kt(d,!0);u&&(o.top-=u.f,o.left-=u.e),d.toRect=o,d.thisAnimationDuration&&Oo(a,o)&&!Oo(r,o)&&(i.top-o.top)/(i.left-o.left)===(r.top-o.top)/(r.left-o.left)&&(c=vg(i,a,s,p.options)),Oo(o,r)||(d.prevFromRect=r,d.prevToRect=o,c||(c=p.options.animation),p.animate(d,i,o,c)),c&&(h=!0,g=Math.max(g,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(e),h?e=setTimeout(function(){typeof n=="function"&&n()},g):typeof n=="function"&&n(),l=[]},animate:function(n,p,h,g){if(g){ne(n,"transition",""),ne(n,"transform","");var m=kt(this.el),c=m&&m.a,d=m&&m.d,r=(p.left-h.left)/(c||1),o=(p.top-h.top)/(d||1);n.animatingX=!!r,n.animatingY=!!o,ne(n,"transform","translate3d("+r+"px,"+o+"px,0)"),this.forRepaintDummy=mg(n),ne(n,"transition","transform "+g+"ms"+(this.options.easing?" "+this.options.easing:"")),ne(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){ne(n,"transition",""),ne(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},g)}}}}function mg(l){return l.offsetWidth}function vg(l,e,t,n){return Math.sqrt(Math.pow(e.top-l.top,2)+Math.pow(e.left-l.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var xt=[],Io={initializeByDefault:!0},un={mount:function(e){for(var t in Io)Io.hasOwnProperty(t)&&!(t in e)&&(e[t]=Io[t]);xt.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),xt.push(e)},pluginEvent:function(e,t,n){var p=this;this.eventCanceled=!1,n.cancel=function(){p.eventCanceled=!0};var h=e+"Global";xt.forEach(function(g){t[g.pluginName]&&(t[g.pluginName][h]&&t[g.pluginName][h](Ye({sortable:t},n)),t.options[g.pluginName]&&t[g.pluginName][e]&&t[g.pluginName][e](Ye({sortable:t},n)))})},initializePlugins:function(e,t,n,p){xt.forEach(function(m){var c=m.pluginName;if(!(!e.options[c]&&!m.initializeByDefault)){var d=new m(e,t,e.options);d.sortable=e,d.options=e.options,e[c]=d,it(n,d.defaults)}});for(var h in e.options)if(e.options.hasOwnProperty(h)){var g=this.modifyOption(e,h,e.options[h]);typeof g<"u"&&(e.options[h]=g)}},getEventProperties:function(e,t){var n={};return xt.forEach(function(p){typeof p.eventProperties=="function"&&it(n,p.eventProperties.call(t[p.pluginName],e))}),n},modifyOption:function(e,t,n){var p;return xt.forEach(function(h){e[h.pluginName]&&h.optionListeners&&typeof h.optionListeners[t]=="function"&&(p=h.optionListeners[t].call(e[h.pluginName],n))}),p}};function yg(l){var e=l.sortable,t=l.rootEl,n=l.name,p=l.targetEl,h=l.cloneEl,g=l.toEl,m=l.fromEl,c=l.oldIndex,d=l.newIndex,r=l.oldDraggableIndex,o=l.newDraggableIndex,a=l.originalEvent,s=l.putSortable,i=l.extraEventProperties;if(e=e||t&&t[ke],!!e){var u,f=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!ot&&!cn?u=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent(n,!0,!0)),u.to=g||t,u.from=m||t,u.item=p||t,u.clone=h,u.oldIndex=c,u.newIndex=d,u.oldDraggableIndex=r,u.newDraggableIndex=o,u.originalEvent=a,u.pullMode=s?s.lastPutMode:void 0;var b=Ye(Ye({},i),un.getEventProperties(n,e));for(var E in b)u[E]=b[E];t&&t.dispatchEvent(u),f[y]&&f[y].call(e,u)}}var bg=["evt"],_e=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=n.evt,h=ug(n,bg);un.pluginEvent.bind(te)(e,t,Ye({dragEl:q,parentEl:ve,ghostEl:ie,rootEl:fe,nextEl:mt,lastDownEl:An,cloneEl:pe,cloneHidden:at,dragStarted:Kt,putSortable:Se,activeSortable:te.active,originalEvent:p,oldIndex:_t,oldDraggableIndex:en,newIndex:Ne,newDraggableIndex:st,hideGhostForTarget:Hh,unhideGhostForTarget:Wh,cloneNowHidden:function(){at=!0},cloneNowShown:function(){at=!1},dispatchSortableEvent:function(m){Ee({sortable:t,name:m,originalEvent:p})}},h))};function Ee(l){yg(Ye({putSortable:Se,cloneEl:pe,targetEl:q,rootEl:fe,oldIndex:_t,oldDraggableIndex:en,newIndex:Ne,newDraggableIndex:st},l))}var q,ve,ie,fe,mt,An,pe,at,_t,Ne,en,st,fn,Se,Mt=!1,On=!1,In=[],pt,Be,No,Fo,ru,ou,Kt,Et,tn,nn=!1,pn=!1,$n,Ae,Po=[],Ms=!1,Nn=[],Qn=typeof document<"u",gn=Mh,su=cn||ot?"cssFloat":"float",wg=Qn&&!Th&&!Mh&&"draggable"in document.createElement("div"),Nh=(function(){if(Qn){if(ot)return!1;var l=document.createElement("x");return l.style.cssText="pointer-events:auto",l.style.pointerEvents==="auto"}})(),Fh=function(e,t){var n=ne(e),p=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),h=Ot(e,0,t),g=Ot(e,1,t),m=h&&ne(h),c=g&&ne(g),d=m&&parseInt(m.marginLeft)+parseInt(m.marginRight)+we(h).width,r=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+we(g).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(h&&m.float&&m.float!=="none"){var o=m.float==="left"?"left":"right";return g&&(c.clear==="both"||c.clear===o)?"vertical":"horizontal"}return h&&(m.display==="block"||m.display==="flex"||m.display==="table"||m.display==="grid"||d>=p&&n[su]==="none"||g&&n[su]==="none"&&d+r>p)?"vertical":"horizontal"},Cg=function(e,t,n){var p=n?e.left:e.top,h=n?e.right:e.bottom,g=n?e.width:e.height,m=n?t.left:t.top,c=n?t.right:t.bottom,d=n?t.width:t.height;return p===m||h===c||p+g/2===m+d/2},Sg=function(e,t){var n;return In.some(function(p){var h=p[ke].options.emptyInsertThreshold;if(!(!h||ia(p))){var g=we(p),m=e>=g.left-h&&e<=g.right+h,c=t>=g.top-h&&t<=g.bottom+h;if(m&&c)return n=p}}),n},Ph=function(e){function t(h,g){return function(m,c,d,r){var o=m.options.group.name&&c.options.group.name&&m.options.group.name===c.options.group.name;if(h==null&&(g||o))return!0;if(h==null||h===!1)return!1;if(g&&h==="clone")return h;if(typeof h=="function")return t(h(m,c,d,r),g)(m,c,d,r);var a=(g?m:c).options.group.name;return h===!0||typeof h=="string"&&h===a||h.join&&h.indexOf(a)>-1}}var n={},p=e.group;(!p||Sn(p)!="object")&&(p={name:p}),n.name=p.name,n.checkPull=t(p.pull,!0),n.checkPut=t(p.put),n.revertClone=p.revertClone,e.group=n},Hh=function(){!Nh&&ie&&ne(ie,"display","none")},Wh=function(){!Nh&&ie&&ne(ie,"display","")};Qn&&!Th&&document.addEventListener("click",function(l){if(On)return l.preventDefault(),l.stopPropagation&&l.stopPropagation(),l.stopImmediatePropagation&&l.stopImmediatePropagation(),On=!1,!1},!0);var gt=function(e){if(q){e=e.touches?e.touches[0]:e;var t=Sg(e.clientX,e.clientY);if(t){var n={};for(var p in e)e.hasOwnProperty(p)&&(n[p]=e[p]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[ke]._onDragOver(n)}}},Ag=function(e){q&&q.parentNode[ke]._isOutsideThisEl(e.target)};function te(l,e){if(!(l&&l.nodeType&&l.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(l));this.el=l,this.options=e=it({},e),l[ke]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(l.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fh(l,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(g,m){g.setData("Text",m.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:te.supportPointer!==!1&&"PointerEvent"in window&&!Qt,emptyInsertThreshold:5};un.initializePlugins(this,l,t);for(var n in t)!(n in e)&&(e[n]=t[n]);Ph(e);for(var p in this)p.charAt(0)==="_"&&typeof this[p]=="function"&&(this[p]=this[p].bind(this));this.nativeDraggable=e.forceFallback?!1:wg,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?se(l,"pointerdown",this._onTapStart):(se(l,"mousedown",this._onTapStart),se(l,"touchstart",this._onTapStart)),this.nativeDraggable&&(se(l,"dragover",this),se(l,"dragenter",this)),In.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),it(this,gg())}te.prototype={constructor:te,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Et=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,q):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,p=this.options,h=p.preventOnFilter,g=e.type,m=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,c=(m||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||c,r=p.filter;if(Rg(n),!q&&!(/mousedown|pointerdown/.test(g)&&e.button!==0||p.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Qt&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Ve(c,p.draggable,n,!1),!(c&&c.animated)&&An!==c)){if(_t=Pe(c),en=Pe(c,p.draggable),typeof r=="function"){if(r.call(this,e,c,this)){Ee({sortable:t,rootEl:d,name:"filter",targetEl:c,toEl:n,fromEl:n}),_e("filter",t,{evt:e}),h&&e.cancelable&&e.preventDefault();return}}else if(r&&(r=r.split(",").some(function(o){if(o=Ve(d,o.trim(),n,!1),o)return Ee({sortable:t,rootEl:o,name:"filter",targetEl:c,fromEl:n,toEl:n}),_e("filter",t,{evt:e}),!0}),r)){h&&e.cancelable&&e.preventDefault();return}p.handle&&!Ve(d,p.handle,n,!1)||this._prepareDragStart(e,m,c)}}},_prepareDragStart:function(e,t,n){var p=this,h=p.el,g=p.options,m=h.ownerDocument,c;if(n&&!q&&n.parentNode===h){var d=we(n);if(fe=h,q=n,ve=q.parentNode,mt=q.nextSibling,An=n,fn=g.group,te.dragged=q,pt={target:q,clientX:(t||e).clientX,clientY:(t||e).clientY},ru=pt.clientX-d.left,ou=pt.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,q.style["will-change"]="all",c=function(){if(_e("delayEnded",p,{evt:e}),te.eventCanceled){p._onDrop();return}p._disableDelayedDragEvents(),!eu&&p.nativeDraggable&&(q.draggable=!0),p._triggerDragStart(e,t),Ee({sortable:p,name:"choose",originalEvent:e}),Ie(q,g.chosenClass,!0)},g.ignore.split(",").forEach(function(r){Rh(q,r.trim(),Ho)}),se(m,"dragover",gt),se(m,"mousemove",gt),se(m,"touchmove",gt),se(m,"mouseup",p._onDrop),se(m,"touchend",p._onDrop),se(m,"touchcancel",p._onDrop),eu&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q.draggable=!0),_e("delayStart",this,{evt:e}),g.delay&&(!g.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(cn||ot))){if(te.eventCanceled){this._onDrop();return}se(m,"mouseup",p._disableDelayedDrag),se(m,"touchend",p._disableDelayedDrag),se(m,"touchcancel",p._disableDelayedDrag),se(m,"mousemove",p._delayedDragTouchMoveHandler),se(m,"touchmove",p._delayedDragTouchMoveHandler),g.supportPointer&&se(m,"pointermove",p._delayedDragTouchMoveHandler),p._dragStartTimer=setTimeout(c,g.delay)}else c()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){q&&Ho(q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;oe(e,"mouseup",this._disableDelayedDrag),oe(e,"touchend",this._disableDelayedDrag),oe(e,"touchcancel",this._disableDelayedDrag),oe(e,"mousemove",this._delayedDragTouchMoveHandler),oe(e,"touchmove",this._delayedDragTouchMoveHandler),oe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?se(document,"pointermove",this._onTouchMove):t?se(document,"touchmove",this._onTouchMove):se(document,"mousemove",this._onTouchMove):(se(q,"dragend",this),se(fe,"dragstart",this._onDragStart));try{document.selection?xn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Mt=!1,fe&&q){_e("dragStarted",this,{evt:t}),this.nativeDraggable&&se(document,"dragover",Ag);var n=this.options;!e&&Ie(q,n.dragClass,!1),Ie(q,n.ghostClass,!0),te.active=this,e&&this._appendGhost(),Ee({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Be){this._lastX=Be.clientX,this._lastY=Be.clientY,Hh();for(var e=document.elementFromPoint(Be.clientX,Be.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Be.clientX,Be.clientY),e!==t);)t=e;if(q.parentNode[ke]._isOutsideThisEl(e),t)do{if(t[ke]){var n=void 0;if(n=t[ke]._onDragOver({clientX:Be.clientX,clientY:Be.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=Lh(t));Wh()}},_onTouchMove:function(e){if(pt){var t=this.options,n=t.fallbackTolerance,p=t.fallbackOffset,h=e.touches?e.touches[0]:e,g=ie&&kt(ie,!0),m=ie&&g&&g.a,c=ie&&g&&g.d,d=gn&&Ae&&iu(Ae),r=(h.clientX-pt.clientX+p.x)/(m||1)+(d?d[0]-Po[0]:0)/(m||1),o=(h.clientY-pt.clientY+p.y)/(c||1)+(d?d[1]-Po[1]:0)/(c||1);if(!te.active&&!Mt){if(n&&Math.max(Math.abs(h.clientX-this._lastX),Math.abs(h.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ie){g?(g.e+=r-(No||0),g.f+=o-(Fo||0)):g={a:1,b:0,c:0,d:1,e:r,f:o};var a="matrix(".concat(g.a,",").concat(g.b,",").concat(g.c,",").concat(g.d,",").concat(g.e,",").concat(g.f,")");ne(ie,"webkitTransform",a),ne(ie,"mozTransform",a),ne(ie,"msTransform",a),ne(ie,"transform",a),No=r,Fo=o,Be=h}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ie){var e=this.options.fallbackOnBody?document.body:fe,t=we(q,!0,gn,!0,e),n=this.options;if(gn){for(Ae=e;ne(Ae,"position")==="static"&&ne(Ae,"transform")==="none"&&Ae!==document;)Ae=Ae.parentNode;Ae!==document.body&&Ae!==document.documentElement?(Ae===document&&(Ae=qe()),t.top+=Ae.scrollTop,t.left+=Ae.scrollLeft):Ae=qe(),Po=iu(Ae)}ie=q.cloneNode(!0),Ie(ie,n.ghostClass,!1),Ie(ie,n.fallbackClass,!0),Ie(ie,n.dragClass,!0),ne(ie,"transition",""),ne(ie,"transform",""),ne(ie,"box-sizing","border-box"),ne(ie,"margin",0),ne(ie,"top",t.top),ne(ie,"left",t.left),ne(ie,"width",t.width),ne(ie,"height",t.height),ne(ie,"opacity","0.8"),ne(ie,"position",gn?"absolute":"fixed"),ne(ie,"zIndex","100000"),ne(ie,"pointerEvents","none"),te.ghost=ie,e.appendChild(ie),ne(ie,"transform-origin",ru/parseInt(ie.style.width)*100+"% "+ou/parseInt(ie.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,p=e.dataTransfer,h=n.options;if(_e("dragStart",this,{evt:e}),te.eventCanceled){this._onDrop();return}_e("setupClone",this),te.eventCanceled||(pe=Oh(q),pe.removeAttribute("id"),pe.draggable=!1,pe.style["will-change"]="",this._hideClone(),Ie(pe,this.options.chosenClass,!1),te.clone=pe),n.cloneId=xn(function(){_e("clone",n),!te.eventCanceled&&(n.options.removeCloneOnHide||fe.insertBefore(pe,q),n._hideClone(),Ee({sortable:n,name:"clone"}))}),!t&&Ie(q,h.dragClass,!0),t?(On=!0,n._loopId=setInterval(n._emulateDragOver,50)):(oe(document,"mouseup",n._onDrop),oe(document,"touchend",n._onDrop),oe(document,"touchcancel",n._onDrop),p&&(p.effectAllowed="move",h.setData&&h.setData.call(n,p,q)),se(document,"drop",n),ne(q,"transform","translateZ(0)")),Mt=!0,n._dragStartId=xn(n._dragStarted.bind(n,t,e)),se(document,"selectstart",n),Kt=!0,Qt&&ne(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,p,h,g,m=this.options,c=m.group,d=te.active,r=fn===c,o=m.sort,a=Se||d,s,i=this,u=!1;if(Ms)return;function f(O,I){_e(O,i,Ye({evt:e,isOwner:r,axis:s?"vertical":"horizontal",revert:g,dragRect:p,targetRect:h,canSort:o,fromSortable:a,target:n,completed:b,onMove:function(P,B){return mn(fe,t,q,p,P,we(P),e,B)},changed:E},I))}function y(){f("dragOverAnimationCapture"),i.captureAnimationState(),i!==a&&a.captureAnimationState()}function b(O){return f("dragOverCompleted",{insertion:O}),O&&(r?d._hideClone():d._showClone(i),i!==a&&(Ie(q,Se?Se.options.ghostClass:d.options.ghostClass,!1),Ie(q,m.ghostClass,!0)),Se!==i&&i!==te.active?Se=i:i===te.active&&Se&&(Se=null),a===i&&(i._ignoreWhileAnimating=n),i.animateAll(function(){f("dragOverAnimationComplete"),i._ignoreWhileAnimating=null}),i!==a&&(a.animateAll(),a._ignoreWhileAnimating=null)),(n===q&&!q.animated||n===t&&!n.animated)&&(Et=null),!m.dragoverBubble&&!e.rootEl&&n!==document&&(q.parentNode[ke]._isOutsideThisEl(e.target),!O&&gt(e)),!m.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),u=!0}function E(){Ne=Pe(q),st=Pe(q,m.draggable),Ee({sortable:i,name:"change",toEl:t,newIndex:Ne,newDraggableIndex:st,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Ve(n,m.draggable,t,!0),f("dragOver"),te.eventCanceled)return u;if(q.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||i._ignoreWhileAnimating===n)return b(!1);if(On=!1,d&&!m.disabled&&(r?o||(g=ve!==fe):Se===this||(this.lastPutMode=fn.checkPull(this,d,q,e))&&c.checkPut(this,d,q,e))){if(s=this._getDirection(e,n)==="vertical",p=we(q),f("dragOverValid"),te.eventCanceled)return u;if(g)return ve=fe,y(),this._hideClone(),f("revert"),te.eventCanceled||(mt?fe.insertBefore(q,mt):fe.appendChild(q)),b(!0);var $=ia(t,m.draggable);if(!$||Mg(e,s,this)&&!$.animated){if($===q)return b(!1);if($&&t===e.target&&(n=$),n&&(h=we(n)),mn(fe,t,q,p,n,h,e,!!n)!==!1)return y(),$&&$.nextSibling?t.insertBefore(q,$.nextSibling):t.appendChild(q),ve=t,E(),b(!0)}else if($&&Eg(e,s,this)){var A=Ot(t,0,m,!0);if(A===q)return b(!1);if(n=A,h=we(n),mn(fe,t,q,p,n,h,e,!1)!==!1)return y(),t.insertBefore(q,A),ve=t,E(),b(!0)}else if(n.parentNode===t){h=we(n);var S=0,M,R=q.parentNode!==t,L=!Cg(q.animated&&q.toRect||p,n.animated&&n.toRect||h,s),T=s?"top":"left",D=nu(n,"top","top")||nu(q,"top","top"),w=D?D.scrollTop:void 0;Et!==n&&(M=h[T],nn=!1,pn=!L&&m.invertSwap||R),S=Tg(e,n,h,s,L?1:m.swapThreshold,m.invertedSwapThreshold==null?m.swapThreshold:m.invertedSwapThreshold,pn,Et===n);var v;if(S!==0){var C=Pe(q);do C-=S,v=ve.children[C];while(v&&(ne(v,"display")==="none"||v===ie))}if(S===0||v===n)return b(!1);Et=n,tn=S;var x=n.nextElementSibling,_=!1;_=S===1;var k=mn(fe,t,q,p,n,h,e,_);if(k!==!1)return(k===1||k===-1)&&(_=k===1),Ms=!0,setTimeout(xg,30),y(),_&&!x?t.appendChild(q):n.parentNode.insertBefore(q,_?x:n),D&&Dh(D,0,w-D.scrollTop),ve=q.parentNode,M!==void 0&&!pn&&($n=Math.abs(M-we(n)[T])),E(),b(!0)}if(t.contains(q))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){oe(document,"mousemove",this._onTouchMove),oe(document,"touchmove",this._onTouchMove),oe(document,"pointermove",this._onTouchMove),oe(document,"dragover",gt),oe(document,"mousemove",gt),oe(document,"touchmove",gt)},_offUpEvents:function(){var e=this.el.ownerDocument;oe(e,"mouseup",this._onDrop),oe(e,"touchend",this._onDrop),oe(e,"pointerup",this._onDrop),oe(e,"touchcancel",this._onDrop),oe(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Ne=Pe(q),st=Pe(q,n.draggable),_e("drop",this,{evt:e}),ve=q&&q.parentNode,Ne=Pe(q),st=Pe(q,n.draggable),te.eventCanceled){this._nulling();return}Mt=!1,pn=!1,nn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ts(this.cloneId),Ts(this._dragStartId),this.nativeDraggable&&(oe(document,"drop",this),oe(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Qt&&ne(document.body,"user-select",""),ne(q,"transform",""),e&&(Kt&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ie&&ie.parentNode&&ie.parentNode.removeChild(ie),(fe===ve||Se&&Se.lastPutMode!=="clone")&&pe&&pe.parentNode&&pe.parentNode.removeChild(pe),q&&(this.nativeDraggable&&oe(q,"dragend",this),Ho(q),q.style["will-change"]="",Kt&&!Mt&&Ie(q,Se?Se.options.ghostClass:this.options.ghostClass,!1),Ie(q,this.options.chosenClass,!1),Ee({sortable:this,name:"unchoose",toEl:ve,newIndex:null,newDraggableIndex:null,originalEvent:e}),fe!==ve?(Ne>=0&&(Ee({rootEl:ve,name:"add",toEl:ve,fromEl:fe,originalEvent:e}),Ee({sortable:this,name:"remove",toEl:ve,originalEvent:e}),Ee({rootEl:ve,name:"sort",toEl:ve,fromEl:fe,originalEvent:e}),Ee({sortable:this,name:"sort",toEl:ve,originalEvent:e})),Se&&Se.save()):Ne!==_t&&Ne>=0&&(Ee({sortable:this,name:"update",toEl:ve,originalEvent:e}),Ee({sortable:this,name:"sort",toEl:ve,originalEvent:e})),te.active&&((Ne==null||Ne===-1)&&(Ne=_t,st=en),Ee({sortable:this,name:"end",toEl:ve,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){_e("nulling",this),fe=q=ve=ie=mt=pe=An=at=pt=Be=Kt=Ne=st=_t=en=Et=tn=Se=fn=te.dragged=te.ghost=te.clone=te.active=null,Nn.forEach(function(e){e.checked=!0}),Nn.length=No=Fo=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":q&&(this._onDragOver(e),$g(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,p=0,h=n.length,g=this.options;p<h;p++)t=n[p],Ve(t,g.draggable,this.el,!1)&&e.push(t.getAttribute(g.dataIdAttr)||Lg(t));return e},sort:function(e,t){var n={},p=this.el;this.toArray().forEach(function(h,g){var m=p.children[g];Ve(m,this.options.draggable,p,!1)&&(n[h]=m)},this),t&&this.captureAnimationState(),e.forEach(function(h){n[h]&&(p.removeChild(n[h]),p.appendChild(n[h]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Ve(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var p=un.modifyOption(this,e,t);typeof p<"u"?n[e]=p:n[e]=t,e==="group"&&Ph(n)},destroy:function(){_e("destroy",this);var e=this.el;e[ke]=null,oe(e,"mousedown",this._onTapStart),oe(e,"touchstart",this._onTapStart),oe(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(oe(e,"dragover",this),oe(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),In.splice(In.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!at){if(_e("hideClone",this),te.eventCanceled)return;ne(pe,"display","none"),this.options.removeCloneOnHide&&pe.parentNode&&pe.parentNode.removeChild(pe),at=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(at){if(_e("showClone",this),te.eventCanceled)return;q.parentNode==fe&&!this.options.group.revertClone?fe.insertBefore(pe,q):mt?fe.insertBefore(pe,mt):fe.appendChild(pe),this.options.group.revertClone&&this.animate(q,pe),ne(pe,"display",""),at=!1}}};function $g(l){l.dataTransfer&&(l.dataTransfer.dropEffect="move"),l.cancelable&&l.preventDefault()}function mn(l,e,t,n,p,h,g,m){var c,d=l[ke],r=d.options.onMove,o;return window.CustomEvent&&!ot&&!cn?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=e,c.from=l,c.dragged=t,c.draggedRect=n,c.related=p||e,c.relatedRect=h||we(e),c.willInsertAfter=m,c.originalEvent=g,l.dispatchEvent(c),r&&(o=r.call(d,c,g)),o}function Ho(l){l.draggable=!1}function xg(){Ms=!1}function Eg(l,e,t){var n=we(Ot(t.el,0,t.options,!0)),p=Ih(t.el,t.options,ie),h=10;return e?l.clientX<p.left-h||l.clientY<n.top&&l.clientX<n.right:l.clientY<p.top-h||l.clientY<n.bottom&&l.clientX<n.left}function Mg(l,e,t){var n=we(ia(t.el,t.options.draggable)),p=Ih(t.el,t.options,ie),h=10;return e?l.clientX>p.right+h||l.clientY>n.bottom&&l.clientX>n.left:l.clientY>p.bottom+h||l.clientX>n.right&&l.clientY>n.top}function Tg(l,e,t,n,p,h,g,m){var c=n?l.clientY:l.clientX,d=n?t.height:t.width,r=n?t.top:t.left,o=n?t.bottom:t.right,a=!1;if(!g){if(m&&$n<d*p){if(!nn&&(tn===1?c>r+d*h/2:c<o-d*h/2)&&(nn=!0),nn)a=!0;else if(tn===1?c<r+$n:c>o-$n)return-tn}else if(c>r+d*(1-p)/2&&c<o-d*(1-p)/2)return _g(e)}return a=a||g,a&&(c<r+d*h/2||c>o-d*h/2)?c>r+d/2?1:-1:0}function _g(l){return Pe(q)<Pe(l)?1:-1}function Lg(l){for(var e=l.tagName+l.className+l.src+l.href+l.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function Rg(l){Nn.length=0;for(var e=l.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&Nn.push(n)}}function xn(l){return setTimeout(l,0)}function Ts(l){return clearTimeout(l)}Qn&&se(document,"touchmove",function(l){(te.active||Mt)&&l.cancelable&&l.preventDefault()});te.utils={on:se,off:oe,css:ne,find:Rh,is:function(e,t){return!!Ve(e,t,e,!1)},extend:fg,throttle:kh,closest:Ve,toggleClass:Ie,clone:Oh,index:Pe,nextTick:xn,cancelNextTick:Ts,detectDirection:Fh,getChild:Ot,expando:ke};te.get=function(l){return l[ke]};te.mount=function(){for(var l=arguments.length,e=new Array(l),t=0;t<l;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(te.utils=Ye(Ye({},te.utils),n.utils)),un.mount(n)})};te.create=function(l,e){return new te(l,e)};te.version=hg;var be=[],Yt,_s,Ls=!1,Wo,zo,Fn,Zt;function kg(){function l(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return l.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?se(document,"dragover",this._handleAutoScroll):this.options.supportPointer?se(document,"pointermove",this._handleFallbackAutoScroll):n.touches?se(document,"touchmove",this._handleFallbackAutoScroll):se(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?oe(document,"dragover",this._handleAutoScroll):(oe(document,"pointermove",this._handleFallbackAutoScroll),oe(document,"touchmove",this._handleFallbackAutoScroll),oe(document,"mousemove",this._handleFallbackAutoScroll)),au(),En(),pg()},nulling:function(){Fn=_s=Yt=Ls=Zt=Wo=zo=null,be.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var p=this,h=(t.touches?t.touches[0]:t).clientX,g=(t.touches?t.touches[0]:t).clientY,m=document.elementFromPoint(h,g);if(Fn=t,n||this.options.forceAutoScrollFallback||cn||ot||Qt){Bo(t,this.options,m,n);var c=lt(m,!0);Ls&&(!Zt||h!==Wo||g!==zo)&&(Zt&&au(),Zt=setInterval(function(){var d=lt(document.elementFromPoint(h,g),!0);d!==c&&(c=d,En()),Bo(t,p.options,d,n)},10),Wo=h,zo=g)}else{if(!this.options.bubbleScroll||lt(m,!0)===qe()){En();return}Bo(t,this.options,lt(m,!1),!1)}}},it(l,{pluginName:"scroll",initializeByDefault:!0})}function En(){be.forEach(function(l){clearInterval(l.pid)}),be=[]}function au(){clearInterval(Zt)}var Bo=kh(function(l,e,t,n){if(e.scroll){var p=(l.touches?l.touches[0]:l).clientX,h=(l.touches?l.touches[0]:l).clientY,g=e.scrollSensitivity,m=e.scrollSpeed,c=qe(),d=!1,r;_s!==t&&(_s=t,En(),Yt=e.scroll,r=e.scrollFn,Yt===!0&&(Yt=lt(t,!0)));var o=0,a=Yt;do{var s=a,i=we(s),u=i.top,f=i.bottom,y=i.left,b=i.right,E=i.width,$=i.height,A=void 0,S=void 0,M=s.scrollWidth,R=s.scrollHeight,L=ne(s),T=s.scrollLeft,D=s.scrollTop;s===c?(A=E<M&&(L.overflowX==="auto"||L.overflowX==="scroll"||L.overflowX==="visible"),S=$<R&&(L.overflowY==="auto"||L.overflowY==="scroll"||L.overflowY==="visible")):(A=E<M&&(L.overflowX==="auto"||L.overflowX==="scroll"),S=$<R&&(L.overflowY==="auto"||L.overflowY==="scroll"));var w=A&&(Math.abs(b-p)<=g&&T+E<M)-(Math.abs(y-p)<=g&&!!T),v=S&&(Math.abs(f-h)<=g&&D+$<R)-(Math.abs(u-h)<=g&&!!D);if(!be[o])for(var C=0;C<=o;C++)be[C]||(be[C]={});(be[o].vx!=w||be[o].vy!=v||be[o].el!==s)&&(be[o].el=s,be[o].vx=w,be[o].vy=v,clearInterval(be[o].pid),(w!=0||v!=0)&&(d=!0,be[o].pid=setInterval((function(){n&&this.layer===0&&te.active._onTouchMove(Fn);var x=be[this.layer].vy?be[this.layer].vy*m:0,_=be[this.layer].vx?be[this.layer].vx*m:0;typeof r=="function"&&r.call(te.dragged.parentNode[ke],_,x,l,Fn,be[this.layer].el)!=="continue"||Dh(be[this.layer].el,_,x)}).bind({layer:o}),24))),o++}while(e.bubbleScroll&&a!==c&&(a=lt(a,!1)));Ls=d}},30),zh=function(e){var t=e.originalEvent,n=e.putSortable,p=e.dragEl,h=e.activeSortable,g=e.dispatchSortableEvent,m=e.hideGhostForTarget,c=e.unhideGhostForTarget;if(t){var d=n||h;m();var r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,o=document.elementFromPoint(r.clientX,r.clientY);c(),d&&!d.el.contains(o)&&(g("spill"),this.onSpill({dragEl:p,putSortable:n}))}};function ra(){}ra.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var p=Ot(this.sortable.el,this.startIndex,this.options);p?this.sortable.el.insertBefore(t,p):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:zh};it(ra,{pluginName:"revertOnSpill"});function oa(){}oa.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,p=n||this.sortable;p.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),p.animateAll()},drop:zh};it(oa,{pluginName:"removeOnSpill"});te.mount(new kg);te.mount(oa,ra);const xe={getStyle:(l,e=!1)=>{let t;return window.getComputedStyle?t=window.getComputedStyle(l,null):l.currentStyle&&(t=l.currentStyle),e?t[e]:t},fadeOut:(l,e=250)=>{const t=1/(e/60);l.style.opacity=1,(function n(){const p=Number(l.style.opacity)-t;p>0?(l.style.opacity=p,window.requestAnimationFrame(n)):l.remove()})()},slideDown:(l,e=250,t=!1)=>{l.style.display="block";const n=xe.getStyle(l),p=Number.parseInt(n.height,10),h=p/(e/60);l.style.height="0px",(function g(){const m=Number.parseFloat(l.style.height),c=m+h;m<p?(l.style.height=`${c}px`,window.requestAnimationFrame(g)):(l.style.height="auto",t&&t(l))})()},slideUp:(l,e=250,t=!1)=>{const n=xe.getStyle(l),p=Number.parseInt(n.height,10),h=n.overflow;l.style.overflow="hidden",l.style.height=`${p}px`;const g=n.minHeight;l.style.minHeight="auto";const m=parseFloat(p/(e/60)).toFixed(2);(function c(){const r=Number.parseInt(l.style.height,10)-m;r>0?(l.style.height=`${r}px`,window.requestAnimationFrame(c)):(l.style.overflow=h,l.style.display="none",l.style.minHeight=g,delete l.style.height,t&&t(l))})()},slideToggle:(l,e=250,t=xe.getStyle(l,"display")==="none")=>{t?xe.slideDown(l,e):xe.slideUp(l,e)}},Bh=l=>Number.isInteger(Number(l)),ut=l=>{let e=0,t=l;for(;t?.previousElementSibling;)t=t.previousElementSibling,e++;return e},Pn=(l,e,t)=>{const n=t.split("||"),h=yt(e).map(g=>l.find(m=>{const c=n.find(d=>!!Re(m,d));return c&&Re(m,c)===g})).filter(Boolean).concat(l);return yt(h)},Jn=(l,e,t)=>{for(let n=0;n<l.length;n++)e.call(t,l[n],n)},sa=(l,e)=>{const t=[];return Jn(l,(n,p)=>t.push(e(n,p))),t},jo={},jh=l=>{const e={className:"class"};if(jo[l])return jo[l];const n=(e[l]||l).replace(/^\d+/,"").replace(/[^a-zA-Z0-9-:]/g,"");return jo[l]=n,n},Vh=l=>l.replace(/\b\w/g,e=>e.toUpperCase()),Dg=l=>window.JSON.parse(window.JSON.stringify(l)),Og=(l,e)=>e.filter(t=>!~l.indexOf(t)),Fe={capitalize:Vh,safeAttrName:jh,forEach:Jn,copyObj:Dg,map:sa,subtract:Og,indexOfNode:ut,isInt:Bh,get:Re,orderObjectsBy:Pn},ze={js:new Set,css:new Set,formeoSprite:null},lu=(l,e,t=As)=>new Promise(n=>fetch(l).then(p=>{if(!p.ok)return n(t(p));n(e?e(p):p)}).catch(p=>t(p))),Uh=(l,e)=>{l.removeEventListener("load",Uh),e(l.src)},Gh=(l,e)=>{l.removeEventListener("load",Gh),e(l.src)},Ig=l=>new Promise((e,t)=>{if(ze.js.has(l))return e(l);ze.js.add(l);const n=V.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:l},action:{load:()=>Gh(n,e),error:()=>t(new Error(`${l} failed to load.`))}});document.head.appendChild(n)}),Rs=l=>{l=Array.isArray(l)?l:[l];const e=l.map(t=>new Promise((n,p)=>{if(ze.css.has(t))return n(t);ze.css.add(t);const h=V.create({tag:"link",attrs:{rel:"stylesheet",href:t},action:{load:()=>Uh(h,n),error:()=>p(new Error(`${t} failed to load.`))}});document.head.appendChild(h)}));return Promise.all(e)},Ng=l=>{l=Array.isArray(l)?l:[l];const e=l.map(t=>Ig(t));return Promise.all(e)},Fg=l=>{l=Array.isArray(l)?l:[l];const e=l.map(t=>Rs(t));return Promise.all(e)},cu=l=>{const t=new DOMParser().parseFromString(l,"image/svg+xml");return ze.formeoSprite=t.documentElement,ze.formeoSprite},Pg=async(l=Wf)=>{if(ze.formeoSprite)return ze.formeoSprite;if(!l)return cu(Pf);const e=async t=>cu(await t.text());return lu(l,e,()=>lu(zf,e))},Hg={js:Ng,css:Fg},qh=l=>{const e=Object.entries(l).map(([t,n])=>Hg[t](n));return Promise.all(e)},Wg=async l=>{if(l&&!ze.css.has(l)&&(await Rs(l),!ze.css.has(l)&&!ze.css.has(sc)))return await Rs(sc)},zg={glyphicons:l=>`<span class="glyphicon glyphicon-${l}" aria-hidden="true"></span>`,"font-awesome":l=>{const[e,t]=l.split(" ");return`<i class="${e} fa-${t}"></i>`},fontello:l=>`<i class="${Sh}${l}">${l}</i>`},Bg=new Set(["input","textarea","select"]),jg=l=>l.replace(/^on([A-Z])/,(e,t)=>t.toLowerCase()),Vg=new Set(["focus","blur"]),Ug=l=>{const e=jg(l);return(t,n)=>t.addEventListener(e,n,Vg.has(e))},Kh=(l={})=>{let e=l?.attrs?.name||l?.name;if(e)return e;const t=We(l);let n=l.config?.label||l.attrs?.label||l?.label;return n&&(typeof n=="object"&&(n=V.create(n).textContent),/^<.+>.+<.+>$/gim.test(n)&&(n=mp(n)),e=`${t}-${Ah(vp(n,24,null))}`),e||t};class Gg{constructor(e=Object.create(null)){this.options=e}set setOptions(e){this.options=Ue(this.options,e)}processElemArg(e){let t=e,n;if(typeof t=="string")return n=t,t={tag:n},t;if(t.attrs){const{tag:p,...h}=t.attrs;p&&(typeof p=="string"?n=p:n=(p.find(m=>m.selected===!0)||p[0]).value),t.attrs=h}return t.tag=n||t.tag||"div",t}render=e=>(e.id=`f-${e.id||We()}`,this.create(e));create=(e,t=!1)=>{if(!e)return;if(this.isDOMElement(e))return e;const n=this,p=["children","content"],{className:h,options:g,dataset:m,...c}=this.processElemArg(e);p.push("tag");let d;const{tag:r}=c;let o;const a={attrs:{},className:[Fe.get(c,"config.inputWrap")],children:[],config:{}};let s=document.createElement(r);const i={string:f=>{s.innerHTML+=f},object:f=>f&&s.appendChild(n.create(f,t)),node:f=>s.appendChild(f),component:f=>s.appendChild(f.dom),array:f=>{for(const y of f)d=n.childType(y),i[d](y)},function:f=>{f=f(),d=n.childType(f),i[d](f)},undefined:()=>null,boolean:()=>null};if(h&&(c.attrs=Ue(c.attrs,{className:h})),g){const f=this.processOptions(g,c,t);if(this.holdsContent(s)&&r!=="button")i.array.call(this,f),c.content=void 0;else return Fe.forEach(f,y=>{a.children.push(n.create(y,t))}),c.attrs.className&&(a.className=c.attrs.className),a.id=c.id,a.config={...c.config},this.create(a,t);p.push("options")}if(c.attrs&&(n.processAttrs(c,s,t),p.push("attrs")),c.config){if(c.config.label&&(c.config.label&&r!=="button"||["radio","checkbox"].includes(Fe.get(c,"attrs.type")))&&!t){const f=n.label(c);if(!c.config.hideLabel){const y=[f,s];n.labelAfter(c)&&y.reverse(),a.children.push(y)}}p.push("config")}if(c.content||c.children){const f=c.content||c.children;d=n.childType(f),i[d]||console.error(`childType: ${d} is not supported`),i[d].call(this,f)}if(m){for(const f in m)Object.hasOwn(m,f)&&(s.dataset[f]=typeof m[f]=="function"?m[f]():m[f]);p.push("dataset")}c.action&&(this.actionHandler(s,c.action),p.push("action"));const u=Fe.subtract(p,Object.keys(c));for(o=u.length-1;o>=0;o--)s[u[o]]=c[u[o]];return a.children.length&&(s=this.create(a)),s};onRender=(e,t,n=Qe)=>{const p=Date.now(),h=()=>{!e.parentElement&&Date.now()-p<n?window.requestAnimationFrame(h):e.parentElement&&t(e)};h()};actionHandler(e,t){const n={onRender:V.onRender,render:V.onRender};return Object.entries(t).map(([p,h])=>(Array.isArray(h)?h:[h]).map(m=>(n[p]||Ug(p))(e,m)))}get icons(){if(this.iconSymbols)return this.iconSymbols;const e=ze.formeoSprite.querySelectorAll("svg symbol"),t=n=>{const p=n.getAttribute("viewBox")||"0 0 24 24",h=Array.from(n.children).map(g=>g.cloneNode(!0).outerHTML).join("");return{tag:"svg",attrs:{className:["svg-icon",n.id],viewBox:p,xmlns:"http://www.w3.org/2000/svg"},children:h}};return this.iconSymbols=Array.from(e).reduce((n,p)=>{const h=p.id.replace(Sh,"");return n[h]=t(p),n},{}),this.cachedIcons={},this.iconSymbols}icon(e,t){if(!e)return;const n=`${e}?${new URLSearchParams(t).toString()}`;if(this.cachedIcons?.[n])return this.cachedIcons[n];const p=this.icons[e];if(p){if(t){const h=Ue(p,t);return this.cachedIcons[n]=V.create(h).outerHTML,this.cachedIcons[n]}return this.cachedIcons[n]=V.create(p).outerHTML,this.cachedIcons[n]}return zg[V.options.iconFont]?.(e)||e}processAttrs(e,t,n){const{attrs:p={}}=e;if(!n&&!p.name&&p.name!==null&&this.isInput(e.tag)){const h=Kh(e);h&&t.setAttribute("name",h)}for(const h of Object.keys(p)){const g=Fe.safeAttrName(h),m=this.processAttrValue(p[h]);if(m!==!1)try{t.setAttribute(g,m)}catch(c){console.warn(`Could not set attribute ${g} with value ${m}`,c)}}}processAttrValue(e){if(typeof e=="function")return e();if(typeof e=="boolean")return e&&"";let t=e||"";if(Array.isArray(t))if(typeof t[0]=="object"){const n=t.filter(p=>p.selected===!0);t=n.length?n[0].value:t[0].value}else t=t.join(" ");return t}toggleElementsByStr=(e,t)=>{const n=[],p=(h,g)=>{g?(h.style.display="block",n.push(h)):h.style.display="none"};return V.elementsContainText(e,t,p),n};elementsContainText=(e,t,n)=>{const p=[];return Jn(e,h=>{const m=h.textContent.toLowerCase().indexOf(t.toLowerCase())!==-1;n?.(h,m),m&&p.push(h)}),p};generateOption=({type:e="option",label:t,value:n,i:p=0,selected:h})=>({tag:e==="option"?"option":"input",attrs:{type:e,value:n||`${e}-${p}`,[e==="option"?"selected":"checked"]:h||!p},config:{label:t||X.get("labelCount",{label:X.get("option"),count:p})}});processOptions(e,t,n){const{action:p,attrs:h={}}=t,g=h.type||t.tag,m=h.id||t.id,c=(r,o)=>{const{label:a,value:s,...i}=r,u=()=>{const y={tag:"input",attrs:{name:m,type:g,value:s||"",id:`${m}-${o}`,...i},action:p},b={tag:"label",attrs:{for:`${m}-${o}`},children:a},E={children:[y,b],className:[`f-${g}`]};return h.className&&(t.config.inputWrap=h.className),t.config.inline&&E.className.push(`f-${g}-inline`),r.selected&&(y.attrs.checked=!0),n&&(b.attrs.contenteditable=!0),E};return{select:()=>{const y=r.attrs||r,b={attrs:y,...r,...y},{label:E,checked:$,selected:A,attrs:S}=b;return{tag:"option",attrs:{...S,selected:!!($||A)},children:E}},button:y=>{const{type:b,label:E,className:$,id:A}=y;return{...t,attrs:{type:b},className:$,id:A||We(),options:void 0,children:E,action:t.action}},checkbox:u,radio:u}[g]?.(r)};return e.map(c)}holdsContent(e){return e.outerHTML.includes("/")}isBlockInput(e){return!this.isInput(e)&&this.holdsContent(e)}isInput(e){let t=e;return typeof t!="string"&&(t=t.tagName),Bg.has(t)}parsedHtml(e){const t=document.createElement("textarea");return t.innerHTML=e,t.textContent}labelAfter(e){const t=Fe.get(e,"attrs.type"),n=Fe.get(e,"config.labelAfter");return n===void 0?t==="checkbox"||t==="radio":n}requiredMark=()=>({tag:"span",className:"text-error",children:"*"});tooltip=e=>({tag:"span",className:"f-tooltip",dataset:{tooltip:e},content:V.icon("info-circle")});helpText=e=>({tag:"small",className:"f-help-text",children:e});label(e,t){const n=Fe.get(e,"attrs.required");let{config:{label:p="",helpText:h="",tooltip:g=null}}=e;const{id:m,attrs:c}=e;typeof p=="function"&&(p=p());const d={tag:"label",attrs:{for:m||c?.id},className:[],children:[p,n&&this.requiredMark(),g&&this.tooltip(g),h&&this.helpText(h)],action:{}};return t&&(d.attrs.for=void 0,d.attrs.contenteditable=!0,d.fMap=t),d}childType(e){return e===void 0?e:[["array",t=>Array.isArray(t)],["node",t=>t instanceof window.Node||t instanceof window.HTMLElement],["component",()=>e?.dom],[typeof e,()=>!0]].find(t=>t[1](e))[0]}getStyle(e,t=!1){let n;return window.getComputedStyle?n=window.getComputedStyle(e,null):e.currentStyle&&(n=e.currentStyle),t?n[t]:n}getElement(e){const t={node:()=>e,object:()=>document.getElementById(e.id),string:()=>document.getElementById(e)},n=this.childType(e);return t[n]()}empty(e){for(;e.firstChild;)this.remove(e.firstChild);return e}removeEmpty=e=>{const t=e.parentElement,n=Le(e),p=t.getElementsByClassName(`formeo-${n}`);if(this.remove(e),!p.length)return this.isStage(t)?this.emptyClass(t):this.removeEmpty(t)};remove(e){const t=Le(e);return t?ce.remove(`${t}s.${e.id}`):e.parentElement.removeChild(e)}removeClasses(e,t){const n={string:p=>p.classList.remove(t),array:p=>{for(const h of t)p.classList.remove(h)}};n.object=n.string,Fe.forEach(e,n[this.childType(t)])}addClasses(e,t){const n={string:p=>p.classList.add(t),array:p=>{for(const h of t)p.classList.add(h)}};Fe.forEach(e,n[this.childType(t)])}formGroup(e,t=""){return{className:["f-field-group",t],children:e}}coords(e){const t=e.getBoundingClientRect(),n=document.body.getBoundingClientRect();return{pageX:t.left+t.width/2,pageY:t.top-n.top-t.height/2}}clearStage(e){e.classList.add("removing-all-fields");const t=()=>{V.empty(e),e.classList.remove("removing-all-fields"),V.emptyClass(e),xe.slideDown(e,300)};xe.slideUp(e,600,t)}toggleSortable(e,t){let n=t;const p=Le(e);if(!p)return;const h=Le(e.parentElement),g=V[p].get(e.id).sortable;n||(n=!g.option("disabled")),g.option("disabled",n),h&&["rows","columns","stages"].includes(h)&&this.toggleSortable(e.parentElement,n)}emptyClass(e){const t=e.getElementsByClassName(jf.get(e.classList.item(0)));e.classList.toggle("empty",!t.length)}btnTemplate=({title:e="",...t})=>({tag:"button",attrs:{type:"button",title:e},...t});isControls=e=>Le(e)===ct;isStage=e=>Le(e)===Pt;isRow=e=>Le(e)===tt;isColumn=e=>Le(e)===nt;isField=e=>Le(e)===Ht;asComponent=e=>ce[`${Le(e)}s`].get(e.id);isDOMElement(e){return e instanceof window.Element||e instanceof window.HTMLElement||!!(e&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string")}}const V=new Gg,qg="modulepreload",Kg=function(l){return"/formeo/"+l},uu={},Tt=function(e,t,n){let p=Promise.resolve();if(t&&t.length>0){let c=function(d){return Promise.all(d.map(r=>Promise.resolve(r).then(o=>({status:"fulfilled",value:o}),o=>({status:"rejected",reason:o}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),m=g?.nonce||g?.getAttribute("nonce");p=c(t.map(d=>{if(d=Kg(d),d in uu)return;uu[d]=!0;const r=d.endsWith(".css"),o=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${o}`))return;const a=document.createElement("link");if(a.rel=r?"stylesheet":qg,r||(a.as="script"),a.crossOrigin="",a.href=d,m&&a.setAttribute("nonce",m),document.head.appendChild(a),r)return new Promise((s,i)=>{a.addEventListener("load",s),a.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${d}`)))})}))}function h(g){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=g,window.dispatchEvent(m),!m.defaultPrevented)throw g}return p.then(g=>{for(const m of g||[])m.status==="rejected"&&h(m.reason);return e().catch(h)})},Lt="f-autocomplete",Yg=`${Lt}-display-field`,aa=`${Lt}-list`,Bt="highlight-component",Hn=`${aa}-item`,Zg=(l,e)=>{const t=l.reduce((n,p)=>n+(p===e),0);return t>1?`(${t})`:""},Yh=["config.label","config.controlId"],Xg=["config.legend","name"],Qg=[...Yh,...Xg],Vo=l=>Yh.reduce((e,t)=>e||l.get(t),null),hu=l=>Qg.reduce((e,t)=>e||l.get(t),null)||Je(l.name),Jg=new Map([["condition.source",Vo],["if.condition.source",Vo],["if.condition.target",Vo],["then.condition.target",hu],["condition.target",hu]]),Zh=({id:l,...e},t)=>{const{name:n,label:p}=e;return n?Jg.get(t)(e):p},em=({selectedId:l,...e})=>(e.value===l&&(e.selected=!0),e),Uo=l=>(l.classList.contains(Hn)||(l=l.parentElement),l),Xh=({value:l,textLabel:e,htmlLabel:t,componentType:n,depth:p=0},h)=>{const g={tag:"li",children:t,dataset:{value:l,label:e},className:[Hn,`${Hn}-depth-${p}`,`component-type-${n}`],action:{mousedown:({target:m})=>{m=Uo(m),h.setValue(m),h.selectOption(m),h.hideList()},mouseover:({target:m})=>{m=Uo(m),h.removeHighlight(),h.highlightComponent(m)},mouseleave:({target:m})=>{m=Uo(m),h.removeHighlight()}}};return V.create(g)},tm=(l,e)=>{const t=l.data.options.map((p,h)=>{const g=`${l.address}.options[${h}]`,m=p.label,c=p.label;return Xh({value:g,textLabel:m,htmlLabel:c,componentType:"option",depth:1},e)});return V.create({tag:"ul",attrs:{className:[aa,"options-list"]},children:t})},nm=l=>{const e=l.value,t=[],n=ce.flatList();return Object.entries(n).reduce((h,[g,m])=>{const c=Zh(m,l.key);if(c){const d=m.name,r={tag:"span",content:` ${Je(d)}`,className:"component-type"},o=`${d}.${c}`;t.push(o);const a=Zg(t,o),s={tag:"span",content:a,className:"component-label-count"},i=[`${c} `,s,r],u=[c,a].join(" ").trim();if(m.isCheckable){const y=tm(m,l);i.push(y)}const f=em({value:g,textLabel:u,htmlLabel:i,componentType:d,selectedId:e});h.push(Xh(f,l))}return h},[])};class im{lastCache=Date.now();optionsCache=null;constructor({key:e,value:t,className:n,onChange:p=As}){this.key=e,this.className=[n||this.key.replace(/\./g,"-")].flat(),this.value=t,this.onChange=p||As,this.events=[],this.build()}createProxy(){return new Proxy(this,{get(e,t){if(t in e)return e[t];if(t in e.dom){const n=e.dom[t];return typeof n=="function"?n.bind(e.dom):n}},set(e,t,n){return t in e?e[t]=n:e.dom[t]=n,!0}})}get isAddress(){return He(this.value)}get valueComponent(){return He(this.value)&&ce.getAddress(this.value)}build(){const e=n=>{const p=this.list,h=this.getActiveOption();let m=new Map([[38,()=>{const c=this.getPreviousOption(h);c&&this.selectOption(c)}],[40,()=>{const c=this.getNextOption(h);c&&this.selectOption(c)}],[13,()=>{h&&(this.selectOption(h),this.setValue(h),p.style.display==="none"?this.showList(h):this.hideList()),n.preventDefault()}],[27,()=>{this.hideList()}]]).get(n.keyCode);return m||(m=()=>!1),m()},t={focus:({target:n})=>{this.updateOptions(),n.parentElement.classList.add(`${Lt}-focused`);const p=V.toggleElementsByStr(this.list.querySelectorAll(`.${Hn}-depth-0`),n.value);n.addEventListener("keydown",e);const h=this.list.querySelector(".active-option")||p[0];this.showList(h)},blur:({target:n})=>{n.parentElement.classList.remove(`${Lt}-focused`),n.removeEventListener("keydown",e),this.hideList()},input:n=>{const{value:p}=n.target,h=V.toggleElementsByStr(this.list.querySelectorAll("li"),p);if(p.length===0&&this.clearValue(),h.length===0)this.hideList();else{const g=this.getActiveOption()||h[0];this.showList(g)}this.setValue({dataset:{label:p,value:p}})}};return this.displayField=V.create({tag:"input",autocomplete:"off",action:t,attrs:{type:"text",className:Yg,value:this.label||this.value,placeholder:X.get(`${this.key}.placeholder`)}}),this.hiddenField=V.create({tag:"input",attrs:{type:"hidden",className:Lt,value:this.value}}),this.list=V.create({tag:"ul",attrs:{className:aa}}),this.clearButton=V.create({tag:"span",content:V.icon("remove"),className:"clear-button hidden",action:{click:()=>this.clearValue()}}),this.dom=V.create({children:[this.displayField,this.clearButton,this.hiddenField],className:[Lt,this.className].flat(),action:{onRender:n=>{this.stage=n.closest(".formeo-stage"),this.value&&(this.displayField.value=this.label),this.clearButton.classList.toggle("hidden",!this.value.length)}}}),this.dom}get label(){if(!He(this.value))return this.value;const e=this.value&&ce.getAddress(this.value);return e&&Zh(e,`${this.key}`)||this.value}updateOptions(){let e=this.optionsCache;const t=Date.now();(t-this.lastCache>qs*5||!e)&&(V.empty(this.list),e=this.generateOptions(),this.lastCache=t),this.list.children.length||this.list.append(...e)}generateOptions(){return this.optionsCache=nm(this),this.optionsCache}setListPosition(){const{offsetHeight:e,offsetWidth:t}=this.displayField,n=this.displayField.closest(".formeo-stage").getBoundingClientRect(),p=this.displayField.getBoundingClientRect(),h={position:"absolute",top:`${p.y+e-n.y}px`,left:`${p.x+window.scrollX-n.x+2}px`,width:`${t}px`};Object.assign(this.list.style,h)}showList(e,t=this.list){this.stage.contains(this.list)||this.stage.appendChild(this.list),this.setListPosition(),this.selectOption(e),xe.slideDown(t,bt)}hideList(e=this.list){xe.slideUp(e,bt),this.removeHighlight(),this.stage.contains(this.list)&&this.stage.removeChild(this.list)}getActiveOption(e=this.list){const t=e.querySelector(".active-option");return t?.style.display!=="none"?t:null}getPreviousOption(e){let t=e;do t=t?t.previousSibling:null;while(t!=null&&t.style.display==="none");return t}getNextOption(e){let t=e;do t=t?t.nextSibling:null;while(t!=null&&t.style.display==="none");return t}selectOption(e,t=this.list){const n=t.querySelectorAll("li");for(const p of n){const{dataset:{value:h}}=p;p.classList.remove("active-option"),He(h)&&ce.getAddress(h)?.dom?.classList.remove(Bt)}e&&(e.classList.add("active-option"),this.highlightComponent(e))}removeHighlight(){const e=document.getElementsByClassName(Bt);for(const t of e)t.classList.remove(Bt)}highlightComponent(e){const{dataset:{value:t}}=e;if(He(t)){const{componentAddress:n,isOptionAddress:p,optionIndex:h}=wt(t).reduce((m,c)=>c==="options"?(m.isOptionAddress=!0,m):m.isOptionAddress?(m.optionIndex=+c,m):(m.componentAddress.push(c),m),{componentAddress:[],optionIndex:null,isOptionAddress:!1}),g=ce.getAddress(n);g?.dom&&(g.dom.classList.add(Bt),p&&g.dom.querySelectorAll(".field-preview .f-checkbox, .field-preview .f-radio")[h]?.classList.add(Bt))}}clearValue(){this.selectOption(null),this.setValue({dataset:{label:"",value:""}}),this.displayField.focus()}setValue(e){const{label:t,value:n}=e.dataset;this.displayField.value=t,this.hiddenField.value=n,this.value=n,this.clearButton.classList.toggle("hidden",!n.length),this.onChange?.({target:this.hiddenField})}}const Qh=l=>X.get(`${l}.placeholder`)||Je(kn(l)),la=l=>l.replaceAll(".","-"),du=new Map([["config.helpText",(...l)=>fu(...l)],["config.tooltip",(...l)=>fu(...l)]]);function Go({key:l,value:e,type:t="text",checked:n}){const p={tag:"input",attrs:{type:t,value:e,placeholder:Qh(l)},className:[la(l)],config:{}};return n&&(p.attrs.checked=!0),p}function fu({key:l,value:e}){return{tag:"textarea",attrs:{placeholder:Qh(l)},className:[la(l)],config:{},textContent:e}}function Ge(l){const e=X.get(l);if(e)return e;const t=kn(l);return X.get(t)||Je(t)}const It={autocomplete:(...l)=>new im(...l).createProxy(),string:({key:l,value:e})=>du.has(l)?du.get(l)({key:l,value:e}):Go({key:l,value:e}),boolean:({key:l,value:e})=>Go({key:l,value:e,type:l==="selected"?"radio":"checkbox",checked:!!e}),number:({key:l,value:e})=>Go({key:l,value:e,type:"number"}),array:({key:l,value:e})=>({tag:"select",attrs:{placeholder:Ge(`placeholder.${l}`)},className:[la(l)],options:e}),object:l=>Object.entries(l).map(([e,t])=>It[V.childType(t)]({key:e,value:t}))},rm={boolean:(l,e)=>({click:({target:t})=>{if(t.type==="radio"){const n=e.data.options.map(p=>({...p,selected:!1}));e.set("options",n)}e.set(l,t.checked),e.updatePreview()}}),string:(l,e)=>({input:({target:{value:t}})=>{e.set(l,t),e.debouncedUpdatePreview()}}),number:(l,e)=>({input:({target:{value:t}})=>{e.set(l,Number(t)),e.debouncedUpdatePreview()}}),array:(l,e)=>({change:({target:{value:t}})=>{e.set(l,t),e.debouncedUpdatePreview()}}),object:()=>({})},om=Object.freeze({title:"",content:null,confirmText:()=>Ge("save"),cancelText:()=>Ge("cancel"),onConfirm:()=>{},onCancel:()=>{},className:"",closeOnEscape:!0,position:"top",triggerElement:null,triggerCoords:null});class Dt{constructor(e){this.opts=Ue(om,e),this.dialog=null}createDialog(){const{title:e,content:t,confirmText:n,cancelText:p,className:h,closeOnEscape:g,position:m}=this.opts,c=`dialog-position-${m}`,d=[];return e&&d.push({tag:"h3",className:"dialog-title",textContent:e}),t&&d.push({tag:"div",className:"dialog-body",children:Array.isArray(t)?t:[t]}),d.push({tag:"div",className:"dialog-actions",children:[{tag:"button",type:"button",className:"btn btn-sm btn-secondary",textContent:typeof p=="function"?p():p,action:{click:()=>this.handleCancel()}},{tag:"button",type:"submit",className:"btn btn-sm btn-primary",textContent:typeof n=="function"?n():n}]}),V.create({tag:"dialog",className:["formeo-dialog","formeo",c,h],children:[{tag:"form",className:"dialog-form",method:"dialog",children:d,action:{submit:o=>this.handleSubmit(o)}}],action:{cancel:o=>{g?this.handleCancel():o.preventDefault()}}})}handleSubmit(e){e.preventDefault();const t=new FormData(e.target);this.opts.onConfirm(t,this),this.close()}handleCancel(){this.opts.onCancel(this),this.close()}setPosition(){const{position:e,triggerElement:t,triggerCoords:n}=this.opts;if(e!=="trigger"||!this.dialog)return;let p=n;if(!p&&t){const h=t.getBoundingClientRect();p={x:h.left+h.width/2,y:h.bottom+8}}if(p){const h=this.dialog.getBoundingClientRect(),g=window.innerWidth,m=window.innerHeight;let c=p.x-h.width/2,d=p.y;const r=16;c=Math.max(r,Math.min(c,g-h.width-r)),d=Math.max(r,Math.min(d,m-h.height-r)),this.dialog.style.left=`${c}px`,this.dialog.style.top=`${d}px`,this.dialog.style.transform="none"}}open(){if(this.dialog||(this.dialog=this.createDialog()),document.body.appendChild(this.dialog),this.dialog.showModal(),this.opts.position==="trigger"){const e=setTimeout(()=>{this.setPosition(),clearTimeout(e)},0)}return this}close(){this.dialog&&(this.dialog.close(),this.dialog.remove(),this.dialog=null)}static alert(e,t=()=>{}){return new Dt({content:{tag:"p",className:"dialog-message",textContent:e},confirmText:()=>X.get("ok")||"OK",cancelText:"",onConfirm:()=>t()})}static confirm(e,t=()=>{},n=()=>{}){return new Dt({content:{tag:"p",className:"dialog-message",textContent:e},confirmText:()=>X.get("confirm")||"Confirm",onConfirm:()=>t(),onCancel:()=>n()})}static prompt(e,t=()=>{},n=""){return new Dt({content:[{tag:"label",className:"dialog-prompt-label",children:[{tag:"p",className:"dialog-message",textContent:e},{tag:"input",type:"text",name:"prompt-value",className:"dialog-prompt-input",value:n}]}],onConfirm:p=>{const h=p.get("prompt-value");t(h)}})}}const Jh="hidden-property",sm="hidden-option",qo=/\.options\[\d+\]$/,am={"if-sourceProperty":Cn(wn,cc,uc),"if-targetProperty":Cn(wn),"then-targetProperty":Cn(wn,cc,uc),...Object.entries(lp).reduce((l,[e,t])=>(l[`if-${e}`]=t,l[`then-${e}`]=t,l),{})},ed={assignment:jt,comparison:jt,logical:jt,source:({key:l,value:e,onChange:t,conditionType:n})=>It.autocomplete({key:`${n}.condition.${l}`,value:e,onChange:t,className:`condition-${l}`}),sourceProperty:jt,targetProperty:jt,target:l=>ed.source(l),value:({key:l,value:e,onChange:t},n)=>{const p=It.string({key:`condition.${l}`,value:e});return p.action={input:t},p}};function lm({key:l,value:e,conditionType:t}){const n=`${t}-${l}`,p=am[n];return Object.entries(p||{}).map(([h,g])=>cm({fieldName:l,fieldValue:e,key:h,optionValue:g}))}function cm({fieldName:l,fieldValue:e,key:t,optionValue:n}){return{label:X.get(`${l}.${t}`)||Je(t).toLowerCase(),value:n,selected:n===e}}function jt({key:l,value:e,onChange:t,conditionType:n}){const p=lm({key:l,value:e,conditionType:n}),h=It.array({key:`condition.${l}`,value:p});return h.action={change:t},h}const um=l=>!l?.classList.contains(Jh),hm={sourceProperty:l=>{const e=l.get("source"),t=l.get("sourceProperty"),n=!!e.value,p=!!e.value.match(qo);return gu(p,t),!n},comparison:l=>{const e=l.get("source"),t=l.get("sourceProperty"),n=!!e.value,p=!!e.value.match(qo);return!n||p||t.value!=="value"},assignment:l=>{const e=l.get("target"),t=l.get("targetProperty");return!!!e.value||t.value.startsWith("is")},targetProperty:l=>{const e=l.get("target"),t=l.get("targetProperty"),n=!!e.value.match(qo);return gu(n,t),!Nf(e.value)},target:l=>{const e=l.get("source"),t=l.get("sourceProperty"),n=!!e?.value;return t&&!n?!0:t&&t?.value!=="value"},value:l=>{const e=l.get("target"),t=l.get("targetProperty");return t===void 0?!1:e&&!e.value||!um(l.get("comparison"))||t.value===td?!0:t.value.startsWith("is")}},pu=l=>{for(const[e,t]of l){const n=!!hm[e]?.(l)||!1;t.classList.toggle(Jh,n)}},td="isChecked",Ko=l=>l.value.endsWith("Checked"),gu=(l,e)=>{if(l&&Ko(e))return null;const t=Array.from(e.querySelectorAll("option")),n=[];for(const p of t){const h=Ko(p),g=l?!h:h;g&&n.push(p.value),p.classList.toggle(sm,g)}n.includes(e.value)&&(e.value=l?td:t.find(p=>!Ko(p))?.value||e.value)};function dm(l,e=ap){return e.reduce((t,n)=>(l[n]!==void 0&&t.push([n,l[n]]),t),[])}class fm{constructor({conditionValues:e,conditionType:t,conditionCount:n,index:p},h){this.values=new Map(dm(e)),this.conditionType=t,this.parent=h,this.baseAddress=`${h.address}.${t}`,this.fields=new Map,this.conditionCount=n,this.index=p,this.dom=this.generateDom()}setConditionIndex(e){this.index=e}get address(){return`${this.baseAddress}[${this.index}]`}destroy(){const e=ce.getAddress(this.baseAddress);e.splice(this.index,1),ce.setAddress(this.baseAddress,e),xe.slideUp(this.dom,bt,()=>{this.dom.remove()})}label(){return this.index?null:{tag:"label",className:`condition-label ${this.conditionType}-condition-label`,content:X.get(`condition.type.${this.conditionType}`)}}generateDom(){const e=[];for(const[p,h]of this.values){const g=r=>this.onChangeCondition({key:p,target:r.target}),m={key:p,value:h,conditionType:this.conditionType,onChange:g},c=ed[p](m,this.values),d=c.dom||V.create(c);this.fields.set(p,c.dom?c:d),e.push(d)}const n={children:[this.label(),...e,...this.generateConditionTypeActionButtons()],className:`f-condition-row ${this.conditionType}-condition-row display-none`,action:{onRender:p=>{this.processUiState()}}};return V.create(n)}generateConditionTypeActionButtons(){const e=[],t="manage-condition-type",n=g=>`${g}-condition-type`,p=V.btnTemplate({title:X.get(`remove${this.conditionType}Condition`),className:[t,n("remove")],content:V.icon("minus"),action:{click:()=>this.destroy(),mouseover:g=>{this.dom.classList.add("to-remove")},mouseout:g=>{this.dom.classList.remove("to-remove")}}});e.push(p);const h=V.btnTemplate({title:X.get(`add${this.conditionType}Condition`),className:[t,n("add")],content:V.icon("plus"),action:{click:()=>{const g=this.parent.addConditionType(this.conditionType),m={changedProperty:null,dataPath:g.address,value:g.value,src:g.dom};this.updateDataDebounced(m)}}});return e.push(h),e}get value(){return Array.from(this.fields).reduce((e,[t,n])=>(e[t]=n.value,e),{})}processUiState(){pu(this.fields),this.dom.classList.remove("display-none")}updateDataDebounced=Ln(e=>{J.formeoUpdated(e),ce.setAddress(e.dataPath,e.value)});onChangeCondition=({key:e,target:t})=>{const n={changedProperty:e,dataPath:this.address,value:this.value,src:t};pu(this.fields),this.updateDataDebounced(n)}}const pm=new Map([["attrs",({itemKey:l})=>l],["options",({itemKey:l,key:e})=>`${l}.${e}`]]),nd=(l,e)=>{if(e.controlId==="select"){const t=e.editPanels.get("options"),[n,p]=l?Rn:hp,h=t.data.map(({[n]:g,...m})=>({[p]:g,...m}));t.setData(h)}},gm=new Map([["attrs-multiple",l=>({change:({target:e})=>{l.field.controlId==="select"&&nd(e.checked,l.field)}})]]);class Vt{constructor({key:e,index:t,field:n,panel:p,data:h}){this.field=n,this.itemKey=e,this.itemIndex=t,this.panel=p,this.panelName=p.name,this.isDisabled=n.isDisabledProp(e,this.panelName),this.isHidden=this.isDisabled&&n.config.panels[this.panelName].hideDisabled,this.isLocked=n.isLockedProp(e,this.panelName),this.address=`${n.indexName}.${n.id}.${e}`,this.itemSlug=hc(e),this.conditionTypeWrap=new Map,h!==void 0&&this.field.get(this.itemKey)===void 0&&this.field.set(this.itemKey,h);const g=[`field-${this.itemSlug}`,"prop-wrap"];this.isHidden&&g.push("hidden-property"),this.dom=V.create({tag:"li",className:g,children:{className:"component-prop",children:[this.itemInputs(),this.itemControls]}})}get itemValues(){const e=this.field.get(this.itemKey);return e?.constructor===Object?Pn(Object.entries(e),Rn,"0"):[[this.itemKey,e]]}findOrCreateConditionTypeWrap(e){let t=this.conditionTypeWrap.get(e);return t||(t=V.create({className:`type-conditions-wrap ${e}-conditions-wrap`}),this.conditionTypeWrap.set(e,t),t)}itemInputs(){const e=V.create({className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map(([t,n])=>this.panelName==="conditions"?this.generateConditionFields(t,n):this.itemInput(t,n))});return this.inputs&&this.inputs.replaceWith(e),this.inputs=e,e}addConditionType=(e,t)=>{const n=this.findOrCreateConditionTypeWrap(e);let p=t;if(!p){const[g]=ea()[e],m=n.children.length;e===Ch&&(g.logical="||"),p={conditionValues:g,conditionCount:m,index:m}}const h=new fm({conditionType:e,...p},this);return n.appendChild(h.dom),h};removeConditionType=(e,t)=>{const p=this.conditionTypeWrap.get(e).children[t];p.destroy(),p.dom.remove()};generateConditionFields=(e,t)=>(this.conditions=new Map,t.forEach((n,p)=>{const h=this.addConditionType(e,{index:p,conditionCount:t.length,conditionValues:n});this.conditions.set(p,h)}),this.findOrCreateConditionTypeWrap(e));get itemControls(){if(this.isLocked)return{className:`${this.panelName}-prop-controls prop-controls`,content:[]};const e={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{xe.slideUp(this.dom,Qe,n=>{this.field.remove(this.itemKey),n.remove(),this.panel.updateProps()})},mouseover:n=>{this.dom.classList.add("to-remove")},mouseout:n=>{this.dom.classList.remove("to-remove")}},content:V.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[e]}}getConfigAttrOptions(e){const t=e.split(".").pop(),n=this.field.config?.attrs?.[t];return Array.isArray(n)?n:null}itemInput(e,t){if(this.isDisabled)return null;let n=V.childType(t)||"string",p=t;if(this.panelName==="attrs"){const i=this.getConfigAttrOptions(e);i&&(p=i.map(u=>({...u,selected:u.value===t})),n="array")}const h=pm.get(this.panelName)?.({itemKey:this.itemKey,key:e})||this.itemKey,g=h.split(".").filter(Number.isNaN).join(".")||e,m=It[n]({key:e,value:p}),c=`${this.field.shortId}-${hc(h).replaceAll(/-\d+-(selected)/g,"-$1")}`,d={label:this.panelName!=="options"&&Ge(g),labelAfter:!1,inputWrap:["f-input-wrap",this.isLocked&&"locked-prop",this.isDisabled&&"disabled-prop"].filter(Boolean).join(" ")},r={name:m.attrs.type==="checkbox"?`${c}[]`:c};r.disabled=this.isDisabled,r.readonly=this.isLocked;const o=gm.get(this.itemSlug)?.(this),a=Dp(rm[n](h,this.field),o||{}),s=Ue(It[n]({key:e,value:p}),{action:a,attrs:r,config:d});return Rn.includes(e)?{className:"f-addon",children:s}:s}}const mm={multiple:(l,e)=>{nd(!!l,e)}},vm=[{label:Ge("config.label"),value:"label"},{label:Ge("config.hideLabel"),value:"hideLabel"},{label:Ge("config.helpText"),value:"helpText"},{label:Ge("config.labelAfter"),value:"labelAfter"},{label:Ge("config.disableHtmlLabel"),value:"disableHtmlLabel"},{label:Ge("config.tooltip"),value:"tooltip"}],ym={label:"New Field",hideLabel:!1,helpText:"",labelAfter:!1,disableHtmlLabel:!1,tooltip:""};class bm{constructor(e,t,n){this.type=V.childType(e),this.name=t,this.component=n,this.panelConfig=this.getPanelConfig(this.data)}get data(){const e=this.component.get(this.name);return this.type==="object"?Object.entries(e):e}getPanelConfig(e){return this.props=this.createProps(e),this.editButtons=this.createEditButtons(),{config:{label:X.get(`panel.label.${this.name}`)},attrs:{className:`${ch} ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(e=this.data){this.editPanelItems=Array.from(e).map((n,p)=>{const h=this.type==="array",g=n[0],m=h?`[${p}]`:`.${n[0]}`,c=h?n:{[n[0]]:n[1]},d=`${this.name}${m}`,r=this.component.isDisabledProp(d,this.name),o=dp.get(this.name)?.has(g)??!0;return r||!o?null:new Vt({key:d,data:c,field:this.component,index:p,panel:this})}).filter(Boolean);const t={tag:"ul",attrs:{className:["edit-group",`${this.component.name}-edit-group`,`${this.component.name}-edit-${this.name}`]},editGroup:this.name,isSortable:this.name==="options",content:this.editPanelItems};return V.create(t)}updateProps(){const e=this.createProps();this.props.replaceWith(e),this.props=e}createEditButtons(){const e=this.name,t={attrs:this.addAttribute,options:this.addOption,conditions:this.addCondition,config:this.addConfiguration},n=[];if(e==="conditions"){X.current&&!X.current.clearAll&&X.put("clearAll","Clear All");const m={...V.btnTemplate({content:[V.icon("bin"),X.get("clearAll")],title:X.get("clearAll")}),className:`clear-all-${e}`,action:{click:()=>{this.clearAllItems()}}};n.push(m)}const p=X.get(`panelEditButtons.${e}`)||`+ Add ${Je(e)}`,h={...V.btnTemplate({content:p,title:p}),className:`add-${e}`,action:{click:m=>{const c={btnCoords:V.coords(m.target),addAction:t[e]};e==="attrs"&&(c.isDisabled=this.component.isDisabledProp,c.isLocked=this.component.isLockedProp,c.message={attr:X.get(`action.add.${e}.attr`),value:X.get(`action.add.${e}.value`)});const d=Je(e),r=new globalThis.CustomEvent(`onAdd${d}`,{detail:c});$e.add[e](c),document.dispatchEvent(r)}}};return n.push(h),{className:"panel-action-buttons",content:n}}addAttribute=(e,t)=>{let n=t;const p=jh(e),h=`attrs.${p}`;X.current[h]||X.put(h,Vh(e)),typeof n=="string"&&["true","false"].includes(n)&&(n=JSON.parse(n)),this.component.set(`attrs.${e}`,n),mm[p]?.(n,this.component);const g=this.props.querySelector(`.${this.component.name}-attrs-${p}`),m=new Vt({key:h,data:{[p]:n},field:this.component,panel:this});g?g.replaceWith(m.dom):this.props.appendChild(m.dom),this.component.resizePanelWrap()};addOption=()=>{const e=this.component.data.config.controlId,t=this.component.get("options"),n=e==="select"?"option":e,p=X.get("newOptionLabel",{type:n})||"New Option",h=`${this.name}[${this.data.length}]`,g=t[t.length-1],c={...t.length?g:{},label:p};e!=="button"&&(c.value=Ah(p));const d=new Vt({key:h,data:c,field:this.component,index:this.props.children.length,panel:this});this.editPanelItems.push(d),this.props.appendChild(d.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()};addCondition=e=>{const n=`conditions[${this.component.get("conditions").length}]`,p=new Vt({key:n,data:e.template,field:this.component,panel:this});this.props.appendChild(p.dom),this.component.set(n,e.template),this.component.resizePanelWrap()};addConfiguration=()=>{const e=this.component.get("config");new Dt({className:"config-item-dialog",content:[{tag:"select",config:{label:X.get("selectConfigKey")||"Select Configuration Key"},attrs:{name:"selectConfigKey",required:!0,className:"config-key-select"},options:vm.filter(n=>!(n.value in e))}],onConfirm:n=>{const p=n.get("selectConfigKey").trim(),h=`config.${p}`;if(p){const g=new Vt({key:h,data:ym[p],field:this.component,panel:this});this.editPanelItems.push(g),this.props.appendChild(g.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()}}}).open()};clearAllItems=()=>{const e=this.type==="array"?[]:{},t={type:this.name,removeAction:()=>{this.component.set(this.name,e),this.updateProps()}};$e.remove[this.name](t);const n=Je(this.name),p=new globalThis.CustomEvent(`onRemove${n}`,{detail:t});document.dispatchEvent(p)};setData(e){this.data=e,this.component.set(this.name,e),this.updateProps()}}const mu=Object.freeze({type:"field",displayType:"slider"}),vn=l=>({transform:`translateX(${l?`${l}px`:0})`});class id{constructor(e){this.opts=Ue(mu,e),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const t=this.createPanelsWrap();this.nav=this.navActions(),this.nav.groupChange(this.activePanelIndex);const n=new window.ResizeObserver(([{contentRect:{width:h}}])=>{this.currentWidth!==h&&(this.toggleTabbedLayout(),this.currentWidth=h,this.nav.setTranslateX(this.activePanelIndex,!1))}),p=window.setTimeout(()=>{n.observe(t),window.clearTimeout(p)},qs)}getPanelDisplay(){const e=this.panelsWrap,n=Number.parseInt(V.getStyle(e,"width"),10)>390?"tabbed":"slider",p=this.opts.displayType==="auto";return this.panelDisplay=p?n:this.opts.displayType||mu.displayType,this.panelDisplay}toggleTabbedLayout=()=>{this.getPanelDisplay();const e=this.isTabbed;return this.panelsWrap.parentElement?.classList.toggle("tabbed-panels",e),e&&this.panelNav.removeAttribute("style"),e};resizePanels=()=>{this.toggleTabbedLayout()};createPanelsWrap(){const e=V.create({className:"panels",content:this.opts.panels.map(({config:t,...n})=>n)});return this.opts.type==="field"&&this.sortableProperties(e),this.panelsWrap=e,this.panels=e.children,this.currentPanel=this.panels[this.activePanelIndex],e}sortableProperties(e){const t=e.getElementsByClassName("field-edit-group");return Fe.forEach(t,n=>{n.fieldId=this.opts.id,n.isSortable&&te.create(n,{animation:150,group:{name:`edit-${n.editGroup}`,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:p=>{this.propertySave(p.to),this.resizePanels()}})})}createPanelNavLabels(){const e=this.opts.panels.map(p=>({tag:"h5",action:{click:h=>{const g=ut(h.target);this.nav.setTranslateX(g,!1),this.nav.groupChange(g)}},content:p.config.label})),t={className:"panel-labels",content:{content:e}},[n]=e;return n.className="active-tab",V.create(t)}createPanelNav(){this.labels=this.createPanelNavLabels();const e={tag:"button",attrs:{className:"next-group",title:X.get("controlGroups.nextGroup"),type:"button"},action:{click:n=>this.nav.nextGroup(n)},content:V.icon("triangle-right")},t={tag:"button",attrs:{className:"prev-group",title:X.get("controlGroups.prevGroup"),type:"button"},action:{click:n=>this.nav.prevGroup(n)},content:V.icon("triangle-left")};return V.create({tag:"nav",attrs:{className:"panel-nav"},content:[t,this.labels,e]})}get isTabbed(){return this.panelDisplay==="tabbed"}navActions(){const e={},t=this.currentPanel.parentElement,n=this.labels.firstChild,p=n.children,h=this.currentPanel.parentElement.childNodes;this.activePanelIndex=ut(this.currentPanel);let g={nav:0,panel:0},m={...g};e.groupChange=r=>(this.activePanelIndex=r,this.currentPanel=h[r],V.removeClasses(h,"active-panel"),V.removeClasses(p,"active-tab"),this.currentPanel.classList.add("active-panel"),p[r].classList.add("active-tab"),this.currentPanel);const c=r=>({nav:-n.offsetWidth*r,panel:-t.offsetWidth*r}),d=({offset:r,reset:o,duration:a=bt,animate:s=!this.isTabbed})=>{const i=[vn(m.panel),vn(r.panel)],u=[vn(m.nav),vn(this.isTabbed?0:r.nav)];if(o){const[E]=i,[$]=u;i.push(E),u.push($)}const f={easing:"ease-in-out",duration:s?a:0,fill:"forwards"},y=t.animate(i,f);n.animate(u,f);const b=()=>{y.removeEventListener("finish",b),o||(m=r)};y.addEventListener("finish",b)};return e.setTranslateX=(r=this.activePanelIndex,o=!0)=>{g=c(r),d({offset:g,animate:o})},e.refresh=(r=this.activePanelIndex)=>{this.activePanelIndex!==r&&e.groupChange(r),e.setTranslateX(this.activePanelIndex,!1),this.resizePanels()},e.nextGroup=()=>{const r=this.activePanelIndex+1;if(r!==h.length){const o=h[r];g={nav:-n.offsetWidth*r,panel:-o.offsetLeft},d({offset:g}),e.groupChange(r)}else g={nav:m.nav-8,panel:m.panel-8},d({offset:g,reset:!0});return this.currentPanel},e.prevGroup=()=>{if(this.activePanelIndex!==0){const r=this.activePanelIndex-1,o=h[r];g={nav:-n.offsetWidth*r,panel:-o.offsetLeft},d({offset:g}),e.groupChange(r)}else g={nav:8,panel:8},d({offset:g,reset:!0})},e}}let Yo=null;const Zo=Cn(wn);class ei extends na{constructor(e,t={}){const n={...t,id:t.id||We()};super(e,n),this.id=n.id,this.shortId=this.id.slice(0,this.id.indexOf("-")),this.name=e,this.indexName=`${e}s`,this.config={...n.config,...ce[`${this.name}s`].config},this.address=`${this.name}s.${this.id}`,this.dataPath=`${this.address}.`,this.editPanels=new Map,this.eventListeners=new Map,this.initEventHandlers()}initEventHandlers(){this.config.events&&Object.entries(this.config.events).forEach(([e,t])=>{this.addEventListener(e,t)})}addEventListener(e,t){this.eventListeners.has(e)||this.eventListeners.set(e,[]),this.eventListeners.get(e).push(t)}removeEventListener(e,t){if(!this.eventListeners?.has(e))return;const n=this.eventListeners.get(e),p=n.indexOf(t);p>-1&&n.splice(p,1)}dispatchComponentEvent(e,t={}){const n={component:this,target:this,type:e,timestamp:Date.now(),...t};return this.eventListeners?.has(e)&&this.eventListeners.get(e).forEach(p=>{try{typeof p=="function"&&p(n)}catch(h){console.error(`Error in ${e} event handler for ${this.name} ${this.id}:`,h)}}),n}set(e,t){const n=this.get(e),p=super.set(e,t);return n!==t&&this.dom&&this.dispatchComponentEvent("onUpdate",{path:e,oldValue:n,newValue:t}),p}get js(){return this.data}get json(){return this.data}remove=e=>{if(e){const g=wt(e),m=g.pop(),c=this.get(g);return Array.isArray(c)?Bh(m)?c.splice(Number(m),1):this.set(g,c.filter(d=>d!==m)):delete c[m],c}if(this.name==="stage")return null;const t=this.parent,n=this.children;this.dispatchComponentEvent("onRemove",{path:e,parent:t,children:[...n]}),Jn(n,g=>g.remove()),this.dom.remove(),If(ce.getAddress(`${t.name}s.${t.id}.children`),this.id),t.children.length||t.emptyClass(),t.name==="row"&&t.autoColumnWidths();const h={row:Xs,column:Qs,field:Js}[this.name];return h&&J.formeoUpdated({componentId:this.id,componentType:this.name,parent:t},h),ce[`${this.name}s`].delete(this.id)};empty(){const e=this.children.map(t=>(t.remove(),t));return this.dom.classList.add("empty"),e}emptyClass=()=>this.dom.classList.toggle("empty",!this.children.length);getActionButtons(){const e=[`hovering-${this.name}`,"hovering"];return{className:[`${this.name}-actions`,"group-actions"],action:{mouseenter:()=>{ce.stages.active.dom.classList.add(`active-hover-${this.name}`),this.dom.classList.add(...e)},mouseleave:({target:t})=>{this.dom.classList.remove(...e),ce.stages.active.dom.classList.remove(`active-hover-${this.name}`),t.removeAttribute("style")}},children:[{...V.btnTemplate({content:V.icon(`handle-${this.name}`)}),className:["component-handle",`${this.name}-handle`]},{className:["action-btn-wrap",`${this.name}-action-btn-wrap`],children:this.buttons}]}}getComponentTag=()=>V.create({tag:"span",className:["component-tag",`${this.name}-tag`],children:[V.icon(`handle-${this.name}`),Je(this.name)].filter(Boolean)});toggleEdit(e=!this.isEditing){this.isEditing=e;const t=this.dom,n="editing",p=`${n}-${this.name}`,h=this.dom.querySelector(`.${this.name}-edit`);xe.slideToggle(h,Qe,e),this.name==="field"&&(xe.slideToggle(this.preview,Qe,!e),t.parentElement.classList.toggle(`column-${p}`,e)),t.classList.toggle(n,e),t.classList.toggle(p,e)}get buttons(){if(this.actionButtons)return this.actionButtons;const e={handle:(g=`handle-${this.name}`)=>({...V.btnTemplate({content:V.icon(g)}),className:["component-handle"]}),move:(g="move")=>({...V.btnTemplate({content:V.icon(g)}),className:["item-move"],meta:{id:"move"}}),edit:(g="edit")=>({...V.btnTemplate({content:V.icon(g)}),className:["edit-toggle"],meta:{id:"edit"},action:{click:()=>{this.toggleEdit()}}}),remove:(g="remove")=>({...V.btnTemplate({content:V.icon(g)}),className:["item-remove"],meta:{id:"remove"},action:{click:()=>{xe.slideUp(this.dom,Qe,()=>{this.name==="column"?(this.parent.autoColumnWidths(),this.remove()):this.remove()})}}}),clone:(g="copy")=>({...V.btnTemplate({content:V.icon(g)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>{this.clone(this.parent),this.name==="column"&&this.parent.autoColumnWidths()}}})},{buttons:t,disabled:n}=this.config.actionButtons,h=t.filter(g=>!n.includes(g)).map(g=>e[g]?.()||g);return this.actionButtons=h,this.actionButtons}get index(){return ut(this.dom)}removeClasses=e=>{const t={string:()=>this.dom.classList.remove(e),array:()=>e.map(n=>this.dom.classList.remove(n))};return t.object=t.string,t[V.childType(e)](this.dom)};get parentType(){return ep.get(this.name)}get parent(){const e=this.parentType;if(!this.dom||!e)return null;const t=this.dom.closest(`.${Us[e]}`);return t&&V.asComponent(t)}get children(){if(!this.dom)return[];const e=this.domChildren,t=ac.get(this.name);return sa(e,n=>ce.getAddress(`${t}s.${n.id}`)).filter(Boolean)}loadChildren=(e=this.data.children)=>e.map(t=>this.addChild({id:t}));get domChildren(){const e=this.dom.querySelector(".children");return e?e.children:[]}addChild(e={},t=this.domChildren.length){let n=e;typeof e!="object"&&(n={id:n});const p=this.dom.querySelector(".children"),{id:h=We()}=n,g=ac.get(this.name);if(!g)return null;const m=`${g}s`,c=ce.getAddress(`${m}.${h}`)||ce[m].add(h,n);t>=p.children.length?p.appendChild(c.dom):p.children[t].before(c.dom),this.dispatchComponentEvent("onAddChild",{parent:this,target:c,child:c,index:t}),c.dispatchComponentEvent("onAdd",{parent:this,target:c,index:t,addedVia:"addChild"}),this.config.events?.onAddChild?.({parent:this,child:c});const d=c.get("children");return d?.length&&c.loadChildren(d),this.removeClasses("empty"),this.saveChildOrder(),c}saveChildOrder=()=>{if(this.render)return;const e=this.children.map(({id:t})=>t);return this.set("children",e),e};onAdd({from:e,to:t,item:n,newIndex:p}){e.classList.contains(ct)||(e=e.parentElement);const h=Le(e),g=Le(t.parentElement),m=()=>{this.saveChildOrder(),this.removeClasses("empty")},c=new Map([[-2,()=>{const o=this.addChild({},p).addChild();return o.addChild.bind(o)}],[-1,()=>{const o=this.addChild({},p);return o.addChild.bind(o)}],[0,()=>this.addChild.bind(this)],[1,o=>{const a=ut(this.dom);return()=>this.parent.addChild(o,a+1)}],[2,o=>()=>this.parent.parent.addChild(o)]]),r={controls:async()=>{if(!Yo){const{default:b}=await Tt(async()=>{const{default:E}=await Promise.resolve().then(()=>Im);return{default:E}},void 0);Yo=b}const{controlData:{meta:{id:o},...a}}=Yo.get(n.id);Zn(a,"config.controlId",o);const s=o.startsWith("layout-")?o.replace(/^layout-/,""):"field",u=Re({stage:{row:0,column:-1,field:-2},row:{row:1,column:0,field:-1},column:{row:2,column:1,field:0},field:1},`${this.name}.${s}`),f=c.get(u)();return V.remove(n),f(a,p)},row:()=>{const o={stage:-1,row:0,column:1};return(c.get(o[g])||Ss)()?.({id:n.id},p)},column:()=>{const o={stage:-2,row:-1};return(c.get(o[g])||Ss)()?.(n.id)}}[h]?.(n,p);return this.dispatchComponentEvent("onAdd",{from:e,to:t,item:n,newIndex:p,fromType:h,toType:g,addedComponent:r,addedVia:"dragDrop"}),m(),r}onSort=()=>this.saveChildOrder();onRemove({from:{parentElement:e}}){return e.classList.contains(nt)&&e.classList.remove("column-editing-field"),this.name!=="stage"&&!this.children.length?this.remove():(this.emptyClass(),this.saveChildOrder())}onEnd=({to:{parentElement:e},from:{parentElement:t}})=>{e?.classList.remove(`hovering-${Le(e)}`),t?.classList.remove(`hovering-${Le(t)}`)};onRender(){this.dispatchComponentEvent("onRender",{dom:this.dom});const{events:e}=this.config;if(!e)return null;e.onRender&&V.onRender(this.dom,e.onRender)}set config(e){const t=Re(e,"all"),n=Re(this.data,"config.controlId"),p=n&&Re(e,n),h=Re(e,this.id),g=[t,p,h].reduce((m,c)=>c?Ue(m,c):m,this.configVal);this.configVal=g}get config(){return this.configVal}runConditions=()=>{const e=this.get("conditions");return e?.length?e.map(n=>{const p=this.processConditions(n.if),h=this.processResults(n.then);return p.map(g=>this.evaluateConditions(g)&&this.execResults(h))}):null};getComponent(e){const[t,n]=e.split("."),p=ce[t];return n===this.id?this:p?.get(n)}value=(e,t)=>{const n=e.split("."),p=this.getComponent(e),h=p&&n.slice(2,n.length).join(".");return[!p,!h,!Zo[h]].some(Boolean)?e:t?p.set(Zo[h],t):p.get(Zo[h])};getResult=e=>({"=":(n,p,h)=>n.set(p,h)})[e];processResults=e=>e.map(({operator:t,target:n,value:p})=>{const h=this.getComponent(n),g=h&&n.split(".").slice(2,n.length).join(".");return{target:h,propertyPath:g,action:this.getResult(t),value:this.value(p)}});execResults=e=>{const t=e.map(n=>this.execResult(n));return Promise.all(t)};execResult=({target:e,action:t,value:n,_propertyPath:p})=>new Promise((h,g)=>{try{return h(t(e,n))}catch(m){return g(m)}});cloneData=()=>{const e={...Ke(this.data),id:We()};return this.name!=="field"&&(e.children=[]),e};clone=(e=this.parent)=>{const t=e.addChild(this.cloneData(),this.index+1);return this.name!=="field"&&this.cloneChildren(t),this.dispatchComponentEvent("onClone",{original:this,clone:t,parent:e}),t};cloneChildren(e){for(const t of this.children)t?.clone(e)}createChildWrap=e=>V.create({tag:"ul",attrs:{className:"children"},children:e});get isRow(){return this.name===Ur.row}get isColumn(){return this.name===Ur.column}get isField(){return this.name===Ur.field}isDisabledProp=(e,t="attrs")=>{if(Re(this.config,e))return!1;if((this.config?.disabled||[]).includes(e))return!0;const h=kn(e);return(this.config?.panels[t]?.disabled||[]).includes(h)};isLockedProp=(e,t="attrs")=>{if((this.config?.locked||[]).includes(e))return!0;const h=kn(e);return!!(this.config?.panels[t]?.locked||[]).includes(h)};get editWindow(){const e={className:["component-edit",`${this.name}-edit`,"slide-toggle","formeo-panels-wrap"]},t=this.editPanels.size;return t&&(e.className.push(`panel-count-${t}`),e.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh),e.action={onRender:()=>{if(t===0){const n=this.dom.querySelector(".edit-toggle"),p=this.dom.querySelector(`.${this.name}-actions`),h=p.getElementsByTagName("button");p.style.maxWidth=`${h.length*h[0].clientWidth}px`,V.remove(n)}else this.resizePanelWrap()}},V.create(e)}updateEditPanels=()=>{if(!this.config)return null;const e=new Set(["object","array"]),t=yt([...this.config.panels.order,...Object.keys(this.data)]),n=new Set(["children","meta","action","events",...this.config.panels.disabled]),p=t.filter(g=>!n.has(g));for(const g of p){const m=this.get(g),c=V.childType(m);if(e.has(c)){const d=new bm(m,g,this);this.editPanels.set(d.name,d)}}const h={panels:Array.from(this.editPanels.values()).map(({panelConfig:g})=>g),id:this.id,displayType:"auto"};this.panels=new id(h),this.dom&&(this.dom.querySelector(".panel-nav").replaceWith(this.panels.panelNav),this.dom.querySelector(".panels").replaceWith(this.panels.panelsWrap))}}class wm{constructor(){this.onMove=this.onMove.bind(this),this.onStop=this.onStop.bind(this),this.cleanup=this.cleanup.bind(this)}getRowWidth(e){const t=e.querySelector(".children");if(!t)return 0;const n=t.children.length,p=V.getStyle(t,"gap")||"0px",h=parseFloat(p,10)||0;return this.totalGapWidth=h*(n-1),t.offsetWidth-this.totalGapWidth}validateResizeTarget(e,t){return e&&t&&e.offsetWidth&&t.offsetWidth}onStart(e){if(e.preventDefault(),this.resized=!1,e.button!==0)return;const t=e.target.parentElement,n=t.nextSibling||t.previousSibling,p=t.closest(`.${tt}`);if(!this.validateResizeTarget(t,n)){console.warn("Invalid resize targets"),this.cleanup();return}if(this.startX=e.type==="touchstart"?e.touches[0].clientX:e.clientX,p.classList.add(Vr),this.columnPreset=p.querySelector(`.${uh}`),this.originalColumnClass=t.className,this.originalSiblingClass=n.className,t.className=t.className.replace(xs,""),n.className=n.className.replace(xs,""),this.colStartWidth=t.offsetWidth,this.sibStartWidth=n.offsetWidth,this.rowWidth=this.getRowWidth(p),this.rowWidth<=0){console.warn("Invalid row width calculated"),this.cleanup();return}this.column=t,this.sibling=n,this.row=p;try{window.addEventListener("pointermove",this.onMove,!1),window.addEventListener("pointerup",this.onStop,!1)}catch(h){console.error("Failed to initialize resize listeners:",h),this.cleanup()}}calculateNewWidths(e){const t=this.colStartWidth+e-this.startX,n=this.sibStartWidth-e+this.startX,p=parseFloat(jr(t,this.rowWidth)),h=parseFloat(jr(n,this.rowWidth));return p<10||h<10?null:{colWidth:Cs(p.toFixed(1)),siblingColWidth:Cs(h.toFixed(1))}}onMove(e){e.preventDefault();const{column:t,sibling:n}=this,p=e.type==="touchmove"?e.touches[0].clientX:e.clientX,h=this.calculateNewWidths(p);if(!h)return;const{colWidth:g,siblingColWidth:m}=h;t.dataset.colWidth=g,n.dataset.colWidth=m,t.style.width=g,n.style.width=m,this.resized=!0}onStop(){const{column:e,sibling:t}=this;window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop),this.resized&&(this.setCustomWidthValue(),ce.setAddress(`columns.${e.id}.config.width`,e.dataset.colWidth),ce.setAddress(`columns.${t.id}.config.width`,t.dataset.colWidth),this.row.classList.remove(Vr),this.resized=!1,this.cleanup())}cleanup(){this.column&&this.originalColumnClass&&(this.column.className=this.originalColumnClass),this.sibling&&this.originalSiblingClass&&(this.sibling.className=this.originalSiblingClass),this.row&&this.row.classList.remove(Vr),window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop)}setCustomWidthValue(){const e=this.columnPreset;let t=e.querySelector(`.${$s}`);const n=this.row.querySelector(".children").children,p=sa(n,m=>jr(m.clientWidth,this.rowWidth).toFixed(1)),h=p.join(","),g=p.join(" | ");return t||(t=V.create({tag:"option",attrs:{className:$s,value:h,selected:!0},content:g}),e.append(t)),t.value=h,t.textContent=g,h}}const Cm=()=>Object.freeze({config:{width:"100%"},children:[],className:[nt]}),vu={resizeHandle:l=>({className:"resize-x-handle",action:{pointerdown:l.onStart.bind(l)},content:[V.icon("triangle-down"),V.icon("triangle-up")]}),editWindow:()=>({className:"column-edit group-config"})};class Sm extends ei{constructor(e){super("column",{...Cm(),...e});const t=this.createChildWrap();this.dom=V.create({tag:"li",className:[nt,"empty"],dataset:{hoverTag:X.get("column")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),vu.editWindow(),vu.resizeHandle(new wm),t]}),this.processConfig(),J.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),te.create(t,{animation:150,fallbackClass:"field-moving",forceFallback:!0,group:{name:"column",pull:!0,put:["column","controls"]},sort:!0,disabled:!1,onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),onRemove:this.onRemove.bind(this),onMove:n=>{n.from!==n.to&&n.from.classList.remove("hovering-column")},draggable:`.${Ht}`,handle:".item-move"})}processConfig(){const e=Fe.get(this.data,"config.width");e&&this.setDomWidth(e)}refreshFieldPanels=()=>{for(const e of this.children)e.panels.nav.refresh()};setDomWidth=e=>{this.dom.dataset.colWidth=e,this.dom.style.width=e};setWidth=e=>(this.setDomWidth(e),this.set("config.width",e))}const Am={actionButtons:{buttons:["clone","move","remove"],disabled:[]}};let $m=class extends Xn{constructor(e){super("columns",e),this.config={all:Am}}Component(e){return new Sm(e)}};const rd=new $m,xm=()=>Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[tt]});class Em extends ei{constructor(e){super("row",{...xm(),...e});const t=this.createChildWrap();this.dom=V.create({tag:"li",className:[tt,"empty"],dataset:{hoverTag:X.get("row"),editingHoverTag:X.get("editing.row")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),this.editWindow,t]}),te.create(t,{animation:150,fallbackClass:"column-moving",forceFallback:!0,group:{name:"row",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onRemove:this.onRemove.bind(this),onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),draggable:`.${nt}`,handle:".item-move"})}get editWindow(){const e={tag:"input",id:`${this.id}-fieldset`,attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:X.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:a}})=>{this.set("config.fieldset",!!a)}},config:{label:X.get("row.settings.fieldsetWrap")}},t={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:X.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:a}})=>this.set("config.inputGroup",a)},config:{label:X.get("row.makeInputGroup"),description:X.get("row.makeInputGroupDesc")}},n={tag:"span",content:" ⓘ",dataset:{tooltip:"Row title will be used as the legend for the fieldset"}},h={className:"input-group",content:{tag:"input",attrs:{type:"text",ariaLabel:"Legend for fieldset",value:this.get("config.legend"),placeholder:"Title"},config:{label:{children:["Row Title",n]}},action:{input:({target:{value:a}})=>this.set("config.legend",a)},className:""}},g=V.formGroup([e,h]),m={tag:"label",content:X.get("defineColumnWidths"),className:"col-sm-4 form-control-label"};this.columnPresetControl=V.create(this.columnPresetControlConfig);const c={className:"col-sm-8",content:this.columnPresetControl,action:{onRender:()=>{this.updateColumnPreset()}}},d=V.formGroup([m,c],"row"),r=[t,"hr",g,"hr",d];return V.create({className:`${this.name}-edit group-config`,action:{onRender:a=>{const s=r.map(i=>V.create(i));a.append(...s)}}})}onAdd(...e){super.onAdd(...e),this.autoColumnWidths()}onRemove(...e){super.onRemove(...e),this.autoColumnWidths()}autoColumnWidths=()=>{const e=this.children;if(!e.length)return;const t=Number.parseFloat((100/e.length).toFixed(1))/1;for(const n of e){n.removeClasses(xs);const p=n.dom,h=Cs(t);n.set("config.width",h),p.style.width=h,p.dataset.colWidth=h;const g=setTimeout(()=>{clearTimeout(g),n.refreshFieldPanels()},bt);document.dispatchEvent(J.columnResized)}this.updateColumnPreset()};updateColumnPreset=()=>{this.columnPresetControl.innerHTML="";const e=this.getColumnPresetOptions.map(({label:t,...n})=>V.create({tag:"option",content:t,attrs:n}));this.columnPresetControl.append(...e)};setColumnWidths=e=>{typeof e=="string"&&(e=e.split(",")),this.children.forEach((t,n)=>{t.setWidth(`${e[n]}%`),t.refreshFieldPanels()})};get getColumnPresetOptions(){const e=this.children,n=np.get(e.length-1)||[],p=e.map(h=>{const g=h.get("config.width")||"";return Number(g.replace("%","")).toFixed(1)}).join(",");if(n.length){const h=n.slice();return!h.find(m=>m.value===p)&&h.push({value:p,label:p.replace(/,/g," | "),className:$s}),h.map(m=>{const c={...m};return c.selected=m.value===p,c})}return[]}get columnPresetControlConfig(){return{tag:"select",attrs:{ariaLabel:X.get("defineColumnLayout"),className:uh},action:{change:({target:t})=>{const{value:n}=t;this.setColumnWidths(n)}},options:this.getColumnPresetOptions}}}const Mm={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]}};let Tm=class extends Xn{constructor(e){super("rows",e),this.config={all:Mm}}Component(e){return new Em(e)}};const ca=new Tm,_m=()=>({conditions:[ea()],children:[]});class Lm extends ei{constructor(e){super("stage",{..._m(),...e}),this.updateEditPanels(),this.debouncedUpdateEditPanels=Ln(this.updateEditPanels),X.get("Untitled Form"),X.get("Untitled Form"),X.get("Form Title"),X.get("Form novalidate"),X.get("Tags");const t=this.createChildWrap();this.dom=V.create({attrs:{className:[Pt,"empty"],id:this.id},children:[this.getComponentTag(),this.getActionButtons(),this.editWindow,t]}),te.create(t,{animation:150,fallbackClass:"row-moving",group:{name:"stage",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onAdd:this.onAdd.bind(this),onRemove:this.onRemove.bind(this),onStart:()=>{sn.active=this},onSort:this.onSort.bind(this),draggable:`.${tt}`,handle:".item-move"})}empty(e=!0){return new Promise(t=>{e?(this.dom.classList.add("removing-all-fields"),xe.slideUp(this.dom,Qe,()=>{t(super.empty(e)),this.dom.classList.remove("removing-all-fields"),xe.slideDown(this.dom,Qe)})):t(super.empty())})}onAdd(...e){const t=super.onAdd(...e);t?.name==="column"&&t.parent.autoColumnWidths()}}const Rm=()=>({actionButtons:{buttons:["edit"],disabled:[]},panels:{disabled:[],order:["attrs","options","conditions"]}});let km=class extends Xn{constructor(e){super("stages",e),this.config={all:Rm()}}Component(e){return new Lm(e)}};const sn=new km;class Dm{controlCache=new Set;constructor({events:e={},dependencies:t={},controlAction:n,...p}){this.events=e,this.controlData=p,this.controlAction=n,this.dependencies=t,this.id=p.id||We()}get controlId(){return this.controlData.meta?.id||this.controlData.config?.controlId}get dom(){const{meta:e,config:t}=this.controlData,n=this.i18n(t.label)||t.label,p={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:V.icon(e.icon)},{tag:"span",className:"control-label",content:n}],action:{focus:({target:h})=>{const g=h.closest(`.${ct}`);return g&&Ct.panels.nav.refresh(ut(g))},click:({target:h})=>{const g=h.closest(".field-control")?.id;g&&Ct.addElement(g)}}};return V.create({tag:"li",id:this.id,className:["field-control",`${e.group}-control`,`${e.id}-control`],content:p,meta:e,action:this.controlAction})}promise(){return qh(this.dependencies)}i18n(e,t){const n=X.locale,h=this.definition?.i18n?.[n]||{};return(h[e]?.()??h[e])||X.get(e,t)}}const Om=Object.freeze({sortable:!0,elementOrder:{},groupOrder:[],groups:[{id:"layout",label:"controls.groups.layout",elementOrder:["row","column"]},{id:"common",label:"controls.groups.form",elementOrder:["button","checkbox"]},{id:"html",label:"controls.groups.html",elementOrder:["header","block-text"]}],disable:{groups:[],elements:[],formActions:[]},elements:[],container:null,panels:{displayType:"slider"}});let od=class{constructor(){this.data=new Map,this.buttonActions={focus:({target:e})=>{const t=e.closest(`.${ct}`);return t&&this.panels.nav.refresh(ut(t))},click:({target:e})=>{this.addElement(e.parentElement.id)}}}async init(e,t=!1){return await this.applyOptions(e),this.buildDOM(t),this}registerControls(e){return this.controls=[],e.map(t=>{const p=typeof t=="function"?new t:new Dm(t);return this.add(p),this.controls.push(p.dom),p.promise()})}groupLabel=e=>X.get(e)||e||"";groupElements(){let e=this.options.groups.slice(),t=this.controls.slice(),n=[];const p=[];return e=Pn(e,this.groupOrder,"id"),e=e.filter(h=>oc(h.id,this.options.disable.groups)),n=e.map(h=>{const g={tag:"ul",attrs:{className:[ct,ch],id:`${h.id}-${ct}`},config:{label:this.groupLabel(h.label)}};if(this.options.elementOrder[h.id]){const m=this.options.elementOrder[h.id],c=yt(m.concat(h.elementOrder));h.elementOrder=c}return t=Pn(t,h.elementOrder,"meta.id"),g.content=t.filter(m=>{const{controlData:c}=this.get(m.id),d=c.meta.id||"",r=[oc(d,this.options.disable.elements),c.meta.group===h.id,!p.includes(d)];let o=!0;return o=r.every(a=>a===!0),o&&p.push(d),o}),g}),n}add(e=Object.create(null)){const t=Ke(e);return this.data.set(t.id,t),t.controlData.meta.id&&this.data.set(t.controlData.meta.id,t.controlData),t}get(e){return Ke(this.data.get(e))}formActions(){if(this.options.disable.formActions===!0)return null;const e={...V.btnTemplate({content:[V.icon("bin"),X.get("clear")],title:X.get("clearAll")}),className:["clear-form"],action:{click:p=>{ca.size?(J.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:X.get("confirmClearAll"),clearAllAction:()=>{sn.clearAll().then(()=>{const h={src:p.target};J.formeoCleared(h)})},btnCoords:V.coords(p.target)}}),document.dispatchEvent(J.confirmClearAll)):window.alert(X.get("cannotClearFields"))}}},t={...V.btnTemplate({content:[V.icon("floppy-disk"),X.get("save")],title:X.get("save")}),className:["save-form"],action:{click:async({target:p})=>{const{default:h}=await Tt(async()=>{const{default:c}=await Promise.resolve().then(()=>Bm);return{default:c}},void 0),{formData:g}=h,m={action:()=>{},coords:V.coords(p),message:"",button:p};return $e.click.btn(m),$e.save.form(g)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:e,saveBtn:t}).reduce((p,[h,g])=>(this.options.disable.formActions.includes(h)||p.push(g),p),[])}}buildDOM(e){const t=this.groupElements(),n=this.formActions(),{displayType:p}=this.options.panels;this.panels=new id({panels:t,type:"controls",displayType:p});const h=["control-groups","formeo-panels-wrap",`panel-count-${t.length}`],g=V.create({className:h,content:[this.panels.panelNav,this.panels.panelsWrap]}),m=["formeo-controls"];e&&m.push("formeo-sticky");const c=V.create({className:m,content:[g,n]}),d=c.getElementsByClassName("control-group");this.dom=c,this.groups=d;const[r]=d;this.currentGroup=r,this.actions={filter:o=>{const a=o!=="",s=this.controls;let i=g.querySelector(".filtered-term");if(V.toggleElementsByStr(s,o),a){const u=X.get("controls.filteringTerm",o);c.classList.add("filtered"),i?i.textContent=u:(i=V.create({tag:"h5",className:"filtered-term",content:u}),g.insertBefore(i,g.firstChild))}else i&&(c.classList.remove("filtered"),i.remove())},addElement:this.addElement,addGroup:o=>console.log(o)};for(let o=d.length-1;o>=0;o--){const a=`formeo-controls-${d[o]}`;this.options.sortable||globalThis.localStorage.removeItem(a),te.create(d[o],{animation:150,fallbackClass:"control-moving",fallbackOnBody:!0,forceFallback:!0,fallbackTolerance:5,group:{name:"controls",pull:"clone",put:!1,revertClone:!0},onClone:({clone:s,item:i})=>{if(s.id=i.id,this.options.ghostPreview){const{controlData:u}=this.get(i.id);Tt(async()=>{const{default:f}=await Promise.resolve().then(()=>Pm);return{default:f}},void 0).then(({default:f})=>{s.innerHTML="",s.appendChild(new f(u).preview)})}},onStart:()=>{this.originalDocumentOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"},onEnd:()=>{document.documentElement.style.overflow=this.originalDocumentOverflow,this.originalDocumentOverflow=null},sort:this.options.sortable,store:{get:()=>{const s=globalThis.localStorage.getItem(a);return s?s.split("|"):[]},set:s=>{const i=s.toArray();globalThis.localStorage.setItem(a,i.join("|"))}}})}return c}layoutTypes={row:()=>sn.active.addChild(),column:()=>this.layoutTypes.row().addChild(),field:e=>this.layoutTypes.column().addChild(e)};addElement=e=>{const{meta:{group:t,id:n},...p}=Re(this.get(e),"controlData");return Zn(p,"config.controlId",n),t==="layout"?this.layoutTypes[n.replace("layout-","")]():this.layoutTypes.field(p)};applyOptions=async(e={})=>{const{container:t,elements:n,groupOrder:p,...h}=Ue(Om,e);this.container=t,this.groupOrder=yt(p.concat(["common","html","layout"])),this.options=h;const[g,m,c]=await Promise.all([Tt(()=>import("./index.min.js"),[]),Tt(()=>import("./index.min2.js"),[]),Tt(()=>import("./index.min3.js"),[])]),d=[g.default,m.default,c.default].flat();return Promise.all(this.registerControls([...d,...n]))}};const Ct=new od,Im=Object.freeze(Object.defineProperty({__proto__:null,Controls:od,default:Ct},Symbol.toStringTag,{value:"Module"})),Nm=new Set(["checkbox","radio"]),Fm=new Set(["radio","checkbox","select-one","select-multiple"]);class sd extends ei{constructor(e=Object.create(null)){super("field",e),this.debouncedUpdateEditPanels=Ln(this.updateEditPanels),this.debouncedUpdatePreview=Ln(this.updatePreview),this.label=V.create(this.labelConfig),this.preview=this.fieldPreview(),this.controlId=this.get("config.controlId")||this.get("meta.id");const t=this.getActionButtons(),n=this.actionButtons.some(h=>h.meta?.id==="edit");this.updateEditPanels();const p=V.create({tag:"li",attrs:{className:Ht},id:this.id,children:[this.label,this.getComponentTag(),t,n&&this.editWindow,this.preview].filter(Boolean),panelNav:this.panelNav,dataset:{hoverTag:X.get("field")}});this.dom=p,this.isEditing=!1}get labelConfig(){if(!!this.get("config.hideLabel"))return null;const{label:t,editorLabel:n,disableHtmlLabel:p,helpText:h,tooltip:g}=this.get("config"),{required:m}=this.get("attrs")||{},c=n||t,d={tag:"label",attrs:{}};return p?(d.tag="input",d.attrs.value=c):(d.attrs.contenteditable=!0,d.children=c),{className:"prev-label",children:[{...d,action:{input:({target:{innerHTML:a,value:s}})=>{const i=p?s:a;super.set("config.label",i);const u=this.dom.querySelector(".config-label");u&&(u.value=i)}}},m&&V.requiredMark(),g&&V.tooltip(g),h&&V.helpText(h)]}}setData=(e,t)=>super.set(e,t);set(e,t){return this.setData(e,t)}updateLabel(){const e=V.create(this.labelConfig);(this.label||!e)&&this.label.remove(),e&&(this.data.config?.labelAfter?this.dom.append(e):this.dom.prepend(e)),this.label=e}updatePreview=()=>{this.updateLabel();const e=this.fieldPreview();this.preview.replaceWith(e),this.preview=e};get defaultPreviewActions(){return{change:e=>{const{target:t}=e,{type:n}=t;if(Fm.has(n)){const p=this.preview.querySelectorAll(":checked"),h=this.get("options"),g=h?.[0]?.selected===void 0?"checked":"selected",m=h.reduce((c,d)=>(c[d.value]=d,c[d.value][g]=!1,c),{});for(const c of p)m[c.value][g]=c.value===m[c.value].value;return super.set("options",Object.values(m)),this.debouncedUpdateEditPanels()}},click:e=>{e.target.contentEditable==="true"&&e.preventDefault()},input:({target:e})=>{if(["input","meter","progress","button"].includes(e.tagName.toLowerCase()))return super.set("attrs.value",e.value),this.debouncedUpdateEditPanels();if(e.contentEditable&&!e.type?.startsWith("select-")){const t=e.parentElement.classList;if(t.contains("f-checkbox")||t.contains("f-radio")){const p=e.parentElement,h=ut(p);return this.setData(`options[${h}].label`,e.innerHTML),this.debouncedUpdateEditPanels()}this.setData("content",e.innerHTML||e.value)}}}}fieldPreview(){const{action:e={},...t}=Ke(this.data);t.id=`prev-${this.id}`,t.action=Object.entries(e).reduce((p,[h,g])=>(p[h]=g.bind(this),p),{}),this.data?.config.editableContent&&(t.attrs={...t.attrs,contenteditable:!0});const n={attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:V.create(t,!0),action:this.defaultPreviewActions};return V.create(n,!0)}get isCheckable(){return Nm.has(this.get("config.controlId"))}}const Pm=Object.freeze(Object.defineProperty({__proto__:null,default:sd},Symbol.toStringTag,{value:"Module"})),Hm=()=>({actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}});let Wm=class extends Xn{constructor(e){super("fields",e),this.config={all:Hm()}}Component(e){return new sd(e)}get=e=>{let t=e&&Re(this.data,e);if(!t){const n=Ct.get(e);n&&(t=this.add(null,n.controlData))}return t};getData=()=>Object.entries(this.data).reduce((e,[t,n])=>{const{conditions:p,...h}=n?.getData()||n;if(p?.length){let g=!0;if(p.length===1){const[m]=p;g=!!m.if[0].source}g&&(h.conditions=p)}return e[t]=h,e},{});load=(e=Object.create(null))=>{const t=qn(e);this.empty();for(const[n,p]of Object.entries(t)){const{meta:h,...g}=p;h?.id&&Zn(g,"config.controlId",h?.id),this.add(n,g)}return this.data}};const ad=new Wm,Mn=sn,Tn=ca,rn=rd,_n=ad,Wn=Ct,zm=(l,e=!1)=>{if(l!=null){const t=qn(l);if(t&&typeof t=="object"){const n=Ke(t);return{id:n.id||Rt().id,stages:n.stages||Rt().stages,rows:n.rows||{},columns:n.columns||{},fields:n.fields||{}}}console.warn("Formeo: Invalid formData provided, using default")}if(e){const t=Ws.get(Gs);if(t)return t}return Rt()};class ld extends na{constructor(){super("components"),this.disableEvents=!0,this.stages=Mn,this.rows=Tn,this.columns=rn,this.fields=_n,this.controls=Wn}load=(e,t)=>{this.empty();const n=zm(e,t.sessionStorage);this.opts=t,this.set("id",n.id),this.add("stages",Mn.load(n.stages)),this.add("rows",Tn.load(n.rows)),this.add("columns",rn.load(n.columns)),this.add("fields",_n.load(n.fields));for(const p of Object.values(this.get("stages")))p.loadChildren();return this.data};flatList(){const e={};for(const t of Object.keys(this.data.stages))lh(this.data,t,"stages",e);return e}getChildData=({type:e,id:t})=>{const n=this.get(e,t);if(n)return n.getData()};get json(){return window.JSON.stringify({$schema:`https://cdn.jsdelivr.net/npm/formeo@${Bs}/dist/formData_schema.json`,...this.formData})}get formData(){return{id:this.get("id"),stages:sn.getData(),rows:ca.getData(),columns:rd.getData(),fields:ad.getData()}}set config(e){const{stages:t,rows:n,columns:p,fields:h}=e;Mn.config=t,Tn.config=n,rn.config=p,_n.config=h}getIndex(e){return this[e]||this[Gf.get(e)]}setAddress(e,t){if(!He(e))return;const[n,p,...h]=Array.isArray(e)?e:wt(e),m=this.getIndex(n).get(p);return m?.set(h,t),m}getAddress(e){if(!He(e))return;const[t,n,...p]=Array.isArray(e)?e:wt(e),g=this.getIndex(t).get(n);if(!(p.length&&!g))return p.length?g.get(p):g}}const ce=new ld,Bm=Object.freeze(Object.defineProperty({__proto__:null,Columns:rn,Components:ld,Controls:Wn,Dialog:Dt,Fields:_n,Rows:Tn,Stages:Mn,default:ce},Symbol.toStringTag,{value:"Module"})),yu="no-transition",jm={debug:!1,bubbles:!0,formeoLoaded:l=>{},onAdd:()=>{},onChange:l=>J.opts?.debug&&console.log(l),onUpdate:l=>J.opts?.debug&&console.log(l),onUpdateStage:l=>J.opts?.debug&&console.log(l),onUpdateRow:l=>J.opts?.debug&&console.log(l),onUpdateColumn:l=>J.opts?.debug&&console.log(l),onUpdateField:l=>J.opts?.debug&&console.log(l),onAddRow:l=>J.opts?.debug&&console.log(l),onAddColumn:l=>J.opts?.debug&&console.log(l),onAddField:l=>J.opts?.debug&&console.log(l),onRemoveRow:l=>J.opts?.debug&&console.log(l),onRemoveColumn:l=>J.opts?.debug&&console.log(l),onRemoveField:l=>J.opts?.debug&&console.log(l),onRender:l=>J.opts?.debug&&console.log(l),onSave:l=>{},confirmClearAll:l=>{globalThis.confirm(l.confirmationMessage)&&l.clearAllAction(l)}},je=({src:l,...e},t=on)=>{const n=new globalThis.CustomEvent(t,{detail:e,bubbles:J.opts?.debug||J.opts?.bubbles});if(n.data=(l||document).dispatchEvent(n),t===on){const p=new globalThis.CustomEvent(ip,{detail:e,bubbles:J.opts?.debug||J.opts?.bubbles});(l||document).dispatchEvent(p)}return n},J={init:function(l){return this.opts={...jm,...l},this},formeoSaved:l=>je(l,fh),formeoUpdated:(l,e)=>je(l,e||on),formeoCleared:l=>je(l,rp),formeoOnRender:l=>je(l,yh),formeoConditionUpdated:l=>je(l,op),formeoAddedRow:l=>je(l,Ks),formeoAddedColumn:l=>je(l,Ys),formeoAddedField:l=>je(l,Zs),formeoRemovedRow:l=>je(l,Xs),formeoRemovedColumn:l=>je(l,Qs),formeoRemovedField:l=>je(l,Js)},Vm=Ff(()=>{const l={timeStamp:globalThis.performance.now(),type:on,detail:ce.formData};J.opts.onUpdate(l),J.opts.onChange!==J.opts.onUpdate&&J.opts.onChange(l)},bt);document.addEventListener(on,Vm);document.addEventListener(ph,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onUpdate(p),J.opts.onUpdateStage(p)});document.addEventListener(gh,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onUpdate(p),J.opts.onUpdateRow(p)});document.addEventListener(mh,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onUpdate(p),J.opts.onUpdateColumn(p)});document.addEventListener(vh,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onUpdate(p),J.opts.onUpdateField(p)});document.addEventListener(Ks,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onAddRow(p)});document.addEventListener(Ys,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onAddColumn(p)});document.addEventListener(Zs,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onAddField(p)});document.addEventListener(Xs,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onRemoveRow(p)});document.addEventListener(Qs,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onRemoveColumn(p)});document.addEventListener(Js,l=>{const{timeStamp:e,type:t,detail:n}=l,p={timeStamp:e,type:t,detail:n};J.opts.onRemoveField(p)});document.addEventListener(yh,l=>{const{timeStamp:e,type:t,detail:n}=l;J.opts.onRender({timeStamp:e,type:t,detail:n})});document.addEventListener("confirmClearAll",l=>{l={timeStamp:l.timeStamp,type:l.type,confirmationMessage:l.detail.confirmationMessage,clearAllAction:l.detail.clearAllAction,btnCoords:l.detail.btnCoords},J.opts.confirmClearAll(l)});document.addEventListener(fh,({timeStamp:l,type:e,detail:{formData:t}})=>{const n={timeStamp:l,type:e,formData:t};J.opts.onSave(n)});document.addEventListener("formeoLoaded",l=>{J.opts.formeoLoaded(l.detail.formeo)});let Xo;function Um(){Xo=Xo||window.requestAnimationFrame(()=>{Xo=!1;for(const l of Object.values(rn.data))l.dom.classList.add(yu),Wn.dom.classList.add(yu),Wn.panels.nav.refresh(),l.refreshFieldPanels()})}window.addEventListener("resize",Um);const bu={add:{attr:l=>{const e=globalThis.prompt(l.message.attr);if(e&&l.isDisabled(e))return globalThis.alert(X.get("attributeNotPermitted",e)),$e.add.attrs(l);let t;e&&(t=String(globalThis.prompt(l.message.value,"")),l.addAction(e,t))},option:l=>{l.addAction()},condition:l=>{l.addAction(l)},config:l=>{l.addAction(l)}},remove:{attrs:l=>{l.removeAction()},options:l=>{l.removeAction()},conditions:l=>{l.removeAction()}},click:{btn:l=>{l.action()}},save:{form:Ss}},$e={init:function(l){const e=Object.keys(bu);return this.opts=e.reduce((t,n)=>(t[n]={...bu[n],...l[n]},t),l),this},add:{attrs:l=>$e.opts.add.attr(l),options:l=>$e.opts.add.option(l),conditions:l=>(l.template=l.template||ea(),$e.opts.add.condition(l)),config:l=>$e.opts.add.config(l)},remove:{attrs:l=>$e.opts.remove.attrs(l),options:l=>$e.opts.remove.options(l),conditions:l=>$e.opts.remove.conditions(l)},click:{btn:l=>$e.opts.click.btn(l)},save:{form:l=>($e.opts.sessionStorage&&Ws.set(Gs,l),J.formeoSaved({formData:l}),$e.opts.save.form(l))}},Gm={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,svgSprite:null,style:Bf,iconFont:null,config:{},events:{},actions:{},controls:{},i18n:{location:"https://draggable.github.io/formeo/assets/lang/"},onLoad:()=>{}}}},Oe={CREATED:"created",LOADING_RESOURCES:"loading",INITIALIZING:"initializing",READY:"ready",ERROR:"error"};let cd=class{#e=Oe.CREATED;#n=null;#t=null;#i=!1;constructor({formData:e,...t},n){const p=Ue(Gm.editor,t),{actions:h,events:g,debug:m,config:c,editorContainer:d,...r}=p;d&&(this.editorContainer=typeof d=="string"?document.querySelector(d):d),this.opts=r,V.setOptions=r,ce.config=c;const o=n||e;this.#t=o?vt(o):null,this.userFormData=this.#t,this.Components=ce,this.dom=V,J.init({debug:m,...g}),$e.init({debug:m,sessionStorage:r.sessionStorage,...h}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this.loadResources.bind(this)):this.loadResources()}get formData(){return this.Components.formData}set formData(e={}){const t=vt(e);this.#t=t,this.userFormData=t,this.load(this.userFormData,this.opts)}loadData(e={}){this.formData=e}get json(){return this.Components.json}clear(){const e=Rt();this.#t=e,this.userFormData=e,this.Components.load(this.userFormData,this.opts),this.render()}async loadResources(){document.removeEventListener("DOMContentLoaded",this.loadResources),this.#e=Oe.LOADING_RESOURCES;const e=[Pg(this.opts.svgSprite),Wg(this.opts.style),X.init({preloaded:{"en-US":gd},...this.opts.i18n,locale:globalThis.sessionStorage?.getItem(lc)})].filter(Boolean);try{await Promise.all(e),this.opts.allowEdit&&this.init()}catch(t){throw this.#e=Oe.ERROR,console.error("Failed to load resources:",t),t}}init(){return this.#e===Oe.INITIALIZING?this.#n:this.#e===Oe.READY?this.#r():(this.#e=Oe.INITIALIZING,this.#n=Ct.init(this.opts.controls,this.opts.stickyControls).then(e=>(this.controls=e,this.#i||(this.#s(),this.#i=!0),this.formId=ce.get("id"),this.i18n={setLang:this.#o.bind(this)},this.render(),this.#e=Oe.READY,this.opts.onLoad?.(this),this.tooltipInstance=new Uu,this)).catch(e=>{throw this.#e=Oe.ERROR,console.error("Failed to initialize editor:",e),e}),this.#n)}async#o(e){globalThis.sessionStorage?.setItem(lc,e),await X.setCurrent(e),await this.#r()}async#r(){return this.controls=await Ct.init(this.opts.controls,this.opts.stickyControls),this.render(),this}#s(){const e=this.#a();this.Components.load(e,this.opts)}#a(){if(this.#t)return Ke(this.#t);if(this.opts.sessionStorage){const e=Ws.get(Gs);if(e)return e}return Rt()}load(e=this.userFormData,t=this.opts){this.Components.load(e,t),this.render()}get initState(){return this.#e}get isReady(){return this.#e===Oe.READY}async whenReady(){return this.#e===Oe.READY?this:this.#e===Oe.ERROR?Promise.reject(new Error("Editor initialization failed")):this.#n?this.#n:new Promise((e,t)=>{const n=()=>{this.#e===Oe.READY?e(this):this.#e===Oe.ERROR?t(new Error("Editor initialization failed")):globalThis.requestAnimationFrame(n)};n()})}render(){if(!this.controls)return globalThis.requestAnimationFrame(()=>this.render());if(this.stages=Object.values(ce.get("stages")),this.opts.controlOnLeft)for(const n of this.stages)n.dom.style.order=1;const e={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map(({dom:n})=>n)]};X.current.dir&&(e.attrs.dir=X.current.dir,V.dir=X.current.dir),this.editor=V.create(e),(this.controls.container||this.editor).appendChild(this.controls.dom),this.editorContainer&&(V.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),J.formeoLoaded=new globalThis.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(J.formeoLoaded)}};const yn="f-",wu=l=>typeof l=="string"?document.querySelector(l):l,qm=({editorContainer:l,renderContainer:e,formData:t,...n})=>{const p={renderContainer:wu(e),editorContainer:wu(l),formData:vt(t)};return{elements:{},...n,...p}},bn=l=>l.match(up)?.[0]||l,Cu=l=>{if(!l||l.hasAttribute("hidden")||l.parentElement.hasAttribute("hidden"))return!1;const e=window.getComputedStyle(l);return!(e.display==="none"||e.visibility==="hidden"||e.opacity==="0")},Km={isChecked:l=>l.checked,isNotChecked:l=>!l.checked,value:l=>l.value,isVisible:l=>Cu(l),isNotVisible:l=>!Cu(l)},Ym=()=>V.btnTemplate({className:"remove-input-group",children:V.icon("remove"),action:{mouseover:({target:l})=>l.parentElement.classList.add("will-remove"),mouseleave:({target:l})=>l.parentElement.classList.remove("will-remove"),click:({target:l})=>l.parentElement.remove()}}),Su={equals:Es,notEquals:(l,e)=>!Es(l,e),contains:(l,e)=>l.includes(e),notContains:(l,e)=>!l.includes(e)},Zm=Object.entries(bh).reduce((l,[e,t])=>(l[t]=Su[e],l[e]=Su[e],l),{}),Au={equals:(l,{targetProperty:e,value:t})=>{l[`_${e}`]=l[e],l[e]=t}},Xm=Object.entries(wh).reduce((l,[e,t])=>(l[t]=Au[e],l[e]=Au[e],l),{}),Qm={isChecked:l=>{l.checked=!0},isNotChecked:l=>{l.checked=!1},value:(l,{assignment:e,...t})=>{const n=Xm[e]?.(l,t),p=new Event("input",{bubbles:!0});return l.dispatchEvent(p),n},isNotVisible:l=>{l?._required===void 0&&(l._required=l.required),l.parentElement.setAttribute("hidden",!0),l.required=!1},isVisible:l=>{l.parentElement.removeAttribute("hidden"),l.required=l._required}};let ud=class{constructor(e,t){const{renderContainer:n,elements:p,formData:h,config:g}=qm(e);this.container=n,this.form=vt(t||h),this.elements=p,this.config=g,this.components=Object.create(null),this.dom=V}get formData(){return this.form}set formData(e){this.form=vt(e)}get userData(){const e=this.container.querySelector(".formeo-render")||this.renderedForm;if(!e)return{};const t=new FormData(e),n={};for(const[p,h]of t.entries())n[p]?Array.isArray(n[p])?n[p].push(h):n[p]=[n[p],h]:n[p]=h;return n}get userFormData(){const e=[];for(const[t,n]of Object.entries(this.userData)){const p={key:t,value:n,label:this.components[bn(t)]?.config?.label||""};e.push(p)}return e}set userData(e={}){const t=this.container.querySelector("form");for(const n of Object.keys(e)){const p=t.elements[n];if(p.length&&p[0].type==="checkbox"){const h=Array.isArray(e[n])?e[n]:[e[n]];for(const g of p)g.checked=h.includes(g.value)}else if(p.length&&p[0].type==="radio")for(const h of p)h.checked=h.value===e[n];else p.type&&(p.value=e[n])}}render(e=this.form){this.form=vt(e);const t=this.getRenderedForm(e),n=this.container.querySelector(".formeo-render");n?n.replaceWith(t):this.container.appendChild(t)}getRenderedForm(e=this.form){this.form=vt(e);const t=document.getElementsByClassName("formeo-render").length,n={...this.config,tag:"form",id:this.form.id,className:`formeo-render formeo formeo-rendered-${t}`,children:this.processedData};return this.renderedForm=V.render(n),this.applyConditions(),this.renderedForm}get html(){return(this.renderedForm||this.getRenderedForm()).outerHTML}orderChildren=(e,t)=>t.reduce((n,p)=>(n.push(this.form[e][p]),n),[]);prefixId=e=>yn+e;processColumn=({id:e,...t})=>({...t,id:this.prefixId(e),children:this.processFields(t.children),style:`width: ${t.config.width||"100%"}`});processRows=e=>this.orderChildren("rows",this.form.stages[e].children).reduce((t,n)=>(n&&t.push(this.processRow(n)),t),[]);cacheComponent=e=>(this.components[bn(e.id)]=e,e);processRow=(e,t="row")=>{const{config:n,id:p}=e,h=[`formeo-${t}-wrap`],g={...e,children:this.processColumns(e.id),id:this.prefixId(p)};this.cacheComponent(g);const c=[{condition:n.legend,result:()=>({tag:n.fieldset?"legend":"h3",children:n.legend})},{condition:!0,result:()=>g},{condition:n.inputGroup,result:()=>this.addButton(p)}].reduce((d,{condition:r,result:o})=>(r&&d.push(o()),d),[]);return n.inputGroup&&h.push(`${yn}input-group-wrap`),{tag:n.fieldset?"fieldset":"div",className:h,children:c}};cloneComponentData=e=>{const{children:t=[],id:n,attrs:p={},...h}=this.components[e],g={...p,"data-clone-of":n};return h.tag==="input"&&(g.name=Kh(this.components[e])),{...h,id:yn+We(n),children:t?.length&&t.map(({id:m})=>this.cloneComponentData(bn(m))),attrs:g}};addButton=e=>({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:t=>{const n=t.target.parentElement,p=V.create(this.cloneComponentData(e));n.insertBefore(p,n.lastChild);const h=V.create(Ym());p.appendChild(h)}}});processColumns=e=>this.orderChildren("columns",this.form.rows[e].children).map(t=>this.cacheComponent(this.processColumn(t)));processFields=e=>this.orderChildren("fields",e).map(({id:t,...n})=>{const p=n.config?.controlId||n.meta?.id,{action:h={},dependencies:g={}}=this.elements[p]||{};g&&qh(g);const m=Ue({action:h},n);return this.cacheComponent({...m,id:this.prefixId(t)})});get processedData(){return Object.values(this.form.stages).map(e=>(e.children=this.processRows(e.id),e.className=Pt,this.components[bn(e.id)]=e,e))}handleComponentCondition=(e,t,n)=>{if(e.length){for(const g of e)this.handleComponentCondition(g,t,n);return}const p=ev(e);p&&e.addEventListener(p,g=>{if(this.evaluateCondition(t,g))for(const m of n)this.execResult(m,g)},!1);const h={target:e};if(this.evaluateCondition(t,h))for(const g of n)this.execResult(g,h)};applyConditions=()=>{for(const{conditions:e}of Object.values(this.components))if(e)for(const t of e){const{if:n,then:p}=t;for(const h of n){const{source:g,target:m}=h;if(He(g)){const{component:c,options:d}=this.getComponent(g),r=d||c;this.handleComponentCondition(r,h,p)}if(He(m)){const{component:c,options:d}=this.getComponent(m),r=d||c;this.handleComponentCondition(r,h,p)}}}};evaluateCondition=({source:e,sourceProperty:t,targetProperty:n,comparison:p,target:h})=>{const g=this.getComponentProperty(e,t);if(typeof g=="boolean")return g;const m=String(He(h)?this.getComponentProperty(h,n):h);return Zm[p]?.(g,m)};execResult=({target:e,targetProperty:t,assignment:n,value:p})=>{if(He(e)){const{component:h,option:g}=this.getComponent(e),m=g||h;Qm[t]?.(m,{targetProperty:t,assignment:n,value:p})}};getComponentProperty=(e,t)=>{const{component:n,option:p}=this.getComponent(e),h=p||n;return Km[t]?.(h)||h[t]};getComponent=e=>{const t={component:null};if(!He(e))return null;const[,n,p,h]=wt(e),g=this.renderedForm.querySelector(`#${yn}${n}`);if(!g)return t;if(t.component=g,p){const m=g.querySelectorAll("input"),c=m[h];return t.options=m,t.option=c,t}return t};getComponents=e=>{const t=[],n=e.slice(e.indexOf(".")+1);return t.push(...this.renderedForm.querySelectorAll(`[name=f-${n}]`)),t}};const Jm=[["input",l=>["textarea","text"].includes(l.type)],["change",l=>["select"].includes(l.tagName.toLowerCase())||["checkbox","radio"].includes(l.type)]],ev=l=>{const[e]=Jm.find(t=>t[1](l))||[!1];return e};window!==void 0&&(window.FormeoEditor=cd,window.FormeoRenderer=ud);const ua=cd,ha=ud,tv={rows:{all:{events:{onAdd:l=>{if(console.log(`You just added a new row with the id "${l.target.id}"`,l.index),l.index===2){const e=l.target.dom.querySelector(".action-btn-wrap"),t=document.createElement("button");t.type="button",t.className="btn btn-sm btn-secondary",t.textContent="Add Column",t.style.border="1px solid #ccc",t.style.width="auto",t.addEventListener("click",()=>{l.target.addChild()}),e.appendChild(t)}}}}},fields:{all:{panels:{attrs:{}},events:{onRemove:l=>{console.log(`You just removed the field with the id "${l.target.id}"`,l)}}},"text-input":{attrs:{type:[{label:"text",value:"text"},{label:"phone",value:"phone"},{label:"email",value:"email"}]},config:{helpText:"This is a custom help text for text input fields.",hideLabel:!1}},checkbox:{actionButtons:{},panels:{attrs:{hideDisabled:!0}}}}},nv={sortable:!1,groupOrder:["common","html"],disable:{},elements:[{tag:"input",config:{label:"Email",disabledAttrs:["type"],lockedAttrs:["required","className"]},meta:{group:"common",id:"email",icon:"@"},attrs:{className:"custom-email",type:"email",required:!0}}],elementOrder:{common:["button","checkbox","date-input","hidden","upload","number","radio","select","text-input","textarea"]}},iv=".build-form",rv=".render-form",an={editorContainer:iv,actions:{},controls:nv,config:tv,events:{onSave:console.log,onChange:console.log},style:null,sessionStorage:!0,editPanelOrder:["attrs","options"],onLoad:()=>{console.log("demo loaded")}},da={renderContainer:rv,elements:{tinymce:{action:{onRender:l=>{if(l.id){const e=`#${l.id}`;globalThis.tinymce.remove(e),globalThis.tinymce.init({selector:e})}}}}}};async function ov(l){l.innerHTML=`
8
+ var us=Object.create,pi=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,ps=Object.getOwnPropertyNames,fs=Object.getPrototypeOf,gs=Object.prototype.hasOwnProperty,j=(e,i)=>()=>(i||(e((i={exports:{}}).exports,i),e=null),i.exports),Sn=(e,i)=>{let t={};for(var n in e)pi(t,n,{get:e[n],enumerable:!0});return i||pi(t,Symbol.toStringTag,{value:"Module"}),t},ms=(e,i,t,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(var m=ps(i),f=0,g=m.length,c;f<g;f++)c=m[f],!gs.call(e,c)&&c!==t&&pi(e,c,{get:(o=>i[o]).bind(null,c),enumerable:!(n=hs(i,c))||n.enumerable});return e},Et=(e,i,t)=>(t=e!=null?us(fs(e)):{},ms(i||!e||!e.__esModule?pi(t,"default",{value:e,enumerable:!0}):t,e));(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))n(m);new MutationObserver(m=>{for(const f of m)if(f.type==="childList")for(const g of f.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&n(g)}).observe(document,{childList:!0,subtree:!0});function t(m){const f={};return m.integrity&&(f.integrity=m.integrity),m.referrerPolicy&&(f.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?f.credentials="include":m.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function n(m){if(m.ep)return;m.ep=!0;const f=t(m);fetch(m.href,f)}})();var te={"af-ZA":{"af-ZA":"Afrikaans (Suid-Afrika)",dir:"ltr","en-US":"Engels","ar-TN":"Arabies (Tunisië)","cs-CZ":"Tsjeggies (Tsjeggië)","de-DE":"Duits (Duitsland)","es-ES":"Spaans (Spanje)","fa-IR":"Persies (Iran)","fi-FI":"Fins (Finland)","fr-FR":"Frans (Frankryk)","he-IL":"Hebreeus (Israel)","hi-IN":"Hindi (Indië)","hu-HU":"Hongaars (Hongarye)","it-IT":"Italiaans (Italië)","ja-JP":"Japannees (Japan)","nb-NO":"Boeknoors (Noorweë)","pl-PL":"Pools (Pole)","pt-BR":"Portugees (Brasilië)","pt-PT":"Portugees (Portugal)","ro-RO":"Roemeens (Roemenië)","ru-RU":"Russies (Rusland)","th-TH":"Thai (Thailand)","tr-TR":"Turks (Turkye)","zh-CN":"Chinees (China)","zh-HK":"Chinees (Hongkong SAS China)","action.add.attrs.attr":"Watter kenmerk wil jy byvoeg?","action.add.attrs.value":"Standaard waarde",addOption:"Voeg opsie by",allFieldsRemoved:"Alle velde is verwyder.",allowSelect:"Laat Kies toe",and:"en",attribute:"kenmerk",attributeNotPermitted:`Attribuut "{attribuut}" is nie toegelaat nie, kies asseblief 'n ander.`,attributes:"eienskappe","attrs.class":"klas","attrs.className":"klas","attrs.dir":"rigting","attrs.id":"id","attrs.required":"vereis","attrs.style":"styl","attrs.title":"Titel","attrs.type":"tipe","attrs.value":"waarde",autocomplete:"AutoComplete",button:"Button",cancel:"Kanselleer",cannotBeEmpty:"Hierdie veld kan nie leeg wees nie",cannotClearFields:"Daar is geen velde om skoon te maak nie",checkbox:"boks",checkboxes:"blok",class:"klas",clear:"duidelik",clearAllMessage:"Is jy seker jy wil alle velde skoonmaak?",close:"Naby",column:"kolom","condition.target.placeholder":"teiken","condition.type.and":"En","condition.type.if":"As","condition.type.or":"Of","condition.type.then":"Toe","condition.value.placeholder":"waarde",confirmClearAll:"Is jy seker jy wil alle velde verwyder?",content:"inhoud",control:"beheer","controlGroups.nextGroup":"Volgende Groep","controlGroups.prevGroup":"Vorige groep","controls.filteringTerm":'Filtering "{term}"',"controls.form.button":"Button","controls.form.checkbox-group":"Boks groep","controls.form.input.date":"datum","controls.form.input.email":"e-pos","controls.form.input.file":"Lêeroplaai","controls.form.input.hidden":"Versteek Input","controls.form.input.number":"aantal","controls.form.input.text":"Teksinvoer","controls.form.radio-group":"Radio Group","controls.form.select":"Kies","controls.form.textarea":"textarea","controls.groups.form":"Vorm velde","controls.groups.html":"HTML-elemente","controls.groups.layout":"uitleg","controls.html.divider":"deler","controls.html.header":"kop","controls.html.paragraph":"paragraaf","controls.layout.column":"kolom","controls.layout.row":"ry",copy:"Kopieer na Klembord",danger:"gevaar",defineColumnLayout:"Definieer 'n kolom uitleg",defineColumnWidths:"Definieer kolom breedtes",description:"Hulp teks",descriptionField:"beskrywing","editing.row":"Redigeer tans",editorTitle:"Vorm Elemente",field:"veld","field.property.invalid":"nie geldig","field.property.isChecked":"gekontroleer word","field.property.isNotVisible":"is nie sigbaar nie","field.property.isVisible":"is sigbaar","field.property.label":"etiket","field.property.valid":"geldig","field.property.value":"waarde",fieldNonEditable:"Hierdie veld kan nie geredigeer word nie.",fieldRemoveWarning:"Is jy seker jy wil hierdie veld verwyder?",fileUpload:"Lêeroplaai",formUpdated:"Vorm Opdateer",getStarted:"Sleep 'n veld van regs om te begin.",group:"groep",grouped:"gegroepeer",hidden:"Versteek Input",hide:"wysig",htmlElements:"HTML-elemente",if:"As","if.condition.source.placeholder":"bron","if.condition.target.placeholder":"teiken / waarde",info:"info","input.date":"datum","input.text":"teks",label:"Etiket",labelCount:"{label} {count}",labelEmpty:"Veldetiket kan nie leeg wees nie","lang.af":"Afrikaans","lang.ar":"Arabies","lang.cs":"Tsjeggies","lang.de":"Duits","lang.en":"Engels","lang.es":"Spaans","lang.fa":"Persies","lang.fi":"Fins","lang.fr":"Frans","lang.he":"Hebreeus","lang.hi":"Hindi","lang.hu":"Hongaars","lang.it":"Italiaans","lang.ja":"Japannese","lang.nb":"Noorse Bokmål","lang.pl":"Pools","lang.pt":"Portugees","lang.ro":"Roemeens","lang.ru":"Russies","lang.th":"Thai","lang.tr":"Turks","lang.zh":"Chinese",layout:"uitleg",limitRole:"Beperk toegang tot een of meer van die volgende rolle:",mandatory:"verpligte",maxlength:"Maksimum Lengte","meta.group":"groep","meta.icon":"Ico","meta.label":"Etiket",minOptionMessage:"Hierdie veld benodig 'n minimum van 2 opsies",name:"naam",newOptionLabel:"Nuwe {type}",no:"Geen",number:"aantal",off:"af",on:"op","operator.contains":"bevat","operator.equals":"gelyk","operator.notContains":"bevat nie","operator.notEquals":"nie gelyk nie","operator.notVisible":"nie sigbaar nie","operator.visible":"sigbaar",option:"Opsie",optional:"opsioneel",optionEmpty:"Opsie waarde vereis",optionLabel:"Opsie (tel)",options:"opsies",or:"of",order:"Orde","panel.label.attrs":"eienskappe","panel.label.conditions":"voorwaardes","panel.label.config":"opset","panel.label.meta":"meta","panel.label.options":"opsies","panelEditButtons.attrs":"+ Attribuut","panelEditButtons.conditions":"+ Toestand","panelEditButtons.config":"+ Konfigurasie","panelEditButtons.options":"+ Opsie",placeholder:"plekhouer","placeholder.className":"spasie geskeide klasse","placeholder.email":"Vul jou e-pos in","placeholder.label":"Etiket","placeholder.password":"Sleutel jou wagwoord in","placeholder.placeholder":"plekhouer","placeholder.text":"Voer 'n paar teks in","placeholder.textarea":"Vul baie teks in","placeholder.value":"waarde",preview:"voorskou",primary:"primêre",remove:"verwyder",removeMessage:"Verwyder Element",removeType:"Verwyder {tipe}",required:"vereis",reset:"herstel",richText:"Rich Text Editor",roles:"Toegang",row:"ry","row.makeInputGroup":"Maak hierdie ry 'n invoergroep.","row.makeInputGroupDesc":"Invoergroepe stel gebruikers in staat om stelle insette op 'n keer by te voeg.","row.settings.fieldsetWrap":"Wrap ry in 'n <velde> tag","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset",save:"Save",secondary:"sekondêre",select:"Kies",selectColor:"Kies Kleur",selectionsMessage:"Laat meerdere keuses toe",selectOptions:"opsies",separator:"separator",settings:"instellings",size:"grootte",sizes:"groottes","sizes.lg":"groot","sizes.m":"verstek","sizes.sm":"klein","sizes.xs":"Ekstra Klein",style:"styl",styles:"style","styles.btn":"Knoppie styl","styles.btn.danger":"gevaar","styles.btn.default":"verstek","styles.btn.info":"info","styles.btn.primary":"primêre","styles.btn.success":"sukses","styles.btn.warning":"waarskuwing",subtype:"tipe",success:"sukses",text:"Teksveld",then:"dan","then.condition.target.placeholder":"teiken",toggle:"Toggle",ungrouped:"A-Gegroepeer",warning:"waarskuwing",yes:"Ja"},"ar-TN":{"ar-TN":"العربية (تونس)",dir:"rtl","en-US":"الإنجليزية","af-ZA":"الأفريقانية (جنوب أفريقيا)","cs-CZ":"التشيكية (التشيك)","de-DE":"الألمانية (ألمانيا)","es-ES":"الإسبانية الأوروبية","fa-IR":"الفارسية (إيران)","fi-FI":"الفنلندية (فنلندا)","fr-FR":"الفرنسية (فرنسا)","he-IL":"العبرية (إسرائيل)","hi-IN":"الهندية (الهند)","hu-HU":"الهنغارية (هنغاريا)","it-IT":"الإيطالية (إيطاليا)","ja-JP":"اليابانية (اليابان)","nb-NO":"النرويجية بوكمال (النرويج)","pl-PL":"البولندية (بولندا)","pt-BR":"البرتغالية البرازيلية","pt-PT":"البرتغالية الأوروبية","ro-RO":"الرومانية (رومانيا)","ru-RU":"الروسية (روسيا)","th-TH":"التايلاندية (تايلاند)","tr-TR":"التركية (تركيا)","zh-CN":"الصينية (الصين)","zh-HK":"الصينية (هونغ كونغ الصينية [منطقة إدارية خاصة])","action.add.attrs.attr":"ما هي السمة التي ترغب بإضافتها؟","action.add.attrs.value":"القيمة الافتراضية",addOption:"إضافة خيار",allFieldsRemoved:"تمّت إزالة جميع المجالات..",allowSelect:"السماح بالإختيار",and:"و",attribute:"يصف",attributeNotPermitted:'لا يُسمح بالسمة "{attribute}"، يرجى اختيار سمة أخرى.',attributes:"صفات","attrs.class":"فصل","attrs.className":"فصل","attrs.dir":"اتجاه","attrs.id":"بطاقة تعريف","attrs.required":"مطلوب","attrs.style":"أسلوب","attrs.title":"عنوان","attrs.type":"يكتب","attrs.value":"قيمة",autocomplete:"الإكمال التلقائي",button:"زر",cancel:"يلغي",cannotBeEmpty:"هذه المعلومة لا يمكن أن تكون فارغة",cannotClearFields:"لا توجد حقول لمسحها",checkbox:"خانة الاختيار",checkboxes:"خانات إختيار",class:"صنف",clear:"إفسخ",clearAllMessage:"هل أنت متأكد أنك تريد مسح كافة المعلومات؟",close:"أغلق",column:"عمود","condition.target.placeholder":"هدف","condition.type.and":"و","condition.type.if":"لو","condition.type.or":"أو","condition.type.then":"ثم","condition.value.placeholder":"قيمة",confirmClearAll:"هل أنت متأكد أنك تريد إزالة كافة الحقول؟",content:"محتوى",control:"يتحكم","controlGroups.nextGroup":"المجموعة التالية","controlGroups.prevGroup":"المجموعة السابقة","controls.filteringTerm":'تصفية "{term}"',"controls.form.button":"زر","controls.form.checkbox-group":"مجموعة خانات الاختيار","controls.form.input.date":"تاريخ","controls.form.input.email":"بريد إلكتروني","controls.form.input.file":"تحميل الملف","controls.form.input.hidden":"المدخلات المخفية","controls.form.input.number":"رقم","controls.form.input.text":"إدخال النص","controls.form.radio-group":"مجموعة الراديو","controls.form.select":"يختار","controls.form.textarea":"منطقة النص","controls.groups.form":"حقول النموذج","controls.groups.html":"عناصر HTML","controls.groups.layout":"تَخطِيط","controls.html.divider":"فاصل","controls.html.header":"رأس الصفحة","controls.html.paragraph":"فقرة","controls.layout.column":"عمود","controls.layout.row":"صف",copy:"نسخ إلى الحافظة",danger:"خطر",defineColumnLayout:"تحديد تخطيط العمود",defineColumnWidths:"تحديد عرض الأعمدة",description:"نص المساعدة",descriptionField:"وصف","editing.row":"تحرير الصف",editorTitle:"عناصر النموذج",field:"مجال","field.property.invalid":"غير صالح","field.property.isChecked":"تم التحقق","field.property.isNotVisible":"غير مرئي","field.property.isVisible":"هو مرئي","field.property.label":"ملصق","field.property.valid":"صالح","field.property.value":"قيمة",fieldNonEditable:"هذا الحقل لا يمكن تعديله.",fieldRemoveWarning:"هل حقا تريد حذف هذا المجال؟",fileUpload:"تحميل الملف",formUpdated:"تّم تحديث الإستمارة",getStarted:"إسحب إختيار(حقل) من اليمين إلى هذا المجال",group:"مجموعة",grouped:"مجمعة",hidden:"الإدخال مخفي",hide:"تحديث",htmlElements:"عناصر HTML",if:"لو","if.condition.source.placeholder":"مصدر","if.condition.target.placeholder":"الهدف / القيمة",info:"معلومات","input.date":"تاريخ","input.text":"نص",label:"التسمية",labelCount:"{التسمية} {العدد}",labelEmpty:"التسمية لا يمكن أن يكون فارغا","lang.af":"الأفريقي","lang.ar":"عربي","lang.cs":"التشيكية","lang.de":"الألمانية","lang.en":"إنجليزي","lang.es":"الأسبانية","lang.fa":"الفارسية","lang.fi":"الفنلندية","lang.fr":"فرنسي","lang.he":"العبرية","lang.hi":"الهندية","lang.hu":"المجرية","lang.it":"ايطالي","lang.ja":"اليابانية","lang.nb":"البوكمال النرويجية","lang.pl":"بولندي","lang.pt":"البرتغالية","lang.ro":"روماني","lang.ru":"الروسية","lang.th":"تايلاندي","lang.tr":"اللغة التركية","lang.zh":"الصينية",layout:"تَخطِيط",limitRole:"تقييد الوصول إلى واحد أو أكثر من الأدوار التالية:",mandatory:"إلزامي",maxlength:"الحد الاقصى للطول","meta.group":"مجموعة","meta.icon":"إيكو","meta.label":"ملصق",minOptionMessage:"يتطلب هذا المجال لا تقل عن 2 خيارات",name:"الإسم",newOptionLabel:"نوع جديد",no:"لا",number:"رقم",off:"عاطل",on:"مفعل","operator.contains":"يتضمن","operator.equals":"يساوي","operator.notContains":"لا يحتوي على","operator.notEquals":"ليس متساويا","operator.notVisible":"غير مرئي","operator.visible":"مرئي",option:"خيار",optional:"خيار",optionEmpty:"قيمة الخيار المطلوبة",optionLabel:"الخيار {العدد}",options:"خيارات",or:"أو",order:"طلب","panel.label.attrs":"صفات","panel.label.conditions":"شروط","panel.label.config":"إعدادات","panel.label.meta":"ميتا","panel.label.options":"خيارات","panelEditButtons.attrs":"+ السمة","panelEditButtons.conditions":"+ الحالة","panelEditButtons.config":"+ التكوين","panelEditButtons.options":"+ خيار",placeholder:"العنصر النائب","placeholder.className":"فئات مفصولة بمسافات","placeholder.email":"أدخل البريد الإلكتروني","placeholder.label":"تسمية","placeholder.password":"أدخل كلمة المرور","placeholder.placeholder":"العنصر النائب","placeholder.text":"أدخل بعض النص","placeholder.textarea":"إدخال الكثير من النص","placeholder.value":"القيمة",preview:"المعاينة",primary:"أساسي",remove:"&#215;",removeMessage:"إزالة عنصر",removeType:"إزالة {النوع}",required:"إجبارية",reset:"إعادة ضبط",richText:"محرر WYSIWYG",roles:"وصول",row:"صف","row.makeInputGroup":"اجعل هذا الصف مجموعة إدخال.","row.makeInputGroupDesc":"تتيح مجموعات الإدخال للمستخدمين إضافة مجموعات من المدخلات في وقت واحد.","row.settings.fieldsetWrap":"لف الصف في علامة &lt;fieldset&gt;","row.settings.fieldsetWrap.aria":"لف الصف في مجموعة الحقول",save:"حفظ",secondary:"ثانوي",select:"للاختيار",selectColor:"اختيار اللون",selectionsMessage:"سماح اختيارات متعددة",selectOptions:"خيارات",separator:"فاصل",settings:"إعدادات",size:"حجم",sizes:"الأحجام","sizes.lg":"كبير","sizes.m":"تبعا للإعدادات الافتراضية","sizes.sm":"صغير","sizes.xs":"صغيرة اضافية",style:"شكل",styles:"الأشكال","styles.btn":"شكل الزر","styles.btn.danger":"خطر","styles.btn.default":"تبعا للإعدادات الافتراضية","styles.btn.info":"معلومات","styles.btn.primary":"أساسي","styles.btn.success":"نجاح","styles.btn.warning":"إعلام",subtype:"نوع",success:"نجاح",text:"الميدان النص",then:"ثم","then.condition.target.placeholder":"هدف",toggle:"نوع التبديل",ungrouped:"غير مجمعة",warning:"تحذير!",yes:"نعم"},"cs-CZ":{"cs-CZ":"čeština (Česko)",dir:"ltr","en-US":"angličtina","af-ZA":"afrikánština (Jihoafrická republika)","ar-TN":"arabština (Tunisko)","de-DE":"němčina (Německo)","es-ES":"španělština (Evropa)","fa-IR":"perština (Írán)","fi-FI":"finština (Finsko)","fr-FR":"francouzština (Francie)","he-IL":"hebrejština (Izrael)","hi-IN":"hindština (Indie)","hu-HU":"maďarština (Maďarsko)","it-IT":"italština (Itálie)","ja-JP":"japonština (Japonsko)","nb-NO":"norština (bokmål) (Norsko)","pl-PL":"polština (Polsko)","pt-BR":"portugalština (Brazílie)","pt-PT":"portugalština (Evropa)","ro-RO":"rumunština (Rumunsko)","ru-RU":"ruština (Rusko)","th-TH":"thajština (Thajsko)","tr-TR":"turečtina (Turecko)","zh-CN":"čínština (Čína)","zh-HK":"čínština (Hongkong – ZAO Číny)","action.add.attrs.attr":"Jaký atribut byste chtěli přidat?","action.add.attrs.value":"Výchozí hodnota",addOption:"Přidat možnost",allFieldsRemoved:"Všechna pole byla odstraněna.",allowSelect:"Povolit Vybrat",and:"a",attribute:"Atribut",attributeNotPermitted:'Atribut "{attribute}" není povolen, vyberte prosím jiný.',attributes:"Atributy","attrs.class":"Třída","attrs.className":"Třída","attrs.dir":"Směr","attrs.id":"Id","attrs.required":"Požadovaný","attrs.style":"Styl","attrs.title":"Titul","attrs.type":"Typ","attrs.value":"Hodnota",autocomplete:"Automatické doplňování",button:"Tlačítko",cancel:"Zrušit",cannotBeEmpty:"Toto pole nemůže být prázdné",cannotClearFields:"Nejsou zde žádná pole k vymazání",checkbox:"Zaškrtávací políčko",checkboxes:"Zaškrtávací políčka",class:"Třída",clear:"Jasný",clearAllMessage:"Opravdu chcete vymazat všechna pole?",close:"Blízko",column:"Sloupec","condition.target.placeholder":"cíl","condition.type.and":"A","condition.type.if":"Li","condition.type.or":"Nebo","condition.type.then":"Pak","condition.value.placeholder":"hodnota",confirmClearAll:"Opravdu chcete odstranit všechna pole?",content:"Obsah",control:"Řízení","controlGroups.nextGroup":"Další skupina","controlGroups.prevGroup":"Předchozí skupina","controls.filteringTerm":"Filtrování „{term}“","controls.form.button":"Tlačítko","controls.form.checkbox-group":"Skupina zaškrtávacích políček","controls.form.input.date":"Datum","controls.form.input.email":"E-mail","controls.form.input.file":"Nahrání souboru","controls.form.input.hidden":"Skrytý vstup","controls.form.input.number":"Číslo","controls.form.input.text":"Textový vstup","controls.form.radio-group":"Rozhlasová skupina","controls.form.select":"Vybrat","controls.form.textarea":"TextArea","controls.groups.form":"Pole formuláře","controls.groups.html":"HTML prvky","controls.groups.layout":"Rozložení","controls.html.divider":"Dělič","controls.html.header":"Záhlaví","controls.html.paragraph":"Odstavec","controls.layout.column":"Sloupec","controls.layout.row":"Řádek",copy:"Kopírovat do schránky",danger:"Nebezpečí",defineColumnLayout:"Definujte rozvržení sloupců",defineColumnWidths:"Definujte šířky sloupců",description:"Text nápovědy",descriptionField:"Popis","editing.row":"Editace řádku",editorTitle:"Prvky formuláře",field:"Pole","field.property.invalid":"neplatí","field.property.isChecked":"je zaškrtnuto","field.property.isNotVisible":"není vidět","field.property.isVisible":"je vidět","field.property.label":"označení","field.property.valid":"platný","field.property.value":"hodnota",fieldNonEditable:"Toto pole nelze upravit.",fieldRemoveWarning:"Opravdu chcete toto pole odstranit?",fileUpload:"Nahrání souboru",formUpdated:"Formulář aktualizován",getStarted:"Začněte přetažením pole zprava.",group:"Skupina",grouped:"Seskupené",hidden:"Skrytý vstup",hide:"Upravit",htmlElements:"HTML prvky",if:"Li","if.condition.source.placeholder":"zdroj","if.condition.target.placeholder":"cíl / hodnota",info:"Info","input.date":"Datum","input.text":"Text",label:"Označení",labelCount:"{label} {count}",labelEmpty:"Štítek pole nemůže být prázdný","lang.af":"Afričan","lang.ar":"arabština","lang.cs":"čeština","lang.de":"Němec","lang.en":"angličtina","lang.es":"španělština","lang.fa":"Peršan","lang.fi":"finština","lang.fr":"francouzština","lang.he":"hebrejština","lang.hi":"hindština","lang.hu":"maďarský","lang.it":"italština","lang.ja":"japonský","lang.nb":"norský bokmål","lang.pl":"polština","lang.pt":"portugalština","lang.ro":"rumunština","lang.ru":"ruština","lang.th":"thajština","lang.tr":"turečtina","lang.zh":"čínština",layout:"Rozložení",limitRole:"Omezte přístup k jedné nebo více z následujících rolí:",mandatory:"Povinné",maxlength:"Maximální délka","meta.group":"Skupina","meta.icon":"Ico","meta.label":"Označení",minOptionMessage:"Toto pole vyžaduje minimálně 2 možnosti",name:"Jméno",newOptionLabel:"Nový {type}",no:"Žádný",number:"Číslo",off:"Vypnuto",on:"Na","operator.contains":"obsahuje","operator.equals":"rovná se","operator.notContains":"neobsahuje","operator.notEquals":"ne rovné","operator.notVisible":"není vidět","operator.visible":"viditelné",option:"Volba",optional:"volitelný",optionEmpty:"Je vyžadována hodnota opce",optionLabel:"Možnost {count}",options:"Možnosti",or:"nebo",order:"Objednávka","panel.label.attrs":"Atributy","panel.label.conditions":"Podmínky","panel.label.config":"Konfigurace","panel.label.meta":"Meta","panel.label.options":"Možnosti","panelEditButtons.attrs":"+ Atribut","panelEditButtons.conditions":"+ Stav","panelEditButtons.config":"+ Konfigurace","panelEditButtons.options":"+ Možnost",placeholder:"Zástupný symbol","placeholder.className":"prostorově oddělené třídy","placeholder.email":"Zadejte svůj email","placeholder.label":"Označení","placeholder.password":"Zadejte své heslo","placeholder.placeholder":"Zástupný symbol","placeholder.text":"Zadejte nějaký text","placeholder.textarea":"Zadejte hodně textu","placeholder.value":"Hodnota",preview:"Náhled",primary:"Primární",remove:"Odstranit",removeMessage:"Odebrat prvek",removeType:"Odebrat {type}",required:"Požadovaný",reset:"Resetovat",richText:"Rich Text Editor",roles:"Přístup",row:"Řádek","row.makeInputGroup":"Udělejte z tohoto řádku vstupní skupinu.","row.makeInputGroupDesc":"Skupiny vstupů umožňují uživatelům přidávat sady vstupů najednou.","row.settings.fieldsetWrap":"Zabalte řádek do sady &lt;fieldset&gt; štítek","row.settings.fieldsetWrap.aria":"Zabalte řádek do sady polí",save:"Uložit",secondary:"Sekundární",select:"Vybrat",selectColor:"Vyberte Barva",selectionsMessage:"Povolit vícenásobný výběr",selectOptions:"Možnosti",separator:"Oddělovač",settings:"Nastavení",size:"Velikost",sizes:"Velikosti","sizes.lg":"Velký","sizes.m":"Výchozí","sizes.sm":"Malý","sizes.xs":"Extra malý",style:"Styl",styles:"Styly","styles.btn":"Styl tlačítka","styles.btn.danger":"Nebezpečí","styles.btn.default":"Výchozí","styles.btn.info":"Info","styles.btn.primary":"Primární","styles.btn.success":"Úspěch","styles.btn.warning":"Varování",subtype:"Typ",success:"Úspěch",text:"Textové pole",then:"Pak","then.condition.target.placeholder":"cíl",toggle:"Přepnout",ungrouped:"Un-grouped",warning:"Varování",yes:"Ano"},"de-DE":{"de-DE":"Deutsch (Deutschland)",dir:"ltr","en-US":"Englisch","af-ZA":"Afrikaans (Südafrika)","ar-TN":"Arabisch (Tunesien)","cs-CZ":"Tschechisch (Tschechien)","es-ES":"Spanisch (Spanien)","fa-IR":"Persisch (Iran)","fi-FI":"Finnisch (Finnland)","fr-FR":"Französisch (Frankreich)","he-IL":"Hebräisch (Israel)","hi-IN":"Hindi (Indien)","hu-HU":"Ungarisch (Ungarn)","it-IT":"Italienisch (Italien)","ja-JP":"Japanisch (Japan)","nb-NO":"Norwegisch (Bokmål) (Norwegen)","pl-PL":"Polnisch (Polen)","pt-BR":"Portugiesisch (Brasilien)","pt-PT":"Portugiesisch (Portugal)","ro-RO":"Rumänisch (Rumänien)","ru-RU":"Russisch (Russland)","th-TH":"Thailändisch (Thailand)","tr-TR":"Türkisch (Türkei)","zh-CN":"Chinesisch (China)","zh-HK":"Chinesisch (Sonderverwaltungsregion Hongkong)","action.add.attrs.attr":"Welches Attribut möchten Sie hinzufügen?","action.add.attrs.value":"Standardwert",addOption:"Option hinzufügen",allFieldsRemoved:"Alle Felder wurden entfernt.",allowSelect:"Auswahl zulassen",and:"und",attribute:"Attribut",attributeNotPermitted:'Attribut "{Attribut}" ist nicht zulässig, bitte wählen Sie ein anderes.',attributes:"Attribute","attrs.class":"Klasse","attrs.className":"Klasse","attrs.dir":"Richtung","attrs.id":"Ich würde","attrs.required":"Erforderlich","attrs.style":"Stil","attrs.title":"Titel","attrs.type":"Art","attrs.value":"Wert",autocomplete:"Autovervollständigung",button:"Taste",cancel:"Stornieren",cannotBeEmpty:"Dieses Feld kann nicht leer sein",cannotClearFields:"Es gibt keine zu löschenden Felder",checkbox:"Ankreuzfeld",checkboxes:"Ankreuzfelder",class:"Klasse",clear:"klar",clearAllMessage:"Möchten Sie wirklich alle Felder löschen?",close:"Schließen",column:"Säule","condition.target.placeholder":"Ziel","condition.type.and":"Und","condition.type.if":"Wenn","condition.type.or":"Oder","condition.type.then":"Dann","condition.value.placeholder":"Wert",confirmClearAll:"Möchten Sie wirklich alle Felder entfernen?",content:"Inhalt",control:"Steuerung","controlGroups.nextGroup":"Nächste Gruppe","controlGroups.prevGroup":"Vorherige Gruppe","controls.filteringTerm":'Filtern "{Begriff}"',"controls.form.button":"Taste","controls.form.checkbox-group":"Kontrollkästchen Gruppe","controls.form.input.date":"Datum","controls.form.input.email":"Email","controls.form.input.file":"Datei-Upload","controls.form.input.hidden":"Versteckte Eingabe","controls.form.input.number":"Nummer","controls.form.input.text":"Text Eingabe","controls.form.radio-group":"Radio-Gruppe","controls.form.select":"Wählen","controls.form.textarea":"TextArea","controls.groups.form":"Formularfelder","controls.groups.html":"HTML-Elemente","controls.groups.layout":"Layout","controls.html.divider":"Teiler","controls.html.header":"Header","controls.html.paragraph":"Absatz","controls.layout.column":"Säule","controls.layout.row":"Reihe",copy:"In die Zwischenablage kopieren",danger:"Achtung",defineColumnLayout:"Definieren Sie ein Spaltenlayout",defineColumnWidths:"Spaltenbreiten definieren",description:"Hilfstext",descriptionField:"Beschreibung","editing.row":"Zeile bearbeiten",editorTitle:"Formularelemente",field:"Feld","field.property.invalid":"ungültig","field.property.isChecked":"wird geprüft","field.property.isNotVisible":"ist nicht sichtbar","field.property.isVisible":"ist sichtbar","field.property.label":"Etikette","field.property.valid":"gültig","field.property.value":"Wert",fieldNonEditable:"Dieses Feld kann nicht bearbeitet werden.",fieldRemoveWarning:"Möchten Sie dieses Feld wirklich entfernen?",fileUpload:"Datei-Upload",formUpdated:"Formular aktualisiert",getStarted:"Ziehen Sie ein Feld von rechts, um zu beginnen.",group:"Gruppe",grouped:"Gruppiert",hidden:"Versteckte Eingabe",hide:"Bearbeiten",htmlElements:"HTML-Elemente",if:"Ob","if.condition.source.placeholder":"Quelle","if.condition.target.placeholder":"Zielwert",info:"Info","input.date":"Datum","input.text":"Text",label:"Etikette",labelCount:"{label} {count}",labelEmpty:"Feldbezeichnung darf nicht leer sein","lang.af":"afrikanisch","lang.ar":"Arabisch","lang.cs":"tschechisch","lang.de":"Deutsch","lang.en":"Englisch","lang.es":"Spanisch","lang.fa":"persisch","lang.fi":"finnisch","lang.fr":"Französisch","lang.he":"Hebräisch","lang.hi":"Hindi","lang.hu":"ungarisch","lang.it":"Italienisch","lang.ja":"japanisch","lang.nb":"Norwegisches Bokmål","lang.pl":"Polieren","lang.pt":"Portugiesisch","lang.ro":"rumänisch","lang.ru":"Russisch","lang.th":"Thai","lang.tr":"Türkisch","lang.zh":"chinesisch",layout:"Layout",limitRole:"Beschränken Sie den Zugriff auf eine oder mehrere der folgenden Rollen:",mandatory:"Verpflichtend",maxlength:"Maximale Länge","meta.group":"Gruppe","meta.icon":"Ico","meta.label":"Etikette",minOptionMessage:"Dieses Feld erfordert mindestens 2 Optionen",name:"Name",newOptionLabel:"Neuer Typ}",no:"Nein",number:"Nummer",off:"aus",on:"Auf","operator.contains":"enthält","operator.equals":"gleich","operator.notContains":"enthält nicht","operator.notEquals":"nicht gleich","operator.notVisible":"nicht sichtbar","operator.visible":"sichtbar",option:"Möglichkeit",optional:"wahlweise",optionEmpty:"Optionswert erforderlich",optionLabel:"Option {count}",options:"Optionen",or:"oder",order:"Auftrag","panel.label.attrs":"Attribute","panel.label.conditions":"Bedingungen","panel.label.config":"Aufbau","panel.label.meta":"Meta","panel.label.options":"Optionen","panelEditButtons.attrs":"+ Attribut","panelEditButtons.conditions":"+ Bedingung","panelEditButtons.config":"+ Konfiguration","panelEditButtons.options":"+ Wahl",placeholder:"Platzhalter","placeholder.className":"Leerzeichen getrennte Klassen","placeholder.email":"Geben Sie Ihre E-Mail ein","placeholder.label":"Etikette","placeholder.password":"Geben Sie Ihr Passwort ein","placeholder.placeholder":"Platzhalter","placeholder.text":"Geben Sie einen Text ein","placeholder.textarea":"Geben Sie viel Text ein","placeholder.value":"Wert",preview:"Vorschau",primary:"Primär",remove:"Löschen",removeMessage:"Element entfernen",removeType:"{Type} entfernen",required:"Erforderlich",reset:"Zurücksetzen",richText:"Rich-Text-Editor",roles:"Zugriff",row:"Reihe","row.makeInputGroup":"Machen Sie diese Zeile zu einer Eingabegruppe.","row.makeInputGroupDesc":"Eingabegruppen ermöglichen Benutzern das Hinzufügen von Eingabesätzen gleichzeitig.","row.settings.fieldsetWrap":"Zeilenumbruch in einem & lt; -Feldset & gt; Etikett","row.settings.fieldsetWrap.aria":"Zeile in Fieldset umbrechen",save:"sparen",secondary:"Sekundär",select:"Wählen",selectColor:"Wähle Farbe",selectionsMessage:"Mehrfachauswahl zulassen",selectOptions:"Optionen",separator:"Separator",settings:"die Einstellungen",size:"Größe",sizes:"Größen","sizes.lg":"Groß","sizes.m":"Standard","sizes.sm":"Klein","sizes.xs":"Extra klein",style:"Stil",styles:"Styles","styles.btn":"Button Style","styles.btn.danger":"Achtung","styles.btn.default":"Standard","styles.btn.info":"Info","styles.btn.primary":"Primär","styles.btn.success":"Erfolg","styles.btn.warning":"Warnung",subtype:"Art",success:"Erfolg",text:"Textfeld",then:"Dann","then.condition.target.placeholder":"Ziel",toggle:"Umschalten",ungrouped:"A-gruppierte",warning:"Warnung",yes:"Ja"},"en-US":{"en-US":"English",dir:"ltr","af-ZA":"Afrikaans (South Africa)","ar-TN":"Arabic (Tunisia)","cs-CZ":"Czech (Czechia)","de-DE":"German (Germany)","es-ES":"European Spanish","fa-IR":"Persian (Iran)","fi-FI":"Finnish (Finland)","fr-FR":"French (France)","hu-HU":"Hungarian (Hungary)","it-IT":"Italian (Italy)","ja-JP":"Japanese (Japan)","nb-NO":"Norwegian Bokmål (Norway)","pl-PL":"Polish (Poland)","pt-BR":"Brazilian Portuguese","pt-PT":"European Portuguese","ro-RO":"Romanian (Romania)","ru-RU":"Russian (Russia)","th-TH":"Thai (Thailand)","tr-TR":"Turkish (Türkiye)","zh-CN":"Chinese (China)","zh-HK":"Chinese (Hong Kong SAR China)","action.add.attrs.attr":"What attribute would you like to add?","action.add.attrs.value":"Default Value",addOption:"Add Option",allFieldsRemoved:"All fields were removed.",allowSelect:"Allow Select",and:"and",attribute:"Attribute",attributeNotPermitted:'Attribute "{attribute}" is not permitted, please choose another.',attributes:"Attributes","attrs.class":"Class","attrs.className":"Class","attrs.dir":"Direction","attrs.id":"Id","attrs.required":"Required","attrs.style":"Style","attrs.title":"Title","attrs.type":"Type","attrs.value":"Value",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",cannotClearFields:"There are no fields to clear",checkbox:"Checkbox",checkboxes:"Checkboxes",class:"Class",clear:"Clear",clearAllMessage:"Are you sure you want to clear all fields?",close:"Close",column:"Column","condition.target.placeholder":"target","condition.type.and":"And","condition.type.if":"If","condition.type.or":"Or","condition.type.then":"Then","condition.value.placeholder":"value",confirmClearAll:"Are you sure you want to remove all fields?",content:"Content",control:"Control","controlGroups.nextGroup":"Next Group","controlGroups.prevGroup":"Previous Group","controls.filteringTerm":'Filtering "{term}"',"controls.form.button":"Button","controls.form.checkbox-group":"Checkbox Group","controls.form.input.date":"Date","controls.form.input.email":"Email","controls.form.input.file":"File Upload","controls.form.input.hidden":"Hidden Input","controls.form.input.number":"Number","controls.form.input.text":"Text Input","controls.form.radio-group":"Radio Group","controls.form.select":"Select","controls.form.textarea":"TextArea","controls.groups.form":"Form Fields","controls.groups.html":"HTML Elements","controls.groups.layout":"Layout","controls.html.divider":"Divider","controls.html.header":"Header","controls.html.paragraph":"Paragraph","controls.layout.column":"Column","controls.layout.row":"Row",copy:"Copy To Clipboard",danger:"Danger",defineColumnLayout:"Define a column layout",defineColumnWidths:"Define column widths",description:"Help Text",descriptionField:"Description","editing.row":"Editing Row",editorTitle:"Form Elements",field:"Field","field.property.invalid":"not valid","field.property.isChecked":"is checked","field.property.isNotVisible":"is not visible","field.property.isVisible":"is visible","field.property.label":"label","field.property.valid":"valid","field.property.value":"value",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to get started.",group:"Group",grouped:"Grouped",hidden:"Hidden Input",hide:"Edit",htmlElements:"HTML Elements",if:"If","if.condition.source.placeholder":"source","if.condition.target.placeholder":"target / value",info:"Info","input.date":"Date","input.text":"Text",label:"Label",labelCount:"{label} {count}",labelEmpty:"Field Label cannot be empty","lang.af":"Afrikaans","lang.ar":"Arabic","lang.cs":"Czech","lang.de":"German","lang.en":"English","lang.es":"Spanish","lang.fa":"Persian","lang.fi":"Finnish","lang.fr":"French","lang.hu":"Hungarian","lang.it":"Italian","lang.ja":"Japanese","lang.nb":"Norwegian Bokmål","lang.pl":"Polish","lang.pt":"Portuguese","lang.ro":"Romanian","lang.ru":"Russian","lang.th":"Thai","lang.tr":"Turkish","lang.zh":"Chinese",layout:"Layout",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length","meta.group":"Group","meta.icon":"Ico","meta.label":"Label",minOptionMessage:"This field requires a minimum of 2 options",name:"Name",newOptionLabel:"New {type}",no:"No",number:"Number",off:"Off",on:"On","operator.contains":"contains","operator.equals":"equals","operator.notContains":"not contains","operator.notEquals":"not equal","operator.notVisible":"not visible","operator.visible":"visible",option:"Option",optional:"optional",optionEmpty:"Option value required",optionLabel:"Option {count}",options:"Options",or:"or",order:"Order","panel.label.attrs":"Attributes","panel.label.conditions":"Conditions","panel.label.config":"Configuration","panel.label.meta":"Meta","panel.label.options":"Options","panelEditButtons.attrs":"+ Attribute","panelEditButtons.conditions":"+ Condition","panelEditButtons.options":"+ Option","panelEditButtons.config":"+ Configuration",placeholder:"Placeholder","placeholder.className":"space separated classes","placeholder.email":"Enter you email","placeholder.label":"Label","placeholder.password":"Enter your password","placeholder.placeholder":"Placeholder","placeholder.text":"Enter some Text","placeholder.textarea":"Enter a lot of text","placeholder.value":"Value",preview:"Preview",primary:"Primary",remove:"Remove",removeMessage:"Remove Element",removeType:"Remove {type}",required:"Required",reset:"Reset",richText:"Rich Text Editor",roles:"Access",row:"Row","row.makeInputGroup":"Make this row an input group.","row.makeInputGroupDesc":"Input Groups enable users to add sets of inputs at a time.","row.settings.fieldsetWrap":"Wrap row in a &lt;fieldset&gt; tag","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset",save:"Save",cancel:"Cancel",secondary:"Secondary",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",selectOptions:"Options",separator:"Separator",settings:"Settings",size:"Size",sizes:"Sizes","sizes.lg":"Large","sizes.m":"Default","sizes.sm":"Small","sizes.xs":"Extra Small",style:"Style",styles:"Styles","styles.btn":"Button Style","styles.btn.danger":"Danger","styles.btn.default":"Default","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",success:"Success",text:"Text Field",then:"Then","then.condition.target.placeholder":"target",toggle:"Toggle",ungrouped:"Un-Grouped",warning:"Warning",yes:"Yes"},"es-ES":{"es-ES":"español de España",dir:"ltr","en-US":"Inglés","af-ZA":"afrikáans (Sudáfrica)","ar-TN":"árabe (Túnez)","cs-CZ":"checo (Chequia)","de-DE":"alemán (Alemania)","fa-IR":"persa (Irán)","fi-FI":"finés (Finlandia)","fr-FR":"francés (Francia)","he-IL":"hebreo (Israel)","hi-IN":"hindi (India)","hu-HU":"húngaro (Hungría)","it-IT":"italiano (Italia)","ja-JP":"japonés (Japón)","nb-NO":"noruego bokmal (Noruega)","pl-PL":"polaco (Polonia)","pt-BR":"portugués de Brasil","pt-PT":"portugués de Portugal","ro-RO":"rumano (Rumanía)","ru-RU":"ruso (Rusia)","th-TH":"tailandés (Tailandia)","tr-TR":"turco (Turquía)","zh-CN":"chino (China)","zh-HK":"chino (RAE de Hong Kong [China])","action.add.attrs.attr":"¿Qué atributo te gustaría agregar?","action.add.attrs.value":"Valor por defecto",addOption:"Añadir opción",allFieldsRemoved:"Todos los campos fueron eliminados.",allowSelect:"Permitir seleccionar",and:"y",attribute:"Atributo",attributeNotPermitted:'El atributo "{attribute}" no está permitido, elija otro.',attributes:"Atributos","attrs.class":"Clase","attrs.className":"Clase","attrs.dir":"Dirección","attrs.id":"Carné de identidad","attrs.required":"Necesario","attrs.style":"Estilo","attrs.title":"Título","attrs.type":"Tipo","attrs.value":"Valor",autocomplete:"Autocompletar",button:"Botón",cancel:"Cancelar",cannotBeEmpty:"Este campo no puede estar vacío",cannotClearFields:"No hay campos para borrar",checkbox:"Caja",checkboxes:"Casillas de verificación",class:"Clase",clear:"Claro",clearAllMessage:"¿Estás seguro de que quieres borrar todos los campos?",close:"Cerrar",column:"Columna","condition.target.placeholder":"objetivo","condition.type.and":"Y","condition.type.if":"Si","condition.type.or":"O","condition.type.then":"Entonces","condition.value.placeholder":"valor",confirmClearAll:"¿Estás seguro de que quieres eliminar todos los campos?",content:"Contenido",control:"Controlar","controlGroups.nextGroup":"Siguiente grupo","controlGroups.prevGroup":"Grupo anterior","controls.filteringTerm":'Filtrado "{term}"',"controls.form.button":"Botón","controls.form.checkbox-group":"Grupo de casilla de verificación","controls.form.input.date":"Fecha","controls.form.input.email":"Email","controls.form.input.file":"Subir archivo","controls.form.input.hidden":"Entrada oculta","controls.form.input.number":"Número","controls.form.input.text":"Entrada de texto","controls.form.radio-group":"Grupo de radio","controls.form.select":"Seleccionar","controls.form.textarea":"TextArea","controls.groups.form":"Campos de formulario","controls.groups.html":"Elementos HTML","controls.groups.layout":"Diseño","controls.html.divider":"Divisor","controls.html.header":"Encabezamiento","controls.html.paragraph":"Párrafo","controls.layout.column":"Columna","controls.layout.row":"Fila",copy:"Copiar al portapapeles",danger:"Peligro",defineColumnLayout:"Definir un diseño de columna.",defineColumnWidths:"Definir anchos de columna",description:"texto de ayuda",descriptionField:"Descripción","editing.row":"Fila de edición",editorTitle:"Elementos de formulario",field:"Campo","field.property.invalid":"no es válido","field.property.isChecked":"está marcado","field.property.isNotVisible":"no es visible","field.property.isVisible":"es visible","field.property.label":"etiqueta","field.property.valid":"válido","field.property.value":"valor",fieldNonEditable:"Este campo no puede ser editado.",fieldRemoveWarning:"¿Estás seguro de que quieres eliminar este campo?",fileUpload:"Subir archivo",formUpdated:"Formulario actualizado",getStarted:"Arrastra un campo desde la derecha para empezar.",group:"Grupo",grouped:"Agrupados",hidden:"Entrada oculta",hide:"Editar",htmlElements:"Elementos HTML",if:"Si","if.condition.source.placeholder":"fuente","if.condition.target.placeholder":"valor objetivo",info:"Información","input.date":"Fecha","input.text":"Texto",label:"Etiqueta",labelCount:"{label} {count}",labelEmpty:"La etiqueta de campo no puede estar vacía","lang.af":"africano","lang.ar":"árabe","lang.cs":"checo","lang.de":"Alemán","lang.en":"Inglés","lang.es":"Español","lang.fa":"persa","lang.fi":"finlandés","lang.fr":"Francés","lang.he":"hebreo","lang.hi":"hindi","lang.hu":"húngaro","lang.it":"italiano","lang.ja":"japonés","lang.nb":"Bokmål noruego","lang.pl":"Polaco","lang.pt":"portugués","lang.ro":"rumano","lang.ru":"ruso","lang.th":"tailandés","lang.tr":"turco","lang.zh":"Chino",layout:"Diseño",limitRole:"Limite el acceso a uno o más de los siguientes roles:",mandatory:"Obligatorio",maxlength:"Longitud máxima","meta.group":"Grupo","meta.icon":"Ico","meta.label":"Etiqueta",minOptionMessage:"Este campo requiere un mínimo de 2 opciones.",name:"Nombre",newOptionLabel:"Nuevo tipo}",no:"No",number:"Número",off:"Apagado",on:"En","operator.contains":"contiene","operator.equals":"es igual a","operator.notContains":"no contiene","operator.notEquals":"no es igual","operator.notVisible":"no visible","operator.visible":"visible",option:"Opción",optional:"Opcional",optionEmpty:"Valor de opción requerido",optionLabel:"Opción {cuenta}",options:"Opciones",or:"o",order:"Orden","panel.label.attrs":"Atributos","panel.label.conditions":"Condiciones","panel.label.config":"Configuración","panel.label.meta":"Meta","panel.label.options":"Opciones","panelEditButtons.attrs":"+ Atributo","panelEditButtons.conditions":"+ Condición","panelEditButtons.config":"+ Configuración","panelEditButtons.options":"+ Opción",placeholder:"Marcador de posición","placeholder.className":"clases separadas por espacios","placeholder.email":"Ingrese su correo electrónico","placeholder.label":"Etiqueta","placeholder.password":"Ingresa tu contraseña","placeholder.placeholder":"Marcador de posición","placeholder.text":"Introduce algún texto","placeholder.textarea":"Introduce mucho texto","placeholder.value":"Valor",preview:"Avance",primary:"Primario",remove:"retirar",removeMessage:"Eliminar Elemento",removeType:"Eliminar {tipo}",required:"Necesario",reset:"Reiniciar",richText:"Editor de texto enriquecido",roles:"Acceso",row:"Fila","row.makeInputGroup":"Haz de esta fila un grupo de entrada.","row.makeInputGroupDesc":"Los grupos de entrada permiten a los usuarios agregar conjuntos de entradas a la vez.","row.settings.fieldsetWrap":"Ajustar fila en un & lt; fieldset & gt; etiqueta","row.settings.fieldsetWrap.aria":"Envuelva la fila en Fieldset",save:"Salvar",secondary:"Secundario",select:"Seleccionar",selectColor:"Seleccionar el color",selectionsMessage:"Permitir selecciones múltiples",selectOptions:"Opciones",separator:"Separador",settings:"Ajustes",size:"tamaño",sizes:"Tamaños","sizes.lg":"Grande","sizes.m":"Defecto","sizes.sm":"Pequeña","sizes.xs":"Extra Pequeño",style:"Estilo",styles:"Estilos","styles.btn":"Estilo de botón","styles.btn.danger":"Peligro","styles.btn.default":"Defecto","styles.btn.info":"Información","styles.btn.primary":"Primario","styles.btn.success":"Éxito","styles.btn.warning":"Advertencia",subtype:"Tipo",success:"Éxito",text:"Campo de texto",then:"Entonces","then.condition.target.placeholder":"objetivo",toggle:"Palanca",ungrouped:"A-Agrupados",warning:"Advertencia",yes:"Sí"},"fa-IR":{"fa-IR":"فارسی (ایران)",dir:"rtl","en-US":"Farsi","af-ZA":"آفریکانس (افریقای جنوبی)","ar-TN":"عربی (تونس)","cs-CZ":"چکی (چک)","de-DE":"آلمانی (آلمان)","es-ES":"اسپانیایی اروپا","fi-FI":"فنلاندی (فنلاند)","fr-FR":"فرانسوی (فرانسه)","he-IL":"عبری (اسرائیل)","hi-IN":"هندی (هند)","hu-HU":"مجاری (مجارستان)","it-IT":"ایتالیایی (ایتالیا)","ja-JP":"ژاپنی (ژاپن)","nb-NO":"نروژی بوک‌مُل (نروژ)","pl-PL":"لهستانی (لهستان)","pt-BR":"پرتغالی برزیل","pt-PT":"پرتغالی اروپا","ro-RO":"رومانیایی (رومانی)","ru-RU":"روسی (روسیه)","th-TH":"تایلندی (تایلند)","tr-TR":"ترکی استانبولی (ترکیه)","zh-CN":"چینی (چین)","zh-HK":"چینی (هنگ‌کنگ، منطقهٔ ویژهٔ اداری چین)","action.add.attrs.attr":"چه ویژگی را می خواهید اضافه کنید؟","action.add.attrs.value":"مقدار پیش فرض",addOption:"افزودن گزینه",allFieldsRemoved:"تمام فیلدها حذف شدند.",allowSelect:"اجازه انتخاب",and:"وارد",attribute:"ویژگی",attributeNotPermitted:'ویژگی "{attribute}" مجاز نیست, لطفا دیگری را انتخاب کنید.',attributes:"ویژگی ها","attrs.class":"کلاس","attrs.className":"کلاس","attrs.dir":"جهت","attrs.id":"آی دی","attrs.required":"اجباری","attrs.style":"استایل","attrs.title":"عنوان","attrs.type":"نوع","attrs.value":"مقدار",autocomplete:"تکمیل خودکار",button:"دکمه",cancel:"لغو",cannotBeEmpty:"این فیلد نمی تواند خالی باشد",cannotClearFields:"هیچ فیلدی برای پاک کردن وجود ندارد",checkbox:"چک باکس",checkboxes:"چک باکس ها",class:"کلاس",clear:"پاک کردن",clearAllMessage:"آیا مطمئن هستید که می خواهید همه فیلدها را پاک کنید؟",close:"بستن",column:"ستون","condition.target.placeholder":"هدف","condition.type.and":"و","condition.type.if":"اگر","condition.type.or":"یا","condition.type.then":"سپس","condition.value.placeholder":"مقدار",confirmClearAll:"آیا مطمئن هستید که می خواهید همه فیلدها را حذف کنید؟",content:"محتوا",control:"کنترل","controlGroups.nextGroup":"گروه بعدی","controlGroups.prevGroup":"گروه قبلی","controls.filteringTerm":'فیلتر کردن "{term}"',"controls.form.button":"دکمه","controls.form.checkbox-group":"گروه چک باکس","controls.form.input.date":"تاریخ","controls.form.input.email":"ایمیل","controls.form.input.file":"آپلود فایل","controls.form.input.hidden":"فیلد پنهان","controls.form.input.number":"عدد","controls.form.input.text":"ورودی متن","controls.form.radio-group":"گروه رادیوها","controls.form.select":"انتخاب","controls.form.textarea":"باکس متن","controls.groups.form":"فیلدهای فرم","controls.groups.html":"عناصر HTML","controls.groups.layout":"چیدمان","controls.html.divider":"تقسیم کننده","controls.html.header":"سرتیتر","controls.html.paragraph":"پاراگراف","controls.layout.column":"ستون","controls.layout.row":"ردیف",copy:"کپی در کلیپ بورد",danger:"خطر",defineColumnLayout:"طرح بندی ستون را تعریف کنید",defineColumnWidths:"عرض ستون را تعریف کنید",description:"متن راهنما",descriptionField:"شرح","editing.row":"ویرایش ردیف",editorTitle:"عناصر فرم",field:"فیلد","field.property.invalid":"نادرست","field.property.isChecked":"بررسی می شود","field.property.isNotVisible":"صحیح نیست","field.property.isVisible":"صحیح است","field.property.label":"برچسب","field.property.valid":"صحیح","field.property.value":"مقدار",fieldNonEditable:"این فیلد قابل ویرایش نیست.",fieldRemoveWarning:"آیا مطمئن هستید که می خواهید این فیلد را حذف کنید؟",fileUpload:"آپلود فایل",formUpdated:"فرم به روز شد",getStarted:"برای شروع یک فیلد را از سمت راست بکشید.",group:"گروه",grouped:"گروه بندی شده",hidden:"فیلد پنهان",hide:"ویرایش",htmlElements:"HTML عناصر",if:"اگر","if.condition.source.placeholder":"منبع","if.condition.target.placeholder":"هدف / ارزش",info:"اطلاعات","input.date":"تاریخ","input.text":"متن",label:"برچسب",labelCount:"{label} {count}",labelEmpty:"برچسب فیلد نمی تواند خالی باشد","lang.af":"آفریقایی","lang.ar":"عربی","lang.cs":"چک","lang.de":"آلمانی","lang.en":"انگلیسی","lang.es":"اسپانیایی","lang.fa":"فارسی","lang.fi":"فنلاندی","lang.fr":"فرانسوی","lang.he":"عبری","lang.hi":"هندی","lang.hu":"مجارستانی","lang.it":"ایتالیایی","lang.ja":"ژاپنی","lang.nb":"نروژی بوکمال","lang.pl":"لهستانی","lang.pt":"پرتغالی","lang.ro":"رومانیایی","lang.ru":"روسی","lang.th":"تایلندی","lang.tr":"ترکی","lang.zh":"چینی",layout:"چیدمان",limitRole:"دسترسی به یک یا چند نقش زیر را محدود کنید:",mandatory:"اجباری",maxlength:"حداکثر طول","meta.group":"گروه","meta.icon":"ایکون","meta.label":"برچسب",minOptionMessage:"این فیلد به حداقل 2 گزینه نیاز دارد",name:"نام",newOptionLabel:"جدید {type}",no:"خیر",number:"عدد",off:"خاموش",on:"روشن","operator.contains":"شامل","operator.equals":"برابر","operator.notContains":"شامل نمی شود","operator.notEquals":"نا برابر","operator.notVisible":"غیر قابل رویت","operator.visible":"قابل رویت",option:"گزینه",optional:"اختیاری",optionEmpty:"مقدار گزینه مورد نیاز است",optionLabel:"گزینه {count}",options:"گزینه ها",or:"یا",order:"سفارش","panel.label.attrs":"ویژگی ها","panel.label.conditions":"شروط","panel.label.config":"پیکربندی","panel.label.meta":"متا","panel.label.options":"گزینه ها","panelEditButtons.attrs":"+ ویژگی","panelEditButtons.conditions":"+ شرط","panelEditButtons.config":"+ پیکربندی","panelEditButtons.options":"+ گزینه",placeholder:"متن پیش فرض فیلد","placeholder.className":"فضای جدا دشه کلاس ها","placeholder.email":"ایمیل خود را وارد کنید","placeholder.label":"برچسب","placeholder.password":"رمز عبور خود را وارد کنید","placeholder.placeholder":"متن پیش فرض فیلد","placeholder.text":"مقداری متن وارد کنید","placeholder.textarea":"مقدار زیادی متن وارد کنید","placeholder.value":"مقدار",preview:"پیش نمایش",primary:"اولیه",remove:"حذف",removeMessage:"حذف عنصر",removeType:"حذف {type}",required:"اجباری",reset:"بازنشانی",richText:"ویرایشگر متن توانمند",roles:"دسترسی",row:"ردیف","row.makeInputGroup":"این ردیف را به یک گروه ورودی تبدیل کنید.","row.makeInputGroupDesc":"گروه ورودی به کاربران امکان می‌دهد تا مجموعه‌هایی از ورودی‌ها را در یک زمان اضافه کنند.","row.settings.fieldsetWrap":"یک ردیف را جدا کنید در &lt;fieldset&gt; tag","row.settings.fieldsetWrap.aria":"ردیف را در فیلد بالا جدا کنید",save:"ذخیره",secondary:"ثانوی",select:"انتخاب",selectColor:"انتخاب رنگ",selectionsMessage:"اجازه انتخاب های متعدد",selectOptions:"گزینه ها",separator:"جداکننده",settings:"تنظیمات",size:"اندازه",sizes:"اندازه ها","sizes.lg":"بزرگ","sizes.m":"پیش فرض","sizes.sm":"کوچک","sizes.xs":"بسیار کوچک",style:"استایل ها",styles:"استایل ها","styles.btn":"استایل دکمه","styles.btn.danger":"خطر","styles.btn.default":"پیش فرض","styles.btn.info":"اطلاعات","styles.btn.primary":"اولیه","styles.btn.success":"موفقیت","styles.btn.warning":"هشدار",subtype:"نوع",success:"موفقیت",text:"فیلد متن",then:"سپس","then.condition.target.placeholder":"هدف",toggle:"تغییر وضعیت",ungrouped:"گروه بندی نشده",warning:"هشدار",yes:"بله"},"fi-FI":{"fi-FI":"suomi (Suomi)",dir:"ltr","en-US":"englanti","af-ZA":"afrikaans (Etelä-Afrikka)","ar-TN":"arabia (Tunisia)","cs-CZ":"tšekki (Tšekki)","de-DE":"saksa (Saksa)","es-ES":"euroopanespanja","fa-IR":"persia (Iran)","fr-FR":"ranska (Ranska)","he-IL":"heprea (Israel)","hi-IN":"hindi (Intia)","hu-HU":"unkari (Unkari)","it-IT":"italia (Italia)","ja-JP":"japani (Japani)","nb-NO":"norjan bokmål (Norja)","pl-PL":"puola (Puola)","pt-BR":"brasilianportugali","pt-PT":"euroopanportugali","ro-RO":"romania (Romania)","ru-RU":"venäjä (Venäjä)","th-TH":"thai (Thaimaa)","tr-TR":"turkki (Turkki)","zh-CN":"kiina (Kiina)","zh-HK":"kiina (Hongkong – Kiinan erityishallintoalue)","action.add.attrs.attr":"Minkä ominaisuuden haluaisit lisätä?","action.add.attrs.value":"Oletusarvo",addOption:"Lisää vaihtoehto",allFieldsRemoved:"Kaikki kentät poistettiin.",allowSelect:"Salli Valitse",and:"ja",attribute:"Attribuutti",attributeNotPermitted:'Attribuutti "{attribute}" ei ole sallittu, valitse toinen.',attributes:"Attribuutit","attrs.class":"Luokka","attrs.className":"Luokka","attrs.dir":"Suunta","attrs.id":"Id","attrs.required":"Pakollinen","attrs.style":"Tyyli","attrs.title":"Otsikko","attrs.type":"Tyyppi","attrs.value":"Arvo",autocomplete:"Automaattinen täydennys",button:"Painike",cancel:"Peruuttaa",cannotBeEmpty:"Tämä kenttä ei voi olla tyhjä",cannotClearFields:"Ei ole tyhjennettyjä kenttiä",checkbox:"Valintaruutu",checkboxes:"valintaruudut",class:"Luokka",clear:"Selkeä",clearAllMessage:"Haluatko varmasti tyhjentää kaikki kentät?",close:"Lähellä",column:"Sarake","condition.target.placeholder":"tavoite","condition.type.and":"Ja","condition.type.if":"Jos","condition.type.or":"Tai","condition.type.then":"Sitten","condition.value.placeholder":"arvo",confirmClearAll:"Haluatko varmasti poistaa kaikki kentät?",content:"Sisältö",control:"Ohjaus","controlGroups.nextGroup":"Seuraava ryhmä","controlGroups.prevGroup":"Edellinen ryhmä","controls.filteringTerm":'Suodatetaan "{term}"',"controls.form.button":"Painike","controls.form.checkbox-group":"Valintaruuturyhmä","controls.form.input.date":"Päivämäärä","controls.form.input.email":"Sähköposti","controls.form.input.file":"Tiedoston lataus","controls.form.input.hidden":"Piilotettu syöttö","controls.form.input.number":"Määrä","controls.form.input.text":"Tekstinsyöttö","controls.form.radio-group":"Radioryhmä","controls.form.select":"Valitse","controls.form.textarea":"Tekstialue","controls.groups.form":"Lomakekentät","controls.groups.html":"HTML-elementit","controls.groups.layout":"Layout","controls.html.divider":"Jakaja","controls.html.header":"Otsikko","controls.html.paragraph":"Kohta","controls.layout.column":"Sarake","controls.layout.row":"Rivi",copy:"Kopioi leikepöydälle",danger:"Vaara",defineColumnLayout:"Määritä sarakkeen asettelu",defineColumnWidths:"Määritä sarakkeiden leveydet",description:"Ohjeteksti",descriptionField:"Kuvaus","editing.row":"Muokkaa riviä",editorTitle:"Lomakkeen elementit",field:"Ala","field.property.invalid":"ei kelpaa","field.property.isChecked":"on tarkistettu","field.property.isNotVisible":"ei ole näkyvissä","field.property.isVisible":"on näkyvissä","field.property.label":"etiketti","field.property.valid":"voimassa","field.property.value":"arvo",fieldNonEditable:"Tätä kenttää ei voi muokata.",fieldRemoveWarning:"Haluatko varmasti poistaa tämän kentän?",fileUpload:"Tiedoston lataus",formUpdated:"Lomake päivitetty",getStarted:"Aloita vetämällä kenttää oikealta.",group:"ryhmä",grouped:"Ryhmitetty",hidden:"Piilotettu syöttö",hide:"Muokata",htmlElements:"HTML-elementit",if:"Jos","if.condition.source.placeholder":"lähde","if.condition.target.placeholder":"tavoite / arvo",info:"Tiedot","input.date":"Päivämäärä","input.text":"Teksti",label:"Label",labelCount:"{label} {count}",labelEmpty:"Kentän tunniste ei voi olla tyhjä","lang.af":"afrikkalainen","lang.ar":"arabia","lang.cs":"Tšekki","lang.de":"saksaksi","lang.en":"englanti","lang.es":"espanja","lang.fa":"persialainen","lang.fi":"suomalainen","lang.fr":"ranskalainen","lang.he":"heprea","lang.hi":"hindi","lang.hu":"Unkari","lang.it":"italialainen","lang.ja":"japanilainen","lang.nb":"norjalainen bokmål","lang.pl":"Kiillottaa","lang.pt":"portugali","lang.ro":"romanialainen","lang.ru":"venäjäksi","lang.th":"thaimaalainen","lang.tr":"turkkilainen","lang.zh":"kiinalainen",layout:"Layout",limitRole:"Rajoita pääsyä yhteen tai useampaan seuraavista rooleista:",mandatory:"Pakollinen",maxlength:"Max pituus","meta.group":"ryhmä","meta.icon":"Ico","meta.label":"Label",minOptionMessage:"Tämä kenttä vaatii vähintään 2 vaihtoehtoa",name:"Nimi",newOptionLabel:"Uusi {type}",no:"Ei",number:"Määrä",off:"Pois",on:"Päällä","operator.contains":"sisältää","operator.equals":"on yhtä suuri","operator.notContains":"ei sisällä","operator.notEquals":"ei tasa-arvoinen","operator.notVisible":"ei näy","operator.visible":"näkyvissä",option:"Vaihtoehto",optional:"valinnainen",optionEmpty:"Vaihtoehdon arvo vaaditaan",optionLabel:"Vaihtoehto {count}",options:"Vaihtoehdot",or:"tai",order:"Tilata","panel.label.attrs":"Attribuutit","panel.label.conditions":"ehdot","panel.label.config":"Kokoonpano","panel.label.meta":"Meta","panel.label.options":"Vaihtoehdot","panelEditButtons.attrs":"+ Attribuutti","panelEditButtons.conditions":"+ Kunto","panelEditButtons.config":"+ Kokoonpano","panelEditButtons.options":"+ Vaihtoehto",placeholder:"Paikkamerkki","placeholder.className":"tilaa erotetut luokat","placeholder.email":"Kirjoita sähköpostiosoitteesi","placeholder.label":"Label","placeholder.password":"Kirjoita salasanasi","placeholder.placeholder":"Paikkamerkki","placeholder.text":"Kirjoita tekstiä","placeholder.textarea":"Kirjoita paljon tekstiä","placeholder.value":"Arvo",preview:"Esikatselu",primary:"Ensisijainen",remove:"Poistaa",removeMessage:"Poista elementti",removeType:"Poista {type}",required:"Pakollinen",reset:"Nollaa",richText:"Rich Text Editor",roles:"Pääsy",row:"Rivi","row.makeInputGroup":"Tee tästä rivistä syöttöryhmä.","row.makeInputGroupDesc":"Syöttöryhmien avulla käyttäjät voivat lisätä syötteitä kerrallaan.","row.settings.fieldsetWrap":"Rivitä rivi &lt;fieldset&gt; tag","row.settings.fieldsetWrap.aria":"Rivitä rivi Fieldsetissä",save:"Tallentaa",secondary:"Toissijainen",select:"Valitse",selectColor:"Valitse Väri",selectionsMessage:"Salli useita valintoja",selectOptions:"Vaihtoehdot",separator:"Erotin",settings:"Asetukset",size:"Koko",sizes:"Koot","sizes.lg":"Suuri","sizes.m":"Oletus","sizes.sm":"Pieni","sizes.xs":"Erittäin pieni",style:"Tyyli",styles:"Tyylit","styles.btn":"Painikkeen tyyli","styles.btn.danger":"Vaara","styles.btn.default":"Oletus","styles.btn.info":"Tiedot","styles.btn.primary":"Ensisijainen","styles.btn.success":"Menestys","styles.btn.warning":"Varoitus",subtype:"Tyyppi",success:"Menestys",text:"Tekstikenttä",then:"Sitten","then.condition.target.placeholder":"tavoite",toggle:"Vaihda",ungrouped:"Ryhmittelemätön",warning:"Varoitus",yes:"Kyllä"},"fr-FR":{"fr-FR":"français (France)",dir:"ltr","en-US":"Anglais","af-ZA":"afrikaans (Afrique du Sud)","ar-TN":"arabe (Tunisie)","cs-CZ":"tchèque (Tchéquie)","de-DE":"allemand (Allemagne)","es-ES":"espagnol d’Espagne","fa-IR":"persan (Iran)","fi-FI":"finnois (Finlande)","he-IL":"hébreu (Israël)","hi-IN":"hindi (Inde)","hu-HU":"hongrois (Hongrie)","it-IT":"italien (Italie)","ja-JP":"japonais (Japon)","nb-NO":"norvégien bokmål (Norvège)","pl-PL":"polonais (Pologne)","pt-BR":"portugais brésilien","pt-PT":"portugais européen","ro-RO":"roumain (Roumanie)","ru-RU":"russe (Russie)","th-TH":"thaï (Thaïlande)","tr-TR":"turc (Turquie)","zh-CN":"chinois (Chine)","zh-HK":"chinois (R.A.S. chinoise de Hong Kong)","action.add.attrs.attr":"Quel attribut souhaitez-vous ajouter?","action.add.attrs.value":"Valeur par défaut",addOption:"Ajouter option",allFieldsRemoved:"Tout les champs ont étés supprimés.",allowSelect:"Permettre la sélection",and:"et",attribute:"Attribut",attributeNotPermitted:"Attribut «{attribute}» non permis, veuillez en choisir un autre.",attributes:"Attributs","attrs.class":"Classe","attrs.className":"Classe","attrs.dir":"Direction","attrs.id":"Id","attrs.required":"Requis","attrs.style":"Style","attrs.title":"Titre","attrs.type":"Type","attrs.value":"Valeur",autocomplete:"Auto-complétion",button:"Bouton",cancel:"Annuler",cannotBeEmpty:"Ce champ ne peut être vide",cannotClearFields:"Il n'y a pas de champ à vider",checkbox:"Case à cocher",checkboxes:"Cases à cocher",class:"Classe",clear:"Supprimer",clearAllMessage:"Êtes-vous certain de vouloir tout supprimer?",close:"Fermer",column:"Colonne","condition.target.placeholder":"destination","condition.type.and":"Et","condition.type.if":"Si","condition.type.or":"Ou","condition.type.then":"Alors","condition.value.placeholder":"valeur condition",confirmClearAll:"Êtes-vous certain de vouloir supprimer tous les champs?",content:"Contenu",control:"Contrôle","controlGroups.nextGroup":"Prochain groupe","controlGroups.prevGroup":"Groupe précédent","controls.filteringTerm":"Triage «{term}»","controls.form.button":"Bouton","controls.form.checkbox-group":"Groupe de cases à cocher","controls.form.input.date":"Date","controls.form.input.email":"Courriel","controls.form.input.file":"Téléversement de fichier","controls.form.input.hidden":"Champ caché","controls.form.input.number":"Numéro","controls.form.input.text":"Champ de texte","controls.form.radio-group":"Groupe de boutons radio","controls.form.select":"Sélection","controls.form.textarea":"Zone de texte","controls.groups.form":"Champs de formulaire","controls.groups.html":"Éléments HTML","controls.groups.layout":"Disposition","controls.html.divider":"Séparateur","controls.html.header":"Entête","controls.html.paragraph":"Paragraphe","controls.layout.column":"Colonne","controls.layout.row":"Rang",copy:"Copier au presse-papier",danger:"Danger",defineColumnLayout:"Définir une disposition de colonnes",defineColumnWidths:"Définir la largeur des colonnes",description:"Texte d'aide",descriptionField:"Description","editing.row":"Édition de rang",editorTitle:"Éléments de formulaire",field:"Champ","field.property.invalid":"invalide","field.property.isChecked":"est vérifié","field.property.isNotVisible":"non-visible","field.property.isVisible":"visible","field.property.label":"Étiquette","field.property.valid":"valide","field.property.value":"Valeur",fieldNonEditable:"Ce champ ne peut être modifié.",fieldRemoveWarning:"Êtes-vous sûr de vouloir supprimer ce champ?",fileUpload:"Téléversement de fichier",formUpdated:"Formulaire mis-à-jour",getStarted:"Déplacer un champ de la droite pour commencer.",group:"Groupe",grouped:"Groupés",hidden:"Champ caché",hide:"Modifier",htmlElements:"Élements HTML",if:"Si","if.condition.source.placeholder":"si vrai source","if.condition.target.placeholder":"si vrai destination",info:"Info","input.date":"Date","input.text":"Texte",label:"Étiquette",labelCount:"{label} {count}",labelEmpty:"L'Étiquette du champ ne peut être vide","lang.af":"africain","lang.ar":"arabe","lang.cs":"tchèque","lang.de":"Allemand","lang.en":"Anglais","lang.es":"Espagnol","lang.fa":"persan","lang.fi":"finlandais","lang.fr":"Français","lang.he":"hébreu","lang.hi":"hindi","lang.hu":"hongrois","lang.it":"italien","lang.ja":"japonais","lang.nb":"bokmål norvégien","lang.pl":"polonais","lang.pt":"portugais","lang.ro":"roumain","lang.ru":"russe","lang.th":"thaïlandais","lang.tr":"turc","lang.zh":"Chinois",layout:"Disposition",limitRole:"Limiter l'acces à un des rôles suivants :",mandatory:"Obligatoire",maxlength:"Longueur maximum","meta.group":"Groupe","meta.icon":"Vignette","meta.label":"Étiquette",minOptionMessage:"Ce champ requiert un minimum de deux options",name:"Nom",newOptionLabel:"Nouveau {type}",no:"Non",number:"Numéro",off:"Désactivé",on:"Activé","operator.contains":"contient","operator.equals":"égaux","operator.notContains":"ne contient pas","operator.notEquals":"ne sont pas égaux","operator.notVisible":"non-visible","operator.visible":"visible",option:"Option",optional:"optionel",optionEmpty:"Valeur de l'option requise",optionLabel:"Option {count}",options:"Options",or:"ou",order:"Organiser","panel.label.attrs":"Attributs","panel.label.conditions":"Conditions","panel.label.config":"Configuration","panel.label.meta":"Meta","panel.label.options":"Options","panelEditButtons.attrs":"+ Attribut","panelEditButtons.conditions":"+ Condition","panelEditButtons.config":"+ Configuration","panelEditButtons.options":"+ Option",placeholder:"Texte Fictif","placeholder.className":"classes séparées par espaces","placeholder.email":"Entrez votre courriel","placeholder.label":"Étiquette","placeholder.password":"Entrez votre mot de passe","placeholder.placeholder":"Texte Fictif","placeholder.text":"Entrez du texte","placeholder.textarea":"Entrez beaucoup de texte","placeholder.value":"Valeur",preview:"Aperçu",primary:"Primaire",remove:"Supprimer",removeMessage:"Supprimer l'élément",removeType:"Supprimer {type}",required:"Requis",reset:"Réinitialiser",richText:"Éditeur de texte enrichi",roles:"Acces",row:"Ligne","row.makeInputGroup":"Définir cette ligne comme groupe de saisie.","row.makeInputGroupDesc":"Les groupes de saisie permettent aux usagers de rajouter de multiples champs à la fois.","row.settings.fieldsetWrap":"Entourer le champ d'un élément &lt;fieldset&gt;","row.settings.fieldsetWrap.aria":`Entourer le champ d'un "Fieldset"`,save:"Sauvegarder",secondary:"Secondaire",select:"Sélection",selectColor:"Selectionner une couleur",selectionsMessage:"Permettre une sélection multiple",selectOptions:"Options",separator:"Séparateur",settings:"Paramètres de configuration",size:"Grandeur",sizes:"Grandeurs","sizes.lg":"Grand","sizes.m":"Grandeur par défaut","sizes.sm":"Petit","sizes.xs":"Extrèmement petit",style:"Motif",styles:"Motifs","styles.btn":"Motifs de bouton","styles.btn.danger":"Danger","styles.btn.default":"Motif par défaut de bouton","styles.btn.info":"Info","styles.btn.primary":"Primaire","styles.btn.success":"Success","styles.btn.warning":"Avertissement",subtype:"Type",success:"Succès",text:"Champ de texte",then:"Ensuite","then.condition.target.placeholder":"alors destination",toggle:"Basculer",ungrouped:"Non-groupé",warning:"Avertissement",yes:"Oui"},"he-IL":{"he-IL":"עברית (ישראל)",dir:"rtl","en-US":"אַנגְלִית","af-ZA":"אפריקנס (דרום אפריקה)","ar-TN":"ערבית (תוניסיה)","cs-CZ":"צ'כיה (צ'כיה)","de-DE":"גרמנית (גרמניה)","es-ES":"ספרדית אירופאית","fa-IR":"פרסית (איראן)","fi-FI":"פינית (פינלנד)","fr-FR":"צרפתית (צרפת)","hi-IN":"הינדי (הודו)","hu-HU":"הונגרית (הונגריה)","it-IT":"איטלקית (איטליה)","ja-JP":"יפנית (יפן)","nb-NO":"בוקמול נורבגית (נורווגיה)","pl-PL":"פולנית (פולין)","pt-BR":"פורטוגזית ברזילאית","pt-PT":"פורטוגזית אירופאית","ro-RO":"רומנית (רומניה)","ru-RU":"רוסית (רוסיה)","th-TH":"תאילנד (תאילנד)","tr-TR":"טורקית (טורקיה)","zh-CN":"סינית (סין)","zh-HK":"סינית (הונג קונג SAR סין)","action.add.attrs.attr":"איזו תכונה תרצה להוסיף?","action.add.attrs.value":"ערך ברירת מחדל",addOption:"הוסף אפשרות",allFieldsRemoved:"כל השדות הוסרו.",allowSelect:"אפשר בחירה",and:"ו",attribute:"תְכוּנָה",attributeNotPermitted:'התכונה "{attribute}" אינה מותרת, אנא בחר אחר.',attributes:"תכונות","attrs.class":"מַחלָקָה","attrs.className":"מַחלָקָה","attrs.dir":"כיוון","attrs.id":"תְעוּדַת זֶהוּת","attrs.required":"דָרוּשׁ","attrs.style":"סִגְנוֹן","attrs.title":"כּוֹתֶרֶת","attrs.type":"סוּג","attrs.value":"עֵרֶך",autocomplete:"השלמה אוטומטית",button:"לַחְצָן",cancel:"לְבַטֵל",cannotBeEmpty:"שדה זה לא יכול להיות ריק",cannotClearFields:"אין שדות לנקות",checkbox:"תיבת סימון",checkboxes:"תיבות סימון",class:"מַחלָקָה",clear:"בָּרוּר",clearAllMessage:"האם אתה בטוח שברצונך לנקות את כל השדות?",close:"לִסְגוֹר",column:"עַמוּדָה","condition.target.placeholder":"יַעַד","condition.type.and":"ו","condition.type.if":"אִם","condition.type.or":"אוֹ","condition.type.then":"אָז","condition.value.placeholder":"עֵרֶך",confirmClearAll:"האם אתה בטוח שברצונך להסיר את כל השדות?",content:"תוֹכֶן",control:"לִשְׁלוֹט","controlGroups.nextGroup":"הקבוצה הבאה","controlGroups.prevGroup":"הקבוצה הקודמת","controls.filteringTerm":'מסנן "{term}"',"controls.form.button":"לַחְצָן","controls.form.checkbox-group":"קבוצת תיבת סימון","controls.form.input.date":"תַאֲרִיך","controls.form.input.email":"אֶלֶקטרוֹנִי","controls.form.input.file":"העלאת קובץ","controls.form.input.hidden":"קלט מוסתר","controls.form.input.number":"מִספָּר","controls.form.input.text":"קלט טקסט","controls.form.radio-group":"קבוצת רדיו","controls.form.select":"לִבחוֹר","controls.form.textarea":"TextArea","controls.groups.form":"שדות טופס","controls.groups.html":"רכיבי HTML","controls.groups.layout":"מַעֲרָך","controls.html.divider":"מְחַלֵק","controls.html.header":"כּוֹתֶרֶת","controls.html.paragraph":"סָעִיף","controls.layout.column":"עַמוּדָה","controls.layout.row":"שׁוּרָה",copy:"העתק ללוח",danger:"סַכָּנָה",defineColumnLayout:"הגדר פריסת עמודה",defineColumnWidths:"הגדר רוחבי עמודות",description:"טקסט עזרה",descriptionField:"תֵאוּר","editing.row":"שורת עריכה",editorTitle:"רכיבי טופס",field:"שָׂדֶה","field.property.invalid":"לא תקף","field.property.isChecked":"נבדק","field.property.isNotVisible":"אינו נראה לעין","field.property.isVisible":"גלוי","field.property.label":"מַדבֵּקָה","field.property.valid":"תָקֵף","field.property.value":"עֵרֶך",fieldNonEditable:"לא ניתן לערוך שדה זה.",fieldRemoveWarning:"האם אתה בטוח שברצונך להסיר את השדה הזה?",fileUpload:"העלאת קובץ",formUpdated:"הטופס עודכן",getStarted:"גרור שדה מימין כדי להתחיל.",group:"קְבוּצָה",grouped:"מקובצים",hidden:"קלט מוסתר",hide:"לַעֲרוֹך",htmlElements:"רכיבי HTML",if:"אִם","if.condition.source.placeholder":"מָקוֹר","if.condition.target.placeholder":"יעד / ערך",info:"מידע","input.date":"תַאֲרִיך","input.text":"טֶקסט",label:"מַדבֵּקָה",labelCount:"{label} {count}",labelEmpty:"תווית שדה לא יכולה להיות ריקה","lang.af":"אַפְרִיקַנִי","lang.ar":"עֲרָבִית","lang.cs":"צ'כית","lang.de":"גֶרמָנִיָת","lang.en":"אַנגְלִית","lang.es":"סְפָרַדִית","lang.fa":"פַּרסִית","lang.fi":"פִינִית","lang.fr":"צָרְפָתִית","lang.he":"עברית","lang.hi":"הינדי","lang.hu":"הוּנגָרִי","lang.it":"אִיטַלְקִית","lang.ja":"יַפָּנִית","lang.nb":"בוקמול נורבגית","lang.pl":"פּוֹלָנִית","lang.pt":"פורטוגזית","lang.ro":"רומנית","lang.ru":"רוּסִי","lang.th":"תאילנדית","lang.tr":"טוּרקִית","lang.zh":"סִינִית",layout:"מַעֲרָך",limitRole:"הגבל גישה לאחד או יותר מהתפקידים הבאים:",mandatory:"הֶכְרֵחִי",maxlength:"אורך מקסימלי","meta.group":"קְבוּצָה","meta.icon":"איקו","meta.label":"מַדבֵּקָה",minOptionMessage:"שדה זה דורש לפחות 2 אפשרויות",name:"שֵׁם",newOptionLabel:"{סוג} חדש",no:"לֹא",number:"מִספָּר",off:"כבוי",on:"עַל","operator.contains":"מכיל","operator.equals":"שווה","operator.notContains":"לא מכיל","operator.notEquals":"לא שווה","operator.notVisible":"לא נראה לעין","operator.visible":"נִרְאֶה",option:"אוֹפְּצִיָה",optional:"אופציונלי",optionEmpty:"נדרש ערך אופציה",optionLabel:"אפשרות {count}",options:"אפשרויות",or:"אוֹ",order:"לְהַזמִין","panel.label.attrs":"תכונות","panel.label.conditions":"תנאים","panel.label.config":"תְצוּרָה","panel.label.meta":"מטא","panel.label.options":"אפשרויות","panelEditButtons.attrs":"+ תכונה","panelEditButtons.conditions":"+ מצב","panelEditButtons.config":"+ תצורה","panelEditButtons.options":"+ אפשרות",placeholder:"מציין מקום","placeholder.className":"כיתות מופרדות בחלל","placeholder.email":"הכנס את המייל שלך","placeholder.label":"מַדבֵּקָה","placeholder.password":"הזן את הסיסמה שלך","placeholder.placeholder":"מציין מקום","placeholder.text":"הזן קצת טקסט","placeholder.textarea":"הזן הרבה טקסט","placeholder.value":"עֵרֶך",preview:"תצוגה מקדימה",primary:"יְסוֹדִי",remove:"לְהַסִיר",removeMessage:"הסר אלמנט",removeType:"הסר {type}",required:"דָרוּשׁ",reset:"אִתחוּל",richText:"עורך טקסט עשיר",roles:"גִישָׁה",row:"שׁוּרָה","row.makeInputGroup":"הפוך את השורה הזו לקבוצת קלט.","row.makeInputGroupDesc":"קבוצות קלט מאפשרות למשתמשים להוסיף קבוצות של קלט בכל פעם.","row.settings.fieldsetWrap":"עטוף שורה ב-&lt;fieldset&gt; תָג","row.settings.fieldsetWrap.aria":"עטוף שורה ב-Fieldset",save:"לְהַצִיל",secondary:"מִשׁנִי",select:"לִבחוֹר",selectColor:"בחר צבע",selectionsMessage:"אפשר בחירות מרובות",selectOptions:"אפשרויות",separator:"מפריד",settings:"הגדרות",size:"גוֹדֶל",sizes:"מידות","sizes.lg":"גָדוֹל","sizes.m":"בְּרִירַת מֶחדָל","sizes.sm":"קָטָן","sizes.xs":"קטן במיוחד",style:"סִגְנוֹן",styles:"סגנונות","styles.btn":"סגנון כפתור","styles.btn.danger":"סַכָּנָה","styles.btn.default":"בְּרִירַת מֶחדָל","styles.btn.info":"מידע","styles.btn.primary":"יְסוֹדִי","styles.btn.success":"הַצלָחָה","styles.btn.warning":"אַזהָרָה",subtype:"סוּג",success:"הַצלָחָה",text:"שדה טקסט",then:"אָז","then.condition.target.placeholder":"יַעַד",toggle:"לְמַתֵג",ungrouped:"לא מקובץ",warning:"אַזהָרָה",yes:"כֵּן"},"hi-IN":{"hi-IN":"हिन्दी (भारत)",dir:"ltr","en-US":"अंग्रेज़ी","af-ZA":"अफ़्रीकी (दक्षिण अफ़्रीका)","ar-TN":"अरबी (ट्यूनीशिया)","cs-CZ":"चेक (चेकिया)","de-DE":"जर्मन जर्मनी)","es-ES":"यूरोपीय स्पेनिश","fa-IR":"फ़ारसी (ईरान)","fi-FI":"फ़िनिश (फ़िनलैंड)","fr-FR":"फ़्रांस के लोग फ्रेंच)","he-IL":"हिब्रू (इज़राइल)","hu-HU":"हंगेरियन (हंगरी)","it-IT":"इटालियन (इटली)","ja-JP":"जापानी (जापान)","nb-NO":"नॉर्वेजियन बोकमाल (नॉर्वे)","pl-PL":"पोलिश (पोलैंड)","pt-BR":"ब्राज़ीलियन पुर्तगाली","pt-PT":"यूरोपीय पुर्तगाली","ro-RO":"रोमानियाई (रोमानिया)","ru-RU":"रूसी (रूस)","th-TH":"थाई (थाईलैंड)","tr-TR":"तुर्की (तुर्किये)","zh-CN":"चीनी (चीन)","zh-HK":"चीनी (हांगकांग एसएआर चीन)","action.add.attrs.attr":"आप कौन सी विशेषता जोड़ना चाहेंगे?","action.add.attrs.value":"डिफ़ॉल्ट मान",addOption:"विकल्प जोड़ें",allFieldsRemoved:"सभी फ़ील्ड हटा दिए गए.",allowSelect:"चयन की अनुमति दें",and:"और",attribute:"गुण",attributeNotPermitted:'विशेषता "{attribute}" की अनुमति नहीं है, कृपया कोई अन्य चुनें.',attributes:"गुण","attrs.class":"कक्षा","attrs.className":"कक्षा","attrs.dir":"दिशा","attrs.id":"पहचान","attrs.required":"आवश्यक","attrs.style":"शैली","attrs.title":"शीर्षक","attrs.type":"प्रकार","attrs.value":"कीमत",autocomplete:"स्वत: पूर्ण",button:"बटन",cancel:"रद्द करना",cannotBeEmpty:"यह फ़ील्ड रिक्त नहीं रह सकती",cannotClearFields:"साफ़ करने के लिए कोई फ़ील्ड नहीं है",checkbox:"चेक बॉक्स",checkboxes:"चेक बॉक्स",class:"कक्षा",clear:"स्पष्ट",clearAllMessage:"क्या आप वाकई सभी फ़ील्ड साफ़ करना चाहते हैं?",close:"बंद करना",column:"स्तंभ","condition.target.placeholder":"लक्ष्य","condition.type.and":"और","condition.type.if":"अगर","condition.type.or":"या","condition.type.then":"तब","condition.value.placeholder":"कीमत",confirmClearAll:"क्या आप वाकई सभी फ़ील्ड हटाना चाहते हैं?",content:"सामग्री",control:"नियंत्रण","controlGroups.nextGroup":"अगला समूह","controlGroups.prevGroup":"पिछला समूह","controls.filteringTerm":'फ़िल्टरिंग "{शब्द}"',"controls.form.button":"बटन","controls.form.checkbox-group":"चेकबॉक्स समूह","controls.form.input.date":"तारीख","controls.form.input.email":"ईमेल","controls.form.input.file":"फ़ाइल अपलोड","controls.form.input.hidden":"छिपा हुआ इनपुट","controls.form.input.number":"संख्या","controls.form.input.text":"पाठ इनपुट","controls.form.radio-group":"रेडियो समूह","controls.form.select":"चुनना","controls.form.textarea":"पाठ क्षेत्र","controls.groups.form":"फॉर्म फ़ील्ड","controls.groups.html":"HTML तत्व","controls.groups.layout":"लेआउट","controls.html.divider":"डिवाइडर","controls.html.header":"हैडर","controls.html.paragraph":"अनुच्छेद","controls.layout.column":"स्तंभ","controls.layout.row":"पंक्ति",copy:"क्लिपबोर्ड पर कॉपी करें",danger:"खतरा",defineColumnLayout:"कॉलम लेआउट परिभाषित करें",defineColumnWidths:"स्तंभ की चौड़ाई निर्धारित करें",description:"सहायता पाठ",descriptionField:"विवरण","editing.row":"संपादन पंक्ति",editorTitle:"फॉर्म तत्व",field:"मैदान","field.property.invalid":"मान्य नहीं है","field.property.isChecked":"जाँच की गई है","field.property.isNotVisible":"दिखाई नहीं देता","field.property.isVisible":"दिखाई दे रहा है","field.property.label":"लेबल","field.property.valid":"वैध","field.property.value":"कीमत",fieldNonEditable:"इस फ़ील्ड को संपादित नहीं किया जा सकता.",fieldRemoveWarning:"क्या आप वाकई इस फ़ील्ड को हटाना चाहते हैं?",fileUpload:"फ़ाइल अपलोड",formUpdated:"फॉर्म अपडेट किया गया",getStarted:"आरंभ करने के लिए दाईं ओर से एक फ़ील्ड खींचें.",group:"समूह",grouped:"समूहीकृत",hidden:"छिपा हुआ इनपुट",hide:"संपादन करना",htmlElements:"HTML तत्व",if:"अगर","if.condition.source.placeholder":"स्रोत","if.condition.target.placeholder":"लक्ष्य / मूल्य",info:"जानकारी","input.date":"तारीख","input.text":"मूलपाठ",label:"लेबल",labelCount:"{लेबल} {गिनती}",labelEmpty:"फ़ील्ड लेबल रिक्त नहीं हो सकता","lang.af":"अफ़्रीकी","lang.ar":"अरबी","lang.cs":"चेक","lang.de":"जर्मन","lang.en":"अंग्रेज़ी","lang.es":"स्पैनिश","lang.fa":"फ़ारसी","lang.fi":"फिनिश","lang.fr":"फ्रेंच","lang.he":"हिब्रू","lang.hi":"हिन्दी","lang.hu":"हंगेरी","lang.it":"इतालवी","lang.ja":"जापानी","lang.nb":"नॉर्वेजियन बोकमाल","lang.pl":"पोलिश","lang.pt":"पुर्तगाली","lang.ro":"रोमानियाई","lang.ru":"रूसी","lang.th":"थाई","lang.tr":"तुर्की","lang.zh":"चीनी",layout:"लेआउट",limitRole:"निम्नलिखित में से एक या अधिक भूमिकाओं तक पहुंच सीमित करें:",mandatory:"अनिवार्य",maxlength:"अधिकतम लंबाई","meta.group":"समूह","meta.icon":"इको","meta.label":"लेबल",minOptionMessage:"इस फ़ील्ड में कम से कम 2 विकल्प होने चाहिए",name:"नाम",newOptionLabel:"नया {प्रकार}",no:"नहीं",number:"संख्या",off:"बंद",on:"पर","operator.contains":"रोकना","operator.equals":"के बराबर होती है","operator.notContains":"इसमें शामिल नहीं है","operator.notEquals":"सम नही","operator.notVisible":"दिखाई नहीं देना","operator.visible":"दृश्यमान",option:"विकल्प",optional:"वैकल्पिक",optionEmpty:"विकल्प मान आवश्यक",optionLabel:"विकल्प {गिनती}",options:"विकल्प",or:"या",order:"आदेश","panel.label.attrs":"गुण","panel.label.conditions":"स्थितियाँ","panel.label.config":"विन्यास","panel.label.meta":"मेटा","panel.label.options":"विकल्प","panelEditButtons.attrs":"+ विशेषता","panelEditButtons.conditions":"+ शर्त","panelEditButtons.config":"+ कॉन्फ़िगरेशन","panelEditButtons.options":"+ विकल्प",placeholder:"प्लेसहोल्डर","placeholder.className":"अंतरिक्ष से अलग की गई कक्षाएं","placeholder.email":"अपना ईमेल दर्ज करें","placeholder.label":"लेबल","placeholder.password":"अपना कूटशब्द भरें","placeholder.placeholder":"प्लेसहोल्डर","placeholder.text":"कुछ पाठ दर्ज करें","placeholder.textarea":"बहुत सारा पाठ दर्ज करें","placeholder.value":"कीमत",preview:"पूर्व दर्शन",primary:"प्राथमिक",remove:"निकालना",removeMessage:"तत्व हटाएँ",removeType:"{प्रकार} हटाएं",required:"आवश्यक",reset:"रीसेट करें",richText:"रिच टेक्स्ट एडिटर",roles:"पहुँच",row:"पंक्ति","row.makeInputGroup":"इस पंक्ति को एक इनपुट समूह बनाएं.","row.makeInputGroupDesc":"इनपुट समूह उपयोगकर्ताओं को एक समय में इनपुट के सेट जोड़ने में सक्षम बनाता है।","row.settings.fieldsetWrap":"पंक्ति को &lt;fieldset&gt; टैग में लपेटें","row.settings.fieldsetWrap.aria":"फ़ील्डसेट में पंक्ति लपेटें",save:"बचाना",secondary:"माध्यमिक",select:"चुनना",selectColor:"रंग चुनो",selectionsMessage:"एकाधिक चयन की अनुमति दें",selectOptions:"विकल्प",separator:"सेपरेटर",settings:"सेटिंग्स",size:"आकार",sizes:"आकार","sizes.lg":"बड़ा","sizes.m":"गलती करना","sizes.sm":"छोटा","sizes.xs":"अतिरिक्त छोटा",style:"शैली",styles:"शैलियों","styles.btn":"बटन शैली","styles.btn.danger":"खतरा","styles.btn.default":"गलती करना","styles.btn.info":"जानकारी","styles.btn.primary":"प्राथमिक","styles.btn.success":"सफलता","styles.btn.warning":"चेतावनी",subtype:"प्रकार",success:"सफलता",text:"पाठ्य से भरा",then:"तब","then.condition.target.placeholder":"लक्ष्य",toggle:"टॉगल",ungrouped:"अन-वर्गीकृत किया",warning:"चेतावनी",yes:"हाँ"},"hu-HU":{"hu-HU":"magyar (Magyarország)",dir:"ltr","en-US":"angol","af-ZA":"afrikaans (Dél-afrikai Köztársaság)","ar-TN":"arab (Tunézia)","cs-CZ":"cseh (Csehország)","de-DE":"német (Németország)","es-ES":"európai spanyol","fa-IR":"perzsa (Irán)","fi-FI":"finn (Finnország)","fr-FR":"francia (Franciaország)","he-IL":"héber (Izrael)","hi-IN":"hindi (India)","it-IT":"olasz (Olaszország)","ja-JP":"japán (Japán)","nb-NO":"norvég (bokmål) (Norvégia)","pl-PL":"lengyel (Lengyelország)","pt-BR":"brazíliai portugál","pt-PT":"európai portugál","ro-RO":"román (Románia)","ru-RU":"orosz (Oroszország)","th-TH":"thai (Thaiföld)","tr-TR":"török (Törökország)","zh-CN":"kínai (Kína)","zh-HK":"kínai (Hongkong KKT)","action.add.attrs.attr":"Milyen tulajdonságot szeretnél hozzáadni?","action.add.attrs.value":"Alapértelmezett érték",addOption:"Opció hozzáadása",allFieldsRemoved:"Minden mezőt eltávolítottunk.",allowSelect:"Engedélyezze a Kiválasztást",and:"és",attribute:"Tulajdonság",attributeNotPermitted:'A (z) "{attribute}" attribútum nem engedélyezett, kérjük, válasszon másikat.',attributes:"attribútumok","attrs.class":"Osztály","attrs.className":"Osztály","attrs.dir":"Irány","attrs.id":"Id","attrs.required":"Kívánt","attrs.style":"Stílus","attrs.title":"Cím","attrs.type":"típus","attrs.value":"Érték",autocomplete:"Automatikus kiegészítés",button:"Gomb",cancel:"Mégsem",cannotBeEmpty:"Ez a mező nem lehet üres",cannotClearFields:"Nincs törölni kívánt mező",checkbox:"jelölőnégyzetet",checkboxes:"négyzeteket",class:"Osztály",clear:"Egyértelmű",clearAllMessage:"Biztosan törölni szeretné az összes mezőt?",close:"Bezárás",column:"Oszlop","condition.target.placeholder":"cél","condition.type.and":"És","condition.type.if":"Ha","condition.type.or":"Vagy","condition.type.then":"Majd","condition.value.placeholder":"érték",confirmClearAll:"Biztosan eltávolít minden mezőt?",content:"Tartalom",control:"Ellenőrzés","controlGroups.nextGroup":"Következő csoport","controlGroups.prevGroup":"Előző csoport","controls.filteringTerm":'A (z) "{term}" szűrése',"controls.form.button":"Gomb","controls.form.checkbox-group":"Checkbox Group","controls.form.input.date":"Dátum","controls.form.input.email":"Email","controls.form.input.file":"Fájlfeltöltés","controls.form.input.hidden":"Rejtett bemenet","controls.form.input.number":"Szám","controls.form.input.text":"Szövegbevitel","controls.form.radio-group":"Radio Group","controls.form.select":"választ","controls.form.textarea":"a szövegszerkesztő","controls.groups.form":"Űrlapmezők","controls.groups.html":"HTML Elemek","controls.groups.layout":"Elrendezés","controls.html.divider":"Osztó","controls.html.header":"Fejléc","controls.html.paragraph":"Bekezdés","controls.layout.column":"Oszlop","controls.layout.row":"Sor",copy:"Másolja a vágólapra",danger:"Veszély",defineColumnLayout:"Állítsa be az oszlop elrendezését",defineColumnWidths:"Határozza meg az oszlopszélességeket",description:"Súgószöveg",descriptionField:"Leírás","editing.row":"Sor szerkesztése",editorTitle:"Form Elemek",field:"Mező","field.property.invalid":"nem érvényes","field.property.isChecked":"ellenőrizve van","field.property.isNotVisible":"nem látható","field.property.isVisible":"látható","field.property.label":"címke","field.property.valid":"érvényes","field.property.value":"érték",fieldNonEditable:"Ez a mező nem szerkeszthető.",fieldRemoveWarning:"Biztosan eltávolítja ezt a mezőt?",fileUpload:"Fájlfeltöltés",formUpdated:"Frissített űrlap",getStarted:"Húzzon egy mezőt jobbra, hogy elinduljon.",group:"Csoport",grouped:"csoportosított",hidden:"Rejtett bemenet",hide:"szerkesztése",htmlElements:"HTML Elemek",if:"Ha","if.condition.source.placeholder":"forrás","if.condition.target.placeholder":"célérték",info:"Info","input.date":"Dátum","input.text":"Szöveg",label:"Címke",labelCount:"{label} {count}",labelEmpty:"A mezőcímke nem lehet üres","lang.af":"afrikai","lang.ar":"arab","lang.cs":"cseh","lang.de":"német","lang.en":"angol","lang.es":"spanyol","lang.fa":"perzsa","lang.fi":"finn","lang.fr":"francia","lang.he":"héber","lang.hi":"hindi","lang.hu":"magyar","lang.it":"olasz","lang.ja":"japán","lang.nb":"norvég bokmål","lang.pl":"lengyel","lang.pt":"portugál","lang.ro":"román","lang.ru":"orosz","lang.th":"thai","lang.tr":"török","lang.zh":"kínai",layout:"Elrendezés",limitRole:"A következő szerepek közül egy vagy több korlátozása:",mandatory:"Kötelező",maxlength:"Max. Hosszúság","meta.group":"Csoport","meta.icon":"Ico","meta.label":"Címke",minOptionMessage:"Ez a mező legalább 2 opciót igényel",name:"Név",newOptionLabel:"Új {típus}",no:"Nem",number:"Szám",off:"Ki",on:"Tovább","operator.contains":"tartalmaz","operator.equals":"egyenlő","operator.notContains":"nem tartalmaz","operator.notEquals":"nem egyenlő","operator.notVisible":"nem látható","operator.visible":"látható",option:"választási lehetőség",optional:"választható",optionEmpty:"Opciós érték szükséges",optionLabel:"Opció {count}",options:"Opciók",or:"vagy",order:"Sorrend","panel.label.attrs":"attribútumok","panel.label.conditions":"Körülmények","panel.label.config":"Configuration","panel.label.meta":"meta","panel.label.options":"Opciók","panelEditButtons.attrs":"+ Attribútum","panelEditButtons.conditions":"+ Állapot","panelEditButtons.config":"+ Konfiguráció","panelEditButtons.options":"+ Opció",placeholder:"Helykitöltő","placeholder.className":"űrszeparált osztályok","placeholder.email":"Adja meg az e-mailt","placeholder.label":"Címke","placeholder.password":"Írd be a jelszavad","placeholder.placeholder":"Helykitöltő","placeholder.text":"Adjon meg egy szöveget","placeholder.textarea":"Adjon meg egy csomó szöveget","placeholder.value":"Érték",preview:"Előnézet",primary:"Elsődleges",remove:"eltávolít",removeMessage:"Elem eltávolítása",removeType:"Remove {type}",required:"Kívánt",reset:"Visszaállítás",richText:"Rich Text Editor",roles:"Hozzáférés",row:"Sor","row.makeInputGroup":"A beviteli csoport létrehozása.","row.makeInputGroupDesc":"A beviteli csoportok lehetővé teszik a felhasználók számára, hogy egy időben hozzáadják a bemeneti készleteket.","row.settings.fieldsetWrap":"A <fieldset & gt; címke","row.settings.fieldsetWrap.aria":"Wrap sor a Fieldsetben",save:"Mentés",secondary:"Másodlagos",select:"választ",selectColor:"Válassza a Szín lehetőséget",selectionsMessage:"Többszörös kiválasztás engedélyezése",selectOptions:"Opciók",separator:"Szétválasztó",settings:"Beállítások",size:"Méret",sizes:"méretek","sizes.lg":"Nagy","sizes.m":"Alapértelmezett","sizes.sm":"Kicsi","sizes.xs":"Extra kicsi",style:"Stílus",styles:"Stílusok","styles.btn":"Gomb stílus","styles.btn.danger":"Veszély","styles.btn.default":"Alapértelmezett","styles.btn.info":"Info","styles.btn.primary":"Elsődleges","styles.btn.success":"Siker","styles.btn.warning":"Figyelem",subtype:"típus",success:"Siker",text:"Szövegmező",then:"Azután","then.condition.target.placeholder":"cél",toggle:"pecek",ungrouped:"A csoportosított",warning:"Figyelem",yes:"Igen"},"it-IT":{"it-IT":"italiano (Italia)",dir:"ltr","en-US":"Inglese","af-ZA":"afrikaans (Sudafrica)","ar-TN":"arabo (Tunisia)","cs-CZ":"ceco (Cechia)","de-DE":"tedesco (Germania)","es-ES":"spagnolo europeo","fa-IR":"persiano (Iran)","fi-FI":"finlandese (Finlandia)","fr-FR":"francese (Francia)","he-IL":"ebraico (Israele)","hi-IN":"hindi (India)","hu-HU":"ungherese (Ungheria)","ja-JP":"giapponese (Giappone)","nb-NO":"norvegese bokmål (Norvegia)","pl-PL":"polacco (Polonia)","pt-BR":"portoghese brasiliano","pt-PT":"portoghese europeo","ro-RO":"rumeno (Romania)","ru-RU":"russo (Russia)","th-TH":"thailandese (Thailandia)","tr-TR":"turco (Turchia)","zh-CN":"cinese (Cina)","zh-HK":"cinese (RAS di Hong Kong)","action.add.attrs.attr":"Quale attributo vorresti aggiungere?","action.add.attrs.value":"Valore predefinito",addOption:"Aggiungi opzione",allFieldsRemoved:"Tutti i campi sono stati rimossi.",allowSelect:"Consenti selezione",and:"e",attribute:"Attributo",attributeNotPermitted:`L'attributo "{attribute}" non è permesso, per favore sceglierne un altro.`,attributes:"attributi","attrs.class":"Classe","attrs.className":"Classe","attrs.dir":"Direzione","attrs.id":"Id","attrs.required":"necessario","attrs.style":"Stile","attrs.title":"Titolo","attrs.type":"genere","attrs.value":"Valore",autocomplete:"Completamento automatico",button:"Pulsante",cancel:"Cancellare",cannotBeEmpty:"Questo campo non può essere vuoto",cannotClearFields:"Non ci sono campi da cancellare",checkbox:"casella di controllo",checkboxes:"caselle di controllo",class:"Classe",clear:"Chiaro",clearAllMessage:"Sei sicuro di voler cancellare tutti i campi?",close:"Vicino",column:"Colonna","condition.target.placeholder":"bersaglio","condition.type.and":"E","condition.type.if":"Se","condition.type.or":"O","condition.type.then":"Poi","condition.value.placeholder":"valore",confirmClearAll:"Sei sicuro di voler rimuovere tutti i campi?",content:"Soddisfare",control:"Controllo","controlGroups.nextGroup":"Gruppo successivo","controlGroups.prevGroup":"Gruppo precedente","controls.filteringTerm":'Filtro "{term}"',"controls.form.button":"Pulsante","controls.form.checkbox-group":"Gruppo di caselle di controllo","controls.form.input.date":"Data","controls.form.input.email":"E-mail","controls.form.input.file":"Upload di file","controls.form.input.hidden":"Ingresso nascosto","controls.form.input.number":"Numero","controls.form.input.text":"L'immissione di testo","controls.form.radio-group":"Gruppo Radio","controls.form.select":"Selezionare","controls.form.textarea":"TextArea","controls.groups.form":"Campi modulo","controls.groups.html":"Elementi HTML","controls.groups.layout":"disposizione","controls.html.divider":"Divisore","controls.html.header":"Intestazione","controls.html.paragraph":"Paragrafo","controls.layout.column":"Colonna","controls.layout.row":"Riga",copy:"Copia negli appunti",danger:"Pericolo",defineColumnLayout:"Definire un layout di colonna",defineColumnWidths:"Definire le larghezze delle colonne",description:"Testo guida",descriptionField:"Descrizione","editing.row":"Modifica riga",editorTitle:"Elementi del modulo",field:"Campo","field.property.invalid":"non valido","field.property.isChecked":"è controllato","field.property.isNotVisible":"non è visibile","field.property.isVisible":"è visibile","field.property.label":"etichetta","field.property.valid":"valido","field.property.value":"valore",fieldNonEditable:"Questo campo non può essere modificato.",fieldRemoveWarning:"Sei sicuro di voler rimuovere questo campo?",fileUpload:"Upload di file",formUpdated:"Modulo aggiornato",getStarted:"Trascina un campo da destra per iniziare.",group:"Gruppo",grouped:"raggruppate",hidden:"Ingresso nascosto",hide:"modificare",htmlElements:"Elementi HTML",if:"Se","if.condition.source.placeholder":"fonte","if.condition.target.placeholder":"obiettivo / valore",info:"Informazioni","input.date":"Data","input.text":"Testo",label:"Etichetta",labelCount:"{label} {count}",labelEmpty:"Field Label non può essere vuoto","lang.af":"africano","lang.ar":"arabo","lang.cs":"ceco","lang.de":"tedesco","lang.en":"Inglese","lang.es":"spagnolo","lang.fa":"persiano","lang.fi":"finlandese","lang.fr":"francese","lang.he":"ebraico","lang.hi":"hindi","lang.hu":"ungherese","lang.it":"Italiano","lang.ja":"giapponese","lang.nb":"Bokmål norvegese","lang.pl":"Polacco","lang.pt":"portoghese","lang.ro":"rumeno","lang.ru":"russo","lang.th":"tailandese","lang.tr":"turco","lang.zh":"cinese",layout:"disposizione",limitRole:"Limitare l'accesso a uno o più dei seguenti ruoli:",mandatory:"Obbligatorio",maxlength:"Lunghezza massima","meta.group":"Gruppo","meta.icon":"Ico","meta.label":"Etichetta",minOptionMessage:"Questo campo richiede un minimo di 2 opzioni",name:"Nome",newOptionLabel:"Nuovo tipo}",no:"No",number:"Numero",off:"via",on:"Sopra","operator.contains":"contiene","operator.equals":"è uguale a","operator.notContains":"non contiene","operator.notEquals":"non uguale","operator.notVisible":"non visibile","operator.visible":"visibile",option:"Opzione",optional:"opzionale",optionEmpty:"Opzione valore richiesto",optionLabel:"Opzione {count}",options:"Opzioni",or:"o",order:"Ordine","panel.label.attrs":"attributi","panel.label.conditions":"condizioni","panel.label.config":"Configurazione","panel.label.meta":"Meta","panel.label.options":"Opzioni","panelEditButtons.attrs":"+ Attributo","panelEditButtons.conditions":"+ Condizione","panelEditButtons.config":"+ Configurazione","panelEditButtons.options":"+ Opzione",placeholder:"segnaposto","placeholder.className":"classi separate dallo spazio","placeholder.email":"Inserisci la tua email","placeholder.label":"Etichetta","placeholder.password":"Inserisci la tua password","placeholder.placeholder":"segnaposto","placeholder.text":"Inserisci del testo","placeholder.textarea":"Inserisci un sacco di testo","placeholder.value":"Valore",preview:"Anteprima",primary:"Primario",remove:"Rimuovere",removeMessage:"Rimuovi elemento",removeType:"Rimuovi {tipo}",required:"necessario",reset:"Reset",richText:"Rich Text Editor",roles:"Accesso",row:"Riga","row.makeInputGroup":"Rendi questa riga un gruppo di input.","row.makeInputGroupDesc":"I gruppi di input consentono agli utenti di aggiungere insiemi di input alla volta.","row.settings.fieldsetWrap":"Racchiudi la riga in un & lt; fieldset & gt; etichetta","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset",save:"Salvare",secondary:"Secondario",select:"Selezionare",selectColor:"Seleziona colore",selectionsMessage:"Consenti selezioni multiple",selectOptions:"Opzioni",separator:"Separatore",settings:"impostazioni",size:"Taglia",sizes:"taglie","sizes.lg":"Grande","sizes.m":"Predefinito","sizes.sm":"Piccolo","sizes.xs":"Piccolissimo",style:"Stile",styles:"stili","styles.btn":"Stile del bottone","styles.btn.danger":"Pericolo","styles.btn.default":"Predefinito","styles.btn.info":"Informazioni","styles.btn.primary":"Primario","styles.btn.success":"Successo","styles.btn.warning":"avvertimento",subtype:"genere",success:"Successo",text:"Campo di testo",then:"Poi","then.condition.target.placeholder":"bersaglio",toggle:"Toggle",ungrouped:"A-raggruppati",warning:"avvertimento",yes:"sì"},"ja-JP":{"ja-JP":"日本語 (日本)",dir:"ltr","en-US":"英語","af-ZA":"アフリカーンス語 (南アフリカ)","ar-TN":"アラビア語 (チュニジア)","cs-CZ":"チェコ語 (チェコ)","de-DE":"ドイツ語 (ドイツ)","es-ES":"スペイン語 (イベリア半島)","fa-IR":"ペルシア語 (イラン)","fi-FI":"フィンランド語 (フィンランド)","fr-FR":"フランス語 (フランス)","he-IL":"ヘブライ語 (イスラエル)","hi-IN":"ヒンディー語 (インド)","hu-HU":"ハンガリー語 (ハンガリー)","it-IT":"イタリア語 (イタリア)","nb-NO":"ノルウェー語(ブークモール) (ノルウェー)","pl-PL":"ポーランド語 (ポーランド)","pt-BR":"ポルトガル語 (ブラジル)","pt-PT":"ポルトガル語 (イベリア半島)","ro-RO":"ルーマニア語 (ルーマニア)","ru-RU":"ロシア語 (ロシア)","th-TH":"タイ語 (タイ)","tr-TR":"トルコ語 (トルコ)","zh-CN":"中国語 (中国)","zh-HK":"中国語 (中華人民共和国香港特別行政区)","action.add.attrs.attr":"どのような属性を追加しますか?","action.add.attrs.value":"デフォルト値",addOption:"オプションを追加",allFieldsRemoved:"すべてのフィールドが削除されました。",allowSelect:"選択を許可する",and:"そして",attribute:"属性",attributeNotPermitted:'属性 "{属性}"は許可されていません。別の属性を選択してください。',attributes:"属性","attrs.class":"クラス","attrs.className":"クラス","attrs.dir":"方向","attrs.id":"イド","attrs.required":"必須","attrs.style":"スタイル","attrs.title":"タイトル","attrs.type":"タイプ","attrs.value":"値",autocomplete:"オートコンプリート",button:"ボタン",cancel:"キャンセル",cannotBeEmpty:"このフィールドは空白にすることはできません",cannotClearFields:"クリアするフィールドはありません",checkbox:"チェックボックス",checkboxes:"チェックボックス",class:"クラス",clear:"クリア",clearAllMessage:"すべてのフィールドをクリアしてもよろしいですか?",close:"閉じる",column:"カラム","condition.target.placeholder":"ターゲット","condition.type.and":"そして","condition.type.if":"もし","condition.type.or":"または","condition.type.then":"それから","condition.value.placeholder":"値",confirmClearAll:"すべてのフィールドを削除してもよろしいですか?",content:"コンテンツ",control:"コントロール","controlGroups.nextGroup":"次のグループ","controlGroups.prevGroup":"前のグループ","controls.filteringTerm":'フィルタリング "{term}"',"controls.form.button":"ボタン","controls.form.checkbox-group":"チェックボックスグループ","controls.form.input.date":"日付","controls.form.input.email":"Eメール","controls.form.input.file":"ファイルアップロード","controls.form.input.hidden":"隠された入力","controls.form.input.number":"数","controls.form.input.text":"テキスト入力","controls.form.radio-group":"ラジオ・グループ","controls.form.select":"選択","controls.form.textarea":"TextArea","controls.groups.form":"フォームフィールド","controls.groups.html":"HTML要素","controls.groups.layout":"レイアウト","controls.html.divider":"ディバイダー","controls.html.header":"ヘッダ","controls.html.paragraph":"段落","controls.layout.column":"カラム","controls.layout.row":"行",copy:"クリップボードにコピー",danger:"危険",defineColumnLayout:"列のレイアウトを定義する",defineColumnWidths:"列の幅を定義する",description:"ヘルプテキスト",descriptionField:"説明","editing.row":"行の編集",editorTitle:"フォーム要素",field:"フィールド","field.property.invalid":"有効ではありません","field.property.isChecked":"チェックされている","field.property.isNotVisible":"見えない","field.property.isVisible":"目に見える","field.property.label":"ラベル","field.property.valid":"有効な","field.property.value":"値",fieldNonEditable:"このフィールドは編集できません。",fieldRemoveWarning:"このフィールドを削除してもよろしいですか?",fileUpload:"ファイルアップロード",formUpdated:"フォームの更新",getStarted:"フィールドを右からドラッグして開始します。",group:"グループ",grouped:"グループ化された",hidden:"隠された入力",hide:"編集",htmlElements:"HTML要素",if:"もし","if.condition.source.placeholder":"ソース","if.condition.target.placeholder":"ターゲット/値",info:"情報","input.date":"日付","input.text":"テキスト",label:"ラベル",labelCount:"{label} {count}",labelEmpty:"フィールドラベルを空にすることはできません","lang.af":"アフリカ人","lang.ar":"アラビア語","lang.cs":"チェコ語","lang.de":"ドイツ語","lang.en":"英語","lang.es":"スペイン語","lang.fa":"ペルシャ語","lang.fi":"フィンランド語","lang.fr":"フランス語","lang.he":"ヘブライ語","lang.hi":"ヒンディー語","lang.hu":"ハンガリー語","lang.it":"イタリア語","lang.ja":"日本語","lang.nb":"ノルウェー語ブークモール","lang.pl":"研磨","lang.pt":"ポルトガル語","lang.ro":"ルーマニア語","lang.ru":"ロシア","lang.th":"タイ語","lang.tr":"トルコ語","lang.zh":"中国語",layout:"レイアウト",limitRole:"以下の役割の1つ以上にアクセスを制限する:",mandatory:"必須",maxlength:"最大長","meta.group":"グループ","meta.icon":"イコ","meta.label":"ラベル",minOptionMessage:"このフィールドには最低2つのオプションが必要です",name:"名",newOptionLabel:"新しいタイプ}",no:"いいえ",number:"数",off:"オフ",on:"に","operator.contains":"含まれる","operator.equals":"等しい","operator.notContains":"含まれていない","operator.notEquals":"等しくない","operator.notVisible":"目に見えない","operator.visible":"目に見える",option:"オプション",optional:"オプション",optionEmpty:"オプション値が必要です",optionLabel:"オプション{count}",options:"オプション",or:"または",order:"注文","panel.label.attrs":"属性","panel.label.conditions":"条件","panel.label.config":"構成","panel.label.meta":"メタ","panel.label.options":"オプション","panelEditButtons.attrs":"+属性","panelEditButtons.conditions":"+条件","panelEditButtons.config":"+ 構成","panelEditButtons.options":"+オプション",placeholder:"プレースホルダ","placeholder.className":"スペースで区切られたクラス","placeholder.email":"あなたにメールを入力","placeholder.label":"ラベル","placeholder.password":"パスワードを入力してください","placeholder.placeholder":"プレースホルダ","placeholder.text":"テキストを入力","placeholder.textarea":"たくさんのテキストを入力してください","placeholder.value":"値",preview:"プレビュー",primary:"一次",remove:"削除する",removeMessage:"要素を削除する",removeType:"{タイプ}を削除",required:"必須",reset:"リセット",richText:"リッチテキストエディタ",roles:"アクセス",row:"行","row.makeInputGroup":"この行を入力グループにします。","row.makeInputGroupDesc":"入力グループを使用すると、一度に入力セットを追加できます。","row.settings.fieldsetWrap":"&lt; fieldset&gt;フィールドに行をラップします。タグ","row.settings.fieldsetWrap.aria":"行をフィールドセットで折り返す",save:"保存する",secondary:"二次",select:"選択",selectColor:"カラーを選択",selectionsMessage:"複数の選択を許可する",selectOptions:"オプション",separator:"セパレータ",settings:"設定",size:"サイズ",sizes:"サイズ","sizes.lg":"大","sizes.m":"デフォルト","sizes.sm":"小さい","sizes.xs":"極小",style:"スタイル",styles:"スタイル","styles.btn":"ボタンスタイル","styles.btn.danger":"危険","styles.btn.default":"デフォルト","styles.btn.info":"情報","styles.btn.primary":"一次","styles.btn.success":"成功","styles.btn.warning":"警告",subtype:"タイプ",success:"成功",text:"テキストフィールド",then:"その後、","then.condition.target.placeholder":"ターゲット",toggle:"トグル",ungrouped:"- グループ化",warning:"警告",yes:"はい"},"nb-NO":{"nb-NO":"norsk bokmål (Norge)",dir:"ltr","en-US":"Engelsk","af-ZA":"afrikaans (Sør-Afrika)","ar-TN":"arabisk (Tunisia)","cs-CZ":"tsjekkisk (Tsjekkia)","de-DE":"tysk (Tyskland)","es-ES":"spansk (Spania)","fa-IR":"persisk (Iran)","fi-FI":"finsk (Finland)","fr-FR":"fransk (Frankrike)","he-IL":"hebraisk (Israel)","hi-IN":"hindi (India)","hu-HU":"ungarsk (Ungarn)","it-IT":"italiensk (Italia)","ja-JP":"japansk (Japan)","pl-PL":"polsk (Polen)","pt-BR":"portugisisk (Brasil)","pt-PT":"portugisisk (Portugal)","ro-RO":"rumensk (Romania)","ru-RU":"russisk (Russland)","th-TH":"thai (Thailand)","tr-TR":"tyrkisk (Tyrkia)","zh-CN":"kinesisk (Kina)","zh-HK":"kinesisk (Hongkong SAR Kina)","action.add.attrs.attr":"Hvilken egenskap vil du legge til?","action.add.attrs.value":"Standardverdi",addOption:"Legg til alternativ",allFieldsRemoved:"Alle feltene ble fjernet.",allowSelect:"Tillat Select",and:"og",attribute:"Egenskap",attributeNotPermitted:'Attributt "{attribute}" er ikke tillatt, vennligst velg en annen.',attributes:"Egenskaper","attrs.class":"Klasse","attrs.className":"Klasse","attrs.dir":"Retning","attrs.id":"id","attrs.required":"Må","attrs.style":"Stil","attrs.title":"Tittel","attrs.type":"Type","attrs.value":"Verdi",autocomplete:"Autofullfør",button:"Knapp",cancel:"Kansellere",cannotBeEmpty:"Dette feltet kan ikke være tomt",cannotClearFields:"Det er ingen felt å slette",checkbox:"avkrysnings",checkboxes:"boksene",class:"Klasse",clear:"Klar",clearAllMessage:"Er du sikker på at du vil slette alle feltene?",close:"Lukk",column:"Kolonne","condition.target.placeholder":"mål","condition.type.and":"Og","condition.type.if":"Hvis","condition.type.or":"Eller","condition.type.then":"Da","condition.value.placeholder":"verdi",confirmClearAll:"Er du sikker på at du vil fjerne alle feltene?",content:"Innhold",control:"Styre","controlGroups.nextGroup":"Neste gruppe","controlGroups.prevGroup":"Forrige gruppe","controls.filteringTerm":'Filtrering "{term}"',"controls.form.button":"Knapp","controls.form.checkbox-group":"Kryssboksgruppe","controls.form.input.date":"Dato","controls.form.input.email":"e-post","controls.form.input.file":"Filopplasting","controls.form.input.hidden":"Skjult inngang","controls.form.input.number":"Nummer","controls.form.input.text":"Tekstinngang","controls.form.radio-group":"Radio gruppe","controls.form.select":"Å velge","controls.form.textarea":"Tekstfelt","controls.groups.form":"Form Fields","controls.groups.html":"HTML-elementer","controls.groups.layout":"Oppsett","controls.html.divider":"Deler","controls.html.header":"Overskrift","controls.html.paragraph":"Avsnitt","controls.layout.column":"Kolonne","controls.layout.row":"Rad",copy:"Kopiere til utklippstavle",danger:"Fare",defineColumnLayout:"Definer en kolonneoppsett",defineColumnWidths:"Definer kolonnebredder",description:"Hjelpetekst",descriptionField:"Beskrivelse","editing.row":"Redigerer rad",editorTitle:"Formelementer",field:"Felt","field.property.invalid":"ikke gyldig","field.property.isChecked":"er sjekket","field.property.isNotVisible":"er ikke synlig","field.property.isVisible":"er synlig","field.property.label":"merkelapp","field.property.valid":"gyldig","field.property.value":"verdi",fieldNonEditable:"Dette feltet kan ikke redigeres.",fieldRemoveWarning:"Er du sikker på at du vil fjerne dette feltet?",fileUpload:"Filopplasting",formUpdated:"Form oppdatert",getStarted:"Dra et felt fra høyre for å komme i gang.",group:"Gruppe",grouped:"gruppert",hidden:"Skjult inngang",hide:"Redigere",htmlElements:"HTML-elementer",if:"Hvis","if.condition.source.placeholder":"kilde","if.condition.target.placeholder":"målverdi",info:"info","input.date":"Dato","input.text":"Tekst",label:"Merkelapp",labelCount:"{label} {count}",labelEmpty:"Feltetikett kan ikke være tomt","lang.af":"afrikansk","lang.ar":"arabisk","lang.cs":"tsjekkisk","lang.de":"tysk","lang.en":"engelsk","lang.es":"spansk","lang.fa":"persisk","lang.fi":"finsk","lang.fr":"fransk","lang.he":"hebraisk","lang.hi":"hindi","lang.hu":"ungarsk","lang.it":"italiensk","lang.ja":"japansk","lang.nb":"Norwegian Bokmål","lang.pl":"Pusse","lang.pt":"portugisisk","lang.ro":"rumensk","lang.ru":"russisk","lang.th":"Thai","lang.tr":"tyrkisk","lang.zh":"kinesisk",layout:"Oppsett",limitRole:"Begrens tilgang til en eller flere av følgende roller:",mandatory:"Påbudt, bindende",maxlength:"Maks lengde","meta.group":"Gruppe","meta.icon":"ico","meta.label":"Merkelapp",minOptionMessage:"Dette feltet krever minst 2 alternativer",name:"Navn",newOptionLabel:"Ny {type}",no:"Nei",number:"Nummer",off:"Av",on:"På","operator.contains":"inneholder","operator.equals":"er lik","operator.notContains":"ikke inneholder","operator.notEquals":"ikke lik","operator.notVisible":"ikke synlig","operator.visible":"synlig",option:"Alternativ",optional:"valgfri",optionEmpty:"Valgmulighet som kreves",optionLabel:"Alternativ {teller}",options:"alternativer",or:"eller",order:"Rekkefølge","panel.label.attrs":"Egenskaper","panel.label.conditions":"Forhold","panel.label.config":"konfigurasjon","panel.label.meta":"Meta","panel.label.options":"alternativer","panelEditButtons.attrs":"+ Attributt","panelEditButtons.conditions":"+ Tilstand","panelEditButtons.config":"+ Konfigurasjon","panelEditButtons.options":"+ Alternativ",placeholder:"Plassholder","placeholder.className":"mellomrom separerte klasser","placeholder.email":"Skriv inn e-post","placeholder.label":"Merkelapp","placeholder.password":"Skriv inn passordet ditt","placeholder.placeholder":"Plassholder","placeholder.text":"Skriv inn litt tekst","placeholder.textarea":"Skriv inn mye tekst","placeholder.value":"Verdi",preview:"Forhåndsvisning",primary:"primær~~POS=TRUNC",remove:"Fjerne",removeMessage:"Fjern elementet",removeType:"Fjern {type}",required:"Må",reset:"tilbakestille",richText:"Rich Text Editor",roles:"Adgang",row:"Rad","row.makeInputGroup":"Gjør denne raden en inngangsgruppe.","row.makeInputGroupDesc":"Inngangsgrupper lar brukerne legge til sett med innspillinger om gangen.","row.settings.fieldsetWrap":"Wrap rad i en & lt; fieldset & gt; stikkord","row.settings.fieldsetWrap.aria":"Wrap Row i Fieldset",save:"Lagre",secondary:"sekundær",select:"Å velge",selectColor:"Velg Farge",selectionsMessage:"Tillat flere valg",selectOptions:"alternativer",separator:"separator",settings:"innstillinger",size:"Størrelse",sizes:"størrelser","sizes.lg":"Stor","sizes.m":"Misligholde","sizes.sm":"Liten","sizes.xs":"Ekstra liten",style:"Stil",styles:"Styles","styles.btn":"Knapp stil","styles.btn.danger":"Fare","styles.btn.default":"Misligholde","styles.btn.info":"info","styles.btn.primary":"primær~~POS=TRUNC","styles.btn.success":"Suksess","styles.btn.warning":"Advarsel",subtype:"Type",success:"Suksess",text:"Tekstfelt",then:"Deretter","then.condition.target.placeholder":"mål",toggle:"Veksle",ungrouped:"A-Gruppert",warning:"Advarsel",yes:"Ja"},"pl-PL":{"pl-PL":"polski (Polska)",dir:"ltr","en-US":"język angielski","af-ZA":"afrikaans (Republika Południowej Afryki)","ar-TN":"arabski (Tunezja)","cs-CZ":"czeski (Czechy)","de-DE":"niemiecki (Niemcy)","es-ES":"europejski hiszpański","fa-IR":"perski (Iran)","fi-FI":"fiński (Finlandia)","fr-FR":"francuski (Francja)","he-IL":"hebrajski (Izrael)","hi-IN":"hindi (Indie)","hu-HU":"węgierski (Węgry)","it-IT":"włoski (Włochy)","ja-JP":"japoński (Japonia)","nb-NO":"norweski (bokmål) (Norwegia)","pt-BR":"brazylijski portugalski","pt-PT":"europejski portugalski","ro-RO":"rumuński (Rumunia)","ru-RU":"rosyjski (Rosja)","th-TH":"tajski (Tajlandia)","tr-TR":"turecki (Turcja)","zh-CN":"chiński (Chiny)","zh-HK":"chiński (SRA Hongkong [Chiny])","action.add.attrs.attr":"Jaki atrybut chciałbyś dodać?","action.add.attrs.value":"Domyślna wartość",addOption:"Dodaj opcję",allFieldsRemoved:"Wszystkie pola zostały usunięte.",allowSelect:"Zezwalaj Wybierz",and:"i",attribute:"Atrybut",attributeNotPermitted:'Atrybut "{atrybut}" jest niedozwolony, wybierz inny.',attributes:"Atrybuty","attrs.class":"Klasa","attrs.className":"Klasa","attrs.dir":"Kierunek","attrs.id":"ID","attrs.required":"wymagany","attrs.style":"Styl","attrs.title":"Tytuł","attrs.type":"Rodzaj","attrs.value":"Wartość",autocomplete:"autouzupełnienie",button:"Przycisk",cancel:"Anulować",cannotBeEmpty:"To pole nie może być puste",cannotClearFields:"Nie ma pól do wyczyszczenia",checkbox:"Pole wyboru",checkboxes:"Checkboxes",class:"Klasa",clear:"Jasny",clearAllMessage:"Czy na pewno chcesz wyczyścić wszystkie pola?",close:"Blisko",column:"Kolumna","condition.target.placeholder":"cel","condition.type.and":"I","condition.type.if":"Jeśli","condition.type.or":"Lub","condition.type.then":"Następnie","condition.value.placeholder":"wartość",confirmClearAll:"Czy na pewno chcesz usunąć wszystkie pola?",content:"Zawartość",control:"Kontrola","controlGroups.nextGroup":"Następna grupa","controlGroups.prevGroup":"Poprzednia grupa","controls.filteringTerm":'Filtrowanie "{term}"',"controls.form.button":"Przycisk","controls.form.checkbox-group":"Grupa Checkbox","controls.form.input.date":"Data","controls.form.input.email":"E-mail","controls.form.input.file":"Udostępnianie pliku","controls.form.input.hidden":"Ukryte wejście","controls.form.input.number":"Numer","controls.form.input.text":"Wprowadzanie tekstu","controls.form.radio-group":"Radio Group","controls.form.select":"Wybierz","controls.form.textarea":"TextArea","controls.groups.form":"Pola formularzy","controls.groups.html":"Elementy HTML","controls.groups.layout":"Układ","controls.html.divider":"Rozdzielacz","controls.html.header":"nagłówek","controls.html.paragraph":"Ustęp","controls.layout.column":"Kolumna","controls.layout.row":"Rząd",copy:"Skopiuj do schowka",danger:"Zagrożenie",defineColumnLayout:"Zdefiniuj układ kolumn",defineColumnWidths:"Określ szerokość kolumn",description:"Tekst pomocy",descriptionField:"Opis","editing.row":"Edytowanie wiersza",editorTitle:"Formuj elementy",field:"Pole","field.property.invalid":"nieważny","field.property.isChecked":"jest sprawdzane","field.property.isNotVisible":"nie jest widoczny","field.property.isVisible":"jest widoczny","field.property.label":"etykieta","field.property.valid":"ważny","field.property.value":"wartość",fieldNonEditable:"Tego pola nie można edytować.",fieldRemoveWarning:"Czy na pewno chcesz usunąć to pole?",fileUpload:"Udostępnianie pliku",formUpdated:"Formularz zaktualizowany",getStarted:"Przeciągnij pole od prawej, aby rozpocząć.",group:"Grupa",grouped:"Pogrupowane",hidden:"Ukryte wejście",hide:"Edytować",htmlElements:"Elementy HTML",if:"Jeśli","if.condition.source.placeholder":"źródło","if.condition.target.placeholder":"wartość docelowa",info:"Informacje","input.date":"Data","input.text":"Tekst",label:"Etykieta",labelCount:"{label} {count}",labelEmpty:"Etykieta pola nie może być pusta","lang.af":"afrykanin","lang.ar":"arabski","lang.cs":"czeski","lang.de":"niemiecki","lang.en":"angielski","lang.es":"hiszpański","lang.fa":"perski","lang.fi":"fiński","lang.fr":"francuski","lang.he":"hebrajski","lang.hi":"hindi","lang.hu":"węgierski","lang.it":"włoski","lang.ja":"japoński","lang.nb":"Norweski bokmål","lang.pl":"Polski","lang.pt":"portugalski","lang.ro":"rumuński","lang.ru":"rosyjski","lang.th":"tajski","lang.tr":"turecki","lang.zh":"chiński",layout:"Układ",limitRole:"Ogranicz dostęp do jednej lub więcej następujących ról:",mandatory:"Obowiązkowy",maxlength:"Maksymalna długość","meta.group":"Grupa","meta.icon":"I co","meta.label":"Etykieta",minOptionMessage:"To pole wymaga co najmniej 2 opcji",name:"Imię",newOptionLabel:"Nowy typ}",no:"Nie",number:"Numer",off:"Poza",on:"Na","operator.contains":"zawiera","operator.equals":"równa się","operator.notContains":"nie zawiera","operator.notEquals":"nie równe","operator.notVisible":"niewidoczny","operator.visible":"widoczny",option:"Opcja",optional:"opcjonalny",optionEmpty:"Wymagana wartość opcji",optionLabel:"Opcja {count}",options:"Opcje",or:"lub",order:"Zamówienie","panel.label.attrs":"Atrybuty","panel.label.conditions":"Warunki","panel.label.config":"Konfiguracja","panel.label.meta":"Meta","panel.label.options":"Opcje","panelEditButtons.attrs":"+ Atrybut","panelEditButtons.conditions":"+ Stan","panelEditButtons.config":"+ Konfiguracja","panelEditButtons.options":"+ Opcja",placeholder:"Symbol zastępczy","placeholder.className":"klasy oddzielone spacjami","placeholder.email":"Podaj e-mail","placeholder.label":"Etykieta","placeholder.password":"Wprowadź hasło","placeholder.placeholder":"Symbol zastępczy","placeholder.text":"Wprowadź trochę tekstu","placeholder.textarea":"Wprowadź dużo tekstu","placeholder.value":"Wartość",preview:"Zapowiedź",primary:"Podstawowa",remove:"Usunąć",removeMessage:"Usuń element",removeType:"Usuń {type}",required:"wymagany",reset:"Nastawić",richText:"Bogaty edytor tekstu",roles:"Dostęp",row:"Rząd","row.makeInputGroup":"Ustaw ten wiersz jako grupę wejściową.","row.makeInputGroupDesc":"Grupy wejściowe umożliwiają użytkownikom dodawanie zestawów wejść naraz.","row.settings.fieldsetWrap":"Zwiń wiersz w & lt; fieldset & gt; etykietka","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset",save:"Zapisać",secondary:"Wtórny",select:"Wybierz",selectColor:"Wybierz kolor",selectionsMessage:"Zezwalaj na wiele wyborów",selectOptions:"Opcje",separator:"Separator",settings:"Ustawienia",size:"Rozmiar",sizes:"Rozmiary","sizes.lg":"Duży","sizes.m":"Domyślna","sizes.sm":"Mały","sizes.xs":"Bardzo mały",style:"Styl",styles:"Style","styles.btn":"Styl przycisku","styles.btn.danger":"Zagrożenie","styles.btn.default":"Domyślna","styles.btn.info":"Informacje","styles.btn.primary":"Podstawowa","styles.btn.success":"Powodzenie","styles.btn.warning":"Ostrzeżenie",subtype:"Rodzaj",success:"Powodzenie",text:"Pole tekstowe",then:"Następnie","then.condition.target.placeholder":"cel",toggle:"Przełącznik",ungrouped:"A-Zgrupowane",warning:"Ostrzeżenie",yes:"tak"},"pt-BR":{"pt-BR":"português (Brasil)",dir:"ltr","en-US":"Inglês","af-ZA":"africâner (África do Sul)","ar-TN":"árabe (Tunísia)","cs-CZ":"tcheco (Tchéquia)","de-DE":"alemão (Alemanha)","es-ES":"espanhol (Espanha)","fa-IR":"persa (Irã)","fi-FI":"finlandês (Finlândia)","fr-FR":"francês (França)","he-IL":"hebraico (Israel)","hi-IN":"híndi (Índia)","hu-HU":"húngaro (Hungria)","it-IT":"italiano (Itália)","ja-JP":"japonês (Japão)","nb-NO":"bokmål norueguês (Noruega)","pl-PL":"polonês (Polônia)","pt-PT":"português (Portugal)","ro-RO":"romeno (Romênia)","ru-RU":"russo (Rússia)","th-TH":"tailandês (Tailândia)","tr-TR":"turco (Turquia)","zh-CN":"chinês (China)","zh-HK":"chinês (Hong Kong, RAE da China)","action.add.attrs.attr":"Que atributo você gostaria de adicionar?","action.add.attrs.value":"Valor Padrão",addOption:"Adicionar opção",allFieldsRemoved:"Todos os campos foram removidos.",allowSelect:"Permitir Selecionar",and:"e",attribute:"Atributo",attributeNotPermitted:'O atributo "{attribute}" não é permitido, escolha outro.',attributes:"Atributos","attrs.class":"Aula","attrs.className":"Aula","attrs.dir":"Direção","attrs.id":"Eu ia","attrs.required":"Obrigatório","attrs.style":"Estilo","attrs.title":"Título","attrs.type":"Tipo","attrs.value":"Valor",autocomplete:"Preenchimento automático",button:"Botão",cancel:"Cancelar",cannotBeEmpty:"Este campo não pode estar vazio",cannotClearFields:"Não há campos para limpar",checkbox:"Caixa de seleção",checkboxes:"Caixas de seleção",class:"Aula",clear:"Claro",clearAllMessage:"Tem certeza de que deseja limpar todos os campos?",close:"Fechar",column:"Coluna","condition.target.placeholder":"alvo","condition.type.and":"E","condition.type.if":"Se","condition.type.or":"Ou","condition.type.then":"Então","condition.value.placeholder":"valor",confirmClearAll:"Tem certeza de que deseja remover todos os campos?",content:"Contente",control:"Controlar","controlGroups.nextGroup":"Próximo Grupo","controlGroups.prevGroup":"Grupo Anterior","controls.filteringTerm":'Filtrando "{term}"',"controls.form.button":"Botão","controls.form.checkbox-group":"Grupo de caixas de seleção","controls.form.input.date":"Data","controls.form.input.email":"E-mail","controls.form.input.file":"Upload de arquivo","controls.form.input.hidden":"Entrada Oculta","controls.form.input.number":"Número","controls.form.input.text":"Entrada de texto","controls.form.radio-group":"Grupo de Rádio","controls.form.select":"Selecione","controls.form.textarea":"Área de texto","controls.groups.form":"Campos de formulário","controls.groups.html":"Elementos HTML","controls.groups.layout":"Disposição","controls.html.divider":"Divisor","controls.html.header":"Cabeçalho","controls.html.paragraph":"Parágrafo","controls.layout.column":"Coluna","controls.layout.row":"Linha",copy:"Copiar para a área de transferência",danger:"Perigo",defineColumnLayout:"Definir um layout de coluna",defineColumnWidths:"Definir larguras de colunas",description:"Texto de ajuda",descriptionField:"Descrição","editing.row":"Linha de edição",editorTitle:"Elementos de formulário",field:"Campo","field.property.invalid":"não é válido","field.property.isChecked":"está verificado","field.property.isNotVisible":"não é visível","field.property.isVisible":"é visível","field.property.label":"rótulo","field.property.valid":"válido","field.property.value":"valor",fieldNonEditable:"Este campo não pode ser editado.",fieldRemoveWarning:"Tem certeza de que deseja remover este campo?",fileUpload:"Upload de arquivo",formUpdated:"Formulário Atualizado",getStarted:"Arraste um campo da direita para começar.",group:"Grupo",grouped:"Agrupado",hidden:"Entrada Oculta",hide:"Editar",htmlElements:"Elementos HTML",if:"Se","if.condition.source.placeholder":"fonte","if.condition.target.placeholder":"alvo / valor",info:"Informações","input.date":"Data","input.text":"Texto",label:"Rótulo",labelCount:"{rótulo} {contagem}",labelEmpty:"O rótulo do campo não pode estar vazio","lang.af":"africano","lang.ar":"árabe","lang.cs":"Checo","lang.de":"Alemão","lang.en":"Inglês","lang.es":"Espanhol","lang.fa":"persa","lang.fi":"finlandês","lang.fr":"Francês","lang.he":"hebraico","lang.hi":"híndi","lang.hu":"húngaro","lang.it":"italiano","lang.ja":"japonês","lang.nb":"Bokmål Norueguês","lang.pl":"polonês","lang.pt":"Português","lang.ro":"romeno","lang.ru":"russo","lang.th":"tailandês","lang.tr":"turco","lang.zh":"chinês",layout:"Disposição",limitRole:"Limite o acesso a uma ou mais das seguintes funções:",mandatory:"Obrigatório",maxlength:"Comprimento máximo","meta.group":"Grupo","meta.icon":"Icó","meta.label":"Rótulo",minOptionMessage:"Este campo requer um mínimo de 2 opções",name:"Nome",newOptionLabel:"Novo {tipo}",no:"Não",number:"Número",off:"Desligado",on:"Sobre","operator.contains":"contém","operator.equals":"é igual a","operator.notContains":"não contém","operator.notEquals":"não é igual","operator.notVisible":"não visível","operator.visible":"visível",option:"Opção",optional:"opcional",optionEmpty:"Valor da opção necessário",optionLabel:"Opção {count}",options:"Opções",or:"ou",order:"Ordem","panel.label.attrs":"Atributos","panel.label.conditions":"Condições","panel.label.config":"Configuração","panel.label.meta":"Meta","panel.label.options":"Opções","panelEditButtons.attrs":"+ Atributo","panelEditButtons.conditions":"+ Condição","panelEditButtons.config":"+ Configuração","panelEditButtons.options":"+ Opção",placeholder:"Espaço reservado","placeholder.className":"classes separadas por espaço","placeholder.email":"Digite seu e-mail","placeholder.label":"Rótulo","placeholder.password":"Digite sua senha","placeholder.placeholder":"Espaço reservado","placeholder.text":"Insira algum texto","placeholder.textarea":"Insira muito texto","placeholder.value":"Valor",preview:"Pré-visualização",primary:"Primário",remove:"Remover",removeMessage:"Remover Elemento",removeType:"Remover {tipo}",required:"Obrigatório",reset:"Reiniciar",richText:"Editor de texto rico",roles:"Acesso",row:"Linha","row.makeInputGroup":"Faça desta linha um grupo de entrada.","row.makeInputGroupDesc":"Grupos de entrada permitem que os usuários adicionem conjuntos de entradas por vez.","row.settings.fieldsetWrap":"Quebrar linha em uma tag &lt;fieldset&gt;","row.settings.fieldsetWrap.aria":"Quebrar linha em Fieldset",save:"Salvar",secondary:"Secundário",select:"Selecione",selectColor:"Selecione a cor",selectionsMessage:"Permitir Seleções Múltiplas",selectOptions:"Opções",separator:"Separador",settings:"Configurações",size:"Tamanho",sizes:"Tamanhos","sizes.lg":"Grande","sizes.m":"Padrão","sizes.sm":"Pequeno","sizes.xs":"Extra pequeno",style:"Estilo",styles:"Estilos","styles.btn":"Estilo de botão","styles.btn.danger":"Perigo","styles.btn.default":"Padrão","styles.btn.info":"Informações","styles.btn.primary":"Primário","styles.btn.success":"Sucesso","styles.btn.warning":"Aviso",subtype:"Tipo",success:"Sucesso",text:"Campo de texto",then:"Então","then.condition.target.placeholder":"alvo",toggle:"Alternar",ungrouped:"Desagrupado",warning:"Aviso",yes:"Sim"},"pt-PT":{"pt-PT":"português europeu",dir:"ltr","en-US":"Inglês","af-ZA":"africanês (África do Sul)","ar-TN":"árabe (Tunísia)","cs-CZ":"checo (Chéquia)","de-DE":"alemão (Alemanha)","es-ES":"espanhol europeu","fa-IR":"persa (Irão)","fi-FI":"finlandês (Finlândia)","fr-FR":"francês (França)","he-IL":"hebraico (Israel)","hi-IN":"hindi (Índia)","hu-HU":"húngaro (Hungria)","it-IT":"italiano (Itália)","ja-JP":"japonês (Japão)","nb-NO":"norueguês bokmål (Noruega)","pl-PL":"polaco (Polónia)","pt-BR":"português do Brasil","ro-RO":"romeno (Roménia)","ru-RU":"russo (Rússia)","th-TH":"tailandês (Tailândia)","tr-TR":"turco (Turquia)","zh-CN":"chinês (China)","zh-HK":"chinês (Hong Kong, RAE da China)","action.add.attrs.attr":"Que atributo você gostaria de adicionar?","action.add.attrs.value":"Valor Padrão",addOption:"Adicionar opção",allFieldsRemoved:"Todos os campos foram removidos.",allowSelect:"Permitir Selecionar",and:"e",attribute:"Atributo",attributeNotPermitted:'O atributo "{attribute}" não é permitido, escolha outro.',attributes:"Atributos","attrs.class":"Aula","attrs.className":"Aula","attrs.dir":"Direção","attrs.id":"Eu ia","attrs.required":"Obrigatório","attrs.style":"Estilo","attrs.title":"Título","attrs.type":"Tipo","attrs.value":"Valor",autocomplete:"Preenchimento automático",button:"Botão",cancel:"Cancelar",cannotBeEmpty:"Este campo não pode estar vazio",cannotClearFields:"Não há campos para limpar",checkbox:"Caixa de seleção",checkboxes:"Caixas de seleção",class:"Aula",clear:"Claro",clearAllMessage:"Tem certeza de que deseja limpar todos os campos?",close:"Fechar",column:"Coluna","condition.target.placeholder":"alvo","condition.type.and":"E","condition.type.if":"Se","condition.type.or":"Ou","condition.type.then":"Então","condition.value.placeholder":"valor",confirmClearAll:"Tem certeza de que deseja remover todos os campos?",content:"Contente",control:"Controlar","controlGroups.nextGroup":"Próximo Grupo","controlGroups.prevGroup":"Grupo Anterior","controls.filteringTerm":'Filtrando "{term}"',"controls.form.button":"Botão","controls.form.checkbox-group":"Grupo de caixas de seleção","controls.form.input.date":"Data","controls.form.input.email":"E-mail","controls.form.input.file":"Upload de arquivo","controls.form.input.hidden":"Entrada Oculta","controls.form.input.number":"Número","controls.form.input.text":"Entrada de texto","controls.form.radio-group":"Grupo de Rádio","controls.form.select":"Selecione","controls.form.textarea":"Área de texto","controls.groups.form":"Campos de formulário","controls.groups.html":"Elementos HTML","controls.groups.layout":"Disposição","controls.html.divider":"Divisor","controls.html.header":"Cabeçalho","controls.html.paragraph":"Parágrafo","controls.layout.column":"Coluna","controls.layout.row":"Linha",copy:"Copiar para a área de transferência",danger:"Perigo",defineColumnLayout:"Definir um layout de coluna",defineColumnWidths:"Definir larguras de colunas",description:"Texto de ajuda",descriptionField:"Descrição","editing.row":"Linha de edição",editorTitle:"Elementos de formulário",field:"Campo","field.property.invalid":"não é válido","field.property.isChecked":"está verificado","field.property.isNotVisible":"não é visível","field.property.isVisible":"é visível","field.property.label":"rótulo","field.property.valid":"válido","field.property.value":"valor",fieldNonEditable:"Este campo não pode ser editado.",fieldRemoveWarning:"Tem certeza de que deseja remover este campo?",fileUpload:"Upload de arquivo",formUpdated:"Formulário Atualizado",getStarted:"Arraste um campo da direita para começar.",group:"Grupo",grouped:"Agrupado",hidden:"Entrada Oculta",hide:"Editar",htmlElements:"Elementos HTML",if:"Se","if.condition.source.placeholder":"fonte","if.condition.target.placeholder":"alvo / valor",info:"Informações","input.date":"Data","input.text":"Texto",label:"Rótulo",labelCount:"{rótulo} {contagem}",labelEmpty:"O rótulo do campo não pode estar vazio","lang.af":"africano","lang.ar":"árabe","lang.cs":"Checo","lang.de":"Alemão","lang.en":"Inglês","lang.es":"Espanhol","lang.fa":"persa","lang.fi":"finlandês","lang.fr":"Francês","lang.he":"hebraico","lang.hi":"hindi","lang.hu":"húngaro","lang.it":"italiano","lang.ja":"japonês","lang.nb":"Bokmål Norueguês","lang.pl":"polonês","lang.pt":"Português","lang.ro":"romeno","lang.ru":"russo","lang.th":"tailandês","lang.tr":"turco","lang.zh":"chinês",layout:"Disposição",limitRole:"Limite o acesso a uma ou mais das seguintes funções:",mandatory:"Obrigatório",maxlength:"Comprimento máximo","meta.group":"Grupo","meta.icon":"Icó","meta.label":"Rótulo",minOptionMessage:"Este campo requer um mínimo de 2 opções",name:"Nome",newOptionLabel:"Novo {tipo}",no:"Não",number:"Número",off:"Desligado",on:"Sobre","operator.contains":"contém","operator.equals":"é igual a","operator.notContains":"não contém","operator.notEquals":"não é igual","operator.notVisible":"não visível","operator.visible":"visível",option:"Opção",optional:"opcional",optionEmpty:"Valor da opção necessário",optionLabel:"Opção {count}",options:"Opções",or:"ou",order:"Ordem","panel.label.attrs":"Atributos","panel.label.conditions":"Condições","panel.label.config":"Configuração","panel.label.meta":"Meta","panel.label.options":"Opções","panelEditButtons.attrs":"+ Atributo","panelEditButtons.conditions":"+ Condição","panelEditButtons.config":"+ Configuração","panelEditButtons.options":"+ Opção",placeholder:"Espaço reservado","placeholder.className":"classes separadas por espaço","placeholder.email":"Digite seu e-mail","placeholder.label":"Rótulo","placeholder.password":"Digite sua senha","placeholder.placeholder":"Espaço reservado","placeholder.text":"Insira algum texto","placeholder.textarea":"Insira muito texto","placeholder.value":"Valor",preview:"Pré-visualização",primary:"Primário",remove:"Remover",removeMessage:"Remover Elemento",removeType:"Remover {tipo}",required:"Obrigatório",reset:"Reiniciar",richText:"Editor de texto rico",roles:"Acesso",row:"Linha","row.makeInputGroup":"Faça desta linha um grupo de entrada.","row.makeInputGroupDesc":"Grupos de entrada permitem que os usuários adicionem conjuntos de entradas por vez.","row.settings.fieldsetWrap":"Quebrar linha em uma tag &lt;fieldset&gt;","row.settings.fieldsetWrap.aria":"Quebrar linha em Fieldset",save:"Salvar",secondary:"Secundário",select:"Selecione",selectColor:"Selecione a cor",selectionsMessage:"Permitir Seleções Múltiplas",selectOptions:"Opções",separator:"Separador",settings:"Configurações",size:"Tamanho",sizes:"Tamanhos","sizes.lg":"Grande","sizes.m":"Padrão","sizes.sm":"Pequeno","sizes.xs":"Extra pequeno",style:"Estilo",styles:"Estilos","styles.btn":"Estilo de botão","styles.btn.danger":"Perigo","styles.btn.default":"Padrão","styles.btn.info":"Informações","styles.btn.primary":"Primário","styles.btn.success":"Sucesso","styles.btn.warning":"Aviso",subtype:"Tipo",success:"Sucesso",text:"Campo de texto",then:"Então","then.condition.target.placeholder":"alvo",toggle:"Alternar",ungrouped:"Desagrupado",warning:"Aviso",yes:"Sim"},"ro-RO":{"ro-RO":"română (România)",dir:"ltr","en-US":"Engleză","af-ZA":"afrikaans (Africa de Sud)","ar-TN":"arabă (Tunisia)","cs-CZ":"cehă (Cehia)","de-DE":"germană (Germania)","es-ES":"spaniolă (Europa)","fa-IR":"persană (Iran)","fi-FI":"finlandeză (Finlanda)","fr-FR":"franceză (Franța)","he-IL":"ebraică (Israel)","hi-IN":"hindi (India)","hu-HU":"maghiară (Ungaria)","it-IT":"italiană (Italia)","ja-JP":"japoneză (Japonia)","nb-NO":"norvegiană bokmål (Norvegia)","pl-PL":"poloneză (Polonia)","pt-BR":"portugheză (Brazilia)","pt-PT":"portugheză (Europa)","ru-RU":"rusă (Rusia)","th-TH":"thailandeză (Thailanda)","tr-TR":"turcă (Turcia)","zh-CN":"chineză (China)","zh-HK":"chineză (R.A.S. Hong Kong, China)","action.add.attrs.attr":"Ce atribut ați dori să adăugați?","action.add.attrs.value":"Valoare implicită",addOption:"Adăugați opțiunea",allFieldsRemoved:"Toate câmpurile au fost eliminate.",allowSelect:"Permiteți selectarea",and:"și",attribute:"Atribut",attributeNotPermitted:'Atributul "{atribut}" nu este permis, vă rugăm să alegeți altul.',attributes:"atribute","attrs.class":"Clasă","attrs.className":"Clasă","attrs.dir":"Direcţie","attrs.id":"id-ul","attrs.required":"Necesar","attrs.style":"Stil","attrs.title":"Titlu","attrs.type":"Tip","attrs.value":"Valoare",autocomplete:"Completare automată",button:"Buton",cancel:"Anula",cannotBeEmpty:"Acest câmp nu poate fi gol",cannotClearFields:"Nu există câmpuri pentru a șterge",checkbox:"Caseta de bifat",checkboxes:"Casetele de selectare",class:"Clasă",clear:"clar",clearAllMessage:"Sigur doriți să ștergeți toate câmpurile?",close:"Închide",column:"Coloană","condition.target.placeholder":"ţintă","condition.type.and":"Şi","condition.type.if":"Dacă","condition.type.or":"Sau","condition.type.then":"Apoi","condition.value.placeholder":"valoare",confirmClearAll:"Sigur doriți să eliminați toate câmpurile?",content:"Conţinut",control:"Control","controlGroups.nextGroup":"Grupul următor","controlGroups.prevGroup":"Grupul anterior","controls.filteringTerm":'Filtrarea "{term}"',"controls.form.button":"Buton","controls.form.checkbox-group":"Grupul de verificare","controls.form.input.date":"Data","controls.form.input.email":"E-mail","controls.form.input.file":"Fișier încărcat","controls.form.input.hidden":"Intrare ascunsă","controls.form.input.number":"Număr","controls.form.input.text":"Introducerea textului","controls.form.radio-group":"Radio Group","controls.form.select":"Selectați","controls.form.textarea":"TextArea","controls.groups.form":"Câmpuri de formular","controls.groups.html":"Elementele HTML","controls.groups.layout":"schemă","controls.html.divider":"compas","controls.html.header":"Antet","controls.html.paragraph":"Paragraf","controls.layout.column":"Coloană","controls.layout.row":"Rând",copy:"Copiați în clipboard",danger:"Pericol",defineColumnLayout:"Definiți un aspect al coloanei",defineColumnWidths:"Definiți lățimea coloanelor",description:"Ajutați textul",descriptionField:"Descriere","editing.row":"Editare rând",editorTitle:"Elemente formale",field:"Camp","field.property.invalid":"invalid","field.property.isChecked":"este verificat","field.property.isNotVisible":"nu este vizibilă","field.property.isVisible":"este vizibil","field.property.label":"eticheta","field.property.valid":"valabil","field.property.value":"valoare",fieldNonEditable:"Acest câmp nu poate fi editat.",fieldRemoveWarning:"Sigur doriți să eliminați acest câmp?",fileUpload:"Fișier încărcat",formUpdated:"Formular actualizat",getStarted:"Glisați un câmp din dreapta pentru a începe.",group:"grup",grouped:"grupate",hidden:"Intrare ascunsă",hide:"Editați | ×",htmlElements:"Elementele HTML",if:"Dacă","if.condition.source.placeholder":"sursă","if.condition.target.placeholder":"țintă / valoare",info:"Info","input.date":"Data","input.text":"Text",label:"Eticheta",labelCount:"{label} {count}",labelEmpty:"Eticheta de câmp nu poate fi goală","lang.af":"african","lang.ar":"arabic","lang.cs":"ceh","lang.de":"german","lang.en":"engleză","lang.es":"spaniolă","lang.fa":"persană","lang.fi":"finlandeză","lang.fr":"franceză","lang.he":"ebraică","lang.hi":"hindi","lang.hu":"maghiară","lang.it":"italian","lang.ja":"japonez","lang.nb":"norvegiana bokmål","lang.pl":"Lustrui","lang.pt":"portugheză","lang.ro":"română","lang.ru":"rusă","lang.th":"thailandez","lang.tr":"turc","lang.zh":"chinez",layout:"schemă",limitRole:"Limitați accesul la unul sau mai multe dintre următoarele roluri:",mandatory:"Obligatoriu",maxlength:"Lungime maxima","meta.group":"grup","meta.icon":"Ico","meta.label":"Eticheta",minOptionMessage:"Acest câmp necesită minim 2 opțiuni",name:"Nume",newOptionLabel:"Tip nou}",no:"Nu",number:"Număr",off:"de pe",on:"Pe","operator.contains":"conține","operator.equals":"este egală","operator.notContains":"nu conține","operator.notEquals":"nu este egal","operator.notVisible":"nu este vizibil","operator.visible":"vizibil",option:"Opțiune",optional:"facultativ",optionEmpty:"Valoarea opțiunii necesară",optionLabel:"Opțiunea {count}",options:"Opțiuni",or:"sau",order:"Ordin","panel.label.attrs":"atribute","panel.label.conditions":"Condiții","panel.label.config":"configurație","panel.label.meta":"Meta","panel.label.options":"Opțiuni","panelEditButtons.attrs":"+ Atribut","panelEditButtons.conditions":"+ Condiție","panelEditButtons.config":"+ Configurare","panelEditButtons.options":"+ Opțiune",placeholder:"Substitut","placeholder.className":"spații separate","placeholder.email":"Introdu adresa de email","placeholder.label":"Eticheta","placeholder.password":"Introduceți parola","placeholder.placeholder":"Substitut","placeholder.text":"Introduceți un text","placeholder.textarea":"Introduceți o mulțime de text","placeholder.value":"Valoare",preview:"previzualizare",primary:"Primar",remove:"Elimina",removeMessage:"Eliminați elementul",removeType:"Eliminați {type}",required:"Necesar",reset:"restabili",richText:"Editor text îmbogățit",roles:"Acces",row:"Rând","row.makeInputGroup":"Faceți acest rând un grup de intrare.","row.makeInputGroupDesc":"Grupurile de intrare permit utilizatorilor să adauge seturi de intrări la un moment dat.","row.settings.fieldsetWrap":"Înfășurați rândul într-un & lt; fieldset & gt; etichetă","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset",save:"Salvați",secondary:"Secundar",select:"Selectați",selectColor:"Selectați Culoare",selectionsMessage:"Permiteți mai multe selecții",selectOptions:"Opțiuni",separator:"Separator",settings:"Setări",size:"mărimea",sizes:"Dimensiuni","sizes.lg":"Mare","sizes.m":"Mod implicit","sizes.sm":"Mic","sizes.xs":"Extra mic",style:"Stil",styles:"stiluri","styles.btn":"Butonul de stil","styles.btn.danger":"Pericol","styles.btn.default":"Mod implicit","styles.btn.info":"Info","styles.btn.primary":"Primar","styles.btn.success":"Succes","styles.btn.warning":"Avertizare",subtype:"Tip",success:"Succes",text:"Câmp de text",then:"Atunci","then.condition.target.placeholder":"ţintă",toggle:"Comutare",ungrouped:"A-Grupate",warning:"Avertizare",yes:"da"},"ru-RU":{"ru-RU":"русский (Россия)",dir:"ltr","en-US":"английский","af-ZA":"африкаанс (Южно-Африканская Республика)","ar-TN":"арабский (Тунис)","cs-CZ":"чешский (Чехия)","de-DE":"немецкий (Германия)","es-ES":"европейский испанский","fa-IR":"персидский (Иран)","fi-FI":"финский (Финляндия)","fr-FR":"французский (Франция)","he-IL":"иврит (Израиль)","hi-IN":"хинди (Индия)","hu-HU":"венгерский (Венгрия)","it-IT":"итальянский (Италия)","ja-JP":"японский (Япония)","nb-NO":"норвежский букмол (Норвегия)","pl-PL":"польский (Польша)","pt-BR":"бразильский португальский","pt-PT":"европейский португальский","ro-RO":"румынский (Румыния)","th-TH":"тайский (Таиланд)","tr-TR":"турецкий (Турция)","zh-CN":"китайский (Китай)","zh-HK":"китайский (Гонконг [САР])","action.add.attrs.attr":"Какой атрибут вы хотели бы добавить?","action.add.attrs.value":"Значение по умолчанию",addOption:"Добавить опцию",allFieldsRemoved:"Все поля были удалены.",allowSelect:"Разрешить выбор",and:"а также",attribute:"атрибут",attributeNotPermitted:"Атрибут «{attribute}» не разрешен, выберите другой.",attributes:"Атрибуты","attrs.class":"Учебный класс","attrs.className":"Учебный класс","attrs.dir":"направление","attrs.id":"Я бы","attrs.required":"необходимые","attrs.style":"Стиль","attrs.title":"заглавие","attrs.type":"Тип","attrs.value":"Значение",autocomplete:"Автозаполнение",button:"кнопка",cancel:"Отмена",cannotBeEmpty:"Это поле не может быть пустым",cannotClearFields:"Нет полей для очистки",checkbox:"флажок",checkboxes:"Флажки",class:"Учебный класс",clear:"Очистить",clearAllMessage:"Вы уверены, что хотите очистить все поля?",close:"близко",column:"колонка","condition.target.placeholder":"цель","condition.type.and":"И","condition.type.if":"Если","condition.type.or":"Или","condition.type.then":"Затем","condition.value.placeholder":"значение",confirmClearAll:"Вы действительно хотите удалить все поля?",content:"содержание",control:"контроль","controlGroups.nextGroup":"Следующая группа","controlGroups.prevGroup":"Предыдущая группа","controls.filteringTerm":'Фильтрация "{term}"',"controls.form.button":"кнопка","controls.form.checkbox-group":"Группа флажков","controls.form.input.date":"Дата","controls.form.input.email":"Эл. адрес","controls.form.input.file":"Файл загружен","controls.form.input.hidden":"Скрытый ввод","controls.form.input.number":"Число","controls.form.input.text":"Ввод текста","controls.form.radio-group":"Радиогруппа","controls.form.select":"Выбрать","controls.form.textarea":"TextArea","controls.groups.form":"Поля формы","controls.groups.html":"Элементы HTML","controls.groups.layout":"раскладка","controls.html.divider":"делитель","controls.html.header":"заголовок","controls.html.paragraph":"Параграф","controls.layout.column":"колонка","controls.layout.row":"Строка",copy:"Скопировать в буфер обмена",danger:"Опасность",defineColumnLayout:"Определение расположения столбца",defineColumnWidths:"Определение ширины столбцов",description:"Текст справки",descriptionField:"Описание","editing.row":"Редактирование строки",editorTitle:"Элементы формы",field:"поле","field.property.invalid":"недействительный","field.property.isChecked":"проверено","field.property.isNotVisible":"не видно","field.property.isVisible":"видно","field.property.label":"этикетка","field.property.valid":"действительный","field.property.value":"значение",fieldNonEditable:"Это поле невозможно отредактировать.",fieldRemoveWarning:"Вы действительно хотите удалить это поле?",fileUpload:"Файл загружен",formUpdated:"Форма обновлена",getStarted:"Для начала перетащите поле справа.",group:"группа",grouped:"Сгруппированные",hidden:"Скрытый ввод",hide:"редактировать",htmlElements:"Элементы HTML",if:"Если","if.condition.source.placeholder":"источник","if.condition.target.placeholder":"целевое значение",info:"Информация","input.date":"Дата","input.text":"Текст",label:"этикетка",labelCount:"{label} {count}",labelEmpty:"Полевая метка не может быть пуста","lang.af":"Африканский","lang.ar":"арабский","lang.cs":"чешский","lang.de":"немецкий","lang.en":"Английский","lang.es":"испанский","lang.fa":"персидский","lang.fi":"финский","lang.fr":"Французский","lang.he":"иврит","lang.hi":"хинди","lang.hu":"венгерский","lang.it":"итальянский","lang.ja":"японский","lang.nb":"Норвежский букмол","lang.pl":"польский","lang.pt":"португальский","lang.ro":"румынский","lang.ru":"Русский","lang.th":"тайский","lang.tr":"турецкий","lang.zh":"китайский",layout:"раскладка",limitRole:"Ограничить доступ к одной или нескольким из следующих ролей:",mandatory:"Обязательный",maxlength:"Максимальная длина","meta.group":"группа","meta.icon":"Ico","meta.label":"этикетка",minOptionMessage:"Для этого поля требуется минимум 2 варианта",name:"название",newOptionLabel:"Новый {type}",no:"нет",number:"Число",off:"от",on:"На","operator.contains":"содержит","operator.equals":"равняется","operator.notContains":"не содержит","operator.notEquals":"не равный","operator.notVisible":"невидимый","operator.visible":"видимый",option:"вариант",optional:"необязательный",optionEmpty:"Требуемое значение параметра",optionLabel:"Вариант {count}",options:"Опции",or:"или же",order:"порядок","panel.label.attrs":"Атрибуты","panel.label.conditions":"условия","panel.label.config":"конфигурация","panel.label.meta":"Мета","panel.label.options":"Опции","panelEditButtons.attrs":"+ Атрибут","panelEditButtons.conditions":"+ Условие","panelEditButtons.config":"+ Конфигурация","panelEditButtons.options":"+ Вариант",placeholder:"Заполнитель","placeholder.className":"классы, разделенные пробелами","placeholder.email":"Введите адрес электронной почты","placeholder.label":"этикетка","placeholder.password":"Введите ваш пароль","placeholder.placeholder":"Заполнитель","placeholder.text":"Введите текст","placeholder.textarea":"Введите много текста","placeholder.value":"Значение",preview:"предварительный просмотр",primary:"первичный",remove:"Удалить",removeMessage:"Удалить элемент",removeType:"Удалить {type}",required:"необходимые",reset:"Сброс",richText:"Редактор Rich Text Editor",roles:"Доступ",row:"Строка","row.makeInputGroup":"Сделайте эту строку группой ввода.","row.makeInputGroupDesc":"Группы ввода позволяют пользователям добавлять наборы входов одновременно.","row.settings.fieldsetWrap":"Wrap row в & lt; fieldset & gt; тег","row.settings.fieldsetWrap.aria":"Wrap Row в Fieldset",save:"Сохранить",secondary:"второстепенный",select:"Выбрать",selectColor:"Выберите цвет",selectionsMessage:"Разрешить множественный выбор",selectOptions:"Опции",separator:"Разделитель",settings:"настройки",size:"Размер",sizes:"Размеры","sizes.lg":"большой","sizes.m":"По умолчанию","sizes.sm":"Маленький","sizes.xs":"Очень маленький",style:"Стиль",styles:"Стили","styles.btn":"Стиль кнопки","styles.btn.danger":"Опасность","styles.btn.default":"По умолчанию","styles.btn.info":"Информация","styles.btn.primary":"первичный","styles.btn.success":"успех","styles.btn.warning":"Предупреждение",subtype:"Тип",success:"успех",text:"Текстовое поле",then:"затем","then.condition.target.placeholder":"цель",toggle:"тумблер",ungrouped:"A-Сгруппированные",warning:"Предупреждение",yes:"да"},"th-TH":{"th-TH":"ไทย (ไทย)",dir:"ltr","en-US":"ภาษาอังกฤษ","af-ZA":"แอฟริกานส์ (แอฟริกาใต้)","ar-TN":"อาหรับ (ตูนิเซีย)","cs-CZ":"เช็ก (เช็ก)","de-DE":"เยอรมัน (เยอรมนี)","es-ES":"สเปน - ยุโรป","fa-IR":"เปอร์เซีย (อิหร่าน)","fi-FI":"ฟินแลนด์ (ฟินแลนด์)","fr-FR":"ฝรั่งเศส (ฝรั่งเศส)","he-IL":"ฮิบรู (อิสราเอล)","hi-IN":"ฮินดี (อินเดีย)","hu-HU":"ฮังการี (ฮังการี)","it-IT":"อิตาลี (อิตาลี)","ja-JP":"ญี่ปุ่น (ญี่ปุ่น)","nb-NO":"นอร์เวย์บุคมอล (นอร์เวย์)","pl-PL":"โปแลนด์ (โปแลนด์)","pt-BR":"โปรตุเกส - บราซิล","pt-PT":"โปรตุเกส - ยุโรป","ro-RO":"โรมาเนีย (โรมาเนีย)","ru-RU":"รัสเซีย (รัสเซีย)","tr-TR":"ตุรกี (ตุรกี)","zh-CN":"จีน (จีน)","zh-HK":"จีน (เขตปกครองพิเศษฮ่องกงแห่งสาธารณรัฐประชาชนจีน)","action.add.attrs.attr":"คุณต้องการเพิ่มคุณสมบัติใด?","action.add.attrs.value":"ค่าเริ่มต้น",addOption:"เพิ่มตัวเลือก",allFieldsRemoved:"ลบข้อมูลทุกช่องออกแล้ว",allowSelect:"อนุญาตให้เลือก",and:"และ",attribute:"คุณลักษณะ",attributeNotPermitted:'ไม่อนุญาตให้ใช้แอตทริบิวต์ "{attribute}" โปรดเลือกแอตทริบิวต์อื่น',attributes:"คุณสมบัติ","attrs.class":"ระดับ","attrs.className":"ระดับ","attrs.dir":"ทิศทาง","attrs.id":"รหัส","attrs.required":"ที่จำเป็น","attrs.style":"สไตล์","attrs.title":"ชื่อ","attrs.type":"พิมพ์","attrs.value":"ค่า",autocomplete:"การกรอกอัตโนมัติ",button:"ปุ่ม",cancel:"ยกเลิก",cannotBeEmpty:"ฟิลด์นี้ไม่สามารถว่างเปล่าได้",cannotClearFields:"ไม่มีช่องที่ต้องล้างข้อมูล",checkbox:"ช่องกาเครื่องหมาย",checkboxes:"ช่องกาเครื่องหมาย",class:"ระดับ",clear:"ชัดเจน",clearAllMessage:"คุณแน่ใจว่าต้องการล้างข้อมูลทั้งหมดหรือไม่?",close:"ปิด",column:"คอลัมน์","condition.target.placeholder":"เป้า","condition.type.and":"และ","condition.type.if":"ถ้า","condition.type.or":"หรือ","condition.type.then":"แล้ว","condition.value.placeholder":"ค่า",confirmClearAll:"คุณแน่ใจว่าต้องการลบข้อมูลทั้งหมดหรือไม่?",content:"เนื้อหา",control:"ควบคุม","controlGroups.nextGroup":"กลุ่มถัดไป","controlGroups.prevGroup":"กลุ่มก่อนหน้า","controls.filteringTerm":'การกรอง "{term}"',"controls.form.button":"ปุ่ม","controls.form.checkbox-group":"กลุ่มกล่องกาเครื่องหมาย","controls.form.input.date":"วันที่","controls.form.input.email":"อีเมล","controls.form.input.file":"อัพโหลดไฟล์","controls.form.input.hidden":"อินพุตที่ซ่อนอยู่","controls.form.input.number":"ตัวเลข","controls.form.input.text":"การป้อนข้อความ","controls.form.radio-group":"กลุ่มวิทยุ","controls.form.select":"เลือก","controls.form.textarea":"พื้นที่ข้อความ","controls.groups.form":"ฟิลด์ฟอร์ม","controls.groups.html":"องค์ประกอบ HTML","controls.groups.layout":"เค้าโครง","controls.html.divider":"ตัวคั่น","controls.html.header":"ส่วนหัว","controls.html.paragraph":"ย่อหน้า","controls.layout.column":"คอลัมน์","controls.layout.row":"แถว",copy:"คัดลอกไปยังคลิปบอร์ด",danger:"อันตราย",defineColumnLayout:"กำหนดเค้าโครงคอลัมน์",defineColumnWidths:"กำหนดความกว้างของคอลัมน์",description:"ข้อความช่วยเหลือ",descriptionField:"คำอธิบาย","editing.row":"การแก้ไขแถว",editorTitle:"องค์ประกอบแบบฟอร์ม",field:"สนาม","field.property.invalid":"ไม่ถูกต้อง","field.property.isChecked":"ได้รับการตรวจสอบแล้ว","field.property.isNotVisible":"มองไม่เห็น","field.property.isVisible":"สามารถมองเห็นได้","field.property.label":"ฉลาก","field.property.valid":"ถูกต้อง","field.property.value":"ค่า",fieldNonEditable:"ไม่สามารถแก้ไขฟิลด์นี้ได้",fieldRemoveWarning:"คุณแน่ใจว่าต้องการลบฟิลด์นี้หรือไม่?",fileUpload:"อัพโหลดไฟล์",formUpdated:"แบบฟอร์มอัปเดต",getStarted:"ลากฟิลด์จากด้านขวาเพื่อเริ่มต้น",group:"กลุ่ม",grouped:"การจัดกลุ่ม",hidden:"อินพุตที่ซ่อนอยู่",hide:"แก้ไข",htmlElements:"องค์ประกอบ HTML",if:"ถ้า","if.condition.source.placeholder":"แหล่งที่มา","if.condition.target.placeholder":"เป้าหมาย / มูลค่า",info:"ข้อมูล","input.date":"วันที่","input.text":"ข้อความ",label:"ฉลาก",labelCount:"{ป้าย} {จำนวน}",labelEmpty:"ป้ายชื่อฟิลด์ไม่สามารถว่างเปล่าได้","lang.af":"แอฟริกัน","lang.ar":"ภาษาอาหรับ","lang.cs":"เช็ก","lang.de":"เยอรมัน","lang.en":"ภาษาอังกฤษ","lang.es":"สเปน","lang.fa":"เปอร์เซีย","lang.fi":"ฟินแลนด์","lang.fr":"ภาษาฝรั่งเศส","lang.he":"ฮิบรู","lang.hi":"ฮินดี","lang.hu":"ฮังการี","lang.it":"อิตาลี","lang.ja":"ญี่ปุ่น","lang.nb":"นอร์เวย์บุคมอล","lang.pl":"ขัด","lang.pt":"โปรตุเกส","lang.ro":"โรมาเนีย","lang.ru":"รัสเซีย","lang.th":"แบบไทย","lang.tr":"ภาษาตุรกี","lang.zh":"ชาวจีน",layout:"เค้าโครง",limitRole:"จำกัดการเข้าถึงหนึ่งหรือมากกว่าหนึ่งบทบาทต่อไปนี้:",mandatory:"บังคับ",maxlength:"ความยาวสูงสุด","meta.group":"กลุ่ม","meta.icon":"ไอโค","meta.label":"ฉลาก",minOptionMessage:"ฟิลด์นี้จำเป็นต้องมีตัวเลือกอย่างน้อย 2 ตัวเลือก",name:"ชื่อ",newOptionLabel:"ใหม่ {ประเภท}",no:"เลขที่",number:"ตัวเลข",off:"ปิด",on:"บน","operator.contains":"ประกอบด้วย","operator.equals":"เท่ากับ","operator.notContains":"ไม่ประกอบด้วย","operator.notEquals":"ไม่เท่ากัน","operator.notVisible":"มองไม่เห็น","operator.visible":"มองเห็นได้",option:"ตัวเลือก",optional:"ไม่จำเป็น",optionEmpty:"ค่าตัวเลือกที่ต้องการ",optionLabel:"ตัวเลือก {จำนวน}",options:"ตัวเลือก",or:"หรือ",order:"คำสั่ง","panel.label.attrs":"คุณสมบัติ","panel.label.conditions":"เงื่อนไข","panel.label.config":"การกำหนดค่า","panel.label.meta":"เมต้า","panel.label.options":"ตัวเลือก","panelEditButtons.attrs":"+ คุณสมบัติ","panelEditButtons.conditions":"+ สภาพ","panelEditButtons.config":"+ การกำหนดค่า","panelEditButtons.options":"+ ตัวเลือก",placeholder:"ตัวแทน","placeholder.className":"การแบ่งชั้นเรียนแบบแยกพื้นที่","placeholder.email":"กรอกอีเมล์ของคุณ","placeholder.label":"ฉลาก","placeholder.password":"กรอกรหัสผ่านของคุณ","placeholder.placeholder":"ตัวแทน","placeholder.text":"ป้อนข้อความบางอย่าง","placeholder.textarea":"ใส่ข้อความจำนวนมาก","placeholder.value":"ค่า",preview:"ตัวอย่าง",primary:"หลัก",remove:"ลบ",removeMessage:"ลบองค์ประกอบ",removeType:"ลบ {type}",required:"ที่จำเป็น",reset:"รีเซ็ต",richText:"โปรแกรมแก้ไขข้อความแบบ Rich Text",roles:"เข้าถึง",row:"แถว","row.makeInputGroup":"สร้างแถวนี้เป็นกลุ่มอินพุต","row.makeInputGroupDesc":"กลุ่มอินพุตช่วยให้ผู้ใช้สามารถเพิ่มชุดอินพุตได้ในแต่ละครั้ง","row.settings.fieldsetWrap":"ห่อแถวในแท็ก &lt;fieldset&gt;","row.settings.fieldsetWrap.aria":"การห่อแถวใน Fieldset",save:"บันทึก",secondary:"มัธยมศึกษาตอนปลาย",select:"เลือก",selectColor:"เลือกสี",selectionsMessage:"อนุญาตให้เลือกได้หลายรายการ",selectOptions:"ตัวเลือก",separator:"ตัวคั่น",settings:"การตั้งค่า",size:"ขนาด",sizes:"ขนาด","sizes.lg":"ใหญ่","sizes.m":"ค่าเริ่มต้น","sizes.sm":"เล็ก","sizes.xs":"พิเศษเล็ก",style:"สไตล์",styles:"สไตล์","styles.btn":"รูปแบบปุ่ม","styles.btn.danger":"อันตราย","styles.btn.default":"ค่าเริ่มต้น","styles.btn.info":"ข้อมูล","styles.btn.primary":"หลัก","styles.btn.success":"ความสำเร็จ","styles.btn.warning":"คำเตือน",subtype:"พิมพ์",success:"ความสำเร็จ",text:"ช่องข้อความ",then:"แล้ว","then.condition.target.placeholder":"เป้า",toggle:"สลับ",ungrouped:"ยกเลิกการจัดกลุ่ม",warning:"คำเตือน",yes:"ใช่"},"tr-TR":{"tr-TR":"Türkçe (Türkiye)",dir:"ltr","en-US":"ingilizce","af-ZA":"Afrikaanca (Güney Afrika)","ar-TN":"Arapça (Tunus)","cs-CZ":"Çekçe (Çekya)","de-DE":"Almanca (Almanya)","es-ES":"Avrupa İspanyolcası","fa-IR":"Farsça (İran)","fi-FI":"Fince (Finlandiya)","fr-FR":"Fransızca (Fransa)","he-IL":"İbranice (İsrail)","hi-IN":"Hintçe (Hindistan)","hu-HU":"Macarca (Macaristan)","it-IT":"İtalyanca (İtalya)","ja-JP":"Japonca (Japonya)","nb-NO":"Norveççe Bokmål (Norveç)","pl-PL":"Lehçe (Polonya)","pt-BR":"Brezilya Portekizcesi","pt-PT":"Avrupa Portekizcesi","ro-RO":"Rumence (Romanya)","ru-RU":"Rusça (Rusya)","th-TH":"Tayca (Tayland)","zh-CN":"Çince (Çin)","zh-HK":"Çince (Çin Hong Kong ÖİB)","action.add.attrs.attr":"Hangi özelliği eklemek istersiniz?","action.add.attrs.value":"Varsayılan değer",addOption:"Seçenek ekle",allFieldsRemoved:"Tüm alanlar kaldırıldı.",allowSelect:"Seçime İzin Ver",and:"ve",attribute:"nitelik",attributeNotPermitted:'"{Attribute}" özelliğine izin verilmiyor, lütfen başka bir tane seçin.',attributes:"Öznitellikler","attrs.class":"Sınıf","attrs.className":"Sınıf","attrs.dir":"yön","attrs.id":"İD","attrs.required":"gereklidir","attrs.style":"stil","attrs.title":"Başlık","attrs.type":"tip","attrs.value":"değer",autocomplete:"Otomatik tamamlama",button:"Buton",cancel:"İptal etmek",cannotBeEmpty:"Bu alan boş olamaz",cannotClearFields:"Temizlenecek alan yok",checkbox:"Onay Kutusu",checkboxes:"Onay kutuları",class:"Sınıf",clear:"Açık",clearAllMessage:"Tüm alanları temizlemek istediğinden emin misin?",close:"Kapat",column:"sütun","condition.target.placeholder":"hedef","condition.type.and":"Ve","condition.type.if":"Eğer","condition.type.or":"Veya","condition.type.then":"Daha sonra","condition.value.placeholder":"değer",confirmClearAll:"Tüm alanları kaldırmak istediğinizden emin misiniz?",content:"içerik",control:"Kontrol","controlGroups.nextGroup":"Sonraki grup","controlGroups.prevGroup":"Önceki Grup","controls.filteringTerm":'"{Term}" filtrelemesi',"controls.form.button":"Buton","controls.form.checkbox-group":"Onay Kutusu Grubu","controls.form.input.date":"tarih","controls.form.input.email":"E-posta","controls.form.input.file":"Dosya yükleme","controls.form.input.hidden":"Gizli Giriş","controls.form.input.number":"Numara","controls.form.input.text":"Metin Girişi","controls.form.radio-group":"Radyo Grubu","controls.form.select":"seçmek","controls.form.textarea":"TextArea","controls.groups.form":"Form Alanları","controls.groups.html":"HTML Öğeleri","controls.groups.layout":"düzen","controls.html.divider":"bölen","controls.html.header":"Başlık","controls.html.paragraph":"Paragraf","controls.layout.column":"sütun","controls.layout.row":"Kürek çekmek",copy:"Panoya kopyala",danger:"Tehlike",defineColumnLayout:"Bir sütun düzeni tanımlayın",defineColumnWidths:"Sütun genişliklerini tanımla",description:"Yardım Metni",descriptionField:"Açıklama","editing.row":"Satırı Düzenleme",editorTitle:"Form Öğeleri",field:"Alan","field.property.invalid":"geçerli değil","field.property.isChecked":"kontrol edildi","field.property.isNotVisible":"görünür değil","field.property.isVisible":"görünür","field.property.label":"etiket","field.property.valid":"geçerli","field.property.value":"değer",fieldNonEditable:"Bu alan düzenlenemez.",fieldRemoveWarning:"Bu alanı kaldırmak istediğinizden emin misiniz?",fileUpload:"Dosya yükleme",formUpdated:"Form Güncelleme",getStarted:"Başlamak için bir alanı sağdan sürükleyin.",group:"grup",grouped:"gruplanmış",hidden:"Gizli Giriş",hide:"Düzenle",htmlElements:"HTML Öğeleri",if:"Eğer","if.condition.source.placeholder":"kaynak","if.condition.target.placeholder":"hedef değer",info:"Bilgi","input.date":"tarih","input.text":"Metin",label:"Etiket",labelCount:"{label} {count}",labelEmpty:"Saha Etiketi boş olamaz","lang.af":"Afrika","lang.ar":"Arapça","lang.cs":"Çek","lang.de":"Almanca","lang.en":"İngilizce","lang.es":"İspanyol","lang.fa":"Farsça","lang.fi":"Fince","lang.fr":"Fransızca","lang.he":"İbranice","lang.hi":"Hintçe","lang.hu":"Macarca","lang.it":"İtalyan","lang.ja":"Japonca","lang.nb":"Norveç Bokmål'ı","lang.pl":"Lehçe","lang.pt":"Portekizce","lang.ro":"Romence","lang.ru":"Rusça","lang.th":"Tayca","lang.tr":"Türkçe","lang.zh":"Çince",layout:"düzen",limitRole:"Aşağıdaki rollerden bir veya daha fazlasına erişimi sınırlayın:",mandatory:"Zorunlu",maxlength:"Maksimum uzunluk","meta.group":"grup","meta.icon":"ico","meta.label":"Etiket",minOptionMessage:"Bu alan en az 2 seçenek gerektirir",name:"isim",newOptionLabel:"Yeni tip}",no:"Yok hayır",number:"Numara",off:"kapalı",on:"üzerinde","operator.contains":"içeren","operator.equals":"eşittir","operator.notContains":"içermiyor","operator.notEquals":"eşit değil","operator.notVisible":"görünür değil","operator.visible":"gözle görülür",option:"seçenek",optional:"isteğe bağlı",optionEmpty:"Seçenek değeri gerekli",optionLabel:"Seçenek {count}",options:"Seçenekler",or:"veya",order:"Sipariş","panel.label.attrs":"Öznitellikler","panel.label.conditions":"Koşullar","panel.label.config":"Yapılandırma","panel.label.meta":"Meta","panel.label.options":"Seçenekler","panelEditButtons.attrs":"+ Özellik","panelEditButtons.conditions":"+ Durum","panelEditButtons.config":"+ Yapılandırma","panelEditButtons.options":"+ Seçenek",placeholder:"Yer tutucu","placeholder.className":"boşluk ayrılmış sınıflar","placeholder.email":"Size e-posta adresi","placeholder.label":"Etiket","placeholder.password":"Şifrenizi girin","placeholder.placeholder":"Yer tutucu","placeholder.text":"Bir metin girin","placeholder.textarea":"Çok fazla metin girin","placeholder.value":"değer",preview:"Ön izleme",primary:"Birincil",remove:"Kaldır",removeMessage:"Öğeyi Kaldır",removeType:"{Type} öğesini kaldır",required:"gereklidir",reset:"Reset",richText:"Zengin metin editörü",roles:"Erişim",row:"Kürek çekmek","row.makeInputGroup":"Bu satırı bir giriş grubu yapın.","row.makeInputGroupDesc":"Giriş Grupları, kullanıcıların bir kerede giriş setleri eklemesine olanak tanır.","row.settings.fieldsetWrap":"Satırı & lt; fieldset & gt; etiket","row.settings.fieldsetWrap.aria":"Fieldset'te Satır Sarma",save:"Kayıt etmek",secondary:"İkincil",select:"seçmek",selectColor:"Renk seç",selectionsMessage:"Birden Çok Seçime İzin Ver",selectOptions:"Seçenekler",separator:"Ayırıcı",settings:"Ayarlar",size:"Boyut",sizes:"Boyutları","sizes.lg":"Büyük","sizes.m":"Varsayılan","sizes.sm":"Küçük","sizes.xs":"Çok küçük",style:"stil",styles:"stiller","styles.btn":"Düğme Stili","styles.btn.danger":"Tehlike","styles.btn.default":"Varsayılan","styles.btn.info":"Bilgi","styles.btn.primary":"Birincil","styles.btn.success":"başarı","styles.btn.warning":"Uyarı",subtype:"tip",success:"başarı",text:"Metin alanı",then:"Sonra","then.condition.target.placeholder":"hedef",toggle:"geçiş",ungrouped:"A-Gruplanmış",warning:"Uyarı",yes:"Evet"},"zh-CN":{"zh-CN":"中文(中国)",dir:"ltr","en-US":"英语","af-ZA":"南非荷兰语(南非)","ar-TN":"阿拉伯语(突尼斯)","cs-CZ":"捷克语(捷克)","de-DE":"德语(德国)","es-ES":"欧洲西班牙语","fa-IR":"波斯语(伊朗)","fi-FI":"芬兰语(芬兰)","fr-FR":"法语(法国)","he-IL":"希伯来语(以色列)","hi-IN":"印地语(印度)","hu-HU":"匈牙利语(匈牙利)","it-IT":"意大利语(意大利)","ja-JP":"日语(日本)","nb-NO":"书面挪威语(挪威)","pl-PL":"波兰语(波兰)","pt-BR":"巴西葡萄牙语","pt-PT":"欧洲葡萄牙语","ro-RO":"罗马尼亚语(罗马尼亚)","ru-RU":"俄语(俄罗斯)","th-TH":"泰语(泰国)","tr-TR":"土耳其语(土耳其)","zh-HK":"中文(中国香港特别行政区)","action.add.attrs.attr":"你想添加什么属性?","action.add.attrs.value":"默认值",addOption:"添加选项",allFieldsRemoved:"所有字段都已删除。",allowSelect:"允许选择",and:"和",attribute:"属性",attributeNotPermitted:"不允许使用属性“{attribute}”,请选择其他属性。",attributes:"属性","attrs.class":"类","attrs.className":"类","attrs.dir":"方向","attrs.id":"ID","attrs.required":"需要","attrs.style":"样式","attrs.title":"标题","attrs.type":"类型","attrs.value":"值",autocomplete:"自动完成",button:"按键",cancel:"取消",cannotBeEmpty:"此字段不能为空",cannotClearFields:"没有要清除的字段",checkbox:"复选框",checkboxes:"复选框",class:"类",clear:"明确",clearAllMessage:"您确定要清除所有字段吗?",close:"关",column:"柱","condition.target.placeholder":"目标","condition.type.and":"和","condition.type.if":"如果","condition.type.or":"或者","condition.type.then":"然后","condition.value.placeholder":"值",confirmClearAll:"您确定要删除所有字段吗?",content:"内容",control:"控制","controlGroups.nextGroup":"下一组","controlGroups.prevGroup":"上一组","controls.filteringTerm":"过滤“{term}”","controls.form.button":"按键","controls.form.checkbox-group":"复选框组","controls.form.input.date":"日期","controls.form.input.email":"电子邮件","controls.form.input.file":"上传文件","controls.form.input.hidden":"隐藏的输入","controls.form.input.number":"数","controls.form.input.text":"文字输入","controls.form.radio-group":"广播组","controls.form.select":"选择","controls.form.textarea":"文本区","controls.groups.form":"表格字段","controls.groups.html":"HTML元素","controls.groups.layout":"布局","controls.html.divider":"分频器","controls.html.header":"头","controls.html.paragraph":"段","controls.layout.column":"柱","controls.layout.row":"行",copy:"复制到剪贴板",danger:"危险",defineColumnLayout:"定义列布局",defineColumnWidths:"定义列宽",description:"帮助文字",descriptionField:"描述","editing.row":"编辑行",editorTitle:"表单元素",field:"领域","field.property.invalid":"无效","field.property.isChecked":"已检查","field.property.isNotVisible":"不可见","field.property.isVisible":"是可见的","field.property.label":"标签","field.property.valid":"有效","field.property.value":"值",fieldNonEditable:"此字段无法编辑。",fieldRemoveWarning:"您确定要删除此字段吗?",fileUpload:"上传文件",formUpdated:"表格更新",getStarted:"从右侧拖动一个字段即可开始使用。",group:"组",grouped:"分组",hidden:"隐藏的输入",hide:"编辑",htmlElements:"HTML元素",if:"如果","if.condition.source.placeholder":"资源","if.condition.target.placeholder":"目标价值",info:"信息","input.date":"日期","input.text":"文本",label:"标签",labelCount:"{label} {count}",labelEmpty:"字段标签不能为空","lang.af":"非洲人","lang.ar":"阿拉伯","lang.cs":"捷克语","lang.de":"德语","lang.en":"英语","lang.es":"西班牙语","lang.fa":"波斯语","lang.fi":"芬兰","lang.fr":"法语","lang.he":"希伯来语","lang.hi":"印地语","lang.hu":"匈牙利","lang.it":"意大利语","lang.ja":"日本人","lang.nb":"挪威博克马尔语","lang.pl":"抛光","lang.pt":"葡萄牙语","lang.ro":"罗马尼亚语","lang.ru":"俄语","lang.th":"泰国","lang.tr":"土耳其","lang.zh":"中国人",layout:"布局",limitRole:"限制对以下一个或多个角色的访问:",mandatory:"强制性",maxlength:"最长长度","meta.group":"组","meta.icon":"ICO","meta.label":"标签",minOptionMessage:"此字段至少需要2个选项",name:"名称",newOptionLabel:"新型}",no:"没有",number:"数",off:"离",on:"上","operator.contains":"包含","operator.equals":"等于","operator.notContains":"不包含","operator.notEquals":"不平等","operator.notVisible":"不可见","operator.visible":"可见",option:"选项",optional:"可选的",optionEmpty:"需要选项值",optionLabel:"选项{count}",options:"选项",or:"要么",order:"订购","panel.label.attrs":"属性","panel.label.conditions":"条件","panel.label.config":"组态","panel.label.meta":"元","panel.label.options":"选项","panelEditButtons.attrs":"+属性","panelEditButtons.conditions":"+条件","panelEditButtons.config":"+ 配置","panelEditButtons.options":"+选项",placeholder:"占位符","placeholder.className":"空间分隔的课程","placeholder.email":"输入您的电子邮件","placeholder.label":"标签","placeholder.password":"输入您的密码","placeholder.placeholder":"占位符","placeholder.text":"输入一些文字","placeholder.textarea":"输入大量文字","placeholder.value":"值",preview:"预习",primary:"主",remove:"去掉",removeMessage:"删除元素",removeType:"删除{type}",required:"需要",reset:"重启",richText:"富文本编辑器",roles:"访问",row:"行","row.makeInputGroup":"将此行设为输入组。","row.makeInputGroupDesc":"输入组使用户可以一次添加输入集。","row.settings.fieldsetWrap":"在&lt; fieldset&gt;中换行。标签","row.settings.fieldsetWrap.aria":"在Fieldset中换行",save:"保存",secondary:"次要",select:"选择",selectColor:"选择颜色",selectionsMessage:"允许多个选择",selectOptions:"选项",separator:"分隔器",settings:"设置",size:"尺寸",sizes:"尺寸","sizes.lg":"大","sizes.m":"默认","sizes.sm":"小","sizes.xs":"超小",style:"样式",styles:"样式","styles.btn":"按钮样式","styles.btn.danger":"危险","styles.btn.default":"默认","styles.btn.info":"信息","styles.btn.primary":"主","styles.btn.success":"成功","styles.btn.warning":"警告",subtype:"类型",success:"成功",text:"文本域",then:"然后","then.condition.target.placeholder":"目标",toggle:"切换",ungrouped:"A-分组",warning:"警告",yes:"是"},"zh-HK":{"zh-HK":"中文(中國香港特別行政區)",dir:"ltr","en-US":"英語","af-ZA":"南非荷蘭文(南非)","ar-TN":"阿拉伯文(突尼西亞)","cs-CZ":"捷克文(捷克)","de-DE":"德文(德國)","es-ES":"歐洲西班牙文","fa-IR":"波斯文(伊朗)","fi-FI":"芬蘭文(芬蘭)","fr-FR":"法文(法國)","he-IL":"希伯來文(以色列)","hi-IN":"印地文(印度)","hu-HU":"匈牙利文(匈牙利)","it-IT":"意大利文(意大利)","ja-JP":"日文(日本)","nb-NO":"巴克摩挪威文(挪威)","pl-PL":"波蘭文(波蘭)","pt-BR":"巴西葡萄牙文","pt-PT":"歐洲葡萄牙文","ro-RO":"羅馬尼亞文(羅馬尼亞)","ru-RU":"俄文(俄羅斯)","th-TH":"泰文(泰國)","tr-TR":"土耳其文(土耳其)","zh-CN":"中文(中國)","action.add.attrs.attr":"您想新增什麼屬性?","action.add.attrs.value":"預設值",addOption:"新增選項",allFieldsRemoved:"所有欄位均已刪除。",allowSelect:"允許選擇",and:"和",attribute:"屬性",attributeNotPermitted:"不允許使用屬性“{attribute}”,請選擇其他屬性。",attributes:"屬性","attrs.class":"班級","attrs.className":"班級","attrs.dir":"方向","attrs.id":"ID","attrs.required":"必需的","attrs.style":"風格","attrs.title":"標題","attrs.type":"類型","attrs.value":"價值",autocomplete:"自動完成",button:"按鈕",cancel:"取消",cannotBeEmpty:"該欄位不能為空",cannotClearFields:"沒有要清除的字段",checkbox:"複選框",checkboxes:"複選框",class:"班級",clear:"清除",clearAllMessage:"您確定要清除所有欄位嗎?",close:"關閉",column:"柱子","condition.target.placeholder":"目標","condition.type.and":"和","condition.type.if":"如果","condition.type.or":"或者","condition.type.then":"然後","condition.value.placeholder":"價值",confirmClearAll:"您確定要刪除所有欄位嗎?",content:"內容",control:"控制","controlGroups.nextGroup":"下一組","controlGroups.prevGroup":"上一組","controls.filteringTerm":"過濾“{term}”","controls.form.button":"按鈕","controls.form.checkbox-group":"複選框組","controls.form.input.date":"日期","controls.form.input.email":"電子郵件","controls.form.input.file":"文件上傳","controls.form.input.hidden":"隱藏輸入","controls.form.input.number":"數位","controls.form.input.text":"文字輸入","controls.form.radio-group":"無線電集團","controls.form.select":"選擇","controls.form.textarea":"文字區","controls.groups.form":"表單字段","controls.groups.html":"HTML 元素","controls.groups.layout":"佈局","controls.html.divider":"分音器","controls.html.header":"標頭","controls.html.paragraph":"段落","controls.layout.column":"柱子","controls.layout.row":"排",copy:"複製到剪貼簿",danger:"危險",defineColumnLayout:"定義列佈局",defineColumnWidths:"定義列寬",description:"幫助文本",descriptionField:"描述","editing.row":"編輯行",editorTitle:"表單元素",field:"場地","field.property.invalid":"無效","field.property.isChecked":"已檢查","field.property.isNotVisible":"不可見","field.property.isVisible":"是可見的","field.property.label":"標籤","field.property.valid":"有效的","field.property.value":"價值",fieldNonEditable:"該字段無法編輯。",fieldRemoveWarning:"您確定要刪除該欄位嗎?",fileUpload:"文件上傳",formUpdated:"表格已更新",getStarted:"從右側拖曳一個欄位即可開始。",group:"團體",grouped:"分組",hidden:"隱藏輸入",hide:"編輯",htmlElements:"HTML 元素",if:"如果","if.condition.source.placeholder":"來源","if.condition.target.placeholder":"目標/價值",info:"資訊","input.date":"日期","input.text":"文字",label:"標籤",labelCount:"{標籤} {計數}",labelEmpty:"字段標籤不能為空","lang.af":"非洲人","lang.ar":"阿拉伯","lang.cs":"捷克語","lang.de":"德文","lang.en":"英語","lang.es":"西班牙語","lang.fa":"波斯語","lang.fi":"芬蘭","lang.fr":"法語","lang.he":"希伯來文","lang.hi":"印地文","lang.hu":"匈牙利","lang.it":"義大利語","lang.ja":"日本人","lang.nb":"挪威博克馬爾語","lang.pl":"拋光","lang.pt":"葡萄牙語","lang.ro":"羅馬尼亞語","lang.ru":"俄文","lang.th":"泰國","lang.tr":"土耳其","lang.zh":"中國人",layout:"佈局",limitRole:"限制對以下一個或多個角色的存取:",mandatory:"強制的",maxlength:"最大長度","meta.group":"團體","meta.icon":"伊科","meta.label":"標籤",minOptionMessage:"該欄位至少需要 2 個選項",name:"姓名",newOptionLabel:"新型}",no:"不",number:"數位",off:"離開",on:"在","operator.contains":"包含","operator.equals":"等於","operator.notContains":"不包含","operator.notEquals":"不等於","operator.notVisible":"不可見","operator.visible":"可見的",option:"選項",optional:"選修的",optionEmpty:"所需選項值",optionLabel:"選項{計數}",options:"選項",or:"或者",order:"命令","panel.label.attrs":"屬性","panel.label.conditions":"狀況","panel.label.config":"配置","panel.label.meta":"元","panel.label.options":"選項","panelEditButtons.attrs":"+ 屬性","panelEditButtons.conditions":"+ 條件","panelEditButtons.config":"+ 配置","panelEditButtons.options":"+ 選項",placeholder:"佔位符","placeholder.className":"空間分隔的類別","placeholder.email":"輸入您的電子郵件","placeholder.label":"標籤","placeholder.password":"輸入您的密碼","placeholder.placeholder":"佔位符","placeholder.text":"輸入一些文字","placeholder.textarea":"輸入大量文字","placeholder.value":"價值",preview:"預覽",primary:"基本的",remove:"消除",removeMessage:"刪除元素",removeType:"刪除{類型}",required:"必需的",reset:"重置",richText:"富文本編輯器",roles:"使用權",row:"排","row.makeInputGroup":"使該行成為輸入組。","row.makeInputGroupDesc":"輸入群組使用戶能夠一次添加多組輸入。","row.settings.fieldsetWrap":"將行換行到 <fieldset> 中標籤","row.settings.fieldsetWrap.aria":"在 Fieldset 中換行",save:"節省",secondary:"中學",select:"選擇",selectColor:"選擇顏色",selectionsMessage:"允許多項選擇",selectOptions:"選項",separator:"分離器",settings:"設定",size:"尺寸",sizes:"尺寸","sizes.lg":"大的","sizes.m":"預設","sizes.sm":"小的","sizes.xs":"特小號",style:"風格",styles:"風格","styles.btn":"按鈕樣式","styles.btn.danger":"危險","styles.btn.default":"預設","styles.btn.info":"資訊","styles.btn.primary":"基本的","styles.btn.success":"成功","styles.btn.warning":"警告",subtype:"類型",success:"成功",text:"文字欄位",then:"然後","then.condition.target.placeholder":"目標",toggle:"切換",ungrouped:"未分組",warning:"警告",yes:"是的"}},mh=[te["af-ZA"],te["ar-TN"],te["cs-CZ"],te["de-DE"],te["en-US"],te["es-ES"],te["fa-IR"],te["fi-FI"],te["fr-FR"],te["he-IL"],te["hi-IN"],te["hu-HU"],te["it-IT"],te["ja-JP"],te["nb-NO"],te["pl-PL"],te["pt-BR"],te["pt-PT"],te["ro-RO"],te["ru-RU"],te["th-TH"],te["tr-TR"],te["zh-CN"],te["zh-HK"]];var vh=te["af-ZA"],yh=te["ar-TN"],bh=te["cs-CZ"],wh=te["de-DE"],vs=te["en-US"],Ch=te["es-ES"],Sh=te["fa-IR"],xh=te["fi-FI"],Eh=te["fr-FR"],Ah=te["he-IL"],kh=te["hi-IN"],Th=te["hu-HU"],Mh=te["it-IT"],$h=te["ja-JP"],Lh=te["nb-NO"],Rh=te["pl-PL"],_h=te["pt-BR"],Oh=te["pt-PT"],Ih=te["ro-RO"],Dh=te["ru-RU"],Nh=te["th-TH"],Fh=te["tr-TR"],zh=te["zh-CN"],Ph=te["zh-HK"];Object.freeze({method:"GET",body:""});var lr={extension:".lang",location:"assets/lang/",langs:["en-US"],locale:"en-US",override:{}},qt=null,Wr=new Proxy(class ii{constructor(i=lr){this.langs=Object.create(null),this.loaded=[],this.processConfig(i)}processConfig(i){const{location:t,...n}={...lr,...i},m=t.endsWith("/")?t:`${t}/`;this.config={location:m,...n};const{preloaded:f={},override:g={}}=this.config,c=new Set([...Object.keys(f),...Object.keys(g)]);for(const o of c){const h={...f[o]||{},...g[o]||{}};this.applyLanguage(o,h)}this.locale=this.config.locale||this.config.langs[0]}init(i){return this.processConfig({...this.config,...i}),this.setCurrent(this.locale)}addLanguage(i,t={}){t=typeof t=="string"?ii.processFile(t):t,this.applyLanguage(i,t),this.loaded.push(i),this.config.langs.push(i)}getValue(i,t=this.locale){return this.langs[t]?.[i]||this.getFallbackValue(i)}getFallbackValue(i){return Object.values(this.langs).find(t=>t[i])?.[i]}makeSafe(i){const t={"{":String.raw`\{`,"}":String.raw`\}`,"|":String.raw`\|`},n=i.replaceAll(/[{}|]/g,m=>t[m]);return new RegExp(n,"g")}put(i,t){return this.current[i]=t,t}get(i,t){let n=this.getValue(i);if(!n)return;if(!t)return n;const m=n.match(/\{[^}]+?\}/g);if(!m)return n;if(typeof t=="object")for(const f of m){const g=f.slice(1,-1);n=n.replace(this.makeSafe(f),t[g]??"")}else n=n.replaceAll(/\{[^}]+?\}/g,t);return n}static processFile(i){return Wr.fromFile(i.replaceAll(`
9
+
10
+ `,`
11
+ `))}static fromFile(i){const t=i.split(`
12
+ `),n={};for(let m,f=0;f<t.length;f++)m=/^(.+?) *?= *?([^\n]+)/.exec(t[f]),m&&(n[m[1]]=m[2].trim());return n}static getInstance(i){return qt||(qt=new ii(i)),qt}static resetInstance(){qt=null}async loadLang(i,t=!0){if(this.loaded.includes(i)&&t)return this.langs[i];const n=`${this.config.location}${i}${this.config.extension}`;try{const m=await(async function(g){try{const c=await fetch(g);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return await c[g.endsWith(".lang")?"text":"json"]()}catch(c){throw c}})(n),f=ii.processFile(m);return this.applyLanguage(i,f),this.langs[i]}catch{return this.applyLanguage(i)}}applyLanguage(i,t={}){const n=this.config.override[i]||{},m=this.langs[i]||{};return this.langs[i]={...m,...t,...n},this.loaded.push(i),this.langs[i]}get getLangs(){return this.config.langs}async setCurrent(i="en-US"){return this.loaded.includes(i)||await this.loadLang(i),this.locale=i,this.current=this.langs[i],this.current}},{apply:(e,i,t)=>e.getInstance(...t),construct:(e,i)=>new e(...i),get:(e,i)=>e[i]}),Z=Wr.getInstance();(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._3x4ZIcu-{position:absolute;background:#1f2937;color:#fff;padding:.75rem;border-radius:.375rem;max-width:200px;z-index:50;visibility:hidden;opacity:0;transition:opacity .2s;pointer-events:none;left:0;top:0}._3x4ZIcu-.JIt36hCJ{visibility:visible;opacity:1;pointer-events:all}._3x4ZIcu-:before{content:"";position:absolute;width:0;height:0;border:6px solid transparent}._3x4ZIcu-[data-position=top]:before{border-top-color:#1f2937;bottom:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=bottom]:before{border-bottom-color:#1f2937;top:-12px;left:50%;transform:translate(-50%)}._3x4ZIcu-[data-position=left]:before{border-left-color:#1f2937;right:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=right]:before{border-right-color:#1f2937;left:-12px;top:50%;transform:translateY(-50%)}._3x4ZIcu-[data-position=top-left]:before{border-top-color:#1f2937;bottom:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=top-right]:before{border-top-color:#1f2937;bottom:-12px;right:12px;left:auto;transform:none}._3x4ZIcu-[data-position=bottom-left]:before{border-bottom-color:#1f2937;top:-12px;left:12px;transform:none}._3x4ZIcu-[data-position=bottom-right]:before{border-bottom-color:#1f2937;top:-12px;right:12px;left:auto;transform:none}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();var ys=Object.defineProperty,bs=(e,i,t)=>i in e?ys(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,Fe=(e,i,t)=>bs(e,typeof i!="symbol"?i+"":i,t),Mt={tooltip:"_3x4ZIcu-",visible:"JIt36hCJ"},ws={triggerName:"tooltip"},Br=class gt{constructor(i=ws){Fe(this,"triggerName"),Fe(this,"tooltip"),Fe(this,"activeTriggerType",null),Fe(this,"spacing",12),Fe(this,"handleClick",t=>{const n=this.triggerName,m=t.target.closest(`[${n}][${n}-type="click"]`);if(m)if(this.isVisible())this.hide();else{const f=m.getAttribute(`${n}`);this.show(m,f),this.activeTriggerType="click"}else this.hide()}),Fe(this,"handleMouseOver",t=>{const n=this.triggerName,m=t.target.closest(`[${n}]`);if(this.activeTriggerType!=="click"&&m?.getAttribute(`${n}-type`)!=="click"){const f=m?.getAttribute(`${n}`);f&&(this.show(m,f),this.activeTriggerType="hover")}}),Fe(this,"handleMouseOut",t=>{const n=this.triggerName,m=t.target.closest(`[${n}]`);this.activeTriggerType!=="click"&&m?.getAttribute(`${n}-type`)!=="click"&&this.hide()}),Fe(this,"handleResize",()=>{this.isVisible()&&this.hide()}),Fe(this,"handleScroll",()=>{this.isVisible()&&this.hide()}),gt.instance&&gt.instance.destroy(),this.triggerName=`data-${i.triggerName}`,this.tooltip=document.createElement("div"),this.tooltip.className=`d-tooltip ${Mt.tooltip}`,document.body.appendChild(this.tooltip),this.setupEventListeners(),gt.instance=this}setupEventListeners(){document.addEventListener("mouseover",this.handleMouseOver),document.addEventListener("mouseout",this.handleMouseOut),document.addEventListener("touchstart",this.handleMouseOver),document.addEventListener("touchend",this.handleMouseOut),document.addEventListener("click",this.handleClick),globalThis.addEventListener("resize",this.handleResize),globalThis.addEventListener("scroll",this.handleScroll,!0)}isVisible(){return this.tooltip.classList.contains(Mt.visible)}calculatePosition(i){const t=i.getBoundingClientRect(),n=this.tooltip.getBoundingClientRect(),m=[{name:"top",x:t.left+(t.width-n.width)/2,y:t.top-n.height-this.spacing},{name:"bottom",x:t.left+(t.width-n.width)/2,y:t.bottom+this.spacing},{name:"left",x:t.left-n.width-this.spacing,y:t.top+(t.height-n.height)/2},{name:"right",x:t.right+this.spacing,y:t.top+(t.height-n.height)/2},{name:"top-left",x:t.left,y:t.top-n.height-this.spacing},{name:"top-right",x:t.right-n.width,y:t.top-n.height-this.spacing},{name:"bottom-left",x:t.left,y:t.bottom+this.spacing},{name:"bottom-right",x:t.right-n.width,y:t.bottom+this.spacing}];return m.find(f=>this.fitsInViewport(f,n))||m[0]}fitsInViewport(i,t){return i.x>=0&&i.y>=0&&i.x+t.width<=globalThis.innerWidth&&i.y+t.height<=globalThis.innerHeight?[[i.x,i.y],[i.x+t.width,i.y],[i.x,i.y+t.height],[i.x+t.width,i.y+t.height],[i.x+t.width/2,i.y+t.height/2]].flatMap(([n,m])=>Array.from(document.elementsFromPoint(n,m))).filter(n=>{if(this.tooltip.contains(n)||n===this.tooltip||n.classList.contains(Mt.tooltip)||getComputedStyle(n).pointerEvents==="none")return!1}).length===0:!1}show(i,t){this.tooltip.innerHTML=t??"",this.tooltip.classList.add(Mt.visible);const n=this.calculatePosition(i);this.tooltip.style.left=`${n.x}px`,this.tooltip.style.top=`${n.y}px`,this.tooltip.dataset.position=n.name}hide(){this.tooltip.classList.remove(Mt.visible),this.activeTriggerType=null}destroy(){document.removeEventListener("mouseover",this.handleMouseOver),document.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("touchstart",this.handleMouseOver),document.removeEventListener("touchend",this.handleMouseOut),document.removeEventListener("click",this.handleClick),globalThis.removeEventListener("resize",this.handleResize),globalThis.removeEventListener("scroll",this.handleScroll,!0),this.tooltip.remove(),gt.instance===this&&(gt.instance=null)}};Fe(Br,"instance",null);var jr=Br;globalThis!==void 0&&(globalThis.SmartTooltip=jr);var Cs="formeo",Ss="5.0.2",xs="module",Es="dist/formeo.cjs.js",As="dist/formeo.es.js",ks="dist/formeo.umd.js",Ts={".":{import:"./dist/formeo.es.js",require:"./dist/formeo.cjs.js",default:"./dist/formeo.umd.js"},"./dist/formeo.min.css":{import:"./dist/formeo.min.css",require:"./dist/formeo.min.css",default:"./dist/formeo.min.css"}},Ms=["dist/*","demo/**/*"],$s="https://formeo.io",Ls={url:"https://github.com/Draggable/formeo",type:"git"},Rs="Draggable https://draggable.io",_s=[{name:"Kevin Chappell",email:"kevin@chappell.dev",url:"https://kevin-chappell.com"}],Os={url:"https://github.com/draggable/formeo/issues"},Is="A zero dependency JavaScript module for drag and drop form creation.",Ds=["drag and drop","form builder","form maker","forms"];var Ns=["**/*","node_modules","test"],Fs={files:{test:["test/**/*.spec.js"],"formeo-editor":{js:"src/js/editor.js"},"formeo-renderer":{js:"src/js/renderer.js"},site:["demo/assets/sass/site.scss"]}},zs={dev:"NODE_ENV=development vite",preview:"vite preview","prebuild:lib":"rm -rf dist","build:lib":"npm-run-all -p build:lib:unminified build:lib:minified","build:lib:unminified":"vite build --config vite.config.lib.mjs --mode production","build:lib:minified":"vite build --config vite.config.lib.mjs --mode production-minified",build:"npm-run-all -p build:icons build:demo",prebuild:"npm run build:lib",postbuild:"npm run generate:jsonSchema","build:demo":"vite build --mode demo","postbuild:demo":"node --no-warnings tools/copy-assets.mjs","build:demo:watch":"vite build --mode demo --watch","build:icons":"node ./tools/generate-sprite",lint:"biome check ./src","lint:fix":"biome check --write ./src",format:"biome format --write .",test:"node --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:watch":"node --watch --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:updateSnapshots":"node --loader=./tools/svg-loader.mjs --import=./tools/__mocks__/sprite-init.mjs --experimental-test-snapshots --test-update-snapshots --require ./tools/test-setup.cjs --test --no-warnings src/**/*.test.{js,mjs}","test:ci":"npm test --coverage",start:"npm-run-all build:icons dev","semantic-release":"semantic-release --ci --debug","copy:lang":"node ./tools/copy-directory.mjs ./node_modules/formeo-i18n/dist/lang ./src/demo/assets/lang","travis-deploy-once":"travis-deploy-once --pro","playwright:test":"playwright test","playwright:test:ui":"playwright test --ui","playwright:test:report":"playwright show-report","playwright:test:ci":"playwright test --reporter=dot",prepush:"npm test",prepare:"lefthook install",postmerge:"lefthook install","generate:jsonSchema":"node --experimental-strip-types --no-warnings ./tools/generate-json-schema.ts"},Ps={"@biomejs/biome":"^2.3.3","@commitlint/cli":"^21.0.1","@commitlint/config-conventional":"^21.0.1","@playwright/test":"^1.49.1","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.8","@semantic-release/npm":"^13.1.3","@types/node":"^25.8.0","ace-builds":"^1.36.5",esbuild:"^0.28.0",jsdom:"^29.1.1",lefthook:"^2.1.6","npm-run-all":"^4.1.5","sass-embedded":"^1.80.1","semantic-release":"^25.0.2","svg-sprite":"^2.0.4",vite:"^8.0.13","vite-plugin-banner":"^0.8.0","vite-plugin-compression":"^0.5.1","vite-plugin-html":"^3.2.2",zod:"^4.4.3","zod-to-json-schema":"^3.23.5"},Hs={"@draggable/formeo-languages":"^3.4.1","@draggable/i18n":"^1.0.7","@draggable/tooltip":"^1.2.2",lodash:"^4.17.21",sortablejs:"^1.15.3"},Ws={branches:["main"],verifyConditions:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git","@semantic-release/github"],prepare:["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],publish:["@semantic-release/npm","@semantic-release/github"],success:["@semantic-release/github"],fail:["@semantic-release/github"]},Bs={extends:["@commitlint/config-conventional"],rules:{"type-enum":[2,"always",["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]]}},Vr={name:Cs,version:Ss,type:xs,main:Es,module:As,unpkg:ks,exports:Ts,files:Ms,homepage:$s,repository:Ls,author:Rs,contributors:_s,bugs:Os,description:Is,keywords:Ds,license:"MIT",ignore:Ns,config:Fs,scripts:zs,devDependencies:Ps,dependencies:Hs,release:Ws,commitlint:Bs},js=j(((e,i)=>{function t(){this.__data__=[],this.size=0}i.exports=t})),Vt=j(((e,i)=>{function t(n,m){return n===m||n!==n&&m!==m}i.exports=t})),Ei=j(((e,i)=>{var t=Vt();function n(m,f){for(var g=m.length;g--;)if(t(m[g][0],f))return g;return-1}i.exports=n})),Vs=j(((e,i)=>{var t=Ei(),n=Array.prototype.splice;function m(f){var g=this.__data__,c=t(g,f);return c<0?!1:(c==g.length-1?g.pop():n.call(g,c,1),--this.size,!0)}i.exports=m})),Us=j(((e,i)=>{var t=Ei();function n(m){var f=this.__data__,g=t(f,m);return g<0?void 0:f[g][1]}i.exports=n})),Gs=j(((e,i)=>{var t=Ei();function n(m){return t(this.__data__,m)>-1}i.exports=n})),Ks=j(((e,i)=>{var t=Ei();function n(m,f){var g=this.__data__,c=t(g,m);return c<0?(++this.size,g.push([m,f])):g[c][1]=f,this}i.exports=n})),Ai=j(((e,i)=>{var t=js(),n=Vs(),m=Us(),f=Gs(),g=Ks();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),qs=j(((e,i)=>{var t=Ai();function n(){this.__data__=new t,this.size=0}i.exports=n})),Ys=j(((e,i)=>{function t(n){var m=this.__data__,f=m.delete(n);return this.size=m.size,f}i.exports=t})),Zs=j(((e,i)=>{function t(n){return this.__data__.get(n)}i.exports=t})),Qs=j(((e,i)=>{function t(n){return this.__data__.has(n)}i.exports=t})),Ur=j(((e,i)=>{var t=typeof global=="object"&&global&&global.Object===Object&&global;i.exports=t})),Be=j(((e,i)=>{var t=Ur(),n=typeof self=="object"&&self&&self.Object===Object&&self,m=t||n||Function("return this")();i.exports=m})),ki=j(((e,i)=>{var t=Be().Symbol;i.exports=t})),Xs=j(((e,i)=>{var t=ki(),n=Object.prototype,m=n.hasOwnProperty,f=n.toString,g=t?t.toStringTag:void 0;function c(o){var h=m.call(o,g),u=o[g];try{o[g]=void 0;var d=!0}catch{}var l=f.call(o);return d&&(h?o[g]=u:delete o[g]),l}i.exports=c})),Js=j(((e,i)=>{var t=Object.prototype.toString;function n(m){return t.call(m)}i.exports=n})),At=j(((e,i)=>{var t=ki(),n=Xs(),m=Js(),f="[object Null]",g="[object Undefined]",c=t?t.toStringTag:void 0;function o(h){return h==null?h===void 0?g:f:c&&c in Object(h)?n(h):m(h)}i.exports=o})),et=j(((e,i)=>{function t(n){var m=typeof n;return n!=null&&(m=="object"||m=="function")}i.exports=t})),xn=j(((e,i)=>{var t=At(),n=et(),m="[object AsyncFunction]",f="[object Function]",g="[object GeneratorFunction]",c="[object Proxy]";function o(h){if(!n(h))return!1;var u=t(h);return u==f||u==g||u==m||u==c}i.exports=o})),ea=j(((e,i)=>{var t=Be()["__core-js_shared__"];i.exports=t})),ta=j(((e,i)=>{var t=ea(),n=(function(){var f=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""})();function m(f){return!!n&&n in f}i.exports=m})),Gr=j(((e,i)=>{var t=Function.prototype.toString;function n(m){if(m!=null){try{return t.call(m)}catch{}try{return m+""}catch{}}return""}i.exports=n})),ia=j(((e,i)=>{var t=xn(),n=ta(),m=et(),f=Gr(),g=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,o=Function.prototype,h=Object.prototype,u=o.toString,d=h.hasOwnProperty,l=RegExp("^"+u.call(d).replace(g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function s(r){return!m(r)||n(r)?!1:(t(r)?l:c).test(f(r))}i.exports=s})),na=j(((e,i)=>{function t(n,m){return n?.[m]}i.exports=t})),dt=j(((e,i)=>{var t=ia(),n=na();function m(f,g){var c=n(f,g);return t(c)?c:void 0}i.exports=m})),En=j(((e,i)=>{var t=dt()(Be(),"Map");i.exports=t})),Ti=j(((e,i)=>{var t=dt()(Object,"create");i.exports=t})),ra=j(((e,i)=>{var t=Ti();function n(){this.__data__=t?t(null):{},this.size=0}i.exports=n})),oa=j(((e,i)=>{function t(n){var m=this.has(n)&&delete this.__data__[n];return this.size-=m?1:0,m}i.exports=t})),sa=j(((e,i)=>{var t=Ti(),n="__lodash_hash_undefined__",m=Object.prototype.hasOwnProperty;function f(g){var c=this.__data__;if(t){var o=c[g];return o===n?void 0:o}return m.call(c,g)?c[g]:void 0}i.exports=f})),aa=j(((e,i)=>{var t=Ti(),n=Object.prototype.hasOwnProperty;function m(f){var g=this.__data__;return t?g[f]!==void 0:n.call(g,f)}i.exports=m})),la=j(((e,i)=>{var t=Ti(),n="__lodash_hash_undefined__";function m(f,g){var c=this.__data__;return this.size+=this.has(f)?0:1,c[f]=t&&g===void 0?n:g,this}i.exports=m})),ca=j(((e,i)=>{var t=ra(),n=oa(),m=sa(),f=aa(),g=la();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),da=j(((e,i)=>{var t=ca(),n=Ai(),m=En();function f(){this.size=0,this.__data__={hash:new t,map:new(m||n),string:new t}}i.exports=f})),ua=j(((e,i)=>{function t(n){var m=typeof n;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?n!=="__proto__":n===null}i.exports=t})),Mi=j(((e,i)=>{var t=ua();function n(m,f){var g=m.__data__;return t(f)?g[typeof f=="string"?"string":"hash"]:g.map}i.exports=n})),ha=j(((e,i)=>{var t=Mi();function n(m){var f=t(this,m).delete(m);return this.size-=f?1:0,f}i.exports=n})),pa=j(((e,i)=>{var t=Mi();function n(m){return t(this,m).get(m)}i.exports=n})),fa=j(((e,i)=>{var t=Mi();function n(m){return t(this,m).has(m)}i.exports=n})),ga=j(((e,i)=>{var t=Mi();function n(m,f){var g=t(this,m),c=g.size;return g.set(m,f),this.size+=g.size==c?0:1,this}i.exports=n})),An=j(((e,i)=>{var t=da(),n=ha(),m=pa(),f=fa(),g=ga();function c(o){var h=-1,u=o==null?0:o.length;for(this.clear();++h<u;){var d=o[h];this.set(d[0],d[1])}}c.prototype.clear=t,c.prototype.delete=n,c.prototype.get=m,c.prototype.has=f,c.prototype.set=g,i.exports=c})),ma=j(((e,i)=>{var t=Ai(),n=En(),m=An(),f=200;function g(c,o){var h=this.__data__;if(h instanceof t){var u=h.__data__;if(!n||u.length<f-1)return u.push([c,o]),this.size=++h.size,this;h=this.__data__=new m(u)}return h.set(c,o),this.size=h.size,this}i.exports=g})),Kr=j(((e,i)=>{var t=Ai(),n=qs(),m=Ys(),f=Zs(),g=Qs(),c=ma();function o(h){var u=this.__data__=new t(h);this.size=u.size}o.prototype.clear=n,o.prototype.delete=m,o.prototype.get=f,o.prototype.has=g,o.prototype.set=c,i.exports=o})),qr=j(((e,i)=>{var t=dt(),n=(function(){try{var m=t(Object,"defineProperty");return m({},"",{}),m}catch{}})();i.exports=n})),kn=j(((e,i)=>{var t=qr();function n(m,f,g){f=="__proto__"&&t?t(m,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):m[f]=g}i.exports=n})),Yr=j(((e,i)=>{var t=kn(),n=Vt();function m(f,g,c){(c!==void 0&&!n(f[g],c)||c===void 0&&!(g in f))&&t(f,g,c)}i.exports=m})),va=j(((e,i)=>{function t(n){return function(m,f,g){for(var c=-1,o=Object(m),h=g(m),u=h.length;u--;){var d=h[n?u:++c];if(f(o[d],d,o)===!1)break}return m}}i.exports=t})),ya=j(((e,i)=>{var t=va()();i.exports=t})),ba=j(((e,i)=>{var t=Be(),n=typeof e=="object"&&e&&!e.nodeType&&e,m=n&&typeof i=="object"&&i&&!i.nodeType&&i,f=m&&m.exports===n?t.Buffer:void 0,g=f?f.allocUnsafe:void 0;function c(o,h){if(h)return o.slice();var u=o.length,d=g?g(u):new o.constructor(u);return o.copy(d),d}i.exports=c})),Zr=j(((e,i)=>{var t=Be().Uint8Array;i.exports=t})),wa=j(((e,i)=>{var t=Zr();function n(m){var f=new m.constructor(m.byteLength);return new t(f).set(new t(m)),f}i.exports=n})),Ca=j(((e,i)=>{var t=wa();function n(m,f){var g=f?t(m.buffer):m.buffer;return new m.constructor(g,m.byteOffset,m.length)}i.exports=n})),Sa=j(((e,i)=>{function t(n,m){var f=-1,g=n.length;for(m||(m=Array(g));++f<g;)m[f]=n[f];return m}i.exports=t})),xa=j(((e,i)=>{var t=et(),n=Object.create,m=(function(){function f(){}return function(g){if(!t(g))return{};if(n)return n(g);f.prototype=g;var c=new f;return f.prototype=void 0,c}})();i.exports=m})),Qr=j(((e,i)=>{function t(n,m){return function(f){return n(m(f))}}i.exports=t})),Xr=j(((e,i)=>{var t=Qr()(Object.getPrototypeOf,Object);i.exports=t})),Tn=j(((e,i)=>{var t=Object.prototype;function n(m){var f=m&&m.constructor;return m===(typeof f=="function"&&f.prototype||t)}i.exports=n})),Ea=j(((e,i)=>{var t=xa(),n=Xr(),m=Tn();function f(g){return typeof g.constructor=="function"&&!m(g)?t(n(g)):{}}i.exports=f})),ut=j(((e,i)=>{function t(n){return n!=null&&typeof n=="object"}i.exports=t})),Aa=j(((e,i)=>{var t=At(),n=ut(),m="[object Arguments]";function f(g){return n(g)&&t(g)==m}i.exports=f})),Jr=j(((e,i)=>{var t=Aa(),n=ut(),m=Object.prototype,f=m.hasOwnProperty,g=m.propertyIsEnumerable,c=t((function(){return arguments})())?t:function(o){return n(o)&&f.call(o,"callee")&&!g.call(o,"callee")};i.exports=c})),ht=j(((e,i)=>{var t=Array.isArray;i.exports=t})),eo=j(((e,i)=>{var t=9007199254740991;function n(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=t}i.exports=n})),$i=j(((e,i)=>{var t=xn(),n=eo();function m(f){return f!=null&&n(f.length)&&!t(f)}i.exports=m})),ka=j(((e,i)=>{var t=$i(),n=ut();function m(f){return n(f)&&t(f)}i.exports=m})),Ta=j(((e,i)=>{function t(){return!1}i.exports=t})),Mn=j(((e,i)=>{var t=Be(),n=Ta(),m=typeof e=="object"&&e&&!e.nodeType&&e,f=m&&typeof i=="object"&&i&&!i.nodeType&&i,g=f&&f.exports===m?t.Buffer:void 0,c=(g?g.isBuffer:void 0)||n;i.exports=c})),Ma=j(((e,i)=>{var t=At(),n=Xr(),m=ut(),f="[object Object]",g=Function.prototype,c=Object.prototype,o=g.toString,h=c.hasOwnProperty,u=o.call(Object);function d(l){if(!m(l)||t(l)!=f)return!1;var s=n(l);if(s===null)return!0;var r=h.call(s,"constructor")&&s.constructor;return typeof r=="function"&&r instanceof r&&o.call(r)==u}i.exports=d})),$a=j(((e,i)=>{var t=At(),n=eo(),m=ut(),f="[object Arguments]",g="[object Array]",c="[object Boolean]",o="[object Date]",h="[object Error]",u="[object Function]",d="[object Map]",l="[object Number]",s="[object Object]",r="[object RegExp]",a="[object Set]",p="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",k="[object DataView]",x="[object Float32Array]",w="[object Float64Array]",S="[object Int8Array]",M="[object Int16Array]",L="[object Int32Array]",R="[object Uint8Array]",$="[object Uint8ClampedArray]",D="[object Uint16Array]",T="[object Uint32Array]",E={};E[x]=E[w]=E[S]=E[M]=E[L]=E[R]=E[$]=E[D]=E[T]=!0,E[f]=E[g]=E[y]=E[c]=E[k]=E[o]=E[h]=E[u]=E[d]=E[l]=E[s]=E[r]=E[a]=E[p]=E[v]=!1;function C(b){return m(b)&&n(b.length)&&!!E[t(b)]}i.exports=C})),La=j(((e,i)=>{function t(n){return function(m){return n(m)}}i.exports=t})),Ra=j(((e,i)=>{var t=Ur(),n=typeof e=="object"&&e&&!e.nodeType&&e,m=n&&typeof i=="object"&&i&&!i.nodeType&&i,f=m&&m.exports===n&&t.process,g=(function(){try{var c=m&&m.require&&m.require("util").types;return c||f&&f.binding&&f.binding("util")}catch{}})();i.exports=g})),$n=j(((e,i)=>{var t=$a(),n=La(),m=Ra(),f=m&&m.isTypedArray,g=f?n(f):t;i.exports=g})),to=j(((e,i)=>{function t(n,m){if(!(m==="constructor"&&typeof n[m]=="function")&&m!="__proto__")return n[m]}i.exports=t})),io=j(((e,i)=>{var t=kn(),n=Vt(),m=Object.prototype.hasOwnProperty;function f(g,c,o){var h=g[c];(!(m.call(g,c)&&n(h,o))||o===void 0&&!(c in g))&&t(g,c,o)}i.exports=f})),_a=j(((e,i)=>{var t=io(),n=kn();function m(f,g,c,o){var h=!c;c||(c={});for(var u=-1,d=g.length;++u<d;){var l=g[u],s=o?o(c[l],f[l],l,c,f):void 0;s===void 0&&(s=f[l]),h?n(c,l,s):t(c,l,s)}return c}i.exports=m})),Oa=j(((e,i)=>{function t(n,m){for(var f=-1,g=Array(n);++f<n;)g[f]=m(f);return g}i.exports=t})),Ln=j(((e,i)=>{var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function m(f,g){var c=typeof f;return g=g??t,!!g&&(c=="number"||c!="symbol"&&n.test(f))&&f>-1&&f%1==0&&f<g}i.exports=m})),no=j(((e,i)=>{var t=Oa(),n=Jr(),m=ht(),f=Mn(),g=Ln(),c=$n(),o=Object.prototype.hasOwnProperty;function h(u,d){var l=m(u),s=!l&&n(u),r=!l&&!s&&f(u),a=!l&&!s&&!r&&c(u),p=l||s||r||a,v=p?t(u.length,String):[],y=v.length;for(var k in u)(d||o.call(u,k))&&!(p&&(k=="length"||r&&(k=="offset"||k=="parent")||a&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||g(k,y)))&&v.push(k);return v}i.exports=h})),Ia=j(((e,i)=>{function t(n){var m=[];if(n!=null)for(var f in Object(n))m.push(f);return m}i.exports=t})),Da=j(((e,i)=>{var t=et(),n=Tn(),m=Ia(),f=Object.prototype.hasOwnProperty;function g(c){if(!t(c))return m(c);var o=n(c),h=[];for(var u in c)u=="constructor"&&(o||!f.call(c,u))||h.push(u);return h}i.exports=g})),ro=j(((e,i)=>{var t=no(),n=Da(),m=$i();function f(g){return m(g)?t(g,!0):n(g)}i.exports=f})),Na=j(((e,i)=>{var t=_a(),n=ro();function m(f){return t(f,n(f))}i.exports=m})),Fa=j(((e,i)=>{var t=Yr(),n=ba(),m=Ca(),f=Sa(),g=Ea(),c=Jr(),o=ht(),h=ka(),u=Mn(),d=xn(),l=et(),s=Ma(),r=$n(),a=to(),p=Na();function v(y,k,x,w,S,M,L){var R=a(y,x),$=a(k,x),D=L.get($);if(D){t(y,x,D);return}var T=M?M(R,$,x+"",y,k,L):void 0,E=T===void 0;if(E){var C=o($),b=!C&&u($),A=!C&&!b&&r($);T=$,C||b||A?o(R)?T=R:h(R)?T=f(R):b?(E=!1,T=n($,!0)):A?(E=!1,T=m($,!0)):T=[]:s($)||c($)?(T=R,c(R)?T=p(R):(!l(R)||d(R))&&(T=g($))):E=!1}E&&(L.set($,T),S(T,$,w,M,L),L.delete($)),t(y,x,T)}i.exports=v})),za=j(((e,i)=>{var t=Kr(),n=Yr(),m=ya(),f=Fa(),g=et(),c=ro(),o=to();function h(u,d,l,s,r){u!==d&&m(d,function(a,p){if(r||(r=new t),g(a))f(u,d,p,l,h,s,r);else{var v=s?s(o(u,p),a,p+"",u,d,r):void 0;v===void 0&&(v=a),n(u,p,v)}},c)}i.exports=h})),oo=j(((e,i)=>{function t(n){return n}i.exports=t})),Pa=j(((e,i)=>{function t(n,m,f){switch(f.length){case 0:return n.call(m);case 1:return n.call(m,f[0]);case 2:return n.call(m,f[0],f[1]);case 3:return n.call(m,f[0],f[1],f[2])}return n.apply(m,f)}i.exports=t})),Ha=j(((e,i)=>{var t=Pa(),n=Math.max;function m(f,g,c){return g=n(g===void 0?f.length-1:g,0),function(){for(var o=arguments,h=-1,u=n(o.length-g,0),d=Array(u);++h<u;)d[h]=o[g+h];h=-1;for(var l=Array(g+1);++h<g;)l[h]=o[h];return l[g]=c(d),t(f,this,l)}}i.exports=m})),Wa=j(((e,i)=>{function t(n){return function(){return n}}i.exports=t})),Ba=j(((e,i)=>{var t=Wa(),n=qr(),m=oo(),f=n?function(g,c){return n(g,"toString",{configurable:!0,enumerable:!1,value:t(c),writable:!0})}:m;i.exports=f})),ja=j(((e,i)=>{var t=800,n=16,m=Date.now;function f(g){var c=0,o=0;return function(){var h=m(),u=n-(h-o);if(o=h,u>0){if(++c>=t)return arguments[0]}else c=0;return g.apply(void 0,arguments)}}i.exports=f})),Va=j(((e,i)=>{var t=Ba(),n=ja()(t);i.exports=n})),Ua=j(((e,i)=>{var t=oo(),n=Ha(),m=Va();function f(g,c){return m(n(g,c,t),g+"")}i.exports=f})),Ga=j(((e,i)=>{var t=Vt(),n=$i(),m=Ln(),f=et();function g(c,o,h){if(!f(h))return!1;var u=typeof o;return(u=="number"?n(h)&&m(o,h.length):u=="string"&&o in h)?t(h[o],c):!1}i.exports=g})),Ka=j(((e,i)=>{var t=Ua(),n=Ga();function m(f){return t(function(g,c){var o=-1,h=c.length,u=h>1?c[h-1]:void 0,d=h>2?c[2]:void 0;for(u=f.length>3&&typeof u=="function"?(h--,u):void 0,d&&n(c[0],c[1],d)&&(u=h<3?void 0:u,h=1),g=Object(g);++o<h;){var l=c[o];l&&f(g,l,o,u)}return g})}i.exports=m})),qa=j(((e,i)=>{var t=za(),n=Ka()(function(m,f,g,c){t(m,f,g,c)});i.exports=n})),Ya=Et(qa(),1),Za=()=>crypto.randomUUID().slice(0,8),Qa=()=>Za().slice(0,8),cr=(e="",i)=>{if(!i)return console.warn("utils.match missing argument 2."),!1;const t=/[|\\{}()[\]^*$+?.]/g;let n=typeof i=="string"?[i]:i;n=n.map(f=>f==="*"?"":f.replace(t,"\\$&"));let m=!0;return n.length&&(m=!new RegExp(n.join("|"),"i").exec(e)),m},Xa=(e,i)=>{const t=e.indexOf(i);t!==-1&&e.splice(t,1)},be=e=>{const i=e.className?.match(ul);return i&&cl[i[0]]},st=e=>Array.from(new Set(e)),Me=e=>e?.attrs?.id||e?.id||Qa(),De=(e,i)=>{const t=(n,m)=>{if(Array.isArray(n))return m!=null?st(n.concat(m)):m;if(Array.isArray(m))return n!=null?st(m.concat(n)):m};return(0,Ya.default)({},e,i,t)},He=e=>{let i;const t=e instanceof Promise;if(e===null||typeof e!="object"||t)return e;if(e instanceof Date)return i=new Date,i.setTime(e.getTime()),i;if(Array.isArray(e)){i=[];for(let n=0,m=e.length;n<m;n++)i[n]=He(e[n]);return i}if(e instanceof Object){i={};for(const n in e)Object.hasOwn(e,n)&&(i[n]=He(e[n]));return i}throw new Error("Unable to copy Object, type not supported.")},zi=(e,i)=>e/i*100,dn=e=>`${e.toString()}%`,Rn=Object.create(null,{get:{value:e=>{const i=window.sessionStorage?.getItem(e);try{return JSON.parse(i)}catch{return i}}},set:{value:(e,i)=>{try{return window.sessionStorage?.setItem(e,JSON.stringify(i))}catch(t){console.error(t)}}}}),Te=e=>/^(stage|row|column|field)s./.test(e),Ja=e=>sl.test(e);function so(e,i=zn){let t=0;return function(...n){const m=Date.now();m-t>=i&&(t=m,e.apply(this,n))}}function fi(e,i=at){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>e.apply(this,n),i)}}function un(e){return e}function hn(){}function Li(e=Object.create(null)){if(typeof e=="string")try{return JSON.parse(e)}catch(i){return console.error("Invalid JSON string provided:",i),Object.create(null)}return e}var rt=e=>e?He(Li(e)):wt();function ao(e,i,t,n={}){if(!i||!e[t][i])return n;const m=`${t}.${i}`;n[m]=e[t][i];const f=fl.get(t);if(f){const g=e[t][i].data?.children||[];for(const c of g)ao(e,c,f,n)}return n}var el='<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acprefix__rect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="acprefix__layer1"><g id="acprefix__text4203"><g id="acprefix__g4212" transform="translate(0.10112835,0.1001358)"><path id="acprefix__path4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acprefix__path4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agprefix__rect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="aiprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="aiprefix__rect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol fill="#000000" viewBox="0 0 24 24" id="f-i-email" xmlns="http://www.w3.org/2000/svg"><path d="M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="aqprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="aqprefix__g4220"><rect id="aqprefix__rect4191" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="aqprefix__g4220-6"><rect id="aqprefix__rect4191-40" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-column" xmlns="http://www.w3.org/2000/svg"><path d="M2 7h2v2H2zM7 7h2v2H7zM12 7h2v2h-2zM2 12h2v2H2zM7 12h2v2H7zM12 12h2v2h-2z" transform="rotate(90 9.25 9.25)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-field" xmlns="http://www.w3.org/2000/svg"><path d="M9.5-6.5h2v2h-2zm-5 0h2v2h-2zm5-5h2v2h-2zm-5 0h2v2h-2z" transform="rotate(90)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-row" xmlns="http://www.w3.org/2000/svg"><path d="M12 9.5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Zm10-5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-stage" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5h2v2H2zM7 4.5h2v2H7zM12 4.5h2v2h-2zM2 9.5h2v2H2zM7 9.5h2v2H7zM12 9.5h2v2h-2zM2-.5h2v2H2zM7-.5h2v2H7zM12-.5h2v2h-2z" transform="translate(0 2.5)"/></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="arprefix__icomoon-ignore"/><path fill="#000" d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><path d="M0 12h1v-1H0Zm15-7h1V4h-1zm-1 7h1v-1h-1zm-2 0h1v-1h-1zm-2 0h1v-1h-1Zm-2 0h1v-1H8Zm-2 0h1v-1H6Zm-2 0h1v-1H4Zm-2 0h1v-1H2Zm13-1h1v-1h-1ZM0 10h1V9H0Zm15-1h1V8h-1ZM0 8h1V7H0Zm15-1h1V6h-1ZM0 6h1V5H0Zm13-1h1V4h-1zm-2 0h1V4h-1ZM9 5h1V4H9ZM7 5h1V4H7ZM5 5h1V4H5ZM3 5h1V4H3ZM1 5h1V4H1Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 32 32" id="f-i-info-circle" xmlns="http://www.w3.org/2000/svg"><path d="m17.962 24.725 1.806.096v2.531h-7.534v-2.406l1.045-.094c.568-.063.916-.254.916-1.014v-8.801c0-.699-.188-.92-.791-.92l-1.106-.062v-2.626h5.666zM15.747 4.648c1.394 0 2.405 1.047 2.405 2.374 0 1.331-1.014 2.313-2.438 2.313-1.454 0-2.404-.982-2.404-2.313 0-1.327.95-2.374 2.437-2.374M16 32C7.178 32 0 24.822 0 16S7.178 0 16 0c8.82 0 16 7.178 16 16s-7.18 16-16 16m0-29C8.832 3 3 8.832 3 16s5.832 13 13 13 13-5.832 13-13S23.168 3 16 3"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="avprefix__icomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L18 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="axprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="axprefix__namedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="axprefix__path4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-plus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12H18M12 6V18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><path d="M193.694-139.2h87.322v510.916h-87.322zM-18.103 159.92V72.597h510.915v87.322z" transform="rotate(45 77.994 208.636)"/></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="bfprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="bfprefix__g7209"><path id="bfprefix__rect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bgprefix__XMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="bhprefix__icomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="biprefix__XMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bjprefix__XMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="boprefix__icomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>',_n=Vr.name,On=Vr.version,Ri=_n,tl="formeo-sprite",il=`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/${tl}.svg`,nl=`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/formeo.min.css`,rl="https://draggable.github.io/formeo/assets/css/formeo.min.css",lo="f-panel",ot="control-group",kt=`${Ri}-stage`,Ue=`${Ri}-row`,Ge=`${Ri}-column`,Tt=`${Ri}-field`,pn="custom-column-widths",co="column-preset",Pi="resizing-columns",ol=new Map([[kt,Ue],[Ue,Ge],[Ge,Tt]]),In=["stage","row","column","field"],Dn=In.map(e=>`${e}s`),Hh=new Map(Dn.map((e,i)=>[e,In[i]])),sl=new RegExp(`^${Dn.join("|")}.`),uo=[...In],ho=[...Dn],al=new Map(ho.map((e,i)=>[e,uo[i]])),Wh=new RegExp(`^${ho.join("|")}.`),Hi=uo.reduce((e,i)=>(e[i]=i,e),{}),ll=[{name:"controls",className:ot},{name:"stage",className:kt},{name:"row",className:Ue},{name:"column",className:Ge},{name:"field",className:Tt}],Nn={controls:ot,stage:kt,row:Ue,column:Ge,field:Tt},cl=Object.entries(Nn).reduce((e,[i,t])=>(e[t]=i,e),{}),dl=Object.values(Nn),ul=new RegExp(`${dl.join("|")}`,"g"),{childTypeMapVals:po,childTypeIndexMapVals:hl}=ll.reduce((e,{name:i},t,n)=>{const{name:m}=n[t+1]||{};return m&&(e.childTypeMapVals.push([i,m]),e.childTypeIndexMapVals.push([`${i}s`,`${m}s`])),e},{childTypeMapVals:[],childTypeIndexMapVals:[]}),pl=po.slice().map(e=>e.slice().reverse()).reverse(),dr=new Map(po),fl=new Map(hl),gl=new Map(pl.slice()),ml=[[{value:"100.0",label:"100%"}],[{value:"50.0,50.0",label:"50 | 50"},{value:"33.3,66.6",label:"33 | 66"},{value:"66.6,33.3",label:"66 | 33"}],[{value:"33.3,33.3,33.3",label:"33 | 33 | 33"},{value:"25.0,25.0,50.0",label:"25 | 25 | 50"},{value:"50.0,25.0,25.0",label:"50 | 25 | 25"},{value:"25.0,50.0,25.0",label:"25 | 50 | 25"}],[{value:"25.0,25.0,25.0,25.0",label:"25 | 25 | 25 | 25"}],[{value:"20.0,20.0,20.0,20.0,20.0",label:"20 | 20 | 20 | 20 | 20"}],[{value:"16.66,16.66,16.66,16.66,16.66,16.66",label:"16.66 | 16.66 | 16.66 | 16.66 | 16.66 | 16.66"}]],vl=new Map(ml.reduce((e,i,t)=>(e.push([t,i]),e),[])),Fn=`${_n}-formData`,ur=`${_n}-locale`;var at=Math.round(333/2),zn=Math.round(333*2),Bh=Math.round(333/5),fo="formeoSaved",Pn="formeoUpdated",yl="formeoChanged",go="formeoUpdatedStage",mo="formeoUpdatedRow",vo="formeoUpdatedColumn",yo="formeoUpdatedField",bl="formeoCleared",bo="formeoOnRender",wl="formeoConditionUpdated",Hn="formeoAddedRow",Wn="formeoAddedColumn",Bn="formeoAddedField",jn="formeoRemovedRow",Vn="formeoRemovedColumn",Un="formeoRemovedField",wo={equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},Cl={and:"&&",or:"||"},Co={equals:"="},Sl=["logical","source","sourceProperty","comparison","target","targetProperty","assignment","value"],hr=["isChecked","isNotChecked"],pr=["isVisible","isNotVisible"],ni=["value"],xl={comparison:wo,assignment:Co,logical:Cl};var El="then",Gn=()=>({if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],[El]:[{target:"",targetProperty:"",assignment:"",value:""}]}),Al=/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)|(\b[0-9a-f]{8}\b)/g,fn=/\bcol-\w+-\d+/g,So="f-i-",wt=()=>({id:Me(),stages:{[Me()]:{}},rows:{},columns:{},fields:{}}),gi=["selected","checked"],kl=gi.toReversed(),Tl=new Map([["config",new Set(["label","helpText","hideLabel","labelAfter","disableHtmlLabel","tooltip"])]]),Ml="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map(e=>String.raw`\s${e}\s`),$l=new RegExp(String.raw`(?!${Ml.join("|")})\w\S*`,"g"),Ll=/\s+/g;function je(e){return typeof e!="string"||e.trim().match(Ll)?e:e.replace($l,i=>i.charAt(0).toUpperCase()+i.substring(1).replace(/[A-Z]/g,t=>` ${t}`))}var xo=(e,i="-")=>e.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,i),lt=e=>{if(Array.isArray(e))return e;const i=/[.[\]]/g,t=[];let n=0,m=i.exec(e);for(;m!==null;)t.push(e.slice(n,m.index)),n=m.index+m[0].length,m=i.exec(e);return n<e.length&&t.push(e.slice(n)),t.filter(Boolean)},fr=(e,i="-")=>lt(e).join(i),Rl=e=>{const i=document.createElement("div");return i.innerHTML=e,i.textContent||i.innerText||""},_l=(e,i,t="…")=>{if(e.length<=i)return e;const n=e.slice(0,i),m=n.lastIndexOf(" ");let f=`${m>0?n.slice(0,m):n}`;return t&&(f+=t),f},Ol=/^attrs\.|^meta\.|^options\.|^config\./g;function mi(e){return e.replaceAll(Ol,"")}var Kn=j(((e,i)=>{var t=At(),n=ut(),m="[object Symbol]";function f(g){return typeof g=="symbol"||n(g)&&t(g)==m}i.exports=f})),Il=j(((e,i)=>{var t=ht(),n=Kn(),m=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f=/^\w*$/;function g(c,o){if(t(c))return!1;var h=typeof c;return h=="number"||h=="symbol"||h=="boolean"||c==null||n(c)?!0:f.test(c)||!m.test(c)||o!=null&&c in Object(o)}i.exports=g})),Dl=j(((e,i)=>{var t=An(),n="Expected a function";function m(f,g){if(typeof f!="function"||g!=null&&typeof g!="function")throw new TypeError(n);var c=function(){var o=arguments,h=g?g.apply(this,o):o[0],u=c.cache;if(u.has(h))return u.get(h);var d=f.apply(this,o);return c.cache=u.set(h,d)||u,d};return c.cache=new(m.Cache||t),c}m.Cache=t,i.exports=m})),Nl=j(((e,i)=>{var t=Dl(),n=500;function m(f){var g=t(f,function(o){return c.size===n&&c.clear(),o}),c=g.cache;return g}i.exports=m})),Fl=j(((e,i)=>{var t=Nl(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m=/\\(\\)?/g,f=t(function(g){var c=[];return g.charCodeAt(0)===46&&c.push(""),g.replace(n,function(o,h,u,d){c.push(u?d.replace(m,"$1"):h||o)}),c});i.exports=f})),zl=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length,c=Array(g);++f<g;)c[f]=m(n[f],f,n);return c}i.exports=t})),Pl=j(((e,i)=>{var t=ki(),n=zl(),m=ht(),f=Kn(),g=1/0,c=t?t.prototype:void 0,o=c?c.toString:void 0;function h(u){if(typeof u=="string")return u;if(m(u))return n(u,h)+"";if(f(u))return o?o.call(u):"";var d=u+"";return d=="0"&&1/u==-g?"-0":d}i.exports=h})),_i=j(((e,i)=>{var t=Pl();function n(m){return m==null?"":t(m)}i.exports=n})),Eo=j(((e,i)=>{var t=ht(),n=Il(),m=Fl(),f=_i();function g(c,o){return t(c)?c:n(c,o)?[c]:m(f(c))}i.exports=g})),Ao=j(((e,i)=>{var t=Kn(),n=1/0;function m(f){if(typeof f=="string"||t(f))return f;var g=f+"";return g=="0"&&1/f==-n?"-0":g}i.exports=m})),Hl=j(((e,i)=>{var t=Eo(),n=Ao();function m(f,g){g=t(g,f);for(var c=0,o=g.length;f!=null&&c<o;)f=f[n(g[c++])];return c&&c==o?f:void 0}i.exports=m})),Wl=j(((e,i)=>{var t=Hl();function n(m,f,g){var c=m==null?void 0:t(m,f);return c===void 0?g:c}i.exports=n})),Bl=j(((e,i)=>{var t=io(),n=Eo(),m=Ln(),f=et(),g=Ao();function c(o,h,u,d){if(!f(o))return o;h=n(h,o);for(var l=-1,s=h.length,r=s-1,a=o;a!=null&&++l<s;){var p=g(h[l]),v=u;if(p==="__proto__"||p==="constructor"||p==="prototype")return o;if(l!=r){var y=a[p];v=d?d(y,p,a):void 0,v===void 0&&(v=f(y)?y:m(h[l+1])?[]:{})}t(a,p,v),a=a[p]}return o}i.exports=c})),jl=j(((e,i)=>{var t=Bl();function n(m,f,g){return m==null?m:t(m,f,g)}i.exports=n})),Vl=Et(Wl(),1),Ul=Et(jl(),1),we=Vl.default,Oi=Ul.default;function Gl(e,i={}){const t={...e};for(const n in i)Object.hasOwn(i,n)&&(Object.hasOwn(t,n)?Array.isArray(t[n])?t[n].push(i[n]):t[n]=[t[n],i[n]]:t[n]=i[n]);return t}function ri(...e){return e.flat().reduce((i,t)=>(i[t]=t,i),{})}var Kl=j(((e,i)=>{var t="__lodash_hash_undefined__";function n(m){return this.__data__.set(m,t),this}i.exports=n})),ql=j(((e,i)=>{function t(n){return this.__data__.has(n)}i.exports=t})),Yl=j(((e,i)=>{var t=An(),n=Kl(),m=ql();function f(g){var c=-1,o=g==null?0:g.length;for(this.__data__=new t;++c<o;)this.add(g[c])}f.prototype.add=f.prototype.push=n,f.prototype.has=m,i.exports=f})),Zl=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length;++f<g;)if(m(n[f],f,n))return!0;return!1}i.exports=t})),Ql=j(((e,i)=>{function t(n,m){return n.has(m)}i.exports=t})),ko=j(((e,i)=>{var t=Yl(),n=Zl(),m=Ql(),f=1,g=2;function c(o,h,u,d,l,s){var r=u&f,a=o.length,p=h.length;if(a!=p&&!(r&&p>a))return!1;var v=s.get(o),y=s.get(h);if(v&&y)return v==h&&y==o;var k=-1,x=!0,w=u&g?new t:void 0;for(s.set(o,h),s.set(h,o);++k<a;){var S=o[k],M=h[k];if(d)var L=r?d(M,S,k,h,o,s):d(S,M,k,o,h,s);if(L!==void 0){if(L)continue;x=!1;break}if(w){if(!n(h,function(R,$){if(!m(w,$)&&(S===R||l(S,R,u,d,s)))return w.push($)})){x=!1;break}}else if(!(S===M||l(S,M,u,d,s))){x=!1;break}}return s.delete(o),s.delete(h),x}i.exports=c})),Xl=j(((e,i)=>{function t(n){var m=-1,f=Array(n.size);return n.forEach(function(g,c){f[++m]=[c,g]}),f}i.exports=t})),Jl=j(((e,i)=>{function t(n){var m=-1,f=Array(n.size);return n.forEach(function(g){f[++m]=g}),f}i.exports=t})),ec=j(((e,i)=>{var t=ki(),n=Zr(),m=Vt(),f=ko(),g=Xl(),c=Jl(),o=1,h=2,u="[object Boolean]",d="[object Date]",l="[object Error]",s="[object Map]",r="[object Number]",a="[object RegExp]",p="[object Set]",v="[object String]",y="[object Symbol]",k="[object ArrayBuffer]",x="[object DataView]",w=t?t.prototype:void 0,S=w?w.valueOf:void 0;function M(L,R,$,D,T,E,C){switch($){case x:if(L.byteLength!=R.byteLength||L.byteOffset!=R.byteOffset)return!1;L=L.buffer,R=R.buffer;case k:return!(L.byteLength!=R.byteLength||!E(new n(L),new n(R)));case u:case d:case r:return m(+L,+R);case l:return L.name==R.name&&L.message==R.message;case a:case v:return L==R+"";case s:var b=g;case p:var A=D&o;if(b||(b=c),L.size!=R.size&&!A)return!1;var _=C.get(L);if(_)return _==R;D|=h,C.set(L,R);var O=f(b(L),b(R),D,T,E,C);return C.delete(L),O;case y:if(S)return S.call(L)==S.call(R)}return!1}i.exports=M})),tc=j(((e,i)=>{function t(n,m){for(var f=-1,g=m.length,c=n.length;++f<g;)n[c+f]=m[f];return n}i.exports=t})),ic=j(((e,i)=>{var t=tc(),n=ht();function m(f,g,c){var o=g(f);return n(f)?o:t(o,c(f))}i.exports=m})),nc=j(((e,i)=>{function t(n,m){for(var f=-1,g=n==null?0:n.length,c=0,o=[];++f<g;){var h=n[f];m(h,f,n)&&(o[c++]=h)}return o}i.exports=t})),rc=j(((e,i)=>{function t(){return[]}i.exports=t})),oc=j(((e,i)=>{var t=nc(),n=rc(),m=Object.prototype.propertyIsEnumerable,f=Object.getOwnPropertySymbols,g=f?function(c){return c==null?[]:(c=Object(c),t(f(c),function(o){return m.call(c,o)}))}:n;i.exports=g})),sc=j(((e,i)=>{var t=Qr()(Object.keys,Object);i.exports=t})),ac=j(((e,i)=>{var t=Tn(),n=sc(),m=Object.prototype.hasOwnProperty;function f(g){if(!t(g))return n(g);var c=[];for(var o in Object(g))m.call(g,o)&&o!="constructor"&&c.push(o);return c}i.exports=f})),lc=j(((e,i)=>{var t=no(),n=ac(),m=$i();function f(g){return m(g)?t(g):n(g)}i.exports=f})),cc=j(((e,i)=>{var t=ic(),n=oc(),m=lc();function f(g){return t(g,m,n)}i.exports=f})),dc=j(((e,i)=>{var t=cc(),n=1,m=Object.prototype.hasOwnProperty;function f(g,c,o,h,u,d){var l=o&n,s=t(g),r=s.length;if(r!=t(c).length&&!l)return!1;for(var a=r;a--;){var p=s[a];if(!(l?p in c:m.call(c,p)))return!1}var v=d.get(g),y=d.get(c);if(v&&y)return v==c&&y==g;var k=!0;d.set(g,c),d.set(c,g);for(var x=l;++a<r;){p=s[a];var w=g[p],S=c[p];if(h)var M=l?h(S,w,p,c,g,d):h(w,S,p,g,c,d);if(!(M===void 0?w===S||u(w,S,o,h,d):M)){k=!1;break}x||(x=p=="constructor")}if(k&&!x){var L=g.constructor,R=c.constructor;L!=R&&"constructor"in g&&"constructor"in c&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(k=!1)}return d.delete(g),d.delete(c),k}i.exports=f})),uc=j(((e,i)=>{var t=dt()(Be(),"DataView");i.exports=t})),hc=j(((e,i)=>{var t=dt()(Be(),"Promise");i.exports=t})),pc=j(((e,i)=>{var t=dt()(Be(),"Set");i.exports=t})),fc=j(((e,i)=>{var t=dt()(Be(),"WeakMap");i.exports=t})),gc=j(((e,i)=>{var t=uc(),n=En(),m=hc(),f=pc(),g=fc(),c=At(),o=Gr(),h="[object Map]",u="[object Object]",d="[object Promise]",l="[object Set]",s="[object WeakMap]",r="[object DataView]",a=o(t),p=o(n),v=o(m),y=o(f),k=o(g),x=c;(t&&x(new t(new ArrayBuffer(1)))!=r||n&&x(new n)!=h||m&&x(m.resolve())!=d||f&&x(new f)!=l||g&&x(new g)!=s)&&(x=function(w){var S=c(w),M=S==u?w.constructor:void 0,L=M?o(M):"";if(L)switch(L){case a:return r;case p:return h;case v:return d;case y:return l;case k:return s}return S}),i.exports=x})),mc=j(((e,i)=>{var t=Kr(),n=ko(),m=ec(),f=dc(),g=gc(),c=ht(),o=Mn(),h=$n(),u=1,d="[object Arguments]",l="[object Array]",s="[object Object]",r=Object.prototype.hasOwnProperty;function a(p,v,y,k,x,w){var S=c(p),M=c(v),L=S?l:g(p),R=M?l:g(v);L=L==d?s:L,R=R==d?s:R;var $=L==s,D=R==s,T=L==R;if(T&&o(p)){if(!o(v))return!1;S=!0,$=!1}if(T&&!$)return w||(w=new t),S||h(p)?n(p,v,y,k,x,w):m(p,v,L,y,k,x,w);if(!(y&u)){var E=$&&r.call(p,"__wrapped__"),C=D&&r.call(v,"__wrapped__");if(E||C){var b=E?p.value():p,A=C?v.value():v;return w||(w=new t),x(b,A,y,k,w)}}return T?(w||(w=new t),f(p,v,y,k,x,w)):!1}i.exports=a})),vc=j(((e,i)=>{var t=mc(),n=ut();function m(f,g,c,o,h){return f===g?!0:f==null||g==null||!n(f)&&!n(g)?f!==f&&g!==g:t(f,g,c,o,m,h)}i.exports=m})),yc=j(((e,i)=>{var t=vc();function n(m,f){return t(m,f)}i.exports=n})),gn=Et(yc(),1),bc=(e,i)=>e===void 0?"added":i===void 0?"removed":(0,gn.default)(e,i)?"unchanged":"changed",qn=class{constructor(e,i=Object.create(null)){this.name=e,this.data=i,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}toJSON=(e,i)=>JSON.stringify(e,null,i);get=e=>we(this.data,e);set(e,i){const t=we(this.data,e),n=Oi(this.data,e,i),m=Array.isArray(e)?e.join("."):e,f=Object.keys(this.setCallbacks).filter(c=>new RegExp(c).test(m)),g={newVal:i,oldVal:t,path:e};for(const c of f)for(const o of this.setCallbacks[c])o(g);if(!this.disableEvents){const c={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+e,value:i,data:n,changeType:bc(t,i),src:this.dom};if(t&&(c.previousValue=t),Q.formeoUpdated(c),this.name){const o={stage:go,row:mo,column:vo,field:yo}[this.name];o&&Q.formeoUpdated(c,o)}}return n}addSetCallback(e,i){this.setCallbacks[e]?this.setCallbacks[e].push(i):this.setCallbacks[e]=[i]}removeSetCallback(e,i){this.setCallbacks[e]=this.setCallbacks[e].filter(t=>t!==i)}add=(e,i=Object.create(null))=>{const{id:t}=i,n=e||t||Me();return this.set(n,i)};remove=e=>{const i=lt(e),t=i.pop(),n=this.get(i);return Array.isArray(n)?n.splice(Number(t),1):n&&delete n[t],n};empty(){this.data=Object.create(null)}getData=()=>Object.entries(this.data).reduce((e,[i,t])=>(e[i]=t?.data?t.getData():t,e),{});setCallbacks={};configVal=Object.create(null)},Ii=class extends qn{load=e=>{const i=Li(e);this.empty();for(const[t,n]of Object.entries(i))this.add(t,n);return this.data};get=e=>e?we(this.data,e):this.add();add=(e,i=Object.create(null))=>{const t=e||Me(),n=this.Component({...i,id:t});this.data[t]=n,this.active=n;const m={row:Hn,column:Wn,field:Bn}[this.name];return m&&Q.formeoUpdated({entity:n,componentId:t,componentType:this.name,data:n.data},m),n};remove=e=>{if(Array.isArray(e))for(const i of e)this.get(i).remove();else this.get(e).remove();return this.data};delete=e=>(delete this.data[e],e);clearAll=(e=!0)=>{const i=Object.values(this.data).map(t=>t.empty(e));return Promise.all(i)};set config(e){this.configVal=De(this.configVal,He(e))}get config(){return this.configVal}conditionMap=new Map};function wc(e,i,t){return(i=Ec(i))in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ke.apply(null,arguments)}function gr(e,i){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);i&&(n=n.filter(function(m){return Object.getOwnPropertyDescriptor(e,m).enumerable})),t.push.apply(t,n)}return t}function We(e){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?gr(Object(t),!0).forEach(function(n){wc(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cc(e,i){if(e==null)return{};var t,n,m=Sc(e,i);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(n=0;n<f.length;n++)t=f[n],i.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(m[t]=e[t])}return m}function Sc(e,i){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(i.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function xc(e,i){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,i||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(e)}function Ec(e){var i=xc(e,"string");return typeof i=="symbol"?i:i+""}function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},mn(e)}var Ac="1.15.7";function Ve(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ye=Ve(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ut=Ve(/Edge/i),mr=Ve(/firefox/i),Dt=Ve(/safari/i)&&!Ve(/chrome/i)&&!Ve(/android/i),Yn=Ve(/iP(ad|od|hone)/i),To=Ve(/chrome/i)&&Ve(/android/i),Mo={capture:!1,passive:!1};function re(e,i,t){e.addEventListener(i,t,!Ye&&Mo)}function ne(e,i,t){e.removeEventListener(i,t,!Ye&&Mo)}function vi(e,i){if(i){if(i[0]===">"&&(i=i.substring(1)),e)try{if(e.matches)return e.matches(i);if(e.msMatchesSelector)return e.msMatchesSelector(i);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(i)}catch{return!1}return!1}}function $o(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function Ie(e,i,t,n){if(e){t=t||document;do{if(i!=null&&(i[0]===">"?e.parentNode===t&&vi(e,i):vi(e,i))||n&&e===t)return e;if(e===t)break}while(e=$o(e))}return null}var vr=/\s+/g;function xe(e,i,t){e&&i&&(e.classList?e.classList[t?"add":"remove"](i):e.className=((" "+e.className+" ").replace(vr," ").replace(" "+i+" "," ")+(t?" "+i:"")).replace(vr," "))}function ee(e,i,t){var n=e&&e.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),i===void 0?t:t[i];!(i in n)&&i.indexOf("webkit")===-1&&(i="-webkit-"+i),n[i]=t+(typeof t=="string"?"":"px")}}function Ct(e,i){var t="";if(typeof e=="string")t=e;else do{var n=ee(e,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!i&&(e=e.parentNode));var m=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return m&&new m(t)}function Lo(e,i,t){if(e){var n=e.getElementsByTagName(i),m=0,f=n.length;if(t)for(;m<f;m++)t(n[m],m);return n}return[]}function Pe(){var e=document.scrollingElement;return e||document.documentElement}function ue(e,i,t,n,m){if(!(!e.getBoundingClientRect&&e!==window)){var f,g,c,o,h,u,d;if(e!==window&&e.parentNode&&e!==Pe()?(f=e.getBoundingClientRect(),g=f.top,c=f.left,o=f.bottom,h=f.right,u=f.height,d=f.width):(g=0,c=0,o=window.innerHeight,h=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(i||t)&&e!==window&&(m=m||e.parentNode,!Ye))do if(m&&m.getBoundingClientRect&&(ee(m,"transform")!=="none"||t&&ee(m,"position")!=="static")){var l=m.getBoundingClientRect();g-=l.top+parseInt(ee(m,"border-top-width")),c-=l.left+parseInt(ee(m,"border-left-width")),o=g+f.height,h=c+f.width;break}while(m=m.parentNode);if(n&&e!==window){var s=Ct(m||e),r=s&&s.a,a=s&&s.d;s&&(g/=a,c/=r,d/=r,u/=a,o=g+u,h=c+d)}return{top:g,left:c,bottom:o,right:h,width:d,height:u}}}function yr(e,i,t){for(var n=Xe(e,!0),m=ue(e)[i];n;){var f=ue(n)[t],g=void 0;if(t==="top"||t==="left"?g=m>=f:g=m<=f,!g)return n;if(n===Pe())break;n=Xe(n,!1)}return!1}function St(e,i,t,n){for(var m=0,f=0,g=e.children;f<g.length;){if(g[f].style.display!=="none"&&g[f]!==J.ghost&&(n||g[f]!==J.dragged)&&Ie(g[f],t.draggable,e,!1)){if(m===i)return g[f];m++}f++}return null}function Zn(e,i){for(var t=e.lastElementChild;t&&(t===J.ghost||ee(t,"display")==="none"||i&&!vi(t,i));)t=t.previousElementSibling;return t||null}function ke(e,i){var t=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==J.clone&&(!i||vi(e,i))&&t++;return t}function br(e){var i=0,t=0,n=Pe();if(e)do{var m=Ct(e),f=m.a,g=m.d;i+=e.scrollLeft*f,t+=e.scrollTop*g}while(e!==n&&(e=e.parentNode));return[i,t]}function kc(e,i){for(var t in e)if(e.hasOwnProperty(t)){for(var n in i)if(i.hasOwnProperty(n)&&i[n]===e[t][n])return Number(t)}return-1}function Xe(e,i){if(!e||!e.getBoundingClientRect)return Pe();var t=e,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var m=ee(t);if(t.clientWidth<t.scrollWidth&&(m.overflowX=="auto"||m.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(m.overflowY=="auto"||m.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Pe();if(n||i)return t;n=!0}}while(t=t.parentNode);return Pe()}function Tc(e,i){if(e&&i)for(var t in i)i.hasOwnProperty(t)&&(e[t]=i[t]);return e}function Wi(e,i){return Math.round(e.top)===Math.round(i.top)&&Math.round(e.left)===Math.round(i.left)&&Math.round(e.height)===Math.round(i.height)&&Math.round(e.width)===Math.round(i.width)}var Nt;function Ro(e,i){return function(){if(!Nt){var t=arguments,n=this;t.length===1?e.call(n,t[0]):e.apply(n,t),Nt=setTimeout(function(){Nt=void 0},i)}}}function Mc(){clearTimeout(Nt),Nt=void 0}function _o(e,i,t){e.scrollLeft+=i,e.scrollTop+=t}function Oo(e){var i=window.Polymer,t=window.jQuery||window.Zepto;return i&&i.dom?i.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}function Io(e,i,t){var n={};return Array.from(e.children).forEach(function(m){var f,g,c,o;if(!(!Ie(m,i.draggable,e,!1)||m.animated||m===t)){var h=ue(m);n.left=Math.min((f=n.left)!==null&&f!==void 0?f:1/0,h.left),n.top=Math.min((g=n.top)!==null&&g!==void 0?g:1/0,h.top),n.right=Math.max((c=n.right)!==null&&c!==void 0?c:-1/0,h.right),n.bottom=Math.max((o=n.bottom)!==null&&o!==void 0?o:-1/0,h.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Ce="Sortable"+new Date().getTime();function $c(){var e=[],i;return{captureAnimationState:function(){e=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(n){if(!(ee(n,"display")==="none"||n===J.ghost)){e.push({target:n,rect:ue(n)});var m=We({},e[e.length-1].rect);if(n.thisAnimationDuration){var f=Ct(n,!0);f&&(m.top-=f.f,m.left-=f.e)}n.fromRect=m}})},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(kc(e,{target:n}),1)},animateAll:function(n){var m=this;if(!this.options.animation){clearTimeout(i),typeof n=="function"&&n();return}var f=!1,g=0;e.forEach(function(c){var o=0,h=c.target,u=h.fromRect,d=ue(h),l=h.prevFromRect,s=h.prevToRect,r=c.rect,a=Ct(h,!0);a&&(d.top-=a.f,d.left-=a.e),h.toRect=d,h.thisAnimationDuration&&Wi(l,d)&&!Wi(u,d)&&(r.top-d.top)/(r.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(o=Rc(r,l,s,m.options)),Wi(d,u)||(h.prevFromRect=u,h.prevToRect=d,o||(o=m.options.animation),m.animate(h,r,d,o)),o&&(f=!0,g=Math.max(g,o),clearTimeout(h.animationResetTimer),h.animationResetTimer=setTimeout(function(){h.animationTime=0,h.prevFromRect=null,h.fromRect=null,h.prevToRect=null,h.thisAnimationDuration=null},o),h.thisAnimationDuration=o)}),clearTimeout(i),f?i=setTimeout(function(){typeof n=="function"&&n()},g):typeof n=="function"&&n(),e=[]},animate:function(n,m,f,g){if(g){ee(n,"transition",""),ee(n,"transform","");var c=Ct(this.el),o=c&&c.a,h=c&&c.d,u=(m.left-f.left)/(o||1),d=(m.top-f.top)/(h||1);n.animatingX=!!u,n.animatingY=!!d,ee(n,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=Lc(n),ee(n,"transition","transform "+g+"ms"+(this.options.easing?" "+this.options.easing:"")),ee(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){ee(n,"transition",""),ee(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},g)}}}}function Lc(e){return e.offsetWidth}function Rc(e,i,t,n){return Math.sqrt(Math.pow(i.top-e.top,2)+Math.pow(i.left-e.left,2))/Math.sqrt(Math.pow(i.top-t.top,2)+Math.pow(i.left-t.left,2))*n.animation}var pt=[],Bi={initializeByDefault:!0},Gt={mount:function(i){for(var t in Bi)Bi.hasOwnProperty(t)&&!(t in i)&&(i[t]=Bi[t]);pt.forEach(function(n){if(n.pluginName===i.pluginName)throw"Sortable: Cannot mount plugin ".concat(i.pluginName," more than once")}),pt.push(i)},pluginEvent:function(i,t,n){var m=this;this.eventCanceled=!1,n.cancel=function(){m.eventCanceled=!0};var f=i+"Global";pt.forEach(function(g){t[g.pluginName]&&(t[g.pluginName][f]&&t[g.pluginName][f](We({sortable:t},n)),t.options[g.pluginName]&&t[g.pluginName][i]&&t[g.pluginName][i](We({sortable:t},n)))})},initializePlugins:function(i,t,n,m){pt.forEach(function(c){var o=c.pluginName;if(!(!i.options[o]&&!c.initializeByDefault)){var h=new c(i,t,i.options);h.sortable=i,h.options=i.options,i[o]=h,Ke(n,h.defaults)}});for(var f in i.options)if(i.options.hasOwnProperty(f)){var g=this.modifyOption(i,f,i.options[f]);typeof g<"u"&&(i.options[f]=g)}},getEventProperties:function(i,t){var n={};return pt.forEach(function(m){typeof m.eventProperties=="function"&&Ke(n,m.eventProperties.call(t[m.pluginName],i))}),n},modifyOption:function(i,t,n){var m;return pt.forEach(function(f){i[f.pluginName]&&f.optionListeners&&typeof f.optionListeners[t]=="function"&&(m=f.optionListeners[t].call(i[f.pluginName],n))}),m}};function _c(e){var i=e.sortable,t=e.rootEl,n=e.name,m=e.targetEl,f=e.cloneEl,g=e.toEl,c=e.fromEl,o=e.oldIndex,h=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,l=e.originalEvent,s=e.putSortable,r=e.extraEventProperties;if(i=i||t&&t[Ce],!!i){var a,p=i.options,v="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ye&&!Ut?a=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent(n,!0,!0)),a.to=g||t,a.from=c||t,a.item=m||t,a.clone=f,a.oldIndex=o,a.newIndex=h,a.oldDraggableIndex=u,a.newDraggableIndex=d,a.originalEvent=l,a.pullMode=s?s.lastPutMode:void 0;var y=We(We({},r),Gt.getEventProperties(n,i));for(var k in y)a[k]=y[k];t&&t.dispatchEvent(a),p[v]&&p[v].call(i,a)}}var Oc=["evt"],ye=function(i,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m=n.evt,f=Cc(n,Oc);Gt.pluginEvent.bind(J)(i,t,We({dragEl:K,parentEl:ce,ghostEl:ie,rootEl:se,nextEl:nt,lastDownEl:oi,cloneEl:ae,cloneHidden:Qe,dragStarted:_t,putSortable:pe,activeSortable:J.active,originalEvent:m,oldIndex:yt,oldDraggableIndex:Ft,newIndex:Ee,newDraggableIndex:Ze,hideGhostForTarget:zo,unhideGhostForTarget:Po,cloneNowHidden:function(){Qe=!0},cloneNowShown:function(){Qe=!1},dispatchSortableEvent:function(c){ve({sortable:t,name:c,originalEvent:m})}},f))};function ve(e){_c(We({putSortable:pe,cloneEl:ae,targetEl:K,rootEl:se,oldIndex:yt,oldDraggableIndex:Ft,newIndex:Ee,newDraggableIndex:Ze},e))}var K,ce,ie,se,nt,oi,ae,Qe,yt,Ee,Ft,Ze,Yt,pe,mt=!1,yi=!1,bi=[],tt,_e,ji,Vi,wr,Cr,_t,ft,zt,Pt=!1,Zt=!1,si,fe,Ui=[],vn=!1,wi=[],Di=typeof document<"u",Qt=Yn,Sr=Ut||Ye?"cssFloat":"float",Ic=Di&&!To&&!Yn&&"draggable"in document.createElement("div"),Do=(function(){if(Di){if(Ye)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),No=function(i,t){var n=ee(i),m=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),f=St(i,0,t),g=St(i,1,t),c=f&&ee(f),o=g&&ee(g),h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+ue(f).width,u=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+ue(g).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(f&&c.float&&c.float!=="none"){var d=c.float==="left"?"left":"right";return g&&(o.clear==="both"||o.clear===d)?"vertical":"horizontal"}return f&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||h>=m&&n[Sr]==="none"||g&&n[Sr]==="none"&&h+u>m)?"vertical":"horizontal"},Dc=function(i,t,n){var m=n?i.left:i.top,f=n?i.right:i.bottom,g=n?i.width:i.height,c=n?t.left:t.top,o=n?t.right:t.bottom,h=n?t.width:t.height;return m===c||f===o||m+g/2===c+h/2},Nc=function(i,t){var n;return bi.some(function(m){var f=m[Ce].options.emptyInsertThreshold;if(!(!f||Zn(m))){var g=ue(m),c=i>=g.left-f&&i<=g.right+f,o=t>=g.top-f&&t<=g.bottom+f;if(c&&o)return n=m}}),n},Fo=function(i){function t(f,g){return function(c,o,h,u){var d=c.options.group.name&&o.options.group.name&&c.options.group.name===o.options.group.name;if(f==null&&(g||d))return!0;if(f==null||f===!1)return!1;if(g&&f==="clone")return f;if(typeof f=="function")return t(f(c,o,h,u),g)(c,o,h,u);var l=(g?c:o).options.group.name;return f===!0||typeof f=="string"&&f===l||f.join&&f.indexOf(l)>-1}}var n={},m=i.group;(!m||mn(m)!="object")&&(m={name:m}),n.name=m.name,n.checkPull=t(m.pull,!0),n.checkPut=t(m.put),n.revertClone=m.revertClone,i.group=n},zo=function(){!Do&&ie&&ee(ie,"display","none")},Po=function(){!Do&&ie&&ee(ie,"display","")};Di&&!To&&document.addEventListener("click",function(e){if(yi)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),yi=!1,!1},!0);var it=function(i){if(K){i=i.touches?i.touches[0]:i;var t=Nc(i.clientX,i.clientY);if(t){var n={};for(var m in i)i.hasOwnProperty(m)&&(n[m]=i[m]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Ce]._onDragOver(n)}}},Fc=function(i){K&&K.parentNode[Ce]._isOutsideThisEl(i.target)};function J(e,i){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=i=Ke({},i),e[Ce]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return No(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(g,c){g.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:J.supportPointer!==!1&&"PointerEvent"in window&&(!Dt||Yn),emptyInsertThreshold:5};Gt.initializePlugins(this,e,t);for(var n in t)!(n in i)&&(i[n]=t[n]);Fo(i);for(var m in this)m.charAt(0)==="_"&&typeof this[m]=="function"&&(this[m]=this[m].bind(this));this.nativeDraggable=i.forceFallback?!1:Ic,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?re(e,"pointerdown",this._onTapStart):(re(e,"mousedown",this._onTapStart),re(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(re(e,"dragover",this),re(e,"dragenter",this)),bi.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),Ke(this,$c())}J.prototype={constructor:J,_isOutsideThisEl:function(i){!this.el.contains(i)&&i!==this.el&&(ft=null)},_getDirection:function(i,t){return typeof this.options.direction=="function"?this.options.direction.call(this,i,t,K):this.options.direction},_onTapStart:function(i){if(i.cancelable){var t=this,n=this.el,m=this.options,f=m.preventOnFilter,g=i.type,c=i.touches&&i.touches[0]||i.pointerType&&i.pointerType==="touch"&&i,o=(c||i).target,h=i.target.shadowRoot&&(i.path&&i.path[0]||i.composedPath&&i.composedPath()[0])||o,u=m.filter;if(Uc(n),!K&&!(/mousedown|pointerdown/.test(g)&&i.button!==0||m.disabled)&&!h.isContentEditable&&!(!this.nativeDraggable&&Dt&&o&&o.tagName.toUpperCase()==="SELECT")&&(o=Ie(o,m.draggable,n,!1),!(o&&o.animated)&&oi!==o)){if(yt=ke(o),Ft=ke(o,m.draggable),typeof u=="function"){if(u.call(this,i,o,this)){ve({sortable:t,rootEl:h,name:"filter",targetEl:o,toEl:n,fromEl:n}),ye("filter",t,{evt:i}),f&&i.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=Ie(h,d.trim(),n,!1),d)return ve({sortable:t,rootEl:d,name:"filter",targetEl:o,fromEl:n,toEl:n}),ye("filter",t,{evt:i}),!0}),u)){f&&i.preventDefault();return}m.handle&&!Ie(h,m.handle,n,!1)||this._prepareDragStart(i,c,o)}}},_prepareDragStart:function(i,t,n){var m=this,f=m.el,g=m.options,c=f.ownerDocument,o;if(n&&!K&&n.parentNode===f){var h=ue(n);if(se=f,K=n,ce=K.parentNode,nt=K.nextSibling,oi=n,Yt=g.group,J.dragged=K,tt={target:K,clientX:(t||i).clientX,clientY:(t||i).clientY},wr=tt.clientX-h.left,Cr=tt.clientY-h.top,this._lastX=(t||i).clientX,this._lastY=(t||i).clientY,K.style["will-change"]="all",o=function(){if(ye("delayEnded",m,{evt:i}),J.eventCanceled){m._onDrop();return}m._disableDelayedDragEvents(),!mr&&m.nativeDraggable&&(K.draggable=!0),m._triggerDragStart(i,t),ve({sortable:m,name:"choose",originalEvent:i}),xe(K,g.chosenClass,!0)},g.ignore.split(",").forEach(function(u){Lo(K,u.trim(),Gi)}),re(c,"dragover",it),re(c,"mousemove",it),re(c,"touchmove",it),g.supportPointer?(re(c,"pointerup",m._onDrop),!this.nativeDraggable&&re(c,"pointercancel",m._onDrop)):(re(c,"mouseup",m._onDrop),re(c,"touchend",m._onDrop),re(c,"touchcancel",m._onDrop)),mr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),ye("delayStart",this,{evt:i}),g.delay&&(!g.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ut||Ye))){if(J.eventCanceled){this._onDrop();return}g.supportPointer?(re(c,"pointerup",m._disableDelayedDrag),re(c,"pointercancel",m._disableDelayedDrag)):(re(c,"mouseup",m._disableDelayedDrag),re(c,"touchend",m._disableDelayedDrag),re(c,"touchcancel",m._disableDelayedDrag)),re(c,"mousemove",m._delayedDragTouchMoveHandler),re(c,"touchmove",m._delayedDragTouchMoveHandler),g.supportPointer&&re(c,"pointermove",m._delayedDragTouchMoveHandler),m._dragStartTimer=setTimeout(o,g.delay)}else o()}},_delayedDragTouchMoveHandler:function(i){var t=i.touches?i.touches[0]:i;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Gi(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var i=this.el.ownerDocument;ne(i,"mouseup",this._disableDelayedDrag),ne(i,"touchend",this._disableDelayedDrag),ne(i,"touchcancel",this._disableDelayedDrag),ne(i,"pointerup",this._disableDelayedDrag),ne(i,"pointercancel",this._disableDelayedDrag),ne(i,"mousemove",this._delayedDragTouchMoveHandler),ne(i,"touchmove",this._delayedDragTouchMoveHandler),ne(i,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(i,t){t=t||i.pointerType=="touch"&&i,!this.nativeDraggable||t?this.options.supportPointer?re(document,"pointermove",this._onTouchMove):t?re(document,"touchmove",this._onTouchMove):re(document,"mousemove",this._onTouchMove):(re(K,"dragend",this),re(se,"dragstart",this._onDragStart));try{document.selection?ai(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(i,t){if(mt=!1,se&&K){ye("dragStarted",this,{evt:t}),this.nativeDraggable&&re(document,"dragover",Fc);var n=this.options;!i&&xe(K,n.dragClass,!1),xe(K,n.ghostClass,!0),J.active=this,i&&this._appendGhost(),ve({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(_e){this._lastX=_e.clientX,this._lastY=_e.clientY,zo();for(var i=document.elementFromPoint(_e.clientX,_e.clientY),t=i;i&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(_e.clientX,_e.clientY),i!==t);)t=i;if(K.parentNode[Ce]._isOutsideThisEl(i),t)do{if(t[Ce]){var n=void 0;if(n=t[Ce]._onDragOver({clientX:_e.clientX,clientY:_e.clientY,target:i,rootEl:t}),n&&!this.options.dragoverBubble)break}i=t}while(t=$o(t));Po()}},_onTouchMove:function(i){if(tt){var t=this.options,n=t.fallbackTolerance,m=t.fallbackOffset,f=i.touches?i.touches[0]:i,g=ie&&Ct(ie,!0),c=ie&&g&&g.a,o=ie&&g&&g.d,h=Qt&&fe&&br(fe),u=(f.clientX-tt.clientX+m.x)/(c||1)+(h?h[0]-Ui[0]:0)/(c||1),d=(f.clientY-tt.clientY+m.y)/(o||1)+(h?h[1]-Ui[1]:0)/(o||1);if(!J.active&&!mt){if(n&&Math.max(Math.abs(f.clientX-this._lastX),Math.abs(f.clientY-this._lastY))<n)return;this._onDragStart(i,!0)}if(ie){g?(g.e+=u-(ji||0),g.f+=d-(Vi||0)):g={a:1,b:0,c:0,d:1,e:u,f:d};var l="matrix(".concat(g.a,",").concat(g.b,",").concat(g.c,",").concat(g.d,",").concat(g.e,",").concat(g.f,")");ee(ie,"webkitTransform",l),ee(ie,"mozTransform",l),ee(ie,"msTransform",l),ee(ie,"transform",l),ji=u,Vi=d,_e=f}i.cancelable&&i.preventDefault()}},_appendGhost:function(){if(!ie){var i=this.options.fallbackOnBody?document.body:se,t=ue(K,!0,Qt,!0,i),n=this.options;if(Qt){for(fe=i;ee(fe,"position")==="static"&&ee(fe,"transform")==="none"&&fe!==document;)fe=fe.parentNode;fe!==document.body&&fe!==document.documentElement?(fe===document&&(fe=Pe()),t.top+=fe.scrollTop,t.left+=fe.scrollLeft):fe=Pe(),Ui=br(fe)}ie=K.cloneNode(!0),xe(ie,n.ghostClass,!1),xe(ie,n.fallbackClass,!0),xe(ie,n.dragClass,!0),ee(ie,"transition",""),ee(ie,"transform",""),ee(ie,"box-sizing","border-box"),ee(ie,"margin",0),ee(ie,"top",t.top),ee(ie,"left",t.left),ee(ie,"width",t.width),ee(ie,"height",t.height),ee(ie,"opacity","0.8"),ee(ie,"position",Qt?"absolute":"fixed"),ee(ie,"zIndex","100000"),ee(ie,"pointerEvents","none"),J.ghost=ie,i.appendChild(ie),ee(ie,"transform-origin",wr/parseInt(ie.style.width)*100+"% "+Cr/parseInt(ie.style.height)*100+"%")}},_onDragStart:function(i,t){var n=this,m=i.dataTransfer,f=n.options;if(ye("dragStart",this,{evt:i}),J.eventCanceled){this._onDrop();return}ye("setupClone",this),J.eventCanceled||(ae=Oo(K),ae.removeAttribute("id"),ae.draggable=!1,ae.style["will-change"]="",this._hideClone(),xe(ae,this.options.chosenClass,!1),J.clone=ae),n.cloneId=ai(function(){ye("clone",n),!J.eventCanceled&&(n.options.removeCloneOnHide||se.insertBefore(ae,K),n._hideClone(),ve({sortable:n,name:"clone"}))}),!t&&xe(K,f.dragClass,!0),t?(yi=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ne(document,"mouseup",n._onDrop),ne(document,"touchend",n._onDrop),ne(document,"touchcancel",n._onDrop),m&&(m.effectAllowed="move",f.setData&&f.setData.call(n,m,K)),re(document,"drop",n),ee(K,"transform","translateZ(0)")),mt=!0,n._dragStartId=ai(n._dragStarted.bind(n,t,i)),re(document,"selectstart",n),_t=!0,window.getSelection().removeAllRanges(),Dt&&ee(document.body,"user-select","none")},_onDragOver:function(i){var t=this.el,n=i.target,m,f,g,c=this.options,o=c.group,h=J.active,u=Yt===o,d=c.sort,l=pe||h,s,r=this,a=!1;if(vn)return;function p(O,I){ye(O,r,We({evt:i,isOwner:u,axis:s?"vertical":"horizontal",revert:g,dragRect:m,targetRect:f,canSort:d,fromSortable:l,target:n,completed:y,onMove:function(F,z){return Xt(se,t,K,m,F,ue(F),i,z)},changed:k},I))}function v(){p("dragOverAnimationCapture"),r.captureAnimationState(),r!==l&&l.captureAnimationState()}function y(O){return p("dragOverCompleted",{insertion:O}),O&&(u?h._hideClone():h._showClone(r),r!==l&&(xe(K,pe?pe.options.ghostClass:h.options.ghostClass,!1),xe(K,c.ghostClass,!0)),pe!==r&&r!==J.active?pe=r:r===J.active&&pe&&(pe=null),l===r&&(r._ignoreWhileAnimating=n),r.animateAll(function(){p("dragOverAnimationComplete"),r._ignoreWhileAnimating=null}),r!==l&&(l.animateAll(),l._ignoreWhileAnimating=null)),(n===K&&!K.animated||n===t&&!n.animated)&&(ft=null),!c.dragoverBubble&&!i.rootEl&&n!==document&&(K.parentNode[Ce]._isOutsideThisEl(i.target),!O&&it(i)),!c.dragoverBubble&&i.stopPropagation&&i.stopPropagation(),a=!0}function k(){Ee=ke(K),Ze=ke(K,c.draggable),ve({sortable:r,name:"change",toEl:t,newIndex:Ee,newDraggableIndex:Ze,originalEvent:i})}if(i.preventDefault!==void 0&&i.cancelable&&i.preventDefault(),n=Ie(n,c.draggable,t,!0),p("dragOver"),J.eventCanceled)return a;if(K.contains(i.target)||n.animated&&n.animatingX&&n.animatingY||r._ignoreWhileAnimating===n)return y(!1);if(yi=!1,h&&!c.disabled&&(u?d||(g=ce!==se):pe===this||(this.lastPutMode=Yt.checkPull(this,h,K,i))&&o.checkPut(this,h,K,i))){if(s=this._getDirection(i,n)==="vertical",m=ue(K),p("dragOverValid"),J.eventCanceled)return a;if(g)return ce=se,v(),this._hideClone(),p("revert"),J.eventCanceled||(nt?se.insertBefore(K,nt):se.appendChild(K)),y(!0);var x=Zn(t,c.draggable);if(!x||Wc(i,s,this)&&!x.animated){if(x===K)return y(!1);if(x&&t===i.target&&(n=x),n&&(f=ue(n)),Xt(se,t,K,m,n,f,i,!!n)!==!1)return v(),x&&x.nextSibling?t.insertBefore(K,x.nextSibling):t.appendChild(K),ce=t,k(),y(!0)}else if(x&&Hc(i,s,this)){var w=St(t,0,c,!0);if(w===K)return y(!1);if(n=w,f=ue(n),Xt(se,t,K,m,n,f,i,!1)!==!1)return v(),t.insertBefore(K,w),ce=t,k(),y(!0)}else if(n.parentNode===t){f=ue(n);var S=0,M,L=K.parentNode!==t,R=!Dc(K.animated&&K.toRect||m,n.animated&&n.toRect||f,s),$=s?"top":"left",D=yr(n,"top","top")||yr(K,"top","top"),T=D?D.scrollTop:void 0;ft!==n&&(M=f[$],Pt=!1,Zt=!R&&c.invertSwap||L),S=Bc(i,n,f,s,R?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,Zt,ft===n);var E;if(S!==0){var C=ke(K);do C-=S,E=ce.children[C];while(E&&(ee(E,"display")==="none"||E===ie))}if(S===0||E===n)return y(!1);ft=n,zt=S;var b=n.nextElementSibling,A=!1;A=S===1;var _=Xt(se,t,K,m,n,f,i,A);if(_!==!1)return(_===1||_===-1)&&(A=_===1),vn=!0,setTimeout(Pc,30),v(),A&&!b?t.appendChild(K):n.parentNode.insertBefore(K,A?b:n),D&&_o(D,0,T-D.scrollTop),ce=K.parentNode,M!==void 0&&!Zt&&(si=Math.abs(M-ue(n)[$])),k(),y(!0)}if(t.contains(K))return y(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ne(document,"mousemove",this._onTouchMove),ne(document,"touchmove",this._onTouchMove),ne(document,"pointermove",this._onTouchMove),ne(document,"dragover",it),ne(document,"mousemove",it),ne(document,"touchmove",it)},_offUpEvents:function(){var i=this.el.ownerDocument;ne(i,"mouseup",this._onDrop),ne(i,"touchend",this._onDrop),ne(i,"pointerup",this._onDrop),ne(i,"pointercancel",this._onDrop),ne(i,"touchcancel",this._onDrop),ne(document,"selectstart",this)},_onDrop:function(i){var t=this.el,n=this.options;if(Ee=ke(K),Ze=ke(K,n.draggable),ye("drop",this,{evt:i}),ce=K&&K.parentNode,Ee=ke(K),Ze=ke(K,n.draggable),J.eventCanceled){this._nulling();return}mt=!1,Zt=!1,Pt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),yn(this.cloneId),yn(this._dragStartId),this.nativeDraggable&&(ne(document,"drop",this),ne(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Dt&&ee(document.body,"user-select",""),ee(K,"transform",""),i&&(_t&&(i.cancelable&&i.preventDefault(),!n.dropBubble&&i.stopPropagation()),ie&&ie.parentNode&&ie.parentNode.removeChild(ie),(se===ce||pe&&pe.lastPutMode!=="clone")&&ae&&ae.parentNode&&ae.parentNode.removeChild(ae),K&&(this.nativeDraggable&&ne(K,"dragend",this),Gi(K),K.style["will-change"]="",_t&&!mt&&xe(K,pe?pe.options.ghostClass:this.options.ghostClass,!1),xe(K,this.options.chosenClass,!1),ve({sortable:this,name:"unchoose",toEl:ce,newIndex:null,newDraggableIndex:null,originalEvent:i}),se!==ce?(Ee>=0&&(ve({rootEl:ce,name:"add",toEl:ce,fromEl:se,originalEvent:i}),ve({sortable:this,name:"remove",toEl:ce,originalEvent:i}),ve({rootEl:ce,name:"sort",toEl:ce,fromEl:se,originalEvent:i}),ve({sortable:this,name:"sort",toEl:ce,originalEvent:i})),pe&&pe.save()):Ee!==yt&&Ee>=0&&(ve({sortable:this,name:"update",toEl:ce,originalEvent:i}),ve({sortable:this,name:"sort",toEl:ce,originalEvent:i})),J.active&&((Ee==null||Ee===-1)&&(Ee=yt,Ze=Ft),ve({sortable:this,name:"end",toEl:ce,originalEvent:i}),this.save()))),this._nulling()},_nulling:function(){ye("nulling",this),se=K=ce=ie=nt=ae=oi=Qe=tt=_e=_t=Ee=Ze=yt=Ft=ft=zt=pe=Yt=J.dragged=J.ghost=J.clone=J.active=null;var i=this.el;wi.forEach(function(t){i.contains(t)&&(t.checked=!0)}),wi.length=ji=Vi=0},handleEvent:function(i){switch(i.type){case"drop":case"dragend":this._onDrop(i);break;case"dragenter":case"dragover":K&&(this._onDragOver(i),zc(i));break;case"selectstart":i.preventDefault();break}},toArray:function(){for(var i=[],t,n=this.el.children,m=0,f=n.length,g=this.options;m<f;m++)t=n[m],Ie(t,g.draggable,this.el,!1)&&i.push(t.getAttribute(g.dataIdAttr)||Vc(t));return i},sort:function(i,t){var n={},m=this.el;this.toArray().forEach(function(f,g){var c=m.children[g];Ie(c,this.options.draggable,m,!1)&&(n[f]=c)},this),t&&this.captureAnimationState(),i.forEach(function(f){n[f]&&(m.removeChild(n[f]),m.appendChild(n[f]))}),t&&this.animateAll()},save:function(){var i=this.options.store;i&&i.set&&i.set(this)},closest:function(i,t){return Ie(i,t||this.options.draggable,this.el,!1)},option:function(i,t){var n=this.options;if(t===void 0)return n[i];var m=Gt.modifyOption(this,i,t);typeof m<"u"?n[i]=m:n[i]=t,i==="group"&&Fo(n)},destroy:function(){ye("destroy",this);var i=this.el;i[Ce]=null,ne(i,"mousedown",this._onTapStart),ne(i,"touchstart",this._onTapStart),ne(i,"pointerdown",this._onTapStart),this.nativeDraggable&&(ne(i,"dragover",this),ne(i,"dragenter",this)),Array.prototype.forEach.call(i.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),bi.splice(bi.indexOf(this.el),1),this.el=i=null},_hideClone:function(){if(!Qe){if(ye("hideClone",this),J.eventCanceled)return;ee(ae,"display","none"),this.options.removeCloneOnHide&&ae.parentNode&&ae.parentNode.removeChild(ae),Qe=!0}},_showClone:function(i){if(i.lastPutMode!=="clone"){this._hideClone();return}if(Qe){if(ye("showClone",this),J.eventCanceled)return;K.parentNode==se&&!this.options.group.revertClone?se.insertBefore(ae,K):nt?se.insertBefore(ae,nt):se.appendChild(ae),this.options.group.revertClone&&this.animate(K,ae),ee(ae,"display",""),Qe=!1}}};function zc(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Xt(e,i,t,n,m,f,g,c){var o,h=e[Ce],u=h.options.onMove,d;return window.CustomEvent&&!Ye&&!Ut?o=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(o=document.createEvent("Event"),o.initEvent("move",!0,!0)),o.to=i,o.from=e,o.dragged=t,o.draggedRect=n,o.related=m||i,o.relatedRect=f||ue(i),o.willInsertAfter=c,o.originalEvent=g,e.dispatchEvent(o),u&&(d=u.call(h,o,g)),d}function Gi(e){e.draggable=!1}function Pc(){vn=!1}function Hc(e,i,t){var n=ue(St(t.el,0,t.options,!0)),m=Io(t.el,t.options,ie),f=10;return i?e.clientX<m.left-f||e.clientY<n.top&&e.clientX<n.right:e.clientY<m.top-f||e.clientY<n.bottom&&e.clientX<n.left}function Wc(e,i,t){var n=ue(Zn(t.el,t.options.draggable)),m=Io(t.el,t.options,ie),f=10;return i?e.clientX>m.right+f||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>m.bottom+f||e.clientX>n.right&&e.clientY>n.top}function Bc(e,i,t,n,m,f,g,c){var o=n?e.clientY:e.clientX,h=n?t.height:t.width,u=n?t.top:t.left,d=n?t.bottom:t.right,l=!1;if(!g){if(c&&si<h*m){if(!Pt&&(zt===1?o>u+h*f/2:o<d-h*f/2)&&(Pt=!0),Pt)l=!0;else if(zt===1?o<u+si:o>d-si)return-zt}else if(o>u+h*(1-m)/2&&o<d-h*(1-m)/2)return jc(i)}return l=l||g,l&&(o<u+h*f/2||o>d-h*f/2)?o>u+h/2?1:-1:0}function jc(e){return ke(K)<ke(e)?1:-1}function Vc(e){for(var i=e.tagName+e.className+e.src+e.href+e.textContent,t=i.length,n=0;t--;)n+=i.charCodeAt(t);return n.toString(36)}function Uc(e){wi.length=0;for(var i=e.getElementsByTagName("input"),t=i.length;t--;){var n=i[t];n.checked&&wi.push(n)}}function ai(e){return setTimeout(e,0)}function yn(e){return clearTimeout(e)}Di&&re(document,"touchmove",function(e){(J.active||mt)&&e.cancelable&&e.preventDefault()});J.utils={on:re,off:ne,css:ee,find:Lo,is:function(i,t){return!!Ie(i,t,i,!1)},extend:Tc,throttle:Ro,closest:Ie,toggleClass:xe,clone:Oo,index:ke,nextTick:ai,cancelNextTick:yn,detectDirection:No,getChild:St,expando:Ce};J.get=function(e){return e[Ce]};J.mount=function(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];i[0].constructor===Array&&(i=i[0]),i.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(J.utils=We(We({},J.utils),n.utils)),Gt.mount(n)})};J.create=function(e,i){return new J(e,i)};J.version=Ac;var de=[],Ot,bn,wn=!1,Ki,qi,Ci,It;function Gc(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?re(document,"dragover",this._handleAutoScroll):this.options.supportPointer?re(document,"pointermove",this._handleFallbackAutoScroll):n.touches?re(document,"touchmove",this._handleFallbackAutoScroll):re(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?ne(document,"dragover",this._handleAutoScroll):(ne(document,"pointermove",this._handleFallbackAutoScroll),ne(document,"touchmove",this._handleFallbackAutoScroll),ne(document,"mousemove",this._handleFallbackAutoScroll)),xr(),li(),Mc()},nulling:function(){Ci=bn=Ot=wn=It=Ki=qi=null,de.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var m=this,f=(t.touches?t.touches[0]:t).clientX,g=(t.touches?t.touches[0]:t).clientY,c=document.elementFromPoint(f,g);if(Ci=t,n||this.options.forceAutoScrollFallback||Ut||Ye||Dt){Yi(t,this.options,c,n);var o=Xe(c,!0);wn&&(!It||f!==Ki||g!==qi)&&(It&&xr(),It=setInterval(function(){var h=Xe(document.elementFromPoint(f,g),!0);h!==o&&(o=h,li()),Yi(t,m.options,h,n)},10),Ki=f,qi=g)}else{if(!this.options.bubbleScroll||Xe(c,!0)===Pe()){li();return}Yi(t,this.options,Xe(c,!1),!1)}}},Ke(e,{pluginName:"scroll",initializeByDefault:!0})}function li(){de.forEach(function(e){clearInterval(e.pid)}),de=[]}function xr(){clearInterval(It)}var Yi=Ro(function(e,i,t,n){if(i.scroll){var m=(e.touches?e.touches[0]:e).clientX,f=(e.touches?e.touches[0]:e).clientY,g=i.scrollSensitivity,c=i.scrollSpeed,o=Pe(),h=!1,u;bn!==t&&(bn=t,li(),Ot=i.scroll,u=i.scrollFn,Ot===!0&&(Ot=Xe(t,!0)));var d=0,l=Ot;do{var s=l,r=ue(s),a=r.top,p=r.bottom,v=r.left,y=r.right,k=r.width,x=r.height,w=void 0,S=void 0,M=s.scrollWidth,L=s.scrollHeight,R=ee(s),$=s.scrollLeft,D=s.scrollTop;s===o?(w=k<M&&(R.overflowX==="auto"||R.overflowX==="scroll"||R.overflowX==="visible"),S=x<L&&(R.overflowY==="auto"||R.overflowY==="scroll"||R.overflowY==="visible")):(w=k<M&&(R.overflowX==="auto"||R.overflowX==="scroll"),S=x<L&&(R.overflowY==="auto"||R.overflowY==="scroll"));var T=w&&(Math.abs(y-m)<=g&&$+k<M)-(Math.abs(v-m)<=g&&!!$),E=S&&(Math.abs(p-f)<=g&&D+x<L)-(Math.abs(a-f)<=g&&!!D);if(!de[d])for(var C=0;C<=d;C++)de[C]||(de[C]={});(de[d].vx!=T||de[d].vy!=E||de[d].el!==s)&&(de[d].el=s,de[d].vx=T,de[d].vy=E,clearInterval(de[d].pid),(T!=0||E!=0)&&(h=!0,de[d].pid=setInterval(function(){n&&this.layer===0&&J.active._onTouchMove(Ci);var b=de[this.layer].vy?de[this.layer].vy*c:0,A=de[this.layer].vx?de[this.layer].vx*c:0;typeof u=="function"&&u.call(J.dragged.parentNode[Ce],A,b,e,Ci,de[this.layer].el)!=="continue"||_o(de[this.layer].el,A,b)}.bind({layer:d}),24))),d++}while(i.bubbleScroll&&l!==o&&(l=Xe(l,!1)));wn=h}},30),Ho=function(i){var t=i.originalEvent,n=i.putSortable,m=i.dragEl,f=i.activeSortable,g=i.dispatchSortableEvent,c=i.hideGhostForTarget,o=i.unhideGhostForTarget;if(t){var h=n||f;c();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(u.clientX,u.clientY);o(),h&&!h.el.contains(d)&&(g("spill"),this.onSpill({dragEl:m,putSortable:n}))}};function Qn(){}Qn.prototype={startIndex:null,dragStart:function(i){var t=i.oldDraggableIndex;this.startIndex=t},onSpill:function(i){var t=i.dragEl,n=i.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var m=St(this.sortable.el,this.startIndex,this.options);m?this.sortable.el.insertBefore(t,m):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Ho};Ke(Qn,{pluginName:"revertOnSpill"});function Xn(){}Xn.prototype={onSpill:function(i){var t=i.dragEl,n=i.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Ho};Ke(Xn,{pluginName:"removeOnSpill"});J.mount(new Gc);J.mount(Xn,Qn);var me={getStyle:(e,i=!1)=>{let t;return window.getComputedStyle?t=window.getComputedStyle(e,null):e.currentStyle&&(t=e.currentStyle),i?t[i]:t},fadeOut:(e,i=250)=>{const t=1/(i/60);e.style.opacity=1,(function n(){const m=Number(e.style.opacity)-t;m>0?(e.style.opacity=m,window.requestAnimationFrame(n)):e.remove()})()},slideDown:(e,i=250,t=!1)=>{e.style.display="block";const n=me.getStyle(e),m=Number.parseInt(n.height,10),f=m/(i/60);e.style.height="0px",(function g(){const c=Number.parseFloat(e.style.height),o=c+f;c<m?(e.style.height=`${o}px`,window.requestAnimationFrame(g)):(e.style.height="auto",t&&t(e))})()},slideUp:(e,i=250,t=!1)=>{const n=me.getStyle(e),m=Number.parseInt(n.height,10),f=n.overflow;e.style.overflow="hidden",e.style.height=`${m}px`;const g=n.minHeight;e.style.minHeight="auto";const c=parseFloat(m/(i/60)).toFixed(2);(function o(){const h=Number.parseInt(e.style.height,10)-c;h>0?(e.style.height=`${h}px`,window.requestAnimationFrame(o)):(e.style.overflow=f,e.style.display="none",e.style.minHeight=g,delete e.style.height,t&&t(e))})()},slideToggle:(e,i=250,t=me.getStyle(e,"display")==="none")=>{t?me.slideDown(e,i):me.slideUp(e,i)}},Wo=e=>Number.isInteger(Number(e)),Je=e=>{let i=0,t=e;for(;t?.previousElementSibling;)t=t.previousElementSibling,i++;return i},Si=(e,i,t)=>{const n=t.split("||");return st(st(i).map(m=>e.find(f=>{const g=n.find(c=>!!we(f,c));return g&&we(f,g)===m})).filter(Boolean).concat(e))},Ni=(e,i,t)=>{for(let n=0;n<e.length;n++)i.call(t,e[n],n)},Jn=(e,i)=>{const t=[];return Ni(e,(n,m)=>t.push(i(n,m))),t},Zi={},Bo=e=>{const i={className:"class"};if(Zi[e])return Zi[e];const t=(i[e]||e).replace(/^\d+/,"").replace(/[^a-zA-Z0-9-:]/g,"");return Zi[e]=t,t},jo=e=>e.replace(/\b\w/g,i=>i.toUpperCase()),Kc=e=>window.JSON.parse(window.JSON.stringify(e)),qc=(e,i)=>i.filter(t=>!~e.indexOf(t)),Ae={capitalize:jo,safeAttrName:Bo,forEach:Ni,copyObj:Kc,map:Jn,subtract:qc,indexOfNode:Je,isInt:Wo,get:we,orderObjectsBy:Si},$e={js:new Set,css:new Set,formeoSprite:null},Er=(e,i,t=hn)=>new Promise(n=>fetch(e).then(m=>{if(!m.ok)return n(t(m));n(i?i(m):m)}).catch(m=>t(m))),Vo=(e,i)=>{e.removeEventListener("load",Vo),i(e.src)},Uo=(e,i)=>{e.removeEventListener("load",Uo),i(e.src)},Yc=e=>new Promise((i,t)=>{if($e.js.has(e))return i(e);$e.js.add(e);const n=V.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:e},action:{load:()=>Uo(n,i),error:()=>t(new Error(`${e} failed to load.`))}});document.head.appendChild(n)}),Cn=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>new Promise((n,m)=>{if($e.css.has(t))return n(t);$e.css.add(t);const f=V.create({tag:"link",attrs:{rel:"stylesheet",href:t},action:{load:()=>Vo(f,n),error:()=>m(new Error(`${t} failed to load.`))}});document.head.appendChild(f)}));return Promise.all(i)},Zc=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>Yc(t));return Promise.all(i)},Qc=e=>{e=Array.isArray(e)?e:[e];const i=e.map(t=>Cn(t));return Promise.all(i)},Ar=e=>($e.formeoSprite=new DOMParser().parseFromString(e,"image/svg+xml").documentElement,$e.formeoSprite),Xc=async(e=null)=>{if($e.formeoSprite)return $e.formeoSprite;if(!e)return Ar(el);const i=async t=>Ar(await t.text());return Er(e,i,()=>Er(il,i))},Jc={js:Zc,css:Qc},Go=e=>{const i=Object.entries(e).map(([t,n])=>Jc[t](n));return Promise.all(i)},ed=async e=>{if(e&&!$e.css.has(e)&&(await Cn(e),!$e.css.has(e)&&!$e.css.has("https://draggable.github.io/formeo/assets/css/formeo.min.css")))return await Cn(rl)},td={glyphicons:e=>`<span class="glyphicon glyphicon-${e}" aria-hidden="true"></span>`,"font-awesome":e=>{const[i,t]=e.split(" ");return`<i class="${i} fa-${t}"></i>`},fontello:e=>`<i class="${So}${e}">${e}</i>`},id=new Set(["input","textarea","select"]),nd=e=>e.replace(/^on([A-Z])/,(i,t)=>t.toLowerCase()),rd=new Set(["focus","blur"]),od=e=>{const i=nd(e);return(t,n)=>t.addEventListener(i,n,rd.has(i))},Ko=(e={})=>{let i=e?.attrs?.name||e?.name;if(i)return i;const t=Me(e);let n=e.config?.label||e.attrs?.label||e?.label;return n&&(typeof n=="object"&&(n=V.create(n).textContent),/^<.+>.+<.+>$/gim.test(n)&&(n=Rl(n)),i=`${t}-${xo(_l(n,24,null))}`),i||t},sd=class{constructor(e=Object.create(null)){this.options=e}set setOptions(e){this.options=De(this.options,e)}processElemArg(e){let i=e,t;if(typeof i=="string")return t=i,i={tag:t},i;if(i.attrs){const{tag:n,...m}=i.attrs;n&&(typeof n=="string"?t=n:t=(n.find(f=>f.selected===!0)||n[0]).value),i.attrs=m}return i.tag=t||i.tag||"div",i}render=e=>(e.id=`f-${e.id||Me()}`,this.create(e));create=(e,i=!1)=>{if(!e)return;if(this.isDOMElement(e))return e;const t=this,n=["children","content"],{className:m,options:f,dataset:g,...c}=this.processElemArg(e);n.push("tag");let o;const{tag:h}=c;let u;const d={attrs:{},className:[Ae.get(c,"config.inputWrap")],children:[],config:{}};let l=document.createElement(h);const s={string:a=>{l.innerHTML+=a},object:a=>a&&l.appendChild(t.create(a,i)),node:a=>l.appendChild(a),component:a=>l.appendChild(a.dom),array:a=>{for(const p of a)o=t.childType(p),s[o](p)},function:a=>{a=a(),o=t.childType(a),s[o](a)},undefined:()=>null,boolean:()=>null};if(m&&(c.attrs=De(c.attrs,{className:m})),f){const a=this.processOptions(f,c,i);if(this.holdsContent(l)&&h!=="button")s.array.call(this,a),c.content=void 0;else return Ae.forEach(a,p=>{d.children.push(t.create(p,i))}),c.attrs.className&&(d.className=c.attrs.className),d.id=c.id,d.config={...c.config},this.create(d,i);n.push("options")}if(c.attrs&&(t.processAttrs(c,l,i),n.push("attrs")),c.config){if(c.config.label&&(c.config.label&&h!=="button"||["radio","checkbox"].includes(Ae.get(c,"attrs.type")))&&!i){const a=t.label(c);if(!c.config.hideLabel){const p=[a,l];t.labelAfter(c)&&p.reverse(),d.children.push(p)}}n.push("config")}if(c.content||c.children){const a=c.content||c.children;o=t.childType(a),s[o]||console.error(`childType: ${o} is not supported`),s[o].call(this,a)}if(g){for(const a in g)Object.hasOwn(g,a)&&(l.dataset[a]=typeof g[a]=="function"?g[a]():g[a]);n.push("dataset")}c.action&&(this.actionHandler(l,c.action),n.push("action"));const r=Ae.subtract(n,Object.keys(c));for(u=r.length-1;u>=0;u--)l[r[u]]=c[r[u]];return d.children.length&&(l=this.create(d)),l};onRender=(e,i,t=333)=>{const n=Date.now(),m=()=>{!e.parentElement&&Date.now()-n<t?window.requestAnimationFrame(m):e.parentElement&&i(e)};m()};actionHandler(e,i){const t={onRender:V.onRender,render:V.onRender};return Object.entries(i).map(([n,m])=>(Array.isArray(m)?m:[m]).map(f=>(t[n]||od(n))(e,f)))}get icons(){if(this.iconSymbols)return this.iconSymbols;const e=$e.formeoSprite.querySelectorAll("svg symbol"),i=t=>{const n=t.getAttribute("viewBox")||"0 0 24 24",m=Array.from(t.children).map(f=>f.cloneNode(!0).outerHTML).join("");return{tag:"svg",attrs:{className:["svg-icon",t.id],viewBox:n,xmlns:"http://www.w3.org/2000/svg"},children:m}};return this.iconSymbols=Array.from(e).reduce((t,n)=>{const m=n.id.replace(So,"");return t[m]=i(n),t},{}),this.cachedIcons={},this.iconSymbols}icon(e,i){if(!e)return;const t=`${e}?${new URLSearchParams(i).toString()}`;if(this.cachedIcons?.[t])return this.cachedIcons[t];const n=this.icons[e];if(n){if(i){const m=De(n,i);return this.cachedIcons[t]=V.create(m).outerHTML,this.cachedIcons[t]}return this.cachedIcons[t]=V.create(n).outerHTML,this.cachedIcons[t]}return td[V.options.iconFont]?.(e)||e}processAttrs(e,i,t){const{attrs:n={}}=e;if(!t&&!n.name&&n.name!==null&&this.isInput(e.tag)){const m=Ko(e);m&&i.setAttribute("name",m)}for(const m of Object.keys(n)){const f=Ae.safeAttrName(m),g=this.processAttrValue(n[m]);if(g!==!1)try{i.setAttribute(f,g)}catch(c){console.warn(`Could not set attribute ${f} with value ${g}`,c)}}}processAttrValue(e){if(typeof e=="function")return e();if(typeof e=="boolean")return e&&"";let i=e||"";if(Array.isArray(i))if(typeof i[0]=="object"){const t=i.filter(n=>n.selected===!0);i=t.length?t[0].value:i[0].value}else i=i.join(" ");return i}toggleElementsByStr=(e,i)=>{const t=[],n=(m,f)=>{f?(m.style.display="block",t.push(m)):m.style.display="none"};return V.elementsContainText(e,i,n),t};elementsContainText=(e,i,t)=>{const n=[];return Ni(e,m=>{const f=m.textContent.toLowerCase().indexOf(i.toLowerCase())!==-1;t?.(m,f),f&&n.push(m)}),n};generateOption=({type:e="option",label:i,value:t,i:n=0,selected:m})=>({tag:e==="option"?"option":"input",attrs:{type:e,value:t||`${e}-${n}`,[e==="option"?"selected":"checked"]:m||!n},config:{label:i||Z.get("labelCount",{label:Z.get("option"),count:n})}});processOptions(e,i,t){const{action:n,attrs:m={}}=i,f=m.type||i.tag,g=m.id||i.id,c=(o,h)=>{const{label:u,value:d,...l}=o,s=()=>{const r={tag:"input",attrs:{name:g,type:f,value:d||"",id:`${g}-${h}`,...l},action:n},a={tag:"label",attrs:{for:`${g}-${h}`},children:u},p={children:[r,a],className:[`f-${f}`]};return m.className&&(i.config.inputWrap=m.className),i.config.inline&&p.className.push(`f-${f}-inline`),o.selected&&(r.attrs.checked=!0),t&&(a.attrs.contenteditable=!0),p};return{select:()=>{const r=o.attrs||o,{label:a,checked:p,selected:v,attrs:y}={attrs:r,...o,...r};return{tag:"option",attrs:{...y,selected:!!(p||v)},children:a}},button:r=>{const{type:a,label:p,className:v,id:y}=r;return{...i,attrs:{type:a},className:v,id:y||Me(),options:void 0,children:p,action:i.action}},checkbox:s,radio:s}[f]?.(o)};return e.map(c)}holdsContent(e){return e.outerHTML.includes("/")}isBlockInput(e){return!this.isInput(e)&&this.holdsContent(e)}isInput(e){let i=e;return typeof i!="string"&&(i=i.tagName),id.has(i)}parsedHtml(e){const i=document.createElement("textarea");return i.innerHTML=e,i.textContent}labelAfter(e){const i=Ae.get(e,"attrs.type"),t=Ae.get(e,"config.labelAfter");return t===void 0?i==="checkbox"||i==="radio":t}requiredMark=()=>({tag:"span",className:"text-error",children:"*"});tooltip=e=>({tag:"span",className:"f-tooltip",dataset:{tooltip:e},content:V.icon("info-circle")});helpText=e=>({tag:"small",className:"f-help-text",children:e});label(e,i){const t=Ae.get(e,"attrs.required");let{config:{label:n="",helpText:m="",tooltip:f=null}}=e;const{id:g,attrs:c}=e;typeof n=="function"&&(n=n());const o={tag:"label",attrs:{for:g||c?.id},className:[],children:[n,t&&this.requiredMark(),f&&this.tooltip(f),m&&this.helpText(m)],action:{}};return i&&(o.attrs.for=void 0,o.attrs.contenteditable=!0,o.fMap=i),o}childType(e){return e===void 0?e:[["array",i=>Array.isArray(i)],["node",i=>i instanceof window.Node||i instanceof window.HTMLElement],["component",()=>e?.dom],[typeof e,()=>!0]].find(i=>i[1](e))[0]}getStyle(e,i=!1){let t;return window.getComputedStyle?t=window.getComputedStyle(e,null):e.currentStyle&&(t=e.currentStyle),i?t[i]:t}getElement(e){return{node:()=>e,object:()=>document.getElementById(e.id),string:()=>document.getElementById(e)}[this.childType(e)]()}empty(e){for(;e.firstChild;)this.remove(e.firstChild);return e}removeEmpty=e=>{const i=e.parentElement,t=be(e),n=i.getElementsByClassName(`formeo-${t}`);if(this.remove(e),!n.length)return this.isStage(i)?this.emptyClass(i):this.removeEmpty(i)};remove(e){const i=be(e);return i?oe.remove(`${i}s.${e.id}`):e.parentElement.removeChild(e)}removeClasses(e,i){const t={string:n=>n.classList.remove(i),array:n=>{for(const m of i)n.classList.remove(m)}};t.object=t.string,Ae.forEach(e,t[this.childType(i)])}addClasses(e,i){Ae.forEach(e,{string:t=>t.classList.add(i),array:t=>{for(const n of i)t.classList.add(n)}}[this.childType(i)])}formGroup(e,i=""){return{className:["f-field-group",i],children:e}}coords(e){const i=e.getBoundingClientRect(),t=document.body.getBoundingClientRect();return{pageX:i.left+i.width/2,pageY:i.top-t.top-i.height/2}}clearStage(e){e.classList.add("removing-all-fields");const i=()=>{V.empty(e),e.classList.remove("removing-all-fields"),V.emptyClass(e),me.slideDown(e,300)};me.slideUp(e,600,i)}toggleSortable(e,i){let t=i;const n=be(e);if(!n)return;const m=be(e.parentElement),f=V[n].get(e.id).sortable;t||(t=!f.option("disabled")),f.option("disabled",t),m&&["rows","columns","stages"].includes(m)&&this.toggleSortable(e.parentElement,t)}emptyClass(e){const i=e.getElementsByClassName(ol.get(e.classList.item(0)));e.classList.toggle("empty",!i.length)}btnTemplate=({title:e="",...i})=>({tag:"button",attrs:{type:"button",title:e},...i});isControls=e=>be(e)===ot;isStage=e=>be(e)===kt;isRow=e=>be(e)===Ue;isColumn=e=>be(e)===Ge;isField=e=>be(e)===Tt;asComponent=e=>oe[`${be(e)}s`].get(e.id);isDOMElement(e){return e instanceof window.Element||e instanceof window.HTMLElement||!!(e&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string")}},V=new sd,bt="f-autocomplete",ad=`${bt}-display-field`,er=`${bt}-list`,$t="highlight-component",xi=`${er}-item`,ld=(e,i)=>{const t=e.reduce((n,m)=>n+(m===i),0);return t>1?`(${t})`:""},qo=["config.label","config.controlId"],cd=["config.legend","name"],dd=[...qo,...cd],Qi=e=>qo.reduce((i,t)=>i||e.get(t),null),kr=e=>dd.reduce((i,t)=>i||e.get(t),null)||je(e.name),ud=new Map([["condition.source",Qi],["if.condition.source",Qi],["if.condition.target",Qi],["then.condition.target",kr],["condition.target",kr]]),Yo=({id:e,...i},t)=>{const{name:n,label:m}=i;return n?ud.get(t)(i):m},hd=({selectedId:e,...i})=>(i.value===e&&(i.selected=!0),i),Xi=e=>(e.classList.contains(xi)||(e=e.parentElement),e),Zo=({value:e,textLabel:i,htmlLabel:t,componentType:n,depth:m=0},f)=>{const g={tag:"li",children:t,dataset:{value:e,label:i},className:[xi,`${xi}-depth-${m}`,`component-type-${n}`],action:{mousedown:({target:c})=>{c=Xi(c),f.setValue(c),f.selectOption(c),f.hideList()},mouseover:({target:c})=>{c=Xi(c),f.removeHighlight(),f.highlightComponent(c)},mouseleave:({target:c})=>{c=Xi(c),f.removeHighlight()}}};return V.create(g)},pd=(e,i)=>{const t=e.data.options.map((n,m)=>{const f=`${e.address}.options[${m}]`,g=n.label,c=n.label;return Zo({value:f,textLabel:g,htmlLabel:c,componentType:"option",depth:1},i)});return V.create({tag:"ul",attrs:{className:[er,"options-list"]},children:t})},fd=e=>{const i=e.value,t=[],n=oe.flatList();return Object.entries(n).reduce((m,[f,g])=>{const c=Yo(g,e.key);if(c){const o=g.name,h={tag:"span",content:` ${je(o)}`,className:"component-type"},u=`${o}.${c}`;t.push(u);const d=ld(t,u),l={tag:"span",content:d,className:"component-label-count"},s=[`${c} `,l,h],r=[c,d].join(" ").trim();if(g.isCheckable){const p=pd(g,e);s.push(p)}const a=hd({value:f,textLabel:r,htmlLabel:s,componentType:o,selectedId:i});m.push(Zo(a,e))}return m},[])},gd=class{lastCache=Date.now();optionsCache=null;constructor({key:e,value:i,className:t,onChange:n=hn}){this.key=e,this.className=[t||this.key.replace(/\./g,"-")].flat(),this.value=i,this.onChange=n||hn,this.events=[],this.build()}createProxy(){return new Proxy(this,{get(e,i){if(i in e)return e[i];if(i in e.dom){const t=e.dom[i];return typeof t=="function"?t.bind(e.dom):t}},set(e,i,t){return i in e?e[i]=t:e.dom[i]=t,!0}})}get isAddress(){return Te(this.value)}get valueComponent(){return Te(this.value)&&oe.getAddress(this.value)}build(){const e=t=>{const n=this.list,m=this.getActiveOption();let f=new Map([[38,()=>{const g=this.getPreviousOption(m);g&&this.selectOption(g)}],[40,()=>{const g=this.getNextOption(m);g&&this.selectOption(g)}],[13,()=>{m&&(this.selectOption(m),this.setValue(m),n.style.display==="none"?this.showList(m):this.hideList()),t.preventDefault()}],[27,()=>{this.hideList()}]]).get(t.keyCode);return f||(f=()=>!1),f()},i={focus:({target:t})=>{this.updateOptions(),t.parentElement.classList.add(`${bt}-focused`);const n=V.toggleElementsByStr(this.list.querySelectorAll(`.${xi}-depth-0`),t.value);t.addEventListener("keydown",e);const m=this.list.querySelector(".active-option")||n[0];this.showList(m)},blur:({target:t})=>{t.parentElement.classList.remove(`${bt}-focused`),t.removeEventListener("keydown",e),this.hideList()},input:t=>{const{value:n}=t.target,m=V.toggleElementsByStr(this.list.querySelectorAll("li"),n);if(n.length===0&&this.clearValue(),m.length===0)this.hideList();else{const f=this.getActiveOption()||m[0];this.showList(f)}this.setValue({dataset:{label:n,value:n}})}};return this.displayField=V.create({tag:"input",autocomplete:"off",action:i,attrs:{type:"text",className:ad,value:this.label||this.value,placeholder:Z.get(`${this.key}.placeholder`)}}),this.hiddenField=V.create({tag:"input",attrs:{type:"hidden",className:bt,value:this.value}}),this.list=V.create({tag:"ul",attrs:{className:er}}),this.clearButton=V.create({tag:"span",content:V.icon("remove"),className:"clear-button hidden",action:{click:()=>this.clearValue()}}),this.dom=V.create({children:[this.displayField,this.clearButton,this.hiddenField],className:[bt,this.className].flat(),action:{onRender:t=>{this.stage=t.closest(".formeo-stage"),this.value&&(this.displayField.value=this.label),this.clearButton.classList.toggle("hidden",!this.value.length)}}}),this.dom}get label(){if(!Te(this.value))return this.value;const e=this.value&&oe.getAddress(this.value);return e&&Yo(e,`${this.key}`)||this.value}updateOptions(){let e=this.optionsCache;const i=Date.now();(i-this.lastCache>zn*5||!e)&&(V.empty(this.list),e=this.generateOptions(),this.lastCache=i),this.list.children.length||this.list.append(...e)}generateOptions(){return this.optionsCache=fd(this),this.optionsCache}setListPosition(){const{offsetHeight:e,offsetWidth:i}=this.displayField,t=this.displayField.closest(".formeo-stage").getBoundingClientRect(),n=this.displayField.getBoundingClientRect(),m={position:"absolute",top:`${n.y+e-t.y}px`,left:`${n.x+window.scrollX-t.x+2}px`,width:`${i}px`};Object.assign(this.list.style,m)}showList(e,i=this.list){this.stage.contains(this.list)||this.stage.appendChild(this.list),this.setListPosition(),this.selectOption(e),me.slideDown(i,at)}hideList(e=this.list){me.slideUp(e,at),this.removeHighlight(),this.stage.contains(this.list)&&this.stage.removeChild(this.list)}getActiveOption(e=this.list){const i=e.querySelector(".active-option");return i?.style.display!=="none"?i:null}getPreviousOption(e){let i=e;do i=i?i.previousSibling:null;while(i!=null&&i.style.display==="none");return i}getNextOption(e){let i=e;do i=i?i.nextSibling:null;while(i!=null&&i.style.display==="none");return i}selectOption(e,i=this.list){const t=i.querySelectorAll("li");for(const n of t){const{dataset:{value:m}}=n;n.classList.remove("active-option"),Te(m)&&oe.getAddress(m)?.dom?.classList.remove($t)}e&&(e.classList.add("active-option"),this.highlightComponent(e))}removeHighlight(){const e=document.getElementsByClassName($t);for(const i of e)i.classList.remove($t)}highlightComponent(e){const{dataset:{value:i}}=e;if(Te(i)){const{componentAddress:t,isOptionAddress:n,optionIndex:m}=lt(i).reduce((g,c)=>c==="options"?(g.isOptionAddress=!0,g):g.isOptionAddress?(g.optionIndex=+c,g):(g.componentAddress.push(c),g),{componentAddress:[],optionIndex:null,isOptionAddress:!1}),f=oe.getAddress(t);f?.dom&&(f.dom.classList.add($t),n&&f.dom.querySelectorAll(".field-preview .f-checkbox, .field-preview .f-radio")[m]?.classList.add($t))}}clearValue(){this.selectOption(null),this.setValue({dataset:{label:"",value:""}}),this.displayField.focus()}setValue(e){const{label:i,value:t}=e.dataset;this.displayField.value=i,this.hiddenField.value=t,this.value=t,this.clearButton.classList.toggle("hidden",!t.length),this.onChange?.({target:this.hiddenField})}},Qo=e=>Z.get(`${e}.placeholder`)||je(mi(e)),tr=e=>e.replaceAll(".","-"),Tr=new Map([["config.helpText",(...e)=>Mr(...e)],["config.tooltip",(...e)=>Mr(...e)]]);function Ji({key:e,value:i,type:t="text",checked:n}){const m={tag:"input",attrs:{type:t,value:i,placeholder:Qo(e)},className:[tr(e)],config:{}};return n&&(m.attrs.checked=!0),m}function Mr({key:e,value:i}){return{tag:"textarea",attrs:{placeholder:Qo(e)},className:[tr(e)],config:{},textContent:i}}function ze(e){const i=Z.get(e);if(i)return i;const t=mi(e);return Z.get(t)||je(t)}var xt={autocomplete:(...e)=>new gd(...e).createProxy(),string:({key:e,value:i})=>Tr.has(e)?Tr.get(e)({key:e,value:i}):Ji({key:e,value:i}),boolean:({key:e,value:i})=>Ji({key:e,value:i,type:e==="selected"?"radio":"checkbox",checked:!!i}),number:({key:e,value:i})=>Ji({key:e,value:i,type:"number"}),array:({key:e,value:i})=>({tag:"select",attrs:{placeholder:ze(`placeholder.${e}`)},className:[tr(e)],options:i}),object:e=>Object.entries(e).map(([i,t])=>xt[V.childType(t)]({key:i,value:t}))},md={boolean:(e,i)=>({click:({target:t})=>{if(t.type==="radio"){const n=i.data.options.map(m=>({...m,selected:!1}));i.set("options",n)}i.set(e,t.checked),i.updatePreview()}}),string:(e,i)=>({input:({target:{value:t}})=>{i.set(e,t),i.debouncedUpdatePreview()}}),number:(e,i)=>({input:({target:{value:t}})=>{i.set(e,Number(t)),i.debouncedUpdatePreview()}}),array:(e,i)=>({change:({target:{value:t}})=>{i.set(e,t),i.debouncedUpdatePreview()}}),object:()=>({})},vd=Object.freeze({title:"",content:null,confirmText:()=>ze("save"),cancelText:()=>ze("cancel"),onConfirm:()=>{},onCancel:()=>{},className:"",closeOnEscape:!0,position:"top",triggerElement:null,triggerCoords:null}),yd=class ci{constructor(i){this.opts=De(vd,i),this.dialog=null}createDialog(){const{title:i,content:t,confirmText:n,cancelText:m,className:f,closeOnEscape:g,position:c}=this.opts,o=`dialog-position-${c}`,h=[];return i&&h.push({tag:"h3",className:"dialog-title",textContent:i}),t&&h.push({tag:"div",className:"dialog-body",children:Array.isArray(t)?t:[t]}),h.push({tag:"div",className:"dialog-actions",children:[{tag:"button",type:"button",className:"btn btn-sm btn-secondary",textContent:typeof m=="function"?m():m,action:{click:()=>this.handleCancel()}},{tag:"button",type:"submit",className:"btn btn-sm btn-primary",textContent:typeof n=="function"?n():n}]}),V.create({tag:"dialog",className:["formeo-dialog","formeo",o,f],children:[{tag:"form",className:"dialog-form",method:"dialog",children:h,action:{submit:u=>this.handleSubmit(u)}}],action:{cancel:u=>{g?this.handleCancel():u.preventDefault()}}})}handleSubmit(i){i.preventDefault();const t=new FormData(i.target);this.opts.onConfirm(t,this),this.close()}handleCancel(){this.opts.onCancel(this),this.close()}setPosition(){const{position:i,triggerElement:t,triggerCoords:n}=this.opts;if(i!=="trigger"||!this.dialog)return;let m=n;if(!m&&t){const f=t.getBoundingClientRect();m={x:f.left+f.width/2,y:f.bottom+8}}if(m){const f=this.dialog.getBoundingClientRect(),g=window.innerWidth,c=window.innerHeight;let o=m.x-f.width/2,h=m.y;const u=16;o=Math.max(u,Math.min(o,g-f.width-u)),h=Math.max(u,Math.min(h,c-f.height-u)),this.dialog.style.left=`${o}px`,this.dialog.style.top=`${h}px`,this.dialog.style.transform="none"}}open(){if(this.dialog||(this.dialog=this.createDialog()),document.body.appendChild(this.dialog),this.dialog.showModal(),this.opts.position==="trigger"){const i=setTimeout(()=>{this.setPosition(),clearTimeout(i)},0)}return this}close(){this.dialog&&(this.dialog.close(),this.dialog.remove(),this.dialog=null)}static alert(i,t=()=>{}){return new ci({content:{tag:"p",className:"dialog-message",textContent:i},confirmText:()=>Z.get("ok")||"OK",cancelText:"",onConfirm:()=>t()})}static confirm(i,t=()=>{},n=()=>{}){return new ci({content:{tag:"p",className:"dialog-message",textContent:i},confirmText:()=>Z.get("confirm")||"Confirm",onConfirm:()=>t(),onCancel:()=>n()})}static prompt(i,t=()=>{},n=""){return new ci({content:[{tag:"label",className:"dialog-prompt-label",children:[{tag:"p",className:"dialog-message",textContent:i},{tag:"input",type:"text",name:"prompt-value",className:"dialog-prompt-input",value:n}]}],onConfirm:m=>{t(m.get("prompt-value"))}})}},Xo="hidden-property",bd="hidden-option",en=/\.options\[\d+\]$/,wd={"if-sourceProperty":ri(ni,hr,pr),"if-targetProperty":ri(ni),"then-targetProperty":ri(ni,hr,pr),...Object.entries(xl).reduce((e,[i,t])=>(e[`if-${i}`]=t,e[`then-${i}`]=t,e),{})},Jo={assignment:Lt,comparison:Lt,logical:Lt,source:({key:e,value:i,onChange:t,conditionType:n})=>xt.autocomplete({key:`${n}.condition.${e}`,value:i,onChange:t,className:`condition-${e}`}),sourceProperty:Lt,targetProperty:Lt,target:e=>Jo.source(e),value:({key:e,value:i,onChange:t},n)=>{const m=xt.string({key:`condition.${e}`,value:i});return m.action={input:t},m}};function Cd({key:e,value:i,conditionType:t}){return Object.entries(wd[`${t}-${e}`]||{}).map(([n,m])=>Sd({fieldName:e,fieldValue:i,key:n,optionValue:m}))}function Sd({fieldName:e,fieldValue:i,key:t,optionValue:n}){return{label:Z.get(`${e}.${t}`)||je(t).toLowerCase(),value:n,selected:n===i}}function Lt({key:e,value:i,onChange:t,conditionType:n}){const m=Cd({key:e,value:i,conditionType:n}),f=xt.array({key:`condition.${e}`,value:m});return f.action={change:t},f}var xd=e=>!e?.classList.contains(Xo),Ed={sourceProperty:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i.value;return Lr(!!i.value.match(en),t),!n},comparison:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i.value,m=!!i.value.match(en);return!n||m||t.value!=="value"},assignment:e=>{const i=e.get("target"),t=e.get("targetProperty");return!i.value||t.value.startsWith("is")},targetProperty:e=>{const i=e.get("target"),t=e.get("targetProperty");return Lr(!!i.value.match(en),t),!Ja(i.value)},target:e=>{const i=e.get("source"),t=e.get("sourceProperty"),n=!!i?.value;return t&&!n?!0:t&&t?.value!=="value"},value:e=>{const i=e.get("target"),t=e.get("targetProperty");return t===void 0?!1:i&&!i.value||!xd(e.get("comparison"))||t.value===es?!0:t.value.startsWith("is")}},$r=e=>{for(const[i,t]of e){const n=!!Ed[i]?.(e)||!1;t.classList.toggle(Xo,n)}},es="isChecked",tn=e=>e.value.endsWith("Checked"),Lr=(e,i)=>{if(e&&tn(i))return null;const t=Array.from(i.querySelectorAll("option")),n=[];for(const m of t){const f=tn(m),g=e?!f:f;g&&n.push(m.value),m.classList.toggle(bd,g)}n.includes(i.value)&&(i.value=e?es:t.find(m=>!tn(m))?.value||i.value)};function Ad(e,i=Sl){return i.reduce((t,n)=>(e[n]!==void 0&&t.push([n,e[n]]),t),[])}var kd=class{constructor({conditionValues:e,conditionType:i,conditionCount:t,index:n},m){this.values=new Map(Ad(e)),this.conditionType=i,this.parent=m,this.baseAddress=`${m.address}.${i}`,this.fields=new Map,this.conditionCount=t,this.index=n,this.dom=this.generateDom()}setConditionIndex(e){this.index=e}get address(){return`${this.baseAddress}[${this.index}]`}destroy(){const e=oe.getAddress(this.baseAddress);e.splice(this.index,1),oe.setAddress(this.baseAddress,e),me.slideUp(this.dom,at,()=>{this.dom.remove()})}label(){return this.index?null:{tag:"label",className:`condition-label ${this.conditionType}-condition-label`,content:Z.get(`condition.type.${this.conditionType}`)}}generateDom(){const e=[];for(const[t,n]of this.values){const m=o=>this.onChangeCondition({key:t,target:o.target}),f={key:t,value:n,conditionType:this.conditionType,onChange:m},g=Jo[t](f,this.values),c=g.dom||V.create(g);this.fields.set(t,g.dom?g:c),e.push(c)}const i={children:[this.label(),...e,...this.generateConditionTypeActionButtons()],className:`f-condition-row ${this.conditionType}-condition-row display-none`,action:{onRender:t=>{this.processUiState()}}};return V.create(i)}generateConditionTypeActionButtons(){const e=[],i="manage-condition-type",t=f=>`${f}-condition-type`,n=V.btnTemplate({title:Z.get(`remove${this.conditionType}Condition`),className:[i,t("remove")],content:V.icon("minus"),action:{click:()=>this.destroy(),mouseover:f=>{this.dom.classList.add("to-remove")},mouseout:f=>{this.dom.classList.remove("to-remove")}}});e.push(n);const m=V.btnTemplate({title:Z.get(`add${this.conditionType}Condition`),className:[i,t("add")],content:V.icon("plus"),action:{click:()=>{const f=this.parent.addConditionType(this.conditionType),g={changedProperty:null,dataPath:f.address,value:f.value,src:f.dom};this.updateDataDebounced(g)}}});return e.push(m),e}get value(){return Array.from(this.fields).reduce((e,[i,t])=>(e[i]=t.value,e),{})}processUiState(){$r(this.fields),this.dom.classList.remove("display-none")}updateDataDebounced=fi(e=>{Q.formeoUpdated(e),oe.setAddress(e.dataPath,e.value)});onChangeCondition=({key:e,target:i})=>{const t={changedProperty:e,dataPath:this.address,value:this.value,src:i};$r(this.fields),this.updateDataDebounced(t)}},Td=new Map([["attrs",({itemKey:e})=>e],["options",({itemKey:e,key:i})=>`${e}.${i}`]]),ts=(e,i)=>{if(i.controlId==="select"){const t=i.editPanels.get("options"),[n,m]=e?gi:kl,f=t.data.map(({[n]:g,...c})=>({[m]:g,...c}));t.setData(f)}},Md=new Map([["attrs-multiple",e=>({change:({target:i})=>{e.field.controlId==="select"&&ts(i.checked,e.field)}})]]),Rt=class{constructor({key:e,index:i,field:t,panel:n,data:m}){this.field=t,this.itemKey=e,this.itemIndex=i,this.panel=n,this.panelName=n.name,this.isDisabled=t.isDisabledProp(e,this.panelName),this.isHidden=this.isDisabled&&t.config.panels[this.panelName].hideDisabled,this.isLocked=t.isLockedProp(e,this.panelName),this.address=`${t.indexName}.${t.id}.${e}`,this.itemSlug=fr(e),this.conditionTypeWrap=new Map,m!==void 0&&this.field.get(this.itemKey)===void 0&&this.field.set(this.itemKey,m);const f=[`field-${this.itemSlug}`,"prop-wrap"];this.isHidden&&f.push("hidden-property"),this.dom=V.create({tag:"li",className:f,children:{className:"component-prop",children:[this.itemInputs(),this.itemControls]}})}get itemValues(){const e=this.field.get(this.itemKey);return e?.constructor===Object?Si(Object.entries(e),gi,"0"):[[this.itemKey,e]]}findOrCreateConditionTypeWrap(e){let i=this.conditionTypeWrap.get(e);return i||(i=V.create({className:`type-conditions-wrap ${e}-conditions-wrap`}),this.conditionTypeWrap.set(e,i),i)}itemInputs(){const e=V.create({className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map(([i,t])=>this.panelName==="conditions"?this.generateConditionFields(i,t):this.itemInput(i,t))});return this.inputs&&this.inputs.replaceWith(e),this.inputs=e,e}addConditionType=(e,i)=>{const t=this.findOrCreateConditionTypeWrap(e);let n=i;if(!n){const[f]=Gn()[e],g=t.children.length;e==="if"&&(f.logical="||"),n={conditionValues:f,conditionCount:g,index:g}}const m=new kd({conditionType:e,...n},this);return t.appendChild(m.dom),m};removeConditionType=(e,i)=>{const t=this.conditionTypeWrap.get(e).children[i];t.destroy(),t.dom.remove()};generateConditionFields=(e,i)=>(this.conditions=new Map,i.forEach((t,n)=>{const m=this.addConditionType(e,{index:n,conditionCount:i.length,conditionValues:t});this.conditions.set(n,m)}),this.findOrCreateConditionTypeWrap(e));get itemControls(){if(this.isLocked)return{className:`${this.panelName}-prop-controls prop-controls`,content:[]};const e={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{me.slideUp(this.dom,333,i=>{this.field.remove(this.itemKey),i.remove(),this.panel.updateProps()})},mouseover:i=>{this.dom.classList.add("to-remove")},mouseout:i=>{this.dom.classList.remove("to-remove")}},content:V.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[e]}}getConfigAttrOptions(e){const i=e.split(".").pop(),t=this.field.config?.attrs?.[i];return Array.isArray(t)?t:null}itemInput(e,i){if(this.isDisabled)return null;let t=V.childType(i)||"string",n=i;if(this.panelName==="attrs"){const s=this.getConfigAttrOptions(e);s&&(n=s.map(r=>({...r,selected:r.value===i})),t="array")}const m=Td.get(this.panelName)?.({itemKey:this.itemKey,key:e})||this.itemKey,f=m.split(".").filter(Number.isNaN).join(".")||e,g=xt[t]({key:e,value:n}),c=`${this.field.shortId}-${fr(m).replaceAll(/-\d+-(selected)/g,"-$1")}`,o={label:this.panelName!=="options"&&ze(f),labelAfter:!1,inputWrap:["f-input-wrap",this.isLocked&&"locked-prop",this.isDisabled&&"disabled-prop"].filter(Boolean).join(" ")},h={name:g.attrs.type==="checkbox"?`${c}[]`:c};h.disabled=this.isDisabled,h.readonly=this.isLocked;const u=Md.get(this.itemSlug)?.(this),d=Gl(md[t](m,this.field),u||{}),l=De(xt[t]({key:e,value:n}),{action:d,attrs:h,config:o});return gi.includes(e)?{className:"f-addon",children:l}:l}},$d={multiple:(e,i)=>{ts(!!e,i)}},Ld=[{label:ze("config.label"),value:"label"},{label:ze("config.hideLabel"),value:"hideLabel"},{label:ze("config.helpText"),value:"helpText"},{label:ze("config.labelAfter"),value:"labelAfter"},{label:ze("config.disableHtmlLabel"),value:"disableHtmlLabel"},{label:ze("config.tooltip"),value:"tooltip"}],Rd={label:"New Field",hideLabel:!1,helpText:"",labelAfter:!1,disableHtmlLabel:!1,tooltip:""},_d=class{constructor(e,i,t){this.type=V.childType(e),this.name=i,this.component=t,this.panelConfig=this.getPanelConfig(this.data)}get data(){const e=this.component.get(this.name);return this.type==="object"?Object.entries(e):e}getPanelConfig(e){return this.props=this.createProps(e),this.editButtons=this.createEditButtons(),{config:{label:Z.get(`panel.label.${this.name}`)},attrs:{className:`${lo} ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(e=this.data){this.editPanelItems=Array.from(e).map((t,n)=>{const m=this.type==="array",f=t[0],g=m?`[${n}]`:`.${t[0]}`,c=m?t:{[t[0]]:t[1]},o=`${this.name}${g}`,h=this.component.isDisabledProp(o,this.name),u=Tl.get(this.name)?.has(f)??!0;return h||!u?null:new Rt({key:o,data:c,field:this.component,index:n,panel:this})}).filter(Boolean);const i={tag:"ul",attrs:{className:["edit-group",`${this.component.name}-edit-group`,`${this.component.name}-edit-${this.name}`]},editGroup:this.name,isSortable:this.name==="options",content:this.editPanelItems};return V.create(i)}updateProps(){const e=this.createProps();this.props.replaceWith(e),this.props=e}createEditButtons(){const e=this.name,i={attrs:this.addAttribute,options:this.addOption,conditions:this.addCondition,config:this.addConfiguration},t=[];if(e==="conditions"){Z.current&&!Z.current.clearAll&&Z.put("clearAll","Clear All");const f={...V.btnTemplate({content:[V.icon("bin"),Z.get("clearAll")],title:Z.get("clearAll")}),className:`clear-all-${e}`,action:{click:()=>{this.clearAllItems()}}};t.push(f)}const n=Z.get(`panelEditButtons.${e}`)||`+ Add ${je(e)}`,m={...V.btnTemplate({content:n,title:n}),className:`add-${e}`,action:{click:f=>{const g={btnCoords:V.coords(f.target),addAction:i[e]};e==="attrs"&&(g.isDisabled=this.component.isDisabledProp,g.isLocked=this.component.isLockedProp,g.message={attr:Z.get(`action.add.${e}.attr`),value:Z.get(`action.add.${e}.value`)});const c=je(e),o=new globalThis.CustomEvent(`onAdd${c}`,{detail:g});ge.add[e](g),document.dispatchEvent(o)}}};return t.push(m),{className:"panel-action-buttons",content:t}}addAttribute=(e,i)=>{let t=i;const n=Bo(e),m=`attrs.${n}`;Z.current[m]||Z.put(m,jo(e)),typeof t=="string"&&["true","false"].includes(t)&&(t=JSON.parse(t)),this.component.set(`attrs.${e}`,t),$d[n]?.(t,this.component);const f=this.props.querySelector(`.${this.component.name}-attrs-${n}`),g=new Rt({key:m,data:{[n]:t},field:this.component,panel:this});f?f.replaceWith(g.dom):this.props.appendChild(g.dom),this.component.resizePanelWrap()};addOption=()=>{const e=this.component.data.config.controlId,i=this.component.get("options"),t=e==="select"?"option":e,n=Z.get("newOptionLabel",{type:t})||"New Option",m=`${this.name}[${this.data.length}]`,f=i[i.length-1],g={...i.length?f:{},label:n};e!=="button"&&(g.value=xo(n));const c=new Rt({key:m,data:g,field:this.component,index:this.props.children.length,panel:this});this.editPanelItems.push(c),this.props.appendChild(c.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()};addCondition=e=>{const i=`conditions[${this.component.get("conditions").length}]`,t=new Rt({key:i,data:e.template,field:this.component,panel:this});this.props.appendChild(t.dom),this.component.set(i,e.template),this.component.resizePanelWrap()};addConfiguration=()=>{const e=this.component.get("config");new yd({className:"config-item-dialog",content:[{tag:"select",config:{label:Z.get("selectConfigKey")||"Select Configuration Key"},attrs:{name:"selectConfigKey",required:!0,className:"config-key-select"},options:Ld.filter(i=>!(i.value in e))}],onConfirm:i=>{const t=i.get("selectConfigKey").trim(),n=`config.${t}`;if(t){const m=new Rt({key:n,data:Rd[t],field:this.component,panel:this});this.editPanelItems.push(m),this.props.appendChild(m.dom),this.component.debouncedUpdatePreview(),this.component.resizePanelWrap()}}}).open()};clearAllItems=()=>{const e=this.type==="array"?[]:{},i={type:this.name,removeAction:()=>{this.component.set(this.name,e),this.updateProps()}};ge.remove[this.name](i);const t=je(this.name),n=new globalThis.CustomEvent(`onRemove${t}`,{detail:i});document.dispatchEvent(n)};setData(e){this.data=e,this.component.set(this.name,e),this.updateProps()}},Rr=Object.freeze({type:"field",displayType:"slider"}),Jt=e=>({transform:`translateX(${e?`${e}px`:0})`}),is=class{constructor(e){this.opts=De(Rr,e),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const i=this.createPanelsWrap();this.nav=this.navActions(),this.nav.groupChange(this.activePanelIndex);const t=new window.ResizeObserver(([{contentRect:{width:m}}])=>{this.currentWidth!==m&&(this.toggleTabbedLayout(),this.currentWidth=m,this.nav.setTranslateX(this.activePanelIndex,!1))}),n=window.setTimeout(()=>{t.observe(i),window.clearTimeout(n)},zn)}getPanelDisplay(){const e=this.panelsWrap,i=Number.parseInt(V.getStyle(e,"width"),10)>390?"tabbed":"slider",t=this.opts.displayType==="auto";return this.panelDisplay=t?i:this.opts.displayType||Rr.displayType,this.panelDisplay}toggleTabbedLayout=()=>{this.getPanelDisplay();const e=this.isTabbed;return this.panelsWrap.parentElement?.classList.toggle("tabbed-panels",e),e&&this.panelNav.removeAttribute("style"),e};resizePanels=()=>{this.toggleTabbedLayout()};createPanelsWrap(){const e=V.create({className:"panels",content:this.opts.panels.map(({config:i,...t})=>t)});return this.opts.type==="field"&&this.sortableProperties(e),this.panelsWrap=e,this.panels=e.children,this.currentPanel=this.panels[this.activePanelIndex],e}sortableProperties(e){const i=e.getElementsByClassName("field-edit-group");return Ae.forEach(i,t=>{t.fieldId=this.opts.id,t.isSortable&&J.create(t,{animation:150,group:{name:`edit-${t.editGroup}`,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:n=>{this.propertySave(n.to),this.resizePanels()}})})}createPanelNavLabels(){const e=this.opts.panels.map(n=>({tag:"h5",action:{click:m=>{const f=Je(m.target);this.nav.setTranslateX(f,!1),this.nav.groupChange(f)}},content:n.config.label})),i={className:"panel-labels",content:{content:e}},[t]=e;return t.className="active-tab",V.create(i)}createPanelNav(){this.labels=this.createPanelNavLabels();const e={tag:"button",attrs:{className:"next-group",title:Z.get("controlGroups.nextGroup"),type:"button"},action:{click:t=>this.nav.nextGroup(t)},content:V.icon("triangle-right")},i={tag:"button",attrs:{className:"prev-group",title:Z.get("controlGroups.prevGroup"),type:"button"},action:{click:t=>this.nav.prevGroup(t)},content:V.icon("triangle-left")};return V.create({tag:"nav",attrs:{className:"panel-nav"},content:[i,this.labels,e]})}get isTabbed(){return this.panelDisplay==="tabbed"}navActions(){const e={},i=this.currentPanel.parentElement,t=this.labels.firstChild,n=t.children,m=this.currentPanel.parentElement.childNodes;this.activePanelIndex=Je(this.currentPanel);let f={nav:0,panel:0},g={...f};e.groupChange=h=>(this.activePanelIndex=h,this.currentPanel=m[h],V.removeClasses(m,"active-panel"),V.removeClasses(n,"active-tab"),this.currentPanel.classList.add("active-panel"),n[h].classList.add("active-tab"),this.currentPanel);const c=h=>({nav:-t.offsetWidth*h,panel:-i.offsetWidth*h}),o=({offset:h,reset:u,duration:d=at,animate:l=!this.isTabbed})=>{const s=[Jt(g.panel),Jt(h.panel)],r=[Jt(g.nav),Jt(this.isTabbed?0:h.nav)];if(u){const[y]=s,[k]=r;s.push(y),r.push(k)}const a={easing:"ease-in-out",duration:l?d:0,fill:"forwards"},p=i.animate(s,a);t.animate(r,a);const v=()=>{p.removeEventListener("finish",v),u||(g=h)};p.addEventListener("finish",v)};return e.setTranslateX=(h=this.activePanelIndex,u=!0)=>{f=c(h),o({offset:f,animate:u})},e.refresh=(h=this.activePanelIndex)=>{this.activePanelIndex!==h&&e.groupChange(h),e.setTranslateX(this.activePanelIndex,!1),this.resizePanels()},e.nextGroup=()=>{const h=this.activePanelIndex+1;if(h!==m.length){const u=m[h];f={nav:-t.offsetWidth*h,panel:-u.offsetLeft},o({offset:f}),e.groupChange(h)}else f={nav:g.nav-8,panel:g.panel-8},o({offset:f,reset:!0});return this.currentPanel},e.prevGroup=()=>{if(this.activePanelIndex!==0){const h=this.activePanelIndex-1,u=m[h];f={nav:-t.offsetWidth*h,panel:-u.offsetLeft},o({offset:f}),e.groupChange(h)}else f={nav:8,panel:8},o({offset:f,reset:!0})},e}},Od="modulepreload",Id=function(e){return"/formeo/"+e},_r={},vt=function(i,t,n){let m=Promise.resolve();if(t&&t.length>0){let h=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};const g=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),o=c?.nonce||c?.getAttribute("nonce");m=h(t.map(u=>{if(u=Id(u,n),u in _r)return;_r[u]=!0;const d=u.endsWith(".css"),l=d?'[rel="stylesheet"]':"";if(n)for(let r=g.length-1;r>=0;r--){const a=g[r];if(a.href===u&&(!d||a.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${l}`))return;const s=document.createElement("link");if(s.rel=d?"stylesheet":Od,d||(s.as="script"),s.crossOrigin="",s.href=u,o&&s.setAttribute("nonce",o),document.head.appendChild(s),d)return new Promise((r,a)=>{s.addEventListener("load",r),s.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${u}`)))})}))}function f(g){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=g,window.dispatchEvent(c),!c.defaultPrevented)throw g}return m.then(g=>{for(const c of g||[])c.status==="rejected"&&f(c.reason);return i().catch(f)})},nn=null,rn=ri(ni),Fi=class extends qn{constructor(e,i={}){const t={...i,id:i.id||Me()};super(e,t),this.id=t.id,this.shortId=this.id.slice(0,this.id.indexOf("-")),this.name=e,this.indexName=`${e}s`,this.config={...t.config,...oe[`${this.name}s`].config},this.address=`${this.name}s.${this.id}`,this.dataPath=`${this.address}.`,this.editPanels=new Map,this.eventListeners=new Map,this.initEventHandlers()}initEventHandlers(){this.config.events&&Object.entries(this.config.events).forEach(([e,i])=>{this.addEventListener(e,i)})}addEventListener(e,i){this.eventListeners.has(e)||this.eventListeners.set(e,[]),this.eventListeners.get(e).push(i)}removeEventListener(e,i){if(!this.eventListeners?.has(e))return;const t=this.eventListeners.get(e),n=t.indexOf(i);n>-1&&t.splice(n,1)}dispatchComponentEvent(e,i={}){const t={component:this,target:this,type:e,timestamp:Date.now(),...i};return this.eventListeners?.has(e)&&this.eventListeners.get(e).forEach(n=>{try{typeof n=="function"&&n(t)}catch(m){console.error(`Error in ${e} event handler for ${this.name} ${this.id}:`,m)}}),t}set(e,i){const t=this.get(e),n=super.set(e,i);return t!==i&&this.dom&&this.dispatchComponentEvent("onUpdate",{path:e,oldValue:t,newValue:i}),n}get js(){return this.data}get json(){return this.data}remove=e=>{if(e){const m=lt(e),f=m.pop(),g=this.get(m);return Array.isArray(g)?Wo(f)?g.splice(Number(f),1):this.set(m,g.filter(c=>c!==f)):delete g[f],g}if(this.name==="stage")return null;const i=this.parent,t=this.children;this.dispatchComponentEvent("onRemove",{path:e,parent:i,children:[...t]}),Ni(t,m=>m.remove()),this.dom.remove(),Xa(oe.getAddress(`${i.name}s.${i.id}.children`),this.id),i.children.length||i.emptyClass(),i.name==="row"&&i.autoColumnWidths();const n={row:jn,column:Vn,field:Un}[this.name];return n&&Q.formeoUpdated({componentId:this.id,componentType:this.name,parent:i},n),oe[`${this.name}s`].delete(this.id)};empty(){const e=this.children.map(i=>(i.remove(),i));return this.dom.classList.add("empty"),e}emptyClass=()=>this.dom.classList.toggle("empty",!this.children.length);getActionButtons(){const e=[`hovering-${this.name}`,"hovering"];return{className:[`${this.name}-actions`,"group-actions"],action:{mouseenter:()=>{oe.stages.active.dom.classList.add(`active-hover-${this.name}`),this.dom.classList.add(...e)},mouseleave:({target:i})=>{this.dom.classList.remove(...e),oe.stages.active.dom.classList.remove(`active-hover-${this.name}`),i.removeAttribute("style")}},children:[{...V.btnTemplate({content:V.icon(`handle-${this.name}`)}),className:["component-handle",`${this.name}-handle`]},{className:["action-btn-wrap",`${this.name}-action-btn-wrap`],children:this.buttons}]}}getComponentTag=()=>V.create({tag:"span",className:["component-tag",`${this.name}-tag`],children:[V.icon(`handle-${this.name}`),je(this.name)].filter(Boolean)});toggleEdit(e=!this.isEditing){this.isEditing=e;const i=this.dom,t="editing",n=`${t}-${this.name}`,m=this.dom.querySelector(`.${this.name}-edit`);me.slideToggle(m,333,e),this.name==="field"&&(me.slideToggle(this.preview,333,!e),i.parentElement.classList.toggle(`column-${n}`,e)),i.classList.toggle(t,e),i.classList.toggle(n,e)}get buttons(){if(this.actionButtons)return this.actionButtons;const e={handle:(m=`handle-${this.name}`)=>({...V.btnTemplate({content:V.icon(m)}),className:["component-handle"]}),move:(m="move")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-move"],meta:{id:"move"}}),edit:(m="edit")=>({...V.btnTemplate({content:V.icon(m)}),className:["edit-toggle"],meta:{id:"edit"},action:{click:()=>{this.toggleEdit()}}}),remove:(m="remove")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-remove"],meta:{id:"remove"},action:{click:()=>{me.slideUp(this.dom,333,()=>{this.name==="column"?(this.parent.autoColumnWidths(),this.remove()):this.remove()})}}}),clone:(m="copy")=>({...V.btnTemplate({content:V.icon(m)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>{this.clone(this.parent),this.name==="column"&&this.parent.autoColumnWidths()}}})},{buttons:i,disabled:t}=this.config.actionButtons,n=i.filter(m=>!t.includes(m)).map(m=>e[m]?.()||m);return this.actionButtons=n,this.actionButtons}get index(){return Je(this.dom)}removeClasses=e=>{const i={string:()=>this.dom.classList.remove(e),array:()=>e.map(t=>this.dom.classList.remove(t))};return i.object=i.string,i[V.childType(e)](this.dom)};get parentType(){return gl.get(this.name)}get parent(){const e=this.parentType;if(!this.dom||!e)return null;const i=this.dom.closest(`.${Nn[e]}`);return i&&V.asComponent(i)}get children(){if(!this.dom)return[];const e=this.domChildren,i=dr.get(this.name);return Jn(e,t=>oe.getAddress(`${i}s.${t.id}`)).filter(Boolean)}loadChildren=(e=this.data.children)=>e.map(i=>this.addChild({id:i}));get domChildren(){const e=this.dom.querySelector(".children");return e?e.children:[]}addChild(e={},i=this.domChildren.length){let t=e;typeof e!="object"&&(t={id:t});const n=this.dom.querySelector(".children"),{id:m=Me()}=t,f=dr.get(this.name);if(!f)return null;const g=`${f}s`,c=oe.getAddress(`${g}.${m}`)||oe[g].add(m,t);i>=n.children.length?n.appendChild(c.dom):n.children[i].before(c.dom),this.dispatchComponentEvent("onAddChild",{parent:this,target:c,child:c,index:i}),c.dispatchComponentEvent("onAdd",{parent:this,target:c,index:i,addedVia:"addChild"}),this.config.events?.onAddChild?.({parent:this,child:c});const o=c.get("children");return o?.length&&c.loadChildren(o),this.removeClasses("empty"),this.saveChildOrder(),c}saveChildOrder=()=>{if(this.render)return;const e=this.children.map(({id:i})=>i);return this.set("children",e),e};onAdd({from:e,to:i,item:t,newIndex:n}){e.classList.contains("control-group")||(e=e.parentElement);const m=be(e),f=be(i.parentElement),g=()=>{this.saveChildOrder(),this.removeClasses("empty")},c=new Map([[-2,()=>{const h=this.addChild({},n).addChild();return h.addChild.bind(h)}],[-1,()=>{const h=this.addChild({},n);return h.addChild.bind(h)}],[0,()=>this.addChild.bind(this)],[1,h=>{const u=Je(this.dom);return()=>this.parent.addChild(h,u+1)}],[2,h=>()=>this.parent.parent.addChild(h)]]),o={controls:async()=>{if(!nn){const{default:r}=await vt(async()=>{const{default:a}=await Promise.resolve().then(()=>Zd);return{default:a}},void 0);nn=r}const{controlData:{meta:{id:h},...u}}=nn.get(t.id);Oi(u,"config.controlId",h);const d=h.startsWith("layout-")?h.replace(/^layout-/,""):"field",l=we({stage:{row:0,column:-1,field:-2},row:{row:1,column:0,field:-1},column:{row:2,column:1,field:0},field:1},`${this.name}.${d}`),s=c.get(l)();return V.remove(t),s(u,n)},row:()=>(c.get({stage:-1,row:0,column:1}[f])||un)()?.({id:t.id},n),column:()=>(c.get({stage:-2,row:-1}[f])||un)()?.(t.id)}[m]?.(t,n);return this.dispatchComponentEvent("onAdd",{from:e,to:i,item:t,newIndex:n,fromType:m,toType:f,addedComponent:o,addedVia:"dragDrop"}),g(),o}onSort=()=>this.saveChildOrder();onRemove({from:{parentElement:e}}){return e.classList.contains(Ge)&&e.classList.remove("column-editing-field"),this.name!=="stage"&&!this.children.length?this.remove():(this.emptyClass(),this.saveChildOrder())}onEnd=({to:{parentElement:e},from:{parentElement:i}})=>{e?.classList.remove(`hovering-${be(e)}`),i?.classList.remove(`hovering-${be(i)}`)};onRender(){this.dispatchComponentEvent("onRender",{dom:this.dom});const{events:e}=this.config;if(!e)return null;e.onRender&&V.onRender(this.dom,e.onRender)}set config(e){const i=we(e,"all"),t=we(this.data,"config.controlId"),n=[i,t&&we(e,t),we(e,this.id)].reduce((m,f)=>f?De(m,f):m,this.configVal);this.configVal=n}get config(){return this.configVal}runConditions=()=>{const e=this.get("conditions");return e?.length?e.map(i=>{const t=this.processConditions(i.if),n=this.processResults(i.then);return t.map(m=>this.evaluateConditions(m)&&this.execResults(n))}):null};getComponent(e){const[i,t]=e.split("."),n=oe[i];return t===this.id?this:n?.get(t)}value=(e,i)=>{const t=e.split("."),n=this.getComponent(e),m=n&&t.slice(2,t.length).join(".");return[!n,!m,!rn[m]].some(Boolean)?e:i?n.set(rn[m],i):n.get(rn[m])};getResult=e=>({"=":(i,t,n)=>i.set(t,n)})[e];processResults=e=>e.map(({operator:i,target:t,value:n})=>{const m=this.getComponent(t);return{target:m,propertyPath:m&&t.split(".").slice(2,t.length).join("."),action:this.getResult(i),value:this.value(n)}});execResults=e=>{const i=e.map(t=>this.execResult(t));return Promise.all(i)};execResult=({target:e,action:i,value:t,_propertyPath:n})=>new Promise((m,f)=>{try{return m(i(e,t))}catch(g){return f(g)}});cloneData=()=>{const e={...He(this.data),id:Me()};return this.name!=="field"&&(e.children=[]),e};clone=(e=this.parent)=>{const i=e.addChild(this.cloneData(),this.index+1);return this.name!=="field"&&this.cloneChildren(i),this.dispatchComponentEvent("onClone",{original:this,clone:i,parent:e}),i};cloneChildren(e){for(const i of this.children)i?.clone(e)}createChildWrap=e=>V.create({tag:"ul",attrs:{className:"children"},children:e});get isRow(){return this.name===Hi.row}get isColumn(){return this.name===Hi.column}get isField(){return this.name===Hi.field}isDisabledProp=(e,i="attrs")=>{if(we(this.config,e))return!1;if((this.config?.disabled||[]).includes(e))return!0;const t=mi(e);return(this.config?.panels[i]?.disabled||[]).includes(t)};isLockedProp=(e,i="attrs")=>{if((this.config?.locked||[]).includes(e))return!0;const t=mi(e);return!!(this.config?.panels[i]?.locked||[]).includes(t)};get editWindow(){const e={className:["component-edit",`${this.name}-edit`,"slide-toggle","formeo-panels-wrap"]},i=this.editPanels.size;return i&&(e.className.push(`panel-count-${i}`),e.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh),e.action={onRender:()=>{if(i===0){const t=this.dom.querySelector(".edit-toggle"),n=this.dom.querySelector(`.${this.name}-actions`),m=n.getElementsByTagName("button");n.style.maxWidth=`${m.length*m[0].clientWidth}px`,V.remove(t)}else this.resizePanelWrap()}},V.create(e)}updateEditPanels=()=>{if(!this.config)return null;const e=new Set(["object","array"]),i=st([...this.config.panels.order,...Object.keys(this.data)]),t=new Set(["children","meta","action","events",...this.config.panels.disabled]),n=i.filter(f=>!t.has(f));for(const f of n){const g=this.get(f),c=V.childType(g);if(e.has(c)){const o=new _d(g,f,this);this.editPanels.set(o.name,o)}}const m={panels:Array.from(this.editPanels.values()).map(({panelConfig:f})=>f),id:this.id,displayType:"auto"};this.panels=new is(m),this.dom&&(this.dom.querySelector(".panel-nav").replaceWith(this.panels.panelNav),this.dom.querySelector(".panels").replaceWith(this.panels.panelsWrap))}},Dd=class{constructor(){this.onMove=this.onMove.bind(this),this.onStop=this.onStop.bind(this),this.cleanup=this.cleanup.bind(this)}getRowWidth(e){const i=e.querySelector(".children");if(!i)return 0;const t=i.children.length,n=V.getStyle(i,"gap")||"0px",m=parseFloat(n,10)||0;return this.totalGapWidth=m*(t-1),i.offsetWidth-this.totalGapWidth}validateResizeTarget(e,i){return e&&i&&e.offsetWidth&&i.offsetWidth}onStart(e){if(e.preventDefault(),this.resized=!1,e.button!==0)return;const i=e.target.parentElement,t=i.nextSibling||i.previousSibling,n=i.closest(`.${Ue}`);if(!this.validateResizeTarget(i,t)){console.warn("Invalid resize targets"),this.cleanup();return}if(this.startX=e.type==="touchstart"?e.touches[0].clientX:e.clientX,n.classList.add(Pi),this.columnPreset=n.querySelector(`.${co}`),this.originalColumnClass=i.className,this.originalSiblingClass=t.className,i.className=i.className.replace(fn,""),t.className=t.className.replace(fn,""),this.colStartWidth=i.offsetWidth,this.sibStartWidth=t.offsetWidth,this.rowWidth=this.getRowWidth(n),this.rowWidth<=0){console.warn("Invalid row width calculated"),this.cleanup();return}this.column=i,this.sibling=t,this.row=n;try{window.addEventListener("pointermove",this.onMove,!1),window.addEventListener("pointerup",this.onStop,!1)}catch(m){console.error("Failed to initialize resize listeners:",m),this.cleanup()}}calculateNewWidths(e){const i=this.colStartWidth+e-this.startX,t=this.sibStartWidth-e+this.startX,n=parseFloat(zi(i,this.rowWidth)),m=parseFloat(zi(t,this.rowWidth));return n<10||m<10?null:{colWidth:dn(n.toFixed(1)),siblingColWidth:dn(m.toFixed(1))}}onMove(e){e.preventDefault();const{column:i,sibling:t}=this,n=e.type==="touchmove"?e.touches[0].clientX:e.clientX,m=this.calculateNewWidths(n);if(!m)return;const{colWidth:f,siblingColWidth:g}=m;i.dataset.colWidth=f,t.dataset.colWidth=g,i.style.width=f,t.style.width=g,this.resized=!0}onStop(){const{column:e,sibling:i}=this;window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop),this.resized&&(this.setCustomWidthValue(),oe.setAddress(`columns.${e.id}.config.width`,e.dataset.colWidth),oe.setAddress(`columns.${i.id}.config.width`,i.dataset.colWidth),this.row.classList.remove(Pi),this.resized=!1,this.cleanup())}cleanup(){this.column&&this.originalColumnClass&&(this.column.className=this.originalColumnClass),this.sibling&&this.originalSiblingClass&&(this.sibling.className=this.originalSiblingClass),this.row&&this.row.classList.remove(Pi),window.removeEventListener("pointermove",this.onMove),window.removeEventListener("pointerup",this.onStop)}setCustomWidthValue(){const e=this.columnPreset;let i=e.querySelector(`.${pn}`);const t=this.row.querySelector(".children").children,n=Jn(t,g=>zi(g.clientWidth,this.rowWidth).toFixed(1)),m=n.join(","),f=n.join(" | ");return i||(i=V.create({tag:"option",attrs:{className:pn,value:m,selected:!0},content:f}),e.append(i)),i.value=m,i.textContent=f,m}},Nd=()=>Object.freeze({config:{width:"100%"},children:[],className:[Ge]}),Or={resizeHandle:e=>({className:"resize-x-handle",action:{pointerdown:e.onStart.bind(e)},content:[V.icon("triangle-down"),V.icon("triangle-up")]}),editWindow:()=>({className:"column-edit group-config"})},Fd=class extends Fi{constructor(e){super("column",{...Nd(),...e});const i=this.createChildWrap();this.dom=V.create({tag:"li",className:[Ge,"empty"],dataset:{hoverTag:Z.get("column")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),Or.editWindow(),Or.resizeHandle(new Dd),i]}),this.processConfig(),Q.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),J.create(i,{animation:150,fallbackClass:"field-moving",forceFallback:!0,group:{name:"column",pull:!0,put:["column","controls"]},sort:!0,disabled:!1,onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),onRemove:this.onRemove.bind(this),onMove:t=>{t.from!==t.to&&t.from.classList.remove("hovering-column")},draggable:`.${Tt}`,handle:".item-move"})}processConfig(){const e=Ae.get(this.data,"config.width");e&&this.setDomWidth(e)}refreshFieldPanels=()=>{for(const e of this.children)e.panels.nav.refresh()};setDomWidth=e=>{this.dom.dataset.colWidth=e,this.dom.style.width=e};setWidth=e=>(this.setDomWidth(e),this.set("config.width",e))},zd={actionButtons:{buttons:["clone","move","remove"],disabled:[]}},Pd=class extends Ii{constructor(e){super("columns",e),this.config={all:zd}}Component(e){return new Fd(e)}},ns=new Pd,Hd=()=>Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[Ue]}),Wd=class extends Fi{constructor(e){super("row",{...Hd(),...e});const i=this.createChildWrap();this.dom=V.create({tag:"li",className:[Ue,"empty"],dataset:{hoverTag:Z.get("row"),editingHoverTag:Z.get("editing.row")},id:this.id,content:[this.getComponentTag(),this.getActionButtons(),this.editWindow,i]}),J.create(i,{animation:150,fallbackClass:"column-moving",forceFallback:!0,group:{name:"row",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onRemove:this.onRemove.bind(this),onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),draggable:`.${Ge}`,handle:".item-move"})}get editWindow(){const e={tag:"input",id:`${this.id}-fieldset`,attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:Z.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:c}})=>{this.set("config.fieldset",!!c)}},config:{label:Z.get("row.settings.fieldsetWrap")}},i={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:Z.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:c}})=>this.set("config.inputGroup",c)},config:{label:Z.get("row.makeInputGroup"),description:Z.get("row.makeInputGroupDesc")}},t={className:"input-group",content:{tag:"input",attrs:{type:"text",ariaLabel:"Legend for fieldset",value:this.get("config.legend"),placeholder:"Title"},config:{label:{children:["Row Title",{tag:"span",content:" ⓘ",dataset:{tooltip:"Row title will be used as the legend for the fieldset"}}]}},action:{input:({target:{value:c}})=>this.set("config.legend",c)},className:""}},n=V.formGroup([e,t]),m={tag:"label",content:Z.get("defineColumnWidths"),className:"col-sm-4 form-control-label"};this.columnPresetControl=V.create(this.columnPresetControlConfig);const f={className:"col-sm-8",content:this.columnPresetControl,action:{onRender:()=>{this.updateColumnPreset()}}},g=[i,"hr",n,"hr",V.formGroup([m,f],"row")];return V.create({className:`${this.name}-edit group-config`,action:{onRender:c=>{const o=g.map(h=>V.create(h));c.append(...o)}}})}onAdd(...e){super.onAdd(...e),this.autoColumnWidths()}onRemove(...e){super.onRemove(...e),this.autoColumnWidths()}autoColumnWidths=()=>{const e=this.children;if(!e.length)return;const i=Number.parseFloat((100/e.length).toFixed(1))/1;for(const t of e){t.removeClasses(fn);const n=t.dom,m=dn(i);t.set("config.width",m),n.style.width=m,n.dataset.colWidth=m;const f=setTimeout(()=>{clearTimeout(f),t.refreshFieldPanels()},at);document.dispatchEvent(Q.columnResized)}this.updateColumnPreset()};updateColumnPreset=()=>{this.columnPresetControl.innerHTML="";const e=this.getColumnPresetOptions.map(({label:i,...t})=>V.create({tag:"option",content:i,attrs:t}));this.columnPresetControl.append(...e)};setColumnWidths=e=>{typeof e=="string"&&(e=e.split(",")),this.children.forEach((i,t)=>{i.setWidth(`${e[t]}%`),i.refreshFieldPanels()})};get getColumnPresetOptions(){const e=this.children,i=vl.get(e.length-1)||[],t=e.map(n=>{const m=n.get("config.width")||"";return Number(m.replace("%","")).toFixed(1)}).join(",");if(i.length){const n=i.slice();return n.find(m=>m.value===t)||n.push({value:t,label:t.replace(/,/g," | "),className:pn}),n.map(m=>{const f={...m};return f.selected=m.value===t,f})}return[]}get columnPresetControlConfig(){return{tag:"select",attrs:{ariaLabel:Z.get("defineColumnLayout"),className:co},action:{change:({target:e})=>{const{value:i}=e;this.setColumnWidths(i)}},options:this.getColumnPresetOptions}}},Bd={actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]}},jd=class extends Ii{constructor(e){super("rows",e),this.config={all:Bd}}Component(e){return new Wd(e)}},ir=new jd,Vd=()=>({conditions:[Gn()],children:[]}),Ud=class extends Fi{constructor(e){super("stage",{...Vd(),...e}),this.updateEditPanels(),this.debouncedUpdateEditPanels=fi(this.updateEditPanels),Z.get("Untitled Form"),Z.get("Untitled Form"),Z.get("Form Title"),Z.get("Form novalidate"),Z.get("Tags");const i=this.createChildWrap();this.dom=V.create({attrs:{className:[kt,"empty"],id:this.id},children:[this.getComponentTag(),this.getActionButtons(),this.editWindow,i]}),J.create(i,{animation:150,fallbackClass:"row-moving",group:{name:"stage",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onAdd:this.onAdd.bind(this),onRemove:this.onRemove.bind(this),onStart:()=>{Bt.active=this},onSort:this.onSort.bind(this),draggable:`.${Ue}`,handle:".item-move"})}empty(e=!0){return new Promise(i=>{e?(this.dom.classList.add("removing-all-fields"),me.slideUp(this.dom,333,()=>{i(super.empty(e)),this.dom.classList.remove("removing-all-fields"),me.slideDown(this.dom,333)})):i(super.empty())})}onAdd(...e){const i=super.onAdd(...e);i?.name==="column"&&i.parent.autoColumnWidths()}},Gd=()=>({actionButtons:{buttons:["edit"],disabled:[]},panels:{disabled:[],order:["attrs","options","conditions"]}}),Kd=class extends Ii{constructor(e){super("stages",e),this.config={all:Gd()}}Component(e){return new Ud(e)}},Bt=new Kd,qd=class{controlCache=new Set;constructor({events:e={},dependencies:i={},controlAction:t,...n}){this.events=e,this.controlData=n,this.controlAction=t,this.dependencies=i,this.id=n.id||Me()}get controlId(){return this.controlData.meta?.id||this.controlData.config?.controlId}get dom(){const{meta:e,config:i}=this.controlData,t=this.i18n(i.label)||i.label,n={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:V.icon(e.icon)},{tag:"span",className:"control-label",content:t}],action:{focus:({target:m})=>{const f=m.closest(`.${ot}`);return f&&ct.panels.nav.refresh(Je(f))},click:({target:m})=>{const f=m.closest(".field-control")?.id;f&&ct.addElement(f)}}};return V.create({tag:"li",id:this.id,className:["field-control",`${e.group}-control`,`${e.id}-control`],content:n,meta:e,action:this.controlAction})}promise(){return Go(this.dependencies)}i18n(e,i){const t=Z.locale,n=this.definition?.i18n?.[t]||{};return(n[e]?.()??n[e])||Z.get(e,i)}},Yd=Object.freeze({sortable:!0,elementOrder:{},groupOrder:[],groups:[{id:"layout",label:"controls.groups.layout",elementOrder:["row","column"]},{id:"common",label:"controls.groups.form",elementOrder:["button","checkbox"]},{id:"html",label:"controls.groups.html",elementOrder:["header","block-text"]}],disable:{groups:[],elements:[],formActions:[]},elements:[],container:null,panels:{displayType:"slider"}}),Zd=Sn({Controls:()=>rs,default:()=>ct}),rs=class{constructor(){this.data=new Map,this.buttonActions={focus:({target:e})=>{const i=e.closest(`.${ot}`);return i&&this.panels.nav.refresh(Je(i))},click:({target:e})=>{this.addElement(e.parentElement.id)}}}async init(e,i=!1){return await this.applyOptions(e),this.buildDOM(i),this}registerControls(e){return this.controls=[],e.map(i=>{const t=typeof i=="function"?new i:new qd(i);return this.add(t),this.controls.push(t.dom),t.promise()})}groupLabel=e=>Z.get(e)||e||"";groupElements(){let e=this.options.groups.slice(),i=this.controls.slice(),t=[];const n=[];return e=Si(e,this.groupOrder,"id"),e=e.filter(m=>cr(m.id,this.options.disable.groups)),t=e.map(m=>{const f={tag:"ul",attrs:{className:[ot,lo],id:`${m.id}-${ot}`},config:{label:this.groupLabel(m.label)}};if(this.options.elementOrder[m.id]){const g=this.options.elementOrder[m.id];m.elementOrder=st(g.concat(m.elementOrder))}return i=Si(i,m.elementOrder,"meta.id"),f.content=i.filter(g=>{const{controlData:c}=this.get(g.id),o=c.meta.id||"",h=[cr(o,this.options.disable.elements),c.meta.group===m.id,!n.includes(o)];let u=!0;return u=h.every(d=>d===!0),u&&n.push(o),u}),f}),t}add(e=Object.create(null)){const i=He(e);return this.data.set(i.id,i),i.controlData.meta.id&&this.data.set(i.controlData.meta.id,i.controlData),i}get(e){return He(this.data.get(e))}formActions(){if(this.options.disable.formActions===!0)return null;const e={...V.btnTemplate({content:[V.icon("bin"),Z.get("clear")],title:Z.get("clearAll")}),className:["clear-form"],action:{click:t=>{ir.size?(Q.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:Z.get("confirmClearAll"),clearAllAction:()=>{Bt.clearAll().then(()=>{const n={src:t.target};Q.formeoCleared(n)})},btnCoords:V.coords(t.target)}}),document.dispatchEvent(Q.confirmClearAll)):window.alert(Z.get("cannotClearFields"))}}},i={...V.btnTemplate({content:[V.icon("floppy-disk"),Z.get("save")],title:Z.get("save")}),className:["save-form"],action:{click:async({target:t})=>{const{default:n}=await vt(async()=>{const{default:g}=await Promise.resolve().then(()=>iu);return{default:g}},void 0),{formData:m}=n,f={action:()=>{},coords:V.coords(t),message:"",button:t};return ge.click.btn(f),ge.save.form(m)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:e,saveBtn:i}).reduce((t,[n,m])=>(this.options.disable.formActions.includes(n)||t.push(m),t),[])}}buildDOM(e){const i=this.groupElements(),t=this.formActions(),{displayType:n}=this.options.panels;this.panels=new is({panels:i,type:"controls",displayType:n});const m=["control-groups","formeo-panels-wrap",`panel-count-${i.length}`],f=V.create({className:m,content:[this.panels.panelNav,this.panels.panelsWrap]}),g=["formeo-controls"];e&&g.push("formeo-sticky");const c=V.create({className:g,content:[f,t]}),o=c.getElementsByClassName("control-group");this.dom=c,this.groups=o;const[h]=o;this.currentGroup=h,this.actions={filter:u=>{const d=u!=="",l=this.controls;let s=f.querySelector(".filtered-term");if(V.toggleElementsByStr(l,u),d){const r=Z.get("controls.filteringTerm",u);c.classList.add("filtered"),s?s.textContent=r:(s=V.create({tag:"h5",className:"filtered-term",content:r}),f.insertBefore(s,f.firstChild))}else s&&(c.classList.remove("filtered"),s.remove())},addElement:this.addElement,addGroup:u=>console.log(u)};for(let u=o.length-1;u>=0;u--){const d=`formeo-controls-${o[u]}`;this.options.sortable||globalThis.localStorage.removeItem(d),J.create(o[u],{animation:150,fallbackClass:"control-moving",fallbackOnBody:!0,forceFallback:!0,fallbackTolerance:5,group:{name:"controls",pull:"clone",put:!1,revertClone:!0},onClone:({clone:l,item:s})=>{if(l.id=s.id,this.options.ghostPreview){const{controlData:r}=this.get(s.id);vt(async()=>{const{default:a}=await Promise.resolve().then(()=>Qd);return{default:a}},void 0).then(({default:a})=>{l.innerHTML="",l.appendChild(new a(r).preview)})}},onStart:()=>{this.originalDocumentOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"},onEnd:()=>{document.documentElement.style.overflow=this.originalDocumentOverflow,this.originalDocumentOverflow=null},sort:this.options.sortable,store:{get:()=>{const l=globalThis.localStorage.getItem(d);return l?l.split("|"):[]},set:l=>{const s=l.toArray();globalThis.localStorage.setItem(d,s.join("|"))}}})}return c}layoutTypes={row:()=>Bt.active.addChild(),column:()=>this.layoutTypes.row().addChild(),field:e=>this.layoutTypes.column().addChild(e)};addElement=e=>{const{meta:{group:i,id:t},...n}=we(this.get(e),"controlData");return Oi(n,"config.controlId",t),i==="layout"?this.layoutTypes[t.replace("layout-","")]():this.layoutTypes.field(n)};applyOptions=async(e={})=>{const{container:i,elements:t,groupOrder:n,...m}=De(Yd,e);this.container=i,this.groupOrder=st(n.concat(["common","html","layout"])),this.options=m;const[f,g,c]=await Promise.all([vt(()=>import("./layout.min.js"),[]),vt(()=>import("./form.min.js"),[]),vt(()=>import("./html.min.js"),[])]),o=[f.default,g.default,c.default].flat();return Promise.all(this.registerControls([...o,...t]))}},ct=new rs,Qd=Sn({default:()=>os}),Xd=new Set(["checkbox","radio"]),Jd=new Set(["radio","checkbox","select-one","select-multiple"]),os=class extends Fi{constructor(e=Object.create(null)){super("field",e),this.debouncedUpdateEditPanels=fi(this.updateEditPanels),this.debouncedUpdatePreview=fi(this.updatePreview),this.label=V.create(this.labelConfig),this.preview=this.fieldPreview(),this.controlId=this.get("config.controlId")||this.get("meta.id");const i=this.getActionButtons(),t=this.actionButtons.some(m=>m.meta?.id==="edit");this.updateEditPanels();const n=V.create({tag:"li",attrs:{className:Tt},id:this.id,children:[this.label,this.getComponentTag(),i,t&&this.editWindow,this.preview].filter(Boolean),panelNav:this.panelNav,dataset:{hoverTag:Z.get("field")}});this.dom=n,this.isEditing=!1}get labelConfig(){if(this.get("config.hideLabel"))return null;const{label:e,editorLabel:i,disableHtmlLabel:t,helpText:n,tooltip:m}=this.get("config"),{required:f}=this.get("attrs")||{},g=i||e,c={tag:"label",attrs:{}};return t?(c.tag="input",c.attrs.value=g):(c.attrs.contenteditable=!0,c.children=g),{className:"prev-label",children:[{...c,action:{input:({target:{innerHTML:o,value:h}})=>{const u=t?h:o;super.set("config.label",u);const d=this.dom.querySelector(".config-label");d&&(d.value=u)}}},f&&V.requiredMark(),m&&V.tooltip(m),n&&V.helpText(n)]}}setData=(e,i)=>super.set(e,i);set(e,i){return this.setData(e,i)}updateLabel(){const e=V.create(this.labelConfig);(this.label||!e)&&this.label.remove(),e&&(this.data.config?.labelAfter?this.dom.append(e):this.dom.prepend(e)),this.label=e}updatePreview=()=>{this.updateLabel();const e=this.fieldPreview();this.preview.replaceWith(e),this.preview=e};get defaultPreviewActions(){return{change:e=>{const{target:i}=e,{type:t}=i;if(Jd.has(t)){const n=this.preview.querySelectorAll(":checked"),m=this.get("options"),f=m?.[0]?.selected===void 0?"checked":"selected",g=m.reduce((c,o)=>(c[o.value]=o,c[o.value][f]=!1,c),{});for(const c of n)g[c.value][f]=c.value===g[c.value].value;return super.set("options",Object.values(g)),this.debouncedUpdateEditPanels()}},click:e=>{e.target.contentEditable==="true"&&e.preventDefault()},input:({target:e})=>{if(["input","meter","progress","button"].includes(e.tagName.toLowerCase()))return super.set("attrs.value",e.value),this.debouncedUpdateEditPanels();if(e.contentEditable&&!e.type?.startsWith("select-")){const i=e.parentElement.classList;if(i.contains("f-checkbox")||i.contains("f-radio")){const t=e.parentElement,n=Je(t);return this.setData(`options[${n}].label`,e.innerHTML),this.debouncedUpdateEditPanels()}this.setData("content",e.innerHTML||e.value)}}}}fieldPreview(){const{action:e={},...i}=He(this.data);i.id=`prev-${this.id}`,i.action=Object.entries(e).reduce((n,[m,f])=>(n[m]=f.bind(this),n),{}),this.data?.config.editableContent&&(i.attrs={...i.attrs,contenteditable:!0});const t={attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:V.create(i,!0),action:this.defaultPreviewActions};return V.create(t,!0)}get isCheckable(){return Xd.has(this.get("config.controlId"))}},eu=()=>({actionButtons:{buttons:["move","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}}),tu=class extends Ii{constructor(e){super("fields",e),this.config={all:eu()}}Component(e){return new os(e)}get=e=>{let i=e&&we(this.data,e);if(!i){const t=ct.get(e);t&&(i=this.add(null,t.controlData))}return i};getData=()=>Object.entries(this.data).reduce((e,[i,t])=>{const{conditions:n,...m}=t?.getData()||t;if(n?.length){let f=!0;if(n.length===1){const[g]=n;f=!!g.if[0].source}f&&(m.conditions=n)}return e[i]=m,e},{});load=(e=Object.create(null))=>{const i=Li(e);this.empty();for(const[t,n]of Object.entries(i)){const{meta:m,...f}=n;m?.id&&Oi(f,"config.controlId",m?.id),this.add(t,f)}return this.data}},ss=new tu,iu=Sn({Columns:()=>Ht,Components:()=>as,Controls:()=>Wt,Fields:()=>hi,Rows:()=>ui,Stages:()=>di,default:()=>oe}),di=Bt,ui=ir,Ht=ns,hi=ss,Wt=ct,nu=(e,i=!1)=>{if(e!=null){const t=Li(e);if(t&&typeof t=="object"){const n=He(t);return{id:n.id||wt().id,stages:n.stages||wt().stages,rows:n.rows||{},columns:n.columns||{},fields:n.fields||{}}}console.warn("Formeo: Invalid formData provided, using default")}if(i){const t=Rn.get(Fn);if(t)return t}return wt()},as=class extends qn{constructor(){super("components"),this.disableEvents=!0,this.stages=di,this.rows=ui,this.columns=Ht,this.fields=hi,this.controls=Wt}load=(e,i)=>{this.empty();const t=nu(e,i.sessionStorage);this.opts=i,this.set("id",t.id),this.add("stages",di.load(t.stages)),this.add("rows",ui.load(t.rows)),this.add("columns",Ht.load(t.columns)),this.add("fields",hi.load(t.fields));for(const n of Object.values(this.get("stages")))n.loadChildren();return this.data};flatList(){const e={};for(const i of Object.keys(this.data.stages))ao(this.data,i,"stages",e);return e}getChildData=({type:e,id:i})=>{const t=this.get(e,i);if(t)return t.getData()};get json(){return window.JSON.stringify({$schema:`https://cdn.jsdelivr.net/npm/formeo@${On}/dist/formData_schema.json`,...this.formData})}get formData(){return{id:this.get("id"),stages:Bt.getData(),rows:ir.getData(),columns:ns.getData(),fields:ss.getData()}}set config(e){const{stages:i,rows:t,columns:n,fields:m}=e;di.config=i,ui.config=t,Ht.config=n,hi.config=m}getIndex(e){return this[e]||this[al.get(e)]}setAddress(e,i){if(!Te(e))return;const[t,n,...m]=Array.isArray(e)?e:lt(e),f=this.getIndex(t).get(n);return f?.set(m,i),f}getAddress(e){if(!Te(e))return;const[i,t,...n]=Array.isArray(e)?e:lt(e),m=this.getIndex(i).get(t);if(!(n.length&&!m))return n.length?m.get(n):m}},oe=new as,ei="no-transition",ru={debug:!1,bubbles:!0,formeoLoaded:e=>{},onAdd:()=>{},onRemove:()=>{},onChange:e=>Q.opts?.debug&&console.log(e),onUpdate:e=>Q.opts?.debug&&console.log(e),onUpdateStage:e=>Q.opts?.debug&&console.log(e),onUpdateRow:e=>Q.opts?.debug&&console.log(e),onUpdateColumn:e=>Q.opts?.debug&&console.log(e),onUpdateField:e=>Q.opts?.debug&&console.log(e),onAddRow:e=>Q.opts?.debug&&console.log(e),onAddColumn:e=>Q.opts?.debug&&console.log(e),onAddField:e=>Q.opts?.debug&&console.log(e),onRemoveRow:e=>Q.opts?.debug&&console.log(e),onRemoveColumn:e=>Q.opts?.debug&&console.log(e),onRemoveField:e=>Q.opts?.debug&&console.log(e),onRender:e=>Q.opts?.debug&&console.log(e),onSave:e=>{},confirmClearAll:e=>{globalThis.confirm(e.confirmationMessage)&&e.clearAllAction(e)}},Oe=({src:e,...i},t=Pn)=>{const n=new globalThis.CustomEvent(t,{detail:i,bubbles:Q.opts?.debug||Q.opts?.bubbles});if(n.data=(e||document).dispatchEvent(n),t==="formeoUpdated"){const m=new globalThis.CustomEvent(yl,{detail:i,bubbles:Q.opts?.debug||Q.opts?.bubbles});(e||document).dispatchEvent(m)}return n},Q={init:function(e){return this.opts={...ru,...e},this},formeoSaved:e=>Oe(e,fo),formeoUpdated:(e,i)=>Oe(e,i||"formeoUpdated"),formeoCleared:e=>Oe(e,bl),formeoOnRender:e=>Oe(e,bo),formeoConditionUpdated:e=>Oe(e,wl),formeoAddedRow:e=>Oe(e,Hn),formeoAddedColumn:e=>Oe(e,Wn),formeoAddedField:e=>Oe(e,Bn),formeoRemovedRow:e=>Oe(e,jn),formeoRemovedColumn:e=>Oe(e,Vn),formeoRemovedField:e=>Oe(e,Un)},ou=so(()=>{const e={timeStamp:globalThis.performance.now(),type:Pn,detail:oe.formData};Q.opts.onUpdate(e),Q.opts.onChange!==Q.opts.onUpdate&&Q.opts.onChange(e)},at);document.addEventListener(Pn,ou);document.addEventListener(go,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateStage(m)});document.addEventListener(mo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateRow(m)});document.addEventListener(vo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateColumn(m)});document.addEventListener(yo,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onUpdate(m),Q.opts.onUpdateField(m)});document.addEventListener(Hn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddRow(m)});document.addEventListener(Wn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddColumn(m)});document.addEventListener(Bn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onAdd(m),Q.opts.onAddField(m)});document.addEventListener(jn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveRow(m)});document.addEventListener(Vn,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveColumn(m)});document.addEventListener(Un,e=>{const{timeStamp:i,type:t,detail:n}=e,m={timeStamp:i,type:t,detail:n};Q.opts.onRemove(m),Q.opts.onRemoveField(m)});document.addEventListener(bo,e=>{const{timeStamp:i,type:t,detail:n}=e;Q.opts.onRender({timeStamp:i,type:t,detail:n})});document.addEventListener("confirmClearAll",e=>{e={timeStamp:e.timeStamp,type:e.type,confirmationMessage:e.detail.confirmationMessage,clearAllAction:e.detail.clearAllAction,btnCoords:e.detail.btnCoords},Q.opts.confirmClearAll(e)});document.addEventListener(fo,({timeStamp:e,type:i,detail:{formData:t}})=>{const n={timeStamp:e,type:i,formData:t};Q.opts.onSave(n)});document.addEventListener("formeoLoaded",e=>{Q.opts.formeoLoaded(e.detail.formeo)});var on;function su(){on=on||window.requestAnimationFrame(()=>{on=!1;for(const e of Object.values(Ht.data))e.dom.classList.add(ei),Wt.dom.classList.add(ei),Wt.panels.nav.refresh(),e.refreshFieldPanels(),so(()=>{e.dom.classList.remove(ei),Wt.dom.classList.remove(ei)},333)})}window.addEventListener("resize",su);var Ir={add:{attr:e=>{const i=globalThis.prompt(e.message.attr);if(i&&e.isDisabled(i))return globalThis.alert(Z.get("attributeNotPermitted",i)),ge.add.attrs(e);let t;i&&(t=String(globalThis.prompt(e.message.value,"")),e.addAction(i,t))},option:e=>{e.addAction()},condition:e=>{e.addAction(e)},config:e=>{e.addAction(e)}},remove:{attrs:e=>{e.removeAction()},options:e=>{e.removeAction()},conditions:e=>{e.removeAction()}},click:{btn:e=>{e.action()}},save:{form:un}},ge={init:function(e){const i=Object.keys(Ir);return this.opts=i.reduce((t,n)=>(t[n]={...Ir[n],...e[n]},t),e),this},add:{attrs:e=>ge.opts.add.attr(e),options:e=>ge.opts.add.option(e),conditions:e=>(e.template=e.template||Gn(),ge.opts.add.condition(e)),config:e=>ge.opts.add.config(e)},remove:{attrs:e=>ge.opts.remove.attrs(e),options:e=>ge.opts.remove.options(e),conditions:e=>ge.opts.remove.conditions(e)},click:{btn:e=>ge.opts.click.btn(e)},save:{form:e=>(ge.opts.sessionStorage&&Rn.set(Fn,e),Q.formeoSaved({formData:e}),ge.opts.save.form(e))}},au={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,svgSprite:null,style:nl,iconFont:null,config:{},events:{},actions:{},controls:{},i18n:{location:"https://draggable.github.io/formeo/assets/lang/"},onLoad:()=>{}}}},Se={CREATED:"created",LOADING_RESOURCES:"loading",INITIALIZING:"initializing",READY:"ready",ERROR:"error"},ls=class{#e=Se.CREATED;#i=null;#t=null;#n=!1;constructor({formData:e,...i},t){const{actions:n,events:m,debug:f,config:g,editorContainer:c,...o}=De(au.editor,i);c&&(this.editorContainer=typeof c=="string"?document.querySelector(c):c),this.opts=o,V.setOptions=o,oe.config=g;const h=t||e;this.#t=h?rt(h):null,this.userFormData=this.#t,this.Components=oe,this.dom=V,Q.init({debug:f,...m}),ge.init({debug:f,sessionStorage:o.sessionStorage,...n}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this.loadResources.bind(this)):this.loadResources()}get formData(){return this.Components.formData}set formData(e={}){const i=rt(e);this.#t=i,this.userFormData=i,this.load(this.userFormData,this.opts)}loadData(e={}){this.formData=e}get json(){return this.Components.json}clear(){const e=wt();this.#t=e,this.userFormData=e,this.Components.load(this.userFormData,this.opts),this.render()}async loadResources(){document.removeEventListener("DOMContentLoaded",this.loadResources),this.#e=Se.LOADING_RESOURCES;const e=[Xc(this.opts.svgSprite),ed(this.opts.style),Z.init({preloaded:{"en-US":vs},...this.opts.i18n,locale:globalThis.sessionStorage?.getItem(ur)})].filter(Boolean);try{await Promise.all(e),this.opts.allowEdit&&this.init()}catch(i){throw this.#e=Se.ERROR,console.error("Failed to load resources:",i),i}}init(){return this.#e===Se.INITIALIZING?this.#i:this.#e===Se.READY?this.#r():(this.#e=Se.INITIALIZING,this.#i=ct.init(this.opts.controls,this.opts.stickyControls).then(e=>(this.controls=e,this.#n||(this.#s(),this.#n=!0),this.formId=oe.get("id"),this.i18n={setLang:this.#o.bind(this)},this.render(),this.#e=Se.READY,this.opts.onLoad?.(this),this.tooltipInstance=new jr,this)).catch(e=>{throw this.#e=Se.ERROR,console.error("Failed to initialize editor:",e),e}),this.#i)}async#o(e){globalThis.sessionStorage?.setItem(ur,e),await Z.setCurrent(e),await this.#r()}async#r(){return this.controls=await ct.init(this.opts.controls,this.opts.stickyControls),this.render(),this}#s(){const e=this.#a();this.Components.load(e,this.opts)}#a(){if(this.#t)return He(this.#t);if(this.opts.sessionStorage){const e=Rn.get(Fn);if(e)return e}return wt()}load(e=this.userFormData,i=this.opts){this.Components.load(e,i),this.render()}get initState(){return this.#e}get isReady(){return this.#e===Se.READY}async whenReady(){return this.#e===Se.READY?this:this.#e===Se.ERROR?Promise.reject(new Error("Editor initialization failed")):this.#i?this.#i:new Promise((e,i)=>{const t=()=>{this.#e===Se.READY?e(this):this.#e===Se.ERROR?i(new Error("Editor initialization failed")):globalThis.requestAnimationFrame(t)};t()})}render(){if(!this.controls)return globalThis.requestAnimationFrame(()=>this.render());if(this.stages=Object.values(oe.get("stages")),this.opts.controlOnLeft)for(const i of this.stages)i.dom.style.order=1;const e={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map(({dom:i})=>i)]};Z.current.dir&&(e.attrs.dir=Z.current.dir,V.dir=Z.current.dir),this.editor=V.create(e),(this.controls.container||this.editor).appendChild(this.controls.dom),this.editorContainer&&(V.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),Q.formeoLoaded=new globalThis.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(Q.formeoLoaded)}},Dr=e=>typeof e=="string"?document.querySelector(e):e,lu=({editorContainer:e,renderContainer:i,formData:t,...n})=>{const m={renderContainer:Dr(i),editorContainer:Dr(e),formData:rt(t)};return{elements:{},...n,...m}},ti=e=>e.match(Al)?.[0]||e,Nr=e=>{if(!e||e.hasAttribute("hidden")||e.parentElement.hasAttribute("hidden"))return!1;const i=window.getComputedStyle(e);return!(i.display==="none"||i.visibility==="hidden"||i.opacity==="0")},cu={isChecked:e=>e.checked,isNotChecked:e=>!e.checked,value:e=>e.value,isVisible:e=>Nr(e),isNotVisible:e=>!Nr(e)},du=()=>V.btnTemplate({className:"remove-input-group",children:V.icon("remove"),action:{mouseover:({target:e})=>e.parentElement.classList.add("will-remove"),mouseleave:({target:e})=>e.parentElement.classList.remove("will-remove"),click:({target:e})=>e.parentElement.remove()}}),Fr={equals:gn.default,notEquals:(e,i)=>!(0,gn.default)(e,i),contains:(e,i)=>e.includes(i),notContains:(e,i)=>!e.includes(i)},uu=Object.entries(wo).reduce((e,[i,t])=>(e[t]=Fr[i],e[i]=Fr[i],e),{}),zr={equals:(e,{targetProperty:i,value:t})=>{e[`_${i}`]=e[i],e[i]=t}},hu=Object.entries(Co).reduce((e,[i,t])=>(e[t]=zr[i],e[i]=zr[i],e),{}),pu={isChecked:e=>{e.checked=!0},isNotChecked:e=>{e.checked=!1},value:(e,{assignment:i,...t})=>{const n=hu[i]?.(e,t),m=new Event("input",{bubbles:!0});return e.dispatchEvent(m),n},isNotVisible:e=>{e?._required===void 0&&(e._required=e.required),e.parentElement.setAttribute("hidden",!0),e.required=!1},isVisible:e=>{e.parentElement.removeAttribute("hidden"),e.required=e._required}},cs=class{constructor(e,i){const{renderContainer:t,elements:n,formData:m,config:f}=lu(e);this.container=t,this.form=rt(i||m),this.elements=n,this.config=f,this.components=Object.create(null),this.dom=V}get formData(){return this.form}set formData(e){this.form=rt(e)}get userData(){const e=this.container.querySelector(".formeo-render")||this.renderedForm;if(!e)return{};const i=new FormData(e),t={};for(const[n,m]of i.entries())t[n]?Array.isArray(t[n])?t[n].push(m):t[n]=[t[n],m]:t[n]=m;return t}get userFormData(){const e=[];for(const[i,t]of Object.entries(this.userData)){const n={key:i,value:t,label:this.components[ti(i)]?.config?.label||""};e.push(n)}return e}set userData(e={}){const i=this.container.querySelector("form");for(const t of Object.keys(e)){const n=i.elements[t];if(n.length&&n[0].type==="checkbox"){const m=Array.isArray(e[t])?e[t]:[e[t]];for(const f of n)f.checked=m.includes(f.value)}else if(n.length&&n[0].type==="radio")for(const m of n)m.checked=m.value===e[t];else n.type&&(n.value=e[t])}}render(e=this.form){this.form=rt(e);const i=this.getRenderedForm(e),t=this.container.querySelector(".formeo-render");t?t.replaceWith(i):this.container.appendChild(i)}getRenderedForm(e=this.form){this.form=rt(e);const i=document.getElementsByClassName("formeo-render").length,t={...this.config,tag:"form",id:this.form.id,className:`formeo-render formeo formeo-rendered-${i}`,children:this.processedData};return this.renderedForm=V.render(t),this.applyConditions(),this.renderedForm}get html(){return(this.renderedForm||this.getRenderedForm()).outerHTML}orderChildren=(e,i)=>i.reduce((t,n)=>(t.push(this.form[e][n]),t),[]);prefixId=e=>"f-"+e;processColumn=({id:e,...i})=>({...i,id:this.prefixId(e),children:this.processFields(i.children),style:`width: ${i.config.width||"100%"}`});processRows=e=>this.orderChildren("rows",this.form.stages[e].children).reduce((i,t)=>(t&&i.push(this.processRow(t)),i),[]);cacheComponent=e=>(this.components[ti(e.id)]=e,e);processRow=(e,i="row")=>{const{config:t,id:n}=e,m=[`formeo-${i}-wrap`],f={...e,children:this.processColumns(e.id),id:this.prefixId(n)};this.cacheComponent(f);const g=[{condition:t.legend,result:()=>({tag:t.fieldset?"legend":"h3",children:t.legend})},{condition:!0,result:()=>f},{condition:t.inputGroup,result:()=>this.addButton(n)}].reduce((c,{condition:o,result:h})=>(o&&c.push(h()),c),[]);return t.inputGroup&&m.push("f-input-group-wrap"),{tag:t.fieldset?"fieldset":"div",className:m,children:g}};cloneComponentData=e=>{const{children:i=[],id:t,attrs:n={},...m}=this.components[e],f={...n,"data-clone-of":t};return m.tag==="input"&&(f.name=Ko(this.components[e])),{...m,id:"f-"+Me(t),children:i?.length&&i.map(({id:g})=>this.cloneComponentData(ti(g))),attrs:f}};addButton=e=>({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:i=>{const t=i.target.parentElement,n=V.create(this.cloneComponentData(e));t.insertBefore(n,t.lastChild);const m=V.create(du());n.appendChild(m)}}});processColumns=e=>this.orderChildren("columns",this.form.rows[e].children).map(i=>this.cacheComponent(this.processColumn(i)));processFields=e=>this.orderChildren("fields",e).map(({id:i,...t})=>{const n=t.config?.controlId||t.meta?.id,{action:m={},dependencies:f={}}=this.elements[n]||{};f&&Go(f);const g=De({action:m},t);return this.cacheComponent({...g,id:this.prefixId(i)})});get processedData(){return Object.values(this.form.stages).map(e=>(e.children=this.processRows(e.id),e.className=kt,this.components[ti(e.id)]=e,e))}handleComponentCondition=(e,i,t)=>{if(e.length){for(const f of e)this.handleComponentCondition(f,i,t);return}const n=gu(e);n&&e.addEventListener(n,f=>{if(this.evaluateCondition(i,f))for(const g of t)this.execResult(g,f)},!1);const m={target:e};if(this.evaluateCondition(i,m))for(const f of t)this.execResult(f,m)};applyConditions=()=>{for(const{conditions:e}of Object.values(this.components))if(e)for(const i of e){const{if:t,then:n}=i;for(const m of t){const{source:f,target:g}=m;if(Te(f)){const{component:c,options:o}=this.getComponent(f),h=o||c;this.handleComponentCondition(h,m,n)}if(Te(g)){const{component:c,options:o}=this.getComponent(g),h=o||c;this.handleComponentCondition(h,m,n)}}}};evaluateCondition=({source:e,sourceProperty:i,targetProperty:t,comparison:n,target:m})=>{const f=this.getComponentProperty(e,i);if(typeof f=="boolean")return f;const g=String(Te(m)?this.getComponentProperty(m,t):m);return uu[n]?.(f,g)};execResult=({target:e,targetProperty:i,assignment:t,value:n})=>{if(Te(e)){const{component:m,option:f}=this.getComponent(e),g=f||m;pu[i]?.(g,{targetProperty:i,assignment:t,value:n})}};getComponentProperty=(e,i)=>{const{component:t,option:n}=this.getComponent(e),m=n||t;return cu[i]?.(m)||m[i]};getComponent=e=>{const i={component:null};if(!Te(e))return null;const[,t,n,m]=lt(e),f=this.renderedForm.querySelector(`#f-${t}`);if(!f)return i;if(i.component=f,n){const g=f.querySelectorAll("input"),c=g[m];return i.options=g,i.option=c,i}return i};getComponents=e=>{const i=[],t=e.slice(e.indexOf(".")+1);return i.push(...this.renderedForm.querySelectorAll(`[name=f-${t}]`)),i}},fu=[["input",e=>["textarea","text"].includes(e.type)],["change",e=>["select"].includes(e.tagName.toLowerCase())||["checkbox","radio"].includes(e.type)]],gu=e=>{const[i]=fu.find(t=>t[1](e))||[!1];return i};window!==void 0&&(window.FormeoEditor=ls,window.FormeoRenderer=cs);var nr=ls,rr=cs,mu={rows:{all:{events:{onAdd:e=>{if(console.log(`You just added a new row with the id "${e.target.id}"`,e.index),e.index===2){const i=e.target.dom.querySelector(".action-btn-wrap"),t=document.createElement("button");t.type="button",t.className="btn btn-sm btn-secondary",t.textContent="Add Column",t.style.border="1px solid #ccc",t.style.width="auto",t.addEventListener("click",()=>{e.target.addChild()}),i.appendChild(t)}}}}},fields:{all:{panels:{attrs:{}},events:{onRemove:e=>{console.log(`You just removed the field with the id "${e.target.id}"`,e)}}},"text-input":{attrs:{type:[{label:"text",value:"text"},{label:"phone",value:"phone"},{label:"email",value:"email"}]},config:{helpText:"This is a custom help text for text input fields.",hideLabel:!1}},checkbox:{actionButtons:{},panels:{attrs:{hideDisabled:!0}}}}},vu={sortable:!1,groupOrder:["common","html"],disable:{},elements:[{tag:"input",config:{label:"Email",disabledAttrs:["type"],lockedAttrs:["required","className"]},meta:{group:"common",id:"email",icon:"@"},attrs:{className:"custom-email",type:"email",required:!0}}],elementOrder:{common:["button","checkbox","date-input","hidden","upload","number","radio","select","text-input","textarea"]}},yu=".build-form",bu=".render-form",jt={editorContainer:yu,actions:{},controls:vu,config:mu,events:{onSave:console.log,onChange:console.log},style:null,sessionStorage:!0,editPanelOrder:["attrs","options"],onLoad:()=>{console.log("demo loaded")}},or={renderContainer:bu,elements:{tinymce:{action:{onRender:e=>{if(e.id){const i=`#${e.id}`;globalThis.tinymce.remove(i),globalThis.tinymce.init({selector:i})}}}}}};async function wu(e){e.innerHTML=`
11
13
  <div class="angular-demo">
12
14
  <h3>Angular Integration Demo</h3>
13
15
  <p>Demonstrating Formeo integration patterns for Angular applications</p>
@@ -15,7 +17,7 @@ Author: Draggable https://draggable.io
15
17
  <p>Initializing Angular-style Formeo integration demo...</p>
16
18
  </div>
17
19
  </div>
18
- `;try{await sv(),await av()&&console.log("Highlight.js loaded successfully"),l.innerHTML=`
20
+ `;try{await Cu(),await Su()&&console.log("Highlight.js loaded successfully"),e.innerHTML=`
19
21
  <div class="angular-demo">
20
22
  <h3>Angular Integration Demo</h3>
21
23
  <div class="demo-description">
@@ -51,17 +53,17 @@ npm install formeo</code></pre>
51
53
 
52
54
  <div class="guide-section">
53
55
  <h4>2. Angular Component Implementation</h4>
54
- <pre><code class="language-typescript">${Jo(uv)}</code></pre>
56
+ <pre><code class="language-typescript">${an(Au)}</code></pre>
55
57
  </div>
56
58
 
57
59
  <div class="guide-section">
58
60
  <h4>3. Service for Formeo Management (Optional)</h4>
59
- <pre><code class="language-typescript">${Jo(hv)}</code></pre>
61
+ <pre><code class="language-typescript">${an(ku)}</code></pre>
60
62
  </div>
61
63
 
62
64
  <div class="guide-section">
63
65
  <h4>4. Module Configuration</h4>
64
- <pre><code class="language-typescript">${Jo(dv)}</code></pre>
66
+ <pre><code class="language-typescript">${an(Tu)}</code></pre>
65
67
  </div>
66
68
  </div>
67
69
 
@@ -70,17 +72,17 @@ npm install formeo</code></pre>
70
72
  <div id="angular-app-root"></div>
71
73
  </div>
72
74
  </div>
73
- `;const t=await cv();$u();const n=l.querySelector("#toggle-instructions"),p=l.querySelector("#instructions-section"),h=n.querySelector(".toggle-text"),g=n.querySelector(".toggle-icon");return n&&p&&n.addEventListener("click",()=>{const m=p.style.display==="block";p.style.display=m?"none":"block",h.textContent=m?"Show Implementation Guide":"Hide Implementation Guide",g.textContent=m?"▼":"▲",m||setTimeout(()=>$u(),50)}),{angularApp:t,cleanup:()=>{t?.destroy&&t.destroy();const m=document.getElementById("angular-app-root");m&&(m.innerHTML="")}}}catch(e){return console.error("Failed to load Angular demo:",e),l.innerHTML=`
75
+ `;const i=await Eu();Pr();const t=e.querySelector("#toggle-instructions"),n=e.querySelector("#instructions-section"),m=t.querySelector(".toggle-text"),f=t.querySelector(".toggle-icon");return t&&n&&t.addEventListener("click",()=>{const g=n.style.display==="block";n.style.display=g?"none":"block",m.textContent=g?"Show Implementation Guide":"Hide Implementation Guide",f.textContent=g?"▼":"▲",g||setTimeout(()=>Pr(),50)}),{angularApp:i,cleanup:()=>{i?.destroy&&i.destroy();const g=document.getElementById("angular-app-root");g&&(g.innerHTML="")}}}catch(i){return console.error("Failed to load Angular demo:",i),e.innerHTML=`
74
76
  <div class="angular-demo">
75
77
  <h3>Angular Integration Demo</h3>
76
78
  <div class="error-message">
77
79
  <h4>Failed to load Angular demo</h4>
78
- <p>${e.message}</p>
80
+ <p>${i.message}</p>
79
81
  <p>This demo requires an internet connection to load Angular framework files.</p>
80
82
  <button class="retry-button" onclick="window.frameworkLoader?.switchFramework('angular')">Retry</button>
81
83
  </div>
82
84
  </div>
83
- `,{cleanup:()=>{}}}}async function sv(){await new Promise(l=>setTimeout(l,500)),console.log("Angular-style demo environment ready")}async function av(){if(window.hljs)return window.hljs;try{const l=document.createElement("link");return l.rel="stylesheet",l.href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css",document.head.appendChild(l),lv(),await Qo("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"),await Qo("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/typescript.min.js"),await Qo("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/bash.min.js"),window.hljs}catch(l){return console.warn("Failed to load Highlight.js:",l),null}}function lv(){const l=document.createElement("style");l.textContent=`
85
+ `,{cleanup:()=>{}}}}async function Cu(){await new Promise(e=>setTimeout(e,500)),console.log("Angular-style demo environment ready")}async function Su(){if(window.hljs)return window.hljs;try{const e=document.createElement("link");return e.rel="stylesheet",e.href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css",document.head.appendChild(e),xu(),await sn("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"),await sn("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/typescript.min.js"),await sn("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/bash.min.js"),window.hljs}catch(e){return console.warn("Failed to load Highlight.js:",e),null}}function xu(){const e=document.createElement("style");e.textContent=`
84
86
  .angular-demo .guide-section {
85
87
  margin-bottom: 24px;
86
88
  }
@@ -146,7 +148,7 @@ npm install formeo</code></pre>
146
148
  padding: 20px;
147
149
  margin-top: 16px;
148
150
  }
149
- `,document.head.appendChild(l)}function Qo(l){return new Promise((e,t)=>{const n=document.createElement("script");n.src=l,n.onload=e,n.onerror=t,document.head.appendChild(n)})}function $u(){window.hljs?document.querySelectorAll("pre code").forEach(l=>{try{window.hljs.highlightElement(l)}catch(e){console.warn("Failed to highlight code block:",e)}}):document.querySelectorAll("pre code").forEach(l=>{l.style.fontFamily="'Monaco', 'Menlo', 'Ubuntu Mono', monospace",l.style.fontSize="14px",l.style.lineHeight="1.5"})}async function cv(){const l=document.getElementById("angular-app-root");if(!l)return null;l.innerHTML=`
151
+ `,document.head.appendChild(e)}function sn(e){return new Promise((i,t)=>{const n=document.createElement("script");n.src=e,n.onload=i,n.onerror=t,document.head.appendChild(n)})}function Pr(){window.hljs?document.querySelectorAll("pre code").forEach(e=>{try{window.hljs.highlightElement(e)}catch(i){console.warn("Failed to highlight code block:",i)}}):document.querySelectorAll("pre code").forEach(e=>{e.style.fontFamily="'Monaco', 'Menlo', 'Ubuntu Mono', monospace",e.style.fontSize="14px",e.style.lineHeight="1.5"})}async function Eu(){const e=document.getElementById("angular-app-root");if(!e)return null;e.innerHTML=`
150
152
  <div class="angular-component">
151
153
  <div class="form-builder-container">
152
154
  <div class="editor-section">
@@ -164,7 +166,7 @@ npm install formeo</code></pre>
164
166
  </div>
165
167
  </div>
166
168
  </div>
167
- `;const e=l.querySelector(".angular-form-editor"),t=l.querySelector(".angular-form-renderer");if(e&&t){const n=document.createElement("form");n.className="build-form-angular-real";const p=document.createElement("div");p.className="render-form-angular-real",e.appendChild(n),t.appendChild(p);const h={...an,editorContainer:".build-form-angular-real",events:{...an.events,onSave:a=>{console.log("Angular Component - Form saved:",a)},onChange:a=>{console.log("Angular Component - Form changed:",a)}}},g={...da,renderContainer:".render-form-angular-real"},m=new ua(h),c=new ha(g),d=l.querySelector("#angular-save-btn"),r=l.querySelector("#angular-render-btn"),o=l.querySelector("#angular-clear-btn");return d&&d.addEventListener("click",()=>{const a=m.formData;console.log("Angular Component - Save clicked:",a),alert("Form saved! Check console for form data.")}),r&&r.addEventListener("click",()=>{const a=m.formData;a&&Object.keys(a).length>0?(p.style.display="block",c.render(a),console.log("Angular Component - Render clicked:",a)):alert("Please create a form first before rendering")}),o&&o.addEventListener("click",()=>{m&&m.clear(),c&&p&&(p.innerHTML="",p.style.display="none"),console.log("Angular Component - Clear clicked")}),{editor:m,renderer:c,destroy:()=>{m?.destroy&&m.destroy(),c?.destroy&&c.destroy()}}}return null}function Jo(l){const e=document.createElement("div");return e.textContent=l,e.innerHTML}const uv=`import { Component, OnInit, OnDestroy, ElementRef, ViewChild, inject } from '@angular/core';
169
+ `;const i=e.querySelector(".angular-form-editor"),t=e.querySelector(".angular-form-renderer");if(i&&t){const n=document.createElement("form");n.className="build-form-angular-real";const m=document.createElement("div");m.className="render-form-angular-real",i.appendChild(n),t.appendChild(m);const f={...jt,editorContainer:".build-form-angular-real",events:{...jt.events,onSave:l=>{console.log("Angular Component - Form saved:",l)},onChange:l=>{console.log("Angular Component - Form changed:",l)}}},g={...or,renderContainer:".render-form-angular-real"},c=new nr(f),o=new rr(g),h=e.querySelector("#angular-save-btn"),u=e.querySelector("#angular-render-btn"),d=e.querySelector("#angular-clear-btn");return h&&h.addEventListener("click",()=>{const l=c.formData;console.log("Angular Component - Save clicked:",l),alert("Form saved! Check console for form data.")}),u&&u.addEventListener("click",()=>{const l=c.formData;l&&Object.keys(l).length>0?(m.style.display="block",o.render(l),console.log("Angular Component - Render clicked:",l)):alert("Please create a form first before rendering")}),d&&d.addEventListener("click",()=>{c&&c.clear(),o&&m&&(m.innerHTML="",m.style.display="none"),console.log("Angular Component - Clear clicked")}),{editor:c,renderer:o,destroy:()=>{c?.destroy&&c.destroy(),o?.destroy&&o.destroy()}}}return null}function an(e){const i=document.createElement("div");return i.textContent=e,i.innerHTML}var Au=`import { Component, OnInit, OnDestroy, ElementRef, ViewChild, inject } from '@angular/core';
168
170
  import { FormeoEditor, FormeoRenderer } from 'formeo';
169
171
 
170
172
  @Component({
@@ -353,7 +355,7 @@ export class FormBuilderComponent implements OnInit, OnDestroy {
353
355
  this.renderer.destroy();
354
356
  }
355
357
  }
356
- }`,hv=`import { Injectable, signal } from '@angular/core';
358
+ }`,ku=`import { Injectable, signal } from '@angular/core';
357
359
  import { FormeoEditor, FormeoRenderer } from 'formeo';
358
360
 
359
361
  export interface FormeoConfig {
@@ -473,7 +475,7 @@ export class FormeoService {
473
475
  console.log('Form submitted via service:', formData);
474
476
  // Handle form submission logic here
475
477
  }
476
- }`,dv=`// app.config.ts (for standalone applications)
478
+ }`,Tu=`// app.config.ts (for standalone applications)
477
479
  import { ApplicationConfig } from '@angular/core';
478
480
  import { provideRouter } from '@angular/router';
479
481
  import { routes } from './app.routes';
@@ -511,7 +513,7 @@ import { AppComponent } from './app/app.component';
511
513
  import { appConfig } from './app/app.config';
512
514
 
513
515
  bootstrapApplication(AppComponent, appConfig)
514
- .catch(err => console.error(err));`;async function fv(l){l.innerHTML=`
516
+ .catch(err => console.error(err));`;async function Mu(e){e.innerHTML=`
515
517
  <div class="react-demo">
516
518
  <h3>React Integration Demo</h3>
517
519
  <p>Demonstrating Formeo integration patterns for React applications</p>
@@ -519,7 +521,7 @@ bootstrapApplication(AppComponent, appConfig)
519
521
  <p>Initializing React-style Formeo integration demo...</p>
520
522
  </div>
521
523
  </div>
522
- `;try{await pv(),await gv()&&console.log("Highlight.js loaded successfully for React demo"),l.innerHTML=`
524
+ `;try{await $u(),await Lu()&&console.log("Highlight.js loaded successfully for React demo"),e.innerHTML=`
523
525
  <div class="react-demo">
524
526
  <h3>React Integration Demo</h3>
525
527
  <div class="demo-description">
@@ -553,17 +555,17 @@ npm install --save-dev @types/react @types/react-dom typescript</code></pre>
553
555
 
554
556
  <div class="guide-section">
555
557
  <h4>2. React Hook for Formeo</h4>
556
- <pre><code class="language-typescript">${ts(yv)}</code></pre>
558
+ <pre><code class="language-typescript">${cn(Ou)}</code></pre>
557
559
  </div>
558
560
 
559
561
  <div class="guide-section">
560
562
  <h4>3. React Component Implementation</h4>
561
- <pre><code class="language-typescript">${ts(bv)}</code></pre>
563
+ <pre><code class="language-typescript">${cn(Iu)}</code></pre>
562
564
  </div>
563
565
 
564
566
  <div class="guide-section">
565
567
  <h4>4. Context Provider (Advanced)</h4>
566
- <pre><code class="language-typescript">${ts(wv)}</code></pre>
568
+ <pre><code class="language-typescript">${cn(Du)}</code></pre>
567
569
  </div>
568
570
  </div>
569
571
 
@@ -572,17 +574,17 @@ npm install --save-dev @types/react @types/react-dom typescript</code></pre>
572
574
  <div id="react-app-root"></div>
573
575
  </div>
574
576
  </div>
575
- `;const t=await vv();xu();const n=l.querySelector("#toggle-instructions"),p=l.querySelector("#instructions-section"),h=n.querySelector(".toggle-text"),g=n.querySelector(".toggle-icon");return n&&p&&n.addEventListener("click",()=>{const m=p.style.display==="block";p.style.display=m?"none":"block",h.textContent=m?"Show Implementation Guide":"Hide Implementation Guide",g.textContent=m?"▼":"▲",m||setTimeout(()=>xu(),50)}),{reactApp:t,cleanup:()=>{t?.cleanup&&t.cleanup();const m=document.getElementById("react-app-root");m&&(m.innerHTML="")}}}catch(e){return console.error("Failed to load React demo:",e),l.innerHTML=`
577
+ `;const i=await _u();Hr();const t=e.querySelector("#toggle-instructions"),n=e.querySelector("#instructions-section"),m=t.querySelector(".toggle-text"),f=t.querySelector(".toggle-icon");return t&&n&&t.addEventListener("click",()=>{const g=n.style.display==="block";n.style.display=g?"none":"block",m.textContent=g?"Show Implementation Guide":"Hide Implementation Guide",f.textContent=g?"▼":"▲",g||setTimeout(()=>Hr(),50)}),{reactApp:i,cleanup:()=>{i?.cleanup&&i.cleanup();const g=document.getElementById("react-app-root");g&&(g.innerHTML="")}}}catch(i){return console.error("Failed to load React demo:",i),e.innerHTML=`
576
578
  <div class="react-demo">
577
579
  <h3>React Integration Demo</h3>
578
580
  <div class="error-message">
579
581
  <h4>Failed to load React demo</h4>
580
- <p>${e.message}</p>
582
+ <p>${i.message}</p>
581
583
  <p>This demo requires an internet connection to load Highlight.js for syntax highlighting.</p>
582
584
  <button class="retry-button" onclick="window.frameworkLoader?.switchFramework('react')">Retry</button>
583
585
  </div>
584
586
  </div>
585
- `,{cleanup:()=>{}}}}async function pv(){await new Promise(l=>setTimeout(l,500)),console.log("React-style demo environment ready")}async function gv(){if(window.hljs)return window.hljs;try{const l=document.createElement("link");return l.rel="stylesheet",l.href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css",document.head.appendChild(l),mv(),await es("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"),await es("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/typescript.min.js"),await es("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/bash.min.js"),window.hljs}catch(l){return console.warn("Failed to load Highlight.js:",l),null}}function mv(){const l=document.createElement("style");l.textContent=`
587
+ `,{cleanup:()=>{}}}}async function $u(){await new Promise(e=>setTimeout(e,500)),console.log("React-style demo environment ready")}async function Lu(){if(window.hljs)return window.hljs;try{const e=document.createElement("link");return e.rel="stylesheet",e.href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css",document.head.appendChild(e),Ru(),await ln("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"),await ln("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/typescript.min.js"),await ln("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/bash.min.js"),window.hljs}catch(e){return console.warn("Failed to load Highlight.js:",e),null}}function Ru(){const e=document.createElement("style");e.textContent=`
586
588
  .react-demo .guide-section {
587
589
  margin-bottom: 24px;
588
590
  }
@@ -656,7 +658,7 @@ npm install --save-dev @types/react @types/react-dom typescript</code></pre>
656
658
  padding: 12px;
657
659
  margin: 12px 0;
658
660
  }
659
- `,document.head.appendChild(l)}function es(l){return new Promise((e,t)=>{const n=document.createElement("script");n.src=l,n.onload=e,n.onerror=t,document.head.appendChild(n)})}function xu(){window.hljs?document.querySelectorAll("pre code").forEach(l=>{try{window.hljs.highlightElement(l)}catch(e){console.warn("Failed to highlight code block:",e)}}):document.querySelectorAll("pre code").forEach(l=>{l.style.fontFamily="'Monaco', 'Menlo', 'Ubuntu Mono', monospace",l.style.fontSize="14px",l.style.lineHeight="1.5"})}async function vv(){const l=document.getElementById("react-app-root");if(!l)return null;l.innerHTML=`
661
+ `,document.head.appendChild(e)}function ln(e){return new Promise((i,t)=>{const n=document.createElement("script");n.src=e,n.onload=i,n.onerror=t,document.head.appendChild(n)})}function Hr(){window.hljs?document.querySelectorAll("pre code").forEach(e=>{try{window.hljs.highlightElement(e)}catch(i){console.warn("Failed to highlight code block:",i)}}):document.querySelectorAll("pre code").forEach(e=>{e.style.fontFamily="'Monaco', 'Menlo', 'Ubuntu Mono', monospace",e.style.fontSize="14px",e.style.lineHeight="1.5"})}async function _u(){const e=document.getElementById("react-app-root");if(!e)return null;e.innerHTML=`
660
662
  <div class="react-component">
661
663
  <div class="form-builder-container">
662
664
  <div class="editor-section">
@@ -675,7 +677,7 @@ npm install --save-dev @types/react @types/react-dom typescript</code></pre>
675
677
  </div>
676
678
  </div>
677
679
  </div>
678
- `;const e=l.querySelector(".react-form-editor"),t=l.querySelector(".react-form-renderer");if(e&&t){const n=document.createElement("form");n.className="build-form-react-real";const p=document.createElement("div");p.className="render-form-react-real",e.appendChild(n),t.appendChild(p);const h={...an,editorContainer:".build-form-react-real",events:{...an.events,onSave:s=>{console.log("React Component - Form saved:",s)},onChange:s=>{console.log("React Component - Form changed:",s)}}},g={...da,renderContainer:".render-form-react-real"},m=new ua(h),c=new ha(g),d=l.querySelector("#react-save-btn"),r=l.querySelector("#react-render-btn"),o=l.querySelector("#react-clear-btn"),a=l.querySelector("#react-export-btn");return d&&d.addEventListener("click",()=>{const s=m.formData;console.log("React Component - Save clicked:",s),localStorage.setItem("formeo-react-form",JSON.stringify(s)),alert("Form saved! Check console for form data.")}),r&&r.addEventListener("click",()=>{const s=m.formData;s&&Object.keys(s).length>0?(p.style.display="block",c.render(s),console.log("React Component - Render clicked:",s)):alert("Please create a form first before rendering")}),o&&o.addEventListener("click",()=>{m?.clear(),p.style.display="none",localStorage.removeItem("formeo-react-form"),console.log("React Component - Clear clicked")}),a&&a.addEventListener("click",()=>{const s=m.formData;if(s&&Object.keys(s).length>0){const i=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),u=URL.createObjectURL(i),f=document.createElement("a");f.href=u,f.download="formeo-react-form.json",f.click(),URL.revokeObjectURL(u),console.log("React Component - Export clicked")}else alert("Please create a form first before exporting")}),{editor:m,renderer:c,cleanup:()=>{m?.destroy&&m.destroy(),c?.destroy&&c.destroy()}}}return null}function ts(l){const e=document.createElement("div");return e.textContent=l,e.innerHTML}const yv=`import { useEffect, useRef, useCallback } from 'react';
680
+ `;const i=e.querySelector(".react-form-editor"),t=e.querySelector(".react-form-renderer");if(i&&t){const n=document.createElement("form");n.className="build-form-react-real";const m=document.createElement("div");m.className="render-form-react-real",i.appendChild(n),t.appendChild(m);const f={...jt,editorContainer:".build-form-react-real",events:{...jt.events,onSave:s=>{console.log("React Component - Form saved:",s)},onChange:s=>{console.log("React Component - Form changed:",s)}}},g={...or,renderContainer:".render-form-react-real"},c=new nr(f),o=new rr(g),h=e.querySelector("#react-save-btn"),u=e.querySelector("#react-render-btn"),d=e.querySelector("#react-clear-btn"),l=e.querySelector("#react-export-btn");return h&&h.addEventListener("click",()=>{const s=c.formData;console.log("React Component - Save clicked:",s),localStorage.setItem("formeo-react-form",JSON.stringify(s)),alert("Form saved! Check console for form data.")}),u&&u.addEventListener("click",()=>{const s=c.formData;s&&Object.keys(s).length>0?(m.style.display="block",o.render(s),console.log("React Component - Render clicked:",s)):alert("Please create a form first before rendering")}),d&&d.addEventListener("click",()=>{c?.clear(),m.style.display="none",localStorage.removeItem("formeo-react-form"),console.log("React Component - Clear clicked")}),l&&l.addEventListener("click",()=>{const s=c.formData;if(s&&Object.keys(s).length>0){const r=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),a=URL.createObjectURL(r),p=document.createElement("a");p.href=a,p.download="formeo-react-form.json",p.click(),URL.revokeObjectURL(a),console.log("React Component - Export clicked")}else alert("Please create a form first before exporting")}),{editor:c,renderer:o,cleanup:()=>{c?.destroy&&c.destroy(),o?.destroy&&o.destroy()}}}return null}function cn(e){const i=document.createElement("div");return i.textContent=e,i.innerHTML}var Ou=`import { useEffect, useRef, useCallback } from 'react';
679
681
  import { FormeoEditor, FormeoRenderer } from 'formeo';
680
682
 
681
683
  // Custom hook for Formeo Editor
@@ -808,7 +810,7 @@ export function useFormeoRenderer(options = {}) {
808
810
  clearRenderer,
809
811
  renderer: rendererRef.current
810
812
  };
811
- }`,bv=`import React, { useState } from 'react';
813
+ }`,Iu=`import React, { useState } from 'react';
812
814
  import { useFormeoEditor, useFormeoRenderer } from './hooks/useFormeo';
813
815
 
814
816
  interface FormBuilderProps {
@@ -980,7 +982,7 @@ export default function App() {
980
982
  )}
981
983
  </div>
982
984
  );
983
- }`,wv=`import React, { createContext, useContext, useReducer, useCallback } from 'react';
985
+ }`,Du=`import React, { createContext, useContext, useReducer, useCallback } from 'react';
984
986
  import { FormeoEditor, FormeoRenderer } from 'formeo';
985
987
 
986
988
  // Types
@@ -1167,8 +1169,8 @@ export const FormManager: React.FC = () => {
1167
1169
  <p>Active Renderers: {Object.keys(state.renderers).length}</p>
1168
1170
  </div>
1169
1171
  );
1170
- };`;var ns={exports:{}},Eu;function Cv(){return Eu||(Eu=1,(function(l,e){(function(){var t="ace",n=(function(){return this})();!n&&typeof window<"u"&&(n=window);var p=function(r,o,a){if(typeof r!="string"){p.original?p.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(a=o),p.modules[r]||(p.payloads[r]=a,p.modules[r]=null)};p.modules={},p.payloads={};var h=function(r,o,a){if(typeof o=="string"){var s=c(r,o);if(s!=null)return a&&a(),s}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var i=[],u=0,f=o.length;u<f;++u){var y=c(r,o[u]);if(y==null&&g.original)return;i.push(y)}return a&&a.apply(null,i)||!0}},g=function(r,o){var a=h("",r,o);return a==null&&g.original?g.original.apply(this,arguments):a},m=function(r,o){if(o.indexOf("!")!==-1){var a=o.split("!");return m(r,a[0])+"!"+m(r,a[1])}if(o.charAt(0)=="."){var s=r.split("/").slice(0,-1).join("/");for(o=s+"/"+o;o.indexOf(".")!==-1&&i!=o;){var i=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},c=function(r,o){o=m(r,o);var a=p.modules[o];if(!a){if(a=p.payloads[o],typeof a=="function"){var s={},i={id:o,uri:"",exports:s,packaged:!0},u=function(y,b){return h(o,y,b)},f=a(u,s,i);s=f||i.exports,p.modules[o]=s,delete p.payloads[o]}a=p.modules[o]=s||a}return a};function d(r){var o=n;n[r]||(n[r]={}),o=n[r],(!o.define||!o.define.packaged)&&(p.original=o.define,o.define=p,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(g.original=o.require,o.require=g,o.require.packaged=!0)}d(t)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(t,n,p){function h(g,m,c){Object.defineProperty(g,m,{value:c,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||h(String.prototype,"startsWith",function(g,m){return m=m||0,this.lastIndexOf(g,m)===m}),String.prototype.endsWith||h(String.prototype,"endsWith",function(g,m){var c=this;(m===void 0||m>c.length)&&(m=c.length),m-=g.length;var d=c.indexOf(g,m);return d!==-1&&d===m}),String.prototype.repeat||h(String.prototype,"repeat",function(g){for(var m="",c=this;g>0;)g&1&&(m+=c),(g>>=1)&&(c+=c);return m}),String.prototype.includes||h(String.prototype,"includes",function(g,m){return this.indexOf(g,m)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var m=Object(g),c=1;c<arguments.length;c++){var d=arguments[c];d!=null&&Object.keys(d).forEach(function(r){m[r]=d[r]})}return m}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(m){return g[m]})}),Array.prototype.find||h(Array.prototype,"find",function(g){for(var m=this.length,c=arguments[1],d=0;d<m;d++){var r=this[d];if(g.call(c,r,d,this))return r}}),Array.prototype.findIndex||h(Array.prototype,"findIndex",function(g){for(var m=this.length,c=arguments[1],d=0;d<m;d++){var r=this[d];if(g.call(c,r,d,this))return d}}),Array.prototype.includes||h(Array.prototype,"includes",function(g,m){return this.indexOf(g,m)!=-1}),Array.prototype.fill||h(Array.prototype,"fill",function(g){for(var m=this,c=m.length>>>0,d=arguments[1],r=d>>0,o=r<0?Math.max(c+r,0):Math.min(r,c),a=arguments[2],s=a===void 0?c:a>>0,i=s<0?Math.max(c+s,0):Math.min(s,c);o<i;)m[o]=g,o++;return m}),Array.of||h(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(t,n,p){t("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(t,n,p){n.deepCopy=function h(g){if(typeof g!="object"||!g)return g;var m;if(Array.isArray(g)){m=[];for(var c=0;c<g.length;c++)m[c]=h(g[c]);return m}if(Object.prototype.toString.call(g)!=="[object Object]")return g;m={};for(var c in g)m[c]=h(g[c]);return m}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(t,n,p){n.last=function(m){return m[m.length-1]},n.stringReverse=function(m){return m.split("").reverse().join("")},n.stringRepeat=function(m,c){for(var d="";c>0;)c&1&&(d+=m),(c>>=1)&&(m+=m);return d};var h=/^\s\s*/,g=/\s\s*$/;n.stringTrimLeft=function(m){return m.replace(h,"")},n.stringTrimRight=function(m){return m.replace(g,"")},n.copyObject=function(m){var c={};for(var d in m)c[d]=m[d];return c},n.copyArray=function(m){for(var c=[],d=0,r=m.length;d<r;d++)m[d]&&typeof m[d]=="object"?c[d]=this.copyObject(m[d]):c[d]=m[d];return c},n.deepCopy=t("./deep_copy").deepCopy,n.arrayToMap=function(m){for(var c={},d=0;d<m.length;d++)c[m[d]]=1;return c},n.createMap=function(m){var c=Object.create(null);for(var d in m)c[d]=m[d];return c},n.arrayRemove=function(m,c){for(var d=0;d<=m.length;d++)c===m[d]&&m.splice(d,1)},n.escapeRegExp=function(m){return m.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},n.escapeHTML=function(m){return(""+m).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},n.getMatchOffsets=function(m,c){var d=[];return m.replace(c,function(r){d.push({offset:arguments[arguments.length-2],length:r.length})}),d},n.deferredCall=function(m){var c=null,d=function(){c=null,m()},r=function(o){return r.cancel(),c=setTimeout(d,o||0),r};return r.schedule=r,r.call=function(){return this.cancel(),m(),r},r.cancel=function(){return clearTimeout(c),c=null,r},r.isPending=function(){return c},r},n.delayedCall=function(m,c){var d=null,r=function(){d=null,m()},o=function(a){d==null&&(d=setTimeout(r,a||c))};return o.delay=function(a){d&&clearTimeout(d),d=setTimeout(r,a||c)},o.schedule=o,o.call=function(){this.cancel(),m()},o.cancel=function(){d&&clearTimeout(d),d=null},o.isPending=function(){return d},o},n.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},n.skipEmptyMatch=function(m,c,d){return d&&m.codePointAt(c)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(t,n,p){n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var h=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(h.platform)||["other"])[0].toLowerCase(),m=h.userAgent||"",c=h.appName||"";n.isWin=g=="win",n.isMac=g=="mac",n.isLinux=g=="linux",n.isIE=c=="Microsoft Internet Explorer"||c.indexOf("MSAppHost")>=0?parseFloat((m.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((m.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=m.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(m.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(m.split(" Chrome/")[1])||void 0,n.isSafari=parseFloat(m.split(" Safari/")[1])&&!n.isChrome||void 0,n.isEdge=parseFloat(m.split(" Edge/")[1])||void 0,n.isAIR=m.indexOf("AdobeAIR")>=0,n.isAndroid=m.indexOf("Android")>=0,n.isChromeOS=m.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(m)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,n,p){var h=t("./useragent"),g="http://www.w3.org/1999/xhtml";n.buildDom=function a(s,i,u){if(typeof s=="string"&&s){var f=document.createTextNode(s);return i&&i.appendChild(f),f}if(!Array.isArray(s))return s&&s.appendChild&&i&&i.appendChild(s),s;if(typeof s[0]!="string"||!s[0]){for(var y=[],b=0;b<s.length;b++){var E=a(s[b],i,u);E&&y.push(E)}return y}var $=document.createElement(s[0]),A=s[1],S=1;A&&typeof A=="object"&&!Array.isArray(A)&&(S=2);for(var b=S;b<s.length;b++)a(s[b],$,u);return S==2&&Object.keys(A).forEach(function(M){var R=A[M];M==="class"?$.className=Array.isArray(R)?R.join(" "):R:typeof R=="function"||M=="value"||M[0]=="$"?$[M]=R:M==="ref"?u&&(u[R]=$):M==="style"?typeof R=="string"&&($.style.cssText=R):R!=null&&$.setAttribute(M,R)}),i&&i.appendChild($),$},n.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},n.createElement=function(a,s){return document.createElementNS?document.createElementNS(s||g,a):document.createElement(a)},n.removeChildren=function(a){a.innerHTML=""},n.createTextNode=function(a,s){var i=s?s.ownerDocument:document;return i.createTextNode(a)},n.createFragment=function(a){var s=a?a.ownerDocument:document;return s.createDocumentFragment()},n.hasCssClass=function(a,s){var i=(a.className+"").split(/\s+/g);return i.indexOf(s)!==-1},n.addCssClass=function(a,s){n.hasCssClass(a,s)||(a.className+=" "+s)},n.removeCssClass=function(a,s){for(var i=a.className.split(/\s+/g);;){var u=i.indexOf(s);if(u==-1)break;i.splice(u,1)}a.className=i.join(" ")},n.toggleCssClass=function(a,s){for(var i=a.className.split(/\s+/g),u=!0;;){var f=i.indexOf(s);if(f==-1)break;u=!1,i.splice(f,1)}return u&&i.push(s),a.className=i.join(" "),u},n.setCssClass=function(a,s,i){i?n.addCssClass(a,s):n.removeCssClass(a,s)},n.hasCssString=function(a,s){var i=0,u;if(s=s||document,u=s.querySelectorAll("style")){for(;i<u.length;)if(u[i++].id===a)return!0}},n.removeElementById=function(a,s){s=s||document,s.getElementById(a)&&s.getElementById(a).remove()};var m,c=[];n.useStrictCSP=function(a){m=a,a==!1?d():c||(c=[])};function d(){var a=c;c=null,a&&a.forEach(function(s){r(s[0],s[1])})}function r(a,s,i){if(!(typeof document>"u")){if(c){if(i)d();else if(i===!1)return c.push([a,s])}if(!m){var u=i;!i||!i.getRootNode?u=document:(u=i.getRootNode(),(!u||u==i)&&(u=document));var f=u.ownerDocument||u;if(s&&n.hasCssString(s,u))return null;s&&(a+=`
1171
- /*# sourceURL=ace/css/`+s+" */");var y=n.createElement("style");y.appendChild(f.createTextNode(a)),s&&(y.id=s),u==f&&(u=n.getDocumentHead(f)),u.insertBefore(y,u.firstChild)}}}if(n.importCssString=r,n.importCssStylsheet=function(a,s){n.buildDom(["link",{rel:"stylesheet",href:a}],n.getDocumentHead(s))},n.scrollbarWidth=function(a){var s=n.createElement("ace_inner");s.style.width="100%",s.style.minWidth="0px",s.style.height="200px",s.style.display="block";var i=n.createElement("ace_outer"),u=i.style;u.position="absolute",u.left="-10000px",u.overflow="hidden",u.width="200px",u.minWidth="0px",u.height="150px",u.display="block",i.appendChild(s);var f=a&&a.documentElement||document&&document.documentElement;if(!f)return 0;f.appendChild(i);var y=s.offsetWidth;u.overflow="scroll";var b=s.offsetWidth;return y===b&&(b=i.clientWidth),f.removeChild(i),y-b},n.computedStyle=function(a,s){return window.getComputedStyle(a,"")||{}},n.setStyle=function(a,s,i){a[s]!==i&&(a[s]=i)},n.HAS_CSS_ANIMATION=!1,n.HAS_CSS_TRANSFORMS=!1,n.HI_DPI=h.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,h.isChromeOS&&(n.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");n.HI_DPI&&o.style.transform!==void 0&&(n.HAS_CSS_TRANSFORMS=!0),!h.isEdge&&typeof o.style.animationName<"u"&&(n.HAS_CSS_ANIMATION=!0),o=null}n.HAS_CSS_TRANSFORMS?n.translate=function(a,s,i){a.style.transform="translate("+Math.round(s)+"px, "+Math.round(i)+"px)"}:n.translate=function(a,s,i){a.style.top=Math.round(i)+"px",a.style.left=Math.round(s)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,n,p){var h=t("./dom");n.get=function(g,m){var c=new XMLHttpRequest;c.open("GET",g,!0),c.onreadystatechange=function(){c.readyState===4&&m(c.responseText)},c.send(null)},n.loadScript=function(g,m){var c=h.getDocumentHead(),d=document.createElement("script");d.src=g,c.appendChild(d),d.onload=d.onreadystatechange=function(r,o){(o||!d.readyState||d.readyState=="loaded"||d.readyState=="complete")&&(d=d.onload=d.onreadystatechange=null,o||m())}},n.qualifyURL=function(g){var m=document.createElement("a");return m.href=g,m.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,n,p){n.inherits=function(h,g){h.super_=g,h.prototype=Object.create(g.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(h,g){for(var m in g)h[m]=g[m];return h},n.implement=function(h,g){n.mixin(h,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,n,p){var h={},g=function(){this.propagationStopped=!0},m=function(){this.defaultPrevented=!0};h._emit=h._dispatchEvent=function(c,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[c]||[],o=this._defaultHandlers[c];if(!(!r.length&&!o)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=c),d.stopPropagation||(d.stopPropagation=g),d.preventDefault||(d.preventDefault=m),r=r.slice();for(var a=0;a<r.length&&(r[a](d,this),!d.propagationStopped);a++);if(o&&!d.defaultPrevented)return o(d,this)}},h._signal=function(c,d){var r=(this._eventRegistry||{})[c];if(r){r=r.slice();for(var o=0;o<r.length;o++)r[o](d,this)}},h.once=function(c,d){var r=this;if(this.on(c,function o(){r.off(c,o),d.apply(null,arguments)}),!d)return new Promise(function(o){d=o})},h.setDefaultHandler=function(c,d){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[c]){var o=r[c],a=r._disabled_[c];a||(r._disabled_[c]=a=[]),a.push(o);var s=a.indexOf(d);s!=-1&&a.splice(s,1)}r[c]=d},h.removeDefaultHandler=function(c,d){var r=this._defaultHandlers;if(r){var o=r._disabled_[c];if(r[c]==d)o&&this.setDefaultHandler(c,o.pop());else if(o){var a=o.indexOf(d);a!=-1&&o.splice(a,1)}}},h.on=h.addEventListener=function(c,d,r){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[c];return o||(o=this._eventRegistry[c]=[]),o.indexOf(d)==-1&&o[r?"unshift":"push"](d),d},h.off=h.removeListener=h.removeEventListener=function(c,d){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[c];if(r){var o=r.indexOf(d);o!==-1&&r.splice(o,1)}},h.removeAllListeners=function(c){c||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[c]=void 0),this._defaultHandlers&&(this._defaultHandlers[c]=void 0)},n.EventEmitter=h}),ace.define("ace/lib/report_error",["require","exports","module"],function(t,n,p){n.reportError=function(g,m){var c=new Error(g);c.data=m,typeof console=="object"&&console.error&&console.error(c),setTimeout(function(){throw c})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(t,n,p){var h={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"};n.defaultEnglishMessages=h}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(t,n,p){"no use strict";var h=t("./oop"),g=t("./event_emitter").EventEmitter,m=t("./report_error").reportError,c=t("./default_english_messages").defaultEnglishMessages,d={setOptions:function(i){Object.keys(i).forEach(function(u){this.setOption(u,i[u])},this)},getOptions:function(i){var u={};if(i)Array.isArray(i)||(u=i,i=Object.keys(u));else{var f=this.$options;i=Object.keys(f).filter(function(y){return!f[y].hidden})}return i.forEach(function(y){u[y]=this.getOption(y)},this),u},setOption:function(i,u){if(this["$"+i]!==u){var f=this.$options[i];if(!f)return r('misspelled option "'+i+'"');if(f.forwardTo)return this[f.forwardTo]&&this[f.forwardTo].setOption(i,u);f.handlesSet||(this["$"+i]=u),f&&f.set&&f.set.call(this,u)}},getOption:function(i){var u=this.$options[i];return u?u.forwardTo?this[u.forwardTo]&&this[u.forwardTo].getOption(i):u&&u.get?u.get.call(this):this["$"+i]:r('misspelled option "'+i+'"')}};function r(i){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,a,s=(function(){function i(){this.$defaultOptions={},o=c,a="dollarSigns"}return i.prototype.defineOptions=function(u,f,y){return u.$options||(this.$defaultOptions[f]=u.$options={}),Object.keys(y).forEach(function(b){var E=y[b];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=b),u.$options[E.name]=E,"initialValue"in E&&(u["$"+E.name]=E.initialValue)}),h.implement(u,d),this},i.prototype.resetOptions=function(u){Object.keys(u.$options).forEach(function(f){var y=u.$options[f];"value"in y&&u.setOption(f,y.value)})},i.prototype.setDefaultValue=function(u,f,y){if(!u){for(u in this.$defaultOptions)if(this.$defaultOptions[u][f])break;if(!this.$defaultOptions[u][f])return!1}var b=this.$defaultOptions[u]||(this.$defaultOptions[u]={});b[f]&&(b.forwardTo?this.setDefaultValue(b.forwardTo,f,y):b[f].value=y)},i.prototype.setDefaultValues=function(u,f){Object.keys(f).forEach(function(y){this.setDefaultValue(u,y,f[y])},this)},i.prototype.setMessages=function(u,f){o=u,f&&f.placeholders&&(a=f.placeholders)},i.prototype.nls=function(u,f,y){o[u]||(r("No message found for the key '"+u+"' in the provided messages, trying to find a translation for the default string '"+f+"'."),o[f]||r("No message found for the default string '"+f+"' in the provided messages. Falling back to the default English message."));var b=o[u]||o[f]||f;return y&&(a==="dollarSigns"&&(b=b.replace(/\$(\$|[\d]+)/g,function(E,$){return $=="$"?"$":y[$]})),a==="curlyBrackets"&&(b=b.replace(/\{([^\}]+)\}/g,function(E,$){return y[$]}))),b},i})();s.prototype.warn=r,s.prototype.reportError=m,h.implement(s.prototype,g),n.AppConfig=s}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(t,n,p){p.exports=`.ace-tm .ace_gutter {
1172
+ };`,Nu=j(((e,i)=>{(function(){var t="ace",n=(function(){return this})();if(!n&&typeof window<"u"&&(n=window),!t&&typeof requirejs<"u")return;var m=function(u,d,l){if(typeof u!="string"){m.original?m.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(l=d),m.modules[u]||(m.payloads[u]=l,m.modules[u]=null)};m.modules={},m.payloads={};var f=function(u,d,l){if(typeof d=="string"){var s=o(u,d);if(s!=null)return l&&l(),s}else if(Object.prototype.toString.call(d)==="[object Array]"){for(var r=[],a=0,p=d.length;a<p;++a){var v=o(u,d[a]);if(v==null&&g.original)return;r.push(v)}return l&&l.apply(null,r)||!0}},g=function(u,d){var l=f("",u,d);return l==null&&g.original?g.original.apply(this,arguments):l},c=function(u,d){if(d.indexOf("!")!==-1){var l=d.split("!");return c(u,l[0])+"!"+c(u,l[1])}if(d.charAt(0)==".")for(d=u.split("/").slice(0,-1).join("/")+"/"+d;d.indexOf(".")!==-1&&s!=d;){var s=d;d=d.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return d},o=function(u,d){d=c(u,d);var l=m.modules[d];if(!l){if(l=m.payloads[d],typeof l=="function"){var s={},r={id:d,uri:"",exports:s,packaged:!0},a=function(p,v){return f(d,p,v)};s=l(a,s,r)||r.exports,m.modules[d]=s,delete m.payloads[d]}l=m.modules[d]=s||l}return l};function h(u){var d=n;u&&(n[u]||(n[u]={}),d=n[u]),(!d.define||!d.define.packaged)&&(m.original=d.define,d.define=m,d.define.packaged=!0),(!d.require||!d.require.packaged)&&(g.original=d.require,d.require=g,d.require.packaged=!0)}h(t)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(t,n,m){function f(g,c,o){Object.defineProperty(g,c,{value:o,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||f(String.prototype,"startsWith",function(g,c){return c=c||0,this.lastIndexOf(g,c)===c}),String.prototype.endsWith||f(String.prototype,"endsWith",function(g,c){var o=this;(c===void 0||c>o.length)&&(c=o.length),c-=g.length;var h=o.indexOf(g,c);return h!==-1&&h===c}),String.prototype.repeat||f(String.prototype,"repeat",function(g){for(var c="",o=this;g>0;)g&1&&(c+=o),(g>>=1)&&(o+=o);return c}),String.prototype.includes||f(String.prototype,"includes",function(g,c){return this.indexOf(g,c)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(g),o=1;o<arguments.length;o++){var h=arguments[o];h!=null&&Object.keys(h).forEach(function(u){c[u]=h[u]})}return c}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(c){return g[c]})}),Array.prototype.find||f(Array.prototype,"find",function(g){for(var c=this.length,o=arguments[1],h=0;h<c;h++){var u=this[h];if(g.call(o,u,h,this))return u}}),Array.prototype.findIndex||f(Array.prototype,"findIndex",function(g){for(var c=this.length,o=arguments[1],h=0;h<c;h++){var u=this[h];if(g.call(o,u,h,this))return h}}),Array.prototype.includes||f(Array.prototype,"includes",function(g,c){return this.indexOf(g,c)!=-1}),Array.prototype.fill||f(Array.prototype,"fill",function(g){for(var c=this,o=c.length>>>0,h=arguments[1]>>0,u=h<0?Math.max(o+h,0):Math.min(h,o),d=arguments[2],l=d===void 0?o:d>>0,s=l<0?Math.max(o+l,0):Math.min(l,o);u<s;)c[u]=g,u++;return c}),Array.of||f(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(t,n,m){"use strict";t("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(t,n,m){n.deepCopy=function f(g){if(typeof g!="object"||!g)return g;var c;if(Array.isArray(g)){c=[];for(var o=0;o<g.length;o++)c[o]=f(g[o]);return c}if(Object.prototype.toString.call(g)!=="[object Object]")return g;c={};for(var o in g)c[o]=f(g[o]);return c}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(t,n,m){"use strict";n.last=function(c){return c[c.length-1]},n.stringReverse=function(c){return c.split("").reverse().join("")},n.stringRepeat=function(c,o){for(var h="";o>0;)o&1&&(h+=c),(o>>=1)&&(c+=c);return h};var f=/^\s\s*/,g=/\s\s*$/;n.stringTrimLeft=function(c){return c.replace(f,"")},n.stringTrimRight=function(c){return c.replace(g,"")},n.copyObject=function(c){var o={};for(var h in c)o[h]=c[h];return o},n.copyArray=function(c){for(var o=[],h=0,u=c.length;h<u;h++)c[h]&&typeof c[h]=="object"?o[h]=this.copyObject(c[h]):o[h]=c[h];return o},n.deepCopy=t("./deep_copy").deepCopy,n.arrayToMap=function(c){for(var o={},h=0;h<c.length;h++)o[c[h]]=1;return o},n.createMap=function(c){var o=Object.create(null);for(var h in c)o[h]=c[h];return o},n.arrayRemove=function(c,o){for(var h=0;h<=c.length;h++)o===c[h]&&c.splice(h,1)},n.escapeRegExp=function(c){return c.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},n.escapeHTML=function(c){return(""+c).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},n.getMatchOffsets=function(c,o){var h=[];return c.replace(o,function(u){h.push({offset:arguments[arguments.length-2],length:u.length})}),h},n.deferredCall=function(c){var o=null,h=function(){o=null,c()},u=function(d){return u.cancel(),o=setTimeout(h,d||0),u};return u.schedule=u,u.call=function(){return this.cancel(),c(),u},u.cancel=function(){return clearTimeout(o),o=null,u},u.isPending=function(){return o},u},n.delayedCall=function(c,o){var h=null,u=function(){h=null,c()},d=function(l){h==null&&(h=setTimeout(u,l||o))};return d.delay=function(l){h&&clearTimeout(h),h=setTimeout(u,l||o)},d.schedule=d,d.call=function(){this.cancel(),c()},d.cancel=function(){h&&clearTimeout(h),h=null},d.isPending=function(){return h},d},n.sleep=function(c){return new Promise(function(o){setTimeout(o,c)})},n.supportsLookbehind=function(){return!0},n.skipEmptyMatch=function(c,o,h){return h&&c.codePointAt(o)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(t,n,m){"use strict";n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var f=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(f.platform)||["other"])[0].toLowerCase(),c=f.userAgent||"",o=f.appName||"";n.isWin=g=="win",n.isMac=g=="mac",n.isLinux=g=="linux",n.isIE=o=="Microsoft Internet Explorer"||o.indexOf("MSAppHost")>=0?parseFloat((c.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((c.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=c.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(c.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(c.split(" Chrome/")[1])||void 0,n.isSafari=parseFloat(c.split(" Safari/")[1])&&!n.isChrome||void 0,n.isEdge=parseFloat(c.split(" Edge/")[1])||void 0,n.isAIR=c.indexOf("AdobeAIR")>=0,n.isAndroid=c.indexOf("Android")>=0,n.isChromeOS=c.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(c)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,n,m){"use strict";var f=t("./useragent"),g="http://www.w3.org/1999/xhtml";n.buildDom=function l(s,r,a){if(typeof s=="string"&&s){var p=document.createTextNode(s);return r&&r.appendChild(p),p}if(!Array.isArray(s))return s&&s.appendChild&&r&&r.appendChild(s),s;if(typeof s[0]!="string"||!s[0]){for(var v=[],y=0;y<s.length;y++){var k=l(s[y],r,a);k&&v.push(k)}return v}var x=document.createElement(s[0]),w=s[1],S=1;w&&typeof w=="object"&&!Array.isArray(w)&&(S=2);for(var y=S;y<s.length;y++)l(s[y],x,a);return S==2&&Object.keys(w).forEach(function(M){var L=w[M];M==="class"?x.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||M=="value"||M[0]=="$"?x[M]=L:M==="ref"?a&&(a[L]=x):M==="style"?typeof L=="string"&&(x.style.cssText=L):L!=null&&x.setAttribute(M,L)}),r&&r.appendChild(x),x},n.getDocumentHead=function(l){return l||(l=document),l.head||l.getElementsByTagName("head")[0]||l.documentElement},n.createElement=function(l,s){return document.createElementNS?document.createElementNS(s||g,l):document.createElement(l)},n.removeChildren=function(l){l.innerHTML=""},n.createTextNode=function(l,s){return(s?s.ownerDocument:document).createTextNode(l)},n.createFragment=function(l){return(l?l.ownerDocument:document).createDocumentFragment()},n.hasCssClass=function(l,s){return(l.className+"").split(/\s+/g).indexOf(s)!==-1},n.addCssClass=function(l,s){n.hasCssClass(l,s)||(l.className+=" "+s)},n.removeCssClass=function(l,s){for(var r=l.className.split(/\s+/g);;){var a=r.indexOf(s);if(a==-1)break;r.splice(a,1)}l.className=r.join(" ")},n.toggleCssClass=function(l,s){for(var r=l.className.split(/\s+/g),a=!0;;){var p=r.indexOf(s);if(p==-1)break;a=!1,r.splice(p,1)}return a&&r.push(s),l.className=r.join(" "),a},n.setCssClass=function(l,s,r){r?n.addCssClass(l,s):n.removeCssClass(l,s)},n.hasCssString=function(l,s){var r=0,a;if(s=s||document,a=s.querySelectorAll("style")){for(;r<a.length;)if(a[r++].id===l)return!0}},n.removeElementById=function(l,s){s=s||document,s.getElementById(l)&&s.getElementById(l).remove()};var c,o=[];n.useStrictCSP=function(l){c=l,l==!1?h():o||(o=[])};function h(){var l=o;o=null,l&&l.forEach(function(s){u(s[0],s[1])})}function u(l,s,r){if(!(typeof document>"u")){if(o){if(r)h();else if(r===!1)return o.push([l,s])}if(!c){var a=r;!r||!r.getRootNode?a=document:(a=r.getRootNode(),(!a||a==r)&&(a=document));var p=a.ownerDocument||a;if(s&&n.hasCssString(s,a))return null;s&&(l+=`
1173
+ /*# sourceURL=ace/css/`+s+" */");var v=n.createElement("style");v.appendChild(p.createTextNode(l)),s&&(v.id=s),a==p&&(a=n.getDocumentHead(p)),a.insertBefore(v,a.firstChild)}}}if(n.importCssString=u,n.importCssStylsheet=function(l,s){n.buildDom(["link",{rel:"stylesheet",href:l}],n.getDocumentHead(s))},n.$fixPositionBug=function(l){var s=l.getBoundingClientRect();if(l.style.left){var r=parseFloat(l.style.left),a=+s.left;Math.abs(r-a)>1&&(l.style.left=2*r-a+"px")}if(l.style.right){var r=parseFloat(l.style.right),a=window.innerWidth-s.right;Math.abs(r-a)>1&&(l.style.right=2*r-a+"px")}if(l.style.top){var r=parseFloat(l.style.top),a=+s.top;Math.abs(r-a)>1&&(l.style.top=2*r-a+"px")}if(l.style.bottom){var r=parseFloat(l.style.bottom),a=window.innerHeight-s.bottom;Math.abs(r-a)>1&&(l.style.bottom=2*r-a+"px")}},n.scrollbarWidth=function(l){var s=n.createElement("ace_inner");s.style.width="100%",s.style.minWidth="0px",s.style.height="200px",s.style.display="block";var r=n.createElement("ace_outer"),a=r.style;a.position="absolute",a.left="-10000px",a.overflow="hidden",a.width="200px",a.minWidth="0px",a.height="150px",a.display="block",r.appendChild(s);var p=l&&l.documentElement||document&&document.documentElement;if(!p)return 0;p.appendChild(r);var v=s.offsetWidth;a.overflow="scroll";var y=s.offsetWidth;return v===y&&(y=r.clientWidth),p.removeChild(r),v-y},n.computedStyle=function(l,s){return window.getComputedStyle(l,"")||{}},n.setStyle=function(l,s,r){l[s]!==r&&(l[s]=r)},n.HAS_CSS_ANIMATION=!1,n.HAS_CSS_TRANSFORMS=!1,n.HI_DPI=f.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,f.isChromeOS&&(n.HI_DPI=!1),typeof document<"u"){var d=document.createElement("div");n.HI_DPI&&d.style.transform!==void 0&&(n.HAS_CSS_TRANSFORMS=!0),!f.isEdge&&typeof d.style.animationName<"u"&&(n.HAS_CSS_ANIMATION=!0),d=null}n.HAS_CSS_TRANSFORMS?n.translate=function(l,s,r){l.style.transform="translate("+Math.round(s)+"px, "+Math.round(r)+"px)"}:n.translate=function(l,s,r){l.style.top=Math.round(r)+"px",l.style.left=Math.round(s)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,n,m){"use strict";var f=t("./dom");n.get=function(g,c){var o=new XMLHttpRequest;o.open("GET",g,!0),o.onreadystatechange=function(){o.readyState===4&&c(o.responseText)},o.send(null)},n.loadScript=function(g,c){var o=f.getDocumentHead(),h=document.createElement("script");h.src=g,o.appendChild(h),h.onload=h.onreadystatechange=function(u,d){(d||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,d||c())}},n.qualifyURL=function(g){var c=document.createElement("a");return c.href=g,c.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,n,m){"use strict";n.inherits=function(f,g){f.super_=g,f.prototype=Object.create(g.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(f,g){for(var c in g)f[c]=g[c];return f},n.implement=function(f,g){n.mixin(f,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,n,m){"use strict";var f={},g=function(){this.propagationStopped=!0},c=function(){this.defaultPrevented=!0};f._emit=f._dispatchEvent=function(o,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var u=this._eventRegistry[o]||[],d=this._defaultHandlers[o];if(!(!u.length&&!d)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=o),h.stopPropagation||(h.stopPropagation=g),h.preventDefault||(h.preventDefault=c),u=u.slice();for(var l=0;l<u.length&&(u[l](h,this),!h.propagationStopped);l++);if(d&&!h.defaultPrevented)return d(h,this)}},f._signal=function(o,h){var u=(this._eventRegistry||{})[o];if(u){u=u.slice();for(var d=0;d<u.length;d++)u[d](h,this)}},f.once=function(o,h){var u=this;if(this.on(o,function d(){u.off(o,d),h.apply(null,arguments)}),!h)return new Promise(function(d){h=d})},f.setDefaultHandler=function(o,h){var u=this._defaultHandlers;if(u||(u=this._defaultHandlers={_disabled_:{}}),u[o]){var d=u[o],l=u._disabled_[o];l||(u._disabled_[o]=l=[]),l.push(d);var s=l.indexOf(h);s!=-1&&l.splice(s,1)}u[o]=h},f.removeDefaultHandler=function(o,h){var u=this._defaultHandlers;if(u){var d=u._disabled_[o];if(u[o]==h)d&&this.setDefaultHandler(o,d.pop());else if(d){var l=d.indexOf(h);l!=-1&&d.splice(l,1)}}},f.on=f.addEventListener=function(o,h,u){this._eventRegistry=this._eventRegistry||{};var d=this._eventRegistry[o];return d||(d=this._eventRegistry[o]=[]),d.indexOf(h)==-1&&d[u?"unshift":"push"](h),h},f.off=f.removeListener=f.removeEventListener=function(o,h){this._eventRegistry=this._eventRegistry||{};var u=this._eventRegistry[o];if(u){var d=u.indexOf(h);d!==-1&&u.splice(d,1)}},f.removeAllListeners=function(o){o||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[o]=void 0),this._defaultHandlers&&(this._defaultHandlers[o]=void 0)},n.EventEmitter=f}),ace.define("ace/lib/report_error",["require","exports","module"],function(t,n,m){n.reportError=function(g,c){var o=new Error(g);o.data=c,typeof console=="object"&&console.error&&console.error(o),setTimeout(function(){throw o})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(t,n,m){n.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"}}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(t,n,m){"no use strict";var f=t("./oop"),g=t("./event_emitter").EventEmitter,c=t("./report_error").reportError,o=t("./default_english_messages").defaultEnglishMessages,h={setOptions:function(r){Object.keys(r).forEach(function(a){this.setOption(a,r[a])},this)},getOptions:function(r){var a={};if(r)Array.isArray(r)||(r=Object.keys(r));else{var p=this.$options;r=Object.keys(p).filter(function(v){return!p[v].hidden})}return r.forEach(function(v){a[v]=this.getOption(v)},this),a},setOption:function(r,a){if(this["$"+r]!==a){var p=this.$options[r];if(!p)return u('misspelled option "'+r+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(r,a);p.handlesSet||(this["$"+r]=a),p&&p.set&&p.set.call(this,a)}},getOption:function(r){var a=this.$options[r];return a?a.forwardTo?this[a.forwardTo]&&this[a.forwardTo].getOption(r):a&&a.get?a.get.call(this):this["$"+r]:u('misspelled option "'+r+'"')}};function u(r){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var d,l,s=(function(){function r(){this.$defaultOptions={},d=o,l="dollarSigns"}return r.prototype.defineOptions=function(a,p,v){return a.$options||(this.$defaultOptions[p]=a.$options={}),Object.keys(v).forEach(function(y){var k=v[y];typeof k=="string"&&(k={forwardTo:k}),k.name||(k.name=y),a.$options[k.name]=k,"initialValue"in k&&(a["$"+k.name]=k.initialValue)}),f.implement(a,h),this},r.prototype.resetOptions=function(a){Object.keys(a.$options).forEach(function(p){var v=a.$options[p];"value"in v&&a.setOption(p,v.value)})},r.prototype.setDefaultValue=function(a,p,v){if(!a){for(a in this.$defaultOptions)if(this.$defaultOptions[a][p])break;if(!this.$defaultOptions[a][p])return!1}var y=this.$defaultOptions[a]||(this.$defaultOptions[a]={});y[p]&&(y.forwardTo?this.setDefaultValue(y.forwardTo,p,v):y[p].value=v)},r.prototype.setDefaultValues=function(a,p){Object.keys(p).forEach(function(v){this.setDefaultValue(a,v,p[v])},this)},r.prototype.setMessages=function(a,p){d=a,p&&p.placeholders&&(l=p.placeholders)},r.prototype.nls=function(a,p,v){d[a]||(u("No message found for the key '"+a+"' in messages with id "+d.$id+", trying to find a translation for the default string '"+p+"'."),d[p]||u("No message found for the default string '"+p+"' in the provided messages. Falling back to the default English message."));var y=d[a]||d[p]||p;return v&&(l==="dollarSigns"&&(y=y.replace(/\$(\$|[\d]+)/g,function(k,x){return x=="$"?"$":v[x]})),l==="curlyBrackets"&&(y=y.replace(/\{([^\}]+)\}/g,function(k,x){return v[x]}))),y},r})();s.prototype.warn=u,s.prototype.reportError=c,f.implement(s.prototype,g),n.AppConfig=s}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(t,n,m){m.exports=`.ace-tm .ace_gutter {
1172
1174
  background: #f0f0f0;
1173
1175
  color: #333;
1174
1176
  }
@@ -1326,49 +1328,57 @@ export const FormManager: React.FC = () => {
1326
1328
  .ace-tm .ace_indent-guide-active {
1327
1329
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
1328
1330
  }
1329
- `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,n,p){n.isDark=!1,n.cssClass="ace-tm",n.cssText=t("./textmate-css"),n.$id="ace/theme/textmate";var h=t("../lib/dom");h.importCssString(n.cssText,n.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(t,n,p){"no use strict";var h=t("./lib/lang"),g=t("./lib/net"),m=t("./lib/dom"),c=t("./lib/app_config").AppConfig;p.exports=n=new c;var d={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};n.get=function(s){if(!d.hasOwnProperty(s))throw new Error("Unknown config key: "+s);return d[s]},n.set=function(s,i){if(d.hasOwnProperty(s))d[s]=i;else if(this.setDefaultValue("",s,i)==!1)throw new Error("Unknown config key: "+s);s=="useStrictCSP"&&m.useStrictCSP(i)},n.all=function(){return h.copyObject(d)},n.$modes={},n.moduleUrl=function(s,i){if(d.$moduleUrls[s])return d.$moduleUrls[s];var u=s.split("/");i=i||u[u.length-2]||"";var f=i=="snippets"?"/":"-",y=u[u.length-1];if(i=="worker"&&f=="-"){var b=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g");y=y.replace(b,"")}(!y||y==i)&&u.length>1&&(y=u[u.length-2]);var E=d[i+"Path"];return E==null?E=d.basePath:f=="/"&&(i=f=""),E&&E.slice(-1)!="/"&&(E+="/"),E+i+f+y+this.get("suffix")},n.setModuleUrl=function(s,i){return d.$moduleUrls[s]=i};var r=function(s,i){if(s==="ace/theme/textmate"||s==="./theme/textmate")return i(null,t("./theme/textmate"));if(o)return o(s,i);console.error("loader is not configured")},o;n.setLoader=function(s){o=s},n.dynamicModules=Object.create(null),n.$loading={},n.$loaded={},n.loadModule=function(s,i){var u;if(Array.isArray(s))var f=s[0],y=s[1];else if(typeof s=="string")var y=s;var b=function(E){if(E&&!n.$loading[y])return i&&i(E);if(n.$loading[y]||(n.$loading[y]=[]),n.$loading[y].push(i),!(n.$loading[y].length>1)){var $=function(){r(y,function(A,S){S&&(n.$loaded[y]=S),n._emit("load.module",{name:y,module:S});var M=n.$loading[y];n.$loading[y]=null,M.forEach(function(R){R&&R(S)})})};if(!n.get("packaged"))return $();g.loadScript(n.moduleUrl(y,f),$),a()}};if(n.dynamicModules[y])n.dynamicModules[y]().then(function(E){E.default?b(E.default):b(E)});else{try{u=this.$require(y)}catch{}b(u||n.$loaded[y])}},n.$require=function(s){if(typeof p.require=="function"){var i="require";return p[i](s)}},n.setModuleLoader=function(s,i){n.dynamicModules[s]=i};var a=function(){!d.basePath&&!d.workerPath&&!d.modePath&&!d.themePath&&!Object.keys(d.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),a=function(){})};n.version="1.36.5"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,n,p){t("./lib/fixoldbrowsers");var h=t("./config");h.setLoader(function(d,r){t([d],function(o){r(null,o)})});var g=(function(){return this||typeof window<"u"&&window})();p.exports=function(d){h.init=m,h.$require=t,d.require=t},m(!0);function m(d){if(!(!g||!g.document)){h.set("packaged",d||t.packaged||p.packaged||g.define&&(void 0).packaged);var r={},o="",a=document.currentScript||document._currentScript,s=a&&a.ownerDocument||document;a&&a.src&&(o=a.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var i=s.getElementsByTagName("script"),u=0;u<i.length;u++){var f=i[u],y=f.src||f.getAttribute("src");if(y){for(var b=f.attributes,E=0,$=b.length;E<$;E++){var A=b[E];A.name.indexOf("data-ace-")===0&&(r[c(A.name.replace(/^data-ace-/,""))]=A.value)}var S=y.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);S&&(o=S[1])}}o&&(r.base=r.base||o,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var M in r)typeof r[M]<"u"&&h.set(M,r[M])}}function c(d){return d.replace(/-(.)/g,function(r,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(t,n,p){var h=(function(){function g(m,c,d,r){this.start={row:m,column:c},this.end={row:d,column:r}}return g.prototype.isEqual=function(m){return this.start.row===m.start.row&&this.end.row===m.end.row&&this.start.column===m.start.column&&this.end.column===m.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(m,c){return this.compare(m,c)==0},g.prototype.compareRange=function(m){var c,d=m.end,r=m.start;return c=this.compare(d.row,d.column),c==1?(c=this.compare(r.row,r.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(r.row,r.column),c==-1?-1:c==1?42:0)},g.prototype.comparePoint=function(m){return this.compare(m.row,m.column)},g.prototype.containsRange=function(m){return this.comparePoint(m.start)==0&&this.comparePoint(m.end)==0},g.prototype.intersects=function(m){var c=this.compareRange(m);return c==-1||c==0||c==1},g.prototype.isEnd=function(m,c){return this.end.row==m&&this.end.column==c},g.prototype.isStart=function(m,c){return this.start.row==m&&this.start.column==c},g.prototype.setStart=function(m,c){typeof m=="object"?(this.start.column=m.column,this.start.row=m.row):(this.start.row=m,this.start.column=c)},g.prototype.setEnd=function(m,c){typeof m=="object"?(this.end.column=m.column,this.end.row=m.row):(this.end.row=m,this.end.column=c)},g.prototype.inside=function(m,c){return this.compare(m,c)==0?!(this.isEnd(m,c)||this.isStart(m,c)):!1},g.prototype.insideStart=function(m,c){return this.compare(m,c)==0?!this.isEnd(m,c):!1},g.prototype.insideEnd=function(m,c){return this.compare(m,c)==0?!this.isStart(m,c):!1},g.prototype.compare=function(m,c){return!this.isMultiLine()&&m===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:m<this.start.row?-1:m>this.end.row?1:this.start.row===m?c>=this.start.column?0:-1:this.end.row===m?c<=this.end.column?0:1:0},g.prototype.compareStart=function(m,c){return this.start.row==m&&this.start.column==c?-1:this.compare(m,c)},g.prototype.compareEnd=function(m,c){return this.end.row==m&&this.end.column==c?1:this.compare(m,c)},g.prototype.compareInside=function(m,c){return this.end.row==m&&this.end.column==c?1:this.start.row==m&&this.start.column==c?-1:this.compare(m,c)},g.prototype.clipRows=function(m,c){if(this.end.row>c)var d={row:c+1,column:0};else if(this.end.row<m)var d={row:m,column:0};if(this.start.row>c)var r={row:c+1,column:0};else if(this.start.row<m)var r={row:m,column:0};return g.fromPoints(r||this.start,d||this.end)},g.prototype.extend=function(m,c){var d=this.compare(m,c);if(d==0)return this;if(d==-1)var r={row:m,column:c};else var o={row:m,column:c};return g.fromPoints(r||this.start,o||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(m){var c=m.documentToScreenPosition(this.start),d=m.documentToScreenPosition(this.end);return new g(c.row,c.column,d.row,d.column)},g.prototype.moveBy=function(m,c){this.start.row+=m,this.start.column+=c,this.end.row+=m,this.end.column+=c},g})();h.fromPoints=function(g,m){return new h(g.row,g.column,m.row,m.column)},h.comparePoints=function(g,m){return g.row-m.row||g.column-m.column},n.Range=h}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,n,p){for(var h=t("./oop"),g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},m={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},c=0;c<10;c++)m["Digit"+c]=48+c,m["Numpad"+c]=96+c,g.PRINTABLE_KEYS[48+c]=""+c,g.FUNCTION_KEYS[96+c]="Numpad"+c;for(var c=65;c<91;c++){var d=String.fromCharCode(c+32);m["Key"+d.toUpperCase()]=c,g.PRINTABLE_KEYS[c]=d}for(var c=1;c<13;c++)m["F"+c]=111+c,g.FUNCTION_KEYS[111+c]="F"+c;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var o in r)m[o]=m[o+"Left"]=m[o+"Right"]=r[o];n.$codeToKeyCode=m,g.PRINTABLE_KEYS[173]="-";for(var a in g.FUNCTION_KEYS){var s=g.FUNCTION_KEYS[a].toLowerCase();g[s]=parseInt(a,10)}for(var a in g.PRINTABLE_KEYS){var s=g.PRINTABLE_KEYS[a].toLowerCase();g[s]=parseInt(a,10)}h.mixin(g,g.MODIFIER_KEYS),h.mixin(g,g.PRINTABLE_KEYS),h.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var i=["cmd","ctrl","alt","shift"],u=Math.pow(2,i.length);u--;)g.KEY_MODS[u]=i.filter(function(f){return u&g.KEY_MODS[f]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",h.mixin(n,g),n.default=n,n.keyCodeToString=function(i){var u=g[i];return typeof u!="string"&&(u=String.fromCharCode(i)),u.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,n,p){var h=t("./keys"),g=t("./useragent"),m=null,c=0,d;function r(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function o(){return d==null&&r(),d}function a(E,$,A){this.elem=E,this.type=$,this.callback=A}a.prototype.destroy=function(){i(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var s=n.addListener=function(E,$,A,S){E.addEventListener($,A,o()),S&&S.$toDestroy.push(new a(E,$,A))},i=n.removeListener=function(E,$,A){E.removeEventListener($,A,o())};n.stopEvent=function(E){return n.stopPropagation(E),n.preventDefault(E),!1},n.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},n.preventDefault=function(E){E.preventDefault&&E.preventDefault()},n.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||g.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},n.capture=function(E,$,A){var S=E&&E.ownerDocument||document;function M(R){$&&$(R),A&&A(R),i(S,"mousemove",$),i(S,"mouseup",M),i(S,"dragstart",M)}return s(S,"mousemove",$),s(S,"mouseup",M),s(S,"dragstart",M),M},n.addMouseWheelListener=function(E,$,A){s(E,"wheel",function(S){var M=.15,R=S.deltaX||0,L=S.deltaY||0;switch(S.deltaMode){case S.DOM_DELTA_PIXEL:S.wheelX=R*M,S.wheelY=L*M;break;case S.DOM_DELTA_LINE:var T=15;S.wheelX=R*T,S.wheelY=L*T;break;case S.DOM_DELTA_PAGE:var D=150;S.wheelX=R*D,S.wheelY=L*D;break}$(S)},A)},n.addMultiMouseDownListener=function(E,$,A,S,M){var R=0,L,T,D,w={2:"dblclick",3:"tripleclick",4:"quadclick"};function v(C){if(n.getButton(C)!==0?R=0:C.detail>1?(R++,R>4&&(R=1)):R=1,g.isIE){var x=Math.abs(C.clientX-L)>5||Math.abs(C.clientY-T)>5;(!D||x)&&(R=1),D&&clearTimeout(D),D=setTimeout(function(){D=null},$[R-1]||600),R==1&&(L=C.clientX,T=C.clientY)}if(C._clicks=R,A[S]("mousedown",C),R>4)R=0;else if(R>1)return A[S](w[R],C)}Array.isArray(E)||(E=[E]),E.forEach(function(C){s(C,"mousedown",v,M)})};function u(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}n.getModifierString=function(E){return h.KEY_MODS[u(E)]};function f(E,$,A){var S=u($);if(!A&&$.code&&(A=h.$codeToKeyCode[$.code]||A),!g.isMac&&m){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(S|=8),m.altGr)if((3&S)!=3)m.altGr=0;else return;if(A===18||A===17){var M=$.location;if(A===17&&M===1)m[A]==1&&(c=$.timeStamp);else if(A===18&&S===3&&M===2){var R=$.timeStamp-c;R<50&&(m.altGr=!0)}}}if(A in h.MODIFIER_KEYS&&(A=-1),!(!S&&A===13&&$.location===3&&(E($,S,-A),$.defaultPrevented))){if(g.isChromeOS&&S&8){if(E($,S,A),$.defaultPrevented)return;S&=-9}return!S&&!(A in h.FUNCTION_KEYS)&&!(A in h.PRINTABLE_KEYS)?!1:E($,S,A)}}n.addCommandKeyListener=function(E,$,A){var S=null;s(E,"keydown",function(M){m[M.keyCode]=(m[M.keyCode]||0)+1;var R=f($,M,M.keyCode);return S=M.defaultPrevented,R},A),s(E,"keypress",function(M){S&&(M.ctrlKey||M.altKey||M.shiftKey||M.metaKey)&&(n.stopEvent(M),S=null)},A),s(E,"keyup",function(M){m[M.keyCode]=null},A),m||(y(),s(window,"focus",y))};function y(){m=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var b=1;n.nextTick=function(E,$){$=$||window;var A="zero-timeout-message-"+b++,S=function(M){M.data==A&&(n.stopPropagation(M),i($,"message",S),E())};s($,"message",S),$.postMessage(A,"*")}}n.$idleBlocked=!1,n.onIdle=function(E,$){return setTimeout(function A(){n.$idleBlocked?setTimeout(A,100):E()},$)},n.$idleBlockId=null,n.blockIdle=function(E){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},E||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(t,n,p){var h;p.exports={lineMode:!1,pasteCancelled:function(){return h&&h>Date.now()-50?!0:h=!1},cancel:function(){h=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,n,p){var h=t("../lib/event"),g=t("../config").nls,m=t("../lib/useragent"),c=t("../lib/dom"),d=t("../lib/lang"),r=t("../clipboard"),o=m.isChrome<18,a=m.isIE,s=m.isChrome>63,i=400,u=t("../lib/keys"),f=u.KEY_MODS,y=m.isIOS,b=y?/\s/:/\n/,E=m.isMobile,$;$=function(A,S){var M=c.createElement("textarea");M.className="ace_text-input",M.setAttribute("wrap","off"),M.setAttribute("autocorrect","off"),M.setAttribute("autocapitalize","off"),M.setAttribute("spellcheck","false"),M.style.opacity="0",A.insertBefore(M,A.firstChild);var R=!1,L=!1,T=!1,D=!1,w="";E||(M.style.fontSize="1px");var v=!1,C=!1,x="",_=0,k=0,O=0,I=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,P=0;try{var B=document.activeElement===M}catch{}this.setNumberOfExtraLines=function(j){if(I=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,j<0){P=0;return}P=j},this.setAriaLabel=function(){var j="";if(S.$textInputAriaLabel&&(j+="".concat(S.$textInputAriaLabel,", ")),S.session){var Z=S.session.selection.cursor.row;j+=g("text-input.aria-label","Cursor at row $0",[Z+1])}M.setAttribute("aria-label",j)},this.setAriaOptions=function(j){j.activeDescendant?(M.setAttribute("aria-haspopup","true"),M.setAttribute("aria-autocomplete",j.inline?"both":"list"),M.setAttribute("aria-activedescendant",j.activeDescendant)):(M.setAttribute("aria-haspopup","false"),M.setAttribute("aria-autocomplete","both"),M.removeAttribute("aria-activedescendant")),j.role&&M.setAttribute("role",j.role),j.setLabel&&(M.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),h.addListener(M,"blur",function(j){C||(S.onBlur(j),B=!1)},S),h.addListener(M,"focus",function(j){if(!C){if(B=!0,m.isEdge)try{if(!document.hasFocus())return}catch{}S.onFocus(j),m.isEdge?setTimeout(H):H()}},S),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:S.renderer.enableKeyboardAccessibility}),w||s||this.$focusScroll=="browser")return M.focus({preventScroll:!0});var j=M.style.top;M.style.position="fixed",M.style.top="0px";try{var Z=M.getBoundingClientRect().top!=0}catch{return}var ee=[];if(Z)for(var re=M.parentElement;re&&re.nodeType==1;)ee.push(re),re.setAttribute("ace_nocontext","true"),!re.parentElement&&re.getRootNode?re=re.getRootNode().host:re=re.parentElement;M.focus({preventScroll:!0}),Z&&ee.forEach(function(ae){ae.removeAttribute("ace_nocontext")}),setTimeout(function(){M.style.position="",M.style.top=="0px"&&(M.style.top=j)},0)},this.blur=function(){M.blur()},this.isFocused=function(){return B},S.on("beforeEndOperation",function(){var j=S.curOp,Z=j&&j.command&&j.command.name;if(Z!="insertstring"){var ee=Z&&(j.docChanged||j.selectionChanged);T&&ee&&(x=M.value="",ft()),H()}}),S.on("changeSelection",this.setAriaLabel);var F=function(j,Z){for(var ee=Z,re=1;re<=j-I&&re<2*P+1;re++)ee+=S.session.getLine(j-re).length+1;return ee},H=y?function(j){if(!(!B||R&&!j||D)){j||(j="");var Z=`
1330
- ab`+j+`cde fg
1331
- `;Z!=M.value&&(M.value=x=Z);var ee=4,re=4+(j.length||(S.selection.isEmpty()?0:1));(_!=ee||k!=re)&&M.setSelectionRange(ee,re),_=ee,k=re}}:function(){if(!(T||D)&&!(!B&&!K)){T=!0;var j=0,Z=0,ee="";if(S.session){var re=S.selection,ae=re.getRange(),ge=re.cursor.row;ge===N+1?(I=N+1,N=I+2*P):ge===I-1?(N=I-1,I=N-2*P):(ge<I-1||ge>N+1)&&(I=ge>P?ge-P:0,N=ge>P?ge+P:2*P);for(var ye=[],me=I;me<=N;me++)ye.push(S.session.getLine(me));if(ee=ye.join(`
1332
- `),j=F(ae.start.row,ae.start.column),Z=F(ae.end.row,ae.end.column),ae.start.row<I){var de=S.session.getLine(I-1);j=ae.start.row<I-1?0:j,Z+=de.length+1,ee=de+`
1333
- `+ee}else if(ae.end.row>N){var le=S.session.getLine(N+1);Z=ae.end.row>N+1?le.length:ae.end.column,Z+=ee.length+1,ee=ee+`
1334
- `+le}else E&&ge>0&&(ee=`
1335
- `+ee,Z+=1,j+=1);ee.length>i&&(j<i&&Z<i?ee=ee.slice(0,i):(ee=`
1336
- `,j==Z?j=Z=0:(j=0,Z=1)));var Te=ee+`
1337
-
1338
- `;Te!=x&&(M.value=x=Te,_=k=Te.length)}if(K&&(_=M.selectionStart,k=M.selectionEnd),k!=Z||_!=j||M.selectionEnd!=k)try{M.setSelectionRange(j,Z),_=j,k=Z}catch{}T=!1}};this.resetSelection=H,B&&S.onFocus();var z=function(j){return j.selectionStart===0&&j.selectionEnd>=x.length&&j.value===x&&x&&j.selectionEnd!==k},W=function(j){T||(R?R=!1:z(M)?(S.selectAll(),H()):E&&M.selectionStart!=_&&H())},U=null;this.setInputHandler=function(j){U=j},this.getInputHandler=function(){return U};var K=!1,Y=function(j,Z){if(K&&(K=!1),L)return H(),j&&S.onPaste(j),L=!1,"";for(var ee=M.selectionStart,re=M.selectionEnd,ae=_,ge=x.length-k,ye=j,me=j.length-ee,de=j.length-re,le=0;ae>0&&x[le]==j[le];)le++,ae--;for(ye=ye.slice(le),le=1;ge>0&&x.length-le>_-1&&x[x.length-le]==j[j.length-le];)le++,ge--;me-=le-1,de-=le-1;var Te=ye.length-le+1;if(Te<0&&(ae=-Te,Te=0),ye=ye.slice(0,Te),!Z&&!ye&&!me&&!ae&&!ge&&!de)return"";D=!0;var Wt=!1;return m.isAndroid&&ye==". "&&(ye=" ",Wt=!0),ye&&!ae&&!ge&&!me&&!de||v?S.onTextInput(ye):S.onTextInput(ye,{extendLeft:ae,extendRight:ge,restoreStart:me,restoreEnd:de}),D=!1,x=j,_=ee,k=re,O=de,Wt?`
1339
- `:ye},G=function(j){if(T)return dt();if(j&&j.inputType){if(j.inputType=="historyUndo")return S.execCommand("undo");if(j.inputType=="historyRedo")return S.execCommand("redo")}var Z=M.value,ee=Y(Z,!0);(Z.length>i+100||b.test(ee)||E&&_<1&&_==k)&&H()},Q=function(j,Z,ee){var re=j.clipboardData||window.clipboardData;if(!(!re||o)){var ae=a||ee?"Text":"text/plain";try{return Z?re.setData(ae,Z)!==!1:re.getData(ae)}catch(ge){if(!ee)return Q(ge,Z,!0)}}},ue=function(j,Z){var ee=S.getCopyText();if(!ee)return h.preventDefault(j);Q(j,ee)?(y&&(H(ee),R=ee,setTimeout(function(){R=!1},10)),Z?S.onCut():S.onCopy(),h.preventDefault(j)):(R=!0,M.value=ee,M.select(),setTimeout(function(){R=!1,H(),Z?S.onCut():S.onCopy()}))},Me=function(j){ue(j,!0)},Ce=function(j){ue(j,!1)},he=function(j){var Z=Q(j);r.pasteCancelled()||(typeof Z=="string"?(Z&&S.onPaste(Z,j),m.isIE&&setTimeout(H),h.preventDefault(j)):(M.value="",L=!0))};h.addCommandKeyListener(M,function(j,Z,ee){if(!T)return S.onCommandKey(j,Z,ee)},S),h.addListener(M,"select",W,S),h.addListener(M,"input",G,S),h.addListener(M,"cut",Me,S),h.addListener(M,"copy",Ce,S),h.addListener(M,"paste",he,S),(!("oncut"in M)||!("oncopy"in M)||!("onpaste"in M))&&h.addListener(A,"keydown",function(j){if(!(m.isMac&&!j.metaKey||!j.ctrlKey))switch(j.keyCode){case 67:Ce(j);break;case 86:he(j);break;case 88:Me(j);break}},S);var De=function(j){if(!(T||!S.onCompositionStart||S.$readOnly)&&(T={},!v)){j.data&&(T.useTextareaForIME=!1),setTimeout(dt,0),S._signal("compositionStart"),S.on("mousedown",ti);var Z=S.getSelectionRange();Z.end.row=Z.start.row,Z.end.column=Z.start.column,T.markerRange=Z,T.selectionStart=_,S.onCompositionStart(T),T.useTextareaForIME?(x=M.value="",_=0,k=0):(M.msGetInputContext&&(T.context=M.msGetInputContext()),M.getInputContext&&(T.context=M.getInputContext()))}},dt=function(){if(!(!T||!S.onCompositionUpdate||S.$readOnly)){if(v)return ti();if(T.useTextareaForIME)S.onCompositionUpdate(M.value);else{var j=M.value;Y(j),T.markerRange&&(T.context&&(T.markerRange.start.column=T.selectionStart=T.context.compositionStartOffset),T.markerRange.end.column=T.markerRange.start.column+k-T.selectionStart+O)}}},ft=function(j){!S.onCompositionEnd||S.$readOnly||(T=!1,S.onCompositionEnd(),S.off("mousedown",ti),j&&G())};function ti(){C=!0,M.blur(),M.focus(),C=!1}var pa=d.delayedCall(dt,50).schedule.bind(null,null);function dd(j){j.keyCode==27&&M.value.length<M.selectionStart&&(T||(x=M.value),_=k=-1,H()),pa()}h.addListener(M,"compositionstart",De,S),h.addListener(M,"compositionupdate",dt,S),h.addListener(M,"keyup",dd,S),h.addListener(M,"keydown",pa,S),h.addListener(M,"compositionend",ft,S),this.getElement=function(){return M},this.setCommandMode=function(j){v=j,M.readOnly=!1},this.setReadOnly=function(j){v||(M.readOnly=j)},this.setCopyWithEmptySelection=function(j){},this.onContextMenu=function(j){K=!0,H(),S._emit("nativecontextmenu",{target:S,domEvent:j}),this.moveToMouse(j,!0)},this.moveToMouse=function(j,Z){w||(w=M.style.cssText),M.style.cssText=(Z?"z-index:100000;":"")+(m.isIE?"opacity:0.1;":"")+"text-indent: -"+(_+k)*S.renderer.characterWidth*.5+"px;";var ee=S.container.getBoundingClientRect(),re=c.computedStyle(S.container),ae=ee.top+(parseInt(re.borderTopWidth)||0),ge=ee.left+(parseInt(ee.borderLeftWidth)||0),ye=ee.bottom-ae-M.clientHeight-2,me=function(de){c.translate(M,de.clientX-ge-2,Math.min(de.clientY-ae-2,ye))};me(j),j.type=="mousedown"&&(S.renderer.$isMousePressed=!0,clearTimeout(ni),m.isWin&&h.capture(S.container,me,hn))},this.onContextMenuClose=hn;var ni;function hn(){clearTimeout(ni),ni=setTimeout(function(){w&&(M.style.cssText=w,w=""),S.renderer.$isMousePressed=!1,S.renderer.$keepTextAreaAtCursor&&S.renderer.$moveTextAreaToCursor()},0)}var ii=function(j){S.textInput.onContextMenu(j),hn()};h.addListener(M,"mouseup",ii,S),h.addListener(M,"mousedown",function(j){j.preventDefault(),hn()},S),h.addListener(S.renderer.scroller,"contextmenu",ii,S),h.addListener(M,"contextmenu",ii,S),y&&fd(A,S,M);function fd(j,Z,ee){var re=null,ae=!1;ee.addEventListener("keydown",function(ye){re&&clearTimeout(re),ae=!0},!0),ee.addEventListener("keyup",function(ye){re=setTimeout(function(){ae=!1},100)},!0);var ge=function(ye){if(document.activeElement===ee&&!(ae||T||Z.$mouseHandler.isMousePressed)&&!R){var me=ee.selectionStart,de=ee.selectionEnd,le=null,Te=0;if(me==0?le=u.up:me==1?le=u.home:de>k&&x[de]==`
1340
- `?le=u.end:me<_&&x[me-1]==" "?(le=u.left,Te=f.option):me<_||me==_&&k!=_&&me==de?le=u.left:de>k&&x.slice(0,de).split(`
1341
- `).length>2?le=u.down:de>k&&x[de-1]==" "?(le=u.right,Te=f.option):(de>k||de==k&&k!=_&&me==de)&&(le=u.right),me!==de&&(Te|=f.shift),le){var Wt=Z.onCommandKey({},Te,le);if(!Wt&&Z.commands){le=u.keyCodeToString(le);var ga=Z.commands.findKeyCommand(Te,le);ga&&Z.execCommand(ga)}_=me,k=de,H("")}}};document.addEventListener("selectionchange",ge),Z.on("destroy",function(){document.removeEventListener("selectionchange",ge)})}this.destroy=function(){M.parentElement&&M.parentElement.removeChild(M)}},n.TextInput=$,n.$setUserAgentForTests=function(A,S){E=A,y=S}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,n,p){var h=t("../lib/useragent"),g=0,m=550,c=(function(){function o(a){a.$clickSelection=null;var s=a.editor;s.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),s.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),s.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),s.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),s.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(u){a[u]=this[u]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}return o.prototype.onMouseDown=function(a){var s=a.inSelection(),i=a.getDocumentPosition();this.mousedownEvent=a;var u=this.editor,f=a.getButton();if(f!==0){var y=u.getSelectionRange(),b=y.isEmpty();(b||f==1)&&u.selection.moveToPosition(i),f==2&&(u.textInput.onContextMenu(a.domEvent),h.isMozilla||a.preventDefault());return}if(this.mousedownEvent.time=Date.now(),s&&!u.isFocused()&&(u.focus(),this.$focusTimeout&&!this.$clickSelection&&!u.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(a);return}return this.captureMouse(a),this.startSelect(i,a.domEvent._clicks>1),a.preventDefault()},o.prototype.startSelect=function(a,s){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(a):s||i.selection.moveToPosition(a),s||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var a,s=this.editor,i=s.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(i);if(u==-1)a=this.$clickSelection.end;else if(u==1)a=this.$clickSelection.start;else{var f=r(this.$clickSelection,i);i=f.cursor,a=f.anchor}s.selection.setSelectionAnchor(a.row,a.column)}s.selection.selectToPosition(i),s.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(a){var s,i=this.editor,u=i.renderer.screenToTextCoordinates(this.x,this.y),f=i.selection[a](u.row,u.column);if(this.$clickSelection){var y=this.$clickSelection.comparePoint(f.start),b=this.$clickSelection.comparePoint(f.end);if(y==-1&&b<=0)s=this.$clickSelection.end,(f.end.row!=u.row||f.end.column!=u.column)&&(u=f.start);else if(b==1&&y>=0)s=this.$clickSelection.start,(f.start.row!=u.row||f.start.column!=u.column)&&(u=f.end);else if(y==-1&&b==1)u=f.end,s=f.start;else{var E=r(this.$clickSelection,u);u=E.cursor,s=E.anchor}i.selection.setSelectionAnchor(s.row,s.column)}i.selection.selectToPosition(u),i.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var a=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),s=Date.now();(a>g||s-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(a){var s=a.getDocumentPosition(),i=this.editor,u=i.session,f=u.getBracketRange(s);f?(f.isEmpty()&&(f.start.column--,f.end.column++),this.setState("select")):(f=i.selection.getWordRange(s.row,s.column),this.setState("selectByWords")),this.$clickSelection=f,this.select()},o.prototype.onTripleClick=function(a){var s=a.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var u=i.getSelectionRange();u.isMultiLine()&&u.contains(s.row,s.column)?(this.$clickSelection=i.selection.getLineRange(u.start.row),this.$clickSelection.end=i.selection.getLineRange(u.end.row).end):this.$clickSelection=i.selection.getLineRange(s.row),this.select()},o.prototype.onQuadClick=function(a){var s=this.editor;s.selectAll(),this.$clickSelection=s.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var s=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,u=a.domEvent.timeStamp,f=u-i.t,y=f?a.wheelX/f:i.vx,b=f?a.wheelY/f:i.vy;f<m&&(y=(y+i.vx)/2,b=(b+i.vy)/2);var E=Math.abs(y/b),$=!1;if(E>=1&&s.renderer.isScrollableBy(a.wheelX*a.speed,0)&&($=!0),E<=1&&s.renderer.isScrollableBy(0,a.wheelY*a.speed)&&($=!0),$)i.allowed=u;else if(u-i.allowed<m){var A=Math.abs(y)<=1.5*Math.abs(i.vx)&&Math.abs(b)<=1.5*Math.abs(i.vy);A?($=!0,i.allowed=u):i.allowed=0}if(i.t=u,i.vx=y,i.vy=b,$)return s.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()}},o})();c.prototype.selectEnd=c.prototype.selectByLinesEnd,c.prototype.selectAllEnd=c.prototype.selectByLinesEnd,c.prototype.selectByWordsEnd=c.prototype.selectByLinesEnd,n.DefaultHandlers=c;function d(o,a,s,i){return Math.sqrt(Math.pow(s-o,2)+Math.pow(i-a,2))}function r(o,a){if(o.start.row==o.end.row)var s=2*a.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var s=a.column-4;else var s=2*a.row-o.start.row-o.end.row;return s<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,n,p){n.preventParentScroll=function(g){g.stopPropagation();var m=g.currentTarget,c=m.scrollHeight>m.clientHeight;c||g.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,n,p){var h=this&&this.__extends||(function(){var u=function(f,y){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(b[$]=E[$])},u(f,y)};return function(f,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");u(f,y);function b(){this.constructor=f}f.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}})(),g=this&&this.__values||function(u){var f=typeof Symbol=="function"&&Symbol.iterator,y=f&&u[f],b=0;if(y)return y.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&b>=u.length&&(u=void 0),{value:u&&u[b++],done:!u}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},m=t("./lib/dom");t("./lib/event");var c=t("./range").Range,d=t("./lib/scroll").preventParentScroll,r="ace_tooltip",o=(function(){function u(f){this.isOpen=!1,this.$element=null,this.$parentNode=f}return u.prototype.$init=function(){return this.$element=m.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(f){this.getElement().textContent=f},u.prototype.setHtml=function(f){this.getElement().innerHTML=f},u.prototype.setPosition=function(f,y){this.getElement().style.left=f+"px",this.getElement().style.top=y+"px"},u.prototype.setClassName=function(f){m.addCssClass(this.getElement(),f)},u.prototype.setTheme=function(f){this.$element.className=r+" "+(f.isDark?"ace_dark ":"")+(f.cssClass||"")},u.prototype.show=function(f,y,b){f!=null&&this.setText(f),y!=null&&b!=null&&this.setPosition(y,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},u.prototype.hide=function(f){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u})(),a=(function(){function u(){this.popups=[]}return u.prototype.addPopup=function(f){this.popups.push(f),this.updatePopups()},u.prototype.removePopup=function(f){var y=this.popups.indexOf(f);y!==-1&&(this.popups.splice(y,1),this.updatePopups())},u.prototype.updatePopups=function(){var f,y,b,E;this.popups.sort(function(w,v){return v.priority-w.priority});var $=[];try{for(var A=g(this.popups),S=A.next();!S.done;S=A.next()){var M=S.value,R=!0;try{for(var L=(b=void 0,g($)),T=L.next();!T.done;T=L.next()){var D=T.value;if(this.doPopupsOverlap(D,M)){R=!1;break}}}catch(w){b={error:w}}finally{try{T&&!T.done&&(E=L.return)&&E.call(L)}finally{if(b)throw b.error}}R?$.push(M):M.hide()}}catch(w){f={error:w}}finally{try{S&&!S.done&&(y=A.return)&&y.call(A)}finally{if(f)throw f.error}}},u.prototype.doPopupsOverlap=function(f,y){var b=f.getElement().getBoundingClientRect(),E=y.getElement().getBoundingClientRect();return b.left<E.right&&b.right>E.left&&b.top<E.bottom&&b.bottom>E.top},u})(),s=new a;n.popupManager=s,n.Tooltip=o;var i=(function(u){h(f,u);function f(y){y===void 0&&(y=document.body);var b=u.call(this,y)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var E=b.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",b.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(b)),E.addEventListener("wheel",d),b}return f.prototype.addToEditor=function(y){y.on("mousemove",this.onMouseMove),y.on("mousedown",this.hide),y.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},f.prototype.removeFromEditor=function(y){y.off("mousemove",this.onMouseMove),y.off("mousedown",this.hide),y.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},f.prototype.onMouseMove=function(y,b){this.lastEvent=y,this.lastT=Date.now();var E=b.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=y,this.timeout=setTimeout(this.waitForHover,this.idleTime))},f.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var y=Date.now()-this.lastT;if(this.idleTime-y>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-y);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},f.prototype.isOutsideOfText=function(y){var b=y.editor,E=y.getDocumentPosition(),$=b.session.getLine(E.row);if(E.column==$.length){var A=b.renderer.pixelToScreenCoordinates(y.clientX,y.clientY),S=b.session.documentToScreenPosition(E.row,E.column);if(S.column!=A.column||S.row!=A.row)return!0}return!1},f.prototype.setDataProvider=function(y){this.$gatherData=y},f.prototype.showForRange=function(y,b,E,$){var A=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var S=y.renderer;this.isOpen||(s.addPopup(this),this.$registerCloseEvents(),this.setTheme(S.theme)),this.isOpen=!0,this.addMarker(b,y.session),this.range=c.fromPoints(b.start,b.end);var M=S.textToScreenCoordinates(b.start.row,b.start.column),R=S.scroller.getBoundingClientRect();M.pageX<R.left&&(M.pageX=R.left);var L=this.getElement();L.innerHTML="",L.appendChild(E),L.style.maxHeight="",L.style.display="block";var T=L.clientHeight,D=L.clientWidth,w=window.innerHeight-M.pageY-S.lineHeight,v=!0;M.pageY-T<0&&M.pageY<w&&(v=!1),L.style.maxHeight=(v?M.pageY:w)-A+"px",L.style.top=v?"":M.pageY+S.lineHeight+"px",L.style.bottom=v?window.innerHeight-M.pageY+"px":"",L.style.left=Math.min(M.pageX,window.innerWidth-D-A)+"px"}},f.prototype.addMarker=function(y,b){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=b,this.marker=b&&b.addMarker(y,"ace_highlight-marker","text")},f.prototype.hide=function(y){!y&&document.activeElement==this.getElement()||y&&y.target&&(y.type!="keydown"||y.ctrlKey||y.metaKey)&&this.$element.contains(y.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,s.removePopup(this)))},f.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},f.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},f.prototype.onMouseOut=function(y){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!y.relatedTarget||this.getElement().contains(y.relatedTarget)||y&&y.currentTarget.contains(y.relatedTarget)||y.relatedTarget.classList.contains("ace_content")||this.hide())},f})(o);n.HoverTooltip=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(t,n,p){var h=this&&this.__extends||(function(){var s=function(i,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,y){f.__proto__=y}||function(f,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(f[b]=y[b])},s(i,u)};return function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(i,u);function f(){this.constructor=i}i.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})(),g=this&&this.__values||function(s){var i=typeof Symbol=="function"&&Symbol.iterator,u=i&&s[i],f=0;if(u)return u.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&f>=s.length&&(s=void 0),{value:s&&s[f++],done:!s}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},m=t("../lib/dom"),c=t("../lib/event"),d=t("../tooltip").Tooltip,r=t("../config").nls;t("../lib/lang");function o(s){var i=s.editor,u=i.renderer.$gutterLayer,f=new a(i);s.editor.setDefaultHandler("guttermousedown",function(S){if(!(!i.isFocused()||S.getButton()!=0)){var M=u.getRegion(S);if(M!="foldWidgets"){var R=S.getDocumentPosition().row,L=i.session.selection;if(S.getShiftKey())L.selectTo(R,0);else{if(S.domEvent.detail==2)return i.selectAll(),S.preventDefault();s.$clickSelection=i.selection.getLineRange(R)}return s.setState("selectByLines"),s.captureMouse(S),S.preventDefault()}}});var y,b;function E(){var S=b.getDocumentPosition().row,M=i.session.getLength();if(S==M){var R=i.renderer.pixelToScreenCoordinates(0,b.y).row,L=b.$pos;if(R>i.session.documentToScreenRow(L.row,L.column))return $()}if(f.showTooltip(S),!!f.isOpen)if(i.on("mousewheel",$),s.$tooltipFollowsMouse)A(b);else{var T=b.getGutterRow(),D=u.$lines.get(T);if(D){var w=D.element.querySelector(".ace_gutter_annotation"),v=w.getBoundingClientRect(),C=f.getElement().style;C.left=v.right+"px",C.top=v.bottom+"px"}else A(b)}}function $(){y&&(y=clearTimeout(y)),f.isOpen&&(f.hideTooltip(),i.off("mousewheel",$))}function A(S){f.setPosition(S.x,S.y)}s.editor.setDefaultHandler("guttermousemove",function(S){var M=S.domEvent.target||S.domEvent.srcElement;if(m.hasCssClass(M,"ace_fold-widget"))return $();f.isOpen&&s.$tooltipFollowsMouse&&A(S),b=S,!y&&(y=setTimeout(function(){y=null,b&&!s.isMousePressed?E():$()},50))}),c.addListener(i.renderer.$gutter,"mouseout",function(S){b=null,!(!f.isOpen||y)&&(y=setTimeout(function(){y=null,$()},50))},i),i.on("changeSession",$),i.on("input",$)}n.GutterHandler=o;var a=(function(s){h(i,s);function i(u){var f=s.call(this,u.container)||this;return f.editor=u,f}return i.prototype.setPosition=function(u,f){var y=window.innerWidth||document.documentElement.clientWidth,b=window.innerHeight||document.documentElement.clientHeight,E=this.getWidth(),$=this.getHeight();u+=15,f+=15,u+E>y&&(u-=u+E-y),f+$>b&&(f-=20+$),d.prototype.setPosition.call(this,u,f)},Object.defineProperty(i,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),i.prototype.showTooltip=function(u){var f,y=this.editor.renderer.$gutterLayer,b=y.$annotations[u],E;b?E={displayText:Array.from(b.displayText),type:Array.from(b.type)}:E={displayText:[],type:[]};var $=y.session.getFoldLine(u);if($&&y.$showFoldedAnnotations){for(var A={error:[],security:[],warning:[],info:[],hint:[]},S={error:1,security:2,warning:3,info:4,hint:5},M,R=u+1;R<=$.end.row;R++)if(y.$annotations[R])for(var L=0;L<y.$annotations[R].text.length;L++){var T=y.$annotations[R].type[L];A[T].push(y.$annotations[R].text[L]),(!M||S[T]<S[M])&&(M=T)}if(["error","security","warning"].includes(M)){var D="".concat(i.annotationsToSummaryString(A)," in folded code.");E.displayText.push(D),E.type.push(M+"_fold")}}if(E.displayText.length===0)return this.hide();for(var w={error:[],security:[],warning:[],info:[],hint:[]},v=y.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",R=0;R<E.displayText.length;R++){var C=m.createElement("span"),x=m.createElement("span");(f=x.classList).add.apply(f,["ace_".concat(E.type[R]),v]),x.setAttribute("aria-label","".concat(i.annotationLabels[E.type[R].replace("_fold","")].singular)),x.setAttribute("role","img"),x.appendChild(m.createTextNode(" ")),C.appendChild(x),C.appendChild(m.createTextNode(E.displayText[R])),C.appendChild(m.createElement("br")),w[E.type[R].replace("_fold","")].push(C)}var _=this.getElement();m.removeChildren(_),w.error.forEach(function(k){return _.appendChild(k)}),w.security.forEach(function(k){return _.appendChild(k)}),w.warning.forEach(function(k){return _.appendChild(k)}),w.info.forEach(function(k){return _.appendChild(k)}),w.hint.forEach(function(k){return _.appendChild(k)}),_.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},i.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},i.annotationsToSummaryString=function(u){var f,y,b=[],E=["error","security","warning","info","hint"];try{for(var $=g(E),A=$.next();!A.done;A=$.next()){var S=A.value;if(u[S].length){var M=u[S].length===1?i.annotationLabels[S].singular:i.annotationLabels[S].plural;b.push("".concat(u[S].length," ").concat(M))}}}catch(R){f={error:R}}finally{try{A&&!A.done&&(y=$.return)&&y.call($)}finally{if(f)throw f.error}}return b.join(", ")},i})(d);n.GutterTooltip=a}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,n,p){var h=t("../lib/event"),g=t("../lib/useragent"),m=(function(){function c(d,r){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=r,this.x=this.clientX=d.clientX,this.y=this.clientY=d.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){h.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){h.preventDefault(this.domEvent),this.defaultPrevented=!0},c.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},c.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},c.prototype.getGutterRow=function(){var d=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(d,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-o},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,r=d.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=r.contains(o.row,o.column)}return this.$inSelection},c.prototype.getButton=function(){return h.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c})();n.MouseEvent=m}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,n,p){var h=t("../lib/dom"),g=t("../lib/event"),m=t("../lib/useragent"),c=200,d=200,r=5;function o(s){var i=s.editor,u=h.createElement("div");u.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",u.textContent=" ";var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(F){s[F]=this[F]},this),i.on("mousedown",this.onMouseDown.bind(s));var y=i.container,b,E,$,A,S,M,R=0,L,T,D,w,v;this.onDragStart=function(F){if(this.cancelDrag||!y.draggable){var H=this;return setTimeout(function(){H.startSelect(),H.captureMouse(F)},0),F.preventDefault()}S=i.getSelectionRange();var z=F.dataTransfer;z.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(u),z.setDragImage&&z.setDragImage(u,0,0),setTimeout(function(){i.container.removeChild(u)}),z.clearData(),z.setData("Text",i.session.getTextRange()),T=!0,this.setState("drag")},this.onDragEnd=function(F){if(y.draggable=!1,T=!1,this.setState(null),!i.getReadOnly()){var H=F.dataTransfer.dropEffect;!L&&H=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(F){if(!(i.getReadOnly()||!P(F.dataTransfer)))return E=F.clientX,$=F.clientY,b||k(),R++,F.dataTransfer.dropEffect=L=B(F),g.preventDefault(F)},this.onDragOver=function(F){if(!(i.getReadOnly()||!P(F.dataTransfer)))return E=F.clientX,$=F.clientY,b||(k(),R++),I!==null&&(I=null),F.dataTransfer.dropEffect=L=B(F),g.preventDefault(F)},this.onDragLeave=function(F){if(R--,R<=0&&b)return O(),L=null,g.preventDefault(F)},this.onDrop=function(F){if(M){var H=F.dataTransfer;if(T)switch(L){case"move":S.contains(M.row,M.column)?S={start:M,end:M}:S=i.moveText(S,M);break;case"copy":S=i.moveText(S,M,!0);break}else{var z=H.getData("Text");S={start:M,end:i.session.insert(M,z)},i.focus(),L=null}return O(),g.preventDefault(F)}},g.addListener(y,"dragstart",this.onDragStart.bind(s),i),g.addListener(y,"dragend",this.onDragEnd.bind(s),i),g.addListener(y,"dragenter",this.onDragEnter.bind(s),i),g.addListener(y,"dragover",this.onDragOver.bind(s),i),g.addListener(y,"dragleave",this.onDragLeave.bind(s),i),g.addListener(y,"drop",this.onDrop.bind(s),i);function C(F,H){var z=Date.now(),W=!H||F.row!=H.row,U=!H||F.column!=H.column;if(!w||W||U)i.moveCursorToPosition(F),w=z,v={x:E,y:$};else{var K=a(v.x,v.y,E,$);K>r?w=null:z-w>=d&&(i.renderer.scrollCursorIntoView(),w=null)}}function x(F,H){var z=Date.now(),W=i.renderer.layerConfig.lineHeight,U=i.renderer.layerConfig.characterWidth,K=i.renderer.scroller.getBoundingClientRect(),Y={x:{left:E-K.left,right:K.right-E},y:{top:$-K.top,bottom:K.bottom-$}},G=Math.min(Y.x.left,Y.x.right),Q=Math.min(Y.y.top,Y.y.bottom),ue={row:F.row,column:F.column};G/U<=2&&(ue.column+=Y.x.left<Y.x.right?-3:2),Q/W<=1&&(ue.row+=Y.y.top<Y.y.bottom?-1:1);var Me=F.row!=ue.row,Ce=F.column!=ue.column,he=!H||F.row!=H.row;Me||Ce&&!he?D?z-D>=c&&i.renderer.scrollCursorIntoView(ue):D=z:D=null}function _(){var F=M;M=i.renderer.screenToTextCoordinates(E,$),C(M,F),x(M,F)}function k(){S=i.selection.toOrientedRange(),b=i.session.addMarker(S,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(A),_(),A=setInterval(_,20),R=0,g.addListener(document,"mousemove",N)}function O(){clearInterval(A),i.session.removeMarker(b),b=null,i.selection.fromOrientedRange(S),i.isFocused()&&!T&&i.$resetCursorStyle(),S=null,M=null,R=0,D=null,w=null,g.removeListener(document,"mousemove",N)}var I=null;function N(){I==null&&(I=setTimeout(function(){I!=null&&b&&O()},20))}function P(F){var H=F.types;return!H||Array.prototype.some.call(H,function(z){return z=="text/plain"||z=="Text"})}function B(F){var H=["copy","copymove","all","uninitialized"],z=["move","copymove","linkmove","all","uninitialized"],W=m.isMac?F.altKey:F.ctrlKey,U="uninitialized";try{U=F.dataTransfer.effectAllowed.toLowerCase()}catch{}var K="none";return W&&H.indexOf(U)>=0?K="copy":z.indexOf(U)>=0?K="move":H.indexOf(U)>=0&&(K="copy"),K}}(function(){this.dragWait=function(){var s=Date.now()-this.mousedownEvent.time;s>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var s=this.editor.container;s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(s){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var s=this.editor,i=s.container;i.draggable=!0,s.renderer.$cursorLayer.setBlinking(!1),s.setStyle("ace_dragging");var u=m.isWin?"default":"move";s.renderer.setCursorStyle(u),this.setState("dragReady")},this.onMouseDrag=function(s){var i=this.editor.container;if(m.isIE&&this.state=="dragReady"){var u=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>3&&i.dragDrop()}if(this.state==="dragWait"){var u=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(s){if(this.$dragEnabled){this.mousedownEvent=s;var i=this.editor,u=s.inSelection(),f=s.getButton(),y=s.domEvent.detail||1;if(y===1&&f===0&&u){if(s.editor.inMultiSelectMode&&(s.getAccelKey()||s.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=s.domEvent.target||s.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),i.getDragDelay()){if(m.isWebKit){this.cancelDrag=!0;var E=i.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(s,this.onMouseDrag.bind(this)),s.defaultPrevented=!0}}}}).call(o.prototype);function a(s,i,u,f){return Math.sqrt(Math.pow(u-s,2)+Math.pow(f-i,2))}n.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,n,p){var h=t("./mouse_event").MouseEvent,g=t("../lib/event"),m=t("../lib/dom");n.addTouchListeners=function(c,d){var r="scroll",o,a,s,i,u,f,y=0,b,E=0,$=0,A=0,S,M;function R(){var C=window.navigator&&window.navigator.clipboard,x=!1,_=function(){var I=d.getCopyText(),N=d.session.getUndoManager().hasUndo();M.replaceChild(m.buildDom(x?["span",!I&&k("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],I&&k("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],I&&k("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&k("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],N&&k("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],k("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],k("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),M.firstChild)},k=function(I){return d.commands.canExecute(I,d)},O=function(I){var N=I.target.getAttribute("action");if(N=="more"||!x)return x=!x,_();N=="paste"?C.readText().then(function(P){d.execCommand(N,P)}):N&&((N=="cut"||N=="copy")&&(C?C.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(N)),M.firstChild.style.display="none",x=!1,N!="openCommandPalette"&&d.focus()};M=m.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(I){r="menu",I.stopPropagation(),I.preventDefault(),d.textInput.focus()},ontouchend:function(I){I.stopPropagation(),I.preventDefault(),O(I)},onclick:O},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],d.container)}function L(){if(!d.getOption("enableMobileMenu")){M&&T();return}M||R();var C=d.selection.cursor,x=d.renderer.textToScreenCoordinates(C.row,C.column),_=d.renderer.textToScreenCoordinates(0,0).pageX,k=d.renderer.scrollLeft,O=d.container.getBoundingClientRect();M.style.top=x.pageY-O.top-3+"px",x.pageX-O.left<O.width-70?(M.style.left="",M.style.right="10px"):(M.style.right="",M.style.left=_+k-O.left+"px"),M.style.display="",M.firstChild.style.display="none",d.on("input",T)}function T(C){M&&(M.style.display="none"),d.off("input",T)}function D(){u=null,clearTimeout(u);var C=d.selection.getRange(),x=C.contains(b.row,b.column);(C.isEmpty()||!x)&&(d.selection.moveToPosition(b),d.selection.selectWord()),r="wait",L()}function w(){u=null,clearTimeout(u),d.selection.moveToPosition(b);var C=E>=2?d.selection.getLineRange(b.row):d.session.getBracketRange(b);C&&!C.isEmpty()?d.selection.setRange(C):d.selection.selectWord(),r="wait"}g.addListener(c,"contextmenu",function(C){if(S){var x=d.textInput.getElement();x.focus()}},d),g.addListener(c,"touchstart",function(C){var x=C.touches;if(u||x.length>1){clearTimeout(u),u=null,s=-1,r="zoom";return}S=d.$mouseHandler.isMousePressed=!0;var _=d.renderer.layerConfig.lineHeight,k=d.renderer.layerConfig.lineHeight,O=C.timeStamp;i=O;var I=x[0],N=I.clientX,P=I.clientY;Math.abs(o-N)+Math.abs(a-P)>_&&(s=-1),o=C.clientX=N,a=C.clientY=P,$=A=0;var B=new h(C,d);if(b=B.getDocumentPosition(),O-s<500&&x.length==1&&!y)E++,C.preventDefault(),C.button=0,w();else{E=0;var F=d.selection.cursor,H=d.selection.isEmpty()?F:d.selection.anchor,z=d.renderer.$cursorLayer.getPixelPosition(F,!0),W=d.renderer.$cursorLayer.getPixelPosition(H,!0),U=d.renderer.scroller.getBoundingClientRect(),K=d.renderer.layerConfig.offset,Y=d.renderer.scrollLeft,G=function(Me,Ce){return Me=Me/k,Ce=Ce/_-.75,Me*Me+Ce*Ce};if(C.clientX<U.left){r="zoom";return}var Q=G(C.clientX-U.left-z.left+Y,C.clientY-U.top-z.top+K),ue=G(C.clientX-U.left-W.left+Y,C.clientY-U.top-W.top+K);Q<3.5&&ue<3.5&&(r=Q>ue?"cursor":"anchor"),ue<3.5?r="anchor":Q<3.5?r="cursor":r="scroll",u=setTimeout(D,450)}s=O},d),g.addListener(c,"touchend",function(C){S=d.$mouseHandler.isMousePressed=!1,f&&clearInterval(f),r=="zoom"?(r="",y=0):u?(d.selection.moveToPosition(b),y=0,L()):r=="scroll"?(v(),T()):L(),clearTimeout(u),u=null},d),g.addListener(c,"touchmove",function(C){u&&(clearTimeout(u),u=null);var x=C.touches;if(!(x.length>1||r=="zoom")){var _=x[0],k=o-_.clientX,O=a-_.clientY;if(r=="wait")if(k*k+O*O>4)r="cursor";else return C.preventDefault();o=_.clientX,a=_.clientY,C.clientX=_.clientX,C.clientY=_.clientY;var I=C.timeStamp,N=I-i;if(i=I,r=="scroll"){var P=new h(C,d);P.speed=1,P.wheelX=k,P.wheelY=O,10*Math.abs(k)<Math.abs(O)&&(k=0),10*Math.abs(O)<Math.abs(k)&&(O=0),N!=0&&($=k/N,A=O/N),d._emit("mousewheel",P),P.propagationStopped||($=A=0)}else{var B=new h(C,d),F=B.getDocumentPosition();r=="cursor"?d.selection.moveCursorToPosition(F):r=="anchor"&&d.selection.setSelectionAnchor(F.row,F.column),d.renderer.scrollCursorIntoView(F),C.preventDefault()}}},d);function v(){y+=60,f=setInterval(function(){y--<=0&&(clearInterval(f),f=null),Math.abs($)<.01&&($=0),Math.abs(A)<.01&&(A=0),y<20&&($=.9*$),y<20&&(A=.9*A);var C=d.session.getScrollTop();d.renderer.scrollBy(10*$,10*A),C==d.session.getScrollTop()&&(y=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(t,n,p){var h=t("../lib/event"),g=t("../lib/useragent"),m=t("./default_handlers").DefaultHandlers,c=t("./default_gutter_handler").GutterHandler,d=t("./mouse_event").MouseEvent,r=t("./dragdrop_handler").DragdropHandler,o=t("./touch_handler").addTouchListeners,a=t("../config"),s=(function(){function i(u){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var f=this;this.editor=u,new m(this),new c(this),new r(this);var y=function($){var A=!document.hasFocus||!document.hasFocus()||!u.isFocused()&&document.activeElement==(u.textInput&&u.textInput.getElement());A&&window.focus(),u.focus(),setTimeout(function(){u.isFocused()||u.focus()})},b=u.renderer.getMouseEventTarget();h.addListener(b,"click",this.onMouseEvent.bind(this,"click"),u),h.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove"),u),h.addMultiMouseDownListener([b,u.renderer.scrollBarV&&u.renderer.scrollBarV.inner,u.renderer.scrollBarH&&u.renderer.scrollBarH.inner,u.textInput&&u.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",u),h.addMouseWheelListener(u.container,this.onMouseWheel.bind(this,"mousewheel"),u),o(u.container,u);var E=u.renderer.$gutter;h.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),u),h.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),u),h.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),u),h.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),u),h.addListener(b,"mousedown",y,u),h.addListener(E,"mousedown",y,u),g.isIE&&u.renderer.scrollBarV&&(h.addListener(u.renderer.scrollBarV.element,"mousedown",y,u),h.addListener(u.renderer.scrollBarH.element,"mousedown",y,u)),u.on("mousemove",function($){if(!(f.state||f.$dragDelay||!f.$dragEnabled)){var A=u.renderer.screenToTextCoordinates($.x,$.y),S=u.session.selection.getRange(),M=u.renderer;!S.isEmpty()&&S.insideStart(A.row,A.column)?M.setCursorStyle("default"):M.setCursorStyle("")}},u)}return i.prototype.onMouseEvent=function(u,f){this.editor.session&&this.editor._emit(u,new d(f,this.editor))},i.prototype.onMouseMove=function(u,f){var y=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!y||!y.length||this.editor._emit(u,new d(f,this.editor))},i.prototype.onMouseWheel=function(u,f){var y=new d(f,this.editor);y.speed=this.$scrollSpeed*2,y.wheelX=f.wheelX,y.wheelY=f.wheelY,this.editor._emit(u,y)},i.prototype.setState=function(u){this.state=u},i.prototype.captureMouse=function(u,f){this.x=u.x,this.y=u.y,this.isMousePressed=!0;var y=this.editor,b=this.editor.renderer;b.$isMousePressed=!0;var E=this,$=function(L){if(L){if(g.isWebKit&&!L.which&&E.releaseMouse)return E.releaseMouse();E.x=L.clientX,E.y=L.clientY,f&&f(L),E.mouseEvent=new d(L,E.editor),E.$mouseMoved=!0}},A=function(L){y.off("beforeEndOperation",M),clearInterval(R),y.session&&S(),E[E.state+"End"]&&E[E.state+"End"](L),E.state="",E.isMousePressed=b.$isMousePressed=!1,b.$keepTextAreaAtCursor&&b.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,L&&E.onMouseEvent("mouseup",L),y.endOperation()},S=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1};if(g.isOldIE&&u.domEvent.type=="dblclick")return setTimeout(function(){A(u)});var M=function(L){E.releaseMouse&&y.curOp.command.name&&y.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};y.on("beforeEndOperation",M),y.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=$,E.releaseMouse=h.capture(this.editor.container,$,A);var R=setInterval(S,20)},i.prototype.cancelContextMenu=function(){var u=(function(f){f&&f.domEvent&&f.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",u),f&&f.domEvent&&h.stopEvent(f.domEvent))}).bind(this);setTimeout(u,10),this.editor.on("nativecontextmenu",u)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},i})();s.prototype.releaseMouse=null,a.defineOptions(s.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),n.MouseHandler=s}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,n,p){var h=t("../lib/dom"),g=(function(){function m(c){c.on("click",function(d){var r=d.getDocumentPosition(),o=c.session,a=o.getFoldAt(r.row,r.column,1);a&&(d.getAccelKey()?o.removeFold(a):o.expandFold(a),d.stop());var s=d.domEvent&&d.domEvent.target;s&&h.hasCssClass(s,"ace_inline_button")&&h.hasCssClass(s,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),c.renderer.scrollCursorIntoView())}),c.on("gutterclick",function(d){var r=c.renderer.$gutterLayer.getRegion(d);if(r=="foldWidgets"){var o=d.getDocumentPosition().row,a=c.session;a.foldWidgets&&a.foldWidgets[o]&&c.session.onFoldWidgetClick(o,d),c.isFocused()||c.focus(),d.stop()}}),c.on("gutterdblclick",function(d){var r=c.renderer.$gutterLayer.getRegion(d);if(r=="foldWidgets"){var o=d.getDocumentPosition().row,a=c.session,s=a.getParentFoldRangeData(o,!0),i=s.range||s.firstRange;if(i){o=i.start.row;var u=a.getFoldAt(o,a.getLine(o).length,1);u?a.removeFold(u):(a.addFold("...",i),c.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}d.stop()}})}return m})();n.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,n,p){var h=t("../lib/keys"),g=t("../lib/event"),m=(function(){function c(d){this.$editor=d,this.$data={editor:d},this.$handlers=[],this.setDefaultHandler(d.commands)}return c.prototype.setDefaultHandler=function(d){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=d,this.addKeyboardHandler(d,0)},c.prototype.setKeyboardHandler=function(d){var r=this.$handlers;if(r[r.length-1]!=d){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(d,1)}},c.prototype.addKeyboardHandler=function(d,r){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var o=this.$handlers.indexOf(d);o!=-1&&this.$handlers.splice(o,1),r==null?this.$handlers.push(d):this.$handlers.splice(r,0,d),o==-1&&d.attach&&d.attach(this.$editor)}},c.prototype.removeKeyboardHandler=function(d){var r=this.$handlers.indexOf(d);return r==-1?!1:(this.$handlers.splice(r,1),d.detach&&d.detach(this.$editor),!0)},c.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},c.prototype.getStatusText=function(){var d=this.$data,r=d.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(r,d)||""}).filter(Boolean).join(" ")},c.prototype.$callKeyboardHandlers=function(d,r,o,a){for(var s,i=!1,u=this.$editor.commands,f=this.$handlers.length;f--&&(s=this.$handlers[f].handleKeyboard(this.$data,d,r,o,a),!(!(!s||!s.command)&&(s.command=="null"?i=!0:i=u.exec(s.command,this.$editor,s.args,a),i&&a&&d!=-1&&s.passEvent!=!0&&s.command.passEvent!=!0&&g.stopEvent(a),i))););return!i&&d==-1&&(s={command:"insertstring"},i=u.exec("insertstring",this.$editor,r)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",s),i},c.prototype.onCommandKey=function(d,r,o){var a=h.keyCodeToString(o);return this.$callKeyboardHandlers(r,a,o,d)},c.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},c})();n.KeyBinding=m}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(t,n,p){var h=0,g=0,m=!1,c=!1,d=!1,r=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],a=0,s=1,i=0,u=1,f=2,y=3,b=4,E=5,$=6,A=7,S=8,M=9,R=10,L=11,T=12,D=13,w=14,v=15,C=16,x=17,_=18,k=[_,_,_,_,_,_,_,_,_,$,E,$,S,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,E,E,E,$,S,b,b,L,L,L,b,b,b,b,b,R,M,R,M,M,f,f,f,f,f,f,f,f,f,f,M,b,b,b,b,b,b,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,b,b,b,b,b,b,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,b,b,b,b,_,_,_,_,_,_,E,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,M,b,L,L,L,L,b,b,b,b,i,b,b,_,b,b,L,L,f,f,b,i,b,b,b,f,i,b,b,b,b,b],O=[S,S,S,S,S,S,S,S,S,S,S,_,_,_,i,u,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,S,E,D,w,v,C,x,M,L,L,L,L,L,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,M,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,S];function I(F,H,z,W){var U=h?o:r,K=null,Y=null,G=null,Q=0,ue=null,Me=null,Ce=-1,he=null,De=null,dt=[];if(!W)for(he=0,W=[];he<z;he++)W[he]=B(F[he]);for(g=h,m=!1,c=!1,d=!1,De=0;De<z;De++){if(K=Q,dt[De]=Y=P(F,W,dt,De),Q=U[K][Y],ue=Q&240,Q&=15,H[De]=G=U[Q][5],ue>0)if(ue==16){for(he=Ce;he<De;he++)H[he]=1;Ce=-1}else Ce=-1;if(Me=U[Q][6],Me)Ce==-1&&(Ce=De);else if(Ce>-1){for(he=Ce;he<De;he++)H[he]=G;Ce=-1}W[De]==E&&(H[De]=0),g|=G}if(d){for(he=0;he<z;he++)if(W[he]==$){H[he]=h;for(var ft=he-1;ft>=0&&W[ft]==S;ft--)H[ft]=h}}}function N(F,H,z){if(!(g<F)){if(F==1&&h==s&&!c){z.reverse();return}for(var W=z.length,U=0,K,Y,G,Q;U<W;){if(H[U]>=F){for(K=U+1;K<W&&H[K]>=F;)K++;for(Y=U,G=K-1;Y<G;Y++,G--)Q=z[Y],z[Y]=z[G],z[G]=Q;U=K}U++}}}function P(F,H,z,W){var U=H[W],K,Y,G,Q;switch(U){case i:case u:m=!1;case b:case y:return U;case f:return m?y:f;case A:return m=!0,u;case S:return b;case M:return W<1||W+1>=H.length||(K=z[W-1])!=f&&K!=y||(Y=H[W+1])!=f&&Y!=y?b:(m&&(Y=y),Y==K?Y:b);case R:return K=W>0?z[W-1]:E,K==f&&W+1<H.length&&H[W+1]==f?f:b;case L:if(W>0&&z[W-1]==f)return f;if(m)return b;for(Q=W+1,G=H.length;Q<G&&H[Q]==L;)Q++;return Q<G&&H[Q]==f?f:b;case T:for(G=H.length,Q=W+1;Q<G&&H[Q]==T;)Q++;if(Q<G){var ue=F[W],Me=ue>=1425&&ue<=2303||ue==64286;if(K=H[Q],Me&&(K==u||K==A))return u}return W<1||(K=H[W-1])==E?b:z[W-1];case E:return m=!1,c=!0,h;case $:return d=!0,b;case D:case w:case C:case x:case v:m=!1;case _:return b}}function B(F){var H=F.charCodeAt(0),z=H>>8;return z==0?H>191?i:k[H]:z==5?/[\u0591-\u05f4]/.test(F)?u:i:z==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(F)?T:/[\u0660-\u0669\u066b-\u066c]/.test(F)?y:H==1642?L:/[\u06f0-\u06f9]/.test(F)?f:A:z==32&&H<=8287?O[H&255]:z==254&&H>=65136?A:b}n.L=i,n.R=u,n.EN=f,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="·",n.doBidiReorder=function(F,H,z){if(F.length<2)return{};var W=F.split(""),U=new Array(W.length),K=new Array(W.length),Y=[];h=z?s:a,I(W,Y,W.length,H);for(var G=0;G<U.length;U[G]=G,G++);N(2,Y,U),N(1,Y,U);for(var G=0;G<U.length-1;G++)H[G]===y?Y[G]=n.AN:Y[G]===u&&(H[G]>A&&H[G]<D||H[G]===b||H[G]===_)?Y[G]=n.ON_R:G>0&&W[G-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(W[G])&&(Y[G-1]=Y[G]=n.R_H,G++);W[W.length-1]===n.DOT&&(Y[W.length-1]=n.B),W[0]==="‫"&&(Y[0]=n.RLE);for(var G=0;G<U.length;G++)K[G]=Y[U[G]];return{logicalFromVisual:U,bidiLevels:K}},n.hasBidiCharacters=function(F,H){for(var z=!1,W=0;W<F.length;W++)H[W]=B(F.charAt(W)),!z&&(H[W]==u||H[W]==A||H[W]==y)&&(z=!0);return z},n.getVisualFromLogicalIdx=function(F,H){for(var z=0;z<H.logicalFromVisual.length;z++)if(H.logicalFromVisual[z]==F)return z;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,n,p){var h=t("./lib/bidiutil"),g=t("./lib/lang"),m=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,c=(function(){function d(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=h,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=m.test(r.getValue())}return d.prototype.isBidiRow=function(r,o,a){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(o,a),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},d.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&m.test(r.lines.join(`
1342
- `))&&(this.seenBidi=!0,this.currentRow=null)},d.prototype.getDocumentRow=function(){var r=0,o=this.session.$screenRowCache;if(o.length){var a=this.session.$getRowCacheIndex(o,this.currentRow);a>=0&&(r=this.session.$docRowCache[a])}return r},d.prototype.getSplitIndex=function(){var r=0,o=this.session.$screenRowCache;if(o.length)for(var a,s=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-r>0&&(a=this.session.$getRowCacheIndex(o,this.currentRow-r-1),a===s);)s=a,r++;else r=this.currentRow;return r},d.prototype.updateRowLine=function(r,o){r===void 0&&(r=this.getDocumentRow());var a=r===this.session.getLength()-1,s=a?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[r];i&&(o===void 0&&(o=this.getSplitIndex()),o>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[h.L],this.line=o<i.length?this.line.substring(i[o-1],i[o]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[o]),o==i.length&&(this.line+=this.showInvisibles?s:h.DOT))}else this.line+=this.showInvisibles?s:h.DOT;var u=this.session,f=0,y;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(b,E){return b===" "||u.isFullWidth(b.charCodeAt(0))?(y=b===" "?u.getScreenTabSize(E+f):2,f+=y-1,g.stringRepeat(h.DOT,y)):b}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==h.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},d.prototype.updateBidiMap=function(){var r=[];h.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=h.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},d.prototype.markAsDirty=function(){this.currentRow=null},d.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var o=this.characterWidth=r.$characterSize.width,a=r.$measureCharWidth("ה");this.charWidths[h.L]=this.charWidths[h.EN]=this.charWidths[h.ON_R]=o,this.charWidths[h.R]=this.charWidths[h.AN]=a,this.charWidths[h.R_H]=a*.45,this.charWidths[h.B]=this.charWidths[h.RLE]=0,this.currentRow=null}},d.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},d.prototype.setEolChar=function(r){this.EOL=r},d.prototype.setContentWidth=function(r){this.contentWidth=r},d.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},d.prototype.setRtlDirection=function(r,o){for(var a=r.getCursorPosition(),s=r.selection.getSelectionAnchor().row;s<=a.row;s++)!o&&r.session.getLine(s).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(s,0,1):o&&r.session.getLine(s).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:s},r.session.$bidiHandler.RLE)},d.prototype.getPosLeft=function(r){r-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,a=r>o?this.session.getOverwrite()?r:r-1:o,s=h.getVisualFromLogicalIdx(a,this.bidiMap),i=this.bidiMap.bidiLevels,u=0;!this.session.getOverwrite()&&r<=o&&i[s]%2!==0&&s++;for(var f=0;f<s;f++)u+=this.charWidths[i[f]];return!this.session.getOverwrite()&&r>o&&i[s]%2===0&&(u+=this.charWidths[i[s]]),this.wrapIndent&&(u+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(u+=this.rtlLineOffset),u},d.prototype.getSelections=function(r,o){var a=this.bidiMap,s=a.bidiLevels,i,u=[],f=0,y=Math.min(r,o)-this.wrapIndent,b=Math.max(r,o)-this.wrapIndent,E=!1,$=!1,A=0;this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var S,M=0;M<s.length;M++)S=a.logicalFromVisual[M],i=s[M],E=S>=y&&S<b,E&&!$?A=f:!E&&$&&u.push({left:A,width:f-A}),f+=this.charWidths[i],$=E;if(E&&M===s.length&&u.push({left:A,width:f-A}),this.isRtlDir)for(var R=0;R<u.length;R++)u[R].left+=this.rtlLineOffset;return u},d.prototype.offsetToCol=function(a){this.isRtlDir&&(a-=this.rtlLineOffset);var o=0,a=Math.max(a,0),s=0,i=0,u=this.bidiMap.bidiLevels,f=this.charWidths[u[i]];for(this.wrapIndent&&(a-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);a>s+f/2;){if(s+=f,i===u.length-1){f=0;break}f=this.charWidths[u[++i]]}return i>0&&u[i-1]%2!==0&&u[i]%2===0?(a<s&&i--,o=this.bidiMap.logicalFromVisual[i]):i>0&&u[i-1]%2===0&&u[i]%2!==0?o=1+(a>s?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===u.length-1&&f===0&&u[i-1]%2===0||!this.isRtlDir&&i===0&&u[i]%2!==0?o=1+this.bidiMap.logicalFromVisual[i]:(i>0&&u[i-1]%2!==0&&f!==0&&i--,o=this.bidiMap.logicalFromVisual[i]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},d})();n.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,n,p){var h=t("./lib/oop"),g=t("./lib/lang"),m=t("./lib/event_emitter").EventEmitter,c=t("./range").Range,d=(function(){function r(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var a=this;this.cursor.on("change",function(s){a.$cursorChanged=!0,a.$silent||a._emit("changeCursor"),!a.$isEmpty&&!a.$silent&&a._emit("changeSelection"),!a.$keepDesiredColumnOnChange&&s.old.column!=s.value.column&&(a.$desiredColumn=null)}),this.anchor.on("change",function(){a.$anchorChanged=!0,!a.$isEmpty&&!a.$silent&&a._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(o,a){this.$isEmpty=!1,this.anchor.setPosition(o,a)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var o=this.anchor,a=this.lead;return o.row>a.row||o.row==a.row&&o.column>a.column},r.prototype.getRange=function(){var o=this.anchor,a=this.lead;return this.$isEmpty?c.fromPoints(a,a):this.isBackwards()?c.fromPoints(a,o):c.fromPoints(o,a)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(o,a){var s=a?o.end:o.start,i=a?o.start:o.end;this.$setSelection(s.row,s.column,i.row,i.column)},r.prototype.$setSelection=function(o,a,s,i){if(!this.$silent){var u=this.$isEmpty,f=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,a),this.cursor.setPosition(s,i),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||u!=this.$isEmpty||f)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(o){var a=this.lead;this.$isEmpty&&this.setSelectionAnchor(a.row,a.column),o.call(this)},r.prototype.selectTo=function(o,a){this.$moveSelection(function(){this.moveCursorTo(o,a)})},r.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},r.prototype.moveTo=function(o,a){this.clearSelection(),this.moveCursorTo(o,a)},r.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(o,a){if(typeof a>"u"){var s=o||this.lead;o=s.row,a=s.column}return this.session.getWordRange(o,a)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var o=this.getCursor(),a=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(a)},r.prototype.getLineRange=function(o,a){var s=typeof o=="number"?o:this.lead.row,i,u=this.session.getFoldLine(s);return u?(s=u.start.row,i=u.end.row):i=s,a===!0?new c(s,0,i,this.session.getLine(i).length):new c(s,0,i+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(o,a,s){var i=o.column,u=o.column+a;return s<0&&(i=o.column-a,u=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(i,u).split(" ").length-1==a},r.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),a;if(a=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var s=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,s,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-s):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),a;if(a=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var s=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,s,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,s):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var o=this.lead.row,a=this.lead.column,s=this.session.documentToScreenRow(o,a),i=this.session.screenToDocumentPosition(s,0),u=this.session.getDisplayLine(o,null,i.row,i.column),f=u.match(/^\s*/);f[0].length!=a&&!this.session.$useEmacsStyleLineStart&&(i.column+=f[0].length),this.moveCursorToPosition(i)},r.prototype.moveCursorLineEnd=function(){var o=this.lead,a=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==a.column){var s=this.session.getLine(a.row);if(a.column==s.length){var i=s.search(/\s+$/);i>0&&(a.column=i)}}this.moveCursorTo(a.row,a.column)},r.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,a=this.doc.getLine(o).length;this.moveCursorTo(o,a)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,a=this.lead.column,s=this.doc.getLine(o),i=s.substring(a);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var u=this.session.getFoldAt(o,a,1);if(u){this.moveCursorTo(u.end.row,u.end.column);return}if(this.session.nonTokenRe.exec(i)&&(a+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=s.substring(a)),a>=s.length){this.moveCursorTo(o,s.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(a+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,a)},r.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,a=this.lead.column,s;if(s=this.session.getFoldAt(o,a,-1)){this.moveCursorTo(s.start.row,s.start.column);return}var i=this.session.getFoldStringAt(o,a,-1);i==null&&(i=this.doc.getLine(o).substring(0,a));var u=g.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(u)&&(a-=this.session.nonTokenRe.lastIndex,u=u.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),a<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(u)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,a)},r.prototype.$shortWordEndIndex=function(o){var a=0,s,i=/\s/,u=this.session.tokenRe;if(u.lastIndex=0,this.session.tokenRe.exec(o))a=this.session.tokenRe.lastIndex;else{for(;(s=o[a])&&i.test(s);)a++;if(a<1){for(u.lastIndex=0;(s=o[a])&&!u.test(s);)if(u.lastIndex=0,a++,i.test(s))if(a>2){a--;break}else{for(;(s=o[a])&&i.test(s);)a++;if(a>2)break}}}return u.lastIndex=0,a},r.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,a=this.lead.column,s=this.doc.getLine(o),i=s.substring(a),u=this.session.getFoldAt(o,a,1);if(u)return this.moveCursorTo(u.end.row,u.end.column);if(a==s.length){var f=this.doc.getLength();do o++,i=this.doc.getLine(o);while(o<f&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),a=0}var y=this.$shortWordEndIndex(i);this.moveCursorTo(o,a+y)},r.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,a=this.lead.column,s;if(s=this.session.getFoldAt(o,a,-1))return this.moveCursorTo(s.start.row,s.start.column);var i=this.session.getLine(o).substring(0,a);if(a===0){do o--,i=this.doc.getLine(o);while(o>0&&/^\s*$/.test(i));a=i.length,/\s+$/.test(i)||(i="")}var u=g.stringReverse(i),f=this.$shortWordEndIndex(u);return this.moveCursorTo(o,a-f)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(o,a){var s=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(a===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(s.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(s.column),s.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=s.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?s.column=this.$desiredColumn:this.$desiredColumn=s.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var u=this.session.lineWidgets[this.lead.row];o<0?o-=u.rowsAbove||0:o>0&&(o+=u.rowCount-(u.rowsAbove||0))}var f=this.session.screenToDocumentPosition(s.row+o,s.column,i);o!==0&&a===0&&f.row===this.lead.row&&(f.column,this.lead.column),this.moveCursorTo(f.row,f.column+a,a===0)},r.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},r.prototype.moveCursorTo=function(o,a,s){var i=this.session.getFoldAt(o,a,1);i&&(o=i.start.row,a=i.start.column),this.$keepDesiredColumnOnChange=!0;var u=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(u.charAt(a))&&u.charAt(a-1)&&(this.lead.row==o&&this.lead.column==a+1?a=a-1:a=a+1),this.lead.setPosition(o,a),this.$keepDesiredColumnOnChange=!1,s||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(o,a,s){var i=this.session.screenToDocumentPosition(o,a);this.moveCursorTo(i.row,i.column,s)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(o){var a=this.getRange();return o?(o.start.column=a.start.column,o.start.row=a.start.row,o.end.column=a.end.column,o.end.row=a.end.row):o=a,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},r.prototype.getRangeOfMovements=function(o){var a=this.getCursor();try{o(this);var s=this.getCursor();return c.fromPoints(a,s)}catch{return c.fromPoints(a,a)}finally{this.moveCursorToPosition(a)}},r.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(a){var s=a.clone();return s.isBackwards=a.cursor==a.start,s});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},r.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var a=o.length;a--;){var s=c.fromPoints(o[a].start,o[a].end);o[a].isBackwards&&(s.cursor=s.start),this.addRange(s,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},r.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var a=this.ranges.length;a--;)if(!this.ranges[a].isEqual(o[a]))return!1;return!0},r})();d.prototype.setSelectionAnchor=d.prototype.setAnchor,d.prototype.getSelectionAnchor=d.prototype.getAnchor,d.prototype.setSelectionRange=d.prototype.setRange,h.implement(d.prototype,m),n.Selection=d}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,n,p){var h=t("./lib/report_error").reportError,g=2e3,m=(function(){function c(d){this.splitRegex,this.states=d,this.regExps={},this.matchMappings={};for(var r in this.states){for(var o=this.states[r],a=[],s=0,i=this.matchMappings[r]={defaultToken:"text"},u="g",f=[],y=0;y<o.length;y++){var b=o[y];if(b.defaultToken&&(i.defaultToken=b.defaultToken),b.caseInsensitive&&u.indexOf("i")===-1&&(u+="i"),b.unicode&&u.indexOf("u")===-1&&(u+="u"),b.regex!=null){b.regex instanceof RegExp&&(b.regex=b.regex.toString().slice(1,-1));var E=b.regex,$=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(b.token)?b.token.length==1||$==1?b.token=b.token[0]:$-1!=b.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:b,groupCount:$-1}),b.token=b.token[0]):(b.tokenArray=b.token,b.token=null,b.onMatch=this.$arrayTokens):typeof b.token=="function"&&!b.onMatch&&($>1?b.onMatch=this.$applyToken:b.onMatch=b.token),$>1&&(/\\\d/.test(b.regex)?E=b.regex.replace(/\\([0-9]+)/g,function(A,S){return"\\"+(parseInt(S,10)+s+1)}):($=1,E=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&f.push(b)),i[s]=y,s+=$,a.push(E),b.onMatch||(b.onMatch=null)}}a.length||(i[0]=0,a.push("$")),f.forEach(function(A){A.splitRegex=this.createSplitterRegexp(A.regex,u)},this),this.regExps[r]=new RegExp("("+a.join(")|(")+")|($)",u)}}return c.prototype.$setMaxTokenCount=function(d){g=d|0},c.prototype.$applyToken=function(d){var r=this.splitRegex.exec(d).slice(1),o=this.token.apply(this,r);if(typeof o=="string")return[{type:o,value:d}];for(var a=[],s=0,i=o.length;s<i;s++)r[s]&&(a[a.length]={type:o[s],value:r[s]});return a},c.prototype.$arrayTokens=function(d){if(!d)return[];var r=this.splitRegex.exec(d);if(!r)return"text";for(var o=[],a=this.tokenArray,s=0,i=a.length;s<i;s++)r[s+1]&&(o[o.length]={type:a[s],value:r[s+1]});return o},c.prototype.removeCapturingGroups=function(d){var r=d.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,a){return a?"(?:":o});return r},c.prototype.createSplitterRegexp=function(d,r){if(d.indexOf("(?=")!=-1){var o=0,a=!1,s={};d.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,u,f,y,b,E){return a?a=b!="]":b?a=!0:y?(o==s.stack&&(s.end=E+1,s.stack=-1),o--):f&&(o++,f.length!=1&&(s.stack=o,s.start=E)),i}),s.end!=null&&/^\)*$/.test(d.substr(s.end))&&(d=d.substring(0,s.start)+d.substr(s.end))}return d.charAt(0)!="^"&&(d="^"+d),d.charAt(d.length-1)!="$"&&(d+="$"),new RegExp(d,(r||"").replace("g",""))},c.prototype.getLineTokens=function(d,r){if(r&&typeof r!="string"){var o=r.slice(0);r=o[0],r==="#tmp"&&(o.shift(),r=o.shift())}else var o=[];var a=r||"start",s=this.states[a];s||(a="start",s=this.states[a]);var i=this.matchMappings[a],u=this.regExps[a];u.lastIndex=0;for(var f,y=[],b=0,E=0,$={type:null,value:""};f=u.exec(d);){var A=i.defaultToken,S=null,M=f[0],R=u.lastIndex;if(R-M.length>b){var L=d.substring(b,R-M.length);$.type==A?$.value+=L:($.type&&y.push($),$={type:A,value:L})}for(var T=0;T<f.length-2;T++)if(f[T+1]!==void 0){S=s[i[T]],S.onMatch?A=S.onMatch(M,a,o,d):A=S.token,S.next&&(typeof S.next=="string"?a=S.next:a=S.next(a,o),s=this.states[a],s||(this.reportError("state doesn't exist",a),a="start",s=this.states[a]),i=this.matchMappings[a],b=R,u=this.regExps[a],u.lastIndex=R),S.consumeLineEnd&&(b=R);break}if(M){if(typeof A=="string")(!S||S.merge!==!1)&&$.type===A?$.value+=M:($.type&&y.push($),$={type:A,value:M});else if(A){$.type&&y.push($),$={type:null,value:""};for(var T=0;T<A.length;T++)y.push(A[T])}}if(b==d.length)break;if(b=R,E++>g){for(E>2*d.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:d});b<d.length;)$.type&&y.push($),$={value:d.substring(b,b+=500),type:"overflow"};a="start",o=[];break}}return $.type&&y.push($),o.length>1&&o[0]!==a&&o.unshift("#tmp",a),{tokens:y,state:o.length?o:a}},c})();m.prototype.reportError=h,n.Tokenizer=m}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,n,p){var h=t("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(d,r){if(!r){for(var o in d)this.$rules[o]=d[o];return}for(var o in d){for(var a=d[o],s=0;s<a.length;s++){var i=a[s];(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(r)!==0&&(i.next=r+i.next),i.nextState&&i.nextState.indexOf(r)!==0&&(i.nextState=r+i.nextState))}this.$rules[r+o]=a}},this.getRules=function(){return this.$rules},this.embedRules=function(d,r,o,a,s){var i=typeof d=="function"?new d().getRules():d;if(a)for(var u=0;u<a.length;u++)a[u]=r+a[u];else{a=[];for(var f in i)a.push(r+f)}if(this.addRules(i,r),o)for(var y=Array.prototype[s?"push":"unshift"],u=0;u<a.length;u++)y.apply(this.$rules[a[u]],h(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var m=function(d,r){return(d!="start"||r.length)&&r.unshift(this.nextState,d),this.nextState},c=function(d,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var d=0,r=this.$rules;function o(a){var s=r[a];s.processed=!0;for(var i=0;i<s.length;i++){var u=s[i],f=null;Array.isArray(u)&&(f=u,u={}),!u.regex&&u.start&&(u.regex=u.start,u.next||(u.next=[]),u.next.push({defaultToken:u.token},{token:u.token+".end",regex:u.end||u.start,next:"pop"}),u.token=u.token+".start",u.push=!0);var y=u.next||u.push;if(y&&Array.isArray(y)){var b=u.stateName;b||(b=u.token,typeof b!="string"&&(b=b[0]||""),r[b]&&(b+=d++)),r[b]=y,u.next=b,o(b)}else y=="pop"&&(u.next=c);if(u.push&&(u.nextState=u.next||u.push,u.next=m,delete u.push),u.rules)for(var E in u.rules)r[E]?r[E].push&&r[E].push.apply(r[E],u.rules[E]):r[E]=u.rules[E];var $=typeof u=="string"?u:u.include;if($&&($==="$self"&&($="start"),Array.isArray($)?f=$.map(function(S){return r[S]}):f=r[$]),f){var A=[i,1].concat(f);u.noEscape&&(A=A.filter(function(S){return!S.next})),s.splice.apply(s,A),i--}u.keywordMap&&(u.token=this.createKeywordMapper(u.keywordMap,u.defaultToken||"text",u.caseInsensitive),delete u.defaultToken)}}Object.keys(r).forEach(o,this)},this.createKeywordMapper=function(d,r,o,a){var s=Object.create(null);return this.$keywordList=[],Object.keys(d).forEach(function(i){for(var u=d[i],f=u.split(a||"|"),y=f.length;y--;){var b=f[y];this.$keywordList.push(b),o&&(b=b.toLowerCase()),s[b]=i}},this),d=null,o?function(i){return s[i.toLowerCase()]||r}:function(i){return s[i]||r}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),n.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(t,n,p){var h;h=function(){this.$behaviours={}},(function(){this.add=function(g,m,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][m]=c},this.addBehaviours=function(g){for(var m in g)for(var c in g[m])this.add(m,c,g[m][c])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,m){if(typeof g=="function")var c=new g().getBehaviours(m);else var c=g.getBehaviours(m);this.addBehaviours(c)},this.getBehaviours=function(g){if(g){for(var m={},c=0;c<g.length;c++)this.$behaviours[g[c]]&&(m[g[c]]=this.$behaviours[g[c]]);return m}else return this.$behaviours}}).call(h.prototype),n.Behaviour=h}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(t,n,p){var h=t("./range").Range,g=(function(){function m(c,d,r){this.$session=c,this.$row=d,this.$rowTokens=c.getTokens(d);var o=c.getTokenAt(d,r);this.$tokenIndex=o?o.index:-1}return m.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},m.prototype.stepForward=function(){this.$tokenIndex+=1;for(var c;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,c||(c=this.$session.getLength()),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},m.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},m.prototype.getCurrentTokenRow=function(){return this.$row},m.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,d=this.$tokenIndex,r=c[d].start;if(r!==void 0)return r;for(r=0;d>0;)d-=1,r+=c[d].value.length;return r},m.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},m.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],d=this.getCurrentTokenColumn();return new h(this.$row,d,this.$row,d+c.value.length)},m})();n.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,n,p){var h=t("../../lib/oop"),g=t("../behaviour").Behaviour,m=t("../../token_iterator").TokenIterator,c=t("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,a={},s={'"':'"',"'":"'"},i=function(y){var b=-1;if(y.multiSelect&&(b=y.selection.index,a.rangeCount!=y.multiSelect.rangeCount&&(a={rangeCount:y.multiSelect.rangeCount})),a[b])return o=a[b];o=a[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(y,b,E,$){var A=y.end.row-y.start.row;return{text:E+b+$,selection:[0,y.start.column+1,A,y.end.column+(A?0:1)]}},f;f=function(y){y=y||{},this.add("braces","insertion",function(b,E,$,A,S){var M=$.getCursorPosition(),R=A.doc.getLine(M.row);if(S=="{"){i($);var L=$.getSelectionRange(),T=A.doc.getTextRange(L),D=A.getTokenAt(M.row,M.column);if(T!==""&&T!=="{"&&$.getWrapBehavioursEnabled())return u(L,T,"{","}");if(D&&/(?:string)\.quasi|\.xml/.test(D.type)){var w=[/tag\-(?:open|name)/,/attribute\-name/];return w.some(function(I){return I.test(D.type)})||/(string)\.quasi/.test(D.type)&&D.value[M.column-D.start-1]!=="$"?void 0:(f.recordAutoInsert($,A,"}"),{text:"{}",selection:[1,1]})}else if(f.isSaneInsertion($,A))return/[\]\}\)]/.test(R[M.column])||$.inMultiSelectMode||y.braces?(f.recordAutoInsert($,A,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert($,A,"{"),{text:"{",selection:[1,1]})}else if(S=="}"){i($);var v=R.substring(M.column,M.column+1);if(v=="}"){var C=A.$findOpeningBracket("}",{column:M.column+1,row:M.row});if(C!==null&&f.isAutoInsertedClosing(M,R,S))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(S==`
1331
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,n,m){"use strict";n.isDark=!1,n.cssClass="ace-tm",n.cssText=t("./textmate-css"),n.$id="ace/theme/textmate",t("../lib/dom").importCssString(n.cssText,n.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(t,n,m){"no use strict";var f=t("./lib/lang"),g=t("./lib/net"),c=t("./lib/dom"),o=t("./lib/app_config").AppConfig;m.exports=n=new o;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};n.get=function(s){if(!h.hasOwnProperty(s))throw new Error("Unknown config key: "+s);return h[s]},n.set=function(s,r){if(h.hasOwnProperty(s))h[s]=r;else if(this.setDefaultValue("",s,r)==!1)throw new Error("Unknown config key: "+s);s=="useStrictCSP"&&c.useStrictCSP(r)},n.all=function(){return f.copyObject(h)},n.$modes={},n.moduleUrl=function(s,r){if(h.$moduleUrls[s])return h.$moduleUrls[s];var a=s.split("/");r=r||a[a.length-2]||"";var p=r=="snippets"?"/":"-",v=a[a.length-1];if(r=="worker"&&p=="-"){var y=new RegExp("^"+r+"[\\-_]|[\\-_]"+r+"$","g");v=v.replace(y,"")}(!v||v==r)&&a.length>1&&(v=a[a.length-2]);var k=h[r+"Path"];return k==null?k=h.basePath:p=="/"&&(r=p=""),k&&k.slice(-1)!="/"&&(k+="/"),k+r+p+v+this.get("suffix")},n.setModuleUrl=function(s,r){return h.$moduleUrls[s]=r};var u=function(s,r){if(s==="ace/theme/textmate"||s==="./theme/textmate")return r(null,t("./theme/textmate"));if(d)return d(s,r);console.error("loader is not configured")},d;n.setLoader=function(s){d=s},n.dynamicModules=Object.create(null),n.$loading={},n.$loaded={},n.loadModule=function(s,r){var a;if(Array.isArray(s))var p=s[0],v=s[1];else if(typeof s=="string")var v=s;var y=function(k){if(k&&!n.$loading[v])return r&&r(k);if(n.$loading[v]||(n.$loading[v]=[]),n.$loading[v].push(r),!(n.$loading[v].length>1)){var x=function(){u(v,function(w,S){S&&(n.$loaded[v]=S),n._emit("load.module",{name:v,module:S});var M=n.$loading[v];n.$loading[v]=null,M.forEach(function(L){L&&L(S)})})};if(!n.get("packaged"))return x();g.loadScript(n.moduleUrl(v,p),x),l()}};if(n.dynamicModules[v])n.dynamicModules[v]().then(function(k){k.default?y(k.default):y(k)});else{try{a=this.$require(v)}catch{}y(a||n.$loaded[v])}},n.$require=function(s){if(typeof m.require=="function")return m.require(s)},n.setModuleLoader=function(s,r){n.dynamicModules[s]=r};var l=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),l=function(){})};n.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,n,m){"use strict";t("./lib/fixoldbrowsers");var f=t("./config");f.setLoader(function(h,u){t([h],function(d){u(null,d)})});var g=(function(){return this||typeof window<"u"&&window})();m.exports=function(h){f.init=c,f.$require=t,h.require=t,typeof define=="function"&&(h.define=define)},c(!0);function c(h){if(!(!g||!g.document)){f.set("packaged",h||t.packaged||m.packaged||g.define&&define.packaged);var u={},d="",l=document.currentScript||document._currentScript,s=l&&l.ownerDocument||document;l&&l.src&&(d=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var r=s.getElementsByTagName("script"),a=0;a<r.length;a++){var p=r[a],v=p.src||p.getAttribute("src");if(v){for(var y=p.attributes,k=0,x=y.length;k<x;k++){var w=y[k];w.name.indexOf("data-ace-")===0&&(u[o(w.name.replace(/^data-ace-/,""))]=w.value)}var S=v.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);S&&(d=S[1])}}d&&(u.base=u.base||d,u.packaged=!0),u.basePath=u.base,u.workerPath=u.workerPath||u.base,u.modePath=u.modePath||u.base,u.themePath=u.themePath||u.base,delete u.base;for(var M in u)typeof u[M]<"u"&&f.set(M,u[M])}}function o(h){return h.replace(/-(.)/g,function(u,d){return d.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(t,n,m){"use strict";var f=(function(){function g(c,o,h,u){this.start={row:c,column:o},this.end={row:h,column:u}}return g.prototype.isEqual=function(c){return this.start.row===c.start.row&&this.end.row===c.end.row&&this.start.column===c.start.column&&this.end.column===c.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(c,o){return this.compare(c,o)==0},g.prototype.compareRange=function(c){var o,h=c.end,u=c.start;return o=this.compare(h.row,h.column),o==1?(o=this.compare(u.row,u.column),o==1?2:o==0?1:0):o==-1?-2:(o=this.compare(u.row,u.column),o==-1?-1:o==1?42:0)},g.prototype.comparePoint=function(c){return this.compare(c.row,c.column)},g.prototype.containsRange=function(c){return this.comparePoint(c.start)==0&&this.comparePoint(c.end)==0},g.prototype.intersects=function(c){var o=this.compareRange(c);return o==-1||o==0||o==1},g.prototype.isEnd=function(c,o){return this.end.row==c&&this.end.column==o},g.prototype.isStart=function(c,o){return this.start.row==c&&this.start.column==o},g.prototype.setStart=function(c,o){typeof c=="object"?(this.start.column=c.column,this.start.row=c.row):(this.start.row=c,this.start.column=o)},g.prototype.setEnd=function(c,o){typeof c=="object"?(this.end.column=c.column,this.end.row=c.row):(this.end.row=c,this.end.column=o)},g.prototype.inside=function(c,o){return this.compare(c,o)==0?!(this.isEnd(c,o)||this.isStart(c,o)):!1},g.prototype.insideStart=function(c,o){return this.compare(c,o)==0?!this.isEnd(c,o):!1},g.prototype.insideEnd=function(c,o){return this.compare(c,o)==0?!this.isStart(c,o):!1},g.prototype.compare=function(c,o){return!this.isMultiLine()&&c===this.start.row?o<this.start.column?-1:o>this.end.column?1:0:c<this.start.row?-1:c>this.end.row?1:this.start.row===c?o>=this.start.column?0:-1:this.end.row===c?o<=this.end.column?0:1:0},g.prototype.compareStart=function(c,o){return this.start.row==c&&this.start.column==o?-1:this.compare(c,o)},g.prototype.compareEnd=function(c,o){return this.end.row==c&&this.end.column==o?1:this.compare(c,o)},g.prototype.compareInside=function(c,o){return this.end.row==c&&this.end.column==o?1:this.start.row==c&&this.start.column==o?-1:this.compare(c,o)},g.prototype.clipRows=function(c,o){if(this.end.row>o)var h={row:o+1,column:0};else if(this.end.row<c)var h={row:c,column:0};if(this.start.row>o)var u={row:o+1,column:0};else if(this.start.row<c)var u={row:c,column:0};return g.fromPoints(u||this.start,h||this.end)},g.prototype.extend=function(c,o){var h=this.compare(c,o);if(h==0)return this;if(h==-1)var u={row:c,column:o};else var d={row:c,column:o};return g.fromPoints(u||this.start,d||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(c){var o=c.documentToScreenPosition(this.start),h=c.documentToScreenPosition(this.end);return new g(o.row,o.column,h.row,h.column)},g.prototype.moveBy=function(c,o){this.start.row+=c,this.start.column+=o,this.end.row+=c,this.end.column+=o},g})();f.fromPoints=function(g,c){return new f(g.row,g.column,c.row,c.column)},f.comparePoints=function(g,c){return g.row-c.row||g.column-c.column},n.Range=f}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,n,m){"use strict";for(var f=t("./oop"),g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},c={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},o=0;o<10;o++)c["Digit"+o]=48+o,c["Numpad"+o]=96+o,g.PRINTABLE_KEYS[48+o]=""+o,g.FUNCTION_KEYS[96+o]="Numpad"+o;for(var o=65;o<91;o++){var h=String.fromCharCode(o+32);c["Key"+h.toUpperCase()]=o,g.PRINTABLE_KEYS[o]=h}for(var o=1;o<13;o++)c["F"+o]=111+o,g.FUNCTION_KEYS[111+o]="F"+o;var u={Shift:16,Control:17,Alt:18,Meta:224};for(var d in u)c[d]=c[d+"Left"]=c[d+"Right"]=u[d];n.$codeToKeyCode=c,g.PRINTABLE_KEYS[173]="-";for(var l in g.FUNCTION_KEYS){var s=g.FUNCTION_KEYS[l].toLowerCase();g[s]=parseInt(l,10)}for(var l in g.PRINTABLE_KEYS){var s=g.PRINTABLE_KEYS[l].toLowerCase();g[s]=parseInt(l,10)}f.mixin(g,g.MODIFIER_KEYS),f.mixin(g,g.PRINTABLE_KEYS),f.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var r=["cmd","ctrl","alt","shift"],a=Math.pow(2,r.length);a--;)g.KEY_MODS[a]=r.filter(function(p){return a&g.KEY_MODS[p]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",f.mixin(n,g),n.default=n,n.keyCodeToString=function(r){var a=g[r];return typeof a!="string"&&(a=String.fromCharCode(r)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,n,m){"use strict";var f=t("./keys"),g=t("./useragent"),c=null,o=0,h;function u(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return h={passive:!1},!0}})}catch{}}function d(){return h==null&&u(),h}function l(k,x,w){this.elem=k,this.type=x,this.callback=w}l.prototype.destroy=function(){r(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var s=n.addListener=function(k,x,w,S){k.addEventListener(x,w,d()),S&&S.$toDestroy.push(new l(k,x,w))},r=n.removeListener=function(k,x,w){k.removeEventListener(x,w,d())};n.stopEvent=function(k){return n.stopPropagation(k),n.preventDefault(k),!1},n.stopPropagation=function(k){k.stopPropagation&&k.stopPropagation()},n.preventDefault=function(k){k.preventDefault&&k.preventDefault()},n.getButton=function(k){return k.type=="dblclick"?0:k.type=="contextmenu"||g.isMac&&k.ctrlKey&&!k.altKey&&!k.shiftKey?2:k.button},n.capture=function(k,x,w){var S=k&&k.ownerDocument||document;function M(L){x&&x(L),w&&w(L),r(S,"mousemove",x),r(S,"mouseup",M),r(S,"dragstart",M)}return s(S,"mousemove",x),s(S,"mouseup",M),s(S,"dragstart",M),M},n.addMouseWheelListener=function(k,x,w){s(k,"wheel",function(S){var M=.15,L=S.deltaX||0,R=S.deltaY||0;switch(S.deltaMode){case S.DOM_DELTA_PIXEL:S.wheelX=L*M,S.wheelY=R*M;break;case S.DOM_DELTA_LINE:var $=15;S.wheelX=L*$,S.wheelY=R*$;break;case S.DOM_DELTA_PAGE:var D=150;S.wheelX=L*D,S.wheelY=R*D;break}x(S)},w)},n.addMultiMouseDownListener=function(k,x,w,S,M){var L=0,R,$,D,T={2:"dblclick",3:"tripleclick",4:"quadclick"};function E(C){if(n.getButton(C)!==0?L=0:C.detail>1?(L++,L>4&&(L=1)):L=1,g.isIE){var b=Math.abs(C.clientX-R)>5||Math.abs(C.clientY-$)>5;(!D||b)&&(L=1),D&&clearTimeout(D),D=setTimeout(function(){D=null},x[L-1]||600),L==1&&(R=C.clientX,$=C.clientY)}if(C._clicks=L,w[S]("mousedown",C),L>4)L=0;else if(L>1)return w[S](T[L],C)}Array.isArray(k)||(k=[k]),k.forEach(function(C){s(C,"mousedown",E,M)})};function a(k){return 0|(k.ctrlKey?1:0)|(k.altKey?2:0)|(k.shiftKey?4:0)|(k.metaKey?8:0)}n.getModifierString=function(k){return f.KEY_MODS[a(k)]};function p(k,x,w){var S=a(x);if(!w&&x.code&&(w=f.$codeToKeyCode[x.code]||w),!g.isMac&&c){if(x.getModifierState&&(x.getModifierState("OS")||x.getModifierState("Win"))&&(S|=8),c.altGr)if((3&S)!=3)c.altGr=0;else return;if(w===18||w===17){var M=x.location;w===17&&M===1?c[w]==1&&(o=x.timeStamp):w===18&&S===3&&M===2&&x.timeStamp-o<50&&(c.altGr=!0)}}if(w in f.MODIFIER_KEYS&&(w=-1),!(!S&&w===13&&x.location===3&&(k(x,S,-w),x.defaultPrevented))){if(g.isChromeOS&&S&8){if(k(x,S,w),x.defaultPrevented)return;S&=-9}return!S&&!(w in f.FUNCTION_KEYS)&&!(w in f.PRINTABLE_KEYS)?!1:k(x,S,w)}}n.addCommandKeyListener=function(k,x,w){var S=null;s(k,"keydown",function(M){c[M.keyCode]=(c[M.keyCode]||0)+1;var L=p(x,M,M.keyCode);return S=M.defaultPrevented,L},w),s(k,"keypress",function(M){S&&(M.ctrlKey||M.altKey||M.shiftKey||M.metaKey)&&(n.stopEvent(M),S=null)},w),s(k,"keyup",function(M){c[M.keyCode]=null},w),c||(v(),s(window,"focus",v))};function v(){c=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var y=1;n.nextTick=function(k,x){x=x||window;var w="zero-timeout-message-"+y++,S=function(M){M.data==w&&(n.stopPropagation(M),r(x,"message",S),k())};s(x,"message",S),x.postMessage(w,"*")}}n.$idleBlocked=!1,n.onIdle=function(k,x){return setTimeout(function w(){n.$idleBlocked?setTimeout(w,100):k()},x)},n.$idleBlockId=null,n.blockIdle=function(k){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},k||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(k){setTimeout(k,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(t,n,m){"use strict";var f;m.exports={lineMode:!1,pasteCancelled:function(){return f&&f>Date.now()-50?!0:f=!1},cancel:function(){f=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,n,m){"use strict";var f=t("../lib/event"),g=t("../config").nls,c=t("../lib/useragent"),o=t("../lib/dom"),h=t("../lib/lang"),u=t("../clipboard"),d=c.isChrome<18,l=c.isIE,s=c.isChrome>63,r=400,a=t("../lib/keys"),p=a.KEY_MODS,v=c.isIOS,y=v?/\s/:/\n/,k=c.isMobile;n.TextInput=(function(){function x(w,S){var M=this;this.host=S,this.text=o.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",w.insertBefore(this.text,w.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",k||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),f.addListener(this.text,"blur",function(L){M.ignoreFocusEvents||(S.onBlur(L),M.$isFocused=!1)},S),f.addListener(this.text,"focus",function(L){if(!M.ignoreFocusEvents){if(M.$isFocused=!0,c.isEdge)try{if(!document.hasFocus())return}catch{}S.onFocus(L),c.isEdge?setTimeout(M.resetSelection.bind(M)):M.resetSelection()}},S),this.$focusScroll=!1,S.on("beforeEndOperation",function(){var L=S.curOp,R=L&&L.command&&L.command.name;if(R!="insertstring"){var $=R&&(L.docChanged||L.selectionChanged);M.inComposition&&$&&(M.lastValue=M.text.value="",M.onCompositionEnd()),M.resetSelection()}}),S.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=v?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&S.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,f.addCommandKeyListener(this.text,function(L,R,$){if(!M.inComposition)return S.onCommandKey(L,R,$)},S),f.addListener(this.text,"select",this.onSelect.bind(this),S),f.addListener(this.text,"input",this.onInput.bind(this),S),f.addListener(this.text,"cut",this.onCut.bind(this),S),f.addListener(this.text,"copy",this.onCopy.bind(this),S),f.addListener(this.text,"paste",this.onPaste.bind(this),S),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&f.addListener(w,"keydown",function(L){if(!(c.isMac&&!L.metaKey||!L.ctrlKey))switch(L.keyCode){case 67:M.onCopy(L);break;case 86:M.onPaste(L);break;case 88:M.onCut(L);break}},S),this.syncComposition=h.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),f.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),S),f.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),S),f.addListener(this.text,"keyup",this.onKeyup.bind(this),S),f.addListener(this.text,"keydown",this.syncComposition.bind(this),S),f.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),S),this.closeTimeout,f.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),S),f.addListener(this.text,"mousedown",function(L){L.preventDefault(),M.onContextMenuClose()},S),f.addListener(S.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),S),f.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),S),v&&this.addIosSelectionHandler(w,S,this.text)}return x.prototype.addIosSelectionHandler=function(w,S,M){var L=this,R=null,$=!1;M.addEventListener("keydown",function(T){R&&clearTimeout(R),$=!0},!0),M.addEventListener("keyup",function(T){R=setTimeout(function(){$=!1},100)},!0);var D=function(T){if(document.activeElement===M&&!($||L.inComposition||S.$mouseHandler.isMousePressed)&&!L.copied){var E=M.selectionStart,C=M.selectionEnd,b=null,A=0;if(E==0?b=a.up:E==1?b=a.home:C>L.lastSelectionEnd&&L.lastValue[C]==`
1332
+ `?b=a.end:E<L.lastSelectionStart&&L.lastValue[E-1]==" "?(b=a.left,A=p.option):E<L.lastSelectionStart||E==L.lastSelectionStart&&L.lastSelectionEnd!=L.lastSelectionStart&&E==C?b=a.left:C>L.lastSelectionEnd&&L.lastValue.slice(0,C).split(`
1333
+ `).length>2?b=a.down:C>L.lastSelectionEnd&&L.lastValue[C-1]==" "?(b=a.right,A=p.option):(C>L.lastSelectionEnd||C==L.lastSelectionEnd&&L.lastSelectionEnd!=L.lastSelectionStart&&E==C)&&(b=a.right),E!==C&&(A|=p.shift),b){if(!S.onCommandKey({},A,b)&&S.commands){b=a.keyCodeToString(b);var _=S.commands.findKeyCommand(A,b);_&&S.execCommand(_)}L.lastSelectionStart=E,L.lastSelectionEnd=C,L.resetSelection("")}}};document.addEventListener("selectionchange",D),S.on("destroy",function(){document.removeEventListener("selectionchange",D)})},x.prototype.onContextMenuClose=function(){var w=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){w.tempStyle&&(w.text.style.cssText=w.tempStyle,w.tempStyle=""),w.host.renderer.$isMousePressed=!1,w.host.renderer.$keepTextAreaAtCursor&&w.host.renderer.$moveTextAreaToCursor()},0)},x.prototype.$onContextMenu=function(w){this.host.textInput.onContextMenu(w),this.onContextMenuClose()},x.prototype.onKeyup=function(w){w.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},x.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},x.prototype.onCompositionStart=function(w){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){w.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var S=this.host.getSelectionRange();S.end.row=S.start.row,S.end.column=S.start.column,this.inComposition.markerRange=S,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},x.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var w=this.text.value;this.sendText(w),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},x.prototype.onCompositionEnd=function(w){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),w&&this.onInput())},x.prototype.onCut=function(w){this.doCopy(w,!0)},x.prototype.onCopy=function(w){this.doCopy(w,!1)},x.prototype.onPaste=function(w){var S=this.handleClipboardData(w);u.pasteCancelled()||(typeof S=="string"?(S&&this.host.onPaste(S,w),c.isIE&&setTimeout(this.resetSelection),f.preventDefault(w)):(this.text.value="",this.pasted=!0))},x.prototype.doCopy=function(w,S){var M=this,L=this.host.getCopyText();if(!L)return f.preventDefault(w);this.handleClipboardData(w,L)?(v&&(this.resetSelection(L),this.copied=L,setTimeout(function(){M.copied=!1},10)),S?this.host.onCut():this.host.onCopy(),f.preventDefault(w)):(this.copied=!0,this.text.value=L,this.text.select(),setTimeout(function(){M.copied=!1,M.resetSelection(),S?M.host.onCut():M.host.onCopy()}))},x.prototype.handleClipboardData=function(w,S,M){var L=w.clipboardData||window.clipboardData;if(!(!L||d)){var R=l||M?"Text":"text/plain";try{return S?L.setData(R,S)!==!1:L.getData(R)}catch($){if(!M)return this.handleClipboardData($,S,!0)}}},x.prototype.onInput=function(w){if(this.inComposition)return this.onCompositionUpdate();if(w&&w.inputType){if(w.inputType=="historyUndo")return this.host.execCommand("undo");if(w.inputType=="historyRedo")return this.host.execCommand("redo")}var S=this.text.value,M=this.sendText(S,!0);(S.length>r+100||y.test(M)||k&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},x.prototype.sendText=function(w,S){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),w&&this.host.onPaste(w),this.pasted=!1,"";for(var M=this.text.selectionStart,L=this.text.selectionEnd,R=this.lastSelectionStart,$=this.lastValue.length-this.lastSelectionEnd,D=w,T=w.length-M,E=w.length-L,C=0;R>0&&this.lastValue[C]==w[C];)C++,R--;for(D=D.slice(C),C=1;$>0&&this.lastValue.length-C>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-C]==w[w.length-C];)C++,$--;T-=C-1,E-=C-1;var b=D.length-C+1;if(b<0&&(R=-b,b=0),D=D.slice(0,b),!S&&!D&&!T&&!R&&!$&&!E)return"";this.sendingText=!0;var A=!1;return c.isAndroid&&D==". "&&(D=" ",A=!0),D&&!R&&!$&&!T&&!E||this.commandMode?this.host.onTextInput(D):this.host.onTextInput(D,{extendLeft:R,extendRight:$,restoreStart:T,restoreEnd:E}),this.sendingText=!1,this.lastValue=w,this.lastSelectionStart=M,this.lastSelectionEnd=L,this.lastRestoreEnd=E,A?`
1334
+ `:D},x.prototype.onSelect=function(w){var S=this;if(!this.inComposition){var M=function(L){return L.selectionStart===0&&L.selectionEnd>=S.lastValue.length&&L.value===S.lastValue&&S.lastValue&&L.selectionEnd!==S.lastSelectionEnd};this.copied?this.copied=!1:M(this.text)?(this.host.selectAll(),this.resetSelection()):k&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},x.prototype.$resetSelectionIOS=function(w){if(!(!this.$isFocused||this.copied&&!w||this.sendingText)){w||(w="");var S=`
1335
+ ab`+w+`cde fg
1336
+ `;S!=this.text.value&&(this.text.value=this.lastValue=S);var M=4,L=4+(w.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=M||this.lastSelectionEnd!=L)&&this.text.setSelectionRange(M,L),this.lastSelectionStart=M,this.lastSelectionEnd=L}},x.prototype.$resetSelection=function(){var w=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var S=0,M=0,L="",R=function(O,I){for(var N=I,F=1;F<=O-w.rowStart&&F<2*w.numberOfExtraLines+1;F++)N+=w.host.session.getLine(O-F).length+1;return N};if(this.host.session){var $=this.host.selection,D=$.getRange(),T=$.cursor.row;T===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):T===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(T<this.rowStart-1||T>this.rowEnd+1)&&(this.rowStart=T>this.numberOfExtraLines?T-this.numberOfExtraLines:0,this.rowEnd=T>this.numberOfExtraLines?T+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var E=[],C=this.rowStart;C<=this.rowEnd;C++)E.push(this.host.session.getLine(C));if(L=E.join(`
1337
+ `),S=R(D.start.row,D.start.column),M=R(D.end.row,D.end.column),D.start.row<this.rowStart){var b=this.host.session.getLine(this.rowStart-1);S=D.start.row<this.rowStart-1?0:S,M+=b.length+1,L=b+`
1338
+ `+L}else if(D.end.row>this.rowEnd){var A=this.host.session.getLine(this.rowEnd+1);M=D.end.row>this.rowEnd+1?A.length:D.end.column,M+=L.length+1,L=L+`
1339
+ `+A}else k&&T>0&&(L=`
1340
+ `+L,M+=1,S+=1);L.length>r&&(S<r&&M<r?L=L.slice(0,r):(L=`
1341
+ `,S==M?S=M=0:(S=0,M=1)));var _=L+`
1342
+
1343
+ `;_!=this.lastValue&&(this.text.value=this.lastValue=_,this.lastSelectionStart=this.lastSelectionEnd=_.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=M||this.lastSelectionStart!=S||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(S,M),this.lastSelectionStart=S,this.lastSelectionEnd=M}catch{}this.inComposition=!1}},x.prototype.setHost=function(w){this.host=w},x.prototype.setNumberOfExtraLines=function(w){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,w<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=w},x.prototype.setAriaLabel=function(){var w="";if(this.host.$textInputAriaLabel&&(w+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var S=this.host.session.selection.cursor.row;w+=g("text-input.aria-label","Cursor at row $0",[S+1])}this.text.setAttribute("aria-label",w)},x.prototype.setAriaOptions=function(w){w.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",w.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",w.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),w.role&&this.text.setAttribute("role",w.role),w.setLabel&&(this.text.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},x.prototype.focus=function(){var w=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||s||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var S=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var M=this.text.getBoundingClientRect().top!=0}catch{return}var L=[];if(M)for(var R=this.text.parentElement;R&&R.nodeType==1;)L.push(R),R.setAttribute("ace_nocontext","true"),!R.parentElement&&R.getRootNode?R=R.getRootNode().host:R=R.parentElement;this.text.focus({preventScroll:!0}),M&&L.forEach(function($){$.removeAttribute("ace_nocontext")}),setTimeout(function(){w.text.style.position="",w.text.style.top=="0px"&&(w.text.style.top=S)},0)},x.prototype.blur=function(){this.text.blur()},x.prototype.isFocused=function(){return this.$isFocused},x.prototype.setInputHandler=function(w){this.inputHandler=w},x.prototype.getInputHandler=function(){return this.inputHandler},x.prototype.getElement=function(){return this.text},x.prototype.setCommandMode=function(w){this.commandMode=w,this.text.readOnly=!1},x.prototype.setReadOnly=function(w){this.commandMode||(this.text.readOnly=w)},x.prototype.setCopyWithEmptySelection=function(w){},x.prototype.onContextMenu=function(w){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:w}),this.moveToMouse(w,!0)},x.prototype.moveToMouse=function(w,S){var M=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(S?"z-index:100000;":"")+(c.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var L=this.host.container.getBoundingClientRect(),R=o.computedStyle(this.host.container),$=L.top+(parseInt(R.borderTopWidth)||0),D=L.left+(parseInt(R.borderLeftWidth)||0),T=L.bottom-$-this.text.clientHeight-2,E=function(C){o.translate(M.text,C.clientX-D-2,Math.min(C.clientY-$-2,T))};E(w),w.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),c.isWin&&f.capture(this.host.container,E,this.onContextMenuClose.bind(this)))},x.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},x})(),n.$setUserAgentForTests=function(x,w){k=x,v=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,n,m){"use strict";var f=t("../lib/useragent"),g=0,c=550,o=(function(){function d(l){l.$clickSelection=null;var s=l.editor;s.setDefaultHandler("mousedown",this.onMouseDown.bind(l)),s.setDefaultHandler("dblclick",this.onDoubleClick.bind(l)),s.setDefaultHandler("tripleclick",this.onTripleClick.bind(l)),s.setDefaultHandler("quadclick",this.onQuadClick.bind(l)),s.setDefaultHandler("mousewheel",this.onMouseWheel.bind(l)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(r){l[r]=this[r]},this),l.selectByLines=this.extendSelectionBy.bind(l,"getLineRange"),l.selectByWords=this.extendSelectionBy.bind(l,"getWordRange")}return d.prototype.onMouseDown=function(l){var s=l.inSelection(),r=l.getDocumentPosition();this.mousedownEvent=l;var a=this.editor,p=l.getButton();if(p!==0){(a.getSelectionRange().isEmpty()||p==1)&&a.selection.moveToPosition(r),p==2&&(a.textInput.onContextMenu(l.domEvent),f.isMozilla||l.preventDefault());return}if(this.mousedownEvent.time=Date.now(),s&&!a.isFocused()&&(a.focus(),this.$focusTimeout&&!this.$clickSelection&&!a.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(l);return}return this.captureMouse(l),this.startSelect(r,l.domEvent._clicks>1),l.preventDefault()},d.prototype.startSelect=function(l,s){l=l||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var r=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?r.selection.selectToPosition(l):s||r.selection.moveToPosition(l),s||this.select(),r.setStyle("ace_selecting"),this.setState("select"))},d.prototype.select=function(){var l,s=this.editor,r=s.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(r);if(a==-1)l=this.$clickSelection.end;else if(a==1)l=this.$clickSelection.start;else{var p=u(this.$clickSelection,r,s.session);r=p.cursor,l=p.anchor}s.selection.setSelectionAnchor(l.row,l.column)}s.selection.selectToPosition(r),s.renderer.scrollCursorIntoView()},d.prototype.extendSelectionBy=function(l){var s,r=this.editor,a=r.renderer.screenToTextCoordinates(this.x,this.y),p=r.selection[l](a.row,a.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(p.start),y=this.$clickSelection.comparePoint(p.end);if(v==-1&&y<=0)s=this.$clickSelection.end,(p.end.row!=a.row||p.end.column!=a.column)&&(a=p.start);else if(y==1&&v>=0)s=this.$clickSelection.start,(p.start.row!=a.row||p.start.column!=a.column)&&(a=p.end);else if(v==-1&&y==1)a=p.end,s=p.start;else{var k=u(this.$clickSelection,a,r.session);a=k.cursor,s=k.anchor}r.selection.setSelectionAnchor(s.row,s.column)}r.selection.selectToPosition(a),r.renderer.scrollCursorIntoView()},d.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},d.prototype.focusWait=function(){(h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>g||Date.now()-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},d.prototype.onDoubleClick=function(l){var s=l.getDocumentPosition(),r=this.editor,a=r.session.getBracketRange(s);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=r.selection.getWordRange(s.row,s.column),this.setState("selectByWords")),this.$clickSelection=a,this.select()},d.prototype.onTripleClick=function(l){var s=l.getDocumentPosition(),r=this.editor;this.setState("selectByLines");var a=r.getSelectionRange();a.isMultiLine()&&a.contains(s.row,s.column)?(this.$clickSelection=r.selection.getLineRange(a.start.row),this.$clickSelection.end=r.selection.getLineRange(a.end.row).end):this.$clickSelection=r.selection.getLineRange(s.row),this.select()},d.prototype.onQuadClick=function(l){var s=this.editor;s.selectAll(),this.$clickSelection=s.getSelectionRange(),this.setState("selectAll")},d.prototype.onMouseWheel=function(l){if(!l.getAccelKey()){l.getShiftKey()&&l.wheelY&&!l.wheelX&&(l.wheelX=l.wheelY,l.wheelY=0);var s=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var r=this.$lastScroll,a=l.domEvent.timeStamp,p=a-r.t,v=p?l.wheelX/p:r.vx,y=p?l.wheelY/p:r.vy;p<c&&(v=(v+r.vx)/2,y=(y+r.vy)/2);var k=Math.abs(v/y),x=!1;if(k>=1&&s.renderer.isScrollableBy(l.wheelX*l.speed,0)&&(x=!0),k<=1&&s.renderer.isScrollableBy(0,l.wheelY*l.speed)&&(x=!0),x?r.allowed=a:a-r.allowed<c&&(Math.abs(v)<=1.5*Math.abs(r.vx)&&Math.abs(y)<=1.5*Math.abs(r.vy)?(x=!0,r.allowed=a):r.allowed=0),r.t=a,r.vx=v,r.vy=y,x)return s.renderer.scrollBy(l.wheelX*l.speed,l.wheelY*l.speed),l.stop()}},d})();o.prototype.selectEnd=o.prototype.selectByLinesEnd,o.prototype.selectAllEnd=o.prototype.selectByLinesEnd,o.prototype.selectByWordsEnd=o.prototype.selectByLinesEnd,n.DefaultHandlers=o;function h(d,l,s,r){return Math.sqrt(Math.pow(s-d,2)+Math.pow(r-l,2))}function u(d,l,s){if(d.start.row==d.end.row)var r=2*l.column-d.start.column-d.end.column;else if(d.start.row==d.end.row-1&&!d.start.column&&!d.end.column)var r=3*l.column-2*s.getLine(d.start.row).length;else var r=2*l.row-d.start.row-d.end.row;return r<0?{cursor:d.start,anchor:d.end}:{cursor:d.end,anchor:d.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,n,m){"use strict";var f=t("../lib/event"),g=t("../lib/useragent");n.MouseEvent=(function(){function c(o,h){this.speed,this.wheelX,this.wheelY,this.domEvent=o,this.editor=h,this.x=this.clientX=o.clientX,this.y=this.clientY=o.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){f.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){f.preventDefault(this.domEvent),this.defaultPrevented=!0},c.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},c.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},c.prototype.getGutterRow=function(){var o=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(o,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var o=this.editor.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var h=this.getDocumentPosition();this.$inSelection=o.contains(h.row,h.column)}return this.$inSelection},c.prototype.getButton=function(){return f.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c})()}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,n,m){n.preventParentScroll=function(g){g.stopPropagation();var c=g.currentTarget;c.scrollHeight>c.clientHeight||g.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,n,m){"use strict";var f=this&&this.__extends||(function(){var s=function(r,a){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,v){p.__proto__=v}||function(p,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(p[y]=v[y])},s(r,a)};return function(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");s(r,a);function p(){this.constructor=r}r.prototype=a===null?Object.create(a):(p.prototype=a.prototype,new p)}})(),g=this&&this.__values||function(s){var r=typeof Symbol=="function"&&Symbol.iterator,a=r&&s[r],p=0;if(a)return a.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&p>=s.length&&(s=void 0),{value:s&&s[p++],done:!s}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},c=t("./lib/dom");t("./lib/event");var o=t("./range").Range,h=t("./lib/scroll").preventParentScroll,u="ace_tooltip",d=(function(){function s(r){this.isOpen=!1,this.$element=null,this.$parentNode=r}return s.prototype.$init=function(){return this.$element=c.createElement("div"),this.$element.className=u,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(r){this.getElement().textContent=r},s.prototype.setHtml=function(r){this.getElement().innerHTML=r},s.prototype.setPosition=function(r,a){this.getElement().style.left=r+"px",this.getElement().style.top=a+"px"},s.prototype.setClassName=function(r){c.addCssClass(this.getElement(),r)},s.prototype.setTheme=function(r){this.theme&&(this.theme.isDark&&c.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&c.removeCssClass(this.getElement(),this.theme.cssClass)),r.isDark&&c.addCssClass(this.getElement(),"ace_dark"),r.cssClass&&c.addCssClass(this.getElement(),r.cssClass),this.theme={isDark:r.isDark,cssClass:r.cssClass}},s.prototype.show=function(r,a,p){r!=null&&this.setText(r),a!=null&&p!=null&&this.setPosition(a,p),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(r){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=u,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s})(),l=new((function(){function s(){this.popups=[]}return s.prototype.addPopup=function(r){this.popups.push(r),this.updatePopups()},s.prototype.removePopup=function(r){var a=this.popups.indexOf(r);a!==-1&&(this.popups.splice(a,1),this.updatePopups())},s.prototype.updatePopups=function(){var r,a,p,v;this.popups.sort(function($,D){return D.priority-$.priority});var y=[];try{for(var k=g(this.popups),x=k.next();!x.done;x=k.next()){var w=x.value,S=!0;try{for(var M=(p=void 0,g(y)),L=M.next();!L.done;L=M.next()){var R=L.value;if(this.doPopupsOverlap(R,w)){S=!1;break}}}catch($){p={error:$}}finally{try{L&&!L.done&&(v=M.return)&&v.call(M)}finally{if(p)throw p.error}}S?y.push(w):w.hide()}}catch($){r={error:$}}finally{try{x&&!x.done&&(a=k.return)&&a.call(k)}finally{if(r)throw r.error}}},s.prototype.doPopupsOverlap=function(r,a){var p=r.getElement().getBoundingClientRect(),v=a.getElement().getBoundingClientRect();return p.left<v.right&&p.right>v.left&&p.top<v.bottom&&p.bottom>v.top},s})());n.popupManager=l,n.Tooltip=d,n.HoverTooltip=(function(s){f(r,s);function r(a){a===void 0&&(a=document.body);var p=s.call(this,a)||this;p.timeout=void 0,p.lastT=0,p.idleTime=350,p.lastEvent=void 0,p.onMouseOut=p.onMouseOut.bind(p),p.onMouseMove=p.onMouseMove.bind(p),p.waitForHover=p.waitForHover.bind(p),p.hide=p.hide.bind(p);var v=p.getElement();return v.style.whiteSpace="pre-wrap",v.style.pointerEvents="auto",v.addEventListener("mouseout",p.onMouseOut),v.tabIndex=-1,v.addEventListener("blur",function(){v.contains(document.activeElement)||this.hide()}.bind(p)),v.addEventListener("wheel",h),p}return r.prototype.addToEditor=function(a){a.on("mousemove",this.onMouseMove),a.on("mousedown",this.hide);var p=a.renderer.getMouseEventTarget();p&&typeof p.removeEventListener=="function"&&p.addEventListener("mouseout",this.onMouseOut,!0)},r.prototype.removeFromEditor=function(a){a.off("mousemove",this.onMouseMove),a.off("mousedown",this.hide);var p=a.renderer.getMouseEventTarget();p&&typeof p.removeEventListener=="function"&&p.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},r.prototype.onMouseMove=function(a,p){this.lastEvent=a,this.lastT=Date.now();var v=p.$mouseHandler.isMousePressed;if(this.isOpen){var y=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(y.row,y.column)||v||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||v||(this.lastEvent=a,this.timeout=setTimeout(this.waitForHover,this.idleTime))},r.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var a=Date.now()-this.lastT;if(this.idleTime-a>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-a);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},r.prototype.isOutsideOfText=function(a){var p=a.editor,v=a.getDocumentPosition(),y=p.session.getLine(v.row);if(v.column==y.length){var k=p.renderer.pixelToScreenCoordinates(a.clientX,a.clientY),x=p.session.documentToScreenPosition(v.row,v.column);if(x.column!=k.column||x.row!=k.row)return!0}return!1},r.prototype.setDataProvider=function(a){this.$gatherData=a},r.prototype.showForRange=function(a,p,v,y){if(!(y&&y!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var k=a.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(k.theme)),this.isOpen=!0,this.range=o.fromPoints(p.start,p.end);var x=k.textToScreenCoordinates(p.start.row,p.start.column),w=k.scroller.getBoundingClientRect();x.pageX<w.left&&(x.pageX=w.left);var S=this.getElement();S.innerHTML="",S.appendChild(v),S.style.maxHeight="",S.style.display="block",this.$setPosition(a,x,!0,p),c.$fixPositionBug(S)}},r.prototype.$setPosition=function(a,p,v,y){var k=10;v&&this.addMarker(y,a.session);var x=a.renderer,w=this.getElement(),S=w.offsetHeight,M=w.offsetWidth,L=p.pageY,R=p.pageX,$=window.innerHeight-L-x.lineHeight,D=this.$shouldPlaceAbove(S,L,$-k);w.style.maxHeight=(D?L:$)-k+"px",w.style.top=D?"":L+x.lineHeight+"px",w.style.bottom=D?window.innerHeight-L+"px":"",w.style.left=Math.min(R,window.innerWidth-M-k)+"px"},r.prototype.$shouldPlaceAbove=function(a,p,v){return!(p-a<0&&p<v)},r.prototype.addMarker=function(a,p){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=p,this.marker=p&&p.addMarker(a,"ace_highlight-marker","text")},r.prototype.hide=function(a){a&&this.$fromKeyboard&&a.type=="keydown"&&a.code=="Escape"||!a&&document.activeElement==this.getElement()||a&&a.target&&(a.type!="keydown"||a.ctrlKey||a.metaKey)&&this.$element.contains(a.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.removePopup(this)))},r.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},r.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},r.prototype.onMouseOut=function(a){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!a.relatedTarget||this.getElement().contains(a.relatedTarget)||a&&a.currentTarget.contains(a.relatedTarget)||a.relatedTarget.classList.contains("ace_content")||this.hide())},r})(d)}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(t,n,m){"use strict";var f=this&&this.__extends||(function(){var r=function(a,p){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var k in y)Object.prototype.hasOwnProperty.call(y,k)&&(v[k]=y[k])},r(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");r(a,p);function v(){this.constructor=a}a.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}})(),g=this&&this.__values||function(r){var a=typeof Symbol=="function"&&Symbol.iterator,p=a&&r[a],v=0;if(p)return p.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&v>=r.length&&(r=void 0),{value:r&&r[v++],done:!r}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},c=t("../lib/dom"),o=t("./mouse_event").MouseEvent,h=t("../tooltip").HoverTooltip,u=t("../config").nls,d=t("../range").Range;function l(r){var a=r.editor,p=a.renderer.$gutterLayer;r.$tooltip=new s(a),r.$tooltip.addToEditor(a),r.$tooltip.setDataProvider(function(v,y){var k=v.getDocumentPosition().row;r.$tooltip.showTooltip(k)}),r.editor.setDefaultHandler("guttermousedown",function(v){if(!(!a.isFocused()||v.getButton()!=0)&&p.getRegion(v)!="foldWidgets"){var y=v.getDocumentPosition().row,k=a.session.selection;if(v.getShiftKey())k.selectTo(y,0);else{if(v.domEvent.detail==2)return a.selectAll(),v.preventDefault();r.$clickSelection=a.selection.getLineRange(y)}return r.setState("selectByLines"),r.captureMouse(v),v.preventDefault()}})}n.GutterHandler=l;var s=(function(r){f(a,r);function a(p){var v=r.call(this,p.container)||this;v.id="gt"+ ++a.$uid,v.editor=p,v.visibleTooltipRow;var y=v.getElement();return y.setAttribute("role","tooltip"),y.setAttribute("id",v.id),y.style.pointerEvents="auto",v.idleTime=50,v.onDomMouseMove=v.onDomMouseMove.bind(v),v.onDomMouseOut=v.onDomMouseOut.bind(v),v.setClassName("ace_gutter-tooltip"),v}return a.prototype.onDomMouseMove=function(p){var v=new o(p,this.editor);this.onMouseMove(v,this.editor)},a.prototype.onDomMouseOut=function(p){var v=new o(p,this.editor);this.onMouseOut(v)},a.prototype.addToEditor=function(p){var v=p.renderer.$gutter;v.addEventListener("mousemove",this.onDomMouseMove),v.addEventListener("mouseout",this.onDomMouseOut),r.prototype.addToEditor.call(this,p)},a.prototype.removeFromEditor=function(p){var v=p.renderer.$gutter;v.removeEventListener("mousemove",this.onDomMouseMove),v.removeEventListener("mouseout",this.onDomMouseOut),r.prototype.removeFromEditor.call(this,p)},a.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),r.prototype.destroy.call(this)},Object.defineProperty(a,"annotationLabels",{get:function(){return{error:{singular:u("gutter-tooltip.aria-label.error.singular","error"),plural:u("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:u("gutter-tooltip.aria-label.security.singular","security finding"),plural:u("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:u("gutter-tooltip.aria-label.warning.singular","warning"),plural:u("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:u("gutter-tooltip.aria-label.info.singular","information message"),plural:u("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:u("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:u("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),a.prototype.showTooltip=function(p){var v,y=this.editor.renderer.$gutterLayer,k=y.$annotations[p],x;k?x={displayText:Array.from(k.displayText),type:Array.from(k.type)}:x={displayText:[],type:[]};var w=y.session.getFoldLine(p);if(w&&y.$showFoldedAnnotations){for(var S={error:[],security:[],warning:[],info:[],hint:[]},M={error:1,security:2,warning:3,info:4,hint:5},L,R=p+1;R<=w.end.row;R++)if(y.$annotations[R])for(var $=0;$<y.$annotations[R].text.length;$++){var D=y.$annotations[R].type[$];S[D].push(y.$annotations[R].text[$]),(!L||M[D]<M[L])&&(L=D)}if(["error","security","warning"].includes(L)){var T="".concat(a.annotationsToSummaryString(S)," in folded code.");x.displayText.push(T),x.type.push(L+"_fold")}}if(x.displayText.length===0)return this.hide();for(var E={error:[],security:[],warning:[],info:[],hint:[]},C=y.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",R=0;R<x.displayText.length;R++){var b=c.createElement("span"),A=c.createElement("span");(v=A.classList).add.apply(v,["ace_".concat(x.type[R]),C]),A.setAttribute("aria-label","".concat(a.annotationLabels[x.type[R].replace("_fold","")].singular)),A.setAttribute("role","img"),A.appendChild(c.createTextNode(" ")),b.appendChild(A),b.appendChild(c.createTextNode(x.displayText[R])),b.appendChild(c.createElement("br")),E[x.type[R].replace("_fold","")].push(b)}var _=c.createElement("span");E.error.forEach(function(N){return _.appendChild(N)}),E.security.forEach(function(N){return _.appendChild(N)}),E.warning.forEach(function(N){return _.appendChild(N)}),E.info.forEach(function(N){return _.appendChild(N)}),E.hint.forEach(function(N){return _.appendChild(N)}),_.setAttribute("aria-live","polite");var O=this.$findLinkedAnnotationNode(p);O&&O.setAttribute("aria-describedby",this.id);var I=d.fromPoints({row:p,column:0},{row:p,column:0});this.showForRange(this.editor,I,_),this.visibleTooltipRow=p,this.editor._signal("showGutterTooltip",this)},a.prototype.$setPosition=function(p,v,y,k){var x=this.$findCellByRow(k.start.row);if(x){var w=x&&x.element,S=w&&w.querySelector(".ace_gutter_annotation");if(S){var M=S.getBoundingClientRect();if(M){var L={pageX:M.right,pageY:M.top};return r.prototype.$setPosition.call(this,p,L,!1,k)}}}},a.prototype.$shouldPlaceAbove=function(p,v,y){return y<p},a.prototype.$findLinkedAnnotationNode=function(p){var v=this.$findCellByRow(p);if(v){var y=v.element;if(y.childNodes.length>2)return y.childNodes[2]}},a.prototype.$findCellByRow=function(p){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(v){return v.row===p})},a.prototype.hide=function(p){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var v=this.$findLinkedAnnotationNode(this.visibleTooltipRow);v&&v.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),r.prototype.hide.call(this,p)}},a.annotationsToSummaryString=function(p){var v,y,k=[],x=["error","security","warning","info","hint"];try{for(var w=g(x),S=w.next();!S.done;S=w.next()){var M=S.value;if(p[M].length){var L=p[M].length===1?a.annotationLabels[M].singular:a.annotationLabels[M].plural;k.push("".concat(p[M].length," ").concat(L))}}}catch(R){v={error:R}}finally{try{S&&!S.done&&(y=w.return)&&y.call(w)}finally{if(v)throw v.error}}return k.join(", ")},a.prototype.isOutsideOfText=function(p){var v=p.editor.renderer.$gutter.getBoundingClientRect();return!(p.clientX>=v.left&&p.clientX<=v.right&&p.clientY>=v.top&&p.clientY<=v.bottom)},a})(h);s.$uid=0,n.GutterTooltip=s}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,n,m){"use strict";var f=t("../lib/dom"),g=t("../lib/event"),c=t("../lib/useragent"),o=200,h=200,u=5;function d(s){var r=s.editor,a=f.createElement("div");a.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",a.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(z){s[z]=this[z]},this),r.on("mousedown",this.onMouseDown.bind(s));var p=r.container,v,y,k,x,w,S,M=0,L,R,$,D,T;this.onDragStart=function(z){if(this.cancelDrag||!p.draggable){var P=this;return setTimeout(function(){P.startSelect(),P.captureMouse(z)},0),z.preventDefault()}w=r.getSelectionRange();var W=z.dataTransfer;W.effectAllowed=r.getReadOnly()?"copy":"copyMove",r.container.appendChild(a),W.setDragImage&&W.setDragImage(a,0,0),setTimeout(function(){r.container.removeChild(a)}),W.clearData(),W.setData("Text",r.session.getTextRange()),R=!0,this.setState("drag")},this.onDragEnd=function(z){if(p.draggable=!1,R=!1,this.setState(null),!r.getReadOnly()){var P=z.dataTransfer.dropEffect;!L&&P=="move"&&r.session.remove(r.getSelectionRange()),r.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(z){if(!(r.getReadOnly()||!N(z.dataTransfer)))return y=z.clientX,k=z.clientY,v||A(),M++,z.dataTransfer.dropEffect=L=F(z),g.preventDefault(z)},this.onDragOver=function(z){if(!(r.getReadOnly()||!N(z.dataTransfer)))return y=z.clientX,k=z.clientY,v||(A(),M++),O!==null&&(O=null),z.dataTransfer.dropEffect=L=F(z),g.preventDefault(z)},this.onDragLeave=function(z){if(M--,M<=0&&v)return _(),L=null,g.preventDefault(z)},this.onDrop=function(z){if(S){var P=z.dataTransfer;if(R)switch(L){case"move":w.contains(S.row,S.column)?w={start:S,end:S}:w=r.moveText(w,S);break;case"copy":w=r.moveText(w,S,!0);break}else{var W=P.getData("Text");w={start:S,end:r.session.insert(S,W)},r.focus(),L=null}return _(),g.preventDefault(z)}},g.addListener(p,"dragstart",this.onDragStart.bind(s),r),g.addListener(p,"dragend",this.onDragEnd.bind(s),r),g.addListener(p,"dragenter",this.onDragEnter.bind(s),r),g.addListener(p,"dragover",this.onDragOver.bind(s),r),g.addListener(p,"dragleave",this.onDragLeave.bind(s),r),g.addListener(p,"drop",this.onDrop.bind(s),r);function E(z,P){var W=Date.now(),B=!P||z.row!=P.row,H=!P||z.column!=P.column;!D||B||H?(r.moveCursorToPosition(z),D=W,T={x:y,y:k}):l(T.x,T.y,y,k)>u?D=null:W-D>=h&&(r.renderer.scrollCursorIntoView(),D=null)}function C(z,P){var W=Date.now(),B=r.renderer.layerConfig.lineHeight,H=r.renderer.layerConfig.characterWidth,U=r.renderer.scroller.getBoundingClientRect(),G={x:{left:y-U.left,right:U.right-y},y:{top:k-U.top,bottom:U.bottom-k}},Y=Math.min(G.x.left,G.x.right),q=Math.min(G.y.top,G.y.bottom),X={row:z.row,column:z.column};Y/H<=2&&(X.column+=G.x.left<G.x.right?-3:2),q/B<=1&&(X.row+=G.y.top<G.y.bottom?-1:1);var le=z.row!=X.row,Le=z.column!=X.column,Ne=!P||z.row!=P.row;le||Le&&!Ne?$?W-$>=o&&r.renderer.scrollCursorIntoView(X):$=W:$=null}function b(){var z=S;S=r.renderer.screenToTextCoordinates(y,k),E(S,z),C(S,z)}function A(){w=r.selection.toOrientedRange(),v=r.session.addMarker(w,"ace_selection",r.getSelectionStyle()),r.clearSelection(),r.isFocused()&&r.renderer.$cursorLayer.setBlinking(!1),clearInterval(x),b(),x=setInterval(b,20),M=0,g.addListener(document,"mousemove",I)}function _(){clearInterval(x),r.session.removeMarker(v),v=null,r.selection.fromOrientedRange(w),r.isFocused()&&!R&&r.$resetCursorStyle(),w=null,S=null,M=0,$=null,D=null,g.removeListener(document,"mousemove",I)}var O=null;function I(){O==null&&(O=setTimeout(function(){O!=null&&v&&_()},20))}function N(z){var P=z.types;return!P||Array.prototype.some.call(P,function(W){return W=="text/plain"||W=="Text"})}function F(z){var P=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],B=c.isMac?z.altKey:z.ctrlKey,H="uninitialized";try{H=z.dataTransfer.effectAllowed.toLowerCase()}catch{}var U="none";return B&&P.indexOf(H)>=0?U="copy":W.indexOf(H)>=0?U="move":P.indexOf(H)>=0&&(U="copy"),U}}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var s=this.editor.container;s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(s){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var s=this.editor,r=s.container;r.draggable=!0,s.renderer.$cursorLayer.setBlinking(!1),s.setStyle("ace_dragging");var a=c.isWin?"default":"move";s.renderer.setCursorStyle(a),this.setState("dragReady")},this.onMouseDrag=function(s){var r=this.editor.container;if(c.isIE&&this.state=="dragReady"){var a=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);a>3&&r.dragDrop()}if(this.state==="dragWait"){var a=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);a>0&&(r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(s){if(this.$dragEnabled){this.mousedownEvent=s;var r=this.editor,a=s.inSelection(),p=s.getButton();if((s.domEvent.detail||1)===1&&p===0&&a){if(s.editor.inMultiSelectMode&&(s.getAccelKey()||s.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=s.domEvent.target||s.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),r.getDragDelay()){if(c.isWebKit){this.cancelDrag=!0;var y=r.container;y.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(s,this.onMouseDrag.bind(this)),s.defaultPrevented=!0}}}}).call(d.prototype);function l(s,r,a,p){return Math.sqrt(Math.pow(a-s,2)+Math.pow(p-r,2))}n.DragdropHandler=d}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,n,m){"use strict";var f=t("./mouse_event").MouseEvent,g=t("../lib/event"),c=t("../lib/dom");n.addTouchListeners=function(o,h){var u="scroll",d,l,s,r,a,p,v=0,y,k=0,x=0,w=0,S,M;function L(){var C=window.navigator&&window.navigator.clipboard,b=!1,A=function(){var I=h.getCopyText(),N=h.session.getUndoManager().hasUndo();M.replaceChild(c.buildDom(b?["span",!I&&_("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],I&&_("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],I&&_("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&_("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],N&&_("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],_("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],_("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),M.firstChild)},_=function(I){return h.commands.canExecute(I,h)},O=function(I){var N=I.target.getAttribute("action");if(N=="more"||!b)return b=!b,A();N=="paste"?C.readText().then(function(F){h.execCommand(N,F)}):N&&((N=="cut"||N=="copy")&&(C?C.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(N)),M.firstChild.style.display="none",b=!1,N!="openCommandPalette"&&h.focus()};M=c.buildDom(["div",{class:"ace_mobile-menu",onclick:O},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container),M.addEventListener("touchstart",function(I){u="menu",I.stopPropagation(),I.preventDefault(),h.textInput.focus()}),M.addEventListener("touchend",function(I){I.stopPropagation(),I.preventDefault(),O(I)})}function R(){if(!h.getOption("enableMobileMenu")){M&&$();return}M||L();var C=h.selection.cursor,b=h.renderer.textToScreenCoordinates(C.row,C.column),A=h.renderer.textToScreenCoordinates(0,0).pageX,_=h.renderer.scrollLeft,O=h.container.getBoundingClientRect();M.style.top=b.pageY-O.top-3+"px",b.pageX-O.left<O.width-70?(M.style.left="",M.style.right="10px"):(M.style.right="",M.style.left=A+_-O.left+"px"),M.style.display="",M.firstChild.style.display="none",h.on("input",$)}function $(C){M&&(M.style.display="none"),h.off("input",$)}function D(){a=null,clearTimeout(a);var C=h.selection.getRange(),b=C.contains(y.row,y.column);(C.isEmpty()||!b)&&(h.selection.moveToPosition(y),h.selection.selectWord()),u="wait",R()}function T(){a=null,clearTimeout(a),h.selection.moveToPosition(y);var C=k>=2?h.selection.getLineRange(y.row):h.session.getBracketRange(y);C&&!C.isEmpty()?h.selection.setRange(C):h.selection.selectWord(),u="wait"}g.addListener(o,"contextmenu",function(C){S&&h.textInput.getElement().focus()},h),g.addListener(o,"touchstart",function(C){var b=C.touches;if(a||b.length>1){clearTimeout(a),a=null,s=-1,u="zoom";return}S=h.$mouseHandler.isMousePressed=!0;var A=h.renderer.layerConfig.lineHeight,_=h.renderer.layerConfig.lineHeight,O=C.timeStamp;r=O;var I=b[0],N=I.clientX,F=I.clientY;if(Math.abs(d-N)+Math.abs(l-F)>A&&(s=-1),d=C.clientX=N,l=C.clientY=F,x=w=0,y=new f(C,h).getDocumentPosition(),O-s<500&&b.length==1&&!v)k++,C.preventDefault(),C.button=0,T();else{k=0;var z=h.selection.cursor,P=h.selection.isEmpty()?z:h.selection.anchor,W=h.renderer.$cursorLayer.getPixelPosition(z,!0),B=h.renderer.$cursorLayer.getPixelPosition(P,!0),H=h.renderer.scroller.getBoundingClientRect(),U=h.renderer.layerConfig.offset,G=h.renderer.scrollLeft,Y=function(le,Le){return le=le/_,Le=Le/A-.75,le*le+Le*Le};if(C.clientX<H.left){u="zoom";return}var q=Y(C.clientX-H.left-W.left+G,C.clientY-H.top-W.top+U),X=Y(C.clientX-H.left-B.left+G,C.clientY-H.top-B.top+U);q<3.5&&X<3.5&&(u=q>X?"cursor":"anchor"),X<3.5?u="anchor":q<3.5?u="cursor":u="scroll",a=setTimeout(D,450)}s=O},h),g.addListener(o,"touchend",function(C){S=h.$mouseHandler.isMousePressed=!1,p&&clearInterval(p),u=="zoom"?(u="",v=0):a?(h.selection.moveToPosition(y),v=0,R()):u=="scroll"?(E(),$()):R(),clearTimeout(a),a=null},h),g.addListener(o,"touchmove",function(C){a&&(clearTimeout(a),a=null);var b=C.touches;if(!(b.length>1||u=="zoom")){var A=b[0],_=d-A.clientX,O=l-A.clientY;if(u=="wait")if(_*_+O*O>4)u="cursor";else return C.preventDefault();d=A.clientX,l=A.clientY,C.clientX=A.clientX,C.clientY=A.clientY;var I=C.timeStamp,N=I-r;if(r=I,u=="scroll"){var F=new f(C,h);F.speed=1,F.wheelX=_,F.wheelY=O,10*Math.abs(_)<Math.abs(O)&&(_=0),10*Math.abs(O)<Math.abs(_)&&(O=0),N!=0&&(x=_/N,w=O/N),h._emit("mousewheel",F),F.propagationStopped||(x=w=0)}else{var z=new f(C,h).getDocumentPosition();u=="cursor"?h.selection.moveCursorToPosition(z):u=="anchor"&&h.selection.setSelectionAnchor(z.row,z.column),h.renderer.scrollCursorIntoView(z),C.preventDefault()}}},h);function E(){v+=60,p=setInterval(function(){v--<=0&&(clearInterval(p),p=null),Math.abs(x)<.01&&(x=0),Math.abs(w)<.01&&(w=0),v<20&&(x=.9*x),v<20&&(w=.9*w);var C=h.session.getScrollTop();h.renderer.scrollBy(10*x,10*w),C==h.session.getScrollTop()&&(v=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(t,n,m){"use strict";var f=t("../lib/event"),g=t("../lib/useragent"),c=t("./default_handlers").DefaultHandlers,o=t("./default_gutter_handler").GutterHandler,h=t("./mouse_event").MouseEvent,u=t("./dragdrop_handler").DragdropHandler,d=t("./touch_handler").addTouchListeners,l=t("../config"),s=(function(){function r(a){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var p=this;this.editor=a,new c(this),new o(this),new u(this);var v=function(x){(!document.hasFocus||!document.hasFocus()||!a.isFocused()&&document.activeElement==(a.textInput&&a.textInput.getElement()))&&window.focus(),a.focus(),setTimeout(function(){a.isFocused()||a.focus()})},y=a.renderer.getMouseEventTarget();f.addListener(y,"click",this.onMouseEvent.bind(this,"click"),a),f.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),a),f.addMultiMouseDownListener([y,a.renderer.scrollBarV&&a.renderer.scrollBarV.inner,a.renderer.scrollBarH&&a.renderer.scrollBarH.inner,a.textInput&&a.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",a),f.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"),a),d(a.container,a);var k=a.renderer.$gutter;f.addListener(k,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),a),f.addListener(k,"click",this.onMouseEvent.bind(this,"gutterclick"),a),f.addListener(k,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),a),f.addListener(k,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),a),f.addListener(y,"mousedown",v,a),f.addListener(k,"mousedown",v,a),g.isIE&&a.renderer.scrollBarV&&(f.addListener(a.renderer.scrollBarV.element,"mousedown",v,a),f.addListener(a.renderer.scrollBarH.element,"mousedown",v,a)),a.on("mousemove",function(x){if(!(p.state||p.$dragDelay||!p.$dragEnabled)){var w=a.renderer.screenToTextCoordinates(x.x,x.y),S=a.session.selection.getRange(),M=a.renderer;!S.isEmpty()&&S.insideStart(w.row,w.column)?M.setCursorStyle("default"):M.setCursorStyle("")}},a)}return r.prototype.onMouseEvent=function(a,p){this.editor.session&&this.editor._emit(a,new h(p,this.editor))},r.prototype.onMouseMove=function(a,p){var v=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!v||!v.length||this.editor._emit(a,new h(p,this.editor))},r.prototype.onMouseWheel=function(a,p){var v=new h(p,this.editor);v.speed=this.$scrollSpeed*2,v.wheelX=p.wheelX,v.wheelY=p.wheelY,this.editor._emit(a,v)},r.prototype.setState=function(a){this.state=a},r.prototype.captureMouse=function(a,p){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var v=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var k=this,x=!0,w=function($){if($){if(g.isWebKit&&!$.which&&k.releaseMouse)return k.releaseMouse();k.x=$.clientX,k.y=$.clientY,p&&p($),k.mouseEvent=new h($,k.editor),k.$mouseMoved=!0}},S=function($){v.off("beforeEndOperation",R),x=!1,v.session&&M(),k[k.state+"End"]&&k[k.state+"End"]($),k.state="",k.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),k.$onCaptureMouseMove=k.releaseMouse=null,$&&k.onMouseEvent("mouseup",$),v.endOperation()},M=function(){k[k.state]&&k[k.state](),k.$mouseMoved=!1},L=function(){x&&(M(),f.nextFrame(L))};if(g.isOldIE&&a.domEvent.type=="dblclick")return setTimeout(function(){S(a)});var R=function($){k.releaseMouse&&v.curOp.command.name&&v.curOp.selectionChanged&&(k[k.state+"End"]&&k[k.state+"End"](),k.state="",k.releaseMouse())};v.on("beforeEndOperation",R),v.startOperation({command:{name:"mouse"}}),k.$onCaptureMouseMove=w,k.releaseMouse=f.capture(this.editor.container,w,S),L()},r.prototype.cancelContextMenu=function(){var a=function(p){p&&p.domEvent&&p.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",a),p&&p.domEvent&&f.stopEvent(p.domEvent))}.bind(this);setTimeout(a,10),this.editor.on("nativecontextmenu",a)},r.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},r})();s.prototype.releaseMouse=null,l.defineOptions(s.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),n.MouseHandler=s}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,n,m){"use strict";var f=t("../lib/dom");n.FoldHandler=(function(){function g(c){c.on("click",function(o){var h=o.getDocumentPosition(),u=c.session,d=u.getFoldAt(h.row,h.column,1);d&&(o.getAccelKey()?u.removeFold(d):u.expandFold(d),o.stop());var l=o.domEvent&&o.domEvent.target;l&&f.hasCssClass(l,"ace_inline_button")&&f.hasCssClass(l,"ace_toggle_wrap")&&(u.setOption("wrap",!u.getUseWrapMode()),c.renderer.scrollCursorIntoView())}),c.on("gutterclick",function(o){if(c.renderer.$gutterLayer.getRegion(o)=="foldWidgets"){var h=o.getDocumentPosition().row,u=c.session;u.foldWidgets&&u.foldWidgets[h]&&c.session.onFoldWidgetClick(h,o),c.isFocused()||c.focus(),o.stop()}}),c.on("gutterdblclick",function(o){if(c.renderer.$gutterLayer.getRegion(o)=="foldWidgets"){var h=o.getDocumentPosition().row,u=c.session,d=u.getParentFoldRangeData(h,!0),l=d.range||d.firstRange;if(l){h=l.start.row;var s=u.getFoldAt(h,u.getLine(h).length,1);s?u.removeFold(s):(u.addFold("...",l),c.renderer.scrollCursorIntoView({row:l.start.row,column:0}))}o.stop()}})}return g})()}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,n,m){"use strict";var f=t("../lib/keys"),g=t("../lib/event");n.KeyBinding=(function(){function c(o){this.$editor=o,this.$data={editor:o},this.$handlers=[],this.setDefaultHandler(o.commands)}return c.prototype.setDefaultHandler=function(o){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=o,this.addKeyboardHandler(o,0)},c.prototype.setKeyboardHandler=function(o){var h=this.$handlers;if(h[h.length-1]!=o){for(;h[h.length-1]&&h[h.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(h[h.length-1]);this.addKeyboardHandler(o,1)}},c.prototype.addKeyboardHandler=function(o,h){if(o){typeof o=="function"&&!o.handleKeyboard&&(o.handleKeyboard=o);var u=this.$handlers.indexOf(o);u!=-1&&this.$handlers.splice(u,1),h==null?this.$handlers.push(o):this.$handlers.splice(h,0,o),u==-1&&o.attach&&o.attach(this.$editor)}},c.prototype.removeKeyboardHandler=function(o){var h=this.$handlers.indexOf(o);return h==-1?!1:(this.$handlers.splice(h,1),o.detach&&o.detach(this.$editor),!0)},c.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},c.prototype.getStatusText=function(){var o=this.$data,h=o.editor;return this.$handlers.map(function(u){return u.getStatusText&&u.getStatusText(h,o)||""}).filter(Boolean).join(" ")},c.prototype.$callKeyboardHandlers=function(o,h,u,d){for(var l,s=!1,r=this.$editor.commands,a=this.$handlers.length;a--&&(l=this.$handlers[a].handleKeyboard(this.$data,o,h,u,d),!(!(!l||!l.command)&&(l.command=="null"?s=!0:s=r.exec(l.command,this.$editor,l.args,d),s&&d&&o!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&g.stopEvent(d),s))););return!s&&o==-1&&(l={command:"insertstring"},s=r.exec("insertstring",this.$editor,h)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),s},c.prototype.onCommandKey=function(o,h,u){var d=f.keyCodeToString(u);return this.$callKeyboardHandlers(h,d,u,o)},c.prototype.onTextInput=function(o){return this.$callKeyboardHandlers(-1,o)},c})()}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(t,n,m){"use strict";var f=0,g=0,c=!1,o=!1,h=!1,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],l=0,s=1,r=0,a=1,p=2,v=3,y=4,k=5,x=6,w=7,S=8,M=9,L=10,R=11,$=12,D=13,T=14,E=15,C=16,b=17,A=18,_=[A,A,A,A,A,A,A,A,A,x,k,x,S,k,A,A,A,A,A,A,A,A,A,A,A,A,A,A,k,k,k,x,S,y,y,R,R,R,y,y,y,y,y,L,M,L,M,M,p,p,p,p,p,p,p,p,p,p,M,y,y,y,y,y,y,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,y,y,y,y,y,y,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,y,y,y,y,A,A,A,A,A,A,k,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,M,y,R,R,R,R,y,y,y,y,r,y,y,A,y,y,R,R,p,p,y,r,y,y,y,p,r,y,y,y,y,y],O=[S,S,S,S,S,S,S,S,S,S,S,A,A,A,r,a,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,S,k,D,T,E,C,b,M,R,R,R,R,R,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,M,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,S];function I(P,W,B,H){var U=f?d:u,G=null,Y=null,q=null,X=0,le=null,Le=null,Ne=-1,he=null,Re=null,ar=[];if(!H)for(he=0,H=[];he<B;he++)H[he]=z(P[he]);for(g=f,c=!1,o=!1,h=!1,Re=0;Re<B;Re++){if(G=X,ar[Re]=Y=F(P,H,ar,Re),X=U[G][Y],le=X&240,X&=15,W[Re]=q=U[X][5],le>0)if(le==16){for(he=Ne;he<Re;he++)W[he]=1;Ne=-1}else Ne=-1;if(Le=U[X][6],Le)Ne==-1&&(Ne=Re);else if(Ne>-1){for(he=Ne;he<Re;he++)W[he]=q;Ne=-1}H[Re]==k&&(W[Re]=0),g|=q}if(h){for(he=0;he<B;he++)if(H[he]==x){W[he]=f;for(var Kt=he-1;Kt>=0&&H[Kt]==S;Kt--)W[Kt]=f}}}function N(P,W,B){if(!(g<P)){if(P==1&&f==s&&!o){B.reverse();return}for(var H=B.length,U=0,G,Y,q,X;U<H;){if(W[U]>=P){for(G=U+1;G<H&&W[G]>=P;)G++;for(Y=U,q=G-1;Y<q;Y++,q--)X=B[Y],B[Y]=B[q],B[q]=X;U=G}U++}}}function F(P,W,B,H){var U=W[H],G,Y,q,X;switch(U){case r:case a:c=!1;case y:case v:return U;case p:return c?v:p;case w:return c=!0,a;case S:return y;case M:return H<1||H+1>=W.length||(G=B[H-1])!=p&&G!=v||(Y=W[H+1])!=p&&Y!=v?y:(c&&(Y=v),Y==G?Y:y);case L:return G=H>0?B[H-1]:k,G==p&&H+1<W.length&&W[H+1]==p?p:y;case R:if(H>0&&B[H-1]==p)return p;if(c)return y;for(X=H+1,q=W.length;X<q&&W[X]==R;)X++;return X<q&&W[X]==p?p:y;case $:for(q=W.length,X=H+1;X<q&&W[X]==$;)X++;if(X<q){var le=P[H],Le=le>=1425&&le<=2303||le==64286;if(G=W[X],Le&&(G==a||G==w))return a}return H<1||(G=W[H-1])==k?y:B[H-1];case k:return c=!1,o=!0,f;case x:return h=!0,y;case D:case T:case C:case b:case E:c=!1;case A:return y}}function z(P){var W=P.charCodeAt(0),B=W>>8;return B==0?W>191?r:_[W]:B==5?/[\u0591-\u05f4]/.test(P)?a:r:B==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(P)?$:/[\u0660-\u0669\u066b-\u066c]/.test(P)?v:W==1642?R:/[\u06f0-\u06f9]/.test(P)?p:w:B==32&&W<=8287?O[W&255]:B==254&&W>=65136?w:y}n.L=r,n.R=a,n.EN=p,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="·",n.doBidiReorder=function(P,W,B){if(P.length<2)return{};var H=P.split(""),U=new Array(H.length),G=new Array(H.length),Y=[];f=B?s:l,I(H,Y,H.length,W);for(var q=0;q<U.length;U[q]=q,q++);N(2,Y,U),N(1,Y,U);for(var q=0;q<U.length-1;q++)W[q]===v?Y[q]=n.AN:Y[q]===a&&(W[q]>w&&W[q]<D||W[q]===y||W[q]===A)?Y[q]=n.ON_R:q>0&&H[q-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(H[q])&&(Y[q-1]=Y[q]=n.R_H,q++);H[H.length-1]===n.DOT&&(Y[H.length-1]=n.B),H[0]==="‫"&&(Y[0]=n.RLE);for(var q=0;q<U.length;q++)G[q]=Y[U[q]];return{logicalFromVisual:U,bidiLevels:G}},n.hasBidiCharacters=function(P,W){for(var B=!1,H=0;H<P.length;H++)W[H]=z(P.charAt(H)),!B&&(W[H]==a||W[H]==w||W[H]==v)&&(B=!0);return B},n.getVisualFromLogicalIdx=function(P,W){for(var B=0;B<W.logicalFromVisual.length;B++)if(W.logicalFromVisual[B]==P)return B;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,n,m){"use strict";var f=t("./lib/bidiutil"),g=t("./lib/lang"),c=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;n.BidiHandler=(function(){function o(h){this.session=h,this.bidiMap={},this.currentRow=null,this.bidiUtil=f,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=c.test(h.getValue())}return o.prototype.isBidiRow=function(h,u,d){return this.seenBidi?(h!==this.currentRow&&(this.currentRow=h,this.updateRowLine(u,d),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},o.prototype.onChange=function(h){this.seenBidi?this.currentRow=null:h.action=="insert"&&c.test(h.lines.join(`
1344
+ `))&&(this.seenBidi=!0,this.currentRow=null)},o.prototype.getDocumentRow=function(){var h=0,u=this.session.$screenRowCache;if(u.length){var d=this.session.$getRowCacheIndex(u,this.currentRow);d>=0&&(h=this.session.$docRowCache[d])}return h},o.prototype.getSplitIndex=function(){var h=0,u=this.session.$screenRowCache;if(u.length)for(var d,l=this.session.$getRowCacheIndex(u,this.currentRow);this.currentRow-h>0&&(d=this.session.$getRowCacheIndex(u,this.currentRow-h-1),d===l);)l=d,h++;else h=this.currentRow;return h},o.prototype.updateRowLine=function(h,u){h===void 0&&(h=this.getDocumentRow());var d=h===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(h),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var l=this.session.$wrapData[h];l&&(u===void 0&&(u=this.getSplitIndex()),u>0&&l.length?(this.wrapIndent=l.indent,this.wrapOffset=this.wrapIndent*this.charWidths[f.L],this.line=u<l.length?this.line.substring(l[u-1],l[u]):this.line.substring(l[l.length-1])):this.line=this.line.substring(0,l[u]),u==l.length&&(this.line+=this.showInvisibles?d:f.DOT))}else this.line+=this.showInvisibles?d:f.DOT;var s=this.session,r=0,a;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(p,v){return p===" "||s.isFullWidth(p.charCodeAt(0))?(a=p===" "?s.getScreenTabSize(v+r):2,r+=a-1,g.stringRepeat(f.DOT,a)):p}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==f.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},o.prototype.updateBidiMap=function(){var h=[];f.hasBidiCharacters(this.line,h)||this.isRtlDir?this.bidiMap=f.doBidiReorder(this.line,h,this.isRtlDir):this.bidiMap={}},o.prototype.markAsDirty=function(){this.currentRow=null},o.prototype.updateCharacterWidths=function(h){if(this.characterWidth!==h.$characterSize.width){this.fontMetrics=h;var u=this.characterWidth=h.$characterSize.width,d=h.$measureCharWidth("ה");this.charWidths[f.L]=this.charWidths[f.EN]=this.charWidths[f.ON_R]=u,this.charWidths[f.R]=this.charWidths[f.AN]=d,this.charWidths[f.R_H]=d*.45,this.charWidths[f.B]=this.charWidths[f.RLE]=0,this.currentRow=null}},o.prototype.setShowInvisibles=function(h){this.showInvisibles=h,this.currentRow=null},o.prototype.setEolChar=function(h){this.EOL=h},o.prototype.setContentWidth=function(h){this.contentWidth=h},o.prototype.isRtlLine=function(h){return this.$isRtl?!0:h!=null?this.session.getLine(h).charAt(0)==this.RLE:this.isRtlDir},o.prototype.setRtlDirection=function(h,u){for(var d=h.getCursorPosition(),l=h.selection.getSelectionAnchor().row;l<=d.row;l++)!u&&h.session.getLine(l).charAt(0)===h.session.$bidiHandler.RLE?h.session.doc.removeInLine(l,0,1):u&&h.session.getLine(l).charAt(0)!==h.session.$bidiHandler.RLE&&h.session.doc.insert({column:0,row:l},h.session.$bidiHandler.RLE)},o.prototype.getPosLeft=function(h){h-=this.wrapIndent;var u=this.line.charAt(0)===this.RLE?1:0,d=h>u?this.session.getOverwrite()?h:h-1:u,l=f.getVisualFromLogicalIdx(d,this.bidiMap),s=this.bidiMap.bidiLevels,r=0;!this.session.getOverwrite()&&h<=u&&s[l]%2!==0&&l++;for(var a=0;a<l;a++)r+=this.charWidths[s[a]];return!this.session.getOverwrite()&&h>u&&s[l]%2===0&&(r+=this.charWidths[s[l]]),this.wrapIndent&&(r+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(r+=this.rtlLineOffset),r},o.prototype.getSelections=function(h,u){var d=this.bidiMap,l=d.bidiLevels,s,r=[],a=0,p=Math.min(h,u)-this.wrapIndent,v=Math.max(h,u)-this.wrapIndent,y=!1,k=!1,x=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,S=0;S<l.length;S++)w=d.logicalFromVisual[S],s=l[S],y=w>=p&&w<v,y&&!k?x=a:!y&&k&&r.push({left:x,width:a-x}),a+=this.charWidths[s],k=y;if(y&&S===l.length&&r.push({left:x,width:a-x}),this.isRtlDir)for(var M=0;M<r.length;M++)r[M].left+=this.rtlLineOffset;return r},o.prototype.offsetToCol=function(d){this.isRtlDir&&(d-=this.rtlLineOffset);var u=0,d=Math.max(d,0),l=0,s=0,r=this.bidiMap.bidiLevels,a=this.charWidths[r[s]];for(this.wrapIndent&&(d-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);d>l+a/2;){if(l+=a,s===r.length-1){a=0;break}a=this.charWidths[r[++s]]}return s>0&&r[s-1]%2!==0&&r[s]%2===0?(d<l&&s--,u=this.bidiMap.logicalFromVisual[s]):s>0&&r[s-1]%2===0&&r[s]%2!==0?u=1+(d>l?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===r.length-1&&a===0&&r[s-1]%2===0||!this.isRtlDir&&s===0&&r[s]%2!==0?u=1+this.bidiMap.logicalFromVisual[s]:(s>0&&r[s-1]%2!==0&&a!==0&&s--,u=this.bidiMap.logicalFromVisual[s]),u===0&&this.isRtlDir&&u++,u+this.wrapIndent},o})()}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,n,m){"use strict";var f=t("./lib/oop"),g=t("./lib/lang"),c=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,h=(function(){function u(d){this.session=d,this.doc=d.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var l=this;this.cursor.on("change",function(s){l.$cursorChanged=!0,l.$silent||l._emit("changeCursor"),!l.$isEmpty&&!l.$silent&&l._emit("changeSelection"),!l.$keepDesiredColumnOnChange&&s.old.column!=s.value.column&&(l.$desiredColumn=null)}),this.anchor.on("change",function(){l.$anchorChanged=!0,!l.$isEmpty&&!l.$silent&&l._emit("changeSelection")})}return u.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},u.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},u.prototype.getCursor=function(){return this.lead.getPosition()},u.prototype.setAnchor=function(d,l){this.$isEmpty=!1,this.anchor.setPosition(d,l)},u.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},u.prototype.getSelectionLead=function(){return this.lead.getPosition()},u.prototype.isBackwards=function(){var d=this.anchor,l=this.lead;return d.row>l.row||d.row==l.row&&d.column>l.column},u.prototype.getRange=function(){var d=this.anchor,l=this.lead;return this.$isEmpty?o.fromPoints(l,l):this.isBackwards()?o.fromPoints(l,d):o.fromPoints(d,l)},u.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},u.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},u.prototype.setRange=function(d,l){var s=l?d.end:d.start,r=l?d.start:d.end;this.$setSelection(s.row,s.column,r.row,r.column)},u.prototype.$setSelection=function(d,l,s,r){if(!this.$silent){var a=this.$isEmpty,p=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(d,l),this.cursor.setPosition(s,r),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||a!=this.$isEmpty||p)&&this._emit("changeSelection")}},u.prototype.$moveSelection=function(d){var l=this.lead;this.$isEmpty&&this.setSelectionAnchor(l.row,l.column),d.call(this)},u.prototype.selectTo=function(d,l){this.$moveSelection(function(){this.moveCursorTo(d,l)})},u.prototype.selectToPosition=function(d){this.$moveSelection(function(){this.moveCursorToPosition(d)})},u.prototype.moveTo=function(d,l){this.clearSelection(),this.moveCursorTo(d,l)},u.prototype.moveToPosition=function(d){this.clearSelection(),this.moveCursorToPosition(d)},u.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},u.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},u.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},u.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},u.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},u.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},u.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},u.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},u.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},u.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},u.prototype.getWordRange=function(d,l){if(typeof l>"u"){var s=d||this.lead;d=s.row,l=s.column}return this.session.getWordRange(d,l)},u.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},u.prototype.selectAWord=function(){var d=this.getCursor(),l=this.session.getAWordRange(d.row,d.column);this.setSelectionRange(l)},u.prototype.getLineRange=function(d,l){var s=typeof d=="number"?d:this.lead.row,r,a=this.session.getFoldLine(s);return a?(s=a.start.row,r=a.end.row):r=s,l===!0?new o(s,0,r,this.session.getLine(r).length):new o(s,0,r+1,0)},u.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},u.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},u.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},u.prototype.wouldMoveIntoSoftTab=function(d,l,s){var r=d.column,a=d.column+l;return s<0&&(r=d.column-l,a=d.column),this.session.isTabStop(d)&&this.doc.getLine(d.row).slice(r,a).split(" ").length-1==l},u.prototype.moveCursorLeft=function(){var d=this.lead.getPosition(),l;if(l=this.session.getFoldAt(d.row,d.column,-1))this.moveCursorTo(l.start.row,l.start.column);else if(d.column===0)d.row>0&&this.moveCursorTo(d.row-1,this.doc.getLine(d.row-1).length);else{var s=this.session.getTabSize();this.wouldMoveIntoSoftTab(d,s,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-s):this.moveCursorBy(0,-1)}},u.prototype.moveCursorRight=function(){var d=this.lead.getPosition(),l;if(l=this.session.getFoldAt(d.row,d.column,1))this.moveCursorTo(l.end.row,l.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var s=this.session.getTabSize(),d=this.lead;this.wouldMoveIntoSoftTab(d,s,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,s):this.moveCursorBy(0,1)}},u.prototype.moveCursorLineStart=function(){var d=this.lead.row,l=this.lead.column,s=this.session.documentToScreenRow(d,l),r=this.session.screenToDocumentPosition(s,0),a=this.session.getDisplayLine(d,null,r.row,r.column).match(/^\s*/);a[0].length!=l&&!this.session.$useEmacsStyleLineStart&&(r.column+=a[0].length),this.moveCursorToPosition(r)},u.prototype.moveCursorLineEnd=function(){var d=this.lead,l=this.session.getDocumentLastRowColumnPosition(d.row,d.column);if(this.lead.column==l.column){var s=this.session.getLine(l.row);if(l.column==s.length){var r=s.search(/\s+$/);r>0&&(l.column=r)}}this.moveCursorTo(l.row,l.column)},u.prototype.moveCursorFileEnd=function(){var d=this.doc.getLength()-1,l=this.doc.getLine(d).length;this.moveCursorTo(d,l)},u.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},u.prototype.moveCursorLongWordRight=function(){var d=this.lead.row,l=this.lead.column,s=this.doc.getLine(d),r=s.substring(l);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var a=this.session.getFoldAt(d,l,1);if(a){this.moveCursorTo(a.end.row,a.end.column);return}if(this.session.nonTokenRe.exec(r)&&(l+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=s.substring(l)),l>=s.length){this.moveCursorTo(d,s.length),this.moveCursorRight(),d<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(r)&&(l+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(d,l)},u.prototype.moveCursorLongWordLeft=function(){var d=this.lead.row,l=this.lead.column,s;if(s=this.session.getFoldAt(d,l,-1)){this.moveCursorTo(s.start.row,s.start.column);return}var r=this.session.getFoldStringAt(d,l,-1);r==null&&(r=this.doc.getLine(d).substring(0,l));var a=g.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(a)&&(l-=this.session.nonTokenRe.lastIndex,a=a.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),l<=0){this.moveCursorTo(d,0),this.moveCursorLeft(),d>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(a)&&(l-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(d,l)},u.prototype.$shortWordEndIndex=function(d){var l=0,s,r=/\s/,a=this.session.tokenRe;if(a.lastIndex=0,this.session.tokenRe.exec(d))l=this.session.tokenRe.lastIndex;else{for(;(s=d[l])&&r.test(s);)l++;if(l<1){for(a.lastIndex=0;(s=d[l])&&!a.test(s);)if(a.lastIndex=0,l++,r.test(s))if(l>2){l--;break}else{for(;(s=d[l])&&r.test(s);)l++;if(l>2)break}}}return a.lastIndex=0,l},u.prototype.moveCursorShortWordRight=function(){var d=this.lead.row,l=this.lead.column,s=this.doc.getLine(d),r=s.substring(l),a=this.session.getFoldAt(d,l,1);if(a)return this.moveCursorTo(a.end.row,a.end.column);if(l==s.length){var p=this.doc.getLength();do d++,r=this.doc.getLine(d);while(d<p&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),l=0}var v=this.$shortWordEndIndex(r);this.moveCursorTo(d,l+v)},u.prototype.moveCursorShortWordLeft=function(){var d=this.lead.row,l=this.lead.column,s;if(s=this.session.getFoldAt(d,l,-1))return this.moveCursorTo(s.start.row,s.start.column);var r=this.session.getLine(d).substring(0,l);if(l===0){do d--,r=this.doc.getLine(d);while(d>0&&/^\s*$/.test(r));l=r.length,/\s+$/.test(r)||(r="")}var a=g.stringReverse(r),p=this.$shortWordEndIndex(a);return this.moveCursorTo(d,l-p)},u.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},u.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},u.prototype.moveCursorBy=function(d,l){var s=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r;if(l===0&&(d!==0&&(this.session.$bidiHandler.isBidiRow(s.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(s.column),s.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=s.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?s.column=this.$desiredColumn:this.$desiredColumn=s.column),d!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var a=this.session.lineWidgets[this.lead.row];d<0?d-=a.rowsAbove||0:d>0&&(d+=a.rowCount-(a.rowsAbove||0))}var p=this.session.screenToDocumentPosition(s.row+d,s.column,r);d!==0&&l===0&&p.row===this.lead.row&&(p.column,this.lead.column),this.moveCursorTo(p.row,p.column+l,l===0)},u.prototype.moveCursorToPosition=function(d){this.moveCursorTo(d.row,d.column)},u.prototype.moveCursorTo=function(d,l,s){var r=this.session.getFoldAt(d,l,1);r&&(d=r.start.row,l=r.start.column),this.$keepDesiredColumnOnChange=!0;var a=this.session.getLine(d);/[\uDC00-\uDFFF]/.test(a.charAt(l))&&a.charAt(l-1)&&(this.lead.row==d&&this.lead.column==l+1?l=l-1:l=l+1),this.lead.setPosition(d,l),this.$keepDesiredColumnOnChange=!1,s||(this.$desiredColumn=null)},u.prototype.moveCursorToScreen=function(d,l,s){var r=this.session.screenToDocumentPosition(d,l);this.moveCursorTo(r.row,r.column,s)},u.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},u.prototype.fromOrientedRange=function(d){this.setSelectionRange(d,d.cursor==d.start),this.$desiredColumn=d.desiredColumn||this.$desiredColumn},u.prototype.toOrientedRange=function(d){var l=this.getRange();return d?(d.start.column=l.start.column,d.start.row=l.start.row,d.end.column=l.end.column,d.end.row=l.end.row):d=l,d.cursor=this.isBackwards()?d.start:d.end,d.desiredColumn=this.$desiredColumn,d},u.prototype.getRangeOfMovements=function(d){var l=this.getCursor();try{d(this);var s=this.getCursor();return o.fromPoints(l,s)}catch{return o.fromPoints(l,l)}finally{this.moveCursorToPosition(l)}},u.prototype.toJSON=function(){if(this.rangeCount)var d=this.ranges.map(function(l){var s=l.clone();return s.isBackwards=l.cursor==l.start,s});else{var d=this.getRange();d.isBackwards=this.isBackwards()}return d},u.prototype.fromJSON=function(d){if(d.start==null)if(this.rangeList&&d.length>1){this.toSingleRange(d[0]);for(var l=d.length;l--;){var s=o.fromPoints(d[l].start,d[l].end);d[l].isBackwards&&(s.cursor=s.start),this.addRange(s,!0)}return}else d=d[0];this.rangeList&&this.toSingleRange(d),this.setSelectionRange(d,d.isBackwards)},u.prototype.isEqual=function(d){if((d.length||this.rangeCount)&&d.length!=this.rangeCount)return!1;if(!d.length||!this.ranges)return this.getRange().isEqual(d);for(var l=this.ranges.length;l--;)if(!this.ranges[l].isEqual(d[l]))return!1;return!0},u})();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,f.implement(h.prototype,c),n.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,n,m){"use strict";var f=t("./lib/report_error").reportError,g=2e3,c=(function(){function o(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var u in this.states){for(var d=this.states[u],l=[],s=0,r=this.matchMappings[u]={defaultToken:"text"},a="g",p=[],v=0;v<d.length;v++){var y=d[v];if(y.defaultToken&&(r.defaultToken=y.defaultToken),y.caseInsensitive&&a.indexOf("i")===-1&&(a+="i"),y.unicode&&a.indexOf("u")===-1&&(a+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var k=y.regex,x=new RegExp("(?:("+k+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||x==1?y.token=y.token[0]:x-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:x-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(x>1?y.onMatch=this.$applyToken:y.onMatch=y.token),x>1&&(/\\\d/.test(y.regex)?k=y.regex.replace(/\\([0-9]+)/g,function(w,S){return"\\"+(parseInt(S,10)+s+1)}):(x=1,k=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&p.push(y)),r[s]=v,s+=x,l.push(k),y.onMatch||(y.onMatch=null)}}l.length||(r[0]=0,l.push("$")),p.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,a)},this),this.regExps[u]=new RegExp("("+l.join(")|(")+")|($)",a)}}return o.prototype.$setMaxTokenCount=function(h){g=h|0},o.prototype.$applyToken=function(h){var u=this.splitRegex.exec(h).slice(1),d=this.token.apply(this,u);if(typeof d=="string")return[{type:d,value:h}];for(var l=[],s=0,r=d.length;s<r;s++)u[s]&&(l[l.length]={type:d[s],value:u[s]});return l},o.prototype.$arrayTokens=function(h){if(!h)return[];var u=this.splitRegex.exec(h);if(!u)return"text";for(var d=[],l=this.tokenArray,s=0,r=l.length;s<r;s++)u[s+1]&&(d[d.length]={type:l[s],value:u[s+1]});return d},o.prototype.removeCapturingGroups=function(h){return h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(u,d){return d?"(?:":u})},o.prototype.createSplitterRegexp=function(h,u){if(h.indexOf("(?=")!=-1){var d=0,l=!1,s={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(r,a,p,v,y,k){return l?l=y!="]":y?l=!0:v?(d==s.stack&&(s.end=k+1,s.stack=-1),d--):p&&(d++,p.length!=1&&(s.stack=d,s.start=k)),r}),s.end!=null&&/^\)*$/.test(h.substr(s.end))&&(h=h.substring(0,s.start)+h.substr(s.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(u||"").replace("g",""))},o.prototype.getLineTokens=function(h,u){if(u&&typeof u!="string"){var d=u.slice(0);u=d[0],u==="#tmp"&&(d.shift(),u=d.shift())}else var d=[];var l=u||"start",s=this.states[l];s||(l="start",s=this.states[l]);var r=this.matchMappings[l],a=this.regExps[l];a.lastIndex=0;for(var p,v=[],y=0,k=0,x={type:null,value:""};p=a.exec(h);){var w=r.defaultToken,S=null,M=p[0],L=a.lastIndex;if(L-M.length>y){var R=h.substring(y,L-M.length);x.type==w?x.value+=R:(x.type&&v.push(x),x={type:w,value:R})}for(var $=0;$<p.length-2;$++)if(p[$+1]!==void 0){S=s[r[$]],S.onMatch?w=S.onMatch(M,l,d,h):w=S.token,S.next&&(typeof S.next=="string"?l=S.next:l=S.next(l,d),s=this.states[l],s||(this.reportError("state doesn't exist",l),l="start",s=this.states[l]),r=this.matchMappings[l],y=L,a=this.regExps[l],a.lastIndex=L),S.consumeLineEnd&&(y=L);break}if(M){if(typeof w=="string")(!S||S.merge!==!1)&&x.type===w?x.value+=M:(x.type&&v.push(x),x={type:w,value:M});else if(w){x.type&&v.push(x),x={type:null,value:""};for(var $=0;$<w.length;$++)v.push(w[$])}}if(y==h.length)break;if(y=L,k++>g){for(k>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:u,line:h});y<h.length;)x.type&&v.push(x),x={value:h.substring(y,y+=500),type:"overflow"};l="start",d=[];break}}return x.type&&v.push(x),d.length>1&&d[0]!==l&&d.unshift("#tmp",l),{tokens:v,state:d.length?d:l}},o})();c.prototype.reportError=f,n.Tokenizer=c}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,n,m){"use strict";var f=t("../lib/deep_copy").deepCopy,g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(h,u){if(!u){for(var d in h)this.$rules[d]=h[d];return}for(var d in h){for(var l=h[d],s=0;s<l.length;s++){var r=l[s];(r.next||r.onMatch)&&(typeof r.next=="string"&&r.next.indexOf(u)!==0&&(r.next=u+r.next),r.nextState&&r.nextState.indexOf(u)!==0&&(r.nextState=u+r.nextState))}this.$rules[u+d]=l}},this.getRules=function(){return this.$rules},this.embedRules=function(h,u,d,l,s){var r=typeof h=="function"?new h().getRules():h;if(l)for(var a=0;a<l.length;a++)l[a]=u+l[a];else{l=[];for(var p in r)l.push(u+p)}if(this.addRules(r,u),d)for(var v=Array.prototype[s?"push":"unshift"],a=0;a<l.length;a++)v.apply(this.$rules[l[a]],f(d));this.$embeds||(this.$embeds=[]),this.$embeds.push(u)},this.getEmbeds=function(){return this.$embeds};var c=function(h,u){return(h!="start"||u.length)&&u.unshift(this.nextState,h),this.nextState},o=function(h,u){return u.shift(),u.shift()||"start"};this.normalizeRules=function(){var h=0,u=this.$rules;function d(l){var s=u[l];s.processed=!0;for(var r=0;r<s.length;r++){var a=s[r],p=null;Array.isArray(a)&&(p=a,a={}),!a.regex&&a.start&&(a.regex=a.start,a.next||(a.next=[]),a.next.push({defaultToken:a.token},{token:a.token+".end",regex:a.end||a.start,next:"pop"}),a.token=a.token+".start",a.push=!0);var v=a.next||a.push;if(v&&Array.isArray(v)){var y=a.stateName;y||(y=a.token,typeof y!="string"&&(y=y[0]||""),u[y]&&(y+=h++)),u[y]=v,a.next=y,d(y)}else v=="pop"&&(a.next=o);if(a.push&&(a.nextState=a.next||a.push,a.next=c,delete a.push),a.rules)for(var k in a.rules)u[k]?u[k].push&&u[k].push.apply(u[k],a.rules[k]):u[k]=a.rules[k];var x=typeof a=="string"?a:a.include;if(x&&(x==="$self"&&(x="start"),Array.isArray(x)?p=x.map(function(S){return u[S]}):p=u[x]),p){var w=[r,1].concat(p);a.noEscape&&(w=w.filter(function(S){return!S.next})),s.splice.apply(s,w),r--}a.keywordMap&&(a.token=this.createKeywordMapper(a.keywordMap,a.defaultToken||"text",a.caseInsensitive),delete a.defaultToken)}}Object.keys(u).forEach(d,this)},this.createKeywordMapper=function(h,u,d,l){var s=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(r){for(var a=h[r].split(l||"|"),p=a.length;p--;){var v=a[p];this.$keywordList.push(v),d&&(v=v.toLowerCase()),s[v]=r}},this),h=null,d?function(r){return s[r.toLowerCase()]||u}:function(r){return s[r]||u}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),n.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(t,n,m){"use strict";var f=function(){this.$behaviours={}};(function(){this.add=function(g,c,o){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][c]=o},this.addBehaviours=function(g){for(var c in g)for(var o in g[c])this.add(c,o,g[c][o])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,c){if(typeof g=="function")var o=new g().getBehaviours(c);else var o=g.getBehaviours(c);this.addBehaviours(o)},this.getBehaviours=function(g){if(g){for(var c={},o=0;o<g.length;o++)this.$behaviours[g[o]]&&(c[g[o]]=this.$behaviours[g[o]]);return c}else return this.$behaviours}}).call(f.prototype),n.Behaviour=f}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(t,n,m){"use strict";var f=t("./range").Range;n.TokenIterator=(function(){function g(c,o,h){this.$session=c,this.$row=o,this.$rowTokens=c.getTokens(o);var u=c.getTokenAt(o,h);this.$tokenIndex=u?u.index:-1}return g.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},g.prototype.stepForward=function(){this.$tokenIndex+=1;for(var c;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,c||(c=this.$session.getLength()),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentTokenRow=function(){return this.$row},g.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,o=this.$tokenIndex,h=c[o].start;if(h!==void 0)return h;for(h=0;o>0;)o-=1,h+=c[o].value.length;return h},g.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},g.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],o=this.getCurrentTokenColumn();return new f(this.$row,o,this.$row,o+c.value.length)},g})()}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,n,m){"use strict";var f=t("../../lib/oop"),g=t("../behaviour").Behaviour,c=t("../../token_iterator").TokenIterator,o=t("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],d,l={},s={'"':'"',"'":"'"},r=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,l.rangeCount!=v.multiSelect.rangeCount&&(l={rangeCount:v.multiSelect.rangeCount})),l[y])return d=l[y];d=l[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},a=function(v,y,k,x){var w=v.end.row-v.start.row;return{text:k+y+x,selection:[0,v.start.column+1,w,v.end.column+(w?0:1)]}},p=function(v){v=v||{},this.add("braces","insertion",function(y,k,x,w,S){var M=x.getCursorPosition(),L=w.doc.getLine(M.row);if(S=="{"){r(x);var R=x.getSelectionRange(),$=w.doc.getTextRange(R),D=w.getTokenAt(M.row,M.column);if($!==""&&$!=="{"&&x.getWrapBehavioursEnabled())return a(R,$,"{","}");if(D&&/(?:string)\.quasi|\.xml/.test(D.type))return[/tag\-(?:open|name)/,/attribute\-name/].some(function(_){return _.test(D.type)})||/(string)\.quasi/.test(D.type)&&D.value[M.column-D.start-1]!=="$"?void 0:(p.recordAutoInsert(x,w,"}"),{text:"{}",selection:[1,1]});if(p.isSaneInsertion(x,w))return/[\]\}\)]/.test(L[M.column])||x.inMultiSelectMode||v.braces?(p.recordAutoInsert(x,w,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(x,w,"{"),{text:"{",selection:[1,1]})}else if(S=="}"){r(x);var T=L.substring(M.column,M.column+1);if(T=="}"&&w.$findOpeningBracket("}",{column:M.column+1,row:M.row})!==null&&p.isAutoInsertedClosing(M,L,S))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else if(S==`
1343
1345
  `||S==`\r
1344
- `){i($);var x="";f.isMaybeInsertedClosing(M,R)&&(x=c.stringRepeat("}",o.maybeInsertedBrackets),f.clearMaybeInsertedClosing());var v=R.substring(M.column,M.column+1);if(v==="}"){var _=A.findMatchingBracket({row:M.row,column:M.column+1},"}");if(!_)return null;var k=this.$getIndent(A.getLine(_.row))}else if(x)var k=this.$getIndent(R);else{f.clearMaybeInsertedClosing();return}var O=k+A.getTabString();return{text:`
1345
- `+O+`
1346
- `+k+x,selection:[1,O.length,1,O.length]}}else f.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,E,$,A,S){var M=A.doc.getTextRange(S);if(!S.isMultiLine()&&M=="{"){i($);var R=A.doc.getLine(S.start.row),L=R.substring(S.end.column,S.end.column+1);if(L=="}")return S.end.column++,S;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,E,$,A,S){if(S=="("){i($);var M=$.getSelectionRange(),R=A.doc.getTextRange(M);if(R!==""&&$.getWrapBehavioursEnabled())return u(M,R,"(",")");if(f.isSaneInsertion($,A))return f.recordAutoInsert($,A,")"),{text:"()",selection:[1,1]}}else if(S==")"){i($);var L=$.getCursorPosition(),T=A.doc.getLine(L.row),D=T.substring(L.column,L.column+1);if(D==")"){var w=A.$findOpeningBracket(")",{column:L.column+1,row:L.row});if(w!==null&&f.isAutoInsertedClosing(L,T,S))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,E,$,A,S){var M=A.doc.getTextRange(S);if(!S.isMultiLine()&&M=="("){i($);var R=A.doc.getLine(S.start.row),L=R.substring(S.start.column+1,S.start.column+2);if(L==")")return S.end.column++,S}}),this.add("brackets","insertion",function(b,E,$,A,S){if(S=="["){i($);var M=$.getSelectionRange(),R=A.doc.getTextRange(M);if(R!==""&&$.getWrapBehavioursEnabled())return u(M,R,"[","]");if(f.isSaneInsertion($,A))return f.recordAutoInsert($,A,"]"),{text:"[]",selection:[1,1]}}else if(S=="]"){i($);var L=$.getCursorPosition(),T=A.doc.getLine(L.row),D=T.substring(L.column,L.column+1);if(D=="]"){var w=A.$findOpeningBracket("]",{column:L.column+1,row:L.row});if(w!==null&&f.isAutoInsertedClosing(L,T,S))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,E,$,A,S){var M=A.doc.getTextRange(S);if(!S.isMultiLine()&&M=="["){i($);var R=A.doc.getLine(S.start.row),L=R.substring(S.start.column+1,S.start.column+2);if(L=="]")return S.end.column++,S}}),this.add("string_dquotes","insertion",function(b,E,$,A,S){var M=A.$mode.$quotes||s;if(S.length==1&&M[S]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(S)!=-1)return;i($);var R=S,L=$.getSelectionRange(),T=A.doc.getTextRange(L);if(T!==""&&(T.length!=1||!M[T])&&$.getWrapBehavioursEnabled())return u(L,T,R,R);if(!T){var D=$.getCursorPosition(),w=A.doc.getLine(D.row),v=w.substring(D.column-1,D.column),C=w.substring(D.column,D.column+1),x=A.getTokenAt(D.row,D.column),_=A.getTokenAt(D.row,D.column+1);if(v=="\\"&&x&&/escape/.test(x.type))return null;var k=x&&/string|escape/.test(x.type),O=!_||/string|escape/.test(_.type),I;if(C==R)I=k!==O,I&&/string\.end/.test(_.type)&&(I=!1);else{if(k&&!O||k&&O)return null;var N=A.$mode.tokenRe;N.lastIndex=0;var P=N.test(v);N.lastIndex=0;var B=N.test(C),F=A.$mode.$pairQuotesAfter,H=F&&F[R]&&F[R].test(v);if(!H&&P||B||C&&!/[\s;,.})\]\\]/.test(C))return null;var z=w[D.column-2];if(v==R&&(z==R||N.test(z)))return null;I=!0}return{text:I?R+R:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,E,$,A,S){var M=A.$mode.$quotes||s,R=A.doc.getTextRange(S);if(!S.isMultiLine()&&M.hasOwnProperty(R)){i($);var L=A.doc.getLine(S.start.row),T=L.substring(S.start.column+1,S.start.column+2);if(T==R)return S.end.column++,S}}),y.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,E,$,A,S){if(b==="doc-start"&&(S===`
1346
+ `){r(x);var E="";p.isMaybeInsertedClosing(M,L)&&(E=o.stringRepeat("}",d.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var T=L.substring(M.column,M.column+1);if(T==="}"){var C=w.findMatchingBracket({row:M.row,column:M.column+1},"}");if(!C)return null;var b=this.$getIndent(w.getLine(C.row))}else if(E)var b=this.$getIndent(L);else{p.clearMaybeInsertedClosing();return}var A=b+w.getTabString();return{text:`
1347
+ `+A+`
1348
+ `+b+E,selection:[1,A.length,1,A.length]}}else p.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,k,x,w,S){var M=w.doc.getTextRange(S);if(!S.isMultiLine()&&M=="{"){if(r(x),w.doc.getLine(S.start.row).substring(S.end.column,S.end.column+1)=="}")return S.end.column++,S;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,k,x,w,S){if(S=="("){r(x);var M=x.getSelectionRange(),L=w.doc.getTextRange(M);if(L!==""&&x.getWrapBehavioursEnabled())return a(M,L,"(",")");if(p.isSaneInsertion(x,w))return p.recordAutoInsert(x,w,")"),{text:"()",selection:[1,1]}}else if(S==")"){r(x);var R=x.getCursorPosition(),$=w.doc.getLine(R.row);if($.substring(R.column,R.column+1)==")"&&w.$findOpeningBracket(")",{column:R.column+1,row:R.row})!==null&&p.isAutoInsertedClosing(R,$,S))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(y,k,x,w,S){var M=w.doc.getTextRange(S);if(!S.isMultiLine()&&M=="("&&(r(x),w.doc.getLine(S.start.row).substring(S.start.column+1,S.start.column+2)==")"))return S.end.column++,S}),this.add("brackets","insertion",function(y,k,x,w,S){if(S=="["){r(x);var M=x.getSelectionRange(),L=w.doc.getTextRange(M);if(L!==""&&x.getWrapBehavioursEnabled())return a(M,L,"[","]");if(p.isSaneInsertion(x,w))return p.recordAutoInsert(x,w,"]"),{text:"[]",selection:[1,1]}}else if(S=="]"){r(x);var R=x.getCursorPosition(),$=w.doc.getLine(R.row);if($.substring(R.column,R.column+1)=="]"&&w.$findOpeningBracket("]",{column:R.column+1,row:R.row})!==null&&p.isAutoInsertedClosing(R,$,S))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(y,k,x,w,S){var M=w.doc.getTextRange(S);if(!S.isMultiLine()&&M=="["&&(r(x),w.doc.getLine(S.start.row).substring(S.start.column+1,S.start.column+2)=="]"))return S.end.column++,S}),this.add("string_dquotes","insertion",function(y,k,x,w,S){var M=w.$mode.$quotes||s;if(S.length==1&&M[S]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(S)!=-1)return;r(x);var L=S,R=x.getSelectionRange(),$=w.doc.getTextRange(R);if($!==""&&($.length!=1||!M[$])&&x.getWrapBehavioursEnabled())return a(R,$,L,L);if(!$){var D=x.getCursorPosition(),T=w.doc.getLine(D.row),E=T.substring(D.column-1,D.column),C=T.substring(D.column,D.column+1),b=w.getTokenAt(D.row,D.column),A=w.getTokenAt(D.row,D.column+1);if(E=="\\"&&b&&/escape/.test(b.type))return null;var _=b&&/string|escape/.test(b.type),O=!A||/string|escape/.test(A.type),I;if(C==L)I=_!==O,I&&/string\.end/.test(A.type)&&(I=!1);else{if(_&&!O||_&&O)return null;var N=w.$mode.tokenRe;N.lastIndex=0;var F=N.test(E);N.lastIndex=0;var z=N.test(C),P=w.$mode.$pairQuotesAfter;if(!(P&&P[L]&&P[L].test(E))&&F||z||C&&!/[\s;,.})\]\\]/.test(C))return null;var W=T[D.column-2];if(E==L&&(W==L||N.test(W)))return null;I=!0}return{text:I?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,k,x,w,S){var M=w.$mode.$quotes||s,L=w.doc.getTextRange(S);if(!S.isMultiLine()&&M.hasOwnProperty(L)&&(r(x),w.doc.getLine(S.start.row).substring(S.start.column+1,S.start.column+2)==L))return S.end.column++,S}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,k,x,w,S){if(y==="doc-start"&&(S===`
1347
1349
  `||S===`\r
1348
- `)&&$.selection.isEmpty()){var M=$.getCursorPosition();if(M.column===0)return;for(var R=A.doc.getLine(M.row),L=A.doc.getLine(M.row+1),T=A.getTokens(M.row),D=0,w=0;w<T.length;w++){D+=T[w].value.length;var v=T[w];if(D>=M.column){if(D===M.column){if(!/\.doc/.test(v.type))return;if(/\*\//.test(v.value)){var C=T[w+1];if(!C||!/\.doc/.test(C.type))return}}var x=M.column-(D-v.value.length),_=v.value.indexOf("*/"),k=v.value.indexOf("/**",_>-1?_+2:0);if(k!==-1&&x>k&&x<k+3||_!==-1&&k!==-1&&x>=_&&x<=k||!/\.doc/.test(v.type))return;break}}var O=this.$getIndent(R);if(/\s*\*/.test(L))return/^\s*\*/.test(R)?{text:S+O+"* ",selection:[1,2+O.length,1,2+O.length]}:{text:S+O+" * ",selection:[1,3+O.length,1,3+O.length]};if(/\/\*\*/.test(R.substring(0,M.column)))return{text:S+O+" * "+S+" "+O+"*/",selection:[1,4+O.length,1,4+O.length]}}})},f.isSaneInsertion=function(y,b){var E=y.getCursorPosition(),$=new m(b,E.row,E.column);if(!this.$matchTokenType($.getCurrentToken()||"text",d)){if(/[)}\]]/.test(y.session.getLine(E.row)[E.column]))return!0;var A=new m(b,E.row,E.column+1);if(!this.$matchTokenType(A.getCurrentToken()||"text",d))return!1}return $.stepForward(),$.getCurrentTokenRow()!==E.row||this.$matchTokenType($.getCurrentToken()||"text",r)},f.$matchTokenType=function(y,b){return b.indexOf(y.type||y)>-1},f.recordAutoInsert=function(y,b,E){var $=y.getCursorPosition(),A=b.doc.getLine($.row);this.isAutoInsertedClosing($,A,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=$.row,o.autoInsertedLineEnd=E+A.substr($.column),o.autoInsertedBrackets++},f.recordMaybeInsert=function(y,b,E){var $=y.getCursorPosition(),A=b.doc.getLine($.row);this.isMaybeInsertedClosing($,A)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=$.row,o.maybeInsertedLineStart=A.substr(0,$.column)+E,o.maybeInsertedLineEnd=A.substr($.column),o.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(y,b,E){return o.autoInsertedBrackets>0&&y.row===o.autoInsertedRow&&E===o.autoInsertedLineEnd[0]&&b.substr(y.column)===o.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(y,b){return o.maybeInsertedBrackets>0&&y.row===o.maybeInsertedRow&&b.substr(y.column)===o.maybeInsertedLineEnd&&b.substr(0,y.column)==o.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},h.inherits(f,g),n.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(t,n,p){for(var h=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],g=0,m=[],c=0;c<h.length;c+=2)m.push(g+=h[c]),h[c+1]&&m.push(45,g+=h[c+1]);n.wordChars=String.fromCharCode.apply(null,m)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(t,n,p){var h=t("../config"),g=t("../tokenizer").Tokenizer,m=t("./text_highlight_rules").TextHighlightRules,c=t("./behaviour/cstyle").CstyleBehaviour,d=t("../unicode"),r=t("../lib/lang"),o=t("../token_iterator").TokenIterator,a=t("../range").Range,s;s=function(){this.HighlightRules=m},(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+d.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(i,u,f,y){var b=u.doc,E=!0,$=!0,A=1/0,S=u.getTabSize(),M=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var T=this.lineCommentStart.map(r.escapeRegExp).join("|"),R=this.lineCommentStart[0];else var T=r.escapeRegExp(this.lineCommentStart),R=this.lineCommentStart;T=new RegExp("^(\\s*)(?:"+T+") ?"),M=u.getUseSoftTabs();var v=function(B,F){var H=B.match(T);if(H){var z=H[1].length,W=H[0].length;!_(B,z,W)&&H[0][W-1]==" "&&W--,b.removeInLine(F,z,W)}},x=R+" ",w=function(B,F){(!E||/\S/.test(B))&&(_(B,A,A)?b.insertInLine({row:F,column:A},x):b.insertInLine({row:F,column:A},R))},C=function(B,F){return T.test(B)},_=function(B,F,H){for(var z=0;F--&&B.charAt(F)==" ";)z++;if(z%S!=0)return!1;for(var z=0;B.charAt(H++)==" ";)z++;return S>2?z%S!=S-1:z%S==0}}else{if(!this.blockComment)return!1;var R=this.blockComment.start,L=this.blockComment.end,T=new RegExp("^(\\s*)(?:"+r.escapeRegExp(R)+")"),D=new RegExp("(?:"+r.escapeRegExp(L)+")\\s*$"),w=function(I,N){C(I,N)||(!E||/\S/.test(I))&&(b.insertInLine({row:N,column:I.length},L),b.insertInLine({row:N,column:A},R))},v=function(I,N){var P;(P=I.match(D))&&b.removeInLine(N,I.length-P[0].length,I.length),(P=I.match(T))&&b.removeInLine(N,P[1].length,P[0].length)},C=function(I,N){if(T.test(I))return!0;for(var P=u.getTokens(N),B=0;B<P.length;B++)if(P[B].type==="comment")return!0}}function k(I){for(var N=f;N<=y;N++)I(b.getLine(N),N)}var O=1/0;k(function(I,N){var P=I.search(/\S/);P!==-1?(P<A&&(A=P),$&&!C(I,N)&&($=!1)):O>I.length&&(O=I.length)}),A==1/0&&(A=O,E=!1,$=!1),M&&A%S!=0&&(A=Math.floor(A/S)*S),k($?v:w)},this.toggleBlockComment=function(i,u,f,y){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var E=new o(u,y.row,y.column),$=E.getCurrentToken();u.selection;var A=u.selection.toOrientedRange(),S,M;if($&&/comment/.test($.type)){for(var R,L;$&&/comment/.test($.type);){var T=$.value.indexOf(b.start);if(T!=-1){var D=E.getCurrentTokenRow(),w=E.getCurrentTokenColumn()+T;R=new a(D,w,D,w+b.start.length);break}$=E.stepBackward()}for(var E=new o(u,y.row,y.column),$=E.getCurrentToken();$&&/comment/.test($.type);){var T=$.value.indexOf(b.end);if(T!=-1){var D=E.getCurrentTokenRow(),w=E.getCurrentTokenColumn()+T;L=new a(D,w,D,w+b.end.length);break}$=E.stepForward()}L&&u.remove(L),R&&(u.remove(R),S=R.start.row,M=-b.start.length)}else M=b.start.length,S=f.start.row,u.insert(f.end,b.end),u.insert(f.start,b.start);A.start.row==S&&(A.start.column+=M),A.end.row==S&&(A.end.column+=M),u.selection.fromOrientedRange(A)}},this.getNextLineIndent=function(i,u,f){return this.$getIndent(u)},this.checkOutdent=function(i,u,f){return!1},this.autoOutdent=function(i,u,f){},this.$getIndent=function(i){return i.match(/^\s*/)[0]},this.createWorker=function(i){return null},this.createModeDelegates=function(i){this.$embeds=[],this.$modes={};for(var u in i)if(i[u]){var f=i[u],y=f.prototype.$id,b=h.$modes[y];b||(h.$modes[y]=b=new f),h.$modes[u]||(h.$modes[u]=b),this.$embeds.push(u),this.$modes[u]=b}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(S){(function(M){var R=E[S],L=M[R];M[E[S]]=function(){return this.$delegator(R,arguments,L)}})(A)},A=this,u=0;u<E.length;u++)$(u)},this.$delegator=function(i,u,f){var y=u[0]||"start";if(typeof y!="string"){if(Array.isArray(y[2])){var b=y[2][y[2].length-1],E=this.$modes[b];if(E)return E[i].apply(E,[y[1]].concat([].slice.call(u,1)))}y=y[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var A=y.split(this.$embeds[$]);if(!A[0]&&A[1]){u[0]=A[1];var E=this.$modes[this.$embeds[$]];return E[i].apply(E,u)}}var S=f.apply(this,u);return f?S:void 0},this.transformAction=function(i,u,f,y,b){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var $ in E)if(E[$][u]){var A=E[$][u].apply(this,arguments);if(A)return A}}},this.getKeywords=function(i){if(!this.completionKeywords){var u=this.$tokenizer.rules,f=[];for(var y in u)for(var b=u[y],E=0,$=b.length;E<$;E++)if(typeof b[E].token=="string")/keyword|support|storage/.test(b[E].token)&&f.push(b[E].regex);else if(typeof b[E].token=="object"){for(var A=0,S=b[E].token.length;A<S;A++)if(/keyword|support|storage/.test(b[E].token[A])){var y=b[E].regex.match(/\(.+?\)/g)[A];f.push(y.substr(1,y.length-2))}}this.completionKeywords=f}return i?f.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(i,u,f,y){var b=this.$keywordList||this.$createKeywordList();return b.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(s.prototype),n.Mode=s}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,n,p){var h=t("./lib/dom"),g=(function(){function m(c){this.session=c,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return m.prototype.getRowLength=function(c){var d;return this.lineWidgets?d=this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0:d=0,!this.$useWrapMode||!this.$wrapData[c]?1+d:this.$wrapData[c].length+1+d},m.prototype.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(c+=d.rowCount)}),c},m.prototype.$onChangeEditor=function(c){this.attach(c.editor)},m.prototype.attach=function(c){c&&c.widgetManager&&c.widgetManager!=this&&c.widgetManager.detach(),this.editor!=c&&(this.detach(),this.editor=c,c&&(c.widgetManager=this,c.renderer.on("beforeRender",this.measureWidgets),c.renderer.on("afterRender",this.renderWidgets)))},m.prototype.detach=function(c){var d=this.editor;if(d){this.editor=null,d.widgetManager=null,d.renderer.off("beforeRender",this.measureWidgets),d.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},m.prototype.updateOnFold=function(c,d){var r=d.lineWidgets;if(!(!r||!c.action)){for(var o=c.data,a=o.start.row,s=o.end.row,i=c.action=="add",u=a+1;u<s;u++)r[u]&&(r[u].hidden=i);r[s]&&(i?r[a]?r[s].hidden=i:r[a]=r[s]:(r[a]==r[s]&&(r[a]=void 0),r[s].hidden=i))}},m.prototype.updateOnChange=function(c){var d=this.session.lineWidgets;if(d){var r=c.start.row,o=c.end.row-r;if(o!==0)if(c.action=="remove"){var a=d.splice(r+1,o);!d[r]&&a[a.length-1]&&(d[r]=a.pop()),a.forEach(function(i){i&&this.removeLineWidget(i)},this),this.$updateRows()}else{var s=new Array(o);d[r]&&d[r].column!=null&&c.start.column>d[r].column&&r++,s.unshift(r,0),d.splice.apply(d,s),this.$updateRows()}}},m.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var d=!0;c.forEach(function(r,o){if(r)for(d=!1,r.row=o;r.$oldWidget;)r.$oldWidget.row=o,r=r.$oldWidget}),d&&(this.session.lineWidgets=null)}},m.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var d=this.session.lineWidgets[c.row];return d&&(c.$oldWidget=d,d.el&&d.el.parentNode&&(d.el.parentNode.removeChild(d.el),d._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},m.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var d=this.editor.renderer;c.html&&!c.el&&(c.el=h.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=h.createElement("div"),c.el.textContent=c.text),c.el&&(h.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&h.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex="5",d.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex="3"),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/d.layerConfig.lineHeight);var r=this.session.getFoldAt(c.row,0);if(c.$fold=r,r){var o=this.session.lineWidgets;c.row==r.end.row&&!o[r.start.row]?o[r.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,d),this.onWidgetChanged(c),c},m.prototype.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var d=this.session.lineWidgets[c.row];if(d==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;d;){if(d.$oldWidget==c){d.$oldWidget=c.$oldWidget;break}d=d.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},m.prototype.getWidgetsAtRow=function(c){for(var d=this.session.lineWidgets,r=d&&d[c],o=[];r;)o.push(r),r=r.$oldWidget;return o},m.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},m.prototype.measureWidgets=function(c,d){var r=this.session._changedWidgets,o=d.layerConfig;if(!(!r||!r.length)){for(var a=1/0,s=0;s<r.length;s++){var i=r[s];if(!(!i||!i.el)&&i.session==this.session){if(!i._inDocument){if(this.session.lineWidgets[i.row]!=i)continue;i._inDocument=!0,d.container.appendChild(i.el)}i.h=i.el.offsetHeight,i.fixedWidth||(i.w=i.el.offsetWidth,i.screenWidth=Math.ceil(i.w/o.characterWidth));var u=i.h/o.lineHeight;i.coverLine&&(u-=this.session.getRowLineCount(i.row),u<0&&(u=0)),i.rowCount!=u&&(i.rowCount=u,i.row<a&&(a=i.row))}}a!=1/0&&(this.session._emit("changeFold",{data:{start:{row:a}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},m.prototype.renderWidgets=function(c,d){var r=d.layerConfig,o=this.session.lineWidgets;if(o){for(var a=Math.min(this.firstRow,r.firstRow),s=Math.max(this.lastRow,r.lastRow,o.length);a>0&&!o[a];)a--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,d.$cursorLayer.config=r;for(var i=a;i<=s;i++){var u=o[i];if(!(!u||!u.el)){if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,d.container.appendChild(u.el));var f=d.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;u.coverLine||(f+=r.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=f-r.offset+"px";var y=u.coverGutter?0:d.gutterWidth;u.fixedWidth||(y-=d.scrollLeft),u.el.style.left=y+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=r.width+2*r.padding+"px"),u.fixedWidth?u.el.style.right=d.scrollBar.getWidth()+"px":u.el.style.right=""}}}},m})();n.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(t,n,p){n.applyDelta=function(h,g,m){var c=g.start.row,d=g.start.column,r=h[c]||"";switch(g.action){case"insert":var o=g.lines;if(o.length===1)h[c]=r.substring(0,d)+g.lines[0]+r.substring(d);else{var a=[c,1].concat(g.lines);h.splice.apply(h,a),h[c]=r.substring(0,d)+h[c],h[c+g.lines.length-1]+=r.substring(d)}break;case"remove":var s=g.end.column,i=g.end.row;c===i?h[c]=r.substring(0,d)+r.substring(s):h.splice(c,i-c+1,r.substring(0,d)+h[i].substring(s));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,n,p){var h=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,m=(function(){function r(o,a,s){this.$onChange=this.onChange.bind(this),this.attach(o),typeof a!="number"?this.setPosition(a.row,a.column):this.setPosition(a,s)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var a=d(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(a.row,a.column,!0)}},r.prototype.setPosition=function(o,a,s){var i;if(s?i={row:o,column:a}:i=this.$clipPositionToDocument(o,a),!(this.row==i.row&&this.column==i.column)){var u={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:u,value:i})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(o,a){var s={};return o>=this.document.getLength()?(s.row=Math.max(0,this.document.getLength()-1),s.column=this.document.getLine(s.row).length):o<0?(s.row=0,s.column=0):(s.row=o,s.column=Math.min(this.document.getLine(s.row).length,Math.max(0,a))),a<0&&(s.column=0),s},r})();m.prototype.$insertRight=!1,h.implement(m.prototype,g);function c(r,o,a){var s=a?r.column<=o.column:r.column<o.column;return r.row<o.row||r.row==o.row&&s}function d(r,o,a){var s=r.action=="insert",i=(s?1:-1)*(r.end.row-r.start.row),u=(s?1:-1)*(r.end.column-r.start.column),f=r.start,y=s?f:r.end;return c(o,f,a)?{row:o.row,column:o.column}:c(y,o,!a)?{row:o.row+i,column:o.column+(o.row==y.row?u:0)}:{row:f.row,column:f.column}}n.Anchor=m}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,n,p){var h=t("./lib/oop"),g=t("./apply_delta").applyDelta,m=t("./lib/event_emitter").EventEmitter,c=t("./range").Range,d=t("./anchor").Anchor,r=(function(){function o(a){this.$lines=[""],a.length===0?this.$lines=[""]:Array.isArray(a)?this.insertMergedLines({row:0,column:0},a):this.insert({row:0,column:0},a)}return o.prototype.setValue=function(a){var s=this.getLength()-1;this.remove(new c(0,0,s,this.getLine(s).length)),this.insert({row:0,column:0},a||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(a,s){return new d(this,a,s)},o.prototype.$detectNewLine=function(a){var s=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=s?s[1]:`
1349
- `,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
1350
+ `)&&x.selection.isEmpty()){var M=x.getCursorPosition();if(M.column===0)return;for(var L=w.doc.getLine(M.row),R=w.doc.getLine(M.row+1),$=w.getTokens(M.row),D=0,T=0;T<$.length;T++){D+=$[T].value.length;var E=$[T];if(D>=M.column){if(D===M.column){if(!/\.doc/.test(E.type))return;if(/\*\//.test(E.value)){var C=$[T+1];if(!C||!/\.doc/.test(C.type))return}}var b=M.column-(D-E.value.length),A=E.value.indexOf("*/"),_=E.value.indexOf("/**",A>-1?A+2:0);if(_!==-1&&b>_&&b<_+3||A!==-1&&_!==-1&&b>=A&&b<=_||!/\.doc/.test(E.type))return;break}}var O=this.$getIndent(L);if(/\s*\*/.test(R))return/^\s*\*/.test(L)?{text:S+O+"* ",selection:[1,2+O.length,1,2+O.length]}:{text:S+O+" * ",selection:[1,3+O.length,1,3+O.length]};if(/\/\*\*/.test(L.substring(0,M.column)))return{text:S+O+" * "+S+" "+O+"*/",selection:[1,4+O.length,1,4+O.length]}}})};p.isSaneInsertion=function(v,y){var k=v.getCursorPosition(),x=new c(y,k.row,k.column);if(!this.$matchTokenType(x.getCurrentToken()||"text",h)){if(/[)}\]]/.test(v.session.getLine(k.row)[k.column]))return!0;var w=new c(y,k.row,k.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",h))return!1}return x.stepForward(),x.getCurrentTokenRow()!==k.row||this.$matchTokenType(x.getCurrentToken()||"text",u)},p.$matchTokenType=function(v,y){return y.indexOf(v.type||v)>-1},p.recordAutoInsert=function(v,y,k){var x=v.getCursorPosition(),w=y.doc.getLine(x.row);this.isAutoInsertedClosing(x,w,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=x.row,d.autoInsertedLineEnd=k+w.substr(x.column),d.autoInsertedBrackets++},p.recordMaybeInsert=function(v,y,k){var x=v.getCursorPosition(),w=y.doc.getLine(x.row);this.isMaybeInsertedClosing(x,w)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=x.row,d.maybeInsertedLineStart=w.substr(0,x.column)+k,d.maybeInsertedLineEnd=w.substr(x.column),d.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(v,y,k){return d.autoInsertedBrackets>0&&v.row===d.autoInsertedRow&&k===d.autoInsertedLineEnd[0]&&y.substr(v.column)===d.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(v,y){return d.maybeInsertedBrackets>0&&v.row===d.maybeInsertedRow&&y.substr(v.column)===d.maybeInsertedLineEnd&&y.substr(0,v.column)==d.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},f.inherits(p,g),n.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(t,n,m){"use strict";for(var f=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],g=0,c=[],o=0;o<f.length;o+=2)c.push(g+=f[o]),f[o+1]&&c.push(45,g+=f[o+1]);n.wordChars=String.fromCharCode.apply(null,c)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(t,n,m){"use strict";var f=t("../config"),g=t("../tokenizer").Tokenizer,c=t("./text_highlight_rules").TextHighlightRules,o=t("./behaviour/cstyle").CstyleBehaviour,h=t("../unicode"),u=t("../lib/lang"),d=t("../token_iterator").TokenIterator,l=t("../range").Range,s=function(){this.HighlightRules=c};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(r,a,p,v){var y=a.doc,k=!0,x=!0,w=1/0,S=a.getTabSize(),M=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var $=this.lineCommentStart.map(u.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var $=u.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;$=new RegExp("^(\\s*)(?:"+$+") ?"),M=a.getUseSoftTabs();var E=function(z,P){var W=z.match($);if(W){var B=W[1].length,H=W[0].length;!A(z,B,H)&&W[0][H-1]==" "&&H--,y.removeInLine(P,B,H)}},b=L+" ",T=function(z,P){(!k||/\S/.test(z))&&(A(z,w,w)?y.insertInLine({row:P,column:w},b):y.insertInLine({row:P,column:w},L))},C=function(z,P){return $.test(z)},A=function(z,P,W){for(var B=0;P--&&z.charAt(P)==" ";)B++;if(B%S!=0)return!1;for(var B=0;z.charAt(W++)==" ";)B++;return S>2?B%S!=S-1:B%S==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,R=this.blockComment.end,$=new RegExp("^(\\s*)(?:"+u.escapeRegExp(L)+")"),D=new RegExp("(?:"+u.escapeRegExp(R)+")\\s*$"),T=function(I,N){C(I,N)||(!k||/\S/.test(I))&&(y.insertInLine({row:N,column:I.length},R),y.insertInLine({row:N,column:w},L))},E=function(I,N){var F;(F=I.match(D))&&y.removeInLine(N,I.length-F[0].length,I.length),(F=I.match($))&&y.removeInLine(N,F[1].length,F[0].length)},C=function(I,N){if($.test(I))return!0;for(var F=a.getTokens(N),z=0;z<F.length;z++)if(F[z].type==="comment")return!0}}function _(I){for(var N=p;N<=v;N++)I(y.getLine(N),N)}var O=1/0;_(function(I,N){var F=I.search(/\S/);F!==-1?(F<w&&(w=F),x&&!C(I,N)&&(x=!1)):O>I.length&&(O=I.length)}),w==1/0&&(w=O,k=!1,x=!1),M&&w%S!=0&&(w=Math.floor(w/S)*S),_(x?E:T)},this.toggleBlockComment=function(r,a,p,v){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var k=new d(a,v.row,v.column),x=k.getCurrentToken();a.selection;var w=a.selection.toOrientedRange(),S,M;if(x&&/comment/.test(x.type)){for(var L,R;x&&/comment/.test(x.type);){var $=x.value.indexOf(y.start);if($!=-1){var D=k.getCurrentTokenRow(),T=k.getCurrentTokenColumn()+$;L=new l(D,T,D,T+y.start.length);break}x=k.stepBackward()}for(var k=new d(a,v.row,v.column),x=k.getCurrentToken();x&&/comment/.test(x.type);){var $=x.value.indexOf(y.end);if($!=-1){var D=k.getCurrentTokenRow(),T=k.getCurrentTokenColumn()+$;R=new l(D,T,D,T+y.end.length);break}x=k.stepForward()}R&&a.remove(R),L&&(a.remove(L),S=L.start.row,M=-y.start.length)}else M=y.start.length,S=p.start.row,a.insert(p.end,y.end),a.insert(p.start,y.start);w.start.row==S&&(w.start.column+=M),w.end.row==S&&(w.end.column+=M),a.selection.fromOrientedRange(w)}},this.getNextLineIndent=function(r,a,p){return this.$getIndent(a)},this.checkOutdent=function(r,a,p){return!1},this.autoOutdent=function(r,a,p){},this.$getIndent=function(r){return r.match(/^\s*/)[0]},this.createWorker=function(r){return null},this.createModeDelegates=function(r){this.$embeds=[],this.$modes={};for(var a in r)if(r[a]){var p=r[a],v=p.prototype.$id,y=f.$modes[v];y||(f.$modes[v]=y=new p),f.$modes[a]||(f.$modes[a]=y),this.$embeds.push(a),this.$modes[a]=y}for(var k=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],x=function(S){(function(M){var L=k[S],R=M[L];M[k[S]]=function(){return this.$delegator(L,arguments,R)}})(w)},w=this,a=0;a<k.length;a++)x(a)},this.$delegator=function(r,a,p){var v=a[0]||"start";if(typeof v!="string"){if(Array.isArray(v[2])){var y=v[2][v[2].length-1],k=this.$modes[y];if(k)return k[r].apply(k,[v[1]].concat([].slice.call(a,1)))}v=v[0]||"start"}for(var x=0;x<this.$embeds.length;x++)if(this.$modes[this.$embeds[x]]){var w=v.split(this.$embeds[x]);if(!w[0]&&w[1]){a[0]=w[1];var k=this.$modes[this.$embeds[x]];return k[r].apply(k,a)}}var S=p.apply(this,a);return p?S:void 0},this.transformAction=function(r,a,p,v,y){if(this.$behaviour){var k=this.$behaviour.getBehaviours();for(var x in k)if(k[x][a]){var w=k[x][a].apply(this,arguments);if(w)return w}}},this.getKeywords=function(r){if(!this.completionKeywords){var a=this.$tokenizer.rules,p=[];for(var v in a)for(var y=a[v],k=0,x=y.length;k<x;k++)if(typeof y[k].token=="string")/keyword|support|storage/.test(y[k].token)&&p.push(y[k].regex);else if(typeof y[k].token=="object"){for(var w=0,S=y[k].token.length;w<S;w++)if(/keyword|support|storage/.test(y[k].token[w])){var v=y[k].regex.match(/\(.+?\)/g)[w];p.push(v.substr(1,v.length-2))}}this.completionKeywords=p}return r?p.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(r,a,p,v){return(this.$keywordList||this.$createKeywordList()).map(function(y){return{name:y,value:y,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(s.prototype),n.Mode=s}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,n,m){"use strict";var f=t("./lib/dom");n.LineWidgets=(function(){function g(c){this.session=c,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return g.prototype.getRowLength=function(c){var o;return this.lineWidgets?o=this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0:o=0,!this.$useWrapMode||!this.$wrapData[c]?1+o:this.$wrapData[c].length+1+o},g.prototype.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(o){o&&o.rowCount&&!o.hidden&&(c+=o.rowCount)}),c},g.prototype.$onChangeEditor=function(c){this.attach(c.editor)},g.prototype.attach=function(c){c&&c.widgetManager&&c.widgetManager!=this&&c.widgetManager.detach(),this.editor!=c&&(this.detach(),this.editor=c,c&&(c.widgetManager=this,c.renderer.on("beforeRender",this.measureWidgets),c.renderer.on("afterRender",this.renderWidgets)))},g.prototype.detach=function(c){var o=this.editor;if(o){this.editor=null,o.widgetManager=null,o.renderer.off("beforeRender",this.measureWidgets),o.renderer.off("afterRender",this.renderWidgets);var h=this.session.lineWidgets;h&&h.forEach(function(u){u&&u.el&&u.el.parentNode&&(u._inDocument=!1,u.el.parentNode.removeChild(u.el))})}},g.prototype.updateOnFold=function(c,o){var h=o.lineWidgets;if(!(!h||!c.action)){for(var u=c.data,d=u.start.row,l=u.end.row,s=c.action=="add",r=d+1;r<l;r++)h[r]&&(h[r].hidden=s);h[l]&&(s?h[d]?h[l].hidden=s:h[d]=h[l]:(h[d]==h[l]&&(h[d]=void 0),h[l].hidden=s))}},g.prototype.updateOnChange=function(c){var o=this.session.lineWidgets;if(o){var h=c.start.row,u=c.end.row-h;if(u!==0)if(c.action=="remove"){var d=o.splice(h+1,u);!o[h]&&d[d.length-1]&&(o[h]=d.pop()),d.forEach(function(s){s&&this.removeLineWidget(s)},this),this.$updateRows()}else{var l=new Array(u);o[h]&&o[h].column!=null&&c.start.column>o[h].column&&h++,l.unshift(h,0),o.splice.apply(o,l),this.$updateRows()}}},g.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var o=!0;c.forEach(function(h,u){if(h)for(o=!1,h.row=u;h.$oldWidget;)h.$oldWidget.row=u,h=h.$oldWidget}),o&&(this.session.lineWidgets=null)}},g.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var o=this.session.lineWidgets[c.row];return o&&(c.$oldWidget=o,o.el&&o.el.parentNode&&(o.el.parentNode.removeChild(o.el),o._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},g.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var o=this.editor.renderer;c.html&&!c.el&&(c.el=f.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=f.createElement("div"),c.el.textContent=c.text),c.el&&(f.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&f.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex="5",o.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex="3"),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/o.layerConfig.lineHeight);var h=this.session.getFoldAt(c.row,0);if(c.$fold=h,h){var u=this.session.lineWidgets;c.row==h.end.row&&!u[h.start.row]?u[h.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,o),this.onWidgetChanged(c),c},g.prototype.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var o=this.session.lineWidgets[c.row];if(o==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;o;){if(o.$oldWidget==c){o.$oldWidget=c.$oldWidget;break}o=o.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},g.prototype.getWidgetsAtRow=function(c){for(var o=this.session.lineWidgets,h=o&&o[c],u=[];h;)u.push(h),h=h.$oldWidget;return u},g.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},g.prototype.measureWidgets=function(c,o){var h=this.session._changedWidgets,u=o.layerConfig;if(!(!h||!h.length)){for(var d=1/0,l=0;l<h.length;l++){var s=h[l];if(!(!s||!s.el)&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,o.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/u.characterWidth));var r=s.h/u.lineHeight;s.coverLine&&(r-=this.session.getRowLineCount(s.row),r<0&&(r=0)),s.rowCount!=r&&(s.rowCount=r,s.row<d&&(d=s.row))}}d!=1/0&&(this.session._emit("changeFold",{data:{start:{row:d}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},g.prototype.renderWidgets=function(c,o){var h=o.layerConfig,u=this.session.lineWidgets;if(u){for(var d=Math.min(this.firstRow,h.firstRow),l=Math.max(this.lastRow,h.lastRow,u.length);d>0&&!u[d];)d--;this.firstRow=h.firstRow,this.lastRow=h.lastRow,o.$cursorLayer.config=h;for(var s=d;s<=l;s++){var r=u[s];if(!(!r||!r.el)){if(r.hidden){r.el.style.top=-100-(r.pixelHeight||0)+"px";continue}r._inDocument||(r._inDocument=!0,o.container.appendChild(r.el));var a=o.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;r.coverLine||(a+=h.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=a-h.offset+"px";var p=r.coverGutter?0:o.gutterWidth;r.fixedWidth||(p-=o.scrollLeft),r.el.style.left=p+"px",r.fullWidth&&r.screenWidth&&(r.el.style.minWidth=h.width+2*h.padding+"px"),r.fixedWidth?r.el.style.right=o.scrollBar.getWidth()+"px":r.el.style.right=""}}}},g})()}),ace.define("ace/apply_delta",["require","exports","module"],function(t,n,m){"use strict";n.applyDelta=function(f,g,c){var o=g.start.row,h=g.start.column,u=f[o]||"";switch(g.action){case"insert":if(g.lines.length===1)f[o]=u.substring(0,h)+g.lines[0]+u.substring(h);else{var d=[o,1].concat(g.lines);f.splice.apply(f,d),f[o]=u.substring(0,h)+f[o],f[o+g.lines.length-1]+=u.substring(h)}break;case"remove":var l=g.end.column,s=g.end.row;o===s?f[o]=u.substring(0,h)+u.substring(l):f.splice(o,s-o+1,u.substring(0,h)+f[s].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,n,m){"use strict";var f=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,c=(function(){function u(d,l,s){this.$onChange=this.onChange.bind(this),this.attach(d),typeof l!="number"?this.setPosition(l.row,l.column):this.setPosition(l,s)}return u.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},u.prototype.getDocument=function(){return this.document},u.prototype.onChange=function(d){if(!(d.start.row==d.end.row&&d.start.row!=this.row)&&!(d.start.row>this.row)){var l=h(d,{row:this.row,column:this.column},this.$insertRight);this.setPosition(l.row,l.column,!0)}},u.prototype.setPosition=function(d,l,s){var r;if(s?r={row:d,column:l}:r=this.$clipPositionToDocument(d,l),!(this.row==r.row&&this.column==r.column)){var a={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:a,value:r})}},u.prototype.detach=function(){this.document.off("change",this.$onChange)},u.prototype.attach=function(d){this.document=d||this.document,this.document.on("change",this.$onChange)},u.prototype.$clipPositionToDocument=function(d,l){var s={};return d>=this.document.getLength()?(s.row=Math.max(0,this.document.getLength()-1),s.column=this.document.getLine(s.row).length):d<0?(s.row=0,s.column=0):(s.row=d,s.column=Math.min(this.document.getLine(s.row).length,Math.max(0,l))),l<0&&(s.column=0),s},u})();c.prototype.$insertRight=!1,f.implement(c.prototype,g);function o(u,d,l){var s=l?u.column<=d.column:u.column<d.column;return u.row<d.row||u.row==d.row&&s}function h(u,d,l){var s=u.action=="insert",r=(s?1:-1)*(u.end.row-u.start.row),a=(s?1:-1)*(u.end.column-u.start.column),p=u.start,v=s?p:u.end;return o(d,p,l)?{row:d.row,column:d.column}:o(v,d,!l)?{row:d.row+r,column:d.column+(d.row==v.row?a:0)}:{row:p.row,column:p.column}}n.Anchor=c}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,n,m){"use strict";var f=t("./lib/oop"),g=t("./apply_delta").applyDelta,c=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,h=t("./anchor").Anchor,u=(function(){function d(l){this.$lines=[""],l.length===0?this.$lines=[""]:Array.isArray(l)?this.insertMergedLines({row:0,column:0},l):this.insert({row:0,column:0},l)}return d.prototype.setValue=function(l){var s=this.getLength()-1;this.remove(new o(0,0,s,this.getLine(s).length)),this.insert({row:0,column:0},l||"")},d.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},d.prototype.createAnchor=function(l,s){return new h(this,l,s)},d.prototype.$detectNewLine=function(l){var s=l.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=s?s[1]:`
1351
+ `,this._signal("changeNewLineMode")},d.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
1350
1352
  `;case"unix":return`
1351
1353
  `;default:return this.$autoNewLine||`
1352
- `}},o.prototype.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(a){return a==`\r
1353
- `||a=="\r"||a==`
1354
- `},o.prototype.getLine=function(a){return this.$lines[a]||""},o.prototype.getLines=function(a,s){return this.$lines.slice(a,s+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(a){return this.getLinesForRange(a).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(a){var s;if(a.start.row===a.end.row)s=[this.getLine(a.start.row).substring(a.start.column,a.end.column)];else{s=this.getLines(a.start.row,a.end.row),s[0]=(s[0]||"").substring(a.start.column);var i=s.length-1;a.end.row-a.start.row==i&&(s[i]=s[i].substring(0,a.end.column))}return s},o.prototype.insertLines=function(a,s){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(a,s)},o.prototype.removeLines=function(a,s){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(a,s)},o.prototype.insertNewLine=function(a){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(a,["",""])},o.prototype.insert=function(a,s){return this.getLength()<=1&&this.$detectNewLine(s),this.insertMergedLines(a,this.$split(s))},o.prototype.insertInLine=function(a,s){var i=this.clippedPos(a.row,a.column),u=this.pos(a.row,a.column+s.length);return this.applyDelta({start:i,end:u,action:"insert",lines:[s]},!0),this.clonePos(u)},o.prototype.clippedPos=function(a,s){var i=this.getLength();a===void 0?a=i:a<0?a=0:a>=i&&(a=i-1,s=void 0);var u=this.getLine(a);return s==null&&(s=u.length),s=Math.min(Math.max(s,0),u.length),{row:a,column:s}},o.prototype.clonePos=function(a){return{row:a.row,column:a.column}},o.prototype.pos=function(a,s){return{row:a,column:s}},o.prototype.$clipPosition=function(a){var s=this.getLength();return a.row>=s?(a.row=Math.max(0,s-1),a.column=this.getLine(s-1).length):(a.row=Math.max(0,a.row),a.column=Math.min(Math.max(a.column,0),this.getLine(a.row).length)),a},o.prototype.insertFullLines=function(a,s){a=Math.min(Math.max(a,0),this.getLength());var i=0;a<this.getLength()?(s=s.concat([""]),i=0):(s=[""].concat(s),a--,i=this.$lines[a].length),this.insertMergedLines({row:a,column:i},s)},o.prototype.insertMergedLines=function(a,s){var i=this.clippedPos(a.row,a.column),u={row:i.row+s.length-1,column:(s.length==1?i.column:0)+s[s.length-1].length};return this.applyDelta({start:i,end:u,action:"insert",lines:s}),this.clonePos(u)},o.prototype.remove=function(a){var s=this.clippedPos(a.start.row,a.start.column),i=this.clippedPos(a.end.row,a.end.column);return this.applyDelta({start:s,end:i,action:"remove",lines:this.getLinesForRange({start:s,end:i})}),this.clonePos(s)},o.prototype.removeInLine=function(a,s,i){var u=this.clippedPos(a,s),f=this.clippedPos(a,i);return this.applyDelta({start:u,end:f,action:"remove",lines:this.getLinesForRange({start:u,end:f})},!0),this.clonePos(u)},o.prototype.removeFullLines=function(a,s){a=Math.min(Math.max(0,a),this.getLength()-1),s=Math.min(Math.max(0,s),this.getLength()-1);var i=s==this.getLength()-1&&a>0,u=s<this.getLength()-1,f=i?a-1:a,y=i?this.getLine(f).length:0,b=u?s+1:s,E=u?0:this.getLine(b).length,$=new c(f,y,b,E),A=this.$lines.slice(a,s+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),A},o.prototype.removeNewLine=function(a){a<this.getLength()-1&&a>=0&&this.applyDelta({start:this.pos(a,this.getLine(a).length),end:this.pos(a+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(a,s){if(a instanceof c||(a=c.fromPoints(a.start,a.end)),s.length===0&&a.isEmpty())return a.start;if(s==this.getTextRange(a))return a.end;this.remove(a);var i;return s?i=this.insert(a.start,s):i=a.start,i},o.prototype.applyDeltas=function(a){for(var s=0;s<a.length;s++)this.applyDelta(a[s])},o.prototype.revertDeltas=function(a){for(var s=a.length-1;s>=0;s--)this.revertDelta(a[s])},o.prototype.applyDelta=function(a,s){var i=a.action=="insert";(i?a.lines.length<=1&&!a.lines[0]:!c.comparePoints(a.start,a.end))||(i&&a.lines.length>2e4?this.$splitAndapplyLargeDelta(a,2e4):(g(this.$lines,a,s),this._signal("change",a)))},o.prototype.$safeApplyDelta=function(a){var s=this.$lines.length;(a.action=="remove"&&a.start.row<s&&a.end.row<s||a.action=="insert"&&a.start.row<=s)&&this.applyDelta(a)},o.prototype.$splitAndapplyLargeDelta=function(a,s){for(var i=a.lines,u=i.length-s+1,f=a.start.row,y=a.start.column,b=0,E=0;b<u;b=E){E+=s-1;var $=i.slice(b,E);$.push(""),this.applyDelta({start:this.pos(f+b,y),end:this.pos(f+E,y=0),action:a.action,lines:$},!0)}a.lines=i.slice(b),a.start.row=f+b,a.start.column=y,this.applyDelta(a,!0)},o.prototype.revertDelta=function(a){this.$safeApplyDelta({start:this.clonePos(a.start),end:this.clonePos(a.end),action:a.action=="insert"?"remove":"insert",lines:a.lines.slice()})},o.prototype.indexToPosition=function(a,s){for(var i=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,f=s||0,y=i.length;f<y;f++)if(a-=i[f].length+u,a<0)return{row:f,column:a+i[f].length+u};return{row:y-1,column:a+i[y-1].length+u}},o.prototype.positionToIndex=function(a,s){for(var i=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,f=0,y=Math.min(a.row,i.length),b=s||0;b<y;++b)f+=i[b].length+u;return f+a.column},o.prototype.$split=function(a){return a.split(/\r\n|\r|\n/)},o})();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",h.implement(r.prototype,m),n.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,n,p){var h=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,m=(function(){function c(d,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=d;var o=this;this.$worker=function(){if(o.running){for(var a=new Date,s=o.currentLine,i=-1,u=o.doc,f=s;o.lines[s];)s++;var y=u.getLength(),b=0;for(o.running=!1;s<y;){o.$tokenizeRow(s),i=s;do s++;while(o.lines[s]);if(b++,b%5===0&&new Date-a>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=s,i==-1&&(i=s),f<=i&&o.fireUpdateEvent(f,i)}}}return c.prototype.setTokenizer=function(d){this.tokenizer=d,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(d){this.doc=d,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(d,r){var o={first:d,last:r};this._signal("update",{data:o})},c.prototype.start=function(d){this.currentLine=Math.min(d||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},c.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},c.prototype.$updateOnChange=function(d){var r=d.start.row,o=d.end.row-r;if(o===0)this.lines[r]=null;else if(d.action=="remove")this.lines.splice(r,o+1,null),this.states.splice(r,o+1,null);else{var a=Array(o+1);a.unshift(r,1),this.lines.splice.apply(this.lines,a),this.states.splice.apply(this.states,a)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(d){return this.lines[d]||this.$tokenizeRow(d)},c.prototype.getState=function(d){return this.currentLine==d&&this.$tokenizeRow(d),this.states[d]||"start"},c.prototype.$tokenizeRow=function(d){var r=this.doc.getLine(d),o=this.states[d-1],a=this.tokenizer.getLineTokens(r,o,d);return this.states[d]+""!=a.state+""?(this.states[d]=a.state,this.lines[d+1]=null,this.currentLine>d+1&&(this.currentLine=d+1)):this.currentLine==d&&(this.currentLine=d+1),this.lines[d]=a.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c})();h.implement(m.prototype,g),n.BackgroundTokenizer=m}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,n,p){var h=t("./lib/lang"),g=t("./range").Range,m=(function(){function c(d,r,o){o===void 0&&(o="text"),this.setRegexp(d),this.clazz=r,this.type=o}return c.prototype.setRegexp=function(d){this.regExp+""!=d+""&&(this.regExp=d,this.cache=[])},c.prototype.update=function(d,r,o,a){if(this.regExp)for(var s=a.firstRow,i=a.lastRow,u={},f=s;f<=i;f++){var y=this.cache[f];y==null&&(y=h.getMatchOffsets(o.getLine(f),this.regExp),y.length>this.MAX_RANGES&&(y=y.slice(0,this.MAX_RANGES)),y=y.map(function(A){return new g(f,A.offset,f,A.offset+A.length)}),this.cache[f]=y.length?y:"");for(var b=y.length;b--;){var E=y[b].toScreenRange(o),$=E.toString();u[$]||(u[$]=!0,r.drawSingleLineMarker(d,E,this.clazz,a))}}},c})();m.prototype.MAX_RANGES=500,n.SearchHighlight=m}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,n,p){var h=(function(){function A(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return A.prototype.addSession=function(S){this.$session=S},A.prototype.add=function(S,M,R){if(!this.$fromUndo&&S!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),M===!1||!this.lastDeltas){this.lastDeltas=[];var L=this.$undoStack.length;L>this.$undoDepth-1&&this.$undoStack.splice(0,L-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),S.id=this.$rev=++this.$maxRev}(S.action=="remove"||S.action=="insert")&&(this.$lastDelta=S),this.lastDeltas.push(S)}},A.prototype.addSelection=function(S,M){this.selections.push({value:S,rev:M||this.$rev})},A.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},A.prototype.markIgnored=function(S,M){M==null&&(M=this.$rev+1);for(var R=this.$undoStack,L=R.length;L--;){var T=R[L][0];if(T.id<=S)break;T.id<M&&(T.ignore=!0)}this.lastDeltas=null},A.prototype.getSelection=function(S,M){for(var R=this.selections,L=R.length;L--;){var T=R[L];if(T.rev<S)return M&&(T=R[L+1]),T}},A.prototype.getRevision=function(){return this.$rev},A.prototype.getDeltas=function(S,M){M==null&&(M=this.$rev+1);for(var R=this.$undoStack,L=null,T=0,D=R.length;D--;){var w=R[D][0];if(w.id<M&&!L&&(L=D+1),w.id<=S){T=D+1;break}}return R.slice(T,L)},A.prototype.getChangedRanges=function(S,M){M==null&&(M=this.$rev+1)},A.prototype.getChangedLines=function(S,M){M==null&&(M=this.$rev+1)},A.prototype.undo=function(S,M){this.lastDeltas=null;var R=this.$undoStack;if(g(R,R.length)){S||(S=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var L=R.pop(),T=null;return L&&(T=S.undoChanges(L,M),this.$redoStack.push(L),this.$syncRev()),this.$fromUndo=!1,T}},A.prototype.redo=function(S,M){if(this.lastDeltas=null,S||(S=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var R=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,R),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(D){D[0].id=++this.$maxRev},this)}var L=this.$redoStack.pop(),T=null;return L&&(T=S.redoChanges(L,M),this.$undoStack.push(L),this.$syncRev()),this.$fromUndo=!1,T},A.prototype.$syncRev=function(){var S=this.$undoStack,M=S[S.length-1],R=M&&M[0].id||0;this.$redoStackBaseRev=R,this.$rev=R},A.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},A.prototype.canUndo=function(){return this.$undoStack.length>0},A.prototype.canRedo=function(){return this.$redoStack.length>0},A.prototype.bookmark=function(S){S==null&&(S=this.$rev),this.mark=S},A.prototype.isAtBookmark=function(){return this.$rev===this.mark},A.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},A.prototype.fromJSON=function(S){this.reset(),this.$undoStack=S.$undoStack,this.$redoStack=S.$redoStack},A.prototype.$prettyPrint=function(S){return S?o(S):o(this.$undoStack)+`
1354
+ `}},d.prototype.setNewLineMode=function(l){this.$newLineMode!==l&&(this.$newLineMode=l,this._signal("changeNewLineMode"))},d.prototype.getNewLineMode=function(){return this.$newLineMode},d.prototype.isNewLine=function(l){return l==`\r
1355
+ `||l=="\r"||l==`
1356
+ `},d.prototype.getLine=function(l){return this.$lines[l]||""},d.prototype.getLines=function(l,s){return this.$lines.slice(l,s+1)},d.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},d.prototype.getLength=function(){return this.$lines.length},d.prototype.getTextRange=function(l){return this.getLinesForRange(l).join(this.getNewLineCharacter())},d.prototype.getLinesForRange=function(l){var s;if(l.start.row===l.end.row)s=[this.getLine(l.start.row).substring(l.start.column,l.end.column)];else{s=this.getLines(l.start.row,l.end.row),s[0]=(s[0]||"").substring(l.start.column);var r=s.length-1;l.end.row-l.start.row==r&&(s[r]=s[r].substring(0,l.end.column))}return s},d.prototype.insertLines=function(l,s){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(l,s)},d.prototype.removeLines=function(l,s){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(l,s)},d.prototype.insertNewLine=function(l){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(l,["",""])},d.prototype.insert=function(l,s){return this.getLength()<=1&&this.$detectNewLine(s),this.insertMergedLines(l,this.$split(s))},d.prototype.insertInLine=function(l,s){var r=this.clippedPos(l.row,l.column),a=this.pos(l.row,l.column+s.length);return this.applyDelta({start:r,end:a,action:"insert",lines:[s]},!0),this.clonePos(a)},d.prototype.clippedPos=function(l,s){var r=this.getLength();l===void 0?l=r:l<0?l=0:l>=r&&(l=r-1,s=void 0);var a=this.getLine(l);return s==null&&(s=a.length),s=Math.min(Math.max(s,0),a.length),{row:l,column:s}},d.prototype.clonePos=function(l){return{row:l.row,column:l.column}},d.prototype.pos=function(l,s){return{row:l,column:s}},d.prototype.$clipPosition=function(l){var s=this.getLength();return l.row>=s?(l.row=Math.max(0,s-1),l.column=this.getLine(s-1).length):(l.row=Math.max(0,l.row),l.column=Math.min(Math.max(l.column,0),this.getLine(l.row).length)),l},d.prototype.insertFullLines=function(l,s){l=Math.min(Math.max(l,0),this.getLength());var r=0;l<this.getLength()?(s=s.concat([""]),r=0):(s=[""].concat(s),l--,r=this.$lines[l].length),this.insertMergedLines({row:l,column:r},s)},d.prototype.insertMergedLines=function(l,s){var r=this.clippedPos(l.row,l.column),a={row:r.row+s.length-1,column:(s.length==1?r.column:0)+s[s.length-1].length};return this.applyDelta({start:r,end:a,action:"insert",lines:s}),this.clonePos(a)},d.prototype.remove=function(l){var s=this.clippedPos(l.start.row,l.start.column),r=this.clippedPos(l.end.row,l.end.column);return this.applyDelta({start:s,end:r,action:"remove",lines:this.getLinesForRange({start:s,end:r})}),this.clonePos(s)},d.prototype.removeInLine=function(l,s,r){var a=this.clippedPos(l,s),p=this.clippedPos(l,r);return this.applyDelta({start:a,end:p,action:"remove",lines:this.getLinesForRange({start:a,end:p})},!0),this.clonePos(a)},d.prototype.removeFullLines=function(l,s){l=Math.min(Math.max(0,l),this.getLength()-1),s=Math.min(Math.max(0,s),this.getLength()-1);var r=s==this.getLength()-1&&l>0,a=s<this.getLength()-1,p=r?l-1:l,v=r?this.getLine(p).length:0,y=a?s+1:s,k=new o(p,v,y,a?0:this.getLine(y).length),x=this.$lines.slice(l,s+1);return this.applyDelta({start:k.start,end:k.end,action:"remove",lines:this.getLinesForRange(k)}),x},d.prototype.removeNewLine=function(l){l<this.getLength()-1&&l>=0&&this.applyDelta({start:this.pos(l,this.getLine(l).length),end:this.pos(l+1,0),action:"remove",lines:["",""]})},d.prototype.replace=function(l,s){if(l instanceof o||(l=o.fromPoints(l.start,l.end)),s.length===0&&l.isEmpty())return l.start;if(s==this.getTextRange(l))return l.end;this.remove(l);var r;return s?r=this.insert(l.start,s):r=l.start,r},d.prototype.applyDeltas=function(l){for(var s=0;s<l.length;s++)this.applyDelta(l[s])},d.prototype.revertDeltas=function(l){for(var s=l.length-1;s>=0;s--)this.revertDelta(l[s])},d.prototype.applyDelta=function(l,s){var r=l.action=="insert";(r?l.lines.length<=1&&!l.lines[0]:!o.comparePoints(l.start,l.end))||(r&&l.lines.length>2e4?this.$splitAndapplyLargeDelta(l,2e4):(g(this.$lines,l,s),this._signal("change",l)))},d.prototype.$safeApplyDelta=function(l){var s=this.$lines.length;(l.action=="remove"&&l.start.row<s&&l.end.row<s||l.action=="insert"&&l.start.row<=s)&&this.applyDelta(l)},d.prototype.$splitAndapplyLargeDelta=function(l,s){for(var r=l.lines,a=r.length-s+1,p=l.start.row,v=l.start.column,y=0,k=0;y<a;y=k){k+=s-1;var x=r.slice(y,k);x.push(""),this.applyDelta({start:this.pos(p+y,v),end:this.pos(p+k,v=0),action:l.action,lines:x},!0)}l.lines=r.slice(y),l.start.row=p+y,l.start.column=v,this.applyDelta(l,!0)},d.prototype.revertDelta=function(l){this.$safeApplyDelta({start:this.clonePos(l.start),end:this.clonePos(l.end),action:l.action=="insert"?"remove":"insert",lines:l.lines.slice()})},d.prototype.indexToPosition=function(l,s){for(var r=this.$lines||this.getAllLines(),a=this.getNewLineCharacter().length,p=s||0,v=r.length;p<v;p++)if(l-=r[p].length+a,l<0)return{row:p,column:l+r[p].length+a};return{row:v-1,column:l+r[v-1].length+a}},d.prototype.positionToIndex=function(l,s){for(var r=this.$lines||this.getAllLines(),a=this.getNewLineCharacter().length,p=0,v=Math.min(l.row,r.length),y=s||0;y<v;++y)p+=r[y].length+a;return p+l.column},d.prototype.$split=function(l){return l.split(/\r\n|\r|\n/)},d})();u.prototype.$autoNewLine="",u.prototype.$newLineMode="auto",f.implement(u.prototype,c),n.Document=u}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,n,m){"use strict";var f=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,c=(function(){function o(h,u){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var d=this;this.$worker=function(){if(d.running){for(var l=new Date,s=d.currentLine,r=-1,a=d.doc,p=s;d.lines[s];)s++;var v=a.getLength(),y=0;for(d.running=!1;s<v;){d.$tokenizeRow(s),r=s;do s++;while(d.lines[s]);if(y++,y%5===0&&new Date-l>20){d.running=setTimeout(d.$worker,20);break}}d.currentLine=s,r==-1&&(r=s),p<=r&&d.fireUpdateEvent(p,r)}}}return o.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},o.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},o.prototype.fireUpdateEvent=function(h,u){var d={first:h,last:u};this._signal("update",{data:d})},o.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},o.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},o.prototype.$updateOnChange=function(h){var u=h.start.row,d=h.end.row-u;if(d===0)this.lines[u]=null;else if(h.action=="remove")this.lines.splice(u,d+1,null),this.states.splice(u,d+1,null);else{var l=Array(d+1);l.unshift(u,1),this.lines.splice.apply(this.lines,l),this.states.splice.apply(this.states,l)}this.currentLine=Math.min(u,this.currentLine,this.doc.getLength()),this.stop()},o.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},o.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},o.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},o.prototype.$tokenizeRow=function(h){var u=this.doc.getLine(h),d=this.states[h-1],l=this.tokenizer.getLineTokens(u,d,h);return this.states[h]+""!=l.state+""?(this.states[h]=l.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=l.tokens},o.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},o})();f.implement(c.prototype,g),n.BackgroundTokenizer=c}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,n,m){"use strict";var f=t("./lib/lang"),g=t("./range").Range,c=(function(){function o(h,u,d){d===void 0&&(d="text"),this.setRegexp(h),this.clazz=u,this.type=d,this.docLen=0}return o.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},o.prototype.update=function(h,u,d,l){if(this.regExp){for(var s=l.firstRow,r=l.lastRow,a={},p=d.$editor&&d.$editor.$search,v=p&&p.$isMultilineSearch(d.$editor.getLastSearchOptions()),y=s;y<=r;y++){var k=this.cache[y];if(k==null||d.getValue().length!=this.docLen){if(v){k=[];var x=p.$multiLineForward(d,this.regExp,y,r);if(x){var w=x.endRow<=r?x.endRow-1:r;w>y&&(y=w),k.push(new g(x.startRow,x.startCol,x.endRow,x.endCol))}k.length>this.MAX_RANGES&&(k=k.slice(0,this.MAX_RANGES))}else k=f.getMatchOffsets(d.getLine(y),this.regExp),k.length>this.MAX_RANGES&&(k=k.slice(0,this.MAX_RANGES)),k=k.map(function(R){return new g(y,R.offset,y,R.offset+R.length)});this.cache[y]=k.length?k:""}if(k.length!==0)for(var S=k.length;S--;){var M=k[S].toScreenRange(d),L=M.toString();a[L]||(a[L]=!0,u.drawSingleLineMarker(h,M,this.clazz,l))}}this.docLen=d.getValue().length}},o})();c.prototype.MAX_RANGES=500,n.SearchHighlight=c}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,n,m){"use strict";var f=(function(){function w(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return w.prototype.addSession=function(S){this.$session=S},w.prototype.add=function(S,M,L){if(!this.$fromUndo&&S!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),M===!1||!this.lastDeltas){this.lastDeltas=[];var R=this.$undoStack.length;R>this.$undoDepth-1&&this.$undoStack.splice(0,R-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),S.id=this.$rev=++this.$maxRev}(S.action=="remove"||S.action=="insert")&&(this.$lastDelta=S),this.lastDeltas.push(S)}},w.prototype.addSelection=function(S,M){this.selections.push({value:S,rev:M||this.$rev})},w.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},w.prototype.markIgnored=function(S,M){M==null&&(M=this.$rev+1);for(var L=this.$undoStack,R=L.length;R--;){var $=L[R][0];if($.id<=S)break;$.id<M&&($.ignore=!0)}this.lastDeltas=null},w.prototype.getSelection=function(S,M){for(var L=this.selections,R=L.length;R--;){var $=L[R];if($.rev<S)return M&&($=L[R+1]),$}},w.prototype.getRevision=function(){return this.$rev},w.prototype.getDeltas=function(S,M){M==null&&(M=this.$rev+1);for(var L=this.$undoStack,R=null,$=0,D=L.length;D--;){var T=L[D][0];if(T.id<M&&!R&&(R=D+1),T.id<=S){$=D+1;break}}return L.slice($,R)},w.prototype.getChangedRanges=function(S,M){M==null&&(M=this.$rev+1)},w.prototype.getChangedLines=function(S,M){M==null&&(M=this.$rev+1)},w.prototype.undo=function(S,M){this.lastDeltas=null;var L=this.$undoStack;if(g(L,L.length)){S||(S=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var R=L.pop(),$=null;return R&&($=S.undoChanges(R,M),this.$redoStack.push(R),this.$syncRev()),this.$fromUndo=!1,$}},w.prototype.redo=function(S,M){if(this.lastDeltas=null,S||(S=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);x(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(D){D[0].id=++this.$maxRev},this)}var R=this.$redoStack.pop(),$=null;return R&&($=S.redoChanges(R,M),this.$undoStack.push(R),this.$syncRev()),this.$fromUndo=!1,$},w.prototype.$syncRev=function(){var S=this.$undoStack,M=S[S.length-1],L=M&&M[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},w.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},w.prototype.canUndo=function(){return this.$undoStack.length>0},w.prototype.canRedo=function(){return this.$redoStack.length>0},w.prototype.bookmark=function(S){S==null&&(S=this.$rev),this.mark=S},w.prototype.isAtBookmark=function(){return this.$rev===this.mark},w.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},w.prototype.fromJSON=function(S){this.reset(),this.$undoStack=S.$undoStack,this.$redoStack=S.$redoStack},w.prototype.$prettyPrint=function(S){return S?d(S):d(this.$undoStack)+`
1355
1357
  ---
1356
- `+o(this.$redoStack)},A})();h.prototype.hasUndo=h.prototype.canUndo,h.prototype.hasRedo=h.prototype.canRedo,h.prototype.isClean=h.prototype.isAtBookmark,h.prototype.markClean=h.prototype.bookmark;function g(A,S){for(var M=S;M--;){var R=A[M];if(R&&!R[0].ignore){for(;M<S-1;){var L=i(A[M],A[M+1]);A[M]=L[0],A[M+1]=L[1],M++}return!0}}}var m=t("./range").Range,c=m.comparePoints;m.comparePoints;function d(A){return{row:A.row,column:A.column}}function r(A){return{start:d(A.start),end:d(A.end),action:A.action,lines:A.lines.slice()}}function o(A){if(A=A||this,Array.isArray(A))return A.map(o).join(`
1357
- `);var S="";return A.action?(S=A.action=="insert"?"+":"-",S+="["+A.lines+"]"):A.value&&(Array.isArray(A.value)?S=A.value.map(a).join(`
1358
- `):S=a(A.value)),A.start&&(S+=a(A)),(A.id||A.rev)&&(S+=" ("+(A.id||A.rev)+")"),S}function a(A){return A.start.row+":"+A.start.column+"=>"+A.end.row+":"+A.end.column}function s(A,S){var M=A.action=="insert",R=S.action=="insert";if(M&&R)if(c(S.start,A.end)>=0)f(S,A,-1);else if(c(S.start,A.start)<=0)f(A,S,1);else return null;else if(M&&!R)if(c(S.start,A.end)>=0)f(S,A,-1);else if(c(S.end,A.start)<=0)f(A,S,-1);else return null;else if(!M&&R)if(c(S.start,A.start)>=0)f(S,A,1);else if(c(S.start,A.start)<=0)f(A,S,1);else return null;else if(!M&&!R)if(c(S.start,A.start)>=0)f(S,A,1);else if(c(S.end,A.start)<=0)f(A,S,-1);else return null;return[S,A]}function i(A,S){for(var M=A.length;M--;)for(var R=0;R<S.length;R++)if(!s(A[M],S[R])){for(;M<A.length;){for(;R--;)s(S[R],A[M]);R=S.length,M++}return[A,S]}return A.selectionBefore=S.selectionBefore=A.selectionAfter=S.selectionAfter=null,[S,A]}function u(A,S){var M=A.action=="insert",R=S.action=="insert";if(M&&R)c(A.start,S.start)<0?f(S,A,1):f(A,S,1);else if(M&&!R)c(A.start,S.end)>=0?f(A,S,-1):(c(A.start,S.start)<=0||f(A,m.fromPoints(S.start,A.start),-1),f(S,A,1));else if(!M&&R)c(S.start,A.end)>=0?f(S,A,-1):(c(S.start,A.start)<=0||f(S,m.fromPoints(A.start,S.start),-1),f(A,S,1));else if(!M&&!R)if(c(S.start,A.end)>=0)f(S,A,-1);else if(c(S.end,A.start)<=0)f(A,S,-1);else{var L,T;return c(A.start,S.start)<0&&(L=A,A=b(A,S.start)),c(A.end,S.end)>0&&(T=b(A,S.end)),y(S.end,A.start,A.end,-1),T&&!L&&(A.lines=T.lines,A.start=T.start,A.end=T.end,T=A),[S,L,T].filter(Boolean)}return[S,A]}function f(A,S,M){y(A.start,S.start,S.end,M),y(A.end,S.start,S.end,M)}function y(A,S,M,R){A.row==(R==1?S:M).row&&(A.column+=R*(M.column-S.column)),A.row+=R*(M.row-S.row)}function b(A,S){var M=A.lines,R=A.end;A.end=d(S);var L=A.end.row-A.start.row,T=M.splice(L,M.length),D=L?S.column:S.column-A.start.column;M.push(T[0].substring(0,D)),T[0]=T[0].substr(D);var w={start:d(S),end:R,lines:T,action:A.action};return w}function E(A,S){S=r(S);for(var M=A.length;M--;){for(var R=A[M],L=0;L<R.length;L++){var T=R[L],D=u(T,S);S=D[0],D.length!=2&&(D[2]?(R.splice(L+1,1,D[1],D[2]),L++):D[1]||(R.splice(L,1),L--))}R.length||A.splice(M,1)}return A}function $(A,S){for(var M=0;M<S.length;M++)for(var R=S[M],L=0;L<R.length;L++)E(A,R[L])}n.UndoManager=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,n,p){var h=t("../range").Range,g=(function(){function m(c,d){this.foldData=c,Array.isArray(d)?this.folds=d:d=this.folds=[d];var r=d[d.length-1];this.range=new h(d[0].start.row,d[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return m.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(d){d.start.row+=c,d.end.row+=c})},m.prototype.addFold=function(c){if(c.sameRow){if(c.start.row<this.startRow||c.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(d,r){return-d.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},m.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},m.prototype.walk=function(c,d,r){var o=0,a=this.folds,s,i,u,f=!0;d==null&&(d=this.end.row,r=this.end.column);for(var y=0;y<a.length;y++){if(s=a[y],i=s.range.compareStart(d,r),i==-1){c(null,d,r,o,f);return}if(u=c(null,s.start.row,s.start.column,o,f),u=!u&&c(s.placeholder,s.start.row,s.start.column,o),u||i===0)return;f=!s.sameRow,o=s.end.column}c(null,d,r,o,f)},m.prototype.getNextFoldTo=function(c,d){for(var r,o,a=0;a<this.folds.length;a++){if(r=this.folds[a],o=r.range.compareEnd(c,d),o==-1)return{fold:r,kind:"after"};if(o===0)return{fold:r,kind:"inside"}}return null},m.prototype.addRemoveChars=function(c,d,r){var o=this.getNextFoldTo(c,d),a,s;if(o){if(a=o.fold,o.kind=="inside"&&a.start.column!=d&&a.start.row!=c)window.console&&window.console.log(c,d,a);else if(a.start.row==c){s=this.folds;var i=s.indexOf(a);for(i===0&&(this.start.column+=r),i;i<s.length;i++){if(a=s[i],a.start.column+=r,!a.sameRow)return;a.end.column+=r}this.end.column+=r}}},m.prototype.split=function(c,d){var r=this.getNextFoldTo(c,d);if(!r||r.kind=="inside")return null;var o=r.fold,a=this.folds,s=this.foldData,i=a.indexOf(o),u=a[i-1];this.end.row=u.end.row,this.end.column=u.end.column,a=a.splice(i,a.length-i);var f=new m(s,a);return s.splice(s.indexOf(this)+1,0,f),f},m.prototype.merge=function(c){for(var d=c.folds,r=0;r<d.length;r++)this.addFold(d[r]);var o=this.foldData;o.splice(o.indexOf(c),1)},m.prototype.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(d){c.push(" "+d.toString())}),c.push("]"),c.join(`
1359
- `)},m.prototype.idxToPosition=function(c){for(var d=0,r=0;r<this.folds.length;r++){var o=this.folds[r];if(c-=o.start.column-d,c<0)return{row:o.start.row,column:o.start.column+c};if(c-=o.placeholder.length,c<0)return o.start;d=o.end.column}return{row:this.end.row,column:this.end.column+c}},m})();n.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(t,n,p){var h=t("./range").Range,g=h.comparePoints,m=(function(){function c(){this.ranges=[],this.$bias=1}return c.prototype.pointIndex=function(d,r,o){for(var a=this.ranges,s=o||0;s<a.length;s++){var i=a[s],u=g(d,i.end);if(!(u>0)){var f=g(d,i.start);return u===0?r&&f!==0?-s-2:s:f>0||f===0&&!r?s:-s-1}}return-s-1},c.prototype.add=function(d){var r=!d.isEmpty(),o=this.pointIndex(d.start,r);o<0&&(o=-o-1);var a=this.pointIndex(d.end,r,o);return a<0?a=-a-1:a++,this.ranges.splice(o,a-o,d)},c.prototype.addList=function(d){for(var r=[],o=d.length;o--;)r.push.apply(r,this.add(d[o]));return r},c.prototype.substractPoint=function(d){var r=this.pointIndex(d);if(r>=0)return this.ranges.splice(r,1)},c.prototype.merge=function(){var d=[],r=this.ranges;r=r.sort(function(u,f){return g(u.start,f.start)});for(var o=r[0],a,s=1;s<r.length;s++){a=o,o=r[s];var i=g(a.end,o.start);i<0||i==0&&!a.isEmpty()&&!o.isEmpty()||(g(a.end,o.end)<0&&(a.end.row=o.end.row,a.end.column=o.end.column),r.splice(s,1),d.push(o),o=a,s--)}return this.ranges=r,d},c.prototype.contains=function(d,r){return this.pointIndex({row:d,column:r})>=0},c.prototype.containsPoint=function(d){return this.pointIndex(d)>=0},c.prototype.rangeAtPoint=function(d){var r=this.pointIndex(d);if(r>=0)return this.ranges[r]},c.prototype.clipRows=function(d,r){var o=this.ranges;if(o[0].start.row>r||o[o.length-1].start.row<d)return[];var a=this.pointIndex({row:d,column:0});a<0&&(a=-a-1);var s=this.pointIndex({row:r,column:0},a);s<0&&(s=-s-1);for(var i=[],u=a;u<s;u++)i.push(o[u]);return i},c.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},c.prototype.attach=function(d){this.session&&this.detach(),this.session=d,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},c.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},c.prototype.$onChange=function(d){for(var r=d.start,o=d.end,a=r.row,s=o.row,i=this.ranges,u=0,f=i.length;u<f;u++){var y=i[u];if(y.end.row>=a)break}if(d.action=="insert")for(var b=s-a,E=-r.column+o.column;u<f;u++){var y=i[u];if(y.start.row>a)break;if(y.start.row==a&&y.start.column>=r.column&&(y.start.column==r.column&&this.$bias<=0||(y.start.column+=E,y.start.row+=b)),y.end.row==a&&y.end.column>=r.column){if(y.end.column==r.column&&this.$bias<0)continue;y.end.column==r.column&&E>0&&u<f-1&&y.end.column>y.start.column&&y.end.column==i[u+1].start.column&&(y.end.column-=E),y.end.column+=E,y.end.row+=b}}else for(var b=a-s,E=r.column-o.column;u<f;u++){var y=i[u];if(y.start.row>s)break;y.end.row<s&&(a<y.end.row||a==y.end.row&&r.column<y.end.column)?(y.end.row=a,y.end.column=r.column):y.end.row==s?y.end.column<=o.column?(b||y.end.column>r.column)&&(y.end.column=r.column,y.end.row=r.row):(y.end.column+=E,y.end.row+=b):y.end.row>s&&(y.end.row+=b),y.start.row<s&&(a<y.start.row||a==y.start.row&&r.column<y.start.column)?(y.start.row=a,y.start.column=r.column):y.start.row==s?y.start.column<=o.column?(b||y.start.column>r.column)&&(y.start.column=r.column,y.start.row=r.row):(y.start.column+=E,y.start.row+=b):y.start.row>s&&(y.start.row+=b)}if(b!=0&&u<f)for(;u<f;u++){var y=i[u];y.start.row+=b,y.end.row+=b}},c})();m.prototype.comparePoints=g,n.RangeList=m}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(t,n,p){var h=this&&this.__extends||(function(){var a=function(s,i){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,f){u.__proto__=f}||function(u,f){for(var y in f)Object.prototype.hasOwnProperty.call(f,y)&&(u[y]=f[y])},a(s,i)};return function(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");a(s,i);function u(){this.constructor=s}s.prototype=i===null?Object.create(i):(u.prototype=i.prototype,new u)}})(),g=t("../range_list").RangeList,m=(function(a){h(s,a);function s(i,u){var f=a.call(this)||this;return f.foldLine=null,f.placeholder=u,f.range=i,f.start=i.start,f.end=i.end,f.sameRow=i.start.row==i.end.row,f.subFolds=f.ranges=[],f}return s.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},s.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(u){u.setFoldLine(i)})},s.prototype.clone=function(){var i=this.range.clone(),u=new s(i,this.placeholder);return this.subFolds.forEach(function(f){u.subFolds.push(f.clone())}),u.collapseChildren=this.collapseChildren,u},s.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){d(i,this.start);for(var E=i.start.row,$=i.start.column,u=0,f=-1;u<this.subFolds.length&&(f=this.subFolds[u].range.compare(E,$),f==1);u++);var y=this.subFolds[u],b=0;if(f==0){if(y.range.containsRange(i))return y.addSubFold(i);b=1}for(var E=i.range.end.row,$=i.range.end.column,A=u,f=-1;A<this.subFolds.length&&(f=this.subFolds[A].range.compare(E,$),f==1);A++);f==0&&A++;for(var S=this.subFolds.splice(u,A-u,i),M=f==0?S.length-1:S.length,R=b;R<M;R++)i.addSubFold(S[R]);return i.setFoldLine(this.foldLine),i}},s.prototype.restoreRange=function(i){return o(i,this.start)},s})(g);function c(a,s){a.row-=s.row,a.row==0&&(a.column-=s.column)}function d(a,s){c(a.start,s),c(a.end,s)}function r(a,s){a.row==0&&(a.column+=s.column),a.row+=s.row}function o(a,s){r(a.start,s),r(a.end,s)}n.Fold=m}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(t,n,p){var h=t("../range").Range,g=t("./fold_line").FoldLine,m=t("./fold").Fold,c=t("../token_iterator").TokenIterator,d=t("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(o,a,s){var i=this.getFoldLine(o);if(!i)return null;for(var u=i.folds,f=0;f<u.length;f++){var y=u[f].range;if(y.contains(o,a)){if(s==1&&y.isEnd(o,a)&&!y.isEmpty())continue;if(s==-1&&y.isStart(o,a)&&!y.isEmpty())continue;return u[f]}}},this.getFoldsInRange=function(o){var a=o.start,s=o.end,i=this.$foldData,u=[];a.column+=1,s.column-=1;for(var f=0;f<i.length;f++){var y=i[f].range.compareRange(o);if(y!=2){if(y==-2)break;for(var b=i[f].folds,E=0;E<b.length;E++){var $=b[E];if(y=$.range.compareRange(o),y==-2)break;if(y==2)continue;if(y==42)break;u.push($)}}}return a.column-=1,s.column+=1,u},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var a=[];o.forEach(function(s){a=a.concat(this.getFoldsInRange(s))},this)}else var a=this.getFoldsInRange(o);return a},this.getAllFolds=function(){for(var o=[],a=this.$foldData,s=0;s<a.length;s++)for(var i=0;i<a[s].folds.length;i++)o.push(a[s].folds[i]);return o},this.getFoldStringAt=function(o,a,s,i){if(i=i||this.getFoldLine(o),!i)return null;for(var u={end:{column:0}},f,y,b=0;b<i.folds.length;b++){y=i.folds[b];var E=y.range.compareEnd(o,a);if(E==-1){f=this.getLine(y.start.row).substring(u.end.column,y.start.column);break}else if(E===0)return null;u=y}return f||(f=this.getLine(y.start.row).substring(u.end.column)),s==-1?f.substring(0,a-u.end.column):s==1?f.substring(a-u.end.column):f},this.getFoldLine=function(o,a){var s=this.$foldData,i=0;for(a&&(i=s.indexOf(a)),i==-1&&(i=0),i;i<s.length;i++){var u=s[i];if(u.start.row<=o&&u.end.row>=o)return u;if(u.end.row>o)return null}return null},this.getNextFoldLine=function(o,a){var s=this.$foldData,i=0;for(a&&(i=s.indexOf(a)),i==-1&&(i=0),i;i<s.length;i++){var u=s[i];if(u.end.row>=o)return u}return null},this.getFoldedRowCount=function(o,a){for(var s=this.$foldData,i=a-o+1,u=0;u<s.length;u++){var f=s[u],y=f.end.row,b=f.start.row;if(y>=a){b<a&&(b>=o?i-=a-b:i=0);break}else y>=o&&(b>=o?i-=y-b:i-=y-o+1)}return i},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(a,s){return a.start.row-s.start.row}),o},this.addFold=function(o,a){var s=this.$foldData,i=!1,u;o instanceof m?u=o:(u=new m(a,o),u.collapseChildren=a.collapseChildren),this.$clipRangeToDocument(u.range);var f=u.start.row,y=u.start.column,b=u.end.row,E=u.end.column,$=this.getFoldAt(f,y,1),A=this.getFoldAt(b,E,-1);if($&&A==$)return $.addSubFold(u);$&&!$.range.isStart(f,y)&&this.removeFold($),A&&!A.range.isEnd(b,E)&&this.removeFold(A);var S=this.getFoldsInRange(u.range);S.length>0&&(this.removeFolds(S),u.collapseChildren||S.forEach(function(T){u.addSubFold(T)}));for(var M=0;M<s.length;M++){var R=s[M];if(b==R.start.row){R.addFold(u),i=!0;break}else if(f==R.end.row){if(R.addFold(u),i=!0,!u.sameRow){var L=s[M+1];if(L&&L.start.row==b){R.merge(L);break}}break}else if(b<=R.start.row)break}return i||(R=this.$addFoldLine(new g(this.$foldData,u))),this.$useWrapMode?this.$updateWrapData(R.start.row,R.start.row):this.$updateRowLengthCache(R.start.row,R.start.row),this.$modified=!0,this._signal("changeFold",{data:u,action:"add"}),u},this.addFolds=function(o){o.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(o){var a=o.foldLine,s=a.start.row,i=a.end.row,u=this.$foldData,f=a.folds;if(f.length==1)u.splice(u.indexOf(a),1);else if(a.range.isEnd(o.end.row,o.end.column))f.pop(),a.end.row=f[f.length-1].end.row,a.end.column=f[f.length-1].end.column;else if(a.range.isStart(o.start.row,o.start.column))f.shift(),a.start.row=f[0].start.row,a.start.column=f[0].start.column;else if(o.sameRow)f.splice(f.indexOf(o),1);else{var y=a.split(o.start.row,o.start.column);f=y.folds,f.shift(),y.start.row=f[0].start.row,y.start.column=f[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(s,i):this.$updateRowLengthCache(s,i)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var a=[],s=0;s<o.length;s++)a.push(o[s]);a.forEach(function(i){this.removeFold(i)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(a){o.restoreRange(a),this.addFold(a)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(o,a){var s,i;if(o==null)s=new h(0,0,this.getLength(),0),a==null&&(a=!0);else if(typeof o=="number")s=new h(o,0,o,this.getLine(o).length);else if("row"in o)s=h.fromPoints(o,o);else{if(Array.isArray(o))return i=[],o.forEach(function(f){i=i.concat(this.unfold(f))},this),i;s=o}i=this.getFoldsInRangeList(s);for(var u=i;i.length==1&&h.comparePoints(i[0].start,s.start)<0&&h.comparePoints(i[0].end,s.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(s);if(a!=!1?this.removeFolds(i):this.expandFolds(i),u.length)return u},this.isRowFolded=function(o,a){return!!this.getFoldLine(o,a)},this.getRowFoldEnd=function(o,a){var s=this.getFoldLine(o,a);return s?s.end.row:o},this.getRowFoldStart=function(o,a){var s=this.getFoldLine(o,a);return s?s.start.row:o},this.getFoldDisplayLine=function(o,a,s,i,u){i==null&&(i=o.start.row),u==null&&(u=0),a==null&&(a=o.end.row),s==null&&(s=this.getLine(a).length);var f=this.doc,y="";return o.walk(function(b,E,$,A){if(!(E<i)){if(E==i){if($<u)return;A=Math.max(u,A)}b!=null?y+=b:y+=f.getLine(E).substring(A,$)}},a,s),y},this.getDisplayLine=function(o,a,s,i){var u=this.getFoldLine(o);if(u)return this.getFoldDisplayLine(u,o,a,s,i);var f;return f=this.doc.getLine(o),f.substring(i||0,a||f.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(a){var s=a.folds.map(function(i){return i.clone()});return new g(o,s)}),o},this.toggleFold=function(o){var a=this.selection,s=a.getRange(),i,u;if(s.isEmpty()){var f=s.start;if(i=this.getFoldAt(f.row,f.column),i){this.expandFold(i);return}else(u=this.findMatchingBracket(f))?s.comparePoint(u)==1?s.end=u:(s.start=u,s.start.column++,s.end.column--):(u=this.findMatchingBracket({row:f.row,column:f.column+1}))?(s.comparePoint(u)==1?s.end=u:s.start=u,s.start.column++):s=this.getCommentFoldRange(f.row,f.column)||s}else{var y=this.getFoldsInRange(s);if(o&&y.length){this.expandFolds(y);return}else y.length==1&&(i=y[0])}if(i||(i=this.getFoldAt(s.start.row,s.start.column)),i&&i.range.toString()==s.toString()){this.expandFold(i);return}var b="...";if(!s.isMultiLine()){if(b=this.getTextRange(s),b.length<4)return;b=b.trim().substring(0,2)+".."}this.addFold(b,s)},this.getCommentFoldRange=function(o,a,s){var i=new c(this,o,a),u=i.getCurrentToken(),f=u&&u.type;if(u&&/^comment|string/.test(f)){f=f.match(/comment|string/)[0],f=="comment"&&(f+="|doc-start|\\.doc");var y=new RegExp(f),b=new h;if(s!=1){do u=i.stepBackward();while(u&&y.test(u.type));u=i.stepForward()}b.start.row=i.getCurrentTokenRow(),b.start.column=i.getCurrentTokenColumn()+u.value.length,i=new c(this,o,a);var E=this.getState(i.$row);if(s!=-1){var $=-1;do if(u=i.stepForward(),$==-1){var A=this.getState(i.$row);E.toString()!==A.toString()&&($=i.$row)}else if(i.$row>$)break;while(u&&y.test(u.type));u=i.stepBackward()}else u=i.getCurrentToken();return b.end.row=i.getCurrentTokenRow(),b.end.column=i.getCurrentTokenColumn(),b}},this.foldAll=function(o,a,s,i){s==null&&(s=1e5);var u=this.foldWidgets;if(u){a=a||this.getLength(),o=o||0;for(var f=o;f<a;f++)if(u[f]==null&&(u[f]=this.getFoldWidget(f)),u[f]=="start"&&!(i&&!i(f))){var y=this.getFoldWidgetRange(f);y&&y.isMultiLine()&&y.end.row<=a&&y.start.row>=o&&(f=y.end.row,y.collapseChildren=s,this.addFold("...",y))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(a){for(var s=o.getTokens(a),i=0;i<s.length;i++){var u=s[i];if(!(u.type=="text"&&/^\s+$/.test(u.value)))return!!/comment/.test(u.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var a=this.$foldMode;this.$setFolding(null),this.$setFolding(a)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(o,a){var s=this.foldWidgets;if(!s||a&&s[o])return{};for(var i=o-1,u;i>=0;){var f=s[i];if(f==null&&(f=s[i]=this.getFoldWidget(i)),f=="start"){var y=this.getFoldWidgetRange(i);if(u||(u=y),y&&y.end.row>=o)break}i--}return{range:i!==-1&&y,firstRange:u}},this.onFoldWidgetClick=function(o,a){a instanceof d&&(a=a.domEvent);var s={children:a.shiftKey,all:a.ctrlKey||a.metaKey,siblings:a.altKey},i=this.$toggleFoldWidget(o,s);if(!i){var u=a.target||a.srcElement;u&&/ace_fold-widget/.test(u.className)&&(u.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,a){if(this.getFoldWidget){var s=this.getFoldWidget(o),i=this.getLine(o),u=s==="end"?-1:1,f=this.getFoldAt(o,u===-1?0:i.length,u);if(f)return a.children||a.all?this.removeFold(f):this.expandFold(f),f;var y=this.getFoldWidgetRange(o,!0);if(y&&!y.isMultiLine()&&(f=this.getFoldAt(y.start.row,y.start.column,1),f&&y.isEqual(f.range)))return this.removeFold(f),f;if(a.siblings){var b=this.getParentFoldRangeData(o);if(b.range)var E=b.range.start.row+1,$=b.range.end.row;this.foldAll(E,$,a.all?1e4:0)}else a.children?($=y?y.end.row:this.getLength(),this.foldAll(o+1,$,a.all?1e4:0)):y&&(a.all&&(y.collapseChildren=1e4),this.addFold("...",y));return y}},this.toggleFoldWidget=function(o){var a=this.selection.getCursor().row;a=this.getRowFoldStart(a);var s=this.$toggleFoldWidget(a,{});if(!s){var i=this.getParentFoldRangeData(a,!0);if(s=i.range||i.firstRange,s){a=s.start.row;var u=this.getFoldAt(a,this.getLine(a).length,1);u?this.removeFold(u):this.addFold("...",s)}}},this.updateFoldWidgets=function(o){var a=o.start.row,s=o.end.row-a;if(s===0)this.foldWidgets[a]=null;else if(o.action=="remove")this.foldWidgets.splice(a,s+1,null);else{var i=Array(s+1);i.unshift(a,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(o){var a=o.data;a.first!=a.last&&this.foldWidgets.length>a.first&&this.foldWidgets.splice(a.first,this.foldWidgets.length)}}n.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,n,p){var h=t("../token_iterator").TokenIterator,g=t("../range").Range;function m(){this.findMatchingBracket=function(c,d){if(c.column==0)return null;var r=d||this.getLine(c.row).charAt(c.column-1);if(r=="")return null;var o=r.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],c):this.$findOpeningBracket(o[2],c):null},this.getBracketRange=function(c){var d=this.getLine(c.row),r=!0,o,a=d.charAt(c.column-1),s=a&&a.match(/([\(\[\{])|([\)\]\}])/);if(s||(a=d.charAt(c.column),c={row:c.row,column:c.column+1},s=a&&a.match(/([\(\[\{])|([\)\]\}])/),r=!1),!s)return null;if(s[1]){var i=this.$findClosingBracket(s[1],c);if(!i)return null;o=g.fromPoints(c,i),r||(o.end.column++,o.start.column--),o.cursor=o.end}else{var i=this.$findOpeningBracket(s[2],c);if(!i)return null;o=g.fromPoints(i,c),r||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(c,d){var r=this.getLine(c.row),o=/([\(\[\{])|([\)\]\}])/,a=!d&&r.charAt(c.column-1),s=a&&a.match(o);if(s||(a=(d===void 0||d)&&r.charAt(c.column),c={row:c.row,column:c.column+1},s=a&&a.match(o)),!s)return null;var i=new g(c.row,c.column-1,c.row,c.column),u=s[1]?this.$findClosingBracket(s[1],c):this.$findOpeningBracket(s[2],c);if(!u)return[i];var f=new g(u.row,u.column,u.row,u.column+1);return[i,f]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,d,r){var o=this.$brackets[c],a=1,s=new h(this,d.row,d.column),i=s.getCurrentToken();if(i||(i=s.stepForward()),!!i){r||(r=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var u=d.column-s.getCurrentTokenColumn()-2,f=i.value;;){for(;u>=0;){var y=f.charAt(u);if(y==o){if(a-=1,a==0)return{row:s.getCurrentTokenRow(),column:u+s.getCurrentTokenColumn()}}else y==c&&(a+=1);u-=1}do i=s.stepBackward();while(i&&!r.test(i.type));if(i==null)break;f=i.value,u=f.length-1}return null}},this.$findClosingBracket=function(c,d,r){var o=this.$brackets[c],a=1,s=new h(this,d.row,d.column),i=s.getCurrentToken();if(i||(i=s.stepForward()),!!i){r||(r=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var u=d.column-s.getCurrentTokenColumn();;){for(var f=i.value,y=f.length;u<y;){var b=f.charAt(u);if(b==o){if(a-=1,a==0)return{row:s.getCurrentTokenRow(),column:u+s.getCurrentTokenColumn()}}else b==c&&(a+=1);u+=1}do i=s.stepForward();while(i&&!r.test(i.type));if(i==null)break;u=0}return null}},this.getMatchingTags=function(c){var d=new h(this,c.row,c.column),r=this.$findTagName(d);if(r){var o=d.stepBackward();return o.value==="<"?this.$findClosingTag(d,r):this.$findOpeningTag(d,r)}},this.$findTagName=function(c){var d=c.getCurrentToken(),r=!1,o=!1;if(d&&d.type.indexOf("tag-name")===-1)do o?d=c.stepBackward():d=c.stepForward(),d&&(d.value==="/>"?o=!0:d.type.indexOf("tag-name")!==-1&&(r=!0));while(d&&!r);return d},this.$findClosingTag=function(c,d){var r,o=d.value,a=d.value,s=0,i=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);d=c.stepForward();var u=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+d.value.length),f=!1;do{if(r=d,r.type.indexOf("tag-close")!==-1&&!f){var y=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);f=!0}if(d=c.stepForward(),d){if(d.value===">"&&!f){var y=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);f=!0}if(d.type.indexOf("tag-name")!==-1){if(o=d.value,a===o){if(r.value==="<")s++;else if(r.value==="</"&&(s--,s<0)){c.stepBackward();var b=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2);d=c.stepForward();var E=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=c.stepForward()),d&&d.value===">")var $=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);else return}}}else if(a===o&&d.value==="/>"&&(s--,s<0))var b=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2),E=b,$=E,y=new g(u.end.row,u.end.column,u.end.row,u.end.column+1)}}while(d&&s>=0);if(i&&y&&b&&$&&u&&E)return{openTag:new g(i.start.row,i.start.column,y.end.row,y.end.column),closeTag:new g(b.start.row,b.start.column,$.end.row,$.end.column),openTagName:u,closeTagName:E}},this.$findOpeningTag=function(c,d){var r=c.getCurrentToken(),o=d.value,a=0,s=c.getCurrentTokenRow(),i=c.getCurrentTokenColumn(),u=i+2,f=new g(s,i,s,u);c.stepForward();var y=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=c.stepForward()),!(!d||d.value!==">")){var b=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);c.stepBackward(),c.stepBackward();do if(d=r,s=c.getCurrentTokenRow(),i=c.getCurrentTokenColumn(),u=i+d.value.length,r=c.stepBackward(),d){if(d.type.indexOf("tag-name")!==-1){if(o===d.value)if(r.value==="<"){if(a++,a>0){var E=new g(s,i,s,u),$=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);do d=c.stepForward();while(d&&d.value!==">");var A=new g(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1)}}else r.value==="</"&&a--}else if(d.value==="/>"){for(var S=0,M=r;M;){if(M.type.indexOf("tag-name")!==-1&&M.value===o){a--;break}else if(M.value==="<")break;M=c.stepBackward(),S++}for(var R=0;R<S;R++)c.stepForward()}}while(r&&a<=0);if($&&A&&f&&b&&E&&y)return{openTag:new g($.start.row,$.start.column,A.end.row,A.end.column),closeTag:new g(f.start.row,f.start.column,b.end.row,b.end.column),openTagName:E,closeTagName:y}}}}n.BracketMatch=m}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(t,n,p){var h=t("./lib/oop"),g=t("./lib/lang"),m=t("./bidihandler").BidiHandler,c=t("./config"),d=t("./lib/event_emitter").EventEmitter,r=t("./selection").Selection,o=t("./mode/text").Mode,a=t("./range").Range,s=t("./line_widgets").LineWidgets,i=t("./document").Document,u=t("./background_tokenizer").BackgroundTokenizer,f=t("./search_highlight").SearchHighlight,y=t("./undomanager").UndoManager,b=(function(){function w(v,C){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++w.$uid,this.$foldData.toString=function(){return this.join(`
1360
- `)},this.bgTokenizer=new u(new o().getTokenizer(),this);var x=this;this.bgTokenizer.on("update",function(_){x._signal("tokenizerUpdate",_)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof v!="object"||!v.getLine)&&(v=new i(v)),this.setDocument(v),this.selection=new r(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new m(this),c.resetOptions(this),this.setMode(C),c._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return w.prototype.$initOperationListeners=function(){var v=this;this.curOp=null,this.on("change",function(){v.curOp||(v.startOperation(),v.curOp.selectionBefore=v.$lastSel),v.curOp.docChanged=!0},!0),this.on("changeSelection",function(){v.curOp||(v.startOperation(),v.curOp.selectionBefore=v.$lastSel),v.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},w.prototype.startOperation=function(v){if(this.curOp){if(!v||this.curOp.command)return;this.prevOp=this.curOp}v||(v={}),this.$operationResetTimer.schedule(),this.curOp={command:v.command||{},args:v.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",v)},w.prototype.endOperation=function(v){if(this.curOp){if(v&&v.returnValue===!1){this.curOp=null,this._signal("endOperation",v);return}if(v==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var C=this.selection.toJSON();this.curOp.selectionAfter=C,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(C),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",v)}},w.prototype.setDocument=function(v){this.doc&&this.doc.off("change",this.$onChange),this.doc=v,v.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},w.prototype.getDocument=function(){return this.doc},Object.defineProperty(w.prototype,"widgetManager",{get:function(){var v=new s(this);return this.widgetManager=v,this.$editor&&v.attach(this.$editor),v},set:function(v){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:v})},enumerable:!1,configurable:!0}),w.prototype.$resetRowCache=function(v){if(!v){this.$docRowCache=[],this.$screenRowCache=[];return}var C=this.$docRowCache.length,x=this.$getRowCacheIndex(this.$docRowCache,v)+1;C>x&&(this.$docRowCache.splice(x,C),this.$screenRowCache.splice(x,C))},w.prototype.$getRowCacheIndex=function(v,C){for(var x=0,_=v.length-1;x<=_;){var k=x+_>>1,O=v[k];if(C>O)x=k+1;else if(C<O)_=k-1;else return k}return x-1},w.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},w.prototype.onChangeFold=function(v){var C=v.data;this.$resetRowCache(C.start.row)},w.prototype.onChange=function(v){this.$modified=!0,this.$bidiHandler.onChange(v),this.$resetRowCache(v.start.row);var C=this.$updateInternalDataOnChange(v);!this.$fromUndo&&this.$undoManager&&(C&&C.length&&(this.$undoManager.add({action:"removeFolds",folds:C},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(v,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(v),this._signal("change",v)},w.prototype.onSelectionChange=function(){this._signal("changeSelection")},w.prototype.setValue=function(v){this.doc.setValue(v),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},w.fromJSON=function(v){typeof v=="string"&&(v=JSON.parse(v));var C=new y;C.$undoStack=v.history.undo,C.$redoStack=v.history.redo,C.mark=v.history.mark,C.$rev=v.history.rev;var x=new w(v.value);return v.folds.forEach(function(_){x.addFold("...",a.fromPoints(_.start,_.end))}),x.setAnnotations(v.annotations),x.setBreakpoints(v.breakpoints),x.setMode(v.mode),x.setScrollLeft(v.scrollLeft),x.setScrollTop(v.scrollTop),x.setUndoManager(C),x.selection.fromJSON(v.selection),x},w.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(v){return v.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},w.prototype.toString=function(){return this.doc.getValue()},w.prototype.getSelection=function(){return this.selection},w.prototype.getState=function(v){return this.bgTokenizer.getState(v)},w.prototype.getTokens=function(v){return this.bgTokenizer.getTokens(v)},w.prototype.getTokenAt=function(v,C){var x=this.bgTokenizer.getTokens(v),_,k=0;if(C==null){var O=x.length-1;k=this.getLine(v).length}else for(var O=0;O<x.length&&(k+=x[O].value.length,!(k>=C));O++);return _=x[O],_?(_.index=O,_.start=k-_.value.length,_):null},w.prototype.setUndoManager=function(v){if(this.$undoManager=v,this.$informUndoManager&&this.$informUndoManager.cancel(),v){var C=this;v.addSession(this),this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.mergeUndoDeltas=!1},this.$informUndoManager=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},w.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},w.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},w.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},w.prototype.setUseSoftTabs=function(v){this.setOption("useSoftTabs",v)},w.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},w.prototype.setTabSize=function(v){this.setOption("tabSize",v)},w.prototype.getTabSize=function(){return this.$tabSize},w.prototype.isTabStop=function(v){return this.$useSoftTabs&&v.column%this.$tabSize===0},w.prototype.setNavigateWithinSoftTabs=function(v){this.setOption("navigateWithinSoftTabs",v)},w.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},w.prototype.setOverwrite=function(v){this.setOption("overwrite",v)},w.prototype.getOverwrite=function(){return this.$overwrite},w.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},w.prototype.addGutterDecoration=function(v,C){this.$decorations[v]||(this.$decorations[v]=""),this.$decorations[v]+=" "+C,this._signal("changeBreakpoint",{})},w.prototype.removeGutterDecoration=function(v,C){this.$decorations[v]=(this.$decorations[v]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},w.prototype.getBreakpoints=function(){return this.$breakpoints},w.prototype.setBreakpoints=function(v){this.$breakpoints=[];for(var C=0;C<v.length;C++)this.$breakpoints[v[C]]="ace_breakpoint";this._signal("changeBreakpoint",{})},w.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},w.prototype.setBreakpoint=function(v,C){C===void 0&&(C="ace_breakpoint"),C?this.$breakpoints[v]=C:delete this.$breakpoints[v],this._signal("changeBreakpoint",{})},w.prototype.clearBreakpoint=function(v){delete this.$breakpoints[v],this._signal("changeBreakpoint",{})},w.prototype.addMarker=function(v,C,x,_){var k=this.$markerId++,O={range:v,type:x||"line",renderer:typeof x=="function"?x:null,clazz:C,inFront:!!_,id:k};return _?(this.$frontMarkers[k]=O,this._signal("changeFrontMarker")):(this.$backMarkers[k]=O,this._signal("changeBackMarker")),k},w.prototype.addDynamicMarker=function(v,C){if(v.update){var x=this.$markerId++;return v.id=x,v.inFront=!!C,C?(this.$frontMarkers[x]=v,this._signal("changeFrontMarker")):(this.$backMarkers[x]=v,this._signal("changeBackMarker")),v}},w.prototype.removeMarker=function(v){var C=this.$frontMarkers[v]||this.$backMarkers[v];if(C){var x=C.inFront?this.$frontMarkers:this.$backMarkers;delete x[v],this._signal(C.inFront?"changeFrontMarker":"changeBackMarker")}},w.prototype.getMarkers=function(v){return v?this.$frontMarkers:this.$backMarkers},w.prototype.highlight=function(v){if(!this.$searchHighlight){var C=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(C)}this.$searchHighlight.setRegexp(v)},w.prototype.highlightLines=function(v,C,x,_){typeof C!="number"&&(x=C,C=v),x||(x="ace_step");var k=new a(v,0,C,1/0);return k.id=this.addMarker(k,x,"fullLine",_),k},w.prototype.setAnnotations=function(v){this.$annotations=v,this._signal("changeAnnotation",{})},w.prototype.getAnnotations=function(){return this.$annotations||[]},w.prototype.clearAnnotations=function(){this.setAnnotations([])},w.prototype.$detectNewLine=function(v){var C=v.match(/^.*?(\r?\n)/m);C?this.$autoNewLine=C[1]:this.$autoNewLine=`
1361
- `},w.prototype.getWordRange=function(v,C){var x=this.getLine(v),_=!1;if(C>0&&(_=!!x.charAt(C-1).match(this.tokenRe)),_||(_=!!x.charAt(C).match(this.tokenRe)),_)var k=this.tokenRe;else if(/^\s+$/.test(x.slice(C-1,C+1)))var k=/\s/;else var k=this.nonTokenRe;var O=C;if(O>0){do O--;while(O>=0&&x.charAt(O).match(k));O++}for(var I=C;I<x.length&&x.charAt(I).match(k);)I++;return new a(v,O,v,I)},w.prototype.getAWordRange=function(v,C){for(var x=this.getWordRange(v,C),_=this.getLine(x.end.row);_.charAt(x.end.column).match(/[ \t]/);)x.end.column+=1;return x},w.prototype.setNewLineMode=function(v){this.doc.setNewLineMode(v)},w.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},w.prototype.setUseWorker=function(v){this.setOption("useWorker",v)},w.prototype.getUseWorker=function(){return this.$useWorker},w.prototype.onReloadTokenizer=function(v){var C=v.data;this.bgTokenizer.start(C.first),this._signal("tokenizerUpdate",v)},w.prototype.setMode=function(v,C){if(v&&typeof v=="object"){if(v.getTokenizer)return this.$onChangeMode(v);var x=v,_=x.path}else _=v||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[_]&&!x){this.$onChangeMode(this.$modes[_]),C&&C();return}this.$modeId=_,c.loadModule(["mode",_],(function(k){if(this.$modeId!==_)return C&&C();this.$modes[_]&&!x?this.$onChangeMode(this.$modes[_]):k&&k.Mode&&(k=new k.Mode(x),x||(this.$modes[_]=k,k.$id=_),this.$onChangeMode(k)),C&&C()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},w.prototype.$onChangeMode=function(v,C){if(C||(this.$modeId=v.$id),this.$mode!==v){var x=this.$mode;this.$mode=v,this.$stopWorker(),this.$useWorker&&this.$startWorker();var _=v.getTokenizer();if(_.on!==void 0){var k=this.onReloadTokenizer.bind(this);_.on("update",k)}this.bgTokenizer.setTokenizer(_),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=v.tokenRe,this.nonTokenRe=v.nonTokenRe,C||(v.attachToSession&&v.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(v.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:x,mode:v}))}},w.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},w.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(v){c.warn("Could not load worker",v),this.$worker=null}},w.prototype.getMode=function(){return this.$mode},w.prototype.setScrollTop=function(v){this.$scrollTop===v||isNaN(v)||(this.$scrollTop=v,this._signal("changeScrollTop",v))},w.prototype.getScrollTop=function(){return this.$scrollTop},w.prototype.setScrollLeft=function(v){this.$scrollLeft===v||isNaN(v)||(this.$scrollLeft=v,this._signal("changeScrollLeft",v))},w.prototype.getScrollLeft=function(){return this.$scrollLeft},w.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},w.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var v=0;return this.lineWidgets.forEach(function(C){C&&C.screenWidth>v&&(v=C.screenWidth)}),this.lineWidgetWidth=v},w.prototype.$computeWidth=function(v){if(this.$modified||v){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),x=this.$rowLengthCache,_=0,k=0,O=this.$foldData[k],I=O?O.start.row:1/0,N=C.length,P=0;P<N;P++){if(P>I){if(P=O.end.row+1,P>=N)break;O=this.$foldData[k++],I=O?O.start.row:1/0}x[P]==null&&(x[P]=this.$getStringScreenWidth(C[P])[0]),x[P]>_&&(_=x[P])}this.screenWidth=_}},w.prototype.getLine=function(v){return this.doc.getLine(v)},w.prototype.getLines=function(v,C){return this.doc.getLines(v,C)},w.prototype.getLength=function(){return this.doc.getLength()},w.prototype.getTextRange=function(v){return this.doc.getTextRange(v||this.selection.getRange())},w.prototype.insert=function(v,C){return this.doc.insert(v,C)},w.prototype.remove=function(v){return this.doc.remove(v)},w.prototype.removeFullLines=function(v,C){return this.doc.removeFullLines(v,C)},w.prototype.undoChanges=function(v,C){if(v.length){this.$fromUndo=!0;for(var x=v.length-1;x!=-1;x--){var _=v[x];_.action=="insert"||_.action=="remove"?this.doc.revertDelta(_):_.folds&&this.addFolds(_.folds)}!C&&this.$undoSelect&&(v.selectionBefore?this.selection.fromJSON(v.selectionBefore):this.selection.setRange(this.$getUndoSelection(v,!0))),this.$fromUndo=!1}},w.prototype.redoChanges=function(v,C){if(v.length){this.$fromUndo=!0;for(var x=0;x<v.length;x++){var _=v[x];(_.action=="insert"||_.action=="remove")&&this.doc.$safeApplyDelta(_)}!C&&this.$undoSelect&&(v.selectionAfter?this.selection.fromJSON(v.selectionAfter):this.selection.setRange(this.$getUndoSelection(v,!1))),this.$fromUndo=!1}},w.prototype.setUndoSelect=function(v){this.$undoSelect=v},w.prototype.$getUndoSelection=function(v,C){function x(N){return C?N.action!=="insert":N.action==="insert"}for(var _,k,O=0;O<v.length;O++){var I=v[O];if(I.start){if(!_){x(I)?_=a.fromPoints(I.start,I.end):_=a.fromPoints(I.start,I.start);continue}x(I)?(k=I.start,_.compare(k.row,k.column)==-1&&_.setStart(k),k=I.end,_.compare(k.row,k.column)==1&&_.setEnd(k)):(k=I.start,_.compare(k.row,k.column)==-1&&(_=a.fromPoints(I.start,I.start)))}}return _},w.prototype.replace=function(v,C){return this.doc.replace(v,C)},w.prototype.moveText=function(v,C,x){var _=this.getTextRange(v),k=this.getFoldsInRange(v),O=a.fromPoints(C,C);if(!x){this.remove(v);var I=v.start.row-v.end.row,N=I?-v.end.column:v.start.column-v.end.column;N&&(O.start.row==v.end.row&&O.start.column>v.end.column&&(O.start.column+=N),O.end.row==v.end.row&&O.end.column>v.end.column&&(O.end.column+=N)),I&&O.start.row>=v.end.row&&(O.start.row+=I,O.end.row+=I)}if(O.end=this.insert(O.start,_),k.length){var P=v.start,B=O.start,I=B.row-P.row,N=B.column-P.column;this.addFolds(k.map(function(z){return z=z.clone(),z.start.row==P.row&&(z.start.column+=N),z.end.row==P.row&&(z.end.column+=N),z.start.row+=I,z.end.row+=I,z}))}return O},w.prototype.indentRows=function(v,C,x){x=x.replace(/\t/g,this.getTabString());for(var _=v;_<=C;_++)this.doc.insertInLine({row:_,column:0},x)},w.prototype.outdentRows=function(v){for(var C=v.collapseRows(),x=new a(0,0,0,0),_=this.getTabSize(),k=C.start.row;k<=C.end.row;++k){var O=this.getLine(k);x.start.row=k,x.end.row=k;for(var I=0;I<_&&O.charAt(I)==" ";++I);I<_&&O.charAt(I)==" "?(x.start.column=I,x.end.column=I+1):(x.start.column=0,x.end.column=I),this.remove(x)}},w.prototype.$moveLines=function(v,C,x){if(v=this.getRowFoldStart(v),C=this.getRowFoldEnd(C),x<0){var _=this.getRowFoldStart(v+x);if(_<0)return 0;var k=_-v}else if(x>0){var _=this.getRowFoldEnd(C+x);if(_>this.doc.getLength()-1)return 0;var k=_-C}else{v=this.$clipRowToDocument(v),C=this.$clipRowToDocument(C);var k=C-v+1}var O=new a(v,0,C,Number.MAX_VALUE),I=this.getFoldsInRange(O).map(function(P){return P=P.clone(),P.start.row+=k,P.end.row+=k,P}),N=x==0?this.doc.getLines(v,C):this.doc.removeFullLines(v,C);return this.doc.insertFullLines(v+k,N),I.length&&this.addFolds(I),k},w.prototype.moveLinesUp=function(v,C){return this.$moveLines(v,C,-1)},w.prototype.moveLinesDown=function(v,C){return this.$moveLines(v,C,1)},w.prototype.duplicateLines=function(v,C){return this.$moveLines(v,C,0)},w.prototype.$clipRowToDocument=function(v){return Math.max(0,Math.min(v,this.doc.getLength()-1))},w.prototype.$clipColumnToRow=function(v,C){return C<0?0:Math.min(this.doc.getLine(v).length,C)},w.prototype.$clipPositionToDocument=function(v,C){if(C=Math.max(0,C),v<0)v=0,C=0;else{var x=this.doc.getLength();v>=x?(v=x-1,C=this.doc.getLine(x-1).length):C=Math.min(this.doc.getLine(v).length,C)}return{row:v,column:C}},w.prototype.$clipRangeToDocument=function(v){v.start.row<0?(v.start.row=0,v.start.column=0):v.start.column=this.$clipColumnToRow(v.start.row,v.start.column);var C=this.doc.getLength()-1;return v.end.row>C?(v.end.row=C,v.end.column=this.doc.getLine(C).length):v.end.column=this.$clipColumnToRow(v.end.row,v.end.column),v},w.prototype.setUseWrapMode=function(v){if(v!=this.$useWrapMode){if(this.$useWrapMode=v,this.$modified=!0,this.$resetRowCache(0),v){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},w.prototype.getUseWrapMode=function(){return this.$useWrapMode},w.prototype.setWrapLimitRange=function(v,C){(this.$wrapLimitRange.min!==v||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:v,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},w.prototype.adjustWrapLimit=function(v,C){var x=this.$wrapLimitRange;x.max<0&&(x={min:C,max:C});var _=this.$constrainWrapLimit(v,x.min,x.max);return _!=this.$wrapLimit&&_>1?(this.$wrapLimit=_,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},w.prototype.$constrainWrapLimit=function(v,C,x){return C&&(v=Math.max(C,v)),x&&(v=Math.min(x,v)),v},w.prototype.getWrapLimit=function(){return this.$wrapLimit},w.prototype.setWrapLimit=function(v){this.setWrapLimitRange(v,v)},w.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},w.prototype.$updateInternalDataOnChange=function(v){var C=this.$useWrapMode,x=v.action,_=v.start,k=v.end,O=_.row,I=k.row,N=I-O,P=null;if(this.$updating=!0,N!=0)if(x==="remove"){this[C?"$wrapData":"$rowLengthCache"].splice(O,N);var B=this.$foldData;P=this.getFoldsInRange(v),this.removeFolds(P);var F=this.getFoldLine(k.row),H=0;if(F){F.addRemoveChars(k.row,k.column,_.column-k.column),F.shiftRow(-N);var z=this.getFoldLine(O);z&&z!==F&&(z.merge(F),F=z),H=B.indexOf(F)+1}for(H;H<B.length;H++){var F=B[H];F.start.row>=k.row&&F.shiftRow(-N)}I=O}else{var W=Array(N);W.unshift(O,0);var U=C?this.$wrapData:this.$rowLengthCache;U.splice.apply(U,W);var B=this.$foldData,F=this.getFoldLine(O),H=0;if(F){var K=F.range.compareInside(_.row,_.column);K==0?(F=F.split(_.row,_.column),F&&(F.shiftRow(N),F.addRemoveChars(I,0,k.column-_.column))):K==-1&&(F.addRemoveChars(O,0,k.column-_.column),F.shiftRow(N)),H=B.indexOf(F)+1}for(H;H<B.length;H++){var F=B[H];F.start.row>=O&&F.shiftRow(N)}}else{N=Math.abs(v.start.column-v.end.column),x==="remove"&&(P=this.getFoldsInRange(v),this.removeFolds(P),N=-N);var F=this.getFoldLine(O);F&&F.addRemoveChars(O,_.column,N)}return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(O,I):this.$updateRowLengthCache(O,I),P},w.prototype.$updateRowLengthCache=function(v,C){this.$rowLengthCache[v]=null,this.$rowLengthCache[C]=null},w.prototype.$updateWrapData=function(v,C){var x=this.doc.getAllLines(),_=this.getTabSize(),k=this.$wrapData,O=this.$wrapLimit,I,N,P=v;for(C=Math.min(C,x.length-1);P<=C;)N=this.getFoldLine(P,N),N?(I=[],N.walk((function(B,F,H,z){var W;if(B!=null){W=this.$getDisplayTokens(B,I.length),W[0]=A;for(var U=1;U<W.length;U++)W[U]=S}else W=this.$getDisplayTokens(x[F].substring(z,H),I.length);I=I.concat(W)}).bind(this),N.end.row,x[N.end.row].length+1),k[N.start.row]=this.$computeWrapSplits(I,O,_),P=N.end.row+1):(I=this.$getDisplayTokens(x[P]),k[P]=this.$computeWrapSplits(I,O,_),P++)},w.prototype.$computeWrapSplits=function(v,C,x){if(v.length==0)return[];var _=[],k=v.length,O=0,I=0,N=this.$wrapAsCode,P=this.$indentedSoftWrap,B=C<=Math.max(2*x,8)||P===!1?0:Math.floor(C/2);function F(){var K=0;if(B===0)return K;if(P)for(var Y=0;Y<v.length;Y++){var G=v[Y];if(G==R)K+=1;else if(G==L)K+=x;else{if(G==T)continue;break}}return N&&P!==!1&&(K+=x),Math.min(K,B)}function H(K){for(var Y=K-O,G=O;G<K;G++){var Q=v[G];(Q===12||Q===2)&&(Y-=1)}_.length||(z=F(),_.indent=z),I+=Y,_.push(I),O=K}for(var z=0;k-O>C-z;){var W=O+C-z;if(v[W-1]>=R&&v[W]>=R){H(W);continue}if(v[W]==A||v[W]==S){for(W;W!=O-1&&v[W]!=A;W--);if(W>O){H(W);continue}for(W=O+C,W;W<v.length&&v[W]==S;W++);if(W==v.length)break;H(W);continue}for(var U=Math.max(W-(C-(C>>2)),O-1);W>U&&v[W]<A;)W--;if(N){for(;W>U&&v[W]<A;)W--;for(;W>U&&v[W]==M;)W--}else for(;W>U&&v[W]<R;)W--;if(W>U){H(++W);continue}W=O+C,v[W]==$&&W--,H(W-z)}return _},w.prototype.$getDisplayTokens=function(v,C){var x=[],_;C=C||0;for(var k=0;k<v.length;k++){var O=v.charCodeAt(k);if(O==9){_=this.getScreenTabSize(x.length+C),x.push(L);for(var I=1;I<_;I++)x.push(T)}else O==32?x.push(R):O>39&&O<48||O>57&&O<64?x.push(M):O>=4352&&D(O)?x.push(E,$):x.push(E)}return x},w.prototype.$getStringScreenWidth=function(v,C,x){if(C==0)return[0,0];C==null&&(C=1/0),x=x||0;var _,k;for(k=0;k<v.length&&(_=v.charCodeAt(k),_==9?x+=this.getScreenTabSize(x):_>=4352&&D(_)?x+=2:x+=1,!(x>C));k++);return[x,k]},w.prototype.getRowLength=function(v){var C=1;return this.lineWidgets&&(C+=this.lineWidgets[v]&&this.lineWidgets[v].rowCount||0),!this.$useWrapMode||!this.$wrapData[v]?C:this.$wrapData[v].length+C},w.prototype.getRowLineCount=function(v){return!this.$useWrapMode||!this.$wrapData[v]?1:this.$wrapData[v].length+1},w.prototype.getRowWrapIndent=function(v){if(this.$useWrapMode){var C=this.screenToDocumentPosition(v,Number.MAX_VALUE),x=this.$wrapData[C.row];return x.length&&x[0]<C.column?x.indent:0}else return 0},w.prototype.getScreenLastRowColumn=function(v){var C=this.screenToDocumentPosition(v,Number.MAX_VALUE);return this.documentToScreenColumn(C.row,C.column)},w.prototype.getDocumentLastRowColumn=function(v,C){var x=this.documentToScreenRow(v,C);return this.getScreenLastRowColumn(x)},w.prototype.getDocumentLastRowColumnPosition=function(v,C){var x=this.documentToScreenRow(v,C);return this.screenToDocumentPosition(x,Number.MAX_VALUE/10)},w.prototype.getRowSplitData=function(v){if(this.$useWrapMode)return this.$wrapData[v]},w.prototype.getScreenTabSize=function(v){return this.$tabSize-(v%this.$tabSize|0)},w.prototype.screenToDocumentRow=function(v,C){return this.screenToDocumentPosition(v,C).row},w.prototype.screenToDocumentColumn=function(v,C){return this.screenToDocumentPosition(v,C).column},w.prototype.screenToDocumentPosition=function(v,C,x){if(v<0)return{row:0,column:0};var _,k=0,O=0,I,N=0,P=0,B=this.$screenRowCache,F=this.$getRowCacheIndex(B,v),H=B.length;if(H&&F>=0)var N=B[F],k=this.$docRowCache[F],z=v>B[H-1];else var z=!H;for(var W=this.getLength()-1,U=this.getNextFoldLine(k),K=U?U.start.row:1/0;N<=v&&(P=this.getRowLength(k),!(N+P>v||k>=W));)N+=P,k++,k>K&&(k=U.end.row+1,U=this.getNextFoldLine(k,U),K=U?U.start.row:1/0),z&&(this.$docRowCache.push(k),this.$screenRowCache.push(N));if(U&&U.start.row<=k)_=this.getFoldDisplayLine(U),k=U.start.row;else{if(N+P<=v||k>W)return{row:W,column:this.getLine(W).length};_=this.getLine(k),U=null}var Y=0,G=Math.floor(v-N);if(this.$useWrapMode){var Q=this.$wrapData[k];Q&&(I=Q[G],G>0&&Q.length&&(Y=Q.indent,O=Q[G-1]||Q[Q.length-1],_=_.substring(O)))}return x!==void 0&&this.$bidiHandler.isBidiRow(N+G,k,G)&&(C=this.$bidiHandler.offsetToCol(x)),O+=this.$getStringScreenWidth(_,C-Y)[1],this.$useWrapMode&&O>=I&&(O=I-1),U?U.idxToPosition(O):{row:k,column:O}},w.prototype.documentToScreenPosition=function(v,C){if(typeof C>"u")var x=this.$clipPositionToDocument(v.row,v.column);else x=this.$clipPositionToDocument(v,C);v=x.row,C=x.column;var _=0,k=null,O=null;O=this.getFoldAt(v,C,1),O&&(v=O.start.row,C=O.start.column);var I,N=0,P=this.$docRowCache,B=this.$getRowCacheIndex(P,v),F=P.length;if(F&&B>=0)var N=P[B],_=this.$screenRowCache[B],H=v>P[F-1];else var H=!F;for(var z=this.getNextFoldLine(N),W=z?z.start.row:1/0;N<v;){if(N>=W){if(I=z.end.row+1,I>v)break;z=this.getNextFoldLine(I,z),W=z?z.start.row:1/0}else I=N+1;_+=this.getRowLength(N),N=I,H&&(this.$docRowCache.push(N),this.$screenRowCache.push(_))}var U="";z&&N>=W?(U=this.getFoldDisplayLine(z,v,C),k=z.start.row):(U=this.getLine(v).substring(0,C),k=v);var K=0;if(this.$useWrapMode){var Y=this.$wrapData[k];if(Y){for(var G=0;U.length>=Y[G];)_++,G++;U=U.substring(Y[G-1]||0,U.length),K=G>0?Y.indent:0}}return this.lineWidgets&&this.lineWidgets[N]&&this.lineWidgets[N].rowsAbove&&(_+=this.lineWidgets[N].rowsAbove),{row:_,column:K+this.$getStringScreenWidth(U)[0]}},w.prototype.documentToScreenColumn=function(v,C){return this.documentToScreenPosition(v,C).column},w.prototype.documentToScreenRow=function(v,C){return this.documentToScreenPosition(v,C).row},w.prototype.getScreenLength=function(){var v=0,C=null;if(this.$useWrapMode)for(var k=this.$wrapData.length,O=0,_=0,C=this.$foldData[_++],I=C?C.start.row:1/0;O<k;){var N=this.$wrapData[O];v+=N?N.length+1:1,O++,O>I&&(O=C.end.row+1,C=this.$foldData[_++],I=C?C.start.row:1/0)}else{v=this.getLength();for(var x=this.$foldData,_=0;_<x.length;_++)C=x[_],v-=C.end.row-C.start.row}return this.lineWidgets&&(v+=this.$getWidgetScreenLength()),v},w.prototype.$setFontMetrics=function(v){this.$enableVarChar&&(this.$getStringScreenWidth=function(C,x,_){if(x===0)return[0,0];x||(x=1/0),_=_||0;var k,O;for(O=0;O<C.length&&(k=C.charAt(O),k===" "?_+=this.getScreenTabSize(_):_+=v.getCharacterWidth(k),!(_>x));O++);return[_,O]})},w.prototype.getPrecedingCharacter=function(){var v=this.selection.getCursor();if(v.column===0)return v.row===0?"":this.doc.getNewLineCharacter();var C=this.getLine(v.row);return C[v.column-1]},w.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},w})();b.$uid=0,b.prototype.$modes=c.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=D,h.implement(b.prototype,d);var E=1,$=2,A=3,S=4,M=9,R=10,L=11,T=12;function D(w){return w<4352?!1:w>=4352&&w<=4447||w>=4515&&w<=4519||w>=4602&&w<=4607||w>=9001&&w<=9002||w>=11904&&w<=11929||w>=11931&&w<=12019||w>=12032&&w<=12245||w>=12272&&w<=12283||w>=12288&&w<=12350||w>=12353&&w<=12438||w>=12441&&w<=12543||w>=12549&&w<=12589||w>=12593&&w<=12686||w>=12688&&w<=12730||w>=12736&&w<=12771||w>=12784&&w<=12830||w>=12832&&w<=12871||w>=12880&&w<=13054||w>=13056&&w<=19903||w>=19968&&w<=42124||w>=42128&&w<=42182||w>=43360&&w<=43388||w>=44032&&w<=55203||w>=55216&&w<=55238||w>=55243&&w<=55291||w>=63744&&w<=64255||w>=65040&&w<=65049||w>=65072&&w<=65106||w>=65108&&w<=65126||w>=65128&&w<=65131||w>=65281&&w<=65376||w>=65504&&w<=65510}t("./edit_session/folding").Folding.call(b.prototype),t("./edit_session/bracket_match").BracketMatch.call(b.prototype),c.defineOptions(b.prototype,"session",{wrap:{set:function(w){if(!w||w=="off"?w=!1:w=="free"?w=!0:w=="printMargin"?w=-1:typeof w=="string"&&(w=parseInt(w,10)||!1),this.$wrap!=w)if(this.$wrap=w,!w)this.setUseWrapMode(!1);else{var v=typeof w=="number"?w:null;this.setWrapLimitRange(v,v),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(w){w=w=="auto"?this.$mode.type!="text":w!="text",w!=this.$wrapAsCode&&(this.$wrapAsCode=w,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(w){this.$useWorker=w,this.$stopWorker(),w&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(w){w=parseInt(w),w>0&&this.$tabSize!==w&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=w,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(w){this.setFoldStyle(w)},handlesSet:!0},overwrite:{set:function(w){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(w){this.doc.setNewLineMode(w)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(w){this.setMode(w)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,n,p){var h=t("./lib/lang"),g=t("./lib/oop"),m=t("./range").Range,c=(function(){function r(){this.$options={}}return r.prototype.set=function(o){return g.mixin(this.$options,o),this},r.prototype.getOptions=function(){return h.copyObject(this.$options)},r.prototype.setOptions=function(o){this.$options=o},r.prototype.find=function(o){var a=this.$options,s=this.$matchIterator(o,a);if(!s)return!1;var i=null;return s.forEach(function(u,f,y,b){return i=new m(u,f,y,b),f==b&&a.start&&a.start.start&&a.skipCurrent!=!1&&i.isEqual(a.start)?(i=null,!1):!0}),i},r.prototype.findAll=function(o){var a=this.$options;if(!a.needle)return[];this.$assembleRegExp(a);var s=a.range,i=s?o.getLines(s.start.row,s.end.row):o.doc.getAllLines(),u=[],f=a.re;if(a.$isMultiLine){var y=f.length,b=i.length-y,E;e:for(var $=f.offset||0;$<=b;$++){for(var A=0;A<y;A++)if(i[$+A].search(f[A])==-1)continue e;var S=i[$],M=i[$+y-1],R=S.length-S.match(f[0])[0].length,L=M.match(f[y-1])[0].length;E&&E.end.row===$&&E.end.column>R||(u.push(E=new m($,R,$+y-1,L)),y>2&&($=$+y-2))}}else for(var T=0;T<i.length;T++)for(var D=h.getMatchOffsets(i[T],f),A=0;A<D.length;A++){var w=D[A];u.push(new m(T,w.offset,T,w.offset+w.length))}if(s){for(var v=s.start.column,C=s.end.column,T=0,A=u.length-1;T<A&&u[T].start.column<v&&u[T].start.row==0;)T++;for(var x=s.end.row-s.start.row;T<A&&u[A].end.column>C&&u[A].end.row==x;)A--;for(u=u.slice(T,A+1),T=0,A=u.length;T<A;T++)u[T].start.row+=s.start.row,u[T].end.row+=s.start.row}return u},r.prototype.replace=function(o,a){var s=this.$options,i=this.$assembleRegExp(s);if(s.$isMultiLine)return a;if(i){var u=i.exec(o);if(!u||u[0].length!=o.length)return null;if(s.regExp||(a=a.replace(/\$/g,"$$$$")),a=o.replace(i,a),s.preserveCase){a=a.split("");for(var f=Math.min(o.length,o.length);f--;){var y=o[f];y&&y.toLowerCase()!=y?a[f]=a[f].toUpperCase():a[f]=a[f].toLowerCase()}a=a.join("")}return a}},r.prototype.$assembleRegExp=function(o,a){if(o.needle instanceof RegExp)return o.re=o.needle;var s=o.needle;if(!o.needle)return o.re=!1;o.regExp||(s=h.escapeRegExp(s));var i=o.caseSensitive?"gm":"gmi";try{new RegExp(s,"u"),o.$supportsUnicodeFlag=!0,i+="u"}catch{o.$supportsUnicodeFlag=!1}if(o.wholeWord&&(s=d(s,o)),o.$isMultiLine=!a&&/[\n\r]/.test(s),o.$isMultiLine)return o.re=this.$assembleMultilineRegExp(s,i);try{var u=new RegExp(s,i)}catch{u=!1}return o.re=u},r.prototype.$assembleMultilineRegExp=function(o,a){for(var s=o.replace(/\r\n|\r|\n/g,`$
1358
+ `+d(this.$redoStack)},w})();f.prototype.hasUndo=f.prototype.canUndo,f.prototype.hasRedo=f.prototype.canRedo,f.prototype.isClean=f.prototype.isAtBookmark,f.prototype.markClean=f.prototype.bookmark;function g(w,S){for(var M=S;M--;){var L=w[M];if(L&&!L[0].ignore){for(;M<S-1;){var R=r(w[M],w[M+1]);w[M]=R[0],w[M+1]=R[1],M++}return!0}}}var c=t("./range").Range,o=c.comparePoints;c.comparePoints;function h(w){return{row:w.row,column:w.column}}function u(w){return{start:h(w.start),end:h(w.end),action:w.action,lines:w.lines.slice()}}function d(w){if(w=w||this,Array.isArray(w))return w.map(d).join(`
1359
+ `);var S="";return w.action?(S=w.action=="insert"?"+":"-",S+="["+w.lines+"]"):w.value&&(Array.isArray(w.value)?S=w.value.map(l).join(`
1360
+ `):S=l(w.value)),w.start&&(S+=l(w)),(w.id||w.rev)&&(S+=" ("+(w.id||w.rev)+")"),S}function l(w){return w.start.row+":"+w.start.column+"=>"+w.end.row+":"+w.end.column}function s(w,S){var M=w.action=="insert",L=S.action=="insert";if(M&&L)if(o(S.start,w.end)>=0)p(S,w,-1);else if(o(S.start,w.start)<=0)p(w,S,1);else return null;else if(M&&!L)if(o(S.start,w.end)>=0)p(S,w,-1);else if(o(S.end,w.start)<=0)p(w,S,-1);else return null;else if(!M&&L)if(o(S.start,w.start)>=0)p(S,w,1);else if(o(S.start,w.start)<=0)p(w,S,1);else return null;else if(!M&&!L)if(o(S.start,w.start)>=0)p(S,w,1);else if(o(S.end,w.start)<=0)p(w,S,-1);else return null;return[S,w]}function r(w,S){for(var M=w.length;M--;)for(var L=0;L<S.length;L++)if(!s(w[M],S[L])){for(;M<w.length;){for(;L--;)s(S[L],w[M]);L=S.length,M++}return[w,S]}return w.selectionBefore=S.selectionBefore=w.selectionAfter=S.selectionAfter=null,[S,w]}function a(w,S){var M=w.action=="insert",L=S.action=="insert";if(M&&L)o(w.start,S.start)<0?p(S,w,1):p(w,S,1);else if(M&&!L)o(w.start,S.end)>=0?p(w,S,-1):(o(w.start,S.start)<=0||p(w,c.fromPoints(S.start,w.start),-1),p(S,w,1));else if(!M&&L)o(S.start,w.end)>=0?p(S,w,-1):(o(S.start,w.start)<=0||p(S,c.fromPoints(w.start,S.start),-1),p(w,S,1));else if(!M&&!L)if(o(S.start,w.end)>=0)p(S,w,-1);else if(o(S.end,w.start)<=0)p(w,S,-1);else{var R,$;return o(w.start,S.start)<0&&(R=w,w=y(w,S.start)),o(w.end,S.end)>0&&($=y(w,S.end)),v(S.end,w.start,w.end,-1),$&&!R&&(w.lines=$.lines,w.start=$.start,w.end=$.end,$=w),[S,R,$].filter(Boolean)}return[S,w]}function p(w,S,M){v(w.start,S.start,S.end,M),v(w.end,S.start,S.end,M)}function v(w,S,M,L){w.row==(L==1?S:M).row&&(w.column+=L*(M.column-S.column)),w.row+=L*(M.row-S.row)}function y(w,S){var M=w.lines,L=w.end;w.end=h(S);var R=w.end.row-w.start.row,$=M.splice(R,M.length),D=R?S.column:S.column-w.start.column;return M.push($[0].substring(0,D)),$[0]=$[0].substr(D),{start:h(S),end:L,lines:$,action:w.action}}function k(w,S){S=u(S);for(var M=w.length;M--;){for(var L=w[M],R=0;R<L.length;R++){var $=L[R],D=a($,S);S=D[0],D.length!=2&&(D[2]?(L.splice(R+1,1,D[1],D[2]),R++):D[1]||(L.splice(R,1),R--))}L.length||w.splice(M,1)}return w}function x(w,S){for(var M=0;M<S.length;M++)for(var L=S[M],R=0;R<L.length;R++)k(w,L[R])}n.UndoManager=f}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,n,m){"use strict";var f=t("../range").Range;n.FoldLine=(function(){function g(c,o){this.foldData=c,Array.isArray(o)?this.folds=o:o=this.folds=[o];var h=o[o.length-1];this.range=new f(o[0].start.row,o[0].start.column,h.end.row,h.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(u){u.setFoldLine(this)},this)}return g.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(o){o.start.row+=c,o.end.row+=c})},g.prototype.addFold=function(c){if(c.sameRow){if(c.start.row<this.startRow||c.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(o,h){return-o.range.compareEnd(h.start.row,h.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},g.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},g.prototype.walk=function(c,o,h){var u=0,d=this.folds,l,s,r,a=!0;o==null&&(o=this.end.row,h=this.end.column);for(var p=0;p<d.length;p++){if(l=d[p],s=l.range.compareStart(o,h),s==-1){c(null,o,h,u,a);return}if(r=c(null,l.start.row,l.start.column,u,a),r=!r&&c(l.placeholder,l.start.row,l.start.column,u),r||s===0)return;a=!l.sameRow,u=l.end.column}c(null,o,h,u,a)},g.prototype.getNextFoldTo=function(c,o){for(var h,u,d=0;d<this.folds.length;d++){if(h=this.folds[d],u=h.range.compareEnd(c,o),u==-1)return{fold:h,kind:"after"};if(u===0)return{fold:h,kind:"inside"}}return null},g.prototype.addRemoveChars=function(c,o,h){var u=this.getNextFoldTo(c,o),d,l;if(u){if(d=u.fold,u.kind=="inside"&&d.start.column!=o&&d.start.row!=c)window.console&&window.console.log(c,o,d);else if(d.start.row==c){l=this.folds;var s=l.indexOf(d);for(s===0&&(this.start.column+=h);s<l.length;s++){if(d=l[s],d.start.column+=h,!d.sameRow)return;d.end.column+=h}this.end.column+=h}}},g.prototype.split=function(c,o){var h=this.getNextFoldTo(c,o);if(!h||h.kind=="inside")return null;var u=h.fold,d=this.folds,l=this.foldData,s=d.indexOf(u),r=d[s-1];this.end.row=r.end.row,this.end.column=r.end.column,d=d.splice(s,d.length-s);var a=new g(l,d);return l.splice(l.indexOf(this)+1,0,a),a},g.prototype.merge=function(c){for(var o=c.folds,h=0;h<o.length;h++)this.addFold(o[h]);var u=this.foldData;u.splice(u.indexOf(c),1)},g.prototype.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(o){c.push(" "+o.toString())}),c.push("]"),c.join(`
1361
+ `)},g.prototype.idxToPosition=function(c){for(var o=0,h=0;h<this.folds.length;h++){var u=this.folds[h];if(c-=u.start.column-o,c<0)return{row:u.start.row,column:u.start.column+c};if(c-=u.placeholder.length,c<0)return u.start;o=u.end.column}return{row:this.end.row,column:this.end.column+c}},g})()}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(t,n,m){"use strict";var f=t("./range").Range.comparePoints,g=(function(){function c(){this.ranges=[],this.$bias=1}return c.prototype.pointIndex=function(o,h,u){for(var d=this.ranges,l=u||0;l<d.length;l++){var s=d[l],r=f(o,s.end);if(!(r>0)){var a=f(o,s.start);return r===0?h&&a!==0?-l-2:l:a>0||a===0&&!h?l:-l-1}}return-l-1},c.prototype.add=function(o){var h=!o.isEmpty(),u=this.pointIndex(o.start,h);u<0&&(u=-u-1);var d=this.pointIndex(o.end,h,u);return d<0?d=-d-1:d++,this.ranges.splice(u,d-u,o)},c.prototype.addList=function(o){for(var h=[],u=o.length;u--;)h.push.apply(h,this.add(o[u]));return h},c.prototype.substractPoint=function(o){var h=this.pointIndex(o);if(h>=0)return this.ranges.splice(h,1)},c.prototype.merge=function(){var o=[],h=this.ranges;h=h.sort(function(r,a){return f(r.start,a.start)});for(var u=h[0],d,l=1;l<h.length;l++){d=u,u=h[l];var s=f(d.end,u.start);s<0||s==0&&!d.isEmpty()&&!u.isEmpty()||(f(d.end,u.end)<0&&(d.end.row=u.end.row,d.end.column=u.end.column),h.splice(l,1),o.push(u),u=d,l--)}return this.ranges=h,o},c.prototype.contains=function(o,h){return this.pointIndex({row:o,column:h})>=0},c.prototype.containsPoint=function(o){return this.pointIndex(o)>=0},c.prototype.rangeAtPoint=function(o){var h=this.pointIndex(o);if(h>=0)return this.ranges[h]},c.prototype.clipRows=function(o,h){var u=this.ranges;if(u[0].start.row>h||u[u.length-1].start.row<o)return[];var d=this.pointIndex({row:o,column:0});d<0&&(d=-d-1);var l=this.pointIndex({row:h,column:0},d);l<0&&(l=-l-1);for(var s=[],r=d;r<l;r++)s.push(u[r]);return s},c.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},c.prototype.attach=function(o){this.session&&this.detach(),this.session=o,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},c.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},c.prototype.$onChange=function(o){for(var h=o.start,u=o.end,d=h.row,l=u.row,s=this.ranges,r=0,a=s.length;r<a;r++){var p=s[r];if(p.end.row>=d)break}if(o.action=="insert")for(var v=l-d,y=-h.column+u.column;r<a;r++){var p=s[r];if(p.start.row>d)break;if(p.start.row==d&&p.start.column>=h.column&&(p.start.column==h.column&&this.$bias<=0||(p.start.column+=y,p.start.row+=v)),p.end.row==d&&p.end.column>=h.column){if(p.end.column==h.column&&this.$bias<0)continue;p.end.column==h.column&&y>0&&r<a-1&&p.end.column>p.start.column&&p.end.column==s[r+1].start.column&&(p.end.column-=y),p.end.column+=y,p.end.row+=v}}else for(var v=d-l,y=h.column-u.column;r<a;r++){var p=s[r];if(p.start.row>l)break;p.end.row<l&&(d<p.end.row||d==p.end.row&&h.column<p.end.column)?(p.end.row=d,p.end.column=h.column):p.end.row==l?p.end.column<=u.column?(v||p.end.column>h.column)&&(p.end.column=h.column,p.end.row=h.row):(p.end.column+=y,p.end.row+=v):p.end.row>l&&(p.end.row+=v),p.start.row<l&&(d<p.start.row||d==p.start.row&&h.column<p.start.column)?(p.start.row=d,p.start.column=h.column):p.start.row==l?p.start.column<=u.column?(v||p.start.column>h.column)&&(p.start.column=h.column,p.start.row=h.row):(p.start.column+=y,p.start.row+=v):p.start.row>l&&(p.start.row+=v)}if(v!=0&&r<a)for(;r<a;r++){var p=s[r];p.start.row+=v,p.end.row+=v}},c})();g.prototype.comparePoints=f,n.RangeList=g}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(t,n,m){"use strict";var f=this&&this.__extends||(function(){var d=function(l,s){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(r[p]=a[p])},d(l,s)};return function(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");d(l,s);function r(){this.constructor=l}l.prototype=s===null?Object.create(s):(r.prototype=s.prototype,new r)}})(),g=(function(d){f(l,d);function l(s,r){var a=d.call(this)||this;return a.foldLine=null,a.placeholder=r,a.range=s,a.start=s.start,a.end=s.end,a.sameRow=s.start.row==s.end.row,a.subFolds=a.ranges=[],a}return l.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},l.prototype.setFoldLine=function(s){this.foldLine=s,this.subFolds.forEach(function(r){r.setFoldLine(s)})},l.prototype.clone=function(){var s=new l(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(r){s.subFolds.push(r.clone())}),s.collapseChildren=this.collapseChildren,s},l.prototype.addSubFold=function(s){if(!this.range.isEqual(s)){o(s,this.start);for(var y=s.start.row,k=s.start.column,r=0,a=-1;r<this.subFolds.length&&(a=this.subFolds[r].range.compare(y,k),a==1);r++);var p=this.subFolds[r],v=0;if(a==0){if(p.range.containsRange(s))return p.addSubFold(s);v=1}for(var y=s.range.end.row,k=s.range.end.column,x=r,a=-1;x<this.subFolds.length&&(a=this.subFolds[x].range.compare(y,k),a==1);x++);a==0&&x++;for(var w=this.subFolds.splice(r,x-r,s),S=a==0?w.length-1:w.length,M=v;M<S;M++)s.addSubFold(w[M]);return s.setFoldLine(this.foldLine),s}},l.prototype.restoreRange=function(s){return u(s,this.start)},l})(t("../range_list").RangeList);function c(d,l){d.row-=l.row,d.row==0&&(d.column-=l.column)}function o(d,l){c(d.start,l),c(d.end,l)}function h(d,l){d.row==0&&(d.column+=l.column),d.row+=l.row}function u(d,l){h(d.start,l),h(d.end,l)}n.Fold=g}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(t,n,m){"use strict";var f=t("../range").Range,g=t("./fold_line").FoldLine,c=t("./fold").Fold,o=t("../token_iterator").TokenIterator,h=t("../mouse/mouse_event").MouseEvent;function u(){this.getFoldAt=function(d,l,s){var r=this.getFoldLine(d);if(!r)return null;for(var a=r.folds,p=0;p<a.length;p++){var v=a[p].range;if(v.contains(d,l)){if(s==1&&v.isEnd(d,l)&&!v.isEmpty())continue;if(s==-1&&v.isStart(d,l)&&!v.isEmpty())continue;return a[p]}}},this.getFoldsInRange=function(d){var l=d.start,s=d.end,r=this.$foldData,a=[];l.column+=1,s.column-=1;for(var p=0;p<r.length;p++){var v=r[p].range.compareRange(d);if(v!=2){if(v==-2)break;for(var y=r[p].folds,k=0;k<y.length;k++){var x=y[k];if(v=x.range.compareRange(d),v==-2)break;if(v==2)continue;if(v==42)break;a.push(x)}}}return l.column-=1,s.column+=1,a},this.getFoldsInRangeList=function(d){if(Array.isArray(d)){var l=[];d.forEach(function(r){l=l.concat(this.getFoldsInRange(r))},this)}else var l=this.getFoldsInRange(d);return l},this.getAllFolds=function(){for(var d=[],l=this.$foldData,s=0;s<l.length;s++)for(var r=0;r<l[s].folds.length;r++)d.push(l[s].folds[r]);return d},this.getFoldStringAt=function(d,l,s,r){if(r=r||this.getFoldLine(d),!r)return null;for(var a={end:{column:0}},p,v,y=0;y<r.folds.length;y++){v=r.folds[y];var k=v.range.compareEnd(d,l);if(k==-1){p=this.getLine(v.start.row).substring(a.end.column,v.start.column);break}else if(k===0)return null;a=v}return p||(p=this.getLine(v.start.row).substring(a.end.column)),s==-1?p.substring(0,l-a.end.column):s==1?p.substring(l-a.end.column):p},this.getFoldLine=function(d,l){var s=this.$foldData,r=0;for(l&&(r=s.indexOf(l)),r==-1&&(r=0);r<s.length;r++){var a=s[r];if(a.start.row<=d&&a.end.row>=d)return a;if(a.end.row>d)return null}return null},this.getNextFoldLine=function(d,l){var s=this.$foldData,r=0;for(l&&(r=s.indexOf(l)),r==-1&&(r=0);r<s.length;r++){var a=s[r];if(a.end.row>=d)return a}return null},this.getFoldedRowCount=function(d,l){for(var s=this.$foldData,r=l-d+1,a=0;a<s.length;a++){var p=s[a],v=p.end.row,y=p.start.row;if(v>=l){y<l&&(y>=d?r-=l-y:r=0);break}else v>=d&&(y>=d?r-=v-y:r-=v-d+1)}return r},this.$addFoldLine=function(d){return this.$foldData.push(d),this.$foldData.sort(function(l,s){return l.start.row-s.start.row}),d},this.addFold=function(d,l){var s=this.$foldData,r=!1,a;d instanceof c?a=d:(a=new c(l,d),a.collapseChildren=l.collapseChildren),this.$clipRangeToDocument(a.range);var p=a.start.row,v=a.start.column,y=a.end.row,k=a.end.column,x=this.getFoldAt(p,v,1),w=this.getFoldAt(y,k,-1);if(x&&w==x)return x.addSubFold(a);x&&!x.range.isStart(p,v)&&this.removeFold(x),w&&!w.range.isEnd(y,k)&&this.removeFold(w);var S=this.getFoldsInRange(a.range);S.length>0&&(this.removeFolds(S),a.collapseChildren||S.forEach(function($){a.addSubFold($)}));for(var M=0;M<s.length;M++){var L=s[M];if(y==L.start.row){L.addFold(a),r=!0;break}else if(p==L.end.row){if(L.addFold(a),r=!0,!a.sameRow){var R=s[M+1];if(R&&R.start.row==y){L.merge(R);break}}break}else if(y<=L.start.row)break}return r||(L=this.$addFoldLine(new g(this.$foldData,a))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:a,action:"add"}),a},this.addFolds=function(d){d.forEach(function(l){this.addFold(l)},this)},this.removeFold=function(d){var l=d.foldLine,s=l.start.row,r=l.end.row,a=this.$foldData,p=l.folds;if(p.length==1)a.splice(a.indexOf(l),1);else if(l.range.isEnd(d.end.row,d.end.column))p.pop(),l.end.row=p[p.length-1].end.row,l.end.column=p[p.length-1].end.column;else if(l.range.isStart(d.start.row,d.start.column))p.shift(),l.start.row=p[0].start.row,l.start.column=p[0].start.column;else if(d.sameRow)p.splice(p.indexOf(d),1);else{var v=l.split(d.start.row,d.start.column);p=v.folds,p.shift(),v.start.row=p[0].start.row,v.start.column=p[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(s,r):this.$updateRowLengthCache(s,r)),this.$modified=!0,this._signal("changeFold",{data:d,action:"remove"})},this.removeFolds=function(d){for(var l=[],s=0;s<d.length;s++)l.push(d[s]);l.forEach(function(r){this.removeFold(r)},this),this.$modified=!0},this.expandFold=function(d){this.removeFold(d),d.subFolds.forEach(function(l){d.restoreRange(l),this.addFold(l)},this),d.collapseChildren>0&&this.foldAll(d.start.row+1,d.end.row,d.collapseChildren-1),d.subFolds=[]},this.expandFolds=function(d){d.forEach(function(l){this.expandFold(l)},this)},this.unfold=function(d,l){var s,r;if(d==null)s=new f(0,0,this.getLength(),0),l==null&&(l=!0);else if(typeof d=="number")s=new f(d,0,d,this.getLine(d).length);else if("row"in d)s=f.fromPoints(d,d);else{if(Array.isArray(d))return r=[],d.forEach(function(p){r=r.concat(this.unfold(p))},this),r;s=d}r=this.getFoldsInRangeList(s);for(var a=r;r.length==1&&f.comparePoints(r[0].start,s.start)<0&&f.comparePoints(r[0].end,s.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(s);if(l!=!1?this.removeFolds(r):this.expandFolds(r),a.length)return a},this.isRowFolded=function(d,l){return!!this.getFoldLine(d,l)},this.getRowFoldEnd=function(d,l){var s=this.getFoldLine(d,l);return s?s.end.row:d},this.getRowFoldStart=function(d,l){var s=this.getFoldLine(d,l);return s?s.start.row:d},this.getFoldDisplayLine=function(d,l,s,r,a){r==null&&(r=d.start.row),a==null&&(a=0),l==null&&(l=d.end.row),s==null&&(s=this.getLine(l).length);var p=this.doc,v="";return d.walk(function(y,k,x,w){if(!(k<r)){if(k==r){if(x<a)return;w=Math.max(a,w)}y!=null?v+=y:v+=p.getLine(k).substring(w,x)}},l,s),v},this.getDisplayLine=function(d,l,s,r){var a=this.getFoldLine(d);if(a)return this.getFoldDisplayLine(a,d,l,s,r);var p=this.doc.getLine(d);return p.substring(r||0,l||p.length)},this.$cloneFoldData=function(){var d=[];return d=this.$foldData.map(function(l){var s=l.folds.map(function(r){return r.clone()});return new g(d,s)}),d},this.toggleFold=function(d){var l=this.selection.getRange(),s,r;if(l.isEmpty()){var a=l.start;if(s=this.getFoldAt(a.row,a.column),s){this.expandFold(s);return}else if(d){var p=this.getFoldLine(a.row);p&&this.expandFolds(p.folds);return}else(r=this.findMatchingBracket(a))?l.comparePoint(r)==1?l.end=r:(l.start=r,l.start.column++,l.end.column--):(r=this.findMatchingBracket({row:a.row,column:a.column+1}))?(l.comparePoint(r)==1?l.end=r:l.start=r,l.start.column++):l=this.getCommentFoldRange(a.row,a.column)||l}else{var v=this.getFoldsInRange(l);if(d&&v.length){this.expandFolds(v);return}else v.length==1&&(s=v[0])}if(s||(s=this.getFoldAt(l.start.row,l.start.column)),s&&s.range.toString()==l.toString()){this.expandFold(s);return}var y="...";if(!l.isMultiLine()){if(y=this.getTextRange(l),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,l)},this.getCommentFoldRange=function(d,l,s){var r=new o(this,d,l),a=r.getCurrentToken(),p=a&&a.type;if(a&&/^comment|string/.test(p)){p=p.match(/comment|string/)[0],p=="comment"&&(p+="|doc-start|\\.doc");var v=new RegExp(p),y=new f;if(s!=1){do a=r.stepBackward();while(a&&v.test(a.type));a=r.stepForward()}y.start.row=r.getCurrentTokenRow(),y.start.column=r.getCurrentTokenColumn()+a.value.length,r=new o(this,d,l);var k=this.getState(r.$row);if(s!=-1){var x=-1;do if(a=r.stepForward(),x==-1){var w=this.getState(r.$row);k.toString()!==w.toString()&&(x=r.$row)}else if(r.$row>x)break;while(a&&v.test(a.type));a=r.stepBackward()}else a=r.getCurrentToken();return y.end.row=r.getCurrentTokenRow(),y.end.column=r.getCurrentTokenColumn(),y.start.row==y.end.row&&y.start.column>y.end.column?void 0:y}},this.foldAll=function(d,l,s,r){s==null&&(s=1e5);var a=this.foldWidgets;if(a){l=l||this.getLength(),d=d||0;for(var p=d;p<l;p++)if(a[p]==null&&(a[p]=this.getFoldWidget(p)),a[p]=="start"&&!(r&&!r(p))){var v=this.getFoldWidgetRange(p);v&&v.isMultiLine()&&v.end.row<=l&&v.start.row>=d&&(p=v.end.row,v.collapseChildren=s,this.addFold("...",v))}}},this.foldToLevel=function(d){for(this.foldAll();d-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var d=this;this.foldAll(null,null,null,function(l){for(var s=d.getTokens(l),r=0;r<s.length;r++){var a=s[r];if(!(a.type=="text"&&/^\s+$/.test(a.value)))return!!/comment/.test(a.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(d){if(!this.$foldStyles[d])throw new Error("invalid fold style: "+d+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=d){this.$foldStyle=d,d=="manual"&&this.unfold();var l=this.$foldMode;this.$setFolding(null),this.$setFolding(l)}},this.$setFolding=function(d){if(this.$foldMode!=d){if(this.$foldMode=d,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!d||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=d.getFoldWidget.bind(d,this,this.$foldStyle),this.getFoldWidgetRange=d.getFoldWidgetRange.bind(d,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(d,l){var s=this.foldWidgets;if(!s||l&&s[d])return{};for(var r=d-1,a;r>=0;){var p=s[r];if(p==null&&(p=s[r]=this.getFoldWidget(r)),p=="start"){var v=this.getFoldWidgetRange(r);if(a||(a=v),v&&v.end.row>=d)break}r--}return{range:r!==-1&&v,firstRange:a}},this.onFoldWidgetClick=function(d,l){l instanceof h&&(l=l.domEvent);var s={children:l.shiftKey,all:l.ctrlKey||l.metaKey,siblings:l.altKey};if(!this.$toggleFoldWidget(d,s)){var r=l.target||l.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(d,l){if(this.getFoldWidget){var s=this.getFoldWidget(d),r=this.getLine(d),a=s==="end"?-1:1,p=this.getFoldAt(d,a===-1?0:r.length,a);if(p)return l.children||l.all?this.removeFold(p):this.expandFold(p),p;var v=this.getFoldWidgetRange(d,!0);if(v&&!v.isMultiLine()&&(p=this.getFoldAt(v.start.row,v.start.column,1),p&&v.isEqual(p.range)))return this.removeFold(p),p;if(l.siblings){var y=this.getParentFoldRangeData(d);if(y.range)var k=y.range.start.row+1,x=y.range.end.row;this.foldAll(k,x,l.all?1e4:0)}else l.children?(x=v?v.end.row:this.getLength(),this.foldAll(d+1,x,l.all?1e4:0)):v&&(l.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(d){var l=this.selection.getCursor().row;l=this.getRowFoldStart(l);var s=this.$toggleFoldWidget(l,{});if(!s){var r=this.getParentFoldRangeData(l,!0);if(s=r.range||r.firstRange,s){l=s.start.row;var a=this.getFoldAt(l,this.getLine(l).length,1);a?this.removeFold(a):this.addFold("...",s)}}},this.updateFoldWidgets=function(d){var l=d.start.row,s=d.end.row-l;if(s===0)this.foldWidgets[l]=null;else if(d.action=="remove")this.foldWidgets.splice(l,s+1,null);else{var r=Array(s+1);r.unshift(l,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(d){var l=d.data;l.first!=l.last&&this.foldWidgets.length>l.first&&this.foldWidgets.splice(l.first,this.foldWidgets.length)}}n.Folding=u}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,n,m){"use strict";var f=t("../token_iterator").TokenIterator,g=t("../range").Range;function c(){this.findMatchingBracket=function(o,h){if(o.column==0)return null;var u=h||this.getLine(o.row).charAt(o.column-1);if(u=="")return null;var d=u.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],o):this.$findOpeningBracket(d[2],o):null},this.getBracketRange=function(o){var h=this.getLine(o.row),u=!0,d,l=h.charAt(o.column-1),s=l&&l.match(/([\(\[\{])|([\)\]\}])/);if(s||(l=h.charAt(o.column),o={row:o.row,column:o.column+1},s=l&&l.match(/([\(\[\{])|([\)\]\}])/),u=!1),!s)return null;if(s[1]){var r=this.$findClosingBracket(s[1],o);if(!r)return null;d=g.fromPoints(o,r),u||(d.end.column++,d.start.column--),d.cursor=d.end}else{var r=this.$findOpeningBracket(s[2],o);if(!r)return null;d=g.fromPoints(r,o),u||(d.start.column++,d.end.column--),d.cursor=d.start}return d},this.getMatchingBracketRanges=function(o,h){var u=this.getLine(o.row),d=/([\(\[\{])|([\)\]\}])/,l=!h&&u.charAt(o.column-1),s=l&&l.match(d);if(s||(l=(h===void 0||h)&&u.charAt(o.column),o={row:o.row,column:o.column+1},s=l&&l.match(d)),!s)return null;var r=new g(o.row,o.column-1,o.row,o.column),a=s[1]?this.$findClosingBracket(s[1],o):this.$findOpeningBracket(s[2],o);return a?[r,new g(a.row,a.column,a.row,a.column+1)]:[r]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(o,h,u){var d=this.$brackets[o],l=1,s=new f(this,h.row,h.column),r=s.getCurrentToken();if(r||(r=s.stepForward()),!!r){u||(u=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var a=h.column-s.getCurrentTokenColumn()-2,p=r.value;;){for(;a>=0;){var v=p.charAt(a);if(v==d){if(l-=1,l==0)return{row:s.getCurrentTokenRow(),column:a+s.getCurrentTokenColumn()}}else v==o&&(l+=1);a-=1}do r=s.stepBackward();while(r&&!u.test(r.type));if(r==null)break;p=r.value,a=p.length-1}return null}},this.$findClosingBracket=function(o,h,u){var d=this.$brackets[o],l=1,s=new f(this,h.row,h.column),r=s.getCurrentToken();if(r||(r=s.stepForward()),!!r){u||(u=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var a=h.column-s.getCurrentTokenColumn();;){for(var p=r.value,v=p.length;a<v;){var y=p.charAt(a);if(y==d){if(l-=1,l==0)return{row:s.getCurrentTokenRow(),column:a+s.getCurrentTokenColumn()}}else y==o&&(l+=1);a+=1}do r=s.stepForward();while(r&&!u.test(r.type));if(r==null)break;a=0}return null}},this.getMatchingTags=function(o){var h=new f(this,o.row,o.column),u=this.$findTagName(h);if(u)return h.stepBackward().value==="<"?this.$findClosingTag(h,u):this.$findOpeningTag(h,u)},this.$findTagName=function(o){var h=o.getCurrentToken(),u=!1,d=!1;if(h&&h.type.indexOf("tag-name")===-1)do d?h=o.stepBackward():h=o.stepForward(),h&&(h.value==="/>"?d=!0:h.type.indexOf("tag-name")!==-1&&(u=!0));while(h&&!u);return h},this.$findClosingTag=function(o,h){var u,d=h.value,l=h.value,s=0,r=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);h=o.stepForward();var a=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+h.value.length),p=!1;do{if(u=h,u.type.indexOf("tag-close")!==-1&&!p){var v=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);p=!0}if(h=o.stepForward(),h){if(h.value===">"&&!p){var v=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);p=!0}if(h.type.indexOf("tag-name")!==-1){if(d=h.value,l===d){if(u.value==="<")s++;else if(u.value==="</"&&(s--,s<0)){o.stepBackward();var y=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2);h=o.stepForward();var k=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=o.stepForward()),h&&h.value===">")var x=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);else return}}}else if(l===d&&h.value==="/>"&&(s--,s<0))var y=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2),k=y,x=k,v=new g(a.end.row,a.end.column,a.end.row,a.end.column+1)}}while(h&&s>=0);if(r&&v&&y&&x&&a&&k)return{openTag:new g(r.start.row,r.start.column,v.end.row,v.end.column),closeTag:new g(y.start.row,y.start.column,x.end.row,x.end.column),openTagName:a,closeTagName:k}},this.$findOpeningTag=function(o,h){var u=o.getCurrentToken(),d=h.value,l=0,s=o.getCurrentTokenRow(),r=o.getCurrentTokenColumn(),a=r+2,p=new g(s,r,s,a);o.stepForward();var v=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=o.stepForward()),!(!h||h.value!==">")){var y=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);o.stepBackward(),o.stepBackward();do if(h=u,s=o.getCurrentTokenRow(),r=o.getCurrentTokenColumn(),a=r+h.value.length,u=o.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(d===h.value)if(u.value==="<"){if(l++,l>0){var k=new g(s,r,s,a),x=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);do h=o.stepForward();while(h&&h.value!==">");var w=new g(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1)}}else u.value==="</"&&l--}else if(h.value==="/>"){for(var S=0,M=u;M;){if(M.type.indexOf("tag-name")!==-1&&M.value===d){l--;break}else if(M.value==="<")break;M=o.stepBackward(),S++}for(var L=0;L<S;L++)o.stepForward()}}while(u&&l<=0);if(x&&w&&p&&y&&k&&v)return{openTag:new g(x.start.row,x.start.column,w.end.row,w.end.column),closeTag:new g(p.start.row,p.start.column,y.end.row,y.end.column),openTagName:k,closeTagName:v}}}}n.BracketMatch=c}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(t,n,m){"use strict";var f=t("./lib/oop"),g=t("./lib/lang"),c=t("./bidihandler").BidiHandler,o=t("./config"),h=t("./lib/event_emitter").EventEmitter,u=t("./selection").Selection,d=t("./mode/text").Mode,l=t("./range").Range,s=t("./line_widgets").LineWidgets,r=t("./document").Document,a=t("./background_tokenizer").BackgroundTokenizer,p=t("./search_highlight").SearchHighlight,v=t("./undomanager").UndoManager,y=(function(){function T(E,C){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++T.$uid,this.$foldData.toString=function(){return this.join(`
1362
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new a(new d().getTokenizer(),this);var b=this;this.bgTokenizer.on("update",function(A){b._signal("tokenizerUpdate",A)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof E!="object"||!E.getLine)&&(E=new r(E)),this.setDocument(E),this.selection=new u(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new c(this),o.resetOptions(this),this.setMode(C),o._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return T.prototype.$initOperationListeners=function(){var E=this;this.curOp=null,this.on("change",function(){E.curOp||(E.startOperation(),E.curOp.selectionBefore=E.$lastSel),E.curOp.docChanged=!0},!0),this.on("changeSelection",function(){E.curOp||(E.startOperation(),E.curOp.selectionBefore=E.$lastSel),E.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},T.prototype.startOperation=function(E){if(this.curOp){if(!E||this.curOp.command)return;this.prevOp=this.curOp}E||(E={}),this.$operationResetTimer.schedule(),this.curOp={command:E.command||{},args:E.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",E)},T.prototype.endOperation=function(E){if(this.curOp){if(E&&E.returnValue===!1){this.curOp=null,this._signal("endOperation",E);return}if(E==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var C=this.selection.toJSON();this.curOp.selectionAfter=C,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(C),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",E)}},T.prototype.setDocument=function(E){this.doc&&this.doc.off("change",this.$onChange),this.doc=E,E.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},T.prototype.getDocument=function(){return this.doc},Object.defineProperty(T.prototype,"widgetManager",{get:function(){var E=new s(this);return this.widgetManager=E,this.$editor&&E.attach(this.$editor),E},set:function(E){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:E})},enumerable:!1,configurable:!0}),T.prototype.$resetRowCache=function(E){if(!E){this.$docRowCache=[],this.$screenRowCache=[];return}var C=this.$docRowCache.length,b=this.$getRowCacheIndex(this.$docRowCache,E)+1;C>b&&(this.$docRowCache.splice(b,C),this.$screenRowCache.splice(b,C))},T.prototype.$getRowCacheIndex=function(E,C){for(var b=0,A=E.length-1;b<=A;){var _=b+A>>1,O=E[_];if(C>O)b=_+1;else if(C<O)A=_-1;else return _}return b-1},T.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},T.prototype.onChangeFold=function(E){var C=E.data;this.$resetRowCache(C.start.row)},T.prototype.onChange=function(E){this.$modified=!0,this.$bidiHandler.onChange(E),this.$resetRowCache(E.start.row);var C=this.$updateInternalDataOnChange(E);!this.$fromUndo&&this.$undoManager&&(C&&C.length&&(this.$undoManager.add({action:"removeFolds",folds:C},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(E,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(E),this._signal("change",E)},T.prototype.onSelectionChange=function(){this._signal("changeSelection")},T.prototype.setValue=function(E){this.doc.setValue(E),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},T.fromJSON=function(E){typeof E=="string"&&(E=JSON.parse(E));var C=new v;C.$undoStack=E.history.$undoStack,C.$redoStack=E.history.$redoStack,C.mark=E.history.mark,C.$rev=E.history.rev;var b=new T(E.value);return E.folds.forEach(function(A){b.addFold("...",l.fromPoints(A.start,A.end))}),b.setAnnotations(E.annotations),b.setBreakpoints(E.breakpoints),b.setMode(E.mode),b.setScrollLeft(E.scrollLeft),b.setScrollTop(E.scrollTop),b.setUndoManager(C),b.selection.fromJSON(E.selection),b},T.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(E){return E.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},T.prototype.toString=function(){return this.doc.getValue()},T.prototype.getSelection=function(){return this.selection},T.prototype.getState=function(E){return this.bgTokenizer.getState(E)},T.prototype.getTokens=function(E){return this.bgTokenizer.getTokens(E)},T.prototype.getTokenAt=function(E,C){var b=this.bgTokenizer.getTokens(E),A,_=0;if(C==null){var O=b.length-1;_=this.getLine(E).length}else for(var O=0;O<b.length&&(_+=b[O].value.length,!(_>=C));O++);return A=b[O],A?(A.index=O,A.start=_-A.value.length,A):null},T.prototype.setUndoManager=function(E){if(this.$undoManager=E,this.$informUndoManager&&this.$informUndoManager.cancel(),E){var C=this;E.addSession(this),this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.mergeUndoDeltas=!1},this.$informUndoManager=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},T.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},T.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},T.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},T.prototype.setUseSoftTabs=function(E){this.setOption("useSoftTabs",E)},T.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},T.prototype.setTabSize=function(E){this.setOption("tabSize",E)},T.prototype.getTabSize=function(){return this.$tabSize},T.prototype.isTabStop=function(E){return this.$useSoftTabs&&E.column%this.$tabSize===0},T.prototype.setNavigateWithinSoftTabs=function(E){this.setOption("navigateWithinSoftTabs",E)},T.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},T.prototype.setOverwrite=function(E){this.setOption("overwrite",E)},T.prototype.getOverwrite=function(){return this.$overwrite},T.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},T.prototype.addGutterDecoration=function(E,C){this.$decorations[E]||(this.$decorations[E]=""),this.$decorations[E]+=" "+C,this._signal("changeBreakpoint",{})},T.prototype.removeGutterCustomWidget=function(E){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(E)},T.prototype.addGutterCustomWidget=function(E,C){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(E,C)},T.prototype.removeGutterDecoration=function(E,C){this.$decorations[E]=(this.$decorations[E]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},T.prototype.getBreakpoints=function(){return this.$breakpoints},T.prototype.setBreakpoints=function(E){this.$breakpoints=[];for(var C=0;C<E.length;C++)this.$breakpoints[E[C]]="ace_breakpoint";this._signal("changeBreakpoint",{})},T.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},T.prototype.setBreakpoint=function(E,C){C===void 0&&(C="ace_breakpoint"),C?this.$breakpoints[E]=C:delete this.$breakpoints[E],this._signal("changeBreakpoint",{})},T.prototype.clearBreakpoint=function(E){delete this.$breakpoints[E],this._signal("changeBreakpoint",{})},T.prototype.addMarker=function(E,C,b,A){var _=this.$markerId++,O={range:E,type:b||"line",renderer:typeof b=="function"?b:null,clazz:C,inFront:!!A,id:_};return A?(this.$frontMarkers[_]=O,this._signal("changeFrontMarker")):(this.$backMarkers[_]=O,this._signal("changeBackMarker")),_},T.prototype.addDynamicMarker=function(E,C){if(E.update){var b=this.$markerId++;return E.id=b,E.inFront=!!C,C?(this.$frontMarkers[b]=E,this._signal("changeFrontMarker")):(this.$backMarkers[b]=E,this._signal("changeBackMarker")),E}},T.prototype.removeMarker=function(E){var C=this.$frontMarkers[E]||this.$backMarkers[E];if(C){var b=C.inFront?this.$frontMarkers:this.$backMarkers;delete b[E],this._signal(C.inFront?"changeFrontMarker":"changeBackMarker")}},T.prototype.getMarkers=function(E){return E?this.$frontMarkers:this.$backMarkers},T.prototype.highlight=function(E){if(!this.$searchHighlight){var C=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(C)}this.$searchHighlight.setRegexp(E)},T.prototype.highlightLines=function(E,C,b,A){typeof C!="number"&&(b=C,C=E),b||(b="ace_step");var _=new l(E,0,C,1/0);return _.id=this.addMarker(_,b,"fullLine",A),_},T.prototype.setAnnotations=function(E){this.$annotations=E,this._signal("changeAnnotation",{})},T.prototype.getAnnotations=function(){return this.$annotations||[]},T.prototype.clearAnnotations=function(){this.setAnnotations([])},T.prototype.$detectNewLine=function(E){var C=E.match(/^.*?(\r?\n)/m);C?this.$autoNewLine=C[1]:this.$autoNewLine=`
1363
+ `},T.prototype.getWordRange=function(E,C){var b=this.getLine(E),A=!1;if(C>0&&(A=!!b.charAt(C-1).match(this.tokenRe)),A||(A=!!b.charAt(C).match(this.tokenRe)),A)var _=this.tokenRe;else if(/^\s+$/.test(b.slice(C-1,C+1)))var _=/\s/;else var _=this.nonTokenRe;var O=C;if(O>0){do O--;while(O>=0&&b.charAt(O).match(_));O++}for(var I=C;I<b.length&&b.charAt(I).match(_);)I++;return new l(E,O,E,I)},T.prototype.getAWordRange=function(E,C){for(var b=this.getWordRange(E,C),A=this.getLine(b.end.row);A.charAt(b.end.column).match(/[ \t]/);)b.end.column+=1;return b},T.prototype.setNewLineMode=function(E){this.doc.setNewLineMode(E)},T.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},T.prototype.setUseWorker=function(E){this.setOption("useWorker",E)},T.prototype.getUseWorker=function(){return this.$useWorker},T.prototype.onReloadTokenizer=function(E){var C=E.data;this.bgTokenizer.start(C.first),this._signal("tokenizerUpdate",E)},T.prototype.setMode=function(E,C){if(E&&typeof E=="object"){if(E.getTokenizer)return this.$onChangeMode(E);var b=E,A=b.path}else A=E||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new d),this.$modes[A]&&!b){this.$onChangeMode(this.$modes[A]),C&&C();return}this.$modeId=A,o.loadModule(["mode",A],function(_){if(!this.destroyed){if(this.$modeId!==A)return C&&C();this.$modes[A]&&!b?this.$onChangeMode(this.$modes[A]):_&&_.Mode&&(_=new _.Mode(b),b||(this.$modes[A]=_,_.$id=A),this.$onChangeMode(_)),C&&C()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},T.prototype.$onChangeMode=function(E,C){if(C||(this.$modeId=E.$id),this.$mode!==E){var b=this.$mode;this.$mode=E,this.$stopWorker(),this.$useWorker&&this.$startWorker();var A=E.getTokenizer();if(A.on!==void 0){var _=this.onReloadTokenizer.bind(this);A.on("update",_)}this.bgTokenizer.setTokenizer(A),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=E.tokenRe,this.nonTokenRe=E.nonTokenRe,C||(E.attachToSession&&E.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(E.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:b,mode:E}))}},T.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},T.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(E){o.warn("Could not load worker",E),this.$worker=null}},T.prototype.getMode=function(){return this.$mode},T.prototype.setScrollTop=function(E){this.$scrollTop===E||isNaN(E)||(this.$scrollTop=E,this._signal("changeScrollTop",E))},T.prototype.getScrollTop=function(){return this.$scrollTop},T.prototype.setScrollLeft=function(E){this.$scrollLeft===E||isNaN(E)||(this.$scrollLeft=E,this._signal("changeScrollLeft",E))},T.prototype.getScrollLeft=function(){return this.$scrollLeft},T.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},T.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var E=0;return this.lineWidgets.forEach(function(C){C&&C.screenWidth>E&&(E=C.screenWidth)}),this.lineWidgetWidth=E},T.prototype.$computeWidth=function(E){if(this.$modified||E){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),b=this.$rowLengthCache,A=0,_=0,O=this.$foldData[_],I=O?O.start.row:1/0,N=C.length,F=0;F<N;F++){if(F>I){if(F=O.end.row+1,F>=N)break;O=this.$foldData[_++],I=O?O.start.row:1/0}b[F]==null&&(b[F]=this.$getStringScreenWidth(C[F])[0]),b[F]>A&&(A=b[F])}this.screenWidth=A}},T.prototype.getLine=function(E){return this.doc.getLine(E)},T.prototype.getLines=function(E,C){return this.doc.getLines(E,C)},T.prototype.getLength=function(){return this.doc.getLength()},T.prototype.getTextRange=function(E){return this.doc.getTextRange(E||this.selection.getRange())},T.prototype.insert=function(E,C){return this.doc.insert(E,C)},T.prototype.remove=function(E){return this.doc.remove(E)},T.prototype.removeFullLines=function(E,C){return this.doc.removeFullLines(E,C)},T.prototype.undoChanges=function(E,C){if(E.length){this.$fromUndo=!0;for(var b=E.length-1;b!=-1;b--){var A=E[b];A.action=="insert"||A.action=="remove"?this.doc.revertDelta(A):A.folds&&this.addFolds(A.folds)}!C&&this.$undoSelect&&(E.selectionBefore?this.selection.fromJSON(E.selectionBefore):this.selection.setRange(this.$getUndoSelection(E,!0))),this.$fromUndo=!1}},T.prototype.redoChanges=function(E,C){if(E.length){this.$fromUndo=!0;for(var b=0;b<E.length;b++){var A=E[b];(A.action=="insert"||A.action=="remove")&&this.doc.$safeApplyDelta(A)}!C&&this.$undoSelect&&(E.selectionAfter?this.selection.fromJSON(E.selectionAfter):this.selection.setRange(this.$getUndoSelection(E,!1))),this.$fromUndo=!1}},T.prototype.setUndoSelect=function(E){this.$undoSelect=E},T.prototype.$getUndoSelection=function(E,C){function b(N){return C?N.action!=="insert":N.action==="insert"}for(var A,_,O=0;O<E.length;O++){var I=E[O];if(I.start){if(!A){b(I)?A=l.fromPoints(I.start,I.end):A=l.fromPoints(I.start,I.start);continue}b(I)?(_=I.start,A.compare(_.row,_.column)==-1&&A.setStart(_),_=I.end,A.compare(_.row,_.column)==1&&A.setEnd(_)):(_=I.start,A.compare(_.row,_.column)==-1&&(A=l.fromPoints(I.start,I.start)))}}return A},T.prototype.replace=function(E,C){return this.doc.replace(E,C)},T.prototype.moveText=function(E,C,b){var A=this.getTextRange(E),_=this.getFoldsInRange(E),O=l.fromPoints(C,C);if(!b){this.remove(E);var I=E.start.row-E.end.row,N=I?-E.end.column:E.start.column-E.end.column;N&&(O.start.row==E.end.row&&O.start.column>E.end.column&&(O.start.column+=N),O.end.row==E.end.row&&O.end.column>E.end.column&&(O.end.column+=N)),I&&O.start.row>=E.end.row&&(O.start.row+=I,O.end.row+=I)}if(O.end=this.insert(O.start,A),_.length){var F=E.start,z=O.start,I=z.row-F.row,N=z.column-F.column;this.addFolds(_.map(function(B){return B=B.clone(),B.start.row==F.row&&(B.start.column+=N),B.end.row==F.row&&(B.end.column+=N),B.start.row+=I,B.end.row+=I,B}))}return O},T.prototype.indentRows=function(E,C,b){b=b.replace(/\t/g,this.getTabString());for(var A=E;A<=C;A++)this.doc.insertInLine({row:A,column:0},b)},T.prototype.outdentRows=function(E){for(var C=E.collapseRows(),b=new l(0,0,0,0),A=this.getTabSize(),_=C.start.row;_<=C.end.row;++_){var O=this.getLine(_);b.start.row=_,b.end.row=_;for(var I=0;I<A&&O.charAt(I)==" ";++I);I<A&&O.charAt(I)==" "?(b.start.column=I,b.end.column=I+1):(b.start.column=0,b.end.column=I),this.remove(b)}},T.prototype.$moveLines=function(E,C,b){if(E=this.getRowFoldStart(E),C=this.getRowFoldEnd(C),b<0){var A=this.getRowFoldStart(E+b);if(A<0)return 0;var _=A-E}else if(b>0){var A=this.getRowFoldEnd(C+b);if(A>this.doc.getLength()-1)return 0;var _=A-C}else{E=this.$clipRowToDocument(E),C=this.$clipRowToDocument(C);var _=C-E+1}var O=new l(E,0,C,Number.MAX_VALUE),I=this.getFoldsInRange(O).map(function(F){return F=F.clone(),F.start.row+=_,F.end.row+=_,F}),N=b==0?this.doc.getLines(E,C):this.doc.removeFullLines(E,C);return this.doc.insertFullLines(E+_,N),I.length&&this.addFolds(I),_},T.prototype.moveLinesUp=function(E,C){return this.$moveLines(E,C,-1)},T.prototype.moveLinesDown=function(E,C){return this.$moveLines(E,C,1)},T.prototype.duplicateLines=function(E,C){return this.$moveLines(E,C,0)},T.prototype.$clipRowToDocument=function(E){return Math.max(0,Math.min(E,this.doc.getLength()-1))},T.prototype.$clipColumnToRow=function(E,C){return C<0?0:Math.min(this.doc.getLine(E).length,C)},T.prototype.$clipPositionToDocument=function(E,C){if(C=Math.max(0,C),E<0)E=0,C=0;else{var b=this.doc.getLength();E>=b?(E=b-1,C=this.doc.getLine(b-1).length):C=Math.min(this.doc.getLine(E).length,C)}return{row:E,column:C}},T.prototype.$clipRangeToDocument=function(E){E.start.row<0?(E.start.row=0,E.start.column=0):E.start.column=this.$clipColumnToRow(E.start.row,E.start.column);var C=this.doc.getLength()-1;return E.end.row>C?(E.end.row=C,E.end.column=this.doc.getLine(C).length):E.end.column=this.$clipColumnToRow(E.end.row,E.end.column),E},T.prototype.setUseWrapMode=function(E){if(E!=this.$useWrapMode){if(this.$useWrapMode=E,this.$modified=!0,this.$resetRowCache(0),E){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},T.prototype.getUseWrapMode=function(){return this.$useWrapMode},T.prototype.setWrapLimitRange=function(E,C){(this.$wrapLimitRange.min!==E||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:E,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},T.prototype.adjustWrapLimit=function(E,C){var b=this.$wrapLimitRange;b.max<0&&(b={min:C,max:C});var A=this.$constrainWrapLimit(E,b.min,b.max);return A!=this.$wrapLimit&&A>1?(this.$wrapLimit=A,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},T.prototype.$constrainWrapLimit=function(E,C,b){return C&&(E=Math.max(C,E)),b&&(E=Math.min(b,E)),E},T.prototype.getWrapLimit=function(){return this.$wrapLimit},T.prototype.setWrapLimit=function(E){this.setWrapLimitRange(E,E)},T.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},T.prototype.$updateInternalDataOnChange=function(E){var C=this.$useWrapMode,b=E.action,A=E.start,_=E.end,O=A.row,I=_.row,N=I-O,F=null;if(this.$updating=!0,N!=0)if(b==="remove"){this[C?"$wrapData":"$rowLengthCache"].splice(O,N);var z=this.$foldData;F=this.getFoldsInRange(E),this.removeFolds(F);var P=this.getFoldLine(_.row),W=0;if(P){P.addRemoveChars(_.row,_.column,A.column-_.column),P.shiftRow(-N);var B=this.getFoldLine(O);B&&B!==P&&(B.merge(P),P=B),W=z.indexOf(P)+1}for(;W<z.length;W++){var P=z[W];P.start.row>=_.row&&P.shiftRow(-N)}I=O}else{var H=Array(N);H.unshift(O,0);var U=C?this.$wrapData:this.$rowLengthCache;U.splice.apply(U,H);var z=this.$foldData,P=this.getFoldLine(O),W=0;if(P){var G=P.range.compareInside(A.row,A.column);G==0?(P=P.split(A.row,A.column),P&&(P.shiftRow(N),P.addRemoveChars(I,0,_.column-A.column))):G==-1&&(P.addRemoveChars(O,0,_.column-A.column),P.shiftRow(N)),W=z.indexOf(P)+1}for(;W<z.length;W++){var P=z[W];P.start.row>=O&&P.shiftRow(N)}}else{N=Math.abs(E.start.column-E.end.column),b==="remove"&&(F=this.getFoldsInRange(E),this.removeFolds(F),N=-N);var P=this.getFoldLine(O);P&&P.addRemoveChars(O,A.column,N)}return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(O,I):this.$updateRowLengthCache(O,I),F},T.prototype.$updateRowLengthCache=function(E,C){this.$rowLengthCache[E]=null,this.$rowLengthCache[C]=null},T.prototype.$updateWrapData=function(E,C){var b=this.doc.getAllLines(),A=this.getTabSize(),_=this.$wrapData,O=this.$wrapLimit,I,N,F=E;for(C=Math.min(C,b.length-1);F<=C;)N=this.getFoldLine(F,N),N?(I=[],N.walk(function(z,P,W,B){var H;if(z!=null){H=this.$getDisplayTokens(z,I.length),H[0]=w;for(var U=1;U<H.length;U++)H[U]=S}else H=this.$getDisplayTokens(b[P].substring(B,W),I.length);I=I.concat(H)}.bind(this),N.end.row,b[N.end.row].length+1),_[N.start.row]=this.$computeWrapSplits(I,O,A),F=N.end.row+1):(I=this.$getDisplayTokens(b[F]),_[F]=this.$computeWrapSplits(I,O,A),F++)},T.prototype.$computeWrapSplits=function(E,C,b){if(E.length==0)return[];var A=[],_=E.length,O=0,I=0,N=this.$wrapAsCode,F=this.$indentedSoftWrap,z=C<=Math.max(2*b,8)||F===!1?0:Math.floor(C/2);function P(){var G=0;if(z===0)return G;if(F)for(var Y=0;Y<E.length;Y++){var q=E[Y];if(q==L)G+=1;else if(q==R)G+=b;else{if(q==$)continue;break}}return N&&F!==!1&&(G+=b),Math.min(G,z)}function W(G){for(var Y=G-O,q=O;q<G;q++){var X=E[q];(X===12||X===2)&&(Y-=1)}A.length||(B=P(),A.indent=B),I+=Y,A.push(I),O=G}for(var B=0;_-O>C-B;){var H=O+C-B;if(E[H-1]>=L&&E[H]>=L){W(H);continue}if(E[H]==w||E[H]==S){for(;H!=O-1&&E[H]!=w;H--);if(H>O){W(H);continue}for(H=O+C;H<E.length&&E[H]==S;H++);if(H==E.length)break;W(H);continue}for(var U=Math.max(H-(C-(C>>2)),O-1);H>U&&E[H]<w;)H--;if(N){for(;H>U&&E[H]<w;)H--;for(;H>U&&E[H]==M;)H--}else for(;H>U&&E[H]<L;)H--;if(H>U){W(++H);continue}H=O+C,E[H]==x&&H--,W(H-B)}return A},T.prototype.$getDisplayTokens=function(E,C){var b=[],A;C=C||0;for(var _=0;_<E.length;_++){var O=E.charCodeAt(_);if(O==9){A=this.getScreenTabSize(b.length+C),b.push(R);for(var I=1;I<A;I++)b.push($)}else O==32?b.push(L):O>39&&O<48||O>57&&O<64?b.push(M):O>=4352&&D(O)?b.push(k,x):b.push(k)}return b},T.prototype.$getStringScreenWidth=function(E,C,b){if(C==0)return[0,0];C==null&&(C=1/0),b=b||0;var A,_;for(_=0;_<E.length&&(A=E.charCodeAt(_),A==9?b+=this.getScreenTabSize(b):A>=4352&&D(A)?b+=2:b+=1,!(b>C));_++);return[b,_]},T.prototype.getRowLength=function(E){var C=1;return this.lineWidgets&&(C+=this.lineWidgets[E]&&this.lineWidgets[E].rowCount||0),!this.$useWrapMode||!this.$wrapData[E]?C:this.$wrapData[E].length+C},T.prototype.getRowLineCount=function(E){return!this.$useWrapMode||!this.$wrapData[E]?1:this.$wrapData[E].length+1},T.prototype.getRowWrapIndent=function(E){if(this.$useWrapMode){var C=this.screenToDocumentPosition(E,Number.MAX_VALUE),b=this.$wrapData[C.row];return b.length&&b[0]<C.column?b.indent:0}else return 0},T.prototype.getScreenLastRowColumn=function(E){var C=this.screenToDocumentPosition(E,Number.MAX_VALUE);return this.documentToScreenColumn(C.row,C.column)},T.prototype.getDocumentLastRowColumn=function(E,C){var b=this.documentToScreenRow(E,C);return this.getScreenLastRowColumn(b)},T.prototype.getDocumentLastRowColumnPosition=function(E,C){var b=this.documentToScreenRow(E,C);return this.screenToDocumentPosition(b,Number.MAX_VALUE/10)},T.prototype.getRowSplitData=function(E){if(this.$useWrapMode)return this.$wrapData[E]},T.prototype.getScreenTabSize=function(E){return this.$tabSize-(E%this.$tabSize|0)},T.prototype.screenToDocumentRow=function(E,C){return this.screenToDocumentPosition(E,C).row},T.prototype.screenToDocumentColumn=function(E,C){return this.screenToDocumentPosition(E,C).column},T.prototype.screenToDocumentPosition=function(E,C,b){if(E<0)return{row:0,column:0};var A,_=0,O=0,I,N=0,F=0,z=this.$screenRowCache,P=this.$getRowCacheIndex(z,E),W=z.length;if(W&&P>=0)var N=z[P],_=this.$docRowCache[P],B=E>z[W-1];else var B=!W;for(var H=this.getLength()-1,U=this.getNextFoldLine(_),G=U?U.start.row:1/0;N<=E&&(F=this.getRowLength(_),!(N+F>E||_>=H));)N+=F,_++,_>G&&(_=U.end.row+1,U=this.getNextFoldLine(_,U),G=U?U.start.row:1/0),B&&(this.$docRowCache.push(_),this.$screenRowCache.push(N));if(U&&U.start.row<=_)A=this.getFoldDisplayLine(U),_=U.start.row;else{if(N+F<=E||_>H)return{row:H,column:this.getLine(H).length};A=this.getLine(_),U=null}var Y=0,q=Math.floor(E-N);if(this.$useWrapMode){var X=this.$wrapData[_];X&&(I=X[q],q>0&&X.length&&(Y=X.indent,O=X[q-1]||X[X.length-1],A=A.substring(O)))}return b!==void 0&&this.$bidiHandler.isBidiRow(N+q,_,q)&&(C=this.$bidiHandler.offsetToCol(b)),O+=this.$getStringScreenWidth(A,C-Y)[1],this.$useWrapMode&&O>=I&&(O=I-1),U?U.idxToPosition(O):{row:_,column:O}},T.prototype.documentToScreenPosition=function(E,C){if(typeof C>"u")var b=this.$clipPositionToDocument(E.row,E.column);else b=this.$clipPositionToDocument(E,C);E=b.row,C=b.column;var A=0,_=null,O=null;O=this.getFoldAt(E,C,1),O&&(E=O.start.row,C=O.start.column);var I,N=0,F=this.$docRowCache,z=this.$getRowCacheIndex(F,E),P=F.length;if(P&&z>=0)var N=F[z],A=this.$screenRowCache[z],W=E>F[P-1];else var W=!P;for(var B=this.getNextFoldLine(N),H=B?B.start.row:1/0;N<E;){if(N>=H){if(I=B.end.row+1,I>E)break;B=this.getNextFoldLine(I,B),H=B?B.start.row:1/0}else I=N+1;A+=this.getRowLength(N),N=I,W&&(this.$docRowCache.push(N),this.$screenRowCache.push(A))}var U="";B&&N>=H?(U=this.getFoldDisplayLine(B,E,C),_=B.start.row):(U=this.getLine(E).substring(0,C),_=E);var G=0;if(this.$useWrapMode){var Y=this.$wrapData[_];if(Y){for(var q=0;U.length>=Y[q];)A++,q++;U=U.substring(Y[q-1]||0,U.length),G=q>0?Y.indent:0}}return this.lineWidgets&&this.lineWidgets[N]&&this.lineWidgets[N].rowsAbove&&(A+=this.lineWidgets[N].rowsAbove),{row:A,column:G+this.$getStringScreenWidth(U)[0]}},T.prototype.documentToScreenColumn=function(E,C){return this.documentToScreenPosition(E,C).column},T.prototype.documentToScreenRow=function(E,C){return this.documentToScreenPosition(E,C).row},T.prototype.getScreenLength=function(){var E=0,C=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,O=0,A=0,C=this.$foldData[A++],I=C?C.start.row:1/0;O<_;){var N=this.$wrapData[O];E+=N?N.length+1:1,O++,O>I&&(O=C.end.row+1,C=this.$foldData[A++],I=C?C.start.row:1/0)}else{E=this.getLength();for(var b=this.$foldData,A=0;A<b.length;A++)C=b[A],E-=C.end.row-C.start.row}return this.lineWidgets&&(E+=this.$getWidgetScreenLength()),E},T.prototype.$setFontMetrics=function(E){this.$enableVarChar&&(this.$getStringScreenWidth=function(C,b,A){if(b===0)return[0,0];b||(b=1/0),A=A||0;var _,O;for(O=0;O<C.length&&(_=C.charAt(O),_===" "?A+=this.getScreenTabSize(A):A+=E.getCharacterWidth(_),!(A>b));O++);return[A,O]})},T.prototype.getPrecedingCharacter=function(){var E=this.selection.getCursor();return E.column===0?E.row===0?"":this.doc.getNewLineCharacter():this.getLine(E.row)[E.column-1]},T.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},T})();y.$uid=0,y.prototype.$modes=o.$modes,y.prototype.getValue=y.prototype.toString,y.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},y.prototype.$overwrite=!1,y.prototype.$mode=null,y.prototype.$modeId=null,y.prototype.$scrollTop=0,y.prototype.$scrollLeft=0,y.prototype.$wrapLimit=80,y.prototype.$useWrapMode=!1,y.prototype.$wrapLimitRange={min:null,max:null},y.prototype.lineWidgets=null,y.prototype.isFullWidth=D,f.implement(y.prototype,h);var k=1,x=2,w=3,S=4,M=9,L=10,R=11,$=12;function D(T){return T<4352?!1:T>=4352&&T<=4447||T>=4515&&T<=4519||T>=4602&&T<=4607||T>=9001&&T<=9002||T>=11904&&T<=11929||T>=11931&&T<=12019||T>=12032&&T<=12245||T>=12272&&T<=12283||T>=12288&&T<=12350||T>=12353&&T<=12438||T>=12441&&T<=12543||T>=12549&&T<=12589||T>=12593&&T<=12686||T>=12688&&T<=12730||T>=12736&&T<=12771||T>=12784&&T<=12830||T>=12832&&T<=12871||T>=12880&&T<=13054||T>=13056&&T<=19903||T>=19968&&T<=42124||T>=42128&&T<=42182||T>=43360&&T<=43388||T>=44032&&T<=55203||T>=55216&&T<=55238||T>=55243&&T<=55291||T>=63744&&T<=64255||T>=65040&&T<=65049||T>=65072&&T<=65106||T>=65108&&T<=65126||T>=65128&&T<=65131||T>=65281&&T<=65376||T>=65504&&T<=65510}t("./edit_session/folding").Folding.call(y.prototype),t("./edit_session/bracket_match").BracketMatch.call(y.prototype),o.defineOptions(y.prototype,"session",{wrap:{set:function(T){if(!T||T=="off"?T=!1:T=="free"?T=!0:T=="printMargin"?T=-1:typeof T=="string"&&(T=parseInt(T,10)||!1),this.$wrap!=T)if(this.$wrap=T,!T)this.setUseWrapMode(!1);else{var E=typeof T=="number"?T:null;this.setWrapLimitRange(E,E),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(T){T=T=="auto"?this.$mode.type!="text":T!="text",T!=this.$wrapAsCode&&(this.$wrapAsCode=T,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(T){this.$useWorker=T,this.$stopWorker(),T&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(T){T=parseInt(T),T>0&&this.$tabSize!==T&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=T,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(T){this.setFoldStyle(T)},handlesSet:!0},overwrite:{set:function(T){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(T){this.doc.setNewLineMode(T)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(T){this.setMode(T)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=y}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,n,m){"use strict";var f=t("./lib/lang"),g=t("./lib/oop"),c=t("./range").Range,o=(function(){function l(){this.$options={}}return l.prototype.set=function(s){return g.mixin(this.$options,s),this},l.prototype.getOptions=function(){return f.copyObject(this.$options)},l.prototype.setOptions=function(s){this.$options=s},l.prototype.find=function(s){var r=this.$options,a=this.$matchIterator(s,r);if(!a)return!1;var p=null;return a.forEach(function(v,y,k,x){return p=new c(v,y,k,x),y==x&&r.start&&r.start.start&&r.skipCurrent!=!1&&p.isEqual(r.start)?(p=null,!1):!0}),p},l.prototype.findAll=function(s){var r=this.$options;if(!r.needle)return[];this.$assembleRegExp(r);var a=r.range,p=a?s.getLines(a.start.row,a.end.row):s.doc.getAllLines(),v=[],y=r.re;if(r.$isMultiLine){var k=y.length,x=p.length-k,w;e:for(var S=y.offset||0;S<=x;S++){for(var M=0;M<k;M++)if(p[S+M].search(y[M])==-1)continue e;var L=p[S],R=p[S+k-1],$=L.length-L.match(y[0])[0].length,D=R.match(y[k-1])[0].length;w&&w.end.row===S&&w.end.column>$||(v.push(w=new c(S,$,S+k-1,D)),k>2&&(S=S+k-2))}}else for(var T,E=0;E<p.length;E++)if(this.$isMultilineSearch(r)){var C=p.length-1;if(T=this.$multiLineForward(s,y,E,C),T){var b=T.endRow<=C?T.endRow-1:C;b>E&&(E=b),v.push(new c(T.startRow,T.startCol,T.endRow,T.endCol))}}else{T=f.getMatchOffsets(p[E],y);for(var M=0;M<T.length;M++){var A=T[M];v.push(new c(E,A.offset,E,A.offset+A.length))}}if(a){for(var _=a.start.column,O=a.end.column,E=0,M=v.length-1;E<M&&v[E].start.column<_&&v[E].start.row==0;)E++;for(var I=a.end.row-a.start.row;E<M&&v[M].end.column>O&&v[M].end.row==I;)M--;for(v=v.slice(E,M+1),E=0,M=v.length;E<M;E++)v[E].start.row+=a.start.row,v[E].end.row+=a.start.row}return v},l.prototype.parseReplaceString=function(s){for(var r={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},a="",p=0,v=s.length;p<v;p++){var y=s.charCodeAt(p);if(y===r.Backslash){if(p++,p>=v){a+="\\";break}switch(s.charCodeAt(p)){case r.Backslash:a+="\\";break;case r.n:a+=`
1364
+ `;break;case r.t:a+=" ";break}continue}if(y===r.DollarSign){if(p++,p>=v){a+="$";break}var k=s.charCodeAt(p);if(k===r.DollarSign){a+="$$";continue}if(k===r.Digit0||k===r.Ampersand){a+="$&";continue}if(r.Digit1<=k&&k<=r.Digit9){a+="$"+s[p];continue}}a+=s[p]}return a||s},l.prototype.replace=function(s,r){var a=this.$options,p=this.$assembleRegExp(a);if(a.$isMultiLine)return r;if(p){var v=this.$isMultilineSearch(a);v&&(s=s.replace(/\r\n|\r|\n/g,`
1365
+ `));var y=p.exec(s);if(!y||!v&&y[0].length!=s.length)return null;if(r=a.regExp?this.parseReplaceString(r):r.replace(/\$/g,"$$$$"),r=s.replace(p,r),a.preserveCase){r=r.split("");for(var k=Math.min(s.length,s.length);k--;){var x=s[k];x&&x.toLowerCase()!=x?r[k]=r[k].toUpperCase():r[k]=r[k].toLowerCase()}r=r.join("")}return r}},l.prototype.$assembleRegExp=function(s,r){if(s.needle instanceof RegExp)return s.re=s.needle;var a=s.needle;if(!s.needle)return s.re=!1;s.regExp||(a=f.escapeRegExp(a));var p=s.caseSensitive?"gm":"gmi";try{new RegExp(a,"u"),s.$supportsUnicodeFlag=!0,p+="u"}catch{s.$supportsUnicodeFlag=!1}if(s.wholeWord&&(a=h(a,s)),s.$isMultiLine=!r&&/[\n\r]/.test(a),s.$isMultiLine)return s.re=this.$assembleMultilineRegExp(a,p);try{var v=new RegExp(a,p)}catch{v=!1}return s.re=v},l.prototype.$assembleMultilineRegExp=function(s,r){for(var a=s.replace(/\r\n|\r|\n/g,`$
1362
1366
  ^`).split(`
1363
- `),i=[],u=0;u<s.length;u++)try{i.push(new RegExp(s[u],a))}catch{return!1}return i},r.prototype.$matchIterator=function(o,a){var s=this.$assembleRegExp(a);if(!s)return!1;var i=a.backwards==!0,u=a.skipCurrent!=!1,f=s.unicode,y=a.range,b=a.start;b||(b=y?y[i?"end":"start"]:o.selection.getRange()),b.start&&(b=b[u!=i?"end":"start"]);var E=y?y.start.row:0,$=y?y.end.row:o.getLength()-1;if(i)var A=function(R){var L=b.row;if(!M(L,b.column,R)){for(L--;L>=E;L--)if(M(L,Number.MAX_VALUE,R))return;if(a.wrap!=!1){for(L=$,E=b.row;L>=E;L--)if(M(L,Number.MAX_VALUE,R))return}}};else var A=function(L){var T=b.row;if(!M(T,b.column,L)){for(T=T+1;T<=$;T++)if(M(T,0,L))return;if(a.wrap!=!1){for(T=E,$=b.row;T<=$;T++)if(M(T,0,L))return}}};if(a.$isMultiLine)var S=s.length,M=function(R,L,T){var D=i?R-S+1:R;if(!(D<0||D+S>o.getLength())){var w=o.getLine(D),v=w.search(s[0]);if(!(!i&&v<L||v===-1)){for(var C=1;C<S;C++)if(w=o.getLine(D+C),w.search(s[C])==-1)return;var x=w.match(s[S-1])[0].length;if(!(i&&x>L)&&T(D,v,D+S-1,x))return!0}}};else if(i)var M=function(L,T,D){var w=o.getLine(L),v=[],C,x=0;for(s.lastIndex=0;C=s.exec(w);){var _=C[0].length;if(x=C.index,!_){if(x>=w.length)break;s.lastIndex=x+=h.skipEmptyMatch(w,x,f)}if(C.index+_>T)break;v.push(C.index,_)}for(var k=v.length-1;k>=0;k-=2){var O=v[k-1],_=v[k];if(D(L,O,L,O+_))return!0}};else var M=function(L,T,D){var w=o.getLine(L),v,C;for(s.lastIndex=T;C=s.exec(w);){var x=C[0].length;if(v=C.index,D(L,v,L,v+x))return!0;if(!x&&(s.lastIndex=v+=h.skipEmptyMatch(w,v,f),v>=w.length))return!1}};return{forEach:A}},r})();function d(r,o){var a=h.supportsLookbehind();function s(y,b){b===void 0&&(b=!0);var E=a&&o.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return E.test(y)||o.regExp?a&&o.$supportsUnicodeFlag?b?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var i=Array.from(r),u=i[0],f=i[i.length-1];return s(u)+r+s(f,!1)}n.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,n,p){var h=this&&this.__extends||(function(){var a=function(s,i){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,f){u.__proto__=f}||function(u,f){for(var y in f)Object.prototype.hasOwnProperty.call(f,y)&&(u[y]=f[y])},a(s,i)};return function(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");a(s,i);function u(){this.constructor=s}s.prototype=i===null?Object.create(i):(u.prototype=i.prototype,new u)}})(),g=t("../lib/keys"),m=t("../lib/useragent"),c=g.KEY_MODS,d=(function(){function a(s,i){this.$init(s,i,!1)}return a.prototype.$init=function(s,i,u){this.platform=i||(m.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(s),this.$singleCommand=u},a.prototype.addCommand=function(s){this.commands[s.name]&&this.removeCommand(s),this.commands[s.name]=s,s.bindKey&&this._buildKeyHash(s)},a.prototype.removeCommand=function(s,i){var u=s&&(typeof s=="string"?s:s.name);s=this.commands[u],i||delete this.commands[u];var f=this.commandKeyBinding;for(var y in f){var b=f[y];if(b==s)delete f[y];else if(Array.isArray(b)){var E=b.indexOf(s);E!=-1&&(b.splice(E,1),b.length==1&&(f[y]=b[0]))}}},a.prototype.bindKey=function(s,i,u){if(typeof s=="object"&&s&&(u==null&&(u=s.position),s=s[this.platform]),!!s){if(typeof i=="function")return this.addCommand({exec:i,bindKey:s,name:i.name||s});s.split("|").forEach(function(f){var y="";if(f.indexOf(" ")!=-1){var b=f.split(/\s+/);f=b.pop(),b.forEach(function(A){var S=this.parseKeys(A),M=c[S.hashId]+S.key;y+=(y?" ":"")+M,this._addCommandToBinding(y,"chainKeys")},this),y+=" "}var E=this.parseKeys(f),$=c[E.hashId]+E.key;this._addCommandToBinding(y+$,i,u)},this)}},a.prototype._addCommandToBinding=function(s,i,u){var f=this.commandKeyBinding,y;if(!i)delete f[s];else if(!f[s]||this.$singleCommand)f[s]=i;else{Array.isArray(f[s])?(y=f[s].indexOf(i))!=-1&&f[s].splice(y,1):f[s]=[f[s]],typeof u!="number"&&(u=r(i));var b=f[s];for(y=0;y<b.length;y++){var E=b[y],$=r(E);if($>u)break}b.splice(y,0,i)}},a.prototype.addCommands=function(s){s&&Object.keys(s).forEach(function(i){var u=s[i];if(u){if(typeof u=="string")return this.bindKey(u,i);typeof u=="function"&&(u={exec:u}),typeof u=="object"&&(u.name||(u.name=i),this.addCommand(u))}},this)},a.prototype.removeCommands=function(s){Object.keys(s).forEach(function(i){this.removeCommand(s[i])},this)},a.prototype.bindKeys=function(s){Object.keys(s).forEach(function(i){this.bindKey(i,s[i])},this)},a.prototype._buildKeyHash=function(s){this.bindKey(s.bindKey,s)},a.prototype.parseKeys=function(s){var i=s.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),u=i.pop(),f=g[u];if(g.FUNCTION_KEYS[f])u=g.FUNCTION_KEYS[f].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:u.toUpperCase(),hashId:-1}}else return{key:u,hashId:-1};for(var y=0,b=i.length;b--;){var E=g.KEY_MODS[i[b]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+i[b]+" in "+s),!1;y|=E}return{key:u,hashId:y}},a.prototype.findKeyCommand=function(s,i){var u=c[s]+i;return this.commandKeyBinding[u]},a.prototype.handleKeyboard=function(s,i,u,f){if(!(f<0)){var y=c[i]+u,b=this.commandKeyBinding[y];return s.$keyChain&&(s.$keyChain+=" "+y,b=this.commandKeyBinding[s.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(s.$keyChain=s.$keyChain||y,{command:"null"}):(s.$keyChain&&((!i||i==4)&&u.length==1?s.$keyChain=s.$keyChain.slice(0,-y.length-1):(i==-1||f>0)&&(s.$keyChain="")),{command:b})}},a.prototype.getStatusText=function(s,i){return i.$keyChain||""},a})();function r(a){return typeof a=="object"&&a.bindKey&&a.bindKey.position||(a.isDefault?-100:0)}var o=(function(a){h(s,a);function s(i,u){var f=a.call(this,i,u)||this;return f.$singleCommand=!0,f}return s})(d);o.call=function(a,s,i){d.prototype.$init.call(a,s,i,!0)},d.call=function(a,s,i){d.prototype.$init.call(a,s,i,!1)},n.HashHandler=o,n.MultiHashHandler=d}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,n,p){var h=this&&this.__extends||(function(){var r=function(o,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(s[u]=i[u])},r(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");r(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})(),g=t("../lib/oop"),m=t("../keyboard/hash_handler").MultiHashHandler,c=t("../lib/event_emitter").EventEmitter,d=(function(r){h(o,r);function o(a,s){var i=r.call(this,s,a)||this;return i.byName=i.commands,i.setDefaultHandler("exec",function(u){return u.args?u.command.exec(u.editor,u.args,u.event,!1):u.command.exec(u.editor,{},u.event,!0)}),i}return o.prototype.exec=function(a,s,i){if(Array.isArray(a)){for(var u=a.length;u--;)if(this.exec(a[u],s,i))return!0;return!1}if(typeof a=="string"&&(a=this.commands[a]),!this.canExecute(a,s))return!1;var f={editor:s,command:a,args:i};return f.returnValue=this._emit("exec",f),this._signal("afterExec",f),f.returnValue!==!1},o.prototype.canExecute=function(a,s){return typeof a=="string"&&(a=this.commands[a]),!(!a||s&&s.$readOnly&&!a.readOnly||this.$checkCommandState!=!1&&a.isAvailable&&!a.isAvailable(s))},o.prototype.toggleRecording=function(a){if(!this.$inReplay)return a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(s){this.macro.push([s.command,s.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(a){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(s){typeof s=="string"?this.exec(s,a):this.exec(s[0],a,s[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(a){return a.map(function(s){return typeof s[0]!="string"&&(s[0]=s[0].name),s[1]||(s=s[0]),s})},o})(m);g.implement(d.prototype,c),n.CommandManager=d}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,n,p){var h=t("../lib/lang"),g=t("../config"),m=t("../range").Range;function c(r,o){return{win:r,mac:o}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(r){g.loadModule("ace/ext/settings_menu",function(o){o.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(r){g.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(r){g.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(r,o){typeof o=="number"&&!isNaN(o)&&r.gotoLine(o),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(r){g.loadModule("ace/ext/searchbox",function(o){o.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(r,o){r.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(r,o){r.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(r,o){r.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(r,o){r.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var o=r.$copyWithEmptySelection&&r.selection.isEmpty(),a=o?r.selection.getLineRange():r.selection.getRange();r._emit("cut",a),a.isEmpty()||r.session.remove(a),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,o){r.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(r){g.loadModule("ace/ext/searchbox",function(o){o.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(r){var o=r.selection.getRange();o.start.column=0,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(r){var o=r.selection.getRange();o.end.column=Number.MAX_VALUE,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,o){r.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,o){r.insert(h.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var o=r.selection.getRange();o.start.column=o.end.column=0,o.end.row++,r.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(r){for(var o=r.selection.isBackwards(),a=o?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),s=o?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),i=r.session.doc.getLine(a.row).length,u=r.session.doc.getTextRange(r.selection.getRange()),f=u.replace(/\n\s*/," ").length,y=r.session.doc.getLine(a.row),b=a.row+1;b<=s.row+1;b++){var E=h.stringTrimLeft(h.stringTrimRight(r.session.doc.getLine(b)));E.length!==0&&(E=" "+E),y+=E}s.row+1<r.session.doc.getLength()-1&&(y+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new m(a.row,0,s.row+2,0),y),f>0?(r.selection.moveCursorTo(a.row,a.column),r.selection.selectTo(a.row,a.column+f)):(i=r.session.doc.getLine(a.row).length>i?i+1:i,r.selection.moveCursorTo(a.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(r){var o=r.session.doc.getLength()-1,a=r.session.doc.getLine(o).length,s=r.selection.rangeList.ranges,i=[];s.length<1&&(s=[r.selection.getRange()]);for(var u=0;u<s.length;u++)u==s.length-1&&(s[u].end.row===o&&s[u].end.column===a||i.push(new m(s[u].end.row,s[u].end.column,o,a))),u===0?s[u].start.row===0&&s[u].start.column===0||i.push(new m(0,0,s[u].start.row,s[u].start.column)):i.push(new m(s[u-1].end.row,s[u-1].end.column,s[u].start.row,s[u].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var u=0;u<i.length;u++)r.selection.addRange(i[u],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
1364
- `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var o=r.getCursorPosition();r.selection.moveTo(o.row-1,Number.MAX_VALUE),r.insert(`
1365
- `),o.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:c("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:c(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var d=1;d<9;d++)n.commands.push({name:"foldToLevel"+d,description:"Fold To Level "+d,level:d,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(t,n,p){var h=t("../lib/keys"),g=t("../mouse/default_gutter_handler").GutterTooltip,m=(function(){function d(r){this.editor=r,this.gutterLayer=r.renderer.$gutterLayer,this.element=r.renderer.$gutter,this.lines=r.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new g(this.editor)}return d.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},d.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},d.prototype.$onGutterKeyDown=function(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===h.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=h.enter)return;r.preventDefault();var o=this.editor.getCursorPosition().row;this.editor.isRowVisible(o)||this.editor.scrollToLine(o,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),s=this.$findNearestFoldWidget(a),i=this.$findNearestAnnotation(a);if(!(s===null&&i===null)){if(s===null&&i!==null){this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(s!==null&&i===null){this.activeRowIndex=s,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(i-a)<Math.abs(s-a)){this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=s,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(r),setTimeout((function(){this.editor._signal("gutterkeydown",new c(r,this))}).bind(this),10)},d.prototype.$handleGutterKeyboardInteraction=function(r){if(r.keyCode===h.tab){r.preventDefault();return}if(r.keyCode===h.escape){r.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(r.keyCode===h.up){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(r.keyCode===h.down){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(r.keyCode===h.left){r.preventDefault(),this.$switchLane("annotation");return}if(r.keyCode===h.right){r.preventDefault(),this.$switchLane("fold");return}if(r.keyCode===h.enter||r.keyCode===h.space){switch(r.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var o=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),r),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==o&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(o),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var a=this.lines.cells[this.activeRowIndex].element.childNodes[2],s=a.getBoundingClientRect(),i=this.annotationTooltip.getElement().style;i.left=s.right+"px",i.top=s.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},d.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},d.prototype.$isFoldWidgetVisible=function(r){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),a=this.$getFoldWidget(r).style.display!=="none";return o&&a},d.prototype.$isAnnotationVisible=function(r){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),a=this.$getAnnotation(r).style.display!=="none";return o&&a},d.prototype.$getFoldWidget=function(r){var o=this.lines.get(r),a=o.element;return a.childNodes[1]},d.prototype.$getAnnotation=function(r){var o=this.lines.get(r),a=o.element;return a.childNodes[2]},d.prototype.$findNearestFoldWidget=function(r){if(this.$isFoldWidgetVisible(r))return r;for(var o=0;r-o>0||r+o<this.lines.getLength()-1;){if(o++,r-o>=0&&this.$isFoldWidgetVisible(r-o))return r-o;if(r+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+o))return r+o}return null},d.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var o=0;r-o>0||r+o<this.lines.getLength()-1;){if(o++,r-o>=0&&this.$isAnnotationVisible(r-o))return r-o;if(r+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+o))return r+o}return null},d.prototype.$focusFoldWidget=function(r){if(r!=null){var o=this.$getFoldWidget(r);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},d.prototype.$focusAnnotation=function(r){if(r!=null){var o=this.$getAnnotation(r);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},d.prototype.$blurFoldWidget=function(r){var o=this.$getFoldWidget(r);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},d.prototype.$blurAnnotation=function(r){var o=this.$getAnnotation(r);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},d.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},d.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},d.prototype.$moveAnnotationUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},d.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},d.prototype.$switchLane=function(r){switch(r){case"annotation":if(this.activeLane==="annotation")break;var o=this.$findNearestAnnotation(this.activeRowIndex);if(o==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldWidget(this.activeRowIndex);if(a==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$focusFoldWidget(this.activeRowIndex);break}},d.prototype.$rowIndexToRow=function(r){var o=this.lines.get(r);return o?o.row:null},d.prototype.$rowToRowIndex=function(r){for(var o=0;o<this.lines.getLength();o++){var a=this.lines.get(o);if(a.row==r)return o}return null},d})();n.GutterKeyboardHandler=m;var c=(function(){function d(r,o){this.gutterKeyboardHandler=o,this.domEvent=r}return d.prototype.getKey=function(){return h.keyCodeToString(this.domEvent.keyCode)},d.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},d.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},d.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},d})();n.GutterKeyboardEvent=c}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(t,n,p){var h=this&&this.__values||function(w){var v=typeof Symbol=="function"&&Symbol.iterator,C=v&&w[v],x=0;if(C)return C.call(w);if(w&&typeof w.length=="number")return{next:function(){return w&&x>=w.length&&(w=void 0),{value:w&&w[x++],done:!w}}};throw new TypeError(v?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/oop"),m=t("./lib/dom"),c=t("./lib/lang"),d=t("./lib/useragent"),r=t("./keyboard/textinput").TextInput,o=t("./mouse/mouse_handler").MouseHandler,a=t("./mouse/fold_handler").FoldHandler,s=t("./keyboard/keybinding").KeyBinding,i=t("./edit_session").EditSession,u=t("./search").Search,f=t("./range").Range,y=t("./lib/event_emitter").EventEmitter,b=t("./commands/command_manager").CommandManager,E=t("./commands/default_commands").commands,$=t("./config"),A=t("./token_iterator").TokenIterator,S=t("./keyboard/gutter_handler").GutterKeyboardHandler,M=t("./config").nls,R=t("./clipboard"),L=t("./lib/keys"),T=(function(){function w(v,C,x){this.session,this.$toDestroy=[];var _=v.getContainerElement();this.container=_,this.renderer=v,this.id="editor"+ ++w.$uid,this.commands=new b(d.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new r(v.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new a(this)),this.keyBinding=new s(this),this.$search=new u().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=c.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(k,O){O._$emitInputEvent.schedule(31)}),this.setSession(C||x&&x.session||new i("")),$.resetOptions(this),x&&this.setOptions(x),$._signal("editor",this)}return w.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},w.prototype.startOperation=function(v){this.session.startOperation(v)},w.prototype.endOperation=function(v){this.session.endOperation(v)},w.prototype.onStartOperation=function(v){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,v||(this.previousCommand=null)},w.prototype.onEndOperation=function(v){if(this.curOp&&this.session){if(v&&v.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var C=this.curOp.command,x=C&&C.scrollIntoView;if(x){switch(x){case"center-animate":x="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var _=this.selection.getRange(),k=this.renderer.layerConfig;(_.start.row>=k.lastRow||_.end.row<=k.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}x=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},w.prototype.$historyTracker=function(v){if(this.$mergeUndoDeltas){var C=this.prevOp,x=this.$mergeableCommands,_=C.command&&v.command.name==C.command.name;if(v.command.name=="insertstring"){var k=v.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),_=_&&this.mergeNextCommand&&(!/\s/.test(k)||/\s/.test(C.args)),this.mergeNextCommand=!0}else _=_&&x.indexOf(v.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(_=!1),_?this.session.mergeUndoDeltas=!0:x.indexOf(v.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},w.prototype.setKeyboardHandler=function(v,C){if(v&&typeof v=="string"&&v!="ace"){this.$keybindingId=v;var x=this;$.loadModule(["keybinding",v],function(_){x.$keybindingId==v&&x.keyBinding.setKeyboardHandler(_&&_.handler),C&&C()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(v),C&&C()},w.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},w.prototype.setSession=function(v){if(this.session!=v){this.curOp&&this.endOperation(),this.curOp={};var C=this.session;if(C){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var x=this.session.getSelection();x.off("changeCursor",this.$onCursorChange),x.off("changeSelection",this.$onSelectionChange)}this.session=v,v?(this.$onDocumentChange=this.onDocumentChange.bind(this),v.on("change",this.$onDocumentChange),this.renderer.setSession(v),this.$onChangeMode=this.onChangeMode.bind(this),v.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),v.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),v.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),v.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),v.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),v.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=v.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(v)),this._signal("changeSession",{session:v,oldSession:C}),this.curOp=null,C&&C._signal("changeEditor",{oldEditor:this}),C&&(C.$editor=null),v&&v._signal("changeEditor",{editor:this}),v&&(v.$editor=this),v&&!v.destroyed&&v.bgTokenizer.scheduleStart()}},w.prototype.getSession=function(){return this.session},w.prototype.setValue=function(v,C){return this.session.doc.setValue(v),C?C==1?this.navigateFileEnd():C==-1&&this.navigateFileStart():this.selectAll(),v},w.prototype.getValue=function(){return this.session.getValue()},w.prototype.getSelection=function(){return this.selection},w.prototype.resize=function(v){this.renderer.onResize(v)},w.prototype.setTheme=function(v,C){this.renderer.setTheme(v,C)},w.prototype.getTheme=function(){return this.renderer.getTheme()},w.prototype.setStyle=function(v){this.renderer.setStyle(v)},w.prototype.unsetStyle=function(v){this.renderer.unsetStyle(v)},w.prototype.getFontSize=function(){return this.getOption("fontSize")||m.computedStyle(this.container).fontSize},w.prototype.setFontSize=function(v){this.setOption("fontSize",v)},w.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var v=this;this.$highlightPending=!0,setTimeout(function(){v.$highlightPending=!1;var C=v.session;if(!(!C||C.destroyed)){C.$bracketHighlight&&(C.$bracketHighlight.markerIds.forEach(function(F){C.removeMarker(F)}),C.$bracketHighlight=null);var x=v.getCursorPosition(),_=v.getKeyboardHandler(),k=_&&_.$getDirectionForHighlight&&_.$getDirectionForHighlight(v),O=C.getMatchingBracketRanges(x,k);if(!O){var I=new A(C,x.row,x.column),N=I.getCurrentToken();if(N&&/\b(?:tag-open|tag-name)/.test(N.type)){var P=C.getMatchingTags(x);P&&(O=[P.openTagName.isEmpty()?P.openTag:P.openTagName,P.closeTagName.isEmpty()?P.closeTag:P.closeTagName])}}if(!O&&C.$mode.getMatching&&(O=C.$mode.getMatching(v.session)),!O){v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide();return}var B="ace_bracket";Array.isArray(O)?O.length==1&&(B="ace_error_bracket"):O=[O],O.length==2&&(f.comparePoints(O[0].end,O[1].start)==0?O=[f.fromPoints(O[0].start,O[1].end)]:f.comparePoints(O[0].start,O[1].end)==0&&(O=[f.fromPoints(O[1].start,O[0].end)])),C.$bracketHighlight={ranges:O,markerIds:O.map(function(F){return C.addMarker(F,B,"text")})},v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide()}},50)}},w.prototype.focus=function(){this.textInput.focus()},w.prototype.isFocused=function(){return this.textInput.isFocused()},w.prototype.blur=function(){this.textInput.blur()},w.prototype.onFocus=function(v){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",v))},w.prototype.onBlur=function(v){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",v))},w.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},w.prototype.onDocumentChange=function(v){var C=this.session.$useWrapMode,x=v.start.row==v.end.row?v.end.row:1/0;this.renderer.updateLines(v.start.row,x,C),this._signal("change",v),this.$cursorChange()},w.prototype.onTokenizerUpdate=function(v){var C=v.data;this.renderer.updateLines(C.first,C.last)},w.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},w.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},w.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},w.prototype.$updateHighlightActiveLine=function(){var v=this.getSession(),C;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(C=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(C=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(C=!1)),v.$highlightLineMarker&&!C)v.removeMarker(v.$highlightLineMarker.id),v.$highlightLineMarker=null;else if(!v.$highlightLineMarker&&C){var x=new f(C.row,C.column,C.row,1/0);x.id=v.addMarker(x,"ace_active-line","screenLine"),v.$highlightLineMarker=x}else C&&(v.$highlightLineMarker.start.row=C.row,v.$highlightLineMarker.end.row=C.row,v.$highlightLineMarker.start.column=C.column,v._signal("changeBackMarker"))},w.prototype.onSelectionChange=function(v){var C=this.session;if(C.$selectionMarker&&C.removeMarker(C.$selectionMarker),C.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var x=this.selection.getRange(),_=this.getSelectionStyle();C.$selectionMarker=C.addMarker(x,"ace_selection",_)}var k=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(k),this._signal("changeSelection")},w.prototype.$getSelectionHighLightRegexp=function(){var v=this.session,C=this.getSelectionRange();if(!(C.isEmpty()||C.isMultiLine())){var x=C.start.column,_=C.end.column,k=v.getLine(C.start.row),O=k.substring(x,_);if(!(O.length>5e3||!/[\w\d]/.test(O))){var I=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:O}),N=k.substring(x-1,_+1);if(I.test(N))return I}}},w.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},w.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},w.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},w.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},w.prototype.onChangeMode=function(v){this.renderer.updateText(),this._emit("changeMode",v)},w.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},w.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},w.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},w.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},w.prototype.getCopyText=function(){var v=this.getSelectedText(),C=this.session.doc.getNewLineCharacter(),x=!1;if(!v&&this.$copyWithEmptySelection){x=!0;for(var _=this.selection.getAllRanges(),k=0;k<_.length;k++){var O=_[k];k&&_[k-1].start.row==O.start.row||(v+=this.session.getLine(O.start.row)+C)}}var I={text:v};return this._signal("copy",I),R.lineMode=x?I.text:!1,I.text},w.prototype.onCopy=function(){this.commands.exec("copy",this)},w.prototype.onCut=function(){this.commands.exec("cut",this)},w.prototype.onPaste=function(v,C){var x={text:v,event:C};this.commands.exec("paste",this,x)},w.prototype.$handlePaste=function(v){typeof v=="string"&&(v={text:v}),this._signal("paste",v);var C=v.text,x=C===R.lineMode,_=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)x?_.insert({row:this.selection.lead.row,column:0},C):this.insert(C);else if(x)this.selection.rangeList.ranges.forEach(function(B){_.insert({row:B.start.row,column:0},C)});else{var k=C.split(/\r\n|\r|\n/),O=this.selection.rangeList.ranges,I=k.length==2&&(!k[0]||!k[1]);if(k.length!=O.length||I)return this.commands.exec("insertstring",this,C);for(var N=O.length;N--;){var P=O[N];P.isEmpty()||_.remove(P),_.insert(P.start,k[N])}}},w.prototype.execCommand=function(v,C){return this.commands.exec(v,this,C)},w.prototype.insert=function(v,C){var x=this.session,_=x.getMode(),k=this.getCursorPosition();if(this.getBehavioursEnabled()&&!C){var O=_.transformAction(x.getState(k.row),"insertion",this,x,v);O&&(v!==O.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),v=O.text)}if(v==" "&&(v=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&v.indexOf(`
1366
- `)==-1){var I=f.fromPoints(k,k);I.end.column+=v.length,this.session.remove(I)}}else{var I=this.getSelectionRange();k=this.session.remove(I),this.clearSelection()}if(v==`
1367
- `||v==`\r
1368
- `){var F=x.getLine(k.row);if(k.column>F.search(/\S|$/)){var N=F.substr(k.column).search(/\S|$/);x.doc.removeInLine(k.row,k.column,k.column+N)}}this.clearSelection();var P=k.column,B=x.getState(k.row),F=x.getLine(k.row),H=_.checkOutdent(B,F,v);if(x.insert(k,v),O&&O.selection&&(O.selection.length==2?this.selection.setSelectionRange(new f(k.row,P+O.selection[0],k.row,P+O.selection[1])):this.selection.setSelectionRange(new f(k.row+O.selection[0],O.selection[1],k.row+O.selection[2],O.selection[3]))),this.$enableAutoIndent){if(x.getDocument().isNewLine(v)){var z=_.getNextLineIndent(B,F.slice(0,k.column),x.getTabString());x.insert({row:k.row+1,column:0},z)}H&&_.autoOutdent(B,x,k.row)}},w.prototype.autoIndent=function(){for(var v=this.session,C=v.getMode(),x=this.selection.isEmpty()?[new f(0,0,v.doc.getLength()-1,0)]:this.selection.getAllRanges(),_="",k="",O="",I=v.getTabString(),N=0;N<x.length;N++)for(var P=x[N].start.row,B=x[N].end.row,F=P;F<=B;F++){F>0&&(_=v.getState(F-1),k=v.getLine(F-1),O=C.getNextLineIndent(_,k,I));var H=v.getLine(F),z=C.$getIndent(H);if(O!==z){if(z.length>0){var W=new f(F,0,F,z.length);v.remove(W)}O.length>0&&v.insert({row:F,column:0},O)}C.autoOutdent(_,v,F)}},w.prototype.onTextInput=function(v,C){if(!C)return this.keyBinding.onTextInput(v);this.startOperation({command:{name:"insertstring"}});var x=this.applyComposition.bind(this,v,C);this.selection.rangeCount?this.forEachSelection(x):x(),this.endOperation()},w.prototype.applyComposition=function(v,C){if(C.extendLeft||C.extendRight){var x=this.selection.getRange();x.start.column-=C.extendLeft,x.end.column+=C.extendRight,x.start.column<0&&(x.start.row--,x.start.column+=this.session.getLine(x.start.row).length+1),this.selection.setRange(x),!v&&!x.isEmpty()&&this.remove()}if((v||!this.selection.isEmpty())&&this.insert(v,!0),C.restoreStart||C.restoreEnd){var x=this.selection.getRange();x.start.column-=C.restoreStart,x.end.column-=C.restoreEnd,this.selection.setRange(x)}},w.prototype.onCommandKey=function(v,C,x){return this.keyBinding.onCommandKey(v,C,x)},w.prototype.setOverwrite=function(v){this.session.setOverwrite(v)},w.prototype.getOverwrite=function(){return this.session.getOverwrite()},w.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},w.prototype.setScrollSpeed=function(v){this.setOption("scrollSpeed",v)},w.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},w.prototype.setDragDelay=function(v){this.setOption("dragDelay",v)},w.prototype.getDragDelay=function(){return this.getOption("dragDelay")},w.prototype.setSelectionStyle=function(v){this.setOption("selectionStyle",v)},w.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},w.prototype.setHighlightActiveLine=function(v){this.setOption("highlightActiveLine",v)},w.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},w.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},w.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},w.prototype.setHighlightSelectedWord=function(v){this.setOption("highlightSelectedWord",v)},w.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},w.prototype.setAnimatedScroll=function(v){this.renderer.setAnimatedScroll(v)},w.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},w.prototype.setShowInvisibles=function(v){this.renderer.setShowInvisibles(v)},w.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},w.prototype.setDisplayIndentGuides=function(v){this.renderer.setDisplayIndentGuides(v)},w.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},w.prototype.setHighlightIndentGuides=function(v){this.renderer.setHighlightIndentGuides(v)},w.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},w.prototype.setShowPrintMargin=function(v){this.renderer.setShowPrintMargin(v)},w.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},w.prototype.setPrintMarginColumn=function(v){this.renderer.setPrintMarginColumn(v)},w.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},w.prototype.setReadOnly=function(v){this.setOption("readOnly",v)},w.prototype.getReadOnly=function(){return this.getOption("readOnly")},w.prototype.setBehavioursEnabled=function(v){this.setOption("behavioursEnabled",v)},w.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},w.prototype.setWrapBehavioursEnabled=function(v){this.setOption("wrapBehavioursEnabled",v)},w.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},w.prototype.setShowFoldWidgets=function(v){this.setOption("showFoldWidgets",v)},w.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},w.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},w.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},w.prototype.remove=function(v){this.selection.isEmpty()&&(v=="left"?this.selection.selectLeft():this.selection.selectRight());var C=this.getSelectionRange();if(this.getBehavioursEnabled()){var x=this.session,_=x.getState(C.start.row),k=x.getMode().transformAction(_,"deletion",this,x,C);if(C.end.column===0){var O=x.getTextRange(C);if(O[O.length-1]==`
1369
- `){var I=x.getLine(C.end.row);/^\s+$/.test(I)&&(C.end.column=I.length)}}k&&(C=k)}this.session.remove(C),this.clearSelection()},w.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var v=this.getSelectionRange();v.start.column==v.end.column&&v.start.row==v.end.row&&(v.end.column=0,v.end.row++),this.session.remove(v),this.clearSelection()},w.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var v=this.getCursorPosition();this.insert(`
1370
- `),this.moveCursorToPosition(v)},w.prototype.setGhostText=function(v,C){this.renderer.setGhostText(v,C)},w.prototype.removeGhostText=function(){this.renderer.removeGhostText()},w.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var v=this.getCursorPosition(),C=v.column;if(C!==0){var x=this.session.getLine(v.row),_,k;C<x.length?(_=x.charAt(C)+x.charAt(C-1),k=new f(v.row,C-1,v.row,C+1)):(_=x.charAt(C-1)+x.charAt(C-2),k=new f(v.row,C-2,v.row,C)),this.session.replace(k,_),this.session.selection.moveToPosition(k.end)}}},w.prototype.toLowerCase=function(){var v=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var C=this.getSelectionRange(),x=this.session.getTextRange(C);this.session.replace(C,x.toLowerCase()),this.selection.setSelectionRange(v)},w.prototype.toUpperCase=function(){var v=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var C=this.getSelectionRange(),x=this.session.getTextRange(C);this.session.replace(C,x.toUpperCase()),this.selection.setSelectionRange(v)},w.prototype.indent=function(){var v=this.session,C=this.getSelectionRange();if(C.start.row<C.end.row){var x=this.$getSelectedRows();v.indentRows(x.first,x.last," ");return}else if(C.start.column<C.end.column){var _=v.getTextRange(C);if(!/^\s+$/.test(_)){var x=this.$getSelectedRows();v.indentRows(x.first,x.last," ");return}}var k=v.getLine(C.start.row),O=C.start,I=v.getTabSize(),N=v.documentToScreenColumn(O.row,O.column);if(this.session.getUseSoftTabs())var P=I-N%I,B=c.stringRepeat(" ",P);else{for(var P=N%I;k[C.start.column-1]==" "&&P;)C.start.column--,P--;this.selection.setSelectionRange(C),B=" "}return this.insert(B)},w.prototype.blockIndent=function(){var v=this.$getSelectedRows();this.session.indentRows(v.first,v.last," ")},w.prototype.blockOutdent=function(){var v=this.session.getSelection();this.session.outdentRows(v.getRange())},w.prototype.sortLines=function(){for(var v=this.$getSelectedRows(),C=this.session,x=[],_=v.first;_<=v.last;_++)x.push(C.getLine(_));x.sort(function(I,N){return I.toLowerCase()<N.toLowerCase()?-1:I.toLowerCase()>N.toLowerCase()?1:0});for(var k=new f(0,0,0,0),_=v.first;_<=v.last;_++){var O=C.getLine(_);k.start.row=_,k.end.row=_,k.end.column=O.length,C.replace(k,x[_-v.first])}},w.prototype.toggleCommentLines=function(){var v=this.session.getState(this.getCursorPosition().row),C=this.$getSelectedRows();this.session.getMode().toggleCommentLines(v,this.session,C.first,C.last)},w.prototype.toggleBlockComment=function(){var v=this.getCursorPosition(),C=this.session.getState(v.row),x=this.getSelectionRange();this.session.getMode().toggleBlockComment(C,this.session,x,v)},w.prototype.getNumberAt=function(v,C){var x=/[\-]?[0-9]+(?:\.[0-9]+)?/g;x.lastIndex=0;for(var _=this.session.getLine(v);x.lastIndex<C;){var k=x.exec(_);if(k.index<=C&&k.index+k[0].length>=C){var O={value:k[0],start:k.index,end:k.index+k[0].length};return O}}return null},w.prototype.modifyNumber=function(v){var C=this.selection.getCursor().row,x=this.selection.getCursor().column,_=new f(C,x-1,C,x),k=this.session.getTextRange(_);if(!isNaN(parseFloat(k))&&isFinite(k)){var O=this.getNumberAt(C,x);if(O){var I=O.value.indexOf(".")>=0?O.start+O.value.indexOf(".")+1:O.end,N=O.start+O.value.length-I,P=parseFloat(O.value);P*=Math.pow(10,N),I!==O.end&&x<I?v*=Math.pow(10,O.end-x-1):v*=Math.pow(10,O.end-x),P+=v,P/=Math.pow(10,N);var B=P.toFixed(N),F=new f(C,O.start,C,O.end);this.session.replace(F,B),this.moveCursorTo(C,Math.max(O.start+1,x+B.length-O.value.length))}}else this.toggleWord()},w.prototype.toggleWord=function(){var v=this.selection.getCursor().row,C=this.selection.getCursor().column;this.selection.selectWord();var x=this.getSelectedText(),_=this.selection.getWordRange().start.column,k=x.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),O=C-_-1;O<0&&(O=0);var I=0,N=0,P=this;x.match(/[A-Za-z0-9_]+/)&&k.forEach(function(G,Q){N=I+G.length,O>=I&&O<=N&&(x=G,P.selection.clearSelection(),P.moveCursorTo(v,I+_),P.selection.selectTo(v,N+_)),I=N});for(var B=this.$toggleWordPairs,F,H=0;H<B.length;H++)for(var z=B[H],W=0;W<=1;W++){var U=+!W,K=x.match(new RegExp("^\\s?_?("+c.escapeRegExp(z[W])+")\\s?$","i"));if(K){var Y=x.match(new RegExp("([_]|^|\\s)("+c.escapeRegExp(K[1])+")($|\\s)","g"));Y&&(F=x.replace(new RegExp(c.escapeRegExp(z[W]),"i"),function(G){var Q=z[U];return G.toUpperCase()==G?Q=Q.toUpperCase():G.charAt(0).toUpperCase()==G.charAt(0)&&(Q=Q.substr(0,0)+z[U].charAt(0).toUpperCase()+Q.substr(1)),Q}),this.insert(F),F="")}}},w.prototype.findLinkAt=function(v,C){var x,_,k=this.session.getLine(v),O=k.split(/((?:https?|ftp):\/\/[\S]+)/),I=C;I<0&&(I=0);var N=0,P=0,B;try{for(var F=h(O),H=F.next();!H.done;H=F.next()){var z=H.value;if(P=N+z.length,I>=N&&I<=P&&z.match(/((?:https?|ftp):\/\/[\S]+)/)){B=z.replace(/[\s:.,'";}\]]+$/,"");break}N=P}}catch(W){x={error:W}}finally{try{H&&!H.done&&(_=F.return)&&_.call(F)}finally{if(x)throw x.error}}return B},w.prototype.openLink=function(){var v=this.selection.getCursor(),C=this.findLinkAt(v.row,v.column);return C&&window.open(C,"_blank"),C!=null},w.prototype.removeLines=function(){var v=this.$getSelectedRows();this.session.removeFullLines(v.first,v.last),this.clearSelection()},w.prototype.duplicateSelection=function(){var v=this.selection,C=this.session,x=v.getRange(),_=v.isBackwards();if(x.isEmpty()){var k=x.start.row;C.duplicateLines(k,k)}else{var O=_?x.start:x.end,I=C.insert(O,C.getTextRange(x));x.start=O,x.end=I,v.setSelectionRange(x,_)}},w.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},w.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},w.prototype.moveText=function(v,C,x){return this.session.moveText(v,C,x)},w.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},w.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},w.prototype.$moveLines=function(v,C){var x,_,k=this.selection;if(!k.inMultiSelectMode||this.inVirtualSelectionMode){var O=k.toOrientedRange();x=this.$getSelectedRows(O),_=this.session.$moveLines(x.first,x.last,C?0:v),C&&v==-1&&(_=0),O.moveBy(_,0),k.fromOrientedRange(O)}else{var I=k.rangeList.ranges;k.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var N=0,P=0,B=I.length,F=0;F<B;F++){var H=F;I[F].moveBy(N,0),x=this.$getSelectedRows(I[F]);for(var z=x.first,W=x.last;++F<B;){P&&I[F].moveBy(P,0);var U=this.$getSelectedRows(I[F]);if(C&&U.first!=W)break;if(!C&&U.first>W+1)break;W=U.last}for(F--,N=this.session.$moveLines(z,W,C?0:v),C&&v==-1&&(H=F+1);H<=F;)I[H].moveBy(N,0),H++;C||(N=0),P+=N}k.fromOrientedRange(k.ranges[0]),k.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},w.prototype.$getSelectedRows=function(v){return v=(v||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(v.start.row),last:this.session.getRowFoldEnd(v.end.row)}},w.prototype.onCompositionStart=function(v){this.renderer.showComposition(v)},w.prototype.onCompositionUpdate=function(v){this.renderer.setCompositionText(v)},w.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},w.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},w.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},w.prototype.isRowVisible=function(v){return v>=this.getFirstVisibleRow()&&v<=this.getLastVisibleRow()},w.prototype.isRowFullyVisible=function(v){return v>=this.renderer.getFirstFullyVisibleRow()&&v<=this.renderer.getLastFullyVisibleRow()},w.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},w.prototype.$moveByPage=function(v,C){var x=this.renderer,_=this.renderer.layerConfig,k=v*Math.floor(_.height/_.lineHeight);C===!0?this.selection.$moveSelection(function(){this.moveCursorBy(k,0)}):C===!1&&(this.selection.moveCursorBy(k,0),this.selection.clearSelection());var O=x.scrollTop;x.scrollBy(0,k*_.lineHeight),C!=null&&x.scrollCursorIntoView(null,.5),x.animateScrolling(O)},w.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},w.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},w.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},w.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},w.prototype.scrollPageDown=function(){this.$moveByPage(1)},w.prototype.scrollPageUp=function(){this.$moveByPage(-1)},w.prototype.scrollToRow=function(v){this.renderer.scrollToRow(v)},w.prototype.scrollToLine=function(v,C,x,_){this.renderer.scrollToLine(v,C,x,_)},w.prototype.centerSelection=function(){var v=this.getSelectionRange(),C={row:Math.floor(v.start.row+(v.end.row-v.start.row)/2),column:Math.floor(v.start.column+(v.end.column-v.start.column)/2)};this.renderer.alignCursor(C,.5)},w.prototype.getCursorPosition=function(){return this.selection.getCursor()},w.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},w.prototype.getSelectionRange=function(){return this.selection.getRange()},w.prototype.selectAll=function(){this.selection.selectAll()},w.prototype.clearSelection=function(){this.selection.clearSelection()},w.prototype.moveCursorTo=function(v,C){this.selection.moveCursorTo(v,C)},w.prototype.moveCursorToPosition=function(v){this.selection.moveCursorToPosition(v)},w.prototype.jumpToMatching=function(v,C){var x=this.getCursorPosition(),_=new A(this.session,x.row,x.column),k=_.getCurrentToken(),O=0;k&&k.type.indexOf("tag-name")!==-1&&(k=_.stepBackward());var I=k||_.stepForward();if(I){var N,P=!1,B={},F=x.column-I.start,H,z={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(I.value.match(/[{}()\[\]]/g)){for(;F<I.value.length&&!P;F++)if(z[I.value[F]])switch(H=z[I.value[F]]+"."+I.type.replace("rparen","lparen"),isNaN(B[H])&&(B[H]=0),I.value[F]){case"(":case"[":case"{":B[H]++;break;case")":case"]":case"}":B[H]--,B[H]===-1&&(N="bracket",P=!0);break}}else I.type.indexOf("tag-name")!==-1&&(isNaN(B[I.value])&&(B[I.value]=0),k.value==="<"&&O>1?B[I.value]++:k.value==="</"&&B[I.value]--,B[I.value]===-1&&(N="tag",P=!0));P||(k=I,O++,I=_.stepForward(),F=0)}while(I&&!P);if(N){var W,U;if(N==="bracket")W=this.session.getBracketRange(x),W||(W=new f(_.getCurrentTokenRow(),_.getCurrentTokenColumn()+F-1,_.getCurrentTokenRow(),_.getCurrentTokenColumn()+F-1),U=W.start,(C||U.row===x.row&&Math.abs(U.column-x.column)<2)&&(W=this.session.getBracketRange(U)));else if(N==="tag"){if(!I||I.type.indexOf("tag-name")===-1)return;if(W=new f(_.getCurrentTokenRow(),_.getCurrentTokenColumn()-2,_.getCurrentTokenRow(),_.getCurrentTokenColumn()-2),W.compare(x.row,x.column)===0){var K=this.session.getMatchingTags(x);K&&(K.openTag.contains(x.row,x.column)?(W=K.closeTag,U=W.start):(W=K.openTag,K.closeTag.start.row===x.row&&K.closeTag.start.column===x.column?U=W.end:U=W.start))}U=U||W.start}U=W&&W.cursor||U,U&&(v?W&&C?this.selection.setRange(W):W&&W.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(U.row,U.column):this.selection.moveTo(U.row,U.column))}}},w.prototype.gotoLine=function(v,C,x){this.selection.clearSelection(),this.session.unfold({row:v-1,column:C||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(v-1,C||0),this.isRowFullyVisible(v-1)||this.scrollToLine(v-1,!0,x)},w.prototype.navigateTo=function(v,C){this.selection.moveTo(v,C)},w.prototype.navigateUp=function(v){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var C=this.selection.anchor.getPosition();return this.moveCursorToPosition(C)}this.selection.clearSelection(),this.selection.moveCursorBy(-v||-1,0)},w.prototype.navigateDown=function(v){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var C=this.selection.anchor.getPosition();return this.moveCursorToPosition(C)}this.selection.clearSelection(),this.selection.moveCursorBy(v||1,0)},w.prototype.navigateLeft=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorLeft();else{var C=this.getSelectionRange().start;this.moveCursorToPosition(C)}this.clearSelection()},w.prototype.navigateRight=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorRight();else{var C=this.getSelectionRange().end;this.moveCursorToPosition(C)}this.clearSelection()},w.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},w.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},w.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},w.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},w.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},w.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},w.prototype.replace=function(v,C){C&&this.$search.set(C);var x=this.$search.find(this.session),_=0;return x&&(this.$tryReplace(x,v)&&(_=1),this.selection.setSelectionRange(x),this.renderer.scrollSelectionIntoView(x.start,x.end)),_},w.prototype.replaceAll=function(v,C){C&&this.$search.set(C);var x=this.$search.findAll(this.session),_=0;if(!x.length)return _;var k=this.getSelectionRange();this.selection.moveTo(0,0);for(var O=x.length-1;O>=0;--O)this.$tryReplace(x[O],v)&&_++;return this.selection.setSelectionRange(k),_},w.prototype.$tryReplace=function(v,C){var x=this.session.getTextRange(v);return C=this.$search.replace(x,C),C!==null?(v.end=this.session.replace(v,C),v):null},w.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},w.prototype.find=function(v,C,x){C||(C={}),typeof v=="string"||v instanceof RegExp?C.needle=v:typeof v=="object"&&g.mixin(C,v);var _=this.selection.getRange();C.needle==null&&(v=this.session.getTextRange(_)||this.$search.$options.needle,v||(_=this.session.getWordRange(_.start.row,_.start.column),v=this.session.getTextRange(_)),this.$search.set({needle:v})),this.$search.set(C),C.start||this.$search.set({start:_});var k=this.$search.find(this.session);if(C.preventScroll)return k;if(k)return this.revealRange(k,x),k;C.backwards?_.start=_.end:_.end=_.start,this.selection.setRange(_)},w.prototype.findNext=function(v,C){this.find({skipCurrent:!0,backwards:!1},v,C)},w.prototype.findPrevious=function(v,C){this.find(v,{skipCurrent:!0,backwards:!0},C)},w.prototype.revealRange=function(v,C){this.session.unfold(v),this.selection.setSelectionRange(v);var x=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(v.start,v.end,.5),C!==!1&&this.renderer.animateScrolling(x)},w.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(v){v.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},w.prototype.setAutoScrollEditorIntoView=function(v){if(v){var C,x=this,_=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var k=this.$scrollAnchor;k.style.cssText="position:absolute",this.container.insertBefore(k,this.container.firstChild);var O=this.on("changeSelection",function(){_=!0}),I=this.renderer.on("beforeRender",function(){_&&(C=x.renderer.container.getBoundingClientRect())}),N=this.renderer.on("afterRender",function(){if(_&&C&&(x.isFocused()||x.searchBox&&x.searchBox.isFocused())){var P=x.renderer,B=P.$cursorLayer.$pixelPos,F=P.layerConfig,H=B.top-F.offset;B.top>=0&&H+C.top<0?_=!0:B.top<F.height&&B.top+C.top+F.lineHeight>window.innerHeight?_=!1:_=null,_!=null&&(k.style.top=H+"px",k.style.left=B.left+"px",k.style.height=F.lineHeight+"px",k.scrollIntoView(_)),_=C=null}});this.setAutoScrollEditorIntoView=function(P){P||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",O),this.renderer.off("afterRender",N),this.renderer.off("beforeRender",I))}}},w.prototype.$resetCursorStyle=function(){var v=this.$cursorStyle||"ace",C=this.renderer.$cursorLayer;C&&(C.setSmoothBlinking(/smooth/.test(v)),C.isBlinking=!this.$readOnly&&v!="wide",m.setCssClass(C.element,"ace_slim-cursors",/slim/.test(v)))},w.prototype.prompt=function(v,C,x){var _=this;$.loadModule("ace/ext/prompt",function(k){k.prompt(_,v,C,x)})},w})();T.$uid=0,T.prototype.curOp=null,T.prototype.prevOp={},T.prototype.$mergeableCommands=["backspace","del","insertstring"],T.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],g.implement(T.prototype,y),$.defineOptions(T.prototype,"editor",{selectionStyle:{set:function(w){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:w})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(w){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(w){this.textInput.setReadOnly(w),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(w){this.textInput.setCopyWithEmptySelection(w)},initialValue:!1},cursorStyle:{set:function(w){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(w){this.setAutoScrollEditorIntoView(w)}},keyboardHandler:{set:function(w){this.setKeyboardHandler(w)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(w){this.session.setValue(w)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(w){this.setSession(w)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(w){this.renderer.$gutterLayer.setShowLineNumbers(w),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),w&&this.$relativeLineNumbers?D.attach(this):D.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(w){this.$showLineNumbers&&w?D.attach(this):D.detach(this)}},placeholder:{set:function(w){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var v=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(v&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),m.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!v&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),m.addCssClass(this.container,"ace_hasPlaceholder");var C=m.createElement("div");C.className="ace_placeholder",C.textContent=this.$placeholder||"",this.renderer.placeholderNode=C,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!v&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(w){var v={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(_){_.blur(),_.renderer.scroller.focus()},readOnly:!0},C=function(_){if(_.target==this.renderer.scroller&&_.keyCode===L.enter){_.preventDefault();var k=this.getCursorPosition().row;this.isRowVisible(k)||this.scrollToLine(k,!0,!0),this.focus()}},x;w?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(d.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",M("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",M("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",C.bind(this)),this.commands.addCommand(v),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",M("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",M("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),x||(x=new S(this)),x.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",C.bind(this)),this.commands.removeCommand(v),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),x&&x.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(w){this.$textInputAriaLabel=w},initialValue:""},enableMobileMenu:{set:function(w){this.$enableMobileMenu=w},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var D={getText:function(w,v){return(Math.abs(w.selection.lead.row-v)||v+1+(v<9?"·":""))+""},getWidth:function(w,v,C){return Math.max(v.toString().length,(C.lastRow+1).toString().length,2)*C.characterWidth},update:function(w,v){v.renderer.$loop.schedule(v.renderer.CHANGE_GUTTER)},attach:function(w){w.renderer.$gutterLayer.$renderer=this,w.on("changeSelection",this.update),this.update(null,w)},detach:function(w){w.renderer.$gutterLayer.$renderer==this&&(w.renderer.$gutterLayer.$renderer=null),w.off("changeSelection",this.update),this.update(null,w)}};n.Editor=T}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,n,p){var h=t("../lib/dom"),g=(function(){function m(c,d){this.element=c,this.canvasHeight=d||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return m.prototype.moveContainer=function(c){h.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},m.prototype.pageChanged=function(c,d){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},m.prototype.computeLineTop=function(c,d,r){var o=d.firstRowScreen*d.lineHeight,a=Math.floor(o/this.canvasHeight),s=r.documentToScreenRow(c,0)*d.lineHeight;return s-a*this.canvasHeight},m.prototype.computeLineHeight=function(c,d,r){return d.lineHeight*r.getRowLineCount(c)},m.prototype.getLength=function(){return this.cells.length},m.prototype.get=function(c){return this.cells[c]},m.prototype.shift=function(){this.$cacheCell(this.cells.shift())},m.prototype.pop=function(){this.$cacheCell(this.cells.pop())},m.prototype.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var d=h.createFragment(this.element),r=0;r<c.length;r++)d.appendChild(c[r].element);this.element.appendChild(d)}else this.cells.push(c),this.element.appendChild(c.element)},m.prototype.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var d=h.createFragment(this.element),r=0;r<c.length;r++)d.appendChild(c[r].element);this.element.firstChild?this.element.insertBefore(d,this.element.firstChild):this.element.appendChild(d)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},m.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},m.prototype.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},m.prototype.createCell=function(c,d,r,o){var a=this.cellCache.pop();if(!a){var s=h.createElement("div");o&&o(s),this.element.appendChild(s),a={element:s,text:"",row:c}}return a.row=c,a},m})();n.Lines=g}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(t,n,p){var h=t("../lib/dom"),g=t("../lib/oop"),m=t("../lib/lang"),c=t("../lib/event_emitter").EventEmitter,d=t("./lines").Lines,r=t("../config").nls,o=(function(){function s(i){this.element=h.createElement("div"),this.element.className="ace_layer ace_gutter-layer",i.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new d(this.element),this.$lines.$offsetCoefficient=1}return s.prototype.setSession=function(i){this.session&&this.session.off("change",this.$updateAnnotations),this.session=i,i&&i.on("change",this.$updateAnnotations)},s.prototype.addGutterDecoration=function(i,u){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(i,u)},s.prototype.removeGutterDecoration=function(i,u){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(i,u)},s.prototype.setAnnotations=function(i){this.$annotations=[];for(var u=0;u<i.length;u++){var f=i[u],y=f.row,b=this.$annotations[y];b||(b=this.$annotations[y]={text:[],type:[],displayText:[]});var E=f.text,$=f.text,A=f.type;E=E?m.escapeHTML(E):f.html||"",$=$||f.html||"",b.text.indexOf(E)===-1&&(b.text.push(E),b.type.push(A),b.displayText.push($));var S=f.className;S?b.className=S:A==="error"?b.className=" ace_error":A==="security"&&!/\bace_error\b/.test(b.className)?b.className=" ace_security":A==="warning"&&!/\bace_(error|security)\b/.test(b.className)?b.className=" ace_warning":A==="info"&&!b.className?b.className=" ace_info":A==="hint"&&!b.className&&(b.className=" ace_hint")}},s.prototype.$updateAnnotations=function(i){if(this.$annotations.length){var u=i.start.row,f=i.end.row-u;if(f!==0)if(i.action=="remove")this.$annotations.splice(u,f+1,null);else{var y=new Array(f+1);y.unshift(u,1),this.$annotations.splice.apply(this.$annotations,y)}}},s.prototype.update=function(i){this.config=i;var u=this.session,f=i.firstRow,y=Math.min(i.lastRow+i.gutterOffset,u.getLength()-1);this.oldLastRow=y,this.config=i,this.$lines.moveContainer(i),this.$updateCursorRow();for(var b=u.getNextFoldLine(f),E=b?b.start.row:1/0,$=null,A=-1,S=f;;){if(S>E&&(S=b.end.row+1,b=u.getNextFoldLine(S,b),E=b?b.start.row:1/0),S>y){for(;this.$lines.getLength()>A+1;)this.$lines.pop();break}$=this.$lines.get(++A),$?$.row=S:($=this.$lines.createCell(S,i,this.session,a),this.$lines.push($)),this.$renderCell($,i,b,S),S++}this._signal("afterRender"),this.$updateGutterWidth(i)},s.prototype.$updateGutterWidth=function(i){var u=this.session,f=u.gutterRenderer||this.$renderer,y=u.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||u.$useWrapMode)&&(b=u.getLength()+y-1);var E=f?f.getWidth(u,b,i):b.toString().length*i.characterWidth,$=this.$padding||this.$computePadding();E+=$.left+$.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},s.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},s.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var u=this.$lines.cells;this.$cursorCell=null;for(var f=0;f<u.length;f++){var y=u[f];if(y.row>=this.$cursorRow){if(y.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(f>0&&b&&b.start.row==u[f-1].row)y=u[f-1];else break}y.element.className="ace_gutter-active-line "+y.element.className,this.$cursorCell=y;break}}}}},s.prototype.scrollLines=function(i){var u=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(u,i))return this.update(i);this.$lines.moveContainer(i);var f=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),y=this.oldLastRow;if(this.oldLastRow=f,!u||y<i.firstRow)return this.update(i);if(f<u.firstRow)return this.update(i);if(u.firstRow<i.firstRow)for(var b=this.session.getFoldedRowCount(u.firstRow,i.firstRow-1);b>0;b--)this.$lines.shift();if(y>f)for(var b=this.session.getFoldedRowCount(f+1,y);b>0;b--)this.$lines.pop();i.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLines(i,i.firstRow,u.firstRow-1)),f>y&&this.$lines.push(this.$renderLines(i,y+1,f)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},s.prototype.$renderLines=function(i,u,f){for(var y=[],b=u,E=this.session.getNextFoldLine(b),$=E?E.start.row:1/0;b>$&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),$=E?E.start.row:1/0),!(b>f);){var A=this.$lines.createCell(b,i,this.session,a);this.$renderCell(A,i,E,b),y.push(A),b++}return y},s.prototype.$renderCell=function(i,u,f,y){var b=i.element,E=this.session,$=b.childNodes[0],A=b.childNodes[1],S=b.childNodes[2],M=S.firstChild,R=E.$firstLineNumber,L=E.$breakpoints,T=E.$decorations,D=E.gutterRenderer||this.$renderer,w=this.$showFoldWidgets&&E.foldWidgets,v=f?f.start.row:Number.MAX_VALUE,C=u.lineHeight+"px",x=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",_=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=(D?D.getText(E,y):y+R).toString();if(this.$highlightGutterLine&&(y==this.$cursorRow||f&&y<this.$cursorRow&&y>=v&&this.$cursorRow<=f.end.row)&&(x+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),L[y]&&(x+=L[y]),T[y]&&(x+=T[y]),this.$annotations[y]&&y!==v&&(x+=this.$annotations[y].className),w){var O=w[y];O==null&&(O=w[y]=E.getFoldWidget(y))}if(O){var I="ace_fold-widget ace_"+O,N=O=="start"&&y==v&&y<f.end.row;if(N){I+=" ace_closed";for(var P="",B=!1,F=y+1;F<=f.end.row;F++)if(this.$annotations[F]){if(this.$annotations[F].className===" ace_error"){B=!0,P=" ace_error_fold";break}this.$annotations[F].className===" ace_security"?(B=!0,P=" ace_security_fold"):this.$annotations[F].className===" ace_warning"&&P!==" ace_security_fold"&&(B=!0,P=" ace_warning_fold")}x+=P}else I+=" ace_open";A.className!=I&&(A.className=I),h.setStyle(A.style,"height",C),h.setStyle(A.style,"display","inline-block"),A.setAttribute("role","button"),A.setAttribute("tabindex","-1");var H=E.getFoldWidgetRange(y);H?A.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[H.start.row+1,H.end.row+1])):f?A.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[f.start.row+1,f.end.row+1])):A.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[y+1])),N?(A.setAttribute("aria-expanded","false"),A.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(A.setAttribute("aria-expanded","true"),A.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else A&&(h.setStyle(A.style,"display","none"),A.setAttribute("tabindex","0"),A.removeAttribute("role"),A.removeAttribute("aria-label"));if(B&&this.$showFoldedAnnotations){S.className="ace_gutter_annotation",M.className=_,M.className+=P,h.setStyle(M.style,"height",C),h.setStyle(S.style,"display","block"),h.setStyle(S.style,"height",C);var z;switch(P){case" ace_error_fold":z=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[k]);break;case" ace_security_fold":z=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[k]);break;case" ace_warning_fold":z=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[k]);break}S.setAttribute("aria-label",z),S.setAttribute("tabindex","-1"),S.setAttribute("role","button")}else if(this.$annotations[y]){S.className="ace_gutter_annotation",M.className=_,this.$useSvgGutterIcons?M.className+=this.$annotations[y].className:b.classList.add(this.$annotations[y].className.replace(" ","")),h.setStyle(M.style,"height",C),h.setStyle(S.style,"display","block"),h.setStyle(S.style,"height",C);var z;switch(this.$annotations[y].className){case" ace_error":z=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[k]);break;case" ace_security":z=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[k]);break;case" ace_warning":z=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[k]);break;case" ace_info":z=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[k]);break;case" ace_hint":z=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[k]);break}S.setAttribute("aria-label",z),S.setAttribute("tabindex","-1"),S.setAttribute("role","button")}else h.setStyle(S.style,"display","none"),S.removeAttribute("aria-label"),S.removeAttribute("role"),S.setAttribute("tabindex","0");return k!==$.data&&($.data=k),b.className!=x&&(b.className=x),h.setStyle(i.element.style,"height",this.$lines.computeLineHeight(y,u,E)+"px"),h.setStyle(i.element.style,"top",this.$lines.computeLineTop(y,u,E)+"px"),i.text=k,S.style.display==="none"&&A.style.display==="none"?i.element.setAttribute("aria-hidden",!0):i.element.setAttribute("aria-hidden",!1),i},s.prototype.setHighlightGutterLine=function(i){this.$highlightGutterLine=i},s.prototype.setShowLineNumbers=function(i){this.$renderer=!i&&{getWidth:function(){return 0},getText:function(){return""}}},s.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},s.prototype.setShowFoldWidgets=function(i){i?h.addCssClass(this.element,"ace_folding-enabled"):h.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=i,this.$padding=null},s.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},s.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var i=h.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(i.borderLeftWidth)||0)+(parseInt(i.paddingLeft)||0)+1,this.$padding.right=(parseInt(i.borderRightWidth)||0)+(parseInt(i.paddingRight)||0),this.$padding},s.prototype.getRegion=function(i){var u=this.$padding||this.$computePadding(),f=this.element.getBoundingClientRect();if(i.x<u.left+f.left)return"markers";if(this.$showFoldWidgets&&i.x>f.right-u.right)return"foldWidgets"},s})();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer="",o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,g.implement(o.prototype,c);function a(s){var i=document.createTextNode("");s.appendChild(i);var u=h.createElement("span");s.appendChild(u);var f=h.createElement("span");s.appendChild(f);var y=h.createElement("span");return f.appendChild(y),s}n.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,n,p){var h=t("../range").Range,g=t("../lib/dom"),m=(function(){function d(r){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return d.prototype.setPadding=function(r){this.$padding=r},d.prototype.setSession=function(r){this.session=r},d.prototype.setMarkers=function(r){this.markers=r},d.prototype.elt=function(r,o){var a=this.i!=-1&&this.element.childNodes[this.i];a?this.i++:(a=document.createElement("div"),this.element.appendChild(a),this.i=-1),a.style.cssText=o,a.className=r},d.prototype.update=function(r){if(r){this.config=r,this.i=0;var o;for(var a in this.markers){var s=this.markers[a];if(!s.range){s.update(o,this,this.session,r);continue}var i=s.range.clipRows(r.firstRow,r.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),s.renderer){var u=this.$getTop(i.start.row,r),f=this.$padding+i.start.column*r.characterWidth;s.renderer(o,i,f,u,r)}else s.type=="fullLine"?this.drawFullLineMarker(o,i,s.clazz,r):s.type=="screenLine"?this.drawScreenLineMarker(o,i,s.clazz,r):i.isMultiLine()?s.type=="text"?this.drawTextMarker(o,i,s.clazz,r):this.drawMultiLineMarker(o,i,s.clazz,r):this.drawSingleLineMarker(o,i,s.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},d.prototype.$getTop=function(r,o){return(r-o.firstRowScreen)*o.lineHeight},d.prototype.drawTextMarker=function(r,o,a,s,i){for(var u=this.session,f=o.start.row,y=o.end.row,b=f,E=0,$=0,A=u.getScreenLastRowColumn(b),S=new h(b,o.start.column,b,$);b<=y;b++)S.start.row=S.end.row=b,S.start.column=b==f?o.start.column:u.getRowWrapIndent(b),S.end.column=A,E=$,$=A,A=b+1<y?u.getScreenLastRowColumn(b+1):b==y?0:o.end.column,this.drawSingleLineMarker(r,S,a+(b==f?" ace_start":"")+" ace_br"+c(b==f||b==f+1&&o.start.column,E<$,$>A,b==y),s,b==y?0:1,i)},d.prototype.drawMultiLineMarker=function(r,o,a,s,i){var u=this.$padding,f=s.lineHeight,y=this.$getTop(o.start.row,s),b=u+o.start.column*s.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var E=o.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(r,E,a+" ace_br1 ace_start",s,null,i)}else this.elt(a+" ace_br1 ace_start","height:"+f+"px;right:"+u+"px;top:"+y+"px;left:"+b+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var E=o.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(r,E,a+" ace_br12",s,null,i)}else{y=this.$getTop(o.end.row,s);var $=o.end.column*s.characterWidth;this.elt(a+" ace_br12","height:"+f+"px;width:"+$+"px;top:"+y+"px;left:"+u+"px;"+(i||""))}if(f=(o.end.row-o.start.row-1)*s.lineHeight,!(f<=0)){y=this.$getTop(o.start.row+1,s);var A=(o.start.column?1:0)|(o.end.column?0:8);this.elt(a+(A?" ace_br"+A:""),"height:"+f+"px;right:"+u+"px;top:"+y+"px;left:"+u+"px;"+(i||""))}},d.prototype.drawSingleLineMarker=function(r,o,a,s,i,u){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(r,o,a,s,i,u);var f=s.lineHeight,y=(o.end.column+(i||0)-o.start.column)*s.characterWidth,b=this.$getTop(o.start.row,s),E=this.$padding+o.start.column*s.characterWidth;this.elt(a,"height:"+f+"px;width:"+y+"px;top:"+b+"px;left:"+E+"px;"+(u||""))},d.prototype.drawBidiSingleLineMarker=function(r,o,a,s,i,u){var f=s.lineHeight,y=this.$getTop(o.start.row,s),b=this.$padding,E=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);E.forEach(function($){this.elt(a,"height:"+f+"px;width:"+($.width+(i||0))+"px;top:"+y+"px;left:"+(b+$.left)+"px;"+(u||""))},this)},d.prototype.drawFullLineMarker=function(r,o,a,s,i){var u=this.$getTop(o.start.row,s),f=s.lineHeight;o.start.row!=o.end.row&&(f+=this.$getTop(o.end.row,s)-u),this.elt(a,"height:"+f+"px;top:"+u+"px;left:0;right:0;"+(i||""))},d.prototype.drawScreenLineMarker=function(r,o,a,s,i){var u=this.$getTop(o.start.row,s),f=s.lineHeight;this.elt(a,"height:"+f+"px;top:"+u+"px;left:0;right:0;"+(i||""))},d})();m.prototype.$padding=0;function c(d,r,o,a){return(d?1:0)|(r?2:0)|(o?4:0)|(a?8:0)}n.Marker=m}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,n,p){var h=new Set(["text","rparen","lparen"]);n.isTextToken=function(g){return h.has(g)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,n,p){var h=t("../lib/oop"),g=t("../lib/dom"),m=t("../lib/lang"),c=t("./lines").Lines,d=t("../lib/event_emitter").EventEmitter,r=t("../config").nls,o=t("./text_util").isTextToken,a=(function(){function s(i){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",i.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}return s.prototype.$updateEolChar=function(){var i=this.session.doc,u=i.getNewLineCharacter()==`
1371
- `&&i.getNewLineMode()!="windows",f=u?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=f)return this.EOL_CHAR=f,!0},s.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px"},s.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},s.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},s.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",(function(u){this._signal("changeCharacterSize",u)}).bind(this)),this.$pollSizeChanges()},s.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},s.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},s.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString()},s.prototype.setShowInvisibles=function(i){return this.showInvisibles==i?!1:(this.showInvisibles=i,typeof i=="string"?(this.showSpaces=/tab/i.test(i),this.showTabs=/space/i.test(i),this.showEOL=/eol/i.test(i)):this.showSpaces=this.showTabs=this.showEOL=i,this.$computeTabString(),!0)},s.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},s.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},s.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var u=this.$tabStrings=[0],f=1;f<i+1;f++)if(this.showTabs){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_tab",y.textContent=m.stringRepeat(this.TAB_CHAR,f),u.push(y)}else u.push(this.dom.createTextNode(m.stringRepeat(" ",f),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var b="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?m.stringRepeat(this.SPACE_CHAR,this.tabSize):m.stringRepeat(" ",this.tabSize),A=this.showTabs?" ace_invisible ace_invisible_tab":"",S=this.showTabs?m.stringRepeat(this.TAB_CHAR,this.tabSize):$,y=this.dom.createElement("span");y.className=b+E,y.textContent=$,this.$tabStrings[" "]=y;var y=this.dom.createElement("span");y.className=b+A,y.textContent=S,this.$tabStrings[" "]=y}},s.prototype.updateLines=function(i,u,f){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var y=Math.max(u,i.firstRow),b=Math.min(f,i.lastRow),E=this.element.childNodes,$=0,S=i.firstRow;S<y;S++){var M=this.session.getFoldLine(S);if(M)if(M.containsRow(y)){y=M.start.row;break}else S=M.end.row;$++}for(var A=!1,S=y,M=this.session.getNextFoldLine(S),R=M?M.start.row:1/0;S>R&&(S=M.end.row+1,M=this.session.getNextFoldLine(S,M),R=M?M.start.row:1/0),!(S>b);){var L=E[$++];if(L){this.dom.removeChildren(L),this.$renderLine(L,S,S==R?M:!1),A&&(L.style.top=this.$lines.computeLineTop(S,i,this.session)+"px");var T=i.lineHeight*this.session.getRowLength(S)+"px";L.style.height!=T&&(A=!0,L.style.height=T)}S++}if(A)for(;$<this.$lines.cells.length;){var D=this.$lines.cells[$++];D.element.style.top=this.$lines.computeLineTop(D.row,i,this.session)+"px"}},s.prototype.scrollLines=function(i){var u=this.config;if(this.config=i,this.$lines.pageChanged(u,i))return this.update(i);this.$lines.moveContainer(i);var f=i.lastRow,y=u?u.lastRow:-1;if(!u||y<i.firstRow)return this.update(i);if(f<u.firstRow)return this.update(i);if(!u||u.lastRow<i.firstRow)return this.update(i);if(i.lastRow<u.firstRow)return this.update(i);if(u.firstRow<i.firstRow)for(var b=this.session.getFoldedRowCount(u.firstRow,i.firstRow-1);b>0;b--)this.$lines.shift();if(u.lastRow>i.lastRow)for(var b=this.session.getFoldedRowCount(i.lastRow+1,u.lastRow);b>0;b--)this.$lines.pop();i.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,u.firstRow-1)),i.lastRow>u.lastRow&&this.$lines.push(this.$renderLinesFragment(i,u.lastRow+1,i.lastRow)),this.$highlightIndentGuide()},s.prototype.$renderLinesFragment=function(i,u,f){for(var y=[],b=u,E=this.session.getNextFoldLine(b),$=E?E.start.row:1/0;b>$&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),$=E?E.start.row:1/0),!(b>f);){var A=this.$lines.createCell(b,i,this.session),S=A.element;this.dom.removeChildren(S),g.setStyle(S.style,"height",this.$lines.computeLineHeight(b,i,this.session)+"px"),g.setStyle(S.style,"top",this.$lines.computeLineTop(b,i,this.session)+"px"),this.$renderLine(S,b,b==$?E:!1),this.$useLineGroups()?S.className="ace_line_group":S.className="ace_line",y.push(A),b++}return y},s.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var u=i.firstRow,f=i.lastRow,y=this.$lines;y.getLength();)y.pop();y.push(this.$renderLinesFragment(i,u,f))},s.prototype.$renderToken=function(i,u,f,y){for(var b=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,$=this.dom.createFragment(this.element),A,S=0;A=E.exec(y);){var M=A[1],R=A[2],L=A[3],T=A[4],D=A[5];if(!(!b.showSpaces&&R)){var w=S!=A.index?y.slice(S,A.index):"";if(S=A.index+A[0].length,w&&$.appendChild(this.dom.createTextNode(w,this.element)),M){var v=b.session.getScreenTabSize(u+A.index);$.appendChild(b.$tabStrings[v].cloneNode(!0)),u+=v-1}else if(R)if(b.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=m.stringRepeat(b.SPACE_CHAR,R.length),$.appendChild(C)}else $.appendChild(this.dom.createTextNode(R,this.element));else if(L){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=m.stringRepeat(b.SPACE_CHAR,L.length),$.appendChild(C)}else if(T){u+=1;var C=this.dom.createElement("span");C.style.width=b.config.characterWidth*2+"px",C.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=b.showSpaces?b.SPACE_CHAR:T,$.appendChild(C)}else if(D){u+=1;var C=this.dom.createElement("span");C.style.width=b.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=D,$.appendChild(C)}}}if($.appendChild(this.dom.createTextNode(S?y.slice(S):y,this.element)),o(f.type))i.appendChild($);else{var x="ace_"+f.type.replace(/\./g," ace_"),C=this.dom.createElement("span");f.type=="fold"&&(C.style.width=f.value.length*this.config.characterWidth+"px",C.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),C.className=x,C.appendChild($),i.appendChild(C)}return u+y.length},s.prototype.renderIndentGuide=function(i,u,f){var y=u.search(this.$indentGuideRe);if(y<=0||y>=f)return u;if(u[0]==" "){y-=y%this.tabSize;for(var b=y/this.tabSize,E=0;E<b;E++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(y)}else if(u[0]==" "){for(var E=0;E<y;E++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(y)}return this.$highlightIndentGuide(),u},s.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var i=this.session.doc.$lines;if(i){var u=this.session.selection.getCursor(),f=/^\s*/.exec(this.session.doc.getLine(u.row))[0].length,y=Math.floor(f/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:y,start:u.row};var b=this.session.$bracketHighlight;if(b){for(var E=this.session.$bracketHighlight.ranges,$=0;$<E.length;$++)if(u.row!==E[$].start.row){this.$highlightIndentGuideMarker.end=E[$].start.row,u.row>E[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[u.row]!==""&&u.column===i[u.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=u.row+1;$<i.length;$++){var A=i[$],S=/^\s*/.exec(A)[0].length;if(A!==""&&(this.$highlightIndentGuideMarker.end=$,S<=f))break}}this.$renderHighlightIndentGuide()}}},s.prototype.$clearActiveIndentGuide=function(){for(var i=this.$lines.cells,u=0;u<i.length;u++){var f=i[u],y=f.element.childNodes;if(y.length>0){for(var b=0;b<y.length;b++)if(y[b].classList&&y[b].classList.contains("ace_indent-guide-active")){y[b].classList.remove("ace_indent-guide-active");break}}}},s.prototype.$setIndentGuideActive=function(i,u){var f=this.session.doc.getLine(i.row);if(f!==""){var y=i.element.childNodes;if(y){var b=y[u-1];b&&b.classList&&b.classList.contains("ace_indent-guide")&&b.classList.add("ace_indent-guide-active")}}},s.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var u=this.$highlightIndentGuideMarker.indentLevel;if(u!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var f=0;f<i.length;f++){var y=i[f];if(this.$highlightIndentGuideMarker.end&&y.row>=this.$highlightIndentGuideMarker.start+1){if(y.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(y,u)}}else for(var f=i.length-1;f>=0;f--){var y=i[f];if(this.$highlightIndentGuideMarker.end&&y.row<this.$highlightIndentGuideMarker.start){if(y.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(y,u)}}}},s.prototype.$createLineElement=function(i){var u=this.dom.createElement("div");return u.className="ace_line",u.style.height=this.config.lineHeight+"px",u},s.prototype.$renderWrappedLine=function(i,u,f){var y=0,b=0,E=f[0],$=0,A=this.$createLineElement();i.appendChild(A);for(var S=0;S<u.length;S++){var M=u[S],R=M.value;if(S==0&&this.displayIndentGuides){if(y=R.length,R=this.renderIndentGuide(A,R,E),!R)continue;y-=R.length}if(y+R.length<E)$=this.$renderToken(A,$,M,R),y+=R.length;else{for(;y+R.length>=E;)$=this.$renderToken(A,$,M,R.substring(0,E-y)),R=R.substring(E-y),y=E,A=this.$createLineElement(),i.appendChild(A),A.appendChild(this.dom.createTextNode(m.stringRepeat(" ",f.indent),this.element)),b++,$=0,E=f[b]||Number.MAX_VALUE;R.length!=0&&(y+=R.length,$=this.$renderToken(A,$,M,R))}}f[f.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(A,$,null,"",!0)},s.prototype.$renderSimpleLine=function(i,u){for(var f=0,y=0;y<u.length;y++){var b=u[y],E=b.value;if(!(y==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(i,E),!E))){if(f+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,f,b,E);f=this.$renderToken(i,f,b,E)}}},s.prototype.$renderOverflowMessage=function(i,u,f,y,b){f&&this.$renderToken(i,u,f,y.slice(0,this.MAX_LINE_LENGTH-u));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=b?"<hide>":"<click to see more...>",i.appendChild(E)},s.prototype.$renderLine=function(i,u,f){if(!f&&f!=!1&&(f=this.session.getFoldLine(u)),f)var y=this.$getFoldLineTokens(u,f);else var y=this.session.getTokens(u);var b=i;if(y.length){var E=this.session.getRowSplitData(u);if(E&&E.length){this.$renderWrappedLine(i,y,E);var b=i.lastChild}else{var b=i;this.$useLineGroups()&&(b=this.$createLineElement(),i.appendChild(b)),this.$renderSimpleLine(b,y)}}else this.$useLineGroups()&&(b=this.$createLineElement(),i.appendChild(b));if(this.showEOL&&b){f&&(u=f.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=u==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild($)}},s.prototype.$getFoldLineTokens=function(i,u){var f=this.session,y=[];function b($,A,S){for(var M=0,R=0;R+$[M].value.length<A;)if(R+=$[M].value.length,M++,M==$.length)return;if(R!=A){var L=$[M].value.substring(A-R);L.length>S-A&&(L=L.substring(0,S-A)),y.push({type:$[M].type,value:L}),R=A+L.length,M+=1}for(;R<S&&M<$.length;){var L=$[M].value;L.length+R>S?y.push({type:$[M].type,value:L.substring(0,S-R)}):y.push($[M]),R+=L.length,M+=1}}var E=f.getTokens(i);return u.walk(function($,A,S,M,R){$!=null?y.push({type:"fold",value:$}):(R&&(E=f.getTokens(A)),E.length&&b(E,M,S))},u.end.row,this.session.getLine(u.end.row).length),y},s.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},s})();a.prototype.EOF_CHAR="¶",a.prototype.EOL_CHAR_LF="¬",a.prototype.EOL_CHAR_CRLF="¤",a.prototype.EOL_CHAR=a.prototype.EOL_CHAR_LF,a.prototype.TAB_CHAR="—",a.prototype.SPACE_CHAR="·",a.prototype.$padding=0,a.prototype.MAX_LINE_LENGTH=1e4,a.prototype.showInvisibles=!1,a.prototype.showSpaces=!1,a.prototype.showTabs=!1,a.prototype.showEOL=!1,a.prototype.displayIndentGuides=!0,a.prototype.$highlightIndentGuides=!0,a.prototype.$tabStrings=[],a.prototype.destroy={},a.prototype.onChangeTabSize=a.prototype.$computeTabString,h.implement(a.prototype,d),n.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,n,p){var h=t("../lib/dom"),g=(function(){function m(c){this.element=h.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),h.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return m.prototype.$updateOpacity=function(c){for(var d=this.cursors,r=d.length;r--;)h.setStyle(d[r].style,"opacity",c?"":"0")},m.prototype.$startCssAnimation=function(){for(var c=this.cursors,d=c.length;d--;)c[d].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&h.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},m.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,h.removeCssClass(this.element,"ace_animate-blinking")},m.prototype.setPadding=function(c){this.$padding=c},m.prototype.setSession=function(c){this.session=c},m.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},m.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},m.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,h.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},m.prototype.addCursor=function(){var c=h.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},m.prototype.removeCursor=function(){if(this.cursors.length>1){var c=this.cursors.pop();return c.parentNode.removeChild(c),c}},m.prototype.hideCursor=function(){this.isVisible=!1,h.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},m.prototype.showCursor=function(){this.isVisible=!0,h.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},m.prototype.restartTimer=function(){var c=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,h.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&h.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),h.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var d=(function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){c(!0),d()},this.blinkInterval),d()}},m.prototype.getPixelPosition=function(c,d){if(!this.config||!this.session)return{left:0,top:0};c||(c=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(c),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,c.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),a=(r.row-(d?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:a}},m.prototype.isCursorInView=function(c,d){return c.top>=0&&c.top<d.maxHeight},m.prototype.update=function(c){this.config=c;var d=this.session.$selectionMarkers,r=0,o=0;(d===void 0||d.length===0)&&(d=[{cursor:null}]);for(var r=0,a=d.length;r<a;r++){var s=this.getPixelPosition(d[r].cursor,!0);if(!((s.top>c.height+c.offset||s.top<0)&&r>1)){var i=this.cursors[o++]||this.addCursor(),u=i.style;this.drawCursor?this.drawCursor(i,s,c,d[r],this.session):this.isCursorInView(s,c)?(h.setStyle(u,"display","block"),h.translate(i,s.left,s.top),h.setStyle(u,"width",Math.round(c.characterWidth)+"px"),h.setStyle(u,"height",c.lineHeight+"px")):h.setStyle(u,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var f=this.session.getOverwrite();this.$setOverwrite(f),this.$pixelPos=s,this.restartTimer()},m.prototype.$setOverwrite=function(c){c!=this.overwrite&&(this.overwrite=c,c?h.addCssClass(this.element,"ace_overwrite-cursors"):h.removeCssClass(this.element,"ace_overwrite-cursors"))},m.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},m})();g.prototype.$padding=0,g.prototype.drawCursor=null,n.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,n,p){var h=this&&this.__extends||(function(){var i=function(u,f){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(y[E]=b[E])},i(u,f)};return function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");i(u,f);function y(){this.constructor=u}u.prototype=f===null?Object.create(f):(y.prototype=f.prototype,new y)}})(),g=t("./lib/oop"),m=t("./lib/dom"),c=t("./lib/event"),d=t("./lib/event_emitter").EventEmitter,r=32768,o=(function(){function i(u,f){this.element=m.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+f,this.inner=m.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),u.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}return i.prototype.setVisible=function(u){this.element.style.display=u?"":"none",this.isVisible=u,this.coeff=1},i})();g.implement(o.prototype,d);var a=(function(i){h(u,i);function u(f,y){var b=i.call(this,f,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,y.$scrollbarWidth=b.width=m.scrollbarWidth(f.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return u.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var f=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-f)/(this.coeff-f)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(f){this.element.style.height=f+"px"},u.prototype.setScrollHeight=function(f){this.scrollHeight=f,f>r?(this.coeff=r/f,f=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=f+"px"},u.prototype.setScrollTop=function(f){this.scrollTop!=f&&(this.skipEvent=!0,this.scrollTop=f,this.element.scrollTop=f*this.coeff)},u})(o);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var s=(function(i){h(u,i);function u(f,y){var b=i.call(this,f,"-h")||this;return b.scrollLeft=0,b.height=y.$scrollbarWidth,b.inner.style.height=b.element.style.height=(b.height||15)+5+"px",b}return u.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},u.prototype.getHeight=function(){return this.isVisible?this.height:0},u.prototype.setWidth=function(f){this.element.style.width=f+"px"},u.prototype.setInnerWidth=function(f){this.inner.style.width=f+"px"},u.prototype.setScrollWidth=function(f){this.inner.style.width=f+"px"},u.prototype.setScrollLeft=function(f){this.scrollLeft!=f&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=f)},u})(o);n.ScrollBar=a,n.ScrollBarV=a,n.ScrollBarH=s,n.VScrollBar=a,n.HScrollBar=s}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,n,p){var h=this&&this.__extends||(function(){var s=function(i,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,y){f.__proto__=y}||function(f,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(f[b]=y[b])},s(i,u)};return function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(i,u);function f(){this.constructor=i}i.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})(),g=t("./lib/oop"),m=t("./lib/dom"),c=t("./lib/event"),d=t("./lib/event_emitter").EventEmitter;m.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
1367
+ `),p=[],v=0;v<a.length;v++)try{p.push(new RegExp(a[v],r))}catch{return!1}return p},l.prototype.$isMultilineSearch=function(s){return s.re&&/\\r\\n|\\r|\\n/.test(s.re.source)&&s.regExp&&!s.$isMultiLine},l.prototype.$multiLineForward=function(s,r,a,p){for(var v,y=d(s,a),k=a;k<=p;){for(var x=0;x<y&&!(k>p);x++){var w=s.getLine(k++);v=v==null?w:v+`
1368
+ `+w}var S=r.exec(v);if(r.lastIndex=0,S){var M=v.slice(0,S.index).split(`
1369
+ `),L=S[0].split(`
1370
+ `),R=a+M.length-1,$=M[M.length-1].length;return{startRow:R,startCol:$,endRow:R+L.length-1,endCol:L.length==1?$+L[0].length:L[L.length-1].length}}}return null},l.prototype.$multiLineBackward=function(s,r,a,p,v){for(var y,k=d(s,p),x=s.getLine(p).length-a,w=p;w>=v;){for(var S=0;S<k&&w>=v;S++){var M=s.getLine(w--);y=y==null?M:M+`
1371
+ `+y}var L=u(y,r,x);if(L){var R=y.slice(0,L.index).split(`
1372
+ `),$=L[0].split(`
1373
+ `),D=w+R.length,T=R[R.length-1].length;return{startRow:D,startCol:T,endRow:D+$.length-1,endCol:$.length==1?T+$[0].length:$[$.length-1].length}}}return null},l.prototype.$matchIterator=function(s,r){var a=this.$assembleRegExp(r);if(!a)return!1;var p=this.$isMultilineSearch(r),v=this.$multiLineForward,y=this.$multiLineBackward,k=r.backwards==!0,x=r.skipCurrent!=!1,w=a.unicode,S=r.range,M=r.start;M||(M=S?S[k?"end":"start"]:s.selection.getRange()),M.start&&(M=M[x!=k?"end":"start"]);var L=S?S.start.row:0,R=S?S.end.row:s.getLength()-1;if(k)var $=function(E){var C=M.row;if(!T(C,M.column,E)){for(C--;C>=L;C--)if(T(C,Number.MAX_VALUE,E))return;if(r.wrap!=!1){for(C=R,L=M.row;C>=L;C--)if(T(C,Number.MAX_VALUE,E))return}}};else var $=function(E){var C=M.row;if(!T(C,M.column,E)){for(C=C+1;C<=R;C++)if(T(C,0,E))return;if(r.wrap!=!1){for(C=L,R=M.row;C<=R;C++)if(T(C,0,E))return}}};if(r.$isMultiLine)var D=a.length,T=function(C,b,A){var _=k?C-D+1:C;if(!(_<0||_+D>s.getLength())){var O=s.getLine(_),I=O.search(a[0]);if(!(!k&&I<b||I===-1)){for(var N=1;N<D;N++)if(O=s.getLine(_+N),O.search(a[N])==-1)return;var F=O.match(a[D-1])[0].length;if(!(k&&F>b)&&A(_,I,_+D-1,F))return!0}}};else if(k)var T=function(E,C,b){if(p){var A=y(s,a,C,E,L);if(!A)return!1;if(b(A.startRow,A.startCol,A.endRow,A.endCol))return!0}else{var _=s.getLine(E),O=[],I,N=0;for(a.lastIndex=0;I=a.exec(_);){var F=I[0].length;if(N=I.index,!F){if(N>=_.length)break;a.lastIndex=N+=f.skipEmptyMatch(_,N,w)}if(I.index+F>C)break;O.push(I.index,F)}for(var z=O.length-1;z>=0;z-=2){var P=O[z-1],F=O[z];if(b(E,P,E,P+F))return!0}}};else var T=function(E,C,b){if(a.lastIndex=C,p){var A=v(s,a,E,R);if(A){var _=A.endRow<=R?A.endRow-1:R;_>E&&(E=_)}if(!A)return!1;if(b(A.startRow,A.startCol,A.endRow,A.endCol))return!0}else for(var O=s.getLine(E),I,N;N=a.exec(O);){var F=N[0].length;if(I=N.index,b(E,I,E,I+F))return!0;if(!F&&(a.lastIndex=I+=f.skipEmptyMatch(O,I,w),I>=O.length))return!1}};return{forEach:$}},l})();function h(l,s){var r=f.supportsLookbehind();function a(k,x){return x===void 0&&(x=!0),(r&&s.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(k)||s.regExp?r&&s.$supportsUnicodeFlag?x?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(l),v=p[0],y=p[p.length-1];return a(v)+l+a(y,!1)}function u(l,s,r){for(var a=null,p=0;p<=l.length;){s.lastIndex=p;var v=s.exec(l);if(!v)break;var y=v.index+v[0].length;if(y>l.length-r)break;(!a||y>a.index+a[0].length)&&(a=v),p=v.index+1}return a}function d(l,s){var r=5e3,a={row:s,column:0},p=l.doc.positionToIndex(a)+r;return l.doc.indexToPosition(p).row+1}n.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,n,m){"use strict";var f=this&&this.__extends||(function(){var l=function(s,r){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(a[v]=p[v])},l(s,r)};return function(s,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");l(s,r);function a(){this.constructor=s}s.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}})(),g=t("../lib/keys"),c=t("../lib/useragent"),o=g.KEY_MODS,h=(function(){function l(s,r){this.$init(s,r,!1)}return l.prototype.$init=function(s,r,a){this.platform=r||(c.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(s),this.$singleCommand=a},l.prototype.addCommand=function(s){this.commands[s.name]&&this.removeCommand(s),this.commands[s.name]=s,s.bindKey&&this._buildKeyHash(s)},l.prototype.removeCommand=function(s,r){var a=s&&(typeof s=="string"?s:s.name);s=this.commands[a],r||delete this.commands[a];var p=this.commandKeyBinding;for(var v in p){var y=p[v];if(y==s)delete p[v];else if(Array.isArray(y)){var k=y.indexOf(s);k!=-1&&(y.splice(k,1),y.length==1&&(p[v]=y[0]))}}},l.prototype.bindKey=function(s,r,a){if(typeof s=="object"&&s&&(a==null&&(a=s.position),s=s[this.platform]),!!s){if(typeof r=="function")return this.addCommand({exec:r,bindKey:s,name:r.name||s});s.split("|").forEach(function(p){var v="";if(p.indexOf(" ")!=-1){var y=p.split(/\s+/);p=y.pop(),y.forEach(function(w){var S=this.parseKeys(w),M=o[S.hashId]+S.key;v+=(v?" ":"")+M,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var k=this.parseKeys(p),x=o[k.hashId]+k.key;this._addCommandToBinding(v+x,r,a)},this)}},l.prototype._addCommandToBinding=function(s,r,a){var p=this.commandKeyBinding,v;if(!r)delete p[s];else if(!p[s]||this.$singleCommand)p[s]=r;else{Array.isArray(p[s])?(v=p[s].indexOf(r))!=-1&&p[s].splice(v,1):p[s]=[p[s]],typeof a!="number"&&(a=u(r));var y=p[s];for(v=0;v<y.length;v++){var k=y[v];if(u(k)>a)break}y.splice(v,0,r)}},l.prototype.addCommands=function(s){s&&Object.keys(s).forEach(function(r){var a=s[r];if(a){if(typeof a=="string")return this.bindKey(a,r);typeof a=="function"&&(a={exec:a}),typeof a=="object"&&(a.name||(a.name=r),this.addCommand(a))}},this)},l.prototype.removeCommands=function(s){Object.keys(s).forEach(function(r){this.removeCommand(s[r])},this)},l.prototype.bindKeys=function(s){Object.keys(s).forEach(function(r){this.bindKey(r,s[r])},this)},l.prototype._buildKeyHash=function(s){this.bindKey(s.bindKey,s)},l.prototype.parseKeys=function(s){var r=s.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}),a=r.pop(),p=g[a];if(g.FUNCTION_KEYS[p])a=g.FUNCTION_KEYS[p].toLowerCase();else if(r.length){if(r.length==1&&r[0]=="shift")return{key:a.toUpperCase(),hashId:-1}}else return{key:a,hashId:-1};for(var v=0,y=r.length;y--;){var k=g.KEY_MODS[r[y]];if(k==null)return typeof console<"u"&&console.error("invalid modifier "+r[y]+" in "+s),!1;v|=k}return{key:a,hashId:v}},l.prototype.findKeyCommand=function(s,r){var a=o[s]+r;return this.commandKeyBinding[a]},l.prototype.handleKeyboard=function(s,r,a,p){if(!(p<0)){var v=o[r]+a,y=this.commandKeyBinding[v];return s.$keyChain&&(s.$keyChain+=" "+v,y=this.commandKeyBinding[s.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(s.$keyChain=s.$keyChain||v,{command:"null"}):(s.$keyChain&&((!r||r==4)&&a.length==1?s.$keyChain=s.$keyChain.slice(0,-v.length-1):(r==-1||p>0)&&(s.$keyChain="")),{command:y})}},l.prototype.getStatusText=function(s,r){return r.$keyChain||""},l})();function u(l){return typeof l=="object"&&l.bindKey&&l.bindKey.position||(l.isDefault?-100:0)}var d=(function(l){f(s,l);function s(r,a){var p=l.call(this,r,a)||this;return p.$singleCommand=!0,p}return s})(h);d.call=function(l,s,r){h.prototype.$init.call(l,s,r,!0)},h.call=function(l,s,r){h.prototype.$init.call(l,s,r,!1)},n.HashHandler=d,n.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,n,m){"use strict";var f=this&&this.__extends||(function(){var u=function(d,l){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,r){s.__proto__=r}||function(s,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[a]=r[a])},u(d,l)};return function(d,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");u(d,l);function s(){this.constructor=d}d.prototype=l===null?Object.create(l):(s.prototype=l.prototype,new s)}})(),g=t("../lib/oop"),c=t("../keyboard/hash_handler").MultiHashHandler,o=t("../lib/event_emitter").EventEmitter,h=(function(u){f(d,u);function d(l,s){var r=u.call(this,s,l)||this;return r.byName=r.commands,r.setDefaultHandler("exec",function(a){return a.args?a.command.exec(a.editor,a.args,a.event,!1):a.command.exec(a.editor,{},a.event,!0)}),r}return d.prototype.exec=function(l,s,r){if(Array.isArray(l)){for(var a=l.length;a--;)if(this.exec(l[a],s,r))return!0;return!1}typeof l=="string"&&(l=this.commands[l]);var p={editor:s,command:l,args:r};return this.canExecute(l,s)?(p.returnValue=this._emit("exec",p),this._signal("afterExec",p),p.returnValue!==!1):(this._signal("commandUnavailable",p),!1)},d.prototype.canExecute=function(l,s){return typeof l=="string"&&(l=this.commands[l]),!(!l||s&&s.$readOnly&&!l.readOnly||this.$checkCommandState!=!1&&l.isAvailable&&!l.isAvailable(s))},d.prototype.toggleRecording=function(l){if(!this.$inReplay)return l&&l._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(s){this.macro.push([s.command,s.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},d.prototype.replay=function(l){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(l);try{this.$inReplay=!0,this.macro.forEach(function(s){typeof s=="string"?this.exec(s,l):this.exec(s[0],l,s[1])},this)}finally{this.$inReplay=!1}}},d.prototype.trimMacro=function(l){return l.map(function(s){return typeof s[0]!="string"&&(s[0]=s[0].name),s[1]||(s=s[0]),s})},d})(c);g.implement(h.prototype,o),n.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,n,m){"use strict";var f=t("../lib/lang"),g=t("../config"),c=t("../range").Range;function o(u,d){return{win:u,mac:d}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(u){g.loadModule("ace/ext/settings_menu",function(d){d.init(u),u.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(u){g.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(u,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(u){g.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(u,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(u){u.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(u){u.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(u,d){typeof d=="number"&&!isNaN(d)&&u.gotoLine(d),u.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(u){u.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(u){u.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(u){u.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(u){u.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(u){u.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(u){u.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(u){u.session.foldAll(),u.session.unfold(u.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(u){u.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(u){u.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(u){u.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(u){u.selection.isEmpty()?u.selection.selectWord():u.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(u){u.selection.isEmpty()?u.selection.selectWord():u.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(u){g.loadModule("ace/ext/searchbox",function(d){d.Search(u)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(u){u.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(u){u.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(u){u.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(u){u.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(u,d){u.navigateUp(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(u){u.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(u){u.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(u){u.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(u,d){u.navigateDown(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(u){u.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(u){u.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(u){u.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(u){u.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(u){u.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(u,d){u.navigateLeft(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(u){u.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(u){u.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(u){u.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(u){u.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(u){u.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(u,d){u.navigateRight(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(u){u.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(u){u.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(u){u.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(u){u.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(u){u.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(u){u.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(u){u.renderer.scrollBy(0,-2*u.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(u){u.renderer.scrollBy(0,2*u.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(u){u.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(u){u.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(u){u.commands.toggleRecording(u)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(u){u.commands.replay(u)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(u){u.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(u){u.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(u){u.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(u){},readOnly:!0},{name:"cut",description:"Cut",exec:function(u){var d=u.$copyWithEmptySelection&&u.selection.isEmpty()?u.selection.getLineRange():u.selection.getRange();u._emit("cut",d),d.isEmpty()||u.session.remove(d),u.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(u,d){u.$handlePaste(d)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(u){u.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(u){u.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(u){u.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(u){u.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(u){u.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(u){u.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(u){u.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(u){g.loadModule("ace/ext/searchbox",function(d){d.Search(u,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(u){u.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(u){u.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(u){u.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(u){u.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(u){u.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(u){u.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(u){u.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(u){u.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(u){if(u.selection.isEmpty())u.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(u){u.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(u){u.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(u){var d=u.selection.getRange();d.start.column=0,u.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(u){var d=u.selection.getRange();d.end.column=Number.MAX_VALUE,u.session.remove(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(u){u.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(u){u.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(u){u.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(u){u.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(u){u.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(u){u.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(u,d){u.insert(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(u,d){u.insert(f.stringRepeat(d.text||"",d.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(u){u.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(u){u.transposeLetters()},multiSelectAction:function(u){u.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(u){u.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(u){u.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(u){u.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(u){var d=u.selection.getRange();d.start.column=d.end.column=0,d.end.row++,u.selection.setRange(d,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(u){u.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(u){for(var d=u.selection.isBackwards(),l=d?u.selection.getSelectionLead():u.selection.getSelectionAnchor(),s=d?u.selection.getSelectionAnchor():u.selection.getSelectionLead(),r=u.session.doc.getLine(l.row).length,a=u.session.doc.getTextRange(u.selection.getRange()).replace(/\n\s*/," ").length,p=u.session.doc.getLine(l.row),v=l.row+1;v<=s.row+1;v++){var y=f.stringTrimLeft(f.stringTrimRight(u.session.doc.getLine(v)));y.length!==0&&(y=" "+y),p+=y}s.row+1<u.session.doc.getLength()-1&&(p+=u.session.doc.getNewLineCharacter()),u.clearSelection(),u.session.doc.replace(new c(l.row,0,s.row+2,0),p),a>0?(u.selection.moveCursorTo(l.row,l.column),u.selection.selectTo(l.row,l.column+a)):(r=u.session.doc.getLine(l.row).length>r?r+1:r,u.selection.moveCursorTo(l.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(u){var d=u.session.doc.getLength()-1,l=u.session.doc.getLine(d).length,s=u.selection.rangeList.ranges,r=[];s.length<1&&(s=[u.selection.getRange()]);for(var a=0;a<s.length;a++)a==s.length-1&&(s[a].end.row===d&&s[a].end.column===l||r.push(new c(s[a].end.row,s[a].end.column,d,l))),a===0?s[a].start.row===0&&s[a].start.column===0||r.push(new c(0,0,s[a].start.row,s[a].start.column)):r.push(new c(s[a-1].end.row,s[a-1].end.column,s[a].start.row,s[a].start.column));u.exitMultiSelectMode(),u.clearSelection();for(var a=0;a<r.length;a++)u.selection.addRange(r[a],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(u){u.selection.clearSelection(),u.navigateLineEnd(),u.insert(`
1374
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(u){u.selection.clearSelection();var d=u.getCursorPosition();u.selection.moveTo(d.row-1,Number.MAX_VALUE),u.insert(`
1375
+ `),d.row===0&&u.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(u){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),u.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:o("F1","F1"),exec:function(u){u.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:o(null,null),exec:function(u){u.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)n.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(u){u.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(t,n,m){"use strict";var f=t("../lib/keys");n.GutterKeyboardHandler=(function(){function c(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return c.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},c.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},c.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===f.escape&&this.annotationTooltip.hide();return}if(o.target===this.element){if(o.keyCode!=f.enter)return;o.preventDefault();var h=this.editor.getCursorPosition().row;this.editor.isRowVisible(h)||this.editor.scrollToLine(h,!0,!0),setTimeout(function(){var u=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),d=this.$findNearestFoldLaneWidget(u),l=this.$findNearestAnnotation(u);if(!(d===null&&l===null))if(this.$findClosestNumber(d,l,u)===d)if(this.activeLane="fold",this.activeRowIndex=d,this.$isCustomWidgetVisible(d)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=l,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}.bind(this),10);return}this.$handleGutterKeyboardInteraction(o),setTimeout(function(){this.editor._signal("gutterkeydown",new g(o,this))}.bind(this),10)},c.prototype.$handleGutterKeyboardInteraction=function(o){if(o.keyCode===f.tab){o.preventDefault();return}if(o.keyCode===f.escape){o.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(o.keyCode===f.up){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(o.keyCode===f.down){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(o.keyCode===f.left){o.preventDefault(),this.$switchLane("annotation");return}if(o.keyCode===f.right){o.preventDefault(),this.$switchLane("fold");return}if(o.keyCode===f.enter||o.keyCode===f.space){switch(o.preventDefault(),this.activeLane){case"fold":var h=this.$rowIndexToRow(this.activeRowIndex),u=this.editor.session.$gutterCustomWidgets[h];if(u)u.callbacks&&u.callbacks.onClick&&u.callbacks.onClick(o,h);else if(this.gutterLayer.session.foldWidgets[h]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),o),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==h&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(h),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},c.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},c.prototype.$isFoldWidgetVisible=function(o){var h=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),u=this.$getFoldWidget(o).style.display!=="none";return h&&u},c.prototype.$isCustomWidgetVisible=function(o){var h=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),u=!!this.$getCustomWidget(o);return h&&u},c.prototype.$isAnnotationVisible=function(o){var h=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),u=this.$getAnnotation(o).style.display!=="none";return h&&u},c.prototype.$getFoldWidget=function(o){return this.lines.get(o).element.childNodes[1]},c.prototype.$getCustomWidget=function(o){return this.lines.get(o).element.childNodes[3]},c.prototype.$getAnnotation=function(o){return this.lines.get(o).element.childNodes[2]},c.prototype.$findNearestFoldLaneWidget=function(o){if(this.$isCustomWidgetVisible(o)||this.$isFoldWidgetVisible(o))return o;for(var h=0;o-h>0||o+h<this.lines.getLength()-1;){if(h++,o-h>=0&&this.$isCustomWidgetVisible(o-h))return o-h;if(o+h<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(o+h))return o+h;if(o-h>=0&&this.$isFoldWidgetVisible(o-h))return o-h;if(o+h<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+h))return o+h}return null},c.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var h=0;o-h>0||o+h<this.lines.getLength()-1;){if(h++,o-h>=0&&this.$isAnnotationVisible(o-h))return o-h;if(o+h<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+h))return o+h}return null},c.prototype.$focusFoldWidget=function(o){if(o!=null){var h=this.$getFoldWidget(o);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},c.prototype.$focusCustomWidget=function(o){if(o!=null){var h=this.$getCustomWidget(o);h&&(h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus())}},c.prototype.$focusAnnotation=function(o){if(o!=null){var h=this.$getAnnotation(o);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},c.prototype.$blurFoldWidget=function(o){var h=this.$getFoldWidget(o);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},c.prototype.$blurCustomWidget=function(o){var h=this.$getCustomWidget(o);h&&(h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur())},c.prototype.$blurAnnotation=function(o){var h=this.$getAnnotation(o);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)||this.$isCustomWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$isFoldWidgetVisible(o)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isFoldWidgetVisible(o)||this.$isCustomWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$isFoldWidgetVisible(o)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},c.prototype.$moveAnnotationUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$findClosestNumber=function(o,h,u){return o===null?h:h===null||Math.abs(u-o)<=Math.abs(u-h)?o:h},c.prototype.$switchLane=function(o){switch(o){case"annotation":if(this.activeLane==="annotation")break;var h=this.$findNearestAnnotation(this.activeRowIndex);if(h==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var u=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(u===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$isCustomWidgetVisible(u)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},c.prototype.$rowIndexToRow=function(o){var h=this.lines.get(o);return h?h.row:null},c.prototype.$rowToRowIndex=function(o){for(var h=0;h<this.lines.getLength();h++)if(this.lines.get(h).row==o)return h;return null},c})();var g=(function(){function c(o,h){this.gutterKeyboardHandler=h,this.domEvent=o}return c.prototype.getKey=function(){return f.keyCodeToString(this.domEvent.keyCode)},c.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},c.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},c.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},c})();n.GutterKeyboardEvent=g}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(t,n,m){"use strict";var f=this&&this.__values||function(C){var b=typeof Symbol=="function"&&Symbol.iterator,A=b&&C[b],_=0;if(A)return A.call(C);if(C&&typeof C.length=="number")return{next:function(){return C&&_>=C.length&&(C=void 0),{value:C&&C[_++],done:!C}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/oop"),c=t("./lib/dom"),o=t("./lib/lang"),h=t("./lib/useragent"),u=t("./keyboard/textinput").TextInput,d=t("./mouse/mouse_handler").MouseHandler,l=t("./mouse/fold_handler").FoldHandler,s=t("./keyboard/keybinding").KeyBinding,r=t("./edit_session").EditSession,a=t("./search").Search,p=t("./range").Range,v=t("./lib/event_emitter").EventEmitter,y=t("./commands/command_manager").CommandManager,k=t("./commands/default_commands").commands,x=t("./config"),w=t("./token_iterator").TokenIterator,S=t("./keyboard/gutter_handler").GutterKeyboardHandler,M=t("./config").nls,L=t("./clipboard"),R=t("./lib/keys"),$=t("./lib/event"),D=t("./tooltip").HoverTooltip,T=(function(){function C(b,A,_){this.id="editor"+ ++C.$uid,this.session,this.$toDestroy=[];var O=b.getContainerElement();this.container=O,this.renderer=b,this.commands=new y(h.isMac?"mac":"win",k),typeof document=="object"&&(this.textInput=new u(b.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new d(this),new l(this)),this.keyBinding=new s(this),this.$search=new a().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(I,N){N._$emitInputEvent.schedule(31)}),this.setSession(A||_&&_.session||new r("")),x.resetOptions(this),_&&this.setOptions(_),x._signal("editor",this)}return C.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},C.prototype.startOperation=function(b){this.session.startOperation(b)},C.prototype.endOperation=function(b){this.session.endOperation(b)},C.prototype.onStartOperation=function(b){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,b||(this.previousCommand=null)},C.prototype.onEndOperation=function(b){if(this.curOp&&this.session){if(b&&b.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var A=this.curOp.command,_=A&&A.scrollIntoView;if(_){switch(_){case"center-animate":_="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var O=this.selection.getRange(),I=this.renderer.layerConfig;(O.start.row>=I.lastRow||O.end.row<=I.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}_=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},C.prototype.$historyTracker=function(b){if(this.$mergeUndoDeltas){var A=this.prevOp,_=this.$mergeableCommands,O=A.command&&b.command.name==A.command.name;if(b.command.name=="insertstring"){var I=b.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),O=O&&this.mergeNextCommand&&(!/\s/.test(I)||/\s/.test(A.args)),this.mergeNextCommand=!0}else O=O&&_.indexOf(b.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(O=!1),O?this.session.mergeUndoDeltas=!0:_.indexOf(b.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},C.prototype.setKeyboardHandler=function(b,A){if(b&&typeof b=="string"&&b!="ace"){this.$keybindingId=b;var _=this;x.loadModule(["keybinding",b],function(O){_.$keybindingId==b&&_.keyBinding.setKeyboardHandler(O&&O.handler),A&&A()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(b),A&&A()},C.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},C.prototype.setSession=function(b){if(this.session!=b){this.curOp&&this.endOperation(),this.curOp={};var A=this.session;if(A){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var _=this.session.getSelection();_.off("changeCursor",this.$onCursorChange),_.off("changeSelection",this.$onSelectionChange)}this.session=b,b?(this.$onDocumentChange=this.onDocumentChange.bind(this),b.on("change",this.$onDocumentChange),this.renderer.setSession(b),this.$onChangeMode=this.onChangeMode.bind(this),b.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),b.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),b.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),b.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),b.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),b.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=b.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(b)),this._signal("changeSession",{session:b,oldSession:A}),this.curOp=null,A&&A._signal("changeEditor",{oldEditor:this}),A&&(A.$editor=null),b&&b._signal("changeEditor",{editor:this}),b&&(b.$editor=this),b&&!b.destroyed&&b.bgTokenizer.scheduleStart()}},C.prototype.getSession=function(){return this.session},C.prototype.setValue=function(b,A){return this.session.doc.setValue(b),A?A==1?this.navigateFileEnd():A==-1&&this.navigateFileStart():this.selectAll(),b},C.prototype.getValue=function(){return this.session.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.resize=function(b){this.renderer.onResize(b)},C.prototype.setTheme=function(b,A){this.renderer.setTheme(b,A)},C.prototype.getTheme=function(){return this.renderer.getTheme()},C.prototype.setStyle=function(b,A){this.renderer.setStyle(b,A)},C.prototype.unsetStyle=function(b){this.renderer.unsetStyle(b)},C.prototype.getFontSize=function(){return this.getOption("fontSize")||c.computedStyle(this.container).fontSize},C.prototype.setFontSize=function(b){this.setOption("fontSize",b)},C.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var b=this;this.$highlightPending=!0,setTimeout(function(){b.$highlightPending=!1;var A=b.session;if(!(!A||A.destroyed)){A.$bracketHighlight&&(A.$bracketHighlight.markerIds.forEach(function(W){A.removeMarker(W)}),A.$bracketHighlight=null);var _=b.getCursorPosition(),O=b.getKeyboardHandler(),I=O&&O.$getDirectionForHighlight&&O.$getDirectionForHighlight(b),N=A.getMatchingBracketRanges(_,I);if(!N){var F=new w(A,_.row,_.column).getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var z=A.getMatchingTags(_);z&&(N=[z.openTagName.isEmpty()?z.openTag:z.openTagName,z.closeTagName.isEmpty()?z.closeTag:z.closeTagName])}}if(!N&&A.$mode.getMatching&&(N=A.$mode.getMatching(b.session)),!N){b.getHighlightIndentGuides()&&b.renderer.$textLayer.$highlightIndentGuide();return}var P="ace_bracket";Array.isArray(N)?N.length==1&&(P="ace_error_bracket"):N=[N],N.length==2&&(p.comparePoints(N[0].end,N[1].start)==0?N=[p.fromPoints(N[0].start,N[1].end)]:p.comparePoints(N[0].start,N[1].end)==0&&(N=[p.fromPoints(N[1].start,N[0].end)])),A.$bracketHighlight={ranges:N,markerIds:N.map(function(W){return A.addMarker(W,P,"text")})},b.getHighlightIndentGuides()&&b.renderer.$textLayer.$highlightIndentGuide()}},50)}},C.prototype.focus=function(){this.textInput.focus()},C.prototype.isFocused=function(){return this.textInput.isFocused()},C.prototype.blur=function(){this.textInput.blur()},C.prototype.onFocus=function(b){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",b))},C.prototype.onBlur=function(b){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",b))},C.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},C.prototype.onDocumentChange=function(b){var A=this.session.$useWrapMode,_=b.start.row==b.end.row?b.end.row:1/0;this.renderer.updateLines(b.start.row,_,A),this._signal("change",b),this.$cursorChange()},C.prototype.onTokenizerUpdate=function(b){var A=b.data;this.renderer.updateLines(A.first,A.last)},C.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},C.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},C.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},C.prototype.$updateHighlightActiveLine=function(){var b=this.getSession(),A;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(A=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(A=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(A=!1)),b.$highlightLineMarker&&!A)b.removeMarker(b.$highlightLineMarker.id),b.$highlightLineMarker=null;else if(!b.$highlightLineMarker&&A){var _=new p(A.row,A.column,A.row,1/0);_.id=b.addMarker(_,"ace_active-line","screenLine"),b.$highlightLineMarker=_}else A&&(b.$highlightLineMarker.start.row=A.row,b.$highlightLineMarker.end.row=A.row,b.$highlightLineMarker.start.column=A.column,b._signal("changeBackMarker"))},C.prototype.onSelectionChange=function(b){var A=this.session;if(A.$selectionMarker&&A.removeMarker(A.$selectionMarker),A.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var _=this.selection.getRange(),O=this.getSelectionStyle();A.$selectionMarker=A.addMarker(_,"ace_selection",O)}var I=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(I),this._signal("changeSelection")},C.prototype.$getSelectionHighLightRegexp=function(){var b=this.session,A=this.getSelectionRange();if(!(A.isEmpty()||A.isMultiLine())){var _=A.start.column,O=A.end.column,I=b.getLine(A.start.row),N=I.substring(_,O);if(!(N.length>5e3||!/[\w\d]/.test(N))){var F=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:N}),z=I.substring(_-1,O+1);if(F.test(z))return F}}},C.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},C.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},C.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},C.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},C.prototype.onChangeMode=function(b){this.renderer.updateText(),this._emit("changeMode",b)},C.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},C.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},C.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},C.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},C.prototype.getCopyText=function(){var b=this.getSelectedText(),A=this.session.doc.getNewLineCharacter(),_=!1;if(!b&&this.$copyWithEmptySelection){_=!0;for(var O=this.selection.getAllRanges(),I=0;I<O.length;I++){var N=O[I];I&&O[I-1].start.row==N.start.row||(b+=this.session.getLine(N.start.row)+A)}}var F={text:b};return this._signal("copy",F),L.lineMode=_?F.text:!1,F.text},C.prototype.onCopy=function(){this.commands.exec("copy",this)},C.prototype.onCut=function(){this.commands.exec("cut",this)},C.prototype.onPaste=function(b,A){var _={text:b,event:A};this.commands.exec("paste",this,_)},C.prototype.$handlePaste=function(b){typeof b=="string"&&(b={text:b}),this._signal("paste",b);var A=b.text,_=A===L.lineMode,O=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)_?O.insert({row:this.selection.lead.row,column:0},A):this.insert(A);else if(_)this.selection.rangeList.ranges.forEach(function(W){O.insert({row:W.start.row,column:0},A)});else{var I=A.split(/\r\n|\r|\n/),N=this.selection.rangeList.ranges,F=I.length==2&&(!I[0]||!I[1]);if(I.length!=N.length||F)return this.commands.exec("insertstring",this,A);for(var z=N.length;z--;){var P=N[z];P.isEmpty()||O.remove(P),O.insert(P.start,I[z])}}},C.prototype.execCommand=function(b,A){return this.commands.exec(b,this,A)},C.prototype.insert=function(b,A){var _=this.session,O=_.getMode(),I=this.getCursorPosition();if(this.getBehavioursEnabled()&&!A){var N=O.transformAction(_.getState(I.row),"insertion",this,_,b);N&&(b!==N.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),b=N.text)}if(b==" "&&(b=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&b.indexOf(`
1376
+ `)==-1){var F=p.fromPoints(I,I);F.end.column+=b.length,this.session.remove(F)}}else{var F=this.getSelectionRange();I=this.session.remove(F),this.clearSelection()}if(b==`
1377
+ `||b==`\r
1378
+ `){var B=_.getLine(I.row);if(I.column>B.search(/\S|$/)){var z=B.substr(I.column).search(/\S|$/);_.doc.removeInLine(I.row,I.column,I.column+z)}}this.clearSelection();var P=I.column,W=_.getState(I.row),B=_.getLine(I.row),H=O.checkOutdent(W,B,b);if(_.insert(I,b),N&&N.selection&&(N.selection.length==2?this.selection.setSelectionRange(new p(I.row,P+N.selection[0],I.row,P+N.selection[1])):this.selection.setSelectionRange(new p(I.row+N.selection[0],N.selection[1],I.row+N.selection[2],N.selection[3]))),this.$enableAutoIndent){if(_.getDocument().isNewLine(b)){var U=O.getNextLineIndent(W,B.slice(0,I.column),_.getTabString());_.insert({row:I.row+1,column:0},U)}H&&O.autoOutdent(W,_,I.row)}},C.prototype.autoIndent=function(){for(var b=this.session,A=b.getMode(),_=this.selection.isEmpty()?[new p(0,0,b.doc.getLength()-1,0)]:this.selection.getAllRanges(),O="",I="",N="",F=b.getTabString(),z=0;z<_.length;z++)for(var P=_[z].start.row,W=_[z].end.row,B=P;B<=W;B++){B>0&&(O=b.getState(B-1),I=b.getLine(B-1),N=A.getNextLineIndent(O,I,F));var H=b.getLine(B),U=A.$getIndent(H);if(N!==U){if(U.length>0){var G=new p(B,0,B,U.length);b.remove(G)}N.length>0&&b.insert({row:B,column:0},N)}A.autoOutdent(O,b,B)}},C.prototype.onTextInput=function(b,A){if(!A)return this.keyBinding.onTextInput(b);this.startOperation({command:{name:"insertstring"}});var _=this.applyComposition.bind(this,b,A);this.selection.rangeCount?this.forEachSelection(_):_(),this.endOperation()},C.prototype.applyComposition=function(b,A){if(A.extendLeft||A.extendRight){var _=this.selection.getRange();_.start.column-=A.extendLeft,_.end.column+=A.extendRight,_.start.column<0&&(_.start.row--,_.start.column+=this.session.getLine(_.start.row).length+1),this.selection.setRange(_),!b&&!_.isEmpty()&&this.remove()}if((b||!this.selection.isEmpty())&&this.insert(b,!0),A.restoreStart||A.restoreEnd){var _=this.selection.getRange();_.start.column-=A.restoreStart,_.end.column-=A.restoreEnd,this.selection.setRange(_)}},C.prototype.onCommandKey=function(b,A,_){return this.keyBinding.onCommandKey(b,A,_)},C.prototype.setOverwrite=function(b){this.session.setOverwrite(b)},C.prototype.getOverwrite=function(){return this.session.getOverwrite()},C.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},C.prototype.setScrollSpeed=function(b){this.setOption("scrollSpeed",b)},C.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},C.prototype.setDragDelay=function(b){this.setOption("dragDelay",b)},C.prototype.getDragDelay=function(){return this.getOption("dragDelay")},C.prototype.setSelectionStyle=function(b){this.setOption("selectionStyle",b)},C.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},C.prototype.setHighlightActiveLine=function(b){this.setOption("highlightActiveLine",b)},C.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},C.prototype.setHighlightGutterLine=function(b){this.setOption("highlightGutterLine",b)},C.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},C.prototype.setHighlightSelectedWord=function(b){this.setOption("highlightSelectedWord",b)},C.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},C.prototype.setAnimatedScroll=function(b){this.renderer.setAnimatedScroll(b)},C.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},C.prototype.setShowInvisibles=function(b){this.renderer.setShowInvisibles(b)},C.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},C.prototype.setDisplayIndentGuides=function(b){this.renderer.setDisplayIndentGuides(b)},C.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},C.prototype.setHighlightIndentGuides=function(b){this.renderer.setHighlightIndentGuides(b)},C.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},C.prototype.setShowPrintMargin=function(b){this.renderer.setShowPrintMargin(b)},C.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},C.prototype.setPrintMarginColumn=function(b){this.renderer.setPrintMarginColumn(b)},C.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},C.prototype.setReadOnly=function(b){this.setOption("readOnly",b)},C.prototype.getReadOnly=function(){return this.getOption("readOnly")},C.prototype.setBehavioursEnabled=function(b){this.setOption("behavioursEnabled",b)},C.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},C.prototype.setWrapBehavioursEnabled=function(b){this.setOption("wrapBehavioursEnabled",b)},C.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},C.prototype.setShowFoldWidgets=function(b){this.setOption("showFoldWidgets",b)},C.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},C.prototype.setFadeFoldWidgets=function(b){this.setOption("fadeFoldWidgets",b)},C.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},C.prototype.remove=function(b){this.selection.isEmpty()&&(b=="left"?this.selection.selectLeft():this.selection.selectRight());var A=this.getSelectionRange();if(this.getBehavioursEnabled()){var _=this.session,O=_.getState(A.start.row),I=_.getMode().transformAction(O,"deletion",this,_,A);if(A.end.column===0){var N=_.getTextRange(A);if(N[N.length-1]==`
1379
+ `){var F=_.getLine(A.end.row);/^\s+$/.test(F)&&(A.end.column=F.length)}}I&&(A=I)}this.session.remove(A),this.clearSelection()},C.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var b=this.getSelectionRange();b.start.column==b.end.column&&b.start.row==b.end.row&&(b.end.column=0,b.end.row++),this.session.remove(b),this.clearSelection()},C.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var b=this.getCursorPosition();this.insert(`
1380
+ `),this.moveCursorToPosition(b)},C.prototype.setGhostText=function(b,A){this.renderer.setGhostText(b,A)},C.prototype.removeGhostText=function(){this.renderer.removeGhostText()},C.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var b=this.getCursorPosition(),A=b.column;if(A!==0){var _=this.session.getLine(b.row),O,I;A<_.length?(O=_.charAt(A)+_.charAt(A-1),I=new p(b.row,A-1,b.row,A+1)):(O=_.charAt(A-1)+_.charAt(A-2),I=new p(b.row,A-2,b.row,A)),this.session.replace(I,O),this.session.selection.moveToPosition(I.end)}}},C.prototype.toLowerCase=function(){var b=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var A=this.getSelectionRange(),_=this.session.getTextRange(A);this.session.replace(A,_.toLowerCase()),this.selection.setSelectionRange(b)},C.prototype.toUpperCase=function(){var b=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var A=this.getSelectionRange(),_=this.session.getTextRange(A);this.session.replace(A,_.toUpperCase()),this.selection.setSelectionRange(b)},C.prototype.indent=function(){var b=this.session,A=this.getSelectionRange();if(A.start.row<A.end.row){var _=this.$getSelectedRows();b.indentRows(_.first,_.last," ");return}else if(A.start.column<A.end.column){var O=b.getTextRange(A);if(!/^\s+$/.test(O)){var _=this.$getSelectedRows();b.indentRows(_.first,_.last," ");return}}var I=b.getLine(A.start.row),N=A.start,F=b.getTabSize(),z=b.documentToScreenColumn(N.row,N.column);if(this.session.getUseSoftTabs())var P=F-z%F,W=o.stringRepeat(" ",P);else{for(var P=z%F;I[A.start.column-1]==" "&&P;)A.start.column--,P--;this.selection.setSelectionRange(A),W=" "}return this.insert(W)},C.prototype.blockIndent=function(){var b=this.$getSelectedRows();this.session.indentRows(b.first,b.last," ")},C.prototype.blockOutdent=function(){var b=this.session.getSelection();this.session.outdentRows(b.getRange())},C.prototype.sortLines=function(){for(var b=this.$getSelectedRows(),A=this.session,_=[],O=b.first;O<=b.last;O++)_.push(A.getLine(O));_.sort(function(F,z){return F.toLowerCase()<z.toLowerCase()?-1:F.toLowerCase()>z.toLowerCase()?1:0});for(var I=new p(0,0,0,0),O=b.first;O<=b.last;O++){var N=A.getLine(O);I.start.row=O,I.end.row=O,I.end.column=N.length,A.replace(I,_[O-b.first])}},C.prototype.toggleCommentLines=function(){var b=this.session.getState(this.getCursorPosition().row),A=this.$getSelectedRows();this.session.getMode().toggleCommentLines(b,this.session,A.first,A.last)},C.prototype.toggleBlockComment=function(){var b=this.getCursorPosition(),A=this.session.getState(b.row),_=this.getSelectionRange();this.session.getMode().toggleBlockComment(A,this.session,_,b)},C.prototype.getNumberAt=function(b,A){var _=/[\-]?[0-9]+(?:\.[0-9]+)?/g;_.lastIndex=0;for(var O=this.session.getLine(b);_.lastIndex<A;){var I=_.exec(O);if(I.index<=A&&I.index+I[0].length>=A)return{value:I[0],start:I.index,end:I.index+I[0].length}}return null},C.prototype.modifyNumber=function(b){var A=this.selection.getCursor().row,_=this.selection.getCursor().column,O=new p(A,_-1,A,_),I=this.session.getTextRange(O);if(!isNaN(parseFloat(I))&&isFinite(I)){var N=this.getNumberAt(A,_);if(N){var F=N.value.indexOf(".")>=0?N.start+N.value.indexOf(".")+1:N.end,z=N.start+N.value.length-F,P=parseFloat(N.value);P*=Math.pow(10,z),F!==N.end&&_<F?b*=Math.pow(10,N.end-_-1):b*=Math.pow(10,N.end-_),P+=b,P/=Math.pow(10,z);var W=P.toFixed(z),B=new p(A,N.start,A,N.end);this.session.replace(B,W),this.moveCursorTo(A,Math.max(N.start+1,_+W.length-N.value.length))}}else this.toggleWord()},C.prototype.toggleWord=function(){var b=this.selection.getCursor().row,A=this.selection.getCursor().column;this.selection.selectWord();var _=this.getSelectedText(),O=this.selection.getWordRange().start.column,I=_.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),N=A-O-1;N<0&&(N=0);var F=0,z=0,P=this;_.match(/[A-Za-z0-9_]+/)&&I.forEach(function(X,le){z=F+X.length,N>=F&&N<=z&&(_=X,P.selection.clearSelection(),P.moveCursorTo(b,F+O),P.selection.selectTo(b,z+O)),F=z});for(var W=this.$toggleWordPairs,B,H=0;H<W.length;H++)for(var U=W[H],G=0;G<=1;G++){var Y=+!G,q=_.match(new RegExp("^\\s?_?("+o.escapeRegExp(U[G])+")\\s?$","i"));q&&_.match(new RegExp("([_]|^|\\s)("+o.escapeRegExp(q[1])+")($|\\s)","g"))&&(B=_.replace(new RegExp(o.escapeRegExp(U[G]),"i"),function(X){var le=U[Y];return X.toUpperCase()==X?le=le.toUpperCase():X.charAt(0).toUpperCase()==X.charAt(0)&&(le=le.substr(0,0)+U[Y].charAt(0).toUpperCase()+le.substr(1)),le}),this.insert(B),B="")}},C.prototype.findLinkAt=function(b,A){var _,O,I=this.session.getLine(b).split(/((?:https?|ftp):\/\/[\S]+)/),N=A;N<0&&(N=0);var F=0,z=0,P;try{for(var W=f(I),B=W.next();!B.done;B=W.next()){var H=B.value;if(z=F+H.length,N>=F&&N<=z&&H.match(/((?:https?|ftp):\/\/[\S]+)/)){P=H.replace(/[\s:.,'";}\]]+$/,"");break}F=z}}catch(U){_={error:U}}finally{try{B&&!B.done&&(O=W.return)&&O.call(W)}finally{if(_)throw _.error}}return P},C.prototype.openLink=function(){var b=this.selection.getCursor(),A=this.findLinkAt(b.row,b.column);return A&&window.open(A,"_blank"),A!=null},C.prototype.removeLines=function(){var b=this.$getSelectedRows();this.session.removeFullLines(b.first,b.last),this.clearSelection()},C.prototype.duplicateSelection=function(){var b=this.selection,A=this.session,_=b.getRange(),O=b.isBackwards();if(_.isEmpty()){var I=_.start.row;A.duplicateLines(I,I)}else{var N=O?_.start:_.end,F=A.insert(N,A.getTextRange(_));_.start=N,_.end=F,b.setSelectionRange(_,O)}},C.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},C.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},C.prototype.moveText=function(b,A,_){return this.session.moveText(b,A,_)},C.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},C.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},C.prototype.$moveLines=function(b,A){var _,O,I=this.selection;if(!I.inMultiSelectMode||this.inVirtualSelectionMode){var N=I.toOrientedRange();_=this.$getSelectedRows(N),O=this.session.$moveLines(_.first,_.last,A?0:b),A&&b==-1&&(O=0),N.moveBy(O,0),I.fromOrientedRange(N)}else{var F=I.rangeList.ranges;I.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var z=0,P=0,W=F.length,B=0;B<W;B++){var H=B;F[B].moveBy(z,0),_=this.$getSelectedRows(F[B]);for(var U=_.first,G=_.last;++B<W;){P&&F[B].moveBy(P,0);var Y=this.$getSelectedRows(F[B]);if(A&&Y.first!=G)break;if(!A&&Y.first>G+1)break;G=Y.last}for(B--,z=this.session.$moveLines(U,G,A?0:b),A&&b==-1&&(H=B+1);H<=B;)F[H].moveBy(z,0),H++;A||(z=0),P+=z}I.fromOrientedRange(I.ranges[0]),I.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},C.prototype.$getSelectedRows=function(b){return b=(b||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(b.start.row),last:this.session.getRowFoldEnd(b.end.row)}},C.prototype.onCompositionStart=function(b){this.renderer.showComposition(b)},C.prototype.onCompositionUpdate=function(b){this.renderer.setCompositionText(b)},C.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},C.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},C.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},C.prototype.isRowVisible=function(b){return b>=this.getFirstVisibleRow()&&b<=this.getLastVisibleRow()},C.prototype.isRowFullyVisible=function(b){return b>=this.renderer.getFirstFullyVisibleRow()&&b<=this.renderer.getLastFullyVisibleRow()},C.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},C.prototype.$moveByPage=function(b,A){var _=this.renderer,O=this.renderer.layerConfig,I=b*Math.floor(O.height/O.lineHeight);A===!0?this.selection.$moveSelection(function(){this.moveCursorBy(I,0)}):A===!1&&(this.selection.moveCursorBy(I,0),this.selection.clearSelection());var N=_.scrollTop;_.scrollBy(0,I*O.lineHeight),A!=null&&_.scrollCursorIntoView(null,.5),_.animateScrolling(N)},C.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},C.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},C.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},C.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},C.prototype.scrollPageDown=function(){this.$moveByPage(1)},C.prototype.scrollPageUp=function(){this.$moveByPage(-1)},C.prototype.scrollToRow=function(b){this.renderer.scrollToRow(b)},C.prototype.scrollToLine=function(b,A,_,O){this.renderer.scrollToLine(b,A,_,O)},C.prototype.centerSelection=function(){var b=this.getSelectionRange(),A={row:Math.floor(b.start.row+(b.end.row-b.start.row)/2),column:Math.floor(b.start.column+(b.end.column-b.start.column)/2)};this.renderer.alignCursor(A,.5)},C.prototype.getCursorPosition=function(){return this.selection.getCursor()},C.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},C.prototype.getSelectionRange=function(){return this.selection.getRange()},C.prototype.selectAll=function(){this.selection.selectAll()},C.prototype.clearSelection=function(){this.selection.clearSelection()},C.prototype.moveCursorTo=function(b,A){this.selection.moveCursorTo(b,A)},C.prototype.moveCursorToPosition=function(b){this.selection.moveCursorToPosition(b)},C.prototype.jumpToMatching=function(b,A){var _=this.getCursorPosition(),O=new w(this.session,_.row,_.column),I=O.getCurrentToken(),N=0;I&&I.type.indexOf("tag-name")!==-1&&(I=O.stepBackward());var F=I||O.stepForward();if(F){var z,P=!1,W={},B=_.column-F.start,H,U={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(F.value.match(/[{}()\[\]]/g)){for(;B<F.value.length&&!P;B++)if(U[F.value[B]])switch(H=U[F.value[B]]+"."+F.type.replace("rparen","lparen"),isNaN(W[H])&&(W[H]=0),F.value[B]){case"(":case"[":case"{":W[H]++;break;case")":case"]":case"}":W[H]--,W[H]===-1&&(z="bracket",P=!0);break}}else F.type.indexOf("tag-name")!==-1&&(isNaN(W[F.value])&&(W[F.value]=0),I.value==="<"&&N>1?W[F.value]++:I.value==="</"&&W[F.value]--,W[F.value]===-1&&(z="tag",P=!0));P||(I=F,N++,F=O.stepForward(),B=0)}while(F&&!P);if(z){var G,Y;if(z==="bracket")G=this.session.getBracketRange(_),G||(G=new p(O.getCurrentTokenRow(),O.getCurrentTokenColumn()+B-1,O.getCurrentTokenRow(),O.getCurrentTokenColumn()+B-1),Y=G.start,(A||Y.row===_.row&&Math.abs(Y.column-_.column)<2)&&(G=this.session.getBracketRange(Y)));else if(z==="tag"){if(!F||F.type.indexOf("tag-name")===-1)return;if(G=new p(O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2,O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2),G.compare(_.row,_.column)===0){var q=this.session.getMatchingTags(_);q&&(q.openTag.contains(_.row,_.column)?(G=q.closeTag,Y=G.start):(G=q.openTag,q.closeTag.start.row===_.row&&q.closeTag.start.column===_.column?Y=G.end:Y=G.start))}Y=Y||G.start}Y=G&&G.cursor||Y,Y&&(b?G&&A?this.selection.setRange(G):G&&G.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Y.row,Y.column):this.selection.moveTo(Y.row,Y.column))}}},C.prototype.gotoLine=function(b,A,_){this.selection.clearSelection(),this.session.unfold({row:b-1,column:A||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(b-1,A||0),this.isRowFullyVisible(b-1)||this.scrollToLine(b-1,!0,_)},C.prototype.navigateTo=function(b,A){this.selection.moveTo(b,A)},C.prototype.navigateUp=function(b){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var A=this.selection.anchor.getPosition();return this.moveCursorToPosition(A)}this.selection.clearSelection(),this.selection.moveCursorBy(-b||-1,0)},C.prototype.navigateDown=function(b){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var A=this.selection.anchor.getPosition();return this.moveCursorToPosition(A)}this.selection.clearSelection(),this.selection.moveCursorBy(b||1,0)},C.prototype.navigateLeft=function(b){if(this.selection.isEmpty())for(b=b||1;b--;)this.selection.moveCursorLeft();else{var A=this.getSelectionRange().start;this.moveCursorToPosition(A)}this.clearSelection()},C.prototype.navigateRight=function(b){if(this.selection.isEmpty())for(b=b||1;b--;)this.selection.moveCursorRight();else{var A=this.getSelectionRange().end;this.moveCursorToPosition(A)}this.clearSelection()},C.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},C.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},C.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},C.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},C.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},C.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},C.prototype.replace=function(b,A){A&&this.$search.set(A);var _=this.$search.find(this.session),O=0;return _&&(this.$tryReplace(_,b)&&(O=1),this.selection.setSelectionRange(_),this.renderer.scrollSelectionIntoView(_.start,_.end)),O},C.prototype.replaceAll=function(b,A){A&&this.$search.set(A);var _=this.$search.findAll(this.session),O=0;if(!_.length)return O;var I=this.getSelectionRange();this.selection.moveTo(0,0);for(var N=_.length-1;N>=0;--N)this.$tryReplace(_[N],b)&&O++;return this.selection.setSelectionRange(I),O},C.prototype.$tryReplace=function(b,A){var _=this.session.getTextRange(b);return A=this.$search.replace(_,A),A!==null?(b.end=this.session.replace(b,A),b):null},C.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},C.prototype.find=function(b,A,_){A||(A={}),typeof b=="string"||b instanceof RegExp?A.needle=b:typeof b=="object"&&g.mixin(A,b);var O=this.selection.getRange();A.needle==null&&(b=this.session.getTextRange(O)||this.$search.$options.needle,b||(O=this.session.getWordRange(O.start.row,O.start.column),b=this.session.getTextRange(O)),this.$search.set({needle:b})),this.$search.set(A),A.start||this.$search.set({start:O});var I=this.$search.find(this.session);if(A.preventScroll)return I;if(I)return this.revealRange(I,_),I;A.backwards?O.start=O.end:O.end=O.start,this.selection.setRange(O)},C.prototype.findNext=function(b,A){this.find({skipCurrent:!0,backwards:!1},b,A)},C.prototype.findPrevious=function(b,A){this.find(b,{skipCurrent:!0,backwards:!0},A)},C.prototype.revealRange=function(b,A){this.session.unfold(b),this.selection.setSelectionRange(b);var _=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(b.start,b.end,.5),A!==!1&&this.renderer.animateScrolling(_)},C.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(b){b.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},C.prototype.setAutoScrollEditorIntoView=function(b){if(b){var A,_=this,O=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var I=this.$scrollAnchor;I.style.cssText="position:absolute",this.container.insertBefore(I,this.container.firstChild);var N=this.on("changeSelection",function(){O=!0}),F=this.renderer.on("beforeRender",function(){O&&(A=_.renderer.container.getBoundingClientRect())}),z=this.renderer.on("afterRender",function(){if(O&&A&&(_.isFocused()||_.searchBox&&_.searchBox.isFocused())){var P=_.renderer,W=P.$cursorLayer.$pixelPos,B=P.layerConfig,H=W.top-B.offset;W.top>=0&&H+A.top<0?O=!0:W.top<B.height&&W.top+A.top+B.lineHeight>window.innerHeight?O=!1:O=null,O!=null&&(I.style.top=H+"px",I.style.left=W.left+"px",I.style.height=B.lineHeight+"px",I.scrollIntoView(O)),O=A=null}});this.setAutoScrollEditorIntoView=function(P){P||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",N),this.renderer.off("afterRender",z),this.renderer.off("beforeRender",F))}}},C.prototype.$resetCursorStyle=function(){var b=this.$cursorStyle||"ace",A=this.renderer.$cursorLayer;A&&(A.setSmoothBlinking(/smooth/.test(b)),A.isBlinking=!this.$readOnly&&b!="wide",c.setCssClass(A.element,"ace_slim-cursors",/slim/.test(b)))},C.prototype.prompt=function(b,A,_){var O=this;x.loadModule("ace/ext/prompt",function(I){I.prompt(O,b,A,_)})},Object.defineProperty(C.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new D(this.container))},set:function(b){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=b},enumerable:!1,configurable:!0}),C})();T.$uid=0,T.prototype.curOp=null,T.prototype.prevOp={},T.prototype.$mergeableCommands=["backspace","del","insertstring"],T.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],g.implement(T.prototype,v),x.defineOptions(T.prototype,"editor",{selectionStyle:{set:function(C){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:C})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(C){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(C){var b=this;if(this.textInput.setReadOnly(C),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(_){var O=!1;if(_&&_.type=="keydown"){if(_&&_.key&&!_.ctrlKey&&!_.metaKey&&(_.key==" "&&_.preventDefault(),O=_.key.length==1),!O)return}else _&&_.type!=="exec"&&(O=!0);if(O){var I=c.createElement("div");I.textContent=M("editor.tooltip.disable-editing","Editing is disabled"),b.hoverTooltip.isOpen||b.hoverTooltip.showForRange(b,b.getSelectionRange(),I)}else b.hoverTooltip&&b.hoverTooltip.isOpen&&b.hoverTooltip.hide()});var A=this.textInput.getElement();C?($.addListener(A,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):($.removeListener(A,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(C){this.textInput.setCopyWithEmptySelection(C)},initialValue:!1},cursorStyle:{set:function(C){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(C){this.setAutoScrollEditorIntoView(C)}},keyboardHandler:{set:function(C){this.setKeyboardHandler(C)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(C){this.session.setValue(C)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(C){this.setSession(C)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(C){this.renderer.$gutterLayer.setShowLineNumbers(C),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),C&&this.$relativeLineNumbers?E.attach(this):E.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(C){this.$showLineNumbers&&C?E.attach(this):E.detach(this)}},placeholder:{set:function(C){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var b=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(b&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),c.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!b&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),c.addCssClass(this.container,"ace_hasPlaceholder");var A=c.createElement("div");A.className="ace_placeholder",A.textContent=this.$placeholder||"",this.renderer.placeholderNode=A,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!b&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(C){var b={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(O){O.blur(),O.renderer.scroller.focus()},readOnly:!0},A=function(O){if(O.target==this.renderer.scroller&&O.keyCode===R.enter){O.preventDefault();var I=this.getCursorPosition().row;this.isRowVisible(I)||this.scrollToLine(I,!0,!0),this.focus()}},_;C?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",M("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",M("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",A.bind(this)),this.commands.addCommand(b),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",M("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",M("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),_||(_=new S(this)),_.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",A.bind(this)),this.commands.removeCommand(b),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),_&&_.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(C){this.$textInputAriaLabel=C},initialValue:""},enableMobileMenu:{set:function(C){this.$enableMobileMenu=C},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var E={getText:function(C,b){return(Math.abs(C.selection.lead.row-b)||b+1+(b<9?"·":""))+""},getWidth:function(C,b,A){return Math.max(b.toString().length,(A.lastRow+1).toString().length,2)*A.characterWidth},update:function(C,b){b.renderer.$loop.schedule(b.renderer.CHANGE_GUTTER)},attach:function(C){C.renderer.$gutterLayer.$renderer=this,C.on("changeSelection",this.update),this.update(null,C)},detach:function(C){C.renderer.$gutterLayer.$renderer==this&&(C.renderer.$gutterLayer.$renderer=null),C.off("changeSelection",this.update),this.update(null,C)}};n.Editor=T}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,n,m){"use strict";var f=t("../lib/dom");n.Lines=(function(){function g(c,o){this.element=c,this.canvasHeight=o||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return g.prototype.moveContainer=function(c){f.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},g.prototype.pageChanged=function(c,o){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(o.firstRowScreen*o.lineHeight/this.canvasHeight)},g.prototype.computeLineTop=function(c,o,h){var u=o.firstRowScreen*o.lineHeight,d=Math.floor(u/this.canvasHeight);return h.documentToScreenRow(c,0)*o.lineHeight-d*this.canvasHeight},g.prototype.computeLineHeight=function(c,o,h){return o.lineHeight*h.getRowLineCount(c)},g.prototype.getLength=function(){return this.cells.length},g.prototype.get=function(c){return this.cells[c]},g.prototype.shift=function(){this.$cacheCell(this.cells.shift())},g.prototype.pop=function(){this.$cacheCell(this.cells.pop())},g.prototype.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var o=f.createFragment(this.element),h=0;h<c.length;h++)o.appendChild(c[h].element);this.element.appendChild(o)}else this.cells.push(c),this.element.appendChild(c.element)},g.prototype.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var o=f.createFragment(this.element),h=0;h<c.length;h++)o.appendChild(c[h].element);this.element.firstChild?this.element.insertBefore(o,this.element.firstChild):this.element.appendChild(o)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},g.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},g.prototype.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},g.prototype.createCell=function(c,o,h,u){var d=this.cellCache.pop();if(!d){var l=f.createElement("div");u&&u(l),this.element.appendChild(l),d={element:l,text:"",row:c}}return d.row=c,d},g})()}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(t,n,m){"use strict";var f=t("../lib/dom"),g=t("../lib/oop"),c=t("../lib/lang"),o=t("../lib/event_emitter").EventEmitter,h=t("./lines").Lines,u=t("../config").nls,d=(function(){function s(r){this.$showCursorMarker=null,this.element=f.createElement("div"),this.element.className="ace_layer ace_gutter-layer",r.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}return s.prototype.setSession=function(r){this.session&&this.session.off("change",this.$updateAnnotations),this.session=r,r&&r.on("change",this.$updateAnnotations)},s.prototype.addGutterDecoration=function(r,a){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(r,a)},s.prototype.removeGutterDecoration=function(r,a){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(r,a)},s.prototype.setAnnotations=function(r){this.$annotations=[];for(var a=0;a<r.length;a++){var p=r[a],v=p.row,y=this.$annotations[v];y||(y=this.$annotations[v]={text:[],type:[],displayText:[]});var k=p.text,x=p.text,w=p.type;k=k?c.escapeHTML(k):p.html||"",x=x||p.html||"",y.text.indexOf(k)===-1&&(y.text.push(k),y.type.push(w),y.displayText.push(x));var S=p.className;S?y.className=S:w==="error"?y.className=" ace_error":w==="security"&&!/\bace_error\b/.test(y.className)?y.className=" ace_security":w==="warning"&&!/\bace_(error|security)\b/.test(y.className)?y.className=" ace_warning":w==="info"&&!y.className?y.className=" ace_info":w==="hint"&&!y.className&&(y.className=" ace_hint")}},s.prototype.$updateAnnotations=function(r){if(this.$annotations.length){var a=r.start.row,p=r.end.row-a;if(p!==0)if(r.action=="remove")this.$annotations.splice(a,p+1,null);else{var v=new Array(p+1);v.unshift(a,1),this.$annotations.splice.apply(this.$annotations,v)}}},s.prototype.update=function(r){this.config=r;var a=this.session,p=r.firstRow,v=Math.min(r.lastRow+r.gutterOffset,a.getLength()-1);this.oldLastRow=v,this.config=r,this.$lines.moveContainer(r),this.$updateCursorRow();for(var y=a.getNextFoldLine(p),k=y?y.start.row:1/0,x=null,w=-1,S=p;;){if(S>k&&(S=y.end.row+1,y=a.getNextFoldLine(S,y),k=y?y.start.row:1/0),S>v){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}x=this.$lines.get(++w),x?x.row=S:(x=this.$lines.createCell(S,r,this.session,l),this.$lines.push(x)),this.$renderCell(x,r,y,S),S++}this._signal("afterRender"),this.$updateGutterWidth(r),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},s.prototype.$updateGutterWidth=function(r){var a=this.session,p=a.gutterRenderer||this.$renderer,v=a.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||a.$useWrapMode)&&(y=a.getLength()+v-1);var k=p?p.getWidth(a,y,r):y.toString().length*r.characterWidth,x=this.$padding||this.$computePadding();k+=x.left+x.right,k!==this.gutterWidth&&!isNaN(k)&&(this.gutterWidth=k,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",k))},s.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var r=this.session.selection.getCursor();this.$cursorRow!==r.row&&(this.$cursorRow=r.row)}},s.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var r=this.session.selection.cursor.row;if(this.$cursorRow=r,!(this.$cursorCell&&this.$cursorCell.row==r)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var a=this.$lines.cells;this.$cursorCell=null;for(var p=0;p<a.length;p++){var v=a[p];if(v.row>=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(p>0&&y&&y.start.row==a[p-1].row)v=a[p-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},s.prototype.$updateCursorMarker=function(){if(this.session){var r=this.session;this.$highlightElement||(this.$highlightElement=f.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var a=r.selection.cursor,p=this.config,v=this.$lines,y=p.firstRowScreen*p.lineHeight,k=Math.floor(y/v.canvasHeight),x=r.documentToScreenRow(a)*p.lineHeight-k*v.canvasHeight;f.setStyle(this.$highlightElement.style,"height",p.lineHeight+"px"),f.setStyle(this.$highlightElement.style,"top",x+"px")}},s.prototype.scrollLines=function(r){var a=this.config;if(this.config=r,this.$updateCursorRow(),this.$lines.pageChanged(a,r))return this.update(r);this.$lines.moveContainer(r);var p=Math.min(r.lastRow+r.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=p,!a||v<r.firstRow)return this.update(r);if(p<a.firstRow)return this.update(r);if(a.firstRow<r.firstRow)for(var y=this.session.getFoldedRowCount(a.firstRow,r.firstRow-1);y>0;y--)this.$lines.shift();if(v>p)for(var y=this.session.getFoldedRowCount(p+1,v);y>0;y--)this.$lines.pop();r.firstRow<a.firstRow&&this.$lines.unshift(this.$renderLines(r,r.firstRow,a.firstRow-1)),p>v&&this.$lines.push(this.$renderLines(r,v+1,p)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(r)},s.prototype.$renderLines=function(r,a,p){for(var v=[],y=a,k=this.session.getNextFoldLine(y),x=k?k.start.row:1/0;y>x&&(y=k.end.row+1,k=this.session.getNextFoldLine(y,k),x=k?k.start.row:1/0),!(y>p);){var w=this.$lines.createCell(y,r,this.session,l);this.$renderCell(w,r,k,y),v.push(w),y++}return v},s.prototype.$renderCell=function(r,a,p,v){var y=r.element,k=this.session,x=y.childNodes[0],w=y.childNodes[1],S=y.childNodes[2],M=y.childNodes[3],L=S.firstChild,R=k.$firstLineNumber,$=k.$breakpoints,D=k.$decorations,T=k.gutterRenderer||this.$renderer,E=this.$showFoldWidgets&&k.foldWidgets,C=p?p.start.row:Number.MAX_VALUE,b=a.lineHeight+"px",A=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",_=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",O=(T?T.getText(k,v):v+R).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||p&&v<this.$cursorRow&&v>=C&&this.$cursorRow<=p.end.row)&&(A+="ace_gutter-active-line ",this.$cursorCell!=r&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=r)),$[v]&&(A+=$[v]),D[v]&&(A+=D[v]),this.$annotations[v]&&v!==C&&(A+=this.$annotations[v].className),E){var I=E[v];I==null&&(I=E[v]=k.getFoldWidget(v))}if(I){var N="ace_fold-widget ace_"+I,F=I=="start"&&v==C&&v<p.end.row;if(F){N+=" ace_closed";for(var z="",P=!1,W=v+1;W<=p.end.row;W++)if(this.$annotations[W]){if(this.$annotations[W].className===" ace_error"){P=!0,z=" ace_error_fold";break}this.$annotations[W].className===" ace_security"?(P=!0,z=" ace_security_fold"):this.$annotations[W].className===" ace_warning"&&z!==" ace_security_fold"&&(P=!0,z=" ace_warning_fold")}A+=z}else N+=" ace_open";w.className!=N&&(w.className=N),f.setStyle(w.style,"height",b),f.setStyle(w.style,"display","inline-block"),w.setAttribute("role","button"),w.setAttribute("tabindex","-1");var B=k.getFoldWidgetRange(v);B?w.setAttribute("aria-label",u("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[B.start.row+1,B.end.row+1])):p?w.setAttribute("aria-label",u("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[p.start.row+1,p.end.row+1])):w.setAttribute("aria-label",u("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[v+1])),F?(w.setAttribute("aria-expanded","false"),w.setAttribute("title",u("gutter.code-folding.closed.title","Unfold code"))):(w.setAttribute("aria-expanded","true"),w.setAttribute("title",u("gutter.code-folding.open.title","Fold code")))}else w&&(f.setStyle(w.style,"display","none"),w.setAttribute("tabindex","0"),w.removeAttribute("role"),w.removeAttribute("aria-label"));var H=this.session.$gutterCustomWidgets[v];if(H?this.$addCustomWidget(v,H,r):M&&this.$removeCustomWidget(v,r),P&&this.$showFoldedAnnotations){S.className="ace_gutter_annotation",L.className=_,L.className+=z,f.setStyle(L.style,"height",b),f.setStyle(S.style,"display","block"),f.setStyle(S.style,"height",b);var U;switch(z){case" ace_error_fold":U=u("gutter.annotation.aria-label.error","Error, read annotations row $0",[O]);break;case" ace_security_fold":U=u("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[O]);break;case" ace_warning_fold":U=u("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[O]);break}S.setAttribute("aria-label",U),S.setAttribute("tabindex","-1"),S.setAttribute("role","button")}else if(this.$annotations[v]){S.className="ace_gutter_annotation",L.className=_,this.$useSvgGutterIcons?L.className+=this.$annotations[v].className:y.classList.add(this.$annotations[v].className.replace(" ","")),f.setStyle(L.style,"height",b),f.setStyle(S.style,"display","block"),f.setStyle(S.style,"height",b);var U;switch(this.$annotations[v].className){case" ace_error":U=u("gutter.annotation.aria-label.error","Error, read annotations row $0",[O]);break;case" ace_security":U=u("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[O]);break;case" ace_warning":U=u("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[O]);break;case" ace_info":U=u("gutter.annotation.aria-label.info","Info, read annotations row $0",[O]);break;case" ace_hint":U=u("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[O]);break}S.setAttribute("aria-label",U),S.setAttribute("tabindex","-1"),S.setAttribute("role","button")}else f.setStyle(S.style,"display","none"),S.removeAttribute("aria-label"),S.removeAttribute("role"),S.setAttribute("tabindex","0");return O!==x.data&&(x.data=O),y.className!=A&&(y.className=A),f.setStyle(r.element.style,"height",this.$lines.computeLineHeight(v,a,k)+"px"),f.setStyle(r.element.style,"top",this.$lines.computeLineTop(v,a,k)+"px"),r.text=O,S.style.display==="none"&&w.style.display==="none"&&!H?r.element.setAttribute("aria-hidden",!0):r.element.setAttribute("aria-hidden",!1),r},s.prototype.setHighlightGutterLine=function(r){this.$highlightGutterLine=r,!r&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},s.prototype.setShowLineNumbers=function(r){this.$renderer=!r&&{getWidth:function(){return 0},getText:function(){return""}}},s.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},s.prototype.setShowFoldWidgets=function(r){r?f.addCssClass(this.element,"ace_folding-enabled"):f.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=r,this.$padding=null},s.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},s.prototype.$hideFoldWidget=function(r,a){var p=a||this.$getGutterCell(r);if(p&&p.element){var v=p.element.childNodes[1];v&&f.setStyle(v.style,"display","none")}},s.prototype.$showFoldWidget=function(r,a){var p=a||this.$getGutterCell(r);if(p&&p.element){var v=p.element.childNodes[1];v&&this.session.foldWidgets&&this.session.foldWidgets[p.row]&&f.setStyle(v.style,"display","inline-block")}},s.prototype.$getGutterCell=function(r){var a=this.$lines.cells,p=0,v=a.length-1;if(!(r<a[0].row||r>a[v].row)){for(;p<=v;){var y=Math.floor((p+v)/2),k=a[y];if(k.row>r)v=y-1;else if(k.row<r)p=y+1;else return k}return k}},s.prototype.$addCustomWidget=function(r,a,p){var v=a.className,y=a.label,k=a.title,x=a.callbacks;this.session.$gutterCustomWidgets[r]={className:v,label:y,title:k,callbacks:x},this.$hideFoldWidget(r,p);var w=p||this.$getGutterCell(r);if(w&&w.element){var S=w.element.querySelector(".ace_custom-widget");S&&S.remove(),S=f.createElement("span"),S.className="ace_custom-widget ".concat(v),S.setAttribute("tabindex","-1"),S.setAttribute("role","button"),S.setAttribute("aria-label",y),S.setAttribute("title",k),f.setStyle(S.style,"display","inline-block"),f.setStyle(S.style,"height","inherit"),x&&x.onClick&&S.addEventListener("click",function(M){x.onClick(M,r),M.stopPropagation()}),w.element.appendChild(S)}},s.prototype.$removeCustomWidget=function(r,a){delete this.session.$gutterCustomWidgets[r],this.$showFoldWidget(r,a);var p=a||this.$getGutterCell(r);if(p&&p.element){var v=p.element.querySelector(".ace_custom-widget");v&&p.element.removeChild(v)}},s.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var r=f.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(r.borderLeftWidth)||0)+(parseInt(r.paddingLeft)||0)+1,this.$padding.right=(parseInt(r.borderRightWidth)||0)+(parseInt(r.paddingRight)||0),this.$padding},s.prototype.getRegion=function(r){var a=this.$padding||this.$computePadding(),p=this.element.getBoundingClientRect();if(r.x<a.left+p.left)return"markers";if(this.$showFoldWidgets&&r.x>p.right-a.right)return"foldWidgets"},s})();d.prototype.$fixedWidth=!1,d.prototype.$highlightGutterLine=!0,d.prototype.$renderer=void 0,d.prototype.$showLineNumbers=!0,d.prototype.$showFoldWidgets=!0,g.implement(d.prototype,o);function l(s){var r=document.createTextNode("");s.appendChild(r);var a=f.createElement("span");s.appendChild(a);var p=f.createElement("span");s.appendChild(p);var v=f.createElement("span");return p.appendChild(v),s}n.Gutter=d}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,n,m){"use strict";var f=t("../range").Range,g=t("../lib/dom"),c=(function(){function h(u){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",u.appendChild(this.element)}return h.prototype.setPadding=function(u){this.$padding=u},h.prototype.setSession=function(u){this.session=u},h.prototype.setMarkers=function(u){this.markers=u},h.prototype.elt=function(u,d){var l=this.i!=-1&&this.element.childNodes[this.i];l?this.i++:(l=document.createElement("div"),this.element.appendChild(l),this.i=-1),l.style.cssText=d,l.className=u},h.prototype.update=function(u){if(u){this.config=u,this.i=0;var d;for(var l in this.markers){var s=this.markers[l];if(!s.range){s.update(d,this,this.session,u);continue}var r=s.range.clipRows(u.firstRow,u.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),s.renderer){var a=this.$getTop(r.start.row,u),p=this.$padding+r.start.column*u.characterWidth;s.renderer(d,r,p,a,u)}else s.type=="fullLine"?this.drawFullLineMarker(d,r,s.clazz,u):s.type=="screenLine"?this.drawScreenLineMarker(d,r,s.clazz,u):r.isMultiLine()?s.type=="text"?this.drawTextMarker(d,r,s.clazz,u):this.drawMultiLineMarker(d,r,s.clazz,u):this.drawSingleLineMarker(d,r,s.clazz+" ace_start ace_br15",u)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(u,d){return(u-d.firstRowScreen)*d.lineHeight},h.prototype.drawTextMarker=function(u,d,l,s,r){for(var a=this.session,p=d.start.row,v=d.end.row,y=p,k=0,x=0,w=a.getScreenLastRowColumn(y),S=new f(y,d.start.column,y,x);y<=v;y++)S.start.row=S.end.row=y,S.start.column=y==p?d.start.column:a.getRowWrapIndent(y),S.end.column=w,k=x,x=w,w=y+1<v?a.getScreenLastRowColumn(y+1):y==v?0:d.end.column,this.drawSingleLineMarker(u,S,l+(y==p?" ace_start":"")+" ace_br"+o(y==p||y==p+1&&d.start.column,k<x,x>w,y==v),s,y==v?0:1,r)},h.prototype.drawMultiLineMarker=function(u,d,l,s,r){var a=this.$padding,p=s.lineHeight,v=this.$getTop(d.start.row,s),y=a+d.start.column*s.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(d.start.row)){var k=d.clone();k.end.row=k.start.row,k.end.column=this.session.getLine(k.start.row).length,this.drawBidiSingleLineMarker(u,k,l+" ace_br1 ace_start",s,null,r)}else this.elt(l+" ace_br1 ace_start","height:"+p+"px;right:"+a+"px;top:"+v+"px;left:"+y+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(d.end.row)){var k=d.clone();k.start.row=k.end.row,k.start.column=0,this.drawBidiSingleLineMarker(u,k,l+" ace_br12",s,null,r)}else{v=this.$getTop(d.end.row,s);var x=d.end.column*s.characterWidth;this.elt(l+" ace_br12","height:"+p+"px;width:"+x+"px;top:"+v+"px;left:"+a+"px;"+(r||""))}if(p=(d.end.row-d.start.row-1)*s.lineHeight,!(p<=0)){v=this.$getTop(d.start.row+1,s);var w=(d.start.column?1:0)|(d.end.column?0:8);this.elt(l+(w?" ace_br"+w:""),"height:"+p+"px;right:"+a+"px;top:"+v+"px;left:"+a+"px;"+(r||""))}},h.prototype.drawSingleLineMarker=function(u,d,l,s,r,a){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(u,d,l,s,r,a);var p=s.lineHeight,v=(d.end.column+(r||0)-d.start.column)*s.characterWidth,y=this.$getTop(d.start.row,s),k=this.$padding+d.start.column*s.characterWidth;this.elt(l,"height:"+p+"px;width:"+v+"px;top:"+y+"px;left:"+k+"px;"+(a||""))},h.prototype.drawBidiSingleLineMarker=function(u,d,l,s,r,a){var p=s.lineHeight,v=this.$getTop(d.start.row,s),y=this.$padding;this.session.$bidiHandler.getSelections(d.start.column,d.end.column).forEach(function(k){this.elt(l,"height:"+p+"px;width:"+(k.width+(r||0))+"px;top:"+v+"px;left:"+(y+k.left)+"px;"+(a||""))},this)},h.prototype.drawFullLineMarker=function(u,d,l,s,r){var a=this.$getTop(d.start.row,s),p=s.lineHeight;d.start.row!=d.end.row&&(p+=this.$getTop(d.end.row,s)-a),this.elt(l,"height:"+p+"px;top:"+a+"px;left:0;right:0;"+(r||""))},h.prototype.drawScreenLineMarker=function(u,d,l,s,r){var a=this.$getTop(d.start.row,s),p=s.lineHeight;this.elt(l,"height:"+p+"px;top:"+a+"px;left:0;right:0;"+(r||""))},h})();c.prototype.$padding=0;function o(h,u,d,l){return(h?1:0)|(u?2:0)|(d?4:0)|(l?8:0)}n.Marker=c}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,n,m){var f=new Set(["text","rparen","lparen"]);n.isTextToken=function(g){return f.has(g)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,n,m){"use strict";var f=t("../lib/oop"),g=t("../lib/dom"),c=t("../lib/lang"),o=t("./lines").Lines,h=t("../lib/event_emitter").EventEmitter,u=t("../config").nls,d=t("./text_util").isTextToken,l=(function(){function s(r){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",r.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return s.prototype.$updateEolChar=function(){var r=this.session.doc,a=r.getNewLineCharacter()==`
1381
+ `&&r.getNewLineMode()!="windows"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},s.prototype.setPadding=function(r){this.$padding=r,this.element.style.margin="0 "+r+"px"},s.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},s.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},s.prototype.$setFontMetrics=function(r){this.$fontMetrics=r,this.$fontMetrics.on("changeCharacterSize",function(a){this._signal("changeCharacterSize",a)}.bind(this)),this.$pollSizeChanges()},s.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},s.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},s.prototype.setSession=function(r){this.session=r,r&&this.$computeTabString()},s.prototype.setShowInvisibles=function(r){return this.showInvisibles==r?!1:(this.showInvisibles=r,typeof r=="string"?(this.showSpaces=/tab/i.test(r),this.showTabs=/space/i.test(r),this.showEOL=/eol/i.test(r)):this.showSpaces=this.showTabs=this.showEOL=r,this.$computeTabString(),!0)},s.prototype.setDisplayIndentGuides=function(r){return this.displayIndentGuides==r?!1:(this.displayIndentGuides=r,this.$computeTabString(),!0)},s.prototype.setHighlightIndentGuides=function(r){return this.$highlightIndentGuides===r?!1:(this.$highlightIndentGuides=r,r)},s.prototype.$computeTabString=function(){var r=this.session.getTabSize();this.tabSize=r;for(var a=this.$tabStrings=[0],p=1;p<r+1;p++)if(this.showTabs){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_tab",v.textContent=c.stringRepeat(this.TAB_CHAR,p),a.push(v)}else a.push(this.dom.createTextNode(c.stringRepeat(" ",p),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var y="ace_indent-guide",k=this.showSpaces?" ace_invisible ace_invisible_space":"",x=this.showSpaces?c.stringRepeat(this.SPACE_CHAR,this.tabSize):c.stringRepeat(" ",this.tabSize),w=this.showTabs?" ace_invisible ace_invisible_tab":"",S=this.showTabs?c.stringRepeat(this.TAB_CHAR,this.tabSize):x,v=this.dom.createElement("span");v.className=y+k,v.textContent=x,this.$tabStrings[" "]=v;var v=this.dom.createElement("span");v.className=y+w,v.textContent=S,this.$tabStrings[" "]=v}},s.prototype.updateLines=function(r,a,p){if(this.config.lastRow!=r.lastRow||this.config.firstRow!=r.firstRow)return this.update(r);this.config=r;for(var v=Math.max(a,r.firstRow),y=Math.min(p,r.lastRow),k=this.element.childNodes,x=0,S=r.firstRow;S<v;S++){var M=this.session.getFoldLine(S);if(M)if(M.containsRow(v)){v=M.start.row;break}else S=M.end.row;x++}for(var w=!1,S=v,M=this.session.getNextFoldLine(S),L=M?M.start.row:1/0;S>L&&(S=M.end.row+1,M=this.session.getNextFoldLine(S,M),L=M?M.start.row:1/0),!(S>y);){var R=k[x++];if(R){this.dom.removeChildren(R),this.$renderLine(R,S,S==L?M:!1),w&&(R.style.top=this.$lines.computeLineTop(S,r,this.session)+"px");var $=r.lineHeight*this.session.getRowLength(S)+"px";R.style.height!=$&&(w=!0,R.style.height=$)}S++}if(w)for(;x<this.$lines.cells.length;){var D=this.$lines.cells[x++];D.element.style.top=this.$lines.computeLineTop(D.row,r,this.session)+"px"}},s.prototype.scrollLines=function(r){var a=this.config;if(this.config=r,this.$lines.pageChanged(a,r))return this.update(r);this.$lines.moveContainer(r);var p=r.lastRow,v=a?a.lastRow:-1;if(!a||v<r.firstRow)return this.update(r);if(p<a.firstRow)return this.update(r);if(!a||a.lastRow<r.firstRow)return this.update(r);if(r.lastRow<a.firstRow)return this.update(r);if(a.firstRow<r.firstRow)for(var y=this.session.getFoldedRowCount(a.firstRow,r.firstRow-1);y>0;y--)this.$lines.shift();if(a.lastRow>r.lastRow)for(var y=this.session.getFoldedRowCount(r.lastRow+1,a.lastRow);y>0;y--)this.$lines.pop();r.firstRow<a.firstRow&&this.$lines.unshift(this.$renderLinesFragment(r,r.firstRow,a.firstRow-1)),r.lastRow>a.lastRow&&this.$lines.push(this.$renderLinesFragment(r,a.lastRow+1,r.lastRow)),this.$highlightIndentGuide()},s.prototype.$renderLinesFragment=function(r,a,p){for(var v=[],y=a,k=this.session.getNextFoldLine(y),x=k?k.start.row:1/0;y>x&&(y=k.end.row+1,k=this.session.getNextFoldLine(y,k),x=k?k.start.row:1/0),!(y>p);){var w=this.$lines.createCell(y,r,this.session),S=w.element;this.dom.removeChildren(S),g.setStyle(S.style,"height",this.$lines.computeLineHeight(y,r,this.session)+"px"),g.setStyle(S.style,"top",this.$lines.computeLineTop(y,r,this.session)+"px"),this.$renderLine(S,y,y==x?k:!1),this.$useLineGroups()?S.className="ace_line_group":S.className="ace_line",v.push(w),y++}return v},s.prototype.update=function(r){this.$lines.moveContainer(r),this.config=r;for(var a=r.firstRow,p=r.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(r,a,p))},s.prototype.$renderToken=function(r,a,p,v){for(var y=this,k=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,x=this.dom.createFragment(this.element),w,S=0;w=k.exec(v);){var M=w[1],L=w[2],R=w[3],$=w[4],D=w[5];if(!(!y.showSpaces&&L)){var T=S!=w.index?v.slice(S,w.index):"";if(S=w.index+w[0].length,T&&x.appendChild(this.dom.createTextNode(T,this.element)),M){var E=y.session.getScreenTabSize(a+w.index),C=y.$tabStrings[E].cloneNode(!0);C.charCount=1,x.appendChild(C),a+=E-1}else if(L)if(y.showSpaces){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_space",b.textContent=c.stringRepeat(y.SPACE_CHAR,L.length),x.appendChild(b)}else x.appendChild(this.dom.createTextNode(L,this.element));else if(R){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_space ace_invalid",b.textContent=c.stringRepeat(y.SPACE_CHAR,R.length),x.appendChild(b)}else if($){a+=1;var b=this.dom.createElement("span");b.style.width=y.config.characterWidth*2+"px",b.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=y.showSpaces?y.SPACE_CHAR:$,x.appendChild(b)}else if(D){a+=1;var b=this.dom.createElement("span");b.style.width=y.config.characterWidth*2+"px",b.className="ace_cjk",b.textContent=D,x.appendChild(b)}}}if(x.appendChild(this.dom.createTextNode(S?v.slice(S):v,this.element)),d(p.type))r.appendChild(x);else{var A="ace_"+p.type.replace(/\./g," ace_"),b=this.dom.createElement("span");p.type=="fold"&&(b.style.width=p.value.length*this.config.characterWidth+"px",b.setAttribute("title",u("inline-fold.closed.title","Unfold code"))),b.className=A,b.appendChild(x),r.appendChild(b)}return a+v.length},s.prototype.renderIndentGuide=function(r,a,p){var v=a.search(this.$indentGuideRe);if(v<=0||v>=p)return a;if(a[0]==" "){v-=v%this.tabSize;for(var y=v/this.tabSize,k=0;k<y;k++)r.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),a.substr(v)}else if(a[0]==" "){for(var k=0;k<v;k++){var x=this.$tabStrings[" "].cloneNode(!0);x.charCount=1,r.appendChild(x)}return this.$highlightIndentGuide(),a.substr(v)}return this.$highlightIndentGuide(),a},s.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var r=this.session.doc.$lines;if(r){var a=this.session.selection.getCursor(),p=/^\s*/.exec(this.session.doc.getLine(a.row))[0].length,v=Math.floor(p/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:v,start:a.row},this.session.$bracketHighlight){for(var y=this.session.$bracketHighlight.ranges,k=0;k<y.length;k++)if(a.row!==y[k].start.row){this.$highlightIndentGuideMarker.end=y[k].start.row+1,a.row>y[k].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&r[a.row]!==""&&a.column===r[a.row].length){this.$highlightIndentGuideMarker.dir=1;for(var k=a.row+1;k<r.length;k++){var x=r[k],w=/^\s*/.exec(x)[0].length;if(x!==""&&(this.$highlightIndentGuideMarker.end=k,w<=p))break}}this.$renderHighlightIndentGuide()}}},s.prototype.$clearActiveIndentGuide=function(){for(var r=this.element.querySelectorAll(".ace_indent-guide-active"),a=0;a<r.length;a++)r[a].classList.remove("ace_indent-guide-active")},s.prototype.$setIndentGuideActive=function(r,a){if(this.session.doc.getLine(r.row)!==""){var p=r.element;if(r.element.classList&&r.element.classList.contains("ace_line_group"))if(r.element.childNodes.length>0)p=r.element.childNodes[0];else return;var v=p.childNodes;if(v){var y=v[a-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.classList.add("ace_indent-guide-active")}}},s.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var r=this.$lines.cells;this.$clearActiveIndentGuide();var a=this.$highlightIndentGuideMarker.indentLevel;if(a!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var p=0;p<r.length;p++){var v=r[p];if(this.$highlightIndentGuideMarker.end&&v.row>=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,a)}}else for(var p=r.length-1;p>=0;p--){var v=r[p];if(this.$highlightIndentGuideMarker.end&&v.row<this.$highlightIndentGuideMarker.start){if(v.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,a)}}}},s.prototype.$createLineElement=function(r){var a=this.dom.createElement("div");return a.className="ace_line",a.style.height=this.config.lineHeight+"px",a},s.prototype.$renderWrappedLine=function(r,a,p){var v=0,y=0,k=p[0],x=0,w=this.$createLineElement();r.appendChild(w);for(var S=0;S<a.length;S++){var M=a[S],L=M.value;if(S==0&&this.displayIndentGuides){if(v=L.length,L=this.renderIndentGuide(w,L,k),!L)continue;v-=L.length}if(v+L.length<k)x=this.$renderToken(w,x,M,L),v+=L.length;else{for(;v+L.length>=k;){x=this.$renderToken(w,x,M,L.substring(0,k-v)),L=L.substring(k-v),v=k,w=this.$createLineElement(),r.appendChild(w);var R=this.dom.createTextNode(c.stringRepeat(" ",p.indent),this.element);R.charCount=0,w.appendChild(R),y++,x=0,k=p[y]||Number.MAX_VALUE}L.length!=0&&(v+=L.length,x=this.$renderToken(w,x,M,L))}}p[p.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(w,x,null,"",!0)},s.prototype.$renderSimpleLine=function(r,a){for(var p=0,v=0;v<a.length;v++){var y=a[v],k=y.value;if(!(v==0&&this.displayIndentGuides&&(k=this.renderIndentGuide(r,k),!k))){if(p+k.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(r,p,y,k);p=this.$renderToken(r,p,y,k)}}},s.prototype.$renderOverflowMessage=function(r,a,p,v,y){p&&this.$renderToken(r,a,p,v.slice(0,this.MAX_LINE_LENGTH-a));var k=this.dom.createElement("span");k.className="ace_inline_button ace_keyword ace_toggle_wrap",k.textContent=y?"<hide>":"<click to see more...>",r.appendChild(k)},s.prototype.$renderLine=function(r,a,p){if(!p&&p!=!1&&(p=this.session.getFoldLine(a)),p)var v=this.$getFoldLineTokens(a,p);else var v=this.session.getTokens(a);var y=r;if(v.length){var k=this.session.getRowSplitData(a);if(k&&k.length){this.$renderWrappedLine(r,v,k);var y=r.lastChild}else{var y=r;this.$useLineGroups()&&(y=this.$createLineElement(),r.appendChild(y)),this.$renderSimpleLine(y,v)}}else this.$useLineGroups()&&(y=this.$createLineElement(),r.appendChild(y));if(this.showEOL&&y){p&&(a=p.end.row);var x=this.dom.createElement("span");x.className="ace_invisible ace_invisible_eol",x.textContent=a==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(x)}},s.prototype.$getFoldLineTokens=function(r,a){var p=this.session,v=[];function y(x,w,S){for(var M=0,L=0;L+x[M].value.length<w;)if(L+=x[M].value.length,M++,M==x.length)return;if(L!=w){var R=x[M].value.substring(w-L);R.length>S-w&&(R=R.substring(0,S-w)),v.push({type:x[M].type,value:R}),L=w+R.length,M+=1}for(;L<S&&M<x.length;){var R=x[M].value;R.length+L>S?v.push({type:x[M].type,value:R.substring(0,S-L)}):v.push(x[M]),L+=R.length,M+=1}}var k=p.getTokens(r);return a.walk(function(x,w,S,M,L){x!=null?v.push({type:"fold",value:x}):(L&&(k=p.getTokens(w)),k.length&&y(k,M,S))},a.end.row,this.session.getLine(a.end.row).length),v},s.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},s})();l.prototype.EOF_CHAR="¶",l.prototype.EOL_CHAR_LF="¬",l.prototype.EOL_CHAR_CRLF="¤",l.prototype.EOL_CHAR=l.prototype.EOL_CHAR_LF,l.prototype.TAB_CHAR="—",l.prototype.SPACE_CHAR="·",l.prototype.$padding=0,l.prototype.MAX_LINE_LENGTH=1e4,l.prototype.showInvisibles=!1,l.prototype.showSpaces=!1,l.prototype.showTabs=!1,l.prototype.showEOL=!1,l.prototype.displayIndentGuides=!0,l.prototype.$highlightIndentGuides=!0,l.prototype.$tabStrings=[],l.prototype.destroy={},l.prototype.onChangeTabSize=l.prototype.$computeTabString,f.implement(l.prototype,h),n.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,n,m){"use strict";var f=t("../lib/dom"),g=(function(){function c(o){this.element=f.createElement("div"),this.element.className="ace_layer ace_cursor-layer",o.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),f.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return c.prototype.$updateOpacity=function(o){for(var h=this.cursors,u=h.length;u--;)f.setStyle(h[u].style,"opacity",o?"":"0")},c.prototype.$startCssAnimation=function(){for(var o=this.cursors,h=o.length;h--;)o[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&f.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},c.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,f.removeCssClass(this.element,"ace_animate-blinking")},c.prototype.setPadding=function(o){this.$padding=o},c.prototype.setSession=function(o){this.session=o},c.prototype.setBlinking=function(o){o!=this.isBlinking&&(this.isBlinking=o,this.restartTimer())},c.prototype.setBlinkInterval=function(o){o!=this.blinkInterval&&(this.blinkInterval=o,this.restartTimer())},c.prototype.setSmoothBlinking=function(o){o!=this.smoothBlinking&&(this.smoothBlinking=o,f.setCssClass(this.element,"ace_smooth-blinking",o),this.$updateCursors(!0),this.restartTimer())},c.prototype.addCursor=function(){var o=f.createElement("div");return o.className="ace_cursor",this.element.appendChild(o),this.cursors.push(o),o},c.prototype.removeCursor=function(){if(this.cursors.length>1){var o=this.cursors.pop();return o.parentNode.removeChild(o),o}},c.prototype.hideCursor=function(){this.isVisible=!1,f.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},c.prototype.showCursor=function(){this.isVisible=!0,f.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},c.prototype.restartTimer=function(){var o=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,f.removeCssClass(this.element,"ace_smooth-blinking")),o(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&f.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),f.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=function(){this.timeoutId=setTimeout(function(){o(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){o(!0),h()},this.blinkInterval),h()}},c.prototype.getPixelPosition=function(o,h){if(!this.config||!this.session)return{left:0,top:0};o||(o=this.session.selection.getCursor());var u=this.session.documentToScreenPosition(o);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(u.row,o.row)?this.session.$bidiHandler.getPosLeft(u.column):u.column*this.config.characterWidth),top:(u.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight}},c.prototype.isCursorInView=function(o,h){return o.top>=0&&o.top<h.maxHeight},c.prototype.update=function(o){this.config=o;var h=this.session.$selectionMarkers,u=0,d=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var u=0,l=h.length;u<l;u++){var s=this.getPixelPosition(h[u].cursor,!0);if(!((s.top>o.height+o.offset||s.top<0)&&u>1)){var r=this.cursors[d++]||this.addCursor(),a=r.style;this.drawCursor?this.drawCursor(r,s,o,h[u],this.session):this.isCursorInView(s,o)?(f.setStyle(a,"display","block"),f.translate(r,s.left,s.top),f.setStyle(a,"width",Math.round(o.characterWidth)+"px"),f.setStyle(a,"height",o.lineHeight+"px")):f.setStyle(a,"display","none")}}for(;this.cursors.length>d;)this.removeCursor();var p=this.session.getOverwrite();this.$setOverwrite(p),this.$pixelPos=s,this.restartTimer()},c.prototype.$setOverwrite=function(o){o!=this.overwrite&&(this.overwrite=o,o?f.addCssClass(this.element,"ace_overwrite-cursors"):f.removeCssClass(this.element,"ace_overwrite-cursors"))},c.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},c})();g.prototype.$padding=0,g.prototype.drawCursor=null,n.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,n,m){"use strict";var f=this&&this.__extends||(function(){var r=function(a,p){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var k in y)Object.prototype.hasOwnProperty.call(y,k)&&(v[k]=y[k])},r(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");r(a,p);function v(){this.constructor=a}a.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}})(),g=t("./lib/oop"),c=t("./lib/dom"),o=t("./lib/event"),h=t("./lib/event_emitter").EventEmitter,u=32768,d=(function(){function r(a,p){this.element=c.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+p,this.element.tabIndex=-1,this.inner=c.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),a.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return r.prototype.setVisible=function(a){this.element.style.display=a?"":"none",this.isVisible=a,this.coeff=1},r})();g.implement(d.prototype,h);var l=(function(r){f(a,r);function a(p,v){var y=r.call(this,p,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=c.scrollbarWidth(p.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return a.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var p=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-p)/(this.coeff-p)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},a.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},a.prototype.setHeight=function(p){this.element.style.height=p+"px"},a.prototype.setScrollHeight=function(p){this.scrollHeight=p,p>u?(this.coeff=u/p,p=u):this.coeff!=1&&(this.coeff=1),this.inner.style.height=p+"px"},a.prototype.setScrollTop=function(p){this.scrollTop!=p&&(this.skipEvent=!0,this.scrollTop=p,this.element.scrollTop=p*this.coeff)},a})(d);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var s=(function(r){f(a,r);function a(p,v){var y=r.call(this,p,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return a.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},a.prototype.getHeight=function(){return this.isVisible?this.height:0},a.prototype.setWidth=function(p){this.element.style.width=p+"px"},a.prototype.setInnerWidth=function(p){this.inner.style.width=p+"px"},a.prototype.setScrollWidth=function(p){this.inner.style.width=p+"px"},a.prototype.setScrollLeft=function(p){this.scrollLeft!=p&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=p)},a})(d);n.ScrollBar=l,n.ScrollBarV=l,n.ScrollBarH=s,n.VScrollBar=l,n.HScrollBar=s}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,n,m){"use strict";var f=this&&this.__extends||(function(){var s=function(r,a){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,v){p.__proto__=v}||function(p,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(p[y]=v[y])},s(r,a)};return function(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");s(r,a);function p(){this.constructor=r}r.prototype=a===null?Object.create(a):(p.prototype=a.prototype,new p)}})(),g=t("./lib/oop"),c=t("./lib/dom"),o=t("./lib/event"),h=t("./lib/event_emitter").EventEmitter;c.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
1372
1382
  position: absolute;
1373
1383
  background: rgba(128, 128, 128, 0.6);
1374
1384
  -moz-box-sizing: border-box;
@@ -1406,7 +1416,7 @@ export const FormManager: React.FC = () => {
1406
1416
  .ace_editor>.ace_sb_grabbed {
1407
1417
  z-index: 8;
1408
1418
  background: #000;
1409
- }`,"ace_scrollbar.css",!1);var r=(function(){function s(i,u){this.element=m.createElement("div"),this.element.className="ace_sb"+u,this.inner=m.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return s.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},s})();g.implement(r.prototype,d);var o=(function(s){h(i,s);function i(u,f){var y=s.call(this,u,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,y.parent=u,y.width=y.VScrollWidth,y.renderer=f,y.inner.style.width=y.element.style.width=(y.width||15)+"px",y.$minWidth=0,y}return i.prototype.onMouseDown=function(u,f){if(u==="mousedown"&&!(c.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var y=this,b=f.clientY,E=function(T){b=T.clientY},$=function(){clearInterval(R)},A=f.clientY,S=this.thumbTop,M=function(){if(b!==void 0){var T=y.scrollTopFromThumbTop(S+b-A);T!==y.scrollTop&&y._emit("scroll",{data:T})}};c.capture(this.inner,E,$);var R=setInterval(M,20);return c.preventDefault(f)}var L=f.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(L)}),c.preventDefault(f)}},i.prototype.getHeight=function(){return this.height},i.prototype.scrollTopFromThumbTop=function(u){var f=u*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return f=f>>0,f<0?f=0:f>this.pageHeight-this.viewHeight&&(f=this.pageHeight-this.viewHeight),f},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(u){this.height=Math.max(0,u),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},i.prototype.setScrollHeight=function(u,f){this.pageHeight===u&&!f||(this.pageHeight=u,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},i.prototype.setScrollTop=function(u){this.scrollTop=u,u<0&&(u=0),this.thumbTop=u*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},i})(r);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var a=(function(s){h(i,s);function i(u,f){var y=s.call(this,u,"-h")||this;return y.scrollLeft=0,y.scrollWidth=0,y.height=y.HScrollHeight,y.inner.style.height=y.element.style.height=(y.height||12)+"px",y.renderer=f,y}return i.prototype.onMouseDown=function(u,f){if(u==="mousedown"&&!(c.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var y=this,b=f.clientX,E=function(T){b=T.clientX},$=function(){clearInterval(R)},A=f.clientX,S=this.thumbLeft,M=function(){if(b!==void 0){var T=y.scrollLeftFromThumbLeft(S+b-A);T!==y.scrollLeft&&y._emit("scroll",{data:T})}};c.capture(this.inner,E,$);var R=setInterval(M,20);return c.preventDefault(f)}var L=f.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(L)}),c.preventDefault(f)}},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(u){var f=u*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return f=f>>0,f<0?f=0:f>this.pageWidth-this.viewWidth&&(f=this.pageWidth-this.viewWidth),f},i.prototype.setWidth=function(u){this.width=Math.max(0,u),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},i.prototype.setScrollWidth=function(u,f){this.pageWidth===u&&!f||(this.pageWidth=u,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},i.prototype.setScrollLeft=function(u){this.scrollLeft=u,u<0&&(u=0),this.thumbLeft=u*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},i})(r);a.prototype.setInnerWidth=a.prototype.setScrollWidth,n.ScrollBar=o,n.ScrollBarV=o,n.ScrollBarH=a,n.VScrollBar=o,n.HScrollBar=a}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,n,p){var h=t("./lib/event"),g=(function(){function m(c,d){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var r=this;this._flush=function(o){r.pending=!1;var a=r.changes;if(a&&(h.blockIdle(100),r.changes=0,r.onRender(a)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return m.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(h.nextFrame(this._flush),this.pending=!0)},m.prototype.clear=function(c){var d=this.changes;return this.changes=0,d},m})();n.RenderLoop=g}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,n,p){var h=t("../lib/oop"),g=t("../lib/dom"),m=t("../lib/lang"),c=t("../lib/event"),d=t("../lib/useragent"),r=t("../lib/event_emitter").EventEmitter,o=512,a=typeof ResizeObserver=="function",s=200,i=(function(){function u(f){this.el=g.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=g.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=g.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),f.appendChild(this.el),this.$measureNode.textContent=m.stringRepeat("X",o),this.$characterSize={width:0,height:0},a?this.$addObserver():this.checkForSizeChanges()}return u.prototype.$setMeasureNodeStyles=function(f,y){f.width=f.height="auto",f.left=f.top="0px",f.visibility="hidden",f.position="absolute",f.whiteSpace="pre",d.isIE<8?f["font-family"]="inherit":f.font="inherit",f.overflow=y?"hidden":"visible"},u.prototype.checkForSizeChanges=function(f){if(f===void 0&&(f=this.$measureSizes()),f&&(this.$characterSize.width!==f.width||this.$characterSize.height!==f.height)){this.$measureNode.style.fontWeight="bold";var y=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=f,this.charSizes=Object.create(null),this.allowBoldFonts=y&&y.width===f.width&&y.height===f.height,this._emit("changeCharacterSize",{data:f})}},u.prototype.$addObserver=function(){var f=this;this.$observer=new window.ResizeObserver(function(y){f.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},u.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var f=this;return this.$pollSizeChangesTimer=c.onIdle(function y(){f.checkForSizeChanges(),c.onIdle(y,500)},500)},u.prototype.setPolling=function(f){f?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},u.prototype.$measureSizes=function(f){var y={height:(f||this.$measureNode).clientHeight,width:(f||this.$measureNode).clientWidth/o};return y.width===0||y.height===0?null:y},u.prototype.$measureCharWidth=function(f){this.$main.textContent=m.stringRepeat(f,o);var y=this.$main.getBoundingClientRect();return y.width/o},u.prototype.getCharacterWidth=function(f){var y=this.charSizes[f];return y===void 0&&(y=this.charSizes[f]=this.$measureCharWidth(f)/this.$characterSize.width),y},u.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},u.prototype.$getZoom=function(f){return!f||!f.parentElement?1:(Number(window.getComputedStyle(f).zoom)||1)*this.$getZoom(f.parentElement)},u.prototype.$initTransformMeasureNodes=function(){var f=function(y,b){return["div",{style:"position: absolute;top:"+y+"px;left:"+b+"px;"}]};this.els=g.buildDom([f(0,0),f(s,0),f(0,s),f(s,s)],this.el)},u.prototype.transformCoordinates=function(f,y){if(f){var b=this.$getZoom(this.el);f=S(1/b,f)}function E(N,P,B){var F=N[1]*P[0]-N[0]*P[1];return[(-P[1]*B[0]+P[0]*B[1])/F,(+N[1]*B[0]-N[0]*B[1])/F]}function $(N,P){return[N[0]-P[0],N[1]-P[1]]}function A(N,P){return[N[0]+P[0],N[1]+P[1]]}function S(N,P){return[N*P[0],N*P[1]]}this.els||this.$initTransformMeasureNodes();function M(N){var P=N.getBoundingClientRect();return[P.left,P.top]}var R=M(this.els[0]),L=M(this.els[1]),T=M(this.els[2]),D=M(this.els[3]),w=E($(D,L),$(D,T),$(A(L,T),A(D,R))),v=S(1+w[0],$(L,R)),C=S(1+w[1],$(T,R));if(y){var x=y,_=w[0]*x[0]/s+w[1]*x[1]/s+1,k=A(S(x[0],v),S(x[1],C));return A(S(1/_/s,k),R)}var O=$(f,R),I=E($(v,S(w[0],O)),$(C,S(w[1],O)),O);return S(s,I)},u})();i.prototype.$characterSize={width:0,height:0},h.implement(i.prototype,r),n.FontMetrics=i}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,n,p){p.exports=`
1419
+ }`,"ace_scrollbar.css",!1);var u=(function(){function s(r,a){this.element=c.createElement("div"),this.element.className="ace_sb"+a,this.inner=c.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return s.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},s})();g.implement(u.prototype,h);var d=(function(s){f(r,s);function r(a,p){var v=s.call(this,a,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=a,v.width=v.VScrollWidth,v.renderer=p,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return r.prototype.onMouseDown=function(a,p){if(a==="mousedown"&&!(o.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var v=this,y=p.clientY,k=function($){y=$.clientY},x=function(){clearInterval(L)},w=p.clientY,S=this.thumbTop,M=function(){if(y!==void 0){var $=v.scrollTopFromThumbTop(S+y-w);$!==v.scrollTop&&v._emit("scroll",{data:$})}};o.capture(this.inner,k,x);var L=setInterval(M,20);return o.preventDefault(p)}var R=p.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(R)}),o.preventDefault(p)}},r.prototype.getHeight=function(){return this.height},r.prototype.scrollTopFromThumbTop=function(a){var p=a*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return p=p>>0,p<0?p=0:p>this.pageHeight-this.viewHeight&&(p=this.pageHeight-this.viewHeight),p},r.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},r.prototype.setHeight=function(a){this.height=Math.max(0,a),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},r.prototype.setScrollHeight=function(a,p){this.pageHeight===a&&!p||(this.pageHeight=a,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},r.prototype.setScrollTop=function(a){this.scrollTop=a,a<0&&(a=0),this.thumbTop=a*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},r})(u);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var l=(function(s){f(r,s);function r(a,p){var v=s.call(this,a,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=p,v}return r.prototype.onMouseDown=function(a,p){if(a==="mousedown"&&!(o.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var v=this,y=p.clientX,k=function($){y=$.clientX},x=function(){clearInterval(L)},w=p.clientX,S=this.thumbLeft,M=function(){if(y!==void 0){var $=v.scrollLeftFromThumbLeft(S+y-w);$!==v.scrollLeft&&v._emit("scroll",{data:$})}};o.capture(this.inner,k,x);var L=setInterval(M,20);return o.preventDefault(p)}var R=p.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(R)}),o.preventDefault(p)}},r.prototype.getHeight=function(){return this.isVisible?this.height:0},r.prototype.scrollLeftFromThumbLeft=function(a){var p=a*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return p=p>>0,p<0?p=0:p>this.pageWidth-this.viewWidth&&(p=this.pageWidth-this.viewWidth),p},r.prototype.setWidth=function(a){this.width=Math.max(0,a),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},r.prototype.setScrollWidth=function(a,p){this.pageWidth===a&&!p||(this.pageWidth=a,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},r.prototype.setScrollLeft=function(a){this.scrollLeft=a,a<0&&(a=0),this.thumbLeft=a*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},r})(u);l.prototype.setInnerWidth=l.prototype.setScrollWidth,n.ScrollBar=d,n.ScrollBarV=d,n.ScrollBarH=l,n.VScrollBar=d,n.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,n,m){"use strict";var f=t("./lib/event");n.RenderLoop=(function(){function g(c,o){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=o||window;var h=this;this._flush=function(u){h.pending=!1;var d=h.changes;if(d&&(f.blockIdle(100),h.changes=0,h.onRender(d)),h.changes){if(h.$recursionLimit--<0)return;h.schedule()}else h.$recursionLimit=2}}return g.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(f.nextFrame(this._flush),this.pending=!0)},g.prototype.clear=function(c){var o=this.changes;return this.changes=0,o},g})()}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,n,m){var f=t("../lib/oop"),g=t("../lib/dom"),c=t("../lib/lang"),o=t("../lib/event"),h=t("../lib/useragent"),u=t("../lib/event_emitter").EventEmitter,d=512,l=typeof ResizeObserver=="function",s=200,r=(function(){function a(p){this.el=g.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=g.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=g.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),p.appendChild(this.el),this.$measureNode.textContent=c.stringRepeat("X",d),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}return a.prototype.$setMeasureNodeStyles=function(p,v){p.width=p.height="auto",p.left=p.top="0px",p.visibility="hidden",p.position="absolute",p.whiteSpace="pre",h.isIE<8?p["font-family"]="inherit":p.font="inherit",p.overflow=v?"hidden":"visible"},a.prototype.checkForSizeChanges=function(p){if(p===void 0&&(p=this.$measureSizes()),p&&(this.$characterSize.width!==p.width||this.$characterSize.height!==p.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=p,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===p.width&&v.height===p.height,this._emit("changeCharacterSize",{data:p})}},a.prototype.$addObserver=function(){var p=this;this.$observer=new window.ResizeObserver(function(v){p.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},a.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var p=this;return this.$pollSizeChangesTimer=o.onIdle(function v(){p.checkForSizeChanges(),o.onIdle(v,500)},500)},a.prototype.setPolling=function(p){p?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},a.prototype.$measureSizes=function(p){var v={height:(p||this.$measureNode).clientHeight,width:(p||this.$measureNode).clientWidth/d};return v.width===0||v.height===0?null:v},a.prototype.$measureCharWidth=function(p){return this.$main.textContent=c.stringRepeat(p,d),this.$main.getBoundingClientRect().width/d},a.prototype.getCharacterWidth=function(p){var v=this.charSizes[p];return v===void 0&&(v=this.charSizes[p]=this.$measureCharWidth(p)/this.$characterSize.width),v},a.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},a.prototype.$getZoom=function(p){return!p||!p.parentElement?1:(Number(window.getComputedStyle(p).zoom)||1)*this.$getZoom(p.parentElement)},a.prototype.$initTransformMeasureNodes=function(){var p=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=g.buildDom([p(0,0),p(s,0),p(0,s),p(s,s)],this.el)},a.prototype.transformCoordinates=function(p,v){p&&(p=w(1/this.$getZoom(this.el),p));function y(O,I,N){var F=O[1]*I[0]-O[0]*I[1];return[(-I[1]*N[0]+I[0]*N[1])/F,(+O[1]*N[0]-O[0]*N[1])/F]}function k(O,I){return[O[0]-I[0],O[1]-I[1]]}function x(O,I){return[O[0]+I[0],O[1]+I[1]]}function w(O,I){return[O*I[0],O*I[1]]}this.els||this.$initTransformMeasureNodes();function S(O){var I=O.getBoundingClientRect();return[I.left,I.top]}var M=S(this.els[0]),L=S(this.els[1]),R=S(this.els[2]),$=S(this.els[3]),D=y(k($,L),k($,R),k(x(L,R),x($,M))),T=w(1+D[0],k(L,M)),E=w(1+D[1],k(R,M));if(v){var C=v,b=D[0]*C[0]/s+D[1]*C[1]/s+1,A=x(w(C[0],T),w(C[1],E));return x(w(1/b/s,A),M)}var _=k(p,M);return w(s,y(k(T,w(D[0],_)),k(E,w(D[1],_)),_))},a})();r.prototype.$characterSize={width:0,height:0},f.implement(r.prototype,u),n.FontMetrics=r}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,n,m){m.exports=`
1410
1420
  .ace_br1 {border-top-left-radius : 3px;}
1411
1421
  .ace_br2 {border-top-right-radius : 3px;}
1412
1422
  .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
@@ -1455,6 +1465,9 @@ export const FormManager: React.FC = () => {
1455
1465
  contain: style size layout;
1456
1466
  font-variant-ligatures: no-common-ligatures;
1457
1467
  }
1468
+ .ace_invisible {
1469
+ font-variant-ligatures: none;
1470
+ }
1458
1471
 
1459
1472
  .ace_keyboard-focus:focus {
1460
1473
  box-shadow: inset 0 0 0 2px #5E9ED6;
@@ -1853,7 +1866,6 @@ export const FormManager: React.FC = () => {
1853
1866
  border-radius: 1px;
1854
1867
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
1855
1868
  color: black;
1856
- max-width: 100%;
1857
1869
  padding: 3px 4px;
1858
1870
  position: fixed;
1859
1871
  z-index: 999999;
@@ -1867,7 +1879,7 @@ export const FormManager: React.FC = () => {
1867
1879
  letter-spacing: normal;
1868
1880
  pointer-events: none;
1869
1881
  overflow: auto;
1870
- max-width: min(60em, 66vw);
1882
+ max-width: min(33em, 66vw);
1871
1883
  overscroll-behavior: contain;
1872
1884
  }
1873
1885
  .ace_tooltip pre {
@@ -1902,7 +1914,7 @@ export const FormManager: React.FC = () => {
1902
1914
  padding-right: 13px;
1903
1915
  }
1904
1916
 
1905
- .ace_fold-widget {
1917
+ .ace_fold-widget, .ace_custom-widget {
1906
1918
  box-sizing: border-box;
1907
1919
 
1908
1920
  margin: 0 -12px 0 1px;
@@ -1918,6 +1930,11 @@ export const FormManager: React.FC = () => {
1918
1930
 
1919
1931
  border: 1px solid transparent;
1920
1932
  cursor: pointer;
1933
+ pointer-events: auto;
1934
+ }
1935
+
1936
+ .ace_custom-widget {
1937
+ background: none;
1921
1938
  }
1922
1939
 
1923
1940
  .ace_folding-enabled .ace_fold-widget {
@@ -2095,9 +2112,9 @@ export const FormManager: React.FC = () => {
2095
2112
 
2096
2113
  .ace_hidden_token {
2097
2114
  display: none;
2098
- }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,n,p){var h=t("../lib/dom"),g=t("../lib/oop"),m=t("../lib/event_emitter").EventEmitter,c=(function(){function d(r,o){this.canvas=h.createElement("canvas"),this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.canvasHeight=r.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=r.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},r.element.appendChild(this.canvas)}return d.prototype.$updateDecorators=function(r){var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(r){this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height;var a=(r.lastRow+1)*this.lineHeight;a<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var s=this.canvas.getContext("2d");function i(D,w){return D.priority<w.priority?-1:D.priority>w.priority?1:0}var u=this.renderer.session.$annotations;if(s.clearRect(0,0,this.canvas.width,this.canvas.height),u){var f={info:1,warning:2,error:3};u.forEach(function(D){D.priority=f[D.type]||null}),u=u.sort(i);for(var y=this.renderer.session.$foldData,b=0;b<u.length;b++){var E=u[b].row,$=this.compensateFoldRows(E,y),A=Math.round((E-$)*this.lineHeight*this.heightRatio),S=Math.round((E-$)*this.lineHeight*this.heightRatio),M=Math.round(((E-$)*this.lineHeight+this.lineHeight)*this.heightRatio),R=M-S;if(R<this.minDecorationHeight){var L=(S+M)/2|0;L<this.halfMinDecorationHeight?L=this.halfMinDecorationHeight:L+this.halfMinDecorationHeight>this.canvasHeight&&(L=this.canvasHeight-this.halfMinDecorationHeight),S=Math.round(L-this.halfMinDecorationHeight),M=Math.round(L+this.halfMinDecorationHeight)}s.fillStyle=o[u[b].type]||null,s.fillRect(0,A,this.canvasWidth,M-S)}}var T=this.renderer.session.selection.getCursor();if(T){var $=this.compensateFoldRows(T.row,y),A=Math.round((T.row-$)*this.lineHeight*this.heightRatio);s.fillStyle="rgba(0, 0, 0, 0.5)",s.fillRect(0,A,this.canvasWidth,2)}},d.prototype.compensateFoldRows=function(r,o){var a=0;if(o&&o.length>0)for(var s=0;s<o.length;s++)r>o[s].start.row&&r<o[s].end.row?a+=r-o[s].start.row:r>=o[s].end.row&&(a+=o[s].end.row-o[s].start.row);return a},d})();g.implement(c.prototype,m),n.Decorator=c}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(t,n,p){var h=t("./lib/oop"),g=t("./lib/dom"),m=t("./lib/lang"),c=t("./config"),d=t("./layer/gutter").Gutter,r=t("./layer/marker").Marker,o=t("./layer/text").Text,a=t("./layer/cursor").Cursor,s=t("./scrollbar").HScrollBar,i=t("./scrollbar").VScrollBar,u=t("./scrollbar_custom").HScrollBar,f=t("./scrollbar_custom").VScrollBar,y=t("./renderloop").RenderLoop,b=t("./layer/font_metrics").FontMetrics,E=t("./lib/event_emitter").EventEmitter,$=t("./css/editor-css"),A=t("./layer/decorators").Decorator,S=t("./lib/useragent"),M=t("./layer/text_util").isTextToken;g.importCssString($,"ace_editor.css",!1);var R=(function(){function L(T,D){var w=this;this.container=T||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(D),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var v=this.$textLayer=new o(this.content);this.canvas=v.element,this.$markerFront=new r(this.content),this.$cursorLayer=new a(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new i(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.on("scroll",function(C){w.$scrollAnimation||w.session.setScrollTop(C.data-w.scrollMargin.top)}),this.scrollBarH.on("scroll",function(C){w.$scrollAnimation||w.session.setScrollLeft(C.data-w.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(C){w.updateCharacterSize(),w.onResize(!0,w.gutterWidth,w.$size.width,w.$size.height),w._signal("changeCharacterSize",C)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!S.isIOS,this.$loop=new y(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),c.resetOptions(this),c._signal("renderer",this)}return L.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},L.prototype.setSession=function(T){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=T,T&&this.scrollMargin.top&&T.getScrollTop()<=0&&T.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(T),this.$markerBack.setSession(T),this.$markerFront.setSession(T),this.$gutterLayer.setSession(T),this.$textLayer.setSession(T),T&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},L.prototype.updateLines=function(T,D,w){if(D===void 0&&(D=1/0),this.$changedLines?(this.$changedLines.firstRow>T&&(this.$changedLines.firstRow=T),this.$changedLines.lastRow<D&&(this.$changedLines.lastRow=D)):this.$changedLines={firstRow:T,lastRow:D},this.$changedLines.lastRow<this.layerConfig.firstRow)if(w)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},L.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},L.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},L.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},L.prototype.updateFull=function(T){T?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},L.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},L.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},L.prototype.onResize=function(T,D,w,v){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=T?1:0;var C=this.container;v||(v=C.clientHeight||C.scrollHeight),!v&&this.$maxLines&&this.lineHeight>1&&(!C.style.height||C.style.height=="0px")&&(C.style.height="1px",v=C.clientHeight||C.scrollHeight),w||(w=C.clientWidth||C.scrollWidth);var x=this.$updateCachedSize(T,D,w,v);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!w&&!v)return this.resizing=0;T&&(this.$gutterLayer.$padding=null),T?this.$renderChanges(x|this.$changes,!0):this.$loop.schedule(x|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},L.prototype.$updateCachedSize=function(T,D,w,v){v-=this.$extraHeight||0;var C=0,x=this.$size,_={width:x.width,height:x.height,scrollerHeight:x.scrollerHeight,scrollerWidth:x.scrollerWidth};if(v&&(T||x.height!=v)&&(x.height=v,C|=this.CHANGE_SIZE,x.scrollerHeight=x.height,this.$horizScroll&&(x.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(x.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",C=C|this.CHANGE_SCROLL),w&&(T||x.width!=w)){C|=this.CHANGE_SIZE,x.width=w,D==null&&(D=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=D,g.setStyle(this.scrollBarH.element.style,"left",D+"px"),g.setStyle(this.scroller.style,"left",D+this.margin.left+"px"),x.scrollerWidth=Math.max(0,w-D-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var k=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",k),g.setStyle(this.scroller.style,"right",k),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(x.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||T)&&(C|=this.CHANGE_FULL)}return x.$dirty=!w||!v,C&&this._signal("resize",_),C},L.prototype.onGutterResize=function(T){var D=this.$showGutter?T:0;D!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,D,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},L.prototype.adjustWrapLimit=function(){var T=this.$size.scrollerWidth-this.$padding*2,D=Math.floor(T/this.characterWidth);return this.session.adjustWrapLimit(D,this.$showPrintMargin&&this.$printMarginColumn)},L.prototype.setAnimatedScroll=function(T){this.setOption("animatedScroll",T)},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function(T){this.setOption("showInvisibles",T),this.session.$bidiHandler.setShowInvisibles(T)},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function(T){this.setOption("displayIndentGuides",T)},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function(T){this.setOption("highlightIndentGuides",T)},L.prototype.setShowPrintMargin=function(T){this.setOption("showPrintMargin",T)},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function(T){this.setOption("printMarginColumn",T)},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function(T){return this.setOption("showGutter",T)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},L.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var T=g.createElement("div");T.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",T.appendChild(this.$printMarginEl),this.content.insertBefore(T,this.content.firstChild)}var D=this.$printMarginEl.style;D.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",D.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},L.prototype.getContainerElement=function(){return this.container},L.prototype.getMouseEventTarget=function(){return this.scroller},L.prototype.getTextAreaContainer=function(){return this.container},L.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var T=this.textarea.style,D=this.$composition;if(!this.$keepTextAreaAtCursor&&!D){g.translate(this.textarea,-100,0);return}var w=this.$cursorLayer.$pixelPos;if(w){D&&D.markerRange&&(w=this.$cursorLayer.getPixelPosition(D.markerRange.start,!0));var v=this.layerConfig,C=w.top,x=w.left;C-=v.offset;var _=D&&D.useTextareaForIME||S.isMobile?this.lineHeight:1;if(C<0||C>v.height-_){g.translate(this.textarea,0,0);return}var k=1,O=this.$size.height-_;if(!D)C+=this.lineHeight;else if(D.useTextareaForIME){var I=this.textarea.value;k=this.characterWidth*this.session.$getStringScreenWidth(I)[0]}else C+=this.lineHeight+2;x-=this.scrollLeft,x>this.$size.scrollerWidth-k&&(x=this.$size.scrollerWidth-k),x+=this.gutterWidth+this.margin.left,g.setStyle(T,"height",_+"px"),g.setStyle(T,"width",k+"px"),g.translate(this.textarea,Math.min(x,this.$size.scrollerWidth-k),Math.min(C,O))}}},L.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},L.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},L.prototype.getLastFullyVisibleRow=function(){var T=this.layerConfig,D=T.lastRow,w=this.session.documentToScreenRow(D,0)*T.lineHeight;return w-this.session.getScrollTop()>T.height-T.lineHeight?D-1:D},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.prototype.setPadding=function(T){this.$padding=T,this.$textLayer.setPadding(T),this.$cursorLayer.setPadding(T),this.$markerFront.setPadding(T),this.$markerBack.setPadding(T),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},L.prototype.setScrollMargin=function(T,D,w,v){var C=this.scrollMargin;C.top=T|0,C.bottom=D|0,C.right=v|0,C.left=w|0,C.v=C.top+C.bottom,C.h=C.left+C.right,C.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-C.top),this.updateFull()},L.prototype.setMargin=function(T,D,w,v){var C=this.margin;C.top=T|0,C.bottom=D|0,C.right=v|0,C.left=w|0,C.v=C.top+C.bottom,C.h=C.left+C.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},L.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},L.prototype.setHScrollBarAlwaysVisible=function(T){this.setOption("hScrollBarAlwaysVisible",T)},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function(T){this.setOption("vScrollBarAlwaysVisible",T)},L.prototype.$updateScrollBarV=function(){var T=this.layerConfig.maxHeight,D=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(T-=(D-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>T-D&&(T=this.scrollTop+D,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(T+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},L.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},L.prototype.freeze=function(){this.$frozen=!0},L.prototype.unfreeze=function(){this.$frozen=!1},L.prototype.$renderChanges=function(T,D){if(this.$changes&&(T|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!T&&!D){this.$changes|=T;return}if(this.$size.$dirty)return this.$changes|=T,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",T),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var w=this.layerConfig;if(T&this.CHANGE_FULL||T&this.CHANGE_SIZE||T&this.CHANGE_TEXT||T&this.CHANGE_LINES||T&this.CHANGE_SCROLL||T&this.CHANGE_H_SCROLL){if(T|=this.$computeLayerConfig()|this.$loop.clear(),w.firstRow!=this.layerConfig.firstRow&&w.firstRowScreen==this.layerConfig.firstRowScreen){var v=this.scrollTop+(w.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;v>0&&(this.scrollTop=v,T=T|this.CHANGE_SCROLL,T|=this.$computeLayerConfig()|this.$loop.clear())}w=this.layerConfig,this.$updateScrollBarV(),T&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-w.offset);var C=w.width+2*this.$padding+"px",x=w.minHeight+"px";g.setStyle(this.content.style,"width",C),g.setStyle(this.content.style,"height",x)}if(T&this.CHANGE_H_SCROLL&&(g.translate(this.content,-this.scrollLeft,-w.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),T&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(w),this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w),this.$markerBack.update(w),this.$markerFront.update(w),this.$cursorLayer.update(w),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}if(T&this.CHANGE_SCROLL){this.$changedLines=null,T&this.CHANGE_TEXT||T&this.CHANGE_LINES?this.$textLayer.update(w):this.$textLayer.scrollLines(w),this.$showGutter&&(T&this.CHANGE_GUTTER||T&this.CHANGE_LINES?this.$gutterLayer.update(w):this.$gutterLayer.scrollLines(w)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w),this.$markerBack.update(w),this.$markerFront.update(w),this.$cursorLayer.update(w),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}T&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(w),this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):T&this.CHANGE_LINES?((this.$updateLines()||T&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):T&this.CHANGE_TEXT||T&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):T&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)),T&this.CHANGE_CURSOR&&(this.$cursorLayer.update(w),this.$moveTextAreaToCursor()),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(w),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(w),this._signal("afterRender",T)},L.prototype.$autosize=function(){var T=this.session.getScreenLength()*this.lineHeight,D=this.$maxLines*this.lineHeight,w=Math.min(D,Math.max((this.$minLines||1)*this.lineHeight,T))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(w+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&w>this.$maxPixelHeight&&(w=this.$maxPixelHeight);var v=w<=2*this.lineHeight,C=!v&&T>D;if(w!=this.desiredHeight||this.$size.height!=this.desiredHeight||C!=this.$vScroll){C!=this.$vScroll&&(this.$vScroll=C,this.scrollBarV.setVisible(C));var x=this.container.clientWidth;this.container.style.height=w+"px",this.$updateCachedSize(!0,this.$gutterWidth,x,w),this.desiredHeight=w,this._signal("autosize")}},L.prototype.$computeLayerConfig=function(){var T=this.session,D=this.$size,w=D.height<=2*this.lineHeight,v=this.session.getScreenLength(),C=v*this.lineHeight,x=this.$getLongestLine(),_=!w&&(this.$hScrollBarAlwaysVisible||D.scrollerWidth-x-2*this.$padding<0),k=this.$horizScroll!==_;k&&(this.$horizScroll=_,this.scrollBarH.setVisible(_));var O=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var I=D.scrollerHeight+this.lineHeight,N=!this.$maxLines&&this.$scrollPastEnd?(D.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;C+=N;var P=this.scrollMargin;this.session.setScrollTop(Math.max(-P.top,Math.min(this.scrollTop,C-D.scrollerHeight+P.bottom))),this.session.setScrollLeft(Math.max(-P.left,Math.min(this.scrollLeft,x+2*this.$padding-D.scrollerWidth+P.right)));var B=!w&&(this.$vScrollBarAlwaysVisible||D.scrollerHeight-C+N<0||this.scrollTop>P.top),F=O!==B;F&&(this.$vScroll=B,this.scrollBarV.setVisible(B));var H=this.scrollTop%this.lineHeight,z=Math.ceil(I/this.lineHeight)-1,W=Math.max(0,Math.round((this.scrollTop-H)/this.lineHeight)),U=W+z,K,Y,G=this.lineHeight;W=T.screenToDocumentRow(W,0);var Q=T.getFoldLine(W);Q&&(W=Q.start.row),K=T.documentToScreenRow(W,0),Y=T.getRowLength(W)*G,U=Math.min(T.screenToDocumentRow(U,0),T.getLength()-1),I=D.scrollerHeight+T.getRowLength(U)*G+Y,H=this.scrollTop-K*G;var ue=0;return(this.layerConfig.width!=x||k)&&(ue=this.CHANGE_H_SCROLL),(k||F)&&(ue|=this.$updateCachedSize(!0,this.gutterWidth,D.width,D.height),this._signal("scrollbarVisibilityChanged"),F&&(x=this.$getLongestLine())),this.layerConfig={width:x,padding:this.$padding,firstRow:W,firstRowScreen:K,lastRow:U,lineHeight:G,characterWidth:this.characterWidth,minHeight:I,maxHeight:C,offset:H,gutterOffset:G?Math.max(0,Math.ceil((H+D.height-D.scrollerHeight)/G)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(x-this.$padding),ue},L.prototype.$updateLines=function(){if(this.$changedLines){var T=this.$changedLines.firstRow,D=this.$changedLines.lastRow;this.$changedLines=null;var w=this.layerConfig;if(!(T>w.lastRow+1)&&!(D<w.firstRow)){if(D===1/0){this.$showGutter&&this.$gutterLayer.update(w),this.$textLayer.update(w);return}return this.$textLayer.updateLines(w,T,D),!0}}},L.prototype.$getLongestLine=function(){var T=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(T+=1),this.$textLayer&&T>this.$textLayer.MAX_LINE_LENGTH&&(T=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(T*this.characterWidth))},L.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},L.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},L.prototype.addGutterDecoration=function(T,D){this.$gutterLayer.addGutterDecoration(T,D)},L.prototype.removeGutterDecoration=function(T,D){this.$gutterLayer.removeGutterDecoration(T,D)},L.prototype.updateBreakpoints=function(T){this._rows=T,this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.setAnnotations=function(T){this.$gutterLayer.setAnnotations(T),this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},L.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},L.prototype.showCursor=function(){this.$cursorLayer.showCursor()},L.prototype.scrollSelectionIntoView=function(T,D,w){this.scrollCursorIntoView(T,w),this.scrollCursorIntoView(D,w)},L.prototype.scrollCursorIntoView=function(T,D,w){if(this.$size.scrollerHeight!==0){var v=this.$cursorLayer.getPixelPosition(T),C=v.left,x=v.top,_=w&&w.top||0,k=w&&w.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var O=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;O+_>x?(D&&O+_>x+this.lineHeight&&(x-=D*this.$size.scrollerHeight),x===0&&(x=-this.scrollMargin.top),this.session.setScrollTop(x)):O+this.$size.scrollerHeight-k<x+this.lineHeight&&(D&&O+this.$size.scrollerHeight-k<x-this.lineHeight&&(x+=D*this.$size.scrollerHeight),this.session.setScrollTop(x+this.lineHeight+k-this.$size.scrollerHeight));var I=this.scrollLeft,N=2*this.layerConfig.characterWidth;C-N<I?(C-=N,C<this.$padding+N&&(C=-this.scrollMargin.left),this.session.setScrollLeft(C)):(C+=N,I+this.$size.scrollerWidth<C+this.characterWidth?this.session.setScrollLeft(Math.round(C+this.characterWidth-this.$size.scrollerWidth)):I<=this.$padding&&C-I<this.characterWidth&&this.session.setScrollLeft(0))}},L.prototype.getScrollTop=function(){return this.session.getScrollTop()},L.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},L.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},L.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},L.prototype.scrollToRow=function(T){this.session.setScrollTop(T*this.lineHeight)},L.prototype.alignCursor=function(T,D){typeof T=="number"&&(T={row:T,column:0});var w=this.$cursorLayer.getPixelPosition(T),v=this.$size.scrollerHeight-this.lineHeight,C=w.top-v*(D||0);return this.session.setScrollTop(C),C},L.prototype.$calcSteps=function(T,D){var w=0,v=this.STEPS,C=[],x=function(_,k,O){return O*(Math.pow(_-1,3)+1)+k};for(w=0;w<v;++w)C.push(x(w/this.STEPS,T,D-T));return C},L.prototype.scrollToLine=function(T,D,w,v){var C=this.$cursorLayer.getPixelPosition({row:T,column:0}),x=C.top;D&&(x-=this.$size.scrollerHeight/2);var _=this.scrollTop;this.session.setScrollTop(x),w!==!1&&this.animateScrolling(_,v)},L.prototype.animateScrolling=function(T,D){var w=this.scrollTop;if(!this.$animatedScroll)return;var v=this;if(T==w)return;if(this.$scrollAnimation){var C=this.$scrollAnimation.steps;if(C.length&&(T=C[0],T==w))return}var x=v.$calcSteps(T,w);this.$scrollAnimation={from:T,to:w,steps:x},clearInterval(this.$timer),v.session.setScrollTop(x.shift()),v.session.$scrollTop=w;function _(){v.$timer=clearInterval(v.$timer),v.$scrollAnimation=null,v.$stopAnimation=!1,D&&D()}this.$timer=setInterval(function(){if(v.$stopAnimation){_();return}if(!v.session)return clearInterval(v.$timer);x.length?(v.session.setScrollTop(x.shift()),v.session.$scrollTop=w):w!=null?(v.session.$scrollTop=-1,v.session.setScrollTop(w),w=null):_()},10)},L.prototype.scrollToY=function(T){this.scrollTop!==T&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=T)},L.prototype.scrollToX=function(T){this.scrollLeft!==T&&(this.scrollLeft=T),this.$loop.schedule(this.CHANGE_H_SCROLL)},L.prototype.scrollTo=function(T,D){this.session.setScrollTop(D),this.session.setScrollLeft(T)},L.prototype.scrollBy=function(T,D){D&&this.session.setScrollTop(this.session.getScrollTop()+D),T&&this.session.setScrollLeft(this.session.getScrollLeft()+T)},L.prototype.isScrollableBy=function(T,D){if(D<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||D>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||T<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||T>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},L.prototype.pixelToScreenCoordinates=function(T,D){var w;if(this.$hasCssTransforms){w={top:0,left:0};var v=this.$fontMetrics.transformCoordinates([T,D]);T=v[1]-this.gutterWidth-this.margin.left,D=v[0]}else w=this.scroller.getBoundingClientRect();var C=T+this.scrollLeft-w.left-this.$padding,x=C/this.characterWidth,_=Math.floor((D+this.scrollTop-w.top)/this.lineHeight),k=this.$blockCursor?Math.floor(x):Math.round(x);return{row:_,column:k,side:x-k>0?1:-1,offsetX:C}},L.prototype.screenToTextCoordinates=function(T,D){var w;if(this.$hasCssTransforms){w={top:0,left:0};var v=this.$fontMetrics.transformCoordinates([T,D]);T=v[1]-this.gutterWidth-this.margin.left,D=v[0]}else w=this.scroller.getBoundingClientRect();var C=T+this.scrollLeft-w.left-this.$padding,x=C/this.characterWidth,_=this.$blockCursor?Math.floor(x):Math.round(x),k=Math.floor((D+this.scrollTop-w.top)/this.lineHeight);return this.session.screenToDocumentPosition(k,Math.max(_,0),C)},L.prototype.textToScreenCoordinates=function(T,D){var w=this.scroller.getBoundingClientRect(),v=this.session.documentToScreenPosition(T,D),C=this.$padding+(this.session.$bidiHandler.isBidiRow(v.row,T)?this.session.$bidiHandler.getPosLeft(v.column):Math.round(v.column*this.characterWidth)),x=v.row*this.lineHeight;return{pageX:w.left+C-this.scrollLeft,pageY:w.top+x-this.scrollTop}},L.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},L.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},L.prototype.showComposition=function(T){this.$composition=T,T.cssText||(T.cssText=this.textarea.style.cssText),T.useTextareaForIME==null&&(T.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):T.markerId=this.session.addMarker(T.markerRange,"ace_composition_marker","text")},L.prototype.setCompositionText=function(T){var D=this.session.selection.cursor;this.addToken(T,"composition_placeholder",D.row,D.column),this.$moveTextAreaToCursor()},L.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var T=this.session.selection.cursor;this.removeExtraToken(T.row,T.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},L.prototype.setGhostText=function(T,D){var w=this.session.selection.cursor,v=D||{row:w.row,column:w.column};this.removeGhostText();var C=this.$calculateWrappedTextChunks(T,v);this.addToken(C[0].text,"ghost_text",v.row,v.column),this.$ghostText={text:T,position:{row:v.row,column:v.column}};var x=g.createElement("div");if(C.length>1){var _=this.hideTokensAfterPosition(v.row,v.column),k;C.slice(1).forEach(function(F){var H=g.createElement("div"),z=g.createElement("span");z.className="ace_ghost_text",F.wrapped&&(H.className="ghost_text_line_wrapped"),F.text.length===0&&(F.text=" "),z.appendChild(g.createTextNode(F.text)),H.appendChild(z),x.appendChild(H),k=H}),_.forEach(function(F){var H=g.createElement("span");M(F.type)||(H.className="ace_"+F.type.replace(/\./g," ace_")),H.appendChild(g.createTextNode(F.value)),k.appendChild(H)}),this.$ghostTextWidget={el:x,row:v.row,column:v.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var O=this.$cursorLayer.getPixelPosition(v,!0),I=this.container,N=I.getBoundingClientRect().height,P=C.length*this.lineHeight,B=P<N-O.top;if(B)return;P<N?this.scrollBy(0,(C.length-1)*this.lineHeight):this.scrollToRow(v.row)}},L.prototype.$calculateWrappedTextChunks=function(T,D){var w=this.$size.scrollerWidth-this.$padding*2,v=Math.floor(w/this.characterWidth)-2;v=v<=0?60:v;for(var C=T.split(/\r?\n/),x=[],_=0;_<C.length;_++){var k=this.session.$getDisplayTokens(C[_],D.column),O=this.session.$computeWrapSplits(k,v,this.session.$tabSize);if(O.length>0){var I=0;O.push(C[_].length);for(var N=0;N<O.length;N++){var P=C[_].slice(I,O[N]);x.push({text:P,wrapped:!0}),I=O[N]}}else x.push({text:C[_],wrapped:!1})}return x},L.prototype.removeGhostText=function(){if(this.$ghostText){var T=this.$ghostText.position;this.removeExtraToken(T.row,T.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},L.prototype.addToken=function(T,D,w,v){var C=this.session;C.bgTokenizer.lines[w]=null;var x={type:D,value:T},_=C.getTokens(w);if(v==null||!_.length)_.push(x);else for(var k=0,O=0;O<_.length;O++){var I=_[O];if(k+=I.value.length,v<=k){var N=I.value.length-(k-v),P=I.value.slice(0,N),B=I.value.slice(N);_.splice(O,1,{type:I.type,value:P},x,{type:I.type,value:B});break}}this.updateLines(w,w)},L.prototype.hideTokensAfterPosition=function(T,D){for(var w=this.session.getTokens(T),v=0,C=!1,x=[],_=0;_<w.length;_++){var k=w[_];if(v+=k.value.length,k.type!=="ghost_text"){if(C){x.push({type:k.type,value:k.value}),k.type="hidden_token";continue}v===D&&(C=!0)}}return this.updateLines(T,T),x},L.prototype.removeExtraToken=function(T,D){this.session.bgTokenizer.lines[T]=null,this.updateLines(T,T)},L.prototype.setTheme=function(T,D){var w=this;if(this.$themeId=T,w._dispatchEvent("themeChange",{theme:T}),!T||typeof T=="string"){var v=T||this.$options.theme.initialValue;c.loadModule(["theme",v],C)}else C(T);function C(x){if(w.$themeId!=T)return D&&D();if(!x||!x.cssClass)throw new Error("couldn't load module "+T+" or it didn't call define");x.$id&&(w.$themeId=x.$id),g.importCssString(x.cssText,x.cssClass,w.container),w.theme&&g.removeCssClass(w.container,w.theme.cssClass);var _="padding"in x?x.padding:"padding"in(w.theme||{})?4:w.$padding;w.$padding&&_!=w.$padding&&w.setPadding(_),w.$theme=x.cssClass,w.theme=x,g.addCssClass(w.container,x.cssClass),g.setCssClass(w.container,"ace_dark",x.isDark),w.$size&&(w.$size.width=0,w.$updateSizeAsync()),w._dispatchEvent("themeLoaded",{theme:x}),D&&D(),S.isSafari&&w.scroller&&(w.scroller.style.background="red",w.scroller.style.background="")}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function(T,D){g.setCssClass(this.container,T,D!==!1)},L.prototype.unsetStyle=function(T){g.removeCssClass(this.container,T)},L.prototype.setCursorStyle=function(T){g.setStyle(this.scroller.style,"cursor",T)},L.prototype.setMouseCursor=function(T){g.setStyle(this.scroller.style,"cursor",T)},L.prototype.attachToShadowRoot=function(){g.importCssString($,"ace_editor.css",this.container)},L.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},L.prototype.$updateCustomScrollbar=function(T){var D=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,T===!0?(this.scrollBarV=new f(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(w){D.$scrollAnimation||D.session.setScrollTop(w.data-D.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(w){D.$scrollAnimation||D.session.setScrollLeft(w.data-D.scrollMargin.left)}),this.$scrollDecorator=new A(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new i(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.addEventListener("scroll",function(w){D.$scrollAnimation||D.session.setScrollTop(w.data-D.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(w){D.$scrollAnimation||D.session.setScrollLeft(w.data-D.scrollMargin.left)}))},L.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var T=this;this.$resizeTimer=m.delayedCall(function(){T.destroyed||T.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(D){var w=D[0].contentRect.width,v=D[0].contentRect.height;Math.abs(T.$size.width-w)>1||Math.abs(T.$size.height-v)>1?T.$resizeTimer.delay():T.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},L})();R.prototype.CHANGE_CURSOR=1,R.prototype.CHANGE_MARKER=2,R.prototype.CHANGE_GUTTER=4,R.prototype.CHANGE_SCROLL=8,R.prototype.CHANGE_LINES=16,R.prototype.CHANGE_TEXT=32,R.prototype.CHANGE_SIZE=64,R.prototype.CHANGE_MARKER_BACK=128,R.prototype.CHANGE_MARKER_FRONT=256,R.prototype.CHANGE_FULL=512,R.prototype.CHANGE_H_SCROLL=1024,R.prototype.$changes=0,R.prototype.$padding=null,R.prototype.$frozen=!1,R.prototype.STEPS=8,h.implement(R.prototype,E),c.defineOptions(R.prototype,"renderer",{useResizeObserver:{set:function(L){!L&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):L&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(L){this.$textLayer.setShowInvisibles(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(L){typeof L=="number"&&(this.$printMarginColumn=L),this.$showPrintMargin=!!L,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(L){this.$gutter.style.display=L?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(L){this.$gutterLayer.$useSvgGutterIcons=L},initialValue:!1},showFoldedAnnotations:{set:function(L){this.$gutterLayer.$showFoldedAnnotations=L},initialValue:!1},fadeFoldWidgets:{set:function(L){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",L)},initialValue:!1},showFoldWidgets:{set:function(L){this.$gutterLayer.setShowFoldWidgets(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(L){this.$textLayer.setDisplayIndentGuides(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(L){this.$textLayer.setHighlightIndentGuides(L)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(L){this.$gutterLayer.setHighlightGutterLine(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(L){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(L){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(L){typeof L=="number"&&(L=L+"px"),this.container.style.fontSize=L,this.updateFontSize()},initialValue:12},fontFamily:{set:function(L){this.container.style.fontFamily=L,this.updateFontSize()}},maxLines:{set:function(L){this.updateFull()}},minLines:{set:function(L){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(L){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(L){L=+L||0,this.$scrollPastEnd!=L&&(this.$scrollPastEnd=L,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(L){this.$gutterLayer.$fixedWidth=!!L,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(L){this.$updateCustomScrollbar(L)},initialValue:!1},theme:{set:function(L){this.setTheme(L)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!S.isMobile&&!S.isIE}}),n.VirtualRenderer=R}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,n,p){var h=t("../lib/oop"),g=t("../lib/net"),m=t("../lib/event_emitter").EventEmitter,c=t("../config");function d(s){var i="importScripts('"+g.qualifyURL(s)+"');";try{return new Blob([i],{type:"application/javascript"})}catch{var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,f=new u;return f.append(i),f.getBlob("application/javascript")}}function r(s){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(c.get("loadWorkerFromBlob")){var i=d(s),u=window.URL||window.webkitURL,f=u.createObjectURL(i);return new Worker(f)}return new Worker(s)}var o=function(s){s.postMessage||(s=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=s,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){h.implement(this,m),this.$createWorkerFromOldConfig=function(s,i,u,f,y){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),c.get("packaged")||!t.toUrl)f=f||c.moduleUrl(i,"worker");else{var b=this.$normalizePath;f=f||b(t.toUrl("ace/worker/worker.js",null,"_"));var E={};s.forEach(function($){E[$]=b(t.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(f),y&&this.send("importScripts",y),this.$worker.postMessage({init:!0,tlns:E,module:i,classname:u}),this.$worker},this.onMessage=function(s){var i=s.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var u=this.callbacks[i.id];u&&(u(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data);break}},this.reportError=function(s){window.console&&console.error&&console.error(s)},this.$normalizePath=function(s){return g.qualifyURL(s)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(s){s.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(s,i){this.$worker.postMessage({command:s,args:i})},this.call=function(s,i,u){if(u){var f=this.callbackId++;this.callbacks[f]=u,i.push(f)}this.send(s,i)},this.emit=function(s,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:s,data:{data:i.data}})}catch(u){console.error(u.stack)}},this.attachToDocument=function(s){this.$doc&&this.terminate(),this.$doc=s,this.call("setValue",[s.getValue()]),s.on("change",this.changeListener,!0)},this.changeListener=function(s){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),s.action=="insert"?this.deltaQueue.push(s.start,s.lines):this.deltaQueue.push(s.start,s.end)},this.$sendDeltaQueue=function(){var s=this.deltaQueue;s&&(this.deltaQueue=null,s.length>50&&s.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:s}))}}).call(o.prototype);var a=function(s,i,u){var f=null,y=!1,b=Object.create(m),E=[],$=new o({messageBuffer:E,terminate:function(){},postMessage:function(S){E.push(S),f&&(y?setTimeout(A):A())}});$.setEmitSync=function(S){y=S};var A=function(){var S=E.shift();S.command?f[S.command].apply(f,S.args):S.event&&b._signal(S.event,S.data)};return b.postMessage=function(S){$.onMessage({data:S})},b.callback=function(S,M){this.postMessage({type:"call",id:M,data:S})},b.emit=function(S,M){this.postMessage({type:"event",name:S,data:M})},c.loadModule(["worker",i],function(S){for(f=new S[u](b);E.length;)A()}),$};n.UIWorkerClient=a,n.WorkerClient=o,n.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,n,p){var h=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,m=t("./lib/oop"),c=(function(){function d(r,o,a,s,i,u){var f=this;this.length=o,this.session=r,this.doc=r.getDocument(),this.mainClass=i,this.othersClass=u,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=s,this.$onCursorChange=function(){setTimeout(function(){f.onCursorChange()})},this.$pos=a;var y=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=y.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var r=this,o=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=a.addMarker(new h(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var u=o.createAnchor(i.row,i.column);u.$insertRight=!0,u.detach(),r.others.push(u)}),a.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,o=this;this.othersActive=!0,this.others.forEach(function(a){a.markerId=r.addMarker(new h(a.row,a.column,a.row,a.column+o.length),o.othersClass,null,!1)})}},d.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},d.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var o=r;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var a=r.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,s=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,i=o.start.column-this.pos.column;if(this.updateAnchors(r),s&&(this.length+=a),s&&!this.session.$fromUndo){if(r.action==="insert")for(var u=this.others.length-1;u>=0;u--){var f=this.others[u],y={row:f.row,column:f.column+i};this.doc.insertMergedLines(y,r.lines)}else if(r.action==="remove")for(var u=this.others.length-1;u>=0;u--){var f=this.others[u],y={row:f.row,column:f.column+i};this.doc.remove(new h(y.row,y.column,y.row,y.column-a))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var o=this.others.length;o--;)this.others[o].onChange(r);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var r=this,o=this.session,a=function(i,u){o.removeMarker(i.markerId),i.markerId=o.addMarker(new h(i.row,i.column,i.row,i.column+r.length),u,null,!1)};a(this.pos,this.mainClass);for(var s=this.others.length;s--;)a(this.others[s],this.othersClass)}},d.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},d.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},d.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),o=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,a=0;a<o;a++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d})();m.implement(c.prototype,g),n.PlaceHolder=c}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,n,p){var h=t("../lib/event"),g=t("../lib/useragent");function m(d,r){return d.row==r.row&&d.column==r.column}function c(d){var r=d.domEvent,o=r.altKey,a=r.shiftKey,s=r.ctrlKey,i=d.getAccelKey(),u=d.getButton();if(s&&g.isMac&&(u=r.button),d.editor.inMultiSelectMode&&u==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!s&&!o&&!i){u===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(u===0){var f=d.editor,y=f.selection,b=f.inMultiSelectMode,E=d.getDocumentPosition(),$=y.getCursor(),A=d.inSelection()||y.isEmpty()&&m(E,$),S=d.x,M=d.y,R=function(P){S=P.clientX,M=P.clientY},L=f.session,T=f.renderer.pixelToScreenCoordinates(S,M),D=T,w;if(f.$mouseHandler.$enableJumpToDef)s&&o||i&&o?w=a?"block":"add":o&&f.$blockSelectEnabled&&(w="block");else if(i&&!o){if(w="add",!b&&a)return}else o&&f.$blockSelectEnabled&&(w="block");if(w&&g.isMac&&r.ctrlKey&&f.$mouseHandler.cancelContextMenu(),w=="add"){if(!b&&A)return;if(!b){var v=y.toOrientedRange();f.addSelectionMarker(v)}var C=y.rangeList.rangeAtPoint(E);f.inVirtualSelectionMode=!0,a&&(C=null,v=y.ranges[0]||v,f.removeSelectionMarker(v)),f.once("mouseup",function(){var P=y.toOrientedRange();C&&P.isEmpty()&&m(C.cursor,P.cursor)?y.substractPoint(P.cursor):(a?y.substractPoint(v.cursor):v&&(f.removeSelectionMarker(v),y.addRange(v)),y.addRange(P)),f.inVirtualSelectionMode=!1})}else if(w=="block"){d.stop(),f.inVirtualSelectionMode=!0;var x,_=[],k=function(){var P=f.renderer.pixelToScreenCoordinates(S,M),B=L.screenToDocumentPosition(P.row,P.column,P.offsetX);m(D,P)&&m(B,y.lead)||(D=P,f.selection.moveToPosition(B),f.renderer.scrollCursorIntoView(),f.removeSelectionMarkers(_),_=y.rectangularRangeBlock(D,T),f.$mouseHandler.$clickSelection&&_.length==1&&_[0].isEmpty()&&(_[0]=f.$mouseHandler.$clickSelection.clone()),_.forEach(f.addSelectionMarker,f),f.updateSelectionMarkers())};b&&!i?y.toSingleRange():!b&&i&&(x=y.toOrientedRange(),f.addSelectionMarker(x)),a?T=L.documentToScreenPosition(y.lead):y.moveToPosition(E),D={row:-1,column:-1};var O=function(P){k(),clearInterval(N),f.removeSelectionMarkers(_),_.length||(_=[y.toOrientedRange()]),x&&(f.removeSelectionMarker(x),y.toSingleRange(x));for(var B=0;B<_.length;B++)y.addRange(_[B]);f.inVirtualSelectionMode=!1,f.$mouseHandler.$clickSelection=null},I=k;h.capture(f.container,R,O);var N=setInterval(function(){I()},20);return d.preventDefault()}}}n.onMouseDown=c}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,n,p){n.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(g){g.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(g){g.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(g){g.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var h=t("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new h(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,n,p){var h=t("./range_list").RangeList,g=t("./range").Range,m=t("./selection").Selection,c=t("./mouse/multi_select_handler").onMouseDown,d=t("./lib/event"),r=t("./lib/lang"),o=t("./commands/multi_select_commands");n.commands=o.defaultCommands.concat(o.multiSelectCommands);var a=t("./search").Search,s=new a;function i($,A,S){return s.$options.wrap=!0,s.$options.needle=A,s.$options.backwards=S==-1,s.find($)}var u=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,A){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var S=this.toOrientedRange();if(this.rangeList.add(S),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),A||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(S),this.$onAddRange(S)}$.cursor||($.cursor=$.end);var M=this.rangeList.add($);return this.$onAddRange($),M.length&&this.$onRemoveRange(M),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),A||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var A=this.rangeList.removeAll();A.length&&this.$onRemoveRange(A),$&&this.fromOrientedRange($)},this.substractPoint=function($){var A=this.rangeList.substractPoint($);if(A)return this.$onRemoveRange(A),A[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var A=this.rangeList.ranges.pop();$.push(A),this.rangeCount=0}for(var S=$.length;S--;){var M=this.ranges.indexOf($[S]);this.ranges.splice(M,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),A=A||this.ranges[0],A&&!A.isEqual(this.getRange())&&this.fromOrientedRange(A)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new h,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],A=[],S=0;S<$.length;S++){var M=$[S],R=M.start.row,L=M.end.row;if(R===L)A.push(M.clone());else{for(A.push(new g(R,M.start.column,R,this.session.getLine(R).length));++R<L;)A.push(this.getLineRange(R,!0));A.push(new g(L,0,L,M.end.column))}S==0&&!this.isBackwards()&&(A=A.reverse())}this.toSingleRange();for(var S=A.length;S--;)this.addRange(A[S])},this.joinSelections=function(){var $=this.rangeList.ranges,A=$[$.length-1],S=g.fromPoints($[0].start,A.end);this.toSingleRange(),this.setSelectionRange(S,A.cursor==A.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,A=$[$.length-1],S=g.fromPoints($[0].start,A.end);this.toSingleRange(),this.setSelectionRange(S,A.cursor==A.start)}else{var M=this.session.documentToScreenPosition(this.cursor),R=this.session.documentToScreenPosition(this.anchor),L=this.rectangularRangeBlock(M,R);L.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,A,S){var M=[],R=$.column<A.column;if(R)var L=$.column,T=A.column,D=$.offsetX,w=A.offsetX;else var L=A.column,T=$.column,D=A.offsetX,w=$.offsetX;var v=$.row<A.row;if(v)var C=$.row,x=A.row;else var C=A.row,x=$.row;L<0&&(L=0),C<0&&(C=0),C==x&&(S=!0);for(var _,k=C;k<=x;k++){var O=g.fromPoints(this.session.screenToDocumentPosition(k,L,D),this.session.screenToDocumentPosition(k,T,w));if(O.isEmpty()){if(_&&y(O.end,_))break;_=O.end}O.cursor=R?O.start:O.end,M.push(O)}if(v&&M.reverse(),!S){for(var I=M.length-1;M[I].isEmpty()&&I>0;)I--;if(I>0)for(var N=0;M[N].isEmpty();)N++;for(var P=I;P>=N;P--)M[P].isEmpty()&&M.splice(P,1)}return M}}).call(m.prototype);var f=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var A=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",A),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var A=this.session.$selectionMarkers.indexOf($);A!=-1&&this.session.$selectionMarkers.splice(A,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var A=this.session.$selectionMarkers,S=$.length;S--;){var M=$[S];if(M.marker){this.session.removeMarker(M.marker);var R=A.indexOf(M);R!=-1&&A.splice(R,1)}}this.session.selectionMarkerCount=A.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var A=$.command,S=$.editor;if(S.multiSelect){if(A.multiSelectAction)A.multiSelectAction=="forEach"?M=S.forEachSelection(A,$.args):A.multiSelectAction=="forEachLine"?M=S.forEachSelection(A,$.args,!0):A.multiSelectAction=="single"?(S.exitMultiSelectMode(),M=A.exec(S,$.args||{})):M=A.multiSelectAction(S,$.args||{});else{var M=A.exec(S,$.args||{});S.multiSelect.addRange(S.multiSelect.toOrientedRange()),S.multiSelect.mergeOverlappingRanges()}return M}},this.forEachSelection=function($,A,S){if(!this.inVirtualSelectionMode){var M=S&&S.keepOrder,R=S==!0||S&&S.$byLines,L=this.session,T=this.selection,D=T.rangeList,w=(M?T:D).ranges,v;if(!w.length)return $.exec?$.exec(this,A||{}):$(this,A||{});var C=T._eventRegistry;T._eventRegistry={};var x=new m(L);this.inVirtualSelectionMode=!0;for(var _=w.length;_--;){if(R)for(;_>0&&w[_].start.row==w[_-1].end.row;)_--;x.fromOrientedRange(w[_]),x.index=_,this.selection=L.selection=x;var k=$.exec?$.exec(this,A||{}):$(this,A||{});!v&&k!==void 0&&(v=k),x.toOrientedRange(w[_])}x.detach(),this.selection=L.selection=T,this.inVirtualSelectionMode=!1,T._eventRegistry=C,T.mergeOverlappingRanges(),T.ranges[0]&&T.fromOrientedRange(T.ranges[0]);var O=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),O&&O.from==O.to&&this.renderer.animateScrolling(O.from),v}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var A=this.multiSelect.rangeList.ranges,S=[],M=0;M<A.length;M++)S.push(this.session.getTextRange(A[M]));var R=this.session.getDocument().getNewLineCharacter();$=S.join(R),$.length==(S.length-1)*R.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,A){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var S=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&A==this.multiSelect.anchor)return;var M=A==this.multiSelect.anchor?S.cursor==S.start?S.end:S.start:S.cursor;M.row!=A.row||this.session.$clipPositionToDocument(M.row,M.column).column!=A.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,A,S){if(A=A||{},A.needle=$||A.needle,A.needle==null){var M=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();A.needle=this.session.getTextRange(M)}this.$search.set(A);var R=this.$search.findAll(this.session);if(!R.length)return 0;var L=this.multiSelect;S||L.toSingleRange(R[0]);for(var T=R.length;T--;)L.addRange(R[T],!0);return M&&L.rangeList.rangeAtPoint(M.start)&&L.addRange(M,!0),R.length},this.selectMoreLines=function($,A){var S=this.selection.toOrientedRange(),M=S.cursor==S.end,R=this.session.documentToScreenPosition(S.cursor);this.selection.$desiredColumn&&(R.column=this.selection.$desiredColumn);var L=this.session.screenToDocumentPosition(R.row+$,R.column);if(S.isEmpty())var D=L;else var T=this.session.documentToScreenPosition(M?S.end:S.start),D=this.session.screenToDocumentPosition(T.row+$,T.column);if(M){var w=g.fromPoints(L,D);w.cursor=w.start}else{var w=g.fromPoints(D,L);w.cursor=w.end}if(w.desiredColumn=R.column,!this.selection.inMultiSelectMode)this.selection.addRange(S);else if(A)var v=S.cursor;this.selection.addRange(w),v&&this.selection.substractPoint(v)},this.transposeSelections=function($){for(var A=this.session,S=A.multiSelect,M=S.ranges,R=M.length;R--;){var L=M[R];if(L.isEmpty()){var T=A.getWordRange(L.start.row,L.start.column);L.start.row=T.start.row,L.start.column=T.start.column,L.end.row=T.end.row,L.end.column=T.end.column}}S.mergeOverlappingRanges();for(var D=[],R=M.length;R--;){var L=M[R];D.unshift(A.getTextRange(L))}$<0?D.unshift(D.pop()):D.push(D.shift());for(var R=M.length;R--;){var L=M[R],w=L.clone();A.replace(L,D[R]),L.start.row=w.start.row,L.start.column=w.start.column}S.fromOrientedRange(S.ranges[0])},this.selectMore=function($,A,S){var M=this.session,R=M.multiSelect,L=R.toOrientedRange();if(!(L.isEmpty()&&(L=M.getWordRange(L.start.row,L.start.column),L.cursor=$==-1?L.start:L.end,this.multiSelect.addRange(L),S))){var T=M.getTextRange(L),D=i(M,T,$);D&&(D.cursor=$==-1?D.start:D.end,this.session.unfold(D),this.multiSelect.addRange(D),this.renderer.scrollCursorIntoView(null,.5)),A&&this.multiSelect.substractPoint(L.cursor)}},this.alignCursors=function(){var $=this.session,A=$.multiSelect,S=A.ranges,M=-1,R=S.filter(function(I){if(I.cursor.row==M)return!0;M=I.cursor.row});if(!S.length||R.length==S.length-1){var L=this.selection.getRange(),T=L.start.row,D=L.end.row,w=T==D;if(w){var v=this.session.getLength(),C;do C=this.session.getLine(D);while(/[=:]/.test(C)&&++D<v);do C=this.session.getLine(T);while(/[=:]/.test(C)&&--T>0);T<0&&(T=0),D>=v&&(D=v-1)}var x=this.session.removeFullLines(T,D);x=this.$reAlignText(x,w),this.session.insert({row:T,column:0},x.join(`
2115
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,n,m){"use strict";var f=t("../lib/dom"),g=t("../lib/oop"),c=t("../lib/event_emitter").EventEmitter,o=(function(){function h(u,d){this.renderer=d,this.pixelRatio=1,this.maxHeight=d.layerConfig.maxHeight,this.lineHeight=d.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(u)}return h.prototype.$createCanvas=function(){this.canvas=f.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},h.prototype.setScrollBarV=function(u){this.$createCanvas(),this.scrollbarV=u,u.element.appendChild(this.canvas),this.setDimensions()},h.prototype.$updateDecorators=function(u){if(typeof this.canvas.getContext!="function")return;var d=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(u);var l=this.canvas.getContext("2d");function s(T,E){return T.priority<E.priority?-1:T.priority>E.priority?1:0}var r=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),r){var a={info:1,warning:2,error:3};r.forEach(function(T){T.priority=a[T.type]||null}),r=r.sort(s);for(var p=0;p<r.length;p++){var v=r[p].row,y=this.getVerticalOffsetForRow(v),k=y+this.lineHeight,x=Math.round(this.heightRatio*y),w=Math.round(this.heightRatio*k),S=Math.round((x+w)/2),M=w-S;M<this.halfMinDecorationHeight&&(M=this.halfMinDecorationHeight),S-M<0&&(S=M),S+M>this.canvasHeight&&(S=this.canvasHeight-M);var L=S-M,R=S+M-L;l.fillStyle=d[r[p].type]||null,l.fillRect(0,L,Math.round(this.oneZoneWidth-1),R)}}var $=this.renderer.session.selection.getCursor();if($){var D=Math.round(this.getVerticalOffsetForRow($.row)*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,D,this.canvasWidth,2)}},h.prototype.getVerticalOffsetForRow=function(u){return u=u|0,this.renderer.session.documentToScreenRow(u,0)*this.lineHeight},h.prototype.setDimensions=function(u){u=u||this.renderer.layerConfig,this.maxHeight=u.maxHeight,this.lineHeight=u.lineHeight,this.canvasHeight=u.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},h.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},h.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},h})();g.implement(o.prototype,c),n.Decorator=o}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(t,n,m){"use strict";var f=t("./lib/oop"),g=t("./lib/dom"),c=t("./lib/lang"),o=t("./config"),h=t("./layer/gutter").Gutter,u=t("./layer/marker").Marker,d=t("./layer/text").Text,l=t("./layer/cursor").Cursor,s=t("./scrollbar").HScrollBar,r=t("./scrollbar").VScrollBar,a=t("./scrollbar_custom").HScrollBar,p=t("./scrollbar_custom").VScrollBar,v=t("./renderloop").RenderLoop,y=t("./layer/font_metrics").FontMetrics,k=t("./lib/event_emitter").EventEmitter,x=t("./css/editor-css"),w=t("./layer/decorators").Decorator,S=t("./lib/useragent"),M=t("./layer/text_util").isTextToken;g.importCssString(x,"ace_editor.css",!1);var L=(function(){function R($,D){var T=this;this.container=$||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(D),o.get("useStrictCSP")==null&&o.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new u(this.content);var E=this.$textLayer=new d(this.content);this.canvas=E.element,this.$markerFront=new u(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new r(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.on("scroll",function(C){T.$scrollAnimation||T.session.setScrollTop(C.data-T.scrollMargin.top)}),this.scrollBarH.on("scroll",function(C){T.$scrollAnimation||T.session.setScrollLeft(C.data-T.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(C){T.updateCharacterSize(),T.onResize(!0,T.gutterWidth,T.$size.width,T.$size.height),T._signal("changeCharacterSize",C)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!S.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),o.resetOptions(this),o._signal("renderer",this)}return R.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},R.prototype.setSession=function($){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=$,$&&this.scrollMargin.top&&$.getScrollTop()<=0&&$.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession($),this.$markerBack.setSession($),this.$markerFront.setSession($),this.$gutterLayer.setSession($),this.$textLayer.setSession($),$&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},R.prototype.updateLines=function($,D,T){if(D===void 0&&(D=1/0),this.$changedLines?(this.$changedLines.firstRow>$&&(this.$changedLines.firstRow=$),this.$changedLines.lastRow<D&&(this.$changedLines.lastRow=D)):this.$changedLines={firstRow:$,lastRow:D},this.$changedLines.lastRow<this.layerConfig.firstRow)if(T)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},R.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},R.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},R.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},R.prototype.updateFull=function($){$?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},R.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},R.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},R.prototype.onResize=function($,D,T,E){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=$?1:0;var C=this.container;E||(E=C.clientHeight||C.scrollHeight),!E&&this.$maxLines&&this.lineHeight>1&&(!C.style.height||C.style.height=="0px")&&(C.style.height="1px",E=C.clientHeight||C.scrollHeight),T||(T=C.clientWidth||C.scrollWidth);var b=this.$updateCachedSize($,D,T,E);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!T&&!E)return this.resizing=0;$&&(this.$gutterLayer.$padding=null),$?this.$renderChanges(b|this.$changes,!0):this.$loop.schedule(b|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},R.prototype.$updateCachedSize=function($,D,T,E){E-=this.$extraHeight||0;var C=0,b=this.$size,A={width:b.width,height:b.height,scrollerHeight:b.scrollerHeight,scrollerWidth:b.scrollerWidth};if(E&&($||b.height!=E)&&(b.height=E,C|=this.CHANGE_SIZE,b.scrollerHeight=b.height,this.$horizScroll&&(b.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(b.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",C=C|this.CHANGE_SCROLL),T&&($||b.width!=T)){C|=this.CHANGE_SIZE,b.width=T,D==null&&(D=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=D,g.setStyle(this.scrollBarH.element.style,"left",D+"px"),g.setStyle(this.scroller.style,"left",D+this.margin.left+"px"),b.scrollerWidth=Math.max(0,T-D-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var _=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",_),g.setStyle(this.scroller.style,"right",_),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(b.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||$)&&(C|=this.CHANGE_FULL)}return b.$dirty=!T||!E,C&&this._signal("resize",A),C},R.prototype.onGutterResize=function($){var D=this.$showGutter?$:0;D!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,D,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},R.prototype.adjustWrapLimit=function(){var $=this.$size.scrollerWidth-this.$padding*2,D=Math.floor($/this.characterWidth);return this.session.adjustWrapLimit(D,this.$showPrintMargin&&this.$printMarginColumn)},R.prototype.setAnimatedScroll=function($){this.setOption("animatedScroll",$)},R.prototype.getAnimatedScroll=function(){return this.$animatedScroll},R.prototype.setShowInvisibles=function($){this.setOption("showInvisibles",$),this.session.$bidiHandler.setShowInvisibles($)},R.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},R.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},R.prototype.setDisplayIndentGuides=function($){this.setOption("displayIndentGuides",$)},R.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},R.prototype.setHighlightIndentGuides=function($){this.setOption("highlightIndentGuides",$)},R.prototype.setShowPrintMargin=function($){this.setOption("showPrintMargin",$)},R.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},R.prototype.setPrintMarginColumn=function($){this.setOption("printMarginColumn",$)},R.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},R.prototype.getShowGutter=function(){return this.getOption("showGutter")},R.prototype.setShowGutter=function($){return this.setOption("showGutter",$)},R.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},R.prototype.setFadeFoldWidgets=function($){this.setOption("fadeFoldWidgets",$)},R.prototype.setHighlightGutterLine=function($){this.setOption("highlightGutterLine",$)},R.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},R.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var $=g.createElement("div");$.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",$.appendChild(this.$printMarginEl),this.content.insertBefore($,this.content.firstChild)}var D=this.$printMarginEl.style;D.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",D.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},R.prototype.getContainerElement=function(){return this.container},R.prototype.getMouseEventTarget=function(){return this.scroller},R.prototype.getTextAreaContainer=function(){return this.container},R.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var $=this.textarea.style,D=this.$composition;if(!this.$keepTextAreaAtCursor&&!D){g.translate(this.textarea,-100,0);return}var T=this.$cursorLayer.$pixelPos;if(T){D&&D.markerRange&&(T=this.$cursorLayer.getPixelPosition(D.markerRange.start,!0));var E=this.layerConfig,C=T.top,b=T.left;C-=E.offset;var A=D&&D.useTextareaForIME||S.isMobile?this.lineHeight:1;if(C<0||C>E.height-A){g.translate(this.textarea,0,0);return}var _=1,O=this.$size.height-A;if(!D)C+=this.lineHeight;else if(D.useTextareaForIME){var I=this.textarea.value;_=this.characterWidth*this.session.$getStringScreenWidth(I)[0]}else C+=this.lineHeight+2;b-=this.scrollLeft,b>this.$size.scrollerWidth-_&&(b=this.$size.scrollerWidth-_),b+=this.gutterWidth+this.margin.left,g.setStyle($,"height",A+"px"),g.setStyle($,"width",_+"px"),g.translate(this.textarea,Math.min(b,this.$size.scrollerWidth-_),Math.min(C,O))}}},R.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},R.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},R.prototype.getLastFullyVisibleRow=function(){var $=this.layerConfig,D=$.lastRow;return this.session.documentToScreenRow(D,0)*$.lineHeight-this.session.getScrollTop()>$.height-$.lineHeight?D-1:D},R.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},R.prototype.setPadding=function($){this.$padding=$,this.$textLayer.setPadding($),this.$cursorLayer.setPadding($),this.$markerFront.setPadding($),this.$markerBack.setPadding($),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},R.prototype.setScrollMargin=function($,D,T,E){var C=this.scrollMargin;C.top=$|0,C.bottom=D|0,C.right=E|0,C.left=T|0,C.v=C.top+C.bottom,C.h=C.left+C.right,C.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-C.top),this.updateFull()},R.prototype.setMargin=function($,D,T,E){var C=this.margin;C.top=$|0,C.bottom=D|0,C.right=E|0,C.left=T|0,C.v=C.top+C.bottom,C.h=C.left+C.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},R.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},R.prototype.setHScrollBarAlwaysVisible=function($){this.setOption("hScrollBarAlwaysVisible",$)},R.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},R.prototype.setVScrollBarAlwaysVisible=function($){this.setOption("vScrollBarAlwaysVisible",$)},R.prototype.$updateScrollBarV=function(){var $=this.layerConfig.maxHeight,D=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&($-=(D-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>$-D&&($=this.scrollTop+D,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight($+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},R.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},R.prototype.freeze=function(){this.$frozen=!0},R.prototype.unfreeze=function(){this.$frozen=!1},R.prototype.$renderChanges=function($,D){if(this.$changes&&($|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!$&&!D){this.$changes|=$;return}if(this.$size.$dirty)return this.$changes|=$,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",$),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var T=this.layerConfig;if($&this.CHANGE_FULL||$&this.CHANGE_SIZE||$&this.CHANGE_TEXT||$&this.CHANGE_LINES||$&this.CHANGE_SCROLL||$&this.CHANGE_H_SCROLL){if($|=this.$computeLayerConfig()|this.$loop.clear(),T.firstRow!=this.layerConfig.firstRow&&T.firstRowScreen==this.layerConfig.firstRowScreen){var E=this.scrollTop+(T.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;E>0&&(this.scrollTop=E,$=$|this.CHANGE_SCROLL,$|=this.$computeLayerConfig()|this.$loop.clear())}T=this.layerConfig,this.$updateScrollBarV(),$&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-T.offset);var C=T.width+2*this.$padding+"px",b=T.minHeight+"px";g.setStyle(this.content.style,"width",C),g.setStyle(this.content.style,"height",b)}if($&this.CHANGE_H_SCROLL&&(g.translate(this.content,-this.scrollLeft,-T.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),$&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(T),this.$showGutter&&this.$gutterLayer.update(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T),this.$markerBack.update(T),this.$markerFront.update(T),this.$cursorLayer.update(T),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}if($&this.CHANGE_SCROLL){this.$changedLines=null,$&this.CHANGE_TEXT||$&this.CHANGE_LINES?this.$textLayer.update(T):this.$textLayer.scrollLines(T),this.$showGutter&&($&this.CHANGE_GUTTER||$&this.CHANGE_LINES?this.$gutterLayer.update(T):this.$gutterLayer.scrollLines(T)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T),this.$markerBack.update(T),this.$markerFront.update(T),this.$cursorLayer.update(T),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}$&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(T),this.$showGutter&&this.$gutterLayer.update(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T)):$&this.CHANGE_LINES?((this.$updateLines()||$&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T)):$&this.CHANGE_TEXT||$&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T)):$&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T)),$&this.CHANGE_CURSOR&&(this.$cursorLayer.update(T),this.$moveTextAreaToCursor()),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(T),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(T),this._signal("afterRender",$)},R.prototype.$autosize=function(){var $=this.session.getScreenLength()*this.lineHeight,D=this.$maxLines*this.lineHeight,T=Math.min(D,Math.max((this.$minLines||1)*this.lineHeight,$))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(T+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&T>this.$maxPixelHeight&&(T=this.$maxPixelHeight);var E=!(T<=2*this.lineHeight)&&$>D;if(T!=this.desiredHeight||this.$size.height!=this.desiredHeight||E!=this.$vScroll){E!=this.$vScroll&&(this.$vScroll=E,this.scrollBarV.setVisible(E));var C=this.container.clientWidth;this.container.style.height=T+"px",this.$updateCachedSize(!0,this.$gutterWidth,C,T),this.desiredHeight=T,this._signal("autosize")}},R.prototype.$computeLayerConfig=function(){var $=this.session,D=this.$size,T=D.height<=2*this.lineHeight,E=this.session.getScreenLength()*this.lineHeight,C=this.$getLongestLine(),b=!T&&(this.$hScrollBarAlwaysVisible||D.scrollerWidth-C-2*this.$padding<0),A=this.$horizScroll!==b;A&&(this.$horizScroll=b,this.scrollBarH.setVisible(b));var _=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),T=D.height<=2*this.lineHeight);var O=D.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(D.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;E+=I;var N=this.scrollMargin;this.session.setScrollTop(Math.max(-N.top,Math.min(this.scrollTop,E-D.scrollerHeight+N.bottom))),this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,C+2*this.$padding-D.scrollerWidth+N.right)));var F=!T&&(this.$vScrollBarAlwaysVisible||D.scrollerHeight-E+I<0||this.scrollTop>N.top),z=_!==F;z&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var P=this.scrollTop%this.lineHeight,W=Math.ceil(O/this.lineHeight)-1,B=Math.max(0,Math.round((this.scrollTop-P)/this.lineHeight)),H=B+W,U,G,Y=this.lineHeight;B=$.screenToDocumentRow(B,0);var q=$.getFoldLine(B);q&&(B=q.start.row),U=$.documentToScreenRow(B,0),G=$.getRowLength(B)*Y,H=Math.min($.screenToDocumentRow(H,0),$.getLength()-1),O=D.scrollerHeight+$.getRowLength(H)*Y+G,P=this.scrollTop-U*Y,P<0&&U>0&&(U=Math.max(0,U+Math.floor(P/Y)),P=this.scrollTop-U*Y);var X=0;return(this.layerConfig.width!=C||A)&&(X=this.CHANGE_H_SCROLL),(A||z)&&(X|=this.$updateCachedSize(!0,this.gutterWidth,D.width,D.height),this._signal("scrollbarVisibilityChanged"),z&&(C=this.$getLongestLine())),this.layerConfig={width:C,padding:this.$padding,firstRow:B,firstRowScreen:U,lastRow:H,lineHeight:Y,characterWidth:this.characterWidth,minHeight:O,maxHeight:E,offset:P,gutterOffset:Y?Math.max(0,Math.ceil((P+D.height-D.scrollerHeight)/Y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(C-this.$padding),X},R.prototype.$updateLines=function(){if(this.$changedLines){var $=this.$changedLines.firstRow,D=this.$changedLines.lastRow;this.$changedLines=null;var T=this.layerConfig;if(!($>T.lastRow+1)&&!(D<T.firstRow)){if(D===1/0){this.$showGutter&&this.$gutterLayer.update(T),this.$textLayer.update(T);return}return this.$textLayer.updateLines(T,$,D),!0}}},R.prototype.$getLongestLine=function(){var $=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&($+=1),this.$textLayer&&$>this.$textLayer.MAX_LINE_LENGTH&&($=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round($*this.characterWidth))},R.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},R.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},R.prototype.addGutterDecoration=function($,D){this.$gutterLayer.addGutterDecoration($,D)},R.prototype.removeGutterDecoration=function($,D){this.$gutterLayer.removeGutterDecoration($,D)},R.prototype.updateBreakpoints=function($){this._rows=$,this.$loop.schedule(this.CHANGE_GUTTER)},R.prototype.setAnnotations=function($){this.$gutterLayer.setAnnotations($),this.$loop.schedule(this.CHANGE_GUTTER)},R.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},R.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},R.prototype.showCursor=function(){this.$cursorLayer.showCursor()},R.prototype.scrollSelectionIntoView=function($,D,T){this.scrollCursorIntoView($,T),this.scrollCursorIntoView(D,T)},R.prototype.scrollCursorIntoView=function($,D,T){if(this.$size.scrollerHeight!==0){var E=this.$cursorLayer.getPixelPosition($),C=E.left,b=E.top,A=T&&T.top||0,_=T&&T.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var O=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;O+A>b?(D&&O+A>b+this.lineHeight&&(b-=D*this.$size.scrollerHeight),b===0&&(b=-this.scrollMargin.top),this.session.setScrollTop(b)):O+this.$size.scrollerHeight-_<b+this.lineHeight&&(D&&O+this.$size.scrollerHeight-_<b-this.lineHeight&&(b+=D*this.$size.scrollerHeight),this.session.setScrollTop(b+this.lineHeight+_-this.$size.scrollerHeight));var I=this.scrollLeft,N=2*this.layerConfig.characterWidth;C-N<I?(C-=N,C<this.$padding+N&&(C=-this.scrollMargin.left),this.session.setScrollLeft(C)):(C+=N,I+this.$size.scrollerWidth<C+this.characterWidth?this.session.setScrollLeft(Math.round(C+this.characterWidth-this.$size.scrollerWidth)):I<=this.$padding&&C-I<this.characterWidth&&this.session.setScrollLeft(0))}},R.prototype.getScrollTop=function(){return this.session.getScrollTop()},R.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},R.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},R.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},R.prototype.scrollToRow=function($){this.session.setScrollTop($*this.lineHeight)},R.prototype.alignCursor=function($,D){typeof $=="number"&&($={row:$,column:0});var T=this.$cursorLayer.getPixelPosition($),E=this.$size.scrollerHeight-this.lineHeight,C=T.top-E*(D||0);return this.session.setScrollTop(C),C},R.prototype.$calcSteps=function($,D){var T=0,E=this.STEPS,C=[],b=function(A,_,O){return O*(Math.pow(A-1,3)+1)+_};for(T=0;T<E;++T)C.push(b(T/this.STEPS,$,D-$));return C},R.prototype.scrollToLine=function($,D,T,E){var C=this.$cursorLayer.getPixelPosition({row:$,column:0}).top;D&&(C-=this.$size.scrollerHeight/2);var b=this.scrollTop;this.session.setScrollTop(C),T!==!1&&this.animateScrolling(b,E)},R.prototype.animateScrolling=function($,D){var T=this.scrollTop;if(!this.$animatedScroll)return;var E=this;if($==T)return;if(this.$scrollAnimation){var C=this.$scrollAnimation.steps;if(C.length&&($=C[0],$==T))return}var b=E.$calcSteps($,T);this.$scrollAnimation={from:$,to:T,steps:b},clearInterval(this.$timer),E.session.setScrollTop(b.shift()),E.session.$scrollTop=T;function A(){E.$timer=clearInterval(E.$timer),E.$scrollAnimation=null,E.$stopAnimation=!1,D&&D()}this.$timer=setInterval(function(){if(E.$stopAnimation){A();return}if(!E.session)return clearInterval(E.$timer);b.length?(E.session.setScrollTop(b.shift()),E.session.$scrollTop=T):T!=null?(E.session.$scrollTop=-1,E.session.setScrollTop(T),T=null):A()},10)},R.prototype.scrollToY=function($){this.scrollTop!==$&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=$)},R.prototype.scrollToX=function($){this.scrollLeft!==$&&(this.scrollLeft=$),this.$loop.schedule(this.CHANGE_H_SCROLL)},R.prototype.scrollTo=function($,D){this.session.setScrollTop(D),this.session.setScrollLeft($)},R.prototype.scrollBy=function($,D){D&&this.session.setScrollTop(this.session.getScrollTop()+D),$&&this.session.setScrollLeft(this.session.getScrollLeft()+$)},R.prototype.isScrollableBy=function($,D){if(D<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||D>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||$<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||$>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},R.prototype.pixelToScreenCoordinates=function($,D){var T;if(this.$hasCssTransforms){T={top:0,left:0};var E=this.$fontMetrics.transformCoordinates([$,D]);$=E[1]-this.gutterWidth-this.margin.left,D=E[0]}else T=this.scroller.getBoundingClientRect();var C=$+this.scrollLeft-T.left-this.$padding,b=C/this.characterWidth,A=Math.floor((D+this.scrollTop-T.top)/this.lineHeight),_=this.$blockCursor?Math.floor(b):Math.round(b);return{row:A,column:_,side:b-_>0?1:-1,offsetX:C}},R.prototype.screenToTextCoordinates=function($,D){var T;if(this.$hasCssTransforms){T={top:0,left:0};var E=this.$fontMetrics.transformCoordinates([$,D]);$=E[1]-this.gutterWidth-this.margin.left,D=E[0]}else T=this.scroller.getBoundingClientRect();var C=$+this.scrollLeft-T.left-this.$padding,b=C/this.characterWidth,A=this.$blockCursor?Math.floor(b):Math.round(b),_=(D+this.scrollTop-T.top)/this.lineHeight;return this.session.screenToDocumentPosition(_,Math.max(A,0),C)},R.prototype.textToScreenCoordinates=function($,D){var T=this.scroller.getBoundingClientRect(),E=this.session.documentToScreenPosition($,D),C=this.$padding+(this.session.$bidiHandler.isBidiRow(E.row,$)?this.session.$bidiHandler.getPosLeft(E.column):Math.round(E.column*this.characterWidth)),b=E.row*this.lineHeight;return{pageX:T.left+C-this.scrollLeft,pageY:T.top+b-this.scrollTop}},R.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},R.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},R.prototype.showComposition=function($){this.$composition=$,$.cssText||($.cssText=this.textarea.style.cssText),$.useTextareaForIME==null&&($.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):$.markerId=this.session.addMarker($.markerRange,"ace_composition_marker","text")},R.prototype.setCompositionText=function($){var D=this.session.selection.cursor;this.addToken($,"composition_placeholder",D.row,D.column),this.$moveTextAreaToCursor()},R.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var $=this.session.selection.cursor;this.removeExtraToken($.row,$.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},R.prototype.setGhostText=function($,D){var T=this.session.selection.cursor,E=D||{row:T.row,column:T.column};this.removeGhostText();var C=this.$calculateWrappedTextChunks($,E);this.addToken(C[0].text,"ghost_text",E.row,E.column),this.$ghostText={text:$,position:{row:E.row,column:E.column}};var b=g.createElement("div");if(C.length>1){var A=this.hideTokensAfterPosition(E.row,E.column),_;C.slice(1).forEach(function(F){var z=g.createElement("div"),P=g.createElement("span");P.className="ace_ghost_text",F.wrapped&&(z.className="ghost_text_line_wrapped"),F.text.length===0&&(F.text=" "),P.appendChild(g.createTextNode(F.text)),z.appendChild(P),b.appendChild(z),_=z}),A.forEach(function(F){var z=g.createElement("span");M(F.type)||(z.className="ace_"+F.type.replace(/\./g," ace_")),z.appendChild(g.createTextNode(F.value)),_.appendChild(z)}),this.$ghostTextWidget={el:b,row:E.row,column:E.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var O=this.$cursorLayer.getPixelPosition(E,!0),I=this.container.getBoundingClientRect().height,N=C.length*this.lineHeight;if(N<I-O.top)return;N<I?this.scrollBy(0,(C.length-1)*this.lineHeight):this.scrollToRow(E.row)}},R.prototype.$calculateWrappedTextChunks=function($,D){var T=this.$size.scrollerWidth-this.$padding*2,E=Math.floor(T/this.characterWidth)-2;E=E<=0?60:E;for(var C=$.split(/\r?\n/),b=[],A=0;A<C.length;A++){var _=this.session.$getDisplayTokens(C[A],D.column),O=this.session.$computeWrapSplits(_,E,this.session.$tabSize);if(O.length>0){var I=0;O.push(C[A].length);for(var N=0;N<O.length;N++){var F=C[A].slice(I,O[N]);b.push({text:F,wrapped:!0}),I=O[N]}}else b.push({text:C[A],wrapped:!1})}return b},R.prototype.removeGhostText=function(){if(this.$ghostText){var $=this.$ghostText.position;this.removeExtraToken($.row,$.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},R.prototype.addToken=function($,D,T,E){var C=this.session;C.bgTokenizer.lines[T]=null;var b={type:D,value:$},A=C.getTokens(T);if(E==null||!A.length)A.push(b);else for(var _=0,O=0;O<A.length;O++){var I=A[O];if(_+=I.value.length,E<=_){var N=I.value.length-(_-E),F=I.value.slice(0,N),z=I.value.slice(N);A.splice(O,1,{type:I.type,value:F},b,{type:I.type,value:z});break}}this.updateLines(T,T)},R.prototype.hideTokensAfterPosition=function($,D){for(var T=this.session.getTokens($),E=0,C=!1,b=[],A=0;A<T.length;A++){var _=T[A];if(E+=_.value.length,_.type!=="ghost_text"){if(C){b.push({type:_.type,value:_.value}),_.type="hidden_token";continue}E===D&&(C=!0)}}return this.updateLines($,$),b},R.prototype.removeExtraToken=function($,D){this.session.bgTokenizer.lines[$]=null,this.updateLines($,$)},R.prototype.setTheme=function($,D){var T=this;if(this.$themeId=$,T._dispatchEvent("themeChange",{theme:$}),!$||typeof $=="string"){var E=$||this.$options.theme.initialValue;o.loadModule(["theme",E],C)}else C($);function C(b){if(T.$themeId!=$)return D&&D();if(!b||!b.cssClass)throw new Error("couldn't load module "+$+" or it didn't call define");b.$id&&(T.$themeId=b.$id),g.importCssString(b.cssText,b.cssClass,T.container),T.theme&&g.removeCssClass(T.container,T.theme.cssClass);var A="padding"in b?b.padding:"padding"in(T.theme||{})?4:T.$padding;if(T.$padding&&A!=T.$padding&&T.setPadding(A),T.$gutterLayer){var _=b.$showGutterCursorMarker;_&&!T.$gutterLayer.$showCursorMarker?T.$gutterLayer.$showCursorMarker="theme":!_&&T.$gutterLayer.$showCursorMarker=="theme"&&(T.$gutterLayer.$showCursorMarker=null)}T.$theme=b.cssClass,T.theme=b,g.addCssClass(T.container,b.cssClass),g.setCssClass(T.container,"ace_dark",b.isDark),T.$size&&(T.$size.width=0,T.$updateSizeAsync()),T._dispatchEvent("themeLoaded",{theme:b}),D&&D(),S.isSafari&&T.scroller&&(T.scroller.style.background="red",T.scroller.style.background="")}},R.prototype.getTheme=function(){return this.$themeId},R.prototype.setStyle=function($,D){g.setCssClass(this.container,$,D!==!1)},R.prototype.unsetStyle=function($){g.removeCssClass(this.container,$)},R.prototype.setCursorStyle=function($){g.setStyle(this.scroller.style,"cursor",$)},R.prototype.setMouseCursor=function($){g.setStyle(this.scroller.style,"cursor",$)},R.prototype.attachToShadowRoot=function(){g.importCssString(x,"ace_editor.css",this.container)},R.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},R.prototype.$updateCustomScrollbar=function($){var D=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),$===!0?(this.scrollBarV=new p(this.container,this),this.scrollBarH=new a(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(T){D.$scrollAnimation||D.session.setScrollTop(T.data-D.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(T){D.$scrollAnimation||D.session.setScrollLeft(T.data-D.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new w(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new r(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.addEventListener("scroll",function(T){D.$scrollAnimation||D.session.setScrollTop(T.data-D.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(T){D.$scrollAnimation||D.session.setScrollLeft(T.data-D.scrollMargin.left)}))},R.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var $=this;this.$resizeTimer=c.delayedCall(function(){$.destroyed||$.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(D){var T=D[0].contentRect.width,E=D[0].contentRect.height;Math.abs($.$size.width-T)>1||Math.abs($.$size.height-E)>1?$.$resizeTimer.delay():$.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},R})();L.prototype.CHANGE_CURSOR=1,L.prototype.CHANGE_MARKER=2,L.prototype.CHANGE_GUTTER=4,L.prototype.CHANGE_SCROLL=8,L.prototype.CHANGE_LINES=16,L.prototype.CHANGE_TEXT=32,L.prototype.CHANGE_SIZE=64,L.prototype.CHANGE_MARKER_BACK=128,L.prototype.CHANGE_MARKER_FRONT=256,L.prototype.CHANGE_FULL=512,L.prototype.CHANGE_H_SCROLL=1024,L.prototype.$changes=0,L.prototype.$padding=null,L.prototype.$frozen=!1,L.prototype.STEPS=8,f.implement(L.prototype,k),o.defineOptions(L.prototype,"renderer",{useResizeObserver:{set:function(R){!R&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):R&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(R){this.$textLayer.setShowInvisibles(R)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(R){typeof R=="number"&&(this.$printMarginColumn=R),this.$showPrintMargin=!!R,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(R){this.$gutter.style.display=R?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(R){this.$gutterLayer.$useSvgGutterIcons=R},initialValue:!1},showFoldedAnnotations:{set:function(R){this.$gutterLayer.$showFoldedAnnotations=R},initialValue:!1},fadeFoldWidgets:{set:function(R){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",R)},initialValue:!1},showFoldWidgets:{set:function(R){this.$gutterLayer.setShowFoldWidgets(R),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(R){this.$textLayer.setDisplayIndentGuides(R)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(R){this.$textLayer.setHighlightIndentGuides(R)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(R){this.$gutterLayer.setHighlightGutterLine(R),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(R){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(R){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(R){typeof R=="number"&&(R=R+"px"),this.container.style.fontSize=R,this.updateFontSize()},initialValue:12},fontFamily:{set:function(R){this.container.style.fontFamily=R,this.updateFontSize()}},maxLines:{set:function(R){this.updateFull()}},minLines:{set:function(R){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(R){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(R){R=+R||0,this.$scrollPastEnd!=R&&(this.$scrollPastEnd=R,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(R){this.$gutterLayer.$fixedWidth=!!R,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(R){this.$updateCustomScrollbar(R)},initialValue:!1},theme:{set:function(R){this.setTheme(R)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!S.isMobile&&!S.isIE}}),n.VirtualRenderer=L}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,n,m){"use strict";var f=t("../lib/oop"),g=t("../lib/net"),c=t("../lib/event_emitter").EventEmitter,o=t("../config");function h(s){var r="importScripts('"+g.qualifyURL(s)+"');";try{return new Blob([r],{type:"application/javascript"})}catch{var a=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return a.append(r),a.getBlob("application/javascript")}}function u(s){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var r=h(s),a=(window.URL||window.webkitURL).createObjectURL(r);return new Worker(a)}return new Worker(s)}var d=function(s){s.postMessage||(s=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=s,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){f.implement(this,c),this.$createWorkerFromOldConfig=function(s,r,a,p,v){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),o.get("packaged")||!t.toUrl)p=p||o.moduleUrl(r,"worker");else{var y=this.$normalizePath;p=p||y(t.toUrl("ace/worker/worker.js",null,"_"));var k={};s.forEach(function(x){k[x]=y(t.toUrl(x,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=u(p),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:k,module:r,classname:a}),this.$worker},this.onMessage=function(s){var r=s.data;switch(r.type){case"event":this._signal(r.name,{data:r.data});break;case"call":var a=this.callbacks[r.id];a&&(a(r.data),delete this.callbacks[r.id]);break;case"error":this.reportError(r.data);break;case"log":window.console&&console.log&&console.log.apply(console,r.data);break}},this.reportError=function(s){window.console&&console.error&&console.error(s)},this.$normalizePath=function(s){return g.qualifyURL(s)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(s){s.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(s,r){this.$worker.postMessage({command:s,args:r})},this.call=function(s,r,a){if(a){var p=this.callbackId++;this.callbacks[p]=a,r.push(p)}this.send(s,r)},this.emit=function(s,r){try{r.data&&r.data.err&&(r.data.err={message:r.data.err.message,stack:r.data.err.stack,code:r.data.err.code}),this.$worker&&this.$worker.postMessage({event:s,data:{data:r.data}})}catch(a){console.error(a.stack)}},this.attachToDocument=function(s){this.$doc&&this.terminate(),this.$doc=s,this.call("setValue",[s.getValue()]),s.on("change",this.changeListener,!0)},this.changeListener=function(s){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),s.action=="insert"?this.deltaQueue.push(s.start,s.lines):this.deltaQueue.push(s.start,s.end)},this.$sendDeltaQueue=function(){var s=this.deltaQueue;s&&(this.deltaQueue=null,s.length>50&&s.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:s}))}}).call(d.prototype);var l=function(s,r,a){var p=null,v=!1,y=Object.create(c),k=[],x=new d({messageBuffer:k,terminate:function(){},postMessage:function(S){k.push(S),p&&(v?setTimeout(w):w())}});x.setEmitSync=function(S){v=S};var w=function(){var S=k.shift();S.command?p[S.command].apply(p,S.args):S.event&&y._signal(S.event,S.data)};return y.postMessage=function(S){x.onMessage({data:S})},y.callback=function(S,M){this.postMessage({type:"call",id:M,data:S})},y.emit=function(S,M){this.postMessage({type:"event",name:S,data:M})},o.loadModule(["worker",r],function(S){for(p=new S[a](y);k.length;)w()}),x};n.UIWorkerClient=l,n.WorkerClient=d,n.createWorker=u}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,n,m){"use strict";var f=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,c=t("./lib/oop"),o=(function(){function h(u,d,l,s,r,a){var p=this;this.length=d,this.session=u,this.doc=u.getDocument(),this.mainClass=r,this.othersClass=a,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=s,this.$onCursorChange=function(){setTimeout(function(){p.onCursorChange()})},this.$pos=l;var v=u.getUndoManager().$undoStack||u.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),u.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var u=this,d=this.doc,l=this.session;this.selectionBefore=l.selection.toJSON(),l.selection.inMultiSelectMode&&l.selection.toSingleRange(),this.pos=d.createAnchor(this.$pos.row,this.$pos.column);var s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=l.addMarker(new f(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(r){var a=d.createAnchor(r.row,r.column);a.$insertRight=!0,a.detach(),u.others.push(a)}),l.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var u=this.session,d=this;this.othersActive=!0,this.others.forEach(function(l){l.markerId=u.addMarker(new f(l.row,l.column,l.row,l.column+d.length),d.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var u=0;u<this.others.length;u++)this.session.removeMarker(this.others[u].markerId)}},h.prototype.onUpdate=function(u){if(this.$updating)return this.updateAnchors(u);var d=u;if(d.start.row===d.end.row&&d.start.row===this.pos.row){this.$updating=!0;var l=u.action==="insert"?d.end.column-d.start.column:d.start.column-d.end.column,s=d.start.column>=this.pos.column&&d.start.column<=this.pos.column+this.length+1,r=d.start.column-this.pos.column;if(this.updateAnchors(u),s&&(this.length+=l),s&&!this.session.$fromUndo){if(u.action==="insert")for(var a=this.others.length-1;a>=0;a--){var p=this.others[a],v={row:p.row,column:p.column+r};this.doc.insertMergedLines(v,u.lines)}else if(u.action==="remove")for(var a=this.others.length-1;a>=0;a--){var p=this.others[a],v={row:p.row,column:p.column+r};this.doc.remove(new f(v.row,v.column,v.row,v.column-l))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(u){this.pos.onChange(u);for(var d=this.others.length;d--;)this.others[d].onChange(u);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var u=this,d=this.session,l=function(r,a){d.removeMarker(r.markerId),r.markerId=d.addMarker(new f(r.row,r.column,r.row,r.column+u.length),a,null,!1)};l(this.pos,this.mainClass);for(var s=this.others.length;s--;)l(this.others[s],this.othersClass)}},h.prototype.onCursorChange=function(u){if(!(this.$updating||!this.session)){var d=this.session.selection.getCursor();d.row===this.pos.row&&d.column>=this.pos.column&&d.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",u)):(this.hideOtherMarkers(),this._emit("cursorLeave",u))}},h.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var u=this.session.getUndoManager(),d=(u.$undoStack||u.$undostack).length-this.$undoStackDepth,l=0;l<d;l++)u.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h})();c.implement(o.prototype,g),n.PlaceHolder=o}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,n,m){var f=t("../lib/event"),g=t("../lib/useragent");function c(h,u){return h.row==u.row&&h.column==u.column}function o(h){var u=h.domEvent,d=u.altKey,l=u.shiftKey,s=u.ctrlKey,r=h.getAccelKey(),a=h.getButton();if(s&&g.isMac&&(a=u.button),h.editor.inMultiSelectMode&&a==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!s&&!d&&!r){a===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(a===0){var p=h.editor,v=p.selection,y=p.inMultiSelectMode,k=h.getDocumentPosition(),x=v.getCursor(),w=h.inSelection()||v.isEmpty()&&c(k,x),S=h.x,M=h.y,L=function(F){S=F.clientX,M=F.clientY},R=p.session,$=p.renderer.pixelToScreenCoordinates(S,M),D=$,T;if(p.$mouseHandler.$enableJumpToDef)s&&d||r&&d?T=l?"block":"add":d&&p.$blockSelectEnabled&&(T="block");else if(r&&!d){if(T="add",!y&&l)return}else d&&p.$blockSelectEnabled&&(T="block");if(T&&g.isMac&&u.ctrlKey&&p.$mouseHandler.cancelContextMenu(),T=="add"){if(!y&&w)return;if(!y){var E=v.toOrientedRange();p.addSelectionMarker(E)}var C=v.rangeList.rangeAtPoint(k);p.inVirtualSelectionMode=!0,l&&(C=null,E=v.ranges[0]||E,p.removeSelectionMarker(E)),p.once("mouseup",function(){var F=v.toOrientedRange();C&&F.isEmpty()&&c(C.cursor,F.cursor)?v.substractPoint(F.cursor):(l?v.substractPoint(E.cursor):E&&(p.removeSelectionMarker(E),v.addRange(E)),v.addRange(F)),p.inVirtualSelectionMode=!1})}else if(T=="block"){h.stop(),p.inVirtualSelectionMode=!0;var b,A=[],_=function(){var F=p.renderer.pixelToScreenCoordinates(S,M),z=R.screenToDocumentPosition(F.row,F.column,F.offsetX);c(D,F)&&c(z,v.lead)||(D=F,p.selection.moveToPosition(z),p.renderer.scrollCursorIntoView(),p.removeSelectionMarkers(A),A=v.rectangularRangeBlock(D,$),p.$mouseHandler.$clickSelection&&A.length==1&&A[0].isEmpty()&&(A[0]=p.$mouseHandler.$clickSelection.clone()),A.forEach(p.addSelectionMarker,p),p.updateSelectionMarkers())};y&&!r?v.toSingleRange():!y&&r&&(b=v.toOrientedRange(),p.addSelectionMarker(b)),l?$=R.documentToScreenPosition(v.lead):v.moveToPosition(k),D={row:-1,column:-1};var O=function(F){_(),clearInterval(N),p.removeSelectionMarkers(A),A.length||(A=[v.toOrientedRange()]),b&&(p.removeSelectionMarker(b),v.toSingleRange(b));for(var z=0;z<A.length;z++)v.addRange(A[z]);p.inVirtualSelectionMode=!1,p.$mouseHandler.$clickSelection=null},I=_;f.capture(p.container,L,O);var N=setInterval(function(){I()},20);return h.preventDefault()}}}n.onMouseDown=o}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,n,m){n.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(g){g.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(g){g.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(g){g.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var f=t("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new f(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,n,m){var f=t("./range_list").RangeList,g=t("./range").Range,c=t("./selection").Selection,o=t("./mouse/multi_select_handler").onMouseDown,h=t("./lib/event"),u=t("./lib/lang"),d=t("./commands/multi_select_commands");n.commands=d.defaultCommands.concat(d.multiSelectCommands);var l=t("./search").Search,s=new l;function r(x,w,S){return s.$options.wrap=!0,s.$options.needle=w,s.$options.backwards=S==-1,s.find(x)}var a=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(a.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(x,w){if(x){if(!this.inMultiSelectMode&&this.rangeCount===0){var S=this.toOrientedRange();if(this.rangeList.add(S),this.rangeList.add(x),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),w||this.fromOrientedRange(x);this.rangeList.removeAll(),this.rangeList.add(S),this.$onAddRange(S)}x.cursor||(x.cursor=x.end);var M=this.rangeList.add(x);return this.$onAddRange(x),M.length&&this.$onRemoveRange(M),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(x)}},this.toSingleRange=function(x){x=x||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),x&&this.fromOrientedRange(x)},this.substractPoint=function(x){var w=this.rangeList.substractPoint(x);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var x=this.rangeList.merge();x.length&&this.$onRemoveRange(x)},this.$onAddRange=function(x){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(x),this._signal("addRange",{range:x})},this.$onRemoveRange=function(x){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();x.push(w),this.rangeCount=0}for(var S=x.length;S--;){var M=this.ranges.indexOf(x[S]);this.ranges.splice(M,1)}this._signal("removeRange",{ranges:x}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),w=w||this.ranges[0],w&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new f,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var x=this.ranges.length?this.ranges:[this.getRange()],w=[],S=0;S<x.length;S++){var M=x[S],L=M.start.row,R=M.end.row;if(L===R)w.push(M.clone());else{for(w.push(new g(L,M.start.column,L,this.session.getLine(L).length));++L<R;)w.push(this.getLineRange(L,!0));w.push(new g(R,0,R,M.end.column))}S==0&&!this.isBackwards()&&(w=w.reverse())}this.toSingleRange();for(var S=w.length;S--;)this.addRange(w[S])},this.joinSelections=function(){var x=this.rangeList.ranges,w=x[x.length-1],S=g.fromPoints(x[0].start,w.end);this.toSingleRange(),this.setSelectionRange(S,w.cursor==w.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var x=this.rangeList.ranges,w=x[x.length-1],S=g.fromPoints(x[0].start,w.end);this.toSingleRange(),this.setSelectionRange(S,w.cursor==w.start)}else{var M=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(M,L).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(x,w,S){var M=[],L=x.column<w.column;if(L)var R=x.column,$=w.column,D=x.offsetX,T=w.offsetX;else var R=w.column,$=x.column,D=w.offsetX,T=x.offsetX;var E=x.row<w.row;if(E)var C=x.row,b=w.row;else var C=w.row,b=x.row;R<0&&(R=0),C<0&&(C=0),C==b&&(S=!0);for(var A,_=C;_<=b;_++){var O=g.fromPoints(this.session.screenToDocumentPosition(_,R,D),this.session.screenToDocumentPosition(_,$,T));if(O.isEmpty()){if(A&&v(O.end,A))break;A=O.end}O.cursor=L?O.start:O.end,M.push(O)}if(E&&M.reverse(),!S){for(var I=M.length-1;M[I].isEmpty()&&I>0;)I--;if(I>0)for(var N=0;M[N].isEmpty();)N++;for(var F=I;F>=N;F--)M[F].isEmpty()&&M.splice(F,1)}return M}}).call(c.prototype);var p=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(x){x.cursor||(x.cursor=x.end);var w=this.getSelectionStyle();return x.marker=this.session.addMarker(x,"ace_selection",w),this.session.$selectionMarkers.push(x),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,x},this.removeSelectionMarker=function(x){if(x.marker){this.session.removeMarker(x.marker);var w=this.session.$selectionMarkers.indexOf(x);w!=-1&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(x){for(var w=this.session.$selectionMarkers,S=x.length;S--;){var M=x[S];if(M.marker){this.session.removeMarker(M.marker);var L=w.indexOf(M);L!=-1&&w.splice(L,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(x){this.addSelectionMarker(x.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(x){this.removeSelectionMarkers(x.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(x){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(d.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(x){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(d.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(x){var w=x.command,S=x.editor;if(S.multiSelect){if(w.multiSelectAction)w.multiSelectAction=="forEach"?M=S.forEachSelection(w,x.args):w.multiSelectAction=="forEachLine"?M=S.forEachSelection(w,x.args,!0):w.multiSelectAction=="single"?(S.exitMultiSelectMode(),M=w.exec(S,x.args||{})):M=w.multiSelectAction(S,x.args||{});else{var M=w.exec(S,x.args||{});S.multiSelect.addRange(S.multiSelect.toOrientedRange()),S.multiSelect.mergeOverlappingRanges()}return M}},this.forEachSelection=function(x,w,S){if(!this.inVirtualSelectionMode){var M=S&&S.keepOrder,L=S==!0||S&&S.$byLines,R=this.session,$=this.selection,D=$.rangeList,T=(M?$:D).ranges,E;if(!T.length)return x.exec?x.exec(this,w||{}):x(this,w||{});var C=$._eventRegistry;$._eventRegistry={};var b=new c(R);this.inVirtualSelectionMode=!0;for(var A=T.length;A--;){if(L)for(;A>0&&T[A].start.row==T[A-1].end.row;)A--;b.fromOrientedRange(T[A]),b.index=A,this.selection=R.selection=b;var _=x.exec?x.exec(this,w||{}):x(this,w||{});!E&&_!==void 0&&(E=_),b.toOrientedRange(T[A])}b.detach(),this.selection=R.selection=$,this.inVirtualSelectionMode=!1,$._eventRegistry=C,$.mergeOverlappingRanges(),$.ranges[0]&&$.fromOrientedRange($.ranges[0]);var O=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),O&&O.from==O.to&&this.renderer.animateScrolling(O.from),E}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var x="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,S=[],M=0;M<w.length;M++)S.push(this.session.getTextRange(w[M]));var L=this.session.getDocument().getNewLineCharacter();x=S.join(L),x.length==(S.length-1)*L.length&&(x="")}else this.selection.isEmpty()||(x=this.session.getTextRange(this.getSelectionRange()));return x},this.$checkMultiselectChange=function(x,w){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var S=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&w==this.multiSelect.anchor)return;var M=w==this.multiSelect.anchor?S.cursor==S.start?S.end:S.start:S.cursor;M.row!=w.row||this.session.$clipPositionToDocument(M.row,M.column).column!=w.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(x,w,S){if(w=w||{},w.needle=x||w.needle,w.needle==null){var M=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();w.needle=this.session.getTextRange(M)}this.$search.set(w);var L=this.$search.findAll(this.session);if(!L.length)return 0;var R=this.multiSelect;S||R.toSingleRange(L[0]);for(var $=L.length;$--;)R.addRange(L[$],!0);return M&&R.rangeList.rangeAtPoint(M.start)&&R.addRange(M,!0),L.length},this.selectMoreLines=function(x,w){var S=this.selection.toOrientedRange(),M=S.cursor==S.end,L=this.session.documentToScreenPosition(S.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var R=this.session.screenToDocumentPosition(L.row+x,L.column);if(S.isEmpty())var D=R;else var $=this.session.documentToScreenPosition(M?S.end:S.start),D=this.session.screenToDocumentPosition($.row+x,$.column);if(M){var T=g.fromPoints(R,D);T.cursor=T.start}else{var T=g.fromPoints(D,R);T.cursor=T.end}if(T.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(S);else if(w)var E=S.cursor;this.selection.addRange(T),E&&this.selection.substractPoint(E)},this.transposeSelections=function(x){for(var w=this.session,S=w.multiSelect,M=S.ranges,L=M.length;L--;){var R=M[L];if(R.isEmpty()){var $=w.getWordRange(R.start.row,R.start.column);R.start.row=$.start.row,R.start.column=$.start.column,R.end.row=$.end.row,R.end.column=$.end.column}}S.mergeOverlappingRanges();for(var D=[],L=M.length;L--;){var R=M[L];D.unshift(w.getTextRange(R))}x<0?D.unshift(D.pop()):D.push(D.shift());for(var L=M.length;L--;){var R=M[L],T=R.clone();w.replace(R,D[L]),R.start.row=T.start.row,R.start.column=T.start.column}S.fromOrientedRange(S.ranges[0])},this.selectMore=function(x,w,S){var M=this.session,L=M.multiSelect.toOrientedRange();if(!(L.isEmpty()&&(L=M.getWordRange(L.start.row,L.start.column),L.cursor=x==-1?L.start:L.end,this.multiSelect.addRange(L),S))){var R=r(M,M.getTextRange(L),x);R&&(R.cursor=x==-1?R.start:R.end,this.session.unfold(R),this.multiSelect.addRange(R),this.renderer.scrollCursorIntoView(null,.5)),w&&this.multiSelect.substractPoint(L.cursor)}},this.alignCursors=function(){var x=this.session,w=x.multiSelect,S=w.ranges,M=-1,L=S.filter(function(I){if(I.cursor.row==M)return!0;M=I.cursor.row});if(!S.length||L.length==S.length-1){var R=this.selection.getRange(),$=R.start.row,D=R.end.row,T=$==D;if(T){var E=this.session.getLength(),C;do C=this.session.getLine(D);while(/[=:]/.test(C)&&++D<E);do C=this.session.getLine($);while(/[=:]/.test(C)&&--$>0);$<0&&($=0),D>=E&&(D=E-1)}var b=this.session.removeFullLines($,D);b=this.$reAlignText(b,T),this.session.insert({row:$,column:0},b.join(`
2099
2116
  `)+`
2100
- `),w||(L.start.column=0,L.end.column=x[x.length-1].length),this.selection.setRange(L)}else{R.forEach(function(I){A.substractPoint(I.cursor)});var _=0,k=1/0,O=S.map(function(I){var N=I.cursor,P=$.getLine(N.row),B=P.substr(N.column).search(/\S/g);return B==-1&&(B=0),N.column>_&&(_=N.column),B<k&&(k=B),B});S.forEach(function(I,N){var P=I.cursor,B=_-P.column,F=O[N]-k;B>F?$.insert(P,r.stringRepeat(" ",B-F)):$.remove(new g(P.row,P.column,P.row,P.column-B+F)),I.start.column=I.end.column=_,I.start.row=I.end.row=P.row,I.cursor=I.end}),A.fromOrientedRange(S[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,A){var S=!0,M=!0,R,L,T;return $.map(function(x){var _=x.match(/(\s*)(.*?)(\s*)([=:].*)/);return _?R==null?(R=_[1].length,L=_[2].length,T=_[3].length,_):(R+L+T!=_[1].length+_[2].length+_[3].length&&(M=!1),R!=_[1].length&&(S=!1),R>_[1].length&&(R=_[1].length),L<_[2].length&&(L=_[2].length),T>_[3].length&&(T=_[3].length),_):[x]}).map(A?w:S?M?v:w:C);function D(x){return r.stringRepeat(" ",x)}function w(x){return x[2]?D(R)+x[2]+D(L-x[2].length+T)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}function v(x){return x[2]?D(R+L-x[2].length)+x[2]+D(T)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}function C(x){return x[2]?D(R)+x[2]+D(T)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}}}).call(f.prototype);function y($,A){return $.row==A.row&&$.column==A.column}n.onSessionChange=function($){var A=$.session;A&&!A.multiSelect&&(A.$selectionMarkers=[],A.selection.$initRangeList(),A.multiSelect=A.selection),this.multiSelect=A&&A.multiSelect;var S=$.oldSession;S&&(S.multiSelect.off("addRange",this.$onAddRange),S.multiSelect.off("removeRange",this.$onRemoveRange),S.multiSelect.off("multiSelect",this.$onMultiSelect),S.multiSelect.off("singleSelect",this.$onSingleSelect),S.multiSelect.lead.off("change",this.$checkMultiselectChange),S.multiSelect.anchor.off("change",this.$checkMultiselectChange)),A&&(A.multiSelect.on("addRange",this.$onAddRange),A.multiSelect.on("removeRange",this.$onRemoveRange),A.multiSelect.on("multiSelect",this.$onMultiSelect),A.multiSelect.on("singleSelect",this.$onSingleSelect),A.multiSelect.lead.on("change",this.$checkMultiselectChange),A.multiSelect.anchor.on("change",this.$checkMultiselectChange)),A&&this.inMultiSelectMode!=A.selection.inMultiSelectMode&&(A.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=n.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",c),$.commands.addCommands(o.defaultCommands),E($))}function E($){if(!$.textInput)return;var A=$.textInput.getElement(),S=!1;d.addListener(A,"keydown",function(R){var L=R.keyCode==18&&!(R.ctrlKey||R.shiftKey||R.metaKey);$.$blockSelectEnabled&&L?S||($.renderer.setMouseCursor("crosshair"),S=!0):S&&M()},$),d.addListener(A,"keyup",M,$),d.addListener(A,"blur",M,$);function M(R){S&&($.renderer.setMouseCursor(""),S=!1)}}n.MultiSelect=b,t("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function($){b(this),$?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,n,p){var h=t("../../range").Range,g=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(m,c,d){var r=m.getLine(d);return this.foldingStartMarker.test(r)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(m,c,d){return null},this.indentationBlock=function(m,c,d){var r=/\S/,o=m.getLine(c),a=o.search(r);if(a!=-1){for(var s=d||o.length,i=m.getLength(),u=c,f=c;++c<i;){var y=m.getLine(c).search(r);if(y!=-1){if(y<=a){var b=m.getTokenAt(c,0);if(!b||b.type!=="string")break}f=c}}if(f>u){var E=m.getLine(f).length;return new h(u,s,f,E)}}},this.openingBracketBlock=function(m,c,d,r,o){var a={row:d,column:r+1},s=m.$findClosingBracket(c,a,o);if(s){var i=m.foldWidgets[s.row];return i==null&&(i=m.getFoldWidget(s.row)),i=="start"&&s.row>a.row&&(s.row--,s.column=m.getLine(s.row).length),h.fromPoints(a,s)}},this.closingBracketBlock=function(m,c,d,r,o){var a={row:d,column:r},s=m.$findOpeningBracket(c,a);if(s)return s.column++,a.column--,h.fromPoints(s,a)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,n,p){var h=t("../lib/dom"),g=t("../range").Range,m=t("../config").nls;function c(r,o,a){for(var s=0,i=r.length-1;s<=i;){var u=s+i>>1,f=a(o,r[u]);if(f>0)s=u+1;else if(f<0)i=u-1;else return u}return-(s+1)}function d(r,o,a){var s=r.getAnnotations().sort(g.comparePoints);if(s.length){var i=c(s,{row:o,column:-1},g.comparePoints);i<0&&(i=-i-1),i>=s.length?i=a>0?0:s.length-1:i===0&&a<0&&(i=s.length-1);var u=s[i];if(!(!u||!a)){if(u.row===o){do u=s[i+=a];while(u&&u.row===o);if(!u)return s.slice()}var f=[];o=u.row;do f[a<0?"unshift":"push"](u),u=s[i+=a];while(u&&u.row==o);return f.length&&f}}}n.showErrorMarker=function(r,o){var a=r.session,s=r.getCursorPosition(),i=s.row,u=a.widgetManager.getWidgetsAtRow(i).filter(function(R){return R.type=="errorMarker"})[0];u?u.destroy():i-=o;var f=d(a,i,o),y;if(f){var b=f[0];s.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,s.row=b.row,y=r.renderer.$gutterLayer.$annotations[s.row]}else{if(u)return;y={displayText:[m("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(s.row),r.selection.moveToPosition(s);var E={row:s.row,fixedWidth:!0,coverGutter:!0,el:h.createElement("div"),type:"errorMarker"},$=E.el.appendChild(h.createElement("div")),A=E.el.appendChild(h.createElement("div"));A.className="error_widget_arrow "+y.className;var S=r.renderer.$cursorLayer.getPixelPosition(s).left;A.style.left=S+r.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",$.className="error_widget "+y.className,y.displayText.forEach(function(R,L){$.appendChild(h.createTextNode(R)),L<y.displayText.length-1&&$.appendChild(h.createElement("br"))}),$.appendChild(h.createElement("div"));var M=function(R,L,T){if(L===0&&(T==="esc"||T==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(M),a.widgetManager.removeLineWidget(E),r.off("changeSelection",E.destroy),r.off("changeSession",E.destroy),r.off("mouseup",E.destroy),r.off("change",E.destroy))},r.keyBinding.addKeyboardHandler(M),r.on("changeSelection",E.destroy),r.on("changeSession",E.destroy),r.on("mouseup",E.destroy),r.on("change",E.destroy),r.session.widgetManager.addLineWidget(E),E.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},h.importCssString(`
2117
+ `),T||(R.start.column=0,R.end.column=b[b.length-1].length),this.selection.setRange(R)}else{L.forEach(function(I){w.substractPoint(I.cursor)});var A=0,_=1/0,O=S.map(function(I){var N=I.cursor,F=x.getLine(N.row).substr(N.column).search(/\S/g);return F==-1&&(F=0),N.column>A&&(A=N.column),F<_&&(_=F),F});S.forEach(function(I,N){var F=I.cursor,z=A-F.column,P=O[N]-_;z>P?x.insert(F,u.stringRepeat(" ",z-P)):x.remove(new g(F.row,F.column,F.row,F.column-z+P)),I.start.column=I.end.column=A,I.start.row=I.end.row=F.row,I.cursor=I.end}),w.fromOrientedRange(S[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(x,w){var S=!0,M=!0,L,R,$;return x.map(function(b){var A=b.match(/(\s*)(.*?)(\s*)([=:].*)/);return A?L==null?(L=A[1].length,R=A[2].length,$=A[3].length,A):(L+R+$!=A[1].length+A[2].length+A[3].length&&(M=!1),L!=A[1].length&&(S=!1),L>A[1].length&&(L=A[1].length),R<A[2].length&&(R=A[2].length),$>A[3].length&&($=A[3].length),A):[b]}).map(w?T:S?M?E:T:C);function D(b){return u.stringRepeat(" ",b)}function T(b){return b[2]?D(L)+b[2]+D(R-b[2].length+$)+b[4].replace(/^([=:])\s+/,"$1 "):b[0]}function E(b){return b[2]?D(L+R-b[2].length)+b[2]+D($)+b[4].replace(/^([=:])\s+/,"$1 "):b[0]}function C(b){return b[2]?D(L)+b[2]+D($)+b[4].replace(/^([=:])\s+/,"$1 "):b[0]}}}).call(p.prototype);function v(x,w){return x.row==w.row&&x.column==w.column}n.onSessionChange=function(x){var w=x.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var S=x.oldSession;S&&(S.multiSelect.off("addRange",this.$onAddRange),S.multiSelect.off("removeRange",this.$onRemoveRange),S.multiSelect.off("multiSelect",this.$onMultiSelect),S.multiSelect.off("singleSelect",this.$onSingleSelect),S.multiSelect.lead.off("change",this.$checkMultiselectChange),S.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(x){x.$multiselectOnSessionChange||(x.$onAddRange=x.$onAddRange.bind(x),x.$onRemoveRange=x.$onRemoveRange.bind(x),x.$onMultiSelect=x.$onMultiSelect.bind(x),x.$onSingleSelect=x.$onSingleSelect.bind(x),x.$multiselectOnSessionChange=n.onSessionChange.bind(x),x.$checkMultiselectChange=x.$checkMultiselectChange.bind(x),x.$multiselectOnSessionChange(x),x.on("changeSession",x.$multiselectOnSessionChange),x.on("mousedown",o),x.commands.addCommands(d.defaultCommands),k(x))}function k(x){if(!x.textInput)return;var w=x.textInput.getElement(),S=!1;h.addListener(w,"keydown",function(L){var R=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);x.$blockSelectEnabled&&R?S||(x.renderer.setMouseCursor("crosshair"),S=!0):S&&M()},x),h.addListener(w,"keyup",M,x),h.addListener(w,"blur",M,x);function M(L){S&&(x.renderer.setMouseCursor(""),S=!1)}}n.MultiSelect=y,t("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(x){y(this),x?this.on("mousedown",o):this.off("mousedown",o)},value:!0},enableBlockSelect:{set:function(x){this.$blockSelectEnabled=x},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,n,m){"use strict";var f=t("../../range").Range,g=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(c,o,h){var u=c.getLine(h);return this.foldingStartMarker.test(u)?"start":o=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(u)?"end":""},this.getFoldWidgetRange=function(c,o,h){return null},this.indentationBlock=function(c,o,h){var u=/\S/,d=c.getLine(o),l=d.search(u);if(l!=-1){for(var s=h||d.length,r=c.getLength(),a=o,p=o;++o<r;){var v=c.getLine(o).search(u);if(v!=-1){if(v<=l){var y=c.getTokenAt(o,0);if(!y||y.type!=="string")break}p=o}}if(p>a){var k=c.getLine(p).length;return new f(a,s,p,k)}}},this.openingBracketBlock=function(c,o,h,u,d){var l={row:h,column:u+1},s=c.$findClosingBracket(o,l,d);if(s){var r=c.foldWidgets[s.row];return r==null&&(r=c.getFoldWidget(s.row)),r=="start"&&s.row>l.row&&(s.row--,s.column=c.getLine(s.row).length),f.fromPoints(l,s)}},this.closingBracketBlock=function(c,o,h,u,d){var l={row:h,column:u},s=c.$findOpeningBracket(o,l);if(s)return s.column++,l.column--,f.fromPoints(s,l)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,n,m){"use strict";var f=t("../lib/dom"),g=t("../range").Range,c=t("../config").nls;function o(u,d,l){for(var s=0,r=u.length-1;s<=r;){var a=s+r>>1,p=l(d,u[a]);if(p>0)s=a+1;else if(p<0)r=a-1;else return a}return-(s+1)}function h(u,d,l){var s=u.getAnnotations().sort(g.comparePoints);if(s.length){var r=o(s,{row:d,column:-1},g.comparePoints);r<0&&(r=-r-1),r>=s.length?r=l>0?0:s.length-1:r===0&&l<0&&(r=s.length-1);var a=s[r];if(!(!a||!l)){if(a.row===d){do a=s[r+=l];while(a&&a.row===d);if(!a)return s.slice()}var p=[];d=a.row;do p[l<0?"unshift":"push"](a),a=s[r+=l];while(a&&a.row==d);return p.length&&p}}}n.showErrorMarker=function(u,d){var l=u.session,s=u.getCursorPosition(),r=s.row,a=l.widgetManager.getWidgetsAtRow(r).filter(function(L){return L.type=="errorMarker"})[0];a?a.destroy():r-=d;var p=h(l,r,d),v;if(p){var y=p[0];s.column=(y.pos&&typeof y.column!="number"?y.pos.sc:y.column)||0,s.row=y.row,v=u.renderer.$gutterLayer.$annotations[s.row]}else{if(a)return;v={displayText:[c("error-marker.good-state","Looks good!")],className:"ace_ok"}}u.session.unfold(s.row),u.selection.moveToPosition(s);var k={row:s.row,fixedWidth:!0,coverGutter:!0,el:f.createElement("div"),type:"errorMarker"},x=k.el.appendChild(f.createElement("div")),w=k.el.appendChild(f.createElement("div"));w.className="error_widget_arrow "+v.className;var S=u.renderer.$cursorLayer.getPixelPosition(s).left;w.style.left=S+u.renderer.gutterWidth-5+"px",k.el.className="error_widget_wrapper",x.className="error_widget "+v.className,v.displayText.forEach(function(L,R){x.appendChild(f.createTextNode(L)),R<v.displayText.length-1&&x.appendChild(f.createElement("br"))}),x.appendChild(f.createElement("div"));var M=function(L,R,$){if(R===0&&($==="esc"||$==="return"))return k.destroy(),{command:"null"}};k.destroy=function(){u.$mouseHandler.isMousePressed||(u.keyBinding.removeKeyboardHandler(M),l.widgetManager.removeLineWidget(k),u.off("changeSelection",k.destroy),u.off("changeSession",k.destroy),u.off("mouseup",k.destroy),u.off("change",k.destroy))},u.keyBinding.addKeyboardHandler(M),u.on("changeSelection",k.destroy),u.on("changeSession",k.destroy),u.on("mouseup",k.destroy),u.on("change",k.destroy),u.session.widgetManager.addLineWidget(k),k.el.onmousedown=u.focus.bind(u),u.renderer.scrollCursorIntoView(null,.5,{bottom:k.el.offsetHeight})},f.importCssString(`
2101
2118
  .error_widget_wrapper {
2102
2119
  background: inherit;
2103
2120
  color: inherit;
@@ -2130,17 +2147,17 @@ export const FormManager: React.FC = () => {
2130
2147
  border-left-color: transparent!important;
2131
2148
  top: -5px;
2132
2149
  }
2133
- `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(t,n,p){t("./loader_build")(n);var h=t("./lib/dom"),g=t("./range").Range,m=t("./editor").Editor,c=t("./edit_session").EditSession,d=t("./undomanager").UndoManager,r=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),n.config=t("./config"),n.edit=function(a,s){if(typeof a=="string"){var i=a;if(a=document.getElementById(i),!a)throw new Error("ace.edit can't find div #"+i)}if(a&&a.env&&a.env.editor instanceof m)return a.env.editor;var u="";if(a&&/input|textarea/i.test(a.tagName)){var f=a;u=f.value,a=h.createElement("pre"),f.parentNode.replaceChild(a,f)}else a&&(u=a.textContent,a.innerHTML="");var y=n.createEditSession(u),b=new m(new r(a),y,s),E={document:y,editor:b,onResize:b.resize.bind(b,null)};return f&&(E.textarea=f),b.on("destroy",function(){E.editor.container.env=null}),b.container.env=b.env=E,b},n.createEditSession=function(a,s){var i=new c(a,s);return i.setUndoManager(new d),i},n.Range=g,n.Editor=m,n.EditSession=c,n.UndoManager=d,n.VirtualRenderer=r;var o=n.config.version;n.version=o}),(function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var n=(function(){return this})();!n&&typeof window<"u"&&(n=window),!n&&typeof self<"u"&&(n=self),n.ace||(n.ace=t);for(var p in t)t.hasOwnProperty(p)&&(n.ace[p]=t[p]);n.ace.default=n.ace,l&&(l.exports=n.ace)})})()})(ns)),ns.exports}var fa=Cv();const Sv=Nt(fa),Av="/formeo/assets/js/mode-json.min.js",$v="/formeo/assets/js/theme-github_light_default.min.js";var is,Mu;function xv(){if(Mu)return is;Mu=1;function l(e,t,n,p){var h=-1,g=e==null?0:e.length;for(p&&g&&(n=e[++h]);++h<g;)n=t(n,e[h],h,e);return n}return is=l,is}var rs,Tu;function Ev(){if(Tu)return rs;Tu=1;function l(e){return function(t){return e?.[t]}}return rs=l,rs}var os,_u;function Mv(){if(_u)return os;_u=1;var l=Ev(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},t=l(e);return os=t,os}var ss,Lu;function Tv(){if(Lu)return ss;Lu=1;var l=Mv(),e=Yn(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,n="\\u0300-\\u036f",p="\\ufe20-\\ufe2f",h="\\u20d0-\\u20ff",g=n+p+h,m="["+g+"]",c=RegExp(m,"g");function d(r){return r=e(r),r&&r.replace(t,l).replace(c,"")}return ss=d,ss}var as,Ru;function _v(){if(Ru)return as;Ru=1;var l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(t){return t.match(l)||[]}return as=e,as}var ls,ku;function Lv(){if(ku)return ls;ku=1;var l=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(t){return l.test(t)}return ls=e,ls}var cs,Du;function Rv(){if(Du)return cs;Du=1;var l="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",p=e+t+n,h="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",m="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",r=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="A-Z\\xc0-\\xd6\\xd8-\\xde",a="\\ufe0e\\ufe0f",s=m+c+d+r,i="['’]",u="["+s+"]",f="["+p+"]",y="\\d+",b="["+h+"]",E="["+g+"]",$="[^"+l+s+y+h+g+o+"]",A="\\ud83c[\\udffb-\\udfff]",S="(?:"+f+"|"+A+")",M="[^"+l+"]",R="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+o+"]",D="\\u200d",w="(?:"+E+"|"+$+")",v="(?:"+T+"|"+$+")",C="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",x="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",_=S+"?",k="["+a+"]?",O="(?:"+D+"(?:"+[M,R,L].join("|")+")"+k+_+")*",I="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",P=k+_+O,B="(?:"+[b,R,L].join("|")+")"+P,F=RegExp([T+"?"+E+"+"+C+"(?="+[u,T,"$"].join("|")+")",v+"+"+x+"(?="+[u,T+w,"$"].join("|")+")",T+"?"+w+"+"+C,T+"+"+x,N,I,y,B].join("|"),"g");function H(z){return z.match(F)||[]}return cs=H,cs}var us,Ou;function kv(){if(Ou)return us;Ou=1;var l=_v(),e=Lv(),t=Yn(),n=Rv();function p(h,g,m){return h=t(h),g=m?void 0:g,g===void 0?e(h)?n(h):l(h):h.match(g)||[]}return us=p,us}var hs,Iu;function Dv(){if(Iu)return hs;Iu=1;var l=xv(),e=Tv(),t=kv(),n="['’]",p=RegExp(n,"g");function h(g){return function(m){return l(t(e(m).replace(p,"")),g,"")}}return hs=h,hs}var ds,Nu;function Ov(){if(Nu)return ds;Nu=1;function l(e,t,n){var p=-1,h=e.length;t<0&&(t=-t>h?0:h+t),n=n>h?h:n,n<0&&(n+=h),h=t>n?0:n-t>>>0,t>>>=0;for(var g=Array(h);++p<h;)g[p]=e[p+t];return g}return ds=l,ds}var fs,Fu;function Iv(){if(Fu)return fs;Fu=1;var l=Ov();function e(t,n,p){var h=t.length;return p=p===void 0?h:p,!n&&p>=h?t:l(t,n,p)}return fs=e,fs}var ps,Pu;function hd(){if(Pu)return ps;Pu=1;var l="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",p=e+t+n,h="\\ufe0e\\ufe0f",g="\\u200d",m=RegExp("["+g+l+p+h+"]");function c(d){return m.test(d)}return ps=c,ps}var gs,Hu;function Nv(){if(Hu)return gs;Hu=1;function l(e){return e.split("")}return gs=l,gs}var ms,Wu;function Fv(){if(Wu)return ms;Wu=1;var l="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",p=e+t+n,h="\\ufe0e\\ufe0f",g="["+l+"]",m="["+p+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+m+"|"+c+")",r="[^"+l+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",s="\\u200d",i=d+"?",u="["+h+"]?",f="(?:"+s+"(?:"+[r,o,a].join("|")+")"+u+i+")*",y=u+i+f,b="(?:"+[r+m+"?",m,o,a,g].join("|")+")",E=RegExp(c+"(?="+c+")|"+b+y,"g");function $(A){return A.match(E)||[]}return ms=$,ms}var vs,zu;function Pv(){if(zu)return vs;zu=1;var l=Nv(),e=hd(),t=Fv();function n(p){return e(p)?t(p):l(p)}return vs=n,vs}var ys,Bu;function Hv(){if(Bu)return ys;Bu=1;var l=Iv(),e=hd(),t=Pv(),n=Yn();function p(h){return function(g){g=n(g);var m=e(g)?t(g):void 0,c=m?m[0]:g.charAt(0),d=m?l(m,1).join(""):g.slice(1);return c[h]()+d}}return ys=p,ys}var bs,ju;function Wv(){if(ju)return bs;ju=1;var l=Hv(),e=l("toUpperCase");return bs=e,bs}var ws,Vu;function zv(){if(Vu)return ws;Vu=1;var l=Dv(),e=Wv(),t=l(function(n,p,h){return n+(h?" ":"")+e(p)});return ws=t,ws}var Bv=zv();const jv=Nt(Bv);fa.config.setModuleUrl("ace/mode/json",Av);fa.config.setModuleUrl("ace/theme/github_light_default",$v);const rt=Sv.edit("formData-editor");rt.session.setOption("useWorker",!1);rt.setOptions({theme:"ace/theme/github_light_default",mode:"ace/mode/json"});const Vv=document.getElementById("submit-formData"),Uv=document.getElementById("formData-popover"),Gv=document.getElementById("editor-action-buttons"),qv=(l,e)=>({renderForm:()=>{const t=document.querySelector(".render-form");t.style.display="block",e.render(l.formData)},getHtml:()=>{e.formData=l.formData;const t=e.html,n=window.open("","_blank");n.document.body.innerHTML=t},getUserData:()=>{console.log(e.userData),console.log("User Form Data:",e.userFormData)},resetEditor:()=>{window.sessionStorage.removeItem("formeo-formData"),window.location.reload()},editData:()=>{rt.setValue(JSON.stringify(l.formData,null,2),1)}}),Kv={editData:{popovertarget:"formData-popover"}},Yv=l=>{const e=Kv[l]||{};return{id:l,type:"button",...e}},Zv=(l,e)=>{Vv.addEventListener("click",()=>{l.formData=rt.session.getValue(),Uv.hidePopover()});const t=qv(l,e);return Object.entries(t).map(([p,h])=>{const g=Yv(p),m=Object.assign(document.createElement("button"),g);for(const[d,r]of Object.entries(g))m.setAttribute(d,r);const c=document.createTextNode(jv(p));return m.appendChild(c),m.addEventListener("click",h,!1),Gv.appendChild(m),m})};document.getElementById("format-json").addEventListener("click",Xv);document.getElementById("collapse-json").addEventListener("click",Qv);document.getElementById("copy-json").addEventListener("click",Jv);function Xv(){const l=rt.session.getValue(),e=JSON.parse(l);rt.setValue(JSON.stringify(e,null,2),1)}function Qv(){const l=rt.session.getValue(),e=JSON.parse(l);rt.setValue(JSON.stringify(e,null,0),1)}async function Jv({target:l}){const e=l.textContent;l.textContent="Copied!";const t=setTimeout(()=>{l.textContent=e,clearTimeout(t)},3e3);try{await navigator.clipboard.writeText(rt.session.getValue()),console.log("Text copied to clipboard")}catch(n){console.error("Failed to copy: ",n)}}const ey=l=>{const e=document.getElementById("control-filter"),t=document.getElementById("locale"),n=globalThis.sessionStorage.getItem("formeo-locale"),p=({target:{value:g}})=>l.controls.actions.filter(g),h=({target:{value:g}})=>{globalThis.sessionStorage.setItem("formeo-locale",g),l.i18n.setLang(g)};e.addEventListener("input",p),t.value=n||"en-US",t.addEventListener("change",h,!1)};async function ty(l){l.innerHTML=`
2150
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(t,n,m){"use strict";t("./loader_build")(n);var f=t("./lib/dom"),g=t("./range").Range,c=t("./editor").Editor,o=t("./edit_session").EditSession,h=t("./undomanager").UndoManager,u=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),n.config=t("./config"),n.edit=function(d,l){if(typeof d=="string"){var s=d;if(d=document.getElementById(s),!d)throw new Error("ace.edit can't find div #"+s)}if(d&&d.env&&d.env.editor instanceof c)return d.env.editor;var r="";if(d&&/input|textarea/i.test(d.tagName)){var a=d;r=a.value,d=f.createElement("pre"),a.parentNode.replaceChild(d,a)}else d&&(r=d.textContent,d.innerHTML="");var p=n.createEditSession(r),v=new c(new u(d),p,l),y={document:p,editor:v,onResize:v.resize.bind(v,null)};return a&&(y.textarea=a),v.on("destroy",function(){y.editor.container.env=null}),v.container.env=v.env=y,v},n.createEditSession=function(d,l){var s=new o(d,l);return s.setUndoManager(new h),s},n.Range=g,n.Editor=c,n.EditSession=o,n.UndoManager=h,n.VirtualRenderer=u,n.version=n.config.version}),(function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var n=(function(){return this})();!n&&typeof window<"u"&&(n=window),!n&&typeof self<"u"&&(n=self),n.ace||(n.ace=t);for(var m in t)t.hasOwnProperty(m)&&(n.ace[m]=t[m]);n.ace.default=n.ace,typeof i=="object"&&typeof e=="object"&&i&&(i.exports=n.ace)})})()})),sr=Et(Nu(),1),Fu="/formeo/assets/js/mode-json.min.js",zu="/formeo/assets/js/theme-github_light_default.min.js",Pu=j(((e,i)=>{function t(n,m,f,g){var c=-1,o=n==null?0:n.length;for(g&&o&&(f=n[++c]);++c<o;)f=m(f,n[c],c,n);return f}i.exports=t})),Hu=j(((e,i)=>{function t(n){return function(m){return n?.[m]}}i.exports=t})),Wu=j(((e,i)=>{var t=Hu()({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});i.exports=t})),Bu=j(((e,i)=>{var t=Wu(),n=_i(),m=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,f=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function g(c){return c=n(c),c&&c.replace(m,t).replace(f,"")}i.exports=g})),ju=j(((e,i)=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(m){return m.match(t)||[]}i.exports=n})),Vu=j(((e,i)=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(m){return t.test(m)}i.exports=n})),Uu=j(((e,i)=>{var t="\\ud800-\\udfff",n="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",m="\\u2700-\\u27bf",f="a-z\\xdf-\\xf6\\xf8-\\xff",g="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",o="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",u="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\ufe0e\\ufe0f",l=g+c+o+h,s="['’]",r="["+l+"]",a="["+n+"]",p="\\d+",v="["+m+"]",y="["+f+"]",k="[^"+t+l+p+m+f+u+"]",x="(?:"+a+"|\\ud83c[\\udffb-\\udfff])",w="[^"+t+"]",S="(?:\\ud83c[\\udde6-\\uddff]){2}",M="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+u+"]",R="\\u200d",$="(?:"+y+"|"+k+")",D="(?:"+L+"|"+k+")",T="(?:"+s+"(?:d|ll|m|re|s|t|ve))?",E="(?:"+s+"(?:D|LL|M|RE|S|T|VE))?",C=x+"?",b="["+d+"]?",A="(?:"+R+"(?:"+[w,S,M].join("|")+")"+b+C+")*",_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",O="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",I=b+C+A,N="(?:"+[v,S,M].join("|")+")"+I,F=RegExp([L+"?"+y+"+"+T+"(?="+[r,L,"$"].join("|")+")",D+"+"+E+"(?="+[r,L+$,"$"].join("|")+")",L+"?"+$+"+"+T,L+"+"+E,O,_,p,N].join("|"),"g");function z(P){return P.match(F)||[]}i.exports=z})),Gu=j(((e,i)=>{var t=ju(),n=Vu(),m=_i(),f=Uu();function g(c,o,h){return c=m(c),o=h?void 0:o,o===void 0?n(c)?f(c):t(c):c.match(o)||[]}i.exports=g})),Ku=j(((e,i)=>{var t=Pu(),n=Bu(),m=Gu(),f=RegExp("['’]","g");function g(c){return function(o){return t(m(n(o).replace(f,"")),c,"")}}i.exports=g})),qu=j(((e,i)=>{function t(n,m,f){var g=-1,c=n.length;m<0&&(m=-m>c?0:c+m),f=f>c?c:f,f<0&&(f+=c),c=m>f?0:f-m>>>0,m>>>=0;for(var o=Array(c);++g<c;)o[g]=n[g+m];return o}i.exports=t})),Yu=j(((e,i)=>{var t=qu();function n(m,f,g){var c=m.length;return g=g===void 0?c:g,!f&&g>=c?m:t(m,f,g)}i.exports=n})),ds=j(((e,i)=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function n(m){return t.test(m)}i.exports=n})),Zu=j(((e,i)=>{function t(n){return n.split("")}i.exports=t})),Qu=j(((e,i)=>{var t="\\ud800-\\udfff",n="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",m="\\ufe0e\\ufe0f",f="["+t+"]",g="["+n+"]",c="\\ud83c[\\udffb-\\udfff]",o="(?:"+g+"|"+c+")",h="[^"+t+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",s=o+"?",r="["+m+"]?",a="(?:"+l+"(?:"+[h,u,d].join("|")+")"+r+s+")*",p=r+s+a,v="(?:"+[h+g+"?",g,u,d,f].join("|")+")",y=RegExp(c+"(?="+c+")|"+v+p,"g");function k(x){return x.match(y)||[]}i.exports=k})),Xu=j(((e,i)=>{var t=Zu(),n=ds(),m=Qu();function f(g){return n(g)?m(g):t(g)}i.exports=f})),Ju=j(((e,i)=>{var t=Yu(),n=ds(),m=Xu(),f=_i();function g(c){return function(o){o=f(o);var h=n(o)?m(o):void 0,u=h?h[0]:o.charAt(0),d=h?t(h,1).join(""):o.slice(1);return u[c]()+d}}i.exports=g})),eh=j(((e,i)=>{var t=Ju()("toUpperCase");i.exports=t})),th=j(((e,i)=>{var t=Ku(),n=eh(),m=t(function(f,g,c){return f+(c?" ":"")+n(g)});i.exports=m})),ih=Et(th(),1);sr.config.setModuleUrl("ace/mode/json",Fu);sr.config.setModuleUrl("ace/theme/github_light_default",zu);var qe=sr.default.edit("formData-editor");qe.session.setOption("useWorker",!1);qe.setOptions({theme:"ace/theme/github_light_default",mode:"ace/mode/json"});var nh=document.getElementById("submit-formData"),rh=document.getElementById("formData-popover"),oh=document.getElementById("editor-action-buttons"),sh=(e,i)=>({renderForm:()=>{const t=document.querySelector(".render-form");t.style.display="block",i.render(e.formData)},getHtml:()=>{i.formData=e.formData;const t=i.html,n=window.open("","_blank");n.document.body.innerHTML=t},getUserData:()=>{console.log(i.userData),console.log("User Form Data:",i.userFormData)},resetEditor:()=>{window.sessionStorage.removeItem("formeo-formData"),window.location.reload()},editData:()=>{qe.setValue(JSON.stringify(e.formData,null,2),1)}}),ah={editData:{popovertarget:"formData-popover"}},lh=e=>({id:e,type:"button",...ah[e]||{}}),ch=(e,i)=>{nh.addEventListener("click",()=>{e.formData=qe.session.getValue(),rh.hidePopover()});const t=sh(e,i);return Object.entries(t).map(([n,m])=>{const f=lh(n),g=Object.assign(document.createElement("button"),f);for(const[o,h]of Object.entries(f))g.setAttribute(o,h);const c=document.createTextNode((0,ih.default)(n));return g.appendChild(c),g.addEventListener("click",m,!1),oh.appendChild(g),g})};document.getElementById("format-json").addEventListener("click",dh);document.getElementById("collapse-json").addEventListener("click",uh);document.getElementById("copy-json").addEventListener("click",hh);function dh(){const e=qe.session.getValue(),i=JSON.parse(e);qe.setValue(JSON.stringify(i,null,2),1)}function uh(){const e=qe.session.getValue(),i=JSON.parse(e);qe.setValue(JSON.stringify(i,null,0),1)}async function hh({target:e}){const i=e.textContent;e.textContent="Copied!";const t=setTimeout(()=>{e.textContent=i,clearTimeout(t)},3e3);try{await navigator.clipboard.writeText(qe.session.getValue()),console.log("Text copied to clipboard")}catch(n){console.error("Failed to copy: ",n)}}var ph=e=>{const i=document.getElementById("control-filter"),t=document.getElementById("locale"),n=globalThis.sessionStorage.getItem("formeo-locale"),m=({target:{value:g}})=>e.controls.actions.filter(g),f=({target:{value:g}})=>{globalThis.sessionStorage.setItem("formeo-locale",g),e.i18n.setLang(g)};i.addEventListener("input",m),t.value=n||"en-US",t.addEventListener("change",f,!1)};async function fh(e){e.innerHTML=`
2134
2151
  <form class="build-form"></form>
2135
2152
  <div class="render-form"></div>
2136
- `;const e=new ua(an),t=new ha(da);return Zv(e,t),ey(e),{editor:e,renderer:t,cleanup:()=>{e?.destroy&&e.destroy(),t?.destroy&&t.destroy();const n=document.getElementById("editor-action-buttons");n&&(n.innerHTML="")}}}class ny{constructor(){if(this.currentFramework=null,this.frameworkContainer=document.getElementById("framework-container"),this.frameworkSelect=document.getElementById("framework-select"),this.currentDemo=null,this.isLoading=!1,this.validFrameworks=["vanilla","angular","react"],!this.frameworkContainer){console.error("Framework container not found");return}if(!this.frameworkSelect){console.error("Framework selector not found");return}this.init()}init(){this.frameworkSelect.addEventListener("change",t=>{this.switchFramework(t.target.value)}),window.addEventListener("popstate",()=>{const t=this.getFrameworkFromURL();this.switchFramework(t,{updateURL:!1})});const e=this.getFrameworkFromURL();this.switchFramework(e)}async switchFramework(e,t={}){const{updateURL:n=!0}=t;if(this.isLoading){console.warn("Framework switch already in progress");return}if(!(this.currentFramework===e&&this.currentDemo!==null)){this.isLoading=!0,this.showLoadingState();try{switch(await this.cleanupCurrentDemo(),this.frameworkContainer.innerHTML="",e){case"vanilla":this.currentDemo=await ty(this.frameworkContainer);break;case"angular":this.currentDemo=await ov(this.frameworkContainer);break;case"react":this.currentDemo=await fv(this.frameworkContainer);break;default:throw new Error(`Unknown framework: ${e}`)}this.currentFramework=e,this.syncFrameworkSelector(e),n&&this.updateURL(e),console.log(`Loaded ${e} demo successfully`)}catch(p){console.error(`Failed to load ${e} demo:`,p),this.showErrorState(e,p)}finally{this.isLoading=!1}}}async cleanupCurrentDemo(){if(this.currentDemo?.cleanup)try{await Promise.resolve(this.currentDemo.cleanup())}catch(e){console.warn("Error during demo cleanup:",e)}this.currentDemo=null}syncFrameworkSelector(e){this.frameworkSelect.value!==e&&(this.frameworkSelect.value=e)}getFrameworkFromURL(){const t=new URLSearchParams(window.location.search).get("framework");return t&&this.validFrameworks.includes(t)?t:"vanilla"}updateURL(e){const t=new URL(window.location);e==="vanilla"?t.searchParams.delete("framework"):t.searchParams.set("framework",e),window.history.pushState({framework:e},"",t.toString())}showLoadingState(){this.frameworkContainer.innerHTML=`
2153
+ `;const i=new nr(jt),t=new rr(or);return ch(i,t),ph(i),{editor:i,renderer:t,cleanup:()=>{i?.destroy&&i.destroy(),t?.destroy&&t.destroy();const n=document.getElementById("editor-action-buttons");n&&(n.innerHTML="")}}}var gh=class{constructor(){if(this.currentFramework=null,this.frameworkContainer=document.getElementById("framework-container"),this.frameworkSelect=document.getElementById("framework-select"),this.currentDemo=null,this.isLoading=!1,this.validFrameworks=["vanilla","angular","react"],!this.frameworkContainer){console.error("Framework container not found");return}if(!this.frameworkSelect){console.error("Framework selector not found");return}this.init()}init(){this.frameworkSelect.addEventListener("change",i=>{this.switchFramework(i.target.value)}),window.addEventListener("popstate",()=>{const i=this.getFrameworkFromURL();this.switchFramework(i,{updateURL:!1})});const e=this.getFrameworkFromURL();this.switchFramework(e)}async switchFramework(e,i={}){const{updateURL:t=!0}=i;if(this.isLoading){console.warn("Framework switch already in progress");return}if(!(this.currentFramework===e&&this.currentDemo!==null)){this.isLoading=!0,this.showLoadingState();try{switch(await this.cleanupCurrentDemo(),this.frameworkContainer.innerHTML="",e){case"vanilla":this.currentDemo=await fh(this.frameworkContainer);break;case"angular":this.currentDemo=await wu(this.frameworkContainer);break;case"react":this.currentDemo=await Mu(this.frameworkContainer);break;default:throw new Error(`Unknown framework: ${e}`)}this.currentFramework=e,this.syncFrameworkSelector(e),t&&this.updateURL(e),console.log(`Loaded ${e} demo successfully`)}catch(n){console.error(`Failed to load ${e} demo:`,n),this.showErrorState(e,n)}finally{this.isLoading=!1}}}async cleanupCurrentDemo(){if(this.currentDemo?.cleanup)try{await Promise.resolve(this.currentDemo.cleanup())}catch(e){console.warn("Error during demo cleanup:",e)}this.currentDemo=null}syncFrameworkSelector(e){this.frameworkSelect.value!==e&&(this.frameworkSelect.value=e)}getFrameworkFromURL(){const e=new URLSearchParams(window.location.search).get("framework");return e&&this.validFrameworks.includes(e)?e:"vanilla"}updateURL(e){const i=new URL(window.location);e==="vanilla"?i.searchParams.delete("framework"):i.searchParams.set("framework",e),window.history.pushState({framework:e},"",i.toString())}showLoadingState(){this.frameworkContainer.innerHTML=`
2137
2154
  <div class="loading-message">
2138
2155
  <p>Loading ${this.frameworkSelect.options[this.frameworkSelect.selectedIndex]?.text||"framework"} demo...</p>
2139
2156
  </div>
2140
- `}showErrorState(e,t){this.frameworkContainer.innerHTML=`
2157
+ `}showErrorState(e,i){this.frameworkContainer.innerHTML=`
2141
2158
  <div class="error-message">
2142
2159
  <h3>Failed to load ${e} demo</h3>
2143
- <p>${t.message}</p>
2160
+ <p>${i.message}</p>
2144
2161
  <button class="retry-button" onclick="window.frameworkLoader?.switchFramework('${e}')">Retry</button>
2145
2162
  </div>
2146
- `}}document.addEventListener("DOMContentLoaded",()=>{window.frameworkLoader=new ny});export{Dm as C,Ue as a,X as m,Je as t};
2163
+ `}};document.addEventListener("DOMContentLoaded",()=>{window.frameworkLoader=new gh});export{Z as i,je as n,De as r,qd as t};