diff --git a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowBusinessKeyController.java b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowBusinessKeyController.java index b185b181..e577e39c 100644 --- a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowBusinessKeyController.java +++ b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowBusinessKeyController.java @@ -31,7 +31,7 @@ import java.util.stream.Collectors; @Slf4j @Api(tags = "业务工作流程") @RestController -@RequestMapping("/flowable/businessKey") +@RequestMapping("/businessKey") public class FlowBusinessKeyController extends BaseController { @Autowired diff --git a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowDefinitionController.java b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowDefinitionController.java index 5bca19f9..f75c330c 100644 --- a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowDefinitionController.java +++ b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowDefinitionController.java @@ -49,7 +49,7 @@ import java.util.Map; @Slf4j @Api(tags = "流程定义") @RestController -@RequestMapping("/flowable/definition") +@RequestMapping("/definition") public class FlowDefinitionController extends BaseController { @Autowired diff --git a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowInstanceController.java b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowInstanceController.java index b57dfaca..4e53b163 100644 --- a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowInstanceController.java +++ b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowInstanceController.java @@ -21,7 +21,7 @@ import java.util.Map; @Slf4j @Api(tags = "工作流流程实例管理") @RestController -@RequestMapping("/flowable/instance") +@RequestMapping("/instance") public class FlowInstanceController { @Autowired diff --git a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowTaskController.java b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowTaskController.java index 85c15777..1d897d17 100644 --- a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowTaskController.java +++ b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/FlowTaskController.java @@ -30,7 +30,7 @@ import java.io.OutputStream; @Slf4j @Api(tags = "工作流流程任务管理") @RestController -@RequestMapping("/flowable/task") +@RequestMapping("/task") public class FlowTaskController { @Autowired diff --git a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/SysFormController.java b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/SysFormController.java index 057f445b..3c819b30 100644 --- a/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/SysFormController.java +++ b/yanzhu-modules/yanzhu-flowable/src/main/java/com/yanzhu/flowable/controller/SysFormController.java @@ -24,7 +24,7 @@ import java.util.List; * @date 2021-04-03 */ @RestController -@RequestMapping("/flowable/form") +@RequestMapping("/form") public class SysFormController extends BaseController { @Autowired @@ -100,7 +100,6 @@ public class SysFormController extends BaseController { return toAjax(SysFormService.deleteSysFormByIds(formIds)); } - /** * 挂载流程表单 */ diff --git a/yanzhu-ui-vue3/package.json b/yanzhu-ui-vue3/package.json index 6fedee63..b9d7c491 100644 --- a/yanzhu-ui-vue3/package.json +++ b/yanzhu-ui-vue3/package.json @@ -23,6 +23,7 @@ "bpmn-js": "^8.10.0", "bpmn-js-task-resize": "^1.2.0", "bpmn-js-token-simulation": "^0.10.0", + "codemirror-editor-vue3": "^2.0.6", "echarts": "5.4.0", "element-plus": "2.2.27", "file-saver": "2.0.5", @@ -44,6 +45,8 @@ "vite": "3.2.3", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", - "vite-plugin-vue-setup-extend": "0.4.0" + "vite-plugin-vue-setup-extend": "0.4.0", + "vue-eslint-parser": "9.1.0", + "vue-tsc": "0.35.0" } } diff --git a/yanzhu-ui-vue3/src/lib/vform/designer.umd.js b/yanzhu-ui-vue3/src/lib/vform/designer.umd.js new file mode 100644 index 00000000..ed9b7ab5 --- /dev/null +++ b/yanzhu-ui-vue3/src/lib/vform/designer.umd.js @@ -0,0 +1,1601 @@ +var Ae=Object.defineProperty,Re=Object.defineProperties;var Fe=Object.getOwnPropertyDescriptors;var Me=Object.getOwnPropertySymbols;var Ne=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable;var qe=(n,d,e)=>d in n?Ae(n,d,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[d]=e,xe=(n,d)=>{for(var e in d||(d={}))Ne.call(d,e)&&qe(n,e,d[e]);if(Me)for(var e of Me(d))Ie.call(d,e)&&qe(n,e,d[e]);return n},ke=(n,d)=>Re(n,Fe(d));(function(n,d){typeof exports=="object"&&typeof module!="undefined"?module.exports=d(require("vue")):typeof define=="function"&&define.amd?define(["vue"],d):(n=typeof globalThis!="undefined"?globalThis:n||self,n.VFormDesigner=d(n.Vue))})(this,function(require$$0$1){"use strict";function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var require$$0__default=_interopDefaultLegacy(require$$0$1),commonjsGlobal=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function getDefaultExportFromCjs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var axios$2={exports:{}},bind$2=function(d,e){return function(){for(var m=new Array(arguments.length),g=0;g=0)return;p==="set-cookie"?e[p]=(e[p]?e[p]:[]).concat([m]):e[p]=e[p]?e[p]+", "+m:m}}),e},utils$7=utils$d,isURLSameOrigin$1=utils$7.isStandardBrowserEnv()?function(){var d=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a"),p;function m(g){var a=g;return d&&(e.setAttribute("href",a),a=e.href),e.setAttribute("href",a),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return p=m(window.location.href),function(a){var c=utils$7.isString(a)?m(a):a;return c.protocol===p.protocol&&c.host===p.host}}():function(){return function(){return!0}}();function Cancel$3(n){this.message=n}Cancel$3.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel$3.prototype.__CANCEL__=!0;var Cancel_1=Cancel$3,utils$6=utils$d,settle=settle$1,cookies=cookies$1,buildURL$1=buildURL$2,buildFullPath=buildFullPath$1,parseHeaders=parseHeaders$1,isURLSameOrigin=isURLSameOrigin$1,createError=createError$2,defaults$5=defaults_1,Cancel$2=Cancel_1,xhr=function(d){return new Promise(function(p,m){var g=d.data,a=d.headers,c=d.responseType,i;function u(){d.cancelToken&&d.cancelToken.unsubscribe(i),d.signal&&d.signal.removeEventListener("abort",i)}utils$6.isFormData(g)&&delete a["Content-Type"];var r=new XMLHttpRequest;if(d.auth){var t=d.auth.username||"",l=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";a.Authorization="Basic "+btoa(t+":"+l)}var o=buildFullPath(d.baseURL,d.url);r.open(d.method.toUpperCase(),buildURL$1(o,d.params,d.paramsSerializer),!0),r.timeout=d.timeout;function s(){if(!!r){var h="getAllResponseHeaders"in r?parseHeaders(r.getAllResponseHeaders()):null,v=!c||c==="text"||c==="json"?r.responseText:r.response,$={data:v,status:r.status,statusText:r.statusText,headers:h,config:d,request:r};settle(function(b){p(b),u()},function(b){m(b),u()},$),r=null}}if("onloadend"in r?r.onloadend=s:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(s)},r.onabort=function(){!r||(m(createError("Request aborted",d,"ECONNABORTED",r)),r=null)},r.onerror=function(){m(createError("Network Error",d,null,r)),r=null},r.ontimeout=function(){var v=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",$=d.transitional||defaults$5.transitional;d.timeoutErrorMessage&&(v=d.timeoutErrorMessage),m(createError(v,d,$.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",r)),r=null},utils$6.isStandardBrowserEnv()){var f=(d.withCredentials||isURLSameOrigin(o))&&d.xsrfCookieName?cookies.read(d.xsrfCookieName):void 0;f&&(a[d.xsrfHeaderName]=f)}"setRequestHeader"in r&&utils$6.forEach(a,function(v,$){typeof g=="undefined"&&$.toLowerCase()==="content-type"?delete a[$]:r.setRequestHeader($,v)}),utils$6.isUndefined(d.withCredentials)||(r.withCredentials=!!d.withCredentials),c&&c!=="json"&&(r.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&r.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&r.upload&&r.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(i=function(h){!r||(m(!h||h&&h.type?new Cancel$2("canceled"):h),r.abort(),r=null)},d.cancelToken&&d.cancelToken.subscribe(i),d.signal&&(d.signal.aborted?i():d.signal.addEventListener("abort",i))),g||(g=null),r.send(g)})},utils$5=utils$d,normalizeHeaderName=normalizeHeaderName$1,enhanceError=enhanceError$2,DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(n,d){!utils$5.isUndefined(n)&&utils$5.isUndefined(n["Content-Type"])&&(n["Content-Type"]=d)}function getDefaultAdapter(){var n;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(n=xhr),n}function stringifySafely(n,d,e){if(utils$5.isString(n))try{return(d||JSON.parse)(n),utils$5.trim(n)}catch(p){if(p.name!=="SyntaxError")throw p}return(e||JSON.stringify)(n)}var defaults$4={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:getDefaultAdapter(),transformRequest:[function(d,e){return normalizeHeaderName(e,"Accept"),normalizeHeaderName(e,"Content-Type"),utils$5.isFormData(d)||utils$5.isArrayBuffer(d)||utils$5.isBuffer(d)||utils$5.isStream(d)||utils$5.isFile(d)||utils$5.isBlob(d)?d:utils$5.isArrayBufferView(d)?d.buffer:utils$5.isURLSearchParams(d)?(setContentTypeIfUnset(e,"application/x-www-form-urlencoded;charset=utf-8"),d.toString()):utils$5.isObject(d)||e&&e["Content-Type"]==="application/json"?(setContentTypeIfUnset(e,"application/json"),stringifySafely(d)):d}],transformResponse:[function(d){var e=this.transitional||defaults$4.transitional,p=e&&e.silentJSONParsing,m=e&&e.forcedJSONParsing,g=!p&&this.responseType==="json";if(g||m&&utils$5.isString(d)&&d.length)try{return JSON.parse(d)}catch(a){if(g)throw a.name==="SyntaxError"?enhanceError(a,this,"E_JSON_PARSE"):a}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils$5.forEach(["delete","get","head"],function(d){defaults$4.headers[d]={}}),utils$5.forEach(["post","put","patch"],function(d){defaults$4.headers[d]=utils$5.merge(DEFAULT_CONTENT_TYPE)});var defaults_1=defaults$4,utils$4=utils$d,defaults$3=defaults_1,transformData$1=function(d,e,p){var m=this||defaults$3;return utils$4.forEach(p,function(a){d=a.call(m,d,e)}),d},isCancel$1=function(d){return!!(d&&d.__CANCEL__)},utils$3=utils$d,transformData=transformData$1,isCancel=isCancel$1,defaults$2=defaults_1,Cancel$1=Cancel_1;function throwIfCancellationRequested(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Cancel$1("canceled")}var dispatchRequest$1=function(d){throwIfCancellationRequested(d),d.headers=d.headers||{},d.data=transformData.call(d,d.data,d.headers,d.transformRequest),d.headers=utils$3.merge(d.headers.common||{},d.headers[d.method]||{},d.headers),utils$3.forEach(["delete","get","head","post","put","patch","common"],function(m){delete d.headers[m]});var e=d.adapter||defaults$2.adapter;return e(d).then(function(m){return throwIfCancellationRequested(d),m.data=transformData.call(d,m.data,m.headers,d.transformResponse),m},function(m){return isCancel(m)||(throwIfCancellationRequested(d),m&&m.response&&(m.response.data=transformData.call(d,m.response.data,m.response.headers,d.transformResponse))),Promise.reject(m)})},utils$2=utils$d,mergeConfig$2=function(d,e){e=e||{};var p={};function m(r,t){return utils$2.isPlainObject(r)&&utils$2.isPlainObject(t)?utils$2.merge(r,t):utils$2.isPlainObject(t)?utils$2.merge({},t):utils$2.isArray(t)?t.slice():t}function g(r){if(utils$2.isUndefined(e[r])){if(!utils$2.isUndefined(d[r]))return m(void 0,d[r])}else return m(d[r],e[r])}function a(r){if(!utils$2.isUndefined(e[r]))return m(void 0,e[r])}function c(r){if(utils$2.isUndefined(e[r])){if(!utils$2.isUndefined(d[r]))return m(void 0,d[r])}else return m(void 0,e[r])}function i(r){if(r in e)return m(d[r],e[r]);if(r in d)return m(void 0,d[r])}var u={url:a,method:a,data:a,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:i};return utils$2.forEach(Object.keys(d).concat(Object.keys(e)),function(t){var l=u[t]||g,o=l(t);utils$2.isUndefined(o)&&l!==i||(p[t]=o)}),p},data={version:"0.24.0"},VERSION=data.version,validators$1={};["object","boolean","number","function","string","symbol"].forEach(function(n,d){validators$1[n]=function(p){return typeof p===n||"a"+(d<1?"n ":" ")+n}});var deprecatedWarnings={};validators$1.transitional=function(d,e,p){function m(g,a){return"[Axios v"+VERSION+"] Transitional option '"+g+"'"+a+(p?". "+p:"")}return function(g,a,c){if(d===!1)throw new Error(m(a," has been removed"+(e?" in "+e:"")));return e&&!deprecatedWarnings[a]&&(deprecatedWarnings[a]=!0,console.warn(m(a," has been deprecated since v"+e+" and will be removed in the near future"))),d?d(g,a,c):!0}};function assertOptions(n,d,e){if(typeof n!="object")throw new TypeError("options must be an object");for(var p=Object.keys(n),m=p.length;m-- >0;){var g=p[m],a=d[g];if(a){var c=n[g],i=c===void 0||a(c,g,n);if(i!==!0)throw new TypeError("option "+g+" must be "+i);continue}if(e!==!0)throw Error("Unknown option "+g)}}var validator$1={assertOptions,validators:validators$1},utils$1=utils$d,buildURL=buildURL$2,InterceptorManager=InterceptorManager_1,dispatchRequest=dispatchRequest$1,mergeConfig$1=mergeConfig$2,validator=validator$1,validators=validator.validators;function Axios$1(n){this.defaults=n,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios$1.prototype.request=function(d){typeof d=="string"?(d=arguments[1]||{},d.url=arguments[0]):d=d||{},d=mergeConfig$1(this.defaults,d),d.method?d.method=d.method.toLowerCase():this.defaults.method?d.method=this.defaults.method.toLowerCase():d.method="get";var e=d.transitional;e!==void 0&&validator.assertOptions(e,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1);var p=[],m=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(d)===!1||(m=m&&l.synchronous,p.unshift(l.fulfilled,l.rejected))});var g=[];this.interceptors.response.forEach(function(l){g.push(l.fulfilled,l.rejected)});var a;if(!m){var c=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(c,p),c=c.concat(g),a=Promise.resolve(d);c.length;)a=a.then(c.shift(),c.shift());return a}for(var i=d;p.length;){var u=p.shift(),r=p.shift();try{i=u(i)}catch(t){r(t);break}}try{a=dispatchRequest(i)}catch(t){return Promise.reject(t)}for(;g.length;)a=a.then(g.shift(),g.shift());return a},Axios$1.prototype.getUri=function(d){return d=mergeConfig$1(this.defaults,d),buildURL(d.url,d.params,d.paramsSerializer).replace(/^\?/,"")},utils$1.forEach(["delete","get","head","options"],function(d){Axios$1.prototype[d]=function(e,p){return this.request(mergeConfig$1(p||{},{method:d,url:e,data:(p||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(d){Axios$1.prototype[d]=function(e,p,m){return this.request(mergeConfig$1(m||{},{method:d,url:e,data:p}))}});var Axios_1=Axios$1,Cancel=Cancel_1;function CancelToken(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var d;this.promise=new Promise(function(m){d=m});var e=this;this.promise.then(function(p){if(!!e._listeners){var m,g=e._listeners.length;for(m=0;mhtml text",customClass:"",onCreated:"",onMounted:""}},{type:"button",icon:"button",formItemFlag:!1,options:{name:"",label:"",columnWidth:"200px",size:"",displayStyle:"block",disabled:!1,hidden:!1,type:"",plain:!1,round:!1,circle:!1,icon:null,customClass:"",onCreated:"",onMounted:"",onClick:""}},{type:"divider",icon:"divider",formItemFlag:!1,options:{name:"",label:"",columnWidth:"200px",direction:"horizontal",contentPosition:"center",hidden:!1,customClass:"",onCreated:"",onMounted:""}}],advancedFields=[{type:"picture-upload",icon:"picture-upload-field",formItemFlag:!0,options:{name:"",label:"",labelAlign:"",labelWidth:null,labelHidden:!1,columnWidth:"200px",disabled:!1,hidden:!1,required:!1,requiredHint:"",customRule:"",customRuleHint:"",uploadURL:"",uploadTip:"",withCredentials:!1,multipleSelect:!1,showFileList:!0,limit:3,fileMaxSize:5,fileTypes:["jpg","jpeg","png"],customClass:"",labelIconClass:null,labelIconPosition:"rear",labelTooltip:null,onCreated:"",onMounted:"",onBeforeUpload:"",onUploadSuccess:"",onUploadError:"",onFileRemove:"",onValidate:""}},{type:"file-upload",icon:"file-upload-field",formItemFlag:!0,options:{name:"",label:"",labelAlign:"",labelWidth:null,labelHidden:!1,columnWidth:"200px",disabled:!1,hidden:!1,required:!1,requiredHint:"",customRule:"",customRuleHint:"",uploadURL:"",uploadTip:"",withCredentials:!1,multipleSelect:!1,showFileList:!0,limit:3,fileMaxSize:5,fileTypes:["doc","docx","xls","xlsx"],customClass:"",labelIconClass:null,labelIconPosition:"rear",labelTooltip:null,onCreated:"",onMounted:"",onBeforeUpload:"",onUploadSuccess:"",onUploadError:"",onFileRemove:"",onValidate:""}},{type:"rich-editor",icon:"rich-editor-field",formItemFlag:!0,options:{name:"",label:"",labelAlign:"",placeholder:"",labelWidth:null,labelHidden:!1,columnWidth:"200px",contentHeight:"200px",disabled:!1,hidden:!1,required:!1,requiredHint:"",customRule:"",customRuleHint:"",customClass:"",labelIconClass:null,labelIconPosition:"rear",labelTooltip:null,minLength:null,maxLength:null,showWordLimit:!1,onCreated:"",onMounted:"",onValidate:""}},{type:"cascader",icon:"cascader-field",formItemFlag:!0,options:{name:"",label:"",labelAlign:"",defaultValue:"",placeholder:"",size:"",labelWidth:null,labelHidden:!1,columnWidth:"200px",disabled:!1,hidden:!1,clearable:!0,filterable:!1,multiple:!1,checkStrictly:!1,showAllLevels:!0,optionItems:[{label:"select 1",value:1,children:[{label:"child 1",value:11}]},{label:"select 2",value:2},{label:"select 3",value:3}],required:!1,requiredHint:"",customRule:"",customRuleHint:"",customClass:"",labelIconClass:null,labelIconPosition:"rear",labelTooltip:null,onCreated:"",onMounted:"",onChange:"",onFocus:"",onBlur:"",onValidate:""}}],customFields=[];function addContainerWidgetSchema(n){containers.push(n)}function addCustomWidgetSchema(n){customFields.push(n)}const formTemplates=[{title:"\u5355\u5217\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t1.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json1.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u591A\u5217\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t2.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json2.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u5206\u7EC4\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t3.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json3.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u6807\u7B7E\u9875\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t4.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json4.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u4E3B\u4ECE\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t5.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json5.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u54CD\u5E94\u5F0F\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t6.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json6.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u95EE\u5377\u8C03\u67E5\u8868",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t7.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json7.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u56FA\u5B9A\u8868\u683C\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t8.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json8.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."}];var clipboard={exports:{}};/*! + * clipboard.js v2.0.11 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */(function(n,d){(function(p,m){n.exports=m()})(commonjsGlobal,function(){return function(){var e={686:function(g,a,c){c.d(a,{default:function(){return R}});var i=c(279),u=c.n(i),r=c(370),t=c.n(r),l=c(817),o=c.n(l);function s(V){try{return document.execCommand(V)}catch{return!1}}var f=function(F){var P=o()(F);return s("cut"),P},h=f;function v(V){var F=document.documentElement.getAttribute("dir")==="rtl",P=document.createElement("textarea");P.style.fontSize="12pt",P.style.border="0",P.style.padding="0",P.style.margin="0",P.style.position="absolute",P.style[F?"right":"left"]="-9999px";var j=window.pageYOffset||document.documentElement.scrollTop;return P.style.top="".concat(j,"px"),P.setAttribute("readonly",""),P.value=V,P}var $=function(F,P){var j=v(F);P.container.appendChild(j);var I=o()(j);return s("copy"),j.remove(),I},C=function(F){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},j="";return typeof F=="string"?j=$(F,P):F instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(F==null?void 0:F.type)?j=$(F.value,P):(j=o()(F),s("copy")),j},b=C;function y(V){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(P){return typeof P}:y=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},y(V)}var _=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=F.action,j=P===void 0?"copy":P,I=F.container,W=F.target,H=F.text;if(j!=="copy"&&j!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(W!==void 0)if(W&&y(W)==="object"&&W.nodeType===1){if(j==="copy"&&W.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(j==="cut"&&(W.hasAttribute("readonly")||W.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(H)return b(H,{container:I});if(W)return j==="cut"?h(W):b(W,{container:I})},E=_;function O(V){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(P){return typeof P}:O=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},O(V)}function T(V,F){if(!(V instanceof F))throw new TypeError("Cannot call a class as a function")}function x(V,F){for(var P=0;P0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof I.action=="function"?I.action:this.defaultAction,this.target=typeof I.target=="function"?I.target:this.defaultTarget,this.text=typeof I.text=="function"?I.text:this.defaultText,this.container=O(I.container)==="object"?I.container:document.body}},{key:"listenClick",value:function(I){var W=this;this.listener=t()(I,"click",function(H){return W.onClick(H)})}},{key:"onClick",value:function(I){var W=I.delegateTarget||I.currentTarget,H=this.action(W)||"copy",z=E({action:H,container:this.container,target:this.target(W),text:this.text(W)});this.emit(z?"success":"error",{action:H,text:z,trigger:W,clearSelection:function(){W&&W.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(I){return N("action",I)}},{key:"defaultTarget",value:function(I){var W=N("target",I);if(W)return document.querySelector(W)}},{key:"defaultText",value:function(I){return N("text",I)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(I){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return b(I,W)}},{key:"cut",value:function(I){return h(I)}},{key:"isSupported",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],W=typeof I=="string"?[I]:I,H=!!document.queryCommandSupported;return W.forEach(function(z){H=H&&!!document.queryCommandSupported(z)}),H}}]),P}(u()),R=B},828:function(g){var a=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function i(u,r){for(;u&&u.nodeType!==a;){if(typeof u.matches=="function"&&u.matches(r))return u;u=u.parentNode}}g.exports=i},438:function(g,a,c){var i=c(828);function u(l,o,s,f,h){var v=t.apply(this,arguments);return l.addEventListener(s,v,h),{destroy:function(){l.removeEventListener(s,v,h)}}}function r(l,o,s,f,h){return typeof l.addEventListener=="function"?u.apply(null,arguments):typeof s=="function"?u.bind(null,document).apply(null,arguments):(typeof l=="string"&&(l=document.querySelectorAll(l)),Array.prototype.map.call(l,function(v){return u(v,o,s,f,h)}))}function t(l,o,s,f){return function(h){h.delegateTarget=i(h.target,o),h.delegateTarget&&f.call(l,h)}}g.exports=r},879:function(g,a){a.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},a.nodeList=function(c){var i=Object.prototype.toString.call(c);return c!==void 0&&(i==="[object NodeList]"||i==="[object HTMLCollection]")&&"length"in c&&(c.length===0||a.node(c[0]))},a.string=function(c){return typeof c=="string"||c instanceof String},a.fn=function(c){var i=Object.prototype.toString.call(c);return i==="[object Function]"}},370:function(g,a,c){var i=c(879),u=c(438);function r(s,f,h){if(!s&&!f&&!h)throw new Error("Missing required arguments");if(!i.string(f))throw new TypeError("Second argument must be a String");if(!i.fn(h))throw new TypeError("Third argument must be a Function");if(i.node(s))return t(s,f,h);if(i.nodeList(s))return l(s,f,h);if(i.string(s))return o(s,f,h);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function t(s,f,h){return s.addEventListener(f,h),{destroy:function(){s.removeEventListener(f,h)}}}function l(s,f,h){return Array.prototype.forEach.call(s,function(v){v.addEventListener(f,h)}),{destroy:function(){Array.prototype.forEach.call(s,function(v){v.removeEventListener(f,h)})}}}function o(s,f,h){return u(document.body,s,f,h)}g.exports=r},817:function(g){function a(c){var i;if(c.nodeName==="SELECT")c.focus(),i=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var u=c.hasAttribute("readonly");u||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),u||c.removeAttribute("readonly"),i=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var r=window.getSelection(),t=document.createRange();t.selectNodeContents(c),r.removeAllRanges(),r.addRange(t),i=r.toString()}return i}g.exports=a},279:function(g){function a(){}a.prototype={on:function(c,i,u){var r=this.e||(this.e={});return(r[c]||(r[c]=[])).push({fn:i,ctx:u}),this},once:function(c,i,u){var r=this;function t(){r.off(c,t),i.apply(u,arguments)}return t._=i,this.on(c,t,u)},emit:function(c){var i=[].slice.call(arguments,1),u=((this.e||(this.e={}))[c]||[]).slice(),r=0,t=u.length;for(r;r{n[e]=d[e]})},addWindowResizeHandler=function(n){let d=window.onresize;typeof window.onresize!="function"?window.onresize=n:window.onresize=function(){d(),n()}},insertCustomCssToHead=function(n,d=""){let e=document.getElementsByTagName("head")[0],p=document.getElementById("vform-custom-css");p&&e.removeChild(p),d&&(p=document.getElementById("vform-custom-css-"+d),!!p&&e.removeChild(p));let m=document.createElement("style");m.type="text/css",m.rel="stylesheet",m.id=d?"vform-custom-css-"+d:"vform-custom-css";try{m.appendChild(document.createTextNode(n))}catch{m.styleSheet.cssText=n}e.appendChild(m)},insertGlobalFunctionsToHtml=function(n,d=""){let e=document.getElementsByTagName("body")[0],p=document.getElementById("v_form_global_functions");!!p&&e.removeChild(p),d&&(p=document.getElementById("v_form_global_functions-"+d),!!p&&e.removeChild(p));let m=document.createElement("script");m.id=d?"v_form_global_functions-"+d:"v_form_global_functions",m.type="text/javascript",m.innerHTML=n,e.appendChild(m)},loadRemoteScript=function(n,d){let e=encodeURIComponent(n);if(!document.getElementById(e)){let m=document.createElement("script");m.src=n,m.id=e,document.body.appendChild(m),m.onload=m.onreadystatechange=function(g,a){(a||!m.readyState||m.readyState==="loaded"||m.readyState==="complete")&&(m=m.onload=m.onreadystatechange=null,a||d())}}};function traverseFieldWidgets(n,d,e=null){!n||n.map(p=>{p.formItemFlag?d(p,e):p.type==="grid"?p.cols.map(m=>{traverseFieldWidgets(m.widgetList,d,p)}):p.type==="table"?p.rows.map(m=>{m.cols.map(g=>{traverseFieldWidgets(g.widgetList,d,p)})}):p.type==="tab"?p.tabs.map(m=>{traverseFieldWidgets(m.widgetList,d,p)}):(p.type==="sub-form"||p.category==="container")&&traverseFieldWidgets(p.widgetList,d,p)})}function traverseContainerWidgets(n,d){!n||n.map(e=>{e.category==="container"&&d(e),e.type==="grid"?e.cols.map(p=>{traverseContainerWidgets(p.widgetList,d)}):e.type==="table"?e.rows.map(p=>{p.cols.map(m=>{traverseContainerWidgets(m.widgetList,d)})}):e.type==="tab"?e.tabs.map(p=>{traverseContainerWidgets(p.widgetList,d)}):(e.type==="sub-form"||e.category==="container")&&traverseContainerWidgets(e.widgetList,d)})}function traverseAllWidgets(n,d){!n||n.map(e=>{d(e),e.type==="grid"?e.cols.map(p=>{d(p),traverseAllWidgets(p.widgetList,d)}):e.type==="table"?e.rows.map(p=>{p.cols.map(m=>{d(m),traverseAllWidgets(m.widgetList,d)})}):e.type==="tab"?e.tabs.map(p=>{traverseAllWidgets(p.widgetList,d)}):(e.type==="sub-form"||e.category==="container")&&traverseAllWidgets(e.widgetList,d)})}function handleWidgetForTraverse(n,d){n.category?traverseFieldWidgetsOfContainer(n,d):n.formItemFlag&&d(n)}function traverseFieldWidgetsOfContainer(n,d){n.type==="grid"?n.cols.forEach(e=>{e.widgetList.forEach(p=>{handleWidgetForTraverse(p,d)})}):n.type==="table"?n.rows.forEach(e=>{e.cols.forEach(p=>{p.widgetList.forEach(m=>{handleWidgetForTraverse(m,d)})})}):n.type==="tab"?n.tabs.forEach(e=>{e.widgetList.forEach(p=>{handleWidgetForTraverse(p,d)})}):n.type==="sub-form"?n.widgetList.forEach(e=>{handleWidgetForTraverse(e,d)}):n.category==="container"&&n.widgetList.forEach(e=>{handleWidgetForTraverse(e,d)})}function getAllFieldWidgets(n){if(!n)return[];let d=[];return traverseFieldWidgets(n,p=>{d.push({type:p.type,name:p.options.name,field:p})}),d}function getAllContainerWidgets(n){if(!n)return[];let d=[];return traverseContainerWidgets(n,p=>{d.push({type:p.type,name:p.options.name,container:p})}),d}function copyToClipboard(n,d,e,p,m){const g=new Clipboard(d.target,{text:()=>n});g.on("success",()=>{e.success(p),g.destroy()}),g.on("error",()=>{e.error(m),g.destroy()}),g.onClick(d)}function getQueryParam(n){let e=window.location.search.substring(1).split("&");for(let p=0;p{p=isDef(p)&&isDef(p[m])?p[m]:null}),p}let locale=require$$0$1.reactive({lang:localStorage.getItem("v_form_locale")||"zh-CN"});function createI18n(n){return{messages:n.messages,$st(d,...e){const p=get(this.messages[locale.lang],d);return typeof p=="function"?p(...e):p!==null?p:d},$st2(d,e){let p=this.messages[locale.lang];const m=get(p,d);return m!==null?m:get(p,e)},setLang(d){locale.lang=d}}}var en={};(function(n){Object.defineProperty(n,"__esModule",{value:!0});var d={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}};n.default=d})(en);var enLocaleElement=getDefaultExportFromCjs(en),zhCn={};(function(n){Object.defineProperty(n,"__esModule",{value:!0});var d={name:"zh-cn",el:{colorpicker:{confirm:"\u786E\u5B9A",clear:"\u6E05\u7A7A"},datepicker:{now:"\u6B64\u523B",today:"\u4ECA\u5929",cancel:"\u53D6\u6D88",clear:"\u6E05\u7A7A",confirm:"\u786E\u5B9A",selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startDate:"\u5F00\u59CB\u65E5\u671F",startTime:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65E5\u671F",endTime:"\u7ED3\u675F\u65F6\u95F4",prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",prevMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",year:"\u5E74",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{jan:"\u4E00\u6708",feb:"\u4E8C\u6708",mar:"\u4E09\u6708",apr:"\u56DB\u6708",may:"\u4E94\u6708",jun:"\u516D\u6708",jul:"\u4E03\u6708",aug:"\u516B\u6708",sep:"\u4E5D\u6708",oct:"\u5341\u6708",nov:"\u5341\u4E00\u6708",dec:"\u5341\u4E8C\u6708"}},select:{loading:"\u52A0\u8F7D\u4E2D",noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",placeholder:"\u8BF7\u9009\u62E9"},cascader:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D",placeholder:"\u8BF7\u9009\u62E9",noData:"\u6682\u65E0\u6570\u636E"},pagination:{goto:"\u524D\u5F80",pagesize:"\u6761/\u9875",total:"\u5171 {total} \u6761",pageClassifier:"\u9875",page:"\u9875",prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",currentPage:"\u7B2C {pager} \u9875",prevPages:"\u5411\u524D {pager} \u9875",nextPages:"\u5411\u540E {pager} \u9875",deprecationWarning:"\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"},messagebox:{title:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",error:"\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!"},upload:{deleteTip:"\u6309 delete \u952E\u53EF\u5220\u9664",delete:"\u5220\u9664",preview:"\u67E5\u770B\u56FE\u7247",continue:"\u7EE7\u7EED\u4E0A\u4F20"},table:{emptyText:"\u6682\u65E0\u6570\u636E",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"},transfer:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",titles:["\u5217\u8868 1","\u5217\u8868 2"],filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",noCheckedFormat:"\u5171 {total} \u9879",hasCheckedFormat:"\u5DF2\u9009 {checked}/{total} \u9879"},image:{error:"\u52A0\u8F7D\u5931\u8D25"},pageHeader:{title:"\u8FD4\u56DE"},popconfirm:{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"}}};n.default=d})(zhCn);var zhLocaleElement=getDefaultExportFromCjs(zhCn),enLocale={application:{"zh-CN":"\u7B80\u4F53\u4E2D\u6587","en-US":"English",productTitle:"Online Form Designer",github:"GitHub",document:"Docs",qqGroup:"WeChat Group",deployment:"Deployment",subscription:"Subscription"},designer:{componentLib:"Components",formLib:"Templates",containerTitle:"Container",dragHandlerHint:"drag container or field to layout center",dragAction:"drag",basicFieldTitle:"Basic Field",advancedFieldTitle:"Advanced Field",customFieldTitle:"Customized Field",noWidgetHint:"Please select a widget from the left list, drag and drop to this container.",widgetLabel:{grid:"Grid",table:"Table",tab:"Tab",section:"Section","sub-form":"SubForm","grid-col":"GridCol","table-cell":"TableCell","tab-pane":"TabPane","data-table":"DataTable",input:"Input",textarea:"Textarea",number:"InputNumber",radio:"Radio",checkbox:"Checkbox",select:"Select",time:"Time","time-range":"Time range",date:"Date","date-range":"Date range",switch:"Switch",rate:"Rate",color:"ColorPicker",slider:"Slider","static-text":"Text","html-text":"HTML",button:"Button",divider:"Divider","picture-upload":"Picture","file-upload":"File","rich-editor":"Rich Editor",cascader:"Cascader",slot:"Slot",custom:"Custom Component"},hint:{selectParentWidget:"Select parent of this widget",moveUpWidget:"Move up this widget",moveDownWidget:"Move down this widget",cloneWidget:"Clone this widget",insertRow:"Insert new row",insertColumn:"Insert new column",remove:"Remove this widget",cellSetting:"Cell setting",dragHandler:"Drag handler",copyField:"Copy field widget",onlyFieldWidgetAcceptable:"Only field widget can be dragged into sub-form",moveUpFirstChildHint:"First child can not be move up",moveDownLastChildHint:"Last child can not be move down",closePreview:"Close",copyJson:"Copy",saveFormJson:"Save As File",copyVueCode:"Copy Vue Code",copyHtmlCode:"Copy HTML Code",copyJsonSuccess:"Copy succeed",importJsonSuccess:"Import succeed",invalidJsonFormat:"Invalid JSON format",jsonVersionMismatch:"Version of JSON mismatch",copyJsonFail:"Copy failed",copyVueCodeSuccess:"Copy succeed",copyVueCodeFail:"Copy failed",copyHtmlCodeSuccess:"Copy succeed",copyHtmlCodeFail:"Copy failed",saveVueCode:"Save Vue File",saveHtmlCode:"Save Html File",getFormData:"Get Data",resetForm:"Reset",disableForm:"Disable",enableForm:"Enable",exportFormData:"Form Data",copyFormData:"Copy",saveFormData:"Save As File",copyVue2SFC:"Copy Vue2",copyVue3SFC:"Copy Vue3",copySFCFail:"Copy failed",copySFCSuccess:"Copy succeed",saveVue2SFC:"Save As Vue2",saveVue3SFC:"Save As Vue3",fileNameForSave:"File name:",saveFileTitle:"Save as File",fileNameInputPlaceholder:"Enter the file name",sampleLoadedSuccess:"Example loaded successfully",sampleLoadedFail:"Sample load failed",loadFormTemplate:"Load This",loadFormTemplateHint:"Are you sure to load this template?",loadFormTemplateSuccess:"Load form template success!",loadFormTemplateFailed:"Load form template failed.",currentNodeCannotBeSelected:"The current node cannot be selected.",widgetSetting:"Widget Config",formSetting:"Form Config",prompt:"Prompt",confirm:"OK",cancel:"Cancel",import:"Import",importJsonHint:"The code to be imported should have the following JSON format.",invalidOptionsData:"Invalid data of options:",lastPaneCannotBeDeleted:"The last pane cannot be deleted.",duplicateName:"Duplicate name: ",nameRequired:"Name required.",numberValidator:"Number",letterValidator:"Letter",letterAndNumberValidator:"LetterAndNumber",mobilePhoneValidator:"MobilePhone",emailValidator:"Email",urlValidator:"URL",noChineseValidator:"Non-Chinese",chineseValidator:"Chinese",rowspanNotConsistentForMergeEntireRow:"Cells in this row don't have the same rowspan, operation failed.",colspanNotConsistentForMergeEntireColumn:"Cells in this column don't have the same colspan, operation failed.",rowspanNotConsistentForDeleteEntireRow:"Cells in this row don't have the same rowspan, operation failed.",colspanNotConsistentForDeleteEntireColumn:"Cells in this column don't have the same colspan, operation failed.",lastColCannotBeDeleted:"The last col cannot be deleted.",lastRowCannotBeDeleted:"The last row cannot be deleted."},toolbar:{undoHint:"Undo",redoHint:"Redo",pcLayout:"PC",padLayout:"Pad",mobileLayout:"H5",nodeTreeHint:"Tree View Of Component Hierarchy",nodeTreeTitle:"Tree View Of Component Hierarchy",clear:"Clear",preview:"Preview",importJson:"Import",exportJson:"Export",exportCode:"Codes",generateCode:"Generate Code",generateSFC:"Generate SFC"},setting:{basicSetting:"Basic Setting",attributeSetting:"Attribute Setting",commonSetting:"Common Setting",advancedSetting:"Advanced Setting",eventSetting:"Event Setting",uniqueName:"Unique Name",editNameHelp:"Press enter to confirm the modification",label:"Label",displayType:"Type",defaultValue:"Default Value",placeholder:"Placeholder",startPlaceholder:"Start Placeholder",endPlaceholder:"End Placeholder",widgetColumnWidth:"Width",widgetSize:"Size",fontSize:"Font Size",textAlign:"Text Align",autoFullWidth:"Auto Full Width",showStops:"Show Stops",displayStyle:"Display Style",inlineLayout:"inline",blockLayout:"block",buttonStyle:"Show As Button",border:"Show Border",labelWidth:"Width Of Label",rows:"Rows",labelHidden:"Hide Label",required:"Required",requiredHint:"Failure Hint",validation:"Validation",validationHelp:"Regular expressions supported",validationHint:"Validation Hint",readonly:"Readonly",disabled:"Disabled",hidden:"Hidden",textContent:"Text",preWrap:"Line Wrap",htmlContent:"HTML",clearable:"Clearable",editable:"Editable",format:"Format",valueFormat:"Value Format",showPassword:"Show Reveal",filterable:"Filterable",allowCreate:"Allow Create",remote:"Remote Query",automaticDropdown:"Automatic Dropdown",multiple:"Multiple",multipleLimit:"Multiple Limit",checkStrictly:"Any Level Selectable",showAllLevels:"Show All Levels",contentPosition:"Content Position",plain:"Plain",round:"Round",circle:"Circle",icon:"Icon",optionsSetting:"Options Setting",addOption:"Add Option",importOptions:"Import Options",resetDefault:"Reset Default",uploadSetting:"Upload Setting",uploadURL:"Upload URL",uploadTip:"Tip Content",withCredentials:"Send Cookie",multipleSelect:"File Multi-select",showFileList:"Show File List",limit:"Max Upload Number",fileMaxSize:"Max Size(MB)",fileTypes:"Upload File Types",fileTypesHelp:"Allows to add more file types",headers:"Request Headers",cellWidth:"Width",cellHeight:"Height",wordBreak:"Line Wrap",gridColHeight:"Height Of Col(px)",gutter:"Gutter(px)",columnSetting:"Cols Setting",colsOfGrid:"Cols Of Grid:",colSpanTitle:"Spans Of Col",colOffsetTitle:"Offset Of Col",colPushTitle:"Push Of Col",colPullTitle:"Pull Of Col",addColumn:"Add Column",responsive:"Responsive",tabPaneSetting:"Tab Panes",addTabPane:"Add Tab Pane",paneActive:"Active",customLabelIcon:"Custom Label",labelIconClass:"Label Icon Class",labelIconPosition:"Label Icon Position",labelTooltip:"Label Tooltip",minValue:"Min Value",maxValue:"Max Value",precision:"Precision",step:"Step",controlsPosition:"Controls Position",minLength:"Min Length",maxLength:"Max Length",showWordLimit:"Show Word Limit",prefixIcon:"Prefix Icon",suffixIcon:"Suffix Icon",inputButton:"Input Button Setting",appendButton:"Append Button",appendButtonDisabled:"Button Disabled",appendButtonIcon:"Append Button Icon",buttonIcon:"Button Icon",switchWidth:"Width of Switch(px)",activeText:"Active Text",inactiveText:"Inactive Text",activeColor:"Active Color",inactiveColor:"Inactive Color",maxStars:"Stars Max Number",lowThreshold:"Low Threshold",highThreshold:"High Threshold",allowHalf:"Allow Half",showText:"Show Text",showScore:"Show Score",range:"Range",vertical:"Vertical",showBlankRow:"Show Blank Row",showRowNumber:"Show Row Number",contentHeight:"Content Area Height",insertColumnToLeft:"insert column to left",insertColumnToRight:"insert column to right",insertRowAbove:"insert row above",insertRowBelow:"insert row below",mergeLeftColumn:"merge left cell",mergeRightColumn:"merge right cell",mergeEntireRow:"merge entire row",mergeRowAbove:"merge cell above",mergeRowBelow:"merge cell below",mergeEntireColumn:"merge entire column",undoMergeCol:"undo merge column",undoMergeRow:"undo merge row",deleteEntireCol:"delete entire column",deleteEntireRow:"delete entire row",widgetName:"Unique Name",formSize:"Size",labelPosition:"Position Of Label",topPosition:"Top",leftPosition:"Left",labelAlign:"Label Align",leftAlign:"Left",centerAlign:"Center",rightAlign:"Right",formCss:"Form CSS",addCss:"Edit",customClass:"Custom Class",globalFunctions:"Global Functions",addEventHandler:"Edit",editWidgetEventHandler:"Edit Widget Event Handler",editFormEventHandler:"Edit Form Event Handler",formSFCSetting:"SFC Setting",formModelName:"Model Name",formRefName:"Ref Name",formRulesName:"Rules Name",syntaxCheckWarning:"Syntax error in the javascript codes, please check again!"}}},zhLocale={application:{"zh-CN":"\u7B80\u4F53\u4E2D\u6587","en-US":"English",productTitle:"\u8868\u5355\u8BBE\u8BA1\u5668",github:"GitHub",document:"\u6587\u6863",qqGroup:"\u6280\u672FWX\u7FA4",deployment:"\u79C1\u6709\u90E8\u7F72",subscription:"\u8BA2\u9605Pro"},designer:{componentLib:"\u7EC4\u4EF6\u5E93",formLib:"\u8868\u5355\u6A21\u677F",containerTitle:"\u5BB9\u5668",dragHandlerHint:"\u9F20\u6807\u62D6\u62FD\u5BB9\u5668\u7EC4\u4EF6\u6216\u5B57\u6BB5\u7EC4\u4EF6\u5E76\u653E\u7F6E\u4E8E\u8868\u5355\u4E2D",dragAction:"\u62D6\u52A8",basicFieldTitle:"\u57FA\u7840\u5B57\u6BB5",advancedFieldTitle:"\u9AD8\u7EA7\u5B57\u6BB5",customFieldTitle:"\u81EA\u5B9A\u4E49\u6269\u5C55\u5B57\u6BB5",noWidgetHint:"\u8BF7\u4ECE\u5DE6\u4FA7\u5217\u8868\u4E2D\u9009\u62E9\u4E00\u4E2A\u7EC4\u4EF6, \u7136\u540E\u7528\u9F20\u6807\u62D6\u52A8\u7EC4\u4EF6\u653E\u7F6E\u4E8E\u6B64\u5904.",widgetLabel:{grid:"\u6805\u683C",table:"\u8868\u683C",tab:"\u6807\u7B7E\u9875",section:"\u533A\u5757","sub-form":"\u5B50\u8868\u5355","grid-col":"\u6805\u683C\u5217","table-cell":"\u5355\u5143\u683C","tab-pane":"\u9009\u9879\u5361\u9875","data-table":"\u6570\u636E\u8868\u683C",input:"\u5355\u884C\u8F93\u5165",textarea:"\u591A\u884C\u8F93\u5165",number:"\u8BA1\u6570\u5668",radio:"\u5355\u9009\u9879",checkbox:"\u591A\u9009\u9879",select:"\u4E0B\u62C9\u9009\u9879",time:"\u65F6\u95F4","time-range":"\u65F6\u95F4\u8303\u56F4",date:"\u65E5\u671F","date-range":"\u65E5\u671F\u8303\u56F4",switch:"\u5F00\u5173",rate:"\u8BC4\u5206",color:"\u989C\u8272\u9009\u62E9\u5668",slider:"\u6ED1\u5757","static-text":"\u9759\u6001\u6587\u5B57","html-text":"HTML",button:"\u6309\u94AE",divider:"\u5206\u9694\u7EBF","picture-upload":"\u56FE\u7247","file-upload":"\u6587\u4EF6","rich-editor":"\u5BCC\u6587\u672C",cascader:"\u7EA7\u8054\u9009\u62E9",slot:"\u63D2\u69FD",custom:"Custom Component"},hint:{selectParentWidget:"\u9009\u4E2D\u7236\u7EC4\u4EF6",moveUpWidget:"\u4E0A\u79FB\u7EC4\u4EF6",moveDownWidget:"\u4E0B\u79FB\u7EC4\u4EF6",cloneWidget:"\u590D\u5236\u7EC4\u4EF6",insertRow:"\u63D2\u5165\u65B0\u884C",insertColumn:"\u63D2\u5165\u65B0\u5217",remove:"\u79FB\u9664\u7EC4\u4EF6",cellSetting:"\u5355\u5143\u683C\u64CD\u4F5C",dragHandler:"\u62D6\u62FD\u624B\u67C4",copyField:"\u590D\u5236\u5B57\u6BB5\u7EC4\u4EF6",onlyFieldWidgetAcceptable:"\u5B50\u8868\u5355\u53EA\u80FD\u63A5\u6536\u5B57\u6BB5\u7EC4\u4EF6",moveUpFirstChildHint:"\u5DF2\u7ECF\u79FB\u52A8\u5230\u6700\u4E0A\u9762",moveDownLastChildHint:"\u5DF2\u7ECF\u79FB\u52A8\u5230\u6700\u4E0B\u9762",closePreview:"\u5173\u95ED",copyJson:"\u590D\u5236JSON",saveFormJson:"\u4FDD\u5B58\u4E3A\u6587\u4EF6",copyVueCode:"\u590D\u5236Vue\u4EE3\u7801",copyHtmlCode:"\u590D\u5236HTML\u4EE3\u7801",copyJsonSuccess:"\u590D\u5236JSON\u6210\u529F",importJsonSuccess:"\u5BFC\u5165JSON\u6210\u529F",invalidJsonFormat:"\u65E0\u6548\u7684\u8868\u5355JSON\u683C\u5F0F",jsonVersionMismatch:"\u8868\u5355JSON\u7248\u672C\u53F7\u4E0D\u5339\u914D",copyJsonFail:"\u590D\u5236JSON\u5931\u8D25",copyVueCodeSuccess:"\u590D\u5236Vue\u4EE3\u7801\u6210\u529F",copyVueCodeFail:"\u590D\u5236Vue\u4EE3\u7801\u5931\u8D25",copyHtmlCodeSuccess:"\u590D\u5236HTML\u4EE3\u7801\u6210\u529F",copyHtmlCodeFail:"\u590D\u5236HTML\u4EE3\u7801\u5931\u8D25",saveVueCode:"\u4FDD\u5B58Vue\u6587\u4EF6",saveHtmlCode:"\u4FDD\u5B58Html\u6587\u4EF6",getFormData:"\u83B7\u53D6\u6570\u636E",resetForm:"\u91CD\u7F6E\u8868\u5355",disableForm:"\u7981\u7528\u7F16\u8F91",enableForm:"\u6062\u590D\u7F16\u8F91",exportFormData:"\u8868\u5355\u6570\u636E",copyFormData:"\u590D\u5236JSON",saveFormData:"\u4FDD\u5B58\u4E3A\u6587\u4EF6",copyVue2SFC:"\u590D\u5236Vue2\u4EE3\u7801",copyVue3SFC:"\u590D\u5236Vue3\u4EE3\u7801",copySFCFail:"\u590D\u5236SFC\u4EE3\u7801\u5931\u8D25",copySFCSuccess:"\u590D\u5236SFC\u4EE3\u7801\u6210\u529F",saveVue2SFC:"\u4FDD\u5B58\u4E3AVue2\u7EC4\u4EF6",saveVue3SFC:"\u4FDD\u5B58\u4E3AVue3\u7EC4\u4EF6",fileNameForSave:"\u6587\u4EF6\u540D\uFF1A",saveFileTitle:"\u4FDD\u5B58\u4E3A\u6587\u4EF6",fileNameInputPlaceholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D",sampleLoadedSuccess:"\u8868\u5355\u793A\u4F8B\u52A0\u8F7D\u6210\u529F",sampleLoadedFail:"\u8868\u5355\u793A\u4F8B\u52A0\u8F7D\u5931\u8D25",loadFormTemplate:"\u52A0\u8F7D\u6B64\u6A21\u677F",loadFormTemplateHint:"\u662F\u5426\u52A0\u8F7D\u8FD9\u4E2A\u6A21\u677F\uFF1F\u52A0\u8F7D\u540E\u4F1A\u8986\u76D6\u8BBE\u8BA1\u5668\u5F53\u524D\u8868\u5355\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u201C\u64A4\u9500\u201D\u529F\u80FD\u6062\u590D\u3002",loadFormTemplateSuccess:"\u8868\u5355\u6A21\u677F\u52A0\u8F7D\u6210\u529F",loadFormTemplateFailed:"\u8868\u5355\u6A21\u677F\u52A0\u8F7D\u5931\u8D25",currentNodeCannotBeSelected:"\u5F53\u524D\u7EC4\u4EF6\u8282\u70B9\u4E0D\u53EF\u9009\u62E9",widgetSetting:"\u7EC4\u4EF6\u8BBE\u7F6E",formSetting:"\u8868\u5355\u8BBE\u7F6E",prompt:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",import:"\u5BFC\u5165",importJsonHint:"\u5BFC\u5165\u7684JSON\u5185\u5BB9\u987B\u7B26\u5408\u4E0B\u8FF0\u683C\u5F0F\uFF0C\u4EE5\u4FDD\u8BC1\u987A\u5229\u5BFC\u5165.",invalidOptionsData:"\u65E0\u6548\u7684\u9009\u9879\u6570\u636E:",lastPaneCannotBeDeleted:"\u4EC5\u5269\u4E00\u4E2A\u9009\u9879\u5361\u9875\u4E0D\u53EF\u5220\u9664.",duplicateName:"\u7EC4\u4EF6\u540D\u79F0\u5DF2\u5B58\u5728: ",nameRequired:"\u7EC4\u4EF6\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A",numberValidator:"\u6570\u5B57",letterValidator:"\u5B57\u6BCD",letterAndNumberValidator:"\u6570\u5B57\u5B57\u6BCD",mobilePhoneValidator:"\u624B\u673A\u53F7\u7801",emailValidator:"\u90AE\u7BB1",urlValidator:"\u7F51\u5740",noChineseValidator:"\u975E\u4E2D\u6587\u5B57\u7B26",chineseValidator:"\u4EC5\u4E2D\u6587\u5B57\u7B26",rowspanNotConsistentForMergeEntireRow:"\u5B58\u5728\u884C\u9AD8\u4E0D\u4E00\u81F4\u7684\u5355\u5143\u683C, \u65E0\u6CD5\u5408\u5E76\u6574\u884C.",colspanNotConsistentForMergeEntireColumn:"\u5B58\u5728\u5217\u5BBD\u4E0D\u4E00\u81F4\u7684\u5355\u5143\u683C, \u65E0\u6CD5\u5408\u5E76\u6574\u5217.",rowspanNotConsistentForDeleteEntireRow:"\u5B58\u5728\u884C\u9AD8\u4E0D\u4E00\u81F4\u7684\u5355\u5143\u683C, \u4E0D\u53EF\u5220\u9664\u6574\u884C.",colspanNotConsistentForDeleteEntireColumn:"\u5B58\u5728\u5217\u5BBD\u4E0D\u4E00\u81F4\u7684\u5355\u5143\u683C, \u4E0D\u53EF\u5220\u9664\u6574\u5217.",lastColCannotBeDeleted:"\u6700\u540E\u4E00\u5217\u4E0D\u53EF\u5220\u9664.",lastRowCannotBeDeleted:"\u6700\u540E\u4E00\u884C\u4E0D\u53EF\u5220\u9664."},toolbar:{undoHint:"\u64A4\u9500",redoHint:"\u91CD\u505A",pcLayout:"PC",padLayout:"Pad",mobileLayout:"H5",nodeTreeHint:"\u7EC4\u4EF6\u5C42\u6B21\u7ED3\u6784\u6811",nodeTreeTitle:"\u7EC4\u4EF6\u5C42\u6B21\u7ED3\u6784\u6811",clear:"\u6E05\u7A7A",preview:"\u9884\u89C8",importJson:"\u5BFC\u5165JSON",exportJson:"\u5BFC\u51FAJSON",exportCode:"\u5BFC\u51FA\u4EE3\u7801",generateCode:"\u751F\u6210\u4EE3\u7801",generateSFC:"\u751F\u6210SFC"},setting:{basicSetting:"\u57FA\u672C\u5C5E\u6027",attributeSetting:"\u5C5E\u6027\u8BBE\u7F6E",commonSetting:"\u5E38\u89C1\u5C5E\u6027",advancedSetting:"\u9AD8\u7EA7\u5C5E\u6027",eventSetting:"\u4E8B\u4EF6\u5C5E\u6027",uniqueName:"\u552F\u4E00\u540D\u79F0",editNameHelp:"\u4FEE\u6539\u540D\u79F0\u540E\u9700\u6309\u56DE\u8F66\u786E\u8BA4",label:"\u6807\u7B7E",displayType:"\u663E\u793A\u7C7B\u578B",defaultValue:"\u9ED8\u8BA4\u503C",placeholder:"\u5360\u4F4D\u5185\u5BB9",startPlaceholder:"\u8D77\u59CB\u5360\u4F4D\u5185\u5BB9",endPlaceholder:"\u622A\u6B62\u5360\u4F4D\u5185\u5BB9",widgetColumnWidth:"\u7EC4\u4EF6\u5217\u5BBD",widgetSize:"\u7EC4\u4EF6\u5927\u5C0F",fontSize:"\u5B57\u4F53\u5927\u5C0F",textAlign:"\u6587\u5B57\u5BF9\u9F50",autoFullWidth:"\u81EA\u52A8\u62C9\u4F38\u5BBD\u5EA6",showStops:"\u663E\u793A\u95F4\u65AD\u70B9",displayStyle:"\u663E\u793A\u6837\u5F0F",inlineLayout:"\u884C\u5185",blockLayout:"\u5757",buttonStyle:"\u663E\u793A\u4E3A\u6309\u94AE",border:"\u5E26\u6709\u8FB9\u6846",labelWidth:"\u6807\u7B7E\u5BBD\u5EA6",rows:"\u884C\u6570",labelHidden:"\u9690\u85CF\u5B57\u6BB5\u6807\u7B7E",required:"\u5FC5\u586B\u5B57\u6BB5",requiredHint:"\u5FC5\u586B\u6821\u9A8C\u63D0\u793A",validation:"\u5B57\u6BB5\u6821\u9A8C",validationHelp:"\u652F\u6301\u8F93\u5165\u6B63\u5219\u8868\u8FBE\u5F0F",validationHint:"\u6821\u9A8C\u5931\u8D25\u63D0\u793A",readonly:"\u53EA\u8BFB",disabled:"\u7981\u7528",hidden:"\u9690\u85CF",textContent:"\u9759\u6001\u6587\u5B57",preWrap:"\u81EA\u52A8\u6362\u884C",htmlContent:"HTML",clearable:"\u53EF\u6E05\u9664",editable:"\u53EF\u8F93\u5165",format:"\u663E\u793A\u683C\u5F0F",valueFormat:"\u7ED1\u5B9A\u503C\u683C\u5F0F",showPassword:"\u53EF\u663E\u793A\u5BC6\u7801",filterable:"\u53EF\u641C\u7D22\u9009\u9879",allowCreate:"\u5141\u8BB8\u521B\u5EFA\u9009\u9879",remote:"\u53EF\u8FDC\u7A0B\u641C\u7D22",automaticDropdown:"\u81EA\u52A8\u5F39\u51FA\u9009\u9879",multiple:"\u9009\u9879\u53EF\u591A\u9009",multipleLimit:"\u591A\u9009\u6570\u91CF\u9650\u5236",checkStrictly:"\u4EFB\u610F\u7EA7\u8282\u70B9\u53EF\u9009",showAllLevels:"\u663E\u793A\u5B8C\u6574\u8DEF\u5F84",contentPosition:"\u6587\u5B57\u4F4D\u7F6E",plain:"\u6734\u7D20\u6309\u94AE",round:"\u5706\u89D2\u6309\u94AE",circle:"\u5706\u5F62\u6309\u94AE",icon:"\u56FE\u6807",optionsSetting:"\u9009\u9879\u8BBE\u7F6E",addOption:"\u589E\u52A0\u9009\u9879",importOptions:"\u5BFC\u5165\u9009\u9879",resetDefault:"\u91CD\u8BBE\u9009\u4E2D\u9879",uploadSetting:"\u4E0A\u4F20\u53C2\u6570\u8BBE\u7F6E",uploadURL:"\u4E0A\u4F20\u5730\u5740",uploadTip:"\u4E0A\u4F20\u63D0\u793A\u5185\u5BB9",withCredentials:"\u53D1\u9001cookie\u51ED\u8BC1",multipleSelect:"\u6587\u4EF6\u53EF\u591A\u9009",showFileList:"\u663E\u793A\u6587\u4EF6\u5217\u8868",limit:"\u6700\u5927\u4E0A\u4F20\u6570\u91CF",fileMaxSize:"\u6587\u4EF6\u5927\u5C0F\u9650\u5236(MB)",fileTypes:"\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B",fileTypesHelp:"\u652F\u6301\u6DFB\u52A0\u5176\u4ED6\u6587\u4EF6\u7C7B\u578B",headers:"\u4E0A\u4F20\u8BF7\u6C42\u5934",cellWidth:"\u5BBD\u5EA6",cellHeight:"\u9AD8\u5EA6",wordBreak:"\u6587\u5B57\u81EA\u52A8\u6362\u884C",gridColHeight:"\u6805\u683C\u5217\u7EDF\u4E00\u9AD8\u5EA6(px)",gutter:"\u6805\u683C\u95F4\u9694(px)",columnSetting:"\u6805\u683C\u5C5E\u6027\u8BBE\u7F6E",colsOfGrid:"\u5F53\u524D\u6805\u683C\u5217:",colSpanTitle:"\u6805\u683C\u5BBD\u5EA6",colOffsetTitle:"\u5DE6\u4FA7\u95F4\u9694\u683C\u6570",colPushTitle:"\u53F3\u79FB\u6805\u683C\u6570",colPullTitle:"\u5DE6\u79FB\u6805\u683C\u6570",addColumn:"\u589E\u52A0\u6805\u683C",responsive:"\u54CD\u5E94\u5F0F\u5E03\u5C40",tabPaneSetting:"\u9009\u9879\u5361\u8BBE\u7F6E",addTabPane:"\u589E\u52A0\u9009\u9879\u5361\u9875",paneActive:"\u6FC0\u6D3B",customLabelIcon:"\u5B9A\u5236\u5B57\u6BB5\u6807\u7B7E",labelIconClass:"\u6807\u7B7EIcon\u6837\u5F0F",labelIconPosition:"\u6807\u7B7EIcon\u4F4D\u7F6E",labelTooltip:"\u6807\u7B7E\u6587\u5B57\u63D0\u793A",minValue:"\u6700\u5C0F\u503C",maxValue:"\u6700\u5927\u503C",precision:"\u7CBE\u5EA6",step:"\u589E\u51CF\u6B65\u957F",controlsPosition:"\u63A7\u5236\u6309\u94AE\u4F4D\u7F6E",minLength:"\u6700\u5C0F\u957F\u5EA6",maxLength:"\u6700\u5927\u957F\u5EA6",showWordLimit:"\u663E\u793A\u5B57\u6570\u7EDF\u8BA1",prefixIcon:"\u5934\u90E8Icon",suffixIcon:"\u5C3E\u90E8Icon",inputButton:"\u8F93\u5165\u6846\u6309\u94AE\u8BBE\u7F6E",appendButton:"\u6DFB\u52A0\u540E\u7F6E\u6309\u94AE",appendButtonDisabled:"\u540E\u7F6E\u6309\u94AE\u7981\u7528",appendButtonIcon:"\u540E\u7F6E\u6309\u94AEIcon",buttonIcon:"\u6309\u94AEIcon",switchWidth:"\u5F00\u5173\u5BBD\u5EA6\uFF08\u50CF\u7D20\uFF09",activeText:"\u5F00\u542F\u65F6\u6587\u5B57\u63CF\u8FF0",inactiveText:"\u5173\u95ED\u65F6\u6587\u5B57\u63CF\u8FF0",activeColor:"\u5F00\u542F\u65F6\u80CC\u666F\u8272",inactiveColor:"\u5173\u95ED\u65F6\u80CC\u666F\u8272",maxStars:"\u6700\u5927\u8BC4\u5206\u503C",lowThreshold:"\u4F4E\u5206\u754C\u9650\u503C",highThreshold:"\u9AD8\u5206\u754C\u9650\u503C",allowHalf:"\u5141\u8BB8\u534A\u9009",showText:"\u663E\u793A\u8F85\u52A9\u6587\u5B57",showScore:"\u663E\u793A\u5F53\u524D\u5206\u6570",range:"\u662F\u5426\u4E3A\u8303\u56F4\u9009\u62E9",vertical:"\u662F\u5426\u7AD6\u5411\u663E\u793A",showBlankRow:"\u9ED8\u8BA4\u663E\u793A\u65B0\u884C",showRowNumber:"\u663E\u793A\u884C\u53F7",contentHeight:"\u5185\u5BB9\u533A\u9AD8\u5EA6",insertColumnToLeft:"\u63D2\u5165\u5DE6\u4FA7\u5217",insertColumnToRight:"\u63D2\u5165\u53F3\u4FA7\u5217",insertRowAbove:"\u63D2\u5165\u4E0A\u65B9\u884C",insertRowBelow:"\u63D2\u5165\u4E0B\u65B9\u884C",mergeLeftColumn:"\u5408\u5E76\u5DE6\u4FA7\u5355\u5143\u683C",mergeRightColumn:"\u5408\u5E76\u53F3\u4FA7\u5355\u5143\u683C",mergeEntireRow:"\u5408\u5E76\u6574\u884C",mergeRowAbove:"\u5408\u5E76\u4E0A\u65B9\u5355\u5143\u683C",mergeRowBelow:"\u5408\u5E76\u4E0B\u65B9\u5355\u5143\u683C",mergeEntireColumn:"\u5408\u5E76\u6574\u5217",undoMergeCol:"\u64A4\u9500\u5217\u5408\u5E76",undoMergeRow:"\u64A4\u9500\u884C\u5408\u5E76",deleteEntireCol:"\u5220\u9664\u6574\u5217",deleteEntireRow:"\u5220\u9664\u6574\u884C",widgetName:"\u7EC4\u4EF6\u552F\u4E00\u540D\u79F0",formSize:"\u5168\u5C40\u7EC4\u4EF6\u5927\u5C0F",labelPosition:"\u6807\u7B7E\u4F4D\u7F6E",topPosition:"\u9876\u90E8",leftPosition:"\u5DE6\u8FB9",labelAlign:"\u5B57\u6BB5\u6807\u7B7E\u5BF9\u9F50",leftAlign:"\u5C45\u5DE6",centerAlign:"\u5C45\u4E2D",rightAlign:"\u5C45\u53F3",formCss:"\u8868\u5355\u5168\u5C40CSS",addCss:"\u7F16\u5199CSS",customClass:"\u81EA\u5B9A\u4E49CSS\u6837\u5F0F",globalFunctions:"\u8868\u5355\u5168\u5C40\u51FD\u6570",addEventHandler:"\u7F16\u5199\u4EE3\u7801",editWidgetEventHandler:"\u7EC4\u4EF6\u4E8B\u4EF6\u5904\u7406",editFormEventHandler:"\u8868\u5355\u4E8B\u4EF6\u5904\u7406",formSFCSetting:"\u751F\u6210SFC\u8BBE\u7F6E",formModelName:"\u6570\u636E\u5BF9\u8C61\u540D\u79F0",formRefName:"\u5F15\u7528\u540D\u79F0",formRulesName:"\u9A8C\u8BC1\u89C4\u5219\u540D\u79F0",syntaxCheckWarning:"JS\u4EE3\u7801\u5B58\u5728\u8BED\u6CD5\u9519\u8BEF\uFF0C\u8BF7\u4ED4\u7EC6\u68C0\u67E5\uFF01"}}},enLocale_render={render:{hint:{prompt:"Prompt",confirm:"OK",cancel:"Cancel",selectPlaceholder:"Pick some item",timePlaceholder:"Select time",startTimePlaceholder:"Start time",endTimePlaceholder:"End time",datePlaceholder:"Select date",startDatePlaceholder:"Start date",endDatePlaceholder:"End date",blankCellContent:"--",uploadError:"Upload error: ",uploadExceed:"The maximum number(${uploadLimit}) of file uploads has been exceeded.",unsupportedFileType:"Unsupported format: ",fileSizeExceed:"File size out of limit: ",refNotFound:"Ref not found: ",fieldRequired:"Input value should be not null.",invalidNumber:"Invalid number format",selectFile:" File...",downloadFile:"Download",removeFile:"Remove",validationFailed:"Form validation failed",subFormAction:"Action",subFormAddAction:"Add",subFormAddActionHint:"add new row",insertSubFormRow:"insert new row",deleteSubFormRow:"delete this row",nonSubFormType:"The type of widget don't match sub-form"}}},zhLocale_render={render:{hint:{prompt:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",selectPlaceholder:"\u8BF7\u9009\u62E9",timePlaceholder:"\u9009\u62E9\u65F6\u95F4",startTimePlaceholder:"\u8D77\u59CB\u65F6\u95F4",endTimePlaceholder:"\u622A\u6B62\u65F6\u95F4",datePlaceholder:"\u9009\u62E9\u65E5\u671F",startDatePlaceholder:"\u8D77\u59CB\u65E5\u671F",endDatePlaceholder:"\u622A\u6B62\u65E5\u671F",blankCellContent:"--",uploadError:"\u4E0A\u4F20\u9519\u8BEF: ",uploadExceed:"\u6700\u5927\u4E0A\u4F20\u6570\u91CF(${uploadLimit})\u5DF2\u8D85\u51FA.",unsupportedFileType:"\u4E0D\u652F\u6301\u683C\u5F0F: ",fileSizeExceed:"\u6587\u4EF6\u5927\u5C0F\u5DF2\u8D85\u51FA: ",refNotFound:"\u7EC4\u4EF6\u672A\u627E\u5230: ",fieldRequired:"\u5B57\u6BB5\u503C\u4E0D\u53EF\u4E3A\u7A7A",invalidNumber:"\u6570\u636E\u683C\u5F0F\u9519\u8BEF",selectFile:" \u9009\u62E9\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D",removeFile:"\u79FB\u9664",validationFailed:"\u8868\u5355\u6570\u636E\u6821\u9A8C\u5931\u8D25",subFormAction:"\u64CD\u4F5C",subFormAddAction:"\u65B0\u589E",subFormAddActionHint:"\u65B0\u589E\u884C",insertSubFormRow:"\u63D2\u5165\u884C",deleteSubFormRow:"\u5220\u9664\u884C",nonSubFormType:"\u7EC4\u4EF6\u7C7B\u578B\u4E0D\u662F\u5B50\u8868\u5355"}}},enLocale_extension={extension:{widgetLabel:{card:"Card",alert:"Alert"},setting:{cardFolded:"Folded",cardShowFold:"Show Fold",cardWidth:"Width Of Card",cardShadow:"Shadow",alertTitle:"Title",alertType:"Type",description:"Description",closable:"Closable",closeText:"Text On Close Btn",center:"Center",showIcon:"Show Icon",effect:"Effect"}}},zhLocale_extension={extension:{widgetLabel:{card:"\u5361\u7247",alert:"\u63D0\u793A"},setting:{cardFolded:"\u662F\u5426\u6536\u8D77",cardShowFold:"\u663E\u793A\u6298\u53E0\u6309\u94AE",cardWidth:"\u5361\u7247\u5BBD\u5EA6",cardShadow:"\u663E\u793A\u9634\u5F71",alertTitle:"\u6807\u9898",alertType:"\u7C7B\u578B",description:"\u8F85\u52A9\u6027\u6587\u5B57",closable:"\u662F\u5426\u53EF\u5173\u95ED",closeText:"\u5173\u95ED\u6309\u94AE\u6587\u5B57",center:"\u6587\u5B57\u5C45\u4E2D",showIcon:"\u663E\u793A\u56FE\u6807",effect:"\u663E\u793A\u6548\u679C"}}};const langResources={"en-US":xe(xe(xe(xe({something:{}},enLocaleElement),enLocale),enLocale_render),enLocale_extension),"zh-CN":xe(xe(xe(xe({something:{}},zhLocaleElement),zhLocale),zhLocale_render),zhLocale_extension)},i18n=createI18n({locale:localStorage.getItem("v_form_locale")||"zh-CN",messages:langResources}),changeLocale=function(n){i18n.setLang(n),localStorage.setItem("v_form_locale",n)},translate=function(n){return i18n.$st(n)};var i18n$1={methods:{i18nt(n){return i18n.$st(n)},i18n2t(n,d){return i18n.$st2(n,d)}}},index_vue_vue_type_style_index_0_scoped_true_lang$7="",_export_sfc$1=(n,d)=>{const e=n.__vccOpts||n;for(const[p,m]of d)e[p]=m;return e};const _sfc_main$39={name:"SvgIcon",props:{iconClass:{type:String,required:!0},className:{type:String},title:{type:String,default:""}},computed:{iconName(){return`#icon-${this.iconClass}`},svgClass(){return this.className?"svg-icon "+this.className:"svg-icon"}}},_hoisted_1$F=["xlink:href"],_hoisted_2$s={key:0};function _sfc_render$39(n,d,e,p,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("svg",{class:require$$0$1.normalizeClass(g.svgClass),"aria-hidden":"true"},[require$$0$1.createElementVNode("use",{"xlink:href":g.iconName},null,8,_hoisted_1$F),e.title?(require$$0$1.openBlock(),require$$0$1.createElementBlock("title",_hoisted_2$s,require$$0$1.toDisplayString(e.title),1)):require$$0$1.createCommentVNode("",!0)],2)}var SvgIcon=_export_sfc$1(_sfc_main$39,[["render",_sfc_render$39],["__scopeId","data-v-47daada2"]]),index_vue_vue_type_style_index_0_scoped_true_lang$6="";const _sfc_main$38={name:"FieldPanel",mixins:[i18n$1],components:{SvgIcon},props:{designer:Object},inject:["getBannedWidgets","getDesignerConfig"],data(){return{designerConfig:this.getDesignerConfig(),firstTab:"componentLib",scrollerHeight:0,activeNames:["1","2","3","4"],containers:[],basicFields:[],advancedFields:[],customFields:[],formTemplates}},computed:{},created(){this.loadWidgets()},mounted(){this.scrollerHeight=window.innerHeight-56+"px",addWindowResizeHandler(()=>{this.$nextTick(()=>{this.scrollerHeight=window.innerHeight-56+"px"})})},methods:{isBanned(n){return this.getBannedWidgets().indexOf(n)>-1},showFormTemplates(){return this.designerConfig.formTemplates===void 0?!0:!!this.designerConfig.formTemplates},loadWidgets(){this.containers=containers.map(n=>ke(xe({key:generateId()},n),{displayName:this.i18n2t(`designer.widgetLabel.${n.type}`,`extension.widgetLabel.${n.type}`)})).filter(n=>!n.internal&&!this.isBanned(n.type)),this.basicFields=basicFields.map(n=>ke(xe({key:generateId()},n),{displayName:this.i18n2t(`designer.widgetLabel.${n.type}`,`extension.widgetLabel.${n.type}`)})).filter(n=>!this.isBanned(n.type)),this.advancedFields=advancedFields.map(n=>ke(xe({key:generateId()},n),{displayName:this.i18n2t(`designer.widgetLabel.${n.type}`,`extension.widgetLabel.${n.type}`)})).filter(n=>!this.isBanned(n.type)),this.customFields=customFields.map(n=>ke(xe({key:generateId()},n),{displayName:this.i18n2t(`designer.widgetLabel.${n.type}`,`extension.widgetLabel.${n.type}`)})).filter(n=>!this.isBanned(n.type))},handleContainerWidgetClone(n){return this.designer.copyNewContainerWidget(n)},handleFieldWidgetClone(n){return this.designer.copyNewFieldWidget(n)},checkContainerMove(n){return this.designer.checkWidgetMove(n)},checkFieldMove(n){return this.designer.checkFieldMove(n)},onContainerDragEnd(n){},addContainerByDbClick(n){this.designer.addContainerByDbClick(n)},addFieldByDbClick(n){this.designer.addFieldByDbClick(n)},loadFormTemplate(n){this.$confirm(this.i18nt("designer.hint.loadFormTemplateHint"),this.i18nt("render.hint.prompt"),{confirmButtonText:this.i18nt("render.hint.confirm"),cancelButtonText:this.i18nt("render.hint.cancel")}).then(()=>{axios.get(n).then(d=>{let e=!1;typeof d.data=="string"?e=this.designer.loadFormJson(JSON.parse(d.data)):d.data.constructor===Object&&(e=this.designer.loadFormJson(d.data)),e&&this.designer.emitHistoryChange(),this.$message.success(this.i18nt("designer.hint.loadFormTemplateSuccess"))}).catch(d=>{this.$message.error(this.i18nt("designer.hint.loadFormTemplateFailed")+":"+d)})}).catch(d=>{console.error(d)})}}},_hoisted_1$E={class:"panel-container"},_hoisted_2$r=["title","onDblclick"],_hoisted_3$m=["title","onDblclick"],_hoisted_4$f=["title","onDblclick"],_hoisted_5$d=["title","onDblclick"],_hoisted_6$c=["src"],_hoisted_7$9=["src"],_hoisted_8$6={class:"bottom clear-fix"},_hoisted_9$4={class:"ft-title"};function _sfc_render$38(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("draggable"),i=require$$0$1.resolveComponent("el-collapse-item"),u=require$$0$1.resolveComponent("el-collapse"),r=require$$0$1.resolveComponent("el-tab-pane"),t=require$$0$1.resolveComponent("el-popover"),l=require$$0$1.resolveComponent("el-button"),o=require$$0$1.resolveComponent("el-card"),s=require$$0$1.resolveComponent("el-tabs"),f=require$$0$1.resolveComponent("el-scrollbar");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{class:"side-scroll-bar",style:require$$0$1.normalizeStyle({height:m.scrollerHeight})},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$E,[require$$0$1.createVNode(s,{modelValue:m.firstTab,"onUpdate:modelValue":d[1]||(d[1]=h=>m.firstTab=h),class:"no-bottom-margin indent-left-margin"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(r,{name:"componentLib"},{label:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":"el-set-up"}),require$$0$1.createTextVNode(" "+require$$0$1.toDisplayString(n.i18nt("designer.componentLib")),1)])]),default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(u,{modelValue:m.activeNames,"onUpdate:modelValue":d[0]||(d[0]=h=>m.activeNames=h),class:"widget-collapse"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(i,{name:"1",title:n.i18nt("designer.containerTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{tag:"ul",list:m.containers,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},clone:g.handleContainerWidgetClone,"ghost-class":"ghost",sort:!1,move:g.checkContainerMove,onEnd:g.onContainerDragEnd},{item:require$$0$1.withCtx(({element:h})=>[require$$0$1.createElementVNode("li",{class:"container-widget-item",title:h.displayName,onDblclick:v=>g.addContainerByDbClick(h)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":h.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.i18n2t(`designer.widgetLabel.${h.type}`,`extension.widgetLabel.${h.type}`)),1)])],40,_hoisted_2$r)]),_:1},8,["list","clone","move","onEnd"])]),_:1},8,["title"]),require$$0$1.createVNode(i,{name:"2",title:n.i18nt("designer.basicFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{tag:"ul",list:m.basicFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:g.checkFieldMove,clone:g.handleFieldWidgetClone,"ghost-class":"ghost",sort:!1},{item:require$$0$1.withCtx(({element:h})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:h.displayName,onDblclick:v=>g.addFieldByDbClick(h)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":h.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.i18n2t(`designer.widgetLabel.${h.type}`,`extension.widgetLabel.${h.type}`)),1)])],40,_hoisted_3$m)]),_:1},8,["list","move","clone"])]),_:1},8,["title"]),require$$0$1.createVNode(i,{name:"3",title:n.i18nt("designer.advancedFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{tag:"ul",list:m.advancedFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:g.checkFieldMove,clone:g.handleFieldWidgetClone,"ghost-class":"ghost",sort:!1},{item:require$$0$1.withCtx(({element:h})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:h.displayName,onDblclick:v=>g.addFieldByDbClick(h)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":h.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.i18n2t(`designer.widgetLabel.${h.type}`,`extension.widgetLabel.${h.type}`)),1)])],40,_hoisted_4$f)]),_:1},8,["list","move","clone"])]),_:1},8,["title"]),require$$0$1.createVNode(i,{name:"4",title:n.i18nt("designer.customFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{tag:"ul",list:m.customFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:g.checkFieldMove,clone:g.handleFieldWidgetClone,"ghost-class":"ghost",sort:!1},{item:require$$0$1.withCtx(({element:h})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:h.displayName,onDblclick:v=>g.addFieldByDbClick(h)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":h.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.i18n2t(`designer.widgetLabel.${h.type}`,`extension.widgetLabel.${h.type}`)),1)])],40,_hoisted_5$d)]),_:1},8,["list","move","clone"])]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),g.showFormTemplates()?(require$$0$1.openBlock(),require$$0$1.createBlock(r,{key:0,name:"formLib",style:{padding:"8px"}},{label:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":"el-form-template"}),require$$0$1.createTextVNode(" "+require$$0$1.toDisplayString(n.i18nt("designer.formLib")),1)])]),default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(m.formTemplates,(h,v)=>(require$$0$1.openBlock(),require$$0$1.createBlock(o,{"bord-style":{padding:"0"},shadow:"hover",class:"ft-card"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(t,{placement:"right",trigger:"hover"},{reference:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("img",{src:h.imgUrl,style:{width:"200px"}},null,8,_hoisted_6$c)]),default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("img",{src:h.imgUrl,style:{height:"600px",width:"720px"}},null,8,_hoisted_7$9)]),_:2},1024),require$$0$1.createElementVNode("div",_hoisted_8$6,[require$$0$1.createElementVNode("span",_hoisted_9$4,"#"+require$$0$1.toDisplayString(v+1)+" "+require$$0$1.toDisplayString(h.title),1),require$$0$1.createVNode(l,{link:"",type:"primary",class:"right-button",onClick:$=>g.loadFormTemplate(h.jsonUrl)},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.i18nt("designer.hint.loadFormTemplate")),1)]),_:2},1032,["onClick"])])]),_:2},1024))),256))]),_:1})):require$$0$1.createCommentVNode("",!0)]),_:1},8,["modelValue"])])]),_:1},8,["style"])}var WidgetPanel=_export_sfc$1(_sfc_main$38,[["render",_sfc_render$38],["__scopeId","data-v-4f9cfab7"]]),emitter={data(){return{vfEvents:{}}},methods:{emit$(n,d){this.vfEvents[n]&&this.vfEvents[n].forEach(e=>{e(d)})},on$(n,d){this.vfEvents[n]=this.vfEvents[n]||[],this.vfEvents[n].push(d)},off$(n,d){if(this.vfEvents[n]){if(d==null){this.vfEvents[n].length=0;return}for(let e=0;e{if(this.widgetRefList[m].$options.componentName===d){let a=this.widgetRefList[m];a.emit$.call(a,e,p)}}),this.refList&&Object.keys(this.refList).forEach(m=>{if(this.refList[m].$options.componentName===d){let a=this.refList[m];a.emit$.call(a,e,p)}})}}};const _sfc_main$37={name:"container-item-wrapper",props:{widget:Object},computed:{customClass(){return this.widget.options.customClass?this.widget.options.customClass.join(" "):""}}};function _sfc_render$37(n,d,e,p,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{class:require$$0$1.normalizeClass(["container-wrapper",[g.customClass]])},[require$$0$1.renderSlot(n.$slots,"default")],2)}var ContainerItemWrapper=_export_sfc$1(_sfc_main$37,[["render",_sfc_render$37]]),__glob_0_0$3=Object.freeze(Object.defineProperty({__proto__:null,default:ContainerItemWrapper},Symbol.toStringTag,{value:"Module"})),refMixin={methods:{initRefList(){this.refList!==null&&!!this.widget.options.name&&(this.refList[this.widget.options.name]=this)},getWidgetRef(n,d){let e=this.refList[n];return!e&&!!d&&this.$message.error(this.i18nt("render.hint.refNotFound")+n),e},getFormRef(){return this.refList.v_form_ref},getComponentByContainer(n){return n.type==="grid"?"vf-grid-item":n.type+"-item"}}},staticContentWrapper_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$36={name:"static-content-wrapper",mixins:[i18n$1],components:{SvgIcon},props:{field:Object,designer:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designState:{type:Boolean,default:!1},displayStyle:{type:String,default:"block"},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},computed:{selected(){return!!this.designer&&this.field.id===this.designer.selectedId},customClass(){return this.field.options.customClass?this.field.options.customClass.join(" "):""}},methods:{selectField(n){this.designer&&(this.designer.setSelected(n),this.designer.emitEvent("field-selected",this.parentWidget))},selectParentWidget(){this.parentWidget?this.designer.setSelected(this.parentWidget):this.designer.clearSelected()},moveUpWidget(){this.designer.moveUpWidget(this.parentList,this.indexOfParentList),this.designer.emitHistoryChange()},moveDownWidget(){this.designer.moveDownWidget(this.parentList,this.indexOfParentList),this.designer.emitHistoryChange()},removeFieldWidget(){if(this.parentList){const n=this.designer.selectedWidgetName;let d=null;this.parentList.length===1?this.parentWidget&&(d=this.parentWidget):this.parentList.length===1+this.indexOfParentList?d=this.parentList[this.indexOfParentList-1]:d=this.parentList[this.indexOfParentList+1],this.$nextTick(()=>{this.parentList.splice(this.indexOfParentList,1),this.designer.setSelected(d),this.designer.formWidget.deleteWidgetRef(n),this.designer.emitHistoryChange()})}}}},_hoisted_1$D={key:0,class:"field-action"},_hoisted_2$q=["title"],_hoisted_3$l=["title"],_hoisted_4$e=["title"],_hoisted_5$c=["title"],_hoisted_6$b={key:1,class:"drag-handler background-opacity"},_hoisted_7$8=["title"],_hoisted_8$5={key:0};function _sfc_render$36(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("svg-icon");return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{class:require$$0$1.normalizeClass(["field-wrapper",{"design-time-bottom-margin":!!this.designer}]),style:require$$0$1.normalizeStyle({display:e.displayStyle})},[!e.field.options.hidden||e.designState===!0?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:0,class:require$$0$1.normalizeClass(["static-content-item",[g.selected?"selected":"",g.customClass]]),style:require$$0$1.normalizeStyle({display:e.displayStyle}),onClick:d[0]||(d[0]=require$$0$1.withModifiers(c=>g.selectField(e.field),["stop"]))},[require$$0$1.renderSlot(n.$slots,"default",{},void 0,!0)],6)):require$$0$1.createCommentVNode("",!0),this.designer?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$D,[require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.selectParentWidget"),onClick:d[1]||(d[1]=require$$0$1.withModifiers(c=>g.selectParentWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-back"})],8,_hoisted_2$q),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:0,title:n.i18nt("designer.hint.moveUpWidget"),onClick:d[2]||(d[2]=require$$0$1.withModifiers(c=>g.moveUpWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-move-up"})],8,_hoisted_3$l)):require$$0$1.createCommentVNode("",!0),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:1,title:n.i18nt("designer.hint.moveDownWidget"),onClick:d[3]||(d[3]=require$$0$1.withModifiers(c=>g.moveDownWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-move-down"})],8,_hoisted_4$e)):require$$0$1.createCommentVNode("",!0),require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.remove"),onClick:d[4]||(d[4]=require$$0$1.withModifiers((...c)=>g.removeFieldWidget&&g.removeFieldWidget(...c),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-delete"})],8,_hoisted_5$c)])):require$$0$1.createCommentVNode("",!0),e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_6$b,[require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.dragHandler")},[require$$0$1.createVNode(a,{"icon-class":"el-drag-move"})],8,_hoisted_7$8),require$$0$1.createElementVNode("i",null,require$$0$1.toDisplayString(n.i18n2t(`designer.widgetLabel.${e.field.type}`,`extension.widgetLabel.${e.field.type}`)),1),e.field.options.hidden===!0?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",_hoisted_8$5,[require$$0$1.createVNode(a,{"icon-class":"el-hide"})])):require$$0$1.createCommentVNode("",!0)])):require$$0$1.createCommentVNode("",!0)],64)):require$$0$1.createCommentVNode("",!0)],6)}var StaticContentWrapper=_export_sfc$1(_sfc_main$36,[["render",_sfc_render$36],["__scopeId","data-v-40b65808"]]),__glob_0_19$1=Object.freeze(Object.defineProperty({__proto__:null,default:StaticContentWrapper},Symbol.toStringTag,{value:"Module"}));const getRegExp=function(n){return{number:"/^[-]?\\d+(\\.\\d+)?$/",letter:"/^[A-Za-z]+$/",letterAndNumber:"/^[A-Za-z0-9]+$/",mobilePhone:"/^[1][3-9][0-9]{9}$/",letterStartNumberIncluded:"/^[A-Za-z]+[A-Za-z\\d]*$/",noChinese:"/^[^\u4E00-\u9FA5]+$/",chinese:"/^[\u4E00-\u9FA5]+$/",email:"/^([-_A-Za-z0-9.]+)@([_A-Za-z0-9]+\\.)+[A-Za-z0-9]{2,3}$/",url:"/^([hH][tT]{2}[pP]:\\/\\/|[hH][tT]{2}[pP][sS]:\\/\\/)(([A-Za-z0-9-~]+)\\.)+([A-Za-z0-9-~\\/])+$/"}[n]},validateFn=function(validatorName,rule,value,callback,defaultErrorMsg){if(isNull(value)||value.length<=0){callback();return}const reg=eval(getRegExp(validatorName));if(reg.test(value))callback();else{let n=rule.errorMsg||defaultErrorMsg;callback(new Error(n))}},FormValidators={number(n,d,e){validateFn("number",n,d,e,"["+n.label+"]\u5305\u542B\u975E\u6570\u5B57\u5B57\u7B26")},letter(n,d,e){validateFn("letter",n,d,e,"["+n.label+"]\u5305\u542B\u975E\u5B57\u6BCD\u5B57\u7B26")},letterAndNumber(n,d,e){validateFn("letterAndNumber",n,d,e,"["+n.label+"]\u53EA\u80FD\u8F93\u5165\u5B57\u6BCD\u6216\u6570\u5B57")},mobilePhone(n,d,e){validateFn("mobilePhone",n,d,e,"["+n.label+"]\u624B\u673A\u53F7\u7801\u683C\u5F0F\u6709\u8BEF")},noBlankStart(n,d,e){},noBlankEnd(n,d,e){},letterStartNumberIncluded(n,d,e){validateFn("letterStartNumberIncluded",n,d,e,"["+n.label+"]\u5FC5\u987B\u4EE5\u5B57\u6BCD\u5F00\u5934\uFF0C\u53EF\u5305\u542B\u6570\u5B57")},noChinese(n,d,e){validateFn("noChinese",n,d,e,"["+n.label+"]\u4E0D\u53EF\u8F93\u5165\u4E2D\u6587\u5B57\u7B26")},chinese(n,d,e){validateFn("chinese",n,d,e,"["+n.label+"]\u53EA\u80FD\u8F93\u5165\u4E2D\u6587\u5B57\u7B26")},email(n,d,e){validateFn("email",n,d,e,"["+n.label+"]\u90AE\u7BB1\u683C\u5F0F\u6709\u8BEF")},url(n,d,e){validateFn("url",n,d,e,"["+n.label+"]URL\u683C\u5F0F\u6709\u8BEF")},regExp(rule,value,callback){if(isNull(value)||value.length<=0){callback();return}const pattern=eval(rule.regExp);if(pattern.test(value))callback();else{let n=rule.errorMsg||"["+rule.label+"]invalid value";callback(new Error(n))}}};function mitt(n){return{all:n=n||new Map,on:function(d,e){var p=n.get(d);p?p.push(e):n.set(d,[e])},off:function(d,e){var p=n.get(d);p&&(e?p.splice(p.indexOf(e)>>>0,1):n.set(d,[]))},emit:function(d,e){var p=n.get(d);p&&p.slice().map(function(m){m(e)}),(p=n.get("*"))&&p.slice().map(function(m){m(d,e)})}}}const instance=mitt(),eventBus={};eventBus.$on=instance.on,eventBus.$off=instance.off,eventBus.$emit=instance.emit;var fieldMixin={inject:["refList","getFormConfig","getGlobalDsv","globalOptionData","globalModel","getOptionData"],computed:{formConfig(){return this.getFormConfig()},widgetSize(){return this.field.options.size||"default"},subFormName(){return this.parentWidget?this.parentWidget.options.name:""},subFormItemFlag(){return this.parentWidget?this.parentWidget.type==="sub-form":!1},formModel:{cache:!1,get(){return this.globalModel.formModel}}},methods:{getPropName(){return this.subFormItemFlag&&!this.designState?this.subFormName+"."+this.subFormRowIndex+"."+this.field.options.name+"":this.field.options.name},initFieldModel(){if(!!this.field.formItemFlag){if(!!this.subFormItemFlag&&!this.designState){let n=this.formModel[this.subFormName];(n===void 0||n[this.subFormRowIndex]===void 0||n[this.subFormRowIndex][this.field.options.name]===void 0)&&this.field.options.defaultValue!==void 0?(this.fieldModel=this.field.options.defaultValue,n[this.subFormRowIndex][this.field.options.name]=this.field.options.defaultValue):n[this.subFormRowIndex][this.field.options.name]===void 0?(this.fieldModel=null,n[this.subFormRowIndex][this.field.options.name]=null):this.fieldModel=n[this.subFormRowIndex][this.field.options.name],setTimeout(()=>{this.handleOnChangeForSubForm(this.fieldModel,this.oldFieldValue,n,this.subFormRowId)},800),this.oldFieldValue=deepClone(this.fieldModel),this.initFileList();return}this.formModel[this.field.options.name]===void 0&&this.field.options.defaultValue!==void 0?this.fieldModel=this.field.options.defaultValue:this.formModel[this.field.options.name]===void 0?this.formModel[this.field.options.name]=null:this.fieldModel=this.formModel[this.field.options.name],this.oldFieldValue=deepClone(this.fieldModel),this.initFileList()}},initFileList(){this.field.type!=="picture-upload"&&this.field.type!=="file-upload"||this.designState===!0||this.fieldModel&&(Array.isArray(this.fieldModel)?this.fileList=deepClone(this.fieldModel):this.fileList.splice(0,0,deepClone(this.fieldModel)))},initEventHandler(){this.on$("setFormData",n=>{console.log("formModel of globalModel----------",this.globalModel.formModel),this.subFormItemFlag||this.setValue(n[this.field.options.name])}),this.on$("field-value-changed",n=>{if(this.subFormItemFlag){let d=this.formModel[this.subFormName];this.handleOnChangeForSubForm(n[0],n[1],d,this.subFormRowId)}else this.handleOnChange(n[0],n[1])}),this.on$("reloadOptionItems",n=>{(n.length===0||n.indexOf(this.field.options.name)>-1)&&this.initOptionItems(!0)})},handleOnCreated(){this.field.options.onCreated&&new Function(this.field.options.onCreated).call(this)},handleOnMounted(){this.field.options.onMounted&&new Function(this.field.options.onMounted).call(this)},registerToRefList(n){this.refList!==null&&!!this.field.options.name&&(this.subFormItemFlag&&!this.designState?(n&&delete this.refList[n+"@row"+this.subFormRowId],this.refList[this.field.options.name+"@row"+this.subFormRowId]=this):(n&&delete this.refList[n],this.refList[this.field.options.name]=this))},unregisterFromRefList(){if(this.refList!==null&&!!this.field.options.name){let n=this.field.options.name;this.subFormItemFlag&&!this.designState?delete this.refList[n+"@row"+this.subFormRowId]:delete this.refList[n]}},initOptionItems(n){if(!this.designState&&(this.field.type==="radio"||this.field.type==="checkbox"||this.field.type==="select"||this.field.type==="cascader")){const d=this.getOptionData();!!d&&d.hasOwnProperty(this.field.options.name)&&(n?this.reloadOptions(d[this.field.options.name]):this.loadOptions(d[this.field.options.name]))}},refreshDefaultValue(){this.designState===!0&&this.field.options.defaultValue!==void 0&&(this.fieldModel=this.field.options.defaultValue)},clearFieldRules(){!this.field.formItemFlag||this.rules.splice(0,this.rules.length)},buildFieldRules(){if(!(!this.field.formItemFlag&&this.field.options.hidden)){if(this.rules.splice(0,this.rules.length),this.field.options.required&&this.rules.push({required:!0,trigger:["blur"],message:this.field.options.requiredHint||this.i18nt("render.hint.fieldRequired")}),this.field.options.validation){let n=this.field.options.validation;FormValidators[n]?this.rules.push({validator:FormValidators[n],trigger:["blur","change"],label:this.field.options.label,errorMsg:this.field.options.validationHint}):this.rules.push({validator:FormValidators.regExp,trigger:["blur","change"],regExp:n,label:this.field.options.label,errorMsg:this.field.options.validationHint})}if(this.field.options.onValidate){let n=(d,e,p)=>new Function("rule","value","callback",this.field.options.onValidate).call(this,d,e,p);this.rules.push({validator:n,trigger:["blur","change"],label:this.field.options.label})}}},disableChangeValidate(){!this.rules||this.rules.forEach(n=>{n.trigger&&n.trigger.splice(0,n.trigger.length)})},enableChangeValidate(){!this.rules||this.rules.forEach(n=>{n.trigger&&(n.trigger.push("blur"),n.trigger.push("change"))})},disableOptionOfList(n,d){!!n&&n.length>0&&n.forEach(e=>{e.value===d&&(e.disabled=!0)})},enableOptionOfList(n,d){!!n&&n.length>0&&n.forEach(e=>{e.value===d&&(e.disabled=!1)})},emitFieldDataChange(n,d){this.emit$("field-value-changed",[n,d]),this.dispatch("VFormRender","fieldChange",[this.field.options.name,n,d,this.subFormName,this.subFormRowIndex])},syncUpdateFormModel(n){if(!this.designState)if(this.subFormItemFlag){let e=(this.formModel[this.subFormName]||[{}])[this.subFormRowIndex];e&&(e[this.field.options.name]=n)}else this.formModel[this.field.options.name]=n},handleChangeEvent(n){this.syncUpdateFormModel(n),this.emitFieldDataChange(n,this.oldFieldValue),this.oldFieldValue=deepClone(n),this.dispatch("VFormRender","fieldValidation",[this.getPropName()])},handleFocusCustomEvent(n){this.oldFieldValue=deepClone(this.fieldModel),this.field.options.onFocus&&new Function("event",this.field.options.onFocus).call(this,n)},handleBlurCustomEvent(n){this.field.options.onBlur&&new Function("event",this.field.options.onBlur).call(this,n)},handleInputCustomEvent(n){this.syncUpdateFormModel(n),this.dispatch("VFormRender","fieldValidation",[this.getPropName()]),this.field.options.onInput&&new Function("value",this.field.options.onInput).call(this,n)},emitAppendButtonClick(){this.designState||(this.field.options.onAppendButtonClick?new Function(this.field.options.onAppendButtonClick).call(this):this.dispatch("VFormRender","appendButtonClick",[this]))},handleOnChange(n,d){this.field.options.onChange&&new Function("value","oldValue",this.field.options.onChange).call(this,n,d)},handleOnChangeForSubForm(n,d,e,p){this.field.options.onChange&&new Function("value","oldValue","subFormData","rowId",this.field.options.onChange).call(this,n,d,e,p)},handleButtonWidgetClick(){this.designState||(this.field.options.onClick?new Function(this.field.options.onClick).call(this):this.dispatch("VFormRender","buttonClick",[this]))},remoteQuery(n){this.field.options.onRemoteQuery&&new Function("keyword",this.field.options.onRemoteQuery).call(this,n)},getFormRef(){return this.refList.v_form_ref},getWidgetRef(n,d){let e=this.refList[n];return!e&&!!d&&this.$message.error(this.i18nt("render.hint.refNotFound")+n),e},getFieldEditor(){return this.$refs.fieldEditor},setValue(n){if(this.field.formItemFlag){let d=deepClone(this.fieldModel);this.fieldModel=n,this.initFileList(),this.syncUpdateFormModel(n),this.emitFieldDataChange(n,d)}},getValue(){return this.fieldModel},resetField(){let n=this.field.options.defaultValue;this.setValue(n),this.$nextTick(()=>{}),(this.field.type==="picture-upload"||this.field.type==="file-upload")&&(this.$refs.fieldEditor.clearFiles(),this.fileList.splice(0,this.fileList.length))},setWidgetOption(n,d){this.field.options.hasOwnProperty(n)&&(this.field.options[n]=d)},setReadonly(n){this.field.options.readonly=n},setDisabled(n){this.field.options.disabled=n},setAppendButtonVisible(n){this.field.options.appendButton=n},setAppendButtonDisabled(n){this.field.options.appendButtonDisabled=n},setHidden(n){this.field.options.hidden=n,n?this.clearFieldRules():this.buildFieldRules()},setRequired(n){this.field.options.required=n,this.buildFieldRules()},setLabel(n){this.field.options.label=n},focus(){!!this.getFieldEditor()&&!!this.getFieldEditor().focus&&this.getFieldEditor().focus()},clearSelectedOptions(){this.field.type!=="checkbox"&&this.field.type!=="radio"&&this.field.type!=="select"||(this.field.type==="checkbox"||this.field.type==="select"&&this.field.options.multiple?this.fieldModel=[]:this.fieldModel="")},loadOptions(n){this.field.options.optionItems=deepClone(n)},reloadOptions(n){this.field.options.optionItems=deepClone(n)},disableOption(n){this.disableOptionOfList(this.field.options.optionItems,n)},enableOption(n){this.enableOptionOfList(this.field.options.optionItems,n)},getOptionItems(){return this.field.options.optionItems},setUploadHeader(n,d){this.uploadHeaders[n]=d},setUploadData(n,d){this.uploadData[n]=d},setToolbar(n){this.customToolbar=n},isSubFormItem(){return this.parentWidget?this.parentWidget.type==="sub-form":!1},addCssClass(n){this.field.options.customClass?this.field.options.customClass.push(n):this.field.options.customClass=[n]},removeCssClass(n){if(!this.field.options.customClass)return;let d=-1;this.field.options.customClass.map((e,p)=>{e===n&&(d=p)}),d>-1&&this.field.options.customClass.splice(d,1)}}},buttonWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$35={name:"button-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$35(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-button"),c=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,"design-state":e.designState,"display-style":e.field.options.displayStyle,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",type:e.field.options.type,size:n.widgetSize,plain:e.field.options.plain,round:e.field.options.round,circle:e.field.options.circle,icon:e.field.options.icon,disabled:e.field.options.disabled,onClick:n.handleButtonWidgetClick},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(e.field.options.label),1)]),_:1},8,["type","size","plain","round","circle","icon","disabled","onClick"])]),_:1},8,["designer","field","design-state","display-style","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var buttonWidget=_export_sfc$1(_sfc_main$35,[["render",_sfc_render$35],["__scopeId","data-v-6f92d10c"]]),__glob_0_0$2=Object.freeze(Object.defineProperty({__proto__:null,default:buttonWidget},Symbol.toStringTag,{value:"Module"})),formItemWrapper_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$34={name:"form-item-wrapper",mixins:[i18n$1],components:{SvgIcon},props:{field:Object,designer:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""},rules:Array},inject:["getFormConfig"],computed:{formConfig(){return this.getFormConfig()},selected(){return!!this.designer&&this.field.id===this.designer.selectedId},label(){return this.field.options.labelHidden?"":this.field.options.label},labelWidth(){return this.field.options.labelHidden?0:this.field.options.labelWidth?this.field.options.labelWidth:this.designer?this.designer.formConfig.labelWidth:this.formConfig.labelWidth},labelAlign(){return this.field.options.labelAlign?this.field.options.labelAlign:this.designer?this.designer.formConfig.labelAlign||"label-left-align":this.formConfig.labelAlign||"label-left-align"},customClass(){return this.field.options.customClass?this.field.options.customClass.join(" "):""},subFormName(){return this.parentWidget?this.parentWidget.options.name:""},subFormItemFlag(){return this.parentWidget?this.parentWidget.type==="sub-form":!1}},created(){},methods:{selectField(n){this.designer&&(this.designer.setSelected(n),this.designer.emitEvent("field-selected",this.parentWidget))},selectParentWidget(){this.parentWidget?this.designer.setSelected(this.parentWidget):this.designer.clearSelected()},moveUpWidget(){this.designer.moveUpWidget(this.parentList,this.indexOfParentList),this.designer.emitHistoryChange()},moveDownWidget(){this.designer.moveDownWidget(this.parentList,this.indexOfParentList),this.designer.emitHistoryChange()},removeFieldWidget(){if(this.parentList){const n=this.designer.selectedWidgetName;let d=null;this.parentList.length===1?this.parentWidget&&(d=this.parentWidget):this.parentList.length===1+this.indexOfParentList?d=this.parentList[this.indexOfParentList-1]:d=this.parentList[this.indexOfParentList+1],this.$nextTick(()=>{this.parentList.splice(this.indexOfParentList,1),this.designer.setSelected(d),this.designer.formWidget.deleteWidgetRef(n),this.designer.emitHistoryChange()})}},getPropName(){return this.subFormItemFlag&&!this.designState?this.subFormName+"."+this.subFormRowIndex+"."+this.field.options.name+"":this.field.options.name}}},_hoisted_1$C={key:0,class:"custom-label"},_hoisted_2$p={key:0,class:"field-action"},_hoisted_3$k=["title"],_hoisted_4$d=["title"],_hoisted_5$b=["title"],_hoisted_6$a=["title"],_hoisted_7$7={key:1,class:"drag-handler background-opacity"},_hoisted_8$4=["title"],_hoisted_9$3={key:0};function _sfc_render$34(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("el-tooltip"),i=require$$0$1.resolveComponent("el-form-item");return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{class:require$$0$1.normalizeClass(["field-wrapper",{"design-time-bottom-margin":!!this.designer}])},[!!e.field.formItemFlag&&(!e.field.options.hidden||e.designState===!0)?(require$$0$1.openBlock(),require$$0$1.createBlock(i,{key:0,label:g.label,"label-width":g.labelWidth+"px",title:e.field.options.labelTooltip,rules:e.rules,prop:g.getPropName(),class:require$$0$1.normalizeClass([g.selected?"selected":"",g.labelAlign,g.customClass,e.field.options.required?"required":""]),onClick:d[0]||(d[0]=require$$0$1.withModifiers(u=>g.selectField(e.field),["stop"]))},{label:require$$0$1.withCtx(()=>[e.field.options.labelIconClass?(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",_hoisted_1$C,[e.field.options.labelIconPosition==="front"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[e.field.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createVNode(c,{content:e.field.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"])]),_:1},8,["content"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(g.label),1)],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createVNode(a,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(g.label),1)],64))],64)):e.field.options.labelIconPosition==="rear"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[e.field.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(g.label),1),require$$0$1.createVNode(c,{content:e.field.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"])]),_:1},8,["content"])],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(g.label),1),require$$0$1.createVNode(a,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"])],64))],64)):require$$0$1.createCommentVNode("",!0)])):require$$0$1.createCommentVNode("",!0)]),default:require$$0$1.withCtx(()=>[require$$0$1.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["label","label-width","title","rules","prop","class"])):require$$0$1.createCommentVNode("",!0),this.designer?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_2$p,[require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.selectParentWidget"),onClick:d[1]||(d[1]=require$$0$1.withModifiers(u=>g.selectParentWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-back"})],8,_hoisted_3$k),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:0,title:n.i18nt("designer.hint.moveUpWidget"),onClick:d[2]||(d[2]=require$$0$1.withModifiers(u=>g.moveUpWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-move-up"})],8,_hoisted_4$d)):require$$0$1.createCommentVNode("",!0),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:1,title:n.i18nt("designer.hint.moveDownWidget"),onClick:d[3]||(d[3]=require$$0$1.withModifiers(u=>g.moveDownWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-move-down"})],8,_hoisted_5$b)):require$$0$1.createCommentVNode("",!0),require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.remove"),onClick:d[4]||(d[4]=require$$0$1.withModifiers((...u)=>g.removeFieldWidget&&g.removeFieldWidget(...u),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-delete"})],8,_hoisted_6$a)])):require$$0$1.createCommentVNode("",!0),e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_7$7,[require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.dragHandler")},[require$$0$1.createVNode(a,{"icon-class":"el-drag-move"})],8,_hoisted_8$4),require$$0$1.createElementVNode("i",null,require$$0$1.toDisplayString(n.i18n2t(`designer.widgetLabel.${e.field.type}`,`extension.widgetLabel.${e.field.type}`)),1),e.field.options.hidden===!0?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",_hoisted_9$3,[require$$0$1.createVNode(a,{"icon-class":"el-hide"})])):require$$0$1.createCommentVNode("",!0)])):require$$0$1.createCommentVNode("",!0)],64)):require$$0$1.createCommentVNode("",!0)],2)}var FormItemWrapper=_export_sfc$1(_sfc_main$34,[["render",_sfc_render$34],["__scopeId","data-v-2d53b001"]]),__glob_0_8$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormItemWrapper},Symbol.toStringTag,{value:"Module"})),cascaderWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$33={name:"cascader-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{showFullPath(){return this.field.options.showAllLevels===void 0||!!this.field.options.showAllLevels}},beforeCreate(){},created(){this.initOptionItems(),this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}},_hoisted_1$B={class:"full-width-input"};function _sfc_render$33(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-cascader"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$B,[require$$0$1.createVNode(a,{ref:"fieldEditor",options:e.field.options.optionItems,modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),disabled:e.field.options.disabled,size:n.widgetSize,clearable:e.field.options.clearable,filterable:e.field.options.filterable,placeholder:e.field.options.placeholder||n.i18nt("render.hint.selectPlaceholder"),"show-all-levels":g.showFullPath,props:{checkStrictly:e.field.options.checkStrictly,multiple:e.field.options.multiple,expandTrigger:"hover"},onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onChange:n.handleChangeEvent},null,8,["options","modelValue","disabled","size","clearable","filterable","placeholder","show-all-levels","props","onFocus","onBlur","onChange"])])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var cascaderWidget=_export_sfc$1(_sfc_main$33,[["render",_sfc_render$33],["__scopeId","data-v-130f5280"]]),__glob_0_1$3=Object.freeze(Object.defineProperty({__proto__:null,default:cascaderWidget},Symbol.toStringTag,{value:"Module"})),checkboxWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$32={name:"checkbox-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initOptionItems(),this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$32(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-checkbox-button"),c=require$$0$1.resolveComponent("el-checkbox"),i=require$$0$1.resolveComponent("el-checkbox-group"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(i,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),disabled:e.field.options.disabled,size:n.widgetSize,onChange:n.handleChangeEvent},{default:require$$0$1.withCtx(()=>[e.field.options.buttonStyle?(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},require$$0$1.renderList(e.field.options.optionItems,(r,t)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:t,label:r.value,disabled:r.disabled,border:e.field.options.border,style:require$$0$1.normalizeStyle({display:e.field.options.displayStyle})},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.label),1)]),_:2},1032,["label","disabled","border","style"]))),128)):(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},require$$0$1.renderList(e.field.options.optionItems,(r,t)=>(require$$0$1.openBlock(),require$$0$1.createBlock(c,{key:t,label:r.value,disabled:r.disabled,border:e.field.options.border,style:require$$0$1.normalizeStyle({display:e.field.options.displayStyle})},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.label),1)]),_:2},1032,["label","disabled","border","style"]))),128))]),_:1},8,["modelValue","disabled","size","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var checkboxWidget=_export_sfc$1(_sfc_main$32,[["render",_sfc_render$32],["__scopeId","data-v-501920b3"]]),__glob_0_2$3=Object.freeze(Object.defineProperty({__proto__:null,default:checkboxWidget},Symbol.toStringTag,{value:"Module"})),colorWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$31={name:"color-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$31(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-color-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),size:n.widgetSize,disabled:e.field.options.disabled,onChange:n.handleChangeEvent},null,8,["modelValue","size","disabled","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var colorWidget=_export_sfc$1(_sfc_main$31,[["render",_sfc_render$31],["__scopeId","data-v-1aa76420"]]),__glob_0_3$3=Object.freeze(Object.defineProperty({__proto__:null,default:colorWidget},Symbol.toStringTag,{value:"Module"})),dateRangeWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$30={name:"date-range-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$30(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-date-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""])},[require$$0$1.createVNode(a,{ref:"fieldEditor",type:e.field.options.type,modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:n.widgetSize,clearable:e.field.options.clearable,editable:e.field.options.editable,format:e.field.options.format,"value-format":e.field.options.valueFormat,"start-placeholder":e.field.options.startPlaceholder||n.i18nt("render.hint.startDatePlaceholder"),"end-placeholder":e.field.options.endPlaceholder||n.i18nt("render.hint.endDatePlaceholder"),onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onChange:n.handleChangeEvent},null,8,["type","modelValue","disabled","readonly","size","clearable","editable","format","value-format","start-placeholder","end-placeholder","onFocus","onBlur","onChange"])],2)]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var dateRangeWidget=_export_sfc$1(_sfc_main$30,[["render",_sfc_render$30],["__scopeId","data-v-8805cad8"]]),__glob_0_4$3=Object.freeze(Object.defineProperty({__proto__:null,default:dateRangeWidget},Symbol.toStringTag,{value:"Module"})),dateWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2$={name:"date-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2$(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-date-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",type:e.field.options.type,modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""]),readonly:e.field.options.readonly,disabled:e.field.options.disabled,size:n.widgetSize,clearable:e.field.options.clearable,editable:e.field.options.editable,format:e.field.options.format,"value-format":e.field.options.valueFormat,placeholder:e.field.options.placeholder||n.i18nt("render.hint.datePlaceholder"),onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onChange:n.handleChangeEvent},null,8,["type","modelValue","class","readonly","disabled","size","clearable","editable","format","value-format","placeholder","onFocus","onBlur","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var dateWidget=_export_sfc$1(_sfc_main$2$,[["render",_sfc_render$2$],["__scopeId","data-v-14d5b71a"]]),__glob_0_5$3=Object.freeze(Object.defineProperty({__proto__:null,default:dateWidget},Symbol.toStringTag,{value:"Module"})),dividerWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2_={name:"divider-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2_(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-divider"),c=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",direction:"horizontal","content-position":e.field.options.contentPosition},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(e.field.options.label),1)]),_:1},8,["content-position"])]),_:1},8,["designer","field","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var dividerWidget=_export_sfc$1(_sfc_main$2_,[["render",_sfc_render$2_],["__scopeId","data-v-a326e5e0"]]),__glob_0_6$2=Object.freeze(Object.defineProperty({__proto__:null,default:dividerWidget},Symbol.toStringTag,{value:"Module"})),fileUploadWidget_vue_vue_type_style_index_0_scoped_true_lang="";let selectFileText="'"+translate("render.hint.selectFile")+"'";const _sfc_main$2Z={name:"file-upload-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{SvgIcon,FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:[],rules:[],uploadHeaders:{},uploadData:{key:""},fileList:[],uploadBtnHidden:!1,styleVariables:{"--select-file-action":selectFileText}}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{handleFileExceed(){let n=this.field.options.limit;this.$message.warning(this.i18nt("render.hint.uploadExceed").replace("${uploadLimit}",n))},beforeFileUpload(n){let d=!1,e=n.name.substring(n.name.lastIndexOf(".")+1);if(!!this.field.options&&!!this.field.options.fileTypes){let g=this.field.options.fileTypes;g.length>0&&(d=g.some(a=>e.toLowerCase()===a.toLowerCase()))}if(!d)return this.$message.error(this.i18nt("render.hint.unsupportedFileType")+e),!1;let p=!1,m=5;return!!this.field.options&&!!this.field.options.fileMaxSize&&(m=this.field.options.fileMaxSize),p=n.size/1024/1024<=m,p?(this.uploadData.key=n.name,this.handleOnBeforeUpload(n)):(this.$message.error(this.i18nt("render.hint.fileSizeExceed")+m+"MB"),!1)},handleOnBeforeUpload(n){if(this.field.options.onBeforeUpload){let e=new Function("file",this.field.options.onBeforeUpload).call(this,n);return typeof e=="boolean"?e:!0}return!0},updateFieldModelAndEmitDataChangeForUpload(n,d,e){let p=deepClone(this.fieldModel);!!d&&!!d.name&&!!d.url?this.fieldModel.push({name:d.name,url:d.url}):!!e&&!!e.name&&!!e.url?this.fieldModel.push({name:e.name,url:e.url}):this.fieldModel=deepClone(n),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,p)},handleFileUpload(n,d,e){if(d.status==="success"){let p=null;this.field.options.onUploadSuccess&&(p=new Function("result","file","fileList",this.field.options.onUploadSuccess).call(this,n,d,e)),this.updateFieldModelAndEmitDataChangeForUpload(e,p,n),!!p&&!!p.name?d.name=p.name:d.name=d.name||n.name||n.fileName||n.filename,!!p&&!!p.url?d.url=p.url:d.url=d.url||n.url,this.fileList=deepClone(e),this.uploadBtnHidden=e.length>=this.field.options.limit}},updateFieldModelAndEmitDataChangeForRemove(n,d){let e=deepClone(this.fieldModel);this.fieldModel.splice(n,1),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,e)},removeUploadFile(n,d,e){let p=-1,m=null;this.fileList.forEach((g,a)=>{g.name===n&&(g.url===d||!!e&&g.uid===e)&&(p=a,m=g)}),p>=0&&(this.fileList.splice(p,1),this.updateFieldModelAndEmitDataChangeForRemove(p,this.fileList),this.uploadBtnHidden=this.fileList.length>=this.field.options.limit,this.field.options.onFileRemove&&new Function("file","fileList",this.field.options.onFileRemove).call(this,m,this.fileList))},handleUploadError(n,d,e){this.field.options.onUploadError?new Function("error","file","fileList",this.field.options.onUploadError).call(this,n,d,e):this.$message({message:this.i18nt("render.hint.uploadError")+n,duration:3e3,type:"error"})}}},_withScopeId$3=n=>(require$$0$1.pushScopeId("data-v-396987e9"),n=n(),require$$0$1.popScopeId(),n),_hoisted_1$A={key:0,class:"el-upload__tip"},_hoisted_2$o=_withScopeId$3(()=>require$$0$1.createElementVNode("i",{class:"el-icon-plus avatar-uploader-icon"},null,-1)),_hoisted_3$j={class:"upload-file-list"},_hoisted_4$c=["title"],_hoisted_5$a=["href"],_hoisted_6$9=["title"],_hoisted_7$6=["title","onClick"];function _sfc_render$2Z(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("el-upload"),i=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(i,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{ref:"fieldEditor",disabled:e.field.options.disabled,style:require$$0$1.normalizeStyle(m.styleVariables),class:require$$0$1.normalizeClass(["dynamicPseudoAfter",{hideUploadDiv:m.uploadBtnHidden}]),action:e.field.options.uploadURL,headers:m.uploadHeaders,data:m.uploadData,"with-credentials":e.field.options.withCredentials,multiple:e.field.options.multipleSelect,"file-list":m.fileList,"show-file-list":e.field.options.showFileList,limit:e.field.options.limit,"on-exceed":g.handleFileExceed,"before-upload":g.beforeFileUpload,"on-success":g.handleFileUpload,"on-error":g.handleUploadError},{tip:require$$0$1.withCtx(()=>[e.field.options.uploadTip?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$A,require$$0$1.toDisplayString(e.field.options.uploadTip),1)):require$$0$1.createCommentVNode("",!0)]),default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":"el-plus"}),_hoisted_2$o]),file:require$$0$1.withCtx(({file:u})=>[require$$0$1.createElementVNode("div",_hoisted_3$j,[require$$0$1.createElementVNode("span",{class:"upload-file-name",title:u.name},require$$0$1.toDisplayString(u.name),9,_hoisted_4$c),require$$0$1.createElementVNode("a",{href:u.url,download:"",target:"_blank"},[require$$0$1.createElementVNode("span",{class:"el-icon-download file-action",title:n.i18nt("render.hint.downloadFile")},[require$$0$1.createVNode(a,{"icon-class":"el-download"})],8,_hoisted_6$9)],8,_hoisted_5$a),e.field.options.disabled?require$$0$1.createCommentVNode("",!0):(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",{key:0,class:"file-action",title:n.i18nt("render.hint.removeFile"),onClick:r=>g.removeUploadFile(u.name,u.url,u.uid)},[require$$0$1.createVNode(a,{"icon-class":"el-delete"})],8,_hoisted_7$6))])]),_:1},8,["disabled","style","action","headers","data","with-credentials","multiple","file-list","show-file-list","class","limit","on-exceed","before-upload","on-success","on-error"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var fileUploadWidget=_export_sfc$1(_sfc_main$2Z,[["render",_sfc_render$2Z],["__scopeId","data-v-396987e9"]]),__glob_0_7$1=Object.freeze(Object.defineProperty({__proto__:null,default:fileUploadWidget},Symbol.toStringTag,{value:"Module"})),htmlTextWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2Y={name:"html-text-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}},_hoisted_1$z=["innerHTML"];function _sfc_render$2Y(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{ref:"fieldEditor",innerHTML:e.field.options.htmlContent},null,8,_hoisted_1$z)]),_:1},8,["designer","field","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var htmlTextWidget=_export_sfc$1(_sfc_main$2Y,[["render",_sfc_render$2Y],["__scopeId","data-v-a0d236d6"]]),__glob_0_9$1=Object.freeze(Object.defineProperty({__proto__:null,default:htmlTextWidget},Symbol.toStringTag,{value:"Module"})),inputWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2X={name:"input-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper,SvgIcon},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{inputType(){return this.field.options.type==="number"?"text":this.field.options.type}},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2X(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("el-button"),i=require$$0$1.resolveComponent("el-input"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(i,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:n.widgetSize,class:"hide-spin-button",type:g.inputType,"show-password":e.field.options.showPassword,placeholder:e.field.options.placeholder,clearable:e.field.options.clearable,minlength:e.field.options.minLength,maxlength:e.field.options.maxLength,"show-word-limit":e.field.options.showWordLimit,"prefix-icon":e.field.options.prefixIcon,"suffix-icon":e.field.options.suffixIcon,onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onInput:n.handleInputCustomEvent,onChange:n.handleChangeEvent},require$$0$1.createSlots({_:2},[e.field.options.appendButton?{name:"append",fn:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{disabled:e.field.options.disabled||e.field.options.appendButtonDisabled,onClick:n.emitAppendButtonClick},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":e.field.options.buttonIcon},null,8,["icon-class"])]),_:1},8,["disabled","onClick"])]),key:"0"}:void 0]),1032,["modelValue","disabled","readonly","size","type","show-password","placeholder","clearable","minlength","maxlength","show-word-limit","prefix-icon","suffix-icon","onFocus","onBlur","onInput","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var inputWidget=_export_sfc$1(_sfc_main$2X,[["render",_sfc_render$2X],["__scopeId","data-v-b6d96cc0"]]),__glob_0_10$1=Object.freeze(Object.defineProperty({__proto__:null,default:inputWidget},Symbol.toStringTag,{value:"Module"})),numberWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2W={name:"number-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2W(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-input-number"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),class:"full-width-input",disabled:e.field.options.disabled,size:n.widgetSize,"controls-position":e.field.options.controlsPosition,placeholder:e.field.options.placeholder,min:e.field.options.min,max:e.field.options.max,precision:e.field.options.precision,step:e.field.options.step,onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onChange:n.handleChangeEvent},null,8,["modelValue","disabled","size","controls-position","placeholder","min","max","precision","step","onFocus","onBlur","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var numberWidget=_export_sfc$1(_sfc_main$2W,[["render",_sfc_render$2W],["__scopeId","data-v-78aba4ad"]]),__glob_0_11$1=Object.freeze(Object.defineProperty({__proto__:null,default:numberWidget},Symbol.toStringTag,{value:"Module"})),pictureUploadWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2V={name:"picture-upload-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper,SvgIcon},data(){return{oldFieldValue:null,fieldModel:[],rules:[],uploadHeaders:{},uploadData:{key:""},fileList:[],fileListBeforeRemove:[],uploadBtnHidden:!1,previewIndex:1}},computed:{previewList(){return this.fileList.map(n=>n.url)}},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{handlePictureExceed(){let n=this.field.options.limit;this.$message.warning(this.i18nt("render.hint.uploadExceed").replace("${uploadLimit}",n))},beforePictureUpload(n){let d=!1;if(!!this.field.options&&!!this.field.options.fileTypes){let m=this.field.options.fileTypes;m.length>0&&(d=m.some(g=>n.type==="image/"+g))}if(!d)return this.$message.error(this.i18nt("render.hint.unsupportedFileType")+n.type),!1;let e=!1,p=5;return!!this.field.options&&!!this.field.options.fileMaxSize&&(p=this.field.options.fileMaxSize),e=n.size/1024/1024<=p,e?(this.uploadData.key=n.name,this.handleOnBeforeUpload(n)):(this.$message.error(this.$("render.hint.fileSizeExceed")+p+"MB"),!1)},handleOnBeforeUpload(n){if(this.field.options.onBeforeUpload){let e=new Function("file",this.field.options.onBeforeUpload).call(this,n);return typeof e=="boolean"?e:!0}return!0},updateFieldModelAndEmitDataChangeForUpload(n,d,e){let p=deepClone(this.fieldModel);!!d&&!!d.name&&!!d.url?this.fieldModel.push({name:d.name,url:d.url}):!!e&&!!e.name&&!!e.url?this.fieldModel.push({name:e.name,url:e.url}):this.fieldModel=deepClone(n),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,p)},handlePictureUpload(n,d,e){if(d.status==="success"){let p=null;this.field.options.onUploadSuccess&&(p=new Function("result","file","fileList",this.field.options.onUploadSuccess).call(this,n,d,e)),this.updateFieldModelAndEmitDataChangeForUpload(e,p,n),this.fileList=deepClone(e),this.uploadBtnHidden=e.length>=this.field.options.limit}},updateFieldModelAndEmitDataChangeForRemove(n){let d=deepClone(this.fieldModel),e=-1;this.fileListBeforeRemove.map((p,m)=>{p.name===n.name&&(p.url===n.url||!!p.uid&&p.uid===n.uid)&&(e=m)}),e>-1&&this.fieldModel.splice(e,1),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,d)},handleBeforeRemove(n){this.fileListBeforeRemove=deepClone(n)},handlePictureRemove(n){this.handleBeforeRemove(this.fileList),this.fileList.splice(this.fileList.indexOf(n),1),this.updateFieldModelAndEmitDataChangeForRemove(n);let d=deepClone(this.fileList);this.uploadBtnHidden=d.length>=this.field.options.limit,this.field.options.onFileRemove&&new Function("file","fileList",this.field.options.onFileRemove).call(this,n,d)},handleUploadError(n,d,e){this.field.options.onUploadError?new Function("error","file","fileList",this.field.options.onUploadError).call(this,n,d,e):this.$message({message:this.i18nt("render.hint.uploadError")+n,duration:3e3,type:"error"})},handlePictureCardPreview({url:n}){this.previewIndex=this.previewList.indexOf(n),this.$refs.imageRef.$el.children[0].click()}}},_hoisted_1$y={class:"el-upload-list__item-status-label"},_hoisted_2$n={class:"el-icon--upload-success",style:{color:"#FFF"}},_hoisted_3$i={class:"el-upload-list__item-actions"},_hoisted_4$b=["onClick"],_hoisted_5$9=["onClick"],_hoisted_6$8={key:0,class:"el-upload__tip"},_hoisted_7$5={class:"uploader-icon"};function _sfc_render$2V(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-image"),c=require$$0$1.resolveComponent("svg-icon"),i=require$$0$1.resolveComponent("el-upload"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(i,{ref:"fieldEditor",disabled:e.field.options.disabled,action:e.field.options.uploadURL,headers:m.uploadHeaders,data:m.uploadData,"with-credentials":e.field.options.withCredentials,multiple:e.field.options.multipleSelect,"file-list":m.fileList,"show-file-list":e.field.options.showFileList,"list-type":"picture-card",class:require$$0$1.normalizeClass({hideUploadDiv:m.uploadBtnHidden}),limit:e.field.options.limit,"on-exceed":g.handlePictureExceed,"before-upload":g.beforePictureUpload,"on-preview":g.handlePictureCardPreview,"on-success":g.handlePictureUpload,"on-error":g.handleUploadError},{file:require$$0$1.withCtx(({file:r})=>[require$$0$1.createVNode(a,{ref:"imageRef",style:{width:"100%",height:"100%"},src:r.url,"preview-src-list":g.previewList,"initial-index":m.previewIndex,fit:"cover","preview-teleported":""},null,8,["src","preview-src-list","initial-index"]),require$$0$1.createElementVNode("label",_hoisted_1$y,[require$$0$1.createElementVNode("i",_hoisted_2$n,[require$$0$1.createVNode(c,{class:"","icon-class":"el-check"})])]),require$$0$1.createElementVNode("span",_hoisted_3$i,[require$$0$1.createElementVNode("span",{class:"el-upload-list__item-preview",onClick:t=>g.handlePictureCardPreview(r)},[require$$0$1.createVNode(c,{"icon-class":"el-zoom-in"})],8,_hoisted_4$b),require$$0$1.createElementVNode("span",{class:"el-upload-list__item-delete",onClick:t=>g.handlePictureRemove(r)},[require$$0$1.createVNode(c,{"icon-class":"el-delete"})],8,_hoisted_5$9)])]),tip:require$$0$1.withCtx(()=>[e.field.options.uploadTip?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_6$8,require$$0$1.toDisplayString(e.field.options.uploadTip),1)):require$$0$1.createCommentVNode("",!0)]),default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_7$5,[require$$0$1.createVNode(c,{"icon-class":"el-plus"})])]),_:1},8,["disabled","action","headers","data","with-credentials","multiple","file-list","show-file-list","class","limit","on-exceed","before-upload","on-preview","on-success","on-error"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var pictureUploadWidget=_export_sfc$1(_sfc_main$2V,[["render",_sfc_render$2V],["__scopeId","data-v-5404b7f6"]]),__glob_0_12$1=Object.freeze(Object.defineProperty({__proto__:null,default:pictureUploadWidget},Symbol.toStringTag,{value:"Module"})),radioWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2U={name:"radio-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initOptionItems(),this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2U(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-radio-button"),c=require$$0$1.resolveComponent("el-radio"),i=require$$0$1.resolveComponent("el-radio-group"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(i,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),class:require$$0$1.normalizeClass({"radio-group-block":e.field.options.displayStyle==="block"}),disabled:e.field.options.disabled,size:n.widgetSize,onChange:n.handleChangeEvent},{default:require$$0$1.withCtx(()=>[e.field.options.buttonStyle?(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},require$$0$1.renderList(e.field.options.optionItems,(r,t)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:t,label:r.value,disabled:r.disabled,border:e.field.options.border,style:require$$0$1.normalizeStyle({display:e.field.options.displayStyle})},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.label),1)]),_:2},1032,["label","disabled","border","style"]))),128)):(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},require$$0$1.renderList(e.field.options.optionItems,(r,t)=>(require$$0$1.openBlock(),require$$0$1.createBlock(c,{key:t,label:r.value,disabled:r.disabled,border:e.field.options.border,style:require$$0$1.normalizeStyle({display:e.field.options.displayStyle})},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(r.label),1)]),_:2},1032,["label","disabled","border","style"]))),128))]),_:1},8,["modelValue","class","disabled","size","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var radioWidget=_export_sfc$1(_sfc_main$2U,[["render",_sfc_render$2U],["__scopeId","data-v-5becdb92"]]),__glob_0_13$1=Object.freeze(Object.defineProperty({__proto__:null,default:radioWidget},Symbol.toStringTag,{value:"Module"})),rateWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2T={name:"rate-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2T(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-rate"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),disabled:e.field.options.disabled,max:e.field.options.max,"low-threshold":e.field.options.lowThreshold,"high-threshold":e.field.options.highThreshold,"allow-half":e.field.options.allowHalf,"show-text":e.field.options.showText,"show-score":e.field.options.showScore,onChange:n.handleChangeEvent},null,8,["modelValue","disabled","max","low-threshold","high-threshold","allow-half","show-text","show-score","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var rateWidget=_export_sfc$1(_sfc_main$2T,[["render",_sfc_render$2T],["__scopeId","data-v-e8d5267c"]]),__glob_0_14$1=Object.freeze(Object.defineProperty({__proto__:null,default:rateWidget},Symbol.toStringTag,{value:"Module"})),quill={exports:{}};/*! + * Quill Editor v1.3.7 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */(function(n,d){(function(p,m){n.exports=m()})(typeof self!="undefined"?self:commonjsGlobal,function(){return function(e){var p={};function m(g){if(p[g])return p[g].exports;var a=p[g]={i:g,l:!1,exports:{}};return e[g].call(a.exports,a,a.exports,m),a.l=!0,a.exports}return m.m=e,m.c=p,m.d=function(g,a,c){m.o(g,a)||Object.defineProperty(g,a,{configurable:!1,enumerable:!0,get:c})},m.n=function(g){var a=g&&g.__esModule?function(){return g.default}:function(){return g};return m.d(a,"a",a),a},m.o=function(g,a){return Object.prototype.hasOwnProperty.call(g,a)},m.p="",m(m.s=109)}([function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=m(17),a=m(18),c=m(19),i=m(45),u=m(46),r=m(47),t=m(48),l=m(49),o=m(12),s=m(32),f=m(33),h=m(31),v=m(1),$={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:g.default,Format:a.default,Leaf:c.default,Embed:t.default,Scroll:i.default,Block:r.default,Inline:u.default,Text:l.default,Attributor:{Attribute:o.default,Class:s.default,Style:f.default,Store:h.default}};p.default=$},function(e,p,m){var g=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,$){v.__proto__=$}||function(v,$){for(var C in $)$.hasOwnProperty(C)&&(v[C]=$[C])};return function(v,$){h(v,$);function C(){this.constructor=v}v.prototype=$===null?Object.create($):(C.prototype=$.prototype,new C)}}();Object.defineProperty(p,"__esModule",{value:!0});var a=function(h){g(v,h);function v($){var C=this;return $="[Parchment] "+$,C=h.call(this,$)||this,C.message=$,C.name=C.constructor.name,C}return v}(Error);p.ParchmentError=a;var c={},i={},u={},r={};p.DATA_KEY="__blot";var t;(function(h){h[h.TYPE=3]="TYPE",h[h.LEVEL=12]="LEVEL",h[h.ATTRIBUTE=13]="ATTRIBUTE",h[h.BLOT=14]="BLOT",h[h.INLINE=7]="INLINE",h[h.BLOCK=11]="BLOCK",h[h.BLOCK_BLOT=10]="BLOCK_BLOT",h[h.INLINE_BLOT=6]="INLINE_BLOT",h[h.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",h[h.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",h[h.ANY=15]="ANY"})(t=p.Scope||(p.Scope={}));function l(h,v){var $=s(h);if($==null)throw new a("Unable to create "+h+" blot");var C=$,b=h instanceof Node||h.nodeType===Node.TEXT_NODE?h:C.create(v);return new C(b,v)}p.create=l;function o(h,v){return v===void 0&&(v=!1),h==null?null:h[p.DATA_KEY]!=null?h[p.DATA_KEY].blot:v?o(h.parentNode,v):null}p.find=o;function s(h,v){v===void 0&&(v=t.ANY);var $;if(typeof h=="string")$=r[h]||c[h];else if(h instanceof Text||h.nodeType===Node.TEXT_NODE)$=r.text;else if(typeof h=="number")h&t.LEVEL&t.BLOCK?$=r.block:h&t.LEVEL&t.INLINE&&($=r.inline);else if(h instanceof HTMLElement){var C=(h.getAttribute("class")||"").split(/\s+/);for(var b in C)if($=i[C[b]],$)break;$=$||u[h.tagName]}return $==null?null:v&t.LEVEL&$.scope&&v&t.TYPE&$.scope?$:null}p.query=s;function f(){for(var h=[],v=0;v1)return h.map(function(b){return f(b)});var $=h[0];if(typeof $.blotName!="string"&&typeof $.attrName!="string")throw new a("Invalid definition");if($.blotName==="abstract")throw new a("Cannot register abstract class");if(r[$.blotName||$.attrName]=$,typeof $.keyName=="string")c[$.keyName]=$;else if($.className!=null&&(i[$.className]=$),$.tagName!=null){Array.isArray($.tagName)?$.tagName=$.tagName.map(function(b){return b.toUpperCase()}):$.tagName=$.tagName.toUpperCase();var C=Array.isArray($.tagName)?$.tagName:[$.tagName];C.forEach(function(b){(u[b]==null||$.className==null)&&(u[b]=$)})}return $}p.register=f},function(e,p,m){var g=m(51),a=m(11),c=m(3),i=m(20),u=String.fromCharCode(0),r=function(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};r.prototype.insert=function(t,l){var o={};return t.length===0?this:(o.insert=t,l!=null&&typeof l=="object"&&Object.keys(l).length>0&&(o.attributes=l),this.push(o))},r.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},r.prototype.retain=function(t,l){if(t<=0)return this;var o={retain:t};return l!=null&&typeof l=="object"&&Object.keys(l).length>0&&(o.attributes=l),this.push(o)},r.prototype.push=function(t){var l=this.ops.length,o=this.ops[l-1];if(t=c(!0,{},t),typeof o=="object"){if(typeof t.delete=="number"&&typeof o.delete=="number")return this.ops[l-1]={delete:o.delete+t.delete},this;if(typeof o.delete=="number"&&t.insert!=null&&(l-=1,o=this.ops[l-1],typeof o!="object"))return this.ops.unshift(t),this;if(a(t.attributes,o.attributes)){if(typeof t.insert=="string"&&typeof o.insert=="string")return this.ops[l-1]={insert:o.insert+t.insert},typeof t.attributes=="object"&&(this.ops[l-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof o.retain=="number")return this.ops[l-1]={retain:o.retain+t.retain},typeof t.attributes=="object"&&(this.ops[l-1].attributes=t.attributes),this}}return l===this.ops.length?this.ops.push(t):this.ops.splice(l,0,t),this},r.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},r.prototype.filter=function(t){return this.ops.filter(t)},r.prototype.forEach=function(t){this.ops.forEach(t)},r.prototype.map=function(t){return this.ops.map(t)},r.prototype.partition=function(t){var l=[],o=[];return this.forEach(function(s){var f=t(s)?l:o;f.push(s)}),[l,o]},r.prototype.reduce=function(t,l){return this.ops.reduce(t,l)},r.prototype.changeLength=function(){return this.reduce(function(t,l){return l.insert?t+i.length(l):l.delete?t-l.delete:t},0)},r.prototype.length=function(){return this.reduce(function(t,l){return t+i.length(l)},0)},r.prototype.slice=function(t,l){t=t||0,typeof l!="number"&&(l=1/0);for(var o=[],s=i.iterator(this.ops),f=0;f0&&o.next(f.retain-h)}for(var v=new r(s);l.hasNext()||o.hasNext();)if(o.peekType()==="insert")v.push(o.next());else if(l.peekType()==="delete")v.push(l.next());else{var $=Math.min(l.peekLength(),o.peekLength()),C=l.next($),b=o.next($);if(typeof b.retain=="number"){var y={};typeof C.retain=="number"?y.retain=$:y.insert=C.insert;var _=i.attributes.compose(C.attributes,b.attributes,typeof C.retain=="number");if(_&&(y.attributes=_),v.push(y),!o.hasNext()&&a(v.ops[v.ops.length-1],y)){var E=new r(l.rest());return v.concat(E).chop()}}else typeof b.delete=="number"&&typeof C.retain=="number"&&v.push(b)}return v.chop()},r.prototype.concat=function(t){var l=new r(this.ops.slice());return t.ops.length>0&&(l.push(t.ops[0]),l.ops=l.ops.concat(t.ops.slice(1))),l},r.prototype.diff=function(t,l){if(this.ops===t.ops)return new r;var o=[this,t].map(function($){return $.map(function(C){if(C.insert!=null)return typeof C.insert=="string"?C.insert:u;var b=$===t?"on":"with";throw new Error("diff() called "+b+" non-document")}).join("")}),s=new r,f=g(o[0],o[1],l),h=i.iterator(this.ops),v=i.iterator(t.ops);return f.forEach(function($){for(var C=$[1].length;C>0;){var b=0;switch($[0]){case g.INSERT:b=Math.min(v.peekLength(),C),s.push(v.next(b));break;case g.DELETE:b=Math.min(C,h.peekLength()),h.next(b),s.delete(b);break;case g.EQUAL:b=Math.min(h.peekLength(),v.peekLength(),C);var y=h.next(b),_=v.next(b);a(y.insert,_.insert)?s.retain(b,i.attributes.diff(y.attributes,_.attributes)):s.push(_).delete(b);break}C-=b}}),s.chop()},r.prototype.eachLine=function(t,l){l=l||` +`;for(var o=i.iterator(this.ops),s=new r,f=0;o.hasNext();){if(o.peekType()!=="insert")return;var h=o.peek(),v=i.length(h)-o.peekLength(),$=typeof h.insert=="string"?h.insert.indexOf(l,v)-v:-1;if($<0)s.push(o.next());else if($>0)s.push(o.next($));else{if(t(s,o.next(1).attributes||{},f)===!1)return;f+=1,s=new r}}s.length()>0&&t(s,{},f)},r.prototype.transform=function(t,l){if(l=!!l,typeof t=="number")return this.transformPosition(t,l);for(var o=i.iterator(this.ops),s=i.iterator(t.ops),f=new r;o.hasNext()||s.hasNext();)if(o.peekType()==="insert"&&(l||s.peekType()!=="insert"))f.retain(i.length(o.next()));else if(s.peekType()==="insert")f.push(s.next());else{var h=Math.min(o.peekLength(),s.peekLength()),v=o.next(h),$=s.next(h);if(v.delete)continue;$.delete?f.push($):f.retain(h,i.attributes.transform(v.attributes,$.attributes,l))}return f.chop()},r.prototype.transformPosition=function(t,l){l=!!l;for(var o=i.iterator(this.ops),s=0;o.hasNext()&&s<=t;){var f=o.peekLength(),h=o.peekType();if(o.next(),h==="delete"){t-=Math.min(f,t-s);continue}else h==="insert"&&(s0&&(S1&&arguments[1]!==void 0?arguments[1]:!1;if(q&&(S===0||S>=this.length()-E)){var L=this.clone();return S===0?(this.parent.insertBefore(L,this),this):(this.parent.insertBefore(L,this.next),L)}else{var A=a(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"split",this).call(this,S,q);return this.cache={},A}}}]),M}(l.default.Block);T.blotName="block",T.tagName="P",T.defaultChild="break",T.allowedChildren=[h.default,l.default.Embed,$.default];function x(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return w==null||(typeof w.formats=="function"&&(M=(0,i.default)(M,w.formats())),w.parent==null||w.parent.blotName=="scroll"||w.parent.statics.scope!==w.statics.scope)?M:x(w.parent,M)}p.bubbleFormats=x,p.BlockEmbed=O,p.default=T},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.overload=p.expandConfig=void 0;var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},a=function(){function N(B,R){var V=[],F=!0,P=!1,j=void 0;try{for(var I=B[Symbol.iterator](),W;!(F=(W=I.next()).done)&&(V.push(W.value),!(R&&V.length===R));F=!0);}catch(H){P=!0,j=H}finally{try{!F&&I.return&&I.return()}finally{if(P)throw j}}return V}return function(B,R){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return N(B,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function N(B,R){for(var V=0;V2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof R!="string"){var j=R.attrName||R.blotName;typeof j=="string"?this.register("formats/"+j,R,V):Object.keys(R).forEach(function(I){F.register(I,R[I],V)})}else this.imports[R]!=null&&!P&&k.warn("Overwriting "+R+" with",V),this.imports[R]=V,(R.startsWith("blots/")||R.startsWith("formats/"))&&V.blotName!=="abstract"?v.default.register(V):R.startsWith("modules")&&typeof V.register=="function"&&V.register()}}]);function N(B){var R=this,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(M(this,N),this.options=q(B,V),this.container=this.options.container,this.container==null)return k.error("Invalid Quill container",B);this.options.debug&&N.debug(this.options.debug);var F=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new o.default,this.scroll=v.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new t.default(this.scroll),this.selection=new C.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(o.default.events.EDITOR_CHANGE,function(j){j===o.default.events.TEXT_CHANGE&&R.root.classList.toggle("ql-blank",R.editor.isBlank())}),this.emitter.on(o.default.events.SCROLL_UPDATE,function(j,I){var W=R.selection.lastRange,H=W&&W.length===0?W.index:void 0;L.call(R,function(){return R.editor.update(null,I,H)},j)});var P=this.clipboard.convert(`
`+F+"


");this.setContents(P),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return c(N,[{key:"addContainer",value:function(R){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof R=="string"){var F=R;R=document.createElement("div"),R.classList.add(F)}return this.container.insertBefore(R,V),R}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(R,V,F){var P=this,j=A(R,V,F),I=a(j,4);return R=I[0],V=I[1],F=I[3],L.call(this,function(){return P.editor.deleteText(R,V)},F,R,-1*V)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(R),this.container.classList.toggle("ql-disabled",!R)}},{key:"focus",value:function(){var R=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=R,this.scrollIntoView()}},{key:"format",value:function(R,V){var F=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o.default.sources.API;return L.call(this,function(){var j=F.getSelection(!0),I=new u.default;if(j==null)return I;if(v.default.query(R,v.default.Scope.BLOCK))I=F.editor.formatLine(j.index,j.length,w({},R,V));else{if(j.length===0)return F.selection.format(R,V),I;I=F.editor.formatText(j.index,j.length,w({},R,V))}return F.setSelection(j,o.default.sources.SILENT),I},P)}},{key:"formatLine",value:function(R,V,F,P,j){var I=this,W=void 0,H=A(R,V,F,P,j),z=a(H,4);return R=z[0],V=z[1],W=z[2],j=z[3],L.call(this,function(){return I.editor.formatLine(R,V,W)},j,R,0)}},{key:"formatText",value:function(R,V,F,P,j){var I=this,W=void 0,H=A(R,V,F,P,j),z=a(H,4);return R=z[0],V=z[1],W=z[2],j=z[3],L.call(this,function(){return I.editor.formatText(R,V,W)},j,R,0)}},{key:"getBounds",value:function(R){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,F=void 0;typeof R=="number"?F=this.selection.getBounds(R,V):F=this.selection.getBounds(R.index,R.length);var P=this.container.getBoundingClientRect();return{bottom:F.bottom-P.top,height:F.height,left:F.left-P.left,right:F.right-P.left,top:F.top-P.top,width:F.width}}},{key:"getContents",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,F=A(R,V),P=a(F,2);return R=P[0],V=P[1],this.editor.getContents(R,V)}},{key:"getFormat",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof R=="number"?this.editor.getFormat(R,V):this.editor.getFormat(R.index,R.length)}},{key:"getIndex",value:function(R){return R.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(R){return this.scroll.leaf(R)}},{key:"getLine",value:function(R){return this.scroll.line(R)}},{key:"getLines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof R!="number"?this.scroll.lines(R.index,R.length):this.scroll.lines(R,V)}},{key:"getModule",value:function(R){return this.theme.modules[R]}},{key:"getSelection",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return R&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,F=A(R,V),P=a(F,2);return R=P[0],V=P[1],this.editor.getText(R,V)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(R,V,F){var P=this,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:N.sources.API;return L.call(this,function(){return P.editor.insertEmbed(R,V,F)},j,R)}},{key:"insertText",value:function(R,V,F,P,j){var I=this,W=void 0,H=A(R,0,F,P,j),z=a(H,4);return R=z[0],W=z[2],j=z[3],L.call(this,function(){return I.editor.insertText(R,V,W)},j,R,V.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(R,V,F){this.clipboard.dangerouslyPasteHTML(R,V,F)}},{key:"removeFormat",value:function(R,V,F){var P=this,j=A(R,V,F),I=a(j,4);return R=I[0],V=I[1],F=I[3],L.call(this,function(){return P.editor.removeFormat(R,V)},F,R)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(R){var V=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o.default.sources.API;return L.call(this,function(){R=new u.default(R);var P=V.getLength(),j=V.editor.deleteText(0,P),I=V.editor.applyDelta(R),W=I.ops[I.ops.length-1];W!=null&&typeof W.insert=="string"&&W.insert[W.insert.length-1]===` +`&&(V.editor.deleteText(V.getLength()-1,1),I.delete(1));var H=j.compose(I);return H},F)}},{key:"setSelection",value:function(R,V,F){if(R==null)this.selection.setRange(null,V||N.sources.API);else{var P=A(R,V,F),j=a(P,4);R=j[0],V=j[1],F=j[3],this.selection.setRange(new $.Range(R,V),F),F!==o.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(R){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o.default.sources.API,F=new u.default().insert(R);return this.setContents(F,V)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o.default.sources.USER,V=this.scroll.update(R);return this.selection.update(R),V}},{key:"updateContents",value:function(R){var V=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o.default.sources.API;return L.call(this,function(){return R=new u.default(R),V.editor.applyDelta(R,F)},F,!0)}}]),N}();S.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},S.events=o.default.events,S.sources=o.default.sources,S.version="1.3.7",S.imports={delta:u.default,parchment:v.default,"core/module":f.default,"core/theme":T.default};function q(N,B){if(B=(0,y.default)(!0,{container:N,modules:{clipboard:!0,keyboard:!0,history:!0}},B),!B.theme||B.theme===S.DEFAULTS.theme)B.theme=T.default;else if(B.theme=S.import("themes/"+B.theme),B.theme==null)throw new Error("Invalid theme "+B.theme+". Did you register it?");var R=(0,y.default)(!0,{},B.theme.DEFAULTS);[R,B].forEach(function(P){P.modules=P.modules||{},Object.keys(P.modules).forEach(function(j){P.modules[j]===!0&&(P.modules[j]={})})});var V=Object.keys(R.modules).concat(Object.keys(B.modules)),F=V.reduce(function(P,j){var I=S.import("modules/"+j);return I==null?k.error("Cannot load "+j+" module. Are you sure you registered it?"):P[j]=I.DEFAULTS||{},P},{});return B.modules!=null&&B.modules.toolbar&&B.modules.toolbar.constructor!==Object&&(B.modules.toolbar={container:B.modules.toolbar}),B=(0,y.default)(!0,{},S.DEFAULTS,{modules:F},R,B),["bounds","container","scrollingContainer"].forEach(function(P){typeof B[P]=="string"&&(B[P]=document.querySelector(B[P]))}),B.modules=Object.keys(B.modules).reduce(function(P,j){return B.modules[j]&&(P[j]=B.modules[j]),P},{}),B}function L(N,B,R,V){if(this.options.strict&&!this.isEnabled()&&B===o.default.sources.USER)return new u.default;var F=R==null?null:this.getSelection(),P=this.editor.delta,j=N();if(F!=null&&(R===!0&&(R=F.index),V==null?F=D(F,j,B):V!==0&&(F=D(F,R,V,B)),this.setSelection(F,o.default.sources.SILENT)),j.length()>0){var I,W=[o.default.events.TEXT_CHANGE,j,P,B];if((I=this.emitter).emit.apply(I,[o.default.events.EDITOR_CHANGE].concat(W)),B!==o.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,W)}}return j}function A(N,B,R,V,F){var P={};return typeof N.index=="number"&&typeof N.length=="number"?typeof B!="number"?(F=V,V=R,R=B,B=N.length,N=N.index):(B=N.length,N=N.index):typeof B!="number"&&(F=V,V=R,R=B,B=0),(typeof R=="undefined"?"undefined":g(R))==="object"?(P=R,F=V):typeof R=="string"&&(V!=null?P[R]=V:F=R),F=F||o.default.sources.API,[N,B,P,F]}function D(N,B,R,V){if(N==null)return null;var F=void 0,P=void 0;if(B instanceof u.default){var j=[N.index,N.index+N.length].map(function(z){return B.transformPosition(z,V!==o.default.sources.USER)}),I=a(j,2);F=I[0],P=I[1]}else{var W=[N.index,N.index+N.length].map(function(z){return z=0?z+R:Math.max(B,z+R)}),H=a(W,2);F=H[0],P=H[1]}return new $.Range(F,P-F)}p.expandConfig=q,p.overload=A,p.default=S},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function h(v,$){for(var C=0;C<$.length;C++){var b=$[C];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,$,C){return $&&h(v.prototype,$),C&&h(v,C),v}}(),a=function h(v,$,C){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,$);if(b===void 0){var y=Object.getPrototypeOf(v);return y===null?void 0:h(y,$,C)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(C)}},c=m(7),i=t(c),u=m(0),r=t(u);function t(h){return h&&h.__esModule?h:{default:h}}function l(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}function o(h,v){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:h}function s(h,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);h.prototype=Object.create(v&&v.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(h,v):h.__proto__=v)}var f=function(h){s(v,h);function v(){return l(this,v),o(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return g(v,[{key:"formatAt",value:function(C,b,y,_){if(v.compare(this.statics.blotName,y)<0&&r.default.query(y,r.default.Scope.BLOT)){var E=this.isolate(C,b);_&&E.wrap(y,_)}else a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"formatAt",this).call(this,C,b,y,_)}},{key:"optimize",value:function(C){if(a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,C),this.parent instanceof v&&v.compare(this.statics.blotName,this.parent.statics.blotName)>0){var b=this.parent.isolate(this.offset(),this.length());this.moveChildren(b),b.wrap(this)}}}],[{key:"compare",value:function(C,b){var y=v.order.indexOf(C),_=v.order.indexOf(b);return y>=0||_>=0?y-_:C===b?0:C1?_-1:0),O=1;O<_;O++)E[O-1]=arguments[O];(this.listeners[y.type]||[]).forEach(function(T){var x=T.node,w=T.handler;(y.target===x||x.contains(y.target))&&w.apply(void 0,[y].concat(E))})}},{key:"listenDOM",value:function(y,_,E){this.listeners[y]||(this.listeners[y]=[]),this.listeners[y].push({node:_,handler:E})}}]),C}(i.default);v.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},v.sources={API:"api",SILENT:"silent",USER:"user"},p.default=v},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});function g(c,i){if(!(c instanceof i))throw new TypeError("Cannot call a class as a function")}var a=function c(i){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};g(this,c),this.quill=i,this.options=u};a.DEFAULTS={},p.default=a},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=["error","warn","log","info"],a="warn";function c(u){if(g.indexOf(u)<=g.indexOf(a)){for(var r,t=arguments.length,l=Array(t>1?t-1:0),o=1;o0&&typeof l[0]!="number")}function t(l,o,s){var f,h;if(u(l)||u(o)||l.prototype!==o.prototype)return!1;if(c(l))return c(o)?(l=g.call(l),o=g.call(o),i(l,o,s)):!1;if(r(l)){if(!r(o)||l.length!==o.length)return!1;for(f=0;f=0;f--)if(v[f]!=$[f])return!1;for(f=v.length-1;f>=0;f--)if(h=v[f],!i(l[h],o[h],s))return!1;return typeof l==typeof o}},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=m(1),a=function(){function c(i,u,r){r===void 0&&(r={}),this.attrName=i,this.keyName=u;var t=g.Scope.TYPE&g.Scope.ATTRIBUTE;r.scope!=null?this.scope=r.scope&g.Scope.LEVEL|t:this.scope=g.Scope.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}return c.keys=function(i){return[].map.call(i.attributes,function(u){return u.name})},c.prototype.add=function(i,u){return this.canAdd(i,u)?(i.setAttribute(this.keyName,u),!0):!1},c.prototype.canAdd=function(i,u){var r=g.query(i,g.Scope.BLOT&(this.scope|g.Scope.TYPE));return r==null?!1:this.whitelist==null?!0:typeof u=="string"?this.whitelist.indexOf(u.replace(/["']/g,""))>-1:this.whitelist.indexOf(u)>-1},c.prototype.remove=function(i){i.removeAttribute(this.keyName)},c.prototype.value=function(i){var u=i.getAttribute(this.keyName);return this.canAdd(i,u)&&u?u:""},c}();p.default=a},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.Code=void 0;var g=function(){function O(T,x){var w=[],M=!0,k=!1,S=void 0;try{for(var q=T[Symbol.iterator](),L;!(M=(L=q.next()).done)&&(w.push(L.value),!(x&&w.length===x));M=!0);}catch(A){k=!0,S=A}finally{try{!M&&q.return&&q.return()}finally{if(k)throw S}}return w}return function(T,x){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return O(T,x);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function O(T,x){for(var w=0;w=w+M)){var L=this.newlineIndex(w,!0)+1,A=q-L+1,D=this.isolate(L,A),N=D.next;D.format(k,S),N instanceof T&&N.formatAt(0,w-L+M-A,k,S)}}}},{key:"insertAt",value:function(w,M,k){if(k==null){var S=this.descendant(v.default,w),q=g(S,2),L=q[0],A=q[1];L.insertAt(A,M)}}},{key:"length",value:function(){var w=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` +`)?w:w+1}},{key:"newlineIndex",value:function(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(M)return this.domNode.textContent.slice(0,w).lastIndexOf(` +`);var k=this.domNode.textContent.slice(w).indexOf(` +`);return k>-1?w+k:-1}},{key:"optimize",value:function(w){this.domNode.textContent.endsWith(` +`)||this.appendChild(t.default.create("text",` +`)),c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"optimize",this).call(this,w);var M=this.next;M!=null&&M.prev===this&&M.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===M.statics.formats(M.domNode)&&(M.optimize(w),M.moveChildren(this),M.remove())}},{key:"replace",value:function(w){c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"replace",this).call(this,w),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(M){var k=t.default.find(M);k==null?M.parentNode.removeChild(M):k instanceof t.default.Embed?k.remove():k.unwrap()})}}],[{key:"create",value:function(w){var M=c(T.__proto__||Object.getPrototypeOf(T),"create",this).call(this,w);return M.setAttribute("spellcheck",!1),M}},{key:"formats",value:function(){return!0}}]),T}(o.default);E.blotName="code-block",E.tagName="PRE",E.TAB=" ",p.Code=_,p.default=E},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},a=function(){function N(B,R){var V=[],F=!0,P=!1,j=void 0;try{for(var I=B[Symbol.iterator](),W;!(F=(W=I.next()).done)&&(V.push(W.value),!(R&&V.length===R));F=!0);}catch(H){P=!0,j=H}finally{try{!F&&I.return&&I.return()}finally{if(P)throw j}}return V}return function(B,R){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return N(B,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function N(B,R){for(var V=0;V=P&&!z.endsWith(` +`)&&(F=!0),V.scroll.insertAt(j,z);var G=V.scroll.line(j),Z=a(G,2),oe=Z[0],se=Z[1],ae=(0,w.default)({},(0,$.bubbleFormats)(oe));if(oe instanceof C.default){var de=oe.descendant(o.default.Leaf,se),be=a(de,1),ye=be[0];ae=(0,w.default)(ae,(0,$.bubbleFormats)(ye))}H=t.default.attributes.diff(ae,H)||{}}else if(g(I.insert)==="object"){var X=Object.keys(I.insert)[0];if(X==null)return j;V.scroll.insertAt(j,X,I.insert[X])}P+=W}return Object.keys(H).forEach(function(Q){V.scroll.formatAt(j,W,Q,H[Q])}),j+W},0),R.reduce(function(j,I){return typeof I.delete=="number"?(V.scroll.deleteAt(j,I.delete),j):j+(I.retain||I.insert.length||1)},0),this.scroll.batchEnd(),this.update(R)}},{key:"deleteText",value:function(R,V){return this.scroll.deleteAt(R,V),this.update(new u.default().retain(R).delete(V))}},{key:"formatLine",value:function(R,V){var F=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(P).forEach(function(j){if(!(F.scroll.whitelist!=null&&!F.scroll.whitelist[j])){var I=F.scroll.lines(R,Math.max(V,1)),W=V;I.forEach(function(H){var z=H.length();if(!(H instanceof f.default))H.format(j,P[j]);else{var G=R-H.offset(F.scroll),Z=H.newlineIndex(G+W)-G+1;H.formatAt(G,Z,j,P[j])}W-=z})}}),this.scroll.optimize(),this.update(new u.default().retain(R).retain(V,(0,E.default)(P)))}},{key:"formatText",value:function(R,V){var F=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(P).forEach(function(j){F.scroll.formatAt(R,V,j,P[j])}),this.update(new u.default().retain(R).retain(V,(0,E.default)(P)))}},{key:"getContents",value:function(R,V){return this.delta.slice(R,R+V)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(R,V){return R.concat(V.delta())},new u.default)}},{key:"getFormat",value:function(R){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,F=[],P=[];V===0?this.scroll.path(R).forEach(function(I){var W=a(I,1),H=W[0];H instanceof C.default?F.push(H):H instanceof o.default.Leaf&&P.push(H)}):(F=this.scroll.lines(R,V),P=this.scroll.descendants(o.default.Leaf,R,V));var j=[F,P].map(function(I){if(I.length===0)return{};for(var W=(0,$.bubbleFormats)(I.shift());Object.keys(W).length>0;){var H=I.shift();if(H==null)return W;W=A((0,$.bubbleFormats)(H),W)}return W});return w.default.apply(w.default,j)}},{key:"getText",value:function(R,V){return this.getContents(R,V).filter(function(F){return typeof F.insert=="string"}).map(function(F){return F.insert}).join("")}},{key:"insertEmbed",value:function(R,V,F){return this.scroll.insertAt(R,V,F),this.update(new u.default().retain(R).insert(k({},V,F)))}},{key:"insertText",value:function(R,V){var F=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return V=V.replace(/\r\n/g,` +`).replace(/\r/g,` +`),this.scroll.insertAt(R,V),Object.keys(P).forEach(function(j){F.scroll.formatAt(R,V.length,j,P[j])}),this.update(new u.default().retain(R).insert(V,(0,E.default)(P)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var R=this.scroll.children.head;return R.statics.blotName!==C.default.blotName||R.children.length>1?!1:R.children.head instanceof y.default}},{key:"removeFormat",value:function(R,V){var F=this.getText(R,V),P=this.scroll.line(R+V),j=a(P,2),I=j[0],W=j[1],H=0,z=new u.default;I!=null&&(I instanceof f.default?H=I.newlineIndex(W)-W+1:H=I.length()-W,z=I.delta().slice(W,W+H-1).insert(` +`));var G=this.getContents(R,V+H),Z=G.diff(new u.default().insert(F).concat(z)),oe=new u.default().retain(R).concat(Z);return this.applyDelta(oe)}},{key:"update",value:function(R){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,P=this.delta;if(V.length===1&&V[0].type==="characterData"&&V[0].target.data.match(q)&&o.default.find(V[0].target)){var j=o.default.find(V[0].target),I=(0,$.bubbleFormats)(j),W=j.offset(this.scroll),H=V[0].oldValue.replace(v.default.CONTENTS,""),z=new u.default().insert(H),G=new u.default().insert(j.value()),Z=new u.default().retain(W).concat(z.diff(G,F));R=Z.reduce(function(oe,se){return se.insert?oe.insert(se.insert,I):oe.push(se)},new u.default),this.delta=P.compose(R)}else this.delta=this.getDelta(),(!R||!(0,T.default)(P.compose(R),this.delta))&&(R=P.diff(this.delta,F));return R}}]),N}();function A(N,B){return Object.keys(B).reduce(function(R,V){return N[V]==null||(B[V]===N[V]?R[V]=B[V]:Array.isArray(B[V])?B[V].indexOf(N[V])<0&&(R[V]=B[V].concat([N[V]])):R[V]=[B[V],N[V]]),R},{})}function D(N){return N.reduce(function(B,R){if(R.insert===1){var V=(0,E.default)(R.attributes);return delete V.image,B.insert({image:R.attributes.image},V)}if(R.attributes!=null&&(R.attributes.list===!0||R.attributes.bullet===!0)&&(R=(0,E.default)(R),R.attributes.list?R.attributes.list="ordered":(R.attributes.list="bullet",delete R.attributes.bullet)),typeof R.insert=="string"){var F=R.insert.replace(/\r\n/g,` +`).replace(/\r/g,` +`);return B.insert(F,R.attributes)}return B.push(R)},new u.default)}p.default=L},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.Range=void 0;var g=function(){function O(T,x){var w=[],M=!0,k=!1,S=void 0;try{for(var q=T[Symbol.iterator](),L;!(M=(L=q.next()).done)&&(w.push(L.value),!(x&&w.length===x));M=!0);}catch(A){k=!0,S=A}finally{try{!M&&q.return&&q.return()}finally{if(k)throw S}}return w}return function(T,x){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return O(T,x);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function O(T,x){for(var w=0;w1&&arguments[1]!==void 0?arguments[1]:0;C(this,O),this.index=T,this.length=x},_=function(){function O(T,x){var w=this;C(this,O),this.emitter=x,this.scroll=T,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new y(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){w.mouseDown||setTimeout(w.update.bind(w,s.default.sources.USER),1)}),this.emitter.on(s.default.events.EDITOR_CHANGE,function(M,k){M===s.default.events.TEXT_CHANGE&&k.length()>0&&w.update(s.default.sources.SILENT)}),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!w.hasFocus()){var M=w.getNativeRange();M!=null&&M.start.node!==w.cursor.textNode&&w.emitter.once(s.default.events.SCROLL_UPDATE,function(){try{w.setNativeRange(M.start.node,M.start.offset,M.end.node,M.end.offset)}catch{}})}}),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,function(M,k){if(k.range){var S=k.range,q=S.startNode,L=S.startOffset,A=S.endNode,D=S.endOffset;w.setNativeRange(q,L,A,D)}}),this.update(s.default.sources.SILENT)}return a(O,[{key:"handleComposition",value:function(){var x=this;this.root.addEventListener("compositionstart",function(){x.composing=!0}),this.root.addEventListener("compositionend",function(){if(x.composing=!1,x.cursor.parent){var w=x.cursor.restore();if(!w)return;setTimeout(function(){x.setNativeRange(w.startNode,w.startOffset,w.endNode,w.endOffset)},1)}})}},{key:"handleDragging",value:function(){var x=this;this.emitter.listenDOM("mousedown",document.body,function(){x.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){x.mouseDown=!1,x.update(s.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(x,w){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[x])){this.scroll.update();var M=this.getNativeRange();if(!(M==null||!M.native.collapsed||i.default.query(x,i.default.Scope.BLOCK))){if(M.start.node!==this.cursor.textNode){var k=i.default.find(M.start.node,!1);if(k==null)return;if(k instanceof i.default.Leaf){var S=k.split(M.start.offset);k.parent.insertBefore(this.cursor,S)}else k.insertBefore(this.cursor,M.start.node);this.cursor.attach()}this.cursor.format(x,w),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=this.scroll.length();x=Math.min(x,M-1),w=Math.min(x+w,M-1)-x;var k=void 0,S=this.scroll.leaf(x),q=g(S,2),L=q[0],A=q[1];if(L==null)return null;var D=L.position(A,!0),N=g(D,2);k=N[0],A=N[1];var B=document.createRange();if(w>0){B.setStart(k,A);var R=this.scroll.leaf(x+w),V=g(R,2);if(L=V[0],A=V[1],L==null)return null;var F=L.position(A,!0),P=g(F,2);return k=P[0],A=P[1],B.setEnd(k,A),B.getBoundingClientRect()}else{var j="left",I=void 0;return k instanceof Text?(A0&&(j="right")),{bottom:I.top+I.height,height:I.height,left:I[j],right:I[j],top:I.top,width:0}}}},{key:"getNativeRange",value:function(){var x=document.getSelection();if(x==null||x.rangeCount<=0)return null;var w=x.getRangeAt(0);if(w==null)return null;var M=this.normalizeNative(w);return b.info("getNativeRange",M),M}},{key:"getRange",value:function(){var x=this.getNativeRange();if(x==null)return[null,null];var w=this.normalizedToRange(x);return[w,x]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(x){var w=this,M=[[x.start.node,x.start.offset]];x.native.collapsed||M.push([x.end.node,x.end.offset]);var k=M.map(function(L){var A=g(L,2),D=A[0],N=A[1],B=i.default.find(D,!0),R=B.offset(w.scroll);return N===0?R:B instanceof i.default.Container?R+B.length():R+B.index(D,N)}),S=Math.min(Math.max.apply(Math,$(k)),this.scroll.length()-1),q=Math.min.apply(Math,[S].concat($(k)));return new y(q,S-q)}},{key:"normalizeNative",value:function(x){if(!E(this.root,x.startContainer)||!x.collapsed&&!E(this.root,x.endContainer))return null;var w={start:{node:x.startContainer,offset:x.startOffset},end:{node:x.endContainer,offset:x.endOffset},native:x};return[w.start,w.end].forEach(function(M){for(var k=M.node,S=M.offset;!(k instanceof Text)&&k.childNodes.length>0;)if(k.childNodes.length>S)k=k.childNodes[S],S=0;else if(k.childNodes.length===S)k=k.lastChild,S=k instanceof Text?k.data.length:k.childNodes.length+1;else break;M.node=k,M.offset=S}),w}},{key:"rangeToNative",value:function(x){var w=this,M=x.collapsed?[x.index]:[x.index,x.index+x.length],k=[],S=this.scroll.length();return M.forEach(function(q,L){q=Math.min(S-1,q);var A=void 0,D=w.scroll.leaf(q),N=g(D,2),B=N[0],R=N[1],V=B.position(R,L!==0),F=g(V,2);A=F[0],R=F[1],k.push(A,R)}),k.length<2&&(k=k.concat(k)),k}},{key:"scrollIntoView",value:function(x){var w=this.lastRange;if(w!=null){var M=this.getBounds(w.index,w.length);if(M!=null){var k=this.scroll.length()-1,S=this.scroll.line(Math.min(w.index,k)),q=g(S,1),L=q[0],A=L;if(w.length>0){var D=this.scroll.line(Math.min(w.index+w.length,k)),N=g(D,1);A=N[0]}if(!(L==null||A==null)){var B=x.getBoundingClientRect();M.topB.bottom&&(x.scrollTop+=M.bottom-B.bottom)}}}}},{key:"setNativeRange",value:function(x,w){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x,k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w,S=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(b.info("setNativeRange",x,w,M,k),!(x!=null&&(this.root.parentNode==null||x.parentNode==null||M.parentNode==null))){var q=document.getSelection();if(q!=null)if(x!=null){this.hasFocus()||this.root.focus();var L=(this.getNativeRange()||{}).native;if(L==null||S||x!==L.startContainer||w!==L.startOffset||M!==L.endContainer||k!==L.endOffset){x.tagName=="BR"&&(w=[].indexOf.call(x.parentNode.childNodes,x),x=x.parentNode),M.tagName=="BR"&&(k=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode);var A=document.createRange();A.setStart(x,w),A.setEnd(M,k),q.removeAllRanges(),q.addRange(A)}}else q.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s.default.sources.API;if(typeof w=="string"&&(M=w,w=!1),b.info("setRange",x),x!=null){var k=this.rangeToNative(x);this.setNativeRange.apply(this,$(k).concat([w]))}else this.setNativeRange(null);this.update(M)}},{key:"update",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s.default.sources.USER,w=this.lastRange,M=this.getRange(),k=g(M,2),S=k[0],q=k[1];if(this.lastRange=S,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,l.default)(w,this.lastRange)){var L;!this.composing&&q!=null&&q.native.collapsed&&q.start.node!==this.cursor.textNode&&this.cursor.restore();var A=[s.default.events.SELECTION_CHANGE,(0,r.default)(this.lastRange),(0,r.default)(w),x];if((L=this.emitter).emit.apply(L,[s.default.events.EDITOR_CHANGE].concat(A)),x!==s.default.sources.SILENT){var D;(D=this.emitter).emit.apply(D,A)}}}}]),O}();function E(O,T){try{T.parentNode}catch{return!1}return T instanceof Text&&(T=T.parentNode),O.contains(T)}p.Range=y,p.default=_},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function s(f,h){for(var v=0;v0&&(o+=1),[this.parent.domNode,o]},r.prototype.value=function(){var t;return t={},t[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},r.scope=c.Scope.INLINE_BLOT,r}(a.default);p.default=i},function(e,p,m){var g=m(11),a=m(3),c={attributes:{compose:function(u,r,t){typeof u!="object"&&(u={}),typeof r!="object"&&(r={});var l=a(!0,{},r);t||(l=Object.keys(l).reduce(function(s,f){return l[f]!=null&&(s[f]=l[f]),s},{}));for(var o in u)u[o]!==void 0&&r[o]===void 0&&(l[o]=u[o]);return Object.keys(l).length>0?l:void 0},diff:function(u,r){typeof u!="object"&&(u={}),typeof r!="object"&&(r={});var t=Object.keys(u).concat(Object.keys(r)).reduce(function(l,o){return g(u[o],r[o])||(l[o]=r[o]===void 0?null:r[o]),l},{});return Object.keys(t).length>0?t:void 0},transform:function(u,r,t){if(typeof u!="object")return r;if(typeof r=="object"){if(!t)return r;var l=Object.keys(r).reduce(function(o,s){return u[s]===void 0&&(o[s]=r[s]),o},{});return Object.keys(l).length>0?l:void 0}}},iterator:function(u){return new i(u)},length:function(u){return typeof u.delete=="number"?u.delete:typeof u.retain=="number"?u.retain:typeof u.insert=="string"?u.insert.length:1}};function i(u){this.ops=u,this.index=0,this.offset=0}i.prototype.hasNext=function(){return this.peekLength()<1/0},i.prototype.next=function(u){u||(u=1/0);var r=this.ops[this.index];if(r){var t=this.offset,l=c.length(r);if(u>=l-t?(u=l-t,this.index+=1,this.offset=0):this.offset+=u,typeof r.delete=="number")return{delete:u};var o={};return r.attributes&&(o.attributes=r.attributes),typeof r.retain=="number"?o.retain=u:typeof r.insert=="string"?o.insert=r.insert.substr(t,u):o.insert=r.insert,o}else return{retain:1/0}},i.prototype.peek=function(){return this.ops[this.index]},i.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},i.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},i.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var u=this.offset,r=this.index,t=this.next(),l=this.ops.slice(this.index);return this.offset=u,this.index=r,[t].concat(l)}else return[]},e.exports=c},function(e,p){var m=function(){function g(f,h){return h!=null&&f instanceof h}var a;try{a=Map}catch{a=function(){}}var c;try{c=Set}catch{c=function(){}}var i;try{i=Promise}catch{i=function(){}}function u(f,h,v,$,C){typeof h=="object"&&(v=h.depth,$=h.prototype,C=h.includeNonEnumerable,h=h.circular);var b=[],y=[],_=typeof Buffer!="undefined";typeof h=="undefined"&&(h=!0),typeof v=="undefined"&&(v=1/0);function E(O,T){if(O===null)return null;if(T===0)return O;var x,w;if(typeof O!="object")return O;if(g(O,a))x=new a;else if(g(O,c))x=new c;else if(g(O,i))x=new i(function(B,R){O.then(function(V){B(E(V,T-1))},function(V){R(E(V,T-1))})});else if(u.__isArray(O))x=[];else if(u.__isRegExp(O))x=new RegExp(O.source,s(O)),O.lastIndex&&(x.lastIndex=O.lastIndex);else if(u.__isDate(O))x=new Date(O.getTime());else{if(_&&Buffer.isBuffer(O))return Buffer.allocUnsafe?x=Buffer.allocUnsafe(O.length):x=new Buffer(O.length),O.copy(x),x;g(O,Error)?x=Object.create(O):typeof $=="undefined"?(w=Object.getPrototypeOf(O),x=Object.create(w)):(x=Object.create($),w=$)}if(h){var M=b.indexOf(O);if(M!=-1)return y[M];b.push(O),y.push(x)}g(O,a)&&O.forEach(function(B,R){var V=E(R,T-1),F=E(B,T-1);x.set(V,F)}),g(O,c)&&O.forEach(function(B){var R=E(B,T-1);x.add(R)});for(var k in O){var S;w&&(S=Object.getOwnPropertyDescriptor(w,k)),!(S&&S.set==null)&&(x[k]=E(O[k],T-1))}if(Object.getOwnPropertySymbols)for(var q=Object.getOwnPropertySymbols(O),k=0;k0){if(A instanceof l.BlockEmbed||R instanceof l.BlockEmbed){this.optimize();return}if(A instanceof v.default){var V=A.newlineIndex(A.length(),!0);if(V>-1&&(A=A.split(V+1),A===R)){this.optimize();return}}else if(R instanceof v.default){var F=R.newlineIndex(0);F>-1&&R.split(F+1)}var P=R.children.head instanceof f.default?null:R.children.head;A.moveChildren(R,P),A.remove()}this.optimize()}},{key:"enable",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",k)}},{key:"formatAt",value:function(k,S,q,L){this.whitelist!=null&&!this.whitelist[q]||(c(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"formatAt",this).call(this,k,S,q,L),this.optimize())}},{key:"insertAt",value:function(k,S,q){if(!(q!=null&&this.whitelist!=null&&!this.whitelist[S])){if(k>=this.length())if(q==null||u.default.query(S,u.default.Scope.BLOCK)==null){var L=u.default.create(this.statics.defaultChild);this.appendChild(L),q==null&&S.endsWith(` +`)&&(S=S.slice(0,-1)),L.insertAt(0,S,q)}else{var A=u.default.create(S,q);this.appendChild(A)}else c(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertAt",this).call(this,k,S,q);this.optimize()}}},{key:"insertBefore",value:function(k,S){if(k.statics.scope===u.default.Scope.INLINE_BLOT){var q=u.default.create(this.statics.defaultChild);q.appendChild(k),k=q}c(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertBefore",this).call(this,k,S)}},{key:"leaf",value:function(k){return this.path(k).pop()||[null,-1]}},{key:"line",value:function(k){return k===this.length()?this.line(k-1):this.descendant(O,k)}},{key:"lines",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,q=function L(A,D,N){var B=[],R=N;return A.children.forEachAt(D,N,function(V,F,P){O(V)?B.push(V):V instanceof u.default.Container&&(B=B.concat(L(V,F,R))),R-=P}),B};return q(this,k,S)}},{key:"optimize",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"optimize",this).call(this,k,S),k.length>0&&this.emitter.emit(t.default.events.SCROLL_OPTIMIZE,k,S))}},{key:"path",value:function(k){return c(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"path",this).call(this,k).slice(1)}},{key:"update",value:function(k){if(this.batch!==!0){var S=t.default.sources.USER;typeof k=="string"&&(S=k),Array.isArray(k)||(k=this.observer.takeRecords()),k.length>0&&this.emitter.emit(t.default.events.SCROLL_BEFORE_UPDATE,S,k),c(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"update",this).call(this,k.concat([])),k.length>0&&this.emitter.emit(t.default.events.SCROLL_UPDATE,S,k)}}}]),w}(u.default.Scroll);T.blotName="scroll",T.className="ql-editor",T.tagName="DIV",T.defaultChild="block",T.allowedChildren=[o.default,l.BlockEmbed,C.default],p.default=T},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0}),p.SHORTKEY=p.default=void 0;var g=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},a=function(){function I(W,H){var z=[],G=!0,Z=!1,oe=void 0;try{for(var se=W[Symbol.iterator](),ae;!(G=(ae=se.next()).done)&&(z.push(ae.value),!(H&&z.length===H));G=!0);}catch(de){Z=!0,oe=de}finally{try{!G&&se.return&&se.return()}finally{if(Z)throw oe}}return z}return function(W,H){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return I(W,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function I(W,H){for(var z=0;z1&&arguments[1]!==void 0?arguments[1]:{},Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},oe=j(z);if(oe==null||oe.key==null)return q.warn("Attempted to add invalid keyboard binding",oe);typeof G=="function"&&(G={handler:G}),typeof Z=="function"&&(Z={handler:Z}),oe=(0,o.default)(oe,G,Z),this.bindings[oe.key]=this.bindings[oe.key]||[],this.bindings[oe.key].push(oe)}},{key:"listen",value:function(){var z=this;this.quill.root.addEventListener("keydown",function(G){if(!G.defaultPrevented){var Z=G.which||G.keyCode,oe=(z.bindings[Z]||[]).filter(function(U){return W.match(G,U)});if(oe.length!==0){var se=z.quill.getSelection();if(!(se==null||!z.quill.hasFocus())){var ae=z.quill.getLine(se.index),de=a(ae,2),be=de[0],ye=de[1],X=z.quill.getLeaf(se.index),Q=a(X,2),re=Q[0],le=Q[1],ne=se.length===0?[re,le]:z.quill.getLeaf(se.index+se.length),J=a(ne,2),te=J[0],ie=J[1],pe=re instanceof C.default.Text?re.value().slice(0,le):"",$e=te instanceof C.default.Text?te.value().slice(ie):"",fe={collapsed:se.length===0,empty:se.length===0&&be.length()<=1,format:z.quill.getFormat(se),offset:ye,prefix:pe,suffix:$e},K=oe.some(function(U){if(U.collapsed!=null&&U.collapsed!==fe.collapsed||U.empty!=null&&U.empty!==fe.empty||U.offset!=null&&U.offset!==fe.offset)return!1;if(Array.isArray(U.format)){if(U.format.every(function(Y){return fe.format[Y]==null}))return!1}else if(g(U.format)==="object"&&!Object.keys(U.format).every(function(Y){return U.format[Y]===!0?fe.format[Y]!=null:U.format[Y]===!1?fe.format[Y]==null:(0,t.default)(U.format[Y],fe.format[Y])}))return!1;return U.prefix!=null&&!U.prefix.test(fe.prefix)||U.suffix!=null&&!U.suffix.test(fe.suffix)?!1:U.handler.call(z,se,fe)!==!0});K&&G.preventDefault()}}}})}}]),W}(T.default);A.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},A.DEFAULTS={bindings:{bold:P("bold"),italic:P("italic"),underline:P("underline"),indent:{key:A.keys.TAB,format:["blockquote","indent","list"],handler:function(W,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","+1",y.default.sources.USER)}},outdent:{key:A.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","-1",y.default.sources.USER)}},"outdent backspace":{key:A.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,H){H.format.indent!=null?this.quill.format("indent","-1",y.default.sources.USER):H.format.list!=null&&this.quill.format("list",!1,y.default.sources.USER)}},"indent code-block":F(!0),"outdent code-block":F(!1),"remove tab":{key:A.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,y.default.sources.USER)}},tab:{key:A.keys.TAB,handler:function(W){this.quill.history.cutoff();var H=new f.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(H,y.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,y.default.sources.SILENT)}},"list empty enter":{key:A.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,H){this.quill.format("list",!1,y.default.sources.USER),H.format.indent&&this.quill.format("indent",!1,y.default.sources.USER)}},"checklist enter":{key:A.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var H=this.quill.getLine(W.index),z=a(H,2),G=z[0],Z=z[1],oe=(0,o.default)({},G.formats(),{list:"checked"}),se=new f.default().retain(W.index).insert(` +`,oe).retain(G.length()-Z-1).retain(1,{list:"unchecked"});this.quill.updateContents(se,y.default.sources.USER),this.quill.setSelection(W.index+1,y.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:A.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(W,H){var z=this.quill.getLine(W.index),G=a(z,2),Z=G[0],oe=G[1],se=new f.default().retain(W.index).insert(` +`,H.format).retain(Z.length()-oe-1).retain(1,{header:null});this.quill.updateContents(se,y.default.sources.USER),this.quill.setSelection(W.index+1,y.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,H){var z=H.prefix.length,G=this.quill.getLine(W.index),Z=a(G,2),oe=Z[0],se=Z[1];if(se>z)return!0;var ae=void 0;switch(H.prefix.trim()){case"[]":case"[ ]":ae="unchecked";break;case"[x]":ae="checked";break;case"-":case"*":ae="bullet";break;default:ae="ordered"}this.quill.insertText(W.index," ",y.default.sources.USER),this.quill.history.cutoff();var de=new f.default().retain(W.index-se).delete(z+1).retain(oe.length()-2-se).retain(1,{list:ae});this.quill.updateContents(de,y.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-z,y.default.sources.SILENT)}},"code exit":{key:A.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var H=this.quill.getLine(W.index),z=a(H,2),G=z[0],Z=z[1],oe=new f.default().retain(W.index+G.length()-Z-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(oe,y.default.sources.USER)}},"embed left":D(A.keys.LEFT,!1),"embed left shift":D(A.keys.LEFT,!0),"embed right":D(A.keys.RIGHT,!1),"embed right shift":D(A.keys.RIGHT,!0)}};function D(I,W){var H,z=I===A.keys.LEFT?"prefix":"suffix";return H={key:I,shiftKey:W,altKey:null},w(H,z,/^$/),w(H,"handler",function(Z){var oe=Z.index;I===A.keys.RIGHT&&(oe+=Z.length+1);var se=this.quill.getLeaf(oe),ae=a(se,1),de=ae[0];return de instanceof C.default.Embed?(I===A.keys.LEFT?W?this.quill.setSelection(Z.index-1,Z.length+1,y.default.sources.USER):this.quill.setSelection(Z.index-1,y.default.sources.USER):W?this.quill.setSelection(Z.index,Z.length+1,y.default.sources.USER):this.quill.setSelection(Z.index+Z.length+1,y.default.sources.USER),!1):!0}),H}function N(I,W){if(!(I.index===0||this.quill.getLength()<=1)){var H=this.quill.getLine(I.index),z=a(H,1),G=z[0],Z={};if(W.offset===0){var oe=this.quill.getLine(I.index-1),se=a(oe,1),ae=se[0];if(ae!=null&&ae.length()>1){var de=G.formats(),be=this.quill.getFormat(I.index-1,1);Z=v.default.attributes.diff(de,be)||{}}}var ye=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText(I.index-ye,ye,y.default.sources.USER),Object.keys(Z).length>0&&this.quill.formatLine(I.index-ye,ye,Z,y.default.sources.USER),this.quill.focus()}}function B(I,W){var H=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!(I.index>=this.quill.getLength()-H)){var z={},G=0,Z=this.quill.getLine(I.index),oe=a(Z,1),se=oe[0];if(W.offset>=se.length()-1){var ae=this.quill.getLine(I.index+1),de=a(ae,1),be=de[0];if(be){var ye=se.formats(),X=this.quill.getFormat(I.index,1);z=v.default.attributes.diff(ye,X)||{},G=be.length()}}this.quill.deleteText(I.index,H,y.default.sources.USER),Object.keys(z).length>0&&this.quill.formatLine(I.index+G-1,H,z,y.default.sources.USER)}}function R(I){var W=this.quill.getLines(I),H={};if(W.length>1){var z=W[0].formats(),G=W[W.length-1].formats();H=v.default.attributes.diff(G,z)||{}}this.quill.deleteText(I,y.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(I.index,1,H,y.default.sources.USER),this.quill.setSelection(I.index,y.default.sources.SILENT),this.quill.focus()}function V(I,W){var H=this;I.length>0&&this.quill.scroll.deleteAt(I.index,I.length);var z=Object.keys(W.format).reduce(function(G,Z){return C.default.query(Z,C.default.Scope.BLOCK)&&!Array.isArray(W.format[Z])&&(G[Z]=W.format[Z]),G},{});this.quill.insertText(I.index,` +`,z,y.default.sources.USER),this.quill.setSelection(I.index+1,y.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(G){z[G]==null&&(Array.isArray(W.format[G])||G!=="link"&&H.quill.format(G,W.format[G],y.default.sources.USER))})}function F(I){return{key:A.keys.TAB,shiftKey:!I,format:{"code-block":!0},handler:function(H){var z=C.default.query("code-block"),G=H.index,Z=H.length,oe=this.quill.scroll.descendant(z,G),se=a(oe,2),ae=se[0],de=se[1];if(ae!=null){var be=this.quill.getIndex(ae),ye=ae.newlineIndex(de,!0)+1,X=ae.newlineIndex(be+de+Z),Q=ae.domNode.textContent.slice(ye,X).split(` +`);de=0,Q.forEach(function(re,le){I?(ae.insertAt(ye+de,z.TAB),de+=z.TAB.length,le===0?G+=z.TAB.length:Z+=z.TAB.length):re.startsWith(z.TAB)&&(ae.deleteAt(ye+de,z.TAB.length),de-=z.TAB.length,le===0?G-=z.TAB.length:Z-=z.TAB.length),de+=re.length+1}),this.quill.update(y.default.sources.USER),this.quill.setSelection(G,Z,y.default.sources.SILENT)}}}}function P(I){return{key:I[0].toUpperCase(),shortKey:!0,handler:function(H,z){this.quill.format(I,!z.format[I],y.default.sources.USER)}}}function j(I){if(typeof I=="string"||typeof I=="number")return j({key:I});if((typeof I=="undefined"?"undefined":g(I))==="object"&&(I=(0,u.default)(I,!1)),typeof I.key=="string")if(A.keys[I.key.toUpperCase()]!=null)I.key=A.keys[I.key.toUpperCase()];else if(I.key.length===1)I.key=I.key.toUpperCase().charCodeAt(0);else return null;return I.shortKey&&(I[L]=I.shortKey,delete I.shortKey),I}p.default=A,p.SHORTKEY=L},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function v($,C){var b=[],y=!0,_=!1,E=void 0;try{for(var O=$[Symbol.iterator](),T;!(y=(T=O.next()).done)&&(b.push(T.value),!(C&&b.length===C));y=!0);}catch(x){_=!0,E=x}finally{try{!y&&O.return&&O.return()}finally{if(_)throw E}}return b}return function($,C){if(Array.isArray($))return $;if(Symbol.iterator in Object($))return v($,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function v($,C,b){$===null&&($=Function.prototype);var y=Object.getOwnPropertyDescriptor($,C);if(y===void 0){var _=Object.getPrototypeOf($);return _===null?void 0:v(_,C,b)}else{if("value"in y)return y.value;var E=y.get;return E===void 0?void 0:E.call(b)}},c=function(){function v($,C){for(var b=0;b-1}p.default=o,p.sanitize=s},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},a=function(){function h(v,$){for(var C=0;C<$.length;C++){var b=$[C];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,$,C){return $&&h(v.prototype,$),C&&h(v,C),v}}(),c=m(23),i=t(c),u=m(107),r=t(u);function t(h){return h&&h.__esModule?h:{default:h}}function l(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}var o=0;function s(h,v){h.setAttribute(v,h.getAttribute(v)!=="true")}var f=function(){function h(v){var $=this;l(this,h),this.select=v,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){$.togglePicker()}),this.label.addEventListener("keydown",function(C){switch(C.keyCode){case i.default.keys.ENTER:$.togglePicker();break;case i.default.keys.ESCAPE:$.escape(),C.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(h,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),s(this.label,"aria-expanded"),s(this.options,"aria-hidden")}},{key:"buildItem",value:function($){var C=this,b=document.createElement("span");return b.tabIndex="0",b.setAttribute("role","button"),b.classList.add("ql-picker-item"),$.hasAttribute("value")&&b.setAttribute("data-value",$.getAttribute("value")),$.textContent&&b.setAttribute("data-label",$.textContent),b.addEventListener("click",function(){C.selectItem(b,!0)}),b.addEventListener("keydown",function(y){switch(y.keyCode){case i.default.keys.ENTER:C.selectItem(b,!0),y.preventDefault();break;case i.default.keys.ESCAPE:C.escape(),y.preventDefault();break}}),b}},{key:"buildLabel",value:function(){var $=document.createElement("span");return $.classList.add("ql-picker-label"),$.innerHTML=r.default,$.tabIndex="0",$.setAttribute("role","button"),$.setAttribute("aria-expanded","false"),this.container.appendChild($),$}},{key:"buildOptions",value:function(){var $=this,C=document.createElement("span");C.classList.add("ql-picker-options"),C.setAttribute("aria-hidden","true"),C.tabIndex="-1",C.id="ql-picker-options-"+o,o+=1,this.label.setAttribute("aria-controls",C.id),this.options=C,[].slice.call(this.select.options).forEach(function(b){var y=$.buildItem(b);C.appendChild(y),b.selected===!0&&$.selectItem(y)}),this.container.appendChild(C)}},{key:"buildPicker",value:function(){var $=this;[].slice.call(this.select.attributes).forEach(function(C){$.container.setAttribute(C.name,C.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var $=this;this.close(),setTimeout(function(){return $.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function($){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=this.container.querySelector(".ql-selected");if($!==b&&(b!=null&&b.classList.remove("ql-selected"),$!=null&&($.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call($.parentNode.children,$),$.hasAttribute("data-value")?this.label.setAttribute("data-value",$.getAttribute("data-value")):this.label.removeAttribute("data-value"),$.hasAttribute("data-label")?this.label.setAttribute("data-label",$.getAttribute("data-label")):this.label.removeAttribute("data-label"),C))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event=="undefined"?"undefined":g(Event))==="object"){var y=document.createEvent("Event");y.initEvent("change",!0,!0),this.select.dispatchEvent(y)}this.close()}}},{key:"update",value:function(){var $=void 0;if(this.select.selectedIndex>-1){var C=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];$=this.select.options[this.select.selectedIndex],this.selectItem(C)}else this.selectItem(null);var b=$!=null&&$!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",b)}}]),h}();p.default=f},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=m(0),a=q(g),c=m(5),i=q(c),u=m(4),r=q(u),t=m(16),l=q(t),o=m(25),s=q(o),f=m(24),h=q(f),v=m(35),$=q(v),C=m(6),b=q(C),y=m(22),_=q(y),E=m(7),O=q(E),T=m(55),x=q(T),w=m(42),M=q(w),k=m(23),S=q(k);function q(L){return L&&L.__esModule?L:{default:L}}i.default.register({"blots/block":r.default,"blots/block/embed":u.BlockEmbed,"blots/break":l.default,"blots/container":s.default,"blots/cursor":h.default,"blots/embed":$.default,"blots/inline":b.default,"blots/scroll":_.default,"blots/text":O.default,"modules/clipboard":x.default,"modules/history":M.default,"modules/keyboard":S.default}),a.default.register(r.default,l.default,h.default,b.default,_.default,O.default),p.default=i.default},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=m(1),a=function(){function c(i){this.domNode=i,this.domNode[g.DATA_KEY]={blot:this}}return Object.defineProperty(c.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),c.create=function(i){if(this.tagName==null)throw new g.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof i=="string"&&(i=i.toUpperCase(),parseInt(i).toString()===i&&(i=parseInt(i))),typeof i=="number"?u=document.createElement(this.tagName[i-1]):this.tagName.indexOf(i)>-1?u=document.createElement(i):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var i=this.domNode.cloneNode(!1);return g.create(i)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[g.DATA_KEY]},c.prototype.deleteAt=function(i,u){var r=this.isolate(i,u);r.remove()},c.prototype.formatAt=function(i,u,r,t){var l=this.isolate(i,u);if(g.query(r,g.Scope.BLOT)!=null&&t)l.wrap(r,t);else if(g.query(r,g.Scope.ATTRIBUTE)!=null){var o=g.create(this.statics.scope);l.wrap(o),o.format(r,t)}},c.prototype.insertAt=function(i,u,r){var t=r==null?g.create("text",u):g.create(u,r),l=this.split(i);this.parent.insertBefore(t,l)},c.prototype.insertInto=function(i,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var r=null;i.children.insertBefore(this,u),u!=null&&(r=u.domNode),(this.domNode.parentNode!=i.domNode||this.domNode.nextSibling!=r)&&i.domNode.insertBefore(this.domNode,r),this.parent=i,this.attach()},c.prototype.isolate=function(i,u){var r=this.split(i);return r.split(u),r},c.prototype.length=function(){return 1},c.prototype.offset=function(i){return i===void 0&&(i=this.parent),this.parent==null||this==i?0:this.parent.children.offset(this)+this.parent.offset(i)},c.prototype.optimize=function(i){this.domNode[g.DATA_KEY]!=null&&delete this.domNode[g.DATA_KEY].mutations},c.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},c.prototype.replace=function(i){i.parent!=null&&(i.parent.insertBefore(this,i.next),i.remove())},c.prototype.replaceWith=function(i,u){var r=typeof i=="string"?g.create(i,u):i;return r.replace(this),r},c.prototype.split=function(i,u){return i===0?this:this.next},c.prototype.update=function(i,u){},c.prototype.wrap=function(i,u){var r=typeof i=="string"?g.create(i,u):i;return this.parent!=null&&this.parent.insertBefore(r,this.next),r.appendChild(this),r},c.blotName="abstract",c}();p.default=a},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=m(12),a=m(32),c=m(33),i=m(1),u=function(){function r(t){this.attributes={},this.domNode=t,this.build()}return r.prototype.attribute=function(t,l){l?t.add(this.domNode,l)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},r.prototype.build=function(){var t=this;this.attributes={};var l=g.default.keys(this.domNode),o=a.default.keys(this.domNode),s=c.default.keys(this.domNode);l.concat(o).concat(s).forEach(function(f){var h=i.query(f,i.Scope.ATTRIBUTE);h instanceof g.default&&(t.attributes[h.attrName]=h)})},r.prototype.copy=function(t){var l=this;Object.keys(this.attributes).forEach(function(o){var s=l.attributes[o].value(l.domNode);t.format(o,s)})},r.prototype.move=function(t){var l=this;this.copy(t),Object.keys(this.attributes).forEach(function(o){l.attributes[o].remove(l.domNode)}),this.attributes={}},r.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(l,o){return l[o]=t.attributes[o].value(t.domNode),l},{})},r}();p.default=u},function(e,p,m){var g=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var l in t)t.hasOwnProperty(l)&&(r[l]=t[l])};return function(r,t){u(r,t);function l(){this.constructor=r}r.prototype=t===null?Object.create(t):(l.prototype=t.prototype,new l)}}();Object.defineProperty(p,"__esModule",{value:!0});var a=m(12);function c(u,r){var t=u.getAttribute("class")||"";return t.split(/\s+/).filter(function(l){return l.indexOf(r+"-")===0})}var i=function(u){g(r,u);function r(){return u!==null&&u.apply(this,arguments)||this}return r.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(l){return l.split("-").slice(0,-1).join("-")})},r.prototype.add=function(t,l){return this.canAdd(t,l)?(this.remove(t),t.classList.add(this.keyName+"-"+l),!0):!1},r.prototype.remove=function(t){var l=c(t,this.keyName);l.forEach(function(o){t.classList.remove(o)}),t.classList.length===0&&t.removeAttribute("class")},r.prototype.value=function(t){var l=c(t,this.keyName)[0]||"",o=l.slice(this.keyName.length+1);return this.canAdd(t,o)?o:""},r}(a.default);p.default=i},function(e,p,m){var g=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var l in t)t.hasOwnProperty(l)&&(r[l]=t[l])};return function(r,t){u(r,t);function l(){this.constructor=r}r.prototype=t===null?Object.create(t):(l.prototype=t.prototype,new l)}}();Object.defineProperty(p,"__esModule",{value:!0});var a=m(12);function c(u){var r=u.split("-"),t=r.slice(1).map(function(l){return l[0].toUpperCase()+l.slice(1)}).join("");return r[0]+t}var i=function(u){g(r,u);function r(){return u!==null&&u.apply(this,arguments)||this}return r.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(l){var o=l.split(":");return o[0].trim()})},r.prototype.add=function(t,l){return this.canAdd(t,l)?(t.style[c(this.keyName)]=l,!0):!1},r.prototype.remove=function(t){t.style[c(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},r.prototype.value=function(t){var l=t.style[c(this.keyName)];return this.canAdd(t,l)?l:""},r}(a.default);p.default=i},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function i(u,r){for(var t=0;tT&&this.stack.undo.length>0){var x=this.stack.undo.pop();O=O.compose(x.undo),_=x.redo.compose(_)}else this.lastRecorded=T;this.stack.undo.push({redo:_,undo:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(_){this.stack.undo.forEach(function(E){E.undo=_.transform(E.undo,!0),E.redo=_.transform(E.redo,!0)}),this.stack.redo.forEach(function(E){E.undo=_.transform(E.undo,!0),E.redo=_.transform(E.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),b}(t.default);h.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function v(C){var b=C.ops[C.ops.length-1];return b==null?!1:b.insert!=null?typeof b.insert=="string"&&b.insert.endsWith(` +`):b.attributes!=null?Object.keys(b.attributes).some(function(y){return c.default.query(y,c.default.Scope.BLOCK)!=null}):!1}function $(C){var b=C.reduce(function(_,E){return _+=E.delete||0,_},0),y=C.length()-b;return v(C)&&(y-=1),y}p.default=h,p.getLastChangeIndex=$},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.BaseTooltip=void 0;var g=function(){function V(F,P){for(var j=0;j0&&arguments[0]!==void 0?arguments[0]:"link",I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),I!=null?this.textbox.value=I:j!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+j)||""),this.root.setAttribute("data-mode",j)}},{key:"restoreFocus",value:function(){var j=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=j}},{key:"save",value:function(){var j=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var I=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",j,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",j,l.default.sources.USER)),this.quill.root.scrollTop=I;break}case"video":j=B(j);case"formula":{if(!j)break;var W=this.quill.getSelection(!0);if(W!=null){var H=W.index+W.length;this.quill.insertEmbed(H,this.root.getAttribute("data-mode"),j,l.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(H+1," ",l.default.sources.USER),this.quill.setSelection(H+2,l.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),F}(O.default);function B(V){var F=V.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||V.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return F?(F[1]||"https")+"://www.youtube.com/embed/"+F[2]+"?showinfo=0":(F=V.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(F[1]||"https")+"://player.vimeo.com/video/"+F[2]+"/":V}function R(V,F){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;F.forEach(function(j){var I=document.createElement("option");j===P?I.setAttribute("selected","selected"):I.setAttribute("value",j),V.appendChild(I)})}p.BaseTooltip=N,p.default=D},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var c=[],i=0;i1&&this.append.apply(this,c.slice(1))},a.prototype.contains=function(c){for(var i,u=this.iterator();i=u();)if(i===c)return!0;return!1},a.prototype.insertBefore=function(c,i){!c||(c.next=i,i!=null?(c.prev=i.prev,i.prev!=null&&(i.prev.next=c),i.prev=c,i===this.head&&(this.head=c)):this.tail!=null?(this.tail.next=c,c.prev=this.tail,this.tail=c):(c.prev=null,this.head=this.tail=c),this.length+=1)},a.prototype.offset=function(c){for(var i=0,u=this.head;u!=null;){if(u===c)return i;i+=u.length(),u=u.next}return-1},a.prototype.remove=function(c){!this.contains(c)||(c.prev!=null&&(c.prev.next=c.next),c.next!=null&&(c.next.prev=c.prev),c===this.head&&(this.head=c.next),c===this.tail&&(this.tail=c.prev),this.length-=1)},a.prototype.iterator=function(c){return c===void 0&&(c=this.head),function(){var i=c;return c!=null&&(c=c.next),i}},a.prototype.find=function(c,i){i===void 0&&(i=!1);for(var u,r=this.iterator();u=r();){var t=u.length();if(cs?u(o,c-s,Math.min(i,s+h-c)):u(o,0,Math.min(h,c+i-s)),s+=h}},a.prototype.map=function(c){return this.reduce(function(i,u){return i.push(c(u)),i},[])},a.prototype.reduce=function(c,i){for(var u,r=this.iterator();u=r();)i=c(i,u);return i},a}();p.default=g},function(e,p,m){var g=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var s in o)o.hasOwnProperty(s)&&(l[s]=o[s])};return function(l,o){t(l,o);function s(){this.constructor=l}l.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}();Object.defineProperty(p,"__esModule",{value:!0});var a=m(17),c=m(1),i={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,r=function(t){g(l,t);function l(o){var s=t.call(this,o)||this;return s.scroll=s,s.observer=new MutationObserver(function(f){s.update(f)}),s.observer.observe(s.domNode,i),s.attach(),s}return l.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},l.prototype.deleteAt=function(o,s){this.update(),o===0&&s===this.length()?this.children.forEach(function(f){f.remove()}):t.prototype.deleteAt.call(this,o,s)},l.prototype.formatAt=function(o,s,f,h){this.update(),t.prototype.formatAt.call(this,o,s,f,h)},l.prototype.insertAt=function(o,s,f){this.update(),t.prototype.insertAt.call(this,o,s,f)},l.prototype.optimize=function(o,s){var f=this;o===void 0&&(o=[]),s===void 0&&(s={}),t.prototype.optimize.call(this,s);for(var h=[].slice.call(this.observer.takeRecords());h.length>0;)o.push(h.pop());for(var v=function(y,_){_===void 0&&(_=!0),!(y==null||y===f)&&y.domNode.parentNode!=null&&(y.domNode[c.DATA_KEY].mutations==null&&(y.domNode[c.DATA_KEY].mutations=[]),_&&v(y.parent))},$=function(y){y.domNode[c.DATA_KEY]==null||y.domNode[c.DATA_KEY].mutations==null||(y instanceof a.default&&y.children.forEach($),y.optimize(s))},C=o,b=0;C.length>0;b+=1){if(b>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(C.forEach(function(y){var _=c.find(y.target,!0);_!=null&&(_.domNode===y.target&&(y.type==="childList"?(v(c.find(y.previousSibling,!1)),[].forEach.call(y.addedNodes,function(E){var O=c.find(E,!1);v(O,!1),O instanceof a.default&&O.children.forEach(function(T){v(T,!1)})})):y.type==="attributes"&&v(_.prev)),v(_))}),this.children.forEach($),C=[].slice.call(this.observer.takeRecords()),h=C.slice();h.length>0;)o.push(h.pop())}},l.prototype.update=function(o,s){var f=this;s===void 0&&(s={}),o=o||this.observer.takeRecords(),o.map(function(h){var v=c.find(h.target,!0);return v==null?null:v.domNode[c.DATA_KEY].mutations==null?(v.domNode[c.DATA_KEY].mutations=[h],v):(v.domNode[c.DATA_KEY].mutations.push(h),null)}).forEach(function(h){h==null||h===f||h.domNode[c.DATA_KEY]==null||h.update(h.domNode[c.DATA_KEY].mutations||[],s)}),this.domNode[c.DATA_KEY].mutations!=null&&t.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,s),this.optimize(o,s)},l.blotName="scroll",l.defaultChild="block",l.scope=c.Scope.BLOCK_BLOT,l.tagName="DIV",l}(a.default);p.default=r},function(e,p,m){var g=this&&this.__extends||function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,l){t.__proto__=l}||function(t,l){for(var o in l)l.hasOwnProperty(o)&&(t[o]=l[o])};return function(t,l){r(t,l);function o(){this.constructor=t}t.prototype=l===null?Object.create(l):(o.prototype=l.prototype,new o)}}();Object.defineProperty(p,"__esModule",{value:!0});var a=m(18),c=m(1);function i(r,t){if(Object.keys(r).length!==Object.keys(t).length)return!1;for(var l in r)if(r[l]!==t[l])return!1;return!0}var u=function(r){g(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.formats=function(l){if(l.tagName!==t.tagName)return r.formats.call(this,l)},t.prototype.format=function(l,o){var s=this;l===this.statics.blotName&&!o?(this.children.forEach(function(f){f instanceof a.default||(f=f.wrap(t.blotName,!0)),s.attributes.copy(f)}),this.unwrap()):r.prototype.format.call(this,l,o)},t.prototype.formatAt=function(l,o,s,f){if(this.formats()[s]!=null||c.query(s,c.Scope.ATTRIBUTE)){var h=this.isolate(l,o);h.format(s,f)}else r.prototype.formatAt.call(this,l,o,s,f)},t.prototype.optimize=function(l){r.prototype.optimize.call(this,l);var o=this.formats();if(Object.keys(o).length===0)return this.unwrap();var s=this.next;s instanceof t&&s.prev===this&&i(o,s.formats())&&(s.moveChildren(this),s.remove())},t.blotName="inline",t.scope=c.Scope.INLINE_BLOT,t.tagName="SPAN",t}(a.default);p.default=u},function(e,p,m){var g=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var l in t)t.hasOwnProperty(l)&&(r[l]=t[l])};return function(r,t){u(r,t);function l(){this.constructor=r}r.prototype=t===null?Object.create(t):(l.prototype=t.prototype,new l)}}();Object.defineProperty(p,"__esModule",{value:!0});var a=m(18),c=m(1),i=function(u){g(r,u);function r(){return u!==null&&u.apply(this,arguments)||this}return r.formats=function(t){var l=c.query(r.blotName).tagName;if(t.tagName!==l)return u.formats.call(this,t)},r.prototype.format=function(t,l){c.query(t,c.Scope.BLOCK)!=null&&(t===this.statics.blotName&&!l?this.replaceWith(r.blotName):u.prototype.format.call(this,t,l))},r.prototype.formatAt=function(t,l,o,s){c.query(o,c.Scope.BLOCK)!=null?this.format(o,s):u.prototype.formatAt.call(this,t,l,o,s)},r.prototype.insertAt=function(t,l,o){if(o==null||c.query(l,c.Scope.INLINE)!=null)u.prototype.insertAt.call(this,t,l,o);else{var s=this.split(t),f=c.create(l,o);s.parent.insertBefore(f,s)}},r.prototype.update=function(t,l){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,t,l)},r.blotName="block",r.scope=c.Scope.BLOCK_BLOT,r.tagName="P",r}(a.default);p.default=i},function(e,p,m){var g=this&&this.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,r){u.__proto__=r}||function(u,r){for(var t in r)r.hasOwnProperty(t)&&(u[t]=r[t])};return function(u,r){i(u,r);function t(){this.constructor=u}u.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();Object.defineProperty(p,"__esModule",{value:!0});var a=m(19),c=function(i){g(u,i);function u(){return i!==null&&i.apply(this,arguments)||this}return u.formats=function(r){},u.prototype.format=function(r,t){i.prototype.formatAt.call(this,0,this.length(),r,t)},u.prototype.formatAt=function(r,t,l,o){r===0&&t===this.length()?this.format(l,o):i.prototype.formatAt.call(this,r,t,l,o)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u}(a.default);p.default=c},function(e,p,m){var g=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var l in t)t.hasOwnProperty(l)&&(r[l]=t[l])};return function(r,t){u(r,t);function l(){this.constructor=r}r.prototype=t===null?Object.create(t):(l.prototype=t.prototype,new l)}}();Object.defineProperty(p,"__esModule",{value:!0});var a=m(19),c=m(1),i=function(u){g(r,u);function r(t){var l=u.call(this,t)||this;return l.text=l.statics.value(l.domNode),l}return r.create=function(t){return document.createTextNode(t)},r.value=function(t){var l=t.data;return l.normalize&&(l=l.normalize()),l},r.prototype.deleteAt=function(t,l){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+l)},r.prototype.index=function(t,l){return this.domNode===t?l:-1},r.prototype.insertAt=function(t,l,o){o==null?(this.text=this.text.slice(0,t)+l+this.text.slice(t),this.domNode.data=this.text):u.prototype.insertAt.call(this,t,l,o)},r.prototype.length=function(){return this.text.length},r.prototype.optimize=function(t){u.prototype.optimize.call(this,t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof r&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},r.prototype.position=function(t,l){return[this.domNode,t]},r.prototype.split=function(t,l){if(l===void 0&&(l=!1),!l){if(t===0)return this;if(t===this.length())return this.next}var o=c.create(this.domNode.splitText(t));return this.parent.insertBefore(o,this.next),this.text=this.statics.value(this.domNode),o},r.prototype.update=function(t,l){var o=this;t.some(function(s){return s.type==="characterData"&&s.target===o.domNode})&&(this.text=this.statics.value(this.domNode))},r.prototype.value=function(){return this.text},r.blotName="text",r.scope=c.Scope.INLINE_BLOT,r}(a.default);p.default=i},function(e,p,m){var g=document.createElement("div");if(g.classList.toggle("test-class",!1),g.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(c,i){return arguments.length>1&&!this.contains(c)==!i?i:a.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,i){return i=i||0,this.substr(i,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,i){var u=this.toString();(typeof i!="number"||!isFinite(i)||Math.floor(i)!==i||i>u.length)&&(i=u.length),i-=c.length;var r=u.indexOf(c,i);return r!==-1&&r===i}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(i){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof i!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),r=u.length>>>0,t=arguments[1],l,o=0;oy.length?b:y,O=b.length>y.length?y:b,T=E.indexOf(O);if(T!=-1)return _=[[g,E.substring(0,T)],[a,O],[g,E.substring(T+O.length)]],b.length>y.length&&(_[0][0]=_[2][0]=m),_;if(O.length==1)return[[m,b],[g,y]];var x=o(b,y);if(x){var w=x[0],M=x[1],k=x[2],S=x[3],q=x[4],L=c(w,k),A=c(M,S);return L.concat([[a,q]],A)}return u(b,y)}function u(b,y){for(var _=b.length,E=y.length,O=Math.ceil((_+E)/2),T=O,x=2*O,w=new Array(x),M=new Array(x),k=0;k_)A+=2;else if(P>E)L+=2;else if(q){var j=T+S-R;if(j>=0&&j=I)return r(b,y,F,P)}}}for(var W=-B+D;W<=B-N;W+=2){var j=T+W,I;W==-B||W!=B&&M[j-1]_)N+=2;else if(H>E)D+=2;else if(!q){var V=T+S-W;if(V>=0&&V=I)return r(b,y,F,P)}}}}return[[m,b],[g,y]]}function r(b,y,_,E){var O=b.substring(0,_),T=y.substring(0,E),x=b.substring(_),w=y.substring(E),M=c(O,T),k=c(x,w);return M.concat(k)}function t(b,y){if(!b||!y||b.charAt(0)!=y.charAt(0))return 0;for(var _=0,E=Math.min(b.length,y.length),O=E,T=0;_y.length?b:y,E=b.length>y.length?y:b;if(_.length<4||E.length*2<_.length)return null;function O(A,D,N){for(var B=A.substring(N,N+Math.floor(A.length/4)),R=-1,V="",F,P,j,I;(R=D.indexOf(B,R+1))!=-1;){var W=t(A.substring(N),D.substring(R)),H=l(A.substring(0,N),D.substring(0,R));V.length=A.length?[F,P,j,I,V]:null}var T=O(_,E,Math.ceil(_.length/4)),x=O(_,E,Math.ceil(_.length/2)),w;if(!T&&!x)return null;x?T?w=T[4].length>x[4].length?T:x:w=x:w=T;var M,k,S,q;b.length>y.length?(M=w[0],k=w[1],S=w[2],q=w[3]):(S=w[0],q=w[1],M=w[2],k=w[3]);var L=w[4];return[M,k,S,q,L]}function s(b){b.push([a,""]);for(var y=0,_=0,E=0,O="",T="",x;y1?(_!==0&&E!==0&&(x=t(T,O),x!==0&&(y-_-E>0&&b[y-_-E-1][0]==a?b[y-_-E-1][1]+=T.substring(0,x):(b.splice(0,0,[a,T.substring(0,x)]),y++),T=T.substring(x),O=O.substring(x)),x=l(T,O),x!==0&&(b[y][1]=T.substring(T.length-x)+b[y][1],T=T.substring(0,T.length-x),O=O.substring(0,O.length-x))),_===0?b.splice(y-E,_+E,[g,T]):E===0?b.splice(y-_,_+E,[m,O]):b.splice(y-_-E,_+E,[m,O],[g,T]),y=y-_-E+(_?1:0)+(E?1:0)+1):y!==0&&b[y-1][0]==a?(b[y-1][1]+=b[y][1],b.splice(y,1)):y++,E=0,_=0,O="",T="";break}b[b.length-1][1]===""&&b.pop();var w=!1;for(y=1;y0&&E.splice(O+2,0,[x[0],w]),C(E,O,3)}else return b}function $(b){for(var y=!1,_=function(x){return x.charCodeAt(0)>=56320&&x.charCodeAt(0)<=57343},E=function(x){return x.charCodeAt(x.length-1)>=55296&&x.charCodeAt(x.length-1)<=56319},O=2;O0&&T.push(b[O]);return T}function C(b,y,_){for(var E=y+_-1;E>=0&&E>=y-1;E--)if(E+1\r?\n +\<"),this.convert();var ne=this.quill.getFormat(this.quill.selection.savedRange.index);if(ne[E.default.blotName]){var J=this.container.innerText;return this.container.innerHTML="",new t.default().insert(J,k({},E.default.blotName,ne[E.default.blotName]))}var te=this.prepareMatching(),ie=a(te,2),pe=ie[0],$e=ie[1],fe=W(this.container,pe,$e);return j(fe,` +`)&&fe.ops[fe.ops.length-1].attributes==null&&(fe=fe.compose(new t.default().retain(fe.length()-1).delete(1))),A.log("convert",this.container.innerHTML,fe),this.container.innerHTML="",fe}},{key:"dangerouslyPasteHTML",value:function(le,ne){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;if(typeof le=="string")this.quill.setContents(this.convert(le),ne),this.quill.setSelection(0,f.default.sources.SILENT);else{var te=this.convert(ne);this.quill.updateContents(new t.default().retain(le).concat(te),J),this.quill.setSelection(le+te.length(),f.default.sources.SILENT)}}},{key:"onPaste",value:function(le){var ne=this;if(!(le.defaultPrevented||!this.quill.isEnabled())){var J=this.quill.getSelection(),te=new t.default().retain(J.index),ie=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(f.default.sources.SILENT),setTimeout(function(){te=te.concat(ne.convert()).delete(J.length),ne.quill.updateContents(te,f.default.sources.USER),ne.quill.setSelection(te.length()-J.length,f.default.sources.SILENT),ne.quill.scrollingContainer.scrollTop=ie,ne.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var le=this,ne=[],J=[];return this.matchers.forEach(function(te){var ie=a(te,2),pe=ie[0],$e=ie[1];switch(pe){case Node.TEXT_NODE:J.push($e);break;case Node.ELEMENT_NODE:ne.push($e);break;default:[].forEach.call(le.container.querySelectorAll(pe),function(fe){fe[D]=fe[D]||[],fe[D].push($e)});break}}),[ne,J]}}]),Q}(C.default);V.DEFAULTS={matchers:[],matchVisual:!0};function F(X,Q,re){return(typeof Q=="undefined"?"undefined":g(Q))==="object"?Object.keys(Q).reduce(function(le,ne){return F(le,ne,Q[ne])},X):X.reduce(function(le,ne){return ne.attributes&&ne.attributes[Q]?le.push(ne):le.insert(ne.insert,(0,u.default)({},k({},Q,re),ne.attributes))},new t.default)}function P(X){if(X.nodeType!==Node.ELEMENT_NODE)return{};var Q="__ql-computed-style";return X[Q]||(X[Q]=window.getComputedStyle(X))}function j(X,Q){for(var re="",le=X.ops.length-1;le>=0&&re.length-1}function W(X,Q,re){return X.nodeType===X.TEXT_NODE?re.reduce(function(le,ne){return ne(X,le)},new t.default):X.nodeType===X.ELEMENT_NODE?[].reduce.call(X.childNodes||[],function(le,ne){var J=W(ne,Q,re);return ne.nodeType===X.ELEMENT_NODE&&(J=Q.reduce(function(te,ie){return ie(ne,te)},J),J=(ne[D]||[]).reduce(function(te,ie){return ie(ne,te)},J)),le.concat(J)},new t.default):new t.default}function H(X,Q,re){return F(re,X,!0)}function z(X,Q){var re=o.default.Attributor.Attribute.keys(X),le=o.default.Attributor.Class.keys(X),ne=o.default.Attributor.Style.keys(X),J={};return re.concat(le).concat(ne).forEach(function(te){var ie=o.default.query(te,o.default.Scope.ATTRIBUTE);ie!=null&&(J[ie.attrName]=ie.value(X),J[ie.attrName])||(ie=B[te],ie!=null&&(ie.attrName===te||ie.keyName===te)&&(J[ie.attrName]=ie.value(X)||void 0),ie=R[te],ie!=null&&(ie.attrName===te||ie.keyName===te)&&(ie=R[te],J[ie.attrName]=ie.value(X)||void 0))}),Object.keys(J).length>0&&(Q=F(Q,J)),Q}function G(X,Q){var re=o.default.query(X);if(re==null)return Q;if(re.prototype instanceof o.default.Embed){var le={},ne=re.value(X);ne!=null&&(le[re.blotName]=ne,Q=new t.default().insert(le,re.formats(X)))}else typeof re.formats=="function"&&(Q=F(Q,re.blotName,re.formats(X)));return Q}function Z(X,Q){return j(Q,` +`)||Q.insert(` +`),Q}function oe(){return new t.default}function se(X,Q){var re=o.default.query(X);if(re==null||re.blotName!=="list-item"||!j(Q,` +`))return Q;for(var le=-1,ne=X.parentNode;!ne.classList.contains("ql-clipboard");)(o.default.query(ne)||{}).blotName==="list"&&(le+=1),ne=ne.parentNode;return le<=0?Q:Q.compose(new t.default().retain(Q.length()-1).retain(1,{indent:le}))}function ae(X,Q){return j(Q,` +`)||(I(X)||Q.length()>0&&X.nextSibling&&I(X.nextSibling))&&Q.insert(` +`),Q}function de(X,Q){if(I(X)&&X.nextElementSibling!=null&&!j(Q,` + +`)){var re=X.offsetHeight+parseFloat(P(X).marginTop)+parseFloat(P(X).marginBottom);X.nextElementSibling.offsetTop>X.offsetTop+re*1.5&&Q.insert(` +`)}return Q}function be(X,Q){var re={},le=X.style||{};return le.fontStyle&&P(X).fontStyle==="italic"&&(re.italic=!0),le.fontWeight&&(P(X).fontWeight.startsWith("bold")||parseInt(P(X).fontWeight)>=700)&&(re.bold=!0),Object.keys(re).length>0&&(Q=F(Q,re)),parseFloat(le.textIndent||0)>0&&(Q=new t.default().insert(" ").concat(Q)),Q}function ye(X,Q){var re=X.data;if(X.parentNode.tagName==="O:P")return Q.insert(re.trim());if(re.trim().length===0&&X.parentNode.classList.contains("ql-clipboard"))return Q;if(!P(X.parentNode).whiteSpace.startsWith("pre")){var le=function(J,te){return te=te.replace(/[^\u00a0]/g,""),te.length<1&&J?" ":te};re=re.replace(/\r\n/g," ").replace(/\n/g," "),re=re.replace(/\s\s+/g,le.bind(le,!0)),(X.previousSibling==null&&I(X.parentNode)||X.previousSibling!=null&&I(X.previousSibling))&&(re=re.replace(/^\s+/,le.bind(le,!1))),(X.nextSibling==null&&I(X.parentNode)||X.nextSibling!=null&&I(X.nextSibling))&&(re=re.replace(/\s+$/,le.bind(le,!1)))}return Q.insert(re)}p.default=V,p.matchAttributor=z,p.matchBlot=G,p.matchNewline=ae,p.matchSpacing=de,p.matchText=ye},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function s(f,h){for(var v=0;v '},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function s(f,h){for(var v=0;vo.right&&(f=o.right-s.right,this.root.style.left=t+f+"px"),s.lefto.bottom){var h=s.bottom-s.top,v=r.bottom-r.top+h;this.root.style.top=l-v+"px",this.root.classList.add("ql-flip")}return f}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),i}();p.default=c},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function x(w,M){var k=[],S=!0,q=!1,L=void 0;try{for(var A=w[Symbol.iterator](),D;!(S=(D=A.next()).done)&&(k.push(D.value),!(M&&k.length===M));S=!0);}catch(N){q=!0,L=N}finally{try{!S&&A.return&&A.return()}finally{if(q)throw L}}return k}return function(w,M){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return x(w,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function x(w,M,k){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,M);if(S===void 0){var q=Object.getPrototypeOf(w);return q===null?void 0:x(q,M,k)}else{if("value"in S)return S.value;var L=S.get;return L===void 0?void 0:L.call(k)}},c=function(){function x(w,M){for(var k=0;k','','',''].join(""),p.default=O},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=m(29),a=ne(g),c=m(36),i=m(38),u=m(64),r=m(65),t=ne(r),l=m(66),o=ne(l),s=m(67),f=ne(s),h=m(37),v=m(26),$=m(39),C=m(40),b=m(56),y=ne(b),_=m(68),E=ne(_),O=m(27),T=ne(O),x=m(69),w=ne(x),M=m(70),k=ne(M),S=m(71),q=ne(S),L=m(72),A=ne(L),D=m(73),N=ne(D),B=m(13),R=ne(B),V=m(74),F=ne(V),P=m(75),j=ne(P),I=m(57),W=ne(I),H=m(41),z=ne(H),G=m(28),Z=ne(G),oe=m(59),se=ne(oe),ae=m(60),de=ne(ae),be=m(61),ye=ne(be),X=m(108),Q=ne(X),re=m(62),le=ne(re);function ne(J){return J&&J.__esModule?J:{default:J}}a.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":h.BackgroundClass,"attributors/class/color":v.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":$.FontClass,"attributors/class/size":C.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":h.BackgroundStyle,"attributors/style/color":v.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":$.FontStyle,"attributors/style/size":C.SizeStyle},!0),a.default.register({"formats/align":c.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":u.IndentClass,"formats/background":h.BackgroundStyle,"formats/color":v.ColorStyle,"formats/font":$.FontClass,"formats/size":C.SizeClass,"formats/blockquote":t.default,"formats/code-block":R.default,"formats/header":o.default,"formats/list":f.default,"formats/bold":y.default,"formats/code":B.Code,"formats/italic":E.default,"formats/link":T.default,"formats/script":w.default,"formats/strike":k.default,"formats/underline":q.default,"formats/image":A.default,"formats/video":N.default,"formats/list/item":s.ListItem,"modules/formula":F.default,"modules/syntax":j.default,"modules/toolbar":W.default,"themes/bubble":Q.default,"themes/snow":le.default,"ui/icons":z.default,"ui/picker":Z.default,"ui/icon-picker":de.default,"ui/color-picker":se.default,"ui/tooltip":ye.default},!0),p.default=a.default},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0}),p.IndentClass=void 0;var g=function(){function f(h,v){for(var $=0;$0&&this.children.tail.format(E,O)}},{key:"formats",value:function(){return s({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(E,O){if(E instanceof $)a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"insertBefore",this).call(this,E,O);else{var T=O==null?this.length():O.offset(this),x=this.split(T);x.parent.insertBefore(E,x)}}},{key:"optimize",value:function(E){a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"optimize",this).call(this,E);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(E){if(E.statics.blotName!==this.statics.blotName){var O=i.default.create(this.statics.defaultChild);E.moveChildren(O),this.appendChild(O)}a(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"replace",this).call(this,E)}}]),y}(l.default);C.blotName="list",C.scope=i.default.Scope.BLOCK_BLOT,C.tagName=["OL","UL"],C.defaultChild="list-item",C.allowedChildren=[$],p.ListItem=$,p.default=C},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=m(56),a=c(g);function c(l){return l&&l.__esModule?l:{default:l}}function i(l,o){if(!(l instanceof o))throw new TypeError("Cannot call a class as a function")}function u(l,o){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:l}function r(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);l.prototype=Object.create(o&&o.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(l,o):l.__proto__=o)}var t=function(l){r(o,l);function o(){return i(this,o),u(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return o}(a.default);t.blotName="italic",t.tagName=["EM","I"],p.default=t},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function s(f,h){for(var v=0;v-1?b?this.domNode.setAttribute(C,b):this.domNode.removeAttribute(C):a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,C,b)}}],[{key:"create",value:function(C){var b=a(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,C);return typeof C=="string"&&b.setAttribute("src",this.sanitize(C)),b}},{key:"formats",value:function(C){return s.reduce(function(b,y){return C.hasAttribute(y)&&(b[y]=C.getAttribute(y)),b},{})}},{key:"match",value:function(C){return/\.(jpe?g|gif|png)$/.test(C)||/^data:image\/.+;base64/.test(C)}},{key:"sanitize",value:function(C){return(0,u.sanitize)(C,["http","https","data"])?C:"//:0"}},{key:"value",value:function(C){return C.getAttribute("src")}}]),v}(i.default.Embed);f.blotName="image",f.tagName="IMG",p.default=f},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0});var g=function(){function h(v,$){for(var C=0;C<$.length;C++){var b=$[C];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}return function(v,$,C){return $&&h(v.prototype,$),C&&h(v,C),v}}(),a=function h(v,$,C){v===null&&(v=Function.prototype);var b=Object.getOwnPropertyDescriptor(v,$);if(b===void 0){var y=Object.getPrototypeOf(v);return y===null?void 0:h(y,$,C)}else{if("value"in b)return b.value;var _=b.get;return _===void 0?void 0:_.call(C)}},c=m(4),i=m(27),u=r(i);function r(h){return h&&h.__esModule?h:{default:h}}function t(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}function l(h,v){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:h}function o(h,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);h.prototype=Object.create(v&&v.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(h,v):h.__proto__=v)}var s=["height","width"],f=function(h){o(v,h);function v(){return t(this,v),l(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return g(v,[{key:"format",value:function(C,b){s.indexOf(C)>-1?b?this.domNode.setAttribute(C,b):this.domNode.removeAttribute(C):a(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,C,b)}}],[{key:"create",value:function(C){var b=a(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,C);return b.setAttribute("frameborder","0"),b.setAttribute("allowfullscreen",!0),b.setAttribute("src",this.sanitize(C)),b}},{key:"formats",value:function(C){return s.reduce(function(b,y){return C.hasAttribute(y)&&(b[y]=C.getAttribute(y)),b},{})}},{key:"sanitize",value:function(C){return u.default.sanitize(C)}},{key:"value",value:function(C){return C.getAttribute("src")}}]),v}(c.BlockEmbed);f.blotName="video",f.className="ql-video",f.tagName="IFRAME",p.default=f},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.FormulaBlot=void 0;var g=function(){function C(b,y){for(var _=0;_0||this.cachedText==null)&&(this.domNode.innerHTML=T(x),this.domNode.normalize(),this.attach()),this.cachedText=x)}}]),E}(s.default);C.className="ql-syntax";var b=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),y=function(_){$(E,_),g(E,null,[{key:"register",value:function(){r.default.register(b,!0),r.default.register(C,!0)}}]);function E(O,T){h(this,E);var x=v(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,O,T));if(typeof x.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var w=null;return x.quill.on(r.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(w),w=setTimeout(function(){x.highlight(),w=null},x.options.interval)}),x.highlight(),x}return g(E,[{key:"highlight",value:function(){var T=this;if(!this.quill.selection.composing){this.quill.update(r.default.sources.USER);var x=this.quill.getSelection();this.quill.scroll.descendants(C).forEach(function(w){w.highlight(T.options.highlight)}),this.quill.update(r.default.sources.SILENT),x!=null&&this.quill.setSelection(x,r.default.sources.SILENT)}}}]),E}(l.default);y.DEFAULTS={highlight:function(){return window.hljs==null?null:function(_){var E=window.hljs.highlightAuto(_);return E.value}}(),interval:1e3},p.CodeBlock=C,p.CodeToken=b,p.default=y},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p){e.exports=' '},function(e,p,m){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.BubbleTooltip=void 0;var g=function E(O,T,x){O===null&&(O=Function.prototype);var w=Object.getOwnPropertyDescriptor(O,T);if(w===void 0){var M=Object.getPrototypeOf(O);return M===null?void 0:E(M,T,x)}else{if("value"in w)return w.value;var k=w.get;return k===void 0?void 0:k.call(x)}},a=function(){function E(O,T){for(var x=0;x0&&q===r.default.sources.USER){w.show(),w.root.style.left="0px",w.root.style.width="",w.root.style.width=w.root.offsetWidth+"px";var L=w.quill.getLines(k.index,k.length);if(L.length===1)w.position(w.quill.getBounds(k));else{var A=L[L.length-1],D=w.quill.getIndex(A),N=Math.min(A.length()-1,k.index+k.length-D),B=w.quill.getBounds(new o.Range(D,N));w.position(B)}}else document.activeElement!==w.textbox&&w.quill.hasFocus()&&w.hide()}),w}return a(O,[{key:"listen",value:function(){var x=this;g(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){x.root.classList.remove("ql-editing")}),this.quill.on(r.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!x.root.classList.contains("ql-hidden")){var w=x.quill.getSelection();w!=null&&x.position(x.quill.getBounds(w))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(x){var w=g(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"position",this).call(this,x),M=this.root.querySelector(".ql-tooltip-arrow");if(M.style.marginLeft="",w===0)return w;M.style.marginLeft=-1*w-M.offsetWidth/2+"px"}}]),O}(t.BaseTooltip);_.TEMPLATE=['','
','','',"
"].join(""),p.BubbleTooltip=_,p.default=y},function(e,p,m){e.exports=m(63)}]).default})})(quill);var Quill=getDefaultExportFromCjs(quill.exports),quill_core="",quill_snow="",quill_bubble="";const defaultOptions={theme:"snow",boundary:document.body,modules:{toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["clean"],["link","image","video"]]},placeholder:"Insert content here ...",readOnly:!1},_sfc_main$2S={name:"quill-editor",props:{content:String,value:String,disabled:{type:Boolean,default:!1},options:{type:Object,required:!1,default:()=>({})}},emits:["ready","change","input","blur","focus","update:value"],setup(n,d){const e={editorOption:{},quill:null};let p="";require$$0$1.watch(()=>n.value,c=>{e.quill&&(c&&c!==p?(p=c,e.quill.pasteHTML(c)):c||e.quill.setText(""))}),require$$0$1.watch(()=>n.content,c=>{e.quill&&(c&&c!==p?(p=c,e.quill.pasteHTML(c)):c||e.quill.setText(""))}),require$$0$1.watch(()=>n.disabled,c=>{e.quill&&e.quill.enable(!c)});const m=require$$0$1.ref(null),g=(c,i)=>{for(const u in i)!c[u]||u!=="modules"?c[u]=i[u]:g(c[u],i[u]);return c},a=()=>{m.value&&(e.editorOption=g(defaultOptions,n.options),e.editorOption.readOnly=!!n.disabled,e.quill=new Quill(m.value,e.editorOption),n.value&&e.quill.pasteHTML(n.value),e.quill.on("selection-change",c=>{c?d.emit("focus",e.quill):d.emit("blur",e.quill)}),e.quill.on("text-change",()=>{n.disabled&&e.quill.enable(!1);let c=m.value.children[0].innerHTML;const i=e.quill,u=e.quill.getText();c==="


"&&(c=""),p=c,d.emit("update:value",p),d.emit("change",{html:c,text:u,quill:i})}),d.emit("ready",e.quill))};return require$$0$1.onBeforeUnmount(()=>{const c=m.value.previousSibling;c&&c.className.indexOf("ql-toolbar")>-1&&c.parentNode.removeChild(c)}),require$$0$1.onMounted(()=>{a()}),require$$0$1.onUnmounted(()=>{e.quill=null}),{editor:m}}},_hoisted_1$x={ref:"editor"};function _sfc_render$2S(n,d,e,p,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("section",_hoisted_1$x,null,512)}var quillEditor=_export_sfc$1(_sfc_main$2S,[["render",_sfc_render$2S]]);quillEditor.install=function(n){n.component(quillEditor.name,quillEditor)};var richEditorWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2R={name:"rich-editor-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper,quillEditor},data(){return{oldFieldValue:null,fieldModel:null,rules:[],customToolbar:[],valueChangedFlag:!1}},computed:{editorOption(){return{placeholder:this.field.options.placeholder,modules:{}}}},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{handleRichEditorChangeEvent(){this.valueChangedFlag=!0,this.syncUpdateFormModel(this.fieldModel)},handleRichEditorFocusEvent(){this.oldFieldValue=deepClone(this.fieldModel)},handleRichEditorBlurEvent(){this.valueChangedFlag&&(this.emitFieldDataChange(this.fieldModel,this.oldFieldValue),this.valueChangedFlag=!1)}}};function _sfc_render$2R(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("quill-editor"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",null,[require$$0$1.createVNode(a,{value:m.fieldModel,"onUpdate:value":d[0]||(d[0]=i=>m.fieldModel=i),options:g.editorOption,disabled:e.field.options.disabled,onBlur:g.handleRichEditorBlurEvent,onFocus:g.handleRichEditorFocusEvent,onChange:g.handleRichEditorChangeEvent,style:require$$0$1.normalizeStyle(e.field.options.contentHeight?`height: ${e.field.options.contentHeight};`:"")},null,8,["value","options","disabled","onBlur","onFocus","onChange","style"])])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var richEditorWidget=_export_sfc$1(_sfc_main$2R,[["render",_sfc_render$2R],["__scopeId","data-v-736d97e5"]]),__glob_0_15$1=Object.freeze(Object.defineProperty({__proto__:null,default:richEditorWidget},Symbol.toStringTag,{value:"Module"})),selectWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2Q={name:"select-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{allowDefaultFirstOption(){return!!this.field.options.filterable&&!!this.field.options.allowCreate},remoteMethod(){if(!!this.field.options.remote&&!!this.field.options.onRemoteQuery)return this.remoteQuery}},beforeCreate(){},created(){this.initOptionItems(),this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2Q(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-option"),c=require$$0$1.resolveComponent("el-select"),i=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(i,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(c,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=u=>m.fieldModel=u),class:"full-width-input",disabled:e.field.options.disabled,size:n.widgetSize,clearable:e.field.options.clearable,filterable:e.field.options.filterable,"allow-create":e.field.options.allowCreate,"default-first-option":g.allowDefaultFirstOption,"automatic-dropdown":e.field.options.automaticDropdown,multiple:e.field.options.multiple,"multiple-limit":e.field.options.multipleLimit,placeholder:e.field.options.placeholder||n.i18nt("render.hint.selectPlaceholder"),remote:e.field.options.remote,"remote-method":g.remoteMethod,onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onChange:n.handleChangeEvent},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.field.options.optionItems,u=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:u.value,label:u.label,value:u.value,disabled:u.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue","disabled","size","clearable","filterable","allow-create","default-first-option","automatic-dropdown","multiple","multiple-limit","placeholder","remote","remote-method","onFocus","onBlur","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var selectWidget=_export_sfc$1(_sfc_main$2Q,[["render",_sfc_render$2Q],["__scopeId","data-v-73c0fb69"]]),__glob_0_16$1=Object.freeze(Object.defineProperty({__proto__:null,default:selectWidget},Symbol.toStringTag,{value:"Module"})),sliderWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2P={name:"slider-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2P(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-slider"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),disabled:e.field.options.disabled,"show-stops":e.field.options.showStops,min:e.field.options.min,max:e.field.options.max,step:e.field.options.step,range:e.field.options.range,vertical:e.field.options.vertical,onChange:n.handleChangeEvent},null,8,["modelValue","disabled","show-stops","min","max","step","range","vertical","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var sliderWidget=_export_sfc$1(_sfc_main$2P,[["render",_sfc_render$2P],["__scopeId","data-v-e54b3390"]]),__glob_0_17$1=Object.freeze(Object.defineProperty({__proto__:null,default:sliderWidget},Symbol.toStringTag,{value:"Module"})),slotWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2O={name:"slot-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}},_hoisted_1$w={key:0,class:"slot-title"};function _sfc_render$2O(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{class:require$$0$1.normalizeClass([e.designState?"slot-wrapper-design":"slot-wrapper-render"])},[require$$0$1.renderSlot(n.$slots,e.field.options.name,{formModel:n.formModel},void 0,!0),e.designState?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$w,require$$0$1.toDisplayString(e.field.options.label),1)):require$$0$1.createCommentVNode("",!0)],2)]),_:3},8,["designer","field","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var slotWidget=_export_sfc$1(_sfc_main$2O,[["render",_sfc_render$2O],["__scopeId","data-v-1b458525"]]),__glob_0_18$1=Object.freeze(Object.defineProperty({__proto__:null,default:slotWidget},Symbol.toStringTag,{value:"Module"})),staticTextWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2N={name:"static-text-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2N(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{ref:"fieldEditor",style:require$$0$1.normalizeStyle(e.field.options.fontSize?`font-size: ${e.field.options.fontSize};`:"")},[require$$0$1.createElementVNode("pre",{style:require$$0$1.normalizeStyle({"white-space":e.field.options.preWrap?"pre-wrap":"pre","text-align":e.field.options.textAlign?e.field.options.textAlign:"left"})},require$$0$1.toDisplayString(e.field.options.textContent),5)],4)]),_:1},8,["designer","field","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var staticTextWidget=_export_sfc$1(_sfc_main$2N,[["render",_sfc_render$2N],["__scopeId","data-v-990dcae8"]]),__glob_0_20$1=Object.freeze(Object.defineProperty({__proto__:null,default:staticTextWidget},Symbol.toStringTag,{value:"Module"})),switchWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2M={name:"switch-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2M(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-switch"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),disabled:e.field.options.disabled,"active-text":e.field.options.activeText,"inactive-text":e.field.options.inactiveText,"active-color":e.field.options.activeColor,"inactive-color":e.field.options.inactiveColor,width:e.field.options.switchWidth,onChange:n.handleChangeEvent},null,8,["modelValue","disabled","active-text","inactive-text","active-color","inactive-color","width","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var switchWidget=_export_sfc$1(_sfc_main$2M,[["render",_sfc_render$2M],["__scopeId","data-v-51a90f56"]]),__glob_0_21$1=Object.freeze(Object.defineProperty({__proto__:null,default:switchWidget},Symbol.toStringTag,{value:"Module"})),textareaWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2L={name:"textarea-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2L(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-input"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{type:"textarea",ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:n.widgetSize,placeholder:e.field.options.placeholder,rows:e.field.options.rows,minlength:e.field.options.minLength,maxlength:e.field.options.maxLength,"show-word-limit":e.field.options.showWordLimit,onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onInput:n.handleInputCustomEvent,onChange:n.handleChangeEvent},null,8,["modelValue","disabled","readonly","size","placeholder","rows","minlength","maxlength","show-word-limit","onFocus","onBlur","onInput","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var textareaWidget=_export_sfc$1(_sfc_main$2L,[["render",_sfc_render$2L],["__scopeId","data-v-07ccea24"]]),__glob_0_22$1=Object.freeze(Object.defineProperty({__proto__:null,default:textareaWidget},Symbol.toStringTag,{value:"Module"})),timeRangeWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2K={name:"time-range-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2K(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-time-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""])},[require$$0$1.createVNode(a,{ref:"fieldEditor","is-range":"",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"full-width-input":""]),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:n.widgetSize,clearable:e.field.options.clearable,editable:e.field.options.editable,format:e.field.options.format,"value-format":"HH:mm:ss","start-placeholder":e.field.options.startPlaceholder||n.i18nt("render.hint.startTimePlaceholder"),"end-placeholder":e.field.options.endPlaceholder||n.i18nt("render.hint.endTimePlaceholder"),onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onChange:n.handleChangeEvent},null,8,["modelValue","class","disabled","readonly","size","clearable","editable","format","start-placeholder","end-placeholder","onFocus","onBlur","onChange"])],2)]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var timeRangeWidget=_export_sfc$1(_sfc_main$2K,[["render",_sfc_render$2K],["__scopeId","data-v-6789eaac"]]),__glob_0_23$1=Object.freeze(Object.defineProperty({__proto__:null,default:timeRangeWidget},Symbol.toStringTag,{value:"Module"})),timeWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2J={name:"time-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2J(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-time-picker"),c=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=i=>m.fieldModel=i),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""]),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:n.widgetSize,clearable:e.field.options.clearable,editable:e.field.options.editable,format:e.field.options.format,"value-format":"HH:mm:ss",placeholder:e.field.options.placeholder||n.i18nt("render.hint.timePlaceholder"),onFocus:n.handleFocusCustomEvent,onBlur:n.handleBlurCustomEvent,onChange:n.handleChangeEvent},null,8,["modelValue","class","disabled","readonly","size","clearable","editable","format","placeholder","onFocus","onBlur","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var timeWidget=_export_sfc$1(_sfc_main$2J,[["render",_sfc_render$2J],["__scopeId","data-v-b2bd1886"]]),__glob_0_24$1=Object.freeze(Object.defineProperty({__proto__:null,default:timeWidget},Symbol.toStringTag,{value:"Module"}));let comps$1={};const modules$3={"./button-widget.vue":__glob_0_0$2,"./cascader-widget.vue":__glob_0_1$3,"./checkbox-widget.vue":__glob_0_2$3,"./color-widget.vue":__glob_0_3$3,"./date-range-widget.vue":__glob_0_4$3,"./date-widget.vue":__glob_0_5$3,"./divider-widget.vue":__glob_0_6$2,"./file-upload-widget.vue":__glob_0_7$1,"./form-item-wrapper.vue":__glob_0_8$1,"./html-text-widget.vue":__glob_0_9$1,"./input-widget.vue":__glob_0_10$1,"./number-widget.vue":__glob_0_11$1,"./picture-upload-widget.vue":__glob_0_12$1,"./radio-widget.vue":__glob_0_13$1,"./rate-widget.vue":__glob_0_14$1,"./rich-editor-widget.vue":__glob_0_15$1,"./select-widget.vue":__glob_0_16$1,"./slider-widget.vue":__glob_0_17$1,"./slot-widget.vue":__glob_0_18$1,"./static-content-wrapper.vue":__glob_0_19$1,"./static-text-widget.vue":__glob_0_20$1,"./switch-widget.vue":__glob_0_21$1,"./textarea-widget.vue":__glob_0_22$1,"./time-range-widget.vue":__glob_0_23$1,"./time-widget.vue":__glob_0_24$1};for(const n in modules$3){let d=modules$3[n].default.name;comps$1[d]=modules$3[n].default}var gridColItem_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2I={name:"GridColItem",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin],components:xe({},comps$1),props:{widget:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,colHeight:{type:String,default:null}},inject:["refList","globalModel","getFormConfig","previewState"],data(){return{layoutProps:{span:this.widget.options.span,md:this.widget.options.md||12,sm:this.widget.options.sm||12,xs:this.widget.options.xs||12,offset:this.widget.options.offset||0,push:this.widget.options.push||0,pull:this.widget.options.pull||0}}},computed:{formConfig(){return this.getFormConfig()},customClass(){return this.widget.options.customClass||""},colHeightStyle(){return this.colHeight?{height:this.colHeight+"px"}:{}}},created(){this.initLayoutProps(),this.initRefList()},methods:{initLayoutProps(){if(this.widget.options.responsive)if(this.previewState){this.layoutProps.md=void 0,this.layoutProps.sm=void 0,this.layoutProps.xs=void 0;let n=this.formConfig.layoutType;n==="H5"?this.layoutProps.span=this.widget.options.xs||12:n==="Pad"?this.layoutProps.span=this.widget.options.sm||12:this.layoutProps.span=this.widget.options.md||12}else this.layoutProps.span=void 0;else this.layoutProps.md=void 0,this.layoutProps.sm=void 0,this.layoutProps.xs=void 0}}},_hoisted_1$v={class:"blank-cell"},_hoisted_2$m={class:"invisible-content"};function _sfc_render$2I(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-col");return require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createBlock(a,require$$0$1.mergeProps({class:["grid-cell",[g.customClass]]},m.layoutProps,{style:g.colHeightStyle,key:e.widget.id}),{default:require$$0$1.withCtx(()=>[!!e.widget.widgetList&&e.widget.widgetList.length>0?(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},require$$0$1.renderList(e.widget.widgetList,(c,i)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[c.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(n.getComponentByContainer(c)),{widget:c,key:i,"parent-list":e.widget.widgetList,"index-of-parent-list":i,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),u=>({name:u,fn:require$$0$1.withCtx(r=>[require$$0$1.renderSlot(n.$slots,u,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(r)),void 0,!0)])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(c.type+"-widget"),{field:c,designer:null,key:i,"parent-list":e.widget.widgetList,"index-of-parent-list":i,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),u=>({name:u,fn:require$$0$1.withCtx(r=>[require$$0$1.renderSlot(n.$slots,u,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(r)),void 0,!0)])}))]),1032,["field","parent-list","index-of-parent-list","parent-widget"]))],64))),256)):(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:1},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$v,[require$$0$1.createElementVNode("span",_hoisted_2$m,require$$0$1.toDisplayString(n.i18nt("render.hint.blankCellContent")),1)])]),_:1}))]),_:3},16,["class","style"])),[[require$$0$1.vShow,!e.widget.options.hidden]])}var GridColItem=_export_sfc$1(_sfc_main$2I,[["render",_sfc_render$2I],["__scopeId","data-v-6c64446c"]]),__glob_0_1$2=Object.freeze(Object.defineProperty({__proto__:null,default:GridColItem},Symbol.toStringTag,{value:"Module"})),containerItemMixin={inject:["getFormConfig","getGlobalDsv"],computed:{customClass(){return this.widget.options.customClass||""},formModel:{cache:!1,get(){return this.globalModel.formModel}}},mounted(){this.callSetHidden()},methods:{unregisterFromRefList(){if(this.refList!==null&&!!this.widget.options.name){let n=this.widget.options.name;delete this.refList[n]}},callSetHidden(){this.widget.options.hidden===!0&&this.setHidden(!0)},setHidden(n){this.widget.options.hidden=n;let d=e=>{let p=e.options.name,m=this.getWidgetRef(p);n&&!!m&&!!m.clearFieldRules&&m.clearFieldRules(),!n&&!!m&&!!m.buildFieldRules&&m.buildFieldRules()};traverseFieldWidgetsOfContainer(this.widget,d)},activeTab(n){n>=0&&n{d.options.active=e===n,e===n&&(this.activeTabName=d.options.name)})},disableTab(n){n>=0&&n=0&&n=0&&n=0&&n{let e=d.options.name+"@row"+this.rowIdData[n],p=this.getWidgetRef(e);p&&p.setDisabled(!0)})},enableSubFormRow(n){this.widget.widgetList.forEach(d=>{let e=d.options.name+"@row"+this.rowIdData[n],p=this.getWidgetRef(e);p&&p.setDisabled(!1)})},disableSubForm(){this.rowIdData.length>0&&this.rowIdData.forEach((n,d)=>{this.disableSubFormRow(d)}),this.actionDisabled=!0},enableSubForm(){this.rowIdData.length>0&&this.rowIdData.forEach((n,d)=>{this.enableSubFormRow(d)}),this.actionDisabled=!1},resetSubForm(){if(this.widget.type==="sub-form"){let n=this.formModel[this.widget.options.name];n&&(n.splice(0,n.length),this.rowIdData.splice(0,this.rowIdData.length)),this.widget.options.showBlankRow&&this.addSubFormRow()}},getSubFormValues(n=!0){if(this.widget.type==="sub-form")return this.formModel[this.widget.options.name];this.$message.error(this.i18nt("render.hint.nonSubFormType"))},addCssClass(n){this.widget.options.customClass?this.widget.options.customClass.push(n):this.widget.options.customClass=[n]},removeCssClass(n){if(!this.widget.options.customClass)return;let d=-1;this.widget.options.customClass.map((e,p)=>{e===n&&(d=p)}),d>-1&&this.widget.options.customClass.splice(d,1)}}};const _sfc_main$2H={name:"vf-grid-item",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin,containerItemMixin],components:{ContainerItemWrapper,GridColItem},props:{widget:Object},inject:["refList","sfRefList","globalModel"],created(){this.initRefList()},mounted(){},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2H(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("grid-col-item"),c=require$$0$1.resolveComponent("el-row"),i=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(i,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createBlock(c,{key:e.widget.id,gutter:e.widget.options.gutter,class:require$$0$1.normalizeClass(["grid-container",[n.customClass]]),ref:e.widget.id},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.cols,(u,r)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:r,widget:u,"parent-list":e.widget.cols,"index-of-parent-list":r,"parent-widget":e.widget,"col-height":e.widget.options.colHeight},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),t=>({name:t,fn:require$$0$1.withCtx(l=>[require$$0$1.renderSlot(n.$slots,t,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(l)))])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget","col-height"]))),128))]),_:3},8,["gutter","class"])),[[require$$0$1.vShow,!e.widget.options.hidden]])]),_:3},8,["widget"])}var gridItem=_export_sfc$1(_sfc_main$2H,[["render",_sfc_render$2H]]),__glob_0_2$2=Object.freeze(Object.defineProperty({__proto__:null,default:gridItem},Symbol.toStringTag,{value:"Module"})),subFormItem_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2G={name:"sub-form-item",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin,containerItemMixin],components:ke(xe({ContainerItemWrapper},comps$1),{SvgIcon}),props:{widget:Object},inject:["refList","sfRefList","globalModel"],data(){return{rowIdData:[],fieldSchemaData:[],actionDisabled:!1}},created(){this.initRefList(),this.registerSubFormToRefList(),this.initRowIdData(!0),this.initFieldSchemaData(),this.initEventHandler()},mounted(){this.handleSubFormFirstRowAdd()},beforeUnmount(){this.unregisterFromRefList()},methods:{getLabelAlign(n,d){return d.options.labelAlign||n.options.labelAlign},registerSubFormToRefList(){this.widget.type==="sub-form"&&(this.sfRefList[this.widget.options.name]=this)},initRowIdData(n){if(this.widget.type==="sub-form"){this.rowIdData.splice(0,this.rowIdData.length);let d=this.formModel[this.widget.options.name];!!d&&d.length>0&&(d.forEach(()=>{this.rowIdData.push("id"+generateId())}),n&&setTimeout(()=>{this.handleSubFormRowChange(d)},800))}},addToRowIdData(){this.rowIdData.push("id"+generateId())},insertToRowIdData(n){this.rowIdData.splice(n,0,"id"+generateId())},deleteFromRowIdData(n){this.rowIdData.splice(n,1)},getRowIdData(){return this.rowIdData},getWidgetRefOfSubForm(n,d){let e=n+"@row"+this.rowIdData[d];return this.getWidgetRef(e)},initFieldSchemaData(){if(this.widget.type!=="sub-form")return;let n=this.rowIdData.length;if(this.fieldSchemaData.splice(0,this.fieldSchemaData.length),n>0)for(let d=0;d{e.push(this.cloneFieldSchema(p))}),this.fieldSchemaData.push(e)}},addToFieldSchemaData(n){let d=[];this.widget.widgetList.forEach(e=>{d.push(this.cloneFieldSchema(e))}),n===void 0?this.fieldSchemaData.push(d):this.fieldSchemaData.splice(n,0,d)},deleteFromFieldSchemaData(n){this.fieldSchemaData.splice(n,1)},cloneFieldSchema(n){let d=deepClone(n);return d.id=n.type+generateId(),d},initEventHandler(){this.widget.type==="sub-form"&&this.on$("setFormData",n=>{this.initRowIdData(!1),this.initFieldSchemaData();let d=n[this.widget.options.name]||[];setTimeout(()=>{this.handleSubFormRowChange(d)},800)})},handleSubFormFirstRowAdd(){if(this.widget.type==="sub-form"&&!!this.widget.options.showBlankRow&&this.rowIdData.length===1){let n=this.formModel[this.widget.options.name]||[];this.handleSubFormRowAdd(n,this.rowIdData[0]),this.handleSubFormRowChange(n)}},addSubFormRow(){let n={};this.widget.widgetList.forEach(e=>{e.formItemFlag&&(n[e.options.name]=e.options.defaultValue)});let d=this.formModel[this.widget.options.name]||[];d.push(n),this.addToRowIdData(),this.addToFieldSchemaData(),this.handleSubFormRowAdd(d,this.rowIdData[d.length-1]),this.handleSubFormRowChange(d)},insertSubFormRow(n){let d={};this.widget.widgetList.forEach(p=>{p.formItemFlag&&(d[p.options.name]=p.options.defaultValue)});let e=this.formModel[this.widget.options.name]||[];e.splice(n,0,d),this.insertToRowIdData(n),this.addToFieldSchemaData(n),this.handleSubFormRowInsert(e,this.rowIdData[n]),this.handleSubFormRowChange(e)},deleteSubFormRow(n){this.$confirm(this.i18nt("render.hint.deleteSubFormRow")+"?",this.i18nt("render.hint.prompt"),{confirmButtonText:this.i18nt("render.hint.confirm"),cancelButtonText:this.i18nt("render.hint.cancel")}).then(()=>{let d=this.formModel[this.widget.options.name]||[],e=deepClone(d[n]);d.splice(n,1),this.deleteFromRowIdData(n),this.deleteFromFieldSchemaData(n),this.handleSubFormRowDelete(d,e),this.handleSubFormRowChange(d)}).catch(()=>{})},handleSubFormRowChange(n){this.widget.options.onSubFormRowChange&&new Function("subFormData",this.widget.options.onSubFormRowChange).call(this,n)},handleSubFormRowAdd(n,d){this.widget.options.onSubFormRowAdd&&new Function("subFormData","newRowId",this.widget.options.onSubFormRowAdd).call(this,n,d)},handleSubFormRowInsert(n,d){this.widget.options.onSubFormRowInsert&&new Function("subFormData","newRowId",this.widget.options.onSubFormRowInsert).call(this,n,d)},handleSubFormRowDelete(n,d){this.widget.options.onSubFormRowDelete&&new Function("subFormData","deletedDataRow",this.widget.options.onSubFormRowDelete).call(this,n,d)}}},_hoisted_1$u={class:"action-header-column"},_hoisted_2$l={class:"action-label"},_hoisted_3$h={key:0,class:"custom-label"},_hoisted_4$a=["title"],_hoisted_5$8={class:"sub-form-action-column hide-label"},_hoisted_6$7={class:"action-button-column"},_hoisted_7$4={key:0,class:"row-number-span"};function _sfc_render$2G(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("svg-icon"),c=require$$0$1.resolveComponent("el-button"),i=require$$0$1.resolveComponent("el-tooltip"),u=require$$0$1.resolveComponent("el-row"),r=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(r,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:e.widget.id,class:"sub-form-container"},[require$$0$1.createVNode(u,{class:"header-row"},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$u,[require$$0$1.createElementVNode("span",_hoisted_2$l,require$$0$1.toDisplayString(n.i18nt("render.hint.subFormAction")),1),require$$0$1.createVNode(c,{disabled:m.actionDisabled,round:"",type:"primary",size:"small",class:"action-button",onClick:g.addSubFormRow,title:n.i18nt("render.hint.subFormAddActionHint")},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.i18nt("render.hint.subFormAddAction")),1),require$$0$1.createVNode(a,{"icon-class":"el-plus"})]),_:1},8,["disabled","onClick","title"])]),(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.widgetList,t=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:t.id+"thc",class:require$$0$1.normalizeClass(["field-header-column",[g.getLabelAlign(e.widget,t),t.options.required?"is-required":""]]),style:require$$0$1.normalizeStyle({width:t.options.columnWidth})},[t.options.labelIconClass?(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",_hoisted_3$h,[t.options.labelIconPosition==="front"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[t.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createVNode(i,{content:t.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":t.options.labelIconClass},null,8,["icon-class"])]),_:2},1032,["content"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.options.label),1)],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createVNode(a,{"icon-class":t.options.labelIconClass},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.options.label),1)],64))],64)):t.options.labelIconPosition==="rear"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[t.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.options.label),1),require$$0$1.createVNode(i,{content:t.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":t.options.labelIconClass},null,8,["icon-class"])]),_:2},1032,["content"])],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.options.label),1),require$$0$1.createVNode(a,{"icon-class":t.options.labelIconClass},null,8,["icon-class"])],64))],64)):require$$0$1.createCommentVNode("",!0)])):(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",{key:1,title:t.options.labelTooltip},require$$0$1.toDisplayString(t.options.label),9,_hoisted_4$a))],6))),128))]),_:1}),(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(m.rowIdData,(t,l)=>(require$$0$1.openBlock(),require$$0$1.createBlock(u,{class:"sub-form-row",key:t},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_5$8,[require$$0$1.createElementVNode("div",_hoisted_6$7,[require$$0$1.createVNode(c,{disabled:m.actionDisabled,circle:"",onClick:o=>g.insertSubFormRow(l),title:n.i18nt("render.hint.insertSubFormRow")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":"el-plus"})]),_:2},1032,["disabled","onClick","title"]),require$$0$1.createVNode(c,{disabled:m.actionDisabled,circle:"",onClick:o=>g.deleteSubFormRow(l),title:n.i18nt("render.hint.deleteSubFormRow")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":"el-delete"})]),_:2},1032,["disabled","onClick","title"]),e.widget.options.showRowNumber?(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",_hoisted_7$4,"#"+require$$0$1.toDisplayString(l+1),1)):require$$0$1.createCommentVNode("",!0)])]),(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.widgetList,(o,s)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:o.id+"tc"+t,class:"sub-form-table-column hide-label",style:require$$0$1.normalizeStyle({width:o.options.columnWidth})},[(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(o.type+"-widget"),{field:m.fieldSchemaData[l][s],key:m.fieldSchemaData[l][s].id,"parent-list":e.widget.widgetList,"index-of-parent-list":s,"parent-widget":e.widget,"sub-form-row-id":t,"sub-form-row-index":l,"sub-form-col-index":s},null,8,["field","parent-list","index-of-parent-list","parent-widget","sub-form-row-id","sub-form-row-index","sub-form-col-index"]))],4))),128))]),_:2},1024))),128))])),[[require$$0$1.vShow,!e.widget.options.hidden]])]),_:1},8,["widget"])}var subFormItem=_export_sfc$1(_sfc_main$2G,[["render",_sfc_render$2G],["__scopeId","data-v-806f6ffe"]]),__glob_0_3$2=Object.freeze(Object.defineProperty({__proto__:null,default:subFormItem},Symbol.toStringTag,{value:"Module"}));const _sfc_main$2F={name:"tab-item",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin,containerItemMixin],components:xe({ContainerItemWrapper},comps$1),props:{widget:Object},inject:["refList","sfRefList","globalModel"],data(){return{activeTabName:""}},computed:{visibleTabs(){return this.widget.tabs.filter(n=>!n.options.hidden)}},created(){this.initRefList()},mounted(){this.initActiveTab()},beforeUnmount(){this.unregisterFromRefList()},methods:{initActiveTab(){if(this.widget.type==="tab"&&this.widget.tabs.length>0){let n=this.widget.tabs.filter(d=>d.options.active===!0);n.length>0?this.activeTabName=n[0].options.name:this.activeTabName=this.widget.tabs[0].options.name}}}};function _sfc_render$2F(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-tab-pane"),c=require$$0$1.resolveComponent("el-tabs"),i=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(i,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:e.widget.id,class:"tab-container"},[require$$0$1.createVNode(c,{modelValue:m.activeTabName,"onUpdate:modelValue":d[0]||(d[0]=u=>m.activeTabName=u),type:e.widget.displayType,ref:e.widget.id,class:require$$0$1.normalizeClass([n.customClass])},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(g.visibleTabs,(u,r)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:r,label:u.options.label,disabled:u.options.disabled,name:u.options.name},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(u.widgetList,(t,l)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[t.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(n.getComponentByContainer(t)),{widget:t,key:l,"parent-list":u.widgetList,"index-of-parent-list":l,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),o=>({name:o,fn:require$$0$1.withCtx(s=>[require$$0$1.renderSlot(n.$slots,o,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(s)))])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(t.type+"-widget"),{field:t,key:l,"parent-list":u.widgetList,"index-of-parent-list":l,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),o=>({name:o,fn:require$$0$1.withCtx(s=>[require$$0$1.renderSlot(n.$slots,o,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(s)))])}))]),1032,["field","parent-list","index-of-parent-list","parent-widget"]))],64))),256))]),_:2},1032,["label","disabled","name"]))),128))]),_:3},8,["modelValue","type","class"])])),[[require$$0$1.vShow,!e.widget.options.hidden]])]),_:3},8,["widget"])}var tabItem=_export_sfc$1(_sfc_main$2F,[["render",_sfc_render$2F]]),__glob_0_4$2=Object.freeze(Object.defineProperty({__proto__:null,default:tabItem},Symbol.toStringTag,{value:"Module"})),tableCellItem_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2E={name:"TableCellItem",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin],components:xe({},comps$1),props:{widget:Object,rowIndex:Number,colIndex:Number},inject:["refList","globalModel"],computed:{customClass(){return this.widget.options.customClass||""}},created(){},methods:{}},_hoisted_1$t=["colspan","rowspan"];function _sfc_render$2E(n,d,e,p,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("td",{class:require$$0$1.normalizeClass(["table-cell",[g.customClass]]),colspan:e.widget.options.colspan||1,rowspan:e.widget.options.rowspan||1,style:require$$0$1.normalizeStyle({width:e.widget.options.cellWidth+" !important"||"",height:e.widget.options.cellHeight+" !important"||"","word-break":e.widget.options.wordBreak?"break-all":"normal"})},[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.widgetList,(a,c)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[a.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(n.getComponentByContainer(a)),{widget:a,key:c,"parent-list":e.widget.widgetList,"index-of-parent-list":c,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),i=>({name:i,fn:require$$0$1.withCtx(u=>[require$$0$1.renderSlot(n.$slots,i,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(u)),void 0,!0)])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(a.type+"-widget"),{field:a,key:c,"parent-list":e.widget.widgetList,"index-of-parent-list":c,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),i=>({name:i,fn:require$$0$1.withCtx(u=>[require$$0$1.renderSlot(n.$slots,i,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(u)),void 0,!0)])}))]),1032,["field","parent-list","index-of-parent-list","parent-widget"]))],64))),256))],14,_hoisted_1$t)}var TableCellItem=_export_sfc$1(_sfc_main$2E,[["render",_sfc_render$2E],["__scopeId","data-v-df1ad646"]]),__glob_0_5$2=Object.freeze(Object.defineProperty({__proto__:null,default:TableCellItem},Symbol.toStringTag,{value:"Module"})),tableItem_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2D={name:"table-item",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin,containerItemMixin],components:{ContainerItemWrapper,TableCellItem},props:{widget:Object},inject:["refList","sfRefList","globalModel"],created(){this.initRefList()},mounted(){},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2D(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("table-cell-item"),c=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:e.widget.id,class:"table-container"},[require$$0$1.createElementVNode("table",{ref:e.widget.id,class:require$$0$1.normalizeClass(["table-layout",[n.customClass]])},[require$$0$1.createElementVNode("tbody",null,[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.rows,(i,u)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("tr",{key:i.id},[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(i.cols,(r,t)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[r.merged?require$$0$1.createCommentVNode("",!0):(require$$0$1.openBlock(),require$$0$1.createBlock(a,{widget:r,key:t,"parent-list":e.widget.cols,"row-index":u,"col-index":t,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),l=>({name:l,fn:require$$0$1.withCtx(o=>[require$$0$1.renderSlot(n.$slots,l,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(o)),void 0,!0)])}))]),1032,["widget","parent-list","row-index","col-index","parent-widget"]))],64))),256))]))),128))])],2)])),[[require$$0$1.vShow,!e.widget.options.hidden]])]),_:3},8,["widget"])}var tableItem=_export_sfc$1(_sfc_main$2D,[["render",_sfc_render$2D],["__scopeId","data-v-6cba7003"]]),__glob_0_6$1=Object.freeze(Object.defineProperty({__proto__:null,default:tableItem},Symbol.toStringTag,{value:"Module"}));const modules$2={"./container-item-wrapper.vue":__glob_0_0$3,"./grid-col-item.vue":__glob_0_1$2,"./grid-item.vue":__glob_0_2$2,"./sub-form-item.vue":__glob_0_3$2,"./tab-item.vue":__glob_0_4$2,"./table-cell-item.vue":__glob_0_5$2,"./table-item.vue":__glob_0_6$1};var ContainerItems={install(n){for(const d in modules$2){let e=modules$2[d].default.name;n.component(e,modules$2[d].default)}}},index_vue_vue_type_style_index_0_scoped_true_lang$5="";const _sfc_main$2C={name:"VFormRender",componentName:"VFormRender",mixins:[emitter,i18n$1],components:xe({},comps$1),props:{formJson:{type:Object,default:()=>buildDefaultFormJson()},formData:{type:Object,default:()=>({})},optionData:{type:Object,default:()=>({})},previewState:{type:Boolean,default:!1},globalDsv:{type:Object,default:()=>({})}},provide(){return{refList:this.widgetRefList,sfRefList:this.subFormRefList,getFormConfig:()=>this.formJsonObj.formConfig,getGlobalDsv:()=>this.globalDsv,globalOptionData:this.optionData,getOptionData:()=>this.optionData,globalModel:{formModel:this.formDataModel},previewState:this.previewState}},data(){return{formJsonObj:this.formJson,formDataModel:{},widgetRefList:{},subFormRefList:{},formId:null,externalComponents:{}}},computed:{formConfig(){return this.formJsonObj.formConfig},widgetList(){return this.formJsonObj.widgetList},labelPosition(){return!!this.formConfig&&!!this.formConfig.labelPosition?this.formConfig.labelPosition:"left"},labelWidth(){return!!this.formConfig&&!!this.formConfig.labelWidth?this.formConfig.labelWidth+"px":"80px"},size(){return!!this.formConfig&&!!this.formConfig.size?this.formConfig.size:"default"},customClass(){return!!this.formConfig&&!!this.formConfig.customClass?this.formConfig.customClass:""}},watch:{},created(){this.buildFormModel(this.formJsonObj?this.formJsonObj.widgetList:null),this.initFormObject()},mounted(){this.initLocale(),this.handleOnMounted()},methods:{initFormObject(n=!0){this.formId="vfRender"+generateId(),n&&this.insertCustomStyleAndScriptNode(),this.addFieldChangeEventHandler(),this.addFieldValidateEventHandler(),this.registerFormToRefList(),this.handleOnCreated()},getContainerWidgetName(n){return n.type==="grid"?"vf-grid-item":n.type+"-item"},getWidgetName(n){return n.type+"-widget"},initLocale(){let n=localStorage.getItem("v_form_locale")||"zh-CN";this.changeLanguage(n)},insertCustomStyleAndScriptNode(){!!this.formConfig&&!!this.formConfig.cssCode&&insertCustomCssToHead(this.formConfig.cssCode,this.previewState?"":this.formId),!!this.formConfig&&!!this.formConfig.functions&&insertGlobalFunctionsToHtml(this.formConfig.functions,this.previewState?"":this.formId)},buildFormModel(n){!!n&&n.length>0&&n.forEach(d=>{this.buildDataFromWidget(d)})},buildDataFromWidget(n){if(n.category==="container")if(n.type==="grid")!!n.cols&&n.cols.length>0&&n.cols.forEach(d=>{this.buildDataFromWidget(d)});else if(n.type==="table")!!n.rows&&n.rows.length>0&&n.rows.forEach(d=>{!!d.cols&&d.cols.length>0&&d.cols.forEach(e=>{this.buildDataFromWidget(e)})});else if(n.type==="tab")!!n.tabs&&n.tabs.length>0&&n.tabs.forEach(d=>{!!d.widgetList&&d.widgetList.length>0&&d.widgetList.forEach(e=>{this.buildDataFromWidget(e)})});else if(n.type==="sub-form"){let d=n.options.name;if(this.formData.hasOwnProperty(d)){let e=this.formData[d];this.formDataModel[d]=deepClone(e)}else{let e={};n.options.showBlankRow?(n.widgetList.forEach(p=>{p.formItemFlag&&(e[p.options.name]=p.options.defaultValue)}),this.formDataModel[d]=[e]):this.formDataModel[d]=[]}}else n.type==="grid-col"||n.type==="table-cell"?!!n.widgetList&&n.widgetList.length>0&&n.widgetList.forEach(d=>{this.buildDataFromWidget(d)}):!!n.widgetList&&n.widgetList.length>0&&n.widgetList.forEach(d=>{this.buildDataFromWidget(d)});else if(n.formItemFlag)if(!this.formData.hasOwnProperty(n.options.name))this.formDataModel[n.options.name]=n.options.defaultValue;else{let d=this.formData[n.options.name];this.formDataModel[n.options.name]=deepClone(d)}},addFieldChangeEventHandler(){this.off$("fieldChange"),this.on$("fieldChange",(n,d,e,p,m)=>{this.handleFieldDataChange(n,d,e,p,m),this.$emit("formChange",n,d,e,this.formDataModel,p,m)})},addFieldValidateEventHandler(){this.off$("fieldValidation"),this.on$("fieldValidation",n=>{this.$refs.renderForm.validateField(n)})},registerFormToRefList(){this.widgetRefList.v_form_ref=this},handleFieldDataChange(n,d,e,p,m){!!this.formConfig&&!!this.formConfig.onFormDataChange&&new Function("fieldName","newValue","oldValue","formModel","subFormName","subFormRowIndex",this.formConfig.onFormDataChange).call(this,n,d,e,this.formDataModel,p,m)},handleOnCreated(){!!this.formConfig&&!!this.formConfig.onFormCreated&&new Function(this.formConfig.onFormCreated).call(this)},handleOnMounted(){!!this.formConfig&&!!this.formConfig.onFormMounted&&new Function(this.formConfig.onFormMounted).call(this)},findWidgetAndSetDisabled(n,d){let e=this.getWidgetRef(n);e?e.setDisabled(d):this.findWidgetOfSubFormAndSetDisabled(n,d)},findWidgetOfSubFormAndSetDisabled(n,d){this.findWidgetNameInSubForm(n).forEach(e=>{let p=this.getWidgetRef(e);p&&p.setDisabled(d)})},findWidgetAndSetHidden(n,d){let e=this.getWidgetRef(n);e?e.setHidden(d):this.findWidgetOfSubFormAndSetHidden(n,d)},findWidgetOfSubFormAndSetHidden(n,d){this.findWidgetNameInSubForm(n).forEach(e=>{let p=this.getWidgetRef(e);p&&p.setHidden(d)})},findWidgetNameInSubForm(n){let d=[],e=null,p=(m,g)=>{!!m.options&&m.options.name===n&&(e=g.options.name)};if(traverseFieldWidgets(this.widgetList,p),e){let m=this.getWidgetRef(e);if(m){let g=m.getRowIdData();!!g&&g.length>0&&g.forEach(a=>{d.push(n+"@row"+a)})}}return d},changeLanguage(n){changeLocale(n)},getNativeForm(){return this.$refs.renderForm},getFormRef(){return this},getWidgetRef(n,d=!1){let e=this.widgetRefList[n];return!e&&!!d&&this.$message.error(this.i18nt("render.hint.refNotFound")+n),e},clearFormDataModel(){for(let n in this.formDataModel)delete this.formDataModel[n]},setFormJson(n){if(n)if(typeof n=="string"||n.constructor===Object){let d=null;if(typeof n=="string"?d=JSON.parse(n):d=n,!d.formConfig||!d.widgetList){this.$message.error("Invalid format of form json.");return}this.clearFormDataModel(),this.buildFormModel(d.widgetList),this.formJsonObj.formConfig=d.formConfig,this.formJsonObj.widgetList=d.widgetList,this.insertCustomStyleAndScriptNode(),this.$nextTick(()=>{this.initFormObject(!1),this.handleOnMounted()})}else this.$message.error("Set form json failed.")},reloadOptionData(n){let d=[];!!n&&typeof n=="string"?d=[n]:!!n&&Array.isArray(n)&&(d=[...n]),this.broadcast("FieldWidget","reloadOptionItems",d)},getFormData(n=!0){if(!n)return this.formDataModel;let d=function(){},e=new window.Promise(function(p,m){d=function(g,a){a?m(a):p(g)}});return this.$refs.renderForm.validate(p=>{p?d(this.formDataModel):d(this.formDataModel,this.i18nt("render.hint.validationFailed"))}),e},setFormData(n){Object.keys(this.formDataModel).forEach(d=>{!!n&&n.hasOwnProperty(d)&&(this.formDataModel[d]=deepClone(n[d]))}),this.broadcast("ContainerItem","setFormData",this.formDataModel),this.broadcast("FieldWidget","setFormData",this.formDataModel)},getFieldValue(n){let d=this.getWidgetRef(n);if(!!d&&!!d.getValue)return d.getValue();if(!d){let e=[];return this.findWidgetNameInSubForm(n).forEach(p=>{let m=this.getWidgetRef(p);!!m&&!!m.getValue&&e.push(m.getValue())}),e}},setFieldValue(n,d){let e=this.getWidgetRef(n);!!e&&!!e.setValue&&e.setValue(d),e||this.findWidgetNameInSubForm(n).forEach(p=>{let m=this.getWidgetRef(p);!!m&&!!m.setValue&&m.setValue(d)})},getSubFormValues(n,d=!0){return this.subFormRefList[n].getSubFormValues(d)},disableForm(){Object.keys(this.widgetRefList).forEach(d=>{let e=this.getWidgetRef(d);if(e)if(!!e.widget&&e.widget.type==="sub-form")e.disableSubForm();else{//!!foundW.setDisabled && foundW.setDisabled(true) +e.setDisabled&&e.setDisabled(!0)}})},enableForm(){Object.keys(this.widgetRefList).forEach(d=>{let e=this.getWidgetRef(d);if(e)if(!!e.widget&&e.widget.type==="sub-form")e.enableSubForm();else{//!!foundW.setDisabled && foundW.setDisabled(false) +e.setDisabled&&e.setDisabled(!1)}})},resetForm(){Object.keys(this.subFormRefList).forEach(e=>{this.subFormRefList[e].resetSubForm&&this.subFormRefList[e].resetSubForm()}),Object.keys(this.widgetRefList).forEach(e=>{let p=this.getWidgetRef(e);!!p&&!p.subFormItemFlag&&!!p.resetField&&p.resetField()}),this.$nextTick(()=>{this.clearValidate()})},clearValidate(n){this.$refs.renderForm.clearValidate(n)},validateForm(n){this.$refs.renderForm.validate(d=>{n(d)})},validateFields(){},disableWidgets(n){n&&(typeof n=="string"?this.findWidgetAndSetDisabled(n,!0):Array.isArray(n)&&n.forEach(d=>{this.findWidgetAndSetDisabled(d,!0)}))},enableWidgets(n){n&&(typeof n=="string"?this.findWidgetAndSetDisabled(n,!1):Array.isArray(n)&&n.forEach(d=>{this.findWidgetAndSetDisabled(d,!1)}))},hideWidgets(n){n&&(typeof n=="string"?this.findWidgetAndSetHidden(n,!0):Array.isArray(n)&&n.forEach(d=>{this.findWidgetAndSetHidden(d,!0)}))},showWidgets(n){n&&(typeof n=="string"?this.findWidgetAndSetHidden(n,!1):Array.isArray(n)&&n.forEach(d=>{this.findWidgetAndSetHidden(d,!1)}))},getFieldWidgets(){return getAllFieldWidgets(this.formJsonObj.widgetList)},getContainerWidgets(){return getAllContainerWidgets(this.formJsonObj.widgetList)},addEC(n,d){this.externalComponents[n]=d},hasEC(n){return this.externalComponents.hasOwnProperty(n)},getEC(n){return this.externalComponents[n]},getGlobalDsv(){return this.globalDsv}}};function _sfc_render$2C(n,d,e,p,m,g){const a=require$$0$1.resolveComponent("el-form");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{"label-position":g.labelPosition,size:g.size,class:require$$0$1.normalizeClass([[g.customClass],"render-form"]),"label-width":g.labelWidth,"validate-on-rule-change":!1,model:m.formDataModel,ref:"renderForm",onSubmit:d[0]||(d[0]=require$$0$1.withModifiers(()=>{},["prevent"]))},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(g.widgetList,(c,i)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[c.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(g.getContainerWidgetName(c)),{widget:c,key:c.id,"parent-list":g.widgetList,"index-of-parent-list":i,"parent-widget":null},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),u=>({name:u,fn:require$$0$1.withCtx(r=>[require$$0$1.renderSlot(n.$slots,u,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(r)),void 0,!0)])}))]),1032,["widget","parent-list","index-of-parent-list"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(g.getWidgetName(c)),{field:c,"form-model":m.formDataModel,designer:null,key:c.id,"parent-list":g.widgetList,"index-of-parent-list":i,"parent-widget":null},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),u=>({name:u,fn:require$$0$1.withCtx(r=>[require$$0$1.renderSlot(n.$slots,u,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(r)),void 0,!0)])}))]),1032,["field","form-model","parent-list","index-of-parent-list"]))],64))),256))]),_:3},8,["label-position","size","class","label-width","model"])}var VFormRender=_export_sfc$1(_sfc_main$2C,[["render",_sfc_render$2C],["__scopeId","data-v-5ad82756"]]),ace$2={exports:{}};(function(n,d){(function(){var e="ace",p=function(){return this}();!p&&typeof window!="undefined"&&(p=window);var m=function(r,t,l){if(typeof r!="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=t),m.modules[r]||(m.payloads[r]=l,m.modules[r]=null)};m.modules={},m.payloads={};var g=function(r,t,l){if(typeof t=="string"){var o=i(r,t);if(o!=null)return l&&l(),o}else if(Object.prototype.toString.call(t)==="[object Array]"){for(var s=[],f=0,h=t.length;fi.length)&&(c=i.length),c-=a.length;var u=i.indexOf(a,c);return u!==-1&&u===c}),String.prototype.repeat||g(String.prototype,"repeat",function(a){for(var c="",i=this;a>0;)a&1&&(c+=i),(a>>=1)&&(i+=i);return c}),String.prototype.includes||g(String.prototype,"includes",function(a,c){return this.indexOf(a,c)!=-1}),Object.assign||(Object.assign=function(a){if(a==null)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),i=1;i>>0,u=arguments[1],r=u>>0,t=r<0?Math.max(i+r,0):Math.min(r,i),l=arguments[2],o=l===void 0?i:l>>0,s=o<0?Math.max(i+o,0):Math.min(o,i);t0;)i&1&&(u+=c),(i>>=1)&&(c+=c);return u};var g=/^\s\s*/,a=/\s\s*$/;p.stringTrimLeft=function(c){return c.replace(g,"")},p.stringTrimRight=function(c){return c.replace(a,"")},p.copyObject=function(c){var i={};for(var u in c)i[u]=c[u];return i},p.copyArray=function(c){for(var i=[],u=0,r=c.length;u=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]),p.isOldIE=p.isIE&&p.isIE<9,p.isGecko=p.isMozilla=c.match(/ Gecko\/\d+/),p.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",p.isWebKit=parseFloat(c.split("WebKit/")[1])||void 0,p.isChrome=parseFloat(c.split(" Chrome/")[1])||void 0,p.isEdge=parseFloat(c.split(" Edge/")[1])||void 0,p.isAIR=c.indexOf("AdobeAIR")>=0,p.isAndroid=c.indexOf("Android")>=0,p.isChromeOS=c.indexOf(" CrOS ")>=0,p.isIOS=/iPad|iPhone|iPod/.test(c)&&!window.MSStream,p.isIOS&&(p.isMac=!0),p.isMobile=p.isIOS||p.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,p,m){var g=e("./useragent"),a="http://www.w3.org/1999/xhtml";p.buildDom=function l(o,s,f){if(typeof o=="string"&&o){var h=document.createTextNode(o);return s&&s.appendChild(h),h}if(!Array.isArray(o))return o&&o.appendChild&&s&&s.appendChild(o),o;if(typeof o[0]!="string"||!o[0]){for(var v=[],$=0;$=1.5:!0,g.isChromeOS&&(p.HI_DPI=!1),typeof document!="undefined"){var t=document.createElement("div");p.HI_DPI&&t.style.transform!==void 0&&(p.HAS_CSS_TRANSFORMS=!0),!g.isEdge&&typeof t.style.animationName!="undefined"&&(p.HAS_CSS_ANIMATION=!0),t=null}p.HAS_CSS_TRANSFORMS?p.translate=function(l,o,s){l.style.transform="translate("+Math.round(o)+"px, "+Math.round(s)+"px)"}:p.translate=function(l,o,s){l.style.top=Math.round(s)+"px",l.style.left=Math.round(o)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,p,m){/* +* based on code from: +* +* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. +* Available via the MIT or new BSD license. +* see: http://github.com/jrburke/requirejs for details +*/var g=e("./dom");p.get=function(a,c){var i=new XMLHttpRequest;i.open("GET",a,!0),i.onreadystatechange=function(){i.readyState===4&&c(i.responseText)},i.send(null)},p.loadScript=function(a,c){var i=g.getDocumentHead(),u=document.createElement("script");u.src=a,i.appendChild(u),u.onload=u.onreadystatechange=function(r,t){(t||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,t||c())}},p.qualifyURL=function(a){var c=document.createElement("a");return c.href=a,c.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,p,m){p.inherits=function(g,a){g.super_=a,g.prototype=Object.create(a.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})},p.mixin=function(g,a){for(var c in a)g[c]=a[c];return g},p.implement=function(g,a){p.mixin(g,a)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,p,m){var g={},a=function(){this.propagationStopped=!0},c=function(){this.defaultPrevented=!0};g._emit=g._dispatchEvent=function(i,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[i]||[],t=this._defaultHandlers[i];if(!(!r.length&&!t)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=i),u.stopPropagation||(u.stopPropagation=a),u.preventDefault||(u.preventDefault=c),r=r.slice();for(var l=0;l1&&(h=s[s.length-2]);var $=u[o+"Path"];return $==null?$=u.basePath:f=="/"&&(o=f=""),$&&$.slice(-1)!="/"&&($+="/"),$+o+f+h+this.get("suffix")},p.setModuleUrl=function(l,o){return u.$moduleUrls[l]=o};var r=function(l,o){return l==="ace/theme/textmate"||l==="./theme/textmate"?o(null,e("./theme/textmate")):console.error("loader is not configured")};p.setLoader=function(l){r=l},p.dynamicModules=Object.create(null),p.$loading={},p.loadModule=function(l,o){var s,f;Array.isArray(l)&&(f=l[0],l=l[1]);var h=function(v){if(v&&!p.$loading[l])return o&&o(v);if(p.$loading[l]||(p.$loading[l]=[]),p.$loading[l].push(o),!(p.$loading[l].length>1)){var $=function(){r(l,function(C,b){p._emit("load.module",{name:l,module:b});var y=p.$loading[l];p.$loading[l]=null,y.forEach(function(_){_&&_(b)})})};if(!p.get("packaged"))return $();a.loadScript(p.moduleUrl(l,f),$),t()}};if(p.dynamicModules[l])p.dynamicModules[l]().then(function(v){v.default?h(v.default):h(v)});else{try{s=e(l)}catch{}h(s)}},p.setModuleLoader=function(l,o){p.dynamicModules[l]=o};var t=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$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"),t=function(){})};p.version="1.22.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,p,m){e("./lib/fixoldbrowsers");var g=e("./config");g.setLoader(function(u,r){e([u],function(t){r(null,t)})});var a=function(){return this||typeof window!="undefined"&&window}();m.exports=function(u){g.init=c,u.require=e},c(!0);function c(u){if(!(!a||!a.document)){g.set("packaged",u||e.packaged||m.packaged||a.define&&(void 0).packaged);var r={},t="",l=document.currentScript||document._currentScript,o=l&&l.ownerDocument||document;l&&l.src&&(t=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=o.getElementsByTagName("script"),f=0;f ["+this.end.row+"/"+this.end.column+"]"},c.prototype.contains=function(i,u){return this.compare(i,u)==0},c.prototype.compareRange=function(i){var u,r=i.end,t=i.start;return u=this.compare(r.row,r.column),u==1?(u=this.compare(t.row,t.column),u==1?2:u==0?1:0):u==-1?-2:(u=this.compare(t.row,t.column),u==-1?-1:u==1?42:0)},c.prototype.comparePoint=function(i){return this.compare(i.row,i.column)},c.prototype.containsRange=function(i){return this.comparePoint(i.start)==0&&this.comparePoint(i.end)==0},c.prototype.intersects=function(i){var u=this.compareRange(i);return u==-1||u==0||u==1},c.prototype.isEnd=function(i,u){return this.end.row==i&&this.end.column==u},c.prototype.isStart=function(i,u){return this.start.row==i&&this.start.column==u},c.prototype.setStart=function(i,u){typeof i=="object"?(this.start.column=i.column,this.start.row=i.row):(this.start.row=i,this.start.column=u)},c.prototype.setEnd=function(i,u){typeof i=="object"?(this.end.column=i.column,this.end.row=i.row):(this.end.row=i,this.end.column=u)},c.prototype.inside=function(i,u){return this.compare(i,u)==0?!(this.isEnd(i,u)||this.isStart(i,u)):!1},c.prototype.insideStart=function(i,u){return this.compare(i,u)==0?!this.isEnd(i,u):!1},c.prototype.insideEnd=function(i,u){return this.compare(i,u)==0?!this.isStart(i,u):!1},c.prototype.compare=function(i,u){return!this.isMultiLine()&&i===this.start.row?uthis.end.column?1:0:ithis.end.row?1:this.start.row===i?u>=this.start.column?0:-1:this.end.row===i?u<=this.end.column?0:1:0},c.prototype.compareStart=function(i,u){return this.start.row==i&&this.start.column==u?-1:this.compare(i,u)},c.prototype.compareEnd=function(i,u){return this.end.row==i&&this.end.column==u?1:this.compare(i,u)},c.prototype.compareInside=function(i,u){return this.end.row==i&&this.end.column==u?1:this.start.row==i&&this.start.column==u?-1:this.compare(i,u)},c.prototype.clipRows=function(i,u){if(this.end.row>u)var r={row:u+1,column:0};else if(this.end.rowu)var t={row:u+1,column:0};else if(this.start.row1?(O++,O>4&&(O=1)):O=1,a.isIE){var q=Math.abs(S.clientX-T)>5||Math.abs(S.clientY-x)>5;(!w||q)&&(O=1),w&&clearTimeout(w),w=setTimeout(function(){w=null},b[O-1]||600),O==1&&(T=S.clientX,x=S.clientY)}if(S._clicks=O,y[_]("mousedown",S),O>4)O=0;else if(O>1)return y[_](M[O],S)}Array.isArray(C)||(C=[C]),C.forEach(function(S){o(S,"mousedown",k,E)})};var f=function(C){return 0|(C.ctrlKey?1:0)|(C.altKey?2:0)|(C.shiftKey?4:0)|(C.metaKey?8:0)};p.getModifierString=function(C){return g.KEY_MODS[f(C)]};function h(C,b,y){var _=f(b);if(!a.isMac&&c){if(b.getModifierState&&(b.getModifierState("OS")||b.getModifierState("Win"))&&(_|=8),c.altGr)if((3&_)!=3)c.altGr=0;else return;if(y===18||y===17){var E="location"in b?b.location:b.keyLocation;if(y===17&&E===1)c[y]==1&&(i=b.timeStamp);else if(y===18&&_===3&&E===2){var O=b.timeStamp-i;O<50&&(c.altGr=!0)}}}if(y in g.MODIFIER_KEYS&&(y=-1),!_&&y===13){var E="location"in b?b.location:b.keyLocation;if(E===3&&(C(b,_,-y),b.defaultPrevented))return}if(a.isChromeOS&&_&8){if(C(b,_,y),b.defaultPrevented)return;_&=~8}return!_&&!(y in g.FUNCTION_KEYS)&&!(y in g.PRINTABLE_KEYS)?!1:C(b,_,y)}p.addCommandKeyListener=function(C,b,y){if(a.isOldGecko||a.isOpera&&!("KeyboardEvent"in window)){var _=null;o(C,"keydown",function(O){_=O.keyCode},y),o(C,"keypress",function(O){return h(b,O,_)},y)}else{var E=null;o(C,"keydown",function(O){c[O.keyCode]=(c[O.keyCode]||0)+1;var T=h(b,O,O.keyCode);return E=O.defaultPrevented,T},y),o(C,"keypress",function(O){E&&(O.ctrlKey||O.altKey||O.shiftKey||O.metaKey)&&(p.stopEvent(O),E=null)},y),o(C,"keyup",function(O){c[O.keyCode]=null},y),c||(v(),o(window,"focus",v))}};function v(){c=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!a.isOldIE){var $=1;p.nextTick=function(C,b){b=b||window;var y="zero-timeout-message-"+$++,_=function(E){E.data==y&&(p.stopPropagation(E),s(b,"message",_),C())};o(b,"message",_),b.postMessage(y,"*")}}p.$idleBlocked=!1,p.onIdle=function(C,b){return setTimeout(function y(){p.$idleBlocked?setTimeout(y,100):C()},b)},p.$idleBlockId=null,p.blockIdle=function(C){p.$idleBlockId&&clearTimeout(p.$idleBlockId),p.$idleBlocked=!0,p.$idleBlockId=setTimeout(function(){p.$idleBlocked=!1},C||100)},p.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),p.nextFrame?p.nextFrame=p.nextFrame.bind(window):p.nextFrame=function(C){setTimeout(C,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,p,m){var g;m.exports={lineMode:!1,pasteCancelled:function(){return g&&g>Date.now()-50?!0:g=!1},cancel:function(){g=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(e,p,m){var g=e("../lib/event"),a=e("../config").nls,c=e("../lib/useragent"),i=e("../lib/dom"),u=e("../lib/lang"),r=e("../clipboard"),t=c.isChrome<18,l=c.isIE,o=c.isChrome>63,s=400,f=e("../lib/keys"),h=f.KEY_MODS,v=c.isIOS,$=v?/\s/:/\n/,C=c.isMobile,b=function(y,_){var E=i.createElement("textarea");E.className="ace_text-input",E.setAttribute("wrap","off"),E.setAttribute("autocorrect","off"),E.setAttribute("autocapitalize","off"),E.setAttribute("spellcheck",!1),E.style.opacity="0",y.insertBefore(E,y.firstChild);var O=!1,T=!1,x=!1,w=!1,M="";C||(E.style.fontSize="1px");var k=!1,S=!1,q="",L=0,A=0,D=0;try{var N=document.activeElement===E}catch{}this.setAriaOptions=function(J){J.activeDescendant?(E.setAttribute("aria-haspopup","true"),E.setAttribute("aria-autocomplete",J.inline?"both":"list"),E.setAttribute("aria-activedescendant",J.activeDescendant)):(E.setAttribute("aria-haspopup","false"),E.setAttribute("aria-autocomplete","both"),E.removeAttribute("aria-activedescendant")),J.role&&E.setAttribute("role",J.role)},this.setAriaLabel=function(){if(_.session&&_.renderer.enableKeyboardAccessibility){var J=_.session.selection.cursor.row;E.setAttribute("aria-roledescription",a("editor")),E.setAttribute("aria-label",a("Cursor at row $0",[J+1]))}else E.removeAttribute("aria-roledescription"),E.removeAttribute("aria-label")},this.setAriaOptions({role:"textbox"}),this.setAriaLabel(),g.addListener(E,"blur",function(J){S||(_.onBlur(J),N=!1,C&&!v&&document.removeEventListener("selectionchange",F))},_),g.addListener(E,"focus",function(J){if(!S){if(N=!0,c.isEdge)try{if(!document.hasFocus())return}catch{}_.onFocus(J),c.isEdge?setTimeout(B):B(),C&&!v&&document.addEventListener("selectionchange",F)}},_),this.$focusScroll=!1,this.focus=function(){if(this.setAriaLabel(),M||o||this.$focusScroll=="browser")return E.focus({preventScroll:!0});var J=E.style.top;E.style.position="fixed",E.style.top="0px";try{var te=E.getBoundingClientRect().top!=0}catch{return}var ie=[];if(te)for(var pe=E.parentElement;pe&&pe.nodeType==1;)ie.push(pe),pe.setAttribute("ace_nocontext",!0),!pe.parentElement&&pe.getRootNode?pe=pe.getRootNode().host:pe=pe.parentElement;E.focus({preventScroll:!0}),te&&ie.forEach(function($e){$e.removeAttribute("ace_nocontext")}),setTimeout(function(){E.style.position="",E.style.top=="0px"&&(E.style.top=J)},0)},this.blur=function(){E.blur()},this.isFocused=function(){return N},_.on("beforeEndOperation",function(){var J=_.curOp,te=J&&J.command&&J.command.name;if(te!="insertstring"){var ie=te&&(J.docChanged||J.selectionChanged);x&&ie&&(q=E.value="",de()),B()}});var B=v?function(J){if(!(!N||O&&!J||w)){J||(J="");var te=` + ab`+J+`cde fg +`;te!=E.value&&(E.value=q=te);var ie=4,pe=4+(J.length||(_.selection.isEmpty()?0:1));(L!=ie||A!=pe)&&E.setSelectionRange(ie,pe),L=ie,A=pe}}:function(){if(!(x||w)&&!(!N&&!j)){x=!0;var J=0,te=0,ie="";if(_.session){var pe=_.selection,$e=pe.getRange(),fe=pe.cursor.row;if(J=$e.start.column,te=$e.end.column,ie=_.session.getLine(fe),$e.start.row!=fe){var K=_.session.getLine(fe-1);J=$e.start.rowfe+1?U.length:te,te+=ie.length+1,ie=ie+` +`+U}else C&&fe>0&&(ie=` +`+ie,te+=1,J+=1);ie.length>s&&(J=q.length&&J.value===q&&q&&J.selectionEnd!==A},V=function(J){x||(O?O=!1:R(E)?(_.selectAll(),B()):C&&E.selectionStart!=L&&B())};function F(J){if((!E||!E.parentNode)&&document.removeEventListener("selectionchange",F),!x&&E.selectionStart===E.selectionEnd){var te=E.selectionStart-L,ie=A-L;te>0?te=Math.max(te-ie,1):te===0&&ie&&(te=-1);for(var pe=Math.abs(te),$e=te>0?f.right:f.left,fe=0;fe0&&q[ee]==J[ee];)ee++,$e--;for(K=K.slice(ee),ee=1;fe>0&&q.length-ee>L-1&&q[q.length-ee]==J[J.length-ee];)ee++,fe--;U-=ee-1,Y-=ee-1;var ue=K.length-ee+1;if(ue<0&&($e=-ue,ue=0),K=K.slice(0,ue),!te&&!K&&!U&&!$e&&!fe&&!Y)return"";w=!0;var he=!1;return c.isAndroid&&K==". "&&(K=" ",he=!0),K&&!$e&&!fe&&!U&&!Y||k?_.onTextInput(K):_.onTextInput(K,{extendLeft:$e,extendRight:fe,restoreStart:U,restoreEnd:Y}),w=!1,q=J,L=ie,A=pe,D=Y,he?` +`:K},W=function(J){if(x)return ae();if(J&&J.inputType){if(J.inputType=="historyUndo")return _.execCommand("undo");if(J.inputType=="historyRedo")return _.execCommand("redo")}var te=E.value,ie=I(te,!0);(te.length>s+100||$.test(ie)||C&&L<1&&L==A)&&B()},H=function(J,te,ie){var pe=J.clipboardData||window.clipboardData;if(!(!pe||t)){var $e=l||ie?"Text":"text/plain";try{return te?pe.setData($e,te)!==!1:pe.getData($e)}catch(fe){if(!ie)return H(fe,te,!0)}}},z=function(J,te){var ie=_.getCopyText();if(!ie)return g.preventDefault(J);H(J,ie)?(v&&(B(ie),O=ie,setTimeout(function(){O=!1},10)),te?_.onCut():_.onCopy(),g.preventDefault(J)):(O=!0,E.value=ie,E.select(),setTimeout(function(){O=!1,B(),te?_.onCut():_.onCopy()}))},G=function(J){z(J,!0)},Z=function(J){z(J,!1)},oe=function(J){var te=H(J);r.pasteCancelled()||(typeof te=="string"?(te&&_.onPaste(te,J),c.isIE&&setTimeout(B),g.preventDefault(J)):(E.value="",T=!0))};g.addCommandKeyListener(E,_.onCommandKey.bind(_),_),g.addListener(E,"select",V,_),g.addListener(E,"input",W,_),g.addListener(E,"cut",G,_),g.addListener(E,"copy",Z,_),g.addListener(E,"paste",oe,_),(!("oncut"in E)||!("oncopy"in E)||!("onpaste"in E))&&g.addListener(y,"keydown",function(J){if(!(c.isMac&&!J.metaKey||!J.ctrlKey))switch(J.keyCode){case 67:Z(J);break;case 86:oe(J);break;case 88:G(J);break}},_);var se=function(J){if(!(x||!_.onCompositionStart||_.$readOnly)&&(x={},!k)){J.data&&(x.useTextareaForIME=!1),setTimeout(ae,0),_._signal("compositionStart"),_.on("mousedown",be);var te=_.getSelectionRange();te.end.row=te.start.row,te.end.column=te.start.column,x.markerRange=te,x.selectionStart=L,_.onCompositionStart(x),x.useTextareaForIME?(q=E.value="",L=0,A=0):(E.msGetInputContext&&(x.context=E.msGetInputContext()),E.getInputContext&&(x.context=E.getInputContext()))}},ae=function(){if(!(!x||!_.onCompositionUpdate||_.$readOnly)){if(k)return be();if(x.useTextareaForIME)_.onCompositionUpdate(E.value);else{var J=E.value;I(J),x.markerRange&&(x.context&&(x.markerRange.start.column=x.selectionStart=x.context.compositionStartOffset),x.markerRange.end.column=x.markerRange.start.column+A-x.selectionStart+D)}}},de=function(J){!_.onCompositionEnd||_.$readOnly||(x=!1,_.onCompositionEnd(),_.off("mousedown",be),J&&W())};function be(){S=!0,E.blur(),E.focus(),S=!1}var ye=u.delayedCall(ae,50).schedule.bind(null,null);function X(J){J.keyCode==27&&E.value.lengthA&&q[Y]==` +`?ee=f.end:UA&&q.slice(0,Y).split(` +`).length>2?ee=f.down:Y>A&&q[Y-1]==" "?(ee=f.right,ue=h.option):(Y>A||Y==A&&A!=L&&U==Y)&&(ee=f.right),U!==Y&&(ue|=h.shift),ee){var he=te.onCommandKey({},ue,ee);if(!he&&te.commands){ee=f.keyCodeToString(ee);var ve=te.commands.findKeyCommand(ue,ee);ve&&te.execCommand(ve)}L=U,A=Y,B("")}}};document.addEventListener("selectionchange",fe),te.on("destroy",function(){document.removeEventListener("selectionchange",fe)})}this.destroy=function(){E.parentElement&&E.parentElement.removeChild(E)}};p.TextInput=b,p.$setUserAgentForTests=function(y,_){C=y,v=_}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,p,m){var g=e("../lib/useragent"),a=0,c=550,i=function(){function t(l){l.$clickSelection=null;var o=l.editor;o.setDefaultHandler("mousedown",this.onMouseDown.bind(l)),o.setDefaultHandler("dblclick",this.onDoubleClick.bind(l)),o.setDefaultHandler("tripleclick",this.onTripleClick.bind(l)),o.setDefaultHandler("quadclick",this.onQuadClick.bind(l)),o.setDefaultHandler("mousewheel",this.onMouseWheel.bind(l));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(f){l[f]=this[f]},this),l.selectByLines=this.extendSelectionBy.bind(l,"getLineRange"),l.selectByWords=this.extendSelectionBy.bind(l,"getWordRange")}return t.prototype.onMouseDown=function(l){var o=l.inSelection(),s=l.getDocumentPosition();this.mousedownEvent=l;var f=this.editor,h=l.getButton();if(h!==0){var v=f.getSelectionRange(),$=v.isEmpty();($||h==1)&&f.selection.moveToPosition(s),h==2&&(f.textInput.onContextMenu(l.domEvent),g.isMozilla||l.preventDefault());return}if(this.mousedownEvent.time=Date.now(),o&&!f.isFocused()&&(f.focus(),this.$focusTimeout&&!this.$clickSelection&&!f.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(l);return}return this.captureMouse(l),this.startSelect(s,l.domEvent._clicks>1),l.preventDefault()},t.prototype.startSelect=function(l,o){l=l||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(l):o||s.selection.moveToPosition(l),o||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},t.prototype.select=function(){var l,o=this.editor,s=o.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(s);if(f==-1)l=this.$clickSelection.end;else if(f==1)l=this.$clickSelection.start;else{var h=r(this.$clickSelection,s);s=h.cursor,l=h.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(s),o.renderer.scrollCursorIntoView()},t.prototype.extendSelectionBy=function(l){var o,s=this.editor,f=s.renderer.screenToTextCoordinates(this.x,this.y),h=s.selection[l](f.row,f.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(h.start),$=this.$clickSelection.comparePoint(h.end);if(v==-1&&$<=0)o=this.$clickSelection.end,(h.end.row!=f.row||h.end.column!=f.column)&&(f=h.start);else if($==1&&v>=0)o=this.$clickSelection.start,(h.start.row!=f.row||h.start.column!=f.column)&&(f=h.end);else if(v==-1&&$==1)f=h.end,o=h.start;else{var C=r(this.$clickSelection,f);f=C.cursor,o=C.anchor}s.selection.setSelectionAnchor(o.row,o.column)}s.selection.selectToPosition(f),s.renderer.scrollCursorIntoView()},t.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},t.prototype.focusWait=function(){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),o=Date.now();(l>a||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},t.prototype.onDoubleClick=function(l){var o=l.getDocumentPosition(),s=this.editor,f=s.session,h=f.getBracketRange(o);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=s.selection.getWordRange(o.row,o.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},t.prototype.onTripleClick=function(l){var o=l.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var f=s.getSelectionRange();f.isMultiLine()&&f.contains(o.row,o.column)?(this.$clickSelection=s.selection.getLineRange(f.start.row),this.$clickSelection.end=s.selection.getLineRange(f.end.row).end):this.$clickSelection=s.selection.getLineRange(o.row),this.select()},t.prototype.onQuadClick=function(l){var o=this.editor;o.selectAll(),this.$clickSelection=o.getSelectionRange(),this.setState("selectAll")},t.prototype.onMouseWheel=function(l){if(!l.getAccelKey()){l.getShiftKey()&&l.wheelY&&!l.wheelX&&(l.wheelX=l.wheelY,l.wheelY=0);var o=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,f=l.domEvent.timeStamp,h=f-s.t,v=h?l.wheelX/h:s.vx,$=h?l.wheelY/h:s.vy;h=1&&o.renderer.isScrollableBy(l.wheelX*l.speed,0)&&(b=!0),C<=1&&o.renderer.isScrollableBy(0,l.wheelY*l.speed)&&(b=!0),b)s.allowed=f;else if(f-s.allowed=s.length&&(s=void 0),{value:s&&s[v++],done:!s}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},c=e("./lib/dom"),i=e("./range").Range,u="ace_tooltip",r=function(){function s(f){this.isOpen=!1,this.$element=null,this.$parentNode=f}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(f){this.getElement().textContent=f},s.prototype.setHtml=function(f){this.getElement().innerHTML=f},s.prototype.setPosition=function(f,h){this.getElement().style.left=f+"px",this.getElement().style.top=h+"px"},s.prototype.setClassName=function(f){c.addCssClass(this.getElement(),f)},s.prototype.setTheme=function(f){this.$element.className=u+" "+(f.isDark?"ace_dark ":"")+(f.cssClass||"")},s.prototype.show=function(f,h,v){f!=null&&this.setText(f),h!=null&&v!=null&&this.setPosition(h,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(){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}(),t=function(){function s(){this.popups=[]}return s.prototype.addPopup=function(f){this.popups.push(f),this.updatePopups()},s.prototype.removePopup=function(f){var h=this.popups.indexOf(f);h!==-1&&(this.popups.splice(h,1),this.updatePopups())},s.prototype.updatePopups=function(){var f,h,v,$;this.popups.sort(function(w,M){return M.priority-w.priority});var C=[];try{for(var b=a(this.popups),y=b.next();!y.done;y=b.next()){var _=y.value,E=!0;try{for(var O=(v=void 0,a(C)),T=O.next();!T.done;T=O.next()){var x=T.value;if(this.doPopupsOverlap(x,_)){E=!1;break}}}catch(w){v={error:w}}finally{try{T&&!T.done&&($=O.return)&&$.call(O)}finally{if(v)throw v.error}}E?C.push(_):_.hide()}}catch(w){f={error:w}}finally{try{y&&!y.done&&(h=b.return)&&h.call(b)}finally{if(f)throw f.error}}},s.prototype.doPopupsOverlap=function(f,h){var v=f.getElement().getBoundingClientRect(),$=h.getElement().getBoundingClientRect();return v.left<$.right&&v.right>$.left&&v.top<$.bottom&&v.bottom>$.top},s}(),l=new t;p.popupManager=l,p.Tooltip=r;var o=function(s){g(f,s);function f(h){h===void 0&&(h=document.body);var v=s.call(this,h)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var $=v.getElement();return $.style.whiteSpace="pre-wrap",$.style.pointerEvents="auto",$.addEventListener("mouseout",v.onMouseOut),$.tabIndex=-1,$.addEventListener("blur",function(){$.contains(document.activeElement)||this.hide()}.bind(v)),v}return f.prototype.addToEditor=function(h){h.on("mousemove",this.onMouseMove),h.on("mousedown",this.hide),h.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},f.prototype.removeFromEditor=function(h){h.off("mousemove",this.onMouseMove),h.off("mousedown",this.hide),h.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},f.prototype.onMouseMove=function(h,v){this.lastEvent=h,this.lastT=Date.now();var $=v.$mouseHandler.isMousePressed;if(this.isOpen){var C=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(C.row,C.column)||$||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||$||(this.lastEvent=h,this.timeout=setTimeout(this.waitForHover,this.idleTime))},f.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var h=Date.now()-this.lastT;if(this.idleTime-h>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-h);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},f.prototype.isOutsideOfText=function(h){var v=h.editor,$=h.getDocumentPosition(),C=v.session.getLine($.row);if($.column==C.length){var b=v.renderer.pixelToScreenCoordinates(h.clientX,h.clientY),y=v.session.documentToScreenPosition($.row,$.column);if(y.column!=b.column||y.row!=b.row)return!0}return!1},f.prototype.setDataProvider=function(h){this.$gatherData=h},f.prototype.showForRange=function(h,v,$,C){if(!(C&&C!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=h.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(v,h.session),this.range=i.fromPoints(v.start,v.end);var y=this.getElement();y.innerHTML="",y.appendChild($),y.style.display="block";var _=b.textToScreenCoordinates(v.start.row,v.start.column),E=h.getCursorPosition(),O=y.clientHeight,T=b.scroller.getBoundingClientRect(),x=!0;this.row>E.row?x=!0:this.rowT.bottom&&(x=!1),x?_.pageY+=b.lineHeight:_.pageY-=O,y.style.maxWidth=T.width-(_.pageX-T.left)+"px",this.setPosition(_.pageX,_.pageY)}},f.prototype.addMarker=function(h,v){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=v,this.marker=v&&v.addMarker(h,"ace_highlight-marker","text")},f.prototype.hide=function(h){!h&&document.activeElement==this.getElement()||h&&h.target&&(h.type!="keydown"||h.ctrlKey||h.metaKey)&&this.$element.contains(h.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,l.removePopup(this)))},f.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},f.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},f.prototype.onMouseOut=function(h){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,!!this.isOpen&&(!h.relatedTarget||h.relatedTarget==this.getElement()||h&&h.currentTarget.contains(h.relatedTarget)||h.relatedTarget.classList.contains("ace_content")||this.hide())},f}(r);p.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,p,m){var g=this&&this.__extends||function(){var o=function(s,f){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,v){h.__proto__=v}||function(h,v){for(var $ in v)Object.prototype.hasOwnProperty.call(v,$)&&(h[$]=v[$])},o(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");o(s,f);function h(){this.constructor=s}s.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}}(),a=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,f=s&&o[s],h=0;if(f)return f.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&h>=o.length&&(o=void 0),{value:o&&o[h++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},c=e("../lib/dom"),i=e("../lib/event"),u=e("../tooltip").Tooltip,r=e("../config").nls;function t(o){var s=o.editor,f=s.renderer.$gutterLayer,h=new l(s);o.editor.setDefaultHandler("guttermousedown",function(_){if(!(!s.isFocused()||_.getButton()!=0)){var E=f.getRegion(_);if(E!="foldWidgets"){var O=_.getDocumentPosition().row,T=s.session.selection;if(_.getShiftKey())T.selectTo(O,0);else{if(_.domEvent.detail==2)return s.selectAll(),_.preventDefault();o.$clickSelection=s.selection.getLineRange(O)}return o.setState("selectByLines"),o.captureMouse(_),_.preventDefault()}}});var v,$;function C(){var _=$.getDocumentPosition().row,E=s.session.getLength();if(_==E){var O=s.renderer.pixelToScreenCoordinates(0,$.y).row,T=$.$pos;if(O>s.session.documentToScreenRow(T.row,T.column))return b()}if(h.showTooltip(_),!!h.isOpen)if(s.on("mousewheel",b),o.$tooltipFollowsMouse)y($);else{var x=f.$lines.cells[_].element.querySelector("[class*=ace_icon]"),w=x.getBoundingClientRect(),M=h.getElement().style;M.left=w.right+"px",M.top=w.bottom+"px"}}function b(){v&&(v=clearTimeout(v)),h.isOpen&&(h.hide(),s._signal("hideGutterTooltip",h),s.off("mousewheel",b))}function y(_){h.setPosition(_.x,_.y)}o.editor.setDefaultHandler("guttermousemove",function(_){var E=_.domEvent.target||_.domEvent.srcElement;if(c.hasCssClass(E,"ace_fold-widget"))return b();h.isOpen&&o.$tooltipFollowsMouse&&y(_),$=_,!v&&(v=setTimeout(function(){v=null,$&&!o.isMousePressed?C():b()},50))}),i.addListener(s.renderer.$gutter,"mouseout",function(_){$=null,!(!h.isOpen||v)&&(v=setTimeout(function(){v=null,b()},50))},s),s.on("changeSession",b),s.on("input",b)}p.GutterHandler=t;var l=function(o){g(s,o);function s(f){var h=o.call(this,f.container)||this;return h.editor=f,h}return s.prototype.setPosition=function(f,h){var v=window.innerWidth||document.documentElement.clientWidth,$=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),b=this.getHeight();f+=15,h+=15,f+C>v&&(f-=f+C-v),h+b>$&&(h-=20+b),u.prototype.setPosition.call(this,f,h)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:r("error"),plural:r("errors")},warning:{singular:r("warning"),plural:r("warnings")},info:{singular:r("information message"),plural:r("information messages")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(f){var h=this.editor.renderer.$gutterLayer,v=h.$annotations[f],$;v?$={text:Array.from(v.text),type:Array.from(v.type)}:$={text:[],type:[]};var C=h.session.getFoldLine(f);if(C&&h.$showFoldedAnnotations){for(var b={error:[],warning:[],info:[]},y,_=f+1;_<=C.end.row;_++)if(!!h.$annotations[_])for(var E=0;E ").concat($.text[_]);x[$.type[_].replace("_fold","")].push(M)}var k=[].concat(x.error,x.warning,x.info).join("
");this.setHtml(k),this.setClassName("ace_gutter-tooltip"),this.$element.setAttribute("aria-live","polite"),this.isOpen||this.setTheme(this.editor.renderer.theme),this.editor._signal("showGutterTooltip",this),this.show()},s.annotationsToSummaryString=function(f){var h,v,$=[],C=["error","warning","info"];try{for(var b=a(C),y=b.next();!y.done;y=b.next()){var _=y.value;if(!!f[_].length){var E=f[_].length===1?s.annotationLabels[_].singular:s.annotationLabels[_].plural;$.push("".concat(f[_].length," ").concat(E))}}}catch(O){h={error:O}}finally{try{y&&!y.done&&(v=b.return)&&v.call(b)}finally{if(h)throw h.error}}return $.join(", ")},s}(u);p.GutterTooltip=l}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,p,m){var g=e("../lib/event"),a=e("../lib/useragent"),c=function(){function i(u,r){this.domEvent=u,this.editor=r,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return i.prototype.stopPropagation=function(){g.stopPropagation(this.domEvent),this.propagationStopped=!0},i.prototype.preventDefault=function(){g.preventDefault(this.domEvent),this.defaultPrevented=!0},i.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},i.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},i.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,r=u.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=r.contains(t.row,t.column)}return this.$inSelection},i.prototype.getButton=function(){return g.getButton(this.domEvent)},i.prototype.getShiftKey=function(){return this.domEvent.shiftKey},i.prototype.getAccelKey=function(){return a.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},i}();p.MouseEvent=c}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,p,m){var g=e("../lib/dom"),a=e("../lib/event"),c=e("../lib/useragent"),i=200,u=200,r=5;function t(o){var s=o.editor,f=g.createElement("div");f.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",f.textContent="\xA0";var h=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];h.forEach(function(F){o[F]=this[F]},this),s.on("mousedown",this.onMouseDown.bind(o));var v=s.container,$,C,b,y,_,E,O=0,T,x,w,M,k;this.onDragStart=function(F){if(this.cancelDrag||!v.draggable){var P=this;return setTimeout(function(){P.startSelect(),P.captureMouse(F)},0),F.preventDefault()}_=s.getSelectionRange();var j=F.dataTransfer;j.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(f),j.setDragImage&&j.setDragImage(f,0,0),setTimeout(function(){s.container.removeChild(f)}),j.clearData(),j.setData("Text",s.session.getTextRange()),x=!0,this.setState("drag")},this.onDragEnd=function(F){if(v.draggable=!1,x=!1,this.setState(null),!s.getReadOnly()){var P=F.dataTransfer.dropEffect;!T&&P=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(F){if(!(s.getReadOnly()||!R(F.dataTransfer)))return C=F.clientX,b=F.clientY,$||A(),O++,F.dataTransfer.dropEffect=T=V(F),a.preventDefault(F)},this.onDragOver=function(F){if(!(s.getReadOnly()||!R(F.dataTransfer)))return C=F.clientX,b=F.clientY,$||(A(),O++),N!==null&&(N=null),F.dataTransfer.dropEffect=T=V(F),a.preventDefault(F)},this.onDragLeave=function(F){if(O--,O<=0&&$)return D(),T=null,a.preventDefault(F)},this.onDrop=function(F){if(!!E){var P=F.dataTransfer;if(x)switch(T){case"move":_.contains(E.row,E.column)?_={start:E,end:E}:_=s.moveText(_,E);break;case"copy":_=s.moveText(_,E,!0);break}else{var j=P.getData("Text");_={start:E,end:s.session.insert(E,j)},s.focus(),T=null}return D(),a.preventDefault(F)}},a.addListener(v,"dragstart",this.onDragStart.bind(o),s),a.addListener(v,"dragend",this.onDragEnd.bind(o),s),a.addListener(v,"dragenter",this.onDragEnter.bind(o),s),a.addListener(v,"dragover",this.onDragOver.bind(o),s),a.addListener(v,"dragleave",this.onDragLeave.bind(o),s),a.addListener(v,"drop",this.onDrop.bind(o),s);function S(F,P){var j=Date.now(),I=!P||F.row!=P.row,W=!P||F.column!=P.column;if(!M||I||W)s.moveCursorToPosition(F),M=j,k={x:C,y:b};else{var H=l(k.x,k.y,C,b);H>r?M=null:j-M>=u&&(s.renderer.scrollCursorIntoView(),M=null)}}function q(F,P){var j=Date.now(),I=s.renderer.layerConfig.lineHeight,W=s.renderer.layerConfig.characterWidth,H=s.renderer.scroller.getBoundingClientRect(),z={x:{left:C-H.left,right:H.right-C},y:{top:b-H.top,bottom:H.bottom-b}},G=Math.min(z.x.left,z.x.right),Z=Math.min(z.y.top,z.y.bottom),oe={row:F.row,column:F.column};G/W<=2&&(oe.column+=z.x.left=i&&s.renderer.scrollCursorIntoView(oe):w=j:w=null}function L(){var F=E;E=s.renderer.screenToTextCoordinates(C,b),S(E,F),q(E,F)}function A(){_=s.selection.toOrientedRange(),$=s.session.addMarker(_,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(y),L(),y=setInterval(L,20),O=0,a.addListener(document,"mousemove",B)}function D(){clearInterval(y),s.session.removeMarker($),$=null,s.selection.fromOrientedRange(_),s.isFocused()&&!x&&s.$resetCursorStyle(),_=null,E=null,O=0,w=null,M=null,a.removeListener(document,"mousemove",B)}var N=null;function B(){N==null&&(N=setTimeout(function(){N!=null&&$&&D()},20))}function R(F){var P=F.types;return!P||Array.prototype.some.call(P,function(j){return j=="text/plain"||j=="Text"})}function V(F){var P=["copy","copymove","all","uninitialized"],j=["move","copymove","linkmove","all","uninitialized"],I=c.isMac?F.altKey:F.ctrlKey,W="uninitialized";try{W=F.dataTransfer.effectAllowed.toLowerCase()}catch{}var H="none";return I&&P.indexOf(W)>=0?H="copy":j.indexOf(W)>=0?H="move":P.indexOf(W)>=0&&(H="copy"),H}}(function(){this.dragWait=function(){var o=Date.now()-this.mousedownEvent.time;o>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var o=this.editor.container;o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(o){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var o=this.editor,s=o.container;s.draggable=!0,o.renderer.$cursorLayer.setBlinking(!1),o.setStyle("ace_dragging");var f=c.isWin?"default":"move";o.renderer.setCursorStyle(f),this.setState("dragReady")},this.onMouseDrag=function(o){var s=this.editor.container;if(c.isIE&&this.state=="dragReady"){var f=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>3&&s.dragDrop()}if(this.state==="dragWait"){var f=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(o){if(!!this.$dragEnabled){this.mousedownEvent=o;var s=this.editor,f=o.inSelection(),h=o.getButton(),v=o.domEvent.detail||1;if(v===1&&h===0&&f){if(o.editor.inMultiSelectMode&&(o.getAccelKey()||o.getShiftKey()))return;this.mousedownEvent.time=Date.now();var $=o.domEvent.target||o.domEvent.srcElement;if("unselectable"in $&&($.unselectable="on"),s.getDragDelay()){if(c.isWebKit){this.cancelDrag=!0;var C=s.container;C.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(o,this.onMouseDrag.bind(this)),o.defaultPrevented=!0}}}}).call(t.prototype);function l(o,s,f,h){return Math.sqrt(Math.pow(f-o,2)+Math.pow(h-s,2))}p.DragdropHandler=t}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,p,m){var g=e("./mouse_event").MouseEvent,a=e("../lib/event"),c=e("../lib/dom");p.addTouchListeners=function(i,u){var r="scroll",t,l,o,s,f,h,v=0,$,C=0,b=0,y=0,_,E;function O(){var S=window.navigator&&window.navigator.clipboard,q=!1,L=function(){var D=u.getCopyText(),N=u.session.getUndoManager().hasUndo();E.replaceChild(c.buildDom(q?["span",!D&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],D&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],D&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],S&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],N&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),E.firstChild)},A=function(D){var N=D.target.getAttribute("action");if(N=="more"||!q)return q=!q,L();N=="paste"?S.readText().then(function(B){u.execCommand(N,B)}):N&&((N=="cut"||N=="copy")&&(S?S.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(N)),E.firstChild.style.display="none",q=!1,N!="openCommandPallete"&&u.focus()};E=c.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(D){r="menu",D.stopPropagation(),D.preventDefault(),u.textInput.focus()},ontouchend:function(D){D.stopPropagation(),D.preventDefault(),A(D)},onclick:A},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function T(){E||O();var S=u.selection.cursor,q=u.renderer.textToScreenCoordinates(S.row,S.column),L=u.renderer.textToScreenCoordinates(0,0).pageX,A=u.renderer.scrollLeft,D=u.container.getBoundingClientRect();E.style.top=q.pageY-D.top-3+"px",q.pageX-D.left=2?u.selection.getLineRange($.row):u.session.getBracketRange($);S&&!S.isEmpty()?u.selection.setRange(S):u.selection.selectWord(),r="wait"}a.addListener(i,"contextmenu",function(S){if(!!_){var q=u.textInput.getElement();q.focus()}},u),a.addListener(i,"touchstart",function(S){var q=S.touches;if(f||q.length>1){clearTimeout(f),f=null,o=-1,r="zoom";return}_=u.$mouseHandler.isMousePressed=!0;var L=u.renderer.layerConfig.lineHeight,A=u.renderer.layerConfig.lineHeight,D=S.timeStamp;s=D;var N=q[0],B=N.clientX,R=N.clientY;Math.abs(t-B)+Math.abs(l-R)>L&&(o=-1),t=S.clientX=B,l=S.clientY=R,b=y=0;var V=new g(S,u);if($=V.getDocumentPosition(),D-o<500&&q.length==1&&!v)C++,S.preventDefault(),S.button=0,M();else{C=0;var F=u.selection.cursor,P=u.selection.isEmpty()?F:u.selection.anchor,j=u.renderer.$cursorLayer.getPixelPosition(F,!0),I=u.renderer.$cursorLayer.getPixelPosition(P,!0),W=u.renderer.scroller.getBoundingClientRect(),H=u.renderer.layerConfig.offset,z=u.renderer.scrollLeft,G=function(se,ae){return se=se/A,ae=ae/L-.75,se*se+ae*ae};if(S.clientXoe?"cursor":"anchor"),oe<3.5?r="anchor":Z<3.5?r="cursor":r="scroll",f=setTimeout(w,450)}o=D},u),a.addListener(i,"touchend",function(S){_=u.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),r=="zoom"?(r="",v=0):f?(u.selection.moveToPosition($),v=0,T()):r=="scroll"?(k(),x()):T(),clearTimeout(f),f=null},u),a.addListener(i,"touchmove",function(S){f&&(clearTimeout(f),f=null);var q=S.touches;if(!(q.length>1||r=="zoom")){var L=q[0],A=t-L.clientX,D=l-L.clientY;if(r=="wait")if(A*A+D*D>4)r="cursor";else return S.preventDefault();t=L.clientX,l=L.clientY,S.clientX=L.clientX,S.clientY=L.clientY;var N=S.timeStamp,B=N-s;if(s=N,r=="scroll"){var R=new g(S,u);R.speed=1,R.wheelX=A,R.wheelY=D,10*Math.abs(A)0)if(oe==16){for(de=ae;de-1){for(de=ae;de=0&&I[X]==_;X--)P[X]=g}}}function B(F,P,j){if(!(a=F){for(H=W+1;H=F;)H++;for(z=W,G=H-1;z=P.length||(H=j[I-1])!=h&&H!=v||(z=P[I+1])!=h&&z!=v?$:(c&&(z=v),z==H?z:$);case O:return H=I>0?j[I-1]:C,H==h&&I+10&&j[I-1]==h)return h;if(c)return $;for(Z=I+1,G=P.length;Z=1425&&oe<=2303||oe==64286;if(H=P[Z],se&&(H==f||H==y))return f}return I<1||(H=P[I-1])==C?$:j[I-1];case C:return c=!1,i=!0,g;case b:return u=!0,$;case w:case M:case S:case q:case k:c=!1;case L:return $}}function V(F){var P=F.charCodeAt(0),j=P>>8;return j==0?P>191?s:A[P]:j==5?/[\u0591-\u05f4]/.test(F)?f:s:j==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(F)?x:/[\u0660-\u0669\u066b-\u066c]/.test(F)?v:P==1642?T:/[\u06f0-\u06f9]/.test(F)?h:y:j==32&&P<=8287?D[P&255]:j==254&&P>=65136?y:$}p.L=s,p.R=f,p.EN=h,p.ON_R=3,p.AN=4,p.R_H=5,p.B=6,p.RLE=7,p.DOT="\xB7",p.doBidiReorder=function(F,P,j){if(F.length<2)return{};var I=F.split(""),W=new Array(I.length),H=new Array(I.length),z=[];g=j?o:l,N(I,z,I.length,P);for(var G=0;Gy&&P[G]0&&I[G-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(I[G])&&(z[G-1]=z[G]=p.R_H,G++);I[I.length-1]===p.DOT&&(z[I.length-1]=p.B),I[0]==="\u202B"&&(z[0]=p.RLE);for(var G=0;G=0&&(r=this.session.$docRowCache[l])}return r},u.prototype.getSplitIndex=function(){var r=0,t=this.session.$screenRowCache;if(t.length)for(var l,o=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-r>0&&(l=this.session.$getRowCacheIndex(t,this.currentRow-r-1),l===o);)o=l,r++;else r=this.currentRow;return r},u.prototype.updateRowLine=function(r,t){r===void 0&&(r=this.getDocumentRow());var l=r===this.session.getLength()-1,o=l?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 s=this.session.$wrapData[r];s&&(t===void 0&&(t=this.getSplitIndex()),t>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[g.L],this.line=tt?this.session.getOverwrite()?r:r-1:t,o=g.getVisualFromLogicalIdx(l,this.bidiMap),s=this.bidiMap.bidiLevels,f=0;!this.session.getOverwrite()&&r<=t&&s[o]%2!=0&&o++;for(var h=0;ht&&s[o]%2==0&&(f+=this.charWidths[s[o]]),this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(f+=this.rtlLineOffset),f},u.prototype.getSelections=function(r,t){var l=this.bidiMap,o=l.bidiLevels,s,f=[],h=0,v=Math.min(r,t)-this.wrapIndent,$=Math.max(r,t)-this.wrapIndent,C=!1,b=!1,y=0;this.wrapIndent&&(h+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var _,E=0;E=v&&_<$,C&&!b?y=h:!C&&b&&f.push({left:y,width:h-y}),h+=this.charWidths[s],b=C;if(C&&E===o.length&&f.push({left:y,width:h-y}),this.isRtlDir)for(var O=0;Ol+f/2;){if(l+=f,o===s.length-1){f=0;break}f=this.charWidths[s[++o]]}return o>0&&s[o-1]%2!=0&&s[o]%2==0?(r0&&s[o-1]%2==0&&s[o]%2!=0?t=1+(r>l?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===s.length-1&&f===0&&s[o-1]%2==0||!this.isRtlDir&&o===0&&s[o]%2!=0?t=1+this.bidiMap.logicalFromVisual[o]:(o>0&&s[o-1]%2!=0&&f!==0&&o--,t=this.bidiMap.logicalFromVisual[o]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent},u}();p.BidiHandler=i}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,p,m){var g=e("./lib/oop"),a=e("./lib/lang"),c=e("./lib/event_emitter").EventEmitter,i=e("./range").Range,u=function(r){this.session=r,this.doc=r.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(l){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),!t.$isEmpty&&!t.$silent&&t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._emit("changeSelection")})};(function(){g.implement(this,c),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(r,t){this.$isEmpty=!1,this.anchor.setPosition(r,t)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var r=this.anchor,t=this.lead;return r.row>t.row||r.row==t.row&&r.column>t.column},this.getRange=function(){var r=this.anchor,t=this.lead;return this.$isEmpty?i.fromPoints(t,t):this.isBackwards()?i.fromPoints(t,r):i.fromPoints(r,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(r,t){var l=t?r.end:r.start,o=t?r.start:r.end;this.$setSelection(l.row,l.column,o.row,o.column)},this.$setSelection=function(r,t,l,o){if(!this.$silent){var s=this.$isEmpty,f=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(r,t),this.cursor.setPosition(l,o),this.$isEmpty=!i.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||f)&&this._emit("changeSelection")}},this.$moveSelection=function(r){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),r.call(this)},this.selectTo=function(r,t){this.$moveSelection(function(){this.moveCursorTo(r,t)})},this.selectToPosition=function(r){this.$moveSelection(function(){this.moveCursorToPosition(r)})},this.moveTo=function(r,t){this.clearSelection(),this.moveCursorTo(r,t)},this.moveToPosition=function(r){this.clearSelection(),this.moveCursorToPosition(r)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(r,t){if(typeof t=="undefined"){var l=r||this.lead;r=l.row,t=l.column}return this.session.getWordRange(r,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var r=this.getCursor(),t=this.session.getAWordRange(r.row,r.column);this.setSelectionRange(t)},this.getLineRange=function(r,t){var l=typeof r=="number"?r:this.lead.row,o,s=this.session.getFoldLine(l);return s?(l=s.start.row,o=s.end.row):o=l,t===!0?new i(l,0,o,this.session.getLine(o).length):new i(l,0,o+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(r,t,l){var o=r.column,s=r.column+t;return l<0&&(o=r.column-t,s=r.column),this.session.isTabStop(r)&&this.doc.getLine(r.row).slice(o,s).split(" ").length-1==t},this.moveCursorLeft=function(){var r=this.lead.getPosition(),t;if(t=this.session.getFoldAt(r.row,r.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(r.column===0)r.row>0&&this.moveCursorTo(r.row-1,this.doc.getLine(r.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(r,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var r=this.lead.getPosition(),t;if(t=this.session.getFoldAt(r.row,r.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=o)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var r=this.doc.getLength()-1,t=this.doc.getLine(r).length;this.moveCursorTo(r,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var r=this.lead.row,t=this.lead.column,l=this.doc.getLine(r),o=l.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(r,t,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(this.session.nonTokenRe.exec(o)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=l.substring(t)),t>=l.length){this.moveCursorTo(r,l.length),this.moveCursorRight(),r0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(r,t)},this.$shortWordEndIndex=function(r){var t=0,l,o=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(r))t=this.session.tokenRe.lastIndex;else{for(;(l=r[t])&&o.test(l);)t++;if(t<1){for(s.lastIndex=0;(l=r[t])&&!s.test(l);)if(s.lastIndex=0,t++,o.test(l))if(t>2){t--;break}else{for(;(l=r[t])&&o.test(l);)t++;if(t>2)break}}}return s.lastIndex=0,t},this.moveCursorShortWordRight=function(){var r=this.lead.row,t=this.lead.column,l=this.doc.getLine(r),o=l.substring(t),s=this.session.getFoldAt(r,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==l.length){var f=this.doc.getLength();do r++,o=this.doc.getLine(r);while(r0&&/^\s*$/.test(o));t=o.length,/\s+$/.test(o)||(o="")}var s=a.stringReverse(o),f=this.$shortWordEndIndex(s);return this.moveCursorTo(r,t-f)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(r,t){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(t===0&&(r!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),r!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];r<0?r-=s.rowsAbove||0:r>0&&(r+=s.rowCount-(s.rowsAbove||0))}var f=this.session.screenToDocumentPosition(l.row+r,l.column,o);r!==0&&t===0&&f.row===this.lead.row&&f.column===this.lead.column,this.moveCursorTo(f.row,f.column+t,t===0)},this.moveCursorToPosition=function(r){this.moveCursorTo(r.row,r.column)},this.moveCursorTo=function(r,t,l){var o=this.session.getFoldAt(r,t,1);o&&(r=o.start.row,t=o.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(r);/[\uDC00-\uDFFF]/.test(s.charAt(t))&&s.charAt(t-1)&&(this.lead.row==r&&this.lead.column==t+1?t=t-1:t=t+1),this.lead.setPosition(r,t),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},this.moveCursorToScreen=function(r,t,l){var o=this.session.screenToDocumentPosition(r,t);this.moveCursorTo(o.row,o.column,l)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(r){this.setSelectionRange(r,r.cursor==r.start),this.$desiredColumn=r.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(r){var t=this.getRange();return r?(r.start.column=t.start.column,r.start.row=t.start.row,r.end.column=t.end.column,r.end.row=t.end.row):r=t,r.cursor=this.isBackwards()?r.start:r.end,r.desiredColumn=this.$desiredColumn,r},this.getRangeOfMovements=function(r){var t=this.getCursor();try{r(this);var l=this.getCursor();return i.fromPoints(t,l)}catch{return i.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var r=this.ranges.map(function(t){var l=t.clone();return l.isBackwards=t.cursor==t.start,l});else{var r=this.getRange();r.isBackwards=this.isBackwards()}return r},this.fromJSON=function(r){if(r.start==null)if(this.rangeList&&r.length>1){this.toSingleRange(r[0]);for(var t=r.length;t--;){var l=i.fromPoints(r[t].start,r[t].end);r[t].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else r=r[0];this.rangeList&&this.toSingleRange(r),this.setSelectionRange(r,r.isBackwards)},this.isEqual=function(r){if((r.length||this.rangeCount)&&r.length!=this.rangeCount)return!1;if(!r.length||!this.ranges)return this.getRange().isEqual(r);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(r[t]))return!1;return!0}}).call(u.prototype),p.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,p,m){var g=e("./config"),a=2e3,c=function(){function i(u){this.states=u,this.regExps={},this.matchMappings={};for(var r in this.states){for(var t=this.states[r],l=[],o=0,s=this.matchMappings[r]={defaultToken:"text"},f="g",h=[],v=0;v1?$.onMatch=this.$applyToken:$.onMatch=$.token),b>1&&(/\\\d/.test($.regex)?C=$.regex.replace(/\\([0-9]+)/g,function(y,_){return"\\"+(parseInt(_,10)+o+1)}):(b=1,C=this.removeCapturingGroups($.regex)),!$.splitRegex&&typeof $.token!="string"&&h.push($)),s[o]=v,o+=b,l.push(C),$.onMatch||($.onMatch=null)}}l.length||(s[0]=0,l.push("$")),h.forEach(function(y){y.splitRegex=this.createSplitterRegexp(y.regex,f)},this),this.regExps[r]=new RegExp("("+l.join(")|(")+")|($)",f)}}return i.prototype.$setMaxTokenCount=function(u){a=u|0},i.prototype.$applyToken=function(u){var r=this.splitRegex.exec(u).slice(1),t=this.token.apply(this,r);if(typeof t=="string")return[{type:t,value:u}];for(var l=[],o=0,s=t.length;o$){var T=u.substring($,O-E.length);b.type==y?b.value+=T:(b.type&&v.push(b),b={type:y,value:T})}for(var x=0;xa){for(C>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:u});$1&&t[0]!==l&&t.unshift("#tmp",l),{tokens:v,state:t.length?t:l}},i}();c.prototype.reportError=g.reportError,p.Tokenizer=c}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,p,m){var g=e("../lib/lang"),a=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(u,r){if(!r){for(var t in u)this.$rules[t]=u[t];return}for(var t in u){for(var l=u[t],o=0;o=this.$rowTokens.length;){if(this.$row+=1,i||(i=this.$session.getLength()),this.$row>=i)return this.$row=i-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},c.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},c.prototype.getCurrentTokenRow=function(){return this.$row},c.prototype.getCurrentTokenColumn=function(){var i=this.$rowTokens,u=this.$tokenIndex,r=i[u].start;if(r!==void 0)return r;for(r=0;u>0;)u-=1,r+=i[u].value.length;return r},c.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},c.prototype.getCurrentTokenRange=function(){var i=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new g(this.$row,u,this.$row,u+i.value.length)},c}();p.TokenIterator=a}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,p,m){var g=e("../../lib/oop"),a=e("../behaviour").Behaviour,c=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],t,l={},o={'"':'"',"'":"'"},s=function(v){var $=-1;if(v.multiSelect&&($=v.selection.index,l.rangeCount!=v.multiSelect.rangeCount&&(l={rangeCount:v.multiSelect.rangeCount})),l[$])return t=l[$];t=l[$]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(v,$,C,b){var y=v.end.row-v.start.row;return{text:C+$+b,selection:[0,v.start.column+1,y,v.end.column+(y?0:1)]}},h=function(v){v=v||{},this.add("braces","insertion",function($,C,b,y,_){var E=b.getCursorPosition(),O=y.doc.getLine(E.row);if(_=="{"){s(b);var T=b.getSelectionRange(),x=y.doc.getTextRange(T);if(x!==""&&x!=="{"&&b.getWrapBehavioursEnabled())return f(T,x,"{","}");if(h.isSaneInsertion(b,y))return/[\]\}\)]/.test(O[E.column])||b.inMultiSelectMode||v.braces?(h.recordAutoInsert(b,y,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(b,y,"{"),{text:"{",selection:[1,1]})}else if(_=="}"){s(b);var w=O.substring(E.column,E.column+1);if(w=="}"){var M=y.$findOpeningBracket("}",{column:E.column+1,row:E.row});if(M!==null&&h.isAutoInsertedClosing(E,O,_))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(_==` +`||_==`\r +`){s(b);var k="";h.isMaybeInsertedClosing(E,O)&&(k=i.stringRepeat("}",t.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var w=O.substring(E.column,E.column+1);if(w==="}"){var S=y.findMatchingBracket({row:E.row,column:E.column+1},"}");if(!S)return null;var q=this.$getIndent(y.getLine(S.row))}else if(k)var q=this.$getIndent(O);else{h.clearMaybeInsertedClosing();return}var L=q+y.getTabString();return{text:` +`+L+` +`+q+k,selection:[1,L.length,1,L.length]}}else h.clearMaybeInsertedClosing()}),this.add("braces","deletion",function($,C,b,y,_){var E=y.doc.getTextRange(_);if(!_.isMultiLine()&&E=="{"){s(b);var O=y.doc.getLine(_.start.row),T=O.substring(_.end.column,_.end.column+1);if(T=="}")return _.end.column++,_;t.maybeInsertedBrackets--}}),this.add("parens","insertion",function($,C,b,y,_){if(_=="("){s(b);var E=b.getSelectionRange(),O=y.doc.getTextRange(E);if(O!==""&&b.getWrapBehavioursEnabled())return f(E,O,"(",")");if(h.isSaneInsertion(b,y))return h.recordAutoInsert(b,y,")"),{text:"()",selection:[1,1]}}else if(_==")"){s(b);var T=b.getCursorPosition(),x=y.doc.getLine(T.row),w=x.substring(T.column,T.column+1);if(w==")"){var M=y.$findOpeningBracket(")",{column:T.column+1,row:T.row});if(M!==null&&h.isAutoInsertedClosing(T,x,_))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function($,C,b,y,_){var E=y.doc.getTextRange(_);if(!_.isMultiLine()&&E=="("){s(b);var O=y.doc.getLine(_.start.row),T=O.substring(_.start.column+1,_.start.column+2);if(T==")")return _.end.column++,_}}),this.add("brackets","insertion",function($,C,b,y,_){if(_=="["){s(b);var E=b.getSelectionRange(),O=y.doc.getTextRange(E);if(O!==""&&b.getWrapBehavioursEnabled())return f(E,O,"[","]");if(h.isSaneInsertion(b,y))return h.recordAutoInsert(b,y,"]"),{text:"[]",selection:[1,1]}}else if(_=="]"){s(b);var T=b.getCursorPosition(),x=y.doc.getLine(T.row),w=x.substring(T.column,T.column+1);if(w=="]"){var M=y.$findOpeningBracket("]",{column:T.column+1,row:T.row});if(M!==null&&h.isAutoInsertedClosing(T,x,_))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function($,C,b,y,_){var E=y.doc.getTextRange(_);if(!_.isMultiLine()&&E=="["){s(b);var O=y.doc.getLine(_.start.row),T=O.substring(_.start.column+1,_.start.column+2);if(T=="]")return _.end.column++,_}}),this.add("string_dquotes","insertion",function($,C,b,y,_){var E=y.$mode.$quotes||o;if(_.length==1&&E[_]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(_)!=-1)return;s(b);var O=_,T=b.getSelectionRange(),x=y.doc.getTextRange(T);if(x!==""&&(x.length!=1||!E[x])&&b.getWrapBehavioursEnabled())return f(T,x,O,O);if(!x){var w=b.getCursorPosition(),M=y.doc.getLine(w.row),k=M.substring(w.column-1,w.column),S=M.substring(w.column,w.column+1),q=y.getTokenAt(w.row,w.column),L=y.getTokenAt(w.row,w.column+1);if(k=="\\"&&q&&/escape/.test(q.type))return null;var A=q&&/string|escape/.test(q.type),D=!L||/string|escape/.test(L.type),N;if(S==O)N=A!==D,N&&/string\.end/.test(L.type)&&(N=!1);else{if(A&&!D||A&&D)return null;var B=y.$mode.tokenRe;B.lastIndex=0;var R=B.test(k);B.lastIndex=0;var V=B.test(S),F=y.$mode.$pairQuotesAfter,P=F&&F[O]&&F[O].test(k);if(!P&&R||V||S&&!/[\s;,.})\]\\]/.test(S))return null;var j=M[w.column-2];if(k==O&&(j==O||B.test(j)))return null;N=!0}return{text:N?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function($,C,b,y,_){var E=y.$mode.$quotes||o,O=y.doc.getTextRange(_);if(!_.isMultiLine()&&E.hasOwnProperty(O)){s(b);var T=y.doc.getLine(_.start.row),x=T.substring(_.start.column+1,_.start.column+2);if(x==O)return _.end.column++,_}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function($,C,b,y,_){if($==="doc-start"&&(_===` +`||_===`\r +`)&&b.selection.isEmpty()){var E=b.getCursorPosition(),O=y.doc.getLine(E.row),T=y.doc.getLine(E.row+1),x=this.$getIndent(O);if(/\s*\*/.test(T))return/^\s*\*/.test(O)?{text:_+x+"* ",selection:[1,3+x.length,1,3+x.length]}:{text:_+x+" * ",selection:[1,3+x.length,1,3+x.length]};if(/\/\*\*/.test(O.substring(0,E.column)))return{text:_+x+" * "+_+" "+x+"*/",selection:[1,4+x.length,1,4+x.length]}}})};h.isSaneInsertion=function(v,$){var C=v.getCursorPosition(),b=new c($,C.row,C.column);if(!this.$matchTokenType(b.getCurrentToken()||"text",u)){if(/[)}\]]/.test(v.session.getLine(C.row)[C.column]))return!0;var y=new c($,C.row,C.column+1);if(!this.$matchTokenType(y.getCurrentToken()||"text",u))return!1}return b.stepForward(),b.getCurrentTokenRow()!==C.row||this.$matchTokenType(b.getCurrentToken()||"text",r)},h.$matchTokenType=function(v,$){return $.indexOf(v.type||v)>-1},h.recordAutoInsert=function(v,$,C){var b=v.getCursorPosition(),y=$.doc.getLine(b.row);this.isAutoInsertedClosing(b,y,t.autoInsertedLineEnd[0])||(t.autoInsertedBrackets=0),t.autoInsertedRow=b.row,t.autoInsertedLineEnd=C+y.substr(b.column),t.autoInsertedBrackets++},h.recordMaybeInsert=function(v,$,C){var b=v.getCursorPosition(),y=$.doc.getLine(b.row);this.isMaybeInsertedClosing(b,y)||(t.maybeInsertedBrackets=0),t.maybeInsertedRow=b.row,t.maybeInsertedLineStart=y.substr(0,b.column)+C,t.maybeInsertedLineEnd=y.substr(b.column),t.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(v,$,C){return t.autoInsertedBrackets>0&&v.row===t.autoInsertedRow&&C===t.autoInsertedLineEnd[0]&&$.substr(v.column)===t.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(v,$){return t.maybeInsertedBrackets>0&&v.row===t.maybeInsertedRow&&$.substr(v.column)===t.maybeInsertedLineEnd&&$.substr(0,v.column)==t.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){t.autoInsertedLineEnd=t.autoInsertedLineEnd.substr(1),t.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){t&&(t.maybeInsertedBrackets=0,t.maybeInsertedRow=-1)},g.inherits(h,a),p.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(e,p,m){for(var g=[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],a=0,c=[],i=0;i2?j%_!=_-1:j%_==0}}else{if(!this.blockComment)return!1;var O=this.blockComment.start,T=this.blockComment.end,x=new RegExp("^(\\s*)(?:"+r.escapeRegExp(O)+")"),w=new RegExp("(?:"+r.escapeRegExp(T)+")\\s*$"),M=function(N,B){S(N,B)||(!C||/\S/.test(N))&&($.insertInLine({row:B,column:N.length},T),$.insertInLine({row:B,column:y},O))},k=function(N,B){var R;(R=N.match(w))&&$.removeInLine(B,N.length-R[0].length,N.length),(R=N.match(x))&&$.removeInLine(B,R[1].length,R[0].length)},S=function(N,B){if(x.test(N))return!0;for(var R=f.getTokens(B),V=0;VN.length&&(D=N.length)}),y==1/0&&(y=D,C=!1,b=!1),E&&y%_!=0&&(y=Math.floor(y/_)*_),A(b?k:M)},this.toggleBlockComment=function(s,f,h,v){var $=this.blockComment;if(!!$){!$.start&&$[0]&&($=$[0]);var C=new t(f,v.row,v.column),b=C.getCurrentToken();f.selection;var y=f.selection.toOrientedRange(),_,E;if(b&&/comment/.test(b.type)){for(var O,T;b&&/comment/.test(b.type);){var x=b.value.indexOf($.start);if(x!=-1){var w=C.getCurrentTokenRow(),M=C.getCurrentTokenColumn()+x;O=new l(w,M,w,M+$.start.length);break}b=C.stepBackward()}for(var C=new t(f,v.row,v.column),b=C.getCurrentToken();b&&/comment/.test(b.type);){var x=b.value.indexOf($.end);if(x!=-1){var w=C.getCurrentTokenRow(),M=C.getCurrentTokenColumn()+x;T=new l(w,M,w,M+$.end.length);break}b=C.stepForward()}T&&f.remove(T),O&&(f.remove(O),_=O.start.row,E=-$.start.length)}else E=$.start.length,_=h.start.row,f.insert(h.end,$.end),f.insert(h.start,$.start);y.start.row==_&&(y.start.column+=E),y.end.row==_&&(y.end.column+=E),f.selection.fromOrientedRange(y)}},this.getNextLineIndent=function(s,f,h){return this.$getIndent(f)},this.checkOutdent=function(s,f,h){return!1},this.autoOutdent=function(s,f,h){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var f in s)if(s[f]){var h=s[f],v=h.prototype.$id,$=g.$modes[v];$||(g.$modes[v]=$=new h),g.$modes[f]||(g.$modes[f]=$),this.$embeds.push(f),this.$modes[f]=$}for(var C=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],f=0;fthis.row)){var l=u(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(l.row,l.column,!0)}},r.prototype.setPosition=function(t,l,o){var s;if(o?s={row:t,column:l}:s=this.$clipPositionToDocument(t,l),!(this.row==s.row&&this.column==s.column)){var f={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:f,value:s})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(t,l){var o={};return t>=this.document.getLength()?(o.row=Math.max(0,this.document.getLength()-1),o.column=this.document.getLine(o.row).length):t<0?(o.row=0,o.column=0):(o.row=t,o.column=Math.min(this.document.getLine(o.row).length,Math.max(0,l))),l<0&&(o.column=0),o},r}();c.prototype.$insertRight=!1,g.implement(c.prototype,a);function i(r,t,l){var o=l?r.column<=t.column:r.column=s&&(l=s-1,o=void 0);var f=this.getLine(l);return o==null&&(o=f.length),o=Math.min(Math.max(o,0),f.length),{row:l,column:o}},t.prototype.clonePos=function(l){return{row:l.row,column:l.column}},t.prototype.pos=function(l,o){return{row:l,column:o}},t.prototype.$clipPosition=function(l){var o=this.getLength();return l.row>=o?(l.row=Math.max(0,o-1),l.column=this.getLine(o-1).length):(l.row=Math.max(0,l.row),l.column=Math.min(Math.max(l.column,0),this.getLine(l.row).length)),l},t.prototype.insertFullLines=function(l,o){l=Math.min(Math.max(l,0),this.getLength());var s=0;l0,f=o=0&&this.applyDelta({start:this.pos(l,this.getLine(l).length),end:this.pos(l+1,0),action:"remove",lines:["",""]})},t.prototype.replace=function(l,o){if(l instanceof i||(l=i.fromPoints(l.start,l.end)),o.length===0&&l.isEmpty())return l.start;if(o==this.getTextRange(l))return l.end;this.remove(l);var s;return o?s=this.insert(l.start,o):s=l.start,s},t.prototype.applyDeltas=function(l){for(var o=0;o=0;o--)this.revertDelta(l[o])},t.prototype.applyDelta=function(l,o){var s=l.action=="insert";(s?l.lines.length<=1&&!l.lines[0]:!i.comparePoints(l.start,l.end))||(s&&l.lines.length>2e4?this.$splitAndapplyLargeDelta(l,2e4):(a(this.$lines,l,o),this._signal("change",l)))},t.prototype.$safeApplyDelta=function(l){var o=this.$lines.length;(l.action=="remove"&&l.start.row20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=o,s==-1&&(s=o),h<=s&&t.fireUpdateEvent(h,s)}}}return i.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},i.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},i.prototype.fireUpdateEvent=function(u,r){var t={first:u,last:r};this._signal("update",{data:t})},i.prototype.start=function(u){this.currentLine=Math.min(u||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)},i.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},i.prototype.$updateOnChange=function(u){var r=u.start.row,t=u.end.row-r;if(t===0)this.lines[r]=null;else if(u.action=="remove")this.lines.splice(r,t+1,null),this.states.splice(r,t+1,null);else{var l=Array(t+1);l.unshift(r,1),this.lines.splice.apply(this.lines,l),this.states.splice.apply(this.states,l)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},i.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},i.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},i.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},i.prototype.$tokenizeRow=function(u){var r=this.doc.getLine(u),t=this.states[u-1],l=this.tokenizer.getLineTokens(r,t,u);return this.states[u]+""!=l.state+""?(this.states[u]=l.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=l.tokens},i.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},i}();g.implement(c.prototype,a),p.BackgroundTokenizer=c}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,p,m){var g=e("./lib/lang"),a=e("./range").Range,c=function(){function i(u,r,t){t===void 0&&(t="text"),this.setRegexp(u),this.clazz=r,this.type=t}return i.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},i.prototype.update=function(u,r,t,l){if(!!this.regExp)for(var o=l.firstRow,s=l.lastRow,f={},h=o;h<=s;h++){var v=this.cache[h];v==null&&(v=g.getMatchOffsets(t.getLine(h),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(y){return new a(h,y.offset,h,y.offset+y.length)}),this.cache[h]=v.length?v:"");for(var $=v.length;$--;){var C=v[$].toScreenRange(t),b=C.toString();f[b]||(f[b]=!0,r.drawSingleLineMarker(u,C,this.clazz,l))}}},i}();c.prototype.MAX_RANGES=500,p.SearchHighlight=c}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,p,m){var g=e("../range").Range,a=function(){function c(i,u){this.foldData=i,Array.isArray(u)?this.folds=u:u=this.folds=[u];var r=u[u.length-1];this.range=new g(u[0].start.row,u[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(t){t.setFoldLine(this)},this)}return c.prototype.shiftRow=function(i){this.start.row+=i,this.end.row+=i,this.folds.forEach(function(u){u.start.row+=i,u.end.row+=i})},c.prototype.addFold=function(i){if(i.sameRow){if(i.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(i),this.folds.sort(function(u,r){return-u.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(i.start.row,i.start.column)>0?(this.end.row=i.end.row,this.end.column=i.end.column):this.range.compareStart(i.end.row,i.end.column)<0&&(this.start.row=i.start.row,this.start.column=i.start.column)}else if(i.start.row==this.end.row)this.folds.push(i),this.end.row=i.end.row,this.end.column=i.end.column;else if(i.end.row==this.start.row)this.folds.unshift(i),this.start.row=i.start.row,this.start.column=i.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");i.foldLine=this},c.prototype.containsRow=function(i){return i>=this.start.row&&i<=this.end.row},c.prototype.walk=function(i,u,r){var t=0,l=this.folds,o,s,f,h=!0;u==null&&(u=this.end.row,r=this.end.column);for(var v=0;v0)){var h=a(u,s.start);return f===0?r&&h!==0?-o-2:o:h>0||h===0&&!r?o:-o-1}}return-o-1},i.prototype.add=function(u){var r=!u.isEmpty(),t=this.pointIndex(u.start,r);t<0&&(t=-t-1);var l=this.pointIndex(u.end,r,t);return l<0?l=-l-1:l++,this.ranges.splice(t,l-t,u)},i.prototype.addList=function(u){for(var r=[],t=u.length;t--;)r.push.apply(r,this.add(u[t]));return r},i.prototype.substractPoint=function(u){var r=this.pointIndex(u);if(r>=0)return this.ranges.splice(r,1)},i.prototype.merge=function(){var u=[],r=this.ranges;r=r.sort(function(f,h){return a(f.start,h.start)});for(var t=r[0],l,o=1;o=0},i.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},i.prototype.rangeAtPoint=function(u){var r=this.pointIndex(u);if(r>=0)return this.ranges[r]},i.prototype.clipRows=function(u,r){var t=this.ranges;if(t[0].start.row>r||t[t.length-1].start.row=l)break}if(u.action=="insert")for(var $=o-l,C=-r.column+t.column;fl)break;if(v.start.row==l&&v.start.column>=r.column&&(v.start.column==r.column&&this.$bias<=0||(v.start.column+=C,v.start.row+=$)),v.end.row==l&&v.end.column>=r.column){if(v.end.column==r.column&&this.$bias<0)continue;v.end.column==r.column&&C>0&&fv.start.column&&v.end.column==s[f+1].start.column&&(v.end.column-=C),v.end.column+=C,v.end.row+=$}}else for(var $=l-o,C=r.column-t.column;fo)break;v.end.rowr.column)&&(v.end.column=r.column,v.end.row=r.row):(v.end.column+=C,v.end.row+=$):v.end.row>o&&(v.end.row+=$),v.start.rowr.column)&&(v.start.column=r.column,v.start.row=r.row):(v.start.column+=C,v.start.row+=$):v.start.row>o&&(v.start.row+=$)}if($!=0&&f=t)return f;if(f.end.row>t)return null}return null},this.getNextFoldLine=function(t,l){var o=this.$foldData,s=0;for(l&&(s=o.indexOf(l)),s==-1&&(s=0),s;s=t)return f}return null},this.getFoldedRowCount=function(t,l){for(var o=this.$foldData,s=l-t+1,f=0;f=l){$=t?s-=l-$:s=0);break}else v>=t&&($>=t?s-=v-$:s-=v-t+1)}return s},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(l,o){return l.start.row-o.start.row}),t},this.addFold=function(t,l){var o=this.$foldData,s=!1,f;t instanceof c?f=t:(f=new c(l,t),f.collapseChildren=l.collapseChildren),this.$clipRangeToDocument(f.range);var h=f.start.row,v=f.start.column,$=f.end.row,C=f.end.column,b=this.getFoldAt(h,v,1),y=this.getFoldAt($,C,-1);if(b&&y==b)return b.addSubFold(f);b&&!b.range.isStart(h,v)&&this.removeFold(b),y&&!y.range.isEnd($,C)&&this.removeFold(y);var _=this.getFoldsInRange(f.range);_.length>0&&(this.removeFolds(_),f.collapseChildren||_.forEach(function(x){f.addSubFold(x)}));for(var E=0;E0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(l){this.expandFold(l)},this)},this.unfold=function(t,l){var o,s;if(t==null)o=new g(0,0,this.getLength(),0),l==null&&(l=!0);else if(typeof t=="number")o=new g(t,0,t,this.getLine(t).length);else if("row"in t)o=g.fromPoints(t,t);else{if(Array.isArray(t))return s=[],t.forEach(function(h){s=s.concat(this.unfold(h))},this),s;o=t}s=this.getFoldsInRangeList(o);for(var f=s;s.length==1&&g.comparePoints(s[0].start,o.start)<0&&g.comparePoints(s[0].end,o.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(o);if(l!=!1?this.removeFolds(s):this.expandFolds(s),f.length)return f},this.isRowFolded=function(t,l){return!!this.getFoldLine(t,l)},this.getRowFoldEnd=function(t,l){var o=this.getFoldLine(t,l);return o?o.end.row:t},this.getRowFoldStart=function(t,l){var o=this.getFoldLine(t,l);return o?o.start.row:t},this.getFoldDisplayLine=function(t,l,o,s,f){s==null&&(s=t.start.row),f==null&&(f=0),l==null&&(l=t.end.row),o==null&&(o=this.getLine(l).length);var h=this.doc,v="";return t.walk(function($,C,b,y){if(!(CC)break;while(f&&v.test(f.type)&&!/^comment.start/.test(f.type));f=s.stepBackward()}else f=s.getCurrentToken();return $.end.row=s.getCurrentTokenRow(),$.end.column=s.getCurrentTokenColumn(),/^comment.end/.test(f.type)||($.end.column+=f.value.length-2),$}},this.foldAll=function(t,l,o,s){o==null&&(o=1e5);var f=this.foldWidgets;if(!!f){l=l||this.getLength(),t=t||0;for(var h=t;h=t&&(h=v.end.row,v.collapseChildren=o,this.addFold("...",v))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(l){for(var o=t.getTokens(l),s=0;s=0;){var h=o[s];if(h==null&&(h=o[s]=this.getFoldWidget(s)),h=="start"){var v=this.getFoldWidgetRange(s);if(f||(f=v),v&&v.end.row>=t)break}s--}return{range:s!==-1&&v,firstRange:f}},this.onFoldWidgetClick=function(t,l){l instanceof u&&(l=l.domEvent);var o={children:l.shiftKey,all:l.ctrlKey||l.metaKey,siblings:l.altKey},s=this.$toggleFoldWidget(t,o);if(!s){var f=l.target||l.srcElement;f&&/ace_fold-widget/.test(f.className)&&(f.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,l){if(!!this.getFoldWidget){var o=this.getFoldWidget(t),s=this.getLine(t),f=o==="end"?-1:1,h=this.getFoldAt(t,f===-1?0:s.length,f);if(h)return l.children||l.all?this.removeFold(h):this.expandFold(h),h;var v=this.getFoldWidgetRange(t,!0);if(v&&!v.isMultiLine()&&(h=this.getFoldAt(v.start.row,v.start.column,1),h&&v.isEqual(h.range)))return this.removeFold(h),h;if(l.siblings){var $=this.getParentFoldRangeData(t);if($.range)var C=$.range.start.row+1,b=$.range.end.row;this.foldAll(C,b,l.all?1e4:0)}else l.children?(b=v?v.end.row:this.getLength(),this.foldAll(t+1,b,l.all?1e4:0)):v&&(l.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(t){var l=this.selection.getCursor().row;l=this.getRowFoldStart(l);var o=this.$toggleFoldWidget(l,{});if(!o){var s=this.getParentFoldRangeData(l,!0);if(o=s.range||s.firstRange,o){l=o.start.row;var f=this.getFoldAt(l,this.getLine(l).length,1);f?this.removeFold(f):this.addFold("...",o)}}},this.updateFoldWidgets=function(t){var l=t.start.row,o=t.end.row-l;if(o===0)this.foldWidgets[l]=null;else if(t.action=="remove")this.foldWidgets.splice(l,o+1,null);else{var s=Array(o+1);s.unshift(l,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(t){var l=t.data;l.first!=l.last&&this.foldWidgets.length>l.first&&this.foldWidgets.splice(l.first,this.foldWidgets.length)}}p.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,p,m){var g=e("../token_iterator").TokenIterator,a=e("../range").Range;function c(){this.findMatchingBracket=function(i,u){if(i.column==0)return null;var r=u||this.getLine(i.row).charAt(i.column-1);if(r=="")return null;var t=r.match(/([\(\[\{])|([\)\]\}])/);return t?t[1]?this.$findClosingBracket(t[1],i):this.$findOpeningBracket(t[2],i):null},this.getBracketRange=function(i){var u=this.getLine(i.row),r=!0,t,l=u.charAt(i.column-1),o=l&&l.match(/([\(\[\{])|([\)\]\}])/);if(o||(l=u.charAt(i.column),i={row:i.row,column:i.column+1},o=l&&l.match(/([\(\[\{])|([\)\]\}])/),r=!1),!o)return null;if(o[1]){var s=this.$findClosingBracket(o[1],i);if(!s)return null;t=a.fromPoints(i,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s=this.$findOpeningBracket(o[2],i);if(!s)return null;t=a.fromPoints(s,i),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(i,u){var r=this.getLine(i.row),t=/([\(\[\{])|([\)\]\}])/,l=!u&&r.charAt(i.column-1),o=l&&l.match(t);if(o||(l=(u===void 0||u)&&r.charAt(i.column),i={row:i.row,column:i.column+1},o=l&&l.match(t)),!o)return null;var s=new a(i.row,i.column-1,i.row,i.column),f=o[1]?this.$findClosingBracket(o[1],i):this.$findOpeningBracket(o[2],i);if(!f)return[s];var h=new a(f.row,f.column,f.row,f.column+1);return[s,h]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(i,u,r){var t=this.$brackets[i],l=1,o=new g(this,u.row,u.column),s=o.getCurrentToken();if(s||(s=o.stepForward()),!!s){r||(r=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var f=u.column-o.getCurrentTokenColumn()-2,h=s.value;;){for(;f>=0;){var v=h.charAt(f);if(v==t){if(l-=1,l==0)return{row:o.getCurrentTokenRow(),column:f+o.getCurrentTokenColumn()}}else v==i&&(l+=1);f-=1}do s=o.stepBackward();while(s&&!r.test(s.type));if(s==null)break;h=s.value,f=h.length-1}return null}},this.$findClosingBracket=function(i,u,r){var t=this.$brackets[i],l=1,o=new g(this,u.row,u.column),s=o.getCurrentToken();if(s||(s=o.stepForward()),!!s){r||(r=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var f=u.column-o.getCurrentTokenColumn();;){for(var h=s.value,v=h.length;f"?t=!0:u.type.indexOf("tag-name")!==-1&&(r=!0));while(u&&!r);return u},this.$findClosingTag=function(i,u){var r,t=u.value,l=u.value,o=0,s=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);u=i.stepForward();var f=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u.value.length),h=!1;do if(r=u,u=i.stepForward(),u){if(u.value===">"&&!h){var v=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);h=!0}if(u.type.indexOf("tag-name")!==-1){if(t=u.value,l===t){if(r.value==="<")o++;else if(r.value==="")var b=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);else return}}}else if(l===t&&u.value==="/>"&&(o--,o<0))var $=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+2),C=$,b=C,v=new a(f.end.row,f.end.column,f.end.row,f.end.column+1)}while(u&&o>=0);if(s&&v&&$&&b&&f&&C)return{openTag:new a(s.start.row,s.start.column,v.end.row,v.end.column),closeTag:new a($.start.row,$.start.column,b.end.row,b.end.column),openTagName:f,closeTagName:C}},this.$findOpeningTag=function(i,u){var r=i.getCurrentToken(),t=u.value,l=0,o=i.getCurrentTokenRow(),s=i.getCurrentTokenColumn(),f=s+2,h=new a(o,s,o,f);i.stepForward();var v=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u.value.length);if(u=i.stepForward(),!(!u||u.value!==">")){var $=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);i.stepBackward(),i.stepBackward();do if(u=r,o=i.getCurrentTokenRow(),s=i.getCurrentTokenColumn(),f=s+u.value.length,r=i.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(t===u.value)if(r.value==="<"){if(l++,l>0){var C=new a(o,s,o,f),b=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);do u=i.stepForward();while(u&&u.value!==">");var y=new a(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1)}}else r.value===""){for(var _=0,E=r;E;){if(E.type.indexOf("tag-name")!==-1&&E.value===t){l--;break}else if(E.value==="<")break;E=i.stepBackward(),_++}for(var O=0;O<_;O++)i.stepForward()}}while(r&&l<=0);if(b&&y&&h&&$&&C&&v)return{openTag:new a(b.start.row,b.start.column,y.end.row,y.end.column),closeTag:new a(h.start.row,h.start.column,$.end.row,$.end.column),openTagName:C,closeTagName:v}}}}p.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/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,p,m){var g=e("./lib/oop"),a=e("./lib/lang"),c=e("./bidihandler").BidiHandler,i=e("./config"),u=e("./lib/event_emitter").EventEmitter,r=e("./selection").Selection,t=e("./mode/text").Mode,l=e("./range").Range,o=e("./document").Document,s=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,h=function(){function x(w,M){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++x.$uid,this.$foldData.toString=function(){return this.join(` +`)},this.bgTokenizer=new s(new t().getTokenizer(),this);var k=this;this.bgTokenizer.on("update",function(S){k._signal("tokenizerUpdate",S)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof w!="object"||!w.getLine)&&(w=new o(w)),this.setDocument(w),this.selection=new r(this),this.$bidiHandler=new c(this),i.resetOptions(this),this.setMode(M),i._signal("session",this),this.destroyed=!1}return x.prototype.setDocument=function(w){this.doc&&this.doc.off("change",this.$onChange),this.doc=w,w.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},x.prototype.getDocument=function(){return this.doc},x.prototype.$resetRowCache=function(w){if(!w){this.$docRowCache=[],this.$screenRowCache=[];return}var M=this.$docRowCache.length,k=this.$getRowCacheIndex(this.$docRowCache,w)+1;M>k&&(this.$docRowCache.splice(k,M),this.$screenRowCache.splice(k,M))},x.prototype.$getRowCacheIndex=function(w,M){for(var k=0,S=w.length-1;k<=S;){var q=k+S>>1,L=w[q];if(M>L)k=q+1;else if(M=M));L++);return S=k[L],S?(S.index=L,S.start=q-S.value.length,S):null},x.prototype.setUndoManager=function(w){if(this.$undoManager=w,this.$informUndoManager&&this.$informUndoManager.cancel(),w){var M=this;w.addSession(this),this.$syncInformUndoManager=function(){M.$informUndoManager.cancel(),M.mergeUndoDeltas=!1},this.$informUndoManager=a.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},x.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},x.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},x.prototype.getTabString=function(){return this.getUseSoftTabs()?a.stringRepeat(" ",this.getTabSize()):" "},x.prototype.setUseSoftTabs=function(w){this.setOption("useSoftTabs",w)},x.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},x.prototype.setTabSize=function(w){this.setOption("tabSize",w)},x.prototype.getTabSize=function(){return this.$tabSize},x.prototype.isTabStop=function(w){return this.$useSoftTabs&&w.column%this.$tabSize==0},x.prototype.setNavigateWithinSoftTabs=function(w){this.setOption("navigateWithinSoftTabs",w)},x.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},x.prototype.setOverwrite=function(w){this.setOption("overwrite",w)},x.prototype.getOverwrite=function(){return this.$overwrite},x.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},x.prototype.addGutterDecoration=function(w,M){this.$decorations[w]||(this.$decorations[w]=""),this.$decorations[w]+=" "+M,this._signal("changeBreakpoint",{})},x.prototype.removeGutterDecoration=function(w,M){this.$decorations[w]=(this.$decorations[w]||"").replace(" "+M,""),this._signal("changeBreakpoint",{})},x.prototype.getBreakpoints=function(){return this.$breakpoints},x.prototype.setBreakpoints=function(w){this.$breakpoints=[];for(var M=0;M0&&(S=!!k.charAt(M-1).match(this.tokenRe)),S||(S=!!k.charAt(M).match(this.tokenRe)),S)var q=this.tokenRe;else if(/^\s+$/.test(k.slice(M-1,M+1)))var q=/\s/;else var q=this.nonTokenRe;var L=M;if(L>0){do L--;while(L>=0&&k.charAt(L).match(q));L++}for(var A=M;Aw&&(w=M.screenWidth)}),this.lineWidgetWidth=w},x.prototype.$computeWidth=function(w){if(this.$modified||w){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var M=this.doc.getAllLines(),k=this.$rowLengthCache,S=0,q=0,L=this.$foldData[q],A=L?L.start.row:1/0,D=M.length,N=0;NA){if(N=L.end.row+1,N>=D)break;L=this.$foldData[q++],A=L?L.start.row:1/0}k[N]==null&&(k[N]=this.$getStringScreenWidth(M[N])[0]),k[N]>S&&(S=k[N])}this.screenWidth=S}},x.prototype.getLine=function(w){return this.doc.getLine(w)},x.prototype.getLines=function(w,M){return this.doc.getLines(w,M)},x.prototype.getLength=function(){return this.doc.getLength()},x.prototype.getTextRange=function(w){return this.doc.getTextRange(w||this.selection.getRange())},x.prototype.insert=function(w,M){return this.doc.insert(w,M)},x.prototype.remove=function(w){return this.doc.remove(w)},x.prototype.removeFullLines=function(w,M){return this.doc.removeFullLines(w,M)},x.prototype.undoChanges=function(w,M){if(!!w.length){this.$fromUndo=!0;for(var k=w.length-1;k!=-1;k--){var S=w[k];S.action=="insert"||S.action=="remove"?this.doc.revertDelta(S):S.folds&&this.addFolds(S.folds)}!M&&this.$undoSelect&&(w.selectionBefore?this.selection.fromJSON(w.selectionBefore):this.selection.setRange(this.$getUndoSelection(w,!0))),this.$fromUndo=!1}},x.prototype.redoChanges=function(w,M){if(!!w.length){this.$fromUndo=!0;for(var k=0;kw.end.column&&(L.start.column+=D),L.end.row==w.end.row&&L.end.column>w.end.column&&(L.end.column+=D)),A&&L.start.row>=w.end.row&&(L.start.row+=A,L.end.row+=A)}if(L.end=this.insert(L.start,S),q.length){var N=w.start,B=L.start,A=B.row-N.row,D=B.column-N.column;this.addFolds(q.map(function(F){return F=F.clone(),F.start.row==N.row&&(F.start.column+=D),F.end.row==N.row&&(F.end.column+=D),F.start.row+=A,F.end.row+=A,F}))}return L},x.prototype.indentRows=function(w,M,k){k=k.replace(/\t/g,this.getTabString());for(var S=w;S<=M;S++)this.doc.insertInLine({row:S,column:0},k)},x.prototype.outdentRows=function(w){for(var M=w.collapseRows(),k=new l(0,0,0,0),S=this.getTabSize(),q=M.start.row;q<=M.end.row;++q){var L=this.getLine(q);k.start.row=q,k.end.row=q;for(var A=0;A0){var S=this.getRowFoldEnd(M+k);if(S>this.doc.getLength()-1)return 0;var q=S-M}else{w=this.$clipRowToDocument(w),M=this.$clipRowToDocument(M);var q=M-w+1}var L=new l(w,0,M,Number.MAX_VALUE),A=this.getFoldsInRange(L).map(function(N){return N=N.clone(),N.start.row+=q,N.end.row+=q,N}),D=k==0?this.doc.getLines(w,M):this.doc.removeFullLines(w,M);return this.doc.insertFullLines(w+q,D),A.length&&this.addFolds(A),q},x.prototype.moveLinesUp=function(w,M){return this.$moveLines(w,M,-1)},x.prototype.moveLinesDown=function(w,M){return this.$moveLines(w,M,1)},x.prototype.duplicateLines=function(w,M){return this.$moveLines(w,M,0)},x.prototype.$clipRowToDocument=function(w){return Math.max(0,Math.min(w,this.doc.getLength()-1))},x.prototype.$clipColumnToRow=function(w,M){return M<0?0:Math.min(this.doc.getLine(w).length,M)},x.prototype.$clipPositionToDocument=function(w,M){if(M=Math.max(0,M),w<0)w=0,M=0;else{var k=this.doc.getLength();w>=k?(w=k-1,M=this.doc.getLine(k-1).length):M=Math.min(this.doc.getLine(w).length,M)}return{row:w,column:M}},x.prototype.$clipRangeToDocument=function(w){w.start.row<0?(w.start.row=0,w.start.column=0):w.start.column=this.$clipColumnToRow(w.start.row,w.start.column);var M=this.doc.getLength()-1;return w.end.row>M?(w.end.row=M,w.end.column=this.doc.getLine(M).length):w.end.column=this.$clipColumnToRow(w.end.row,w.end.column),w},x.prototype.setUseWrapMode=function(w){if(w!=this.$useWrapMode){if(this.$useWrapMode=w,this.$modified=!0,this.$resetRowCache(0),w){var M=this.getLength();this.$wrapData=Array(M),this.$updateWrapData(0,M-1)}this._signal("changeWrapMode")}},x.prototype.getUseWrapMode=function(){return this.$useWrapMode},x.prototype.setWrapLimitRange=function(w,M){(this.$wrapLimitRange.min!==w||this.$wrapLimitRange.max!==M)&&(this.$wrapLimitRange={min:w,max:M},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},x.prototype.adjustWrapLimit=function(w,M){var k=this.$wrapLimitRange;k.max<0&&(k={min:M,max:M});var S=this.$constrainWrapLimit(w,k.min,k.max);return S!=this.$wrapLimit&&S>1?(this.$wrapLimit=S,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},x.prototype.$constrainWrapLimit=function(w,M,k){return M&&(w=Math.max(M,w)),k&&(w=Math.min(k,w)),w},x.prototype.getWrapLimit=function(){return this.$wrapLimit},x.prototype.setWrapLimit=function(w){this.setWrapLimitRange(w,w)},x.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},x.prototype.$updateInternalDataOnChange=function(w){var M=this.$useWrapMode,k=w.action,S=w.start,q=w.end,L=S.row,A=q.row,D=A-L,N=null;if(this.$updating=!0,D!=0)if(k==="remove"){this[M?"$wrapData":"$rowLengthCache"].splice(L,D);var B=this.$foldData;N=this.getFoldsInRange(w),this.removeFolds(N);var R=this.getFoldLine(q.row),V=0;if(R){R.addRemoveChars(q.row,q.column,S.column-q.column),R.shiftRow(-D);var F=this.getFoldLine(L);F&&F!==R&&(F.merge(R),R=F),V=B.indexOf(R)+1}for(V;V=q.row&&R.shiftRow(-D)}A=L}else{var P=Array(D);P.unshift(L,0);var j=M?this.$wrapData:this.$rowLengthCache;j.splice.apply(j,P);var B=this.$foldData,R=this.getFoldLine(L),V=0;if(R){var I=R.range.compareInside(S.row,S.column);I==0?(R=R.split(S.row,S.column),R&&(R.shiftRow(D),R.addRemoveChars(A,0,q.column-S.column))):I==-1&&(R.addRemoveChars(L,0,q.column-S.column),R.shiftRow(D)),V=B.indexOf(R)+1}for(V;V=L&&R.shiftRow(D)}}else{D=Math.abs(w.start.column-w.end.column),k==="remove"&&(N=this.getFoldsInRange(w),this.removeFolds(N),D=-D);var R=this.getFoldLine(L);R&&R.addRemoveChars(L,S.column,D)}return M&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,M?this.$updateWrapData(L,A):this.$updateRowLengthCache(L,A),N},x.prototype.$updateRowLengthCache=function(w,M,k){this.$rowLengthCache[w]=null,this.$rowLengthCache[M]=null},x.prototype.$updateWrapData=function(w,M){var k=this.doc.getAllLines(),S=this.getTabSize(),q=this.$wrapData,L=this.$wrapLimit,A,D,N=w;for(M=Math.min(M,k.length-1);N<=M;)D=this.getFoldLine(N,D),D?(A=[],D.walk(function(B,R,V,F){var P;if(B!=null){P=this.$getDisplayTokens(B,A.length),P[0]=C;for(var j=1;jM-F;){var P=L+M-F;if(w[P-1]>=_&&w[P]>=_){V(P);continue}if(w[P]==C||w[P]==b){for(P;P!=L-1&&w[P]!=C;P--);if(P>L){V(P);continue}for(P=L+M,P;P>2)),L-1);P>j&&w[P]j&&w[P]j&&w[P]==y;)P--}else for(;P>j&&w[P]<_;)P--;if(P>j){V(++P);continue}P=L+M,w[P]==$&&P--,V(P-F)}return S},x.prototype.$getDisplayTokens=function(w,M){var k=[],S;M=M||0;for(var q=0;q39&&L<48||L>57&&L<64?k.push(y):L>=4352&&T(L)?k.push(v,$):k.push(v)}return k},x.prototype.$getStringScreenWidth=function(w,M,k){if(M==0)return[0,0];M==null&&(M=1/0),k=k||0;var S,q;for(q=0;q=4352&&T(S)?k+=2:k+=1,!(k>M));q++);return[k,q]},x.prototype.getRowLength=function(w){var M=1;return this.lineWidgets&&(M+=this.lineWidgets[w]&&this.lineWidgets[w].rowCount||0),!this.$useWrapMode||!this.$wrapData[w]?M:this.$wrapData[w].length+M},x.prototype.getRowLineCount=function(w){return!this.$useWrapMode||!this.$wrapData[w]?1:this.$wrapData[w].length+1},x.prototype.getRowWrapIndent=function(w){if(this.$useWrapMode){var M=this.screenToDocumentPosition(w,Number.MAX_VALUE),k=this.$wrapData[M.row];return k.length&&k[0]=0)var D=B[R],q=this.$docRowCache[R],F=w>B[V-1];else var F=!V;for(var P=this.getLength()-1,j=this.getNextFoldLine(q),I=j?j.start.row:1/0;D<=w&&(N=this.getRowLength(q),!(D+N>w||q>=P));)D+=N,q++,q>I&&(q=j.end.row+1,j=this.getNextFoldLine(q,j),I=j?j.start.row:1/0),F&&(this.$docRowCache.push(q),this.$screenRowCache.push(D));if(j&&j.start.row<=q)S=this.getFoldDisplayLine(j),q=j.start.row;else{if(D+N<=w||q>P)return{row:P,column:this.getLine(P).length};S=this.getLine(q),j=null}var W=0,H=Math.floor(w-D);if(this.$useWrapMode){var z=this.$wrapData[q];z&&(A=z[H],H>0&&z.length&&(W=z.indent,L=z[H-1]||z[z.length-1],S=S.substring(L)))}return k!==void 0&&this.$bidiHandler.isBidiRow(D+H,q,H)&&(M=this.$bidiHandler.offsetToCol(k)),L+=this.$getStringScreenWidth(S,M-W)[1],this.$useWrapMode&&L>=A&&(L=A-1),j?j.idxToPosition(L):{row:q,column:L}},x.prototype.documentToScreenPosition=function(w,M){if(typeof M=="undefined")var k=this.$clipPositionToDocument(w.row,w.column);else k=this.$clipPositionToDocument(w,M);w=k.row,M=k.column;var S=0,q=null,L=null;L=this.getFoldAt(w,M,1),L&&(w=L.start.row,M=L.start.column);var A,D=0,N=this.$docRowCache,B=this.$getRowCacheIndex(N,w),R=N.length;if(R&&B>=0)var D=N[B],S=this.$screenRowCache[B],V=w>N[R-1];else var V=!R;for(var F=this.getNextFoldLine(D),P=F?F.start.row:1/0;D=P){if(A=F.end.row+1,A>w)break;F=this.getNextFoldLine(A,F),P=F?F.start.row:1/0}else A=D+1;S+=this.getRowLength(D),D=A,V&&(this.$docRowCache.push(D),this.$screenRowCache.push(S))}var j="";F&&D>=P?(j=this.getFoldDisplayLine(F,w,M),q=F.start.row):(j=this.getLine(w).substring(0,M),q=w);var I=0;if(this.$useWrapMode){var W=this.$wrapData[q];if(W){for(var H=0;j.length>=W[H];)S++,H++;j=j.substring(W[H-1]||0,j.length),I=H>0?W.indent:0}}return this.lineWidgets&&this.lineWidgets[D]&&this.lineWidgets[D].rowsAbove&&(S+=this.lineWidgets[D].rowsAbove),{row:S,column:I+this.$getStringScreenWidth(j)[0]}},x.prototype.documentToScreenColumn=function(w,M){return this.documentToScreenPosition(w,M).column},x.prototype.documentToScreenRow=function(w,M){return this.documentToScreenPosition(w,M).row},x.prototype.getScreenLength=function(){var w=0,M=null;if(this.$useWrapMode)for(var q=this.$wrapData.length,L=0,S=0,M=this.$foldData[S++],A=M?M.start.row:1/0;LA&&(L=M.end.row+1,M=this.$foldData[S++],A=M?M.start.row:1/0)}else{w=this.getLength();for(var k=this.$foldData,S=0;Sk));L++);return[S,L]})},x.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},x}();h.$uid=0,h.prototype.$modes=i.$modes,h.prototype.getValue=h.prototype.toString,h.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},h.prototype.$overwrite=!1,h.prototype.$mode=null,h.prototype.$modeId=null,h.prototype.$scrollTop=0,h.prototype.$scrollLeft=0,h.prototype.$wrapLimit=80,h.prototype.$useWrapMode=!1,h.prototype.$wrapLimitRange={min:null,max:null},h.prototype.lineWidgets=null,h.prototype.isFullWidth=T,g.implement(h.prototype,u);var v=1,$=2,C=3,b=4,y=9,_=10,E=11,O=12;function T(x){return x<4352?!1:x>=4352&&x<=4447||x>=4515&&x<=4519||x>=4602&&x<=4607||x>=9001&&x<=9002||x>=11904&&x<=11929||x>=11931&&x<=12019||x>=12032&&x<=12245||x>=12272&&x<=12283||x>=12288&&x<=12350||x>=12353&&x<=12438||x>=12441&&x<=12543||x>=12549&&x<=12589||x>=12593&&x<=12686||x>=12688&&x<=12730||x>=12736&&x<=12771||x>=12784&&x<=12830||x>=12832&&x<=12871||x>=12880&&x<=13054||x>=13056&&x<=19903||x>=19968&&x<=42124||x>=42128&&x<=42182||x>=43360&&x<=43388||x>=44032&&x<=55203||x>=55216&&x<=55238||x>=55243&&x<=55291||x>=63744&&x<=64255||x>=65040&&x<=65049||x>=65072&&x<=65106||x>=65108&&x<=65126||x>=65128&&x<=65131||x>=65281&&x<=65376||x>=65504&&x<=65510}e("./edit_session/folding").Folding.call(h.prototype),e("./edit_session/bracket_match").BracketMatch.call(h.prototype),i.defineOptions(h.prototype,"session",{wrap:{set:function(x){if(!x||x=="off"?x=!1:x=="free"?x=!0:x=="printMargin"?x=-1:typeof x=="string"&&(x=parseInt(x,10)||!1),this.$wrap!=x)if(this.$wrap=x,!x)this.setUseWrapMode(!1);else{var w=typeof x=="number"?x:null;this.setWrapLimitRange(w,w),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(x){x=x=="auto"?this.$mode.type!="text":x!="text",x!=this.$wrapAsCode&&(this.$wrapAsCode=x,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(x){this.$useWorker=x,this.$stopWorker(),x&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(x){x=parseInt(x),x>0&&this.$tabSize!==x&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=x,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(x){this.setFoldStyle(x)},handlesSet:!0},overwrite:{set:function(x){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(x){this.doc.setNewLineMode(x)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(x){this.setMode(x)},get:function(){return this.$modeId},handlesSet:!0}}),p.EditSession=h}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,p,m){var g=e("./lib/lang"),a=e("./lib/oop"),c=e("./range").Range,i=function(){function r(){this.$options={}}return r.prototype.set=function(t){return a.mixin(this.$options,t),this},r.prototype.getOptions=function(){return g.copyObject(this.$options)},r.prototype.setOptions=function(t){this.$options=t},r.prototype.find=function(t){var l=this.$options,o=this.$matchIterator(t,l);if(!o)return!1;var s=null;return o.forEach(function(f,h,v,$){return s=new c(f,h,v,$),h==$&&l.start&&l.start.start&&l.skipCurrent!=!1&&s.isEqual(l.start)?(s=null,!1):!0}),s},r.prototype.findAll=function(t){var l=this.$options;if(!l.needle)return[];this.$assembleRegExp(l);var o=l.range,s=o?t.getLines(o.start.row,o.end.row):t.doc.getAllLines(),f=[],h=l.re;if(l.$isMultiLine){var v=h.length,$=s.length-v,C;e:for(var b=h.offset||0;b<=$;b++){for(var y=0;yO||(f.push(C=new c(b,O,b+v-1,T)),v>2&&(b=b+v-2))}}else for(var x=0;xS&&f[y].end.row==q;)y--;for(f=f.slice(x,y+1),x=0,y=f.length;x=$;O--)if(_(O,Number.MAX_VALUE,E))return;if(l.wrap!=!1){for(O=C,$=v.row;O>=$;O--)if(_(O,Number.MAX_VALUE,E))return}}};else var b=function(O){var T=v.row;if(!_(T,v.column,O)){for(T=T+1;T<=C;T++)if(_(T,0,O))return;if(l.wrap!=!1){for(T=$,C=v.row;T<=C;T++)if(_(T,0,O))return}}};if(l.$isMultiLine)var y=o.length,_=function(E,O,T){var x=s?E-y+1:E;if(!(x<0||x+y>t.getLength())){var w=t.getLine(x),M=w.search(o[0]);if(!(!s&&MO)&&T(x,M,x+y-1,S))return!0}}};else if(s)var _=function(O,T,x){var w=t.getLine(O),M=[],k,S=0;for(o.lastIndex=0;k=o.exec(w);){var q=k[0].length;if(S=k.index,!q){if(S>=w.length)break;o.lastIndex=S+=1}if(k.index+q>T)break;M.push(k.index,q)}for(var L=M.length-1;L>=0;L-=2){var A=M[L-1],q=M[L];if(x(O,A,O,A+q))return!0}};else var _=function(O,T,x){var w=t.getLine(O),M,k;for(o.lastIndex=T;k=o.exec(w);){var S=k[0].length;if(M=k.index,x(O,M,O,M+S))return!0;if(!S&&(o.lastIndex=M+=1,M>=w.length))return!1}};return{forEach:b}},r}();function u(r,t){function l(o){return/\w/.test(o)||t.regExp?"\\b":""}return l(r[0])+r+l(r[r.length-1])}p.Search=i}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,p,m){var g=e("../lib/keys"),a=e("../lib/useragent"),c=g.KEY_MODS;function i(r,t){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(r),this.$singleCommand=!0}function u(r,t){i.call(this,r,t),this.$singleCommand=!1}u.prototype=i.prototype,function(){this.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},this.removeCommand=function(t,l){var o=t&&(typeof t=="string"?t:t.name);t=this.commands[o],l||delete this.commands[o];var s=this.commandKeyBinding;for(var f in s){var h=s[f];if(h==t)delete s[f];else if(Array.isArray(h)){var v=h.indexOf(t);v!=-1&&(h.splice(v,1),h.length==1&&(s[f]=h[0]))}}},this.bindKey=function(t,l,o){if(typeof t=="object"&&t&&(o==null&&(o=t.position),t=t[this.platform]),!!t){if(typeof l=="function")return this.addCommand({exec:l,bindKey:t,name:l.name||t});t.split("|").forEach(function(s){var f="";if(s.indexOf(" ")!=-1){var h=s.split(/\s+/);s=h.pop(),h.forEach(function(C){var b=this.parseKeys(C),y=c[b.hashId]+b.key;f+=(f?" ":"")+y,this._addCommandToBinding(f,"chainKeys")},this),f+=" "}var v=this.parseKeys(s),$=c[v.hashId]+v.key;this._addCommandToBinding(f+$,l,o)},this)}};function r(t){return typeof t=="object"&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}this._addCommandToBinding=function(t,l,o){var s=this.commandKeyBinding,f;if(!l)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=l;else{Array.isArray(s[t])?(f=s[t].indexOf(l))!=-1&&s[t].splice(f,1):s[t]=[s[t]],typeof o!="number"&&(o=r(l));var h=s[t];for(f=0;fo)break}h.splice(f,0,l)}},this.addCommands=function(t){t&&Object.keys(t).forEach(function(l){var o=t[l];if(!!o){if(typeof o=="string")return this.bindKey(o,l);typeof o=="function"&&(o={exec:o}),typeof o=="object"&&(o.name||(o.name=l),this.addCommand(o))}},this)},this.removeCommands=function(t){Object.keys(t).forEach(function(l){this.removeCommand(t[l])},this)},this.bindKeys=function(t){Object.keys(t).forEach(function(l){this.bindKey(l,t[l])},this)},this._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},this.parseKeys=function(t){var l=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),o=l.pop(),s=g[o];if(g.FUNCTION_KEYS[s])o=g.FUNCTION_KEYS[s].toLowerCase();else if(l.length){if(l.length==1&&l[0]=="shift")return{key:o.toUpperCase(),hashId:-1}}else return{key:o,hashId:-1};for(var f=0,h=l.length;h--;){var v=g.KEY_MODS[l[h]];if(v==null)return typeof console!="undefined"&&console.error("invalid modifier "+l[h]+" in "+t),!1;f|=v}return{key:o,hashId:f}},this.findKeyCommand=function(l,o){var s=c[l]+o;return this.commandKeyBinding[s]},this.handleKeyboard=function(t,l,o,s){if(!(s<0)){var f=c[l]+o,h=this.commandKeyBinding[f];return t.$keyChain&&(t.$keyChain+=" "+f,h=this.commandKeyBinding[t.$keyChain]||h),h&&(h=="chainKeys"||h[h.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||f,{command:"null"}):(t.$keyChain&&((!l||l==4)&&o.length==1?t.$keyChain=t.$keyChain.slice(0,-f.length-1):(l==-1||s>0)&&(t.$keyChain="")),{command:h})}},this.getStatusText=function(t,l){return l.$keyChain||""}}.call(i.prototype),p.HashHandler=i,p.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,p,m){var g=this&&this.__extends||function(){var r=function(t,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var f in s)Object.prototype.hasOwnProperty.call(s,f)&&(o[f]=s[f])},r(t,l)};return function(t,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(t,l);function o(){this.constructor=t}t.prototype=l===null?Object.create(l):(o.prototype=l.prototype,new o)}}(),a=e("../lib/oop"),c=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,u=function(r){g(t,r);function t(l,o){var s=r.call(this,o,l)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(f){return f.args?f.command.exec(f.editor,f.args,f.event,!1):f.command.exec(f.editor,{},f.event,!0)}),s}return t.prototype.exec=function(l,o,s){if(Array.isArray(l)){for(var f=l.length;f--;)if(this.exec(l[f],o,s))return!0;return!1}if(typeof l=="string"&&(l=this.commands[l]),!l||o&&o.$readOnly&&!l.readOnly||this.$checkCommandState!=!1&&l.isAvailable&&!l.isAvailable(o))return!1;var h={editor:o,command:l,args:s};return h.returnValue=this._emit("exec",h),this._signal("afterExec",h),h.returnValue!==!1},t.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(o){this.macro.push([o.command,o.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(l){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(l);try{this.$inReplay=!0,this.macro.forEach(function(o){typeof o=="string"?this.exec(o,l):this.exec(o[0],l,o[1])},this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(l){return l.map(function(o){return typeof o[0]!="string"&&(o[0]=o[0].name),o[1]||(o=o[0]),o})},t}(c);a.implement(u.prototype,i),p.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,p,m){var g=e("../lib/lang"),a=e("../config"),c=e("../range").Range;function i(r,t){return{win:r,mac:t}}p.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:i("Ctrl-,","Command-,"),exec:function(r){a.loadModule("ace/ext/settings_menu",function(t){t.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:i("Alt-E","F4"),exec:function(r){a.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:i("Alt-Shift-E","Shift-F4"),exec:function(r){a.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:i("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:i(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:i("Ctrl-L","Command-L"),exec:function(r,t){typeof t=="number"&&!isNaN(t)&&r.gotoLine(t),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:i("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:i("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:i("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:i("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:i("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:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:i("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:i("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:i("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:i("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:i("Ctrl-F","Command-F"),exec:function(r){a.loadModule("ace/ext/searchbox",function(t){t.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:i("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:i("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:i("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:i("Up","Up|Ctrl-P"),exec:function(r,t){r.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:i("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:i("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:i("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:i("Down","Down|Ctrl-N"),exec:function(r,t){r.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:i("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:i("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:i("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:i("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:i("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:i("Left","Left|Ctrl-B"),exec:function(r,t){r.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:i("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:i("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:i("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:i("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:i("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:i("Right","Right|Ctrl-F"),exec:function(r,t){r.navigateRight(t.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:i(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:i("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:i(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:i("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:i("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:i("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:i("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:i("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:i("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:i(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 t=r.$copyWithEmptySelection&&r.selection.isEmpty(),l=t?r.selection.getLineRange():r.selection.getRange();r._emit("cut",l),l.isEmpty()||r.session.remove(l),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,t){r.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:i("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:i("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:i("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:i("Ctrl-H","Command-Option-F"),exec:function(r){a.loadModule("ace/ext/searchbox",function(t){t.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:i("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:i("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:i("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:i("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:i("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:i("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:i("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:i("Ctrl-Shift-Backspace",null),exec:function(r){var t=r.selection.getRange();t.start.column=0,r.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:i("Ctrl-Shift-Delete",null),exec:function(r){var t=r.selection.getRange();t.end.column=Number.MAX_VALUE,r.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:i("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:i("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:i("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,t){r.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,t){r.insert(g.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:i(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:i("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:i(null,null),exec:function(r){r.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:i("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var t=r.selection.getRange();t.start.column=t.end.column=0,t.end.row++,r.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:i("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:i(null,null),exec:function(r){for(var t=r.selection.isBackwards(),l=t?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),o=t?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),s=r.session.doc.getLine(l.row).length,f=r.session.doc.getTextRange(r.selection.getRange()),h=f.replace(/\n\s*/," ").length,v=r.session.doc.getLine(l.row),$=l.row+1;$<=o.row+1;$++){var C=g.stringTrimLeft(g.stringTrimRight(r.session.doc.getLine($)));C.length!==0&&(C=" "+C),v+=C}o.row+10?(r.selection.moveCursorTo(l.row,l.column),r.selection.selectTo(l.row,l.column+h)):(s=r.session.doc.getLine(l.row).length>s?s+1:s,r.selection.moveCursorTo(l.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:i(null,null),exec:function(r){var t=r.session.doc.getLength()-1,l=r.session.doc.getLine(t).length,o=r.selection.rangeList.ranges,s=[];o.length<1&&(o=[r.selection.getRange()]);for(var f=0;fu[r].column&&r++,o.unshift(r,0),u.splice.apply(u,o),this.$updateRows()}}},c.prototype.$updateRows=function(){var i=this.session.lineWidgets;if(!!i){var u=!0;i.forEach(function(r,t){if(r)for(u=!1,r.row=t;r.$oldWidget;)r.$oldWidget.row=t,r=r.$oldWidget}),u&&(this.session.lineWidgets=null)}},c.prototype.$registerLineWidget=function(i){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[i.row];return u&&(i.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[i.row]=i,i},c.prototype.addLineWidget=function(i){if(this.$registerLineWidget(i),i.session=this.session,!this.editor)return i;var u=this.editor.renderer;i.html&&!i.el&&(i.el=g.createElement("div"),i.el.innerHTML=i.html),i.text&&!i.el&&(i.el=g.createElement("div"),i.el.textContent=i.text),i.el&&(g.addCssClass(i.el,"ace_lineWidgetContainer"),i.className&&g.addCssClass(i.el,i.className),i.el.style.position="absolute",i.el.style.zIndex=5,u.container.appendChild(i.el),i._inDocument=!0,i.coverGutter||(i.el.style.zIndex=3),i.pixelHeight==null&&(i.pixelHeight=i.el.offsetHeight)),i.rowCount==null&&(i.rowCount=i.pixelHeight/u.layerConfig.lineHeight);var r=this.session.getFoldAt(i.row,0);if(i.$fold=r,r){var t=this.session.lineWidgets;i.row==r.end.row&&!t[r.start.row]?t[r.start.row]=i:i.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:i.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(i),i},c.prototype.removeLineWidget=function(i){if(i._inDocument=!1,i.session=null,i.el&&i.el.parentNode&&i.el.parentNode.removeChild(i.el),i.editor&&i.editor.destroy)try{i.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[i.row];if(u==i)this.session.lineWidgets[i.row]=i.$oldWidget,i.$oldWidget&&this.onWidgetChanged(i.$oldWidget);else for(;u;){if(u.$oldWidget==i){u.$oldWidget=i.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:i.row}}}),this.$updateRows()},c.prototype.getWidgetsAtRow=function(i){for(var u=this.session.lineWidgets,r=u&&u[i],t=[];r;)t.push(r),r=r.$oldWidget;return t},c.prototype.onWidgetChanged=function(i){this.session._changedWidgets.push(i),this.editor&&this.editor.renderer.updateFull()},c.prototype.measureWidgets=function(i,u){var r=this.session._changedWidgets,t=u.layerConfig;if(!(!r||!r.length)){for(var l=1/0,o=0;o0&&!t[l];)l--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,u.$cursorLayer.config=r;for(var s=l;s<=o;s++){var f=t[s];if(!(!f||!f.el)){if(f.hidden){f.el.style.top=-100-(f.pixelHeight||0)+"px";continue}f._inDocument||(f._inDocument=!0,u.container.appendChild(f.el));var h=u.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;f.coverLine||(h+=r.lineHeight*this.session.getRowLineCount(f.row)),f.el.style.top=h-r.offset+"px";var v=f.coverGutter?0:u.gutterWidth;f.fixedWidth||(v-=u.scrollLeft),f.el.style.left=v+"px",f.fullWidth&&f.screenWidth&&(f.el.style.minWidth=r.width+2*r.padding+"px"),f.fixedWidth?f.el.style.right=u.scrollBar.getWidth()+"px":f.el.style.right=""}}}},c}();p.LineWidgets=a}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,p,m){var g=e("../lib/keys"),a=e("../mouse/default_gutter_handler").GutterTooltip,c=function(){function i(u){this.editor=u,this.gutterLayer=u.renderer.$gutterLayer,this.element=u.renderer.$gutter,this.lines=u.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new a(this.editor)}return i.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))},i.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))},i.prototype.$onGutterKeyDown=function(u){if(this.annotationTooltip.isOpen){u.preventDefault(),u.keyCode===g.escape&&this.annotationTooltip.hide();return}if(u.target===this.element){if(u.keyCode!=g.enter)return;u.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout(function(){var f=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),h=this.$findNearestFoldWidget(f),v=this.$findNearestAnnotation(f);if(!(h===null&&v===null)){if(h===null&&v!==null){this.activeRowIndex=v,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(h!==null&&v===null){this.activeRowIndex=h,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(v-f)0||u+r=0&&this.$isFoldWidgetVisible(u-r))return u-r;if(u+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(u+r))return u+r}return null},i.prototype.$findNearestAnnotation=function(u){if(this.$isAnnotationVisible(u))return u;for(var r=0;u-r>0||u+r=0&&this.$isAnnotationVisible(u-r))return u-r;if(u+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(u+r))return u+r}return null},i.prototype.$focusFoldWidget=function(u){if(u!=null){var r=this.$getFoldWidget(u);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},i.prototype.$focusAnnotation=function(u){if(u!=null){var r=this.$getAnnotation(u);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.setAttribute("role","button"),r.focus()}},i.prototype.$blurFoldWidget=function(u){var r=this.$getFoldWidget(u);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},i.prototype.$blurAnnotation=function(u){var r=this.$getAnnotation(u);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.removeAttribute("role"),r.blur()},i.prototype.$moveFoldWidgetUp=function(){for(var u=this.activeRowIndex;u>0;)if(u--,this.$isFoldWidgetVisible(u)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=u,this.$focusFoldWidget(this.activeRowIndex);return}},i.prototype.$moveFoldWidgetDown=function(){for(var u=this.activeRowIndex;u0;)if(u--,this.$isAnnotationVisible(u)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusAnnotation(this.activeRowIndex);return}},i.prototype.$moveAnnotationDown=function(){for(var u=this.activeRowIndex;u=k.length&&(k=void 0),{value:k&&k[L++],done:!k}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("./lib/oop"),c=e("./lib/dom"),i=e("./lib/lang"),u=e("./lib/useragent"),r=e("./keyboard/textinput").TextInput,t=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,o=e("./keyboard/keybinding").KeyBinding,s=e("./edit_session").EditSession,f=e("./search").Search,h=e("./range").Range,v=e("./lib/event_emitter").EventEmitter,$=e("./commands/command_manager").CommandManager,C=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,_=e("./line_widgets").LineWidgets,E=e("./keyboard/gutter_handler").GutterKeyboardHandler,O=e("./config").nls,T=e("./clipboard"),x=e("./lib/keys"),w=function(){function k(S,q,L){this.$toDestroy=[];var A=S.getContainerElement();this.container=A,this.renderer=S,this.id="editor"+ ++k.$uid,this.commands=new $(u.isMac?"mac":"win",C),typeof document=="object"&&(this.textInput=new r(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new t(this),new l(this)),this.keyBinding=new o(this),this.$search=new f().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=i.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(D,N){N._$emitInputEvent.schedule(31)}),this.setSession(q||L&&L.session||new s("")),b.resetOptions(this),L&&this.setOptions(L),b._signal("editor",this)}return k.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=i.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},k.prototype.startOperation=function(S){if(this.curOp){if(!S||this.curOp.command)return;this.prevOp=this.curOp}S||(this.previousCommand=null,S={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:S.command||{},args:S.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},k.prototype.endOperation=function(S){if(this.curOp&&this.session){if(S&&S.returnValue===!1||!this.session)return this.curOp=null;if(S==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var q=this.curOp.command,L=q&&q.scrollIntoView;if(L){switch(L){case"center-animate":L="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var A=this.selection.getRange(),D=this.renderer.layerConfig;(A.start.row>=D.lastRow||A.end.row<=D.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}L=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var N=this.selection.toJSON();this.curOp.selectionAfter=N,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(N),this.prevOp=this.curOp,this.curOp=null}},k.prototype.$historyTracker=function(S){if(!!this.$mergeUndoDeltas){var q=this.prevOp,L=this.$mergeableCommands,A=q.command&&S.command.name==q.command.name;if(S.command.name=="insertstring"){var D=S.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),A=A&&this.mergeNextCommand&&(!/\s/.test(D)||/\s/.test(q.args)),this.mergeNextCommand=!0}else A=A&&L.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(A=!1),A?this.session.mergeUndoDeltas=!0:L.indexOf(S.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},k.prototype.setKeyboardHandler=function(S,q){if(S&&typeof S=="string"&&S!="ace"){this.$keybindingId=S;var L=this;b.loadModule(["keybinding",S],function(A){L.$keybindingId==S&&L.keyBinding.setKeyboardHandler(A&&A.handler),q&&q()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(S),q&&q()},k.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},k.prototype.setSession=function(S){if(this.session!=S){this.curOp&&this.endOperation(),this.curOp={};var q=this.session;if(q){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);var L=this.session.getSelection();L.off("changeCursor",this.$onCursorChange),L.off("changeSelection",this.$onSelectionChange)}this.session=S,S?(this.$onDocumentChange=this.onDocumentChange.bind(this),S.on("change",this.$onDocumentChange),this.renderer.setSession(S),this.$onChangeMode=this.onChangeMode.bind(this),S.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),S.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),S.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),S.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),S.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),S.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=S.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),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(S)),this._signal("changeSession",{session:S,oldSession:q}),this.curOp=null,q&&q._signal("changeEditor",{oldEditor:this}),S&&S._signal("changeEditor",{editor:this}),S&&!S.destroyed&&S.bgTokenizer.scheduleStart()}},k.prototype.getSession=function(){return this.session},k.prototype.setValue=function(S,q){return this.session.doc.setValue(S),q?q==1?this.navigateFileEnd():q==-1&&this.navigateFileStart():this.selectAll(),S},k.prototype.getValue=function(){return this.session.getValue()},k.prototype.getSelection=function(){return this.selection},k.prototype.resize=function(S){this.renderer.onResize(S)},k.prototype.setTheme=function(S,q){this.renderer.setTheme(S,q)},k.prototype.getTheme=function(){return this.renderer.getTheme()},k.prototype.setStyle=function(S){this.renderer.setStyle(S)},k.prototype.unsetStyle=function(S){this.renderer.unsetStyle(S)},k.prototype.getFontSize=function(){return this.getOption("fontSize")||c.computedStyle(this.container).fontSize},k.prototype.setFontSize=function(S){this.setOption("fontSize",S)},k.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var S=this;this.$highlightPending=!0,setTimeout(function(){S.$highlightPending=!1;var q=S.session;if(!(!q||q.destroyed)){q.$bracketHighlight&&(q.$bracketHighlight.markerIds.forEach(function(P){q.removeMarker(P)}),q.$bracketHighlight=null);var L=S.getCursorPosition(),A=S.getKeyboardHandler(),D=A&&A.$getDirectionForHighlight&&A.$getDirectionForHighlight(S),N=q.getMatchingBracketRanges(L,D);if(!N){var B=new y(q,L.row,L.column),R=B.getCurrentToken();if(R&&/\b(?:tag-open|tag-name)/.test(R.type)){var V=q.getMatchingTags(L);V&&(N=[V.openTagName,V.closeTagName])}}if(!N&&q.$mode.getMatching&&(N=q.$mode.getMatching(S.session)),!N){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var F="ace_bracket";Array.isArray(N)?N.length==1&&(F="ace_error_bracket"):N=[N],N.length==2&&(h.comparePoints(N[0].end,N[1].start)==0?N=[h.fromPoints(N[0].start,N[1].end)]:h.comparePoints(N[0].start,N[1].end)==0&&(N=[h.fromPoints(N[1].start,N[0].end)])),q.$bracketHighlight={ranges:N,markerIds:N.map(function(P){return q.addMarker(P,F,"text")})},S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide()}},50)}},k.prototype.focus=function(){this.textInput.focus()},k.prototype.isFocused=function(){return this.textInput.isFocused()},k.prototype.blur=function(){this.textInput.blur()},k.prototype.onFocus=function(S){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",S))},k.prototype.onBlur=function(S){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",S))},k.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},k.prototype.onDocumentChange=function(S){var q=this.session.$useWrapMode,L=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,L,q),this._signal("change",S),this.$cursorChange()},k.prototype.onTokenizerUpdate=function(S){var q=S.data;this.renderer.updateLines(q.first,q.last)},k.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},k.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},k.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},k.prototype.$updateHighlightActiveLine=function(){var S=this.getSession(),q;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(q=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(q=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(q=!1)),S.$highlightLineMarker&&!q)S.removeMarker(S.$highlightLineMarker.id),S.$highlightLineMarker=null;else if(!S.$highlightLineMarker&&q){var L=new h(q.row,q.column,q.row,1/0);L.id=S.addMarker(L,"ace_active-line","screenLine"),S.$highlightLineMarker=L}else q&&(S.$highlightLineMarker.start.row=q.row,S.$highlightLineMarker.end.row=q.row,S.$highlightLineMarker.start.column=q.column,S._signal("changeBackMarker"))},k.prototype.onSelectionChange=function(S){var q=this.session;if(q.$selectionMarker&&q.removeMarker(q.$selectionMarker),q.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var L=this.selection.getRange(),A=this.getSelectionStyle();q.$selectionMarker=q.addMarker(L,"ace_selection",A)}var D=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(D),this._signal("changeSelection")},k.prototype.$getSelectionHighLightRegexp=function(){var S=this.session,q=this.getSelectionRange();if(!(q.isEmpty()||q.isMultiLine())){var L=q.start.column,A=q.end.column,D=S.getLine(q.start.row),N=D.substring(L,A);if(!(N.length>5e3||!/[\w\d]/.test(N))){var B=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:N}),R=D.substring(L-1,A+1);if(!!B.test(R))return B}}},k.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},k.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},k.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},k.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},k.prototype.onChangeMode=function(S){this.renderer.updateText(),this._emit("changeMode",S)},k.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},k.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},k.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},k.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},k.prototype.getCopyText=function(){var S=this.getSelectedText(),q=this.session.doc.getNewLineCharacter(),L=!1;if(!S&&this.$copyWithEmptySelection){L=!0;for(var A=this.selection.getAllRanges(),D=0;DP.search(/\S|$/)){var R=P.substr(D.column).search(/\S|$/);L.doc.removeInLine(D.row,D.column,D.column+R)}}this.clearSelection();var V=D.column,F=L.getState(D.row),P=L.getLine(D.row),j=A.checkOutdent(F,P,S);if(L.insert(D,S),N&&N.selection&&(N.selection.length==2?this.selection.setSelectionRange(new h(D.row,V+N.selection[0],D.row,V+N.selection[1])):this.selection.setSelectionRange(new h(D.row+N.selection[0],N.selection[1],D.row+N.selection[2],N.selection[3]))),this.$enableAutoIndent){if(L.getDocument().isNewLine(S)){var I=A.getNextLineIndent(F,P.slice(0,D.column),L.getTabString());L.insert({row:D.row+1,column:0},I)}j&&A.autoOutdent(F,L,D.row)}},k.prototype.autoIndent=function(){var S=this.session,q=S.getMode(),L,A;if(this.selection.isEmpty())L=0,A=S.doc.getLength()-1;else{var D=this.getSelectionRange();L=D.start.row,A=D.end.row}for(var N="",B="",R="",V,F,P,j=S.getTabString(),I=L;I<=A;I++)I>0&&(N=S.getState(I-1),B=S.getLine(I-1),R=q.getNextLineIndent(N,B,j)),V=S.getLine(I),F=q.$getIndent(V),R!==F&&(F.length>0&&(P=new h(I,0,I,F.length),S.remove(P)),R.length>0&&S.insert({row:I,column:0},R)),q.autoOutdent(N,S,I)},k.prototype.onTextInput=function(S,q){if(!q)return this.keyBinding.onTextInput(S);this.startOperation({command:{name:"insertstring"}});var L=this.applyComposition.bind(this,S,q);this.selection.rangeCount?this.forEachSelection(L):L(),this.endOperation()},k.prototype.applyComposition=function(S,q){if(q.extendLeft||q.extendRight){var L=this.selection.getRange();L.start.column-=q.extendLeft,L.end.column+=q.extendRight,L.start.column<0&&(L.start.row--,L.start.column+=this.session.getLine(L.start.row).length+1),this.selection.setRange(L),!S&&!L.isEmpty()&&this.remove()}if((S||!this.selection.isEmpty())&&this.insert(S,!0),q.restoreStart||q.restoreEnd){var L=this.selection.getRange();L.start.column-=q.restoreStart,L.end.column-=q.restoreEnd,this.selection.setRange(L)}},k.prototype.onCommandKey=function(S,q,L){return this.keyBinding.onCommandKey(S,q,L)},k.prototype.setOverwrite=function(S){this.session.setOverwrite(S)},k.prototype.getOverwrite=function(){return this.session.getOverwrite()},k.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},k.prototype.setScrollSpeed=function(S){this.setOption("scrollSpeed",S)},k.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},k.prototype.setDragDelay=function(S){this.setOption("dragDelay",S)},k.prototype.getDragDelay=function(){return this.getOption("dragDelay")},k.prototype.setSelectionStyle=function(S){this.setOption("selectionStyle",S)},k.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},k.prototype.setHighlightActiveLine=function(S){this.setOption("highlightActiveLine",S)},k.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},k.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},k.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},k.prototype.setHighlightSelectedWord=function(S){this.setOption("highlightSelectedWord",S)},k.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},k.prototype.setAnimatedScroll=function(S){this.renderer.setAnimatedScroll(S)},k.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},k.prototype.setShowInvisibles=function(S){this.renderer.setShowInvisibles(S)},k.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},k.prototype.setDisplayIndentGuides=function(S){this.renderer.setDisplayIndentGuides(S)},k.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},k.prototype.setHighlightIndentGuides=function(S){this.renderer.setHighlightIndentGuides(S)},k.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},k.prototype.setShowPrintMargin=function(S){this.renderer.setShowPrintMargin(S)},k.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},k.prototype.setPrintMarginColumn=function(S){this.renderer.setPrintMarginColumn(S)},k.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},k.prototype.setReadOnly=function(S){this.setOption("readOnly",S)},k.prototype.getReadOnly=function(){return this.getOption("readOnly")},k.prototype.setBehavioursEnabled=function(S){this.setOption("behavioursEnabled",S)},k.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},k.prototype.setWrapBehavioursEnabled=function(S){this.setOption("wrapBehavioursEnabled",S)},k.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},k.prototype.setShowFoldWidgets=function(S){this.setOption("showFoldWidgets",S)},k.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},k.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},k.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},k.prototype.remove=function(S){this.selection.isEmpty()&&(S=="left"?this.selection.selectLeft():this.selection.selectRight());var q=this.getSelectionRange();if(this.getBehavioursEnabled()){var L=this.session,A=L.getState(q.start.row),D=L.getMode().transformAction(A,"deletion",this,L,q);if(q.end.column===0){var N=L.getTextRange(q);if(N[N.length-1]==` +`){var B=L.getLine(q.end.row);/^\s+$/.test(B)&&(q.end.column=B.length)}}D&&(q=D)}this.session.remove(q),this.clearSelection()},k.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},k.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},k.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},k.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var S=this.getSelectionRange();S.start.column==S.end.column&&S.start.row==S.end.row&&(S.end.column=0,S.end.row++),this.session.remove(S),this.clearSelection()},k.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var S=this.getCursorPosition();this.insert(` +`),this.moveCursorToPosition(S)},k.prototype.setGhostText=function(S,q){this.session.widgetManager||(this.session.widgetManager=new _(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(S,q)},k.prototype.removeGhostText=function(){!this.session.widgetManager||this.renderer.removeGhostText()},k.prototype.transposeLetters=function(){if(!!this.selection.isEmpty()){var S=this.getCursorPosition(),q=S.column;if(q!==0){var L=this.session.getLine(S.row),A,D;qR.toLowerCase()?1:0});for(var D=new h(0,0,0,0),A=S.first;A<=S.last;A++){var N=q.getLine(A);D.start.row=A,D.end.row=A,D.end.column=N.length,q.replace(D,L[A-S.first])}},k.prototype.toggleCommentLines=function(){var S=this.session.getState(this.getCursorPosition().row),q=this.$getSelectedRows();this.session.getMode().toggleCommentLines(S,this.session,q.first,q.last)},k.prototype.toggleBlockComment=function(){var S=this.getCursorPosition(),q=this.session.getState(S.row),L=this.getSelectionRange();this.session.getMode().toggleBlockComment(q,this.session,L,S)},k.prototype.getNumberAt=function(S,q){var L=/[\-]?[0-9]+(?:\.[0-9]+)?/g;L.lastIndex=0;for(var A=this.session.getLine(S);L.lastIndex=q){var N={value:D[0],start:D.index,end:D.index+D[0].length};return N}}return null},k.prototype.modifyNumber=function(S){var q=this.selection.getCursor().row,L=this.selection.getCursor().column,A=new h(q,L-1,q,L),D=this.session.getTextRange(A);if(!isNaN(parseFloat(D))&&isFinite(D)){var N=this.getNumberAt(q,L);if(N){var B=N.value.indexOf(".")>=0?N.start+N.value.indexOf(".")+1:N.end,R=N.start+N.value.length-B,V=parseFloat(N.value);V*=Math.pow(10,R),B!==N.end&&L=B&&N<=R&&(L=Z,V.selection.clearSelection(),V.moveCursorTo(S,B+A),V.selection.selectTo(S,R+A)),B=R});for(var F=this.$toggleWordPairs,P,j=0;j=R&&B<=V&&I.match(/((?:https?|ftp):\/\/[\S]+)/)){F=I.replace(/[\s:.,'";}\]]+$/,"");break}R=V}}catch(W){L={error:W}}finally{try{j&&!j.done&&(A=P.return)&&A.call(P)}finally{if(L)throw L.error}}return F},k.prototype.openLink=function(){var S=this.selection.getCursor(),q=this.findLinkAt(S.row,S.column);return q&&window.open(q,"_blank"),q!=null},k.prototype.removeLines=function(){var S=this.$getSelectedRows();this.session.removeFullLines(S.first,S.last),this.clearSelection()},k.prototype.duplicateSelection=function(){var S=this.selection,q=this.session,L=S.getRange(),A=S.isBackwards();if(L.isEmpty()){var D=L.start.row;q.duplicateLines(D,D)}else{var N=A?L.start:L.end,B=q.insert(N,q.getTextRange(L),!1);L.start=N,L.end=B,S.setSelectionRange(L,A)}},k.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},k.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},k.prototype.moveText=function(S,q,L){return this.session.moveText(S,q,L)},k.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},k.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},k.prototype.$moveLines=function(S,q){var L,A,D=this.selection;if(!D.inMultiSelectMode||this.inVirtualSelectionMode){var N=D.toOrientedRange();L=this.$getSelectedRows(N),A=this.session.$moveLines(L.first,L.last,q?0:S),q&&S==-1&&(A=0),N.moveBy(A,0),D.fromOrientedRange(N)}else{var B=D.rangeList.ranges;D.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var R=0,V=0,F=B.length,P=0;PW+1)break;W=H.last}for(P--,R=this.session.$moveLines(I,W,q?0:S),q&&S==-1&&(j=P+1);j<=P;)B[j].moveBy(R,0),j++;q||(R=0),V+=R}D.fromOrientedRange(D.ranges[0]),D.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},k.prototype.$getSelectedRows=function(S){return S=(S||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(S.start.row),last:this.session.getRowFoldEnd(S.end.row)}},k.prototype.onCompositionStart=function(S){this.renderer.showComposition(S)},k.prototype.onCompositionUpdate=function(S){this.renderer.setCompositionText(S)},k.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},k.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},k.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},k.prototype.isRowVisible=function(S){return S>=this.getFirstVisibleRow()&&S<=this.getLastVisibleRow()},k.prototype.isRowFullyVisible=function(S){return S>=this.renderer.getFirstFullyVisibleRow()&&S<=this.renderer.getLastFullyVisibleRow()},k.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},k.prototype.$moveByPage=function(S,q){var L=this.renderer,A=this.renderer.layerConfig,D=S*Math.floor(A.height/A.lineHeight);q===!0?this.selection.$moveSelection(function(){this.moveCursorBy(D,0)}):q===!1&&(this.selection.moveCursorBy(D,0),this.selection.clearSelection());var N=L.scrollTop;L.scrollBy(0,D*A.lineHeight),q!=null&&L.scrollCursorIntoView(null,.5),L.animateScrolling(N)},k.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},k.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},k.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},k.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},k.prototype.scrollPageDown=function(){this.$moveByPage(1)},k.prototype.scrollPageUp=function(){this.$moveByPage(-1)},k.prototype.scrollToRow=function(S){this.renderer.scrollToRow(S)},k.prototype.scrollToLine=function(S,q,L,A){this.renderer.scrollToLine(S,q,L,A)},k.prototype.centerSelection=function(){var S=this.getSelectionRange(),q={row:Math.floor(S.start.row+(S.end.row-S.start.row)/2),column:Math.floor(S.start.column+(S.end.column-S.start.column)/2)};this.renderer.alignCursor(q,.5)},k.prototype.getCursorPosition=function(){return this.selection.getCursor()},k.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},k.prototype.getSelectionRange=function(){return this.selection.getRange()},k.prototype.selectAll=function(){this.selection.selectAll()},k.prototype.clearSelection=function(){this.selection.clearSelection()},k.prototype.moveCursorTo=function(S,q){this.selection.moveCursorTo(S,q)},k.prototype.moveCursorToPosition=function(S){this.selection.moveCursorToPosition(S)},k.prototype.jumpToMatching=function(S,q){var L=this.getCursorPosition(),A=new y(this.session,L.row,L.column),D=A.getCurrentToken(),N=0;D&&D.type.indexOf("tag-name")!==-1&&(D=A.stepBackward());var B=D||A.stepForward();if(!!B){var R,V=!1,F={},P=L.column-B.start,j,I={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(B.value.match(/[{}()\[\]]/g)){for(;P1?F[B.value]++:D.value==="=0;--N)this.$tryReplace(L[N],S)&&A++;return this.selection.setSelectionRange(D),A},k.prototype.$tryReplace=function(S,q){var L=this.session.getTextRange(S);return q=this.$search.replace(L,q),q!==null?(S.end=this.session.replace(S,q),S):null},k.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},k.prototype.find=function(S,q,L){q||(q={}),typeof S=="string"||S instanceof RegExp?q.needle=S:typeof S=="object"&&a.mixin(q,S);var A=this.selection.getRange();q.needle==null&&(S=this.session.getTextRange(A)||this.$search.$options.needle,S||(A=this.session.getWordRange(A.start.row,A.start.column),S=this.session.getTextRange(A)),this.$search.set({needle:S})),this.$search.set(q),q.start||this.$search.set({start:A});var D=this.$search.find(this.session);if(q.preventScroll)return D;if(D)return this.revealRange(D,L),D;q.backwards?A.start=A.end:A.end=A.start,this.selection.setRange(A)},k.prototype.findNext=function(S,q){this.find({skipCurrent:!0,backwards:!1},S,q)},k.prototype.findPrevious=function(S,q){this.find(S,{skipCurrent:!0,backwards:!0},q)},k.prototype.revealRange=function(S,q){this.session.unfold(S),this.selection.setSelectionRange(S);var L=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),q!==!1&&this.renderer.animateScrolling(L)},k.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},k.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},k.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(S){S.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()},k.prototype.setAutoScrollEditorIntoView=function(S){if(!!S){var q,L=this,A=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var D=this.$scrollAnchor;D.style.cssText="position:absolute",this.container.insertBefore(D,this.container.firstChild);var N=this.on("changeSelection",function(){A=!0}),B=this.renderer.on("beforeRender",function(){A&&(q=L.renderer.container.getBoundingClientRect())}),R=this.renderer.on("afterRender",function(){if(A&&q&&(L.isFocused()||L.searchBox&&L.searchBox.isFocused())){var V=L.renderer,F=V.$cursorLayer.$pixelPos,P=V.layerConfig,j=F.top-P.offset;F.top>=0&&j+q.top<0?A=!0:F.topwindow.innerHeight?A=!1:A=null,A!=null&&(D.style.top=j+"px",D.style.left=F.left+"px",D.style.height=P.lineHeight+"px",D.scrollIntoView(A)),A=q=null}});this.setAutoScrollEditorIntoView=function(V){V||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",N),this.renderer.off("afterRender",R),this.renderer.off("beforeRender",B))}}},k.prototype.$resetCursorStyle=function(){var S=this.$cursorStyle||"ace",q=this.renderer.$cursorLayer;!q||(q.setSmoothBlinking(/smooth/.test(S)),q.isBlinking=!this.$readOnly&&S!="wide",c.setCssClass(q.element,"ace_slim-cursors",/slim/.test(S)))},k.prototype.prompt=function(S,q,L){var A=this;b.loadModule("ace/ext/prompt",function(D){D.prompt(A,S,q,L)})},k}();w.$uid=0,w.prototype.curOp=null,w.prototype.prevOp={},w.prototype.$mergeableCommands=["backspace","del","insertstring"],w.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"],["&&","||"],["==","!="]],a.implement(w.prototype,v),b.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(k){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:k})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(k){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(k){this.textInput.setReadOnly(k),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(k){this.textInput.setCopyWithEmptySelection(k)},initialValue:!1},cursorStyle:{set:function(k){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(k){this.setAutoScrollEditorIntoView(k)}},keyboardHandler:{set:function(k){this.setKeyboardHandler(k)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(k){this.session.setValue(k)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(k){this.setSession(k)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(k){this.renderer.$gutterLayer.setShowLineNumbers(k),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),k&&this.$relativeLineNumbers?M.attach(this):M.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(k){this.$showLineNumbers&&k?M.attach(this):M.detach(this)}},placeholder:{set:function(k){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var S=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(S&&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(!S&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),c.addCssClass(this.container,"ace_hasPlaceholder");var q=c.createElement("div");q.className="ace_placeholder",q.textContent=this.$placeholder||"",this.renderer.placeholderNode=q,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!S&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(k){var S={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(A){A.blur(),A.renderer.scroller.focus()},readOnly:!0},q=function(A){if(A.target==this.renderer.scroller&&A.keyCode===x.enter){A.preventDefault();var D=this.getCursorPosition().row;this.isRowVisible(D)||this.scrollToLine(D,!0,!0),this.focus()}},L;k?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",O("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",O("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",q.bind(this)),this.commands.addCommand(S),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",O("editor")),this.renderer.$gutter.setAttribute("aria-label",O("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),L||(L=new E(this)),L.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",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",q.bind(this)),this.commands.removeCommand(S),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),L&&L.removeListener())},initialValue:!1},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 M={getText:function(k,S){return(Math.abs(k.selection.lead.row-S)||S+1+(S<9?"\xB7":""))+""},getWidth:function(k,S,q){return Math.max(S.toString().length,(q.lastRow+1).toString().length,2)*q.characterWidth},update:function(k,S){S.renderer.$loop.schedule(S.renderer.CHANGE_GUTTER)},attach:function(k){k.renderer.$gutterLayer.$renderer=this,k.on("changeSelection",this.update),this.update(null,k)},detach:function(k){k.renderer.$gutterLayer.$renderer==this&&(k.renderer.$gutterLayer.$renderer=null),k.off("changeSelection",this.update),this.update(null,k)}};p.Editor=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,p,m){var g=function(){function y(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return y.prototype.addSession=function(_){this.$session=_},y.prototype.add=function(_,E,O){if(!this.$fromUndo&&_!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),E===!1||!this.lastDeltas){this.lastDeltas=[];var T=this.$undoStack.length;T>this.$undoDepth-1&&this.$undoStack.splice(0,T-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),_.id=this.$rev=++this.$maxRev}(_.action=="remove"||_.action=="insert")&&(this.$lastDelta=_),this.lastDeltas.push(_)}},y.prototype.addSelection=function(_,E){this.selections.push({value:_,rev:E||this.$rev})},y.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},y.prototype.markIgnored=function(_,E){E==null&&(E=this.$rev+1);for(var O=this.$undoStack,T=O.length;T--;){var x=O[T][0];if(x.id<=_)break;x.id0},y.prototype.canRedo=function(){return this.$redoStack.length>0},y.prototype.bookmark=function(_){_==null&&(_=this.$rev),this.mark=_},y.prototype.isAtBookmark=function(){return this.$rev===this.mark},y.prototype.toJSON=function(){},y.prototype.fromJSON=function(){},y.prototype.$prettyPrint=function(_){return _?t(_):t(this.$undoStack)+` +--- +`+t(this.$redoStack)},y}();g.prototype.hasUndo=g.prototype.canUndo,g.prototype.hasRedo=g.prototype.canRedo,g.prototype.isClean=g.prototype.isAtBookmark,g.prototype.markClean=g.prototype.bookmark;function a(y,_){for(var E=_;E--;){var O=y[E];if(O&&!O[0].ignore){for(;E<_-1;){var T=s(y[E],y[E+1]);y[E]=T[0],y[E+1]=T[1],E++}return!0}}}var c=e("./range").Range,i=c.comparePoints;c.comparePoints;function u(y){return{row:y.row,column:y.column}}function r(y){return{start:u(y.start),end:u(y.end),action:y.action,lines:y.lines.slice()}}function t(y){if(y=y||this,Array.isArray(y))return y.map(t).join(` +`);var _="";return y.action?(_=y.action=="insert"?"+":"-",_+="["+y.lines+"]"):y.value&&(Array.isArray(y.value)?_=y.value.map(l).join(` +`):_=l(y.value)),y.start&&(_+=l(y)),(y.id||y.rev)&&(_+=" ("+(y.id||y.rev)+")"),_}function l(y){return y.start.row+":"+y.start.column+"=>"+y.end.row+":"+y.end.column}function o(y,_){var E=y.action=="insert",O=_.action=="insert";if(E&&O)if(i(_.start,y.end)>=0)h(_,y,-1);else if(i(_.start,y.start)<=0)h(y,_,1);else return null;else if(E&&!O)if(i(_.start,y.end)>=0)h(_,y,-1);else if(i(_.end,y.start)<=0)h(y,_,-1);else return null;else if(!E&&O)if(i(_.start,y.start)>=0)h(_,y,1);else if(i(_.start,y.start)<=0)h(y,_,1);else return null;else if(!E&&!O)if(i(_.start,y.start)>=0)h(_,y,1);else if(i(_.end,y.start)<=0)h(y,_,-1);else return null;return[_,y]}function s(y,_){for(var E=y.length;E--;)for(var O=0;O<_.length;O++)if(!o(y[E],_[O])){for(;E=0?h(y,_,-1):(i(y.start,_.start)<=0||h(y,c.fromPoints(_.start,y.start),-1),h(_,y,1));else if(!E&&O)i(_.start,y.end)>=0?h(_,y,-1):(i(_.start,y.start)<=0||h(_,c.fromPoints(y.start,_.start),-1),h(y,_,1));else if(!E&&!O)if(i(_.start,y.end)>=0)h(_,y,-1);else if(i(_.end,y.start)<=0)h(y,_,-1);else{var T,x;return i(y.start,_.start)<0&&(T=y,y=$(y,_.start)),i(y.end,_.end)>0&&(x=$(y,_.end)),v(_.end,y.start,y.end,-1),x&&!T&&(y.lines=x.lines,y.start=x.start,y.end=x.end,x=y),[_,T,x].filter(Boolean)}return[_,y]}function h(y,_,E){v(y.start,_.start,_.end,E),v(y.end,_.start,_.end,E)}function v(y,_,E,O){y.row==(O==1?_:E).row&&(y.column+=O*(E.column-_.column)),y.row+=O*(E.row-_.row)}function $(y,_){var E=y.lines,O=y.end;y.end=u(_);var T=y.end.row-y.start.row,x=E.splice(T,E.length),w=T?_.column:_.column-y.start.column;E.push(x[0].substring(0,w)),x[0]=x[0].substr(w);var M={start:u(_),end:O,lines:x,action:y.action};return M}function C(y,_){_=r(_);for(var E=y.length;E--;){for(var O=y[E],T=0;TC&&(_=$.end.row+1,$=f.getNextFoldLine(_,$),C=$?$.start.row:1/0),_>v){for(;this.$lines.getLength()>y+1;)this.$lines.pop();break}b=this.$lines.get(++y),b?b.row=_:(b=this.$lines.createCell(_,s,this.session,l),this.$lines.push(b)),this.$renderCell(b,s,$,_),_++}this._signal("afterRender"),this.$updateGutterWidth(s)},o.prototype.$updateGutterWidth=function(s){var f=this.session,h=f.gutterRenderer||this.$renderer,v=f.$firstLineNumber,$=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||f.$useWrapMode)&&($=f.getLength()+v-1);var C=h?h.getWidth(f,$,s):$.toString().length*s.characterWidth,b=this.$padding||this.$computePadding();C+=b.left+b.right,C!==this.gutterWidth&&!isNaN(C)&&(this.gutterWidth=C,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",C))},o.prototype.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},o.prototype.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var f=this.$lines.cells;this.$cursorCell=null;for(var h=0;h=this.$cursorRow){if(v.row>this.$cursorRow){var $=this.session.getFoldLine(this.$cursorRow);if(h>0&&$&&$.start.row==f[h-1].row)v=f[h-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},o.prototype.scrollLines=function(s){var f=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(f,s))return this.update(s);this.$lines.moveContainer(s);var h=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=h,!f||v0;$--)this.$lines.shift();if(v>h)for(var $=this.session.getFoldedRowCount(h+1,v);$>0;$--)this.$lines.pop();s.firstRowv&&this.$lines.push(this.$renderLines(s,v+1,h)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},o.prototype.$renderLines=function(s,f,h){for(var v=[],$=f,C=this.session.getNextFoldLine($),b=C?C.start.row:1/0;$>b&&($=C.end.row+1,C=this.session.getNextFoldLine($,C),b=C?C.start.row:1/0),!($>h);){var y=this.$lines.createCell($,s,this.session,l);this.$renderCell(y,s,C,$),v.push(y),$++}return v},o.prototype.$renderCell=function(s,f,h,v){var $=s.element,C=this.session,b=$.childNodes[0],y=$.childNodes[1],_=$.childNodes[2],E=_.firstChild,O=C.$firstLineNumber,T=C.$breakpoints,x=C.$decorations,w=C.gutterRenderer||this.$renderer,M=this.$showFoldWidgets&&C.foldWidgets,k=h?h.start.row:Number.MAX_VALUE,S=f.lineHeight+"px",q=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",L=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",A=(w?w.getText(C,v):v+O).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||h&&v=k&&this.$cursorRow<=h.end.row)&&(q+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),T[v]&&(q+=T[v]),x[v]&&(q+=x[v]),this.$annotations[v]&&v!==k&&(q+=this.$annotations[v].className),$.className!=q&&($.className=q),M){var D=M[v];D==null&&(D=M[v]=C.getFoldWidget(v))}if(D){var q="ace_fold-widget ace_"+D;if(D=="start"&&v==k&&vh.right-f.right)return"foldWidgets"},o}();t.prototype.$fixedWidth=!1,t.prototype.$highlightGutterLine=!0,t.prototype.$renderer="",t.prototype.$showLineNumbers=!0,t.prototype.$showFoldWidgets=!0,a.implement(t.prototype,i);function l(o){var s=document.createTextNode("");o.appendChild(s);var f=g.createElement("span");o.appendChild(f);var h=g.createElement("span");o.appendChild(h);var v=g.createElement("span");return h.appendChild(v),o}p.Gutter=t}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,p,m){var g=e("../range").Range,a=e("../lib/dom"),c=function(){function u(r){this.element=a.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return u.prototype.setPadding=function(r){this.$padding=r},u.prototype.setSession=function(r){this.session=r},u.prototype.setMarkers=function(r){this.markers=r},u.prototype.elt=function(r,t){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=t,l.className=r},u.prototype.update=function(r){if(!!r){this.config=r,this.i=0;var t;for(var l in this.markers){var o=this.markers[l];if(!o.range){o.update(t,this,this.session,r);continue}var s=o.range.clipRows(r.firstRow,r.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),o.renderer){var f=this.$getTop(s.start.row,r),h=this.$padding+s.start.column*r.characterWidth;o.renderer(t,s,h,f,r)}else o.type=="fullLine"?this.drawFullLineMarker(t,s,o.clazz,r):o.type=="screenLine"?this.drawScreenLineMarker(t,s,o.clazz,r):s.isMultiLine()?o.type=="text"?this.drawTextMarker(t,s,o.clazz,r):this.drawMultiLineMarker(t,s,o.clazz,r):this.drawSingleLineMarker(t,s,o.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.iy,$==v),o,$==v?0:1,s)},u.prototype.drawMultiLineMarker=function(r,t,l,o,s){var f=this.$padding,h=o.lineHeight,v=this.$getTop(t.start.row,o),$=f+t.start.column*o.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var C=t.clone();C.end.row=C.start.row,C.end.column=this.session.getLine(C.start.row).length,this.drawBidiSingleLineMarker(r,C,l+" ace_br1 ace_start",o,null,s)}else this.elt(l+" ace_br1 ace_start","height:"+h+"px;right:0;top:"+v+"px;left:"+$+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var C=t.clone();C.start.row=C.end.row,C.start.column=0,this.drawBidiSingleLineMarker(r,C,l+" ace_br12",o,null,s)}else{v=this.$getTop(t.end.row,o);var b=t.end.column*o.characterWidth;this.elt(l+" ace_br12","height:"+h+"px;width:"+b+"px;top:"+v+"px;left:"+f+"px;"+(s||""))}if(h=(t.end.row-t.start.row-1)*o.lineHeight,!(h<=0)){v=this.$getTop(t.start.row+1,o);var y=(t.start.column?1:0)|(t.end.column?0:8);this.elt(l+(y?" ace_br"+y:""),"height:"+h+"px;right:0;top:"+v+"px;left:"+f+"px;"+(s||""))}},u.prototype.drawSingleLineMarker=function(r,t,l,o,s,f){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(r,t,l,o,s,f);var h=o.lineHeight,v=(t.end.column+(s||0)-t.start.column)*o.characterWidth,$=this.$getTop(t.start.row,o),C=this.$padding+t.start.column*o.characterWidth;this.elt(l,"height:"+h+"px;width:"+v+"px;top:"+$+"px;left:"+C+"px;"+(f||""))},u.prototype.drawBidiSingleLineMarker=function(r,t,l,o,s,f){var h=o.lineHeight,v=this.$getTop(t.start.row,o),$=this.$padding,C=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);C.forEach(function(b){this.elt(l,"height:"+h+"px;width:"+(b.width+(s||0))+"px;top:"+v+"px;left:"+($+b.left)+"px;"+(f||""))},this)},u.prototype.drawFullLineMarker=function(r,t,l,o,s){var f=this.$getTop(t.start.row,o),h=o.lineHeight;t.start.row!=t.end.row&&(h+=this.$getTop(t.end.row,o)-f),this.elt(l,"height:"+h+"px;top:"+f+"px;left:0;right:0;"+(s||""))},u.prototype.drawScreenLineMarker=function(r,t,l,o,s){var f=this.$getTop(t.start.row,o),h=o.lineHeight;this.elt(l,"height:"+h+"px;top:"+f+"px;left:0;right:0;"+(s||""))},u}();c.prototype.$padding=0;function i(u,r,t,l){return(u?1:0)|(r?2:0)|(t?4:0)|(l?8:0)}p.Marker=c}),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"],function(e,p,m){var g=e("../lib/oop"),a=e("../lib/dom"),c=e("../lib/lang"),i=e("./lines").Lines,u=e("../lib/event_emitter").EventEmitter,r=e("../config").nls,t=function(){function l(o){this.dom=a,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new i(this.element)}return l.prototype.$updateEolChar=function(){var o=this.session.doc,s=o.getNewLineCharacter()==` +`&&o.getNewLineMode()!="windows",f=s?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=f)return this.EOL_CHAR=f,!0},l.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",function(s){this._signal("changeCharacterSize",s)}.bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},l.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},l.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var s=this.$tabStrings=[0],f=1;fE&&(y=_.end.row+1,_=this.session.getNextFoldLine(y,_),E=_?_.start.row:1/0),!(y>v);){var O=$[C++];if(O){this.dom.removeChildren(O),this.$renderLine(O,y,y==E?_:!1),b&&(O.style.top=this.$lines.computeLineTop(y,o,this.session)+"px");var T=o.lineHeight*this.session.getRowLength(y)+"px";O.style.height!=T&&(b=!0,O.style.height=T)}y++}if(b)for(;C0;v--)this.$lines.shift();if(s.lastRow>o.lastRow)for(var v=this.session.getFoldedRowCount(o.lastRow+1,s.lastRow);v>0;v--)this.$lines.pop();o.firstRows.lastRow&&this.$lines.push(this.$renderLinesFragment(o,s.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(o,s,f){for(var h=[],v=s,$=this.session.getNextFoldLine(v),C=$?$.start.row:1/0;v>C&&(v=$.end.row+1,$=this.session.getNextFoldLine(v,$),C=$?$.start.row:1/0),!(v>f);){var b=this.$lines.createCell(v,o,this.session),y=b.element;this.dom.removeChildren(y),a.setStyle(y.style,"height",this.$lines.computeLineHeight(v,o,this.session)+"px"),a.setStyle(y.style,"top",this.$lines.computeLineTop(v,o,this.session)+"px"),this.$renderLine(y,v,v==C?$:!1),this.$useLineGroups()?y.className="ace_line_group":y.className="ace_line",h.push(b),v++}return h},l.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var s=o.firstRow,f=o.lastRow,h=this.$lines;h.getLength();)h.pop();h.push(this.$renderLinesFragment(o,s,f))},l.prototype.$renderToken=function(o,s,f,h){for(var v=this,$=/(\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]+)|(\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,C=this.dom.createFragment(this.element),b,y=0;b=$.exec(h);){var _=b[1],E=b[2],O=b[3],T=b[4],x=b[5];if(!(!v.showSpaces&&E)){var w=y!=b.index?h.slice(y,b.index):"";if(y=b.index+b[0].length,w&&C.appendChild(this.dom.createTextNode(w,this.element)),_){var M=v.session.getScreenTabSize(s+b.index);C.appendChild(v.$tabStrings[M].cloneNode(!0)),s+=M-1}else if(E)if(v.showSpaces){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space",k.textContent=c.stringRepeat(v.SPACE_CHAR,E.length),C.appendChild(k)}else C.appendChild(this.com.createTextNode(E,this.element));else if(O){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space ace_invalid",k.textContent=c.stringRepeat(v.SPACE_CHAR,O.length),C.appendChild(k)}else if(T){s+=1;var k=this.dom.createElement("span");k.style.width=v.config.characterWidth*2+"px",k.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k.textContent=v.showSpaces?v.SPACE_CHAR:T,C.appendChild(k)}else if(x){s+=1;var k=this.dom.createElement("span");k.style.width=v.config.characterWidth*2+"px",k.className="ace_cjk",k.textContent=x,C.appendChild(k)}}}if(C.appendChild(this.dom.createTextNode(y?h.slice(y):h,this.element)),this.$textToken[f.type])o.appendChild(C);else{var S="ace_"+f.type.replace(/\./g," ace_"),k=this.dom.createElement("span");f.type=="fold"&&(k.style.width=f.value.length*this.config.characterWidth+"px",k.setAttribute("title",r("Unfold code"))),k.className=S,k.appendChild(C),o.appendChild(k)}return s+h.length},l.prototype.renderIndentGuide=function(o,s,f){var h=s.search(this.$indentGuideRe);if(h<=0||h>=f)return s;if(s[0]==" "){h-=h%this.tabSize;for(var v=h/this.tabSize,$=0;$$[C].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[s.row]!==""&&s.column===o[s.row].length){this.$highlightIndentGuideMarker.dir=1;for(var C=s.row+1;C0){for(var v=0;v=this.$highlightIndentGuideMarker.start+1){if(h.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,s)}}else for(var f=o.length-1;f>=0;f--){var h=o[f];if(this.$highlightIndentGuideMarker.end&&h.row=$;)C=this.$renderToken(b,C,_,E.substring(0,$-h)),E=E.substring($-h),h=$,b=this.$createLineElement(),o.appendChild(b),b.appendChild(this.dom.createTextNode(c.stringRepeat("\xA0",f.indent),this.element)),v++,C=0,$=f[v]||Number.MAX_VALUE;E.length!=0&&(h+=E.length,C=this.$renderToken(b,C,_,E))}}f[f.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(b,C,null,"",!0)},l.prototype.$renderSimpleLine=function(o,s){for(var f=0,h=0;hthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,f,v,$);f=this.$renderToken(o,f,v,$)}}},l.prototype.$renderOverflowMessage=function(o,s,f,h,v){f&&this.$renderToken(o,s,f,h.slice(0,this.MAX_LINE_LENGTH-s));var $=this.dom.createElement("span");$.className="ace_inline_button ace_keyword ace_toggle_wrap",$.textContent=v?"":"",o.appendChild($)},l.prototype.$renderLine=function(o,s,f){if(!f&&f!=!1&&(f=this.session.getFoldLine(s)),f)var h=this.$getFoldLineTokens(s,f);else var h=this.session.getTokens(s);var v=o;if(h.length){var $=this.session.getRowSplitData(s);if($&&$.length){this.$renderWrappedLine(o,h,$);var v=o.lastChild}else{var v=o;this.$useLineGroups()&&(v=this.$createLineElement(),o.appendChild(v)),this.$renderSimpleLine(v,h)}}else this.$useLineGroups()&&(v=this.$createLineElement(),o.appendChild(v));if(this.showEOL&&v){f&&(s=f.end.row);var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_eol",C.textContent=s==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(C)}},l.prototype.$getFoldLineTokens=function(o,s){var f=this.session,h=[];function v(C,b,y){for(var _=0,E=0;E+C[_].value.lengthy-b&&(O=O.substring(0,y-b)),h.push({type:C[_].type,value:O}),E=b+O.length,_+=1}for(;Ey?h.push({type:C[_].type,value:O.substring(0,y-E)}):h.push(C[_]),E+=O.length,_+=1}}var $=f.getTokens(o);return s.walk(function(C,b,y,_,E){C!=null?h.push({type:"fold",value:C}):(E&&($=f.getTokens(b)),$.length&&v($,_,y))},s.end.row,this.session.getLine(s.end.row).length),h},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l}();t.prototype.$textToken={text:!0,rparen:!0,lparen:!0},t.prototype.EOF_CHAR="\xB6",t.prototype.EOL_CHAR_LF="\xAC",t.prototype.EOL_CHAR_CRLF="\xA4",t.prototype.EOL_CHAR=t.prototype.EOL_CHAR_LF,t.prototype.TAB_CHAR="\u2014",t.prototype.SPACE_CHAR="\xB7",t.prototype.$padding=0,t.prototype.MAX_LINE_LENGTH=1e4,t.prototype.showInvisibles=!1,t.prototype.showSpaces=!1,t.prototype.showTabs=!1,t.prototype.showEOL=!1,t.prototype.displayIndentGuides=!0,t.prototype.$highlightIndentGuides=!0,t.prototype.$tabStrings=[],t.prototype.destroy={},t.prototype.onChangeTabSize=t.prototype.$computeTabString,g.implement(t.prototype,u),p.Text=t}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,p,m){var g=e("../lib/dom"),a=function(){function c(i){this.element=g.createElement("div"),this.element.className="ace_layer ace_cursor-layer",i.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),g.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return c.prototype.$updateOpacity=function(i){for(var u=this.cursors,r=u.length;r--;)g.setStyle(u[r].style,"opacity",i?"":"0")},c.prototype.$startCssAnimation=function(){for(var i=this.cursors,u=i.length;u--;)i[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&g.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},c.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,g.removeCssClass(this.element,"ace_animate-blinking")},c.prototype.setPadding=function(i){this.$padding=i},c.prototype.setSession=function(i){this.session=i},c.prototype.setBlinking=function(i){i!=this.isBlinking&&(this.isBlinking=i,this.restartTimer())},c.prototype.setBlinkInterval=function(i){i!=this.blinkInterval&&(this.blinkInterval=i,this.restartTimer())},c.prototype.setSmoothBlinking=function(i){i!=this.smoothBlinking&&(this.smoothBlinking=i,g.setCssClass(this.element,"ace_smooth-blinking",i),this.$updateCursors(!0),this.restartTimer())},c.prototype.addCursor=function(){var i=g.createElement("div");return i.className="ace_cursor",this.element.appendChild(i),this.cursors.push(i),i},c.prototype.removeCursor=function(){if(this.cursors.length>1){var i=this.cursors.pop();return i.parentNode.removeChild(i),i}},c.prototype.hideCursor=function(){this.isVisible=!1,g.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},c.prototype.showCursor=function(){this.isVisible=!0,g.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},c.prototype.restartTimer=function(){var i=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,g.removeCssClass(this.element,"ace_smooth-blinking")),i(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&g.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),g.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=function(){this.timeoutId=setTimeout(function(){i(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){i(!0),u()},this.blinkInterval),u()}},c.prototype.getPixelPosition=function(i,u){if(!this.config||!this.session)return{left:0,top:0};i||(i=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(i),t=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,i.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),l=(r.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:t,top:l}},c.prototype.isCursorInView=function(i,u){return i.top>=0&&i.topi.height+i.offset||o.top<0)&&r>1)){var s=this.cursors[t++]||this.addCursor(),f=s.style;this.drawCursor?this.drawCursor(s,o,i,u[r],this.session):this.isCursorInView(o,i)?(g.setStyle(f,"display","block"),g.translate(s,o.left,o.top),g.setStyle(f,"width",Math.round(i.characterWidth)+"px"),g.setStyle(f,"height",i.lineHeight+"px")):g.setStyle(f,"display","none")}}for(;this.cursors.length>t;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=o,this.restartTimer()},c.prototype.$setOverwrite=function(i){i!=this.overwrite&&(this.overwrite=i,i?g.addCssClass(this.element,"ace_overwrite-cursors"):g.removeCssClass(this.element,"ace_overwrite-cursors"))},c.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},c}();a.prototype.$padding=0,a.prototype.drawCursor=null,p.Cursor=a}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,p,m){var g=this&&this.__extends||function(){var s=function(f,h){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,$){v.__proto__=$}||function(v,$){for(var C in $)Object.prototype.hasOwnProperty.call($,C)&&(v[C]=$[C])},s(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");s(f,h);function v(){this.constructor=f}f.prototype=h===null?Object.create(h):(v.prototype=h.prototype,new v)}}(),a=e("./lib/oop"),c=e("./lib/dom"),i=e("./lib/event"),u=e("./lib/event_emitter").EventEmitter,r=32768,t=function(){function s(f,h){this.element=c.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+h,this.inner=c.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addListener(this.element,"scroll",this.onScroll.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)}return s.prototype.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1},s}();a.implement(t.prototype,u);var l=function(s){g(f,s);function f(h,v){var $=s.call(this,h,"-v")||this;return $.scrollTop=0,$.scrollHeight=0,v.$scrollbarWidth=$.width=c.scrollbarWidth(h.ownerDocument),$.inner.style.width=$.element.style.width=($.width||15)+5+"px",$.$minWidth=0,$}return f.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var h=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-h)/(this.coeff-h)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},f.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},f.prototype.setHeight=function(h){this.element.style.height=h+"px"},f.prototype.setScrollHeight=function(h){this.scrollHeight=h,h>r?(this.coeff=r/h,h=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=h+"px"},f.prototype.setScrollTop=function(h){this.scrollTop!=h&&(this.skipEvent=!0,this.scrollTop=h,this.element.scrollTop=h*this.coeff)},f}(t);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var o=function(s){g(f,s);function f(h,v){var $=s.call(this,h,"-h")||this;return $.scrollLeft=0,$.height=v.$scrollbarWidth,$.inner.style.height=$.element.style.height=($.height||15)+5+"px",$}return f.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},f.prototype.getHeight=function(){return this.isVisible?this.height:0},f.prototype.setWidth=function(h){this.element.style.width=h+"px"},f.prototype.setInnerWidth=function(h){this.inner.style.width=h+"px"},f.prototype.setScrollWidth=function(h){this.inner.style.width=h+"px"},f.prototype.setScrollLeft=function(h){this.scrollLeft!=h&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=h)},f}(t);p.ScrollBar=l,p.ScrollBarV=l,p.ScrollBarH=o,p.VScrollBar=l,p.HScrollBar=o}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,p,m){var g=this&&this.__extends||function(){var o=function(s,f){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,v){h.__proto__=v}||function(h,v){for(var $ in v)Object.prototype.hasOwnProperty.call(v,$)&&(h[$]=v[$])},o(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");o(s,f);function h(){this.constructor=s}s.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}}(),a=e("./lib/oop"),c=e("./lib/dom"),i=e("./lib/event"),u=e("./lib/event_emitter").EventEmitter;c.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ + position: absolute; + background: rgba(128, 128, 128, 0.6); + -moz-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #bbb; + border-radius: 2px; + z-index: 8; +} +.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { + position: absolute; + z-index: 6; + background: none; + overflow: hidden!important; +} +.ace_editor>.ace_sb-v { + z-index: 6; + right: 0; + top: 0; + width: 12px; +} +.ace_editor>.ace_sb-v div { + z-index: 8; + right: 0; + width: 100%; +} +.ace_editor>.ace_sb-h { + bottom: 0; + left: 0; + height: 12px; +} +.ace_editor>.ace_sb-h div { + bottom: 0; + height: 100%; +} +.ace_editor>.ace_sb_grabbed { + z-index: 8; + background: #000; +}`,"ace_scrollbar.css",!1);var r=function(){function o(s,f){this.element=c.createElement("div"),this.element.className="ace_sb"+f,this.inner=c.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return o.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},o}();a.implement(r.prototype,u);var t=function(o){g(s,o);function s(f,h){var v=o.call(this,f,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=f,v.width=v.VScrollWidth,v.renderer=h,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return s.prototype.onMouseDown=function(f,h){if(f==="mousedown"&&!(i.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var v=this,$=h.clientY,C=function(x){$=x.clientY},b=function(){clearInterval(O)},y=h.clientY,_=this.thumbTop,E=function(){if($!==void 0){var x=v.scrollTopFromThumbTop(_+$-y);x!==v.scrollTop&&v._emit("scroll",{data:x})}};i.capture(this.inner,C,b);var O=setInterval(E,20);return i.preventDefault(h)}var T=h.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(T)}),i.preventDefault(h)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(f){var h=f*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return h=h>>0,h<0?h=0:h>this.pageHeight-this.viewHeight&&(h=this.pageHeight-this.viewHeight),h},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(f){this.height=Math.max(0,f),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(f,h){this.pageHeight===f&&!h||(this.pageHeight=f,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})))},s.prototype.setScrollTop=function(f){this.scrollTop=f,f<0&&(f=0),this.thumbTop=f*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s}(r);t.prototype.setInnerHeight=t.prototype.setScrollHeight;var l=function(o){g(s,o);function s(f,h){var v=o.call(this,f,"-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=h,v}return s.prototype.onMouseDown=function(f,h){if(f==="mousedown"&&!(i.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var v=this,$=h.clientX,C=function(x){$=x.clientX},b=function(){clearInterval(O)},y=h.clientX,_=this.thumbLeft,E=function(){if($!==void 0){var x=v.scrollLeftFromThumbLeft(_+$-y);x!==v.scrollLeft&&v._emit("scroll",{data:x})}};i.capture(this.inner,C,b);var O=setInterval(E,20);return i.preventDefault(h)}var T=h.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(T)}),i.preventDefault(h)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(f){var h=f*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return h=h>>0,h<0?h=0:h>this.pageWidth-this.viewWidth&&(h=this.pageWidth-this.viewWidth),h},s.prototype.setWidth=function(f){this.width=Math.max(0,f),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(f,h){this.pageWidth===f&&!h||(this.pageWidth=f,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})))},s.prototype.setScrollLeft=function(f){this.scrollLeft=f,f<0&&(f=0),this.thumbLeft=f*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s}(r);l.prototype.setInnerWidth=l.prototype.setScrollWidth,p.ScrollBar=t,p.ScrollBarV=t,p.ScrollBarH=l,p.VScrollBar=t,p.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,p,m){var g=e("./lib/event"),a=function(){function c(i,u){this.onRender=i,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var r=this;this._flush=function(t){r.pending=!1;var l=r.changes;if(l&&(g.blockIdle(100),r.changes=0,r.onRender(l)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return c.prototype.schedule=function(i){this.changes=this.changes|i,this.changes&&!this.pending&&(g.nextFrame(this._flush),this.pending=!0)},c.prototype.clear=function(i){var u=this.changes;return this.changes=0,u},c}();p.RenderLoop=a}),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(e,p,m){var g=e("../lib/oop"),a=e("../lib/dom"),c=e("../lib/lang"),i=e("../lib/event"),u=e("../lib/useragent"),r=e("../lib/event_emitter").EventEmitter,t=512,l=typeof ResizeObserver=="function",o=200,s=function(){function f(h){this.el=a.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=a.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=a.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),h.appendChild(this.el),this.$measureNode.textContent=c.stringRepeat("X",t),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}return f.prototype.$setMeasureNodeStyles=function(h,v){h.width=h.height="auto",h.left=h.top="0px",h.visibility="hidden",h.position="absolute",h.whiteSpace="pre",u.isIE<8?h["font-family"]="inherit":h.font="inherit",h.overflow=v?"hidden":"visible"},f.prototype.checkForSizeChanges=function(h){if(h===void 0&&(h=this.$measureSizes()),h&&(this.$characterSize.width!==h.width||this.$characterSize.height!==h.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=h,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===h.width&&v.height===h.height,this._emit("changeCharacterSize",{data:h})}},f.prototype.$addObserver=function(){var h=this;this.$observer=new window.ResizeObserver(function(v){h.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},f.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var h=this;return this.$pollSizeChangesTimer=i.onIdle(function v(){h.checkForSizeChanges(),i.onIdle(v,500)},500)},f.prototype.setPolling=function(h){h?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},f.prototype.$measureSizes=function(h){var v={height:(h||this.$measureNode).clientHeight,width:(h||this.$measureNode).clientWidth/t};return v.width===0||v.height===0?null:v},f.prototype.$measureCharWidth=function(h){this.$main.textContent=c.stringRepeat(h,t);var v=this.$main.getBoundingClientRect();return v.width/t},f.prototype.getCharacterWidth=function(h){var v=this.charSizes[h];return v===void 0&&(v=this.charSizes[h]=this.$measureCharWidth(h)/this.$characterSize.width),v},f.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},f.prototype.$getZoom=function(h){return!h||!h.parentElement?1:(window.getComputedStyle(h).zoom||1)*this.$getZoom(h.parentElement)},f.prototype.$initTransformMeasureNodes=function(){var h=function(v,$){return["div",{style:"position: absolute;top:"+v+"px;left:"+$+"px;"}]};this.els=a.buildDom([h(0,0),h(o,0),h(0,o),h(o,o)],this.el)},f.prototype.transformCoordinates=function(h,v){if(h){var $=this.$getZoom(this.el);h=_(1/$,h)}function C(B,R,V){var F=B[1]*R[0]-B[0]*R[1];return[(-R[1]*V[0]+R[0]*V[1])/F,(+B[1]*V[0]-B[0]*V[1])/F]}function b(B,R){return[B[0]-R[0],B[1]-R[1]]}function y(B,R){return[B[0]+R[0],B[1]+R[1]]}function _(B,R){return[B*R[0],B*R[1]]}this.els||this.$initTransformMeasureNodes();function E(B){var R=B.getBoundingClientRect();return[R.left,R.top]}var O=E(this.els[0]),T=E(this.els[1]),x=E(this.els[2]),w=E(this.els[3]),M=C(b(w,T),b(w,x),b(y(T,x),y(w,O))),k=_(1+M[0],b(T,O)),S=_(1+M[1],b(x,O));if(v){var q=v,L=M[0]*q[0]/o+M[1]*q[1]/o+1,A=y(_(q[0],k),_(q[1],S));return y(_(1/L/o,A),O)}var D=b(h,O),N=C(b(k,_(M[0],D)),b(S,_(M[1],D)),D);return _(o,N)},f}();s.prototype.$characterSize={width:0,height:0},g.implement(s.prototype,r),p.FontMetrics=s}),ace.define("ace/css/editor.css",["require","exports","module"],function(e,p,m){m.exports=` +.ace_br1 {border-top-left-radius : 3px;} +.ace_br2 {border-top-right-radius : 3px;} +.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} +.ace_br4 {border-bottom-right-radius: 3px;} +.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} +.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} +.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} +.ace_br8 {border-bottom-left-radius : 3px;} +.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} +.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} +.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} + + +.ace_editor { + position: relative; + overflow: hidden; + padding: 0; + font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; + direction: ltr; + text-align: left; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +.ace_scroller { + position: absolute; + overflow: hidden; + top: 0; + bottom: 0; + background-color: inherit; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + cursor: text; +} + +.ace_content { + position: absolute; + box-sizing: border-box; + min-width: 100%; + contain: style size layout; + font-variant-ligatures: no-common-ligatures; +} + +.ace_keyboard-focus:focus { + box-shadow: inset 0 0 0 2px #5E9ED6; + outline: none; +} + +.ace_dragging .ace_scroller:before{ + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + content: ''; + background: rgba(250, 250, 250, 0.01); + z-index: 1000; +} +.ace_dragging.ace_dark .ace_scroller:before{ + background: rgba(0, 0, 0, 0.01); +} + +.ace_gutter { + position: absolute; + overflow : hidden; + width: auto; + top: 0; + bottom: 0; + left: 0; + cursor: default; + z-index: 4; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + contain: style size layout; +} + +.ace_gutter-active-line { + position: absolute; + left: 0; + right: 0; +} + +.ace_scroller.ace_scroll-left:after { + content: ""; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; + pointer-events: none; +} + +.ace_gutter-cell, .ace_gutter-cell_svg-icons { + position: absolute; + top: 0; + left: 0; + right: 0; + padding-left: 19px; + padding-right: 6px; + background-repeat: no-repeat; +} + +.ace_gutter-cell_svg-icons .ace_gutter_annotation { + margin-left: -14px; + float: left; +} + +.ace_gutter-cell .ace_gutter_annotation { + margin-left: -19px; + float: left; +} + +.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_gutter-cell.ace_info, .ace_icon.ace_info { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); + background-repeat: no-repeat; + background-position: 2px center; +} +.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); +} + +.ace_icon_svg.ace_error { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); + background-color: crimson; +} +.ace_icon_svg.ace_warning { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); + background-color: darkorange; +} +.ace_icon_svg.ace_info { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); + background-color: royalblue; +} + +.ace_icon_svg.ace_error_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); + background-color: crimson; +} +.ace_icon_svg.ace_warning_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); + background-color: darkorange; +} + +.ace_scrollbar { + contain: strict; + position: absolute; + right: 0; + bottom: 0; + z-index: 6; +} + +.ace_scrollbar-inner { + position: absolute; + cursor: text; + left: 0; + top: 0; +} + +.ace_scrollbar-v{ + overflow-x: hidden; + overflow-y: scroll; + top: 0; +} + +.ace_scrollbar-h { + overflow-x: scroll; + overflow-y: hidden; + left: 0; +} + +.ace_print-margin { + position: absolute; + height: 100%; +} + +.ace_text-input { + position: absolute; + z-index: 0; + width: 0.5em; + height: 1em; + opacity: 0; + background: transparent; + -moz-appearance: none; + appearance: none; + border: none; + resize: none; + outline: none; + overflow: hidden; + font: inherit; + padding: 0 1px; + margin: 0 -1px; + contain: strict; + -ms-user-select: text; + -moz-user-select: text; + -webkit-user-select: text; + user-select: text; + /*with \`pre-line\` chrome inserts   instead of space*/ + white-space: pre!important; +} +.ace_text-input.ace_composition { + background: transparent; + color: inherit; + z-index: 1000; + opacity: 1; +} +.ace_composition_placeholder { color: transparent } +.ace_composition_marker { + border-bottom: 1px solid; + position: absolute; + border-radius: 0; + margin-top: 1px; +} + +[ace_nocontext=true] { + transform: none!important; + filter: none!important; + clip-path: none!important; + mask : none!important; + contain: none!important; + perspective: none!important; + mix-blend-mode: initial!important; + z-index: auto; +} + +.ace_layer { + z-index: 1; + position: absolute; + overflow: hidden; + /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ + word-wrap: normal; + white-space: pre; + height: 100%; + width: 100%; + box-sizing: border-box; + /* setting pointer-events: auto; on node under the mouse, which changes + during scroll, will break mouse wheel scrolling in Safari */ + pointer-events: none; +} + +.ace_gutter-layer { + position: relative; + width: auto; + text-align: right; + pointer-events: auto; + height: 1000000px; + contain: style size layout; +} + +.ace_text-layer { + font: inherit !important; + position: absolute; + height: 1000000px; + width: 1000000px; + contain: style size layout; +} + +.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { + contain: style size layout; + position: absolute; + top: 0; + left: 0; + right: 0; +} + +.ace_hidpi .ace_text-layer, +.ace_hidpi .ace_gutter-layer, +.ace_hidpi .ace_content, +.ace_hidpi .ace_gutter { + contain: strict; +} +.ace_hidpi .ace_text-layer > .ace_line, +.ace_hidpi .ace_text-layer > .ace_line_group { + contain: strict; +} + +.ace_cjk { + display: inline-block; + text-align: center; +} + +.ace_cursor-layer { + z-index: 4; +} + +.ace_cursor { + z-index: 4; + position: absolute; + box-sizing: border-box; + border-left: 2px solid; + /* workaround for smooth cursor repaintng whole screen in chrome */ + transform: translatez(0); +} + +.ace_multiselect .ace_cursor { + border-left-width: 1px; +} + +.ace_slim-cursors .ace_cursor { + border-left-width: 1px; +} + +.ace_overwrite-cursors .ace_cursor { + border-left-width: 0; + border-bottom: 1px solid; +} + +.ace_hidden-cursors .ace_cursor { + opacity: 0.2; +} + +.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { + opacity: 0; +} + +.ace_smooth-blinking .ace_cursor { + transition: opacity 0.18s; +} + +.ace_animate-blinking .ace_cursor { + animation-duration: 1000ms; + animation-timing-function: step-end; + animation-name: blink-ace-animate; + animation-iteration-count: infinite; +} + +.ace_animate-blinking.ace_smooth-blinking .ace_cursor { + animation-duration: 1000ms; + animation-timing-function: ease-in-out; + animation-name: blink-ace-animate-smooth; +} + +@keyframes blink-ace-animate { + from, to { opacity: 1; } + 60% { opacity: 0; } +} + +@keyframes blink-ace-animate-smooth { + from, to { opacity: 1; } + 45% { opacity: 1; } + 60% { opacity: 0; } + 85% { opacity: 0; } +} + +.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { + position: absolute; + z-index: 3; +} + +.ace_marker-layer .ace_selection { + position: absolute; + z-index: 5; +} + +.ace_marker-layer .ace_bracket { + position: absolute; + z-index: 6; +} + +.ace_marker-layer .ace_error_bracket { + position: absolute; + border-bottom: 1px solid #DE5555; + border-radius: 0; +} + +.ace_marker-layer .ace_active-line { + position: absolute; + z-index: 2; +} + +.ace_marker-layer .ace_selected-word { + position: absolute; + z-index: 4; + box-sizing: border-box; +} + +.ace_line .ace_fold { + box-sizing: border-box; + + display: inline-block; + height: 11px; + margin-top: -2px; + vertical-align: middle; + + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); + background-repeat: no-repeat, repeat-x; + background-position: center center, top left; + color: transparent; + + border: 1px solid black; + border-radius: 2px; + + cursor: pointer; + pointer-events: auto; +} + +.ace_dark .ace_fold { +} + +.ace_fold:hover{ + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); +} + +.ace_tooltip { + background-color: #f5f5f5; + border: 1px solid gray; + border-radius: 1px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + color: black; + max-width: 100%; + padding: 3px 4px; + position: fixed; + z-index: 999999; + box-sizing: border-box; + cursor: default; + white-space: pre; + word-wrap: break-word; + line-height: normal; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + pointer-events: none; +} + +.ace_tooltip.ace_dark { + background-color: #636363; + color: #fff; +} + +.ace_tooltip:focus { + outline: 1px solid #5E9ED6; +} + +.ace_icon { + display: inline-block; + width: 18px; + vertical-align: top; +} + +.ace_icon_svg { + display: inline-block; + width: 12px; + vertical-align: top; + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: 12px; + -webkit-mask-position: center; +} + +.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { + padding-right: 13px; +} + +.ace_fold-widget { + box-sizing: border-box; + + margin: 0 -12px 0 1px; + display: none; + width: 11px; + vertical-align: top; + + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: center; + + border-radius: 3px; + + border: 1px solid transparent; + cursor: pointer; +} + +.ace_folding-enabled .ace_fold-widget { + display: inline-block; +} + +.ace_fold-widget.ace_end { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); +} + +.ace_fold-widget.ace_closed { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); +} + +.ace_fold-widget:hover { + border: 1px solid rgba(0, 0, 0, 0.3); + background-color: rgba(255, 255, 255, 0.2); + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); +} + +.ace_fold-widget:active { + border: 1px solid rgba(0, 0, 0, 0.4); + background-color: rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); +} +/** + * Dark version for fold widgets + */ +.ace_dark .ace_fold-widget { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); +} +.ace_dark .ace_fold-widget.ace_end { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); +} +.ace_dark .ace_fold-widget.ace_closed { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); +} +.ace_dark .ace_fold-widget:hover { + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); + background-color: rgba(255, 255, 255, 0.1); +} +.ace_dark .ace_fold-widget:active { + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); +} + +.ace_inline_button { + border: 1px solid lightgray; + display: inline-block; + margin: -1px 8px; + padding: 0 5px; + pointer-events: auto; + cursor: pointer; +} +.ace_inline_button:hover { + border-color: gray; + background: rgba(200,200,200,0.2); + display: inline-block; + pointer-events: auto; +} + +.ace_fold-widget.ace_invalid { + background-color: #FFB4B4; + border-color: #DE5555; +} + +.ace_fade-fold-widgets .ace_fold-widget { + transition: opacity 0.4s ease 0.05s; + opacity: 0; +} + +.ace_fade-fold-widgets:hover .ace_fold-widget { + transition: opacity 0.05s ease 0.05s; + opacity:1; +} + +.ace_underline { + text-decoration: underline; +} + +.ace_bold { + font-weight: bold; +} + +.ace_nobold .ace_bold { + font-weight: normal; +} + +.ace_italic { + font-style: italic; +} + + +.ace_error-marker { + background-color: rgba(255, 0, 0,0.2); + position: absolute; + z-index: 9; +} + +.ace_highlight-marker { + background-color: rgba(255, 255, 0,0.2); + position: absolute; + z-index: 8; +} + +.ace_mobile-menu { + position: absolute; + line-height: 1.5; + border-radius: 4px; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + background: white; + box-shadow: 1px 3px 2px grey; + border: 1px solid #dcdcdc; + color: black; +} +.ace_dark > .ace_mobile-menu { + background: #333; + color: #ccc; + box-shadow: 1px 3px 2px grey; + border: 1px solid #444; + +} +.ace_mobile-button { + padding: 2px; + cursor: pointer; + overflow: hidden; +} +.ace_mobile-button:hover { + background-color: #eee; + opacity:1; +} +.ace_mobile-button:active { + background-color: #ddd; +} + +.ace_placeholder { + font-family: arial; + transform: scale(0.9); + transform-origin: left; + white-space: pre; + opacity: 0.7; + margin: 0 10px; +} + +.ace_ghost_text { + opacity: 0.5; + font-style: italic; + white-space: pre; +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,p,m){var g=e("../lib/dom"),a=e("../lib/oop"),c=e("../lib/event_emitter").EventEmitter,i=function(){function u(r,t){this.canvas=g.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.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=0+"px",this.canvas.style.right=0+"px",this.canvas.style.zIndex=7+"px",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 u.prototype.$updateDecorators=function(r){var t=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 l=(r.lastRow+1)*this.lineHeight;lM.priority?1:0}var f=this.renderer.session.$annotations;if(o.clearRect(0,0,this.canvas.width,this.canvas.height),f){var h={info:1,warning:2,error:3};f.forEach(function(w){w.priority=h[w.type]||null}),f=f.sort(s);for(var v=this.renderer.session.$foldData,$=0;$this.canvasHeight&&(T=this.canvasHeight-this.halfMinDecorationHeight),_=Math.round(T-this.halfMinDecorationHeight),E=Math.round(T+this.halfMinDecorationHeight)}o.fillStyle=t[f[$].type]||null,o.fillRect(0,y,this.canvasWidth,E-_)}}var x=this.renderer.session.selection.getCursor();if(x){var b=this.compensateFoldRows(x.row,v),y=Math.round((x.row-b)*this.lineHeight*this.heightRatio);o.fillStyle="rgba(0, 0, 0, 0.5)",o.fillRect(0,y,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(r,t){var l=0;if(t&&t.length>0)for(var o=0;ot[o].start.row&&r=t[o].end.row&&(l+=t[o].end.row-t[o].start.row);return l},u}();a.implement(i.prototype,c),p.Decorator=i}),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"],function(e,p,m){var g=e("./lib/oop"),a=e("./lib/dom"),c=e("./lib/lang"),i=e("./config"),u=e("./layer/gutter").Gutter,r=e("./layer/marker").Marker,t=e("./layer/text").Text,l=e("./layer/cursor").Cursor,o=e("./scrollbar").HScrollBar,s=e("./scrollbar").VScrollBar,f=e("./scrollbar_custom").HScrollBar,h=e("./scrollbar_custom").VScrollBar,v=e("./renderloop").RenderLoop,$=e("./layer/font_metrics").FontMetrics,C=e("./lib/event_emitter").EventEmitter,b=e("./css/editor.css"),y=e("./layer/decorators").Decorator,_=e("./lib/useragent");a.importCssString(b,"ace_editor.css",!1);var E=function(){function O(T,x){var w=this;this.container=T||a.createElement("div"),a.addCssClass(this.container,"ace_editor"),a.HI_DPI&&a.addCssClass(this.container,"ace_hidpi"),this.setTheme(x),i.get("useStrictCSP")==null&&i.set("useStrictCSP",!1),this.$gutter=a.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=a.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=a.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var M=this.$textLayer=new t(this.content);this.canvas=M.element,this.$markerFront=new r(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.on("scroll",function(k){w.$scrollAnimation||w.session.setScrollTop(k.data-w.scrollMargin.top)}),this.scrollBarH.on("scroll",function(k){w.$scrollAnimation||w.session.setScrollLeft(k.data-w.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new $(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(k){w.updateCharacterSize(),w.onResize(!0,w.gutterWidth,w.$size.width,w.$size.height),w._signal("changeCharacterSize",k)}),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=!_.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(),i.resetOptions(this),i._signal("renderer",this)}return O.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(),a.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},O.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))},O.prototype.updateLines=function(T,x,w){if(x===void 0&&(x=1/0),this.$changedLines?(this.$changedLines.firstRow>T&&(this.$changedLines.firstRow=T),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},O.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},O.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},O.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},O.prototype.updateFull=function(T){T?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},O.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},O.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},O.prototype.onResize=function(T,x,w,M){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=T?1:0;var k=this.container;M||(M=k.clientHeight||k.scrollHeight),w||(w=k.clientWidth||k.scrollWidth);var S=this.$updateCachedSize(T,x,w,M);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!w&&!M)return this.resizing=0;T&&(this.$gutterLayer.$padding=null),T?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},O.prototype.$updateCachedSize=function(T,x,w,M){M-=this.$extraHeight||0;var k=0,S=this.$size,q={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if(M&&(T||S.height!=M)&&(S.height=M,k|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",k=k|this.CHANGE_SCROLL),w&&(T||S.width!=w)){k|=this.CHANGE_SIZE,S.width=w,x==null&&(x=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=x,a.setStyle(this.scrollBarH.element.style,"left",x+"px"),a.setStyle(this.scroller.style,"left",x+this.margin.left+"px"),S.scrollerWidth=Math.max(0,w-x-this.scrollBarV.getWidth()-this.margin.h),a.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";a.setStyle(this.scrollBarH.element.style,"right",L),a.setStyle(this.scroller.style,"right",L),a.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||T)&&(k|=this.CHANGE_FULL)}return S.$dirty=!w||!M,k&&this._signal("resize",q),k},O.prototype.onGutterResize=function(T){var x=this.$showGutter?T:0;x!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,x,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()},O.prototype.adjustWrapLimit=function(){var T=this.$size.scrollerWidth-this.$padding*2,x=Math.floor(T/this.characterWidth);return this.session.adjustWrapLimit(x,this.$showPrintMargin&&this.$printMarginColumn)},O.prototype.setAnimatedScroll=function(T){this.setOption("animatedScroll",T)},O.prototype.getAnimatedScroll=function(){return this.$animatedScroll},O.prototype.setShowInvisibles=function(T){this.setOption("showInvisibles",T),this.session.$bidiHandler.setShowInvisibles(T)},O.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},O.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},O.prototype.setDisplayIndentGuides=function(T){this.setOption("displayIndentGuides",T)},O.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},O.prototype.setHighlightIndentGuides=function(T){this.setOption("highlightIndentGuides",T)},O.prototype.setShowPrintMargin=function(T){this.setOption("showPrintMargin",T)},O.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},O.prototype.setPrintMarginColumn=function(T){this.setOption("printMarginColumn",T)},O.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},O.prototype.getShowGutter=function(){return this.getOption("showGutter")},O.prototype.setShowGutter=function(T){return this.setOption("showGutter",T)},O.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},O.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},O.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},O.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},O.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var T=a.createElement("div");T.className="ace_layer ace_print-margin-layer",this.$printMarginEl=a.createElement("div"),this.$printMarginEl.className="ace_print-margin",T.appendChild(this.$printMarginEl),this.content.insertBefore(T,this.content.firstChild)}var x=this.$printMarginEl.style;x.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",x.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},O.prototype.getContainerElement=function(){return this.container},O.prototype.getMouseEventTarget=function(){return this.scroller},O.prototype.getTextAreaContainer=function(){return this.container},O.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var T=this.textarea.style,x=this.$composition;if(!this.$keepTextAreaAtCursor&&!x){a.translate(this.textarea,-100,0);return}var w=this.$cursorLayer.$pixelPos;if(!!w){x&&x.markerRange&&(w=this.$cursorLayer.getPixelPosition(x.markerRange.start,!0));var M=this.layerConfig,k=w.top,S=w.left;k-=M.offset;var q=x&&x.useTextareaForIME||_.isMobile?this.lineHeight:1;if(k<0||k>M.height-q){a.translate(this.textarea,0,0);return}var L=1,A=this.$size.height-q;if(!x)k+=this.lineHeight;else if(x.useTextareaForIME){var D=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(D)[0]}else k+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-L&&(S=this.$size.scrollerWidth-L),S+=this.gutterWidth+this.margin.left,a.setStyle(T,"height",q+"px"),a.setStyle(T,"width",L+"px"),a.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-L),Math.min(k,A))}}},O.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},O.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},O.prototype.getLastFullyVisibleRow=function(){var T=this.layerConfig,x=T.lastRow,w=this.session.documentToScreenRow(x,0)*T.lineHeight;return w-this.session.getScrollTop()>T.height-T.lineHeight?x-1:x},O.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},O.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()},O.prototype.setScrollMargin=function(T,x,w,M){var k=this.scrollMargin;k.top=T|0,k.bottom=x|0,k.right=M|0,k.left=w|0,k.v=k.top+k.bottom,k.h=k.left+k.right,k.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-k.top),this.updateFull()},O.prototype.setMargin=function(T,x,w,M){var k=this.margin;k.top=T|0,k.bottom=x|0,k.right=M|0,k.left=w|0,k.v=k.top+k.bottom,k.h=k.left+k.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},O.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},O.prototype.setHScrollBarAlwaysVisible=function(T){this.setOption("hScrollBarAlwaysVisible",T)},O.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},O.prototype.setVScrollBarAlwaysVisible=function(T){this.setOption("vScrollBarAlwaysVisible",T)},O.prototype.$updateScrollBarV=function(){var T=this.layerConfig.maxHeight,x=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(T-=(x-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>T-x&&(T=this.scrollTop+x,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(T+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},O.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},O.prototype.freeze=function(){this.$frozen=!0},O.prototype.unfreeze=function(){this.$frozen=!1},O.prototype.$renderChanges=function(T,x){if(this.$changes&&(T|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!T&&!x){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 M=this.scrollTop+(w.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;M>0&&(this.scrollTop=M,T=T|this.CHANGE_SCROLL,T|=this.$computeLayerConfig()|this.$loop.clear())}w=this.layerConfig,this.$updateScrollBarV(),T&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),a.translate(this.content,-this.scrollLeft,-w.offset);var k=w.width+2*this.$padding+"px",S=w.minHeight+"px";a.setStyle(this.content.style,"width",k),a.setStyle(this.content.style,"height",S)}if(T&this.CHANGE_H_SCROLL&&(a.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)},O.prototype.$autosize=function(){var T=this.session.getScreenLength()*this.lineHeight,x=this.$maxLines*this.lineHeight,w=Math.min(x,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 M=w<=2*this.lineHeight,k=!M&&T>x;if(w!=this.desiredHeight||this.$size.height!=this.desiredHeight||k!=this.$vScroll){k!=this.$vScroll&&(this.$vScroll=k,this.scrollBarV.setVisible(k));var S=this.container.clientWidth;this.container.style.height=w+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,w),this.desiredHeight=w,this._signal("autosize")}},O.prototype.$computeLayerConfig=function(){var T=this.session,x=this.$size,w=x.height<=2*this.lineHeight,M=this.session.getScreenLength(),k=M*this.lineHeight,S=this.$getLongestLine(),q=!w&&(this.$hScrollBarAlwaysVisible||x.scrollerWidth-S-2*this.$padding<0),L=this.$horizScroll!==q;L&&(this.$horizScroll=q,this.scrollBarH.setVisible(q));var A=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var D=x.scrollerHeight+this.lineHeight,N=!this.$maxLines&&this.$scrollPastEnd?(x.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;k+=N;var B=this.scrollMargin;this.session.setScrollTop(Math.max(-B.top,Math.min(this.scrollTop,k-x.scrollerHeight+B.bottom))),this.session.setScrollLeft(Math.max(-B.left,Math.min(this.scrollLeft,S+2*this.$padding-x.scrollerWidth+B.right)));var R=!w&&(this.$vScrollBarAlwaysVisible||x.scrollerHeight-k+N<0||this.scrollTop>B.top),V=A!==R;V&&(this.$vScroll=R,this.scrollBarV.setVisible(R));var F=this.scrollTop%this.lineHeight,P=Math.ceil(D/this.lineHeight)-1,j=Math.max(0,Math.round((this.scrollTop-F)/this.lineHeight)),I=j+P,W,H,z=this.lineHeight;j=T.screenToDocumentRow(j,0);var G=T.getFoldLine(j);G&&(j=G.start.row),W=T.documentToScreenRow(j,0),H=T.getRowLength(j)*z,I=Math.min(T.screenToDocumentRow(I,0),T.getLength()-1),D=x.scrollerHeight+T.getRowLength(I)*z+H,F=this.scrollTop-W*z;var Z=0;return(this.layerConfig.width!=S||L)&&(Z=this.CHANGE_H_SCROLL),(L||V)&&(Z|=this.$updateCachedSize(!0,this.gutterWidth,x.width,x.height),this._signal("scrollbarVisibilityChanged"),V&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:j,firstRowScreen:W,lastRow:I,lineHeight:z,characterWidth:this.characterWidth,minHeight:D,maxHeight:k,offset:F,gutterOffset:z?Math.max(0,Math.ceil((F+x.height-x.scrollerHeight)/z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Z},O.prototype.$updateLines=function(){if(!!this.$changedLines){var T=this.$changedLines.firstRow,x=this.$changedLines.lastRow;this.$changedLines=null;var w=this.layerConfig;if(!(T>w.lastRow+1)&&!(xthis.$textLayer.MAX_LINE_LENGTH&&(T=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(T*this.characterWidth))},O.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},O.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},O.prototype.addGutterDecoration=function(T,x){this.$gutterLayer.addGutterDecoration(T,x)},O.prototype.removeGutterDecoration=function(T,x){this.$gutterLayer.removeGutterDecoration(T,x)},O.prototype.updateBreakpoints=function(T){this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.setAnnotations=function(T){this.$gutterLayer.setAnnotations(T),this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},O.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},O.prototype.showCursor=function(){this.$cursorLayer.showCursor()},O.prototype.scrollSelectionIntoView=function(T,x,w){this.scrollCursorIntoView(T,w),this.scrollCursorIntoView(x,w)},O.prototype.scrollCursorIntoView=function(T,x,w){if(this.$size.scrollerHeight!==0){var M=this.$cursorLayer.getPixelPosition(T),k=M.left,S=M.top,q=w&&w.top||0,L=w&&w.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var A=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;A+q>S?(x&&A+q>S+this.lineHeight&&(S-=x*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):A+this.$size.scrollerHeight-L=1-this.scrollMargin.top||x>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},O.prototype.pixelToScreenCoordinates=function(T,x){var w;if(this.$hasCssTransforms){w={top:0,left:0};var M=this.$fontMetrics.transformCoordinates([T,x]);T=M[1]-this.gutterWidth-this.margin.left,x=M[0]}else w=this.scroller.getBoundingClientRect();var k=T+this.scrollLeft-w.left-this.$padding,S=k/this.characterWidth,q=Math.floor((x+this.scrollTop-w.top)/this.lineHeight),L=this.$blockCursor?Math.floor(S):Math.round(S);return{row:q,column:L,side:S-L>0?1:-1,offsetX:k}},O.prototype.screenToTextCoordinates=function(T,x){var w;if(this.$hasCssTransforms){w={top:0,left:0};var M=this.$fontMetrics.transformCoordinates([T,x]);T=M[1]-this.gutterWidth-this.margin.left,x=M[0]}else w=this.scroller.getBoundingClientRect();var k=T+this.scrollLeft-w.left-this.$padding,S=k/this.characterWidth,q=this.$blockCursor?Math.floor(S):Math.round(S),L=Math.floor((x+this.scrollTop-w.top)/this.lineHeight);return this.session.screenToDocumentPosition(L,Math.max(q,0),k)},O.prototype.textToScreenCoordinates=function(T,x){var w=this.scroller.getBoundingClientRect(),M=this.session.documentToScreenPosition(T,x),k=this.$padding+(this.session.$bidiHandler.isBidiRow(M.row,T)?this.session.$bidiHandler.getPosLeft(M.column):Math.round(M.column*this.characterWidth)),S=M.row*this.lineHeight;return{pageX:w.left+k-this.scrollLeft,pageY:w.top+S-this.scrollTop}},O.prototype.visualizeFocus=function(){a.addCssClass(this.container,"ace_focus")},O.prototype.visualizeBlur=function(){a.removeCssClass(this.container,"ace_focus")},O.prototype.showComposition=function(T){this.$composition=T,T.cssText||(T.cssText=this.textarea.style.cssText),T.useTextareaForIME==null&&(T.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(a.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")},O.prototype.setCompositionText=function(T){var x=this.session.selection.cursor;this.addToken(T,"composition_placeholder",x.row,x.column),this.$moveTextAreaToCursor()},O.prototype.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),a.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=""}},O.prototype.setGhostText=function(T,x){var w=this.session.selection.cursor,M=x||{row:w.row,column:w.column};this.removeGhostText();var k=T.split(` +`);this.addToken(k[0],"ghost_text",M.row,M.column),this.$ghostText={text:T,position:{row:M.row,column:M.column}},k.length>1&&(this.$ghostTextWidget={text:k.slice(1).join(` +`),row:M.row,column:M.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},O.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}},O.prototype.addToken=function(T,x,w,M){var k=this.session;k.bgTokenizer.lines[w]=null;var S={type:x,value:T},q=k.getTokens(w);if(M==null||!q.length)q.push(S);else for(var L=0,A=0;A1||Math.abs(T.$size.height-M)>1?T.$resizeTimer.delay():T.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},O}();E.prototype.CHANGE_CURSOR=1,E.prototype.CHANGE_MARKER=2,E.prototype.CHANGE_GUTTER=4,E.prototype.CHANGE_SCROLL=8,E.prototype.CHANGE_LINES=16,E.prototype.CHANGE_TEXT=32,E.prototype.CHANGE_SIZE=64,E.prototype.CHANGE_MARKER_BACK=128,E.prototype.CHANGE_MARKER_FRONT=256,E.prototype.CHANGE_FULL=512,E.prototype.CHANGE_H_SCROLL=1024,E.prototype.$changes=0,E.prototype.$padding=null,E.prototype.$frozen=!1,E.prototype.STEPS=8,g.implement(E.prototype,C),i.defineOptions(E.prototype,"renderer",{useResizeObserver:{set:function(O){!O&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):O&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(O){this.$textLayer.setShowInvisibles(O)&&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(O){typeof O=="number"&&(this.$printMarginColumn=O),this.$showPrintMargin=!!O,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(O){this.$gutter.style.display=O?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(O){this.$gutterLayer.$useSvgGutterIcons=O},initialValue:!1},showFoldedAnnotations:{set:function(O){this.$gutterLayer.$showFoldedAnnotations=O},initialValue:!1},fadeFoldWidgets:{set:function(O){a.setCssClass(this.$gutter,"ace_fade-fold-widgets",O)},initialValue:!1},showFoldWidgets:{set:function(O){this.$gutterLayer.setShowFoldWidgets(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(O){this.$textLayer.setDisplayIndentGuides(O)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(O){this.$textLayer.setHighlightIndentGuides(O)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(O){this.$gutterLayer.setHighlightGutterLine(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(O){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(O){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(O){typeof O=="number"&&(O=O+"px"),this.container.style.fontSize=O,this.updateFontSize()},initialValue:12},fontFamily:{set:function(O){this.container.style.fontFamily=O,this.updateFontSize()}},maxLines:{set:function(O){this.updateFull()}},minLines:{set:function(O){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(O){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(O){O=+O||0,this.$scrollPastEnd!=O&&(this.$scrollPastEnd=O,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(O){this.$gutterLayer.$fixedWidth=!!O,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(O){this.$updateCustomScrollbar(O)},initialValue:!1},theme:{set:function(O){this.setTheme(O)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!_.isMobile&&!_.isIE}}),p.VirtualRenderer=E}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,p,m){var g=e("../lib/oop"),a=e("../lib/net"),c=e("../lib/event_emitter").EventEmitter,i=e("../config");function u(o){var s="importScripts('"+a.qualifyURL(o)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var f=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new f;return h.append(s),h.getBlob("application/javascript")}}function r(o){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(i.get("loadWorkerFromBlob")){var s=u(o),f=window.URL||window.webkitURL,h=f.createObjectURL(s);return new Worker(h)}return new Worker(o)}var t=function(o){o.postMessage||(o=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=o,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(){g.implement(this,c),this.$createWorkerFromOldConfig=function(o,s,f,h,v){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),i.get("packaged")||!e.toUrl)h=h||i.moduleUrl(s,"worker");else{var $=this.$normalizePath;h=h||$(e.toUrl("ace/worker/worker.js",null,"_"));var C={};o.forEach(function(b){C[b]=$(e.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(h),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:C,module:s,classname:f}),this.$worker},this.onMessage=function(o){var s=o.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var f=this.callbacks[s.id];f&&(f(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(o){window.console&&console.error&&console.error(o)},this.$normalizePath=function(o){return a.qualifyURL(o)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(o,s){this.$worker.postMessage({command:o,args:s})},this.call=function(o,s,f){if(f){var h=this.callbackId++;this.callbacks[h]=f,s.push(h)}this.send(o,s)},this.emit=function(o,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:o,data:{data:s.data}})}catch(f){console.error(f.stack)}},this.attachToDocument=function(o){this.$doc&&this.terminate(),this.$doc=o,this.call("setValue",[o.getValue()]),o.on("change",this.changeListener,!0)},this.changeListener=function(o){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),o.action=="insert"?this.deltaQueue.push(o.start,o.lines):this.deltaQueue.push(o.start,o.end)},this.$sendDeltaQueue=function(){var o=this.deltaQueue;!o||(this.deltaQueue=null,o.length>50&&o.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:o}))}}).call(t.prototype);var l=function(o,s,f){var h=null,v=!1,$=Object.create(c),C=[],b=new t({messageBuffer:C,terminate:function(){},postMessage:function(_){C.push(_),!!h&&(v?setTimeout(y):y())}});b.setEmitSync=function(_){v=_};var y=function(){var _=C.shift();_.command?h[_.command].apply(h,_.args):_.event&&$._signal(_.event,_.data)};return $.postMessage=function(_){b.onMessage({data:_})},$.callback=function(_,E){this.postMessage({type:"call",id:E,data:_})},$.emit=function(_,E){this.postMessage({type:"event",name:_,data:E})},i.loadModule(["worker",s],function(_){for(h=new _[f]($);C.length;)y()}),b};p.UIWorkerClient=l,p.WorkerClient=t,p.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,p,m){var g=e("./range").Range,a=e("./lib/event_emitter").EventEmitter,c=e("./lib/oop"),i=function(){function u(r,t,l,o,s,f){var h=this;this.length=t,this.session=r,this.doc=r.getDocument(),this.mainClass=s,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=o,this.$onCursorChange=function(){setTimeout(function(){h.onCursorChange()})},this.$pos=l;var v=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var r=this,t=this.doc,l=this.session;this.selectionBefore=l.selection.toJSON(),l.selection.inMultiSelectMode&&l.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=l.addMarker(new g(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var f=t.createAnchor(s.row,s.column);f.$insertRight=!0,f.detach(),r.others.push(f)}),l.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,t=this;this.othersActive=!0,this.others.forEach(function(l){l.markerId=r.addMarker(new g(l.row,l.column,l.row,l.column+t.length),t.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var r=0;r=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;if(this.updateAnchors(r),o&&(this.length+=l),o&&!this.session.$fromUndo){if(r.action==="insert")for(var f=this.others.length-1;f>=0;f--){var h=this.others[f],v={row:h.row,column:h.column+s};this.doc.insertMergedLines(v,r.lines)}else if(r.action==="remove")for(var f=this.others.length-1;f>=0;f--){var h=this.others[f],v={row:h.row,column:h.column+s};this.doc.remove(new g(v.row,v.column,v.row,v.column-l))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var t=this.others.length;t--;)this.others[t].onChange(r);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var r=this,t=this.session,l=function(s,f){t.removeMarker(s.markerId),s.markerId=t.addMarker(new g(s.row,s.column,s.row,s.column+r.length),f,null,!1)};l(this.pos,this.mainClass);for(var o=this.others.length;o--;)l(this.others[o],this.othersClass)}},u.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},u.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},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),t=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,l=0;l1?a.multiSelect.joinSelections():a.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(a){a.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(a){a.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(a){a.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],p.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(a){a.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(a){return a&&a.inMultiSelectMode}}];var g=e("../keyboard/hash_handler").HashHandler;p.keyboardHandler=new g(p.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(e,p,m){var g=e("./range_list").RangeList,a=e("./range").Range,c=e("./selection").Selection,i=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),r=e("./lib/lang"),t=e("./commands/multi_select_commands");p.commands=t.defaultCommands.concat(t.multiSelectCommands);var l=e("./search").Search,o=new l;function s(b,y,_){return o.$options.wrap=!0,o.$options.needle=y,o.$options.backwards=_==-1,o.find(b)}var f=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(b,y){if(!!b){if(!this.inMultiSelectMode&&this.rangeCount===0){var _=this.toOrientedRange();if(this.rangeList.add(_),this.rangeList.add(b),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),y||this.fromOrientedRange(b);this.rangeList.removeAll(),this.rangeList.add(_),this.$onAddRange(_)}b.cursor||(b.cursor=b.end);var E=this.rangeList.add(b);return this.$onAddRange(b),E.length&&this.$onRemoveRange(E),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),y||this.fromOrientedRange(b)}},this.toSingleRange=function(b){b=b||this.ranges[0];var y=this.rangeList.removeAll();y.length&&this.$onRemoveRange(y),b&&this.fromOrientedRange(b)},this.substractPoint=function(b){var y=this.rangeList.substractPoint(b);if(y)return this.$onRemoveRange(y),y[0]},this.mergeOverlappingRanges=function(){var b=this.rangeList.merge();b.length&&this.$onRemoveRange(b)},this.$onAddRange=function(b){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(b),this._signal("addRange",{range:b})},this.$onRemoveRange=function(b){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var y=this.rangeList.ranges.pop();b.push(y),this.rangeCount=0}for(var _=b.length;_--;){var E=this.ranges.indexOf(b[_]);this.ranges.splice(E,1)}this._signal("removeRange",{ranges:b}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),y=y||this.ranges[0],y&&!y.isEqual(this.getRange())&&this.fromOrientedRange(y)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var b=this.ranges.length?this.ranges:[this.getRange()],y=[],_=0;_1){var b=this.rangeList.ranges,y=b[b.length-1],_=a.fromPoints(b[0].start,y.end);this.toSingleRange(),this.setSelectionRange(_,y.cursor==y.start)}else{var E=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),T=this.rectangularRangeBlock(E,O);T.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(b,y,_){var E=[],O=b.column0;)N--;if(N>0)for(var B=0;E[B].isEmpty();)B++;for(var R=N;R>=B;R--)E[R].isEmpty()&&E.splice(R,1)}return E}}.call(c.prototype);var h=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(b){b.cursor||(b.cursor=b.end);var y=this.getSelectionStyle();return b.marker=this.session.addMarker(b,"ace_selection",y),this.session.$selectionMarkers.push(b),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,b},this.removeSelectionMarker=function(b){if(!!b.marker){this.session.removeMarker(b.marker);var y=this.session.$selectionMarkers.indexOf(b);y!=-1&&this.session.$selectionMarkers.splice(y,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(b){for(var y=this.session.$selectionMarkers,_=b.length;_--;){var E=b[_];if(!!E.marker){this.session.removeMarker(E.marker);var O=y.indexOf(E);O!=-1&&y.splice(O,1)}}this.session.selectionMarkerCount=y.length},this.$onAddRange=function(b){this.addSelectionMarker(b.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(b){this.removeSelectionMarkers(b.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(b){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(t.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(b){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(t.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(b){var y=b.command,_=b.editor;if(!!_.multiSelect){if(y.multiSelectAction)y.multiSelectAction=="forEach"?E=_.forEachSelection(y,b.args):y.multiSelectAction=="forEachLine"?E=_.forEachSelection(y,b.args,!0):y.multiSelectAction=="single"?(_.exitMultiSelectMode(),E=y.exec(_,b.args||{})):E=y.multiSelectAction(_,b.args||{});else{var E=y.exec(_,b.args||{});_.multiSelect.addRange(_.multiSelect.toOrientedRange()),_.multiSelect.mergeOverlappingRanges()}return E}},this.forEachSelection=function(b,y,_){if(!this.inVirtualSelectionMode){var E=_&&_.keepOrder,O=_==!0||_&&_.$byLines,T=this.session,x=this.selection,w=x.rangeList,M=(E?x:w).ranges,k;if(!M.length)return b.exec?b.exec(this,y||{}):b(this,y||{});var S=x._eventRegistry;x._eventRegistry={};var q=new c(T);this.inVirtualSelectionMode=!0;for(var L=M.length;L--;){if(O)for(;L>0&&M[L].start.row==M[L-1].end.row;)L--;q.fromOrientedRange(M[L]),q.index=L,this.selection=T.selection=q;var A=b.exec?b.exec(this,y||{}):b(this,y||{});!k&&A!==void 0&&(k=A),q.toOrientedRange(M[L])}q.detach(),this.selection=T.selection=x,this.inVirtualSelectionMode=!1,x._eventRegistry=S,x.mergeOverlappingRanges(),x.ranges[0]&&x.fromOrientedRange(x.ranges[0]);var D=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),D&&D.from==D.to&&this.renderer.animateScrolling(D.from),k}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var b="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var y=this.multiSelect.rangeList.ranges,_=[],E=0;E0);x<0&&(x=0),w>=k&&(w=k-1)}var q=this.session.removeFullLines(x,w);q=this.$reAlignText(q,M),this.session.insert({row:x,column:0},q.join(` +`)+` +`),M||(T.start.column=0,T.end.column=q[q.length-1].length),this.selection.setRange(T)}else{O.forEach(function(N){y.substractPoint(N.cursor)});var L=0,A=1/0,D=_.map(function(N){var B=N.cursor,R=b.getLine(B.row),V=R.substr(B.column).search(/\S/g);return V==-1&&(V=0),B.column>L&&(L=B.column),VF?b.insert(R,r.stringRepeat(" ",V-F)):b.remove(new a(R.row,R.column,R.row,R.column-V+F)),N.start.column=N.end.column=L,N.start.row=N.end.row=R.row,N.cursor=N.end}),y.fromOrientedRange(_[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(b,y){var _=!0,E=!0,O,T,x;return b.map(function(q){var L=q.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?O==null?(O=L[1].length,T=L[2].length,x=L[3].length,L):(O+T+x!=L[1].length+L[2].length+L[3].length&&(E=!1),O!=L[1].length&&(_=!1),O>L[1].length&&(O=L[1].length),TL[3].length&&(x=L[3].length),L):[q]}).map(y?M:_?E?k:M:S);function w(q){return r.stringRepeat(" ",q)}function M(q){return q[2]?w(O)+q[2]+w(T-q[2].length+x)+q[4].replace(/^([=:])\s+/,"$1 "):q[0]}function k(q){return q[2]?w(O+T-q[2].length)+q[2]+w(x)+q[4].replace(/^([=:])\s+/,"$1 "):q[0]}function S(q){return q[2]?w(O)+q[2]+w(x)+q[4].replace(/^([=:])\s+/,"$1 "):q[0]}}}).call(h.prototype);function v(b,y){return b.row==y.row&&b.column==y.column}p.onSessionChange=function(b){var y=b.session;y&&!y.multiSelect&&(y.$selectionMarkers=[],y.selection.$initRangeList(),y.multiSelect=y.selection),this.multiSelect=y&&y.multiSelect;var _=b.oldSession;_&&(_.multiSelect.off("addRange",this.$onAddRange),_.multiSelect.off("removeRange",this.$onRemoveRange),_.multiSelect.off("multiSelect",this.$onMultiSelect),_.multiSelect.off("singleSelect",this.$onSingleSelect),_.multiSelect.lead.off("change",this.$checkMultiselectChange),_.multiSelect.anchor.off("change",this.$checkMultiselectChange)),y&&(y.multiSelect.on("addRange",this.$onAddRange),y.multiSelect.on("removeRange",this.$onRemoveRange),y.multiSelect.on("multiSelect",this.$onMultiSelect),y.multiSelect.on("singleSelect",this.$onSingleSelect),y.multiSelect.lead.on("change",this.$checkMultiselectChange),y.multiSelect.anchor.on("change",this.$checkMultiselectChange)),y&&this.inMultiSelectMode!=y.selection.inMultiSelectMode&&(y.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function $(b){b.$multiselectOnSessionChange||(b.$onAddRange=b.$onAddRange.bind(b),b.$onRemoveRange=b.$onRemoveRange.bind(b),b.$onMultiSelect=b.$onMultiSelect.bind(b),b.$onSingleSelect=b.$onSingleSelect.bind(b),b.$multiselectOnSessionChange=p.onSessionChange.bind(b),b.$checkMultiselectChange=b.$checkMultiselectChange.bind(b),b.$multiselectOnSessionChange(b),b.on("changeSession",b.$multiselectOnSessionChange),b.on("mousedown",i),b.commands.addCommands(t.defaultCommands),C(b))}function C(b){if(!b.textInput)return;var y=b.textInput.getElement(),_=!1;u.addListener(y,"keydown",function(O){var T=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);b.$blockSelectEnabled&&T?_||(b.renderer.setMouseCursor("crosshair"),_=!0):_&&E()},b),u.addListener(y,"keyup",E,b),u.addListener(y,"blur",E,b);function E(O){_&&(b.renderer.setMouseCursor(""),_=!1)}}p.MultiSelect=$,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(b){$(this),b?this.on("mousedown",i):this.off("mousedown",i)},value:!0},enableBlockSelect:{set:function(b){this.$blockSelectEnabled=b},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,p,m){var g=e("../../range").Range,a=p.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(c,i,u){var r=c.getLine(u);return this.foldingStartMarker.test(r)?"start":i=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(c,i,u){return null},this.indentationBlock=function(c,i,u){var r=/\S/,t=c.getLine(i),l=t.search(r);if(l!=-1){for(var o=u||t.length,s=c.getLength(),f=i,h=i;++if){var C=c.getLine(h).length;return new g(f,o,h,C)}}},this.openingBracketBlock=function(c,i,u,r,t){var l={row:u,column:r+1},o=c.$findClosingBracket(i,l,t);if(!!o){var s=c.foldWidgets[o.row];return s==null&&(s=c.getFoldWidget(o.row)),s=="start"&&o.row>l.row&&(o.row--,o.column=c.getLine(o.row).length),g.fromPoints(l,o)}},this.closingBracketBlock=function(c,i,u,r,t){var l={row:u,column:r},o=c.$findOpeningBracket(i,l);if(!!o)return o.column++,l.column--,g.fromPoints(o,l)}}).call(a.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(e,p,m){var g=e("../line_widgets").LineWidgets,a=e("../lib/dom"),c=e("../range").Range,i=e("../config").nls;function u(t,l,o){for(var s=0,f=t.length-1;s<=f;){var h=s+f>>1,v=o(l,t[h]);if(v>0)s=h+1;else if(v<0)f=h-1;else return h}return-(s+1)}function r(t,l,o){var s=t.getAnnotations().sort(c.comparePoints);if(!!s.length){var f=u(s,{row:l,column:-1},c.comparePoints);f<0&&(f=-f-1),f>=s.length?f=o>0?0:s.length-1:f===0&&o<0&&(f=s.length-1);var h=s[f];if(!(!h||!o)){if(h.row===l){do h=s[f+=o];while(h&&h.row===l);if(!h)return s.slice()}var v=[];l=h.row;do v[o<0?"unshift":"push"](h),h=s[f+=o];while(h&&h.row==l);return v.length&&v}}}p.showErrorMarker=function(t,l){var o=t.session;o.widgetManager||(o.widgetManager=new g(o),o.widgetManager.attach(t));var s=t.getCursorPosition(),f=s.row,h=o.widgetManager.getWidgetsAtRow(f).filter(function(T){return T.type=="errorMarker"})[0];h?h.destroy():f-=l;var v=r(o,f,l),$;if(v){var C=v[0];s.column=(C.pos&&typeof C.column!="number"?C.pos.sc:C.column)||0,s.row=C.row,$=t.renderer.$gutterLayer.$annotations[s.row]}else{if(h)return;$={text:[i("Looks good!")],className:"ace_ok"}}t.session.unfold(s.row),t.selection.moveToPosition(s);var b={row:s.row,fixedWidth:!0,coverGutter:!0,el:a.createElement("div"),type:"errorMarker"},y=b.el.appendChild(a.createElement("div")),_=b.el.appendChild(a.createElement("div"));_.className="error_widget_arrow "+$.className;var E=t.renderer.$cursorLayer.getPixelPosition(s).left;_.style.left=E+t.renderer.gutterWidth-5+"px",b.el.className="error_widget_wrapper",y.className="error_widget "+$.className,y.innerHTML=$.text.join("
"),y.appendChild(a.createElement("div"));var O=function(T,x,w){if(x===0&&(w==="esc"||w==="return"))return b.destroy(),{command:"null"}};b.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(O),o.widgetManager.removeLineWidget(b),t.off("changeSelection",b.destroy),t.off("changeSession",b.destroy),t.off("mouseup",b.destroy),t.off("change",b.destroy))},t.keyBinding.addKeyboardHandler(O),t.on("changeSelection",b.destroy),t.on("changeSession",b.destroy),t.on("mouseup",b.destroy),t.on("change",b.destroy),t.session.widgetManager.addLineWidget(b),b.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:b.el.offsetHeight})},a.importCssString(` + .error_widget_wrapper { + background: inherit; + color: inherit; + border:none + } + .error_widget { + border-top: solid 2px; + border-bottom: solid 2px; + margin: 5px 0; + padding: 10px 40px; + white-space: pre-wrap; + } + .error_widget.ace_error, .error_widget_arrow.ace_error{ + border-color: #ff5a5a + } + .error_widget.ace_warning, .error_widget_arrow.ace_warning{ + border-color: #F1D817 + } + .error_widget.ace_info, .error_widget_arrow.ace_info{ + border-color: #5a5a5a + } + .error_widget.ace_ok, .error_widget_arrow.ace_ok{ + border-color: #5aaa5a + } + .error_widget_arrow { + position: absolute; + border: solid 5px; + border-top-color: transparent!important; + border-right-color: transparent!important; + border-left-color: transparent!important; + top: -5px; + } +`,"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(e,p,m){e("./loader_build")(p);var g=e("./lib/dom"),a=e("./range").Range,c=e("./editor").Editor,i=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,r=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),p.config=e("./config"),p.edit=function(t,l){if(typeof t=="string"){var o=t;if(t=document.getElementById(o),!t)throw new Error("ace.edit can't find div #"+o)}if(t&&t.env&&t.env.editor instanceof c)return t.env.editor;var s="";if(t&&/input|textarea/i.test(t.tagName)){var f=t;s=f.value,t=g.createElement("pre"),f.parentNode.replaceChild(t,f)}else t&&(s=t.textContent,t.innerHTML="");var h=p.createEditSession(s),v=new c(new r(t),h,l),$={document:h,editor:v,onResize:v.resize.bind(v,null)};return f&&($.textarea=f),v.on("destroy",function(){$.editor.container.env=null}),v.container.env=v.env=$,v},p.createEditSession=function(t,l){var o=new i(t,l);return o.setUndoManager(new u),o},p.Range=a,p.Editor=c,p.EditSession=i,p.UndoManager=u,p.VirtualRenderer=r,p.version=p.config.version}),function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e);for(var p in e)e.hasOwnProperty(p)&&(window.ace[p]=e[p]);window.ace.default=window.ace,n&&(n.exports=window.ace)})}()})(ace$2);var ace$1=ace$2.exports,themeSqlserver={exports:{}};(function(n,d){ace.define("ace/theme/sqlserver.css",["require","exports","module"],function(e,p,m){m.exports=`.ace-sqlserver .ace_gutter { + background: #ebebeb; + color: #333; + overflow: hidden; +} + +.ace-sqlserver .ace_print-margin { + width: 1px; + background: #e8e8e8; +} + +.ace-sqlserver { + background-color: #FFFFFF; + color: black; +} + +.ace-sqlserver .ace_identifier { + color: black; +} + +.ace-sqlserver .ace_keyword { + color: #0000FF; +} + +.ace-sqlserver .ace_numeric { + color: black; +} + +.ace-sqlserver .ace_storage { + color: #11B7BE; +} + +.ace-sqlserver .ace_keyword.ace_operator, +.ace-sqlserver .ace_lparen, +.ace-sqlserver .ace_rparen, +.ace-sqlserver .ace_punctuation { + color: #808080; +} + +.ace-sqlserver .ace_set.ace_statement { + color: #0000FF; + text-decoration: underline; +} + +.ace-sqlserver .ace_cursor { + color: black; +} + +.ace-sqlserver .ace_invisible { + color: rgb(191, 191, 191); +} + +.ace-sqlserver .ace_constant.ace_buildin { + color: rgb(88, 72, 246); +} + +.ace-sqlserver .ace_constant.ace_language { + color: #979797; +} + +.ace-sqlserver .ace_constant.ace_library { + color: rgb(6, 150, 14); +} + +.ace-sqlserver .ace_invalid { + background-color: rgb(153, 0, 0); + color: white; +} + +.ace-sqlserver .ace_support.ace_function { + color: #FF00FF; +} + +.ace-sqlserver .ace_support.ace_constant { + color: rgb(6, 150, 14); +} + +.ace-sqlserver .ace_class { + color: #008080; +} + +.ace-sqlserver .ace_support.ace_other { + color: #6D79DE; +} + +.ace-sqlserver .ace_variable.ace_parameter { + font-style: italic; + color: #FD971F; +} + +.ace-sqlserver .ace_comment { + color: #008000; +} + +.ace-sqlserver .ace_constant.ace_numeric { + color: black; +} + +.ace-sqlserver .ace_variable { + color: rgb(49, 132, 149); +} + +.ace-sqlserver .ace_xml-pe { + color: rgb(104, 104, 91); +} + +.ace-sqlserver .ace_support.ace_storedprocedure { + color: #800000; +} + +.ace-sqlserver .ace_heading { + color: rgb(12, 7, 255); +} + +.ace-sqlserver .ace_list { + color: rgb(185, 6, 144); +} + +.ace-sqlserver .ace_marker-layer .ace_selection { + background: rgb(181, 213, 255); +} + +.ace-sqlserver .ace_marker-layer .ace_step { + background: rgb(252, 255, 0); +} + +.ace-sqlserver .ace_marker-layer .ace_stack { + background: rgb(164, 229, 101); +} + +.ace-sqlserver .ace_marker-layer .ace_bracket { + margin: -1px 0 0 -1px; + border: 1px solid rgb(192, 192, 192); +} + +.ace-sqlserver .ace_marker-layer .ace_active-line { + background: rgba(0, 0, 0, 0.07); +} + +.ace-sqlserver .ace_gutter-active-line { + background-color: #dcdcdc; +} + +.ace-sqlserver .ace_marker-layer .ace_selected-word { + background: rgb(250, 250, 255); + border: 1px solid rgb(200, 200, 250); +} + +.ace-sqlserver .ace_meta.ace_tag { + color: #0000FF; +} + +.ace-sqlserver .ace_string.ace_regex { + color: #FF0000; +} + +.ace-sqlserver .ace_string { + color: #FF0000; +} + +.ace-sqlserver .ace_entity.ace_other.ace_attribute-name { + color: #994409; +} + +.ace-sqlserver .ace_indent-guide { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; +} + +.ace-sqlserver .ace_indent-guide-active { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; +} +`}),ace.define("ace/theme/sqlserver",["require","exports","module","ace/theme/sqlserver.css","ace/lib/dom"],function(e,p,m){p.isDark=!1,p.cssClass="ace-sqlserver",p.cssText=e("./sqlserver.css");var g=e("../lib/dom");g.importCssString(p.cssText,p.cssClass,!1)}),function(){ace.require(["ace/theme/sqlserver"],function(e){n&&(n.exports=e)})}()})(themeSqlserver);var modeJavascript={exports:{}};(function(n,d){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,p,m){var g=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,c=function(){this.$rules={start:[{token:["comment.doc.tag","text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text"}]},{token:["comment.doc.tag","text","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text"}]},{token:["comment.doc.tag","text","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},c.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};g.inherits(c,a),c.getTagRule=function(i){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},c.getStartRule=function(i){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:i}},c.getEndRule=function(i){return{token:"comment.doc",regex:"\\*\\/",next:i}},p.JsDocCommentHighlightRules=c}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,p,m){function g(){var l=r.replace("\\d","\\d\\-"),o={onMatch:function(f,h,v){var $=f.charAt(1)=="/"?2:1;return $==1?(h!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):$==2&&h==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+($==1?"":"end-")+"tag-open.xml",value:f.slice(0,$)},{type:"meta.tag.tag-name.xml",value:f.substr($)}]},regex:"",onMatch:function(f,h,v){return h==v[0]&&v.shift(),f.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:f}]},nextState:"jsx"},s,a("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:l},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},o],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function a(l){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:l||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:l||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var c=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,u=e("./text_highlight_rules").TextHighlightRules,r="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",t=function(l){var o=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),s="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",f="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),a("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+s+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:o,regex:r},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:r},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),a("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[a("function_arguments"),{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:f},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:f},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!l||!l.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(h,v,$){if(this.next=h=="{"?this.nextState:"",h=="{"&&$.length)$.unshift("start",v);else if(h=="}"&&$.length&&($.shift(),this.next=$.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return h=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:f},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+r+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!l||l.jsx!=0)&&g.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};c.inherits(t,u),p.JavaScriptHighlightRules=t}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,p,m){var g=e("../range").Range,a=function(){};(function(){this.checkOutdent=function(c,i){return/^\s+$/.test(c)?/^\s*\}/.test(i):!1},this.autoOutdent=function(c,i){var u=c.getLine(i),r=u.match(/^(\s*\})/);if(!r)return 0;var t=r[1].length,l=c.findMatchingBracket({row:i,column:t});if(!l||l.row==i)return 0;var o=this.$getIndent(c.getLine(l.row));c.replace(new g(i,0,i,t-1),o)},this.$getIndent=function(c){return c.match(/^\s*/)[0]}}).call(a.prototype),p.MatchingBraceOutdent=a}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,p,m){var g=e("../../lib/oop"),a=e("../../range").Range,c=e("./fold_mode").FoldMode,i=p.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};g.inherits(i,c),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,r,t){var l=u.getLine(t);if(this.singleLineBlockCommentRe.test(l)&&!this.startRegionRe.test(l)&&!this.tripleStarBlockCommentRe.test(l))return"";var o=this._getFoldWidgetBase(u,r,t);return!o&&this.startRegionRe.test(l)?"start":o},this.getFoldWidgetRange=function(u,r,t,l){var o=u.getLine(t);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(u,o,t);var s=o.match(this.foldingStartMarker);if(s){var f=s.index;if(s[1])return this.openingBracketBlock(u,s[1],t,f);var h=u.getCommentFoldRange(t,f+s[0].length,1);return h&&!h.isMultiLine()&&(l?h=this.getSectionRange(u,t):r!="all"&&(h=null)),h}if(r!=="markbegin"){var s=o.match(this.foldingStopMarker);if(s){var f=s.index+s[0].length;return s[1]?this.closingBracketBlock(u,s[1],t,f):u.getCommentFoldRange(t,f,-1)}}},this.getSectionRange=function(u,r){var t=u.getLine(r),l=t.search(/\S/),o=r,s=t.length;r+=1;for(var f=r,h=u.getLength();++rv)break;var $=this.getFoldWidgetRange(u,"all",r);if($){if($.start.row<=o)break;if($.isMultiLine())r=$.end.row;else if(l==v)break}f=r}}return new a(o,s,f,u.getLine(f).length)},this.getCommentRegionBlock=function(u,r,t){for(var l=r.search(/\s*$/),o=u.getLength(),s=t,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++ts)return new a(s,l,$,r.length)}}.call(i.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,p,m){var g=e("../lib/oop"),a=e("./text").Mode,c=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,r=e("./behaviour/cstyle").CstyleBehaviour,t=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=c,this.$outdent=new i,this.$behaviour=new r,this.foldingRules=new t};g.inherits(l,a),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(o,s,f){var h=this.$getIndent(s),v=this.getTokenizer().getLineTokens(s,o),$=v.tokens,C=v.state;if($.length&&$[$.length-1].type=="comment")return h;if(o=="start"||o=="no_regex"){var b=s.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);b&&(h+=f)}else if(o=="doc-start"){if(C=="start"||C=="no_regex")return"";var b=s.match(/^\s*(\/?)\*/);b&&(b[1]&&(h+=" "),h+="* ")}return h},this.checkOutdent=function(o,s,f){return this.$outdent.checkOutdent(s,f)},this.autoOutdent=function(o,s,f){this.$outdent.autoOutdent(s,f)},this.createWorker=function(o){var s=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return s.attachToDocument(o.getDocument()),s.on("annotate",function(f){o.setAnnotations(f.data)}),s.on("terminate",function(){o.clearAnnotations()}),s},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),p.Mode=l}),function(){ace.require(["ace/mode/javascript"],function(e){n&&(n.exports=e)})}()})(modeJavascript);var modeJson={exports:{}};(function(n,d){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,p,m){var g=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,c=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};g.inherits(c,a),p.JsonHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,p,m){var g=e("../range").Range,a=function(){};(function(){this.checkOutdent=function(c,i){return/^\s+$/.test(c)?/^\s*\}/.test(i):!1},this.autoOutdent=function(c,i){var u=c.getLine(i),r=u.match(/^(\s*\})/);if(!r)return 0;var t=r[1].length,l=c.findMatchingBracket({row:i,column:t});if(!l||l.row==i)return 0;var o=this.$getIndent(c.getLine(l.row));c.replace(new g(i,0,i,t-1),o)},this.$getIndent=function(c){return c.match(/^\s*/)[0]}}).call(a.prototype),p.MatchingBraceOutdent=a}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,p,m){var g=e("../../lib/oop"),a=e("../../range").Range,c=e("./fold_mode").FoldMode,i=p.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};g.inherits(i,c),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,r,t){var l=u.getLine(t);if(this.singleLineBlockCommentRe.test(l)&&!this.startRegionRe.test(l)&&!this.tripleStarBlockCommentRe.test(l))return"";var o=this._getFoldWidgetBase(u,r,t);return!o&&this.startRegionRe.test(l)?"start":o},this.getFoldWidgetRange=function(u,r,t,l){var o=u.getLine(t);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(u,o,t);var s=o.match(this.foldingStartMarker);if(s){var f=s.index;if(s[1])return this.openingBracketBlock(u,s[1],t,f);var h=u.getCommentFoldRange(t,f+s[0].length,1);return h&&!h.isMultiLine()&&(l?h=this.getSectionRange(u,t):r!="all"&&(h=null)),h}if(r!=="markbegin"){var s=o.match(this.foldingStopMarker);if(s){var f=s.index+s[0].length;return s[1]?this.closingBracketBlock(u,s[1],t,f):u.getCommentFoldRange(t,f,-1)}}},this.getSectionRange=function(u,r){var t=u.getLine(r),l=t.search(/\S/),o=r,s=t.length;r+=1;for(var f=r,h=u.getLength();++rv)break;var $=this.getFoldWidgetRange(u,"all",r);if($){if($.start.row<=o)break;if($.isMultiLine())r=$.end.row;else if(l==v)break}f=r}}return new a(o,s,f,u.getLine(f).length)},this.getCommentRegionBlock=function(u,r,t){for(var l=r.search(/\s*$/),o=u.getLength(),s=t,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++ts)return new a(s,l,$,r.length)}}.call(i.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,p,m){var g=e("../lib/oop"),a=e("./text").Mode,c=e("./json_highlight_rules").JsonHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,r=e("../worker/worker_client").WorkerClient,t=function(){this.HighlightRules=c,this.$outdent=new i,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};g.inherits(t,a),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(l,o,s){var f=this.$getIndent(o);if(l=="start"){var h=o.match(/^.*[\{\(\[]\s*$/);h&&(f+=s)}return f},this.checkOutdent=function(l,o,s){return this.$outdent.checkOutdent(o,s)},this.autoOutdent=function(l,o,s){this.$outdent.autoOutdent(o,s)},this.createWorker=function(l){var o=new r(["ace"],"ace/mode/json_worker","JsonWorker");return o.attachToDocument(l.getDocument()),o.on("annotate",function(s){l.setAnnotations(s.data)}),o.on("terminate",function(){l.clearAnnotations()}),o},this.$id="ace/mode/json"}.call(t.prototype),p.Mode=t}),function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})}()})(modeJson);var modeCss={exports:{}};(function(n,d){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,p,m){var g=e("../lib/oop");e("../lib/lang");var a=e("./text_highlight_rules").TextHighlightRules,c=p.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",i=p.supportFunction="rgb|rgba|url|attr|counter|counters",u=p.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",r=p.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",t=p.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",l=p.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",o=p.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",s=p.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",f=function(){var h=this.createKeywordMapper({"support.function":i,"support.constant":u,"support.type":c,"support.constant.color":r,"support.constant.fonts":t},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:l},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+l+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:l},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:o},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s},{include:"url"},{token:h,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};g.inherits(f,a),p.CssHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,p,m){var g=e("../range").Range,a=function(){};(function(){this.checkOutdent=function(c,i){return/^\s+$/.test(c)?/^\s*\}/.test(i):!1},this.autoOutdent=function(c,i){var u=c.getLine(i),r=u.match(/^(\s*\})/);if(!r)return 0;var t=r[1].length,l=c.findMatchingBracket({row:i,column:t});if(!l||l.row==i)return 0;var o=this.$getIndent(c.getLine(l.row));c.replace(new g(i,0,i,t-1),o)},this.$getIndent=function(c){return c.match(/^\s*/)[0]}}).call(a.prototype),p.MatchingBraceOutdent=a}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,p,m){var g={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},a=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var c=document.createElement("c").style;for(var i in c)if(typeof c[i]=="string"){var u=i.replace(/[A-Z]/g,function(r){return"-"+r.toLowerCase()});g.hasOwnProperty(u)||(g[u]=1)}}this.completionsDefined=!0},this.getCompletions=function(c,i,u,r){if(this.completionsDefined||this.defineCompletions(),c==="ruleset"||i.$mode.$id=="ace/mode/scss"){var t=i.getLine(u.row).substr(0,u.column),l=/\([^)]*$/.test(t);return l&&(t=t.substr(t.lastIndexOf("(")+1)),/:[^;]+$/.test(t)?(/([\w\-]+):[^:]*$/.test(t),this.getPropertyValueCompletions(c,i,u,r)):this.getPropertyCompletions(c,i,u,r,l)}return[]},this.getPropertyCompletions=function(c,i,u,r,t){t=t||!1;var l=Object.keys(g);return l.map(function(o){return{caption:o,snippet:o+": $0"+(t?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(c,i,u,r){var t=i.getLine(u.row).substr(0,u.column),l=(/([\w\-]+):[^:]*$/.exec(t)||{})[1];if(!l)return[];var o=[];return l in g&&typeof g[l]=="object"&&(o=Object.keys(g[l])),o.map(function(s){return{caption:s,snippet:s,meta:"property value",score:1e6}})}}).call(a.prototype),p.CssCompletions=a}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,p,m){var g=e("../../lib/oop");e("../behaviour").Behaviour;var a=e("./cstyle").CstyleBehaviour,c=e("../../token_iterator").TokenIterator,i=function(){this.inherit(a),this.add("colon","insertion",function(u,r,t,l,o){if(o===":"&&t.selection.isEmpty()){var s=t.getCursorPosition(),f=new c(l,s.row,s.column),h=f.getCurrentToken();if(h&&h.value.match(/\s+/)&&(h=f.stepBackward()),h&&h.type==="support.type"){var v=l.doc.getLine(s.row),$=v.substring(s.column,s.column+1);if($===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(u,r,t,l,o){var s=l.doc.getTextRange(o);if(!o.isMultiLine()&&s===":"){var f=t.getCursorPosition(),h=new c(l,f.row,f.column),v=h.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=h.stepBackward()),v&&v.type==="support.type"){var $=l.doc.getLine(o.start.row),C=$.substring(o.end.column,o.end.column+1);if(C===";")return o.end.column++,o}}}),this.add("semicolon","insertion",function(u,r,t,l,o){if(o===";"&&t.selection.isEmpty()){var s=t.getCursorPosition(),f=l.doc.getLine(s.row),h=f.substring(s.column,s.column+1);if(h===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(u,r,t,l,o){if(o==="!"&&t.selection.isEmpty()){var s=t.getCursorPosition(),f=l.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(f.substring(s.column)))return{text:"!important",selection:[10,10]}}})};g.inherits(i,a),p.CssBehaviour=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,p,m){var g=e("../../lib/oop"),a=e("../../range").Range,c=e("./fold_mode").FoldMode,i=p.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};g.inherits(i,c),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,r,t){var l=u.getLine(t);if(this.singleLineBlockCommentRe.test(l)&&!this.startRegionRe.test(l)&&!this.tripleStarBlockCommentRe.test(l))return"";var o=this._getFoldWidgetBase(u,r,t);return!o&&this.startRegionRe.test(l)?"start":o},this.getFoldWidgetRange=function(u,r,t,l){var o=u.getLine(t);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(u,o,t);var s=o.match(this.foldingStartMarker);if(s){var f=s.index;if(s[1])return this.openingBracketBlock(u,s[1],t,f);var h=u.getCommentFoldRange(t,f+s[0].length,1);return h&&!h.isMultiLine()&&(l?h=this.getSectionRange(u,t):r!="all"&&(h=null)),h}if(r!=="markbegin"){var s=o.match(this.foldingStopMarker);if(s){var f=s.index+s[0].length;return s[1]?this.closingBracketBlock(u,s[1],t,f):u.getCommentFoldRange(t,f,-1)}}},this.getSectionRange=function(u,r){var t=u.getLine(r),l=t.search(/\S/),o=r,s=t.length;r+=1;for(var f=r,h=u.getLength();++rv)break;var $=this.getFoldWidgetRange(u,"all",r);if($){if($.start.row<=o)break;if($.isMultiLine())r=$.end.row;else if(l==v)break}f=r}}return new a(o,s,f,u.getLine(f).length)},this.getCommentRegionBlock=function(u,r,t){for(var l=r.search(/\s*$/),o=u.getLength(),s=t,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++ts)return new a(s,l,$,r.length)}}.call(i.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,p,m){var g=e("../lib/oop"),a=e("./text").Mode,c=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,r=e("./css_completions").CssCompletions,t=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,o=function(){this.HighlightRules=c,this.$outdent=new i,this.$behaviour=new t,this.$completer=new r,this.foldingRules=new l};g.inherits(o,a),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(s,f,h){var v=this.$getIndent(f),$=this.getTokenizer().getLineTokens(f,s).tokens;if($.length&&$[$.length-1].type=="comment")return v;var C=f.match(/^.*\{\s*$/);return C&&(v+=h),v},this.checkOutdent=function(s,f,h){return this.$outdent.checkOutdent(f,h)},this.autoOutdent=function(s,f,h){this.$outdent.autoOutdent(f,h)},this.getCompletions=function(s,f,h,v){return this.$completer.getCompletions(s,f,h,v)},this.createWorker=function(s){var f=new u(["ace"],"ace/mode/css_worker","Worker");return f.attachToDocument(s.getDocument()),f.on("annotate",function(h){s.setAnnotations(h.data)}),f.on("terminate",function(){s.clearAnnotations()}),f},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(o.prototype),p.Mode=o}),function(){ace.require(["ace/mode/css"],function(e){n&&(n.exports=e)})}()})(modeCss);var extLanguage_tools={exports:{}};(function(n,d){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,p,m){function g(y){var _=new Date().toLocaleString("en-us",y);return _.length==1?"0"+_:_}var a=e("./lib/dom"),c=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,u=e("./lib/lang"),r=e("./range").Range,t=e("./range_list").RangeList,l=e("./keyboard/hash_handler").HashHandler,o=e("./tokenizer").Tokenizer,s=e("./clipboard"),f={CURRENT_WORD:function(y){return y.session.getTextRange(y.session.getWordRange())},SELECTION:function(y,_,E){var O=y.session.getTextRange();return E?O.replace(/\n\r?([ \t]*\S)/g,` +`+E+"$1"):O},CURRENT_LINE:function(y){return y.session.getLine(y.getCursorPosition().row)},PREV_LINE:function(y){return y.session.getLine(y.getCursorPosition().row-1)},LINE_INDEX:function(y){return y.getCursorPosition().row},LINE_NUMBER:function(y){return y.getCursorPosition().row+1},SOFT_TABS:function(y){return y.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(y){return y.session.getTabSize()},CLIPBOARD:function(y){return s.getText&&s.getText()},FILENAME:function(y){return/[^/\\]*$/.exec(this.FILEPATH(y))[0]},FILENAME_BASE:function(y){return/[^/\\]*$/.exec(this.FILEPATH(y))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(y){return this.FILEPATH(y).replace(/[^/\\]*$/,"")},FILEPATH:function(y){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(y){var _=y.session.$mode||{};return _.blockComment&&_.blockComment.start||""},BLOCK_COMMENT_END:function(y){var _=y.session.$mode||{};return _.blockComment&&_.blockComment.end||""},LINE_COMMENT:function(y){var _=y.session.$mode||{};return _.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};f.SELECTED_TEXT=f.SELECTION;var h=function(){this.snippetMap={},this.snippetNameMap={}};(function(){c.implement(this,i),this.getTokenizer=function(){return h.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function _(T){return T=T.substr(1),/^\d+$/.test(T)?[{tabstopId:parseInt(T,10)}]:[{text:T}]}function E(T){return"(?:[^\\\\"+T+"]|\\\\.)"}var O={regex:"/("+E("/")+"+)/",onMatch:function(T,x,w){var M=w[0];return M.fmtString=!0,M.guard=T.slice(1,-1),M.flag="",""},next:"formatString"};return h.$tokenizer=new o({start:[{regex:/\\./,onMatch:function(T,x,w){var M=T[1];return(M=="}"&&w.length||"`$\\".indexOf(M)!=-1)&&(T=M),[T]}},{regex:/}/,onMatch:function(T,x,w){return[w.length?w.shift():T]}},{regex:/\$(?:\d+|\w+)/,onMatch:_},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(T,x,w){var M=_(T.substr(1));return w.unshift(M[0]),M},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+E("\\|")+"*\\|",onMatch:function(T,x,w){var M=T.slice(1,-1).replace(/\\[,|\\]|,/g,function(k){return k.length==2?k[1]:"\0"}).split("\0").map(function(k){return{value:k}});return w[0].choices=M,[M[0]]},next:"start"},O,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(T,x,w){return w.length&&w[0].expectElse?(w[0].expectElse=!1,w[0].ifEnd={elseEnd:w[0]},[w[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(T,x,w){var M=T[1];return M=="}"&&w.length||"`$\\".indexOf(M)!=-1?T=M:M=="n"?T=` +`:M=="t"?T=" ":"ulULE".indexOf(M)!=-1&&(T={changeCase:M,local:M>"a"}),[T]}},{regex:"/\\w*}",onMatch:function(T,x,w){var M=w.shift();return M&&(M.flag=T.slice(1,-1)),this.next=M&&M.tabstopId?"start":"",[M||T]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(T,x,w){return[{text:T.slice(1)}]}},{regex:/\${\w+/,onMatch:function(T,x,w){var M={text:T.slice(2)};return w.unshift(M),[M]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(T,x,w){var M=w.shift();return this.next=M&&M.tabstopId?"start":"",[M||T]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(T,x,w){var M=w[0];return M.formatFunction=T.slice(2,-1),[w.shift()]},next:"formatString"},O,{regex:/:[\?\-+]?/,onMatch:function(T,x,w){T[1]=="+"&&(w[0].ifEnd=w[0]),T[1]=="?"&&(w[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),h.$tokenizer},this.tokenizeTmSnippet=function(_,E){return this.getTokenizer().getLineTokens(_,E).tokens.map(function(O){return O.value||O})},this.getVariableValue=function(_,E,O){if(/^\d+$/.test(E))return(this.variables.__||{})[E]||"";if(/^[A-Z]\d+$/.test(E))return(this.variables[E[0]+"__"]||{})[E.substr(1)]||"";if(E=E.replace(/^TM_/,""),!this.variables.hasOwnProperty(E))return"";var T=this.variables[E];return typeof T=="function"&&(T=this.variables[E](_,E,O)),T==null?"":T},this.variables=f,this.tmStrFormat=function(_,E,O){if(!E.fmt)return _;var T=E.flag||"",x=E.guard;x=new RegExp(x,T.replace(/[^gim]/g,""));var w=typeof E.fmt=="string"?this.tokenizeTmSnippet(E.fmt,"formatString"):E.fmt,M=this,k=_.replace(x,function(){var S=M.variables.__;M.variables.__=[].slice.call(arguments);for(var q=M.resolveVariables(w,O),L="E",A=0;A1?(P=W[W.length-1].length,F+=W.length-1):P+=I.length,j+=I}else I&&(I.start?I.end={row:F,column:P}:I.start={row:F,column:P})}),{text:j,tabstops:q,tokens:S}};this.getDisplayTextForSnippet=function(_,E){var O=y.call(this,_,E);return O.text},this.insertSnippetForSelection=function(_,E,O){O===void 0&&(O={});var T=y.call(this,_,E,O),x=_.getSelectionRange();O.range&&O.range.compareRange(x)===0&&(x=O.range);var w=_.session.replace(x,T.text),M=new v(_),k=_.inVirtualSelectionMode&&_.selection.index;M.addTabstops(T.tabstops,x.start,w,k)},this.insertSnippet=function(_,E,O){O===void 0&&(O={});var T=this;if(O.range&&!(O.range instanceof r)&&(O.range=r.fromPoints(O.range.start,O.range.end)),_.inVirtualSelectionMode)return T.insertSnippetForSelection(_,E,O);_.forEachSelection(function(){T.insertSnippetForSelection(_,E,O)},null,{keepOrder:!0}),_.tabstopManager&&_.tabstopManager.tabNext()},this.$getScope=function(_){var E=_.session.$mode.$id||"";if(E=E.split("/").pop(),E==="html"||E==="php"){E==="php"&&!_.session.$mode.inlinePhp&&(E="html");var O=_.getCursorPosition(),T=_.session.getState(O.row);typeof T=="object"&&(T=T[0]),T.substring&&(T.substring(0,3)=="js-"?E="javascript":T.substring(0,4)=="css-"?E="css":T.substring(0,4)=="php-"&&(E="php"))}return E},this.getActiveScopes=function(_){var E=this.$getScope(_),O=[E],T=this.snippetMap;return T[E]&&T[E].includeScopes&&O.push.apply(O,T[E].includeScopes),O.push("_"),O},this.expandWithTab=function(_,E){var O=this,T=_.forEachSelection(function(){return O.expandSnippetForSelection(_,E)},null,{keepOrder:!0});return T&&_.tabstopManager&&_.tabstopManager.tabNext(),T},this.expandSnippetForSelection=function(_,E){var O=_.getCursorPosition(),T=_.session.getLine(O.row),x=T.substring(0,O.column),w=T.substr(O.column),M=this.snippetMap,k;return this.getActiveScopes(_).some(function(S){var q=M[S];return q&&(k=this.findMatchingSnippet(q,x,w)),!!k},this),k?(E&&E.dryRun||(_.session.doc.removeInLine(O.row,O.column-k.replaceBefore.length,O.column+k.replaceAfter.length),this.variables.M__=k.matchBefore,this.variables.T__=k.matchAfter,this.insertSnippetForSelection(_,k.content),this.variables.M__=this.variables.T__=null),!0):!1},this.findMatchingSnippet=function(_,E,O){for(var T=_.length;T--;){var x=_[T];if(!(x.startRe&&!x.startRe.test(E))&&!(x.endRe&&!x.endRe.test(O))&&!(!x.startRe&&!x.endRe))return x.matchBefore=x.startRe?x.startRe.exec(E):[""],x.matchAfter=x.endRe?x.endRe.exec(O):[""],x.replaceBefore=x.triggerRe?x.triggerRe.exec(E)[0]:"",x.replaceAfter=x.endTriggerRe?x.endTriggerRe.exec(O)[0]:"",x}},this.snippetMap={},this.snippetNameMap={},this.register=function(_,E){function O(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function T(S,q,L){return S=O(S),q=O(q),L?(S=q+S,S&&S[S.length-1]!="$"&&(S+="$")):(S+=q,S&&S[0]!="^"&&(S="^"+S)),new RegExp(S)}function x(S){S.scope||(S.scope=E||"_"),E=S.scope,w[E]||(w[E]=[],M[E]={});var q=M[E];if(S.name){var L=q[S.name];L&&k.unregister(L),q[S.name]=S}w[E].push(S),S.prefix&&(S.tabTrigger=S.prefix),!S.content&&S.body&&(S.content=Array.isArray(S.body)?S.body.join(` +`):S.body),S.tabTrigger&&!S.trigger&&(!S.guard&&/^\w/.test(S.tabTrigger)&&(S.guard="\\b"),S.trigger=u.escapeRegExp(S.tabTrigger)),!(!S.trigger&&!S.guard&&!S.endTrigger&&!S.endGuard)&&(S.startRe=T(S.trigger,S.guard,!0),S.triggerRe=new RegExp(S.trigger),S.endRe=T(S.endTrigger,S.endGuard,!0),S.endTriggerRe=new RegExp(S.endTrigger))}var w=this.snippetMap,M=this.snippetNameMap,k=this;_||(_=[]),Array.isArray(_)?_.forEach(x):Object.keys(_).forEach(function(S){x(_[S])}),this._signal("registerSnippets",{scope:E})},this.unregister=function(_,E){function O(w){var M=x[w.scope||E];if(M&&M[w.name]){delete M[w.name];var k=T[w.scope||E],S=k&&k.indexOf(w);S>=0&&k.splice(S,1)}}var T=this.snippetMap,x=this.snippetNameMap;_.content?O(_):Array.isArray(_)&&_.forEach(O)},this.parseSnippetFile=function(_){_=_.replace(/\r/g,"");for(var E=[],O={},T=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,x;x=T.exec(_);){if(x[1])try{O=JSON.parse(x[1]),E.push(O)}catch{}if(x[4])O.content=x[4].replace(/^\t/gm,""),E.push(O),O={};else{var w=x[2],M=x[3];if(w=="regex"){var k=/\/((?:[^\/\\]|\\.)*)|$/g;O.guard=k.exec(M)[1],O.trigger=k.exec(M)[1],O.endTrigger=k.exec(M)[1],O.endGuard=k.exec(M)[1]}else w=="snippet"?(O.tabTrigger=M.match(/^\S*/)[0],O.name||(O.name=M)):w&&(O[w]=M)}}return E},this.getSnippetByName=function(_,E){var O=this.snippetNameMap,T;return this.getActiveScopes(E).some(function(x){var w=O[x];return w&&(T=w[_]),!!T},this),T}}).call(h.prototype);var v=function(y){if(y.tabstopManager)return y.tabstopManager;y.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=u.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(y)};(function(){this.attach=function(y){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=y,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(y){for(var _=y.action[0]=="r",E=this.selectedTabstop||{},O=E.parents||{},T=(this.tabstops||[]).slice(),x=0;x2&&(this.tabstops.length&&w.push(w.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,w))},this.addTabstopMarkers=function(y){var _=this.editor.session;y.forEach(function(E){E.markerId||(E.markerId=_.addMarker(E,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(y){var _=this.editor.session;y.forEach(function(E){_.removeMarker(E.markerId),E.markerId=null})},this.removeRange=function(y){var _=y.tabstop.indexOf(y);_!=-1&&y.tabstop.splice(_,1),_=this.ranges.indexOf(y),_!=-1&&this.ranges.splice(_,1),_=y.tabstop.rangeList.ranges.indexOf(y),_!=-1&&y.tabstop.splice(_,1),this.editor.session.removeMarker(y.markerId),y.tabstop.length||(_=this.tabstops.indexOf(y.tabstop),_!=-1&&this.tabstops.splice(_,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(y){p.snippetManager&&p.snippetManager.expandWithTab(y)||(y.tabstopManager.tabNext(1),y.renderer.scrollCursorIntoView())},"Shift-Tab":function(y){y.tabstopManager.tabNext(-1),y.renderer.scrollCursorIntoView()},Esc:function(y){y.tabstopManager.detach()}})}).call(v.prototype);var $=function(y,_){y.row==0&&(y.column+=_.column),y.row+=_.row},C=function(y,_){y.row==_.row&&(y.column-=_.column),y.row-=_.row};a.importCssString(` +.ace_snippet-marker { + -moz-box-sizing: border-box; + box-sizing: border-box; + background: rgba(194, 193, 208, 0.09); + border: 1px dotted rgba(211, 208, 235, 0.62); + position: absolute; +}`,"snippets.css",!1),p.snippetManager=new h;var b=e("./editor").Editor;(function(){this.insertSnippet=function(y,_){return p.snippetManager.insertSnippet(this,y,_)},this.expandSnippet=function(y){return p.snippetManager.expandWithTab(this,y)}}).call(b.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(e,p,m){var g=e("../virtual_renderer").VirtualRenderer,a=e("../editor").Editor,c=e("../range").Range,i=e("../lib/event"),u=e("../lib/lang"),r=e("../lib/dom"),t=e("../config").nls,l=function(f){return"suggest-aria-id:".concat(f)},o=function(f){var h=new g(f);h.$maxLines=4;var v=new a(h);return v.setHighlightActiveLine(!1),v.setShowPrintMargin(!1),v.renderer.setShowGutter(!1),v.renderer.setHighlightGutterLine(!1),v.$mouseHandler.$focusTimeout=0,v.$highlightTagPending=!0,v},s=function(){function f(h){var v=r.createElement("div"),$=new o(v);h&&h.appendChild(v),v.style.display="none",$.renderer.content.style.cursor="default",$.renderer.setStyle("ace_autocomplete"),$.renderer.container.setAttribute("role","listbox"),$.renderer.container.setAttribute("aria-label",t("Autocomplete suggestions")),$.setOption("displayIndentGuides",!1),$.setOption("dragDelay",150);var C=function(){};$.focus=C,$.$isFocused=!0,$.renderer.$cursorLayer.restartTimer=C,$.renderer.$cursorLayer.element.style.opacity=0,$.renderer.$maxLines=8,$.renderer.$keepTextAreaAtCursor=!1,$.setHighlightActiveLine(!1),$.session.highlight(""),$.session.$searchHighlight.clazz="ace_highlight-marker",$.on("mousedown",function(x){var w=x.getDocumentPosition();$.selection.moveToPosition(w),_.start.row=_.end.row=w.row,x.stop()});var b,y=new c(-1,0,-1,1/0),_=new c(-1,0,-1,1/0);_.id=$.session.addMarker(_,"ace_active-line","fullLine"),$.setSelectOnHover=function(x){x?y.id&&($.session.removeMarker(y.id),y.id=null):y.id=$.session.addMarker(y,"ace_line-hover","fullLine")},$.setSelectOnHover(!1),$.on("mousemove",function(x){if(!b){b=x;return}if(!(b.x==x.x&&b.y==x.y)){b=x,b.scrollTop=$.renderer.scrollTop;var w=b.getDocumentPosition().row;y.start.row!=w&&(y.id||$.setRow(w),O(w))}}),$.renderer.on("beforeRender",function(){if(b&&y.start.row!=-1){b.$pos=null;var x=b.getDocumentPosition().row;y.id||$.setRow(x),O(x,!0)}}),$.renderer.on("afterRender",function(){var x=$.getRow(),w=$.renderer.$textLayer,M=w.element.childNodes[x-w.config.firstRow],k=document.activeElement;if(M!==w.selectedNode&&w.selectedNode&&(r.removeCssClass(w.selectedNode,"ace_selected"),k.removeAttribute("aria-activedescendant"),w.selectedNode.removeAttribute("id")),w.selectedNode=M,M){r.addCssClass(M,"ace_selected");var S=l(x);M.id=S,$.renderer.container.setAttribute("aria-activedescendant",S),k.setAttribute("aria-activedescendant",S),M.setAttribute("role","option"),M.setAttribute("aria-label",$.getData(x).value),M.setAttribute("aria-setsize",$.data.length),M.setAttribute("aria-posinset",x)}});var E=function(){O(-1)},O=function(x,w){x!==y.start.row&&(y.start.row=y.end.row=x,w||$.session._emit("changeBackMarker"),$._emit("changeHoverMarker"))};$.getHoveredRow=function(){return y.start.row},i.addListener($.container,"mouseout",E),$.on("hide",E),$.on("changeSelection",E),$.session.doc.getLength=function(){return $.data.length},$.session.doc.getLine=function(x){var w=$.data[x];return typeof w=="string"?w:w&&w.value||""};var T=$.session.bgTokenizer;return T.$tokenizeRow=function(x){function w(V,F){V&&k.push({type:(M.className||"")+(F||""),value:V})}var M=$.data[x],k=[];if(!M)return k;typeof M=="string"&&(M={value:M});for(var S=M.caption||M.value||M.name,q=S.toLowerCase(),L=($.filterText||"").toLowerCase(),A=0,D=0,N=0;N<=L.length;N++)if(N!=D&&(M.matchMask&1<=D?M="bottom":M="top"),M==="top"?(N.bottom=x.top-this.$borderSize,N.top=N.bottom-D):M==="bottom"&&(N.top=x.top+w+this.$borderSize,N.bottom=N.top+D);var V=N.top>=0&&N.bottom<=q;if(!k&&!V)return!1;V?A.$maxPixelHeight=null:M==="top"?A.$maxPixelHeight=R:A.$maxPixelHeight=B,M==="top"?(S.style.top="",S.style.bottom=q-N.bottom+"px",$.isTopdown=!1):(S.style.top=N.top+"px",S.style.bottom="",$.isTopdown=!0),S.style.display="";var F=x.left;return F+S.offsetWidth>L&&(F=L-S.offsetWidth),S.style.left=F+"px",S.style.right="",$.isOpen||($.isOpen=!0,this._signal("show"),b=null),$.anchorPos=x,$.anchor=M,!0},$.show=function(x,w,M){this.tryShow(x,w,M?"bottom":void 0,!0)},$.goTo=function(x){var w=this.getRow(),M=this.session.getLength()-1;switch(x){case"up":w=w<=0?M:w-1;break;case"down":w=w>=M?-1:w+1;break;case"start":w=0;break;case"end":w=M}this.setRow(w)},$.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},$.$imageSize=0,$.$borderSize=1,$}return f}();r.importCssString(` +.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { + background-color: #CAD6FA; + z-index: 1; +} +.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { + background-color: #3a674e; +} +.ace_editor.ace_autocomplete .ace_line-hover { + border: 1px solid #abbffe; + margin-top: -1px; + background: rgba(233,233,253,0.4); + position: absolute; + z-index: 2; +} +.ace_dark.ace_editor.ace_autocomplete .ace_line-hover { + border: 1px solid rgba(109, 150, 13, 0.8); + background: rgba(58, 103, 78, 0.62); +} +.ace_completion-meta { + opacity: 0.5; + margin: 0 0.9em; +} +.ace_completion-message { + color: blue; +} +.ace_editor.ace_autocomplete .ace_completion-highlight{ + color: #2d69c7; +} +.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ + color: #93ca12; +} +.ace_editor.ace_autocomplete { + width: 300px; + z-index: 200000; + border: 1px lightgray solid; + position: fixed; + box-shadow: 2px 3px 5px rgba(0,0,0,.2); + line-height: 1.4; + background: #fefefe; + color: #111; +} +.ace_dark.ace_editor.ace_autocomplete { + border: 1px #484747 solid; + box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); + line-height: 1.4; + background: #25282c; + color: #c1c1c1; +} +.ace_autocomplete_right .ace_text-layer { + width: calc(100% - 8px); +} +.ace_autocomplete_right .ace_line { + display: flex; +} +.ace_autocomplete_right .ace_completion-spacer { + flex: 1; +} +`,"autocompletion.css",!1),p.AcePopup=s,p.$singleLineEditor=o,p.getAriaId=l}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(e,p,m){var g=e("../snippets").snippetManager,a=function(){function c(){this.editor=null}return c.prototype.show=function(i,u,r){if(r=r||"",i&&this.editor&&this.editor!==i&&(this.hide(),this.editor=null),!i||!u)return!1;var t=u.snippet?g.getDisplayTextForSnippet(i,u.snippet):u.value;return!t||!t.startsWith(r)?!1:(this.editor=i,t=t.slice(r.length),t===""?i.removeGhostText():i.setGhostText(t),!0)},c.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},c.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},c.prototype.destroy=function(){this.hide(),this.editor=null},c}();p.AceInline=a}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,p,m){p.parForEach=function(a,c,i){var u=0,r=a.length;r===0&&i();for(var t=0;t=0&&i.test(a[r]);r--)u.push(a[r]);return u.reverse().join("")},p.retrieveFollowingIdentifier=function(a,c,i){i=i||g;for(var u=[],r=c;rthis.filterText&&C.lastIndexOf(this.filterText,0)===0)var b=this.filtered;else var b=this.all;this.filterText=C,b=this.filterCompletions(b,this.filterText),b=b.sort(function(_,E){return E.exactMatch-_.exactMatch||E.$score-_.$score||(_.caption||_.value).localeCompare(E.caption||E.value)});var y=null;b=b.filter(function(_){var E=_.snippet||_.caption||_.value;return E===y?!1:(y=E,!0)}),this.filtered=b},$.prototype.filterCompletions=function(C,b){var y=[],_=b.toUpperCase(),E=b.toLowerCase();e:for(var O=0,T;T=C[O];O++){var x=!this.ignoreCaption&&T.caption||T.value||T.snippet;if(!!x){var w=-1,M=0,k=0,S,q;if(this.exactMatch){if(b!==x.substr(0,b.length))continue e}else{var L=x.toLowerCase().indexOf(E);if(L>-1)k=L;else for(var A=0;A=0&&(N<0||D0&&(w===-1&&(k+=10),k+=q,M|=1<",i.escapeHTML(y.caption),"","
",i.escapeHTML(l(y.snippet))].join(""))},id:"snippetCompleter"},s=[o,r,t];p.setCompleters=function(y){s.length=0,y&&s.push.apply(s,y)},p.addCompleter=function(y){s.push(y)},p.textCompleter=r,p.keyWordCompleter=t,p.snippetCompleter=o;var f={name:"expandSnippet",exec:function(y){return g.expandWithTab(y)},bindKey:"Tab"},h=function(y,_){v(_.session.$mode)},v=function(y){typeof y=="string"&&(y=c.$modes[y]),!!y&&(g.files||(g.files={}),$(y.$id,y.snippetFileId),y.modes&&y.modes.forEach(v))},$=function(y,_){!_||!y||g.files[y]||(g.files[y]={},c.loadModule(_,function(E){!E||(g.files[y]=E,!E.snippets&&E.snippetText&&(E.snippets=g.parseSnippetFile(E.snippetText)),g.register(E.snippets||[],E.scope),E.includeScopes&&(g.snippetMap[E.scope].includeScopes=E.includeScopes,E.includeScopes.forEach(function(O){v("ace/mode/"+O)})))}))},C=function(y){var _=y.editor,E=_.completer&&_.completer.activated;if(y.command.name==="backspace")E&&!u.getCompletionPrefix(_)&&_.completer.detach();else if(y.command.name==="insertstring"){var O=u.getCompletionPrefix(_),T=u.triggerAutocomplete(_);if((O||T)&&!E){var x=a.for(_);x.autoShown=!0,x.showPopup(_)}}},b=e("../editor").Editor;e("../config").defineOptions(b.prototype,"editor",{enableBasicAutocompletion:{set:function(y){y?(this.completers||(this.completers=Array.isArray(y)?y:s),this.commands.addCommand(a.startCommand)):this.commands.removeCommand(a.startCommand)},value:!1},enableLiveAutocompletion:{set:function(y){y?(this.completers||(this.completers=Array.isArray(y)?y:s),this.commands.on("afterExec",C)):this.commands.removeListener("afterExec",C)},value:!1},enableSnippets:{set:function(y){y?(this.commands.addCommand(f),this.on("changeMode",h),h(null,this)):(this.commands.removeCommand(f),this.off("changeMode",h))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})}()})(extLanguage_tools);const VARIANT_FORM_VERSION="3.0.10",MOCK_CASE_URL="https://ks3-cn-beijing.ksyuncs.com/vform-static/vcase/",ACE_BASE_PATH="https://ks3-cn-beijing.ksyun.com/vform2021/ace-mini",BEAUTIFIER_PATH="https://ks3-cn-beijing.ksyun.com/vform2021/js-beautify/1.14.0/beautifier.min.js";var index_vue_vue_type_style_index_0_scoped_true_lang$4="";const _sfc_main$2B={name:"CodeEditor",props:{modelValue:{type:String},readonly:{type:Boolean,default:!1},mode:{type:String,default:"javascript"},userWorker:{type:Boolean,default:!0}},emits:["update:modelValue"],mounted(){ace$1.config.set("basePath",ACE_BASE_PATH),this.addAutoCompletion(ace$1),this.aceEditor=ace$1.edit(this.$refs.ace,{maxLines:20,minLines:5,fontSize:12,theme:this.themePath,mode:this.modePath,tabSize:2,readOnly:this.readonly,highlightActiveLine:!0,value:this.codeValue}),this.aceEditor.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),this.mode==="json"?this.setJsonMode():this.mode==="css"&&this.setCssMode(),this.userWorker||this.aceEditor.getSession().setUseWorker(!1),this.aceEditor.getSession().on("change",n=>{this.$emit("update:modelValue",this.aceEditor.getValue())})},data(){return{aceEditor:null,themePath:"ace/theme/sqlserver",modePath:"ace/mode/javascript",codeValue:this.modelValue}},watch:{},methods:{addAutoCompletion(n){let d=[{meta:"VForm API",caption:"getWidgetRef",value:"getWidgetRef()",score:1},{meta:"VForm API",caption:"getFormRef",value:"getFormRef()",score:1}];n.require("ace/ext/language_tools").addCompleter({getCompletions:function(p,m,g,a,c){return a.length===0?c(null,[]):c(null,d)}})},setJsonMode(){this.aceEditor.getSession().setMode("ace/mode/json")},setCssMode(){this.aceEditor.getSession().setMode("ace/mode/css")},getEditorAnnotations(){return this.aceEditor.getSession().getAnnotations()},setValue(n){this.aceEditor.getSession().setValue(n)}}},_hoisted_1$s={class:"ace-container"},_hoisted_2$k={class:"ace-editor",ref:"ace"};function _sfc_render$2B(n,d,e,p,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$s,[require$$0$1.createElementVNode("div",_hoisted_2$k,null,512)])}var CodeEditor=_export_sfc$1(_sfc_main$2B,[["render",_sfc_render$2B],["__scopeId","data-v-35f2b510"]]);const generateCode=function(n,d="vue"){let e=JSON.stringify(n);return d==="html"?` + + + + + VForm Demo + + + + + + +
+ + + Submit +
+ +