var qe=Object.defineProperty,Ne=Object.defineProperties;var Re=Object.getOwnPropertyDescriptors;var Oe=Object.getOwnPropertySymbols;var Fe=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable;var Le=(n,c,e)=>c in n?qe(n,c,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[c]=e,Se=(n,c)=>{for(var e in c||(c={}))Fe.call(c,e)&&Le(n,e,c[e]);if(Oe)for(var e of Oe(c))Ie.call(c,e)&&Le(n,e,c[e]);return n},ke=(n,c)=>Ne(n,Re(c));(function(n,c){typeof exports=="object"&&typeof module!="undefined"?module.exports=c(require("vue")):typeof define=="function"&&define.amd?define(["vue"],c):(n=typeof globalThis!="undefined"?globalThis:n||self,n.VFormDesigner=c(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(c,e){return function(){for(var g=new Array(arguments.length),m=0;m=0)return;p==="set-cookie"?e[p]=(e[p]?e[p]:[]).concat([g]):e[p]=e[p]?e[p]+", "+g:g}}),e},utils$7=utils$d,isURLSameOrigin$1=utils$7.isStandardBrowserEnv()?function(){var c=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a"),p;function g(m){var s=m;return c&&(e.setAttribute("href",s),s=e.href),e.setAttribute("href",s),{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=g(window.location.href),function(s){var d=utils$7.isString(s)?g(s):s;return d.protocol===p.protocol&&d.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(c){return new Promise(function(p,g){var m=c.data,s=c.headers,d=c.responseType,i;function f(){c.cancelToken&&c.cancelToken.unsubscribe(i),c.signal&&c.signal.removeEventListener("abort",i)}utils$6.isFormData(m)&&delete s["Content-Type"];var r=new XMLHttpRequest;if(c.auth){var o=c.auth.username||"",t=c.auth.password?unescape(encodeURIComponent(c.auth.password)):"";s.Authorization="Basic "+btoa(o+":"+t)}var l=buildFullPath(c.baseURL,c.url);r.open(c.method.toUpperCase(),buildURL$1(l,c.params,c.paramsSerializer),!0),r.timeout=c.timeout;function a(){if(!!r){var h="getAllResponseHeaders"in r?parseHeaders(r.getAllResponseHeaders()):null,$=!d||d==="text"||d==="json"?r.responseText:r.response,v={data:$,status:r.status,statusText:r.statusText,headers:h,config:c,request:r};settle(function(y){p(y),f()},function(y){g(y),f()},v),r=null}}if("onloadend"in r?r.onloadend=a:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(a)},r.onabort=function(){!r||(g(createError("Request aborted",c,"ECONNABORTED",r)),r=null)},r.onerror=function(){g(createError("Network Error",c,null,r)),r=null},r.ontimeout=function(){var $=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",v=c.transitional||defaults$5.transitional;c.timeoutErrorMessage&&($=c.timeoutErrorMessage),g(createError($,c,v.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",r)),r=null},utils$6.isStandardBrowserEnv()){var u=(c.withCredentials||isURLSameOrigin(l))&&c.xsrfCookieName?cookies.read(c.xsrfCookieName):void 0;u&&(s[c.xsrfHeaderName]=u)}"setRequestHeader"in r&&utils$6.forEach(s,function($,v){typeof m=="undefined"&&v.toLowerCase()==="content-type"?delete s[v]:r.setRequestHeader(v,$)}),utils$6.isUndefined(c.withCredentials)||(r.withCredentials=!!c.withCredentials),d&&d!=="json"&&(r.responseType=c.responseType),typeof c.onDownloadProgress=="function"&&r.addEventListener("progress",c.onDownloadProgress),typeof c.onUploadProgress=="function"&&r.upload&&r.upload.addEventListener("progress",c.onUploadProgress),(c.cancelToken||c.signal)&&(i=function(h){!r||(g(!h||h&&h.type?new Cancel$2("canceled"):h),r.abort(),r=null)},c.cancelToken&&c.cancelToken.subscribe(i),c.signal&&(c.signal.aborted?i():c.signal.addEventListener("abort",i))),m||(m=null),r.send(m)})},utils$5=utils$d,normalizeHeaderName=normalizeHeaderName$1,enhanceError=enhanceError$2,DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(n,c){!utils$5.isUndefined(n)&&utils$5.isUndefined(n["Content-Type"])&&(n["Content-Type"]=c)}function getDefaultAdapter(){var n;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(n=xhr),n}function stringifySafely(n,c,e){if(utils$5.isString(n))try{return(c||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(c,e){return normalizeHeaderName(e,"Accept"),normalizeHeaderName(e,"Content-Type"),utils$5.isFormData(c)||utils$5.isArrayBuffer(c)||utils$5.isBuffer(c)||utils$5.isStream(c)||utils$5.isFile(c)||utils$5.isBlob(c)?c:utils$5.isArrayBufferView(c)?c.buffer:utils$5.isURLSearchParams(c)?(setContentTypeIfUnset(e,"application/x-www-form-urlencoded;charset=utf-8"),c.toString()):utils$5.isObject(c)||e&&e["Content-Type"]==="application/json"?(setContentTypeIfUnset(e,"application/json"),stringifySafely(c)):c}],transformResponse:[function(c){var e=this.transitional||defaults$4.transitional,p=e&&e.silentJSONParsing,g=e&&e.forcedJSONParsing,m=!p&&this.responseType==="json";if(m||g&&utils$5.isString(c)&&c.length)try{return JSON.parse(c)}catch(s){if(m)throw s.name==="SyntaxError"?enhanceError(s,this,"E_JSON_PARSE"):s}return c}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(c){return c>=200&&c<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils$5.forEach(["delete","get","head"],function(c){defaults$4.headers[c]={}}),utils$5.forEach(["post","put","patch"],function(c){defaults$4.headers[c]=utils$5.merge(DEFAULT_CONTENT_TYPE)});var defaults_1=defaults$4,utils$4=utils$d,defaults$3=defaults_1,transformData$1=function(c,e,p){var g=this||defaults$3;return utils$4.forEach(p,function(s){c=s.call(g,c,e)}),c},isCancel$1=function(c){return!!(c&&c.__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(c){throwIfCancellationRequested(c),c.headers=c.headers||{},c.data=transformData.call(c,c.data,c.headers,c.transformRequest),c.headers=utils$3.merge(c.headers.common||{},c.headers[c.method]||{},c.headers),utils$3.forEach(["delete","get","head","post","put","patch","common"],function(g){delete c.headers[g]});var e=c.adapter||defaults$2.adapter;return e(c).then(function(g){return throwIfCancellationRequested(c),g.data=transformData.call(c,g.data,g.headers,c.transformResponse),g},function(g){return isCancel(g)||(throwIfCancellationRequested(c),g&&g.response&&(g.response.data=transformData.call(c,g.response.data,g.response.headers,c.transformResponse))),Promise.reject(g)})},utils$2=utils$d,mergeConfig$2=function(c,e){e=e||{};var p={};function g(r,o){return utils$2.isPlainObject(r)&&utils$2.isPlainObject(o)?utils$2.merge(r,o):utils$2.isPlainObject(o)?utils$2.merge({},o):utils$2.isArray(o)?o.slice():o}function m(r){if(utils$2.isUndefined(e[r])){if(!utils$2.isUndefined(c[r]))return g(void 0,c[r])}else return g(c[r],e[r])}function s(r){if(!utils$2.isUndefined(e[r]))return g(void 0,e[r])}function d(r){if(utils$2.isUndefined(e[r])){if(!utils$2.isUndefined(c[r]))return g(void 0,c[r])}else return g(void 0,e[r])}function i(r){if(r in e)return g(c[r],e[r]);if(r in c)return g(void 0,c[r])}var f={url:s,method:s,data:s,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:i};return utils$2.forEach(Object.keys(c).concat(Object.keys(e)),function(o){var t=f[o]||m,l=t(o);utils$2.isUndefined(l)&&t!==i||(p[o]=l)}),p},data={version:"0.24.0"},VERSION=data.version,validators$1={};["object","boolean","number","function","string","symbol"].forEach(function(n,c){validators$1[n]=function(p){return typeof p===n||"a"+(c<1?"n ":" ")+n}});var deprecatedWarnings={};validators$1.transitional=function(c,e,p){function g(m,s){return"[Axios v"+VERSION+"] Transitional option '"+m+"'"+s+(p?". "+p:"")}return function(m,s,d){if(c===!1)throw new Error(g(s," has been removed"+(e?" in "+e:"")));return e&&!deprecatedWarnings[s]&&(deprecatedWarnings[s]=!0,console.warn(g(s," has been deprecated since v"+e+" and will be removed in the near future"))),c?c(m,s,d):!0}};function assertOptions(n,c,e){if(typeof n!="object")throw new TypeError("options must be an object");for(var p=Object.keys(n),g=p.length;g-- >0;){var m=p[g],s=c[m];if(s){var d=n[m],i=d===void 0||s(d,m,n);if(i!==!0)throw new TypeError("option "+m+" must be "+i);continue}if(e!==!0)throw Error("Unknown option "+m)}}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(c){typeof c=="string"?(c=arguments[1]||{},c.url=arguments[0]):c=c||{},c=mergeConfig$1(this.defaults,c),c.method?c.method=c.method.toLowerCase():this.defaults.method?c.method=this.defaults.method.toLowerCase():c.method="get";var e=c.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=[],g=!0;this.interceptors.request.forEach(function(t){typeof t.runWhen=="function"&&t.runWhen(c)===!1||(g=g&&t.synchronous,p.unshift(t.fulfilled,t.rejected))});var m=[];this.interceptors.response.forEach(function(t){m.push(t.fulfilled,t.rejected)});var s;if(!g){var d=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(d,p),d=d.concat(m),s=Promise.resolve(c);d.length;)s=s.then(d.shift(),d.shift());return s}for(var i=c;p.length;){var f=p.shift(),r=p.shift();try{i=f(i)}catch(o){r(o);break}}try{s=dispatchRequest(i)}catch(o){return Promise.reject(o)}for(;m.length;)s=s.then(m.shift(),m.shift());return s},Axios$1.prototype.getUri=function(c){return c=mergeConfig$1(this.defaults,c),buildURL(c.url,c.params,c.paramsSerializer).replace(/^\?/,"")},utils$1.forEach(["delete","get","head","options"],function(c){Axios$1.prototype[c]=function(e,p){return this.request(mergeConfig$1(p||{},{method:c,url:e,data:(p||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(c){Axios$1.prototype[c]=function(e,p,g){return this.request(mergeConfig$1(g||{},{method:c,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 c;this.promise=new Promise(function(g){c=g});var e=this;this.promise.then(function(p){if(!!e._listeners){var g,m=e._listeners.length;for(g=0;ghtml 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,c){(function(p,g){n.exports=g()})(commonjsGlobal,function(){return function(){var e={686:function(m,s,d){d.d(s,{default:function(){return R}});var i=d(279),f=d.n(i),r=d(370),o=d.n(r),t=d(817),l=d.n(t);function a(B){try{return document.execCommand(B)}catch{return!1}}var u=function(D){var P=l()(D);return a("cut"),P},h=u;function $(B){var D=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[D?"right":"left"]="-9999px";var j=window.pageYOffset||document.documentElement.scrollTop;return P.style.top="".concat(j,"px"),P.setAttribute("readonly",""),P.value=B,P}var v=function(D,P){var j=$(D);P.container.appendChild(j);var V=l()(j);return a("copy"),j.remove(),V},w=function(D){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},j="";return typeof D=="string"?j=v(D,P):D instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(D==null?void 0:D.type)?j=v(D.value,P):(j=l()(D),a("copy")),j},y=w;function _(B){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(P){return typeof P}:_=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},_(B)}var b=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=D.action,j=P===void 0?"copy":P,V=D.container,W=D.target,H=D.text;if(j!=="copy"&&j!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(W!==void 0)if(W&&_(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 y(H,{container:V});if(W)return j==="cut"?h(W):y(W,{container:V})},S=b;function M(B){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(P){return typeof P}:M=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},M(B)}function O(B,D){if(!(B instanceof D))throw new TypeError("Cannot call a class as a function")}function k(B,D){for(var P=0;P0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof V.action=="function"?V.action:this.defaultAction,this.target=typeof V.target=="function"?V.target:this.defaultTarget,this.text=typeof V.text=="function"?V.text:this.defaultText,this.container=M(V.container)==="object"?V.container:document.body}},{key:"listenClick",value:function(V){var W=this;this.listener=o()(V,"click",function(H){return W.onClick(H)})}},{key:"onClick",value:function(V){var W=V.delegateTarget||V.currentTarget,H=this.action(W)||"copy",z=S({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(V){return F("action",V)}},{key:"defaultTarget",value:function(V){var W=F("target",V);if(W)return document.querySelector(W)}},{key:"defaultText",value:function(V){return F("text",V)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(V){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return y(V,W)}},{key:"cut",value:function(V){return h(V)}},{key:"isSupported",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],W=typeof V=="string"?[V]:V,H=!!document.queryCommandSupported;return W.forEach(function(z){H=H&&!!document.queryCommandSupported(z)}),H}}]),P}(f()),R=I},828:function(m){var s=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var d=Element.prototype;d.matches=d.matchesSelector||d.mozMatchesSelector||d.msMatchesSelector||d.oMatchesSelector||d.webkitMatchesSelector}function i(f,r){for(;f&&f.nodeType!==s;){if(typeof f.matches=="function"&&f.matches(r))return f;f=f.parentNode}}m.exports=i},438:function(m,s,d){var i=d(828);function f(t,l,a,u,h){var $=o.apply(this,arguments);return t.addEventListener(a,$,h),{destroy:function(){t.removeEventListener(a,$,h)}}}function r(t,l,a,u,h){return typeof t.addEventListener=="function"?f.apply(null,arguments):typeof a=="function"?f.bind(null,document).apply(null,arguments):(typeof t=="string"&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function($){return f($,l,a,u,h)}))}function o(t,l,a,u){return function(h){h.delegateTarget=i(h.target,l),h.delegateTarget&&u.call(t,h)}}m.exports=r},879:function(m,s){s.node=function(d){return d!==void 0&&d instanceof HTMLElement&&d.nodeType===1},s.nodeList=function(d){var i=Object.prototype.toString.call(d);return d!==void 0&&(i==="[object NodeList]"||i==="[object HTMLCollection]")&&"length"in d&&(d.length===0||s.node(d[0]))},s.string=function(d){return typeof d=="string"||d instanceof String},s.fn=function(d){var i=Object.prototype.toString.call(d);return i==="[object Function]"}},370:function(m,s,d){var i=d(879),f=d(438);function r(a,u,h){if(!a&&!u&&!h)throw new Error("Missing required arguments");if(!i.string(u))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(a))return o(a,u,h);if(i.nodeList(a))return t(a,u,h);if(i.string(a))return l(a,u,h);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function o(a,u,h){return a.addEventListener(u,h),{destroy:function(){a.removeEventListener(u,h)}}}function t(a,u,h){return Array.prototype.forEach.call(a,function($){$.addEventListener(u,h)}),{destroy:function(){Array.prototype.forEach.call(a,function($){$.removeEventListener(u,h)})}}}function l(a,u,h){return f(document.body,a,u,h)}m.exports=r},817:function(m){function s(d){var i;if(d.nodeName==="SELECT")d.focus(),i=d.value;else if(d.nodeName==="INPUT"||d.nodeName==="TEXTAREA"){var f=d.hasAttribute("readonly");f||d.setAttribute("readonly",""),d.select(),d.setSelectionRange(0,d.value.length),f||d.removeAttribute("readonly"),i=d.value}else{d.hasAttribute("contenteditable")&&d.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(d),r.removeAllRanges(),r.addRange(o),i=r.toString()}return i}m.exports=s},279:function(m){function s(){}s.prototype={on:function(d,i,f){var r=this.e||(this.e={});return(r[d]||(r[d]=[])).push({fn:i,ctx:f}),this},once:function(d,i,f){var r=this;function o(){r.off(d,o),i.apply(f,arguments)}return o._=i,this.on(d,o,f)},emit:function(d){var i=[].slice.call(arguments,1),f=((this.e||(this.e={}))[d]||[]).slice(),r=0,o=f.length;for(r;r{n[e]=c[e]})},evalFn=function(n,c=null,e=null){return new Function("DSV","VFR","return "+n)(c,e)},addWindowResizeHandler=function(n){let c=window.onresize;typeof window.onresize!="function"?window.onresize=n:window.onresize=function(){c(),n()}},insertCustomCssToHead=function(n,c=""){let e=document.getElementsByTagName("head")[0],p=document.getElementById("vform-custom-css");p&&e.removeChild(p),c&&(p=document.getElementById("vform-custom-css-"+c),!!p&&e.removeChild(p));let g=document.createElement("style");g.type="text/css",g.rel="stylesheet",g.id=c?"vform-custom-css-"+c:"vform-custom-css";try{g.appendChild(document.createTextNode(n))}catch{g.styleSheet.cssText=n}e.appendChild(g)},insertGlobalFunctionsToHtml=function(n,c=""){let e=document.getElementsByTagName("body")[0],p=document.getElementById("v_form_global_functions");!!p&&e.removeChild(p),c&&(p=document.getElementById("v_form_global_functions-"+c),!!p&&e.removeChild(p));let g=document.createElement("script");g.id=c?"v_form_global_functions-"+c:"v_form_global_functions",g.type="text/javascript",g.innerHTML=n,e.appendChild(g)},loadRemoteScript=function(n,c){let e=encodeURIComponent(n);if(!document.getElementById(e)){let g=document.createElement("script");g.src=n,g.id=e,document.body.appendChild(g),g.onload=g.onreadystatechange=function(m,s){(s||!g.readyState||g.readyState==="loaded"||g.readyState==="complete")&&(g=g.onload=g.onreadystatechange=null,s||c())}}};function traverseFieldWidgets(n,c,e=null){!n||n.map(p=>{p.formItemFlag?c(p,e):p.type==="grid"?p.cols.map(g=>{traverseFieldWidgets(g.widgetList,c,p)}):p.type==="table"?p.rows.map(g=>{g.cols.map(m=>{traverseFieldWidgets(m.widgetList,c,p)})}):p.type==="tab"?p.tabs.map(g=>{traverseFieldWidgets(g.widgetList,c,p)}):(p.type==="sub-form"||p.category==="container")&&traverseFieldWidgets(p.widgetList,c,p)})}function traverseContainerWidgets(n,c){!n||n.map(e=>{e.category==="container"&&c(e),e.type==="grid"?e.cols.map(p=>{traverseContainerWidgets(p.widgetList,c)}):e.type==="table"?e.rows.map(p=>{p.cols.map(g=>{traverseContainerWidgets(g.widgetList,c)})}):e.type==="tab"?e.tabs.map(p=>{traverseContainerWidgets(p.widgetList,c)}):(e.type==="sub-form"||e.category==="container")&&traverseContainerWidgets(e.widgetList,c)})}function traverseAllWidgets(n,c){!n||n.map(e=>{c(e),e.type==="grid"?e.cols.map(p=>{c(p),traverseAllWidgets(p.widgetList,c)}):e.type==="table"?e.rows.map(p=>{p.cols.map(g=>{c(g),traverseAllWidgets(g.widgetList,c)})}):e.type==="tab"?e.tabs.map(p=>{traverseAllWidgets(p.widgetList,c)}):(e.type==="sub-form"||e.category==="container")&&traverseAllWidgets(e.widgetList,c)})}function handleWidgetForTraverse(n,c){n.category?traverseFieldWidgetsOfContainer(n,c):n.formItemFlag&&c(n)}function traverseFieldWidgetsOfContainer(n,c){n.type==="grid"?n.cols.forEach(e=>{e.widgetList.forEach(p=>{handleWidgetForTraverse(p,c)})}):n.type==="table"?n.rows.forEach(e=>{e.cols.forEach(p=>{p.widgetList.forEach(g=>{handleWidgetForTraverse(g,c)})})}):n.type==="tab"?n.tabs.forEach(e=>{e.widgetList.forEach(p=>{handleWidgetForTraverse(p,c)})}):n.type==="sub-form"?n.widgetList.forEach(e=>{handleWidgetForTraverse(e,c)}):n.category==="container"&&n.widgetList.forEach(e=>{handleWidgetForTraverse(e,c)})}function getAllFieldWidgets(n){if(!n)return[];let c=[];return traverseFieldWidgets(n,p=>{c.push({type:p.type,name:p.options.name,field:p})}),c}function getAllContainerWidgets(n){if(!n)return[];let c=[];return traverseContainerWidgets(n,p=>{c.push({type:p.type,name:p.options.name,container:p})}),c}function copyToClipboard(n,c,e,p,g){const m=new Clipboard(c.target,{text:()=>n});m.on("success",()=>{e.success(p),m.destroy()}),m.on("error",()=>{e.error(g),m.destroy()}),m.onClick(c)}function getQueryParam(n){let e=window.location.search.substring(1).split("&");for(let p=0;p{p=isDef(p)&&isDef(p[g])?p[g]:null}),p}let locale=require$$0$1.reactive({lang:localStorage.getItem("v_form_locale")||"zh-CN"});function createI18n(n){return{messages:n.messages,$st(c,...e){const p=get(this.messages[locale.lang],c);return typeof p=="function"?p(...e):p!==null?p:c},$st2(c,e){let p=this.messages[locale.lang];const g=get(p,c);return g!==null?g:get(p,e)},setLang(c){locale.lang=c}}}var 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":Se(Se(Se({something:{}},enLocale),enLocale_render),enLocale_extension),"zh-CN":Se(Se(Se({something:{}},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,c){return i18n.$st2(n,c)}}},index_vue_vue_type_style_index_0_scoped_true_lang$7="",_export_sfc$1=(n,c)=>{const e=n.__vccOpts||n;for(const[p,g]of c)e[p]=g;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$r={key:0};function _sfc_render$39(n,c,e,p,g,m){return require$$0$1.openBlock(),require$$0$1.createElementBlock("svg",{class:require$$0$1.normalizeClass(m.svgClass),"aria-hidden":"true"},[require$$0$1.createElementVNode("use",{"xlink:href":m.iconName},null,8,_hoisted_1$F),e.title?(require$$0$1.openBlock(),require$$0$1.createElementBlock("title",_hoisted_2$r,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-8002b89a"]]),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(Se({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(Se({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(Se({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(Se({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(c=>{let e=!1;typeof c.data=="string"?e=this.designer.loadFormJson(JSON.parse(c.data)):c.data.constructor===Object&&(e=this.designer.loadFormJson(c.data)),e&&this.designer.emitHistoryChange(),this.$message.success(this.i18nt("designer.hint.loadFormTemplateSuccess"))}).catch(c=>{this.$message.error(this.i18nt("designer.hint.loadFormTemplateFailed")+":"+c)})}).catch(c=>{console.error(c)})}}},_hoisted_1$E={class:"panel-container"},_hoisted_2$q=["title","onDblclick"],_hoisted_3$m=["title","onDblclick"],_hoisted_4$f=["title","onDblclick"],_hoisted_5$c=["title","onDblclick"],_hoisted_6$b=["src"],_hoisted_7$8=["src"],_hoisted_8$6={class:"bottom clear-fix"},_hoisted_9$3={class:"ft-title"};function _sfc_render$38(n,c,e,p,g,m){const s=require$$0$1.resolveComponent("svg-icon"),d=require$$0$1.resolveComponent("draggable"),i=require$$0$1.resolveComponent("el-collapse-item"),f=require$$0$1.resolveComponent("el-collapse"),r=require$$0$1.resolveComponent("el-tab-pane"),o=require$$0$1.resolveComponent("el-popover"),t=require$$0$1.resolveComponent("el-button"),l=require$$0$1.resolveComponent("el-card"),a=require$$0$1.resolveComponent("el-tabs"),u=require$$0$1.resolveComponent("el-scrollbar");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{class:"side-scroll-bar",style:require$$0$1.normalizeStyle({height:g.scrollerHeight})},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$E,[require$$0$1.createVNode(a,{modelValue:g.firstTab,"onUpdate:modelValue":c[1]||(c[1]=h=>g.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(s,{"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(f,{modelValue:g.activeNames,"onUpdate:modelValue":c[0]||(c[0]=h=>g.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(d,{tag:"ul",list:g.containers,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},clone:m.handleContainerWidgetClone,"ghost-class":"ghost",sort:!1,move:m.checkContainerMove,onEnd:m.onContainerDragEnd},{item:require$$0$1.withCtx(({element:h})=>[require$$0$1.createElementVNode("li",{class:"container-widget-item",title:h.displayName,onDblclick:$=>m.addContainerByDbClick(h)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"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$q)]),_: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(d,{tag:"ul",list:g.basicFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:m.checkFieldMove,clone:m.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:$=>m.addFieldByDbClick(h)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"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(d,{tag:"ul",list:g.advancedFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:m.checkFieldMove,clone:m.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:$=>m.addFieldByDbClick(h)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"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(d,{tag:"ul",list:g.customFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:m.checkFieldMove,clone:m.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:$=>m.addFieldByDbClick(h)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(s,{"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$c)]),_:1},8,["list","move","clone"])]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),m.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(s,{"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(g.formTemplates,(h,$)=>(require$$0$1.openBlock(),require$$0$1.createBlock(l,{"bord-style":{padding:"0"},shadow:"hover",class:"ft-card"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(o,{placement:"right",trigger:"hover"},{reference:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("img",{src:h.imgUrl,style:{width:"200px"}},null,8,_hoisted_6$b)]),default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("img",{src:h.imgUrl,style:{height:"600px",width:"720px"}},null,8,_hoisted_7$8)]),_:2},1024),require$$0$1.createElementVNode("div",_hoisted_8$6,[require$$0$1.createElementVNode("span",_hoisted_9$3,"#"+require$$0$1.toDisplayString($+1)+" "+require$$0$1.toDisplayString(h.title),1),require$$0$1.createVNode(t,{link:"",type:"primary",class:"right-button",onClick:v=>m.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-65b0f9fb"]]),emitter={data(){return{vfEvents:{}}},methods:{emit$(n,c){this.vfEvents[n]&&this.vfEvents[n].forEach(e=>{e(c)})},on$(n,c){this.vfEvents[n]=this.vfEvents[n]||[],this.vfEvents[n].push(c)},off$(n,c){if(this.vfEvents[n]){if(c==null){this.vfEvents[n].length=0;return}for(let e=0;e{if(this.widgetRefList[g].$options.componentName===c){let s=this.widgetRefList[g];s.emit$.call(s,e,p)}}),this.refList&&Object.keys(this.refList).forEach(g=>{if(this.refList[g].$options.componentName===c){let s=this.refList[g];s.emit$.call(s,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,c,e,p,g,m){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{class:require$$0$1.normalizeClass(["container-wrapper",[m.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,c){let e=this.refList[n];return!e&&!!c&&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 c=null;this.parentList.length===1?this.parentWidget&&(c=this.parentWidget):this.parentList.length===1+this.indexOfParentList?c=this.parentList[this.indexOfParentList-1]:c=this.parentList[this.indexOfParentList+1],this.$nextTick(()=>{this.parentList.splice(this.indexOfParentList,1),this.designer.setSelected(c),this.designer.formWidget.deleteWidgetRef(n),this.designer.emitHistoryChange()})}}}},_hoisted_1$D={key:0,class:"field-action"},_hoisted_2$p=["title"],_hoisted_3$l=["title"],_hoisted_4$e=["title"],_hoisted_5$b=["title"],_hoisted_6$a={key:1,class:"drag-handler background-opacity"},_hoisted_7$7=["title"],_hoisted_8$5={key:0};function _sfc_render$36(n,c,e,p,g,m){const s=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",[m.selected?"selected":"",m.customClass]]),style:require$$0$1.normalizeStyle({display:e.displayStyle}),onClick:c[0]||(c[0]=require$$0$1.withModifiers(d=>m.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:c[1]||(c[1]=require$$0$1.withModifiers(d=>m.selectParentWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-back"})],8,_hoisted_2$p),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:0,title:n.i18nt("designer.hint.moveUpWidget"),onClick:c[2]||(c[2]=require$$0$1.withModifiers(d=>m.moveUpWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"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:c[3]||(c[3]=require$$0$1.withModifiers(d=>m.moveDownWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"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:c[4]||(c[4]=require$$0$1.withModifiers((...d)=>m.removeFieldWidget&&m.removeFieldWidget(...d),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-delete"})],8,_hoisted_5$b)])):require$$0$1.createCommentVNode("",!0),e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_6$a,[require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.dragHandler")},[require$$0$1.createVNode(s,{"icon-class":"el-drag-move"})],8,_hoisted_7$7),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(s,{"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-244033de"]]),__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,c,e){validateFn("number",n,c,e,"["+n.label+"]\u5305\u542B\u975E\u6570\u5B57\u5B57\u7B26")},letter(n,c,e){validateFn("letter",n,c,e,"["+n.label+"]\u5305\u542B\u975E\u5B57\u6BCD\u5B57\u7B26")},letterAndNumber(n,c,e){validateFn("letterAndNumber",n,c,e,"["+n.label+"]\u53EA\u80FD\u8F93\u5165\u5B57\u6BCD\u6216\u6570\u5B57")},mobilePhone(n,c,e){validateFn("mobilePhone",n,c,e,"["+n.label+"]\u624B\u673A\u53F7\u7801\u683C\u5F0F\u6709\u8BEF")},noBlankStart(n,c,e){},noBlankEnd(n,c,e){},letterStartNumberIncluded(n,c,e){validateFn("letterStartNumberIncluded",n,c,e,"["+n.label+"]\u5FC5\u987B\u4EE5\u5B57\u6BCD\u5F00\u5934\uFF0C\u53EF\u5305\u542B\u6570\u5B57")},noChinese(n,c,e){validateFn("noChinese",n,c,e,"["+n.label+"]\u4E0D\u53EF\u8F93\u5165\u4E2D\u6587\u5B57\u7B26")},chinese(n,c,e){validateFn("chinese",n,c,e,"["+n.label+"]\u53EA\u80FD\u8F93\u5165\u4E2D\u6587\u5B57\u7B26")},email(n,c,e){validateFn("email",n,c,e,"["+n.label+"]\u90AE\u7BB1\u683C\u5F0F\u6709\u8BEF")},url(n,c,e){validateFn("url",n,c,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(c,e){var p=n.get(c);p?p.push(e):n.set(c,[e])},off:function(c,e){var p=n.get(c);p&&(e?p.splice(p.indexOf(e)>>>0,1):n.set(c,[]))},emit:function(c,e){var p=n.get(c);p&&p.slice().map(function(g){g(e)}),(p=n.get("*"))&&p.slice().map(function(g){g(c,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 c=this.formModel[this.subFormName];this.handleOnChangeForSubForm(n[0],n[1],c,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 c=this.getOptionData();!!c&&c.hasOwnProperty(this.field.options.name)&&(n?this.reloadOptions(c[this.field.options.name]):this.loadOptions(c[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=(c,e,p)=>new Function("rule","value","callback",this.field.options.onValidate).call(this,c,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,c){!!n&&n.length>0&&n.forEach(e=>{e.value===c&&(e.disabled=!0)})},enableOptionOfList(n,c){!!n&&n.length>0&&n.forEach(e=>{e.value===c&&(e.disabled=!1)})},emitFieldDataChange(n,c){this.emit$("field-value-changed",[n,c]),this.dispatch("VFormRender","fieldChange",[this.field.options.name,n,c,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,c){this.field.options.onChange&&new Function("value","oldValue",this.field.options.onChange).call(this,n,c)},handleOnChangeForSubForm(n,c,e,p){this.field.options.onChange&&new Function("value","oldValue","subFormData","rowId",this.field.options.onChange).call(this,n,c,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,c){let e=this.refList[n];return!e&&!!c&&this.$message.error(this.i18nt("render.hint.refNotFound")+n),e},getFieldEditor(){return this.$refs.fieldEditor},setValue(n){if(this.field.formItemFlag){let c=deepClone(this.fieldModel);this.fieldModel=n,this.initFileList(),this.syncUpdateFormModel(n),this.emitFieldDataChange(n,c)}},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,c){this.field.options.hasOwnProperty(n)&&(this.field.options[n]=c)},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,c){this.uploadHeaders[n]=c},setUploadData(n,c){this.uploadData[n]=c},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 c=-1;this.field.options.customClass.map((e,p)=>{e===n&&(c=p)}),c>-1&&this.field.options.customClass.splice(c,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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-button"),d=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{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(s,{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-3784bbc2"]]),__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 c=null;this.parentList.length===1?this.parentWidget&&(c=this.parentWidget):this.parentList.length===1+this.indexOfParentList?c=this.parentList[this.indexOfParentList-1]:c=this.parentList[this.indexOfParentList+1],this.$nextTick(()=>{this.parentList.splice(this.indexOfParentList,1),this.designer.setSelected(c),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$o={key:0,class:"field-action"},_hoisted_3$k=["title"],_hoisted_4$d=["title"],_hoisted_5$a=["title"],_hoisted_6$9=["title"],_hoisted_7$6={key:1,class:"drag-handler background-opacity"},_hoisted_8$4=["title"],_hoisted_9$2={key:0};function _sfc_render$34(n,c,e,p,g,m){const s=require$$0$1.resolveComponent("svg-icon"),d=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:m.label,"label-width":m.labelWidth+"px",title:e.field.options.labelTooltip,rules:e.rules,prop:m.getPropName(),class:require$$0$1.normalizeClass([m.selected?"selected":"",m.labelAlign,m.customClass,e.field.options.required?"required":""]),onClick:c[0]||(c[0]=require$$0$1.withModifiers(f=>m.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(d,{content:e.field.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"])]),_:1},8,["content"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(m.label),1)],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createVNode(s,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(m.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(m.label),1),require$$0$1.createVNode(d,{content:e.field.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"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(m.label),1),require$$0$1.createVNode(s,{"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$o,[require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.selectParentWidget"),onClick:c[1]||(c[1]=require$$0$1.withModifiers(f=>m.selectParentWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"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:c[2]||(c[2]=require$$0$1.withModifiers(f=>m.moveUpWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"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:c[3]||(c[3]=require$$0$1.withModifiers(f=>m.moveDownWidget(e.field),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-move-down"})],8,_hoisted_5$a)):require$$0$1.createCommentVNode("",!0),require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.remove"),onClick:c[4]||(c[4]=require$$0$1.withModifiers((...f)=>m.removeFieldWidget&&m.removeFieldWidget(...f),["stop"]))},[require$$0$1.createVNode(s,{"icon-class":"el-delete"})],8,_hoisted_6$9)])):require$$0$1.createCommentVNode("",!0),e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_7$6,[require$$0$1.createElementVNode("i",{title:n.i18nt("designer.hint.dragHandler")},[require$$0$1.createVNode(s,{"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$2,[require$$0$1.createVNode(s,{"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-6e673265"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-cascader"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",options:e.field.options.optionItems,modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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":m.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-3ebbe3c0"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-checkbox-button"),d=require$$0$1.resolveComponent("el-checkbox"),i=require$$0$1.resolveComponent("el-checkbox-group"),f=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{designer:e.designer,field:e.field,rules:g.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:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=r=>g.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,o)=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:o,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,o)=>(require$$0$1.openBlock(),require$$0$1.createBlock(d,{key:o,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-33320a4d"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-color-picker"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-5c8214c6"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-date-picker"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",type:e.field.options.type,modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-9b0f3514"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-date-picker"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",type:e.field.options.type,modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-f05b3708"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-divider"),d=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{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(s,{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-208e9558"]]),__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:{realUploadURL(){let n=this.field.options.uploadURL;if(!!n&&(n.indexOf("DSV.")>-1||n.indexOf("DSV[")>-1)){let c=this.getGlobalDsv();return console.log("test DSV: ",c),evalFn(this.field.options.uploadURL,c)}return this.field.options.uploadURL}},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 c=!1,e=n.name.substring(n.name.lastIndexOf(".")+1);if(!!this.field.options&&!!this.field.options.fileTypes){let m=this.field.options.fileTypes;m.length>0&&(c=m.some(s=>e.toLowerCase()===s.toLowerCase()))}if(!c)return this.$message.error(this.i18nt("render.hint.unsupportedFileType")+e),!1;let p=!1,g=5;return!!this.field.options&&!!this.field.options.fileMaxSize&&(g=this.field.options.fileMaxSize),p=n.size/1024/1024<=g,p?(this.uploadData.key=n.name,this.handleOnBeforeUpload(n)):(this.$message.error(this.i18nt("render.hint.fileSizeExceed")+g+"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,c,e){let p=deepClone(this.fieldModel);!!c&&!!c.name&&!!c.url?this.fieldModel.push({name:c.name,url:c.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,c,e){if(c.status==="success"){let p=null;this.field.options.onUploadSuccess&&(p=new Function("result","file","fileList",this.field.options.onUploadSuccess).call(this,n,c,e)),this.updateFieldModelAndEmitDataChangeForUpload(e,p,n),!!p&&!!p.name?c.name=p.name:c.name=c.name||n.name||n.fileName||n.filename,!!p&&!!p.url?c.url=p.url:c.url=c.url||n.url,this.fileList=deepClone(e),this.uploadBtnHidden=e.length>=this.field.options.limit}},updateFieldModelAndEmitDataChangeForRemove(n,c){let e=deepClone(this.fieldModel);this.fieldModel.splice(n,1),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,e)},removeUploadFile(n,c,e){let p=-1,g=null;this.fileList.forEach((m,s)=>{m.name===n&&(m.url===c||!!e&&m.uid===e)&&(p=s,g=m)}),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,g,this.fileList))},handleUploadError(n,c,e){this.field.options.onUploadError?new Function("error","file","fileList",this.field.options.onUploadError).call(this,n,c,e):this.$message({message:this.i18nt("render.hint.uploadError")+n,duration:3e3,type:"error"})}}},_hoisted_1$A={key:0,class:"el-upload__tip"},_hoisted_2$n={class:"upload-file-list"},_hoisted_3$j=["title"],_hoisted_4$c=["href"],_hoisted_5$9=["title"],_hoisted_6$8=["title","onClick"];function _sfc_render$2Z(n,c,e,p,g,m){const s=require$$0$1.resolveComponent("svg-icon"),d=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:g.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(d,{ref:"fieldEditor",disabled:e.field.options.disabled,style:require$$0$1.normalizeStyle(g.styleVariables),class:require$$0$1.normalizeClass(["dynamicPseudoAfter",{hideUploadDiv:g.uploadBtnHidden}]),action:m.realUploadURL,headers:g.uploadHeaders,data:g.uploadData,"with-credentials":e.field.options.withCredentials,multiple:e.field.options.multipleSelect,"file-list":g.fileList,"show-file-list":e.field.options.showFileList,limit:e.field.options.limit,"on-exceed":m.handleFileExceed,"before-upload":m.beforeFileUpload,"on-success":m.handleFileUpload,"on-error":m.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(s,{"icon-class":"el-plus"}),c[0]||(c[0]=require$$0$1.createElementVNode("i",{class:"el-icon-plus avatar-uploader-icon"},null,-1))]),file:require$$0$1.withCtx(({file:f})=>[require$$0$1.createElementVNode("div",_hoisted_2$n,[require$$0$1.createElementVNode("span",{class:"upload-file-name",title:f.name},require$$0$1.toDisplayString(f.name),9,_hoisted_3$j),require$$0$1.createElementVNode("a",{href:f.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(s,{"icon-class":"el-download"})],8,_hoisted_5$9)],8,_hoisted_4$c),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=>m.removeUploadFile(f.name,f.url,f.uid)},[require$$0$1.createVNode(s,{"icon-class":"el-delete"})],8,_hoisted_6$8))])]),_: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-335cf656"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(s,{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-1ad6f874"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("svg-icon"),d=require$$0$1.resolveComponent("el-button"),i=require$$0$1.resolveComponent("el-input"),f=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{designer:e.designer,field:e.field,rules:g.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:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=r=>g.fieldModel=r),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:n.widgetSize,class:"hide-spin-button",type:m.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(d,{disabled:e.field.options.disabled||e.field.options.appendButtonDisabled,onClick:n.emitAppendButtonClick},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"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-35bcee25"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-input-number"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-612b9efe"]]),__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)},realUploadURL(){let n=this.field.options.uploadURL;if(!!n&&(n.indexOf("DSV.")>-1||n.indexOf("DSV[")>-1)){let c=this.getGlobalDsv();return console.log("test DSV: ",c),evalFn(this.field.options.uploadURL,c)}return this.field.options.uploadURL}},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 c=!1;if(!!this.field.options&&!!this.field.options.fileTypes){let g=this.field.options.fileTypes;g.length>0&&(c=g.some(m=>n.type==="image/"+m))}if(!c)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,c,e){let p=deepClone(this.fieldModel);!!c&&!!c.name&&!!c.url?this.fieldModel.push({name:c.name,url:c.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,c,e){if(c.status==="success"){let p=null;this.field.options.onUploadSuccess&&(p=new Function("result","file","fileList",this.field.options.onUploadSuccess).call(this,n,c,e)),this.updateFieldModelAndEmitDataChangeForUpload(e,p,n),this.fileList=deepClone(e),this.uploadBtnHidden=e.length>=this.field.options.limit}},updateFieldModelAndEmitDataChangeForRemove(n){let c=deepClone(this.fieldModel),e=-1;this.fileListBeforeRemove.map((p,g)=>{p.name===n.name&&(p.url===n.url||!!p.uid&&p.uid===n.uid)&&(e=g)}),e>-1&&this.fieldModel.splice(e,1),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,c)},handleBeforeRemove(n){this.fileListBeforeRemove=deepClone(n)},handlePictureRemove(n){this.handleBeforeRemove(this.fileList),this.fileList.splice(this.fileList.indexOf(n),1),this.updateFieldModelAndEmitDataChangeForRemove(n);let c=deepClone(this.fileList);this.uploadBtnHidden=c.length>=this.field.options.limit,this.field.options.onFileRemove&&new Function("file","fileList",this.field.options.onFileRemove).call(this,n,c)},handleUploadError(n,c,e){this.field.options.onUploadError?new Function("error","file","fileList",this.field.options.onUploadError).call(this,n,c,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$m={class:"el-icon--upload-success",style:{color:"#FFF"}},_hoisted_3$i={class:"el-upload-list__item-actions"},_hoisted_4$b=["onClick"],_hoisted_5$8=["onClick"],_hoisted_6$7={key:0,class:"el-upload__tip"},_hoisted_7$5={class:"uploader-icon"};function _sfc_render$2V(n,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-image"),d=require$$0$1.resolveComponent("svg-icon"),i=require$$0$1.resolveComponent("el-upload"),f=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{designer:e.designer,field:e.field,rules:g.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:m.realUploadURL,headers:g.uploadHeaders,data:g.uploadData,"with-credentials":e.field.options.withCredentials,multiple:e.field.options.multipleSelect,"file-list":g.fileList,"show-file-list":e.field.options.showFileList,"list-type":"picture-card",class:require$$0$1.normalizeClass({hideUploadDiv:g.uploadBtnHidden}),limit:e.field.options.limit,"on-exceed":m.handlePictureExceed,"before-upload":m.beforePictureUpload,"on-preview":m.handlePictureCardPreview,"on-success":m.handlePictureUpload,"on-error":m.handleUploadError},{file:require$$0$1.withCtx(({file:r})=>[require$$0$1.createVNode(s,{ref:"imageRef",style:{width:"100%",height:"100%"},src:r.url,"preview-src-list":m.previewList,"initial-index":g.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$m,[require$$0$1.createVNode(d,{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:o=>m.handlePictureCardPreview(r)},[require$$0$1.createVNode(d,{"icon-class":"el-zoom-in"})],8,_hoisted_4$b),require$$0$1.createElementVNode("span",{class:"el-upload-list__item-delete",onClick:o=>m.handlePictureRemove(r)},[require$$0$1.createVNode(d,{"icon-class":"el-delete"})],8,_hoisted_5$8)])]),tip:require$$0$1.withCtx(()=>[e.field.options.uploadTip?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_6$7,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(d,{"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-6bdae02e"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-radio-button"),d=require$$0$1.resolveComponent("el-radio"),i=require$$0$1.resolveComponent("el-radio-group"),f=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{designer:e.designer,field:e.field,rules:g.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:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=r=>g.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,o)=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:o,value: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,["value","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,o)=>(require$$0$1.openBlock(),require$$0$1.createBlock(d,{key:o,value: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,["value","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-06d5ed13"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-rate"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-29a21d5b"]]),__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,c){(function(p,g){n.exports=g()})(typeof self!="undefined"?self:commonjsGlobal,function(){return function(e){var p={};function g(m){if(p[m])return p[m].exports;var s=p[m]={i:m,l:!1,exports:{}};return e[m].call(s.exports,s,s.exports,g),s.l=!0,s.exports}return g.m=e,g.c=p,g.d=function(m,s,d){g.o(m,s)||Object.defineProperty(m,s,{configurable:!1,enumerable:!0,get:d})},g.n=function(m){var s=m&&m.__esModule?function(){return m.default}:function(){return m};return g.d(s,"a",s),s},g.o=function(m,s){return Object.prototype.hasOwnProperty.call(m,s)},g.p="",g(g.s=109)}([function(e,p,g){Object.defineProperty(p,"__esModule",{value:!0});var m=g(17),s=g(18),d=g(19),i=g(45),f=g(46),r=g(47),o=g(48),t=g(49),l=g(12),a=g(32),u=g(33),h=g(31),$=g(1),v={Scope:$.Scope,create:$.create,find:$.find,query:$.query,register:$.register,Container:m.default,Format:s.default,Leaf:d.default,Embed:o.default,Scroll:i.default,Block:r.default,Inline:f.default,Text:t.default,Attributor:{Attribute:l.default,Class:a.default,Style:u.default,Store:h.default}};p.default=v},function(e,p,g){var m=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,v){$.__proto__=v}||function($,v){for(var w in v)v.hasOwnProperty(w)&&($[w]=v[w])};return function($,v){h($,v);function w(){this.constructor=$}$.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}}();Object.defineProperty(p,"__esModule",{value:!0});var s=function(h){m($,h);function $(v){var w=this;return v="[Parchment] "+v,w=h.call(this,v)||this,w.message=v,w.name=w.constructor.name,w}return $}(Error);p.ParchmentError=s;var d={},i={},f={},r={};p.DATA_KEY="__blot";var o;(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"})(o=p.Scope||(p.Scope={}));function t(h,$){var v=a(h);if(v==null)throw new s("Unable to create "+h+" blot");var w=v,y=h instanceof Node||h.nodeType===Node.TEXT_NODE?h:w.create($);return new w(y,$)}p.create=t;function l(h,$){return $===void 0&&($=!1),h==null?null:h[p.DATA_KEY]!=null?h[p.DATA_KEY].blot:$?l(h.parentNode,$):null}p.find=l;function a(h,$){$===void 0&&($=o.ANY);var v;if(typeof h=="string")v=r[h]||d[h];else if(h instanceof Text||h.nodeType===Node.TEXT_NODE)v=r.text;else if(typeof h=="number")h&o.LEVEL&o.BLOCK?v=r.block:h&o.LEVEL&o.INLINE&&(v=r.inline);else if(h instanceof HTMLElement){var w=(h.getAttribute("class")||"").split(/\s+/);for(var y in w)if(v=i[w[y]],v)break;v=v||f[h.tagName]}return v==null?null:$&o.LEVEL&v.scope&&$&o.TYPE&v.scope?v:null}p.query=a;function u(){for(var h=[],$=0;$1)return h.map(function(y){return u(y)});var v=h[0];if(typeof v.blotName!="string"&&typeof v.attrName!="string")throw new s("Invalid definition");if(v.blotName==="abstract")throw new s("Cannot register abstract class");if(r[v.blotName||v.attrName]=v,typeof v.keyName=="string")d[v.keyName]=v;else if(v.className!=null&&(i[v.className]=v),v.tagName!=null){Array.isArray(v.tagName)?v.tagName=v.tagName.map(function(y){return y.toUpperCase()}):v.tagName=v.tagName.toUpperCase();var w=Array.isArray(v.tagName)?v.tagName:[v.tagName];w.forEach(function(y){(f[y]==null||v.className==null)&&(f[y]=v)})}return v}p.register=u},function(e,p,g){var m=g(51),s=g(11),d=g(3),i=g(20),f=String.fromCharCode(0),r=function(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]};r.prototype.insert=function(o,t){var l={};return o.length===0?this:(l.insert=o,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(l.attributes=t),this.push(l))},r.prototype.delete=function(o){return o<=0?this:this.push({delete:o})},r.prototype.retain=function(o,t){if(o<=0)return this;var l={retain:o};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(l.attributes=t),this.push(l)},r.prototype.push=function(o){var t=this.ops.length,l=this.ops[t-1];if(o=d(!0,{},o),typeof l=="object"){if(typeof o.delete=="number"&&typeof l.delete=="number")return this.ops[t-1]={delete:l.delete+o.delete},this;if(typeof l.delete=="number"&&o.insert!=null&&(t-=1,l=this.ops[t-1],typeof l!="object"))return this.ops.unshift(o),this;if(s(o.attributes,l.attributes)){if(typeof o.insert=="string"&&typeof l.insert=="string")return this.ops[t-1]={insert:l.insert+o.insert},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof l.retain=="number")return this.ops[t-1]={retain:l.retain+o.retain},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this}}return t===this.ops.length?this.ops.push(o):this.ops.splice(t,0,o),this},r.prototype.chop=function(){var o=this.ops[this.ops.length-1];return o&&o.retain&&!o.attributes&&this.ops.pop(),this},r.prototype.filter=function(o){return this.ops.filter(o)},r.prototype.forEach=function(o){this.ops.forEach(o)},r.prototype.map=function(o){return this.ops.map(o)},r.prototype.partition=function(o){var t=[],l=[];return this.forEach(function(a){var u=o(a)?t:l;u.push(a)}),[t,l]},r.prototype.reduce=function(o,t){return this.ops.reduce(o,t)},r.prototype.changeLength=function(){return this.reduce(function(o,t){return t.insert?o+i.length(t):t.delete?o-t.delete:o},0)},r.prototype.length=function(){return this.reduce(function(o,t){return o+i.length(t)},0)},r.prototype.slice=function(o,t){o=o||0,typeof t!="number"&&(t=1/0);for(var l=[],a=i.iterator(this.ops),u=0;u0&&l.next(u.retain-h)}for(var $=new r(a);t.hasNext()||l.hasNext();)if(l.peekType()==="insert")$.push(l.next());else if(t.peekType()==="delete")$.push(t.next());else{var v=Math.min(t.peekLength(),l.peekLength()),w=t.next(v),y=l.next(v);if(typeof y.retain=="number"){var _={};typeof w.retain=="number"?_.retain=v:_.insert=w.insert;var b=i.attributes.compose(w.attributes,y.attributes,typeof w.retain=="number");if(b&&(_.attributes=b),$.push(_),!l.hasNext()&&s($.ops[$.ops.length-1],_)){var S=new r(t.rest());return $.concat(S).chop()}}else typeof y.delete=="number"&&typeof w.retain=="number"&&$.push(y)}return $.chop()},r.prototype.concat=function(o){var t=new r(this.ops.slice());return o.ops.length>0&&(t.push(o.ops[0]),t.ops=t.ops.concat(o.ops.slice(1))),t},r.prototype.diff=function(o,t){if(this.ops===o.ops)return new r;var l=[this,o].map(function(v){return v.map(function(w){if(w.insert!=null)return typeof w.insert=="string"?w.insert:f;var y=v===o?"on":"with";throw new Error("diff() called "+y+" non-document")}).join("")}),a=new r,u=m(l[0],l[1],t),h=i.iterator(this.ops),$=i.iterator(o.ops);return u.forEach(function(v){for(var w=v[1].length;w>0;){var y=0;switch(v[0]){case m.INSERT:y=Math.min($.peekLength(),w),a.push($.next(y));break;case m.DELETE:y=Math.min(w,h.peekLength()),h.next(y),a.delete(y);break;case m.EQUAL:y=Math.min(h.peekLength(),$.peekLength(),w);var _=h.next(y),b=$.next(y);s(_.insert,b.insert)?a.retain(y,i.attributes.diff(_.attributes,b.attributes)):a.push(b).delete(y);break}w-=y}}),a.chop()},r.prototype.eachLine=function(o,t){t=t||` `;for(var l=i.iterator(this.ops),a=new r,u=0;l.hasNext();){if(l.peekType()!=="insert")return;var h=l.peek(),$=i.length(h)-l.peekLength(),v=typeof h.insert=="string"?h.insert.indexOf(t,$)-$:-1;if(v<0)a.push(l.next());else if(v>0)a.push(l.next(v));else{if(o(a,l.next(1).attributes||{},u)===!1)return;u+=1,a=new r}}a.length()>0&&o(a,{},u)},r.prototype.transform=function(o,t){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);for(var l=i.iterator(this.ops),a=i.iterator(o.ops),u=new r;l.hasNext()||a.hasNext();)if(l.peekType()==="insert"&&(t||a.peekType()!=="insert"))u.retain(i.length(l.next()));else if(a.peekType()==="insert")u.push(a.next());else{var h=Math.min(l.peekLength(),a.peekLength()),$=l.next(h),v=a.next(h);if($.delete)continue;v.delete?u.push(v):u.retain(h,i.attributes.transform($.attributes,v.attributes,t))}return u.chop()},r.prototype.transformPosition=function(o,t){t=!!t;for(var l=i.iterator(this.ops),a=0;l.hasNext()&&a<=o;){var u=l.peekLength(),h=l.peekType();if(l.next(),h==="delete"){o-=Math.min(u,o-a);continue}else h==="insert"&&(a0&&(C1&&arguments[1]!==void 0?arguments[1]:!1;if(x&&(C===0||C>=this.length()-S)){var L=this.clone();return C===0?(this.parent.insertBefore(L,this),this):(this.parent.insertBefore(L,this.next),L)}else{var q=s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"split",this).call(this,C,x);return this.cache={},q}}}]),T}(t.default.Block);O.blotName="block",O.tagName="P",O.defaultChild="break",O.allowedChildren=[h.default,t.default.Embed,v.default];function k(A){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A==null||(typeof A.formats=="function"&&(T=(0,i.default)(T,A.formats())),A.parent==null||A.parent.blotName=="scroll"||A.parent.statics.scope!==A.statics.scope)?T:k(A.parent,T)}p.bubbleFormats=k,p.BlockEmbed=M,p.default=O},function(e,p,g){Object.defineProperty(p,"__esModule",{value:!0}),p.default=p.overload=p.expandConfig=void 0;var m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},s=function(){function F(I,R){var B=[],D=!0,P=!1,j=void 0;try{for(var V=I[Symbol.iterator](),W;!(D=(W=V.next()).done)&&(B.push(W.value),!(R&&B.length===R));D=!0);}catch(H){P=!0,j=H}finally{try{!D&&V.return&&V.return()}finally{if(P)throw j}}return B}return function(I,R){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return F(I,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function F(I,R){for(var B=0;B2&&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,B):Object.keys(R).forEach(function(V){D.register(V,R[V],B)})}else this.imports[R]!=null&&!P&&E.warn("Overwriting "+R+" with",B),this.imports[R]=B,(R.startsWith("blots/")||R.startsWith("formats/"))&&B.blotName!=="abstract"?$.default.register(B):R.startsWith("modules")&&typeof B.register=="function"&&B.register()}}]);function F(I){var R=this,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(T(this,F),this.options=x(I,B),this.container=this.options.container,this.container==null)return E.error("Invalid Quill container",I);this.options.debug&&F.debug(this.options.debug);var D=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 l.default,this.scroll=$.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new o.default(this.scroll),this.selection=new w.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(l.default.events.EDITOR_CHANGE,function(j){j===l.default.events.TEXT_CHANGE&&R.root.classList.toggle("ql-blank",R.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(j,V){var W=R.selection.lastRange,H=W&&W.length===0?W.index:void 0;L.call(R,function(){return R.editor.update(null,V,H)},j)});var P=this.clipboard.convert(`
`+D+"


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


"&&(d=""),p=d,c.emit("update:value",p),c.emit("change",{html:d,text:f,quill:i})}),c.emit("ready",e.quill))};return require$$0$1.onBeforeUnmount(()=>{const d=g.value.previousSibling;d&&d.className.indexOf("ql-toolbar")>-1&&d.parentNode.removeChild(d)}),require$$0$1.onMounted(()=>{s()}),require$$0$1.onUnmounted(()=>{e.quill=null}),{editor:g}}},_hoisted_1$x={ref:"editor"};function _sfc_render$2S(n,c,e,p,g,m){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,c,e,p,g,m){const s=require$$0$1.resolveComponent("quill-editor"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{value:g.fieldModel,"onUpdate:value":c[0]||(c[0]=i=>g.fieldModel=i),options:m.editorOption,disabled:e.field.options.disabled,onBlur:m.handleRichEditorBlurEvent,onFocus:m.handleRichEditorFocusEvent,onChange:m.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-697b5022"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-option"),d=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:g.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(d,{ref:"fieldEditor",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=f=>g.fieldModel=f),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":m.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":m.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,f=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:f.value,label:f.label,value:f.value,disabled:f.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-3a0f316d"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-slider"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-0de324ac"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(s,{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-95f13fca"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(s,{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-9a1dfacc"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-switch"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-22bb2b91"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-input"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{type:"textarea",ref:"fieldEditor",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-4cec7068"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-time-picker"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor","is-range":"",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-8d758ba4"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-time-picker"),d=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{designer:e.designer,field:e.field,rules:g.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(s,{ref:"fieldEditor",modelValue:g.fieldModel,"onUpdate:modelValue":c[0]||(c[0]=i=>g.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-2dd889c0"]]),__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 c=modules$3[n].default.name;comps$1[c]=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:Se({},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$l={class:"invisible-content"};function _sfc_render$2I(n,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-col");return require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createBlock(s,require$$0$1.mergeProps({class:["grid-cell",[m.customClass]]},g.layoutProps,{style:m.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,(d,i)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[d.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(n.getComponentByContainer(d)),{widget:d,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),f=>({name:f,fn:require$$0$1.withCtx(r=>[require$$0$1.renderSlot(n.$slots,f,require$$0$1.mergeProps({ref_for:!0},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(d.type+"-widget"),{field:d,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),f=>({name:f,fn:require$$0$1.withCtx(r=>[require$$0$1.renderSlot(n.$slots,f,require$$0$1.mergeProps({ref_for:!0},r),void 0,!0)])}))]),1032,["field","parent-list","index-of-parent-list","parent-widget"]))],64))),256)):(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:1},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$v,[require$$0$1.createElementVNode("span",_hoisted_2$l,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-9332ab84"]]),__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 c=e=>{let p=e.options.name,g=this.getWidgetRef(p);n&&!!g&&!!g.clearFieldRules&&g.clearFieldRules(),!n&&!!g&&!!g.buildFieldRules&&g.buildFieldRules()};traverseFieldWidgetsOfContainer(this.widget,c)},activeTab(n){n>=0&&n{c.options.active=e===n,e===n&&(this.activeTabName=c.options.name)})},disableTab(n){n>=0&&n=0&&n=0&&n=0&&n{let e=c.options.name+"@row"+this.rowIdData[n],p=this.getWidgetRef(e);p&&p.setDisabled(!0)})},enableSubFormRow(n){this.widget.widgetList.forEach(c=>{let e=c.options.name+"@row"+this.rowIdData[n],p=this.getWidgetRef(e);p&&p.setDisabled(!1)})},disableSubForm(){this.rowIdData.length>0&&this.rowIdData.forEach((n,c)=>{this.disableSubFormRow(c)}),this.actionDisabled=!0},enableSubForm(){this.rowIdData.length>0&&this.rowIdData.forEach((n,c)=>{this.enableSubFormRow(c)}),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 c=-1;this.widget.options.customClass.map((e,p)=>{e===n&&(c=p)}),c>-1&&this.widget.options.customClass.splice(c,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,c,e,p,g,m){const s=require$$0$1.resolveComponent("grid-col-item"),d=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(d,{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,(f,r)=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:r,widget:f,"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),o=>({name:o,fn:require$$0$1.withCtx(t=>[require$$0$1.renderSlot(n.$slots,o,require$$0$1.mergeProps({ref_for:!0},t))])}))]),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(Se({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,c){return c.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 c=this.formModel[this.widget.options.name];!!c&&c.length>0&&(c.forEach(()=>{this.rowIdData.push("id"+generateId())}),n&&setTimeout(()=>{this.handleSubFormRowChange(c)},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,c){let e=n+"@row"+this.rowIdData[c];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 c=0;c{e.push(this.cloneFieldSchema(p))}),this.fieldSchemaData.push(e)}},addToFieldSchemaData(n){let c=[];this.widget.widgetList.forEach(e=>{c.push(this.cloneFieldSchema(e))}),n===void 0?this.fieldSchemaData.push(c):this.fieldSchemaData.splice(n,0,c)},deleteFromFieldSchemaData(n){this.fieldSchemaData.splice(n,1)},cloneFieldSchema(n){let c=deepClone(n);return c.id=n.type+generateId(),c},initEventHandler(){this.widget.type==="sub-form"&&this.on$("setFormData",n=>{this.initRowIdData(!1),this.initFieldSchemaData();let c=n[this.widget.options.name]||[];setTimeout(()=>{this.handleSubFormRowChange(c)},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 c=this.formModel[this.widget.options.name]||[];c.push(n),this.addToRowIdData(),this.addToFieldSchemaData(),this.handleSubFormRowAdd(c,this.rowIdData[c.length-1]),this.handleSubFormRowChange(c)},insertSubFormRow(n){let c={};this.widget.widgetList.forEach(p=>{p.formItemFlag&&(c[p.options.name]=p.options.defaultValue)});let e=this.formModel[this.widget.options.name]||[];e.splice(n,0,c),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 c=this.formModel[this.widget.options.name]||[],e=deepClone(c[n]);c.splice(n,1),this.deleteFromRowIdData(n),this.deleteFromFieldSchemaData(n),this.handleSubFormRowDelete(c,e),this.handleSubFormRowChange(c)}).catch(()=>{})},handleSubFormRowChange(n){this.widget.options.onSubFormRowChange&&new Function("subFormData",this.widget.options.onSubFormRowChange).call(this,n)},handleSubFormRowAdd(n,c){this.widget.options.onSubFormRowAdd&&new Function("subFormData","newRowId",this.widget.options.onSubFormRowAdd).call(this,n,c)},handleSubFormRowInsert(n,c){this.widget.options.onSubFormRowInsert&&new Function("subFormData","newRowId",this.widget.options.onSubFormRowInsert).call(this,n,c)},handleSubFormRowDelete(n,c){this.widget.options.onSubFormRowDelete&&new Function("subFormData","deletedDataRow",this.widget.options.onSubFormRowDelete).call(this,n,c)}}},_hoisted_1$u={class:"action-header-column"},_hoisted_2$k={class:"action-label"},_hoisted_3$h={key:0,class:"custom-label"},_hoisted_4$a=["title"],_hoisted_5$7={class:"sub-form-action-column hide-label"},_hoisted_6$6={class:"action-button-column"},_hoisted_7$4={key:0,class:"row-number-span"};function _sfc_render$2G(n,c,e,p,g,m){const s=require$$0$1.resolveComponent("svg-icon"),d=require$$0$1.resolveComponent("el-button"),i=require$$0$1.resolveComponent("el-tooltip"),f=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(f,{class:"header-row"},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$u,[require$$0$1.createElementVNode("span",_hoisted_2$k,require$$0$1.toDisplayString(n.i18nt("render.hint.subFormAction")),1),require$$0$1.createVNode(d,{disabled:g.actionDisabled,round:"",type:"primary",size:"small",class:"action-button",onClick:m.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(s,{"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,o=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:o.id+"thc",class:require$$0$1.normalizeClass(["field-header-column",[m.getLabelAlign(e.widget,o),o.options.required?"is-required":""]]),style:require$$0$1.normalizeStyle({width:o.options.columnWidth})},[o.options.labelIconClass?(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",_hoisted_3$h,[o.options.labelIconPosition==="front"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[o.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createVNode(i,{content:o.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"icon-class":o.options.labelIconClass},null,8,["icon-class"])]),_:2},1032,["content"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(o.options.label),1)],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createVNode(s,{"icon-class":o.options.labelIconClass},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(o.options.label),1)],64))],64)):o.options.labelIconPosition==="rear"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[o.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(o.options.label),1),require$$0$1.createVNode(i,{content:o.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"icon-class":o.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(o.options.label),1),require$$0$1.createVNode(s,{"icon-class":o.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:o.options.labelTooltip},require$$0$1.toDisplayString(o.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(g.rowIdData,(o,t)=>(require$$0$1.openBlock(),require$$0$1.createBlock(f,{class:"sub-form-row",key:o},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_5$7,[require$$0$1.createElementVNode("div",_hoisted_6$6,[require$$0$1.createVNode(d,{disabled:g.actionDisabled,circle:"",onClick:l=>m.insertSubFormRow(t),title:n.i18nt("render.hint.insertSubFormRow")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"icon-class":"el-plus"})]),_:2},1032,["disabled","onClick","title"]),require$$0$1.createVNode(d,{disabled:g.actionDisabled,circle:"",onClick:l=>m.deleteSubFormRow(t),title:n.i18nt("render.hint.deleteSubFormRow")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(s,{"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(t+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,(l,a)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:l.id+"tc"+o,class:"sub-form-table-column hide-label",style:require$$0$1.normalizeStyle({width:l.options.columnWidth})},[(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(l.type+"-widget"),{field:g.fieldSchemaData[t][a],key:g.fieldSchemaData[t][a].id,"parent-list":e.widget.widgetList,"index-of-parent-list":a,"parent-widget":e.widget,"sub-form-row-id":o,"sub-form-row-index":t,"sub-form-col-index":a},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-2eb559e6"]]),__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:Se({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(c=>c.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,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-tab-pane"),d=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(d,{modelValue:g.activeTabName,"onUpdate:modelValue":c[0]||(c[0]=f=>g.activeTabName=f),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(m.visibleTabs,(f,r)=>(require$$0$1.openBlock(),require$$0$1.createBlock(s,{key:r,label:f.options.label,disabled:f.options.disabled,name:f.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(f.widgetList,(o,t)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[o.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(n.getComponentByContainer(o)),{widget:o,key:t,"parent-list":f.widgetList,"index-of-parent-list":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(a=>[require$$0$1.renderSlot(n.$slots,l,require$$0$1.mergeProps({ref_for:!0},a))])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(o.type+"-widget"),{field:o,key:t,"parent-list":f.widgetList,"index-of-parent-list":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(a=>[require$$0$1.renderSlot(n.$slots,l,require$$0$1.mergeProps({ref_for:!0},a))])}))]),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:Se({},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,c,e,p,g,m){return require$$0$1.openBlock(),require$$0$1.createElementBlock("td",{class:require$$0$1.normalizeClass(["table-cell",[m.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,(s,d)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[s.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(n.getComponentByContainer(s)),{widget:s,key:d,"parent-list":e.widget.widgetList,"index-of-parent-list":d,"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(f=>[require$$0$1.renderSlot(n.$slots,i,require$$0$1.mergeProps({ref_for:!0},f),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(s.type+"-widget"),{field:s,key:d,"parent-list":e.widget.widgetList,"index-of-parent-list":d,"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(f=>[require$$0$1.renderSlot(n.$slots,i,require$$0$1.mergeProps({ref_for:!0},f),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-1825ed0b"]]),__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,c,e,p,g,m){const s=require$$0$1.resolveComponent("table-cell-item"),d=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(d,{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,f)=>(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,o)=>(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(s,{widget:r,key:o,"parent-list":e.widget.cols,"row-index":f,"col-index":o,"parent-widget":e.widget},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.mergeProps({ref_for:!0},l),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-dfc6ca8e"]]),__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 c in modules$2){let e=modules$2[c].default.name;n.component(e,modules$2[c].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:Se({},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(c=>{this.buildDataFromWidget(c)})},buildDataFromWidget(n){if(n.category==="container")if(n.type==="grid")!!n.cols&&n.cols.length>0&&n.cols.forEach(c=>{this.buildDataFromWidget(c)});else if(n.type==="table")!!n.rows&&n.rows.length>0&&n.rows.forEach(c=>{!!c.cols&&c.cols.length>0&&c.cols.forEach(e=>{this.buildDataFromWidget(e)})});else if(n.type==="tab")!!n.tabs&&n.tabs.length>0&&n.tabs.forEach(c=>{!!c.widgetList&&c.widgetList.length>0&&c.widgetList.forEach(e=>{this.buildDataFromWidget(e)})});else if(n.type==="sub-form"){let c=n.options.name;if(this.formData.hasOwnProperty(c)){let e=this.formData[c];this.formDataModel[c]=deepClone(e)}else{let e={};n.options.showBlankRow?(n.widgetList.forEach(p=>{p.formItemFlag&&(e[p.options.name]=p.options.defaultValue)}),this.formDataModel[c]=[e]):this.formDataModel[c]=[]}}else n.type==="grid-col"||n.type==="table-cell"?!!n.widgetList&&n.widgetList.length>0&&n.widgetList.forEach(c=>{this.buildDataFromWidget(c)}):!!n.widgetList&&n.widgetList.length>0&&n.widgetList.forEach(c=>{this.buildDataFromWidget(c)});else if(n.formItemFlag)if(!this.formData.hasOwnProperty(n.options.name))this.formDataModel[n.options.name]=n.options.defaultValue;else{let c=this.formData[n.options.name];this.formDataModel[n.options.name]=deepClone(c)}},addFieldChangeEventHandler(){this.off$("fieldChange"),this.on$("fieldChange",(n,c,e,p,g)=>{this.handleFieldDataChange(n,c,e,p,g),this.$emit("formChange",n,c,e,this.formDataModel,p,g)})},addFieldValidateEventHandler(){this.off$("fieldValidation"),this.on$("fieldValidation",n=>{this.$refs.renderForm.validateField(n)})},registerFormToRefList(){this.widgetRefList.v_form_ref=this},handleFieldDataChange(n,c,e,p,g){!!this.formConfig&&!!this.formConfig.onFormDataChange&&new Function("fieldName","newValue","oldValue","formModel","subFormName","subFormRowIndex",this.formConfig.onFormDataChange).call(this,n,c,e,this.formDataModel,p,g)},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,c){let e=this.getWidgetRef(n);e?e.setDisabled(c):this.findWidgetOfSubFormAndSetDisabled(n,c)},findWidgetOfSubFormAndSetDisabled(n,c){this.findWidgetNameInSubForm(n).forEach(e=>{let p=this.getWidgetRef(e);p&&p.setDisabled(c)})},findWidgetAndSetHidden(n,c){let e=this.getWidgetRef(n);e?e.setHidden(c):this.findWidgetOfSubFormAndSetHidden(n,c)},findWidgetOfSubFormAndSetHidden(n,c){this.findWidgetNameInSubForm(n).forEach(e=>{let p=this.getWidgetRef(e);p&&p.setHidden(c)})},findWidgetNameInSubForm(n){let c=[],e=null,p=(g,m)=>{!!g.options&&g.options.name===n&&(e=m.options.name)};if(traverseFieldWidgets(this.widgetList,p),e){let g=this.getWidgetRef(e);if(g){let m=g.getRowIdData();!!m&&m.length>0&&m.forEach(s=>{c.push(n+"@row"+s)})}}return c},changeLanguage(n){changeLocale(n)},getNativeForm(){return this.$refs.renderForm},getFormRef(){return this},getWidgetRef(n,c=!1){let e=this.widgetRefList[n];return!e&&!!c&&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 c=null;if(typeof n=="string"?c=JSON.parse(n):c=n,!c.formConfig||!c.widgetList){this.$message.error("Invalid format of form json.");return}this.clearFormDataModel(),this.buildFormModel(c.widgetList),this.formJsonObj.formConfig=c.formConfig,this.formJsonObj.widgetList=c.widgetList,this.insertCustomStyleAndScriptNode(),this.$nextTick(()=>{this.initFormObject(!1),this.handleOnMounted()})}else this.$message.error("Set form json failed.")},reloadOptionData(n){let c=[];!!n&&typeof n=="string"?c=[n]:!!n&&Array.isArray(n)&&(c=[...n]),this.broadcast("FieldWidget","reloadOptionItems",c)},getFormData(n=!0){if(!n)return this.formDataModel;let c=function(){},e=new window.Promise(function(p,g){c=function(m,s){s?g(s):p(m)}});return this.$refs.renderForm.validate(p=>{p?c(this.formDataModel):c(this.formDataModel,this.i18nt("render.hint.validationFailed"))}),e},setFormData(n){Object.keys(this.formDataModel).forEach(c=>{!!n&&n.hasOwnProperty(c)&&(this.formDataModel[c]=deepClone(n[c]))}),this.broadcast("ContainerItem","setFormData",this.formDataModel),this.broadcast("FieldWidget","setFormData",this.formDataModel)},getFieldValue(n){let c=this.getWidgetRef(n);if(!!c&&!!c.getValue)return c.getValue();if(!c){let e=[];return this.findWidgetNameInSubForm(n).forEach(p=>{let g=this.getWidgetRef(p);!!g&&!!g.getValue&&e.push(g.getValue())}),e}},setFieldValue(n,c){let e=this.getWidgetRef(n);!!e&&!!e.setValue&&e.setValue(c),e||this.findWidgetNameInSubForm(n).forEach(p=>{let g=this.getWidgetRef(p);!!g&&!!g.setValue&&g.setValue(c)})},getSubFormValues(n,c=!0){return this.subFormRefList[n].getSubFormValues(c)},disableForm(){Object.keys(this.widgetRefList).forEach(c=>{let e=this.getWidgetRef(c);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(c=>{let e=this.getWidgetRef(c);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(c=>{n(c)})},validateFields(){},disableWidgets(n){n&&(typeof n=="string"?this.findWidgetAndSetDisabled(n,!0):Array.isArray(n)&&n.forEach(c=>{this.findWidgetAndSetDisabled(c,!0)}))},enableWidgets(n){n&&(typeof n=="string"?this.findWidgetAndSetDisabled(n,!1):Array.isArray(n)&&n.forEach(c=>{this.findWidgetAndSetDisabled(c,!1)}))},hideWidgets(n){n&&(typeof n=="string"?this.findWidgetAndSetHidden(n,!0):Array.isArray(n)&&n.forEach(c=>{this.findWidgetAndSetHidden(c,!0)}))},showWidgets(n){n&&(typeof n=="string"?this.findWidgetAndSetHidden(n,!1):Array.isArray(n)&&n.forEach(c=>{this.findWidgetAndSetHidden(c,!1)}))},getFieldWidgets(){return getAllFieldWidgets(this.formJsonObj.widgetList)},getContainerWidgets(){return getAllContainerWidgets(this.formJsonObj.widgetList)},addEC(n,c){this.externalComponents[n]=c},hasEC(n){return this.externalComponents.hasOwnProperty(n)},getEC(n){return this.externalComponents[n]},getGlobalDsv(){return this.globalDsv}}};function _sfc_render$2C(n,c,e,p,g,m){const s=require$$0$1.resolveComponent("el-form");return require$$0$1.openBlock(),require$$0$1.createBlock(s,{"label-position":m.labelPosition,size:m.size,class:require$$0$1.normalizeClass([[m.customClass],"render-form"]),"label-width":m.labelWidth,"validate-on-rule-change":!1,model:g.formDataModel,ref:"renderForm",onSubmit:c[0]||(c[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(m.widgetList,(d,i)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[d.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(m.getContainerWidgetName(d)),{widget:d,key:d.id,"parent-list":m.widgetList,"index-of-parent-list":i,"parent-widget":null},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),f=>({name:f,fn:require$$0$1.withCtx(r=>[require$$0$1.renderSlot(n.$slots,f,require$$0$1.mergeProps({ref_for:!0},r),void 0,!0)])}))]),1032,["widget","parent-list","index-of-parent-list"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(m.getWidgetName(d)),{field:d,"form-model":g.formDataModel,designer:null,key:d.id,"parent-list":m.widgetList,"index-of-parent-list":i,"parent-widget":null},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(n.$slots),f=>({name:f,fn:require$$0$1.withCtx(r=>[require$$0$1.renderSlot(n.$slots,f,require$$0$1.mergeProps({ref_for:!0},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-544703a2"]]),ace$2={exports:{}};(function(n,c){(function(){var e="ace",p=function(){return this}();!p&&typeof window!="undefined"&&(p=window);var g=function(r,o,t){if(typeof r!="string"){g.original?g.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(t=o),g.modules[r]||(g.payloads[r]=t,g.modules[r]=null)};g.modules={},g.payloads={};var m=function(r,o,t){if(typeof o=="string"){var l=i(r,o);if(l!=null)return t&&t(),l}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var a=[],u=0,h=o.length;ui.length)&&(d=i.length),d-=s.length;var f=i.indexOf(s,d);return f!==-1&&f===d}),String.prototype.repeat||m(String.prototype,"repeat",function(s){for(var d="",i=this;s>0;)s&1&&(d+=i),(s>>=1)&&(i+=i);return d}),String.prototype.includes||m(String.prototype,"includes",function(s,d){return this.indexOf(s,d)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(s),i=1;i>>0,f=arguments[1],r=f>>0,o=r<0?Math.max(i+r,0):Math.min(r,i),t=arguments[2],l=t===void 0?i:t>>0,a=l<0?Math.max(i+l,0):Math.min(l,i);o0;)i&1&&(f+=d),(i>>=1)&&(d+=d);return f};var m=/^\s\s*/,s=/\s\s*$/;p.stringTrimLeft=function(d){return d.replace(m,"")},p.stringTrimRight=function(d){return d.replace(s,"")},p.copyObject=function(d){var i={};for(var f in d)i[f]=d[f];return i},p.copyArray=function(d){for(var i=[],f=0,r=d.length;f65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,p,g){p.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},p.getOS=function(){return p.isMac?p.OS.MAC:p.isLinux?p.OS.LINUX:p.OS.WINDOWS};var m=typeof navigator=="object"?navigator:{},s=(/mac|win|linux/i.exec(m.platform)||["other"])[0].toLowerCase(),d=m.userAgent||"",i=m.appName||"";p.isWin=s=="win",p.isMac=s=="mac",p.isLinux=s=="linux",p.isIE=i=="Microsoft Internet Explorer"||i.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),p.isOldIE=p.isIE&&p.isIE<9,p.isGecko=p.isMozilla=d.match(/ Gecko\/\d+/),p.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",p.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,p.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,p.isSafari=parseFloat(d.split(" Safari/")[1])&&!p.isChrome||void 0,p.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,p.isAIR=d.indexOf("AdobeAIR")>=0,p.isAndroid=d.indexOf("Android")>=0,p.isChromeOS=d.indexOf(" CrOS ")>=0,p.isIOS=/iPad|iPhone|iPod/.test(d)&&!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,g){var m=e("./useragent"),s="http://www.w3.org/1999/xhtml";p.buildDom=function t(l,a,u){if(typeof l=="string"&&l){var h=document.createTextNode(l);return a&&a.appendChild(h),h}if(!Array.isArray(l))return l&&l.appendChild&&a&&a.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var $=[],v=0;v=1.5:!0,m.isChromeOS&&(p.HI_DPI=!1),typeof document!="undefined"){var o=document.createElement("div");p.HI_DPI&&o.style.transform!==void 0&&(p.HAS_CSS_TRANSFORMS=!0),!m.isEdge&&typeof o.style.animationName!="undefined"&&(p.HAS_CSS_ANIMATION=!0),o=null}p.HAS_CSS_TRANSFORMS?p.translate=function(t,l,a){t.style.transform="translate("+Math.round(l)+"px, "+Math.round(a)+"px)"}:p.translate=function(t,l,a){t.style.top=Math.round(a)+"px",t.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,p,g){/* * 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 m=e("./dom");p.get=function(s,d){var i=new XMLHttpRequest;i.open("GET",s,!0),i.onreadystatechange=function(){i.readyState===4&&d(i.responseText)},i.send(null)},p.loadScript=function(s,d){var i=m.getDocumentHead(),f=document.createElement("script");f.src=s,i.appendChild(f),f.onload=f.onreadystatechange=function(r,o){(o||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,o||d())}},p.qualifyURL=function(s){var d=document.createElement("a");return d.href=s,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,p,g){p.inherits=function(m,s){m.super_=s,m.prototype=Object.create(s.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})},p.mixin=function(m,s){for(var d in s)m[d]=s[d];return m},p.implement=function(m,s){p.mixin(m,s)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,p,g){var m={},s=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};m._emit=m._dispatchEvent=function(i,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[i]||[],o=this._defaultHandlers[i];if(!(!r.length&&!o)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=i),f.stopPropagation||(f.stopPropagation=s),f.preventDefault||(f.preventDefault=d),r=r.slice();for(var t=0;t1&&($=u[u.length-2]);var w=f[a+"Path"];return w==null?w=f.basePath:h=="/"&&(a=h=""),w&&w.slice(-1)!="/"&&(w+="/"),w+a+h+$+this.get("suffix")},p.setModuleUrl=function(l,a){return f.$moduleUrls[l]=a};var r=function(l,a){if(l==="ace/theme/textmate"||l==="./theme/textmate")return a(null,e("./theme/textmate"));if(o)return o(l,a);console.error("loader is not configured")},o;p.setLoader=function(l){o=l},p.dynamicModules=Object.create(null),p.$loading={},p.$loaded={},p.loadModule=function(l,a){var u;if(Array.isArray(l))var h=l[0],$=l[1];else if(typeof l=="string")var $=l;var v=function(w){if(w&&!p.$loading[$])return a&&a(w);if(p.$loading[$]||(p.$loading[$]=[]),p.$loading[$].push(a),!(p.$loading[$].length>1)){var y=function(){r($,function(_,b){b&&(p.$loaded[$]=b),p._emit("load.module",{name:$,module:b});var S=p.$loading[$];p.$loading[$]=null,S.forEach(function(M){M&&M(b)})})};if(!p.get("packaged"))return y();s.loadScript(p.moduleUrl($,h),y),t()}};if(p.dynamicModules[$])p.dynamicModules[$]().then(function(w){w.default?v(w.default):v(w)});else{try{u=this.$require($)}catch{}v(u||p.$loaded[$])}},p.$require=function(l){if(typeof g.require=="function"){var a="require";return g[a](l)}},p.setModuleLoader=function(l,a){p.dynamicModules[l]=a};var t=function(){!f.basePath&&!f.workerPath&&!f.modePath&&!f.themePath&&!Object.keys(f.$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.41.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,p,g){e("./lib/fixoldbrowsers");var m=e("./config");m.setLoader(function(f,r){e([f],function(o){r(null,o)})});var s=function(){return this||typeof window!="undefined"&&window}();g.exports=function(f){m.init=d,m.$require=e,f.require=e},d(!0);function d(f){if(!(!s||!s.document)){m.set("packaged",f||e.packaged||g.packaged||s.define&&(void 0).packaged);var r={},o="",t=document.currentScript||document._currentScript,l=t&&t.ownerDocument||document;t&&t.src&&(o=t.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var a=l.getElementsByTagName("script"),u=0;u ["+this.end.row+"/"+this.end.column+"]"},s.prototype.contains=function(d,i){return this.compare(d,i)==0},s.prototype.compareRange=function(d){var i,f=d.end,r=d.start;return i=this.compare(f.row,f.column),i==1?(i=this.compare(r.row,r.column),i==1?2:i==0?1:0):i==-1?-2:(i=this.compare(r.row,r.column),i==-1?-1:i==1?42:0)},s.prototype.comparePoint=function(d){return this.compare(d.row,d.column)},s.prototype.containsRange=function(d){return this.comparePoint(d.start)==0&&this.comparePoint(d.end)==0},s.prototype.intersects=function(d){var i=this.compareRange(d);return i==-1||i==0||i==1},s.prototype.isEnd=function(d,i){return this.end.row==d&&this.end.column==i},s.prototype.isStart=function(d,i){return this.start.row==d&&this.start.column==i},s.prototype.setStart=function(d,i){typeof d=="object"?(this.start.column=d.column,this.start.row=d.row):(this.start.row=d,this.start.column=i)},s.prototype.setEnd=function(d,i){typeof d=="object"?(this.end.column=d.column,this.end.row=d.row):(this.end.row=d,this.end.column=i)},s.prototype.inside=function(d,i){return this.compare(d,i)==0?!(this.isEnd(d,i)||this.isStart(d,i)):!1},s.prototype.insideStart=function(d,i){return this.compare(d,i)==0?!this.isEnd(d,i):!1},s.prototype.insideEnd=function(d,i){return this.compare(d,i)==0?!this.isStart(d,i):!1},s.prototype.compare=function(d,i){return!this.isMultiLine()&&d===this.start.row?ithis.end.column?1:0:dthis.end.row?1:this.start.row===d?i>=this.start.column?0:-1:this.end.row===d?i<=this.end.column?0:1:0},s.prototype.compareStart=function(d,i){return this.start.row==d&&this.start.column==i?-1:this.compare(d,i)},s.prototype.compareEnd=function(d,i){return this.end.row==d&&this.end.column==i?1:this.compare(d,i)},s.prototype.compareInside=function(d,i){return this.end.row==d&&this.end.column==i?1:this.start.row==d&&this.start.column==i?-1:this.compare(d,i)},s.prototype.clipRows=function(d,i){if(this.end.row>i)var f={row:i+1,column:0};else if(this.end.rowi)var r={row:i+1,column:0};else if(this.start.row1?(M++,M>4&&(M=1)):M=1,s.isIE){var x=Math.abs(C.clientX-O)>5||Math.abs(C.clientY-k)>5;(!A||x)&&(M=1),A&&clearTimeout(A),A=setTimeout(function(){A=null},y[M-1]||600),M==1&&(O=C.clientX,k=C.clientY)}if(C._clicks=M,_[b]("mousedown",C),M>4)M=0;else if(M>1)return _[b](T[M],C)}Array.isArray(w)||(w=[w]),w.forEach(function(C){l(C,"mousedown",E,S)})};function u(w){return 0|(w.ctrlKey?1:0)|(w.altKey?2:0)|(w.shiftKey?4:0)|(w.metaKey?8:0)}p.getModifierString=function(w){return m.KEY_MODS[u(w)]};function h(w,y,_){var b=u(y);if(!_&&y.code&&(_=m.$codeToKeyCode[y.code]||_),!s.isMac&&d){if(y.getModifierState&&(y.getModifierState("OS")||y.getModifierState("Win"))&&(b|=8),d.altGr)if((3&b)!=3)d.altGr=0;else return;if(_===18||_===17){var S=y.location;if(_===17&&S===1)d[_]==1&&(i=y.timeStamp);else if(_===18&&b===3&&S===2){var M=y.timeStamp-i;M<50&&(d.altGr=!0)}}}if(_ in m.MODIFIER_KEYS&&(_=-1),!(!b&&_===13&&y.location===3&&(w(y,b,-_),y.defaultPrevented))){if(s.isChromeOS&&b&8){if(w(y,b,_),y.defaultPrevented)return;b&=~8}return!b&&!(_ in m.FUNCTION_KEYS)&&!(_ in m.PRINTABLE_KEYS)?!1:w(y,b,_)}}p.addCommandKeyListener=function(w,y,_){var b=null;l(w,"keydown",function(S){d[S.keyCode]=(d[S.keyCode]||0)+1;var M=h(y,S,S.keyCode);return b=S.defaultPrevented,M},_),l(w,"keypress",function(S){b&&(S.ctrlKey||S.altKey||S.shiftKey||S.metaKey)&&(p.stopEvent(S),b=null)},_),l(w,"keyup",function(S){d[S.keyCode]=null},_),d||($(),l(window,"focus",$))};function $(){d=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var v=1;p.nextTick=function(w,y){y=y||window;var _="zero-timeout-message-"+v++,b=function(S){S.data==_&&(p.stopPropagation(S),a(y,"message",b),w())};l(y,"message",b),y.postMessage(_,"*")}}p.$idleBlocked=!1,p.onIdle=function(w,y){return setTimeout(function _(){p.$idleBlocked?setTimeout(_,100):w()},y)},p.$idleBlockId=null,p.blockIdle=function(w){p.$idleBlockId&&clearTimeout(p.$idleBlockId),p.$idleBlocked=!0,p.$idleBlockId=setTimeout(function(){p.$idleBlocked=!1},w||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(w){setTimeout(w,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,p,g){var m;g.exports={lineMode:!1,pasteCancelled:function(){return m&&m>Date.now()-50?!0:m=!1},cancel:function(){m=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,g){var m=e("../lib/event"),s=e("../config").nls,d=e("../lib/useragent"),i=e("../lib/dom"),f=e("../lib/lang"),r=e("../clipboard"),o=d.isChrome<18,t=d.isIE,l=d.isChrome>63,a=400,u=e("../lib/keys"),h=u.KEY_MODS,$=d.isIOS,v=$?/\s/:/\n/,w=d.isMobile,y;y=function(_,b){var S=i.createElement("textarea");S.className="ace_text-input",S.setAttribute("wrap","off"),S.setAttribute("autocorrect","off"),S.setAttribute("autocapitalize","off"),S.setAttribute("spellcheck","false"),S.style.opacity="0",_.insertBefore(S,_.firstChild),this.setHost=function(J){b=J};var M=!1,O=!1,k=!1,A=!1,T="";w||(S.style.fontSize="1px");var E=!1,C=!1,x="",L=0,q=0,N=0,F=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,R=0;try{var B=document.activeElement===S}catch{}this.setNumberOfExtraLines=function(J){if(F=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,J<0){R=0;return}R=J},this.setAriaLabel=function(){var J="";if(b.$textInputAriaLabel&&(J+="".concat(b.$textInputAriaLabel,", ")),b.session){var se=b.session.selection.cursor.row;J+=s("text-input.aria-label","Cursor at row $0",[se+1])}S.setAttribute("aria-label",J)},this.setAriaOptions=function(J){J.activeDescendant?(S.setAttribute("aria-haspopup","true"),S.setAttribute("aria-autocomplete",J.inline?"both":"list"),S.setAttribute("aria-activedescendant",J.activeDescendant)):(S.setAttribute("aria-haspopup","false"),S.setAttribute("aria-autocomplete","both"),S.removeAttribute("aria-activedescendant")),J.role&&S.setAttribute("role",J.role),J.setLabel&&(S.setAttribute("aria-roledescription",s("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),m.addListener(S,"blur",function(J){C||(b.onBlur(J),B=!1)},b),m.addListener(S,"focus",function(J){if(!C){if(B=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(J),d.isEdge?setTimeout(P):P()}},b),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:b.renderer.enableKeyboardAccessibility}),T||l||this.$focusScroll=="browser")return S.focus({preventScroll:!0});var J=S.style.top;S.style.position="fixed",S.style.top="0px";try{var se=S.getBoundingClientRect().top!=0}catch{return}var le=[];if(se)for(var K=S.parentElement;K&&K.nodeType==1;)le.push(K),K.setAttribute("ace_nocontext","true"),!K.parentElement&&K.getRootNode?K=K.getRootNode().host:K=K.parentElement;S.focus({preventScroll:!0}),se&&le.forEach(function(G){G.removeAttribute("ace_nocontext")}),setTimeout(function(){S.style.position="",S.style.top=="0px"&&(S.style.top=J)},0)},this.blur=function(){S.blur()},this.isFocused=function(){return B},b.on("beforeEndOperation",function(){var J=b.curOp,se=J&&J.command&&J.command.name;if(se!="insertstring"){var le=se&&(J.docChanged||J.selectionChanged);k&&le&&(x=S.value="",X()),P()}}),b.on("changeSelection",this.setAriaLabel);var D=function(J,se){for(var le=se,K=1;K<=J-F&&K<2*R+1;K++)le+=b.session.getLine(J-K).length+1;return le},P=$?function(J){if(!(!B||M&&!J||A)){J||(J="");var se=` ab`+J+`cde fg `;se!=S.value&&(S.value=x=se);var le=4,K=4+(J.length||(b.selection.isEmpty()?0:1));(L!=le||q!=K)&&S.setSelectionRange(le,K),L=le,q=K}}:function(){if(!(k||A)&&!(!B&&!H)){k=!0;var J=0,se=0,le="";if(b.session){var K=b.selection,G=K.getRange(),Y=K.cursor.row;Y===I+1?(F=I+1,I=F+2*R):Y===F-1?(I=F-1,F=I-2*R):(YI+1)&&(F=Y>R?Y-R:0,I=Y>R?Y+R:2*R);for(var ee=[],oe=F;oe<=I;oe++)ee.push(b.session.getLine(oe));if(le=ee.join(` `),J=D(G.start.row,G.start.column),se=D(G.end.row,G.end.column),G.start.rowI){var ce=b.session.getLine(I+1);se=G.end.row>I+1?ce.length:G.end.column,se+=le.length+1,le=le+` `+ce}else w&&Y>0&&(le=` `+le,se+=1,J+=1);le.length>a&&(J=x.length&&J.value===x&&x&&J.selectionEnd!==q},V=function(J){k||(M?M=!1:j(S)?(b.selectAll(),P()):w&&S.selectionStart!=L&&P())},W=null;this.setInputHandler=function(J){W=J},this.getInputHandler=function(){return W};var H=!1,z=function(J,se){if(H&&(H=!1),O)return P(),J&&b.onPaste(J),O=!1,"";for(var le=S.selectionStart,K=S.selectionEnd,G=L,Y=x.length-q,ee=J,oe=J.length-le,de=J.length-K,ce=0;G>0&&x[ce]==J[ce];)ce++,G--;for(ee=ee.slice(ce),ce=1;Y>0&&x.length-ce>L-1&&x[x.length-ce]==J[J.length-ce];)ce++,Y--;oe-=ce-1,de-=ce-1;var ve=ee.length-ce+1;if(ve<0&&(G=-ve,ve=0),ee=ee.slice(0,ve),!se&&!ee&&!oe&&!G&&!Y&&!de)return"";A=!0;var xe=!1;return d.isAndroid&&ee==". "&&(ee=" ",xe=!0),ee&&!G&&!Y&&!oe&&!de||E?b.onTextInput(ee):b.onTextInput(ee,{extendLeft:G,extendRight:Y,restoreStart:oe,restoreEnd:de}),A=!1,x=J,L=le,q=K,N=de,xe?` `:ee},U=function(J){if(k)return _e();if(J&&J.inputType){if(J.inputType=="historyUndo")return b.execCommand("undo");if(J.inputType=="historyRedo")return b.execCommand("redo")}var se=S.value,le=z(se,!0);(se.length>a+100||v.test(le)||w&&L<1&&L==q)&&P()},Z=function(J,se,le){var K=J.clipboardData||window.clipboardData;if(!(!K||o)){var G=t||le?"Text":"text/plain";try{return se?K.setData(G,se)!==!1:K.getData(G)}catch(Y){if(!le)return Z(Y,se,!0)}}},ne=function(J,se){var le=b.getCopyText();if(!le)return m.preventDefault(J);Z(J,le)?($&&(P(le),M=le,setTimeout(function(){M=!1},10)),se?b.onCut():b.onCopy(),m.preventDefault(J)):(M=!0,S.value=le,S.select(),setTimeout(function(){M=!1,P(),se?b.onCut():b.onCopy()}))},re=function(J){ne(J,!0)},ue=function(J){ne(J,!1)},fe=function(J){var se=Z(J);r.pasteCancelled()||(typeof se=="string"?(se&&b.onPaste(se,J),d.isIE&&setTimeout(P),m.preventDefault(J)):(S.value="",O=!0))};m.addCommandKeyListener(S,function(J,se,le){if(!k)return b.onCommandKey(J,se,le)},b),m.addListener(S,"select",V,b),m.addListener(S,"input",U,b),m.addListener(S,"cut",re,b),m.addListener(S,"copy",ue,b),m.addListener(S,"paste",fe,b),(!("oncut"in S)||!("oncopy"in S)||!("onpaste"in S))&&m.addListener(_,"keydown",function(J){if(!(d.isMac&&!J.metaKey||!J.ctrlKey))switch(J.keyCode){case 67:ue(J);break;case 86:fe(J);break;case 88:re(J);break}},b);var ye=function(J){if(!(k||!b.onCompositionStart||b.$readOnly)&&(k={},!E)){J.data&&(k.useTextareaForIME=!1),setTimeout(_e,0),b._signal("compositionStart"),b.on("mousedown",Q);var se=b.getSelectionRange();se.end.row=se.start.row,se.end.column=se.start.column,k.markerRange=se,k.selectionStart=L,b.onCompositionStart(k),k.useTextareaForIME?(x=S.value="",L=0,q=0):(S.msGetInputContext&&(k.context=S.msGetInputContext()),S.getInputContext&&(k.context=S.getInputContext()))}},_e=function(){if(!(!k||!b.onCompositionUpdate||b.$readOnly)){if(E)return Q();if(k.useTextareaForIME)b.onCompositionUpdate(S.value);else{var J=S.value;z(J),k.markerRange&&(k.context&&(k.markerRange.start.column=k.selectionStart=k.context.compositionStartOffset),k.markerRange.end.column=k.markerRange.start.column+q-k.selectionStart+N)}}},X=function(J){!b.onCompositionEnd||b.$readOnly||(k=!1,b.onCompositionEnd(),b.off("mousedown",Q),J&&U())};function Q(){C=!0,S.blur(),S.focus(),C=!1}var ie=f.delayedCall(_e,50).schedule.bind(null,null);function ae(J){J.keyCode==27&&S.value.lengthq&&x[de]==` `?ce=u.end:oeq&&x.slice(0,de).split(` `).length>2?ce=u.down:de>q&&x[de-1]==" "?(ce=u.right,ve=h.option):(de>q||de==q&&q!=L&&oe==de)&&(ce=u.right),oe!==de&&(ve|=h.shift),ce){var xe=se.onCommandKey({},ve,ce);if(!xe&&se.commands){ce=u.keyCodeToString(ce);var me=se.commands.findKeyCommand(ve,ce);me&&se.execCommand(me)}L=oe,q=de,P("")}}};document.addEventListener("selectionchange",Y),se.on("destroy",function(){document.removeEventListener("selectionchange",Y)})}this.destroy=function(){S.parentElement&&S.parentElement.removeChild(S)}},p.TextInput=y,p.$setUserAgentForTests=function(_,b){w=_,$=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,p,g){var m=e("../lib/useragent"),s=0,d=550,i=function(){function o(t){t.$clickSelection=null;var l=t.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));var a=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];a.forEach(function(u){t[u]=this[u]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}return o.prototype.onMouseDown=function(t){var l=t.inSelection(),a=t.getDocumentPosition();this.mousedownEvent=t;var u=this.editor,h=t.getButton();if(h!==0){var $=u.getSelectionRange(),v=$.isEmpty();(v||h==1)&&u.selection.moveToPosition(a),h==2&&(u.textInput.onContextMenu(t.domEvent),m.isMozilla||t.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!u.isFocused()&&(u.focus(),this.$focusTimeout&&!this.$clickSelection&&!u.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(t);return}return this.captureMouse(t),this.startSelect(a,t.domEvent._clicks>1),t.preventDefault()},o.prototype.startSelect=function(t,l){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var a=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?a.selection.selectToPosition(t):l||a.selection.moveToPosition(t),l||this.select(),a.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var t,l=this.editor,a=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(a);if(u==-1)t=this.$clickSelection.end;else if(u==1)t=this.$clickSelection.start;else{var h=r(this.$clickSelection,a);a=h.cursor,t=h.anchor}l.selection.setSelectionAnchor(t.row,t.column)}l.selection.selectToPosition(a),l.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(t){var l,a=this.editor,u=a.renderer.screenToTextCoordinates(this.x,this.y),h=a.selection[t](u.row,u.column);if(this.$clickSelection){var $=this.$clickSelection.comparePoint(h.start),v=this.$clickSelection.comparePoint(h.end);if($==-1&&v<=0)l=this.$clickSelection.end,(h.end.row!=u.row||h.end.column!=u.column)&&(u=h.start);else if(v==1&&$>=0)l=this.$clickSelection.start,(h.start.row!=u.row||h.start.column!=u.column)&&(u=h.end);else if($==-1&&v==1)u=h.end,l=h.start;else{var w=r(this.$clickSelection,u);u=w.cursor,l=w.anchor}a.selection.setSelectionAnchor(l.row,l.column)}a.selection.selectToPosition(u),a.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var t=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(t>s||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(t){var l=t.getDocumentPosition(),a=this.editor,u=a.session,h=u.getBracketRange(l);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=a.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},o.prototype.onTripleClick=function(t){var l=t.getDocumentPosition(),a=this.editor;this.setState("selectByLines");var u=a.getSelectionRange();u.isMultiLine()&&u.contains(l.row,l.column)?(this.$clickSelection=a.selection.getLineRange(u.start.row),this.$clickSelection.end=a.selection.getLineRange(u.end.row).end):this.$clickSelection=a.selection.getLineRange(l.row),this.select()},o.prototype.onQuadClick=function(t){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var a=this.$lastScroll,u=t.domEvent.timeStamp,h=u-a.t,$=h?t.wheelX/h:a.vx,v=h?t.wheelY/h:a.vy;h=1&&l.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(y=!0),w<=1&&l.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(y=!0),y)a.allowed=u;else if(u-a.allowedd.clientHeight;i||s.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,p,g){var m=this&&this.__extends||function(){var u=function(h,$){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var y in w)Object.prototype.hasOwnProperty.call(w,y)&&(v[y]=w[y])},u(h,$)};return function(h,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");u(h,$);function v(){this.constructor=h}h.prototype=$===null?Object.create($):(v.prototype=$.prototype,new v)}}(),s=this&&this.__values||function(u){var h=typeof Symbol=="function"&&Symbol.iterator,$=h&&u[h],v=0;if($)return $.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&v>=u.length&&(u=void 0),{value:u&&u[v++],done:!u}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},d=e("./lib/dom");e("./lib/event");var i=e("./range").Range,f=e("./lib/scroll").preventParentScroll,r="ace_tooltip",o=function(){function u(h){this.isOpen=!1,this.$element=null,this.$parentNode=h}return u.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(h){this.getElement().textContent=h},u.prototype.setHtml=function(h){this.getElement().innerHTML=h},u.prototype.setPosition=function(h,$){this.getElement().style.left=h+"px",this.getElement().style.top=$+"px"},u.prototype.setClassName=function(h){d.addCssClass(this.getElement(),h)},u.prototype.setTheme=function(h){this.$element.className=r+" "+(h.isDark?"ace_dark ":"")+(h.cssClass||"")},u.prototype.show=function(h,$,v){h!=null&&this.setText(h),$!=null&&v!=null&&this.setPosition($,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},u.prototype.hide=function(h){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u}(),t=function(){function u(){this.popups=[]}return u.prototype.addPopup=function(h){this.popups.push(h),this.updatePopups()},u.prototype.removePopup=function(h){var $=this.popups.indexOf(h);$!==-1&&(this.popups.splice($,1),this.updatePopups())},u.prototype.updatePopups=function(){var h,$,v,w;this.popups.sort(function(T,E){return E.priority-T.priority});var y=[];try{for(var _=s(this.popups),b=_.next();!b.done;b=_.next()){var S=b.value,M=!0;try{for(var O=(v=void 0,s(y)),k=O.next();!k.done;k=O.next()){var A=k.value;if(this.doPopupsOverlap(A,S)){M=!1;break}}}catch(T){v={error:T}}finally{try{k&&!k.done&&(w=O.return)&&w.call(O)}finally{if(v)throw v.error}}M?y.push(S):S.hide()}}catch(T){h={error:T}}finally{try{b&&!b.done&&($=_.return)&&$.call(_)}finally{if(h)throw h.error}}},u.prototype.doPopupsOverlap=function(h,$){var v=h.getElement().getBoundingClientRect(),w=$.getElement().getBoundingClientRect();return v.leftw.left&&v.topw.top},u}(),l=new t;p.popupManager=l,p.Tooltip=o;var a=function(u){m(h,u);function h($){$===void 0&&($=document.body);var v=u.call(this,$)||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 w=v.getElement();return w.style.whiteSpace="pre-wrap",w.style.pointerEvents="auto",w.addEventListener("mouseout",v.onMouseOut),w.tabIndex=-1,w.addEventListener("blur",function(){w.contains(document.activeElement)||this.hide()}.bind(v)),w.addEventListener("wheel",f),v}return h.prototype.addToEditor=function($){$.on("mousemove",this.onMouseMove),$.on("mousedown",this.hide),$.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},h.prototype.removeFromEditor=function($){$.off("mousemove",this.onMouseMove),$.off("mousedown",this.hide),$.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},h.prototype.onMouseMove=function($,v){this.lastEvent=$,this.lastT=Date.now();var w=v.$mouseHandler.isMousePressed;if(this.isOpen){var y=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(y.row,y.column)||w||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||w||(this.lastEvent=$,this.timeout=setTimeout(this.waitForHover,this.idleTime))},h.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var $=Date.now()-this.lastT;if(this.idleTime-$>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-$);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},h.prototype.isOutsideOfText=function($){var v=$.editor,w=$.getDocumentPosition(),y=v.session.getLine(w.row);if(w.column==y.length){var _=v.renderer.pixelToScreenCoordinates($.clientX,$.clientY),b=v.session.documentToScreenPosition(w.row,w.column);if(b.column!=_.column||b.row!=_.row)return!0}return!1},h.prototype.setDataProvider=function($){this.$gatherData=$},h.prototype.showForRange=function($,v,w,y){var _=10;if(!(y&&y!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=$.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(v,$.session),this.range=i.fromPoints(v.start,v.end);var S=b.textToScreenCoordinates(v.start.row,v.start.column),M=b.scroller.getBoundingClientRect();S.pageX=u.length&&(u=void 0),{value:u&&u[v++],done:!u}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},d=e("../lib/dom"),i=e("../lib/event"),f=e("../tooltip").Tooltip,r=e("../config").nls,o=5,t=3;p.GUTTER_TOOLTIP_LEFT_OFFSET=o,p.GUTTER_TOOLTIP_TOP_OFFSET=t;function l(u){var h=u.editor,$=h.renderer.$gutterLayer,v=new a(h,!0);u.editor.setDefaultHandler("guttermousedown",function(M){if(!(!h.isFocused()||M.getButton()!=0)){var O=$.getRegion(M);if(O!="foldWidgets"){var k=M.getDocumentPosition().row,A=h.session.selection;if(M.getShiftKey())A.selectTo(k,0);else{if(M.domEvent.detail==2)return h.selectAll(),M.preventDefault();u.$clickSelection=h.selection.getLineRange(k)}return u.setState("selectByLines"),u.captureMouse(M),M.preventDefault()}}});var w,y;function _(){var M=y.getDocumentPosition().row,O=h.session.getLength();if(M==O){var k=h.renderer.pixelToScreenCoordinates(0,y.y).row,A=y.$pos;if(k>h.session.documentToScreenRow(A.row,A.column))return b()}if(v.showTooltip(M),!!v.isOpen)if(h.on("mousewheel",b),h.on("changeSession",b),window.addEventListener("keydown",b,!0),u.$tooltipFollowsMouse)S(y);else{var T=y.getGutterRow(),E=$.$lines.get(T);if(E){var C=E.element.querySelector(".ace_gutter_annotation"),x=C.getBoundingClientRect(),L=v.getElement().style;L.left=x.right-o+"px",L.top=x.bottom-t+"px"}else S(y)}}function b(M){M&&M.type==="keydown"&&(M.ctrlKey||M.metaKey)||M&&M.type==="mouseout"&&(!M.relatedTarget||v.getElement().contains(M.relatedTarget))||(w&&(w=clearTimeout(w)),v.isOpen&&(v.hideTooltip(),h.off("mousewheel",b),h.off("changeSession",b),window.removeEventListener("keydown",b,!0)))}function S(M){v.setPosition(M.x,M.y)}u.editor.setDefaultHandler("guttermousemove",function(M){var O=M.domEvent.target||M.domEvent.srcElement;if(d.hasCssClass(O,"ace_fold-widget")||d.hasCssClass(O,"ace_custom-widget"))return b();v.isOpen&&u.$tooltipFollowsMouse&&S(M),y=M,!w&&(w=setTimeout(function(){w=null,y&&!u.isMousePressed&&_()},50))}),i.addListener(h.renderer.$gutter,"mouseout",function(M){y=null,!!v.isOpen&&(w=setTimeout(function(){w=null,b(M)},50))},h)}p.GutterHandler=l;var a=function(u){m(h,u);function h($,v){v===void 0&&(v=!1);var w=u.call(this,$.container)||this;w.editor=$,w.visibleTooltipRow;var y=w.getElement();return y.setAttribute("role","tooltip"),y.style.pointerEvents="auto",v&&(w.onMouseOut=w.onMouseOut.bind(w),y.addEventListener("mouseout",w.onMouseOut)),w}return h.prototype.onMouseOut=function($){!this.isOpen||!$.relatedTarget||this.getElement().contains($.relatedTarget)||$&&$.currentTarget.contains($.relatedTarget)||this.hideTooltip()},h.prototype.setPosition=function($,v){var w=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,_=this.getWidth(),b=this.getHeight();$+=15,v+=15,$+_>w&&($-=$+_-w),v+b>y&&(v-=20+b),f.prototype.setPosition.call(this,$,v)},Object.defineProperty(h,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),h.prototype.showTooltip=function($){var v,w=this.editor.renderer.$gutterLayer,y=w.$annotations[$],_;y?_={displayText:Array.from(y.displayText),type:Array.from(y.type)}:_={displayText:[],type:[]};var b=w.session.getFoldLine($);if(b&&w.$showFoldedAnnotations){for(var S={error:[],security:[],warning:[],info:[],hint:[]},M={error:1,security:2,warning:3,info:4,hint:5},O,k=$+1;k<=b.end.row;k++)if(!!w.$annotations[k])for(var A=0;Ar?T=null:j-T>=f&&(a.renderer.scrollCursorIntoView(),T=null)}}function x(D,P){var j=Date.now(),V=a.renderer.layerConfig.lineHeight,W=a.renderer.layerConfig.characterWidth,H=a.renderer.scroller.getBoundingClientRect(),z={x:{left:w-H.left,right:H.right-w},y:{top:y-H.top,bottom:H.bottom-y}},U=Math.min(z.x.left,z.x.right),Z=Math.min(z.y.top,z.y.bottom),ne={row:D.row,column:D.column};U/W<=2&&(ne.column+=z.x.left=i&&a.renderer.scrollCursorIntoView(ne):A=j:A=null}function L(){var D=S;S=a.renderer.screenToTextCoordinates(w,y),C(S,D),x(S,D)}function q(){b=a.selection.toOrientedRange(),v=a.session.addMarker(b,"ace_selection",a.getSelectionStyle()),a.clearSelection(),a.isFocused()&&a.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),L(),_=setInterval(L,20),M=0,s.addListener(document,"mousemove",I)}function N(){clearInterval(_),a.session.removeMarker(v),v=null,a.selection.fromOrientedRange(b),a.isFocused()&&!k&&a.$resetCursorStyle(),b=null,S=null,M=0,A=null,T=null,s.removeListener(document,"mousemove",I)}var F=null;function I(){F==null&&(F=setTimeout(function(){F!=null&&v&&N()},20))}function R(D){var P=D.types;return!P||Array.prototype.some.call(P,function(j){return j=="text/plain"||j=="Text"})}function B(D){var P=["copy","copymove","all","uninitialized"],j=["move","copymove","linkmove","all","uninitialized"],V=d.isMac?D.altKey:D.ctrlKey,W="uninitialized";try{W=D.dataTransfer.effectAllowed.toLowerCase()}catch{}var H="none";return V&&P.indexOf(W)>=0?H="copy":j.indexOf(W)>=0?H="move":P.indexOf(W)>=0&&(H="copy"),H}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,a=l.container;a.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var u=d.isWin?"default":"move";l.renderer.setCursorStyle(u),this.setState("dragReady")},this.onMouseDrag=function(l){var a=this.editor.container;if(d.isIE&&this.state=="dragReady"){var u=t(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>3&&a.dragDrop()}if(this.state==="dragWait"){var u=t(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>0&&(a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(!!this.$dragEnabled){this.mousedownEvent=l;var a=this.editor,u=l.inSelection(),h=l.getButton(),$=l.domEvent.detail||1;if($===1&&h===0&&u){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),a.getDragDelay()){if(d.isWebKit){this.cancelDrag=!0;var w=a.container;w.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(o.prototype);function t(l,a,u,h){return Math.sqrt(Math.pow(u-l,2)+Math.pow(h-a,2))}p.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,p,g){var m=e("./mouse_event").MouseEvent,s=e("../lib/event"),d=e("../lib/dom");p.addTouchListeners=function(i,f){var r="scroll",o,t,l,a,u,h,$=0,v,w=0,y=0,_=0,b,S;function M(){var C=window.navigator&&window.navigator.clipboard,x=!1,L=function(){var F=f.getCopyText(),I=f.session.getUndoManager().hasUndo();S.replaceChild(d.buildDom(x?["span",!F&&q("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],F&&q("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],F&&q("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&q("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&q("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],q("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],q("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),S.firstChild)},q=function(F){return f.commands.canExecute(F,f)},N=function(F){var I=F.target.getAttribute("action");if(I=="more"||!x)return x=!x,L();I=="paste"?C.readText().then(function(R){f.execCommand(I,R)}):I&&((I=="cut"||I=="copy")&&(C?C.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(I)),S.firstChild.style.display="none",x=!1,I!="openCommandPalette"&&f.focus()};S=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(F){r="menu",F.stopPropagation(),F.preventDefault(),f.textInput.focus()},ontouchend:function(F){F.stopPropagation(),F.preventDefault(),N(F)},onclick:N},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container)}function O(){if(!f.getOption("enableMobileMenu")){S&&k();return}S||M();var C=f.selection.cursor,x=f.renderer.textToScreenCoordinates(C.row,C.column),L=f.renderer.textToScreenCoordinates(0,0).pageX,q=f.renderer.scrollLeft,N=f.container.getBoundingClientRect();S.style.top=x.pageY-N.top-3+"px",x.pageX-N.left=2?f.selection.getLineRange(v.row):f.session.getBracketRange(v);C&&!C.isEmpty()?f.selection.setRange(C):f.selection.selectWord(),r="wait"}s.addListener(i,"contextmenu",function(C){if(!!b){var x=f.textInput.getElement();x.focus()}},f),s.addListener(i,"touchstart",function(C){var x=C.touches;if(u||x.length>1){clearTimeout(u),u=null,l=-1,r="zoom";return}b=f.$mouseHandler.isMousePressed=!0;var L=f.renderer.layerConfig.lineHeight,q=f.renderer.layerConfig.lineHeight,N=C.timeStamp;a=N;var F=x[0],I=F.clientX,R=F.clientY;Math.abs(o-I)+Math.abs(t-R)>L&&(l=-1),o=C.clientX=I,t=C.clientY=R,y=_=0;var B=new m(C,f);if(v=B.getDocumentPosition(),N-l<500&&x.length==1&&!$)w++,C.preventDefault(),C.button=0,T();else{w=0;var D=f.selection.cursor,P=f.selection.isEmpty()?D:f.selection.anchor,j=f.renderer.$cursorLayer.getPixelPosition(D,!0),V=f.renderer.$cursorLayer.getPixelPosition(P,!0),W=f.renderer.scroller.getBoundingClientRect(),H=f.renderer.layerConfig.offset,z=f.renderer.scrollLeft,U=function(re,ue){return re=re/q,ue=ue/L-.75,re*re+ue*ue};if(C.clientXne?"cursor":"anchor"),ne<3.5?r="anchor":Z<3.5?r="cursor":r="scroll",u=setTimeout(A,450)}l=N},f),s.addListener(i,"touchend",function(C){b=f.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),r=="zoom"?(r="",$=0):u?(f.selection.moveToPosition(v),$=0,O()):r=="scroll"?(E(),k()):O(),clearTimeout(u),u=null},f),s.addListener(i,"touchmove",function(C){u&&(clearTimeout(u),u=null);var x=C.touches;if(!(x.length>1||r=="zoom")){var L=x[0],q=o-L.clientX,N=t-L.clientY;if(r=="wait")if(q*q+N*N>4)r="cursor";else return C.preventDefault();o=L.clientX,t=L.clientY,C.clientX=L.clientX,C.clientY=L.clientY;var F=C.timeStamp,I=F-a;if(a=F,r=="scroll"){var R=new m(C,f);R.speed=1,R.wheelX=q,R.wheelY=N,10*Math.abs(q)0)if(ne==16){for(fe=ue;fe-1){for(fe=ue;fe=0&&V[X]==b;X--)P[X]=m}}}function I(D,P,j){if(!(s=D){for(H=W+1;H=D;)H++;for(z=W,U=H-1;z=P.length||(H=j[V-1])!=h&&H!=$||(z=P[V+1])!=h&&z!=$?v:(d&&(z=$),z==H?z:v);case M:return H=V>0?j[V-1]:w,H==h&&V+10&&j[V-1]==h)return h;if(d)return v;for(Z=V+1,U=P.length;Z=1425&&ne<=2303||ne==64286;if(H=P[Z],re&&(H==u||H==_))return u}return V<1||(H=P[V-1])==w?v:j[V-1];case w:return d=!1,i=!0,m;case y:return f=!0,v;case A:case T:case C:case x:case E:d=!1;case L:return v}}function B(D){var P=D.charCodeAt(0),j=P>>8;return j==0?P>191?a:q[P]:j==5?/[\u0591-\u05f4]/.test(D)?u:a:j==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(D)?k:/[\u0660-\u0669\u066b-\u066c]/.test(D)?$:P==1642?O:/[\u06f0-\u06f9]/.test(D)?h:_:j==32&&P<=8287?N[P&255]:j==254&&P>=65136?_:v}p.L=a,p.R=u,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(D,P,j){if(D.length<2)return{};var V=D.split(""),W=new Array(V.length),H=new Array(V.length),z=[];m=j?l:t,F(V,z,V.length,P);for(var U=0;U_&&P[U]0&&V[U-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(V[U])&&(z[U-1]=z[U]=p.R_H,U++);V[V.length-1]===p.DOT&&(z[V.length-1]=p.B),V[0]==="\u202B"&&(z[0]=p.RLE);for(var U=0;U=0&&(r=this.session.$docRowCache[t])}return r},f.prototype.getSplitIndex=function(){var r=0,o=this.session.$screenRowCache;if(o.length)for(var t,l=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-r>0&&(t=this.session.$getRowCacheIndex(o,this.currentRow-r-1),t===l);)l=t,r++;else r=this.currentRow;return r},f.prototype.updateRowLine=function(r,o){r===void 0&&(r=this.getDocumentRow());var t=r===this.session.getLength()-1,l=t?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 a=this.session.$wrapData[r];a&&(o===void 0&&(o=this.getSplitIndex()),o>0&&a.length?(this.wrapIndent=a.indent,this.wrapOffset=this.wrapIndent*this.charWidths[m.L],this.line=oo?this.session.getOverwrite()?r:r-1:o,l=m.getVisualFromLogicalIdx(t,this.bidiMap),a=this.bidiMap.bidiLevels,u=0;!this.session.getOverwrite()&&r<=o&&a[l]%2!=0&&l++;for(var h=0;ho&&a[l]%2==0&&(u+=this.charWidths[a[l]]),this.wrapIndent&&(u+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(u+=this.rtlLineOffset),u},f.prototype.getSelections=function(r,o){var t=this.bidiMap,l=t.bidiLevels,a,u=[],h=0,$=Math.min(r,o)-this.wrapIndent,v=Math.max(r,o)-this.wrapIndent,w=!1,y=!1,_=0;this.wrapIndent&&(h+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,S=0;S=$&&bt+u/2;){if(t+=u,l===a.length-1){u=0;break}u=this.charWidths[a[++l]]}return l>0&&a[l-1]%2!=0&&a[l]%2==0?(r0&&a[l-1]%2==0&&a[l]%2!=0?o=1+(r>t?this.bidiMap.logicalFromVisual[l]:this.bidiMap.logicalFromVisual[l-1]):this.isRtlDir&&l===a.length-1&&u===0&&a[l-1]%2==0||!this.isRtlDir&&l===0&&a[l]%2!=0?o=1+this.bidiMap.logicalFromVisual[l]:(l>0&&a[l-1]%2!=0&&u!==0&&l--,o=this.bidiMap.logicalFromVisual[l]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},f}();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,g){var m=e("./lib/oop"),s=e("./lib/lang"),d=e("./lib/event_emitter").EventEmitter,i=e("./range").Range,f=function(){function r(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var 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")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(o,t){this.$isEmpty=!1,this.anchor.setPosition(o,t)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var o=this.anchor,t=this.lead;return o.row>t.row||o.row==t.row&&o.column>t.column},r.prototype.getRange=function(){var o=this.anchor,t=this.lead;return this.$isEmpty?i.fromPoints(t,t):this.isBackwards()?i.fromPoints(t,o):i.fromPoints(o,t)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(o,t){var l=t?o.end:o.start,a=t?o.start:o.end;this.$setSelection(l.row,l.column,a.row,a.column)},r.prototype.$setSelection=function(o,t,l,a){if(!this.$silent){var u=this.$isEmpty,h=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,t),this.cursor.setPosition(l,a),this.$isEmpty=!i.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||u!=this.$isEmpty||h)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(o){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),o.call(this)},r.prototype.selectTo=function(o,t){this.$moveSelection(function(){this.moveCursorTo(o,t)})},r.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},r.prototype.moveTo=function(o,t){this.clearSelection(),this.moveCursorTo(o,t)},r.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(o,t){if(typeof t=="undefined"){var l=o||this.lead;o=l.row,t=l.column}return this.session.getWordRange(o,t)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var o=this.getCursor(),t=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(t)},r.prototype.getLineRange=function(o,t){var l=typeof o=="number"?o:this.lead.row,a,u=this.session.getFoldLine(l);return u?(l=u.start.row,a=u.end.row):a=l,t===!0?new i(l,0,a,this.session.getLine(a).length):new i(l,0,a+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(o,t,l){var a=o.column,u=o.column+t;return l<0&&(a=o.column-t,u=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(a,u).split(" ").length-1==t},r.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),t;if(t=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),t;if(t=this.session.getFoldAt(o.row,o.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=a)}}this.moveCursorTo(t.row,t.column)},r.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,t=this.doc.getLine(o).length;this.moveCursorTo(o,t)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,t=this.lead.column,l=this.doc.getLine(o),a=l.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var u=this.session.getFoldAt(o,t,1);if(u){this.moveCursorTo(u.end.row,u.end.column);return}if(this.session.nonTokenRe.exec(a)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,a=l.substring(t)),t>=l.length){this.moveCursorTo(o,l.length),this.moveCursorRight(),o0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(u)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,t)},r.prototype.$shortWordEndIndex=function(o){var t=0,l,a=/\s/,u=this.session.tokenRe;if(u.lastIndex=0,this.session.tokenRe.exec(o))t=this.session.tokenRe.lastIndex;else{for(;(l=o[t])&&a.test(l);)t++;if(t<1){for(u.lastIndex=0;(l=o[t])&&!u.test(l);)if(u.lastIndex=0,t++,a.test(l))if(t>2){t--;break}else{for(;(l=o[t])&&a.test(l);)t++;if(t>2)break}}}return u.lastIndex=0,t},r.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,t=this.lead.column,l=this.doc.getLine(o),a=l.substring(t),u=this.session.getFoldAt(o,t,1);if(u)return this.moveCursorTo(u.end.row,u.end.column);if(t==l.length){var h=this.doc.getLength();do o++,a=this.doc.getLine(o);while(o0&&/^\s*$/.test(a));t=a.length,/\s+$/.test(a)||(a="")}var u=s.stringReverse(a),h=this.$shortWordEndIndex(u);return this.moveCursorTo(o,t-h)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(o,t){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),a;if(t===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(a=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(a/this.session.$bidiHandler.charWidths[0])):a=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var u=this.session.lineWidgets[this.lead.row];o<0?o-=u.rowsAbove||0:o>0&&(o+=u.rowCount-(u.rowsAbove||0))}var h=this.session.screenToDocumentPosition(l.row+o,l.column,a);o!==0&&t===0&&h.row===this.lead.row&&h.column===this.lead.column,this.moveCursorTo(h.row,h.column+t,t===0)},r.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},r.prototype.moveCursorTo=function(o,t,l){var a=this.session.getFoldAt(o,t,1);a&&(o=a.start.row,t=a.start.column),this.$keepDesiredColumnOnChange=!0;var u=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(u.charAt(t))&&u.charAt(t-1)&&(this.lead.row==o&&this.lead.column==t+1?t=t-1:t=t+1),this.lead.setPosition(o,t),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(o,t,l){var a=this.session.screenToDocumentPosition(o,t);this.moveCursorTo(a.row,a.column,l)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(o){var t=this.getRange();return o?(o.start.column=t.start.column,o.start.row=t.start.row,o.end.column=t.end.column,o.end.row=t.end.row):o=t,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},r.prototype.getRangeOfMovements=function(o){var t=this.getCursor();try{o(this);var l=this.getCursor();return i.fromPoints(t,l)}catch{return i.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},r.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(t){var l=t.clone();return l.isBackwards=t.cursor==t.start,l});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},r.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var t=o.length;t--;){var l=i.fromPoints(o[t].start,o[t].end);o[t].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},r.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(o[t]))return!1;return!0},r}();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,m.implement(f.prototype,d),p.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,p,g){var m=e("./lib/report_error").reportError,s=2e3,d=function(){function i(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var r in this.states){for(var o=this.states[r],t=[],l=0,a=this.matchMappings[r]={defaultToken:"text"},u="g",h=[],$=0;$1?v.onMatch=this.$applyToken:v.onMatch=v.token),y>1&&(/\\\d/.test(v.regex)?w=v.regex.replace(/\\([0-9]+)/g,function(_,b){return"\\"+(parseInt(b,10)+l+1)}):(y=1,w=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&h.push(v)),a[l]=$,l+=y,t.push(w),v.onMatch||(v.onMatch=null)}}t.length||(a[0]=0,t.push("$")),h.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,u)},this),this.regExps[r]=new RegExp("("+t.join(")|(")+")|($)",u)}}return i.prototype.$setMaxTokenCount=function(f){s=f|0},i.prototype.$applyToken=function(f){var r=this.splitRegex.exec(f).slice(1),o=this.token.apply(this,r);if(typeof o=="string")return[{type:o,value:f}];for(var t=[],l=0,a=o.length;lv){var O=f.substring(v,M-S.length);y.type==_?y.value+=O:(y.type&&$.push(y),y={type:_,value:O})}for(var k=0;ks){for(w>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:f});v1&&o[0]!==t&&o.unshift("#tmp",t),{tokens:$,state:o.length?o:t}},i}();d.prototype.reportError=m,p.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,p,g){var m=e("../lib/deep_copy").deepCopy,s;s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(f,r){if(!r){for(var o in f)this.$rules[o]=f[o];return}for(var o in f){for(var t=f[o],l=0;l=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]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var i=this.$rowTokens,f=this.$tokenIndex,r=i[f].start;if(r!==void 0)return r;for(r=0;f>0;)f-=1,r+=i[f].value.length;return r},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var i=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new m(this.$row,f,this.$row,f+i.value.length)},d}();p.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,p,g){var m=e("../../lib/oop"),s=e("../behaviour").Behaviour,d=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,t={},l={'"':'"',"'":"'"},a=function($){var v=-1;if($.multiSelect&&(v=$.selection.index,t.rangeCount!=$.multiSelect.rangeCount&&(t={rangeCount:$.multiSelect.rangeCount})),t[v])return o=t[v];o=t[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function($,v,w,y){var _=$.end.row-$.start.row;return{text:w+v+y,selection:[0,$.start.column+1,_,$.end.column+(_?0:1)]}},h;h=function($){$=$||{},this.add("braces","insertion",function(v,w,y,_,b){var S=y.getCursorPosition(),M=_.doc.getLine(S.row);if(b=="{"){a(y);var O=y.getSelectionRange(),k=_.doc.getTextRange(O),A=_.getTokenAt(S.row,S.column);if(k!==""&&k!=="{"&&y.getWrapBehavioursEnabled())return u(O,k,"{","}");if(A&&/(?:string)\.quasi|\.xml/.test(A.type)){var T=[/tag\-(?:open|name)/,/attribute\-name/];return T.some(function(F){return F.test(A.type)})||/(string)\.quasi/.test(A.type)&&A.value[S.column-A.start-1]!=="$"?void 0:(h.recordAutoInsert(y,_,"}"),{text:"{}",selection:[1,1]})}else if(h.isSaneInsertion(y,_))return/[\]\}\)]/.test(M[S.column])||y.inMultiSelectMode||$.braces?(h.recordAutoInsert(y,_,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(y,_,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){a(y);var E=M.substring(S.column,S.column+1);if(E=="}"){var C=_.$findOpeningBracket("}",{column:S.column+1,row:S.row});if(C!==null&&h.isAutoInsertedClosing(S,M,b))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==` `||b==`\r `){a(y);var x="";h.isMaybeInsertedClosing(S,M)&&(x=i.stringRepeat("}",o.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var E=M.substring(S.column,S.column+1);if(E==="}"){var L=_.findMatchingBracket({row:S.row,column:S.column+1},"}");if(!L)return null;var q=this.$getIndent(_.getLine(L.row))}else if(x)var q=this.$getIndent(M);else{h.clearMaybeInsertedClosing();return}var N=q+_.getTabString();return{text:` `+N+` `+q+x,selection:[1,N.length,1,N.length]}}else h.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,w,y,_,b){var S=_.doc.getTextRange(b);if(!b.isMultiLine()&&S=="{"){a(y);var M=_.doc.getLine(b.start.row),O=M.substring(b.end.column,b.end.column+1);if(O=="}")return b.end.column++,b;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,w,y,_,b){if(b=="("){a(y);var S=y.getSelectionRange(),M=_.doc.getTextRange(S);if(M!==""&&y.getWrapBehavioursEnabled())return u(S,M,"(",")");if(h.isSaneInsertion(y,_))return h.recordAutoInsert(y,_,")"),{text:"()",selection:[1,1]}}else if(b==")"){a(y);var O=y.getCursorPosition(),k=_.doc.getLine(O.row),A=k.substring(O.column,O.column+1);if(A==")"){var T=_.$findOpeningBracket(")",{column:O.column+1,row:O.row});if(T!==null&&h.isAutoInsertedClosing(O,k,b))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,w,y,_,b){var S=_.doc.getTextRange(b);if(!b.isMultiLine()&&S=="("){a(y);var M=_.doc.getLine(b.start.row),O=M.substring(b.start.column+1,b.start.column+2);if(O==")")return b.end.column++,b}}),this.add("brackets","insertion",function(v,w,y,_,b){if(b=="["){a(y);var S=y.getSelectionRange(),M=_.doc.getTextRange(S);if(M!==""&&y.getWrapBehavioursEnabled())return u(S,M,"[","]");if(h.isSaneInsertion(y,_))return h.recordAutoInsert(y,_,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){a(y);var O=y.getCursorPosition(),k=_.doc.getLine(O.row),A=k.substring(O.column,O.column+1);if(A=="]"){var T=_.$findOpeningBracket("]",{column:O.column+1,row:O.row});if(T!==null&&h.isAutoInsertedClosing(O,k,b))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,w,y,_,b){var S=_.doc.getTextRange(b);if(!b.isMultiLine()&&S=="["){a(y);var M=_.doc.getLine(b.start.row),O=M.substring(b.start.column+1,b.start.column+2);if(O=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(v,w,y,_,b){var S=_.$mode.$quotes||l;if(b.length==1&&S[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;a(y);var M=b,O=y.getSelectionRange(),k=_.doc.getTextRange(O);if(k!==""&&(k.length!=1||!S[k])&&y.getWrapBehavioursEnabled())return u(O,k,M,M);if(!k){var A=y.getCursorPosition(),T=_.doc.getLine(A.row),E=T.substring(A.column-1,A.column),C=T.substring(A.column,A.column+1),x=_.getTokenAt(A.row,A.column),L=_.getTokenAt(A.row,A.column+1);if(E=="\\"&&x&&/escape/.test(x.type))return null;var q=x&&/string|escape/.test(x.type),N=!L||/string|escape/.test(L.type),F;if(C==M)F=q!==N,F&&/string\.end/.test(L.type)&&(F=!1);else{if(q&&!N||q&&N)return null;var I=_.$mode.tokenRe;I.lastIndex=0;var R=I.test(E);I.lastIndex=0;var B=I.test(C),D=_.$mode.$pairQuotesAfter,P=D&&D[M]&&D[M].test(E);if(!P&&R||B||C&&!/[\s;,.})\]\\]/.test(C))return null;var j=T[A.column-2];if(E==M&&(j==M||I.test(j)))return null;F=!0}return{text:F?M+M:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,w,y,_,b){var S=_.$mode.$quotes||l,M=_.doc.getTextRange(b);if(!b.isMultiLine()&&S.hasOwnProperty(M)){a(y);var O=_.doc.getLine(b.start.row),k=O.substring(b.start.column+1,b.start.column+2);if(k==M)return b.end.column++,b}}),$.closeDocComment!==!1&&this.add("doc comment end","insertion",function(v,w,y,_,b){if(v==="doc-start"&&(b===` `||b===`\r `)&&y.selection.isEmpty()){var S=y.getCursorPosition();if(S.column===0)return;for(var M=_.doc.getLine(S.row),O=_.doc.getLine(S.row+1),k=_.getTokens(S.row),A=0,T=0;T=S.column){if(A===S.column){if(!/\.doc/.test(E.type))return;if(/\*\//.test(E.value)){var C=k[T+1];if(!C||!/\.doc/.test(C.type))return}}var x=S.column-(A-E.value.length),L=E.value.indexOf("*/"),q=E.value.indexOf("/**",L>-1?L+2:0);if(q!==-1&&x>q&&x=L&&x<=q||!/\.doc/.test(E.type))return;break}}var N=this.$getIndent(M);if(/\s*\*/.test(O))return/^\s*\*/.test(M)?{text:b+N+"* ",selection:[1,2+N.length,1,2+N.length]}:{text:b+N+" * ",selection:[1,3+N.length,1,3+N.length]};if(/\/\*\*/.test(M.substring(0,S.column)))return{text:b+N+" * "+b+" "+N+"*/",selection:[1,4+N.length,1,4+N.length]}}})},h.isSaneInsertion=function($,v){var w=$.getCursorPosition(),y=new d(v,w.row,w.column);if(!this.$matchTokenType(y.getCurrentToken()||"text",f)){if(/[)}\]]/.test($.session.getLine(w.row)[w.column]))return!0;var _=new d(v,w.row,w.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",f))return!1}return y.stepForward(),y.getCurrentTokenRow()!==w.row||this.$matchTokenType(y.getCurrentToken()||"text",r)},h.$matchTokenType=function($,v){return v.indexOf($.type||$)>-1},h.recordAutoInsert=function($,v,w){var y=$.getCursorPosition(),_=v.doc.getLine(y.row);this.isAutoInsertedClosing(y,_,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=y.row,o.autoInsertedLineEnd=w+_.substr(y.column),o.autoInsertedBrackets++},h.recordMaybeInsert=function($,v,w){var y=$.getCursorPosition(),_=v.doc.getLine(y.row);this.isMaybeInsertedClosing(y,_)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=y.row,o.maybeInsertedLineStart=_.substr(0,y.column)+w,o.maybeInsertedLineEnd=_.substr(y.column),o.maybeInsertedBrackets++},h.isAutoInsertedClosing=function($,v,w){return o.autoInsertedBrackets>0&&$.row===o.autoInsertedRow&&w===o.autoInsertedLineEnd[0]&&v.substr($.column)===o.autoInsertedLineEnd},h.isMaybeInsertedClosing=function($,v){return o.maybeInsertedBrackets>0&&$.row===o.maybeInsertedRow&&v.substr($.column)===o.maybeInsertedLineEnd&&v.substr(0,$.column)==o.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},m.inherits(h,s),p.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(e,p,g){for(var m=[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],s=0,d=[],i=0;i2?j%b!=b-1:j%b==0}}else{if(!this.blockComment)return!1;var M=this.blockComment.start,O=this.blockComment.end,k=new RegExp("^(\\s*)(?:"+r.escapeRegExp(M)+")"),A=new RegExp("(?:"+r.escapeRegExp(O)+")\\s*$"),T=function(F,I){C(F,I)||(!w||/\S/.test(F))&&(v.insertInLine({row:I,column:F.length},O),v.insertInLine({row:I,column:_},M))},E=function(F,I){var R;(R=F.match(A))&&v.removeInLine(I,F.length-R[0].length,F.length),(R=F.match(k))&&v.removeInLine(I,R[1].length,R[0].length)},C=function(F,I){if(k.test(F))return!0;for(var R=u.getTokens(I),B=0;BF.length&&(N=F.length)}),_==1/0&&(_=N,w=!1,y=!1),S&&_%b!=0&&(_=Math.floor(_/b)*b),q(y?E:T)},this.toggleBlockComment=function(a,u,h,$){var v=this.blockComment;if(!!v){!v.start&&v[0]&&(v=v[0]);var w=new o(u,$.row,$.column),y=w.getCurrentToken();u.selection;var _=u.selection.toOrientedRange(),b,S;if(y&&/comment/.test(y.type)){for(var M,O;y&&/comment/.test(y.type);){var k=y.value.indexOf(v.start);if(k!=-1){var A=w.getCurrentTokenRow(),T=w.getCurrentTokenColumn()+k;M=new t(A,T,A,T+v.start.length);break}y=w.stepBackward()}for(var w=new o(u,$.row,$.column),y=w.getCurrentToken();y&&/comment/.test(y.type);){var k=y.value.indexOf(v.end);if(k!=-1){var A=w.getCurrentTokenRow(),T=w.getCurrentTokenColumn()+k;O=new t(A,T,A,T+v.end.length);break}y=w.stepForward()}O&&u.remove(O),M&&(u.remove(M),b=M.start.row,S=-v.start.length)}else S=v.start.length,b=h.start.row,u.insert(h.end,v.end),u.insert(h.start,v.start);_.start.row==b&&(_.start.column+=S),_.end.row==b&&(_.end.column+=S),u.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(a,u,h){return this.$getIndent(u)},this.checkOutdent=function(a,u,h){return!1},this.autoOutdent=function(a,u,h){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(a){return null},this.createModeDelegates=function(a){this.$embeds=[],this.$modes={};for(var u in a)if(a[u]){var h=a[u],$=h.prototype.$id,v=m.$modes[$];v||(m.$modes[$]=v=new h),m.$modes[u]||(m.$modes[u]=v),this.$embeds.push(u),this.$modes[u]=v}for(var w=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],y=function(b){(function(S){var M=w[b],O=S[M];S[w[b]]=function(){return this.$delegator(M,arguments,O)}})(_)},_=this,u=0;uf[r].column&&r++,l.unshift(r,0),f.splice.apply(f,l),this.$updateRows()}}},d.prototype.$updateRows=function(){var i=this.session.lineWidgets;if(!!i){var f=!0;i.forEach(function(r,o){if(r)for(f=!1,r.row=o;r.$oldWidget;)r.$oldWidget.row=o,r=r.$oldWidget}),f&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(i){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[i.row];return f&&(i.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._inDocument=!1)),this.session.lineWidgets[i.row]=i,i},d.prototype.addLineWidget=function(i){if(this.$registerLineWidget(i),i.session=this.session,!this.editor)return i;var f=this.editor.renderer;i.html&&!i.el&&(i.el=m.createElement("div"),i.el.innerHTML=i.html),i.text&&!i.el&&(i.el=m.createElement("div"),i.el.textContent=i.text),i.el&&(m.addCssClass(i.el,"ace_lineWidgetContainer"),i.className&&m.addCssClass(i.el,i.className),i.el.style.position="absolute",i.el.style.zIndex="5",f.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/f.layerConfig.lineHeight);var r=this.session.getFoldAt(i.row,0);if(i.$fold=r,r){var o=this.session.lineWidgets;i.row==r.end.row&&!o[r.start.row]?o[r.start.row]=i:i.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:i.row}}}),this.$updateRows(),this.renderWidgets(null,f),this.onWidgetChanged(i),i},d.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 f=this.session.lineWidgets[i.row];if(f==i)this.session.lineWidgets[i.row]=i.$oldWidget,i.$oldWidget&&this.onWidgetChanged(i.$oldWidget);else for(;f;){if(f.$oldWidget==i){f.$oldWidget=i.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:i.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(i){for(var f=this.session.lineWidgets,r=f&&f[i],o=[];r;)o.push(r),r=r.$oldWidget;return o},d.prototype.onWidgetChanged=function(i){this.session._changedWidgets.push(i),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(i,f){var r=this.session._changedWidgets,o=f.layerConfig;if(!(!r||!r.length)){for(var t=1/0,l=0;l0&&!o[t];)t--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,f.$cursorLayer.config=r;for(var a=t;a<=l;a++){var u=o[a];if(!(!u||!u.el)){if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,f.container.appendChild(u.el));var h=f.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;u.coverLine||(h+=r.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=h-r.offset+"px";var $=u.coverGutter?0:f.gutterWidth;u.fixedWidth||($-=f.scrollLeft),u.el.style.left=$+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=r.width+2*r.padding+"px"),u.fixedWidth?u.el.style.right=f.scrollBar.getWidth()+"px":u.el.style.right=""}}}},d}();p.LineWidgets=s}),ace.define("ace/apply_delta",["require","exports","module"],function(e,p,g){p.applyDelta=function(m,s,d){var i=s.start.row,f=s.start.column,r=m[i]||"";switch(s.action){case"insert":var o=s.lines;if(o.length===1)m[i]=r.substring(0,f)+s.lines[0]+r.substring(f);else{var t=[i,1].concat(s.lines);m.splice.apply(m,t),m[i]=r.substring(0,f)+m[i],m[i+s.lines.length-1]+=r.substring(f)}break;case"remove":var l=s.end.column,a=s.end.row;i===a?m[i]=r.substring(0,f)+r.substring(l):m.splice(i,a-i+1,r.substring(0,f)+m[a].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,p,g){var m=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,d=function(){function r(o,t,l){this.$onChange=this.onChange.bind(this),this.attach(o),typeof t!="number"?this.setPosition(t.row,t.column):this.setPosition(t,l)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var t=f(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},r.prototype.setPosition=function(o,t,l){var a;if(l?a={row:o,column:t}:a=this.$clipPositionToDocument(o,t),!(this.row==a.row&&this.column==a.column)){var u={row:this.row,column:this.column};this.row=a.row,this.column=a.column,this._signal("change",{old:u,value:a})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(o,t){var l={};return o>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):o<0?(l.row=0,l.column=0):(l.row=o,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,t))),t<0&&(l.column=0),l},r}();d.prototype.$insertRight=!1,m.implement(d.prototype,s);function i(r,o,t){var l=t?r.column<=o.column:r.column=a&&(t=a-1,l=void 0);var u=this.getLine(t);return l==null&&(l=u.length),l=Math.min(Math.max(l,0),u.length),{row:t,column:l}},o.prototype.clonePos=function(t){return{row:t.row,column:t.column}},o.prototype.pos=function(t,l){return{row:t,column:l}},o.prototype.$clipPosition=function(t){var l=this.getLength();return t.row>=l?(t.row=Math.max(0,l-1),t.column=this.getLine(l-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},o.prototype.insertFullLines=function(t,l){t=Math.min(Math.max(t,0),this.getLength());var a=0;t0,u=l=0&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(t,l){if(t instanceof i||(t=i.fromPoints(t.start,t.end)),l.length===0&&t.isEmpty())return t.start;if(l==this.getTextRange(t))return t.end;this.remove(t);var a;return l?a=this.insert(t.start,l):a=t.start,a},o.prototype.applyDeltas=function(t){for(var l=0;l=0;l--)this.revertDelta(t[l])},o.prototype.applyDelta=function(t,l){var a=t.action=="insert";(a?t.lines.length<=1&&!t.lines[0]:!i.comparePoints(t.start,t.end))||(a&&t.lines.length>2e4?this.$splitAndapplyLargeDelta(t,2e4):(s(this.$lines,t,l),this._signal("change",t)))},o.prototype.$safeApplyDelta=function(t){var l=this.$lines.length;(t.action=="remove"&&t.start.row20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=l,a==-1&&(a=l),h<=a&&o.fireUpdateEvent(h,a)}}}return i.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},i.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},i.prototype.fireUpdateEvent=function(f,r){var o={first:f,last:r};this._signal("update",{data:o})},i.prototype.start=function(f){this.currentLine=Math.min(f||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(f){var r=f.start.row,o=f.end.row-r;if(o===0)this.lines[r]=null;else if(f.action=="remove")this.lines.splice(r,o+1,null),this.states.splice(r,o+1,null);else{var t=Array(o+1);t.unshift(r,1),this.lines.splice.apply(this.lines,t),this.states.splice.apply(this.states,t)}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(f){return this.lines[f]||this.$tokenizeRow(f)},i.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},i.prototype.$tokenizeRow=function(f){var r=this.doc.getLine(f),o=this.states[f-1],t=this.tokenizer.getLineTokens(r,o,f);return this.states[f]+""!=t.state+""?(this.states[f]=t.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=t.tokens},i.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},i}();m.implement(d.prototype,s),p.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,p,g){var m=e("./lib/lang"),s=e("./range").Range,d=function(){function i(f,r,o){o===void 0&&(o="text"),this.setRegexp(f),this.clazz=r,this.type=o,this.docLen=0}return i.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},i.prototype.update=function(f,r,o,t){if(!!this.regExp){for(var l=t.firstRow,a=t.lastRow,u={},h=o.$editor&&o.$editor.$search,$=h&&h.$isMultilineSearch(o.$editor.getLastSearchOptions()),v=l;v<=a;v++){var w=this.cache[v];if(w==null||o.getValue().length!=this.docLen){if($){w=[];var y=h.$multiLineForward(o,this.regExp,v,a);if(y){var _=y.endRow<=a?y.endRow-1:a;_>v&&(v=_),w.push(new s(y.startRow,y.startCol,y.endRow,y.endCol))}w.length>this.MAX_RANGES&&(w=w.slice(0,this.MAX_RANGES))}else w=m.getMatchOffsets(o.getLine(v),this.regExp),w.length>this.MAX_RANGES&&(w=w.slice(0,this.MAX_RANGES)),w=w.map(function(O){return new s(v,O.offset,v,O.offset+O.length)});this.cache[v]=w.length?w:""}if(w.length!==0)for(var b=w.length;b--;){var S=w[b].toScreenRange(o),M=S.toString();u[M]||(u[M]=!0,r.drawSingleLineMarker(f,S,this.clazz,t))}}this.docLen=o.getValue().length}},i}();d.prototype.MAX_RANGES=500,p.SearchHighlight=d}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,p,g){var m=function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(b){this.$session=b},_.prototype.add=function(b,S,M){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),S===!1||!this.lastDeltas){this.lastDeltas=[];var O=this.$undoStack.length;O>this.$undoDepth-1&&this.$undoStack.splice(0,O-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},_.prototype.addSelection=function(b,S){this.selections.push({value:b,rev:S||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(b,S){S==null&&(S=this.$rev+1);for(var M=this.$undoStack,O=M.length;O--;){var k=M[O][0];if(k.id<=b)break;k.id0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(b){this.reset(),this.$undoStack=b.$undoStack,this.$redoStack=b.$redoStack},_.prototype.$prettyPrint=function(b){return b?o(b):o(this.$undoStack)+` --- `+o(this.$redoStack)},_}();m.prototype.hasUndo=m.prototype.canUndo,m.prototype.hasRedo=m.prototype.canRedo,m.prototype.isClean=m.prototype.isAtBookmark,m.prototype.markClean=m.prototype.bookmark;function s(_,b){for(var S=b;S--;){var M=_[S];if(M&&!M[0].ignore){for(;S"+_.end.row+":"+_.end.column}function l(_,b){var S=_.action=="insert",M=b.action=="insert";if(S&&M)if(i(b.start,_.end)>=0)h(b,_,-1);else if(i(b.start,_.start)<=0)h(_,b,1);else return null;else if(S&&!M)if(i(b.start,_.end)>=0)h(b,_,-1);else if(i(b.end,_.start)<=0)h(_,b,-1);else return null;else if(!S&&M)if(i(b.start,_.start)>=0)h(b,_,1);else if(i(b.start,_.start)<=0)h(_,b,1);else return null;else if(!S&&!M)if(i(b.start,_.start)>=0)h(b,_,1);else if(i(b.end,_.start)<=0)h(_,b,-1);else return null;return[b,_]}function a(_,b){for(var S=_.length;S--;)for(var M=0;M=0?h(_,b,-1):(i(_.start,b.start)<=0||h(_,d.fromPoints(b.start,_.start),-1),h(b,_,1));else if(!S&&M)i(b.start,_.end)>=0?h(b,_,-1):(i(b.start,_.start)<=0||h(b,d.fromPoints(_.start,b.start),-1),h(_,b,1));else if(!S&&!M)if(i(b.start,_.end)>=0)h(b,_,-1);else if(i(b.end,_.start)<=0)h(_,b,-1);else{var O,k;return i(_.start,b.start)<0&&(O=_,_=v(_,b.start)),i(_.end,b.end)>0&&(k=v(_,b.end)),$(b.end,_.start,_.end,-1),k&&!O&&(_.lines=k.lines,_.start=k.start,_.end=k.end,k=_),[b,O,k].filter(Boolean)}return[b,_]}function h(_,b,S){$(_.start,b.start,b.end,S),$(_.end,b.start,b.end,S)}function $(_,b,S,M){_.row==(M==1?b:S).row&&(_.column+=M*(S.column-b.column)),_.row+=M*(S.row-b.row)}function v(_,b){var S=_.lines,M=_.end;_.end=f(b);var O=_.end.row-_.start.row,k=S.splice(O,S.length),A=O?b.column:b.column-_.start.column;S.push(k[0].substring(0,A)),k[0]=k[0].substr(A);var T={start:f(b),end:M,lines:k,action:_.action};return T}function w(_,b){b=r(b);for(var S=_.length;S--;){for(var M=_[S],O=0;Othis.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(f,r){return-f.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},d.prototype.containsRow=function(i){return i>=this.start.row&&i<=this.end.row},d.prototype.walk=function(i,f,r){var o=0,t=this.folds,l,a,u,h=!0;f==null&&(f=this.end.row,r=this.end.column);for(var $=0;$0)){var h=s(f,a.start);return u===0?r&&h!==0?-l-2:l:h>0||h===0&&!r?l:-l-1}}return-l-1},i.prototype.add=function(f){var r=!f.isEmpty(),o=this.pointIndex(f.start,r);o<0&&(o=-o-1);var t=this.pointIndex(f.end,r,o);return t<0?t=-t-1:t++,this.ranges.splice(o,t-o,f)},i.prototype.addList=function(f){for(var r=[],o=f.length;o--;)r.push.apply(r,this.add(f[o]));return r},i.prototype.substractPoint=function(f){var r=this.pointIndex(f);if(r>=0)return this.ranges.splice(r,1)},i.prototype.merge=function(){var f=[],r=this.ranges;r=r.sort(function(u,h){return s(u.start,h.start)});for(var o=r[0],t,l=1;l=0},i.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},i.prototype.rangeAtPoint=function(f){var r=this.pointIndex(f);if(r>=0)return this.ranges[r]},i.prototype.clipRows=function(f,r){var o=this.ranges;if(o[0].start.row>r||o[o.length-1].start.row=t)break}if(f.action=="insert")for(var v=l-t,w=-r.column+o.column;ut)break;if($.start.row==t&&$.start.column>=r.column&&($.start.column==r.column&&this.$bias<=0||($.start.column+=w,$.start.row+=v)),$.end.row==t&&$.end.column>=r.column){if($.end.column==r.column&&this.$bias<0)continue;$.end.column==r.column&&w>0&&u$.start.column&&$.end.column==a[u+1].start.column&&($.end.column-=w),$.end.column+=w,$.end.row+=v}}else for(var v=t-l,w=r.column-o.column;ul)break;$.end.rowr.column)&&($.end.column=r.column,$.end.row=r.row):($.end.column+=w,$.end.row+=v):$.end.row>l&&($.end.row+=v),$.start.rowr.column)&&($.start.column=r.column,$.start.row=r.row):($.start.column+=w,$.start.row+=v):$.start.row>l&&($.start.row+=v)}if(v!=0&&u=o)return u;if(u.end.row>o)return null}return null},this.getNextFoldLine=function(o,t){var l=this.$foldData,a=0;for(t&&(a=l.indexOf(t)),a==-1&&(a=0),a;a=o)return u}return null},this.getFoldedRowCount=function(o,t){for(var l=this.$foldData,a=t-o+1,u=0;u=t){v=o?a-=t-v:a=0);break}else $>=o&&(v>=o?a-=$-v:a-=$-o+1)}return a},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(t,l){return t.start.row-l.start.row}),o},this.addFold=function(o,t){var l=this.$foldData,a=!1,u;o instanceof d?u=o:(u=new d(t,o),u.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(u.range);var h=u.start.row,$=u.start.column,v=u.end.row,w=u.end.column,y=this.getFoldAt(h,$,1),_=this.getFoldAt(v,w,-1);if(y&&_==y)return y.addSubFold(u);y&&!y.range.isStart(h,$)&&this.removeFold(y),_&&!_.range.isEnd(v,w)&&this.removeFold(_);var b=this.getFoldsInRange(u.range);b.length>0&&(this.removeFolds(b),u.collapseChildren||b.forEach(function(k){u.addSubFold(k)}));for(var S=0;S0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(t){this.expandFold(t)},this)},this.unfold=function(o,t){var l,a;if(o==null)l=new m(0,0,this.getLength(),0),t==null&&(t=!0);else if(typeof o=="number")l=new m(o,0,o,this.getLine(o).length);else if("row"in o)l=m.fromPoints(o,o);else{if(Array.isArray(o))return a=[],o.forEach(function(h){a=a.concat(this.unfold(h))},this),a;l=o}a=this.getFoldsInRangeList(l);for(var u=a;a.length==1&&m.comparePoints(a[0].start,l.start)<0&&m.comparePoints(a[0].end,l.end)>0;)this.expandFolds(a),a=this.getFoldsInRangeList(l);if(t!=!1?this.removeFolds(a):this.expandFolds(a),u.length)return u},this.isRowFolded=function(o,t){return!!this.getFoldLine(o,t)},this.getRowFoldEnd=function(o,t){var l=this.getFoldLine(o,t);return l?l.end.row:o},this.getRowFoldStart=function(o,t){var l=this.getFoldLine(o,t);return l?l.start.row:o},this.getFoldDisplayLine=function(o,t,l,a,u){a==null&&(a=o.start.row),u==null&&(u=0),t==null&&(t=o.end.row),l==null&&(l=this.getLine(t).length);var h=this.doc,$="";return o.walk(function(v,w,y,_){if(!(wy)break;while(u&&$.test(u.type));u=a.stepBackward()}else u=a.getCurrentToken();return v.end.row=a.getCurrentTokenRow(),v.end.column=a.getCurrentTokenColumn(),v.start.row==v.end.row&&v.start.column>v.end.column?void 0:v}},this.foldAll=function(o,t,l,a){l==null&&(l=1e5);var u=this.foldWidgets;if(!!u){t=t||this.getLength(),o=o||0;for(var h=o;h=o&&(h=$.end.row,$.collapseChildren=l,this.addFold("...",$))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(t){for(var l=o.getTokens(t),a=0;a=0;){var h=l[a];if(h==null&&(h=l[a]=this.getFoldWidget(a)),h=="start"){var $=this.getFoldWidgetRange(a);if(u||(u=$),$&&$.end.row>=o)break}a--}return{range:a!==-1&&$,firstRange:u}},this.onFoldWidgetClick=function(o,t){t instanceof f&&(t=t.domEvent);var l={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},a=this.$toggleFoldWidget(o,l);if(!a){var u=t.target||t.srcElement;u&&/ace_fold-widget/.test(u.className)&&(u.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,t){if(!!this.getFoldWidget){var l=this.getFoldWidget(o),a=this.getLine(o),u=l==="end"?-1:1,h=this.getFoldAt(o,u===-1?0:a.length,u);if(h)return t.children||t.all?this.removeFold(h):this.expandFold(h),h;var $=this.getFoldWidgetRange(o,!0);if($&&!$.isMultiLine()&&(h=this.getFoldAt($.start.row,$.start.column,1),h&&$.isEqual(h.range)))return this.removeFold(h),h;if(t.siblings){var v=this.getParentFoldRangeData(o);if(v.range)var w=v.range.start.row+1,y=v.range.end.row;this.foldAll(w,y,t.all?1e4:0)}else t.children?(y=$?$.end.row:this.getLength(),this.foldAll(o+1,y,t.all?1e4:0)):$&&(t.all&&($.collapseChildren=1e4),this.addFold("...",$));return $}},this.toggleFoldWidget=function(o){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var l=this.$toggleFoldWidget(t,{});if(!l){var a=this.getParentFoldRangeData(t,!0);if(l=a.range||a.firstRange,l){t=l.start.row;var u=this.getFoldAt(t,this.getLine(t).length,1);u?this.removeFold(u):this.addFold("...",l)}}},this.updateFoldWidgets=function(o){var t=o.start.row,l=o.end.row-t;if(l===0)this.foldWidgets[t]=null;else if(o.action=="remove")this.foldWidgets.splice(t,l+1,null);else{var a=Array(l+1);a.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,a)}},this.tokenizerUpdateFoldWidgets=function(o){var t=o.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.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,g){var m=e("../token_iterator").TokenIterator,s=e("../range").Range;function d(){this.findMatchingBracket=function(i,f){if(i.column==0)return null;var r=f||this.getLine(i.row).charAt(i.column-1);if(r=="")return null;var o=r.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],i):this.$findOpeningBracket(o[2],i):null},this.getBracketRange=function(i){var f=this.getLine(i.row),r=!0,o,t=f.charAt(i.column-1),l=t&&t.match(/([\(\[\{])|([\)\]\}])/);if(l||(t=f.charAt(i.column),i={row:i.row,column:i.column+1},l=t&&t.match(/([\(\[\{])|([\)\]\}])/),r=!1),!l)return null;if(l[1]){var a=this.$findClosingBracket(l[1],i);if(!a)return null;o=s.fromPoints(i,a),r||(o.end.column++,o.start.column--),o.cursor=o.end}else{var a=this.$findOpeningBracket(l[2],i);if(!a)return null;o=s.fromPoints(a,i),r||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(i,f){var r=this.getLine(i.row),o=/([\(\[\{])|([\)\]\}])/,t=!f&&r.charAt(i.column-1),l=t&&t.match(o);if(l||(t=(f===void 0||f)&&r.charAt(i.column),i={row:i.row,column:i.column+1},l=t&&t.match(o)),!l)return null;var a=new s(i.row,i.column-1,i.row,i.column),u=l[1]?this.$findClosingBracket(l[1],i):this.$findOpeningBracket(l[2],i);if(!u)return[a];var h=new s(u.row,u.column,u.row,u.column+1);return[a,h]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(i,f,r){var o=this.$brackets[i],t=1,l=new m(this,f.row,f.column),a=l.getCurrentToken();if(a||(a=l.stepForward()),!!a){r||(r=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var u=f.column-l.getCurrentTokenColumn()-2,h=a.value;;){for(;u>=0;){var $=h.charAt(u);if($==o){if(t-=1,t==0)return{row:l.getCurrentTokenRow(),column:u+l.getCurrentTokenColumn()}}else $==i&&(t+=1);u-=1}do a=l.stepBackward();while(a&&!r.test(a.type));if(a==null)break;h=a.value,u=h.length-1}return null}},this.$findClosingBracket=function(i,f,r){var o=this.$brackets[i],t=1,l=new m(this,f.row,f.column),a=l.getCurrentToken();if(a||(a=l.stepForward()),!!a){r||(r=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var u=f.column-l.getCurrentTokenColumn();;){for(var h=a.value,$=h.length;u<$;){var v=h.charAt(u);if(v==o){if(t-=1,t==0)return{row:l.getCurrentTokenRow(),column:u+l.getCurrentTokenColumn()}}else v==i&&(t+=1);u+=1}do a=l.stepForward();while(a&&!r.test(a.type));if(a==null)break;u=0}return null}},this.getMatchingTags=function(i){var f=new m(this,i.row,i.column),r=this.$findTagName(f);if(!!r){var o=f.stepBackward();return o.value==="<"?this.$findClosingTag(f,r):this.$findOpeningTag(f,r)}},this.$findTagName=function(i){var f=i.getCurrentToken(),r=!1,o=!1;if(f&&f.type.indexOf("tag-name")===-1)do o?f=i.stepBackward():f=i.stepForward(),f&&(f.value==="/>"?o=!0:f.type.indexOf("tag-name")!==-1&&(r=!0));while(f&&!r);return f},this.$findClosingTag=function(i,f){var r,o=f.value,t=f.value,l=0,a=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);f=i.stepForward();var u=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+f.value.length),h=!1;do{if(r=f,r.type.indexOf("tag-close")!==-1&&!h){var $=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);h=!0}if(f=i.stepForward(),f){if(f.value===">"&&!h){var $=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);h=!0}if(f.type.indexOf("tag-name")!==-1){if(o=f.value,t===o){if(r.value==="<")l++;else if(r.value==="")var y=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);else return}}}else if(t===o&&f.value==="/>"&&(l--,l<0))var v=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+2),w=v,y=w,$=new s(u.end.row,u.end.column,u.end.row,u.end.column+1)}}while(f&&l>=0);if(a&&$&&v&&y&&u&&w)return{openTag:new s(a.start.row,a.start.column,$.end.row,$.end.column),closeTag:new s(v.start.row,v.start.column,y.end.row,y.end.column),openTagName:u,closeTagName:w}},this.$findOpeningTag=function(i,f){var r=i.getCurrentToken(),o=f.value,t=0,l=i.getCurrentTokenRow(),a=i.getCurrentTokenColumn(),u=a+2,h=new s(l,a,l,u);i.stepForward();var $=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=i.stepForward()),!(!f||f.value!==">")){var v=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);i.stepBackward(),i.stepBackward();do if(f=r,l=i.getCurrentTokenRow(),a=i.getCurrentTokenColumn(),u=a+f.value.length,r=i.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(o===f.value)if(r.value==="<"){if(t++,t>0){var w=new s(l,a,l,u),y=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1);do f=i.stepForward();while(f&&f.value!==">");var _=new s(i.getCurrentTokenRow(),i.getCurrentTokenColumn(),i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1)}}else r.value===""){for(var b=0,S=r;S;){if(S.type.indexOf("tag-name")!==-1&&S.value===o){t--;break}else if(S.value==="<")break;S=i.stepBackward(),b++}for(var M=0;Mx&&(this.$docRowCache.splice(x,C),this.$screenRowCache.splice(x,C))},T.prototype.$getRowCacheIndex=function(E,C){for(var x=0,L=E.length-1;x<=L;){var q=x+L>>1,N=E[q];if(C>N)x=q+1;else if(C=C));N++);return L=x[N],L?(L.index=N,L.start=q-L.value.length,L):null},T.prototype.setUndoManager=function(E){if(this.$undoManager=E,this.$informUndoManager&&this.$informUndoManager.cancel(),E){var C=this;E.addSession(this),this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},T.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},T.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},T.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},T.prototype.setUseSoftTabs=function(E){this.setOption("useSoftTabs",E)},T.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},T.prototype.setTabSize=function(E){this.setOption("tabSize",E)},T.prototype.getTabSize=function(){return this.$tabSize},T.prototype.isTabStop=function(E){return this.$useSoftTabs&&E.column%this.$tabSize==0},T.prototype.setNavigateWithinSoftTabs=function(E){this.setOption("navigateWithinSoftTabs",E)},T.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},T.prototype.setOverwrite=function(E){this.setOption("overwrite",E)},T.prototype.getOverwrite=function(){return this.$overwrite},T.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},T.prototype.addGutterDecoration=function(E,C){this.$decorations[E]||(this.$decorations[E]=""),this.$decorations[E]+=" "+C,this._signal("changeBreakpoint",{})},T.prototype.removeGutterCustomWidget=function(E){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(E)},T.prototype.addGutterCustomWidget=function(E,C){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(E,C)},T.prototype.removeGutterDecoration=function(E,C){this.$decorations[E]=(this.$decorations[E]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},T.prototype.getBreakpoints=function(){return this.$breakpoints},T.prototype.setBreakpoints=function(E){this.$breakpoints=[];for(var C=0;C0&&(L=!!x.charAt(C-1).match(this.tokenRe)),L||(L=!!x.charAt(C).match(this.tokenRe)),L)var q=this.tokenRe;else if(/^\s+$/.test(x.slice(C-1,C+1)))var q=/\s/;else var q=this.nonTokenRe;var N=C;if(N>0){do N--;while(N>=0&&x.charAt(N).match(q));N++}for(var F=C;FE&&(E=C.screenWidth)}),this.lineWidgetWidth=E},T.prototype.$computeWidth=function(E){if(this.$modified||E){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),x=this.$rowLengthCache,L=0,q=0,N=this.$foldData[q],F=N?N.start.row:1/0,I=C.length,R=0;RF){if(R=N.end.row+1,R>=I)break;N=this.$foldData[q++],F=N?N.start.row:1/0}x[R]==null&&(x[R]=this.$getStringScreenWidth(C[R])[0]),x[R]>L&&(L=x[R])}this.screenWidth=L}},T.prototype.getLine=function(E){return this.doc.getLine(E)},T.prototype.getLines=function(E,C){return this.doc.getLines(E,C)},T.prototype.getLength=function(){return this.doc.getLength()},T.prototype.getTextRange=function(E){return this.doc.getTextRange(E||this.selection.getRange())},T.prototype.insert=function(E,C){return this.doc.insert(E,C)},T.prototype.remove=function(E){return this.doc.remove(E)},T.prototype.removeFullLines=function(E,C){return this.doc.removeFullLines(E,C)},T.prototype.undoChanges=function(E,C){if(!!E.length){this.$fromUndo=!0;for(var x=E.length-1;x!=-1;x--){var L=E[x];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!C&&this.$undoSelect&&(E.selectionBefore?this.selection.fromJSON(E.selectionBefore):this.selection.setRange(this.$getUndoSelection(E,!0))),this.$fromUndo=!1}},T.prototype.redoChanges=function(E,C){if(!!E.length){this.$fromUndo=!0;for(var x=0;xE.end.column&&(N.start.column+=I),N.end.row==E.end.row&&N.end.column>E.end.column&&(N.end.column+=I)),F&&N.start.row>=E.end.row&&(N.start.row+=F,N.end.row+=F)}if(N.end=this.insert(N.start,L),q.length){var R=E.start,B=N.start,F=B.row-R.row,I=B.column-R.column;this.addFolds(q.map(function(j){return j=j.clone(),j.start.row==R.row&&(j.start.column+=I),j.end.row==R.row&&(j.end.column+=I),j.start.row+=F,j.end.row+=F,j}))}return N},T.prototype.indentRows=function(E,C,x){x=x.replace(/\t/g,this.getTabString());for(var L=E;L<=C;L++)this.doc.insertInLine({row:L,column:0},x)},T.prototype.outdentRows=function(E){for(var C=E.collapseRows(),x=new t(0,0,0,0),L=this.getTabSize(),q=C.start.row;q<=C.end.row;++q){var N=this.getLine(q);x.start.row=q,x.end.row=q;for(var F=0;F0){var L=this.getRowFoldEnd(C+x);if(L>this.doc.getLength()-1)return 0;var q=L-C}else{E=this.$clipRowToDocument(E),C=this.$clipRowToDocument(C);var q=C-E+1}var N=new t(E,0,C,Number.MAX_VALUE),F=this.getFoldsInRange(N).map(function(R){return R=R.clone(),R.start.row+=q,R.end.row+=q,R}),I=x==0?this.doc.getLines(E,C):this.doc.removeFullLines(E,C);return this.doc.insertFullLines(E+q,I),F.length&&this.addFolds(F),q},T.prototype.moveLinesUp=function(E,C){return this.$moveLines(E,C,-1)},T.prototype.moveLinesDown=function(E,C){return this.$moveLines(E,C,1)},T.prototype.duplicateLines=function(E,C){return this.$moveLines(E,C,0)},T.prototype.$clipRowToDocument=function(E){return Math.max(0,Math.min(E,this.doc.getLength()-1))},T.prototype.$clipColumnToRow=function(E,C){return C<0?0:Math.min(this.doc.getLine(E).length,C)},T.prototype.$clipPositionToDocument=function(E,C){if(C=Math.max(0,C),E<0)E=0,C=0;else{var x=this.doc.getLength();E>=x?(E=x-1,C=this.doc.getLine(x-1).length):C=Math.min(this.doc.getLine(E).length,C)}return{row:E,column:C}},T.prototype.$clipRangeToDocument=function(E){E.start.row<0?(E.start.row=0,E.start.column=0):E.start.column=this.$clipColumnToRow(E.start.row,E.start.column);var C=this.doc.getLength()-1;return E.end.row>C?(E.end.row=C,E.end.column=this.doc.getLine(C).length):E.end.column=this.$clipColumnToRow(E.end.row,E.end.column),E},T.prototype.setUseWrapMode=function(E){if(E!=this.$useWrapMode){if(this.$useWrapMode=E,this.$modified=!0,this.$resetRowCache(0),E){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},T.prototype.getUseWrapMode=function(){return this.$useWrapMode},T.prototype.setWrapLimitRange=function(E,C){(this.$wrapLimitRange.min!==E||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:E,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},T.prototype.adjustWrapLimit=function(E,C){var x=this.$wrapLimitRange;x.max<0&&(x={min:C,max:C});var L=this.$constrainWrapLimit(E,x.min,x.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},T.prototype.$constrainWrapLimit=function(E,C,x){return C&&(E=Math.max(C,E)),x&&(E=Math.min(x,E)),E},T.prototype.getWrapLimit=function(){return this.$wrapLimit},T.prototype.setWrapLimit=function(E){this.setWrapLimitRange(E,E)},T.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},T.prototype.$updateInternalDataOnChange=function(E){var C=this.$useWrapMode,x=E.action,L=E.start,q=E.end,N=L.row,F=q.row,I=F-N,R=null;if(this.$updating=!0,I!=0)if(x==="remove"){this[C?"$wrapData":"$rowLengthCache"].splice(N,I);var B=this.$foldData;R=this.getFoldsInRange(E),this.removeFolds(R);var D=this.getFoldLine(q.row),P=0;if(D){D.addRemoveChars(q.row,q.column,L.column-q.column),D.shiftRow(-I);var j=this.getFoldLine(N);j&&j!==D&&(j.merge(D),D=j),P=B.indexOf(D)+1}for(P;P=q.row&&D.shiftRow(-I)}F=N}else{var V=Array(I);V.unshift(N,0);var W=C?this.$wrapData:this.$rowLengthCache;W.splice.apply(W,V);var B=this.$foldData,D=this.getFoldLine(N),P=0;if(D){var H=D.range.compareInside(L.row,L.column);H==0?(D=D.split(L.row,L.column),D&&(D.shiftRow(I),D.addRemoveChars(F,0,q.column-L.column))):H==-1&&(D.addRemoveChars(N,0,q.column-L.column),D.shiftRow(I)),P=B.indexOf(D)+1}for(P;P=N&&D.shiftRow(I)}}else{I=Math.abs(E.start.column-E.end.column),x==="remove"&&(R=this.getFoldsInRange(E),this.removeFolds(R),I=-I);var D=this.getFoldLine(N);D&&D.addRemoveChars(N,L.column,I)}return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(N,F):this.$updateRowLengthCache(N,F),R},T.prototype.$updateRowLengthCache=function(E,C){this.$rowLengthCache[E]=null,this.$rowLengthCache[C]=null},T.prototype.$updateWrapData=function(E,C){var x=this.doc.getAllLines(),L=this.getTabSize(),q=this.$wrapData,N=this.$wrapLimit,F,I,R=E;for(C=Math.min(C,x.length-1);R<=C;)I=this.getFoldLine(R,I),I?(F=[],I.walk(function(B,D,P,j){var V;if(B!=null){V=this.$getDisplayTokens(B,F.length),V[0]=_;for(var W=1;WC-j;){var V=N+C-j;if(E[V-1]>=M&&E[V]>=M){P(V);continue}if(E[V]==_||E[V]==b){for(V;V!=N-1&&E[V]!=_;V--);if(V>N){P(V);continue}for(V=N+C,V;V>2)),N-1);V>W&&E[V]<_;)V--;if(I){for(;V>W&&E[V]<_;)V--;for(;V>W&&E[V]==S;)V--}else for(;V>W&&E[V]W){P(++V);continue}V=N+C,E[V]==y&&V--,P(V-j)}return L},T.prototype.$getDisplayTokens=function(E,C){var x=[],L;C=C||0;for(var q=0;q39&&N<48||N>57&&N<64?x.push(S):N>=4352&&A(N)?x.push(w,y):x.push(w)}return x},T.prototype.$getStringScreenWidth=function(E,C,x){if(C==0)return[0,0];C==null&&(C=1/0),x=x||0;var L,q;for(q=0;q=4352&&A(L)?x+=2:x+=1,!(x>C));q++);return[x,q]},T.prototype.getRowLength=function(E){var C=1;return this.lineWidgets&&(C+=this.lineWidgets[E]&&this.lineWidgets[E].rowCount||0),!this.$useWrapMode||!this.$wrapData[E]?C:this.$wrapData[E].length+C},T.prototype.getRowLineCount=function(E){return!this.$useWrapMode||!this.$wrapData[E]?1:this.$wrapData[E].length+1},T.prototype.getRowWrapIndent=function(E){if(this.$useWrapMode){var C=this.screenToDocumentPosition(E,Number.MAX_VALUE),x=this.$wrapData[C.row];return x.length&&x[0]=0)var I=B[D],q=this.$docRowCache[D],j=E>B[P-1];else var j=!P;for(var V=this.getLength()-1,W=this.getNextFoldLine(q),H=W?W.start.row:1/0;I<=E&&(R=this.getRowLength(q),!(I+R>E||q>=V));)I+=R,q++,q>H&&(q=W.end.row+1,W=this.getNextFoldLine(q,W),H=W?W.start.row:1/0),j&&(this.$docRowCache.push(q),this.$screenRowCache.push(I));if(W&&W.start.row<=q)L=this.getFoldDisplayLine(W),q=W.start.row;else{if(I+R<=E||q>V)return{row:V,column:this.getLine(V).length};L=this.getLine(q),W=null}var z=0,U=Math.floor(E-I);if(this.$useWrapMode){var Z=this.$wrapData[q];Z&&(F=Z[U],U>0&&Z.length&&(z=Z.indent,N=Z[U-1]||Z[Z.length-1],L=L.substring(N)))}return x!==void 0&&this.$bidiHandler.isBidiRow(I+U,q,U)&&(C=this.$bidiHandler.offsetToCol(x)),N+=this.$getStringScreenWidth(L,C-z)[1],this.$useWrapMode&&N>=F&&(N=F-1),W?W.idxToPosition(N):{row:q,column:N}},T.prototype.documentToScreenPosition=function(E,C){if(typeof C=="undefined")var x=this.$clipPositionToDocument(E.row,E.column);else x=this.$clipPositionToDocument(E,C);E=x.row,C=x.column;var L=0,q=null,N=null;N=this.getFoldAt(E,C,1),N&&(E=N.start.row,C=N.start.column);var F,I=0,R=this.$docRowCache,B=this.$getRowCacheIndex(R,E),D=R.length;if(D&&B>=0)var I=R[B],L=this.$screenRowCache[B],P=E>R[D-1];else var P=!D;for(var j=this.getNextFoldLine(I),V=j?j.start.row:1/0;I=V){if(F=j.end.row+1,F>E)break;j=this.getNextFoldLine(F,j),V=j?j.start.row:1/0}else F=I+1;L+=this.getRowLength(I),I=F,P&&(this.$docRowCache.push(I),this.$screenRowCache.push(L))}var W="";j&&I>=V?(W=this.getFoldDisplayLine(j,E,C),q=j.start.row):(W=this.getLine(E).substring(0,C),q=E);var H=0;if(this.$useWrapMode){var z=this.$wrapData[q];if(z){for(var U=0;W.length>=z[U];)L++,U++;W=W.substring(z[U-1]||0,W.length),H=U>0?z.indent:0}}return this.lineWidgets&&this.lineWidgets[I]&&this.lineWidgets[I].rowsAbove&&(L+=this.lineWidgets[I].rowsAbove),{row:L,column:H+this.$getStringScreenWidth(W)[0]}},T.prototype.documentToScreenColumn=function(E,C){return this.documentToScreenPosition(E,C).column},T.prototype.documentToScreenRow=function(E,C){return this.documentToScreenPosition(E,C).row},T.prototype.getScreenLength=function(){var E=0,C=null;if(this.$useWrapMode)for(var q=this.$wrapData.length,N=0,L=0,C=this.$foldData[L++],F=C?C.start.row:1/0;NF&&(N=C.end.row+1,C=this.$foldData[L++],F=C?C.start.row:1/0)}else{E=this.getLength();for(var x=this.$foldData,L=0;Lx));N++);return[L,N]})},T.prototype.getPrecedingCharacter=function(){var E=this.selection.getCursor();if(E.column===0)return E.row===0?"":this.doc.getNewLineCharacter();var C=this.getLine(E.row);return C[E.column-1]},T.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},T}();v.$uid=0,v.prototype.$modes=i.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=A,m.implement(v.prototype,f);var w=1,y=2,_=3,b=4,S=9,M=10,O=11,k=12;function A(T){return T<4352?!1:T>=4352&&T<=4447||T>=4515&&T<=4519||T>=4602&&T<=4607||T>=9001&&T<=9002||T>=11904&&T<=11929||T>=11931&&T<=12019||T>=12032&&T<=12245||T>=12272&&T<=12283||T>=12288&&T<=12350||T>=12353&&T<=12438||T>=12441&&T<=12543||T>=12549&&T<=12589||T>=12593&&T<=12686||T>=12688&&T<=12730||T>=12736&&T<=12771||T>=12784&&T<=12830||T>=12832&&T<=12871||T>=12880&&T<=13054||T>=13056&&T<=19903||T>=19968&&T<=42124||T>=42128&&T<=42182||T>=43360&&T<=43388||T>=44032&&T<=55203||T>=55216&&T<=55238||T>=55243&&T<=55291||T>=63744&&T<=64255||T>=65040&&T<=65049||T>=65072&&T<=65106||T>=65108&&T<=65126||T>=65128&&T<=65131||T>=65281&&T<=65376||T>=65504&&T<=65510}e("./edit_session/folding").Folding.call(v.prototype),e("./edit_session/bracket_match").BracketMatch.call(v.prototype),i.defineOptions(v.prototype,"session",{wrap:{set:function(T){if(!T||T=="off"?T=!1:T=="free"?T=!0:T=="printMargin"?T=-1:typeof T=="string"&&(T=parseInt(T,10)||!1),this.$wrap!=T)if(this.$wrap=T,!T)this.setUseWrapMode(!1);else{var E=typeof T=="number"?T:null;this.setWrapLimitRange(E,E),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(T){T=T=="auto"?this.$mode.type!="text":T!="text",T!=this.$wrapAsCode&&(this.$wrapAsCode=T,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(T){this.$useWorker=T,this.$stopWorker(),T&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(T){T=parseInt(T),T>0&&this.$tabSize!==T&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=T,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(T){this.setFoldStyle(T)},handlesSet:!0},overwrite:{set:function(T){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(T){this.doc.setNewLineMode(T)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(T){this.setMode(T)},get:function(){return this.$modeId},handlesSet:!0}}),p.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,p,g){var m=e("./lib/lang"),s=e("./lib/oop"),d=e("./range").Range,i=function(){function t(){this.$options={}}return t.prototype.set=function(l){return s.mixin(this.$options,l),this},t.prototype.getOptions=function(){return m.copyObject(this.$options)},t.prototype.setOptions=function(l){this.$options=l},t.prototype.find=function(l){var a=this.$options,u=this.$matchIterator(l,a);if(!u)return!1;var h=null;return u.forEach(function($,v,w,y){return h=new d($,v,w,y),v==y&&a.start&&a.start.start&&a.skipCurrent!=!1&&h.isEqual(a.start)?(h=null,!1):!0}),h},t.prototype.findAll=function(l){var a=this.$options;if(!a.needle)return[];this.$assembleRegExp(a);var u=a.range,h=u?l.getLines(u.start.row,u.end.row):l.doc.getAllLines(),$=[],v=a.re;if(a.$isMultiLine){var w=v.length,y=h.length-w,_;e:for(var b=v.offset||0;b<=y;b++){for(var S=0;Sk||($.push(_=new d(b,k,b+w-1,A)),w>2&&(b=b+w-2))}}else for(var T,E=0;EE&&(E=x),$.push(new d(T.startRow,T.startCol,T.endRow,T.endCol))}}else{T=m.getMatchOffsets(h[E],v);for(var S=0;SN&&$[S].end.row==F;)S--;for($=$.slice(E,S+1),E=0,S=$.length;E=$){u+="\\";break}var w=l.charCodeAt(h);switch(w){case a.Backslash:u+="\\";break;case a.n:u+=` `;break;case a.t:u+=" ";break}continue}if(v===a.DollarSign){if(h++,h>=$){u+="$";break}var y=l.charCodeAt(h);if(y===a.DollarSign){u+="$$";continue}if(y===a.Digit0||y===a.Ampersand){u+="$&";continue}if(a.Digit1<=y&&y<=a.Digit9){u+="$"+l[h];continue}}u+=l[h]}return u||l},t.prototype.replace=function(l,a){var u=this.$options,h=this.$assembleRegExp(u);if(u.$isMultiLine)return a;if(!!h){var $=this.$isMultilineSearch(u);$&&(l=l.replace(/\r\n|\r|\n/g,` `));var v=h.exec(l);if(!v||!$&&v[0].length!=l.length)return null;if(a=u.regExp?this.parseReplaceString(a):a.replace(/\$/g,"$$$$"),a=l.replace(h,a),u.preserveCase){a=a.split("");for(var w=Math.min(l.length,l.length);w--;){var y=l[w];y&&y.toLowerCase()!=y?a[w]=a[w].toUpperCase():a[w]=a[w].toLowerCase()}a=a.join("")}return a}},t.prototype.$assembleRegExp=function(l,a){if(l.needle instanceof RegExp)return l.re=l.needle;var u=l.needle;if(!l.needle)return l.re=!1;l.regExp||(u=m.escapeRegExp(u));var h=l.caseSensitive?"gm":"gmi";try{new RegExp(u,"u"),l.$supportsUnicodeFlag=!0,h+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(u=f(u,l)),l.$isMultiLine=!a&&/[\n\r]/.test(u),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(u,h);try{var $=new RegExp(u,h)}catch{$=!1}return l.re=$},t.prototype.$assembleMultilineRegExp=function(l,a){for(var u=l.replace(/\r\n|\r|\n/g,`$ ^`).split(` `),h=[],$=0;$h);y++){var _=l.getLine(w++);$=$==null?_:$+` `+_}var b=a.exec($);if(a.lastIndex=0,b){var S=$.slice(0,b.index).split(` `),M=b[0].split(` `),O=u+S.length-1,k=S[S.length-1].length,A=O+M.length-1,T=M.length==1?k+M[0].length:M[M.length-1].length;return{startRow:O,startCol:k,endRow:A,endCol:T}}}return null},t.prototype.$multiLineBackward=function(l,a,u,h,$){for(var v,w=o(l,h),y=l.getLine(h).length-u,_=h;_>=$;){for(var b=0;b=$;b++){var S=l.getLine(_--);v=v==null?S:S+` `+v}var M=r(v,a,y);if(M){var O=v.slice(0,M.index).split(` `),k=M[0].split(` `),A=_+O.length,T=O[O.length-1].length,E=A+k.length-1,C=k.length==1?T+k[0].length:k[k.length-1].length;return{startRow:A,startCol:T,endRow:E,endCol:C}}}return null},t.prototype.$matchIterator=function(l,a){var u=this.$assembleRegExp(a);if(!u)return!1;var h=this.$isMultilineSearch(a),$=this.$multiLineForward,v=this.$multiLineBackward,w=a.backwards==!0,y=a.skipCurrent!=!1,_=u.unicode,b=a.range,S=a.start;S||(S=b?b[w?"end":"start"]:l.selection.getRange()),S.start&&(S=S[y!=w?"end":"start"]);var M=b?b.start.row:0,O=b?b.end.row:l.getLength()-1;if(w)var k=function(E){var C=S.row;if(!T(C,S.column,E)){for(C--;C>=M;C--)if(T(C,Number.MAX_VALUE,E))return;if(a.wrap!=!1){for(C=O,M=S.row;C>=M;C--)if(T(C,Number.MAX_VALUE,E))return}}};else var k=function(C){var x=S.row;if(!T(x,S.column,C)){for(x=x+1;x<=O;x++)if(T(x,0,C))return;if(a.wrap!=!1){for(x=M,O=S.row;x<=O;x++)if(T(x,0,C))return}}};if(a.$isMultiLine)var A=u.length,T=function(E,C,x){var L=w?E-A+1:E;if(!(L<0||L+A>l.getLength())){var q=l.getLine(L),N=q.search(u[0]);if(!(!w&&NC)&&x(L,N,L+A-1,I))return!0}}};else if(w)var T=function(C,x,L){if(h){var q=v(l,u,x,C,M);if(!q)return!1;if(L(q.startRow,q.startCol,q.endRow,q.endCol))return!0}else{var N=l.getLine(C),F=[],I,R=0;for(u.lastIndex=0;I=u.exec(N);){var B=I[0].length;if(R=I.index,!B){if(R>=N.length)break;u.lastIndex=R+=m.skipEmptyMatch(N,R,_)}if(I.index+B>x)break;F.push(I.index,B)}for(var D=F.length-1;D>=0;D-=2){var P=F[D-1],B=F[D];if(L(C,P,C,P+B))return!0}}};else var T=function(C,x,L){if(u.lastIndex=x,h){var q=$(l,u,C,O);if(q){var N=q.endRow<=O?q.endRow-1:O;N>C&&(C=N)}if(!q)return!1;if(L(q.startRow,q.startCol,q.endRow,q.endCol))return!0}else for(var F=l.getLine(C),I,R;R=u.exec(F);){var B=R[0].length;if(I=R.index,L(C,I,C,I+B))return!0;if(!B&&(u.lastIndex=I+=m.skipEmptyMatch(F,I,_),I>=F.length))return!1}};return{forEach:k}},t}();function f(t,l){var a=m.supportsLookbehind();function u(w,y){y===void 0&&(y=!0);var _=a&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(w)||l.regExp?a&&l.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var h=Array.from(t),$=h[0],v=h[h.length-1];return u($)+t+u(v,!1)}function r(t,l,a){for(var u=null,h=0;h<=t.length;){l.lastIndex=h;var $=l.exec(t);if(!$)break;var v=$.index+$[0].length;if(v>t.length-a)break;(!u||v>u.index+u[0].length)&&(u=$),h=$.index+1}return u}function o(t,l){var a=5e3,u={row:l,column:0},h=t.doc.positionToIndex(u),$=h+a,v=t.doc.indexToPosition($),w=v.row;return w+1}p.Search=i}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,p,g){var m=this&&this.__extends||function(){var t=function(l,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var $ in h)Object.prototype.hasOwnProperty.call(h,$)&&(u[$]=h[$])},t(l,a)};return function(l,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(l,a);function u(){this.constructor=l}l.prototype=a===null?Object.create(a):(u.prototype=a.prototype,new u)}}(),s=e("../lib/keys"),d=e("../lib/useragent"),i=s.KEY_MODS,f=function(){function t(l,a){this.$init(l,a,!1)}return t.prototype.$init=function(l,a,u){this.platform=a||(d.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=u},t.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},t.prototype.removeCommand=function(l,a){var u=l&&(typeof l=="string"?l:l.name);l=this.commands[u],a||delete this.commands[u];var h=this.commandKeyBinding;for(var $ in h){var v=h[$];if(v==l)delete h[$];else if(Array.isArray(v)){var w=v.indexOf(l);w!=-1&&(v.splice(w,1),v.length==1&&(h[$]=v[0]))}}},t.prototype.bindKey=function(l,a,u){if(typeof l=="object"&&l&&(u==null&&(u=l.position),l=l[this.platform]),!!l){if(typeof a=="function")return this.addCommand({exec:a,bindKey:l,name:a.name||l});l.split("|").forEach(function(h){var $="";if(h.indexOf(" ")!=-1){var v=h.split(/\s+/);h=v.pop(),v.forEach(function(_){var b=this.parseKeys(_),S=i[b.hashId]+b.key;$+=($?" ":"")+S,this._addCommandToBinding($,"chainKeys")},this),$+=" "}var w=this.parseKeys(h),y=i[w.hashId]+w.key;this._addCommandToBinding($+y,a,u)},this)}},t.prototype._addCommandToBinding=function(l,a,u){var h=this.commandKeyBinding,$;if(!a)delete h[l];else if(!h[l]||this.$singleCommand)h[l]=a;else{Array.isArray(h[l])?($=h[l].indexOf(a))!=-1&&h[l].splice($,1):h[l]=[h[l]],typeof u!="number"&&(u=r(a));var v=h[l];for($=0;$u)break}v.splice($,0,a)}},t.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(a){var u=l[a];if(!!u){if(typeof u=="string")return this.bindKey(u,a);typeof u=="function"&&(u={exec:u}),typeof u=="object"&&(u.name||(u.name=a),this.addCommand(u))}},this)},t.prototype.removeCommands=function(l){Object.keys(l).forEach(function(a){this.removeCommand(l[a])},this)},t.prototype.bindKeys=function(l){Object.keys(l).forEach(function(a){this.bindKey(a,l[a])},this)},t.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},t.prototype.parseKeys=function(l){var a=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(y){return y}),u=a.pop(),h=s[u];if(s.FUNCTION_KEYS[h])u=s.FUNCTION_KEYS[h].toLowerCase();else if(a.length){if(a.length==1&&a[0]=="shift")return{key:u.toUpperCase(),hashId:-1}}else return{key:u,hashId:-1};for(var $=0,v=a.length;v--;){var w=s.KEY_MODS[a[v]];if(w==null)return typeof console!="undefined"&&console.error("invalid modifier "+a[v]+" in "+l),!1;$|=w}return{key:u,hashId:$}},t.prototype.findKeyCommand=function(l,a){var u=i[l]+a;return this.commandKeyBinding[u]},t.prototype.handleKeyboard=function(l,a,u,h){if(!(h<0)){var $=i[a]+u,v=this.commandKeyBinding[$];return l.$keyChain&&(l.$keyChain+=" "+$,v=this.commandKeyBinding[l.$keyChain]||v),v&&(v=="chainKeys"||v[v.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||$,{command:"null"}):(l.$keyChain&&((!a||a==4)&&u.length==1?l.$keyChain=l.$keyChain.slice(0,-$.length-1):(a==-1||h>0)&&(l.$keyChain="")),{command:v})}},t.prototype.getStatusText=function(l,a){return a.$keyChain||""},t}();function r(t){return typeof t=="object"&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}var o=function(t){m(l,t);function l(a,u){var h=t.call(this,a,u)||this;return h.$singleCommand=!0,h}return l}(f);o.call=function(t,l,a){f.prototype.$init.call(t,l,a,!0)},f.call=function(t,l,a){f.prototype.$init.call(t,l,a,!1)},p.HashHandler=o,p.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,p,g){var m=this&&this.__extends||function(){var r=function(o,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,a){l.__proto__=a}||function(l,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(l[u]=a[u])},r(o,t)};return function(o,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(o,t);function l(){this.constructor=o}o.prototype=t===null?Object.create(t):(l.prototype=t.prototype,new l)}}(),s=e("../lib/oop"),d=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,f=function(r){m(o,r);function o(t,l){var a=r.call(this,l,t)||this;return a.byName=a.commands,a.setDefaultHandler("exec",function(u){return u.args?u.command.exec(u.editor,u.args,u.event,!1):u.command.exec(u.editor,{},u.event,!0)}),a}return o.prototype.exec=function(t,l,a){if(Array.isArray(t)){for(var u=t.length;u--;)if(this.exec(t[u],l,a))return!0;return!1}typeof t=="string"&&(t=this.commands[t]);var h={editor:l,command:t,args:a};return this.canExecute(t,l)?(h.returnValue=this._emit("exec",h),this._signal("afterExec",h),h.returnValue!==!1):(this._signal("commandUnavailable",h),!1)},o.prototype.canExecute=function(t,l){return typeof t=="string"&&(t=this.commands[t]),!(!t||l&&l.$readOnly&&!t.readOnly||this.$checkCommandState!=!1&&t.isAvailable&&!t.isAvailable(l))},o.prototype.toggleRecording=function(t){if(!this.$inReplay)return t&&t._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(l){this.macro.push([l.command,l.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(t){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,t):this.exec(l[0],t,l[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(t){return t.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},o}(d);s.implement(f.prototype,i),p.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,p,g){var m=e("../lib/lang"),s=e("../config"),d=e("../range").Range;function i(r,o){return{win:r,mac:o}}p.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:i("Ctrl-,","Command-,"),exec:function(r){s.loadModule("ace/ext/settings_menu",function(o){o.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:i("Alt-E","F4"),exec:function(r){s.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:i("Alt-Shift-E","Shift-F4"),exec:function(r){s.loadModule("ace/ext/error_marker",function(o){o.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,o){typeof o=="number"&&!isNaN(o)&&r.gotoLine(o),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){s.loadModule("ace/ext/searchbox",function(o){o.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey: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,o){r.navigateUp(o.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,o){r.navigateDown(o.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,o){r.navigateLeft(o.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,o){r.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey: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 o=r.$copyWithEmptySelection&&r.selection.isEmpty(),t=o?r.selection.getLineRange():r.selection.getRange();r._emit("cut",t),t.isEmpty()||r.session.remove(t),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,o){r.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey: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){s.loadModule("ace/ext/searchbox",function(o){o.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 o=r.selection.getRange();o.start.column=0,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:i("Ctrl-Shift-Delete",null),exec:function(r){var o=r.selection.getRange();o.end.column=Number.MAX_VALUE,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey: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,o){r.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,o){r.insert(m.stringRepeat(o.text||"",o.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()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:i("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var o=r.selection.getRange();o.start.column=o.end.column=0,o.end.row++,r.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:i("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:i(null,null),exec:function(r){for(var o=r.selection.isBackwards(),t=o?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),l=o?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),a=r.session.doc.getLine(t.row).length,u=r.session.doc.getTextRange(r.selection.getRange()),h=u.replace(/\n\s*/," ").length,$=r.session.doc.getLine(t.row),v=t.row+1;v<=l.row+1;v++){var w=m.stringTrimLeft(m.stringTrimRight(r.session.doc.getLine(v)));w.length!==0&&(w=" "+w),$+=w}l.row+10?(r.selection.moveCursorTo(t.row,t.column),r.selection.selectTo(t.row,t.column+h)):(a=r.session.doc.getLine(t.row).length>a?a+1:a,r.selection.moveCursorTo(t.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:i(null,null),exec:function(r){var o=r.session.doc.getLength()-1,t=r.session.doc.getLine(o).length,l=r.selection.rangeList.ranges,a=[];l.length<1&&(l=[r.selection.getRange()]);for(var u=0;u0||r+o=0&&this.$isCustomWidgetVisible(r-o))return r-o;if(r+o<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(r+o))return r+o;if(r-o>=0&&this.$isFoldWidgetVisible(r-o))return r-o;if(r+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+o))return r+o}return null},f.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var o=0;r-o>0||r+o=0&&this.$isAnnotationVisible(r-o))return r-o;if(r+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+o))return r+o}return null},f.prototype.$focusFoldWidget=function(r){if(r!=null){var o=this.$getFoldWidget(r);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},f.prototype.$focusCustomWidget=function(r){if(r!=null){var o=this.$getCustomWidget(r);o&&(o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus())}},f.prototype.$focusAnnotation=function(r){if(r!=null){var o=this.$getAnnotation(r);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},f.prototype.$blurFoldWidget=function(r){var o=this.$getFoldWidget(r);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},f.prototype.$blurCustomWidget=function(r){var o=this.$getCustomWidget(r);o&&(o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur())},f.prototype.$blurAnnotation=function(r){var o=this.$getAnnotation(r);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},f.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)||this.$isCustomWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=r,this.$isFoldWidgetVisible(r)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},f.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},f.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r=C.length&&(C=void 0),{value:C&&C[q++],done:!C}}};throw new TypeError(x?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/oop"),d=e("./lib/dom"),i=e("./lib/lang"),f=e("./lib/useragent"),r=e("./keyboard/textinput").TextInput,o=e("./mouse/mouse_handler").MouseHandler,t=e("./mouse/fold_handler").FoldHandler,l=e("./keyboard/keybinding").KeyBinding,a=e("./edit_session").EditSession,u=e("./search").Search,h=e("./range").Range,$=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,w=e("./commands/default_commands").commands,y=e("./config"),_=e("./token_iterator").TokenIterator,b=e("./keyboard/gutter_handler").GutterKeyboardHandler,S=e("./config").nls,M=e("./clipboard"),O=e("./lib/keys"),k=e("./lib/event"),A=e("./tooltip").HoverTooltip,T=function(){function C(x,L,q){this.id="editor"+ ++C.$uid,this.session,this.$toDestroy=[];var N=x.getContainerElement();this.container=N,this.renderer=x,this.commands=new v(f.isMac?"mac":"win",w),typeof document=="object"&&(this.textInput=new r(x.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new t(this)),this.keyBinding=new l(this),this.$search=new u().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(F,I){I._$emitInputEvent.schedule(31)}),this.setSession(L||q&&q.session||new a("")),y.resetOptions(this),q&&this.setOptions(q),y._signal("editor",this)}return C.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},C.prototype.startOperation=function(x){this.session.startOperation(x)},C.prototype.endOperation=function(x){this.session.endOperation(x)},C.prototype.onStartOperation=function(x){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,x||(this.previousCommand=null)},C.prototype.onEndOperation=function(x){if(this.curOp&&this.session){if(x&&x.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var L=this.curOp.command,q=L&&L.scrollIntoView;if(q){switch(q){case"center-animate":q="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var N=this.selection.getRange(),F=this.renderer.layerConfig;(N.start.row>=F.lastRow||N.end.row<=F.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}q=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},C.prototype.$historyTracker=function(x){if(!!this.$mergeUndoDeltas){var L=this.prevOp,q=this.$mergeableCommands,N=L.command&&x.command.name==L.command.name;if(x.command.name=="insertstring"){var F=x.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),N=N&&this.mergeNextCommand&&(!/\s/.test(F)||/\s/.test(L.args)),this.mergeNextCommand=!0}else N=N&&q.indexOf(x.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(N=!1),N?this.session.mergeUndoDeltas=!0:q.indexOf(x.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},C.prototype.setKeyboardHandler=function(x,L){if(x&&typeof x=="string"&&x!="ace"){this.$keybindingId=x;var q=this;y.loadModule(["keybinding",x],function(N){q.$keybindingId==x&&q.keyBinding.setKeyboardHandler(N&&N.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(x),L&&L()},C.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},C.prototype.setSession=function(x){if(this.session!=x){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var q=this.session.getSelection();q.off("changeCursor",this.$onCursorChange),q.off("changeSelection",this.$onSelectionChange)}this.session=x,x?(this.$onDocumentChange=this.onDocumentChange.bind(this),x.on("change",this.$onDocumentChange),this.renderer.setSession(x),this.$onChangeMode=this.onChangeMode.bind(this),x.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),x.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),x.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),x.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),x.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),x.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=x.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(x)),this._signal("changeSession",{session:x,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),L&&(L.$editor=null),x&&x._signal("changeEditor",{editor:this}),x&&(x.$editor=this),x&&!x.destroyed&&x.bgTokenizer.scheduleStart()}},C.prototype.getSession=function(){return this.session},C.prototype.setValue=function(x,L){return this.session.doc.setValue(x),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),x},C.prototype.getValue=function(){return this.session.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.resize=function(x){this.renderer.onResize(x)},C.prototype.setTheme=function(x,L){this.renderer.setTheme(x,L)},C.prototype.getTheme=function(){return this.renderer.getTheme()},C.prototype.setStyle=function(x,L){this.renderer.setStyle(x,L)},C.prototype.unsetStyle=function(x){this.renderer.unsetStyle(x)},C.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},C.prototype.setFontSize=function(x){this.setOption("fontSize",x)},C.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var x=this;this.$highlightPending=!0,setTimeout(function(){x.$highlightPending=!1;var L=x.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(j){L.removeMarker(j)}),L.$bracketHighlight=null);var q=x.getCursorPosition(),N=x.getKeyboardHandler(),F=N&&N.$getDirectionForHighlight&&N.$getDirectionForHighlight(x),I=L.getMatchingBracketRanges(q,F);if(!I){var R=new _(L,q.row,q.column),B=R.getCurrentToken();if(B&&/\b(?:tag-open|tag-name)/.test(B.type)){var D=L.getMatchingTags(q);D&&(I=[D.openTagName.isEmpty()?D.openTag:D.openTagName,D.closeTagName.isEmpty()?D.closeTag:D.closeTagName])}}if(!I&&L.$mode.getMatching&&(I=L.$mode.getMatching(x.session)),!I){x.getHighlightIndentGuides()&&x.renderer.$textLayer.$highlightIndentGuide();return}var P="ace_bracket";Array.isArray(I)?I.length==1&&(P="ace_error_bracket"):I=[I],I.length==2&&(h.comparePoints(I[0].end,I[1].start)==0?I=[h.fromPoints(I[0].start,I[1].end)]:h.comparePoints(I[0].start,I[1].end)==0&&(I=[h.fromPoints(I[1].start,I[0].end)])),L.$bracketHighlight={ranges:I,markerIds:I.map(function(j){return L.addMarker(j,P,"text")})},x.getHighlightIndentGuides()&&x.renderer.$textLayer.$highlightIndentGuide()}},50)}},C.prototype.focus=function(){this.textInput.focus()},C.prototype.isFocused=function(){return this.textInput.isFocused()},C.prototype.blur=function(){this.textInput.blur()},C.prototype.onFocus=function(x){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",x))},C.prototype.onBlur=function(x){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",x))},C.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},C.prototype.onDocumentChange=function(x){var L=this.session.$useWrapMode,q=x.start.row==x.end.row?x.end.row:1/0;this.renderer.updateLines(x.start.row,q,L),this._signal("change",x),this.$cursorChange()},C.prototype.onTokenizerUpdate=function(x){var L=x.data;this.renderer.updateLines(L.first,L.last)},C.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},C.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},C.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},C.prototype.$updateHighlightActiveLine=function(){var x=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),x.$highlightLineMarker&&!L)x.removeMarker(x.$highlightLineMarker.id),x.$highlightLineMarker=null;else if(!x.$highlightLineMarker&&L){var q=new h(L.row,L.column,L.row,1/0);q.id=x.addMarker(q,"ace_active-line","screenLine"),x.$highlightLineMarker=q}else L&&(x.$highlightLineMarker.start.row=L.row,x.$highlightLineMarker.end.row=L.row,x.$highlightLineMarker.start.column=L.column,x._signal("changeBackMarker"))},C.prototype.onSelectionChange=function(x){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var q=this.selection.getRange(),N=this.getSelectionStyle();L.$selectionMarker=L.addMarker(q,"ace_selection",N)}var F=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(F),this._signal("changeSelection")},C.prototype.$getSelectionHighLightRegexp=function(){var x=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var q=L.start.column,N=L.end.column,F=x.getLine(L.start.row),I=F.substring(q,N);if(!(I.length>5e3||!/[\w\d]/.test(I))){var R=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:I}),B=F.substring(q-1,N+1);if(!!R.test(B))return R}}},C.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},C.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},C.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},C.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},C.prototype.onChangeMode=function(x){this.renderer.updateText(),this._emit("changeMode",x)},C.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},C.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},C.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},C.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},C.prototype.getCopyText=function(){var x=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),q=!1;if(!x&&this.$copyWithEmptySelection){q=!0;for(var N=this.selection.getAllRanges(),F=0;Fj.search(/\S|$/)){var B=j.substr(F.column).search(/\S|$/);q.doc.removeInLine(F.row,F.column,F.column+B)}}this.clearSelection();var D=F.column,P=q.getState(F.row),j=q.getLine(F.row),V=N.checkOutdent(P,j,x);if(q.insert(F,x),I&&I.selection&&(I.selection.length==2?this.selection.setSelectionRange(new h(F.row,D+I.selection[0],F.row,D+I.selection[1])):this.selection.setSelectionRange(new h(F.row+I.selection[0],I.selection[1],F.row+I.selection[2],I.selection[3]))),this.$enableAutoIndent){if(q.getDocument().isNewLine(x)){var W=N.getNextLineIndent(P,j.slice(0,F.column),q.getTabString());q.insert({row:F.row+1,column:0},W)}V&&N.autoOutdent(P,q,F.row)}},C.prototype.autoIndent=function(){for(var x=this.session,L=x.getMode(),q=this.selection.isEmpty()?[new h(0,0,x.doc.getLength()-1,0)]:this.selection.getAllRanges(),N="",F="",I="",R=x.getTabString(),B=0;B0&&(N=x.getState(j-1),F=x.getLine(j-1),I=L.getNextLineIndent(N,F,R));var V=x.getLine(j),W=L.$getIndent(V);if(I!==W){if(W.length>0){var H=new h(j,0,j,W.length);x.remove(H)}I.length>0&&x.insert({row:j,column:0},I)}L.autoOutdent(N,x,j)}},C.prototype.onTextInput=function(x,L){if(!L)return this.keyBinding.onTextInput(x);this.startOperation({command:{name:"insertstring"}});var q=this.applyComposition.bind(this,x,L);this.selection.rangeCount?this.forEachSelection(q):q(),this.endOperation()},C.prototype.applyComposition=function(x,L){if(L.extendLeft||L.extendRight){var q=this.selection.getRange();q.start.column-=L.extendLeft,q.end.column+=L.extendRight,q.start.column<0&&(q.start.row--,q.start.column+=this.session.getLine(q.start.row).length+1),this.selection.setRange(q),!x&&!q.isEmpty()&&this.remove()}if((x||!this.selection.isEmpty())&&this.insert(x,!0),L.restoreStart||L.restoreEnd){var q=this.selection.getRange();q.start.column-=L.restoreStart,q.end.column-=L.restoreEnd,this.selection.setRange(q)}},C.prototype.onCommandKey=function(x,L,q){return this.keyBinding.onCommandKey(x,L,q)},C.prototype.setOverwrite=function(x){this.session.setOverwrite(x)},C.prototype.getOverwrite=function(){return this.session.getOverwrite()},C.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},C.prototype.setScrollSpeed=function(x){this.setOption("scrollSpeed",x)},C.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},C.prototype.setDragDelay=function(x){this.setOption("dragDelay",x)},C.prototype.getDragDelay=function(){return this.getOption("dragDelay")},C.prototype.setSelectionStyle=function(x){this.setOption("selectionStyle",x)},C.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},C.prototype.setHighlightActiveLine=function(x){this.setOption("highlightActiveLine",x)},C.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},C.prototype.setHighlightGutterLine=function(x){this.setOption("highlightGutterLine",x)},C.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},C.prototype.setHighlightSelectedWord=function(x){this.setOption("highlightSelectedWord",x)},C.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},C.prototype.setAnimatedScroll=function(x){this.renderer.setAnimatedScroll(x)},C.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},C.prototype.setShowInvisibles=function(x){this.renderer.setShowInvisibles(x)},C.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},C.prototype.setDisplayIndentGuides=function(x){this.renderer.setDisplayIndentGuides(x)},C.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},C.prototype.setHighlightIndentGuides=function(x){this.renderer.setHighlightIndentGuides(x)},C.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},C.prototype.setShowPrintMargin=function(x){this.renderer.setShowPrintMargin(x)},C.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},C.prototype.setPrintMarginColumn=function(x){this.renderer.setPrintMarginColumn(x)},C.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},C.prototype.setReadOnly=function(x){this.setOption("readOnly",x)},C.prototype.getReadOnly=function(){return this.getOption("readOnly")},C.prototype.setBehavioursEnabled=function(x){this.setOption("behavioursEnabled",x)},C.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},C.prototype.setWrapBehavioursEnabled=function(x){this.setOption("wrapBehavioursEnabled",x)},C.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},C.prototype.setShowFoldWidgets=function(x){this.setOption("showFoldWidgets",x)},C.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},C.prototype.setFadeFoldWidgets=function(x){this.setOption("fadeFoldWidgets",x)},C.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},C.prototype.remove=function(x){this.selection.isEmpty()&&(x=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var q=this.session,N=q.getState(L.start.row),F=q.getMode().transformAction(N,"deletion",this,q,L);if(L.end.column===0){var I=q.getTextRange(L);if(I[I.length-1]==` `){var R=q.getLine(L.end.row);/^\s+$/.test(R)&&(L.end.column=R.length)}}F&&(L=F)}this.session.remove(L),this.clearSelection()},C.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var x=this.getSelectionRange();x.start.column==x.end.column&&x.start.row==x.end.row&&(x.end.column=0,x.end.row++),this.session.remove(x),this.clearSelection()},C.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var x=this.getCursorPosition();this.insert(` `),this.moveCursorToPosition(x)},C.prototype.setGhostText=function(x,L){this.renderer.setGhostText(x,L)},C.prototype.removeGhostText=function(){this.renderer.removeGhostText()},C.prototype.transposeLetters=function(){if(!!this.selection.isEmpty()){var x=this.getCursorPosition(),L=x.column;if(L!==0){var q=this.session.getLine(x.row),N,F;LB.toLowerCase()?1:0});for(var F=new h(0,0,0,0),N=x.first;N<=x.last;N++){var I=L.getLine(N);F.start.row=N,F.end.row=N,F.end.column=I.length,L.replace(F,q[N-x.first])}},C.prototype.toggleCommentLines=function(){var x=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(x,this.session,L.first,L.last)},C.prototype.toggleBlockComment=function(){var x=this.getCursorPosition(),L=this.session.getState(x.row),q=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,q,x)},C.prototype.getNumberAt=function(x,L){var q=/[\-]?[0-9]+(?:\.[0-9]+)?/g;q.lastIndex=0;for(var N=this.session.getLine(x);q.lastIndex=L){var I={value:F[0],start:F.index,end:F.index+F[0].length};return I}}return null},C.prototype.modifyNumber=function(x){var L=this.selection.getCursor().row,q=this.selection.getCursor().column,N=new h(L,q-1,L,q),F=this.session.getTextRange(N);if(!isNaN(parseFloat(F))&&isFinite(F)){var I=this.getNumberAt(L,q);if(I){var R=I.value.indexOf(".")>=0?I.start+I.value.indexOf(".")+1:I.end,B=I.start+I.value.length-R,D=parseFloat(I.value);D*=Math.pow(10,B),R!==I.end&&q=R&&I<=B&&(q=ne,D.selection.clearSelection(),D.moveCursorTo(x,R+N),D.selection.selectTo(x,B+N)),R=B});for(var P=this.$toggleWordPairs,j,V=0;V=B&&R<=D&&W.match(/((?:https?|ftp):\/\/[\S]+)/)){P=W.replace(/[\s:.,'";}\]]+$/,"");break}B=D}}catch(H){q={error:H}}finally{try{V&&!V.done&&(N=j.return)&&N.call(j)}finally{if(q)throw q.error}}return P},C.prototype.openLink=function(){var x=this.selection.getCursor(),L=this.findLinkAt(x.row,x.column);return L&&window.open(L,"_blank"),L!=null},C.prototype.removeLines=function(){var x=this.$getSelectedRows();this.session.removeFullLines(x.first,x.last),this.clearSelection()},C.prototype.duplicateSelection=function(){var x=this.selection,L=this.session,q=x.getRange(),N=x.isBackwards();if(q.isEmpty()){var F=q.start.row;L.duplicateLines(F,F)}else{var I=N?q.start:q.end,R=L.insert(I,L.getTextRange(q));q.start=I,q.end=R,x.setSelectionRange(q,N)}},C.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},C.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},C.prototype.moveText=function(x,L,q){return this.session.moveText(x,L,q)},C.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},C.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},C.prototype.$moveLines=function(x,L){var q,N,F=this.selection;if(!F.inMultiSelectMode||this.inVirtualSelectionMode){var I=F.toOrientedRange();q=this.$getSelectedRows(I),N=this.session.$moveLines(q.first,q.last,L?0:x),L&&x==-1&&(N=0),I.moveBy(N,0),F.fromOrientedRange(I)}else{var R=F.rangeList.ranges;F.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var B=0,D=0,P=R.length,j=0;jH+1)break;H=z.last}for(j--,B=this.session.$moveLines(W,H,L?0:x),L&&x==-1&&(V=j+1);V<=j;)R[V].moveBy(B,0),V++;L||(B=0),D+=B}F.fromOrientedRange(F.ranges[0]),F.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},C.prototype.$getSelectedRows=function(x){return x=(x||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(x.start.row),last:this.session.getRowFoldEnd(x.end.row)}},C.prototype.onCompositionStart=function(x){this.renderer.showComposition(x)},C.prototype.onCompositionUpdate=function(x){this.renderer.setCompositionText(x)},C.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},C.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},C.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},C.prototype.isRowVisible=function(x){return x>=this.getFirstVisibleRow()&&x<=this.getLastVisibleRow()},C.prototype.isRowFullyVisible=function(x){return x>=this.renderer.getFirstFullyVisibleRow()&&x<=this.renderer.getLastFullyVisibleRow()},C.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},C.prototype.$moveByPage=function(x,L){var q=this.renderer,N=this.renderer.layerConfig,F=x*Math.floor(N.height/N.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(F,0)}):L===!1&&(this.selection.moveCursorBy(F,0),this.selection.clearSelection());var I=q.scrollTop;q.scrollBy(0,F*N.lineHeight),L!=null&&q.scrollCursorIntoView(null,.5),q.animateScrolling(I)},C.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},C.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},C.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},C.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},C.prototype.scrollPageDown=function(){this.$moveByPage(1)},C.prototype.scrollPageUp=function(){this.$moveByPage(-1)},C.prototype.scrollToRow=function(x){this.renderer.scrollToRow(x)},C.prototype.scrollToLine=function(x,L,q,N){this.renderer.scrollToLine(x,L,q,N)},C.prototype.centerSelection=function(){var x=this.getSelectionRange(),L={row:Math.floor(x.start.row+(x.end.row-x.start.row)/2),column:Math.floor(x.start.column+(x.end.column-x.start.column)/2)};this.renderer.alignCursor(L,.5)},C.prototype.getCursorPosition=function(){return this.selection.getCursor()},C.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},C.prototype.getSelectionRange=function(){return this.selection.getRange()},C.prototype.selectAll=function(){this.selection.selectAll()},C.prototype.clearSelection=function(){this.selection.clearSelection()},C.prototype.moveCursorTo=function(x,L){this.selection.moveCursorTo(x,L)},C.prototype.moveCursorToPosition=function(x){this.selection.moveCursorToPosition(x)},C.prototype.jumpToMatching=function(x,L){var q=this.getCursorPosition(),N=new _(this.session,q.row,q.column),F=N.getCurrentToken(),I=0;F&&F.type.indexOf("tag-name")!==-1&&(F=N.stepBackward());var R=F||N.stepForward();if(!!R){var B,D=!1,P={},j=q.column-R.start,V,W={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(R.value.match(/[{}()\[\]]/g)){for(;j1?P[R.value]++:F.value==="=0;--I)this.$tryReplace(q[I],x)&&N++;return this.selection.setSelectionRange(F),N},C.prototype.$tryReplace=function(x,L){var q=this.session.getTextRange(x);return L=this.$search.replace(q,L),L!==null?(x.end=this.session.replace(x,L),x):null},C.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},C.prototype.find=function(x,L,q){L||(L={}),typeof x=="string"||x instanceof RegExp?L.needle=x:typeof x=="object"&&s.mixin(L,x);var N=this.selection.getRange();L.needle==null&&(x=this.session.getTextRange(N)||this.$search.$options.needle,x||(N=this.session.getWordRange(N.start.row,N.start.column),x=this.session.getTextRange(N)),this.$search.set({needle:x})),this.$search.set(L),L.start||this.$search.set({start:N});var F=this.$search.find(this.session);if(L.preventScroll)return F;if(F)return this.revealRange(F,q),F;L.backwards?N.start=N.end:N.end=N.start,this.selection.setRange(N)},C.prototype.findNext=function(x,L){this.find({skipCurrent:!0,backwards:!1},x,L)},C.prototype.findPrevious=function(x,L){this.find(x,{skipCurrent:!0,backwards:!0},L)},C.prototype.revealRange=function(x,L){this.session.unfold(x),this.selection.setSelectionRange(x);var q=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(x.start,x.end,.5),L!==!1&&this.renderer.animateScrolling(q)},C.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(x){x.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()},C.prototype.setAutoScrollEditorIntoView=function(x){if(!!x){var L,q=this,N=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var F=this.$scrollAnchor;F.style.cssText="position:absolute",this.container.insertBefore(F,this.container.firstChild);var I=this.on("changeSelection",function(){N=!0}),R=this.renderer.on("beforeRender",function(){N&&(L=q.renderer.container.getBoundingClientRect())}),B=this.renderer.on("afterRender",function(){if(N&&L&&(q.isFocused()||q.searchBox&&q.searchBox.isFocused())){var D=q.renderer,P=D.$cursorLayer.$pixelPos,j=D.layerConfig,V=P.top-j.offset;P.top>=0&&V+L.top<0?N=!0:P.topwindow.innerHeight?N=!1:N=null,N!=null&&(F.style.top=V+"px",F.style.left=P.left+"px",F.style.height=j.lineHeight+"px",F.scrollIntoView(N)),N=L=null}});this.setAutoScrollEditorIntoView=function(D){D||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",I),this.renderer.off("afterRender",B),this.renderer.off("beforeRender",R))}}},C.prototype.$resetCursorStyle=function(){var x=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;!L||(L.setSmoothBlinking(/smooth/.test(x)),L.isBlinking=!this.$readOnly&&x!="wide",d.setCssClass(L.element,"ace_slim-cursors",/slim/.test(x)))},C.prototype.prompt=function(x,L,q){var N=this;y.loadModule("ace/ext/prompt",function(F){F.prompt(N,x,L,q)})},C}();T.$uid=0,T.prototype.curOp=null,T.prototype.prevOp={},T.prototype.$mergeableCommands=["backspace","del","insertstring"],T.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(T.prototype,$),y.defineOptions(T.prototype,"editor",{selectionStyle:{set:function(C){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:C})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(C){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(C){var x=this;this.textInput.setReadOnly(C),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(q){var N=!1;if(q&&q.type=="keydown"){if(N=q&&q.key&&q.key.length==1&&!q.ctrlKey&&!q.metaKey,!N)return}else q&&q.type!=="exec"&&(N=!0);if(N){x.hoverTooltip||(x.hoverTooltip=new A);var F=d.createElement("div");F.textContent=S("editor.tooltip.disable-editing","Editing is disabled"),x.hoverTooltip.isOpen||x.hoverTooltip.showForRange(x,x.getSelectionRange(),F)}else x.hoverTooltip&&x.hoverTooltip.isOpen&&x.hoverTooltip.hide()});var L=this.textInput.getElement();C?(k.addListener(L,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(k.removeListener(L,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(C){this.textInput.setCopyWithEmptySelection(C)},initialValue:!1},cursorStyle:{set:function(C){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(C){this.setAutoScrollEditorIntoView(C)}},keyboardHandler:{set:function(C){this.setKeyboardHandler(C)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(C){this.session.setValue(C)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(C){this.setSession(C)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(C){this.renderer.$gutterLayer.setShowLineNumbers(C),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),C&&this.$relativeLineNumbers?E.attach(this):E.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(C){this.$showLineNumbers&&C?E.attach(this):E.detach(this)}},placeholder:{set:function(C){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var x=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(x&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!x&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder");var L=d.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!x&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(C){var x={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(N){N.blur(),N.renderer.scroller.focus()},readOnly:!0},L=function(N){if(N.target==this.renderer.scroller&&N.keyCode===O.enter){N.preventDefault();var F=this.getCursorPosition().row;this.isRowVisible(F)||this.scrollToLine(F,!0,!0),this.focus()}},q;C?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(f.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",S("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",S("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(x),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",S("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",S("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),q||(q=new b(this)),q.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand(x),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),q&&q.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(C){this.$textInputAriaLabel=C},initialValue:""},enableMobileMenu:{set:function(C){this.$enableMobileMenu=C},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",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 E={getText:function(C,x){return(Math.abs(C.selection.lead.row-x)||x+1+(x<9?"\xB7":""))+""},getWidth:function(C,x,L){return Math.max(x.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(C,x){x.renderer.$loop.schedule(x.renderer.CHANGE_GUTTER)},attach:function(C){C.renderer.$gutterLayer.$renderer=this,C.on("changeSelection",this.update),this.update(null,C)},detach:function(C){C.renderer.$gutterLayer.$renderer==this&&(C.renderer.$gutterLayer.$renderer=null),C.off("changeSelection",this.update),this.update(null,C)}};p.Editor=T}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,p,g){var m=e("../lib/dom"),s=function(){function d(i,f){this.element=i,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(i){m.translate(this.element,0,-(i.firstRowScreen*i.lineHeight%this.canvasHeight)-i.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(i,f){return Math.floor(i.firstRowScreen*i.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(i,f,r){var o=f.firstRowScreen*f.lineHeight,t=Math.floor(o/this.canvasHeight),l=r.documentToScreenRow(i,0)*f.lineHeight;return l-t*this.canvasHeight},d.prototype.computeLineHeight=function(i,f,r){return f.lineHeight*r.getRowLineCount(i)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(i){return this.cells[i]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(i){if(Array.isArray(i)){this.cells.push.apply(this.cells,i);for(var f=m.createFragment(this.element),r=0;rw&&(b=v.end.row+1,v=u.getNextFoldLine(b,v),w=v?v.start.row:1/0),b>$){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}y=this.$lines.get(++_),y?y.row=b:(y=this.$lines.createCell(b,a,this.session,t),this.$lines.push(y)),this.$renderCell(y,a,v,b),b++}this._signal("afterRender"),this.$updateGutterWidth(a)},l.prototype.$updateGutterWidth=function(a){var u=this.session,h=u.gutterRenderer||this.$renderer,$=u.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||u.$useWrapMode)&&(v=u.getLength()+$-1);var w=h?h.getWidth(u,v,a):v.toString().length*a.characterWidth,y=this.$padding||this.$computePadding();w+=y.left+y.right,w!==this.gutterWidth&&!isNaN(w)&&(this.gutterWidth=w,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",w))},l.prototype.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var a=this.session.selection.getCursor();this.$cursorRow!==a.row&&(this.$cursorRow=a.row)}},l.prototype.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var a=this.session.selection.cursor.row;if(this.$cursorRow=a,!(this.$cursorCell&&this.$cursorCell.row==a)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var u=this.$lines.cells;this.$cursorCell=null;for(var h=0;h=this.$cursorRow){if($.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(h>0&&v&&v.start.row==u[h-1].row)$=u[h-1];else break}$.element.className="ace_gutter-active-line "+$.element.className,this.$cursorCell=$;break}}}}},l.prototype.scrollLines=function(a){var u=this.config;if(this.config=a,this.$updateCursorRow(),this.$lines.pageChanged(u,a))return this.update(a);this.$lines.moveContainer(a);var h=Math.min(a.lastRow+a.gutterOffset,this.session.getLength()-1),$=this.oldLastRow;if(this.oldLastRow=h,!u||$0;v--)this.$lines.shift();if($>h)for(var v=this.session.getFoldedRowCount(h+1,$);v>0;v--)this.$lines.pop();a.firstRow$&&this.$lines.push(this.$renderLines(a,$+1,h)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(a)},l.prototype.$renderLines=function(a,u,h){for(var $=[],v=u,w=this.session.getNextFoldLine(v),y=w?w.start.row:1/0;v>y&&(v=w.end.row+1,w=this.session.getNextFoldLine(v,w),y=w?w.start.row:1/0),!(v>h);){var _=this.$lines.createCell(v,a,this.session,t);this.$renderCell(_,a,w,v),$.push(_),v++}return $},l.prototype.$renderCell=function(a,u,h,$){var v=a.element,w=this.session,y=v.childNodes[0],_=v.childNodes[1],b=v.childNodes[2],S=v.childNodes[3],M=b.firstChild,O=w.$firstLineNumber,k=w.$breakpoints,A=w.$decorations,T=w.gutterRenderer||this.$renderer,E=this.$showFoldWidgets&&w.foldWidgets,C=h?h.start.row:Number.MAX_VALUE,x=u.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",q=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",N=(T?T.getText(w,$):$+O).toString();if(this.$highlightGutterLine&&($==this.$cursorRow||h&&$=C&&this.$cursorRow<=h.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=a&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=a)),k[$]&&(L+=k[$]),A[$]&&(L+=A[$]),this.$annotations[$]&&$!==C&&(L+=this.$annotations[$].className),E){var F=E[$];F==null&&(F=E[$]=w.getFoldWidget($))}if(F){var I="ace_fold-widget ace_"+F,R=F=="start"&&$==C&&$h.right-u.right)return"foldWidgets"},l}();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer="",o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,s.implement(o.prototype,i);function t(l){var a=document.createTextNode("");l.appendChild(a);var u=m.createElement("span");l.appendChild(u);var h=m.createElement("span");l.appendChild(h);var $=m.createElement("span");return h.appendChild($),l}p.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,p,g){var m=e("../range").Range,s=e("../lib/dom"),d=function(){function f(r){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return f.prototype.setPadding=function(r){this.$padding=r},f.prototype.setSession=function(r){this.session=r},f.prototype.setMarkers=function(r){this.markers=r},f.prototype.elt=function(r,o){var t=this.i!=-1&&this.element.childNodes[this.i];t?this.i++:(t=document.createElement("div"),this.element.appendChild(t),this.i=-1),t.style.cssText=o,t.className=r},f.prototype.update=function(r){if(!!r){this.config=r,this.i=0;var o;for(var t in this.markers){var l=this.markers[t];if(!l.range){l.update(o,this,this.session,r);continue}var a=l.range.clipRows(r.firstRow,r.lastRow);if(!a.isEmpty())if(a=a.toScreenRange(this.session),l.renderer){var u=this.$getTop(a.start.row,r),h=this.$padding+a.start.column*r.characterWidth;l.renderer(o,a,h,u,r)}else l.type=="fullLine"?this.drawFullLineMarker(o,a,l.clazz,r):l.type=="screenLine"?this.drawScreenLineMarker(o,a,l.clazz,r):a.isMultiLine()?l.type=="text"?this.drawTextMarker(o,a,l.clazz,r):this.drawMultiLineMarker(o,a,l.clazz,r):this.drawSingleLineMarker(o,a,l.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i_,v==$),l,v==$?0:1,a)},f.prototype.drawMultiLineMarker=function(r,o,t,l,a){var u=this.$padding,h=l.lineHeight,$=this.$getTop(o.start.row,l),v=u+o.start.column*l.characterWidth;if(a=a||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var w=o.clone();w.end.row=w.start.row,w.end.column=this.session.getLine(w.start.row).length,this.drawBidiSingleLineMarker(r,w,t+" ace_br1 ace_start",l,null,a)}else this.elt(t+" ace_br1 ace_start","height:"+h+"px;right:"+u+"px;top:"+$+"px;left:"+v+"px;"+(a||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var w=o.clone();w.start.row=w.end.row,w.start.column=0,this.drawBidiSingleLineMarker(r,w,t+" ace_br12",l,null,a)}else{$=this.$getTop(o.end.row,l);var y=o.end.column*l.characterWidth;this.elt(t+" ace_br12","height:"+h+"px;width:"+y+"px;top:"+$+"px;left:"+u+"px;"+(a||""))}if(h=(o.end.row-o.start.row-1)*l.lineHeight,!(h<=0)){$=this.$getTop(o.start.row+1,l);var _=(o.start.column?1:0)|(o.end.column?0:8);this.elt(t+(_?" ace_br"+_:""),"height:"+h+"px;right:"+u+"px;top:"+$+"px;left:"+u+"px;"+(a||""))}},f.prototype.drawSingleLineMarker=function(r,o,t,l,a,u){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(r,o,t,l,a,u);var h=l.lineHeight,$=(o.end.column+(a||0)-o.start.column)*l.characterWidth,v=this.$getTop(o.start.row,l),w=this.$padding+o.start.column*l.characterWidth;this.elt(t,"height:"+h+"px;width:"+$+"px;top:"+v+"px;left:"+w+"px;"+(u||""))},f.prototype.drawBidiSingleLineMarker=function(r,o,t,l,a,u){var h=l.lineHeight,$=this.$getTop(o.start.row,l),v=this.$padding,w=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);w.forEach(function(y){this.elt(t,"height:"+h+"px;width:"+(y.width+(a||0))+"px;top:"+$+"px;left:"+(v+y.left)+"px;"+(u||""))},this)},f.prototype.drawFullLineMarker=function(r,o,t,l,a){var u=this.$getTop(o.start.row,l),h=l.lineHeight;o.start.row!=o.end.row&&(h+=this.$getTop(o.end.row,l)-u),this.elt(t,"height:"+h+"px;top:"+u+"px;left:0;right:0;"+(a||""))},f.prototype.drawScreenLineMarker=function(r,o,t,l,a){var u=this.$getTop(o.start.row,l),h=l.lineHeight;this.elt(t,"height:"+h+"px;top:"+u+"px;left:0;right:0;"+(a||""))},f}();d.prototype.$padding=0;function i(f,r,o,t){return(f?1:0)|(r?2:0)|(o?4:0)|(t?8:0)}p.Marker=d}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,p,g){var m=new Set(["text","rparen","lparen"]);p.isTextToken=function(s){return m.has(s)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,p,g){var m=e("../lib/oop"),s=e("../lib/dom"),d=e("../lib/lang"),i=e("./lines").Lines,f=e("../lib/event_emitter").EventEmitter,r=e("../config").nls,o=e("./text_util").isTextToken,t=function(){function l(a){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new i(this.element)}return l.prototype.$updateEolChar=function(){var a=this.session.doc,u=a.getNewLineCharacter()==` `&&a.getNewLineMode()!="windows",h=u?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=h)return this.EOL_CHAR=h,!0},l.prototype.setPadding=function(a){this.$padding=a,this.element.style.margin="0 "+a+"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(a){this.$fontMetrics=a,this.$fontMetrics.on("changeCharacterSize",function(u){this._signal("changeCharacterSize",u)}.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(a){this.session=a,a&&this.$computeTabString()},l.prototype.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,typeof a=="string"?(this.showSpaces=/tab/i.test(a),this.showTabs=/space/i.test(a),this.showEOL=/eol/i.test(a)):this.showSpaces=this.showTabs=this.showEOL=a,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(a){return this.displayIndentGuides==a?!1:(this.displayIndentGuides=a,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(a){return this.$highlightIndentGuides===a?!1:(this.$highlightIndentGuides=a,a)},l.prototype.$computeTabString=function(){var a=this.session.getTabSize();this.tabSize=a;for(var u=this.$tabStrings=[0],h=1;hM&&(b=S.end.row+1,S=this.session.getNextFoldLine(b,S),M=S?S.start.row:1/0),!(b>v);){var O=w[y++];if(O){this.dom.removeChildren(O),this.$renderLine(O,b,b==M?S:!1),_&&(O.style.top=this.$lines.computeLineTop(b,a,this.session)+"px");var k=a.lineHeight*this.session.getRowLength(b)+"px";O.style.height!=k&&(_=!0,O.style.height=k)}b++}if(_)for(;y0;v--)this.$lines.shift();if(u.lastRow>a.lastRow)for(var v=this.session.getFoldedRowCount(a.lastRow+1,u.lastRow);v>0;v--)this.$lines.pop();a.firstRowu.lastRow&&this.$lines.push(this.$renderLinesFragment(a,u.lastRow+1,a.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(a,u,h){for(var $=[],v=u,w=this.session.getNextFoldLine(v),y=w?w.start.row:1/0;v>y&&(v=w.end.row+1,w=this.session.getNextFoldLine(v,w),y=w?w.start.row:1/0),!(v>h);){var _=this.$lines.createCell(v,a,this.session),b=_.element;this.dom.removeChildren(b),s.setStyle(b.style,"height",this.$lines.computeLineHeight(v,a,this.session)+"px"),s.setStyle(b.style,"top",this.$lines.computeLineTop(v,a,this.session)+"px"),this.$renderLine(b,v,v==y?w:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",$.push(_),v++}return $},l.prototype.update=function(a){this.$lines.moveContainer(a),this.config=a;for(var u=a.firstRow,h=a.lastRow,$=this.$lines;$.getLength();)$.pop();$.push(this.$renderLinesFragment(a,u,h))},l.prototype.$renderToken=function(a,u,h,$){for(var v=this,w=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,y=this.dom.createFragment(this.element),_,b=0;_=w.exec($);){var S=_[1],M=_[2],O=_[3],k=_[4],A=_[5];if(!(!v.showSpaces&&M)){var T=b!=_.index?$.slice(b,_.index):"";if(b=_.index+_[0].length,T&&y.appendChild(this.dom.createTextNode(T,this.element)),S){var E=v.session.getScreenTabSize(u+_.index);y.appendChild(v.$tabStrings[E].cloneNode(!0)),u+=E-1}else if(M)if(v.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=d.stringRepeat(v.SPACE_CHAR,M.length),y.appendChild(C)}else y.appendChild(this.dom.createTextNode(M,this.element));else if(O){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=d.stringRepeat(v.SPACE_CHAR,O.length),y.appendChild(C)}else if(k){u+=1;var C=this.dom.createElement("span");C.style.width=v.config.characterWidth*2+"px",C.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=v.showSpaces?v.SPACE_CHAR:k,y.appendChild(C)}else if(A){u+=1;var C=this.dom.createElement("span");C.style.width=v.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=A,y.appendChild(C)}}}if(y.appendChild(this.dom.createTextNode(b?$.slice(b):$,this.element)),o(h.type))a.appendChild(y);else{var x="ace_"+h.type.replace(/\./g," ace_"),C=this.dom.createElement("span");h.type=="fold"&&(C.style.width=h.value.length*this.config.characterWidth+"px",C.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),C.className=x,C.appendChild(y),a.appendChild(C)}return u+$.length},l.prototype.renderIndentGuide=function(a,u,h){var $=u.search(this.$indentGuideRe);if($<=0||$>=h)return u;if(u[0]==" "){$-=$%this.tabSize;for(var v=$/this.tabSize,w=0;ww[y].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&a[u.row]!==""&&u.column===a[u.row].length){this.$highlightIndentGuideMarker.dir=1;for(var y=u.row+1;y0)$=a.element.childNodes[0];else return;var v=$.childNodes;if(v){var w=v[u-1];w&&w.classList&&w.classList.contains("ace_indent-guide")&&w.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(!!this.$lines){var a=this.$lines.cells;this.$clearActiveIndentGuide();var u=this.$highlightIndentGuideMarker.indentLevel;if(u!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var h=0;h=this.$highlightIndentGuideMarker.start+1){if($.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive($,u)}}else for(var h=a.length-1;h>=0;h--){var $=a[h];if(this.$highlightIndentGuideMarker.end&&$.row=w;)y=this.$renderToken(_,y,S,M.substring(0,w-$)),M=M.substring(w-$),$=w,_=this.$createLineElement(),a.appendChild(_),_.appendChild(this.dom.createTextNode(d.stringRepeat("\xA0",h.indent),this.element)),v++,y=0,w=h[v]||Number.MAX_VALUE;M.length!=0&&($+=M.length,y=this.$renderToken(_,y,S,M))}}h[h.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,y,null,"",!0)},l.prototype.$renderSimpleLine=function(a,u){for(var h=0,$=0;$this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(a,h,v,w);h=this.$renderToken(a,h,v,w)}}},l.prototype.$renderOverflowMessage=function(a,u,h,$,v){h&&this.$renderToken(a,u,h,$.slice(0,this.MAX_LINE_LENGTH-u));var w=this.dom.createElement("span");w.className="ace_inline_button ace_keyword ace_toggle_wrap",w.textContent=v?"":"",a.appendChild(w)},l.prototype.$renderLine=function(a,u,h){if(!h&&h!=!1&&(h=this.session.getFoldLine(u)),h)var $=this.$getFoldLineTokens(u,h);else var $=this.session.getTokens(u);var v=a;if($.length){var w=this.session.getRowSplitData(u);if(w&&w.length){this.$renderWrappedLine(a,$,w);var v=a.lastChild}else{var v=a;this.$useLineGroups()&&(v=this.$createLineElement(),a.appendChild(v)),this.$renderSimpleLine(v,$)}}else this.$useLineGroups()&&(v=this.$createLineElement(),a.appendChild(v));if(this.showEOL&&v){h&&(u=h.end.row);var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_eol",y.textContent=u==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(y)}},l.prototype.$getFoldLineTokens=function(a,u){var h=this.session,$=[];function v(y,_,b){for(var S=0,M=0;M+y[S].value.length<_;)if(M+=y[S].value.length,S++,S==y.length)return;if(M!=_){var O=y[S].value.substring(_-M);O.length>b-_&&(O=O.substring(0,b-_)),$.push({type:y[S].type,value:O}),M=_+O.length,S+=1}for(;Mb?$.push({type:y[S].type,value:O.substring(0,b-M)}):$.push(y[S]),M+=O.length,S+=1}}var w=h.getTokens(a);return u.walk(function(y,_,b,S,M){y!=null?$.push({type:"fold",value:y}):(M&&(w=h.getTokens(_)),w.length&&v(w,S,b))},u.end.row,this.session.getLine(u.end.row).length),$},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l}();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,m.implement(t.prototype,f),p.Text=t}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,p,g){var m=e("../lib/dom"),s=function(){function d(i){this.element=m.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(),m.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(i){for(var f=this.cursors,r=f.length;r--;)m.setStyle(f[r].style,"opacity",i?"":"0")},d.prototype.$startCssAnimation=function(){for(var i=this.cursors,f=i.length;f--;)i[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&m.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,m.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(i){this.$padding=i},d.prototype.setSession=function(i){this.session=i},d.prototype.setBlinking=function(i){i!=this.isBlinking&&(this.isBlinking=i,this.restartTimer())},d.prototype.setBlinkInterval=function(i){i!=this.blinkInterval&&(this.blinkInterval=i,this.restartTimer())},d.prototype.setSmoothBlinking=function(i){i!=this.smoothBlinking&&(this.smoothBlinking=i,m.setCssClass(this.element,"ace_smooth-blinking",i),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var i=m.createElement("div");return i.className="ace_cursor",this.element.appendChild(i),this.cursors.push(i),i},d.prototype.removeCursor=function(){if(this.cursors.length>1){var i=this.cursors.pop();return i.parentNode.removeChild(i),i}},d.prototype.hideCursor=function(){this.isVisible=!1,m.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,m.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var i=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,m.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&&m.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),m.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=function(){this.timeoutId=setTimeout(function(){i(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){i(!0),f()},this.blinkInterval),f()}},d.prototype.getPixelPosition=function(i,f){if(!this.config||!this.session)return{left:0,top:0};i||(i=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(i),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,i.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),t=(r.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:t}},d.prototype.isCursorInView=function(i,f){return i.top>=0&&i.topi.height+i.offset||l.top<0)&&r>1)){var a=this.cursors[o++]||this.addCursor(),u=a.style;this.drawCursor?this.drawCursor(a,l,i,f[r],this.session):this.isCursorInView(l,i)?(m.setStyle(u,"display","block"),m.translate(a,l.left,l.top),m.setStyle(u,"width",Math.round(i.characterWidth)+"px"),m.setStyle(u,"height",i.lineHeight+"px")):m.setStyle(u,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=l,this.restartTimer()},d.prototype.$setOverwrite=function(i){i!=this.overwrite&&(this.overwrite=i,i?m.addCssClass(this.element,"ace_overwrite-cursors"):m.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d}();s.prototype.$padding=0,s.prototype.drawCursor=null,p.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,p,g){var m=this&&this.__extends||function(){var a=function(u,h){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,v){$.__proto__=v}||function($,v){for(var w in v)Object.prototype.hasOwnProperty.call(v,w)&&($[w]=v[w])},a(u,h)};return function(u,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");a(u,h);function $(){this.constructor=u}u.prototype=h===null?Object.create(h):($.prototype=h.prototype,new $)}}(),s=e("./lib/oop"),d=e("./lib/dom"),i=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter,r=32768,o=function(){function a(u,h){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+h,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),u.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 a.prototype.setVisible=function(u){this.element.style.display=u?"":"none",this.isVisible=u,this.coeff=1},a}();s.implement(o.prototype,f);var t=function(a){m(u,a);function u(h,$){var v=a.call(this,h,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,$.$scrollbarWidth=v.width=d.scrollbarWidth(h.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return u.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},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(h){this.element.style.height=h+"px"},u.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"},u.prototype.setScrollTop=function(h){this.scrollTop!=h&&(this.skipEvent=!0,this.scrollTop=h,this.element.scrollTop=h*this.coeff)},u}(o);t.prototype.setInnerHeight=t.prototype.setScrollHeight;var l=function(a){m(u,a);function u(h,$){var v=a.call(this,h,"-h")||this;return v.scrollLeft=0,v.height=$.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return u.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},u.prototype.getHeight=function(){return this.isVisible?this.height:0},u.prototype.setWidth=function(h){this.element.style.width=h+"px"},u.prototype.setInnerWidth=function(h){this.inner.style.width=h+"px"},u.prototype.setScrollWidth=function(h){this.inner.style.width=h+"px"},u.prototype.setScrollLeft=function(h){this.scrollLeft!=h&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=h)},u}(o);p.ScrollBar=t,p.ScrollBarV=t,p.ScrollBarH=l,p.VScrollBar=t,p.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,p,g){var m=this&&this.__extends||function(){var l=function(a,u){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,$){h.__proto__=$}||function(h,$){for(var v in $)Object.prototype.hasOwnProperty.call($,v)&&(h[v]=$[v])},l(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");l(a,u);function h(){this.constructor=a}a.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}}(),s=e("./lib/oop"),d=e("./lib/dom"),i=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter;d.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 l(a,u){this.element=d.createElement("div"),this.element.className="ace_sb"+u,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,a.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(a){this.element.style.display=a?"":"none",this.isVisible=a,this.coeff=1},l}();s.implement(r.prototype,f);var o=function(l){m(a,l);function a(u,h){var $=l.call(this,u,"-v")||this;return $.scrollTop=0,$.scrollHeight=0,$.parent=u,$.width=$.VScrollWidth,$.renderer=h,$.inner.style.width=$.element.style.width=($.width||15)+"px",$.$minWidth=0,$}return a.prototype.onMouseDown=function(u,h){if(u==="mousedown"&&!(i.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var $=this,v=h.clientY,w=function(k){v=k.clientY},y=function(){clearInterval(M)},_=h.clientY,b=this.thumbTop,S=function(){if(v!==void 0){var k=$.scrollTopFromThumbTop(b+v-_);k!==$.scrollTop&&$._emit("scroll",{data:k})}};i.capture(this.inner,w,y);var M=setInterval(S,20);return i.preventDefault(h)}var O=h.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(O)}),i.preventDefault(h)}},a.prototype.getHeight=function(){return this.height},a.prototype.scrollTopFromThumbTop=function(u){var h=u*(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},a.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},a.prototype.setHeight=function(u){this.height=Math.max(0,u),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},a.prototype.setScrollHeight=function(u,h){this.pageHeight===u&&!h||(this.pageHeight=u,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},a.prototype.setScrollTop=function(u){this.scrollTop=u,u<0&&(u=0),this.thumbTop=u*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},a}(r);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var t=function(l){m(a,l);function a(u,h){var $=l.call(this,u,"-h")||this;return $.scrollLeft=0,$.scrollWidth=0,$.height=$.HScrollHeight,$.inner.style.height=$.element.style.height=($.height||12)+"px",$.renderer=h,$}return a.prototype.onMouseDown=function(u,h){if(u==="mousedown"&&!(i.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var $=this,v=h.clientX,w=function(k){v=k.clientX},y=function(){clearInterval(M)},_=h.clientX,b=this.thumbLeft,S=function(){if(v!==void 0){var k=$.scrollLeftFromThumbLeft(b+v-_);k!==$.scrollLeft&&$._emit("scroll",{data:k})}};i.capture(this.inner,w,y);var M=setInterval(S,20);return i.preventDefault(h)}var O=h.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(O)}),i.preventDefault(h)}},a.prototype.getHeight=function(){return this.isVisible?this.height:0},a.prototype.scrollLeftFromThumbLeft=function(u){var h=u*(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},a.prototype.setWidth=function(u){this.width=Math.max(0,u),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},a.prototype.setScrollWidth=function(u,h){this.pageWidth===u&&!h||(this.pageWidth=u,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},a.prototype.setScrollLeft=function(u){this.scrollLeft=u,u<0&&(u=0),this.thumbLeft=u*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},a}(r);t.prototype.setInnerWidth=t.prototype.setScrollWidth,p.ScrollBar=o,p.ScrollBarV=o,p.ScrollBarH=t,p.VScrollBar=o,p.HScrollBar=t}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,p,g){var m=e("./lib/event"),s=function(){function d(i,f){this.onRender=i,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var r=this;this._flush=function(o){r.pending=!1;var t=r.changes;if(t&&(m.blockIdle(100),r.changes=0,r.onRender(t)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return d.prototype.schedule=function(i){this.changes=this.changes|i,this.changes&&!this.pending&&(m.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(i){var f=this.changes;return this.changes=0,f},d}();p.RenderLoop=s}),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,g){var m=e("../lib/oop"),s=e("../lib/dom"),d=e("../lib/lang"),i=e("../lib/event"),f=e("../lib/useragent"),r=e("../lib/event_emitter").EventEmitter,o=512,t=typeof ResizeObserver=="function",l=200,a=function(){function u(h){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),h.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",o),this.$characterSize={width:0,height:0},t?this.$addObserver():this.checkForSizeChanges()}return u.prototype.$setMeasureNodeStyles=function(h,$){h.width=h.height="auto",h.left=h.top="0px",h.visibility="hidden",h.position="absolute",h.whiteSpace="pre",f.isIE<8?h["font-family"]="inherit":h.font="inherit",h.overflow=$?"hidden":"visible"},u.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 $=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=h,this.charSizes=Object.create(null),this.allowBoldFonts=$&&$.width===h.width&&$.height===h.height,this._emit("changeCharacterSize",{data:h})}},u.prototype.$addObserver=function(){var h=this;this.$observer=new window.ResizeObserver(function($){h.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},u.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var h=this;return this.$pollSizeChangesTimer=i.onIdle(function $(){h.checkForSizeChanges(),i.onIdle($,500)},500)},u.prototype.setPolling=function(h){h?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},u.prototype.$measureSizes=function(h){var $={height:(h||this.$measureNode).clientHeight,width:(h||this.$measureNode).clientWidth/o};return $.width===0||$.height===0?null:$},u.prototype.$measureCharWidth=function(h){this.$main.textContent=d.stringRepeat(h,o);var $=this.$main.getBoundingClientRect();return $.width/o},u.prototype.getCharacterWidth=function(h){var $=this.charSizes[h];return $===void 0&&($=this.charSizes[h]=this.$measureCharWidth(h)/this.$characterSize.width),$},u.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},u.prototype.$getZoom=function(h){return!h||!h.parentElement?1:(Number(window.getComputedStyle(h).zoom)||1)*this.$getZoom(h.parentElement)},u.prototype.$initTransformMeasureNodes=function(){var h=function($,v){return["div",{style:"position: absolute;top:"+$+"px;left:"+v+"px;"}]};this.els=s.buildDom([h(0,0),h(l,0),h(0,l),h(l,l)],this.el)},u.prototype.transformCoordinates=function(h,$){if(h){var v=this.$getZoom(this.el);h=b(1/v,h)}function w(I,R,B){var D=I[1]*R[0]-I[0]*R[1];return[(-R[1]*B[0]+R[0]*B[1])/D,(+I[1]*B[0]-I[0]*B[1])/D]}function y(I,R){return[I[0]-R[0],I[1]-R[1]]}function _(I,R){return[I[0]+R[0],I[1]+R[1]]}function b(I,R){return[I*R[0],I*R[1]]}this.els||this.$initTransformMeasureNodes();function S(I){var R=I.getBoundingClientRect();return[R.left,R.top]}var M=S(this.els[0]),O=S(this.els[1]),k=S(this.els[2]),A=S(this.els[3]),T=w(y(A,O),y(A,k),y(_(O,k),_(A,M))),E=b(1+T[0],y(O,M)),C=b(1+T[1],y(k,M));if($){var x=$,L=T[0]*x[0]/l+T[1]*x[1]/l+1,q=_(b(x[0],E),b(x[1],C));return _(b(1/L/l,q),M)}var N=y(h,M),F=w(y(E,b(T[0],N)),y(C,b(T[1],N)),N);return b(l,F)},u}();a.prototype.$characterSize={width:0,height:0},m.implement(a.prototype,r),p.FontMetrics=a}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,p,g){g.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); forced-color-adjust: none; } .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_invisible { font-variant-ligatures: none; } .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, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_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, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint { 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, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint { 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_security { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+"); 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_hint { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg=="); background-color: silver; } .ace_icon_svg.ace_error_fold { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); background-color: crimson; } .ace_icon_svg.ace_security_fold { -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); 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; padding: 3px 4px; position: fixed; z-index: 999999; box-sizing: border-box; cursor: default; white-space: pre-wrap; word-wrap: break-word; line-height: normal; font-style: normal; font-weight: normal; letter-spacing: normal; pointer-events: none; overflow: auto; max-width: min(33em, 66vw); overscroll-behavior: contain; } .ace_tooltip pre { white-space: pre-wrap; } .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, .ace_custom-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_custom-widget { background: none; } .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 { position: relative; font-family: arial; transform: scale(0.9); transform-origin: left; white-space: pre; opacity: 0.7; margin: 0 10px; z-index: 1; } .ace_ghost_text { opacity: 0.5; font-style: italic; } .ace_ghost_text_container > div { white-space: pre; } .ghost_text_line_wrapped::after { content: "\u21A9"; position: absolute; } .ace_lineWidgetContainer.ace_ghost_text { margin: 0px 4px } .ace_screenreader-only { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; } .ace_hidden_token { display: none; }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,p,g){var m=e("../lib/dom"),s=e("../lib/oop"),d=e("../lib/event_emitter").EventEmitter,i=function(){function f(r,o){this.parentEl=r,this.canvas=m.createElement("canvas"),this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)"},this.setDimensions(),r.element.appendChild(this.canvas)}return f.prototype.$updateDecorators=function(r){var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(r);var t=this.canvas.getContext("2d");function l(O,k){return O.priorityk.priority?1:0}var a=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),a){var u={info:1,warning:2,error:3};a.forEach(function(O){O.priority=u[O.type]||null}),a=a.sort(l);for(var h=0;hthis.canvasHeight&&(S=this.canvasHeight-this.halfMinDecorationHeight),y=Math.round(S-this.halfMinDecorationHeight),_=Math.round(S+this.halfMinDecorationHeight)}t.fillStyle=o[a[h].type]||null,t.fillRect(0,w,this.canvasWidth,_-y)}}var M=this.renderer.session.selection.getCursor();if(M){var v=this.compensateFoldRows(M.row),w=Math.round((M.row-v)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,w,this.canvasWidth,2)}},f.prototype.compensateFoldRows=function(r){var o=this.renderer.session.$foldData,t=0;if(o&&o.length>0)for(var l=0;lo[l].start.row&&r=o[l].end.row&&(t+=o[l].end.row-o[l].start.row);return t},f.prototype.compensateLineWidgets=function(r){var o=this.renderer.session.widgetManager;if(o){var t=0;return o.lineWidgets.forEach(function(l,a){r>a&&(t+=l.rowCount||0)}),t-1}return 0},f.prototype.setDimensions=function(r){r?(this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height,this.maxHeightk&&(this.$changedLines.firstRow=k),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(k){k?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(k,A,T,E){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=k?1:0;var C=this.container;E||(E=C.clientHeight||C.scrollHeight),!E&&this.$maxLines&&this.lineHeight>1&&(!C.style.height||C.style.height=="0px")&&(C.style.height="1px",E=C.clientHeight||C.scrollHeight),T||(T=C.clientWidth||C.scrollWidth);var x=this.$updateCachedSize(k,A,T,E);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!T&&!E)return this.resizing=0;k&&(this.$gutterLayer.$padding=null),k?this.$renderChanges(x|this.$changes,!0):this.$loop.schedule(x|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},O.prototype.$updateCachedSize=function(k,A,T,E){E-=this.$extraHeight||0;var C=0,x=this.$size,L={width:x.width,height:x.height,scrollerHeight:x.scrollerHeight,scrollerWidth:x.scrollerWidth};if(E&&(k||x.height!=E)&&(x.height=E,C|=this.CHANGE_SIZE,x.scrollerHeight=x.height,this.$horizScroll&&(x.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(x.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",C=C|this.CHANGE_SCROLL),T&&(k||x.width!=T)){C|=this.CHANGE_SIZE,x.width=T,A==null&&(A=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=A,s.setStyle(this.scrollBarH.element.style,"left",A+"px"),s.setStyle(this.scroller.style,"left",A+this.margin.left+"px"),x.scrollerWidth=Math.max(0,T-A-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var q=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",q),s.setStyle(this.scroller.style,"right",q),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(x.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||k)&&(C|=this.CHANGE_FULL)}return x.$dirty=!T||!E,C&&this._signal("resize",L),C},O.prototype.onGutterResize=function(k){var A=this.$showGutter?k:0;A!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,A,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 k=this.$size.scrollerWidth-this.$padding*2,A=Math.floor(k/this.characterWidth);return this.session.adjustWrapLimit(A,this.$showPrintMargin&&this.$printMarginColumn)},O.prototype.setAnimatedScroll=function(k){this.setOption("animatedScroll",k)},O.prototype.getAnimatedScroll=function(){return this.$animatedScroll},O.prototype.setShowInvisibles=function(k){this.setOption("showInvisibles",k),this.session.$bidiHandler.setShowInvisibles(k)},O.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},O.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},O.prototype.setDisplayIndentGuides=function(k){this.setOption("displayIndentGuides",k)},O.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},O.prototype.setHighlightIndentGuides=function(k){this.setOption("highlightIndentGuides",k)},O.prototype.setShowPrintMargin=function(k){this.setOption("showPrintMargin",k)},O.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},O.prototype.setPrintMarginColumn=function(k){this.setOption("printMarginColumn",k)},O.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},O.prototype.getShowGutter=function(){return this.getOption("showGutter")},O.prototype.setShowGutter=function(k){return this.setOption("showGutter",k)},O.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},O.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},O.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},O.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},O.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var k=s.createElement("div");k.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",k.appendChild(this.$printMarginEl),this.content.insertBefore(k,this.content.firstChild)}var A=this.$printMarginEl.style;A.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",A.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 k=this.textarea.style,A=this.$composition;if(!this.$keepTextAreaAtCursor&&!A){s.translate(this.textarea,-100,0);return}var T=this.$cursorLayer.$pixelPos;if(!!T){A&&A.markerRange&&(T=this.$cursorLayer.getPixelPosition(A.markerRange.start,!0));var E=this.layerConfig,C=T.top,x=T.left;C-=E.offset;var L=A&&A.useTextareaForIME||b.isMobile?this.lineHeight:1;if(C<0||C>E.height-L){s.translate(this.textarea,0,0);return}var q=1,N=this.$size.height-L;if(!A)C+=this.lineHeight;else if(A.useTextareaForIME){var F=this.textarea.value;q=this.characterWidth*this.session.$getStringScreenWidth(F)[0]}else C+=this.lineHeight+2;x-=this.scrollLeft,x>this.$size.scrollerWidth-q&&(x=this.$size.scrollerWidth-q),x+=this.gutterWidth+this.margin.left,s.setStyle(k,"height",L+"px"),s.setStyle(k,"width",q+"px"),s.translate(this.textarea,Math.min(x,this.$size.scrollerWidth-q),Math.min(C,N))}}},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 k=this.layerConfig,A=k.lastRow,T=this.session.documentToScreenRow(A,0)*k.lineHeight;return T-this.session.getScrollTop()>k.height-k.lineHeight?A-1:A},O.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},O.prototype.setPadding=function(k){this.$padding=k,this.$textLayer.setPadding(k),this.$cursorLayer.setPadding(k),this.$markerFront.setPadding(k),this.$markerBack.setPadding(k),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},O.prototype.setScrollMargin=function(k,A,T,E){var C=this.scrollMargin;C.top=k|0,C.bottom=A|0,C.right=E|0,C.left=T|0,C.v=C.top+C.bottom,C.h=C.left+C.right,C.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-C.top),this.updateFull()},O.prototype.setMargin=function(k,A,T,E){var C=this.margin;C.top=k|0,C.bottom=A|0,C.right=E|0,C.left=T|0,C.v=C.top+C.bottom,C.h=C.left+C.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},O.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},O.prototype.setHScrollBarAlwaysVisible=function(k){this.setOption("hScrollBarAlwaysVisible",k)},O.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},O.prototype.setVScrollBarAlwaysVisible=function(k){this.setOption("vScrollBarAlwaysVisible",k)},O.prototype.$updateScrollBarV=function(){var k=this.layerConfig.maxHeight,A=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(k-=(A-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>k-A&&(k=this.scrollTop+A,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(k+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(k,A){if(this.$changes&&(k|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!k&&!A){this.$changes|=k;return}if(this.$size.$dirty)return this.$changes|=k,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",k),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var T=this.layerConfig;if(k&this.CHANGE_FULL||k&this.CHANGE_SIZE||k&this.CHANGE_TEXT||k&this.CHANGE_LINES||k&this.CHANGE_SCROLL||k&this.CHANGE_H_SCROLL){if(k|=this.$computeLayerConfig()|this.$loop.clear(),T.firstRow!=this.layerConfig.firstRow&&T.firstRowScreen==this.layerConfig.firstRowScreen){var E=this.scrollTop+(T.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;E>0&&(this.scrollTop=E,k=k|this.CHANGE_SCROLL,k|=this.$computeLayerConfig()|this.$loop.clear())}T=this.layerConfig,this.$updateScrollBarV(),k&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-T.offset);var C=T.width+2*this.$padding+"px",x=T.minHeight+"px";s.setStyle(this.content.style,"width",C),s.setStyle(this.content.style,"height",x)}if(k&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-T.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),k&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(T),this.$showGutter&&this.$gutterLayer.update(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T),this.$markerBack.update(T),this.$markerFront.update(T),this.$cursorLayer.update(T),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}if(k&this.CHANGE_SCROLL){this.$changedLines=null,k&this.CHANGE_TEXT||k&this.CHANGE_LINES?this.$textLayer.update(T):this.$textLayer.scrollLines(T),this.$showGutter&&(k&this.CHANGE_GUTTER||k&this.CHANGE_LINES?this.$gutterLayer.update(T):this.$gutterLayer.scrollLines(T)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T),this.$markerBack.update(T),this.$markerFront.update(T),this.$cursorLayer.update(T),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}k&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(T),this.$showGutter&&this.$gutterLayer.update(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T)):k&this.CHANGE_LINES?((this.$updateLines()||k&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T)):k&this.CHANGE_TEXT||k&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T)):k&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(T),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(T)),k&this.CHANGE_CURSOR&&(this.$cursorLayer.update(T),this.$moveTextAreaToCursor()),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(T),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(T),this._signal("afterRender",k)},O.prototype.$autosize=function(){var k=this.session.getScreenLength()*this.lineHeight,A=this.$maxLines*this.lineHeight,T=Math.min(A,Math.max((this.$minLines||1)*this.lineHeight,k))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(T+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&T>this.$maxPixelHeight&&(T=this.$maxPixelHeight);var E=T<=2*this.lineHeight,C=!E&&k>A;if(T!=this.desiredHeight||this.$size.height!=this.desiredHeight||C!=this.$vScroll){C!=this.$vScroll&&(this.$vScroll=C,this.scrollBarV.setVisible(C));var x=this.container.clientWidth;this.container.style.height=T+"px",this.$updateCachedSize(!0,this.$gutterWidth,x,T),this.desiredHeight=T,this._signal("autosize")}},O.prototype.$computeLayerConfig=function(){var k=this.session,A=this.$size,T=A.height<=2*this.lineHeight,E=this.session.getScreenLength(),C=E*this.lineHeight,x=this.$getLongestLine(),L=!T&&(this.$hScrollBarAlwaysVisible||A.scrollerWidth-x-2*this.$padding<0),q=this.$horizScroll!==L;q&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var N=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),T=A.height<=2*this.lineHeight);var F=A.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(A.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;C+=I;var R=this.scrollMargin;this.session.setScrollTop(Math.max(-R.top,Math.min(this.scrollTop,C-A.scrollerHeight+R.bottom))),this.session.setScrollLeft(Math.max(-R.left,Math.min(this.scrollLeft,x+2*this.$padding-A.scrollerWidth+R.right)));var B=!T&&(this.$vScrollBarAlwaysVisible||A.scrollerHeight-C+I<0||this.scrollTop>R.top),D=N!==B;D&&(this.$vScroll=B,this.scrollBarV.setVisible(B));var P=this.scrollTop%this.lineHeight,j=Math.ceil(F/this.lineHeight)-1,V=Math.max(0,Math.round((this.scrollTop-P)/this.lineHeight)),W=V+j,H,z,U=this.lineHeight;V=k.screenToDocumentRow(V,0);var Z=k.getFoldLine(V);Z&&(V=Z.start.row),H=k.documentToScreenRow(V,0),z=k.getRowLength(V)*U,W=Math.min(k.screenToDocumentRow(W,0),k.getLength()-1),F=A.scrollerHeight+k.getRowLength(W)*U+z,P=this.scrollTop-H*U;var ne=0;return(this.layerConfig.width!=x||q)&&(ne=this.CHANGE_H_SCROLL),(q||D)&&(ne|=this.$updateCachedSize(!0,this.gutterWidth,A.width,A.height),this._signal("scrollbarVisibilityChanged"),D&&(x=this.$getLongestLine())),this.layerConfig={width:x,padding:this.$padding,firstRow:V,firstRowScreen:H,lastRow:W,lineHeight:U,characterWidth:this.characterWidth,minHeight:F,maxHeight:C,offset:P,gutterOffset:U?Math.max(0,Math.ceil((P+A.height-A.scrollerHeight)/U)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(x-this.$padding),ne},O.prototype.$updateLines=function(){if(!!this.$changedLines){var k=this.$changedLines.firstRow,A=this.$changedLines.lastRow;this.$changedLines=null;var T=this.layerConfig;if(!(k>T.lastRow+1)&&!(Athis.$textLayer.MAX_LINE_LENGTH&&(k=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(k*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(k,A){this.$gutterLayer.addGutterDecoration(k,A)},O.prototype.removeGutterDecoration=function(k,A){this.$gutterLayer.removeGutterDecoration(k,A)},O.prototype.updateBreakpoints=function(k){this._rows=k,this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.setAnnotations=function(k){this.$gutterLayer.setAnnotations(k),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(k,A,T){this.scrollCursorIntoView(k,T),this.scrollCursorIntoView(A,T)},O.prototype.scrollCursorIntoView=function(k,A,T){if(this.$size.scrollerHeight!==0){var E=this.$cursorLayer.getPixelPosition(k),C=E.left,x=E.top,L=T&&T.top||0,q=T&&T.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var N=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;N+L>x?(A&&N+L>x+this.lineHeight&&(x-=A*this.$size.scrollerHeight),x===0&&(x=-this.scrollMargin.top),this.session.setScrollTop(x)):N+this.$size.scrollerHeight-q=1-this.scrollMargin.top||A>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||k<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||k>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},O.prototype.pixelToScreenCoordinates=function(k,A){var T;if(this.$hasCssTransforms){T={top:0,left:0};var E=this.$fontMetrics.transformCoordinates([k,A]);k=E[1]-this.gutterWidth-this.margin.left,A=E[0]}else T=this.scroller.getBoundingClientRect();var C=k+this.scrollLeft-T.left-this.$padding,x=C/this.characterWidth,L=Math.floor((A+this.scrollTop-T.top)/this.lineHeight),q=this.$blockCursor?Math.floor(x):Math.round(x);return{row:L,column:q,side:x-q>0?1:-1,offsetX:C}},O.prototype.screenToTextCoordinates=function(k,A){var T;if(this.$hasCssTransforms){T={top:0,left:0};var E=this.$fontMetrics.transformCoordinates([k,A]);k=E[1]-this.gutterWidth-this.margin.left,A=E[0]}else T=this.scroller.getBoundingClientRect();var C=k+this.scrollLeft-T.left-this.$padding,x=C/this.characterWidth,L=this.$blockCursor?Math.floor(x):Math.round(x),q=Math.floor((A+this.scrollTop-T.top)/this.lineHeight);return this.session.screenToDocumentPosition(q,Math.max(L,0),C)},O.prototype.textToScreenCoordinates=function(k,A){var T=this.scroller.getBoundingClientRect(),E=this.session.documentToScreenPosition(k,A),C=this.$padding+(this.session.$bidiHandler.isBidiRow(E.row,k)?this.session.$bidiHandler.getPosLeft(E.column):Math.round(E.column*this.characterWidth)),x=E.row*this.lineHeight;return{pageX:T.left+C-this.scrollLeft,pageY:T.top+x-this.scrollTop}},O.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},O.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},O.prototype.showComposition=function(k){this.$composition=k,k.cssText||(k.cssText=this.textarea.style.cssText),k.useTextareaForIME==null&&(k.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):k.markerId=this.session.addMarker(k.markerRange,"ace_composition_marker","text")},O.prototype.setCompositionText=function(k){var A=this.session.selection.cursor;this.addToken(k,"composition_placeholder",A.row,A.column),this.$moveTextAreaToCursor()},O.prototype.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var k=this.session.selection.cursor;this.removeExtraToken(k.row,k.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},O.prototype.setGhostText=function(k,A){var T=this.session.selection.cursor,E=A||{row:T.row,column:T.column};this.removeGhostText();var C=this.$calculateWrappedTextChunks(k,E);this.addToken(C[0].text,"ghost_text",E.row,E.column),this.$ghostText={text:k,position:{row:E.row,column:E.column}};var x=s.createElement("div");if(C.length>1){var L=this.hideTokensAfterPosition(E.row,E.column),q;C.slice(1).forEach(function(D){var P=s.createElement("div"),j=s.createElement("span");j.className="ace_ghost_text",D.wrapped&&(P.className="ghost_text_line_wrapped"),D.text.length===0&&(D.text=" "),j.appendChild(s.createTextNode(D.text)),P.appendChild(j),x.appendChild(P),q=P}),L.forEach(function(D){var P=s.createElement("span");S(D.type)||(P.className="ace_"+D.type.replace(/\./g," ace_")),P.appendChild(s.createTextNode(D.value)),q.appendChild(P)}),this.$ghostTextWidget={el:x,row:E.row,column:E.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var N=this.$cursorLayer.getPixelPosition(E,!0),F=this.container,I=F.getBoundingClientRect().height,R=C.length*this.lineHeight,B=R0){var F=0;N.push(C[L].length);for(var I=0;I1||Math.abs(k.$size.height-E)>1?k.$resizeTimer.delay():k.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},O}();M.prototype.CHANGE_CURSOR=1,M.prototype.CHANGE_MARKER=2,M.prototype.CHANGE_GUTTER=4,M.prototype.CHANGE_SCROLL=8,M.prototype.CHANGE_LINES=16,M.prototype.CHANGE_TEXT=32,M.prototype.CHANGE_SIZE=64,M.prototype.CHANGE_MARKER_BACK=128,M.prototype.CHANGE_MARKER_FRONT=256,M.prototype.CHANGE_FULL=512,M.prototype.CHANGE_H_SCROLL=1024,M.prototype.$changes=0,M.prototype.$padding=null,M.prototype.$frozen=!1,M.prototype.STEPS=8,m.implement(M.prototype,w),i.defineOptions(M.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){s.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:!b.isMobile&&!b.isIE}}),p.VirtualRenderer=M}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,p,g){var m=e("../lib/oop"),s=e("../lib/net"),d=e("../lib/event_emitter").EventEmitter,i=e("../config");function f(l){var a="importScripts('"+s.qualifyURL(l)+"');";try{return new Blob([a],{type:"application/javascript"})}catch{var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new u;return h.append(a),h.getBlob("application/javascript")}}function r(l){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(i.get("loadWorkerFromBlob")){var a=f(l),u=window.URL||window.webkitURL,h=u.createObjectURL(a);return new Worker(h)}return new Worker(l)}var o=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,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(){m.implement(this,d),this.$createWorkerFromOldConfig=function(l,a,u,h,$){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),i.get("packaged")||!e.toUrl)h=h||i.moduleUrl(a,"worker");else{var v=this.$normalizePath;h=h||v(e.toUrl("ace/worker/worker.js",null,"_"));var w={};l.forEach(function(y){w[y]=v(e.toUrl(y,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(h),$&&this.send("importScripts",$),this.$worker.postMessage({init:!0,tlns:w,module:a,classname:u}),this.$worker},this.onMessage=function(l){var a=l.data;switch(a.type){case"event":this._signal(a.name,{data:a.data});break;case"call":var u=this.callbacks[a.id];u&&(u(a.data),delete this.callbacks[a.id]);break;case"error":this.reportError(a.data);break;case"log":window.console&&console.log&&console.log.apply(console,a.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return s.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,a){this.$worker.postMessage({command:l,args:a})},this.call=function(l,a,u){if(u){var h=this.callbackId++;this.callbacks[h]=u,a.push(h)}this.send(l,a)},this.emit=function(l,a){try{a.data&&a.data.err&&(a.data.err={message:a.data.err.message,stack:a.data.err.stack,code:a.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:a.data}})}catch(u){console.error(u.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;!l||(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(o.prototype);var t=function(l,a,u){var h=null,$=!1,v=Object.create(d),w=[],y=new o({messageBuffer:w,terminate:function(){},postMessage:function(b){w.push(b),!!h&&($?setTimeout(_):_())}});y.setEmitSync=function(b){$=b};var _=function(){var b=w.shift();b.command?h[b.command].apply(h,b.args):b.event&&v._signal(b.event,b.data)};return v.postMessage=function(b){y.onMessage({data:b})},v.callback=function(b,S){this.postMessage({type:"call",id:S,data:b})},v.emit=function(b,S){this.postMessage({type:"event",name:b,data:S})},i.loadModule(["worker",a],function(b){for(h=new b[u](v);w.length;)_()}),y};p.UIWorkerClient=t,p.WorkerClient=o,p.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,p,g){var m=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,d=e("./lib/oop"),i=function(){function f(r,o,t,l,a,u){var h=this;this.length=o,this.session=r,this.doc=r.getDocument(),this.mainClass=a,this.othersClass=u,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){h.onCursorChange()})},this.$pos=t;var $=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=$.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var r=this,o=this.doc,t=this.session;this.selectionBefore=t.selection.toJSON(),t.selection.inMultiSelectMode&&t.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=t.addMarker(new m(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(a){var u=o.createAnchor(a.row,a.column);u.$insertRight=!0,u.detach(),r.others.push(u)}),t.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,o=this;this.othersActive=!0,this.others.forEach(function(t){t.markerId=r.addMarker(new m(t.row,t.column,t.row,t.column+o.length),o.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var r=0;r=this.pos.column&&o.start.column<=this.pos.column+this.length+1,a=o.start.column-this.pos.column;if(this.updateAnchors(r),l&&(this.length+=t),l&&!this.session.$fromUndo){if(r.action==="insert")for(var u=this.others.length-1;u>=0;u--){var h=this.others[u],$={row:h.row,column:h.column+a};this.doc.insertMergedLines($,r.lines)}else if(r.action==="remove")for(var u=this.others.length-1;u>=0;u--){var h=this.others[u],$={row:h.row,column:h.column+a};this.doc.remove(new m($.row,$.column,$.row,$.column-t))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var o=this.others.length;o--;)this.others[o].onChange(r);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var r=this,o=this.session,t=function(a,u){o.removeMarker(a.markerId),a.markerId=o.addMarker(new m(a.row,a.column,a.row,a.column+r.length),u,null,!1)};t(this.pos,this.mainClass);for(var l=this.others.length;l--;)t(this.others[l],this.othersClass)}},f.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},f.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},f.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),o=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,t=0;t1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.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(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var m=e("../keyboard/hash_handler").HashHandler;p.keyboardHandler=new m(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,g){var m=e("./range_list").RangeList,s=e("./range").Range,d=e("./selection").Selection,i=e("./mouse/multi_select_handler").onMouseDown,f=e("./lib/event"),r=e("./lib/lang"),o=e("./commands/multi_select_commands");p.commands=o.defaultCommands.concat(o.multiSelectCommands);var t=e("./search").Search,l=new t;function a(y,_,b){return l.$options.wrap=!0,l.$options.needle=_,l.$options.backwards=b==-1,l.find(y)}var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(y,_){if(!!y){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(y),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(y);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}y.cursor||(y.cursor=y.end);var S=this.rangeList.add(y);return this.$onAddRange(y),S.length&&this.$onRemoveRange(S),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange(y)}},this.toSingleRange=function(y){y=y||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),y&&this.fromOrientedRange(y)},this.substractPoint=function(y){var _=this.rangeList.substractPoint(y);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var y=this.rangeList.merge();y.length&&this.$onRemoveRange(y)},this.$onAddRange=function(y){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(y),this._signal("addRange",{range:y})},this.$onRemoveRange=function(y){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();y.push(_),this.rangeCount=0}for(var b=y.length;b--;){var S=this.ranges.indexOf(y[b]);this.ranges.splice(S,1)}this._signal("removeRange",{ranges:y}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new m,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var y=this.ranges.length?this.ranges:[this.getRange()],_=[],b=0;b1){var y=this.rangeList.ranges,_=y[y.length-1],b=s.fromPoints(y[0].start,_.end);this.toSingleRange(),this.setSelectionRange(b,_.cursor==_.start)}else{var S=this.session.documentToScreenPosition(this.cursor),M=this.session.documentToScreenPosition(this.anchor),O=this.rectangularRangeBlock(S,M);O.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(y,_,b){var S=[],M=y.column<_.column;if(M)var O=y.column,k=_.column,A=y.offsetX,T=_.offsetX;else var O=_.column,k=y.column,A=_.offsetX,T=y.offsetX;var E=y.row<_.row;if(E)var C=y.row,x=_.row;else var C=_.row,x=y.row;O<0&&(O=0),C<0&&(C=0),C==x&&(b=!0);for(var L,q=C;q<=x;q++){var N=s.fromPoints(this.session.screenToDocumentPosition(q,O,A),this.session.screenToDocumentPosition(q,k,T));if(N.isEmpty()){if(L&&$(N.end,L))break;L=N.end}N.cursor=M?N.start:N.end,S.push(N)}if(E&&S.reverse(),!b){for(var F=S.length-1;S[F].isEmpty()&&F>0;)F--;if(F>0)for(var I=0;S[I].isEmpty();)I++;for(var R=F;R>=I;R--)S[R].isEmpty()&&S.splice(R,1)}return S}}.call(d.prototype);var h=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(y){y.cursor||(y.cursor=y.end);var _=this.getSelectionStyle();return y.marker=this.session.addMarker(y,"ace_selection",_),this.session.$selectionMarkers.push(y),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,y},this.removeSelectionMarker=function(y){if(!!y.marker){this.session.removeMarker(y.marker);var _=this.session.$selectionMarkers.indexOf(y);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(y){for(var _=this.session.$selectionMarkers,b=y.length;b--;){var S=y[b];if(!!S.marker){this.session.removeMarker(S.marker);var M=_.indexOf(S);M!=-1&&_.splice(M,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(y){this.addSelectionMarker(y.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(y){this.removeSelectionMarkers(y.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(y){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(y){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(y){var _=y.command,b=y.editor;if(!!b.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?S=b.forEachSelection(_,y.args):_.multiSelectAction=="forEachLine"?S=b.forEachSelection(_,y.args,!0):_.multiSelectAction=="single"?(b.exitMultiSelectMode(),S=_.exec(b,y.args||{})):S=_.multiSelectAction(b,y.args||{});else{var S=_.exec(b,y.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return S}},this.forEachSelection=function(y,_,b){if(!this.inVirtualSelectionMode){var S=b&&b.keepOrder,M=b==!0||b&&b.$byLines,O=this.session,k=this.selection,A=k.rangeList,T=(S?k:A).ranges,E;if(!T.length)return y.exec?y.exec(this,_||{}):y(this,_||{});var C=k._eventRegistry;k._eventRegistry={};var x=new d(O);this.inVirtualSelectionMode=!0;for(var L=T.length;L--;){if(M)for(;L>0&&T[L].start.row==T[L-1].end.row;)L--;x.fromOrientedRange(T[L]),x.index=L,this.selection=O.selection=x;var q=y.exec?y.exec(this,_||{}):y(this,_||{});!E&&q!==void 0&&(E=q),x.toOrientedRange(T[L])}x.detach(),this.selection=O.selection=k,this.inVirtualSelectionMode=!1,k._eventRegistry=C,k.mergeOverlappingRanges(),k.ranges[0]&&k.fromOrientedRange(k.ranges[0]);var N=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),N&&N.from==N.to&&this.renderer.animateScrolling(N.from),E}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var y="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,b=[],S=0;S<_.length;S++)b.push(this.session.getTextRange(_[S]));var M=this.session.getDocument().getNewLineCharacter();y=b.join(M),y.length==(b.length-1)*M.length&&(y="")}else this.selection.isEmpty()||(y=this.session.getTextRange(this.getSelectionRange()));return y},this.$checkMultiselectChange=function(y,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var S=_==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;S.row!=_.row||this.session.$clipPositionToDocument(S.row,S.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(y,_,b){if(_=_||{},_.needle=y||_.needle,_.needle==null){var S=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(S)}this.$search.set(_);var M=this.$search.findAll(this.session);if(!M.length)return 0;var O=this.multiSelect;b||O.toSingleRange(M[0]);for(var k=M.length;k--;)O.addRange(M[k],!0);return S&&O.rangeList.rangeAtPoint(S.start)&&O.addRange(S,!0),M.length},this.selectMoreLines=function(y,_){var b=this.selection.toOrientedRange(),S=b.cursor==b.end,M=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(M.column=this.selection.$desiredColumn);var O=this.session.screenToDocumentPosition(M.row+y,M.column);if(b.isEmpty())var A=O;else var k=this.session.documentToScreenPosition(S?b.end:b.start),A=this.session.screenToDocumentPosition(k.row+y,k.column);if(S){var T=s.fromPoints(O,A);T.cursor=T.start}else{var T=s.fromPoints(A,O);T.cursor=T.end}if(T.desiredColumn=M.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(_)var E=b.cursor;this.selection.addRange(T),E&&this.selection.substractPoint(E)},this.transposeSelections=function(y){for(var _=this.session,b=_.multiSelect,S=b.ranges,M=S.length;M--;){var O=S[M];if(O.isEmpty()){var k=_.getWordRange(O.start.row,O.start.column);O.start.row=k.start.row,O.start.column=k.start.column,O.end.row=k.end.row,O.end.column=k.end.column}}b.mergeOverlappingRanges();for(var A=[],M=S.length;M--;){var O=S[M];A.unshift(_.getTextRange(O))}y<0?A.unshift(A.pop()):A.push(A.shift());for(var M=S.length;M--;){var O=S[M],T=O.clone();_.replace(O,A[M]),O.start.row=T.start.row,O.start.column=T.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(y,_,b){var S=this.session,M=S.multiSelect,O=M.toOrientedRange();if(!(O.isEmpty()&&(O=S.getWordRange(O.start.row,O.start.column),O.cursor=y==-1?O.start:O.end,this.multiSelect.addRange(O),b))){var k=S.getTextRange(O),A=a(S,k,y);A&&(A.cursor=y==-1?A.start:A.end,this.session.unfold(A),this.multiSelect.addRange(A),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(O.cursor)}},this.alignCursors=function(){var y=this.session,_=y.multiSelect,b=_.ranges,S=-1,M=b.filter(function(F){if(F.cursor.row==S)return!0;S=F.cursor.row});if(!b.length||M.length==b.length-1){var O=this.selection.getRange(),k=O.start.row,A=O.end.row,T=k==A;if(T){var E=this.session.getLength(),C;do C=this.session.getLine(A);while(/[=:]/.test(C)&&++A0);k<0&&(k=0),A>=E&&(A=E-1)}var x=this.session.removeFullLines(k,A);x=this.$reAlignText(x,T),this.session.insert({row:k,column:0},x.join(` `)+` `),T||(O.start.column=0,O.end.column=x[x.length-1].length),this.selection.setRange(O)}else{M.forEach(function(F){_.substractPoint(F.cursor)});var L=0,q=1/0,N=b.map(function(F){var I=F.cursor,R=y.getLine(I.row),B=R.substr(I.column).search(/\S/g);return B==-1&&(B=0),I.column>L&&(L=I.column),BD?y.insert(R,r.stringRepeat(" ",B-D)):y.remove(new s(R.row,R.column,R.row,R.column-B+D)),F.start.column=F.end.column=L,F.start.row=F.end.row=R.row,F.cursor=F.end}),_.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(y,_){var b=!0,S=!0,M,O,k;return y.map(function(x){var L=x.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?M==null?(M=L[1].length,O=L[2].length,k=L[3].length,L):(M+O+k!=L[1].length+L[2].length+L[3].length&&(S=!1),M!=L[1].length&&(b=!1),M>L[1].length&&(M=L[1].length),OL[3].length&&(k=L[3].length),L):[x]}).map(_?T:b?S?E:T:C);function A(x){return r.stringRepeat(" ",x)}function T(x){return x[2]?A(M)+x[2]+A(O-x[2].length+k)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}function E(x){return x[2]?A(M+O-x[2].length)+x[2]+A(k)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}function C(x){return x[2]?A(M)+x[2]+A(k)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}}}).call(h.prototype);function $(y,_){return y.row==_.row&&y.column==_.column}p.onSessionChange=function(y){var _=y.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var b=y.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(y){y.$multiselectOnSessionChange||(y.$onAddRange=y.$onAddRange.bind(y),y.$onRemoveRange=y.$onRemoveRange.bind(y),y.$onMultiSelect=y.$onMultiSelect.bind(y),y.$onSingleSelect=y.$onSingleSelect.bind(y),y.$multiselectOnSessionChange=p.onSessionChange.bind(y),y.$checkMultiselectChange=y.$checkMultiselectChange.bind(y),y.$multiselectOnSessionChange(y),y.on("changeSession",y.$multiselectOnSessionChange),y.on("mousedown",i),y.commands.addCommands(o.defaultCommands),w(y))}function w(y){if(!y.textInput)return;var _=y.textInput.getElement(),b=!1;f.addListener(_,"keydown",function(M){var O=M.keyCode==18&&!(M.ctrlKey||M.shiftKey||M.metaKey);y.$blockSelectEnabled&&O?b||(y.renderer.setMouseCursor("crosshair"),b=!0):b&&S()},y),f.addListener(_,"keyup",S,y),f.addListener(_,"blur",S,y);function S(M){b&&(y.renderer.setMouseCursor(""),b=!1)}}p.MultiSelect=v,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(y){v(this),y?this.on("mousedown",i):this.off("mousedown",i)},value:!0},enableBlockSelect:{set:function(y){this.$blockSelectEnabled=y},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,p,g){var m=e("../../range").Range,s=p.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,i,f){var r=d.getLine(f);return this.foldingStartMarker.test(r)?"start":i=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(d,i,f){return null},this.indentationBlock=function(d,i,f){var r=/\S/,o=d.getLine(i),t=o.search(r);if(t!=-1){for(var l=f||o.length,a=d.getLength(),u=i,h=i;++iu){var w=d.getLine(h).length;return new m(u,l,h,w)}}},this.openingBracketBlock=function(d,i,f,r,o){var t={row:f,column:r+1},l=d.$findClosingBracket(i,t,o);if(!!l){var a=d.foldWidgets[l.row];return a==null&&(a=d.getFoldWidget(l.row)),a=="start"&&l.row>t.row&&(l.row--,l.column=d.getLine(l.row).length),m.fromPoints(t,l)}},this.closingBracketBlock=function(d,i,f,r,o){var t={row:f,column:r},l=d.$findOpeningBracket(i,t);if(!!l)return l.column++,t.column--,m.fromPoints(l,t)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,p,g){var m=e("../lib/dom"),s=e("../range").Range,d=e("../config").nls;function i(r,o,t){for(var l=0,a=r.length-1;l<=a;){var u=l+a>>1,h=t(o,r[u]);if(h>0)l=u+1;else if(h<0)a=u-1;else return u}return-(l+1)}function f(r,o,t){var l=r.getAnnotations().sort(s.comparePoints);if(!!l.length){var a=i(l,{row:o,column:-1},s.comparePoints);a<0&&(a=-a-1),a>=l.length?a=t>0?0:l.length-1:a===0&&t<0&&(a=l.length-1);var u=l[a];if(!(!u||!t)){if(u.row===o){do u=l[a+=t];while(u&&u.row===o);if(!u)return l.slice()}var h=[];o=u.row;do h[t<0?"unshift":"push"](u),u=l[a+=t];while(u&&u.row==o);return h.length&&h}}}p.showErrorMarker=function(r,o){var t=r.session,l=r.getCursorPosition(),a=l.row,u=t.widgetManager.getWidgetsAtRow(a).filter(function(M){return M.type=="errorMarker"})[0];u?u.destroy():a-=o;var h=f(t,a,o),$;if(h){var v=h[0];l.column=(v.pos&&typeof v.column!="number"?v.pos.sc:v.column)||0,l.row=v.row,$=r.renderer.$gutterLayer.$annotations[l.row]}else{if(u)return;$={displayText:[d("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(l.row),r.selection.moveToPosition(l);var w={row:l.row,fixedWidth:!0,coverGutter:!0,el:m.createElement("div"),type:"errorMarker"},y=w.el.appendChild(m.createElement("div")),_=w.el.appendChild(m.createElement("div"));_.className="error_widget_arrow "+$.className;var b=r.renderer.$cursorLayer.getPixelPosition(l).left;_.style.left=b+r.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",y.className="error_widget "+$.className,$.displayText.forEach(function(M,O){y.appendChild(m.createTextNode(M)),O<$.displayText.length-1&&y.appendChild(m.createElement("br"))}),y.appendChild(m.createElement("div"));var S=function(M,O,k){if(O===0&&(k==="esc"||k==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(S),t.widgetManager.removeLineWidget(w),r.off("changeSelection",w.destroy),r.off("changeSession",w.destroy),r.off("mouseup",w.destroy),r.off("change",w.destroy))},r.keyBinding.addKeyboardHandler(S),r.on("changeSelection",w.destroy),r.on("changeSession",w.destroy),r.on("mouseup",w.destroy),r.on("change",w.destroy),r.session.widgetManager.addLineWidget(w),w.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},m.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,g){e("./loader_build")(p);var m=e("./lib/dom"),s=e("./range").Range,d=e("./editor").Editor,i=e("./edit_session").EditSession,f=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 a=t;if(t=document.getElementById(a),!t)throw new Error("ace.edit can't find div #"+a)}if(t&&t.env&&t.env.editor instanceof d)return t.env.editor;var u="";if(t&&/input|textarea/i.test(t.tagName)){var h=t;u=h.value,t=m.createElement("pre"),h.parentNode.replaceChild(t,h)}else t&&(u=t.textContent,t.innerHTML="");var $=p.createEditSession(u),v=new d(new r(t),$,l),w={document:$,editor:v,onResize:v.resize.bind(v,null)};return h&&(w.textarea=h),v.on("destroy",function(){w.editor.container.env=null}),v.container.env=v.env=w,v},p.createEditSession=function(t,l){var a=new i(t,l);return a.setUndoManager(new f),a},p.Range=s,p.Editor=d,p.EditSession=i,p.UndoManager=f,p.VirtualRenderer=r;var o=p.config.version;p.version=o}),function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var p=function(){return this}();!p&&typeof window!="undefined"&&(p=window),!p&&typeof self!="undefined"&&(p=self),p.ace||(p.ace=e);for(var g in e)e.hasOwnProperty(g)&&(p.ace[g]=e[g]);p.ace.default=p.ace,n&&(n.exports=p.ace)})}()})(ace$2);var ace$1=ace$2.exports,themeSqlserver={exports:{}};(function(n,c){ace.define("ace/theme/sqlserver-css",["require","exports","module"],function(e,p,g){g.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,g){p.isDark=!1,p.cssClass="ace-sqlserver",p.cssText=e("./sqlserver-css");var m=e("../lib/dom");m.importCssString(p.cssText,p.cssClass,!1)}),function(){ace.require(["ace/theme/sqlserver"],function(e){n&&(n.exports=e)})}()})(themeSqlserver);var modeJavascript={exports:{}};(function(n,c){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,p,g){var m=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.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.doc","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.doc"}]},{token:["comment.doc.tag","text.doc","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.doc"}]},{token:["comment.doc.tag","text.doc","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.doc","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|$)"},d.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};m.inherits(d,s),d.getTagRule=function(i){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},d.getStartRule=function(i){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:i}},d.getEndRule=function(i){return{token:"comment.doc",regex:"\\*\\/",next:i}},p.JsDocCommentHighlightRules=d}),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,g){function m(){var t=r.replace("\\d","\\d\\-"),l={onMatch:function(u,h,$){var v=u.charAt(1)=="/"?2:1;return v==1?(h!=this.nextState?$.unshift(this.next,this.nextState,0):$.unshift(this.next),$[2]++):v==2&&h==this.nextState&&($[1]--,(!$[1]||$[1]<0)&&($.shift(),$.shift())),[{type:"meta.tag.punctuation."+(v==1?"":"end-")+"tag-open.xml",value:u.slice(0,v)},{type:"meta.tag.tag-name.xml",value:u.substr(v)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(l);var a={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[a,l,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(u,h,$){return h==$[0]&&$.shift(),u.length==2&&($[0]==this.nextState&&$[1]--,(!$[1]||$[1]<0)&&$.splice(0,2)),this.next=$[0]||"start",[{type:this.token,value:u}]},nextState:"jsx"},a,s("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:t},{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"}]},l],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function s(t){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:t||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:t||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var d=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=e("./text_highlight_rules").TextHighlightRules,r="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",o=function(t){var l={"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|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"},a=this.createKeywordMapper(l,"identifier"),u="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",h="\\\\(?: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]?|.)",$="(function)(\\s*)(\\*?)",v={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(l).join("|")+"\\b)"+r+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),s("no_regex"),v,{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:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)"+$+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)"+$+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+$+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+u+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:a,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:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:$+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{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"),s("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:[s("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:h},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:h},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!t||!t.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(w,y,_){if(this.next=w=="{"?this.nextState:"",w=="{"&&_.length)_.unshift("start",y);else if(w=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return w=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:h},{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"}),(!t||t.jsx!=0)&&m.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};d.inherits(o,f),p.JavaScriptHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,p,g){var m=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,i){return/^\s+$/.test(d)?/^\s*\}/.test(i):!1},this.autoOutdent=function(d,i){var f=d.getLine(i),r=f.match(/^(\s*\})/);if(!r)return 0;var o=r[1].length,t=d.findMatchingBracket({row:i,column:o});if(!t||t.row==i)return 0;var l=this.$getIndent(d.getLine(t.row));d.replace(new m(i,0,i,o-1),l)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),p.MatchingBraceOutdent=s}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,p,g){function m(r,o){return r&&r.type.lastIndexOf(o+".xml")>-1}var s=e("../../lib/oop"),d=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(r,o,t,l,a){if(a=='"'||a=="'"){var u=a,h=l.doc.getTextRange(t.getSelectionRange());if(h!==""&&h!=="'"&&h!='"'&&t.getWrapBehavioursEnabled())return{text:u+h+u,selection:!1};var $=t.getCursorPosition(),v=l.doc.getLine($.row),w=v.substring($.column,$.column+1),y=new i(l,$.row,$.column),_=y.getCurrentToken();if(w==u&&(m(_,"attribute-value")||m(_,"string")))return{text:"",selection:[1,1]};if(_||(_=y.stepBackward()),!_)return;for(;m(_,"tag-whitespace")||m(_,"whitespace");)_=y.stepBackward();var b=!w||w.match(/\s/);if(m(_,"attribute-equals")&&(b||w==">")||m(_,"decl-attribute-equals")&&(b||w=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(r,o,t,l,a){var u=l.doc.getTextRange(a);if(!a.isMultiLine()&&(u=='"'||u=="'")){var h=l.doc.getLine(a.start.row),$=h.substring(a.start.column+1,a.start.column+2);if($==u)return a.end.column++,a}}),this.add("autoclosing","insertion",function(r,o,t,l,a){if(a==">"){var u=t.getSelectionRange().start,h=new i(l,u.row,u.column),$=h.getCurrentToken()||h.stepBackward();if(!$||!(m($,"tag-name")||m($,"tag-whitespace")||m($,"attribute-name")||m($,"attribute-equals")||m($,"attribute-value"))||m($,"reference.attribute-value"))return;if(m($,"attribute-value")){var v=h.getCurrentTokenColumn()+$.value.length;if(u.column/.test(l.getLine(u.row).slice(u.column)))return;for(;!m($,"tag-name");)if($=h.stepBackward(),$.value=="<"){$=h.stepForward();break}var y=h.getCurrentTokenRow(),_=h.getCurrentTokenColumn();if(m(h.stepBackward(),"end-tag-open"))return;var b=$.value;return y==u.row&&(b=b.substring(0,u.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(b.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(r,o,t,l,a){if(a==` `){var u=t.getCursorPosition(),h=l.getLine(u.row),$=new i(l,u.row,u.column),v=$.getCurrentToken();if(m(v,"")&&v.type.indexOf("tag-close")!==-1){if(v.value=="/>")return;for(;v&&v.type.indexOf("tag-name")===-1;)v=$.stepBackward();if(!v)return;var w=v.value,y=$.getCurrentTokenRow();if(v=$.stepBackward(),!v||v.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[w]||!this.voidElements){var _=l.getTokenAt(u.row,u.column+1),h=l.getLine(y),b=this.$getIndent(h),S=b+l.getTabString();return _&&_.value===""){var h=l.getSelectionRange().start,$=new s(a,h.row,h.column),v=$.getCurrentToken()||$.stepBackward();if(!v)return;if(v.value=="<")return{text:">",selection:[1,1]}}})};m.inherits(f,d),p.JavaScriptBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,p,g){function m(o,t){return o&&o.type&&o.type.lastIndexOf(t+".xml")>-1}var s=e("../../lib/oop"),d=e("../../range").Range,i=e("./fold_mode").FoldMode,f=p.FoldMode=function(o,t){i.call(this),this.voidElements=o||{},this.optionalEndTags=s.mixin({},this.voidElements),t&&s.mixin(this.optionalEndTags,t)};s.inherits(f,i);var r=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(o,t,l){var a=this._getFirstTagInLine(o,l);return a?a.closing||!a.tagName&&a.selfClosing?t==="markbeginend"?"end":"":!a.tagName||a.selfClosing||this.voidElements.hasOwnProperty(a.tagName.toLowerCase())||this._findEndTagInLine(o,l,a.tagName,a.end.column)?"":"start":this.getCommentFoldWidget(o,l)},this.getCommentFoldWidget=function(o,t){return/comment/.test(o.getState(t))&&/";break}return a}if(m(h,"tag-close"))return a.selfClosing=h.value=="/>",a;a.start.column+=h.value.length}return null},this._findEndTagInLine=function(o,t,l,a){for(var u=o.getTokens(t),h=0,$=0;$$)break;var v=this.getFoldWidgetRange(f,"all",r);if(v){if(v.start.row<=l)break;if(v.isMultiLine())r=v.end.row;else if(t==$)break}u=r}}return new s(l,a,u,f.getLine(u).length)},this.getCommentRegionBlock=function(f,r,o){for(var t=r.search(/\s*$/),l=f.getLength(),a=o,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++oa)return new s(a,t,v,r.length)}}.call(i.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,p,g){var m=e("../../lib/oop"),s=e("./xml").FoldMode,d=e("./cstyle").FoldMode,i=p.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end))),this.xmlFoldMode=new s};m.inherits(i,d),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,r,o){var t=this.getFoldWidgetBase(f,r,o);return t||this.xmlFoldMode.getFoldWidget(f,r,o)},this.getFoldWidgetRange=function(f,r,o,t){var l=this.getFoldWidgetRangeBase(f,r,o,t);return l||this.xmlFoldMode.getFoldWidgetRange(f,r,o)}}.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/javascript","ace/mode/folding/javascript"],function(e,p,g){var m=e("../lib/oop"),s=e("./text").Mode,d=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,r=e("./behaviour/javascript").JavaScriptBehaviour,o=e("./folding/javascript").FoldMode,t=function(){this.HighlightRules=d,this.$outdent=new i,this.$behaviour=new r,this.foldingRules=new o};m.inherits(t,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(l,a,u){var h=this.$getIndent(a),$=this.getTokenizer().getLineTokens(a,l),v=$.tokens,w=$.state;if(v.length&&v[v.length-1].type=="comment")return h;if(l=="start"||l=="no_regex"){var y=a.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);y&&(h+=u)}else if(l=="doc-start"&&(w=="start"||w=="no_regex"))return"";return h},this.checkOutdent=function(l,a,u){return this.$outdent.checkOutdent(a,u)},this.autoOutdent=function(l,a,u){this.$outdent.autoOutdent(a,u)},this.createWorker=function(l){var a=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return a.attachToDocument(l.getDocument()),a.on("annotate",function(u){l.setAnnotations(u.data)}),a.on("terminate",function(){l.clearAnnotations()}),a},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(t.prototype),p.Mode=t}),function(){ace.require(["ace/mode/javascript"],function(e){n&&(n.exports=e)})}()})(modeJavascript);var modeJson={exports:{}};(function(n,c){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,p,g){var m=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,d=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"}]}};m.inherits(d,s),p.JsonHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,p,g){var m=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,i){return/^\s+$/.test(d)?/^\s*\}/.test(i):!1},this.autoOutdent=function(d,i){var f=d.getLine(i),r=f.match(/^(\s*\})/);if(!r)return 0;var o=r[1].length,t=d.findMatchingBracket({row:i,column:o});if(!t||t.row==i)return 0;var l=this.$getIndent(d.getLine(t.row));d.replace(new m(i,0,i,o-1),l)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),p.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,p,g){var m=e("../../lib/oop"),s=e("../../range").Range,d=e("./fold_mode").FoldMode,i=p.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};m.inherits(i,d),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(f,r,o){var t=f.getLine(o);if(this.singleLineBlockCommentRe.test(t)&&!this.startRegionRe.test(t)&&!this.tripleStarBlockCommentRe.test(t))return"";var l=this._getFoldWidgetBase(f,r,o);return!l&&this.startRegionRe.test(t)?"start":l},this.getFoldWidgetRange=function(f,r,o,t){var l=f.getLine(o);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(f,l,o);var a=l.match(this.foldingStartMarker);if(a){var u=a.index;if(a[1])return this.openingBracketBlock(f,a[1],o,u);var h=f.getCommentFoldRange(o,u+a[0].length,1);return h&&!h.isMultiLine()&&(t?h=this.getSectionRange(f,o):r!="all"&&(h=null)),h}if(r!=="markbegin"){var a=l.match(this.foldingStopMarker);if(a){var u=a.index+a[0].length;return a[1]?this.closingBracketBlock(f,a[1],o,u):f.getCommentFoldRange(o,u,-1)}}},this.getSectionRange=function(f,r){var o=f.getLine(r),t=o.search(/\S/),l=r,a=o.length;r+=1;for(var u=r,h=f.getLength();++r$)break;var v=this.getFoldWidgetRange(f,"all",r);if(v){if(v.start.row<=l)break;if(v.isMultiLine())r=v.end.row;else if(t==$)break}u=r}}return new s(l,a,u,f.getLine(u).length)},this.getCommentRegionBlock=function(f,r,o){for(var t=r.search(/\s*$/),l=f.getLength(),a=o,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++oa)return new s(a,t,v,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,g){var m=e("../lib/oop"),s=e("./text").Mode,d=e("./json_highlight_rules").JsonHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("./folding/cstyle").FoldMode,r=e("../worker/worker_client").WorkerClient,o=function(){this.HighlightRules=d,this.$outdent=new i,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};m.inherits(o,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(t,l,a){var u=this.$getIndent(l);if(t=="start"){var h=l.match(/^.*[\{\(\[]\s*$/);h&&(u+=a)}return u},this.checkOutdent=function(t,l,a){return this.$outdent.checkOutdent(l,a)},this.autoOutdent=function(t,l,a){this.$outdent.autoOutdent(l,a)},this.createWorker=function(t){var l=new r(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(t.getDocument()),l.on("annotate",function(a){t.setAnnotations(a.data)}),l.on("terminate",function(){t.clearAnnotations()}),l},this.$id="ace/mode/json"}.call(o.prototype),p.Mode=o}),function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})}()})(modeJson);var modeCss={exports:{}};(function(n,c){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,p,g){var m=e("../lib/oop");e("../lib/lang");var s=e("./text_highlight_rules").TextHighlightRules,d=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",f=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",o=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",t=p.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",l=p.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",a=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",u=function(){var h=this.createKeywordMapper({"support.function":i,"support.constant":f,"support.type":d,"support.constant.color":r,"support.constant.fonts":o},"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:t},{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:"("+t+")(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:t},{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:l},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:a},{include:"url"},{token:h,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{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()};m.inherits(u,s),p.CssHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,p,g){var m=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,i){return/^\s+$/.test(d)?/^\s*\}/.test(i):!1},this.autoOutdent=function(d,i){var f=d.getLine(i),r=f.match(/^(\s*\})/);if(!r)return 0;var o=r[1].length,t=d.findMatchingBracket({row:i,column:o});if(!t||t.row==i)return 0;var l=this.$getIndent(d.getLine(t.row));d.replace(new m(i,0,i,o-1),l)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),p.MatchingBraceOutdent=s}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,p,g){var m={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}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var d=document.createElement("c").style;for(var i in d)if(typeof d[i]=="string"){var f=i.replace(/[A-Z]/g,function(r){return"-"+r.toLowerCase()});m.hasOwnProperty(f)||(m[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(d,i,f,r){if(this.completionsDefined||this.defineCompletions(),d==="ruleset"||i.$mode.$id=="ace/mode/scss"){var o=i.getLine(f.row).substr(0,f.column),t=/\([^)]*$/.test(o);return t&&(o=o.substr(o.lastIndexOf("(")+1)),/:[^;]+$/.test(o)?(/([\w\-]+):[^:]*$/.test(o),this.getPropertyValueCompletions(d,i,f,r)):this.getPropertyCompletions(d,i,f,r,t)}return[]},this.getPropertyCompletions=function(d,i,f,r,o){o=o||!1;var t=Object.keys(m);return t.map(function(l){return{caption:l,snippet:l+": $0"+(o?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(d,i,f,r){var o=i.getLine(f.row).substr(0,f.column),t=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!t)return[];var l=[];return t in m&&typeof m[t]=="object"&&(l=Object.keys(m[t])),l.map(function(a){return{caption:a,snippet:a,meta:"property value",score:1e6}})}}).call(s.prototype),p.CssCompletions=s}),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,g){var m=e("../../lib/oop");e("../behaviour").Behaviour;var s=e("./cstyle").CstyleBehaviour,d=e("../../token_iterator").TokenIterator,i=function(){this.inherit(s),this.add("colon","insertion",function(f,r,o,t,l){if(l===":"&&o.selection.isEmpty()){var a=o.getCursorPosition(),u=new d(t,a.row,a.column),h=u.getCurrentToken();if(h&&h.value.match(/\s+/)&&(h=u.stepBackward()),h&&h.type==="support.type"){var $=t.doc.getLine(a.row),v=$.substring(a.column,a.column+1);if(v===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test($.substring(a.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,r,o,t,l){var a=t.doc.getTextRange(l);if(!l.isMultiLine()&&a===":"){var u=o.getCursorPosition(),h=new d(t,u.row,u.column),$=h.getCurrentToken();if($&&$.value.match(/\s+/)&&($=h.stepBackward()),$&&$.type==="support.type"){var v=t.doc.getLine(l.start.row),w=v.substring(l.end.column,l.end.column+1);if(w===";")return l.end.column++,l}}}),this.add("semicolon","insertion",function(f,r,o,t,l){if(l===";"&&o.selection.isEmpty()){var a=o.getCursorPosition(),u=t.doc.getLine(a.row),h=u.substring(a.column,a.column+1);if(h===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,r,o,t,l){if(l==="!"&&o.selection.isEmpty()){var a=o.getCursorPosition(),u=t.doc.getLine(a.row);if(/^\s*(;|}|$)/.test(u.substring(a.column)))return{text:"!important",selection:[10,10]}}})};m.inherits(i,s),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,g){var m=e("../../lib/oop"),s=e("../../range").Range,d=e("./fold_mode").FoldMode,i=p.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};m.inherits(i,d),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(f,r,o){var t=f.getLine(o);if(this.singleLineBlockCommentRe.test(t)&&!this.startRegionRe.test(t)&&!this.tripleStarBlockCommentRe.test(t))return"";var l=this._getFoldWidgetBase(f,r,o);return!l&&this.startRegionRe.test(t)?"start":l},this.getFoldWidgetRange=function(f,r,o,t){var l=f.getLine(o);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(f,l,o);var a=l.match(this.foldingStartMarker);if(a){var u=a.index;if(a[1])return this.openingBracketBlock(f,a[1],o,u);var h=f.getCommentFoldRange(o,u+a[0].length,1);return h&&!h.isMultiLine()&&(t?h=this.getSectionRange(f,o):r!="all"&&(h=null)),h}if(r!=="markbegin"){var a=l.match(this.foldingStopMarker);if(a){var u=a.index+a[0].length;return a[1]?this.closingBracketBlock(f,a[1],o,u):f.getCommentFoldRange(o,u,-1)}}},this.getSectionRange=function(f,r){var o=f.getLine(r),t=o.search(/\S/),l=r,a=o.length;r+=1;for(var u=r,h=f.getLength();++r$)break;var v=this.getFoldWidgetRange(f,"all",r);if(v){if(v.start.row<=l)break;if(v.isMultiLine())r=v.end.row;else if(t==$)break}u=r}}return new s(l,a,u,f.getLine(u).length)},this.getCommentRegionBlock=function(f,r,o){for(var t=r.search(/\s*$/),l=f.getLength(),a=o,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++oa)return new s(a,t,v,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,g){var m=e("../lib/oop"),s=e("./text").Mode,d=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,r=e("./css_completions").CssCompletions,o=e("./behaviour/css").CssBehaviour,t=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=d,this.$outdent=new i,this.$behaviour=new o,this.$completer=new r,this.foldingRules=new t};m.inherits(l,s),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(a,u,h){var $=this.$getIndent(u),v=this.getTokenizer().getLineTokens(u,a).tokens;if(v.length&&v[v.length-1].type=="comment")return $;var w=u.match(/^.*\{\s*$/);return w&&($+=h),$},this.checkOutdent=function(a,u,h){return this.$outdent.checkOutdent(u,h)},this.autoOutdent=function(a,u,h){this.$outdent.autoOutdent(u,h)},this.getCompletions=function(a,u,h,$){return this.$completer.getCompletions(a,u,h,$)},this.createWorker=function(a){var u=new f(["ace"],"ace/mode/css_worker","Worker");return u.attachToDocument(a.getDocument()),u.on("annotate",function(h){a.setAnnotations(h.data)}),u.on("terminate",function(){a.clearAnnotations()}),u},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(l.prototype),p.Mode=l}),function(){ace.require(["ace/mode/css"],function(e){n&&(n.exports=e)})}()})(modeCss);var extLanguage_tools={exports:{}};(function(n,c){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,g){function m(b){var S=new Date().toLocaleString("en-us",b);return S.length==1?"0"+S:S}var s=e("./lib/dom"),d=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,f=e("./lib/lang"),r=e("./range").Range,o=e("./range_list").RangeList,t=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,a=e("./clipboard"),u={CURRENT_WORD:function(b){return b.session.getTextRange(b.session.getWordRange())},SELECTION:function(b,S,M){var O=b.session.getTextRange();return M?O.replace(/\n\r?([ \t]*\S)/g,` `+M+"$1"):O},CURRENT_LINE:function(b){return b.session.getLine(b.getCursorPosition().row)},PREV_LINE:function(b){return b.session.getLine(b.getCursorPosition().row-1)},LINE_INDEX:function(b){return b.getCursorPosition().row},LINE_NUMBER:function(b){return b.getCursorPosition().row+1},SOFT_TABS:function(b){return b.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(b){return b.session.getTabSize()},CLIPBOARD:function(b){return a.getText&&a.getText()},FILENAME:function(b){return/[^/\\]*$/.exec(this.FILEPATH(b))[0]},FILENAME_BASE:function(b){return/[^/\\]*$/.exec(this.FILEPATH(b))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(b){return this.FILEPATH(b).replace(/[^/\\]*$/,"")},FILEPATH:function(b){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(b){var S=b.session.$mode||{};return S.blockComment&&S.blockComment.start||""},BLOCK_COMMENT_END:function(b){var S=b.session.$mode||{};return S.blockComment&&S.blockComment.end||""},LINE_COMMENT:function(b){var S=b.session.$mode||{};return S.lineCommentStart||""},CURRENT_YEAR:m.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:m.bind(null,{year:"2-digit"}),CURRENT_MONTH:m.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:m.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:m.bind(null,{month:"short"}),CURRENT_DATE:m.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:m.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:m.bind(null,{weekday:"short"}),CURRENT_HOUR:m.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:m.bind(null,{minute:"2-digit"}),CURRENT_SECOND:m.bind(null,{second:"2-digit"})};u.SELECTED_TEXT=u.SELECTION;var h=function(){function b(){this.snippetMap={},this.snippetNameMap={},this.variables=u}return b.prototype.getTokenizer=function(){return b.$tokenizer||this.createTokenizer()},b.prototype.createTokenizer=function(){function S(k){return k=k.substr(1),/^\d+$/.test(k)?[{tabstopId:parseInt(k,10)}]:[{text:k}]}function M(k){return"(?:[^\\\\"+k+"]|\\\\.)"}var O={regex:"/("+M("/")+"+)/",onMatch:function(k,A,T){var E=T[0];return E.fmtString=!0,E.guard=k.slice(1,-1),E.flag="",""},next:"formatString"};return b.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(k,A,T){var E=k[1];return(E=="}"&&T.length||"`$\\".indexOf(E)!=-1)&&(k=E),[k]}},{regex:/}/,onMatch:function(k,A,T){return[T.length?T.shift():k]}},{regex:/\$(?:\d+|\w+)/,onMatch:S},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(k,A,T){var E=S(k.substr(1));return T.unshift(E[0]),E},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+M("\\|")+"*\\|",onMatch:function(k,A,T){var E=k.slice(1,-1).replace(/\\[,|\\]|,/g,function(C){return C.length==2?C[1]:"\0"}).split("\0").map(function(C){return{value:C}});return T[0].choices=E,[E[0]]},next:"start"},O,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(k,A,T){return T.length&&T[0].expectElse?(T[0].expectElse=!1,T[0].ifEnd={elseEnd:T[0]},[T[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(k,A,T){var E=k[1];return E=="}"&&T.length||"`$\\".indexOf(E)!=-1?k=E:E=="n"?k=` `:E=="t"?k=" ":"ulULE".indexOf(E)!=-1&&(k={changeCase:E,local:E>"a"}),[k]}},{regex:"/\\w*}",onMatch:function(k,A,T){var E=T.shift();return E&&(E.flag=k.slice(1,-1)),this.next=E&&E.tabstopId?"start":"",[E||k]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(k,A,T){return[{text:k.slice(1)}]}},{regex:/\${\w+/,onMatch:function(k,A,T){var E={text:k.slice(2)};return T.unshift(E),[E]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(k,A,T){var E=T.shift();return this.next=E&&E.tabstopId?"start":"",[E||k]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(k,A,T){var E=T[0];return E.formatFunction=k.slice(2,-1),[T.shift()]},next:"formatString"},O,{regex:/:[\?\-+]?/,onMatch:function(k,A,T){k[1]=="+"&&(T[0].ifEnd=T[0]),k[1]=="?"&&(T[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),b.$tokenizer},b.prototype.tokenizeTmSnippet=function(S,M){return this.getTokenizer().getLineTokens(S,M).tokens.map(function(O){return O.value||O})},b.prototype.getVariableValue=function(S,M,O){if(/^\d+$/.test(M))return(this.variables.__||{})[M]||"";if(/^[A-Z]\d+$/.test(M))return(this.variables[M[0]+"__"]||{})[M.substr(1)]||"";if(M=M.replace(/^TM_/,""),!this.variables.hasOwnProperty(M))return"";var k=this.variables[M];return typeof k=="function"&&(k=this.variables[M](S,M,O)),k==null?"":k},b.prototype.tmStrFormat=function(S,M,O){if(!M.fmt)return S;var k=M.flag||"",A=M.guard;A=new RegExp(A,k.replace(/[^gim]/g,""));var T=typeof M.fmt=="string"?this.tokenizeTmSnippet(M.fmt,"formatString"):M.fmt,E=this,C=S.replace(A,function(){var x=E.variables.__;E.variables.__=[].slice.call(arguments);for(var L=E.resolveVariables(T,O),q="E",N=0;N=0&&C.splice(x,1)}}var k=this.snippetMap,A=this.snippetNameMap;S.content?O(S):Array.isArray(S)&&S.forEach(O)},b.prototype.parseSnippetFile=function(S){S=S.replace(/\r/g,"");for(var M=[],O={},k=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,A;A=k.exec(S);){if(A[1])try{O=JSON.parse(A[1]),M.push(O)}catch{}if(A[4])O.content=A[4].replace(/^\t/gm,""),M.push(O),O={};else{var T=A[2],E=A[3];if(T=="regex"){var C=/\/((?:[^\/\\]|\\.)*)|$/g;O.guard=C.exec(E)[1],O.trigger=C.exec(E)[1],O.endTrigger=C.exec(E)[1],O.endGuard=C.exec(E)[1]}else T=="snippet"?(O.tabTrigger=E.match(/^\S*/)[0],O.name||(O.name=E)):T&&(O[T]=E)}}return M},b.prototype.getSnippetByName=function(S,M){var O=this.snippetNameMap,k;return this.getActiveScopes(M).some(function(A){var T=O[A];return T&&(k=T[S]),!!k},this),k},b}();d.implement(h.prototype,i);var $=function(b,S,M){function O(V){for(var W=[],H=0;H1?(P=W[W.length-1].length,D+=W.length-1):P+=V.length,j+=V}else V&&(V.start?V.end={row:D,column:P}:V.start={row:D,column:P})}),{text:j,tabstops:x,tokens:C}},v=function(){function b(S){if(this.index=0,this.ranges=[],this.tabstops=[],S.tabstopManager)return S.tabstopManager;S.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(S)}return b.prototype.attach=function(S){this.$openTabstops=null,this.selectedTabstop=null,this.editor=S,this.session=S.session,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)},b.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},b.prototype.onChange=function(S){for(var M=S.action[0]=="r",O=this.selectedTabstop||{},k=O.parents||{},A=this.tabstops.slice(),T=0;T2&&(this.tabstops.length&&E.push(E.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,E))},b.prototype.addTabstopMarkers=function(S){var M=this.session;S.forEach(function(O){O.markerId||(O.markerId=M.addMarker(O,"ace_snippet-marker","text"))})},b.prototype.removeTabstopMarkers=function(S){var M=this.session;S.forEach(function(O){M.removeMarker(O.markerId),O.markerId=null})},b.prototype.updateTabstopMarkers=function(){if(!!this.selectedTabstop){var S=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&S--,this.tabstops.forEach(function(M){M.snippetId===S?this.addTabstopMarkers(M):this.removeTabstopMarkers(M)},this)}},b.prototype.removeRange=function(S){var M=S.tabstop.indexOf(S);M!=-1&&S.tabstop.splice(M,1),M=this.ranges.indexOf(S),M!=-1&&this.ranges.splice(M,1),M=S.tabstop.rangeList.ranges.indexOf(S),M!=-1&&S.tabstop.splice(M,1),this.session.removeMarker(S.markerId),S.tabstop.length||(M=this.tabstops.indexOf(S.tabstop),M!=-1&&this.tabstops.splice(M,1),this.tabstops.length||this.detach())},b}();v.prototype.keyboardHandler=new t,v.prototype.keyboardHandler.bindKeys({Tab:function(b){p.snippetManager&&p.snippetManager.expandWithTab(b)||(b.tabstopManager.tabNext(1),b.renderer.scrollCursorIntoView())},"Shift-Tab":function(b){b.tabstopManager.tabNext(-1),b.renderer.scrollCursorIntoView()},Esc:function(b){b.tabstopManager.detach()}});var w=function(b,S){b.row==0&&(b.column+=S.column),b.row+=S.row},y=function(b,S){b.row==S.row&&(b.column-=S.column),b.row-=S.row};s.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 _=e("./editor").Editor;(function(){this.insertSnippet=function(b,S){return p.snippetManager.insertSnippet(this,b,S)},this.expandSnippet=function(b){return p.snippetManager.expandWithTab(this,b)}}).call(_.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","ace/lib/useragent"],function(e,p,g){var m=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,d=e("../range").Range,i=e("../lib/event"),f=e("../lib/lang"),r=e("../lib/dom"),o=e("../config").nls,t=e("./../lib/useragent"),l=function(w){return"suggest-aria-id:".concat(w)},a=t.isSafari?"menu":"listbox",u=t.isSafari?"menuitem":"option",h=t.isSafari?"aria-current":"aria-selected",$=function(w){var y=new m(w);y.$maxLines=4;var _=new s(y);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},v=function(){function w(y){var _=r.createElement("div"),b=$(_);y&&y.appendChild(_),_.style.display="none",b.renderer.content.style.cursor="default",b.renderer.setStyle("ace_autocomplete"),b.renderer.$textLayer.element.setAttribute("role",a),b.renderer.$textLayer.element.setAttribute("aria-roledescription",o("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),b.renderer.$textLayer.element.setAttribute("aria-label",o("autocomplete.popup.aria-label","Autocomplete suggestions")),b.renderer.textarea.setAttribute("aria-hidden","true"),b.setOption("displayIndentGuides",!1),b.setOption("dragDelay",150);var S=function(){};b.focus=S,b.$isFocused=!0,b.renderer.$cursorLayer.restartTimer=S,b.renderer.$cursorLayer.element.style.opacity="0",b.renderer.$maxLines=8,b.renderer.$keepTextAreaAtCursor=!1,b.setHighlightActiveLine(!1),b.session.highlight(""),b.session.$searchHighlight.clazz="ace_highlight-marker",b.on("mousedown",function(C){var x=C.getDocumentPosition();b.selection.moveToPosition(x),k.start.row=k.end.row=x.row,C.stop()});var M,O=new d(-1,0,-1,1/0),k=new d(-1,0,-1,1/0);k.id=b.session.addMarker(k,"ace_active-line","fullLine"),b.setSelectOnHover=function(C){C?O.id&&(b.session.removeMarker(O.id),O.id=null):O.id=b.session.addMarker(O,"ace_line-hover","fullLine")},b.setSelectOnHover(!1),b.on("mousemove",function(C){if(!M){M=C;return}if(!(M.x==C.x&&M.y==C.y)){M=C,M.scrollTop=b.renderer.scrollTop,b.isMouseOver=!0;var x=M.getDocumentPosition().row;O.start.row!=x&&(O.id||b.setRow(x),T(x))}}),b.renderer.on("beforeRender",function(){if(M&&O.start.row!=-1){M.$pos=null;var C=M.getDocumentPosition().row;O.id||b.setRow(C),T(C,!0)}}),b.renderer.on("afterRender",function(){for(var C=b.renderer.$textLayer,x=C.config.firstRow,L=C.config.lastRow;x<=L;x++){var q=C.element.childNodes[x-C.config.firstRow];q.setAttribute("role",u),q.setAttribute("aria-roledescription",o("autocomplete.popup.item.aria-roledescription","item")),q.setAttribute("aria-setsize",b.data.length),q.setAttribute("aria-describedby","doc-tooltip"),q.setAttribute("aria-posinset",x+1);var N=b.getData(x);if(N){var F="".concat(N.caption||N.value).concat(N.meta?", ".concat(N.meta):"");q.setAttribute("aria-label",F)}var I=q.querySelectorAll(".ace_completion-highlight");I.forEach(function(R){R.setAttribute("role","mark")})}}),b.renderer.on("afterRender",function(){var C=b.getRow(),x=b.renderer.$textLayer,L=x.element.childNodes[C-x.config.firstRow],q=document.activeElement;if(L!==b.selectedNode&&b.selectedNode&&(r.removeCssClass(b.selectedNode,"ace_selected"),b.selectedNode.removeAttribute(h),b.selectedNode.removeAttribute("id")),q.removeAttribute("aria-activedescendant"),b.selectedNode=L,L){var N=l(C);r.addCssClass(L,"ace_selected"),L.id=N,x.element.setAttribute("aria-activedescendant",N),q.setAttribute("aria-activedescendant",N),L.setAttribute(h,"true")}});var A=function(){T(-1)},T=function(C,x){C!==O.start.row&&(O.start.row=O.end.row=C,x||b.session._emit("changeBackMarker"),b._emit("changeHoverMarker"))};b.getHoveredRow=function(){return O.start.row},i.addListener(b.container,"mouseout",function(){b.isMouseOver=!1,A()}),b.on("hide",A),b.on("changeSelection",A),b.session.doc.getLength=function(){return b.data.length},b.session.doc.getLine=function(C){var x=b.data[C];return typeof x=="string"?x:x&&x.value||""};var E=b.session.bgTokenizer;return E.$tokenizeRow=function(C){function x(V,W){V&&q.push({type:(L.className||"")+(W||""),value:V})}var L=b.data[C],q=[];if(!L)return q;typeof L=="string"&&(L={value:L});for(var N=L.caption||L.value||L.name,F=N.toLowerCase(),I=(b.filterText||"").toLowerCase(),R=0,B=0,D=0;D<=I.length;D++)if(D!=B&&(L.matchMask&1<=D?L="bottom":L="top"),L==="top"?(P.bottom=C.top-this.$borderSize,P.top=P.bottom-D):L==="bottom"&&(P.top=C.top+x+this.$borderSize,P.bottom=P.top+D);var W=P.top>=0&&P.bottom<=I;if(!q&&!W)return!1;W?B.$maxPixelHeight=null:L==="top"?B.$maxPixelHeight=V:B.$maxPixelHeight=j,L==="top"?(N.style.top="",N.style.bottom=I+F-P.bottom+"px",b.isTopdown=!1):(N.style.top=P.top+"px",N.style.bottom="",b.isTopdown=!0),N.style.display="";var H=C.left;return H+N.offsetWidth>R&&(H=R-N.offsetWidth),N.style.left=H+"px",N.style.right="",b.isOpen||(b.isOpen=!0,this._signal("show"),M=null),b.anchorPos=C,b.anchor=L,!0},b.show=function(C,x,L){this.tryShow(C,x,L?"bottom":void 0,!0)},b.goTo=function(C){var x=this.getRow(),L=this.session.getLength()-1;switch(C){case"up":x=x<=0?L:x-1;break;case"down":x=x>=L?-1:x+1;break;case"start":x=0;break;case"end":x=L}this.setRow(x)},b.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},b.$imageSize=0,b.$borderSize=1,b}return w}();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-left: 0.9em; } .ace_completion-message { margin-left: 0.9em; 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 .ace_text-layer { width: calc(100% - 8px); } .ace_autocomplete .ace_line { display: flex; align-items: center; } .ace_autocomplete .ace_line > * { min-width: 0; flex: 0 0 auto; } .ace_autocomplete .ace_line .ace_ { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; } .ace_autocomplete .ace_completion-spacer { flex: 1; } .ace_autocomplete.ace_loading:after { content: ""; position: absolute; top: 0px; height: 2px; width: 8%; background: blue; z-index: 100; animation: ace_progress 3s infinite linear; animation-delay: 300ms; transform: translateX(-100%) scaleX(1); } @keyframes ace_progress { 0% { transform: translateX(-100%) scaleX(1) } 50% { transform: translateX(625%) scaleX(2) } 100% { transform: translateX(1500%) scaleX(3) } } @media (prefers-reduced-motion) { .ace_autocomplete.ace_loading:after { transform: translateX(625%) scaleX(2); animation: none; } } `,"autocompletion.css",!1),p.AcePopup=v,p.$singleLineEditor=$,p.getAriaId=l}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,p,g){var m=function(){function s(d){this.editor=d,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return s.prototype.setScreenReaderContent=function(d){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var f=this.popup.getRow(),r=this.popup.renderer.$textLayer,o=r.element.childNodes[f-r.config.firstRow];if(o){for(var t="doc-tooltip ",l=0;l=0&&i.test(s[r]);r--)f.push(s[r]);return f.reverse().join("")},p.retrieveFollowingIdentifier=function(s,d,i){i=i||m;for(var f=[],r=d;r0)for(var b=this.popup.getFirstVisibleRow();b<=this.popup.getLastVisibleRow();b++){var S=this.popup.getData(b);S&&(!_||S.hideInlinePreview)&&this.$seen(S)}},y.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},y.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,b=[];_;)b.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=b}},y.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(b){b.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},y.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},y.prototype.$updatePopupPosition=function(){var _=this.editor,b=_.renderer,S=b.layerConfig.lineHeight,M=b.$cursorLayer.getPixelPosition(this.base,!0);M.left-=this.popup.getTextLeftOffset();var O=_.container.getBoundingClientRect();M.top+=O.top-b.layerConfig.offset,M.left+=O.left-_.renderer.scrollLeft,M.left+=b.gutterWidth;var k={top:M.top,left:M.left};b.$ghostText&&b.$ghostTextWidget&&this.base.row===b.$ghostText.position.row&&(k.top+=b.$ghostTextWidget.el.offsetHeight);var A=_.container.getBoundingClientRect().bottom-S,T=Athis.filterText&&_.lastIndexOf(this.filterText,0)===0)var b=this.filtered;else var b=this.all;this.filterText=_,b=this.filterCompletions(b,this.filterText),b=b.sort(function(M,O){return O.exactMatch-M.exactMatch||O.$score-M.$score||(M.caption||M.value).localeCompare(O.caption||O.value)});var S=null;b=b.filter(function(M){var O=M.snippet||M.caption||M.value;return O===S?!1:(S=O,!0)}),this.filtered=b},y.prototype.filterCompletions=function(_,b){var S=[],M=b.toUpperCase(),O=b.toLowerCase();e:for(var k=0,A;A=_[k];k++){if(A.skipFilter){A.$score=A.score,S.push(A);continue}var T=!this.ignoreCaption&&A.caption||A.value||A.snippet;if(!!T){var E=-1,C=0,x=0,L,q;if(this.exactMatch){if(b!==T.substr(0,b.length))continue e}else{var N=T.toLowerCase().indexOf(O);if(N>-1)x=N;else for(var F=0;F=0&&(R<0||I0&&(E===-1&&(x+=10),x+=q,C|=1<",i.escapeHTML(M.caption),"","
",i.escapeHTML(t(M.snippet))].join(""))},id:"snippetCompleter"},a=[l,r,o];p.setCompleters=function(M){a.length=0,M&&a.push.apply(a,M)},p.addCompleter=function(M){a.push(M)},p.textCompleter=r,p.keyWordCompleter=o,p.snippetCompleter=l;var u={name:"expandSnippet",exec:function(M){return m.expandWithTab(M)},bindKey:"Tab"},h=function(M,O){$(O.session.$mode)},$=function(M){typeof M=="string"&&(M=d.$modes[M]),!!M&&(m.files||(m.files={}),v(M.$id,M.snippetFileId),M.modes&&M.modes.forEach($))},v=function(M,O){!O||!M||m.files[M]||(m.files[M]={},d.loadModule(O,function(k){!k||(m.files[M]=k,!k.snippets&&k.snippetText&&(k.snippets=m.parseSnippetFile(k.snippetText)),m.register(k.snippets||[],k.scope),k.includeScopes&&(m.snippetMap[k.scope].includeScopes=k.includeScopes,k.includeScopes.forEach(function(A){$("ace/mode/"+A)})))}))},w=function(M){var O=M.editor,k=O.completer&&O.completer.activated;if(M.command.name==="backspace")k&&!f.getCompletionPrefix(O)&&O.completer.detach();else if(M.command.name==="insertstring"&&!k){y=M;var A=M.editor.$liveAutocompletionDelay;A?_.delay(A):b(M)}},y,_=i.delayedCall(function(){b(y)},0),b=function(M){var O=M.editor,k=f.getCompletionPrefix(O),A=M.args,T=f.triggerAutocomplete(O,A);if(k&&k.length>=O.$liveAutocompletionThreshold||T){var E=s.for(O);E.autoShown=!0,E.showPopup(O)}},S=e("../editor").Editor;e("../config").defineOptions(S.prototype,"editor",{enableBasicAutocompletion:{set:function(M){M?(this.completers||(this.completers=Array.isArray(M)?M:a),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(M){M?(this.completers||(this.completers=Array.isArray(M)?M:a),this.commands.on("afterExec",w)):this.commands.off("afterExec",w)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(M){M?(this.commands.addCommand(u),this.on("changeMode",h),h(null,this)):(this.commands.removeCommand(u),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 c=[{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,g,m,s,d){return s.length===0?d(null,[]):d(null,c)}})},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$j={class:"ace-editor",ref:"ace"};function _sfc_render$2B(n,c,e,p,g,m){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$s,[require$$0$1.createElementVNode("div",_hoisted_2$j,null,512)])}var CodeEditor=_export_sfc$1(_sfc_main$2B,[["render",_sfc_render$2B],["__scopeId","data-v-335e1214"]]);const generateCode=function(n,c="vue"){let e=JSON.stringify(n);return c==="html"?` VForm Demo
Submit