HEX
Server: nginx/1.18.0
System: Linux mail.dakarash.co.id 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.2-1ubuntu2.23
Disabled: NONE
Upload Files
File: /home/dakarash.co.id/public_html/wp-content/plugins/visual-portfolio/build/gutenberg/index.js
(()=>{var e={9:(e,t,n)=>{e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";var o,r=e("./lib/oop"),i=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),s=e("./editor").Editor,a=e("./virtual_renderer").VirtualRenderer,l=e("./edit_session").EditSession;(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new s(new a(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new l(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var o=this.$editors.some(function(t){return t.session===e});return o&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var o=t/this.$splits,r=0;r<this.$splits;r++)(e=this.$editors[r]).container.style.width=o+"px",e.container.style.top="0px",e.container.style.left=r*o+"px",e.container.style.height=n+"px",e.resize();else{var i=n/this.$splits;for(r=0;r<this.$splits;r++)(e=this.$editors[r]).container.style.width=t+"px",e.container.style.top=r*i+"px",e.container.style.left="0px",e.container.style.height=i+"px",e.resize()}}}).call((o=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))}).prototype),t.Split=o}),ace.define("ace/ext/split",["require","exports","module","ace/ext/split","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}),ace.require(["ace/ext/split"],function(t){e&&(e.exports=t)})},28:e=>{e.exports={control:(e,t)=>{let n=Object.assign(e,{cursor:"pointer",minHeight:40,borderRadius:3});return n=t.isFocused&&!t.isDisabled?Object.assign(n,{borderColor:"#007cba"}):Object.assign(n,{borderColor:"var(--wp-components-color-gray-600, #949494)","&:hover":{borderColor:""}}),t.isFocused&&(n=Object.assign(n,{boxShadow:"0 0 0 1px #007cba","&:hover":{borderColor:"#007cba"}})),n},singleValue:e=>Object.assign(e,{color:"var(--wp-components-color-foreground, #1e1e1e)"}),valueContainer:(e,t)=>{let n=Object.assign(e,{padding:0,paddingLeft:10});return t.isMulti&&(n=Object.assign(n,{paddingRight:7,paddingLeft:7})),n},input:e=>Object.assign(e,{margin:0,height:30,paddingTop:0,paddingBottom:0,input:{boxShadow:"none !important"}}),dropdownIndicator:e=>Object.assign(e,{padding:3,paddingRight:9,color:"var(--wp-components-color-foreground, #1e1e1e)","&:hover":{color:"var(--wp-components-color-foreground, #1e1e1e)"},svg:{width:12,height:12}}),clearIndicator:e=>Object.assign(e,{padding:5,svg:{width:15,height:15}}),indicatorSeparator:()=>!1,multiValue:e=>Object.assign(e,{padding:"3px 2px",margin:4,marginLeft:0,borderRadius:1,backgroundColor:"#ddd"}),multiValueLabel:e=>Object.assign(e,{padding:0,color:"#32373c",fontSize:"100%"}),multiValueRemove:e=>Object.assign(e,{padding:0,marginLeft:5,marginRight:5,marginTop:1,width:"auto",height:"auto",backgroundColor:"transparent",color:"inherit",justifyContent:"center",":hover":{backgroundColor:"transparent",color:"#e02e2e"},svg:{width:14,height:14}}),option:(e,t)=>{let n=Object.assign(e,{display:"flex",alignItems:"center",padding:"4px 10px"});return t.isFocused&&(n=Object.assign(n,{backgroundColor:"#efefef"})),n=t.isSelected?Object.assign(n,{backgroundColor:"#007cba"}):Object.assign(n,{color:"var(--wp-components-color-foreground, #1e1e1e)"}),n},menu:e=>Object.assign(e,{zIndex:2})}},47:(e,t,n)=>{e=n.nmd(e),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,t,n){"use strict";var o=e("./lib/dom"),r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,u=e("./tokenizer").Tokenizer,p=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var o=e.session.getTextRange();return n?o.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):o},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return p.getText&&p.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};function d(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}h.SELECTED_TEXT=h.SELECTION;var f=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var o={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var o=n[0];return o.fmtString=!0,o.guard=e.slice(1,-1),o.flag="",""},next:"formatString"};return e.$tokenizer=new u({start:[{regex:/\\./,onMatch:function(e,t,n){var o=e[1];return("}"==o&&n.length||-1!="`$\\".indexOf(o))&&(e=o),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,o){var r=t(e.substr(1));return o.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var o=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return 2==e.length?e[1]:"\0"}).split("\0").map(function(e){return{value:e}});return n[0].choices=o,[o[0]]},next:"start"},o,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var o=e[1];return"}"==o&&n.length||-1!="`$\\".indexOf(o)?e=o:"n"==o?e="\n":"t"==o?e="\t":-1!="ulULE".indexOf(o)&&(e={changeCase:o,local:o>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var o=n.shift();return o&&(o.flag=e.slice(1,-1)),this.next=o&&o.tabstopId?"start":"",[o||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var o={text:e.slice(2)};return n.unshift(o),[o]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var o=n.shift();return this.next=o&&o.tabstopId?"start":"",[o||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},o,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var o=this.variables[t];return"function"==typeof o&&(o=this.variables[t](e,t,n)),null==o?"":o},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var o=t.flag||"",r=t.guard;r=new RegExp(r,o.replace(/[^gim]/g,""));var i="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(r,function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(i,n),o="E",r=0;r<t.length;r++){var a=t[r];if("object"==typeof a)if(t[r]="",a.changeCase&&a.local){var l=t[r+1];l&&"string"==typeof l&&("u"==a.changeCase?t[r]=l[0].toUpperCase():t[r]=l[0].toLowerCase(),t[r+1]=l.substr(1))}else a.changeCase&&(o=a.changeCase);else"U"==o?t[r]=a.toUpperCase():"L"==o&&(t[r]=a.toLowerCase())}return s.variables.__=e,t.join("")});return a},e.prototype.tmFormatFunction=function(e,t,n){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},e.prototype.resolveVariables=function(e,t){for(var n=[],o="",r=!0,i=0;i<e.length;i++){var s=e[i];if("string"!=typeof s){if(s){if(r=!1,s.fmtString){var a=e.indexOf(s,i+1);-1==a&&(a=e.length),s.fmt=e.slice(i+1,a),i=a}if(s.text){var l=this.getVariableValue(t,s.text,o)+"";s.fmtString&&(l=this.tmStrFormat(l,s,t)),s.formatFunction&&(l=this.tmFormatFunction(l,s,t)),l&&!s.ifEnd?(n.push(l),c(s)):!l&&s.ifEnd&&c(s.ifEnd)}else s.elseEnd?c(s.elseEnd):(null!=s.tabstopId||null!=s.changeCase)&&n.push(s)}}else n.push(s),"\n"==s?(r=!0,o=""):r&&(o=/^\t*/.exec(s)[0],r=/\S/.test(s))}function c(t){var n=e.indexOf(t,i+1);-1!=n&&(i=n)}return n},e.prototype.getDisplayTextForSnippet=function(e,t){return g.call(this,e,t).text},e.prototype.insertSnippetForSelection=function(e,t,n){void 0===n&&(n={});var o=g.call(this,e,t,n),r=e.getSelectionRange(),i=e.session.replace(r,o.text),s=new m(e),a=e.inVirtualSelectionMode&&e.selection.index;s.addTabstops(o.tabstops,r.start,i,a)},e.prototype.insertSnippet=function(e,t,n){void 0===n&&(n={});var o=this;if(e.inVirtualSelectionMode)return o.insertSnippetForSelection(e,t,n);e.forEachSelection(function(){o.insertSnippetForSelection(e,t,n)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},e.prototype.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),o=e.session.getState(n.row);"object"==typeof o&&(o=o[0]),o.substring&&("js-"==o.substring(0,3)?t="javascript":"css-"==o.substring(0,4)?t="css":"php-"==o.substring(0,4)&&(t="php"))}return t},e.prototype.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],o=this.snippetMap;return o[t]&&o[t].includeScopes&&n.push.apply(n,o[t].includeScopes),n.push("_"),n},e.prototype.expandWithTab=function(e,t){var n=this,o=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return o&&e.tabstopManager&&e.tabstopManager.tabNext(),o},e.prototype.expandSnippetForSelection=function(e,t){var n,o=e.getCursorPosition(),r=e.session.getLine(o.row),i=r.substring(0,o.column),s=r.substr(o.column),a=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,i,s)),!!n},this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(o.row,o.column-n.replaceBefore.length,o.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},e.prototype.findMatchingSnippet=function(e,t,n){for(var o=e.length;o--;){var r=e[o];if((!r.startRe||r.startRe.test(t))&&(!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},e.prototype.register=function(e,t){var n=this.snippetMap,o=this.snippetNameMap,r=this;function i(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,n){return e=i(e),t=i(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],o[t]={});var i=o[t];if(e.name){var l=i[e.name];l&&r.unregister(l),i[e.name]=e}n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(l):Object.keys(e).forEach(function(t){l(e[t])}),this._signal("registerSnippets",{scope:t})},e.prototype.unregister=function(e,t){var n=this.snippetMap,o=this.snippetNameMap;function r(e){var r=o[e.scope||t];if(r&&r[e.name]){delete r[e.name];var i=n[e.scope||t],s=i&&i.indexOf(e);s>=0&&i.splice(s,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],o={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{o=JSON.parse(t[1]),n.push(o)}catch(e){}if(t[4])o.content=t[4].replace(/^\t/gm,""),n.push(o),o={};else{var i=t[2],s=t[3];if("regex"==i){var a=/\/((?:[^\/\\]|\\.)*)|$/g;o.guard=a.exec(s)[1],o.trigger=a.exec(s)[1],o.endTrigger=a.exec(s)[1],o.endGuard=a.exec(s)[1]}else"snippet"==i?(o.tabTrigger=s.match(/^\S*/)[0],o.name||(o.name=s)):i&&(o[i]=s)}}return n},e.prototype.getSnippetByName=function(e,t){var n,o=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var r=o[t];return r&&(n=r[e]),!!n},this),n},e}();r.implement(f.prototype,i);var g=function(e,t,n){void 0===n&&(n={});var o=e.getCursorPosition(),r=e.session.getLine(o.row),i=e.session.getTabString(),s=r.match(/^\s*/)[0];o.column<s.length&&(s=s.slice(0,o.column)),t=t.replace(/\r/g,"");var a=this.tokenizeTmSnippet(t);a=(a=this.resolveVariables(a,e)).map(function(e){return"\n"!=e||n.excludeExtraIndent?"string"==typeof e?e.replace(/\t/g,i):e:e+s});var l=[];a.forEach(function(e,t){if("object"==typeof e){var n=e.tabstopId,o=l[n];if(o||((o=l[n]=[]).index=n,o.value="",o.parents={}),-1===o.indexOf(e)){e.choices&&!o.choices&&(o.choices=e.choices),o.push(e);var r=a.indexOf(e,t+1);if(-1!==r){var i=a.slice(t+1,r);i.some(function(e){return"object"==typeof e})&&!o.value?o.value=i:!i.length||o.value&&"string"==typeof o.value||(o.value=i.join(""))}}}}),l.forEach(function(e){e.length=0});var c={};function u(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];if("object"==typeof o){if(c[o.tabstopId])continue;o=t[e.lastIndexOf(o,n-1)]||{tabstopId:o.tabstopId}}t[n]=o}return t}for(var p=0;p<a.length;p++){var h=a[p];if("object"==typeof h){var d=h.tabstopId,f=l[d],g=a.indexOf(h,p+1);if(c[d])c[d]===h&&(delete c[d],Object.keys(c).forEach(function(e){f.parents[e]=!0}));else{c[d]=h;var m=f.value;"string"!=typeof m?m=u(m):h.fmt&&(m=this.tmStrFormat(m,h,e)),a.splice.apply(a,[p+1,Math.max(0,g-p)].concat(m,h)),-1===f.indexOf(h)&&f.push(h)}}}var v=0,y=0,b="";return a.forEach(function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(y=t[t.length-1].length,v+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:v,column:y}:e.start={row:v,column:y})}),{text:b,tabstops:l,tokens:a}},m=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.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)},e.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},e.prototype.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},o=n.parents||{},r=this.tabstops.slice(),i=0;i<r.length;i++){var s=r[i],a=s==n||o[s.index];if(s.rangeList.$bias=a?0:1,"remove"==e.action&&s!==n){var l=s.parents&&s.parents[n.index],c=s.rangeList.pointIndex(e.start,l);c=c<0?-c-1:c+1;var u=s.rangeList.pointIndex(e.end,l);u=u<0?-u-1:u-1;for(var p=s.rangeList.ranges.slice(c,u),h=0;h<p.length;h++)this.removeRange(p[h])}s.rangeList.$onChange(e)}var d=this.session;this.$inChange||!t||1!=d.getLength()||d.getValue()||this.detach()},e.prototype.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.session,o=n.getTextRange(e.firstNonLinked),r=0;r<e.length;r++){var i=e[r];if(i.linked){var s=i.original,a=t.snippetManager.tmStrFormat(o,s,this.editor);n.replace(i,a)}}this.$inChange=!1}},e.prototype.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},e.prototype.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),o=0;o<this.ranges.length;o++)if(!this.ranges[o].linked){var r=this.ranges[o].contains(e.row,e.column),i=n||this.ranges[o].contains(t.row,t.column);if(r&&i)return}this.detach()}},e.prototype.onChangeSession=function(){this.detach()},e.prototype.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);(n=Math.min(Math.max(n,1),t))==t&&(n=0),this.selectTabstop(n),this.updateTabstopMarkers(),0===n&&this.detach()},e.prototype.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){this.selectedTabstop=t;var n=t.firstNonLinked||t;if(t.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var o=this.editor.multiSelect;o.toSingleRange(n);for(var r=0;r<t.length;r++)t.hasLinkedRanges&&t[r].linked||o.addRange(t[r].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},e.prototype.addTabstops=function(e,t,n){var o=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var r=a.fromPoints(n,n);y(r.start,t),y(r.end,t),e[0]=[r],e[0].index=0}var i=[this.index+1,0],s=this.ranges,c=this.snippetId=(this.snippetId||0)+1;e.forEach(function(e,n){var r=this.$openTabstops[n]||e;r.snippetId=c;for(var u=0;u<e.length;u++){var p=e[u],h=a.fromPoints(p.start,p.end||p.start);v(h.start,t),v(h.end,t),h.original=p,h.tabstop=r,s.push(h),r!=e?r.unshift(h):r[u]=h,p.fmtString||r.firstNonLinked&&o?(h.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=h)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===e&&(i.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r),r.rangeList=r.rangeList||new l,r.rangeList.$bias=0,r.rangeList.addList(r)},this),i.length>2&&(this.tabstops.length&&i.push(i.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,i))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new c,m.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var v=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};o.importCssString("\n.ace_snippet-marker {\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n    background: rgba(194, 193, 208, 0.09);\n    border: 1px dotted rgba(211, 208, 235, 0.62);\n    position: absolute;\n}","snippets.css",!1),t.snippetManager=new f;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,t,n){"use strict";var o=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,i=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=e("../config").nls,u=e("./../lib/useragent"),p=function(e){return"suggest-aria-id:".concat(e)},h=u.isSafari?"menu":"listbox",d=u.isSafari?"menuitem":"option",f=u.isSafari?"aria-current":"aria-selected",g=function(e){var t=new o(e);t.$maxLines=4;var n=new r(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n    background-color: #CAD6FA;\n    z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n    background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n    border: 1px solid #abbffe;\n    margin-top: -1px;\n    background: rgba(233,233,253,0.4);\n    position: absolute;\n    z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n    border: 1px solid rgba(109, 150, 13, 0.8);\n    background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n    opacity: 0.5;\n    margin-left: 0.9em;\n}\n.ace_completion-message {\n    margin-left: 0.9em;\n    color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n    color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n    color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n    width: 300px;\n    z-index: 200000;\n    border: 1px lightgray solid;\n    position: fixed;\n    box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n    line-height: 1.4;\n    background: #fefefe;\n    color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n    border: 1px #484747 solid;\n    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n    line-height: 1.4;\n    background: #25282c;\n    color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer  {\n    width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n    display: flex;\n    align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n    min-width: 0;\n    flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n    flex: 0 1 auto;\n    overflow: hidden;\n    text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n    flex: 1;\n}\n.ace_autocomplete.ace_loading:after  {\n    content: "";\n    position: absolute;\n    top: 0px;\n    height: 2px;\n    width: 8%;\n    background: blue;\n    z-index: 100;\n    animation: ace_progress 3s infinite linear;\n    animation-delay: 300ms;\n    transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n    0% { transform: translateX(-100%) scaleX(1) }\n    50% { transform: translateX(625%) scaleX(2) } \n    100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n    .ace_autocomplete.ace_loading:after {\n        transform: translateX(625%) scaleX(2);\n        animation: none;\n     }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=g(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",h),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var o,r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),m.start.row=m.end.row=t.row,e.stop()});var u=new i(-1,0,-1,1/0),m=new i(-1,0,-1,1/0);m.id=n.session.addMarker(m,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(o){if(o.x!=e.x||o.y!=e.y){(o=e).scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=o.getDocumentPosition().row;u.start.row!=t&&(u.id||n.setRow(t),y(t))}}else o=e}),n.renderer.on("beforeRender",function(){if(o&&-1!=u.start.row){o.$pos=null;var e=o.getDocumentPosition().row;u.id||n.setRow(e),y(e,!0)}}),n.renderer.on("afterRender",function(){for(var e=n.renderer.$textLayer,t=e.config.firstRow,o=e.config.lastRow;t<=o;t++){var r=e.element.childNodes[t-e.config.firstRow];r.setAttribute("role",d),r.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),r.setAttribute("aria-setsize",n.data.length),r.setAttribute("aria-describedby","doc-tooltip"),r.setAttribute("aria-posinset",t+1);var i=n.getData(t);if(i){var s="".concat(i.caption||i.value).concat(i.meta?", ".concat(i.meta):"");r.setAttribute("aria-label",s)}r.querySelectorAll(".ace_completion-highlight").forEach(function(e){e.setAttribute("role","mark")})}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,o=t.element.childNodes[e-t.config.firstRow],r=document.activeElement;if(o!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),n.selectedNode.removeAttribute(f),n.selectedNode.removeAttribute("id")),r.removeAttribute("aria-activedescendant"),n.selectedNode=o,o){var i=p(e);l.addCssClass(o,"ace_selected"),o.id=i,t.element.setAttribute("aria-activedescendant",i),r.setAttribute("aria-activedescendant",i),o.setAttribute(f,"true")}});var v=function(){y(-1)},y=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",function(){n.isMouseOver=!1,v()}),n.on("hide",v),n.on("changeSelection",v),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var b=n.session.bgTokenizer;return b.$tokenizeRow=function(e){var t=n.data[e],o=[];if(!t)return o;"string"==typeof t&&(t={value:t});var r=t.caption||t.value||t.name;function i(e,n){e&&o.push({type:(t.className||"")+(n||""),value:e})}for(var s=r.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,u=0;u<=a.length;u++)if(u!=c&&(t.matchMask&1<<u||u==a.length)){var p=a.slice(c,u);c=u;var h=s.indexOf(p,l);if(-1==h)continue;i(r.slice(l,h),""),l=h+p.length,i(r.slice(h,l),"completion-highlight")}return i(r.slice(l,r.length),""),o.push({type:"completion-spacer",value:" "}),t.meta&&o.push({type:"completion-meta",value:t.meta}),t.message&&o.push({type:"completion-message",value:t.message}),o},b.$updateOnChange=r,b.start=r,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.isMouseOver=!1,n.data=[],n.setData=function(e,t){n.filterText=t||"",n.setValue(a.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return m.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,e)),m.start.row!=e&&(n.selection.clearSelection(),m.start.row=m.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()}),n.hide=function(){this.container.style.display="none",n.anchorPos=null,n.anchor=null,n.isOpen&&(n.isOpen=!1,this._signal("hide"))},n.tryShow=function(e,t,r,i){if(!i&&n.isOpen&&n.anchorPos&&n.anchor&&n.anchorPos.top===e.top&&n.anchorPos.left===e.left&&n.anchor===r)return!0;var s=this.container,a=this.renderer.scrollBar.width||10,l=window.innerHeight-a,c=window.innerWidth-a,u=this.renderer,p=u.$maxLines*t*1.4,h={top:0,bottom:0,left:0},d=l-e.top-3*this.$borderSize-t,f=e.top-3*this.$borderSize;r||(r=f<=d||d>=p?"bottom":"top"),"top"===r?(h.bottom=e.top-this.$borderSize,h.top=h.bottom-p):"bottom"===r&&(h.top=e.top+t+this.$borderSize,h.bottom=h.top+p);var g=h.top>=0&&h.bottom<=l;if(!i&&!g)return!1;u.$maxPixelHeight=g?null:"top"===r?f:d,"top"===r?(s.style.top="",s.style.bottom=l+a-h.bottom+"px",n.isTopdown=!1):(s.style.top=h.top+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="";var m=e.left;return m+s.offsetWidth>c&&(m=c-s.offsetWidth),s.style.left=m+"px",s.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),o=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=g,t.getAriaId=p}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){"use strict";var o=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var o="doc-tooltip ",r=0;r<this._lines.length;r++)o+="ace-inline-screenreader-line-".concat(r," ");n.setAttribute("aria-describedby",o)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement("pre");e.setAttribute("id","ace-inline-screenreader");for(var t=0;t<this._lines.length;t++){var n=document.createElement("code");n.setAttribute("id","ace-inline-screenreader-line-".concat(t));var o=document.createTextNode(this._lines[t]);n.appendChild(o),e.appendChild(n)}return e},e}();t.AceInlineScreenReader=o}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,t,n){"use strict";var o=e("../snippets").snippetManager,r=e("./inline_screenreader").AceInlineScreenReader,i=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n=n||"",e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||(this.inlineScreenReader=new r(e));var i=t.snippet?o.getDisplayTextForSnippet(e,t.snippet):t.value;return!(t.hideInlinePreview||!i||!i.startsWith(n)||(this.editor=e,this.inlineScreenReader.setScreenReaderContent(i),""===(i=i.slice(n.length))?e.removeGhostText():e.setGhostText(i),0))},e.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},e.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},e}();t.AceInline=i}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){"use strict";t.parForEach=function(e,t,n){var o=0,r=e.length;0===r&&n();for(var i=0;i<r;i++)t(e[i],function(e,t){++o===r&&n(e,t)})};var o=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||o;for(var r=[],i=t-1;i>=0&&n.test(e[i]);i--)r.push(e[i]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||o;for(var r=[],i=t;i<e.length&&n.test(e[i]);i++)r.push(e[i]);return r},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),o=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(o,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(o,n.column)},t.triggerAutocomplete=function(e,t){return t=null==t?e.session.getPrecedingCharacter():t,e.completers.some(function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,t,n){"use strict";var o=e("./keyboard/hash_handler").HashHandler,r=e("./autocomplete/popup").AcePopup,i=e("./autocomplete/inline").AceInline,s=e("./autocomplete/popup").getAriaId,a=e("./autocomplete/util"),l=e("./lib/lang"),c=e("./lib/dom"),u=e("./snippets").snippetManager,p=e("./config"),h=e("./lib/event"),d=e("./lib/scroll").preventParentScroll,f=function(e,t){t.completer&&t.completer.destroy()},g=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new o,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=l.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=l.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=l.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=l.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||0===this.editor.completers.length||(this.completions=new v(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:p.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new r(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),h.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new i,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&"function"==typeof e.completer.onSeen&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover)return void this.tooltipTimer.call(null,null);this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,o=this.editor.getCursorPosition().column,r=this.editor.session.getLine(t).slice(n,o);this.inlineRenderer.show(this.editor,e,r)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);!n||e&&!n.hideInlinePreview||this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,o=t.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var r=e.container.getBoundingClientRect();o.top+=r.top-t.layerConfig.offset,o.left+=r.left-e.renderer.scrollLeft,o.left+=t.gutterWidth;var i={top:o.top,left:o.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(i.top+=t.$ghostTextWidget.el.offsetHeight);var s=e.container.getBoundingClientRect().bottom-n,a=s<i.top?{top:s,left:i.left}:i;this.popup.tryShow(a,n,"bottom")||this.popup.tryShow(o,n,"top")||this.popup.show(o,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var o,r=this.popup.getRow(),i=this.popup.data[r];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler),this.stickySelection&&(o=this.popup.data.indexOf(i)),o&&-1!==o||(o=0),this.popup.setRow(this.autoSelect?o:-1),o===r&&i!==this.completions.filtered[o]&&this.$onPopupChange();var a=this.inlineRenderer&&this.inlineEnabled;if(o===r&&a){var l=this.popup.getData(this.popup.getRow());this.$updateGhostText(l)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),o=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),r=this.popup&&this.popup.container;t==n||t.parentNode==r||o||t==this.tooltipNode||e.relatedTarget==n||this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(""===e.value)return this.detach();var n=this.completions,o=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),o},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||(this.completionProvider=new m(e)),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var o=this.editor.getCursorPosition();if((i=this.editor.session.getTextRange({start:this.base,end:o}))==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,i,t):this.detach()}if(n&&n.matches)return o=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(o.row,o.column),this.base.$insertRight=!0,this.completions=new v(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",t);var r=this.editor.getSession(),i=(o=this.editor.getCursorPosition(),a.getCompletionPrefix(this.editor));this.base=r.doc.createAnchor(o.row,o.column-i.length),this.base.$insertRight=!0;var s={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:i,pos:o}).provideCompletions(this.editor,s,function(n,o,r){var i=o.filtered,s=a.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),r){if(!i.length){var l=!this.autoShown&&this.emptyMessage;if("function"==typeof l&&(l=this.emptyMessage(s)),l){var c=[{caption:l,value:""}];return this.completions=new v(c),this.openPopup(this.editor,s,t),this.popup.renderer.setStyle("ace_loading",!1),void this.popup.renderer.setStyle("ace_empty-message",!0)}return this.detach()}if(1==i.length&&i[0].value==s&&!i[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&1==i.length)return this.insertMatch(i[0])}this.completions=!r&&this.showLoadingState?new v(e.completionsForLoading.concat(i),o.filterText):o,this.openPopup(this.editor,s,t),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!r)}.bind(this)),!this.showLoadingState||this.autoShown||this.popup&&this.popup.isOpen||this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){var e=this.popup,t=this.completions&&this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),o=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var r=this.editor.completers.length,i=0;i<r;i++){var s=this.editor.completers[i];if(s.getDocTooltip&&n.completerId===s.id){o=s.getDocTooltip(n);break}}if(o||"string"==typeof n||(o=n),"string"==typeof o&&(o={docText:o}),!o||!o.docHTML&&!o.docText)return this.hideDocTooltip();this.showDocTooltip(o)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=c.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",d));var t=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(t.isDark?"ace_dark ":"")+(t.cssClass||"");var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var o=this.popup,r=o.container.getBoundingClientRect(),i=400,s=300,a=o.renderer.scrollBar.width||10,l=r.left,u=window.innerWidth-r.right-a,p=o.isTopdown?r.top:window.innerHeight-a-r.bottom,h=[Math.min(u/i,1),Math.min(l/i,1),Math.min(p/s*.9)],f=Math.max.apply(Math,h),g=n.style;g.display="block",f==h[0]?(g.left=r.right+1+"px",g.right="",g.maxWidth=i*f+"px",g.top=r.top+"px",g.bottom="",g.maxHeight=Math.min(window.innerHeight-a-r.top,s)+"px"):f==h[1]?(g.right=window.innerWidth-r.left+"px",g.left="",g.maxWidth=i*f+"px",g.top=r.top+"px",g.bottom="",g.maxHeight=Math.min(window.innerHeight-a-r.top,s)+"px"):f==h[2]&&(g.left=window.innerWidth-r.left+"px",g.maxWidth=Math.min(i,window.innerWidth)+"px",o.isTopdown?(g.top=r.bottom+"px",g.left=r.left+"px",g.right="",g.bottom="",g.maxHeight=Math.min(window.innerHeight-a-r.bottom,s)+"px"):(g.top=o.container.offsetTop-n.offsetHeight+"px",g.left=r.left+"px",g.right="",g.bottom="",g.maxHeight=Math.min(o.container.offsetTop,s)+"px"))},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",f),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e||(t.completer&&(t.completer.destroy(),t.completer=null),p.get("sharedPopups")?(e.$sharedInstance||(e.$sharedInstance=new e),t.completer=e.$sharedInstance):(t.completer=new e,t.once("destroy",f))),t.completer},e}();g.prototype.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},Backspace:function(e){e.execCommand("backspace"),!a.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},g.startCommand={name:"startAutocomplete",exec:function(e,t){var n=g.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var m=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:"insertMatch"}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var o=this.completions.filterText.length,r=0;if(t.range&&t.range.start.row===t.range.end.row&&(o-=this.initialPosition.prefix.length,o+=this.initialPosition.pos.column-t.range.start.column,r+=t.range.end.column-this.initialPosition.pos.column),o||r){var i;i=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()];for(var s,a=0;s=i[a];a++)s.start.column-=o,s.end.column+=r,e.session.remove(s)}t.snippet?u.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&"function"==typeof t.completer.onInsert&&t.completer.onInsert(e,t),t.command&&"startAutocomplete"===t.command&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand("insertstring",n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),o=e.getCursorPosition(),r=a.getCompletionPrefix(e),i=[];this.completers=e.completers;var s=e.completers.length;return e.completers.forEach(function(l,c){l.getCompletions(e,n,o,r,function(n,o){l.hideInlinePreview&&(o=o.map(function(e){return Object.assign(e,{hideInlinePreview:l.hideInlinePreview})})),!n&&o&&(i=i.concat(o)),t(null,{prefix:a.getCompletionPrefix(e),matches:i,finished:0===--s})})}),!0},e.prototype.provideCompletions=function(e,t,n){var o=function(e){var o=e.prefix,r=e.matches;this.completions=new v(r),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(o),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),r=!0,i=null;if(this.gatherCompletions(e,function(e,t){this.active&&(e&&(n(e,[],!0),this.detach()),0===t.prefix.indexOf(t.prefix)&&(r?i=t:o(t)))}.bind(this)),r=!1,i){var s=i;i=null,o(s)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(e){"function"==typeof e.cancel&&e.cancel()})},e}(),v=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],o=t.toUpperCase(),r=t.toLowerCase();e:for(var i,s=0;i=e[s];s++)if(i.skipFilter)i.$score=i.score,n.push(i);else{var a=!this.ignoreCaption&&i.caption||i.value||i.snippet;if(a){var l,c,u=-1,p=0,h=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var d=a.toLowerCase().indexOf(r);if(d>-1)h=d;else for(var f=0;f<t.length;f++){var g=a.indexOf(r[f],u+1),m=a.indexOf(o[f],u+1);if((l=g>=0&&(m<0||g<m)?g:m)<0)continue e;(c=l-u-1)>0&&(-1===u&&(h+=10),h+=c,p|=1<<f),u=l}}i.matchMask=p,i.exactMatch=h?0:1,i.$score=(i.score||0)-h,n.push(i)}}return n},e}();t.Autocomplete=g,t.CompletionProvider=m,t.FilteredList=v}),ace.define("ace/marker_group",["require","exports","module"],function(e,t,n){"use strict";var o=function(){function e(e,t){t&&(this.markerType=t.markerType),this.markers=[],this.session=e,e.addDynamicMarker(this)}return e.prototype.getMarkerAtPosition=function(e){return this.markers.find(function(t){return t.range.contains(e.row,e.column)})},e.prototype.markersComparator=function(e,t){return e.range.start.row-t.range.start.row},e.prototype.setMarkers=function(e){this.markers=e.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},e.prototype.update=function(e,t,n,o){if(this.markers&&this.markers.length)for(var r,i=o.firstRow,s=o.lastRow,a=0,l=0,c=0;c<this.markers.length;c++){var u=this.markers[c];if(!(u.range.end.row<i||u.range.start.row>s||(u.range.start.row===l?a++:(l=u.range.start.row,a=0),a>200))){var p=u.range.clipRows(i,s);if(p.start.row!==p.end.row||p.start.column!==p.end.column){var h=p.toScreenRange(n);h.isEmpty()?(r=n.getNextFoldLine(p.end.row,r))&&r.end.row>p.end.row&&(i=r.end.row):"fullLine"===this.markerType?t.drawFullLineMarker(e,h,u.className,o):h.isMultiLine()?"line"===this.markerType?t.drawMultiLineMarker(e,h,u.className,o):t.drawTextMarker(e,h,u.className,o):t.drawSingleLineMarker(e,h,u.className+" ace_br15",o)}}}},e}();o.prototype.MAX_MARKERS=1e4,t.MarkerGroup=o}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){var o=e("../range").Range,r=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,i,s){var a=function(e,t){var n=function(e,t){return e.getTextRange(o.fromPoints({row:0,column:0},t)).split(r).length-1}(e,t),i=e.getValue().split(r),s=Object.create(null),a=i[n];return i.forEach(function(e,t){if(e&&e!==a){var o=Math.abs(n-t),r=i.length-o;s[e]?s[e]=Math.max(r,s[e]):s[e]=r}}),s}(t,n);s(null,Object.keys(a).map(function(e){return{caption:e,value:e,score:a[e],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,n){"use strict";var o=e("../snippets").snippetManager,r=e("../autocomplete").Autocomplete,i=e("../config"),s=e("../lib/lang"),a=e("../autocomplete/util"),l=e("../marker_group").MarkerGroup,c=e("../autocomplete/text_completer"),u={getCompletions:function(e,t,n,o,r){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,o,r);var i=e.session.getState(n.row),s=t.$mode.getCompletions(i,t,n,o);r(null,s=s.map(function(e){return e.completerId=u.id,e}))},id:"keywordCompleter"},p={getCompletions:function(e,t,n,r,i){var s=[],a=t.getTokenAt(n.row,n.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=o.getActiveScopes(e);var l=o.snippetMap,c=[];s.forEach(function(e){for(var t=l[e]||[],n=t.length;n--;){var o=t[n],r=o.name||o.tabTrigger;r&&c.push({caption:r,snippet:o.content,meta:o.tabTrigger&&!o.name?o.tabTrigger+"⇥ ":"snippet",completerId:p.id})}},this),i(null,c)},getDocTooltip:function(e){var t,n;e.snippet&&!e.docHTML&&(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML((t=e.snippet,n={},t.replace(/\${(\d+)(:(.*?))?}/g,function(e,t,o,r){return n[t]=r||""}).replace(/\$(\d+?)/g,function(e,t){return n[t]})))].join(""))},id:"snippetCompleter"},h=[p,c,u];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=c,t.keyWordCompleter=u,t.snippetCompleter=p;var d,f={name:"expandSnippet",exec:function(e){return o.expandWithTab(e)},bindKey:"Tab"},g=function(e,t){m(t.session.$mode)},m=function(e){"string"==typeof e&&(e=i.$modes[e]),e&&(o.files||(o.files={}),v(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m))},v=function(e,t){t&&e&&!o.files[e]&&(o.files[e]={},i.loadModule(t,function(t){t&&(o.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=o.parseSnippetFile(t.snippetText)),o.register(t.snippets||[],t.scope),t.includeScopes&&(o.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){m("ace/mode/"+e)})))}))},y=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!n){d=e;var o=e.editor.$liveAutocompletionDelay;o?b.delay(o):w(e)}},b=s.delayedCall(function(){w(d)},0),w=function(e){var t=e.editor,n=a.getCompletionPrefix(t),o=e.args,i=a.triggerAutocomplete(t,o);if(n&&n.length>=t.$liveAutocompletionThreshold||i){var s=r.for(t);s.autoShown=!0,s.showPopup(t)}},x=e("../editor").Editor;e("../config").defineOptions(x.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(r.for(this),this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",y)):this.commands.off("afterExec",y)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(f),this.on("changeMode",g),g(0,this)):(this.commands.removeCommand(f),this.off("changeMode",g))},value:!1}}),t.MarkerGroup=l}),ace.require(["ace/ext/language_tools"],function(t){e&&(e.exports=t)})},139:(e,t)=>{function n(e){var t=0;if(0==e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}function o(e,t){t=t||62;var n,o=[],r="",i=e<0?"-":"";function s(e){return"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[e]}for(e=Math.abs(e);e>=t;)n=e%t,e=Math.floor(e/t),o.push(s(n));e>0&&o.push(s(e));for(var a=o.length-1;a>=0;a--)r+=o[a];return i+r}t.bitwise=n,t.binaryTransfer=o,t.unique=function(e){return o(n(e),61).replace("-","Z")},t.random=function(e){for(var t="",n=e||8,o=0;o<n;o++){var r=Math.floor(61*Math.random());t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".substring(r,r+1)}return t}},311:e=>{"use strict";e.exports=function(e,t,n,o,r,i,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,r,i,s,a],u=0;(l=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},470:(e,t,n)=>{"use strict";var o=n(5549);n(3091).default,n(4038).default,t.Ay=o.default},570:(e,t)=>{var n,o,r;console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(i){if("undefined"!=typeof window){var s,a,l=0,c=!1,u=!1,p="[iFrameSizer]",h=null,d=window.requestAnimationFrame,f=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),g={},m=null,v=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),y={};window.jQuery!==i&&((a=window.jQuery).fn?a.fn.iFrameResize||(a.fn.iFrameResize=function(e){return this.filter("iframe").each(function(t,n){F(n,e)}).end()}):_("","Unable to bind to jQuery, it is not fully loaded.")),o=[],(r="function"==typeof(n=H)?n.apply(t,o):n)===i||(e.exports=r),window.iFrameResize=window.iFrameResize||H()}function b(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,t,n){e.addEventListener(t,n,!1)}function x(e,t,n){e.removeEventListener(t,n,!1)}function S(e){return g[e]?g[e].log:c}function C(e,t){$("log",e,t,S(e))}function _(e,t){$("info",e,t,S(e))}function k(e,t){$("warn",e,t,!0)}function $(e,t,n,o){!0===o&&"object"==typeof window.console&&console[e](function(e){return p+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}(t),n)}function E(e){function t(){n("Height"),n("Width"),P(function(){D($),L(E),c("onResized",$)},$,"init")}function n(e){var t=Number(g[E]["max"+e]),n=Number(g[E]["min"+e]),o=e.toLowerCase(),r=Number($[o]);C(E,"Checking "+o+" is in range "+n+"-"+t),r<n&&(r=n,C(E,"Set "+o+" to min value")),r>t&&(r=t,C(E,"Set "+o+" to max value")),$[o]=""+r}function o(e){return S.slice(S.indexOf(":")+7+e)}function r(e,t){var n,o;n=function(){var n,o;N("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),o=$.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:o.height,iframeWidth:o.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(o.top-n.top,10),offsetLeft:parseInt(o.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},y[o=t]||(y[o]=setTimeout(function(){y[o]=null,n()},32))}function i(e){var t=e.getBoundingClientRect();return A(E),{x:Math.floor(Number(t.left)+Number(h.x)),y:Math.floor(Number(t.top)+Number(h.y))}}function s(e){var t=e?i($.iframe):{x:0,y:0},n={x:Number($.width)+t.x,y:Number($.height)+t.y};C(E,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top===window.self?(h=n,a(),C(E,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):k(E,"Unable to scroll to requested position, window.parentIFrame not found")}function a(){!1===c("onScroll",h)?R():L(E)}function l(e){var t={};if(0===Number($.width)&&0===Number($.height)){var n=o(9).split(":");t={x:n[1],y:n[0]}}else t={x:$.width,y:$.height};c(e,{iframe:$.iframe,screenX:Number(t.x),screenY:Number(t.y),type:$.type})}function c(e,t){return O(E,e,t)}var u,d,f,m,v,b,S=e.data,$={},E=null;"[iFrameResizerChild]Ready"===S?function(){for(var e in g)N("iFrame requested init",j(e),g[e].iframe,e)}():p===(""+S).slice(0,13)&&S.slice(13).split(":")[0]in g?(m=(f=S.slice(13).split(":"))[1]?parseInt(f[1],10):0,v=g[f[0]]&&g[f[0]].iframe,b=getComputedStyle(v),$={iframe:v,id:f[0],height:m+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(b)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(b),width:f[2],type:f[3]},E=$.id,g[E]&&(g[E].loaded=!0),(d=$.type in{true:1,false:1,undefined:1})&&C(E,"Ignoring init message from meta parent page"),!d&&function(e){var t=!0;return g[e]||(t=!1,k($.type+" No settings for "+e+". Message was: "+S)),t}(E)&&(C(E,"Received: "+S),u=!0,null===$.iframe&&(k(E,"IFrame ("+$.id+") not found"),u=!1),u&&function(){var t,n=e.origin,o=g[E]&&g[E].checkOrigin;if(o&&""+n!="null"&&!(o.constructor===Array?function(){var e=0,t=!1;for(C(E,"Checking connection is from allowed list of origins: "+o);e<o.length;e++)if(o[e]===n){t=!0;break}return t}():(t=g[E]&&g[E].remoteHost,C(E,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+$.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(g[E]&&g[E].firstRun&&g[E]&&(g[E].firstRun=!1),$.type){case"close":T($.iframe);break;case"message":d=o(6),C(E,"onMessage passed: {iframe: "+$.iframe.id+", message: "+d+"}"),c("onMessage",{iframe:$.iframe,message:JSON.parse(d)}),C(E,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":g[E].autoResize=JSON.parse(o(9));break;case"scrollTo":s(!1);break;case"scrollToOffset":s(!0);break;case"pageInfo":r(g[E]&&g[E].iframe,E),function(){function e(e,o){function i(){g[n]?r(g[n].iframe,n):t()}["scroll","resize"].forEach(function(t){C(n,e+t+" listener for sendPageInfo"),o(window,t,i)})}function t(){e("Remove ",x)}var n=E;e("Add ",w),g[n]&&(g[n].stopPageInfo=t)}();break;case"pageInfoStop":g[E]&&g[E].stopPageInfo&&(g[E].stopPageInfo(),delete g[E].stopPageInfo);break;case"inPageLink":n=o(9).split("#")[1]||"",u=decodeURIComponent(n),(p=document.getElementById(u)||document.getElementsByName(u)[0])?(e=i(p),C(E,"Moving to in page link (#"+n+") at x: "+e.x+" y: "+e.y),h={x:e.x,y:e.y},a(),C(E,"--")):window.top===window.self?C(E,"In page link #"+n+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(n):C(E,"In page link #"+n+" not found and window.parentIFrame not found");break;case"reset":I($);break;case"init":t(),c("onInit",$.iframe);break;default:0===Number($.width)&&0===Number($.height)?k("Unsupported message received ("+$.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}var e,n,u,p,d}())):_(E,"Ignored: "+S)}function O(e,t,n){var o=null,r=null;if(g[e]){if("function"!=typeof(o=g[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");r=o(n)}return r}function M(e){var t=e.id;delete g[t]}function T(e){var t=e.id;if(!1!==O(t,"onClose",t)){C(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}O(t,"onClosed",t),C(t,"--"),M(e),s&&(s.disconnect(),s=null)}else C(t,"Close iframe cancelled by onClose event")}function A(e){null===h&&C(e,"Get page position: "+(h={x:window.pageXOffset===i?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===i?document.documentElement.scrollTop:window.pageYOffset}).x+","+h.y)}function L(e){null!==h&&(window.scrollTo(h.x,h.y),C(e,"Set page position: "+h.x+","+h.y),R())}function R(){h=null}function I(e){C(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),A(e.id),P(function(){D(e),N("reset","reset",e.iframe,e.id)},e,"reset")}function D(e){function t(t){u||"0"!==e[t]||(u=!0,C(o,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(g).forEach(function(e){!function(e){function t(t){return"0px"===(g[e]&&g[e].iframe.style[t])}g[e]&&null!==g[e].iframe.offsetParent&&(t("height")||t("width"))&&N("Visibility change","resize",g[e].iframe,e)}(e)})}function t(t){C("window","Mutation observed: "+t[0].target+" "+t[0].type),z(e,16)}var n,o=b();o&&(n=document.querySelector("body"),new o(t).observe(n,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",C(e.id,"IFrame ("+o+") "+t+" set to "+e[t]+"px")):C("undefined","messageData id not set")}(n),t(n)}var o=e.iframe.id;g[o]&&(g[o].sizeHeight&&n("height"),g[o].sizeWidth&&n("width"))}function P(e,t,n){n!==t.type&&d&&!window.jasmine?(C(t.id,"Requesting animation frame"),d(e)):e()}function N(e,t,n,o,r){var i,s=!1;o=o||n.id,g[o]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(i=g[o]&&g[o].targetOrigin,C(o,"["+e+"] Sending msg to iframe["+o+"] ("+t+") targetOrigin: "+i),n.contentWindow.postMessage(p+t,i)):k(o,"["+e+"] IFrame("+o+") not found"),r&&g[o]&&g[o].warningTimeout&&(g[o].msgTimeout=setTimeout(function(){!g[o]||g[o].loaded||s||(s=!0,k(o,"IFrame has not responded within "+g[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))},g[o].warningTimeout)))}function j(e){return e+":"+g[e].bodyMarginV1+":"+g[e].sizeWidth+":"+g[e].log+":"+g[e].interval+":"+g[e].enablePublicMethods+":"+g[e].autoResize+":"+g[e].bodyMargin+":"+g[e].heightCalculationMethod+":"+g[e].bodyBackground+":"+g[e].bodyPadding+":"+g[e].tolerance+":"+g[e].inPageLinks+":"+g[e].resizeFrom+":"+g[e].widthCalculationMethod+":"+g[e].mouseEvents}function F(e,t){function n(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],k(a,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var o,r,a=function(n){if("string"!=typeof n)throw new TypeError("Invaild id for iFrame. Expected String");var o;return""===n&&(e.id=(o=t&&t.id||v.id+l++,null!==document.getElementById(o)&&(o+=l++),n=o),c=(t||{}).log,C(n,"Added missing iframe ID: "+n+" ("+e.src+")")),n}(e.id);a in g&&"iFrameResizer"in e?k(a,"Ignored iFrame, already setup."):(function(t){var o;t=t||{},g[a]=Object.create(null),g[a].iframe=e,g[a].firstRun=!0,g[a].remoteHost=e.src&&e.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(t),Object.keys(t).forEach(n,t),function(e){for(var t in v)Object.prototype.hasOwnProperty.call(v,t)&&(g[a][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:v[t])}(t),g[a]&&(g[a].targetOrigin=!0===g[a].checkOrigin?""===(o=g[a].remoteHost)||null!==o.match(/^(about:blank|javascript:|file:\/\/)/)?"*":o:"*")}(t),function(){switch(C(a,"IFrame scrolling "+(g[a]&&g[a].scrolling?"enabled":"disabled")+" for "+a),e.style.overflow=!1===(g[a]&&g[a].scrolling)?"hidden":"auto",g[a]&&g[a].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=g[a]?g[a].scrolling:"no"}}(),function(){function t(t){var n=g[a][t];1/0!==n&&0!==n&&(e.style[t]=function(e){return"number"==typeof e}(n)?n+"px":n,C(a,"Set "+t+" = "+e.style[t]))}function n(e){if(g[a]["min"+e]>g[a]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}(),"number"!=typeof(g[a]&&g[a].bodyMargin)&&"0"!==(g[a]&&g[a].bodyMargin)||(g[a].bodyMarginV1=g[a].bodyMargin,g[a].bodyMargin=g[a].bodyMargin+"px"),o=j(a),(r=b())&&(s=function(t){if(!e.parentNode)return null;var n=new t(function(t){t.forEach(function(t){Array.prototype.slice.call(t.removedNodes).forEach(function(t){t===e&&T(e)})})});return n.observe(e.parentNode,{childList:!0}),n}(r)),w(e,"load",function(){var t,n;N("iFrame.onload",o,e,i,!0),t=g[a]&&g[a].firstRun,n=g[a]&&g[a].heightCalculationMethod in f,!t&&n&&I({iframe:e,height:0,width:0,type:"init"})}),N("init",o,e,i,!0),g[a]&&(g[a].iframe.iFrameResizer={close:T.bind(null,g[a].iframe),removeListeners:M.bind(null,g[a].iframe),resize:N.bind(null,"Window resize","resize",g[a].iframe),moveToAnchor:function(e){N("Move to anchor","moveToAnchor:"+e,g[a].iframe,a)},sendMessage:function(e){N("Send Message","message:"+(e=JSON.stringify(e)),g[a].iframe,a)}}))}function z(e,t){null===m&&(m=setTimeout(function(){m=null,e()},t))}function B(){"hidden"!==document.visibilityState&&(C("document","Trigger event: Visibility change"),z(function(){W("Tab Visible","resize")},16))}function W(e,t){Object.keys(g).forEach(function(n){(function(e){return g[e]&&"parent"===g[e].resizeFrom&&g[e].autoResize&&!g[e].firstRun})(n)&&N(e,t,g[n].iframe,n)})}function H(){function e(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),F(n,e),t.push(n))}var t;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!d;e+=1)d=window[t[e]+"RequestAnimationFrame"];d?d=d.bind(window):C("setup","RequestAnimationFrame not supported")}(),w(window,"message",E),w(window,"resize",function(){C("window","Trigger event: resize"),z(function(){W("Window resize","resize")},16)}),w(document,"visibilitychange",B),w(document,"-webkit-visibilitychange",B),function(n,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(n),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),e.bind(i,n));break;case"object":e(n,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()},952:(e,t,n)=>{e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,o){"string"==typeof e?(2==arguments.length&&(o=n),t.modules[e]||(t.payloads[e]=o,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,o,r=function(e,t,n){if("string"==typeof t){var o=a(e,t);if(null!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,l=t.length;s<l;++s){var c=a(e,t[s]);if(null==c&&i.original)return;r.push(c)}return n&&n.apply(null,r)||!0}},i=function(e,t){var n=r("",e,t);return null==n&&i.original?i.original.apply(this,arguments):n},s=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return s(e,n[0])+"!"+s(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&o!=t;){var o=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},a=function(e,n){n=s(e,n);var o=t.modules[n];if(!o){if("function"==typeof(o=t.payloads[n])){var i={},a={id:n,uri:"",exports:i,packaged:!0};i=o(function(e,t){return r(n,e,t)},i,a)||a.exports,t.modules[n]=i,delete t.payloads[n]}o=t.modules[n]=i||o}return o};o=e,(n="ace")&&(e[n]||(e[n]={}),o=e[n]),o.define&&o.define.packaged||(t.original=o.define,o.define=t,o.define.packaged=!0),o.require&&o.require.packaged||(i.original=o.require,o.require=i,o.require.packaged=!0)}(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,t,n){function o(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||o(String.prototype,"startsWith",function(e,t){return t=t||0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||o(String.prototype,"endsWith",function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var o=n.indexOf(e,t);return-1!==o&&o===t}),String.prototype.repeat||o(String.prototype,"repeat",function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||o(String.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];null!=o&&Object.keys(o).forEach(function(e){t[e]=o[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||o(Array.prototype,"find",function(e){for(var t=this.length,n=arguments[1],o=0;o<t;o++){var r=this[o];if(e.call(n,r,o,this))return r}}),Array.prototype.findIndex||o(Array.prototype,"findIndex",function(e){for(var t=this.length,n=arguments[1],o=0;o<t;o++){var r=this[o];if(e.call(n,r,o,this))return o}}),Array.prototype.includes||o(Array.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Array.prototype.fill||o(Array.prototype,"fill",function(e){for(var t=this,n=t.length>>>0,o=0|arguments[1],r=o<0?Math.max(n+o,0):Math.min(o,n),i=arguments[2],s=void 0===i?n:0|i,a=s<0?Math.max(n+s,0):Math.min(s,n);r<a;)t[r]=e,r++;return t}),Array.of||o(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,t,n){"use strict";e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,t,n){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var o=0;o<t.length;o++)n[o]=e(t[o]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var o in n={},t)n[o]=e(t[o]);return n}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var o=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(o,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},o=function(e){return o.cancel(),t=setTimeout(n,e||0),o};return o.schedule=o,o.call=function(){return this.cancel(),e(),o},o.cancel=function(){return clearTimeout(t),t=null,o},o.isPending=function(){return t},o},t.delayedCall=function(e,t){var n=null,o=function(){n=null,e()},r=function(e){null==n&&(n=setTimeout(o,e||t))};return r.delay=function(e){n&&clearTimeout(n),n=setTimeout(o,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var o="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),i=o.userAgent||"",s=o.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=i.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(i.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(i.split(" Edge/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isAndroid=i.indexOf("Android")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(i)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";var o,r=e("./useragent");t.buildDom=function e(t,n,o){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var i=[],s=0;s<t.length;s++){var a=e(t[s],n,o);a&&i.push(a)}return i}var l=document.createElement(t[0]),c=t[1],u=1;for(c&&"object"==typeof c&&!Array.isArray(c)&&(u=2),s=u;s<t.length;s++)e(t[s],l,o);return 2==u&&Object.keys(c).forEach(function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?o&&(o[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)}),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var o=n.indexOf(t);if(-1==o)break;n.splice(o,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),o=!0;;){var r=n.indexOf(t);if(-1==r)break;o=!1,n.splice(r,1)}return o&&n.push(t),e.className=n.join(" "),o},t.setCssClass=function(e,n,o){o?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,o=0;if(n=(t=t||document).querySelectorAll("style"))for(;o<n.length;)if(n[o++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var i=[];function s(){var e=i;i=null,e&&e.forEach(function(e){a(e[0],e[1])})}function a(e,n,r){if("undefined"!=typeof document){if(i)if(r)s();else if(!1===r)return i.push([e,n]);if(!o){var a=r;r&&r.getRootNode&&(a=r.getRootNode())&&a!=r||(a=document);var l=a.ownerDocument||a;if(n&&t.hasCssString(n,a))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),a==l&&(a=t.getDocumentHead(l)),a.insertBefore(c,a.firstChild)}}}if(t.useStrictCSP=function(e){o=e,0==e?s():i||(i=[])},t.importCssString=a,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var o=t.createElement("ace_outer"),r=o.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",o.appendChild(n);var i=e&&e.documentElement||document&&document.documentElement;if(!i)return 0;i.appendChild(o);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=o.clientWidth),i.removeChild(o),s-a},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!r.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,r.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),r.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var o=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=o.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var o={},r=function(){this.propagationStopped=!0},i=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=i),n=n.slice();for(var s=0;s<n.length&&(n[s](t,this),!t.propagationStopped);s++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](t,this)}},o.once=function(e,t){var n=this;if(this.on(e,function o(){n.off(e,o),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},o.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var o=n[e],r=n._disabled_[e];r||(n._disabled_[e]=r=[]),r.push(o);var i=r.indexOf(t);-1!=i&&r.splice(i,1)}n[e]=t},o.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var o=n._disabled_[e];if(n[e]==t)o&&this.setDefaultHandler(e,o.pop());else if(o){var r=o.indexOf(t);-1!=r&&o.splice(r,1)}}},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[e];return o||(o=this._eventRegistry[e]=[]),-1==o.indexOf(t)&&o[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var o=n.indexOf(t);-1!==o&&n.splice(o,1)}},o.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=o}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,t,n){t.reportError=function(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"}}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,t,n){var o,r,i=e("./oop"),s=e("./event_emitter").EventEmitter,a=e("./report_error").reportError,l=e("./default_english_messages").defaultEnglishMessages,c={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var n=this.$options;e=Object.keys(n).filter(function(e){return!n[e].hidden})}return e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return u('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:u('misspelled option "'+e+'"')}};function u(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var p=function(){function e(){this.$defaultOptions={},o=l,r="dollarSigns"}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var o=n[t];"string"==typeof o&&(o={forwardTo:o}),o.name||(o.name=t),e.$options[o.name]=o,"initialValue"in o&&(e["$"+o.name]=o.initialValue)}),i.implement(e,c),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var o=this.$defaultOptions[e]||(this.$defaultOptions[e]={});o[t]&&(o.forwardTo?this.setDefaultValue(o.forwardTo,t,n):o[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},e.prototype.setMessages=function(e,t){o=e,t&&t.placeholders&&(r=t.placeholders)},e.prototype.nls=function(e,t,n){o[e]||(u("No message found for the key '"+e+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+t+"'."),o[t]||u("No message found for the default string '"+t+"' in the provided messages. Falling back to the default English message."));var i=o[e]||o[t]||t;return n&&("dollarSigns"===r&&(i=i.replace(/\$(\$|[\d]+)/g,function(e,t){return"$"==t?"$":n[t]})),"curlyBrackets"===r&&(i=i.replace(/\{([^\}]+)\}/g,function(e,t){return n[t]}))),i},e}();p.prototype.warn=u,p.prototype.reportError=a,i.implement(p.prototype,s),t.AppConfig=p}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,t,n){n.exports='.ace-tm .ace_gutter {\n  background: #f0f0f0;\n  color: #333;\n}\n\n.ace-tm .ace_print-margin {\n  width: 1px;\n  background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n    background-color: #6B72E6;\n}\n\n.ace-tm {\n  background-color: #FFFFFF;\n  color: black;\n}\n\n.ace-tm .ace_cursor {\n  color: black;\n}\n        \n.ace-tm .ace_invisible {\n  color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n  color: blue;\n}\n\n.ace-tm .ace_constant {\n  color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n  color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n  color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n  color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n  background-color: rgba(255, 0, 0, 0.1);\n  color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n  color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n  color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n  color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n  color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n  color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n  color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n  color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n  color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n  color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n  color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n  color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n  color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n  color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n  color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n  color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n  color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n  background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n  box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n  background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n  background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n  margin: -1px 0 0 -1px;\n  border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n  background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n    background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n  background: rgb(250, 250, 255);\n  border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,t,n){var o=e("./lib/lang"),r=e("./lib/net"),i=e("./lib/dom"),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var a,l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},t.set=function(e,t){if(l.hasOwnProperty(e))l[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&i.useStrictCSP(t)},t.all=function(){return o.copyObject(l)},t.$modes={},t.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var n=e.split("/"),o="snippets"==(t=t||n[n.length-2]||"")?"/":"-",r=n[n.length-1];if("worker"==t&&"-"==o){var i=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(i,"")}(!r||r==t)&&n.length>1&&(r=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==o&&(t=o=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+o+r+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.setLoader=function(e){a=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,o){var i;if(Array.isArray(n))var s=n[0],l=n[1];else"string"==typeof n&&(l=n);var u=function(n){if(n&&!t.$loading[l])return o&&o(n);if(t.$loading[l]||(t.$loading[l]=[]),t.$loading[l].push(o),!(t.$loading[l].length>1)){var i=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(0,e("./theme/textmate")):a?a(t,n):console.error("loader is not configured")}(l,function(e,n){n&&(t.$loaded[l]=n),t._emit("load.module",{name:l,module:n});var o=t.$loading[l];t.$loading[l]=null,o.forEach(function(e){e&&e(n)})})};if(!t.get("packaged"))return i();r.loadScript(t.moduleUrl(l,s),i),c()}};if(t.dynamicModules[l])t.dynamicModules[l]().then(function(e){e.default?u(e.default):u(e)});else{try{i=this.$require(l)}catch(e){}u(i||t.$loaded[l])}},t.$require=function(e){if("function"==typeof n.require)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$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"),c=function(){})};t.version="1.43.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,t,o){"use strict";e("./lib/fixoldbrowsers");var r=e("./config");r.setLoader(function(t,n){e([t],function(e){n(null,e)})});var i=function(){return this||"undefined"!=typeof window&&window}();function s(t){if(i&&i.document){r.set("packaged",t||e.packaged||o.packaged||i.define&&n.amdD.packaged);var s={},l="",c=document.currentScript||document._currentScript,u=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=u.getElementsByTagName("script"),h=0;h<p.length;h++){var d=p[h],f=d.src||d.getAttribute("src");if(f){for(var g=d.attributes,m=0,v=g.length;m<v;m++){var y=g[m];0===y.name.indexOf("data-ace-")&&(s[a(y.name.replace(/^data-ace-/,""))]=y.value)}var b=f.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(l=b[1])}}for(var w in l&&(s.base=s.base||l,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[w]&&r.set(w,s[w])}}function a(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}o.exports=function(t){r.init=s,r.$require=e,t.require=e,t.define=n.amdD},s(!0)}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var o=function(){function e(e,t,n,o){this.start={row:e,column:t},this.end={row:n,column:o}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,o=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(o.row,o.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(o.row,o.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var o={row:n+1,column:0};else this.end.row<t&&(o={row:t,column:0});if(this.start.row>n)var r={row:n+1,column:0};else this.start.row<t&&(r={row:t,column:0});return e.fromPoints(r||this.start,o||this.end)},e.prototype.extend=function(t,n){var o=this.compare(t,n);if(0==o)return this;if(-1==o)var r={row:t,column:n};else var i={row:t,column:n};return e.fromPoints(r||this.start,i||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),o=t.documentToScreenPosition(this.end);return new e(n.row,n.column,o.row,o.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();o.fromPoints=function(e,t){return new o(e.row,e.column,t.row,t.column)},o.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=o}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){"use strict";for(var o=e("./oop"),r={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},i={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},s=0;s<10;s++)i["Digit"+s]=48+s,i["Numpad"+s]=96+s,r.PRINTABLE_KEYS[48+s]=""+s,r.FUNCTION_KEYS[96+s]="Numpad"+s;for(s=65;s<91;s++){var a=String.fromCharCode(s+32);i["Key"+a.toUpperCase()]=s,r.PRINTABLE_KEYS[s]=a}for(s=1;s<13;s++)i["F"+s]=111+s,r.FUNCTION_KEYS[111+s]="F"+s;var l={Shift:16,Control:17,Alt:18,Meta:224};for(var c in l)i[c]=i[c+"Left"]=i[c+"Right"]=l[c];for(var u in t.$codeToKeyCode=i,r.PRINTABLE_KEYS[173]="-",r.FUNCTION_KEYS){var p=r.FUNCTION_KEYS[u].toLowerCase();r[p]=parseInt(u,10)}for(var u in r.PRINTABLE_KEYS)p=r.PRINTABLE_KEYS[u].toLowerCase(),r[p]=parseInt(u,10);o.mixin(r,r.MODIFIER_KEYS),o.mixin(r,r.PRINTABLE_KEYS),o.mixin(r,r.FUNCTION_KEYS),r.enter=r.return,r.escape=r.esc,r.del=r.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)r.KEY_MODS[t]=e.filter(function(e){return t&r.KEY_MODS[e]}).join("-")+"-"}(),r.KEY_MODS[0]="",r.KEY_MODS[-1]="input-",o.mixin(t,r),t.default=t,t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var o,r=e("./keys"),i=e("./useragent"),s=null,a=0;function l(){return null==o&&function(){o=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return o={passive:!1},!0}})}catch(e){}}(),o}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,o){e.addEventListener(t,n,l()),o&&o.$toDestroy.push(new c(e,t,n))},p=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};function h(e){return(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function d(){s=Object.create(null)}if(t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var o=e&&e.ownerDocument||document;function r(e){t&&t(e),n&&n(e),p(o,"mousemove",t),p(o,"mouseup",r),p(o,"dragstart",r)}return u(o,"mousemove",t),u(o,"mouseup",r),u(o,"dragstart",r),r},t.addMouseWheelListener=function(e,t,n){u(e,"wheel",function(e){var n=e.deltaX||0,o=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*o;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*o;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*o}t(e)},n)},t.addMultiMouseDownListener=function(e,n,o,r,s){var a,l,c,p=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function d(e){if(0!==t.getButton(e)?p=0:e.detail>1?++p>4&&(p=1):p=1,i.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!s||(p=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},n[p-1]||600),1==p&&(a=e.clientX,l=e.clientY)}if(e._clicks=p,o[r]("mousedown",e),p>4)p=0;else if(p>1)return o[r](h[p],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){u(e,"mousedown",d,s)})},t.getModifierString=function(e){return r.KEY_MODS[h(e)]},t.addCommandKeyListener=function(e,n,o){var l=null;u(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=function(e,t,n){var o=h(t);if(!n&&t.code&&(n=r.$codeToKeyCode[t.code]||n),!i.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(o|=8),s.altGr){if(!(3&~o))return;s.altGr=0}if(18===n||17===n){var l=t.location;17===n&&1===l?1==s[n]&&(a=t.timeStamp):18===n&&3===o&&2===l&&t.timeStamp-a<50&&(s.altGr=!0)}}if(n in r.MODIFIER_KEYS&&(n=-1),o||13!==n||3!==t.location||(e(t,o,-n),!t.defaultPrevented)){if(i.isChromeOS&&8&o){if(e(t,o,n),t.defaultPrevented)return;o&=-9}return!!(o||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,o,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t},o),u(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)},o),u(e,"keyup",function(e){s[e.keyCode]=null},o),s||(d(),u(window,"focus",d))},"object"==typeof window&&window.postMessage&&!i.isOldIE){var f=1;t.nextTick=function(e,n){n=n||window;var o="zero-timeout-message-"+f++,r=function(i){i.data==o&&(t.stopPropagation(i),p(n,"message",r),e())};u(n,"message",r),n.postMessage(o,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function n(){t.$idleBlocked?setTimeout(n,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,t,n){"use strict";var o;n.exports={lineMode:!1,pasteCancelled:function(){return!!(o&&o>Date.now()-50)||(o=!1)},cancel:function(){o=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,t,n){"use strict";var o=e("../lib/event"),r=e("../config").nls,i=e("../lib/useragent"),s=e("../lib/dom"),a=e("../lib/lang"),l=e("../clipboard"),c=i.isChrome<18,u=i.isIE,p=i.isChrome>63,h=400,d=e("../lib/keys"),f=d.KEY_MODS,g=i.isIOS,m=g?/\s/:/\n/,v=i.isMobile,y=function(){function e(e,t){var n=this;this.host=t,this.text=s.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",v||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch(e){}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),o.addListener(this.text,"blur",function(e){n.ignoreFocusEvents||(t.onBlur(e),n.$isFocused=!1)},t),o.addListener(this.text,"focus",function(e){if(!n.ignoreFocusEvents){if(n.$isFocused=!0,i.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),i.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()}},t),this.$focusScroll=!1,t.on("beforeEndOperation",function(){var e=t.curOp,o=e&&e.command&&e.command.name;if("insertstring"!=o){var r=o&&(e.docChanged||e.selectionChanged);n.inComposition&&r&&(n.lastValue=n.text.value="",n.onCompositionEnd()),n.resetSelection()}}),t.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=g?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,o.addCommandKeyListener(this.text,function(e,o,r){if(!n.inComposition)return t.onCommandKey(e,o,r)},t),o.addListener(this.text,"select",this.onSelect.bind(this),t),o.addListener(this.text,"input",this.onInput.bind(this),t),o.addListener(this.text,"cut",this.onCut.bind(this),t),o.addListener(this.text,"copy",this.onCopy.bind(this),t),o.addListener(this.text,"paste",this.onPaste.bind(this),t),"oncut"in this.text&&"oncopy"in this.text&&"onpaste"in this.text||o.addListener(e,"keydown",function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:n.onCopy(e);break;case 86:n.onPaste(e);break;case 88:n.onCut(e)}},t),this.syncComposition=a.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),o.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),t),o.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),t),o.addListener(this.text,"keyup",this.onKeyup.bind(this),t),o.addListener(this.text,"keydown",this.syncComposition.bind(this),t),o.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),t),this.closeTimeout,o.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),t),o.addListener(this.text,"mousedown",function(e){e.preventDefault(),n.onContextMenuClose()},t),o.addListener(t.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),t),o.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),t),g&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,n){var o=this,r=null,i=!1;n.addEventListener("keydown",function(e){r&&clearTimeout(r),i=!0},!0),n.addEventListener("keyup",function(e){r=setTimeout(function(){i=!1},100)},!0);var s=function(e){if(document.activeElement===n&&!(i||o.inComposition||t.$mouseHandler.isMousePressed||o.copied)){var r=n.selectionStart,s=n.selectionEnd,a=null,l=0;if(0==r?a=d.up:1==r?a=d.home:s>o.lastSelectionEnd&&"\n"==o.lastValue[s]?a=d.end:r<o.lastSelectionStart&&" "==o.lastValue[r-1]?(a=d.left,l=f.option):r<o.lastSelectionStart||r==o.lastSelectionStart&&o.lastSelectionEnd!=o.lastSelectionStart&&r==s?a=d.left:s>o.lastSelectionEnd&&o.lastValue.slice(0,s).split("\n").length>2?a=d.down:s>o.lastSelectionEnd&&" "==o.lastValue[s-1]?(a=d.right,l=f.option):(s>o.lastSelectionEnd||s==o.lastSelectionEnd&&o.lastSelectionEnd!=o.lastSelectionStart&&r==s)&&(a=d.right),r!==s&&(l|=f.shift),a){if(!t.onCommandKey({},l,a)&&t.commands){a=d.keyCodeToString(a);var c=t.commands.findKeyCommand(l,a);c&&t.execCommand(c)}o.lastSelectionStart=r,o.lastSelectionEnd=s,o.resetSelection("")}}};document.addEventListener("selectionchange",s),t.on("destroy",function(){document.removeEventListener("selectionchange",s)})},e.prototype.onContextMenuClose=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){e.tempStyle&&(e.text.style.cssText=e.tempStyle,e.tempStyle=""),e.host.renderer.$isMousePressed=!1,e.host.renderer.$keepTextAreaAtCursor&&e.host.renderer.$moveTextAreaToCursor()},0)},e.prototype.$onContextMenu=function(e){this.host.textInput.onContextMenu(e),this.onContextMenuClose()},e.prototype.onKeyup=function(e){27==e.keyCode&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},e.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},e.prototype.onCompositionStart=function(e){if(!this.inComposition&&this.host.onCompositionStart&&!this.host.$readOnly&&(this.inComposition={},!this.commandMode)){e.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var t=this.host.getSelectionRange();t.end.row=t.start.row,t.end.column=t.start.column,this.inComposition.markerRange=t,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},e.prototype.onCompositionUpdate=function(){if(this.inComposition&&this.host.onCompositionUpdate&&!this.host.$readOnly){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var e=this.text.value;this.sendText(e),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},e.prototype.onCompositionEnd=function(e){this.host.onCompositionEnd&&!this.host.$readOnly&&(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),e&&this.onInput())},e.prototype.onCut=function(e){this.doCopy(e,!0)},e.prototype.onCopy=function(e){this.doCopy(e,!1)},e.prototype.onPaste=function(e){var t=this.handleClipboardData(e);l.pasteCancelled()||("string"==typeof t?(t&&this.host.onPaste(t,e),i.isIE&&setTimeout(this.resetSelection),o.preventDefault(e)):(this.text.value="",this.pasted=!0))},e.prototype.doCopy=function(e,t){var n=this,r=this.host.getCopyText();if(!r)return o.preventDefault(e);this.handleClipboardData(e,r)?(g&&(this.resetSelection(r),this.copied=r,setTimeout(function(){n.copied=!1},10)),t?this.host.onCut():this.host.onCopy(),o.preventDefault(e)):(this.copied=!0,this.text.value=r,this.text.select(),setTimeout(function(){n.copied=!1,n.resetSelection(),t?n.host.onCut():n.host.onCopy()}))},e.prototype.handleClipboardData=function(e,t,n){var o=e.clipboardData||window.clipboardData;if(o&&!c){var r=u||n?"Text":"text/plain";try{return t?!1!==o.setData(r,t):o.getData(r)}catch(e){if(!n)return this.handleClipboardData(e,t,!0)}}},e.prototype.onInput=function(e){if(this.inComposition)return this.onCompositionUpdate();if(e&&e.inputType){if("historyUndo"==e.inputType)return this.host.execCommand("undo");if("historyRedo"==e.inputType)return this.host.execCommand("redo")}var t=this.text.value,n=this.sendText(t,!0);(t.length>500||m.test(n)||v&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},e.prototype.sendText=function(e,t){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),e&&this.host.onPaste(e),this.pasted=!1,"";for(var n=this.text.selectionStart,o=this.text.selectionEnd,r=this.lastSelectionStart,s=this.lastValue.length-this.lastSelectionEnd,a=e,l=e.length-n,c=e.length-o,u=0;r>0&&this.lastValue[u]==e[u];)u++,r--;for(a=a.slice(u),u=1;s>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==e[e.length-u];)u++,s--;l-=u-1,c-=u-1;var p=a.length-u+1;if(p<0&&(r=-p,p=0),a=a.slice(0,p),!(t||a||l||r||s||c))return"";this.sendingText=!0;var h=!1;return i.isAndroid&&". "==a&&(a="  ",h=!0),a&&!r&&!s&&!l&&!c||this.commandMode?this.host.onTextInput(a):this.host.onTextInput(a,{extendLeft:r,extendRight:s,restoreStart:l,restoreEnd:c}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=n,this.lastSelectionEnd=o,this.lastRestoreEnd=c,h?"\n":a},e.prototype.onSelect=function(e){var t,n=this;this.inComposition||(this.copied?this.copied=!1:0===(t=this.text).selectionStart&&t.selectionEnd>=n.lastValue.length&&t.value===n.lastValue&&n.lastValue&&t.selectionEnd!==n.lastSelectionEnd?(this.host.selectAll(),this.resetSelection()):v&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection())},e.prototype.$resetSelectionIOS=function(e){if(this.$isFocused&&(!this.copied||e)&&!this.sendingText){e||(e="");var t="\n ab"+e+"cde fg\n";t!=this.text.value&&(this.text.value=this.lastValue=t);var n=4+(e.length||(this.host.selection.isEmpty()?0:1));4==this.lastSelectionStart&&this.lastSelectionEnd==n||this.text.setSelectionRange(4,n),this.lastSelectionStart=4,this.lastSelectionEnd=n}},e.prototype.$resetSelection=function(){var e=this;if(!this.inComposition&&!this.sendingText&&(this.$isFocused||this.afterContextMenu)){this.inComposition=!0;var t=0,n=0,o="",r=function(t,n){for(var o=n,r=1;r<=t-e.rowStart&&r<2*e.numberOfExtraLines+1;r++)o+=e.host.session.getLine(t-r).length+1;return o};if(this.host.session){var i=this.host.selection,s=i.getRange(),a=i.cursor.row;a===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):a===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(a<this.rowStart-1||a>this.rowEnd+1)&&(this.rowStart=a>this.numberOfExtraLines?a-this.numberOfExtraLines:0,this.rowEnd=a>this.numberOfExtraLines?a+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var l=[],c=this.rowStart;c<=this.rowEnd;c++)l.push(this.host.session.getLine(c));if(o=l.join("\n"),t=r(s.start.row,s.start.column),n=r(s.end.row,s.end.column),s.start.row<this.rowStart){var u=this.host.session.getLine(this.rowStart-1);t=s.start.row<this.rowStart-1?0:t,n+=u.length+1,o=u+"\n"+o}else if(s.end.row>this.rowEnd){var p=this.host.session.getLine(this.rowEnd+1);n=s.end.row>this.rowEnd+1?p.length:s.end.column,n+=o.length+1,o=o+"\n"+p}else v&&a>0&&(o="\n"+o,n+=1,t+=1);o.length>h&&(t<h&&n<h?o=o.slice(0,h):(o="\n",t==n?t=n=0:(t=0,n=1)));var d=o+"\n\n";d!=this.lastValue&&(this.text.value=this.lastValue=d,this.lastSelectionStart=this.lastSelectionEnd=d.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=n||this.lastSelectionStart!=t||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(t,n),this.lastSelectionStart=t,this.lastSelectionEnd=n}catch(e){}this.inComposition=!1}},e.prototype.setHost=function(e){this.host=e},e.prototype.setNumberOfExtraLines=function(e){this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=e<0?0:e},e.prototype.setAriaLabel=function(){var e="";if(this.host.$textInputAriaLabel&&(e+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var t=this.host.session.selection.cursor.row;e+=r("text-input.aria-label","Cursor at row $0",[t+1])}this.text.setAttribute("aria-label",e)},e.prototype.setAriaOptions=function(e){e.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",e.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",e.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),e.role&&this.text.setAttribute("role",e.role),e.setLabel&&(this.text.setAttribute("aria-roledescription",r("text-input.aria-roledescription","editor")),this.setAriaLabel())},e.prototype.focus=function(){var e=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||p||"browser"==this.$focusScroll)return this.text.focus({preventScroll:!0});var t=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var n=0!=this.text.getBoundingClientRect().top}catch(e){return}var o=[];if(n)for(var r=this.text.parentElement;r&&1==r.nodeType;)o.push(r),r.setAttribute("ace_nocontext","true"),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;this.text.focus({preventScroll:!0}),n&&o.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){e.text.style.position="","0px"==e.text.style.top&&(e.text.style.top=t)},0)},e.prototype.blur=function(){this.text.blur()},e.prototype.isFocused=function(){return this.$isFocused},e.prototype.setInputHandler=function(e){this.inputHandler=e},e.prototype.getInputHandler=function(){return this.inputHandler},e.prototype.getElement=function(){return this.text},e.prototype.setCommandMode=function(e){this.commandMode=e,this.text.readOnly=!1},e.prototype.setReadOnly=function(e){this.commandMode||(this.text.readOnly=e)},e.prototype.setCopyWithEmptySelection=function(e){},e.prototype.onContextMenu=function(e){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:e}),this.moveToMouse(e,!0)},e.prototype.moveToMouse=function(e,t){var n=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(t?"z-index:100000;":"")+(i.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var r=this.host.container.getBoundingClientRect(),a=s.computedStyle(this.host.container),l=r.top+(parseInt(a.borderTopWidth)||0),c=r.left+(parseInt(a.borderLeftWidth)||0),u=r.bottom-l-this.text.clientHeight-2,p=function(e){s.translate(n.text,e.clientX-c-2,Math.min(e.clientY-l-2,u))};p(e),"mousedown"==e.type&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),i.isWin&&o.capture(this.host.container,p,this.onContextMenuClose.bind(this)))},e.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},e}();t.TextInput=y,t.$setUserAgentForTests=function(e,t){v=e,g=t}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";var o=e("../lib/useragent"),r=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();return 0!==i?((r.getSelectionRange().isEmpty()||1==i)&&r.selection.moveToPosition(n),void(2==i&&(r.textInput.onContextMenu(e.domEvent),o.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(n);if(-1==o)e=this.$clickSelection.end;else if(1==o)e=this.$clickSelection.start;else{var r=i(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,o=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](o.row,o.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,r.end.row==o.row&&r.end.column==o.column||(o=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,r.start.row==o.row&&r.start.column==o.column||(o=r.end);else if(-1==s&&1==a)o=r.end,t=r.start;else{var l=i(this.$clickSelection,o);o=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(o),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,o,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,o=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(o-t,2))),i=Date.now();(r>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,o=n.session.getBracketRange(t);o?(o.isEmpty()&&(o.start.column--,o.end.column++),this.setState("select")):(o=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=o,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var o=n.getSelectionRange();o.isMultiLine()&&o.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(o.start.row),this.$clickSelection.end=n.selection.getLineRange(o.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,o=e.domEvent.timeStamp,r=o-n.t,i=r?e.wheelX/r:n.vx,s=r?e.wheelY/r:n.vy;r<550&&(i=(i+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(i/s),l=!1;return a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?n.allowed=o:o-n.allowed<550&&(Math.abs(i)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=o):n.allowed=0),n.t=o,n.vx=i,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function i(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}r.prototype.selectEnd=r.prototype.selectByLinesEnd,r.prototype.selectAllEnd=r.prototype.selectByLinesEnd,r.prototype.selectByWordsEnd=r.prototype.selectByLinesEnd,t.DefaultHandlers=r}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/dom"),a=(e("./lib/event"),e("./range").Range),l=e("./lib/scroll").preventParentScroll,c="ace_tooltip",u=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=s.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){s.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=c+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),p=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,o;this.popups.sort(function(e,t){return t.priority-e.priority});var r=[];try{for(var s=i(this.popups),a=s.next();!a.done;a=s.next()){var l=a.value,c=!0;try{for(var u=(n=void 0,i(r)),p=u.next();!p.done;p=u.next()){var h=p.value;if(this.doPopupsOverlap(h,l)){c=!1;break}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}c?r.push(l):l.hide()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),o=t.getElement().getBoundingClientRect();return n.left<o.right&&n.right>o.left&&n.top<o.bottom&&n.bottom>o.top},e}());t.popupManager=p,t.Tooltip=u;var h=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var o=n.getElement();return o.style.whiteSpace="pre-wrap",o.style.pointerEvents="auto",o.addEventListener("mouseout",n.onMouseOut),o.tabIndex=-1,o.addEventListener("blur",function(){o.contains(document.activeElement)||this.hide()}.bind(n)),o.addEventListener("wheel",l),n}return r(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var o=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(o.row,o.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),o=t.session.getLine(n.row);if(n.column==o.length){var r=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),i=t.session.documentToScreenPosition(n.row,n.column);if(i.column!=r.column||i.row!=r.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,o){if(!(o&&o!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var r=e.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(r.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=a.fromPoints(t.start,t.end);var i=r.textToScreenCoordinates(t.start.row,t.start.column),s=r.scroller.getBoundingClientRect();i.pageX<s.left&&(i.pageX=s.left);var l=this.getElement();l.innerHTML="",l.appendChild(n),l.style.maxHeight="",l.style.display="block";var c=l.clientHeight,u=l.clientWidth,h=window.innerHeight-i.pageY-r.lineHeight,d=!0;i.pageY-c<0&&i.pageY<h&&(d=!1),l.style.maxHeight=(d?i.pageY:h)-10+"px",l.style.top=d?"":i.pageY+r.lineHeight+"px",l.style.bottom=d?window.innerHeight-i.pageY+"px":"",l.style.left=Math.min(i.pageX,window.innerWidth-u-10)+"px"}},t.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,"ace_highlight-marker","text")},t.prototype.hide=function(e){(e||document.activeElement!=this.getElement())&&(e&&e.target&&("keydown"!=e.type||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,p.removePopup(this))))},t.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},t.prototype.onMouseOut=function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains("ace_content")||this.hide())},t}(u);t.HoverTooltip=h}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("../lib/dom"),a=e("../lib/event"),l=e("../tooltip").Tooltip,c=e("../config").nls;t.GUTTER_TOOLTIP_LEFT_OFFSET=5,t.GUTTER_TOOLTIP_TOP_OFFSET=3,t.GutterHandler=function(e){var t,n,o=e.editor,r=o.renderer.$gutterLayer,i=new u(o,!0);function l(e){e&&"keydown"===e.type&&(e.ctrlKey||e.metaKey)||(!e||"mouseout"!==e.type||e.relatedTarget&&!i.getElement().contains(e.relatedTarget))&&(t&&(t=clearTimeout(t)),i.isOpen&&(i.hideTooltip(),o.off("mousewheel",l),o.off("changeSession",l),window.removeEventListener("keydown",l,!0)))}function c(e){i.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(o.isFocused()&&0==t.getButton()&&"foldWidgets"!=r.getRegion(t)){var n=t.getDocumentPosition().row,i=o.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return o.selectAll(),t.preventDefault();e.$clickSelection=o.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(a){var u=a.domEvent.target||a.domEvent.srcElement;if(s.hasCssClass(u,"ace_fold-widget")||s.hasCssClass(u,"ace_custom-widget"))return l();i.isOpen&&e.$tooltipFollowsMouse&&c(a),n=a,t||(t=setTimeout(function(){t=null,n&&!e.isMousePressed&&function(){var t=n.getDocumentPosition().row;if(t==o.session.getLength()){var s=o.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(s>o.session.documentToScreenRow(a.row,a.column))return l()}if(i.showTooltip(t),i.isOpen)if(o.on("mousewheel",l),o.on("changeSession",l),window.addEventListener("keydown",l,!0),e.$tooltipFollowsMouse)c(n);else{var u=n.getGutterRow(),p=r.$lines.get(u);if(p){var h=p.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),d=i.getElement().style;d.left=h.right-5+"px",d.top=h.bottom-3+"px"}else c(n)}}()},50))}),a.addListener(o.renderer.$gutter,"mouseout",function(e){n=null,i.isOpen&&(t=setTimeout(function(){t=null,l(e)},50))},o)};var u=function(e){function t(t,n){void 0===n&&(n=!1);var o=e.call(this,t.container)||this;o.editor=t,o.visibleTooltipRow;var r=o.getElement();return r.setAttribute("role","tooltip"),r.style.pointerEvents="auto",n&&(o.onMouseOut=o.onMouseOut.bind(o),r.addEventListener("mouseout",o.onMouseOut)),o}return r(t,e),t.prototype.onMouseOut=function(e){this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||this.hideTooltip())},t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),i=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+i>o&&(t-=20+i),l.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,o,r=this.editor.renderer.$gutterLayer,i=r.$annotations[e];o=i?{displayText:Array.from(i.displayText),type:Array.from(i.type)}:{displayText:[],type:[]};var a=r.session.getFoldLine(e);if(a&&r.$showFoldedAnnotations){for(var l,c={error:[],security:[],warning:[],info:[],hint:[]},u={error:1,security:2,warning:3,info:4,hint:5},p=e+1;p<=a.end.row;p++)if(r.$annotations[p])for(var h=0;h<r.$annotations[p].text.length;h++){var d=r.$annotations[p].type[h];c[d].push(r.$annotations[p].text[h]),(!l||u[d]<u[l])&&(l=d)}if(["error","security","warning"].includes(l)){var f="".concat(t.annotationsToSummaryString(c)," in folded code.");o.displayText.push(f),o.type.push(l+"_fold")}}if(0===o.displayText.length)return this.hideTooltip();var g={error:[],security:[],warning:[],info:[],hint:[]},m=r.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(p=0;p<o.displayText.length;p++){var v=s.createElement("span"),y=s.createElement("span");(n=y.classList).add.apply(n,["ace_".concat(o.type[p]),m]),y.setAttribute("aria-label","".concat(t.annotationLabels[o.type[p].replace("_fold","")].singular)),y.setAttribute("role","img"),y.appendChild(s.createTextNode(" ")),v.appendChild(y),v.appendChild(s.createTextNode(o.displayText[p])),v.appendChild(s.createElement("br")),g[o.type[p].replace("_fold","")].push(v)}var b=this.getElement();s.removeChildren(b),g.error.forEach(function(e){return b.appendChild(e)}),g.security.forEach(function(e){return b.appendChild(e)}),g.warning.forEach(function(e){return b.appendChild(e)}),g.info.forEach(function(e){return b.appendChild(e)}),g.hint.forEach(function(e){return b.appendChild(e)}),b.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=e,this.editor._signal("showGutterTooltip",this)},t.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},t.annotationsToSummaryString=function(e){var n,o,r=[];try{for(var s=i(["error","security","warning","info","hint"]),a=s.next();!a.done;a=s.next()){var l=a.value;if(e[l].length){var c=1===e[l].length?t.annotationLabels[l].singular:t.annotationLabels[l].plural;r.push("".concat(e[l].length," ").concat(c))}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return r.join(", ")},t}(l);t.GutterTooltip=u}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var o=e("../lib/event"),r=e("../lib/useragent"),i=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){o.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},e.prototype.getButton=function(){return o.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return r.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=i}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var o=e("../lib/dom"),r=e("../lib/event"),i=e("../lib/useragent");function s(e){var t=e.editor,n=o.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,u,p,h,d,f,g,m,v,y=t.container,b=0;function w(){var e=h;(function(e,n){var o=Date.now(),r=!n||e.row!=n.row,i=!n||e.column!=n.column;!m||r||i?(t.moveCursorToPosition(e),m=o,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:o-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(h=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var o=Date.now(),r=t.renderer.layerConfig.lineHeight,i=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},u=Math.min(a.x.left,a.x.right),p=Math.min(a.y.top,a.y.bottom),h={row:e.row,column:e.column};u/i<=2&&(h.column+=a.x.left<a.x.right?-3:2),p/r<=1&&(h.row+=a.y.top<a.y.bottom?-1:1);var d=e.row!=h.row,f=e.column!=h.column,m=!n||e.row!=n.row;d||f&&!m?g?o-g>=200&&t.renderer.scrollCursorIntoView(h):g=o:g=null}(h,e)}function x(){p=t.selection.toOrientedRange(),s=t.session.addMarker(p,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),b=0,r.addListener(document,"mousemove",_)}function S(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(p),t.isFocused()&&!f&&t.$resetCursorStyle(),p=null,h=null,b=0,g=null,m=null,r.removeListener(document,"mousemove",_)}this.onDragStart=function(e){if(this.cancelDrag||!y.draggable){var o=this;return setTimeout(function(){o.startSelect(),o.captureMouse(e)},0),e.preventDefault()}p=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout(function(){t.container.removeChild(n)}),r.clearData(),r.setData("Text",t.session.getTextRange()),f=!0,this.setState("drag")},this.onDragEnd=function(e){if(y.draggable=!1,f=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;d||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return l=e.clientX,c=e.clientY,s||x(),b++,e.dataTransfer.dropEffect=d=$(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(x(),b++),null!==C&&(C=null),e.dataTransfer.dropEffect=d=$(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&s)return S(),d=null,r.preventDefault(e)},this.onDrop=function(e){if(h){var n=e.dataTransfer;if(f)switch(d){case"move":p=p.contains(h.row,h.column)?{start:h,end:h}:t.moveText(p,h);break;case"copy":p=t.moveText(p,h,!0)}else{var o=n.getData("Text");p={start:h,end:t.session.insert(h,o)},t.focus(),d=null}return S(),r.preventDefault(e)}},r.addListener(y,"dragstart",this.onDragStart.bind(e),t),r.addListener(y,"dragend",this.onDragEnd.bind(e),t),r.addListener(y,"dragenter",this.onDragEnter.bind(e),t),r.addListener(y,"dragover",this.onDragOver.bind(e),t),r.addListener(y,"dragleave",this.onDragLeave.bind(e),t),r.addListener(y,"drop",this.onDrop.bind(e),t);var C=null;function _(){null==C&&(C=setTimeout(function(){null!=C&&s&&S()},20))}function k(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function $(e){var t=["copy","copymove","all","uninitialized"],n=i.isMac?e.altKey:e.ctrlKey,o="uninitialized";try{o=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(o)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(o)>=0?r="move":t.indexOf(o)>=0&&(r="copy"),r}}function a(e,t,n,o){return Math.sqrt(Math.pow(n-e,2)+Math.pow(o-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=i.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;i.isIE&&"dragReady"==this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),o=e.getButton();if(1===(e.domEvent.detail||1)&&0===o&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;"unselectable"in r&&(r.unselectable="on"),t.getDragDelay()?(i.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,t,n){"use strict";var o=e("./mouse_event").MouseEvent,r=e("../lib/event"),i=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,p,h,d,f="scroll",g=0,m=0,v=0,y=0;function b(){if(t.getOption("enableMobileMenu")){d||(a=window.navigator&&window.navigator.clipboard,l=!1,c=function(e){return t.commands.canExecute(e,t)},u=function(e){var n,o,r=e.target.getAttribute("action");if("more"==r||!l)return l=!l,n=t.getCopyText(),o=t.session.getUndoManager().hasUndo(),void d.replaceChild(i.buildDom(l?["span",!n&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],n&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],n&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],a&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),d.firstChild);"paste"==r?a.readText().then(function(e){t.execCommand(r,e)}):r&&("cut"!=r&&"copy"!=r||(a?a.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(r)),d.firstChild.style.display="none",l=!1,"openCommandPalette"!=r&&t.focus()},d=i.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){f="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),u(e)},onclick:u},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),o=t.renderer.textToScreenCoordinates(0,0).pageX,r=t.renderer.scrollLeft,s=t.container.getBoundingClientRect();d.style.top=n.pageY-s.top-3+"px",n.pageX-s.left<s.width-70?(d.style.left="",d.style.right="10px"):(d.style.right="",d.style.left=o+r-s.left+"px"),d.style.display="",d.firstChild.style.display="none",t.on("input",w)}else d&&w();var a,l,c,u}function w(e){d&&(d.style.display="none"),t.off("input",w)}function x(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(p.row,p.column);!e.isEmpty()&&n||(t.selection.moveToPosition(p),t.selection.selectWord()),f="wait",b()}r.addListener(e,"contextmenu",function(e){h&&t.textInput.getElement().focus()},t),r.addListener(e,"touchstart",function(e){var r=e.touches;if(c||r.length>1)return clearTimeout(c),c=null,a=-1,void(f="zoom");h=t.$mouseHandler.isMousePressed=!0;var i=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,d=e.timeStamp;l=d;var b=r[0],w=b.clientX,S=b.clientY;Math.abs(n-w)+Math.abs(s-S)>i&&(a=-1),n=e.clientX=w,s=e.clientY=S,v=y=0;var C=new o(e,t);if(p=C.getDocumentPosition(),d-a<500&&1==r.length&&!g)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(p);var e=m>=2?t.selection.getLineRange(p.row):t.session.getBracketRange(p);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),f="wait"}();else{m=0;var _=t.selection.cursor,k=t.selection.isEmpty()?_:t.selection.anchor,$=t.renderer.$cursorLayer.getPixelPosition(_,!0),E=t.renderer.$cursorLayer.getPixelPosition(k,!0),O=t.renderer.scroller.getBoundingClientRect(),M=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,A=function(e,t){return(e/=u)*e+(t=t/i-.75)*t};if(e.clientX<O.left)return void(f="zoom");var L=A(e.clientX-O.left-$.left+T,e.clientY-O.top-$.top+M),R=A(e.clientX-O.left-E.left+T,e.clientY-O.top-E.top+M);L<3.5&&R<3.5&&(f=L>R?"cursor":"anchor"),f=R<3.5?"anchor":L<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=d},t),r.addListener(e,"touchend",function(e){h=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==f?(f="",g=0):c?(t.selection.moveToPosition(p),g=0,b()):"scroll"==f?(g+=60,u=setInterval(function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),g<20&&(v*=.9),g<20&&(y*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*y),e==t.session.getScrollTop()&&(g=0)},10),w()):b(),clearTimeout(c),c=null},t),r.addListener(e,"touchmove",function(e){c&&(clearTimeout(c),c=null);var r=e.touches;if(!(r.length>1||"zoom"==f)){var i=r[0],a=n-i.clientX,u=s-i.clientY;if("wait"==f){if(!(a*a+u*u>4))return e.preventDefault();f="cursor"}n=i.clientX,s=i.clientY,e.clientX=i.clientX,e.clientY=i.clientY;var p=e.timeStamp,h=p-l;if(l=p,"scroll"==f){var d=new o(e,t);d.speed=1,d.wheelX=a,d.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=h&&(v=a/h,y=u/h),t._emit("mousewheel",d),d.propagationStopped||(v=y=0)}else{var g=new o(e,t).getDocumentPosition();"cursor"==f?t.selection.moveCursorToPosition(g):"anchor"==f&&t.selection.setSelectionAnchor(g.row,g.column),t.renderer.scrollCursorIntoView(g),e.preventDefault()}}},t)}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,t,n){"use strict";var o=e("../lib/event"),r=e("../lib/useragent"),i=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=e("../config"),p=function(){function e(e){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var t=this;this.editor=e,new i(this),new s(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout(function(){e.isFocused()||e.focus()})},a=e.renderer.getMouseEventTarget();o.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),o.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),o.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),o.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var u=e.renderer.$gutter;o.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),o.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),o.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),o.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),o.addListener(a,"mousedown",n,e),o.addListener(u,"mousedown",n,e),r.isIE&&e.renderer.scrollBarV&&(o.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),o.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var o=e.renderer.screenToTextCoordinates(n.x,n.y),r=e.session.selection.getRange(),i=e.renderer;!r.isEmpty()&&r.insideStart(o.row,o.column)?i.setCursorStyle("default"):i.setCursorStyle("")}},e)}return e.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new a(t,this.editor))},e.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},e.prototype.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},e.prototype.setState=function(e){this.state=e},e.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,i=this.editor.renderer;i.$isMousePressed=!0;var s=this,l=!0,c=function(e){if(e){if(r.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new a(e,s.editor),s.$mouseMoved=!0}},u=function(e){n.off("beforeEndOperation",d),l=!1,n.session&&p(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",s.isMousePressed=i.$isMousePressed=!1,i.$keepTextAreaAtCursor&&i.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e),n.endOperation()},p=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1},h=function(){l&&(p(),o.nextFrame(h))};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){u(e)});var d=function(e){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",d),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=c,s.releaseMouse=o.capture(this.editor.container,c,u),h()},e.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&o.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();p.prototype.releaseMouse=null,u.defineOptions(p.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=p}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var o=e("../lib/dom");t.FoldHandler=function(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop());var s=t.domEvent&&t.domEvent.target;s&&o.hasCssClass(s,"ace_inline_button")&&o.hasCssClass(s,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),e.renderer.scrollCursorIntoView())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,o=e.session;o.foldWidgets&&o.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,o=e.session,r=o.getParentFoldRangeData(n,!0),i=r.range||r.firstRange;if(i){n=i.start.row;var s=o.getFoldAt(n,o.getLine(n).length,1);s?o.removeFold(s):(o.addFold("...",i),e.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}t.stop()}})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var o=e("../lib/keys"),r=e("../lib/event"),i=function(){function e(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}return e.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},e.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},e.prototype.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},e.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},e.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},e.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},e.prototype.$callKeyboardHandlers=function(e,t,n,o){for(var i,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((i=this.$handlers[l].handleKeyboard(this.$data,e,t,n,o))&&i.command&&((s="null"==i.command||a.exec(i.command,this.$editor,i.args,o))&&o&&-1!=e&&1!=i.passEvent&&1!=i.command.passEvent&&r.stopEvent(o),s)););return s||-1!=e||(i={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),s},e.prototype.onCommandKey=function(e,t,n){var r=o.keyCodeToString(n);return this.$callKeyboardHandlers(t,r,n,e)},e.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},e}();t.KeyBinding=i}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";var o=0,r=0,i=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=11,p=18,h=[p,p,p,p,p,p,p,p,p,6,5,6,8,5,p,p,p,p,p,p,p,p,p,p,p,p,p,p,5,5,5,6,8,4,4,u,u,u,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,p,p,p,p,p,p,5,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,9,4,u,u,u,u,4,4,4,4,0,4,4,p,4,4,u,u,2,2,4,0,4,4,4,2,0,4,4,4,4,4],d=[8,8,8,8,8,8,8,8,8,8,8,p,p,p,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,u,u,u,u,u,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function f(e,t,n){if(!(r<e))if(1!=e||1!=o||s)for(var i,a,l,c,u=n.length,p=0;p<u;){if(t[p]>=e){for(i=p+1;i<u&&t[i]>=e;)i++;for(a=p,l=i-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;p=i}p++}else n.reverse()}function g(e,t,n,r){var l,c,h,d,f=t[r];switch(f){case 0:case 1:i=!1;case 4:case 3:return f;case 2:return i?3:2;case 7:return i=!0,1;case 8:return 4;case 9:return r<1||r+1>=t.length||2!=(l=n[r-1])&&3!=l||2!=(c=t[r+1])&&3!=c?4:(i&&(c=3),c==l?c:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+1<t.length&&2==t[r+1]?2:4;case u:if(r>0&&2==n[r-1])return 2;if(i)return 4;for(d=r+1,h=t.length;d<h&&t[d]==u;)d++;return d<h&&2==t[d]?2:4;case 12:for(h=t.length,d=r+1;d<h&&12==t[d];)d++;if(d<h){var g=e[r],m=g>=1425&&g<=2303||64286==g;if(l=t[d],m&&(1==l||7==l))return 1}return r<1||5==(l=t[r-1])?4:n[r-1];case 5:return i=!1,s=!0,o;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:i=!1;case p:return 4}}function m(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:h[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?d[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var h=e.split(""),d=new Array(h.length),v=new Array(h.length),y=[];o=u?1:0,function(e,t,n,u){var p=o?c:l,h=null,d=null,f=null,v=0,y=null,b=-1,w=null,x=null,S=[];if(!u)for(w=0,u=[];w<n;w++)u[w]=m(e[w]);for(r=o,i=!1,s=!1,a=!1,x=0;x<n;x++){if(h=v,S[x]=d=g(e,u,S,x),y=240&(v=p[h][d]),v&=15,t[x]=f=p[v][5],y>0)if(16==y){for(w=b;w<x;w++)t[w]=1;b=-1}else b=-1;if(p[v][6])-1==b&&(b=x);else if(b>-1){for(w=b;w<x;w++)t[w]=f;b=-1}5==u[x]&&(t[x]=0),r|=f}if(a)for(w=0;w<n;w++)if(6==u[w]){t[w]=o;for(var C=w-1;C>=0&&8==u[C];C--)t[C]=o}}(h,y,h.length,n);for(var b=0;b<d.length;d[b]=b,b++);for(f(2,y,d),f(1,y,d),b=0;b<d.length-1;b++)3===n[b]?y[b]=t.AN:1===y[b]&&(n[b]>7&&n[b]<13||4===n[b]||n[b]===p)?y[b]=t.ON_R:b>0&&"ل"===h[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[b])&&(y[b-1]=y[b]=t.R_H,b++);for(h[h.length-1]===t.DOT&&(y[h.length-1]=t.B),"‫"===h[0]&&(y[0]=t.RLE),b=0;b<d.length;b++)v[b]=y[d[b]];return{logicalFromVisual:d,bidiLevels:v}},t.hasBidiCharacters=function(e,t){for(var n=!1,o=0;o<e.length;o++)t[o]=m(e.charAt(o)),n||1!=t[o]&&7!=t[o]&&3!=t[o]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,t,n){"use strict";var o=e("./lib/bidiutil"),r=e("./lib/lang"),i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function e(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=o,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=i.test(e.getValue())}return e.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},e.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&i.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},e.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,o=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===o;)o=n,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[o.L],this.line=t<i.length?this.line.substring(i[t-1],i[t]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[t]),t==i.length&&(this.line+=this.showInvisibles?n:o.DOT))}else this.line+=this.showInvisibles?n:o.DOT;var s,a=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||a.isFullWidth(e.charCodeAt(0))?(s="\t"===e?a.getScreenTabSize(t+l):2,l+=s-1,r.stringRepeat(o.DOT,s)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==o.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},e.prototype.updateBidiMap=function(){var e=[];o.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=o.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},e.prototype.markAsDirty=function(){this.currentRow=null},e.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[o.L]=this.charWidths[o.EN]=this.charWidths[o.ON_R]=t,this.charWidths[o.R]=this.charWidths[o.AN]=n,this.charWidths[o.R_H]=.45*n,this.charWidths[o.B]=this.charWidths[o.RLE]=0,this.currentRow=null}},e.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},e.prototype.setEolChar=function(e){this.EOL=e},e.prototype.setContentWidth=function(e){this.contentWidth=e},e.prototype.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},e.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),o=e.selection.getSelectionAnchor().row;o<=n.row;o++)t||e.session.getLine(o).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(o).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:o},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(o,0,1)},e.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,r=o.getVisualFromLogicalIdx(n,this.bidiMap),i=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&i[r]%2!=0&&r++;for(var a=0;a<r;a++)s+=this.charWidths[i[a]];return!this.session.getOverwrite()&&e>t&&i[r]%2==0&&(s+=this.charWidths[i[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},e.prototype.getSelections=function(e,t){var n,o=this.bidiMap,r=o.bidiLevels,i=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,p=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,d=0;d<r.length;d++)h=o.logicalFromVisual[d],n=r[d],(c=h>=a&&h<l)&&!u?p=s:!c&&u&&i.push({left:p,width:s-p}),s+=this.charWidths[n],u=c;if(c&&d===r.length&&i.push({left:p,width:s-p}),this.isRtlDir)for(var f=0;f<i.length;f++)i[f].left+=this.rtlLineOffset;return i},e.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),o=0,r=this.bidiMap.bidiLevels,i=this.charWidths[r[o]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+i/2;){if(n+=i,o===r.length-1){i=0;break}i=this.charWidths[r[++o]]}return o>0&&r[o-1]%2!=0&&r[o]%2==0?(e<n&&o--,t=this.bidiMap.logicalFromVisual[o]):o>0&&r[o-1]%2==0&&r[o]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===r.length-1&&0===i&&r[o-1]%2==0||!this.isRtlDir&&0===o&&r[o]%2!=0?t=1+this.bidiMap.logicalFromVisual[o]:(o>0&&r[o-1]%2!=0&&0!==i&&o--,t=this.bidiMap.logicalFromVisual[o]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./lib/lang"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(){function e(e){this.session=e,this.doc=e.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(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")})}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,o=t?e.start:e.end;this.$setSelection(n.row,n.column,o.row,o.column)},e.prototype.$setSelection=function(e,t,n,o){if(!this.$silent){var r=this.$isEmpty,i=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,o),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||i)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},e.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,o="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(o);return r?(o=r.start.row,n=r.end.row):n=o,!0===t?new s(o,0,n,this.session.getLine(n).length):new s(o,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var o=e.column,r=e.column+t;return n<0&&(o=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(o,r).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead,this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},e.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),o=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(e,null,o.row,o.column).match(/^\s*/);r[0].length==t||this.session.$useEmacsStyleLineStart||(o.column+=r[0].length),this.moveCursorToPosition(o)},e.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var o=n.search(/\s+$/);o>0&&(t.column=o)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),o=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(o)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(o)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},e.prototype.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var o=this.session.getFoldStringAt(t,n,-1);null==o&&(o=this.doc.getLine(t).substring(0,n));var i=r.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(n-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,o=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&o.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,o.test(t)){if(n>2){n--;break}for(;(t=e[n])&&o.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),o=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var i=this.doc.getLength();do{e++,o=this.doc.getLine(e)}while(e<i&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),t=0}var s=this.$shortWordEndIndex(o);this.moveCursorTo(e,t+s)},e.prototype.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var o=this.session.getLine(t).substring(0,n);if(0===n){do{t--,o=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(o));n=o.length,/\s+$/.test(o)||(o="")}var i=r.stringReverse(o),s=this.$shortWordEndIndex(i);return this.moveCursorTo(t,n-s)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,o=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(o.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(o.column),o.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=o.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?o.column=this.$desiredColumn:this.$desiredColumn=o.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var i=this.session.screenToDocumentPosition(o.row+e,o.column,n);0!==e&&0===t&&i.row===this.lead.row&&(i.column,this.lead.column),this.moveCursorTo(i.row,i.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var o=this.session.getFoldAt(e,t,1);o&&(e=o.start.row,t=o.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var o=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(o.row,o.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,o.implement(a.prototype,i),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,t,n){"use strict";var o=e("./lib/report_error").reportError,r=2e3,i=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],o=[],r=0,i=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(i.defaultToken=c.defaultToken),c.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),c.unicode&&-1===s.indexOf("u")&&(s+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,p=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==p?c.token=c.token[0]:p-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:p-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=p>1?this.$applyToken:c.token),p>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(p=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),i[r]=l,r+=p,o.push(u),c.onMatch||(c.onMatch=null)}}o.length||(i[0]=0,o.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+o.join(")|(")+")|($)",s)}}return e.prototype.$setMaxTokenCount=function(e){r=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var o=[],r=0,i=n.length;r<i;r++)t[r]&&(o[o.length]={type:n[r],value:t[r]});return o},e.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],o=this.tokenArray,r=0,i=o.length;r<i;r++)t[r+1]&&(n[n.length]={type:o[r],value:t[r+1]});return n},e.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(e,t){return t?"(?:":e})},e.prototype.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,o=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,i,s,a,l){return o?o="]"!=a:a?o=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):i&&(n++,1!=i.length&&(r.stack=n,r.start=l)),e}),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},e.prototype.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var o=t||"start",i=this.states[o];i||(o="start",i=this.states[o]);var s=this.matchMappings[o],a=this.regExps[o];a.lastIndex=0;for(var l,c=[],u=0,p=0,h={type:null,value:""};l=a.exec(e);){var d=s.defaultToken,f=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=e.substring(u,m-g.length);h.type==d?h.value+=v:(h.type&&c.push(h),h={type:d,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){d=(f=i[s[y]]).onMatch?f.onMatch(g,o,n,e):f.token,f.next&&(o="string"==typeof f.next?f.next:f.next(o,n),(i=this.states[o])||(this.reportError("state doesn't exist",o),o="start",i=this.states[o]),s=this.matchMappings[o],u=m,(a=this.regExps[o]).lastIndex=m),f.consumeLineEnd&&(u=m);break}if(g)if("string"==typeof d)f&&!1===f.merge||h.type!==d?(h.type&&c.push(h),h={type:d,value:g}):h.value+=g;else if(d)for(h.type&&c.push(h),h={type:null,value:""},y=0;y<d.length;y++)c.push(d[y]);if(u==e.length)break;if(u=m,p++>r){for(p>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)h.type&&c.push(h),h={value:e.substring(u,u+=500),type:"overflow"};o="start",n=[];break}}return h.type&&c.push(h),n.length>1&&n[0]!==o&&n.unshift("#tmp",o),{tokens:c,state:n.length?n:o}},e}();i.prototype.reportError=o,t.Tokenizer=i}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";var o,r=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var o=e[n],r=0;r<o.length;r++){var i=o[r];(i.next||i.onMatch)&&("string"==typeof i.next&&0!==i.next.indexOf(t)&&(i.next=t+i.next),i.nextState&&0!==i.nextState.indexOf(t)&&(i.nextState=t+i.nextState))}this.$rules[t+n]=o}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,o,i){var s="function"==typeof e?(new e).getRules():e;if(o)for(var a=0;a<o.length;a++)o[a]=t+o[a];else for(var l in o=[],s)o.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[i?"push":"unshift"];for(a=0;a<o.length;a++)c.apply(this.$rules[o[a]],r(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,o=this.$rules;Object.keys(o).forEach(function r(i){var s=o[i];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var p=l.stateName;p||("string"!=typeof(p=l.token)&&(p=p[0]||""),o[p]&&(p+=n++)),o[p]=u,l.next=p,r(p)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var h in l.rules)o[h]?o[h].push&&o[h].push.apply(o[h],l.rules[h]):o[h]=l.rules[h];var d="string"==typeof l?l:l.include;if(d&&("$self"===d&&(d="start"),c=Array.isArray(d)?d.map(function(e){return o[e]}):o[d]),c){var f=[a,1].concat(c);l.noEscape&&(f=f.filter(function(e){return!e.next})),s.splice.apply(s,f),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}},this)},this.createKeywordMapper=function(e,t,n,o){var r=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach(function(t){for(var i=e[t].split(o||"|"),s=i.length;s--;){var a=i[s];this.$keywordList.push(a),n&&(a=a.toLowerCase()),r[a]=t}},this),e=null,n?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call((o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}).prototype),t.TextHighlightRules=o}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var o;(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call((o=function(){this.$behaviours={}}).prototype),t.Behaviour=o}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("./range").Range,r=function(){function e(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var o=e.getTokenAt(t,n);this.$tokenIndex=o?o.index:-1}return e.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},e.prototype.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new o(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=r}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r,i=e("../../lib/oop"),s=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],p={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,p.rangeCount!=e.multiSelect.rangeCount&&(p={rangeCount:e.multiSelect.rangeCount})),p[t])return o=p[t];o=p[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,o){var r=e.end.row-e.start.row;return{text:n+t+o,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}};(r=function(e){e=e||{},this.add("braces","insertion",function(t,n,i,s,a){var c=i.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==a){d(i);var p=i.getSelectionRange(),h=s.doc.getTextRange(p),g=s.getTokenAt(c.row,c.column);if(""!==h&&"{"!==h&&i.getWrapBehavioursEnabled())return f(p,h,"{","}");if(g&&/(?:string)\.quasi|\.xml/.test(g.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some(function(e){return e.test(g.type)})||/(string)\.quasi/.test(g.type)&&"$"!==g.value[c.column-g.start-1])return;return r.recordAutoInsert(i,s,"}"),{text:"{}",selection:[1,1]}}if(r.isSaneInsertion(i,s))return/[\]\}\)]/.test(u[c.column])||i.inMultiSelectMode||e.braces?(r.recordAutoInsert(i,s,"}"),{text:"{}",selection:[1,1]}):(r.recordMaybeInsert(i,s,"{"),{text:"{",selection:[1,1]})}else if("}"==a){if(d(i),"}"==u.substring(c.column,c.column+1)&&null!==s.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&r.isAutoInsertedClosing(c,u,a))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==a||"\r\n"==a){d(i);var m="";if(r.isMaybeInsertedClosing(c,u)&&(m=l.stringRepeat("}",o.maybeInsertedBrackets),r.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var v=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!v)return null;var y=this.$getIndent(s.getLine(v.row))}else{if(!m)return void r.clearMaybeInsertedClosing();y=this.$getIndent(u)}var b=y+s.getTabString();return{text:"\n"+b+"\n"+y+m,selection:[1,b.length,1,b.length]}}r.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){if(d(n),"}"==r.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,i){if("("==i){d(n);var s=n.getSelectionRange(),a=o.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return f(s,a,"(",")");if(r.isSaneInsertion(n,o))return r.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==i){d(n);var l=n.getCursorPosition(),c=o.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1)&&null!==o.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&r.isAutoInsertedClosing(l,c,i))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i&&(d(n),")"==o.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(e,t,n,o,i){if("["==i){d(n);var s=n.getSelectionRange(),a=o.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return f(s,a,"[","]");if(r.isSaneInsertion(n,o))return r.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){d(n);var l=n.getCursorPosition(),c=o.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1)&&null!==o.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&r.isAutoInsertedClosing(l,c,i))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i&&(d(n),"]"==o.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(e,t,n,o,r){var i=o.$mode.$quotes||h;if(1==r.length&&i[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var s=r,a=n.getSelectionRange(),l=o.doc.getTextRange(a);if(!(""===l||1==l.length&&i[l])&&n.getWrapBehavioursEnabled())return f(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=o.doc.getLine(c.row),p=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=o.getTokenAt(c.row,c.column),v=o.getTokenAt(c.row,c.column+1);if("\\"==p&&m&&/escape/.test(m.type))return null;var y,b=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(g==s)(y=b!==w)&&/string\.end/.test(v.type)&&(y=!1);else{if(b&&!w)return null;if(b&&w)return null;var x=o.$mode.tokenRe;x.lastIndex=0;var S=x.test(p);x.lastIndex=0;var C=x.test(g),_=o.$mode.$pairQuotesAfter;if(!(_&&_[s]&&_[s].test(p))&&S||C)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var k=u[c.column-2];if(p==s&&(k==s||x.test(k)))return null;y=!0}return{text:y?s+s:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.$mode.$quotes||h,s=o.doc.getTextRange(r);if(!r.isMultiLine()&&i.hasOwnProperty(s)&&(d(n),o.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==s))return r.end.column++,r}),!1!==e.closeDocComment&&this.add("doc comment end","insertion",function(e,t,n,o,r){if("doc-start"===e&&("\n"===r||"\r\n"===r)&&n.selection.isEmpty()){var i=n.getCursorPosition();if(0===i.column)return;for(var s=o.doc.getLine(i.row),a=o.doc.getLine(i.row+1),l=o.getTokens(i.row),c=0,u=0;u<l.length;u++){c+=l[u].value.length;var p=l[u];if(c>=i.column){if(c===i.column){if(!/\.doc/.test(p.type))return;if(/\*\//.test(p.value)){var h=l[u+1];if(!h||!/\.doc/.test(h.type))return}}var d=i.column-(c-p.value.length),f=p.value.indexOf("*/"),g=p.value.indexOf("/**",f>-1?f+2:0);if(-1!==g&&d>g&&d<g+3)return;if(-1!==f&&-1!==g&&d>=f&&d<=g||!/\.doc/.test(p.type))return;break}}var m=this.$getIndent(s);if(/\s*\*/.test(a))return/^\s*\*/.test(s)?{text:r+m+"* ",selection:[1,2+m.length,1,2+m.length]}:{text:r+m+" * ",selection:[1,3+m.length,1,3+m.length]};if(/\/\*\*/.test(s.substring(0,i.column)))return{text:r+m+" * "+r+" "+m+"*/",selection:[1,4+m.length,1,4+m.length]}}})}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",c))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},r.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},r.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},r.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},r.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},r.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},r.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},r.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},i.inherits(r,s),t.CstyleBehaviour=r}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";for(var o=[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],r=0,i=[],s=0;s<o.length;s+=2)i.push(r+=o[s]),o[s+1]&&i.push(45,r+=o[s+1]);t.wordChars=String.fromCharCode.apply(null,i)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var o,r=e("../config"),i=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),u=e("../token_iterator").TokenIterator,p=e("../range").Range;(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,o){var r=t.doc,i=!0,s=!0,a=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){Array.isArray(this.lineCommentStart)?(g=this.lineCommentStart.map(c.escapeRegExp).join("|"),d=this.lineCommentStart[0]):(g=c.escapeRegExp(this.lineCommentStart),d=this.lineCommentStart),g=new RegExp("^(\\s*)(?:"+g+") ?"),u=t.getUseSoftTabs(),y=function(e,t){var n=e.match(g);if(n){var o=n[1].length,i=n[0].length;h(e,o,i)||" "!=n[0][i-1]||i--,r.removeInLine(t,o,i)}};var p=d+" ",h=(v=function(e,t){i&&!/\S/.test(e)||(h(e,a,a)?r.insertInLine({row:t,column:a},p):r.insertInLine({row:t,column:a},d))},b=function(e,t){return g.test(e)},function(e,t,n){for(var o=0;t--&&" "==e.charAt(t);)o++;if(o%l!=0)return!1;for(o=0;" "==e.charAt(n++);)o++;return l>2?o%l!=l-1:o%l==0})}else{if(!this.blockComment)return!1;var d=this.blockComment.start,f=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+c.escapeRegExp(d)+")"),m=new RegExp("(?:"+c.escapeRegExp(f)+")\\s*$"),v=function(e,t){b(e,t)||i&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},f),r.insertInLine({row:t,column:a},d))},y=function(e,t){var n;(n=e.match(m))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(g))&&r.removeInLine(t,n[1].length,n[0].length)},b=function(e,n){if(g.test(e))return!0;for(var o=t.getTokens(n),r=0;r<o.length;r++)if("comment"===o[r].type)return!0}}function w(e){for(var t=n;t<=o;t++)e(r.getLine(t),t)}var x=1/0;w(function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!b(e,t)&&(s=!1)):x>e.length&&(x=e.length)}),a==1/0&&(a=x,i=!1,s=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),w(s?y:v)},this.toggleBlockComment=function(e,t,n,o){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var i,s,a=(g=new u(t,o.row,o.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,h;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(r.start))){var d=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m;c=new p(d,f,d,f+r.start.length);break}a=g.stepBackward()}var g;for(a=(g=new u(t,o.row,o.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(r.end))){d=g.getCurrentTokenRow(),f=g.getCurrentTokenColumn()+m,h=new p(d,f,d,f+r.end.length);break}a=g.stepForward()}h&&t.remove(h),c&&(t.remove(c),i=c.start.row,s=-r.start.length)}else s=r.start.length,i=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==i&&(l.start.column+=s),l.end.row==i&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],o=n.prototype.$id,i=r.$modes[o];i||(r.$modes[o]=i=new n),r.$modes[t]||(r.$modes[t]=i),this.$embeds.push(t),this.$modes[t]=i}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],a=function(e){var t,n,o;o=(t=l)[n=s[e]],t[s[e]]=function(){return this.$delegator(n,arguments,o)}},l=this;for(t=0;t<s.length;t++)a(t)},this.$delegator=function(e,t,n){var o=t[0]||"start";if("string"!=typeof o){if(Array.isArray(o[2])){var r=o[2][o[2].length-1];if(s=this.$modes[r])return s[e].apply(s,[o[1]].concat([].slice.call(t,1)))}o=o[0]||"start"}for(var i=0;i<this.$embeds.length;i++)if(this.$modes[this.$embeds[i]]){var s,a=o.split(this.$embeds[i]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[i]])[e].apply(s,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,o,r){if(this.$behaviour){var i=this.$behaviour.getBehaviours();for(var s in i)if(i[s][t]){var a=i[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var o in t)for(var r=t[o],i=0,s=r.length;i<s;i++)if("string"==typeof r[i].token)/keyword|support|storage/.test(r[i].token)&&n.push(r[i].regex);else if("object"==typeof r[i].token)for(var a=0,l=r[i].token.length;a<l;a++)/keyword|support|storage/.test(r[i].token[a])&&(o=r[i].regex.match(/\(.+?\)/g)[a],n.push(o.substr(1,o.length-2)));this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,o){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call((o=function(){this.HighlightRules=s}).prototype),t.Mode=o}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var o=e("./lib/dom"),r=function(){function e(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return e.prototype.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},e.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},e.prototype.$onChangeEditor=function(e){this.attach(e.editor)},e.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},e.prototype.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},e.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var o=e.data,r=o.start.row,i=o.end.row,s="add"==e.action,a=r+1;a<i;a++)n[a]&&(n[a].hidden=s);n[i]&&(s?n[r]?n[i].hidden=s:n[r]=n[i]:(n[r]==n[i]&&(n[r]=void 0),n[i].hidden=s))}},e.prototype.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,o=e.end.row-n;if(0===o);else if("remove"==e.action){var r=t.splice(n+1,o);!t[n]&&r[r.length-1]&&(t[n]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var i=new Array(o);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,i.unshift(n,0),t.splice.apply(t,i),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=o.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=o.createElement("div"),e.el.textContent=e.text),e.el&&(o.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&o.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],o=[];n;)o.push(n),n=n.$oldWidget;return o},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,o=t.layerConfig;if(n&&n.length){for(var r=1/0,i=0;i<n.length;i++){var s=n[i];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/o.characterWidth));var a=s.h/o.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},e.prototype.renderWidgets=function(e,t){var n=t.layerConfig,o=this.session.lineWidgets;if(o){for(var r=Math.min(this.firstRow,n.firstRow),i=Math.max(this.lastRow,n.lastRow,o.length);r>0&&!o[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=r;s<=i;s++){var a=o[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}},e}();t.LineWidgets=r}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var o=t.start.row,r=t.start.column,i=e[o]||"";switch(t.action){case"insert":if(1===t.lines.length)e[o]=i.substring(0,r)+t.lines[0]+i.substring(r);else{var s=[o,1].concat(t.lines);e.splice.apply(e,s),e[o]=i.substring(0,r)+e[o],e[o+t.lines.length-1]+=i.substring(r)}break;case"remove":var a=t.end.column,l=t.end.row;o===l?e[o]=i.substring(0,r)+i.substring(a):e.splice(o,l-o+1,i.substring(0,r)+e[l].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,i=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,n){var o="insert"==e.action,r=(o?1:-1)*(e.end.row-e.start.row),i=(o?1:-1)*(e.end.column-e.start.column),a=e.start,l=o?a:e.end;return s(t,a,n)?{row:t.row,column:t.column}:s(l,t,!n)?{row:t.row+r,column:t.column+(t.row==l.row?i:0)}:{row:a.row,column:a.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var o;if(o=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=o.row||this.column!=o.column){var r={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:r,value:o})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function s(e,t,n){var o=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&o}i.prototype.$insertRight=!1,o.implement(i.prototype,r),t.Anchor=i}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(){function e(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new a(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),o=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},e.prototype.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var o=this.getLine(e);return null==t&&(t=o.length),{row:e,column:t=Math.min(Math.max(t,0),o.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),o={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:o,action:"insert",lines:t}),this.clonePos(o)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var o=this.clippedPos(e,t),r=this.clippedPos(e,n);return this.applyDelta({start:o,end:r,action:"remove",lines:this.getLinesForRange({start:o,end:r})},!0),this.clonePos(o)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,o=t<this.getLength()-1,r=n?e-1:e,i=n?this.getLine(r).length:0,a=o?t+1:t,l=o?0:this.getLine(a).length,c=new s(r,i,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,o=n.length-t+1,r=e.start.row,i=e.start.column,s=0,a=0;s<o;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(r+s,i),end:this.pos(r+a,i=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=r+s,e.start.column=i,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,r=t||0,i=n.length;r<i;r++)if((e-=n[r].length+o)<0)return{row:r,column:e+n[r].length+o};return{row:i-1,column:e+n[i-1].length+o}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,r=0,i=Math.min(e.row,n.length),s=t||0;s<i;++s)r+=n[s].length+o;return r+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",o.implement(l.prototype,i),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,i=function(){function e(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,o=-1,r=n.doc,i=t;n.lines[t];)t++;var s=r.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),o=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==o&&(o=t),i<=o&&n.fireUpdateEvent(i,o)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||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)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var o=Array(n+1);o.unshift(t,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],o=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=o.state+""?(this.states[e]=o.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=o.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();o.implement(i.prototype,r),t.BackgroundTokenizer=i}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,t,n){"use strict";var o=e("./lib/lang"),r=e("./range").Range,i=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,i){if(this.regExp){for(var s=i.firstRow,a=i.lastRow,l={},c=n.$editor&&n.$editor.$search,u=c&&c.$isMultilineSearch(n.$editor.getLastSearchOptions()),p=s;p<=a;p++){var h=this.cache[p];if(null==h||n.getValue().length!=this.docLen){if(u){h=[];var d=c.$multiLineForward(n,this.regExp,p,a);if(d){var f=d.endRow<=a?d.endRow-1:a;f>p&&(p=f),h.push(new r(d.startRow,d.startCol,d.endRow,d.endCol))}h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES))}else(h=o.getMatchOffsets(n.getLine(p),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(e){return new r(p,e.offset,p,e.offset+e.length)});this.cache[p]=h.length?h:""}if(0!==h.length)for(var g=h.length;g--;){var m=h[g].toScreenRange(n),v=m.toString();l[v]||(l[v]=!0,t.drawSingleLineMarker(e,m,this.clazz,i))}}this.docLen=n.getValue().length}},e}();i.prototype.MAX_RANGES=500,t.SearchHighlight=i}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!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),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,o=n.length;o--;){var r=n[o][0];if(r.id<=e)break;r.id<t&&(r.ignore=!0)}this.lastDeltas=null},e.prototype.getSelection=function(e,t){for(var n=this.selections,o=n.length;o--;){var r=n[o];if(r.rev<e)return t&&(r=n[o+1]),r}},e.prototype.getRevision=function(){return this.$rev},e.prototype.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,o=null,r=0,i=n.length;i--;){var s=n[i][0];if(s.id<t&&!o&&(o=i+1),s.id<=e){r=i+1;break}}return n.slice(r,o)},e.prototype.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var o=e[n];if(o&&!o[0].ignore){for(;n<t-1;){var r=u(e[n],e[n+1]);e[n]=r[0],e[n+1]=r[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var o=n.pop(),r=null;return o&&(r=e.undoChanges(o,t),this.$redoStack.push(o),this.$syncRev()),this.$fromUndo=!1,r}},e.prototype.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var o=t[n],r=0;r<o.length;r++)g(e,o[r])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this)}var o=this.$redoStack.pop(),r=null;return o&&(r=e.redoChanges(o,t),this.$undoStack.push(o),this.$syncRev()),this.$fromUndo=!1,r},e.prototype.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},e.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},e.prototype.canUndo=function(){return this.$undoStack.length>0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)},e}();o.prototype.hasUndo=o.prototype.canUndo,o.prototype.hasRedo=o.prototype.canRedo,o.prototype.isClean=o.prototype.isAtBookmark,o.prototype.markClean=o.prototype.bookmark;var r=e("./range").Range,i=r.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,o="insert"==t.action;if(n&&o)if(i(t.start,e.end)>=0)h(t,e,-1);else{if(!(i(t.start,e.start)<=0))return null;h(e,t,1)}else if(n&&!o)if(i(t.start,e.end)>=0)h(t,e,-1);else{if(!(i(t.end,e.start)<=0))return null;h(e,t,-1)}else if(!n&&o)if(i(t.start,e.start)>=0)h(t,e,1);else{if(!(i(t.start,e.start)<=0))return null;h(e,t,1)}else if(!n&&!o)if(i(t.start,e.start)>=0)h(t,e,1);else{if(!(i(t.end,e.start)<=0))return null;h(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var o=0;o<t.length;o++)if(!c(e[n],t[o])){for(;n<e.length;){for(;o--;)c(t[o],e[n]);o=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function p(e,t){var n="insert"==e.action,o="insert"==t.action;if(n&&o)i(e.start,t.start)<0?h(t,e,1):h(e,t,1);else if(n&&!o)i(e.start,t.end)>=0?h(e,t,-1):(i(e.start,t.start)<=0||h(e,r.fromPoints(t.start,e.start),-1),h(t,e,1));else if(!n&&o)i(t.start,e.end)>=0?h(t,e,-1):(i(t.start,e.start)<=0||h(t,r.fromPoints(e.start,t.start),-1),h(e,t,1));else if(!n&&!o)if(i(t.start,e.end)>=0)h(t,e,-1);else{var s,a;if(!(i(t.end,e.start)<=0))return i(e.start,t.start)<0&&(s=e,e=f(e,t.start)),i(e.end,t.end)>0&&(a=f(e,t.end)),d(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);h(e,t,-1)}return[t,e]}function h(e,t,n){d(e.start,t.start,t.end,n),d(e.end,t.start,t.end,n)}function d(e,t,n,o){e.row==(1==o?t:n).row&&(e.column+=o*(n.column-t.column)),e.row+=o*(n.row-t.row)}function f(e,t){var n=e.lines,o=e.end;e.end=s(t);var r=e.end.row-e.start.row,i=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(i[0].substring(0,a)),i[0]=i[0].substr(a),{start:s(t),end:o,lines:i,action:e.action}}function g(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var o=e[n],r=0;r<o.length;r++){var i=p(o[r],t);t=i[0],2!=i.length&&(i[2]?(o.splice(r+1,1,i[1],i[2]),r++):i[1]||(o.splice(r,1),r--))}o.length||e.splice(n,1)}return e}r.comparePoints,t.UndoManager=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new o(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var o,r,i=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(r=(o=s[l]).range.compareStart(t,n)))return void e(null,t,n,i,a);if(!e(null,o.start.row,o.start.column,i,a)&&e(o.placeholder,o.start.row,o.start.column,i)||0===r)return;a=!o.sameRow,i=o.end.column}e(null,t,n,i,a)},e.prototype.getNextFoldTo=function(e,t){for(var n,o,r=0;r<this.folds.length;r++){if(-1==(o=(n=this.folds[r]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===o)return{fold:n,kind:"inside"}}return null},e.prototype.addRemoveChars=function(e,t,n){var o,r,i=this.getNextFoldTo(e,t);if(i)if(o=i.fold,"inside"==i.kind&&o.start.column!=t&&o.start.row!=e)window.console&&window.console.log(e,t,o);else if(o.start.row==e){var s=(r=this.folds).indexOf(o);for(0===s&&(this.start.column+=n);s<r.length;s++){if((o=r[s]).start.column+=n,!o.sameRow)return;o.end.column+=n}this.end.column+=n}},e.prototype.split=function(t,n){var o=this.getNextFoldTo(t,n);if(!o||"inside"==o.kind)return null;var r=o.fold,i=this.folds,s=this.foldData,a=i.indexOf(r),l=i[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new e(s,i=i.splice(a,i.length-a));return s.splice(s.indexOf(this)+1,0,c),c},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var o=this.foldData;o.splice(o.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push("  "+t.toString())}),e.push("]"),e.join("\n")},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var o=this.folds[n];if((e-=o.start.column-t)<0)return{row:o.start.row,column:o.start.column+e};if((e-=o.placeholder.length)<0)return o.start;t=o.end.column}return{row:this.end.row,column:this.end.column+e}},e}();t.FoldLine=r}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("./range").Range.comparePoints,r=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var r=this.ranges,i=n||0;i<r.length;i++){var s=r[i],a=o(e,s.end);if(!(a>0)){var l=o(e,s.start);return 0===a?t&&0!==l?-i-2:i:l>0||0===l&&!t?i:-i-1}}return-i-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var o=this.pointIndex(e.end,t,n);return o<0?o=-o-1:o++,this.ranges.splice(n,o-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort(function(e,t){return o(e.start,t.start)}))[0],i=1;i<n.length;i++){e=r,r=n[i];var s=o(e.end,r.start);s<0||(0!=s||e.isEmpty()||r.isEmpty())&&(o(e.end,r.end)<0&&(e.end.row=r.end.row,e.end.column=r.end.column),n.splice(i,1),t.push(r),r=e,i--)}return this.ranges=n,t},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var o=this.pointIndex({row:e,column:0});o<0&&(o=-o-1);var r=this.pointIndex({row:t,column:0},o);r<0&&(r=-r-1);for(var i=[],s=o;s<r;s++)i.push(n[s]);return i},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},e.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,o=t.row,r=n.row,i=this.ranges,s=0,a=i.length;s<a&&!((u=i[s]).end.row>=o);s++);if("insert"==e.action){for(var l=r-o,c=-t.column+n.column;s<a&&!((u=i[s]).start.row>o);s++)if(u.start.row==o&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==o&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&s<a-1&&u.end.column>u.start.column&&u.end.column==i[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=o-r,c=t.column-n.column;s<a&&!((u=i[s]).start.row>r);s++)u.end.row<r&&(o<u.end.row||o==u.end.row&&t.column<u.end.column)?(u.end.row=o,u.end.column=t.column):u.end.row==r?u.end.column<=n.column?(l||u.end.column>t.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>r&&(u.end.row+=l),u.start.row<r&&(o<u.start.row||o==u.start.row&&t.column<u.start.column)?(u.start.row=o,u.start.column=t.column):u.start.row==r?u.start.column<=n.column?(l||u.start.column>t.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>r&&(u.start.row+=l);if(0!=l&&s<a)for(;s<a;s++){var u;(u=i[s]).start.row+=l,u.end.row+=l}},e}();r.prototype.comparePoints=o,t.RangeList=r}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=function(e){function t(t,n){var o=e.call(this)||this;return o.foldLine=null,o.placeholder=n,o.range=t,o.start=t.start,o.end=t.end,o.sameRow=t.start.row==t.end.row,o.subFolds=o.ranges=[],o}return r(t,e),t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(t){e.subFolds.push(t.clone())}),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,s(t.start,n),s(t.end,n);for(var o=e.start.row,r=e.start.column,i=0,a=-1;i<this.subFolds.length&&1==(a=this.subFolds[i].range.compare(o,r));i++);var l=this.subFolds[i],c=0;if(0==a){if(l.range.containsRange(e))return l.addSubFold(e);c=1}o=e.range.end.row,r=e.range.end.column;var u=i;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(o,r));u++);0==a&&u++;for(var p=this.subFolds.splice(i,u-i,e),h=0==a?p.length-1:p.length,d=c;d<h;d++)e.addSubFold(p[d]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)},t}(e("../range_list").RangeList);function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}t.Fold=i}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,t,n){"use strict";var o=e("../range").Range,r=e("./fold_line").FoldLine,i=e("./fold").Fold,s=e("../token_iterator").TokenIterator,a=e("../mouse/mouse_event").MouseEvent;t.Folding=function(){this.getFoldAt=function(e,t,n){var o=this.getFoldLine(e);if(!o)return null;for(var r=o.folds,i=0;i<r.length;i++){var s=r[i].range;if(s.contains(e,t)){if(1==n&&s.isEnd(e,t)&&!s.isEmpty())continue;if(-1==n&&s.isStart(e,t)&&!s.isEmpty())continue;return r[i]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,o=this.$foldData,r=[];t.column+=1,n.column-=1;for(var i=0;i<o.length;i++){var s=o[i].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=o[i].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;r.push(c)}}}}return t.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var o=0;o<t[n].folds.length;o++)e.push(t[n].folds[o]);return e},this.getFoldStringAt=function(e,t,n,o){if(!(o=o||this.getFoldLine(e)))return null;for(var r,i,s={end:{column:0}},a=0;a<o.folds.length;a++){var l=(i=o.folds[a]).range.compareEnd(e,t);if(-1==l){r=this.getLine(i.start.row).substring(s.end.column,i.start.column);break}if(0===l)return null;s=i}return r||(r=this.getLine(i.start.row).substring(s.end.column)),-1==n?r.substring(0,t-s.end.column):1==n?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,o=0;for(t&&(o=n.indexOf(t)),-1==o&&(o=0);o<n.length;o++){var r=n[o];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,o=0;for(t&&(o=n.indexOf(t)),-1==o&&(o=0);o<n.length;o++){var r=n[o];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,o=t-e+1,r=0;r<n.length;r++){var i=n[r],s=i.end.row,a=i.start.row;if(s>=t){a<t&&(a>=e?o-=t-a:o=0);break}s>=e&&(o-=a>=e?s-a:s-e+1)}return o},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,o=this.$foldData,s=!1;e instanceof i?n=e:(n=new i(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,p=this.getFoldAt(a,l,1),h=this.getFoldAt(c,u,-1);if(p&&h==p)return p.addSubFold(n);p&&!p.range.isStart(a,l)&&this.removeFold(p),h&&!h.range.isEnd(c,u)&&this.removeFold(h);var d=this.getFoldsInRange(n.range);d.length>0&&(this.removeFolds(d),n.collapseChildren||d.forEach(function(e){n.addSubFold(e)}));for(var f=0;f<o.length;f++){var g=o[f];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=o[f+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,o=t.end.row,r=this.$foldData,i=t.folds;if(1==i.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))i.pop(),t.end.row=i[i.length-1].end.row,t.end.column=i[i.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))i.shift(),t.start.row=i[0].start.row,t.start.column=i[0].start.column;else if(e.sameRow)i.splice(i.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(i=s.folds).shift(),s.start.row=i[0].start.row,s.start.column=i[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,o):this.$updateRowLengthCache(n,o)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,r;if(null==e)n=new o(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new o(e,0,e,this.getLine(e).length);else if("row"in e)n=o.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach(function(e){r=r.concat(this.unfold(e))},this),r;n=e}for(var i=r=this.getFoldsInRangeList(n);1==r.length&&o.comparePoints(r[0].start,n.start)<0&&o.comparePoints(r[0].end,n.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(r):this.expandFolds(r),i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,o,r){null==o&&(o=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var i=this.doc,s="";return e.walk(function(e,t,n,a){if(!(t<o)){if(t==o){if(n<r)return;a=Math.max(r,a)}s+=null!=e?e:i.getLine(t).substring(a,n)}},t,n),s},this.getDisplayLine=function(e,t,n,o){var r,i=this.getFoldLine(e);return i?this.getFoldDisplayLine(i,e,t,n,o):(r=this.doc.getLine(e)).substring(o||0,t||r.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new r(e,n)})},this.toggleFold=function(e){var t,n,o=this.selection.getRange();if(o.isEmpty()){var r=o.start;if(t=this.getFoldAt(r.row,r.column))return void this.expandFold(t);if(e){var i=this.getFoldLine(r.row);return void(i&&this.expandFolds(i.folds))}(n=this.findMatchingBracket(r))?1==o.comparePoint(n)?o.end=n:(o.start=n,o.start.column++,o.end.column--):(n=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==o.comparePoint(n)?o.end=n:o.start=n,o.start.column++):o=this.getCommentFoldRange(r.row,r.column)||o}else{var s=this.getFoldsInRange(o);if(e&&s.length)return void this.expandFolds(s);1==s.length&&(t=s[0])}if(t||(t=this.getFoldAt(o.start.row,o.start.column)),t&&t.range.toString()==o.toString())this.expandFold(t);else{var a="...";if(!o.isMultiLine()){if((a=this.getTextRange(o)).length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,o)}},this.getCommentFoldRange=function(e,t,n){var r=new s(this,e,t),i=r.getCurrentToken(),a=i&&i.type;if(i&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start|\\.doc");var l=new RegExp(a),c=new o;if(1!=n){do{i=r.stepBackward()}while(i&&l.test(i.type));i=r.stepForward()}c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+i.value.length,r=new s(this,e,t);var u=this.getState(r.$row);if(-1!=n){var p=-1;do{if(i=r.stepForward(),-1==p){var h=this.getState(r.$row);u.toString()!==h.toString()&&(p=r.$row)}else if(r.$row>p)break}while(i&&l.test(i.type));i=r.stepBackward()}else i=r.getCurrentToken();if(c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column)return;return c}},this.foldAll=function(e,t,n,o){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var i=e=e||0;i<t;i++)if(null==r[i]&&(r[i]=this.getFoldWidget(i)),"start"==r[i]&&(!o||o(i))){var s=this.getFoldWidgetRange(i);s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(i=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){for(var n=e.getTokens(t),o=0;o<n.length;o++){var r=n[o];if("text"!=r.type||!/^\s+$/.test(r.value))return!!/comment/.test(r.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var o,r=e-1;r>=0;){var i=n[r];if(null==i&&(i=n[r]=this.getFoldWidget(r)),"start"==i){var s=this.getFoldWidgetRange(r);if(o||(o=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:o}},this.onFoldWidgetClick=function(e,t){t instanceof a&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var o=t.target||t.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),o=this.getLine(e),r="end"===n?-1:1,i=this.getFoldAt(e,-1===r?0:o.length,r);if(i)return t.children||t.all?this.removeFold(i):this.expandFold(i),i;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(i=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(i.range))return this.removeFold(i),i;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var o=this.getParentFoldRangeData(t,!0);if(n=o.range||o.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var o=Array(n+1);o.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var o=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var o=n.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),o=!0,i=n.charAt(e.column-1),s=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(s||(i=n.charAt(e.column),e={row:e.row,column:e.column+1},s=i&&i.match(/([\(\[\{])|([\)\]\}])/),o=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),o||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),o||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),o=/([\(\[\{])|([\)\]\}])/,i=!t&&n.charAt(e.column-1),s=i&&i.match(o);if(s||(i=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=i&&i.match(o)),!s)return null;var a=new r(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new r(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],i=1,s=new o(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==r){if(0==(i-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(i+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],i=1,s=new o(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var p=c.charAt(l);if(p==r){if(0==(i-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else p==e&&(i+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}},this.getMatchingTags=function(e){var t=new o(this,e.row,e.column),n=this.$findTagName(t);if(n)return"<"===t.stepBackward().value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,o=!1;if(t&&-1===t.type.indexOf("tag-name"))do{(t=o?e.stepBackward():e.stepForward())&&("/>"===t.value?o=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,o=t.value,i=t.value,s=0,a=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(n=t).type.indexOf("tag-close")&&!c){var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(i===(o=t.value))if("<"===n.value)s++;else if("</"===n.value&&--s<0){e.stepBackward();var p=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),!t||">"!==t.value)return;var d=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else i===o&&"/>"===t.value&&--s<0&&(d=h=p=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),u=new r(l.end.row,l.end.column,l.end.row,l.end.column+1))}while(t&&s>=0);if(a&&u&&p&&d&&l&&h)return{openTag:new r(a.start.row,a.start.column,u.end.row,u.end.column),closeTag:new r(p.start.row,p.start.column,d.end.row,d.end.column),openTagName:l,closeTagName:h}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),o=t.value,i=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new r(s,a,s,l);e.stepForward();var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var p=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(o===t.value)if("<"===n.value){if(++i>0){var h=new r(s,a,s,l),d=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var f=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&i--}else if("/>"===t.value){for(var g=0,m=n;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===o){i--;break}if("<"===m.value)break;m=e.stepBackward(),g++}for(var v=0;v<g;v++)e.stepForward()}}while(n&&i<=0);return d&&f&&c&&p&&h&&u?{openTag:new r(d.start.row,d.start.column,f.end.row,f.end.column),closeTag:new r(c.start.row,c.start.column,p.end.row,p.end.column),openTagName:h,closeTagName:u}:void 0}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./lib/lang"),i=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,u=e("./range").Range,p=e("./line_widgets").LineWidgets,h=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,g=e("./undomanager").UndoManager,m=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.$gutterCustomWidgets={},this.bgTokenizer=new d((new c).getTokenizer(),this);var o=this;this.bgTokenizer.on("update",function(e){o._signal("tokenizerUpdate",e)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new h(t)),this.setDocument(t),this.selection=new l(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new i(this),s.resetOptions(this),this.setMode(n),s._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on("change",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0},!0),this.on("changeSelection",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0},!0),this.$operationResetTimer=r.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(e={}),this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null,void this._signal("endOperation",e);if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new p(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,o=e.length-1;n<=o;){var r=n+o>>1,i=e[r];if(t>i)n=r+1;else{if(!(t<i))return r;o=r-1}}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},e.prototype.onSelectionChange=function(){this._signal("changeSelection")},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){"string"==typeof t&&(t=JSON.parse(t));var n=new g;n.$undoStack=t.history.undo,n.$redoStack=t.history.redo,n.mark=t.history.mark,n.$rev=t.history.rev;var o=new e(t.value);return t.folds.forEach(function(e){o.addFold("...",u.fromPoints(e.start,e.end))}),o.setAnnotations(t.annotations),o.setBreakpoints(t.breakpoints),o.setMode(t.mode),o.setScrollLeft(t.scrollLeft),o.setScrollTop(t.scrollTop),o.setUndoManager(n),o.selection.fromJSON(t.selection),o},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(e){return e.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n,o=this.bgTokenizer.getTokens(e),r=0;if(null==t){var i=o.length-1;r=this.getLine(e).length}else for(i=0;i<o.length&&!((r+=o[i].value.length)>=t);i++);return(n=o[i])?(n.index=i,n.start=r-n.value.length,n):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},e.prototype.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.addMarker=function(e,t,n,o){var r=this.$markerId++,i={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!o,id:r};return o?(this.$frontMarkers[r]=i,this._signal("changeFrontMarker")):(this.$backMarkers[r]=i,this._signal("changeBackMarker")),r},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,o){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var r=new u(e,0,t,1/0);return r.id=this.addMarker(r,n,"fullLine",o),r},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),o=!1;if(t>0&&(o=!!n.charAt(t-1).match(this.tokenRe)),o||(o=!!n.charAt(t).match(this.tokenRe)),o)var r=this.tokenRe;else r=/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var i=t;if(i>0){do{i--}while(i>=0&&n.charAt(i).match(r));i++}for(var s=t;s<n.length&&n.charAt(s).match(r);)s++;return new u(e,i,e,s)},e.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),o=this.getLine(n.end.row);o.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},e.prototype.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,o=n.path}else o=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[o]&&!n)return this.$onChangeMode(this.$modes[o]),void(t&&t());this.$modeId=o,s.loadModule(["mode",o],function(e){if(!this.destroyed){if(this.$modeId!==o)return t&&t();this.$modes[o]&&!n?this.$onChangeMode(this.$modes[o]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[o]=e,e.$id=o),this.$onChangeMode(e)),t&&t()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var o=e.getTokenizer();if(void 0!==o.on){var r=this.onReloadTokenizer.bind(this);o.on("update",r)}this.bgTokenizer.setTokenizer(o),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},e.prototype.getScrollLeft=function(){return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,o=0,r=0,i=this.$foldData[r],s=i?i.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=i.end.row+1)>=a)break;s=(i=this.$foldData[r++])?i.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>o&&(o=n[l])}this.screenWidth=o}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var o=e[n];"insert"==o.action||"remove"==o.action?this.doc.revertDelta(o):o.folds&&this.addFolds(o.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var o=e[n];"insert"!=o.action&&"remove"!=o.action||this.doc.$safeApplyDelta(o)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var o,r,i=0;i<e.length;i++){var s=e[i];s.start&&(o?n(s)?(r=s.start,-1==o.compare(r.row,r.column)&&o.setStart(r),r=s.end,1==o.compare(r.row,r.column)&&o.setEnd(r)):(r=s.start,-1==o.compare(r.row,r.column)&&(o=u.fromPoints(s.start,s.start))):o=n(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return o},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var o=this.getTextRange(e),r=this.getFoldsInRange(e),i=u.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(c=s?-e.end.column:e.start.column-e.end.column)&&(i.start.row==e.end.row&&i.start.column>e.end.column&&(i.start.column+=c),i.end.row==e.end.row&&i.end.column>e.end.column&&(i.end.column+=c)),s&&i.start.row>=e.end.row&&(i.start.row+=s,i.end.row+=s)}if(i.end=this.insert(i.start,o),r.length){var a=e.start,l=i.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(r.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e}))}return i},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var o=e;o<=t;o++)this.doc.insertInLine({row:o,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),o=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var i=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<o&&" "==i.charAt(s);++s);s<o&&"\t"==i.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((r=this.getRowFoldStart(e+n))<0)return 0;var o=r-e}else if(n>0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;o=r-t}else e=this.$clipRowToDocument(e),o=(t=this.$clipRowToDocument(t))-e+1;var i=new u(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(i).map(function(e){return(e=e.clone()).start.row+=o,e.end.row+=o,e}),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+o,a),s.length&&this.addFolds(s),o},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.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 t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var o=this.$constrainWrapLimit(e,n.min,n.max);return o!=this.$wrapLimit&&o>1&&(this.$wrapLimit=o,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,o=e.start,r=e.end,i=o.row,s=r.row,a=s-i,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(i,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(g=this.getFoldLine(r.row)){g.addRemoveChars(r.row,r.column,o.column-r.column),g.shiftRow(-a);var p=this.getFoldLine(i);p&&p!==g&&(p.merge(g),g=p),u=c.indexOf(g)+1}for(;u<c.length;u++)(g=c[u]).start.row>=r.row&&g.shiftRow(-a);s=i}else{var h=Array(a);h.unshift(i,0);var d=t?this.$wrapData:this.$rowLengthCache;if(d.splice.apply(d,h),c=this.$foldData,u=0,g=this.getFoldLine(i)){var f=g.range.compareInside(o.row,o.column);0==f?(g=g.split(o.row,o.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,r.column-o.column)):-1==f&&(g.addRemoveChars(i,0,r.column-o.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u<c.length;u++){var g;(g=c[u]).start.row>=i&&g.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(g=this.getFoldLine(i))&&g.addRemoveChars(i,o.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(i,s):this.$updateRowLengthCache(i,s),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,o,r=this.doc.getAllLines(),i=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=e;for(t=Math.min(t,r.length-1);l<=t;)(o=this.getFoldLine(l,o))?(n=[],o.walk(function(e,t,o,i){var s;if(null!=e){(s=this.$getDisplayTokens(e,n.length))[0]=b;for(var a=1;a<s.length;a++)s[a]=w}else s=this.$getDisplayTokens(r[t].substring(i,o),n.length);n=n.concat(s)}.bind(this),o.end.row,r[o.end.row].length+1),s[o.start.row]=this.$computeWrapSplits(n,a,i),l=o.end.row+1):(n=this.$getDisplayTokens(r[l]),s[l]=this.$computeWrapSplits(n,a,i),l++)},e.prototype.$computeWrapSplits=function(e,t,n){if(0==e.length)return[];var o=[],r=e.length,i=0,s=0,a=this.$wrapAsCode,l=this.$indentedSoftWrap,c=t<=Math.max(2*n,8)||!1===l?0:Math.floor(t/2);function u(t){for(var r=t-i,u=i;u<t;u++){var h=e[u];12!==h&&2!==h||(r-=1)}o.length||(p=function(){var t=0;if(0===c)return t;if(l)for(var o=0;o<e.length;o++){var r=e[o];if(r==S)t+=1;else{if(r!=C){if(r==_)continue;break}t+=n}}return a&&!1!==l&&(t+=n),Math.min(t,c)}(),o.indent=p),s+=r,o.push(s),i=t}for(var p=0;r-i>t-p;){var h=i+t-p;if(e[h-1]>=S&&e[h]>=S)u(h);else if(e[h]!=b&&e[h]!=w){for(var d=Math.max(h-(t-(t>>2)),i-1);h>d&&e[h]<b;)h--;if(a){for(;h>d&&e[h]<b;)h--;for(;h>d&&e[h]==x;)h--}else for(;h>d&&e[h]<S;)h--;h>d?u(++h):(e[h=i+t]==y&&h--,u(h-p))}else{for(;h!=i-1&&e[h]!=b;h--);if(h>i){u(h);continue}for(h=i+t;h<e.length&&e[h]==w;h++);if(h==e.length)break;u(h)}}return o},e.prototype.$getDisplayTokens=function(e,t){var n,o=[];t=t||0;for(var r=0;r<e.length;r++){var i=e.charCodeAt(r);if(9==i){n=this.getScreenTabSize(o.length+t),o.push(C);for(var s=1;s<n;s++)o.push(_)}else 32==i?o.push(S):i>39&&i<48||i>57&&i<64?o.push(x):i>=4352&&k(i)?o.push(v,y):o.push(v)}return o},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var o,r;for(null==t&&(t=1/0),n=n||0,r=0;r<e.length&&(9==(o=e.charCodeAt(r))?n+=this.getScreenTabSize(n):o>=4352&&k(o)?n+=2:n+=1,!(n>t));r++);return[n,r]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var o,r,i=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,e),p=c.length;if(p&&u>=0){a=c[u],i=this.$docRowCache[u];var h=e>c[p-1]}else h=!p;for(var d=this.getLength()-1,f=this.getNextFoldLine(i),g=f?f.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(i))>e||i>=d);)a+=l,++i>g&&(i=f.end.row+1,g=(f=this.getNextFoldLine(i,f))?f.start.row:1/0),h&&(this.$docRowCache.push(i),this.$screenRowCache.push(a));if(f&&f.start.row<=i)o=this.getFoldDisplayLine(f),i=f.start.row;else{if(a+l<=e||i>d)return{row:d,column:this.getLine(d).length};o=this.getLine(i),f=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var y=this.$wrapData[i];y&&(r=y[v],v>0&&y.length&&(m=y.indent,s=y[v-1]||y[y.length-1],o=o.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,i,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(o,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),f?f.idxToPosition(s):{row:i,column:s}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var o,r=0,i=null;(o=this.getFoldAt(e,t,1))&&(e=o.start.row,t=o.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],r=this.$screenRowCache[c];var p=e>l[u-1]}else p=!u;for(var h=this.getNextFoldLine(a),d=h?h.start.row:1/0;a<e;){if(a>=d){if((s=h.end.row+1)>e)break;d=(h=this.getNextFoldLine(s,h))?h.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,p&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var f="";h&&a>=d?(f=this.getFoldDisplayLine(h,e,t),i=h.start.row):(f=this.getLine(e).substring(0,t),i=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){for(var v=0;f.length>=m[v];)r++,v++;f=f.substring(m[v-1]||0,f.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:g+this.$getStringScreenWidth(f)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,o=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);o<n;){var i=this.$wrapData[o];e+=i?i.length+1:1,++o>r&&(o=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,o){if(0===n)return[0,0];var r,i;for(n||(n=1/0),o=o||0,i=0;i<t.length&&!((o+="\t"===(r=t.charAt(i))?this.getScreenTabSize(o):e.getCharacterWidth(r))>n);i++);return[o,i]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.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()},e}();m.$uid=0,m.prototype.$modes=s.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=k,o.implement(m.prototype,a);var v=1,y=2,b=3,w=4,x=9,S=10,C=11,_=12;function k(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),s.defineOptions(m.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,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(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var o=e("./lib/lang"),r=e("./lib/oop"),i=e("./range").Range,s=function(){function e(){this.$options={}}return e.prototype.set=function(e){return r.mixin(this.$options,e),this},e.prototype.getOptions=function(){return o.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var o=null;return n.forEach(function(e,n,r,s){return o=new i(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&o.isEqual(t.start)&&(o=null,1))}),o},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=r.length-c;e:for(var p=a.offset||0;p<=u;p++){for(var h=0;h<c;h++)if(-1==r[p+h].search(a[h]))continue e;var d=r[p],f=r[p+c-1],g=d.length-d.match(a[0])[0].length,m=f.match(a[c-1])[0].length;l&&l.end.row===p&&l.end.column>g||(s.push(l=new i(p,g,p+c-1,m)),c>2&&(p=p+c-2))}}else for(var v,y=0;y<r.length;y++)if(this.$isMultilineSearch(t)){var b=r.length-1;if(v=this.$multiLineForward(e,a,y,b)){var w=v.endRow<=b?v.endRow-1:b;w>y&&(y=w),s.push(new i(v.startRow,v.startCol,v.endRow,v.endCol))}}else for(v=o.getMatchOffsets(r[y],a),h=0;h<v.length;h++){var x=v[h];s.push(new i(y,x.offset,y,x.offset+x.length))}if(n){var S=n.start.column,C=n.end.column;for(y=0,h=s.length-1;y<h&&s[y].start.column<S&&0==s[y].start.row;)y++;for(var _=n.end.row-n.start.row;y<h&&s[h].end.column>C&&s[h].end.row==_;)h--;for(s=s.slice(y,h+1),y=0,h=s.length;y<h;y++)s[y].start.row+=n.start.row,s[y].end.row+=n.start.row}return s},e.prototype.parseReplaceString=function(e){for(var t="",n=0,o=e.length;n<o;n++){var r=e.charCodeAt(n);if(92!==r){if(36===r){if(++n>=o){t+="$";break}var i=e.charCodeAt(n);if(36===i){t+="$$";continue}if(48===i||38===i){t+="$&";continue}if(49<=i&&i<=57){t+="$"+e[n];continue}}t+=e[n]}else{if(++n>=o){t+="\\";break}switch(e.charCodeAt(n)){case 92:t+="\\";break;case 110:t+="\n";break;case 116:t+="\t"}}}return t||e},e.prototype.replace=function(e,t){var n=this.$options,o=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(o){var r=this.$isMultilineSearch(n);r&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var i=o.exec(e);if(!i||!r&&i[0].length!=e.length)return null;if(t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(o,t),n.preserveCase){t=t.split("");for(var s=Math.min(e.length,e.length);s--;){var a=e[s];a&&a.toLowerCase()!=a?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=o.escapeRegExp(n));var r=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,r+="u"}catch(t){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=function(e,t){var n=o.supportsLookbehind();function r(e,o){return void 0===o&&(o=!0),(n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?o?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var i=Array.from(e),s=i[0],a=i[i.length-1];return r(s)+e+r(a,!1)}(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,r);try{var i=new RegExp(n,r)}catch(e){i=!1}return e.re=i},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),o=[],r=0;r<n.length;r++)try{o.push(new RegExp(n[r],t))}catch(e){return!1}return o},e.prototype.$isMultilineSearch=function(e){return e.re&&/\\r\\n|\\r|\\n/.test(e.re.source)&&e.regExp&&!e.$isMultiLine},e.prototype.$multiLineForward=function(e,t,n,o){for(var r,i=l(e,n),s=n;s<=o;){for(var a=0;a<i&&!(s>o);a++){var c=e.getLine(s++);r=null==r?c:r+"\n"+c}var u=t.exec(r);if(t.lastIndex=0,u){var p=r.slice(0,u.index).split("\n"),h=u[0].split("\n"),d=n+p.length-1,f=p[p.length-1].length;return{startRow:d,startCol:f,endRow:d+h.length-1,endCol:1==h.length?f+h[0].length:h[h.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,n,o,r){for(var i,s=l(e,o),c=e.getLine(o).length-n,u=o;u>=r;){for(var p=0;p<s&&u>=r;p++){var h=e.getLine(u--);i=null==i?h:h+"\n"+i}var d=a(i,t,c);if(d){var f=i.slice(0,d.index).split("\n"),g=d[0].split("\n"),m=u+f.length,v=f[f.length-1].length;return{startRow:m,startCol:v,endRow:m+g.length-1,endCol:1==g.length?v+g[0].length:g[g.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var r=this.$isMultilineSearch(t),i=this.$multiLineForward,s=this.$multiLineBackward,a=1==t.backwards,l=0!=t.skipCurrent,c=n.unicode,u=t.range,p=t.start;p||(p=u?u[a?"end":"start"]:e.selection.getRange()),p.start&&(p=p[l!=a?"end":"start"]);var h=u?u.start.row:0,d=u?u.end.row:e.getLength()-1;if(a)var f=function(e){var n=p.row;if(!m(n,p.column,e)){for(n--;n>=h;n--)if(m(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=d,h=p.row;n>=h;n--)if(m(n,Number.MAX_VALUE,e))return}};else f=function(e){var n=p.row;if(!m(n,p.column,e)){for(n+=1;n<=d;n++)if(m(n,0,e))return;if(0!=t.wrap)for(n=h,d=p.row;n<=d;n++)if(m(n,0,e))return}};if(t.$isMultiLine)var g=n.length,m=function(t,o,r){var i=a?t-g+1:t;if(!(i<0||i+g>e.getLength())){var s=e.getLine(i),l=s.search(n[0]);if(!(!a&&l<o||-1===l)){for(var c=1;c<g;c++)if(-1==(s=e.getLine(i+c)).search(n[c]))return;var u=s.match(n[g-1])[0].length;if(!(a&&u>o))return!!r(i,l,i+g-1,u)||void 0}}};else m=a?function(t,i,a){if(r){var l=s(e,n,i,t,h);if(!l)return!1;if(a(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else{var u,p=e.getLine(t),d=[],f=0;for(n.lastIndex=0;u=n.exec(p);){var g=u[0].length;if(f=u.index,!g){if(f>=p.length)break;n.lastIndex=f+=o.skipEmptyMatch(p,f,c)}if(u.index+g>i)break;d.push(u.index,g)}for(var m=d.length-1;m>=0;m-=2){var v=d[m-1];if(a(t,v,t,v+(g=d[m])))return!0}}}:function(t,s,a){if(n.lastIndex=s,r){var l=i(e,n,t,d);if(l){var u=l.endRow<=d?l.endRow-1:d;u>t&&(t=u)}if(!l)return!1;if(a(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else for(var p,h,f=e.getLine(t);h=n.exec(f);){var g=h[0].length;if(a(t,p=h.index,t,p+g))return!0;if(!g&&(n.lastIndex=p+=o.skipEmptyMatch(f,p,c),p>=f.length))return!1}};return{forEach:f}},e}();function a(e,t,n){for(var o=null,r=0;r<=e.length;){t.lastIndex=r;var i=t.exec(e);if(!i)break;var s=i.index+i[0].length;if(s>e.length-n)break;(!o||s>o.index+o[0].length)&&(o=i),r=i.index+1}return o}function l(e,t){var n={row:t,column:0},o=e.doc.positionToIndex(n)+5e3;return e.doc.indexToPosition(o).row+1}t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=e("../lib/keys"),s=e("../lib/useragent"),a=i.KEY_MODS,l=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var o=this.commandKeyBinding;for(var r in o){var i=o[r];if(i==e)delete o[r];else if(Array.isArray(i)){var s=i.indexOf(e);-1!=s&&(i.splice(s,1),1==i.length&&(o[r]=i[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var o="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach(function(e){var t=this.parseKeys(e),n=a[t.hashId]+t.key;o+=(o?" ":"")+n,this._addCommandToBinding(o,"chainKeys")},this),o+=" "}var i=this.parseKeys(e),s=a[i.hashId]+i.key;this._addCommandToBinding(o+s,t,n)},this)},e.prototype._addCommandToBinding=function(e,t,n){var o,r=this.commandKeyBinding;if(t)if(!r[e]||this.$singleCommand)r[e]=t;else{Array.isArray(r[e])?-1!=(o=r[e].indexOf(t))&&r[e].splice(o,1):r[e]=[r[e]],"number"!=typeof n&&(n=c(t));var i=r[e];for(o=0;o<i.length&&!(c(i[o])>n);o++);i.splice(o,0,t)}else delete r[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),o=i[n];if(i.FUNCTION_KEYS[o])n=i.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},e.prototype.findKeyCommand=function(e,t){var n=a[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,o){if(!(o<0)){var r=a[t]+n,i=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,i=this.commandKeyBinding[e.$keyChain]||i),!i||"chainKeys"!=i&&"chainKeys"!=i[i.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||o>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:i}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var u=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o.$singleCommand=!0,o}return r(t,e),t}(l);u.call=function(e,t,n){l.prototype.$init.call(e,t,n,!0)},l.call=function(e,t,n){l.prototype.$init.call(e,t,n,!1)},t.HashHandler=u,t.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,a=e("../lib/event_emitter").EventEmitter,l=function(e){function t(t,n){var o=e.call(this,n,t)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}),o}return r(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var o=e.length;o--;)if(this.exec(e[o],t,n))return!0;return!1}"string"==typeof e&&(e=this.commands[e]);var r={editor:t,command:e,args:n};return this.canExecute(e,t)?(r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue):(this._signal("commandUnavailable",r),!1)},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._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(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})},t}(s);i.implement(l.prototype,a),t.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";var o=e("../lib/lang"),r=e("../config"),i=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(o.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var u=o.stringTrimLeft(o.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}r.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new i(n.row,0,r.row+2,0),l),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,o=e.selection.rangeList.ranges,r=[];o.length<1&&(o=[e.selection.getRange()]);for(var s=0;s<o.length;s++)s==o.length-1&&(o[s].end.row===t&&o[s].end.column===n||r.push(new i(o[s].end.row,o[s].end.column,t,n))),0===s?0===o[s].start.row&&0===o[s].start.column||r.push(new i(0,0,o[s].start.row,o[s].start.column)):r.push(new i(o[s-1].end.row,o[s-1].end.column,o[s].start.row,o[s].start.column));for(e.exitMultiSelectMode(),e.clearSelection(),s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(e){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),e.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,t,n){"use strict";var o=e("../lib/keys"),r=e("../mouse/default_gutter_handler").GutterTooltip,i=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new r(this.editor)}return e.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===o.escape&&this.annotationTooltip.hideTooltip());if(e.target===this.element){if(e.keyCode!=o.enter)return;e.preventDefault();var t=this.editor.getCursorPosition().row;return this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),void setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldLaneWidget(e),n=this.$findNearestAnnotation(e);if(null!==t||null!==n)return this.$findClosestNumber(t,n,e)===t?(this.activeLane="fold",this.activeRowIndex=t,this.$isCustomWidgetVisible(t)?void this.$focusCustomWidget(this.activeRowIndex):void this.$focusFoldWidget(this.activeRowIndex)):(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(e),setTimeout(function(){this.editor._signal("gutterkeydown",new s(e,this))}.bind(this),10)},e.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode!==o.tab){if(e.keyCode===o.escape)return e.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(e.keyCode!==o.up)if(e.keyCode!==o.down){if(e.keyCode===o.left)return e.preventDefault(),void this.$switchLane("annotation");if(e.keyCode===o.right)return e.preventDefault(),void this.$switchLane("fold");if(e.keyCode!==o.enter&&e.keyCode!==o.space);else switch(e.preventDefault(),this.activeLane){case"fold":var t=this.$rowIndexToRow(this.activeRowIndex),n=this.editor.session.$gutterCustomWidgets[t];if(n)n.callbacks&&n.callbacks.onClick&&n.callbacks.onClick(e,t);else{if("start"===this.gutterLayer.session.foldWidgets[t]){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break}return;case"annotation":var r=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),i=this.annotationTooltip.getElement().style;i.left=r.right+"px",i.top=r.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}}else e.preventDefault()},e.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},e.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getFoldWidget(e).style.display;return t&&n},e.prototype.$isCustomWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n=!!this.$getCustomWidget(e);return t&&n},e.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getAnnotation(e).style.display;return t&&n},e.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},e.prototype.$getCustomWidget=function(e){return this.lines.get(e).element.childNodes[3]},e.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},e.prototype.$findNearestFoldLaneWidget=function(e){if(this.$isCustomWidgetVisible(e))return e;if(this.$isFoldWidgetVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isCustomWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(e+t))return e+t;if(e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusCustomWidget=function(e){if(null!=e){var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$findClosestNumber=function(e,t,n){return null===e?t:null===t||Math.abs(n-e)<=Math.abs(n-t)?e:t},e.prototype.$switchLane=function(e){switch(e){case"annotation":if("annotation"===this.activeLane)break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(null==t)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(null===n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$isCustomWidgetVisible(n)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex)}},e.prototype.$rowIndexToRow=function(e){var t=this.lines.get(e);return t?t.row:null},e.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++)if(this.lines.get(t).row==e)return t;return null},e}();t.GutterKeyboardHandler=i;var s=function(){function e(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}return e.prototype.getKey=function(){return o.keyCodeToString(this.domEvent.keyCode)},e.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},e.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},e.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},e}();t.GutterKeyboardEvent=s}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";var o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,p=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,d=e("./search").Search,f=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,y=e("./config"),b=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,S=e("./clipboard"),C=e("./lib/keys"),_=e("./lib/event"),k=e("./tooltip").HoverTooltip,$=function(){function e(t,n,o){this.id="editor"+ ++e.$uid,this.session,this.$toDestroy=[];var r=t.getContainerElement();this.container=r,this.renderer=t,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new p(this),this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(n||o&&o.session||new h("")),y.resetOptions(this),o&&this.setOptions(o),y._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var o=this.selection.getRange(),r=this.renderer.layerConfig;(o.start.row>=r.lastRow||o.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,o=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),o=o&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else o=o&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(o=!1),o?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;y.loadModule(["keybinding",e],function(o){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(o&&o.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){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 n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.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=e.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(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(e,t)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach(function(e){t.removeMarker(e)}),t.$bracketHighlight=null);var n=e.getCursorPosition(),o=e.getKeyboardHandler(),r=o&&o.$getDirectionForHighlight&&o.$getDirectionForHighlight(e),i=t.getMatchingBracketRanges(n,r);if(!i){var s=new b(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(i=[a.openTagName.isEmpty()?a.openTag:a.openTagName,a.closeTagName.isEmpty()?a.closeTag:a.closeTagName])}}if(!i&&t.$mode.getMatching&&(i=t.$mode.getMatching(e.session)),i){var l="ace_bracket";Array.isArray(i)?1==i.length&&(l="ace_error_bracket"):i=[i],2==i.length&&(0==f.comparePoints(i[0].end,i[1].start)?i=[f.fromPoints(i[0].start,i[1].end)]:0==f.comparePoints(i[0].start,i[1].end)&&(i=[f.fromPoints(i[1].start,i[0].end)])),t.$bracketHighlight={ranges:i,markerIds:i.map(function(e){return t.addMarker(e,l,"text")})},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}},50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new f(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),o=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",o)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,o=t.end.column,r=e.getLine(t.start.row),i=r.substring(n,o);if(!(i.length>5e3)&&/[\w\d]/.test(i)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:i}),a=r.substring(n-1,o+1);if(s.test(a))return s}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var o=this.selection.getAllRanges(),r=0;r<o.length;r++){var i=o[r];r&&o[r-1].start.row==i.start.row||(e+=this.session.getLine(i.start.row)+t)}}var s={text:e};return this._signal("copy",s),S.lineMode=!!n&&s.text,s.text},e.prototype.onCopy=function(){this.commands.exec("copy",this)},e.prototype.onCut=function(){this.commands.exec("cut",this)},e.prototype.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},e.prototype.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===S.lineMode,o=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?o.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach(function(e){o.insert({row:e.start.row,column:0},t)});else{var r=t.split(/\r\n|\r|\n/),i=this.selection.rangeList.ranges,s=!(2!=r.length||r[0]&&r[1]);if(r.length!=i.length||s)return this.commands.exec("insertstring",this,t);for(var a=i.length;a--;){var l=i[a];l.isEmpty()||o.remove(l),o.insert(l.start,r[a])}}},e.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},e.prototype.insert=function(e,t){var n=this.session,o=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var i=o.transformAction(n.getState(r.row),"insertion",this,n,e);i&&(e!==i.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=i.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty())this.session.getOverwrite()&&-1==e.indexOf("\n")&&((s=f.fromPoints(r,r)).end.column+=e.length,this.session.remove(s));else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),p=(a=n.getLine(r.row),o.checkOutdent(u,a,e));if(n.insert(r,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new f(r.row,c+i.selection[0],r.row,c+i.selection[1])):this.selection.setSelectionRange(new f(r.row+i.selection[0],i.selection[1],r.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var h=o.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},h)}p&&o.autoOutdent(u,n,r.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new f(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),o="",r="",i="",s=e.getTabString(),a=0;a<n.length;a++)for(var l=n[a].start.row,c=n[a].end.row,u=l;u<=c;u++){u>0&&(o=e.getState(u-1),r=e.getLine(u-1),i=t.getNextLineIndent(o,r,s));var p=e.getLine(u),h=t.$getIndent(p);if(i!==h){if(h.length>0){var d=new f(u,0,u,h.length);e.remove(d)}i.length>0&&e.insert({row:u,column:0},i)}t.autoOutdent(o,e,u)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,o=n.getState(t.start.row),r=n.getMode().transformAction(o,"deletion",this,n,t);if(0===t.end.column){var i=n.getTextRange(t);if("\n"==i[i.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,o,r=this.session.getLine(e.row);t<r.length?(n=r.charAt(t)+r.charAt(t-1),o=new f(e.row,t-1,e.row,t+1)):(n=r.charAt(t-1)+r.charAt(t-2),o=new f(e.row,t-2,e.row,t)),this.session.replace(o,n),this.session.selection.moveToPosition(o.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n))return u=this.$getSelectedRows(),void e.indentRows(u.first,u.last,"\t")}var o=e.getLine(t.start.row),r=t.start,i=e.getTabSize(),a=e.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=i-a%i,c=s.stringRepeat(" ",l);else{for(l=a%i;" "==o[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],o=e.first;o<=e.last;o++)n.push(t.getLine(o));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var r=new f(0,0,0,0);for(o=e.first;o<=e.last;o++){var i=t.getLine(o);r.start.row=o,r.end.row=o,r.end.column=i.length,t.replace(r,n[o-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var o=this.session.getLine(e);n.lastIndex<t;){var r=n.exec(o);if(r.index<=t&&r.index+r[0].length>=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,o=new f(t,n-1,t,n),r=this.session.getTextRange(o);if(!isNaN(parseFloat(r))&&isFinite(r)){var i=this.getNumberAt(t,n);if(i){var s=i.value.indexOf(".")>=0?i.start+i.value.indexOf(".")+1:i.end,a=i.start+i.value.length-s,l=parseFloat(i.value);l*=Math.pow(10,a),s!==i.end&&n<s?e*=Math.pow(10,i.end-n-1):e*=Math.pow(10,i.end-n),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new f(t,i.start,t,i.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(i.start+1,n+c.length-i.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),o=this.selection.getWordRange().start.column,r=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),i=t-o-1;i<0&&(i=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&r.forEach(function(t,r){l=a+t.length,i>=a&&i<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+o),c.selection.selectTo(e,l+o)),a=l});for(var u,p=this.$toggleWordPairs,h=0;h<p.length;h++)for(var d=p[h],f=0;f<=1;f++){var g=+!f,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(d[f])+")\\s?$","i"));m&&n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(m[1])+")($|\\s)","g"))&&(u=n.replace(new RegExp(s.escapeRegExp(d[f]),"i"),function(e){var t=d[g];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+d[g].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(u),u="")}},e.prototype.findLinkAt=function(e,t){var n,r,i=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),s=t;s<0&&(s=0);var a,l=0,c=0;try{for(var u=o(i),p=u.next();!p.done;p=u.next()){var h=p.value;if(c=l+h.length,s>=l&&s<=c&&h.match(/((?:https?|ftp):\/\/[\S]+)/)){a=h.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return a},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),o=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var i=o?n.start:n.end,s=t.insert(i,t.getTextRange(n));n.start=i,n.end=s,e.setSelectionRange(n,o)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,o,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var i=r.toOrientedRange();n=this.$getSelectedRows(i),o=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(o=0),i.moveBy(o,0),r.fromOrientedRange(i)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var p=u;s[u].moveBy(a,0);for(var h=(n=this.$getSelectedRows(s[u])).first,d=n.last;++u<c;){l&&s[u].moveBy(l,0);var f=this.$getSelectedRows(s[u]);if(t&&f.first!=d)break;if(!t&&f.first>d+1)break;d=f.last}for(u--,a=this.session.$moveLines(h,d,t?0:e),t&&-1==e&&(p=u+1);p<=u;)s[p].moveBy(a,0),p++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,o=this.renderer.layerConfig,r=e*Math.floor(o.height/o.lineHeight);!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var i=n.scrollTop;n.scrollBy(0,r*o.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(i)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,o){this.renderer.scrollToLine(e,t,n,o)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),o=new b(this.session,n.row,n.column),r=o.getCurrentToken(),i=0;r&&-1!==r.type.indexOf("tag-name")&&(r=o.stepBackward());var s=r||o.stepForward();if(s){var a,l,c=!1,u={},p=n.column-s.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;p<s.value.length&&!c;p++)if(h[s.value[p]])switch(l=h[s.value[p]]+"."+s.type.replace("rparen","lparen"),isNaN(u[l])&&(u[l]=0),s.value[p]){case"(":case"[":case"{":u[l]++;break;case")":case"]":case"}":u[l]--,-1===u[l]&&(a="bracket",c=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(u[s.value])&&(u[s.value]=0),"<"===r.value&&i>1?u[s.value]++:"</"===r.value&&u[s.value]--,-1===u[s.value]&&(a="tag",c=!0));c||(r=s,i++,s=o.stepForward(),p=0)}while(s&&!c);if(a){var d,g;if("bracket"===a)(d=this.session.getBracketRange(n))||(g=(d=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn()+p-1,o.getCurrentTokenRow(),o.getCurrentTokenColumn()+p-1)).start,(t||g.row===n.row&&Math.abs(g.column-n.column)<2)&&(d=this.session.getBracketRange(g)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(0===(d=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn()-2,o.getCurrentTokenRow(),o.getCurrentTokenColumn()-2)).compare(n.row,n.column)){var m=this.session.getMatchingTags(n);m&&(m.openTag.contains(n.row,n.column)?g=(d=m.closeTag).start:(d=m.openTag,g=m.closeTag.start.row===n.row&&m.closeTag.start.column===n.column?d.end:d.start))}g=g||d.start}(g=d&&d.cursor||g)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(g.row,g.column):this.selection.moveTo(g.row,g.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),o=0;return n?(this.$tryReplace(n,e)&&(o=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),o):o},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),o=0;if(!n.length)return o;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var i=n.length-1;i>=0;--i)this.$tryReplace(n[i],e)&&o++;return this.selection.setSelectionRange(r),o},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var i=this.$search.find(this.session);return t.preventScroll?i:i?(this.revealRange(i,n),i):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(e){e.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()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,o=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var i=this.on("changeSelection",function(){o=!0}),s=this.renderer.on("beforeRender",function(){o&&(t=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(o&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,i=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=i.top-s.offset;null!=(o=i.top>=0&&a+t.top<0||!(i.top<s.height&&i.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=i.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(o)),o=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",i),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var o=this;y.loadModule("ace/ext/prompt",function(r){r.prompt(o,e,t,n)})},e}();$.$uid=0,$.prototype.curOp=null,$.prototype.prevOp={},$.prototype.$mergeableCommands=["backspace","del","insertstring"],$.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"],["&&","||"],["==","!="]],r.implement($.prototype,g),y.defineOptions($.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;this.textInput.setReadOnly(e),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var n=!1;if(e&&"keydown"==e.type){if(!(n=e&&e.key&&1==e.key.length&&!e.ctrlKey&&!e.metaKey))return}else e&&"exec"!==e.type&&(n=!0);if(n){t.hoverTooltip||(t.hoverTooltip=new k);var o=i.createElement("div");o.textContent=x("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),o)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var n=this.textInput.getElement();e?(_.addListener(n,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(_.removeListener(n,"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(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){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(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?E.attach(this):E.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?E.attach(this):E.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),i.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),i.addCssClass(this.container,"ace_hasPlaceholder");var t=i.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},o=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(a.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",o.bind(this)),this.commands.addCommand(n),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",x("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",x("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),t||(t=new w(this)),t.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",o.bind(this)),this.commands.removeCommand(n),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),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},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(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=$}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var o=e("../lib/dom"),r=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){o.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var o=t.firstRowScreen*t.lineHeight,r=Math.floor(o/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-r*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=o.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=o.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,r){var i=this.cellCache.pop();if(!i){var s=o.createElement("div");r&&r(s),this.element.appendChild(s),i={element:s,text:"",row:e}}return i.row=e,i},e}();t.Lines=r}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,t,n){"use strict";var o=e("../lib/dom"),r=e("../lib/oop"),i=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines,l=e("../config").nls,c=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],o=n.row,r=this.$annotations[o];r||(r=this.$annotations[o]={text:[],type:[],displayText:[]});var s=n.text,a=n.text,l=n.type;s=s?i.escapeHTML(s):n.html||"",a=a||n.html||"",-1===r.text.indexOf(s)&&(r.text.push(s),r.type.push(l),r.displayText.push(a));var c=n.className;c?r.className=c:"error"===l?r.className=" ace_error":"security"!==l||/\bace_error\b/.test(r.className)?"warning"!==l||/\bace_(error|security)\b/.test(r.className)?"info"!==l||r.className?"hint"!==l||r.className||(r.className=" ace_hint"):r.className=" ace_info":r.className=" ace_warning":r.className=" ace_security"}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var o=new Array(n+1);o.unshift(t,1),this.$annotations.splice.apply(this.$annotations,o)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,o=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=o,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var r=t.getNextFoldLine(n),i=r?r.start.row:1/0,s=null,a=-1,l=n;;){if(l>i&&(l=r.end.row+1,i=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>o){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,u),this.$lines.push(s)),this.$renderCell(s,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,o=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+o-1);var i=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(i+=s.left+s.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var o=t[n];if(o.row>=this.$cursorRow){if(o.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;o=t[n-1]}o.element.className="ace_gutter-active-line "+o.element.className,this.$cursorCell=o;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),o=this.oldLastRow;if(this.oldLastRow=n,!t||o<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)this.$lines.shift();if(o>n)for(r=this.session.getFoldedRowCount(n+1,o);r>0;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>o&&this.$lines.push(this.$renderLines(e,o+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var o=[],r=t,i=this.session.getNextFoldLine(r),s=i?i.start.row:1/0;r>s&&(r=i.end.row+1,s=(i=this.session.getNextFoldLine(r,i))?i.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,e,this.session,u);this.$renderCell(a,e,i,r),o.push(a),r++}return o},e.prototype.$renderCell=function(e,t,n,r){var i=e.element,s=this.session,a=i.childNodes[0],c=i.childNodes[1],u=i.childNodes[2],p=i.childNodes[3],h=u.firstChild,d=s.$firstLineNumber,f=s.$breakpoints,g=s.$decorations,m=s.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&s.foldWidgets,y=n?n.start.row:Number.MAX_VALUE,b=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",x=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",S=(m?m.getText(s,r):r+d).toString();if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&r>=y&&this.$cursorRow<=n.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),f[r]&&(w+=f[r]),g[r]&&(w+=g[r]),this.$annotations[r]&&r!==y&&(w+=this.$annotations[r].className),v){var C=v[r];null==C&&(C=v[r]=s.getFoldWidget(r))}if(C){var _="ace_fold-widget ace_"+C,k="start"==C&&r==y&&r<n.end.row;if(k){_+=" ace_closed";for(var $="",E=!1,O=r+1;O<=n.end.row;O++)if(this.$annotations[O]){if(" ace_error"===this.$annotations[O].className){E=!0,$=" ace_error_fold";break}" ace_security"===this.$annotations[O].className?(E=!0,$=" ace_security_fold"):" ace_warning"===this.$annotations[O].className&&" ace_security_fold"!==$&&(E=!0,$=" ace_warning_fold")}w+=$}else _+=" ace_open";c.className!=_&&(c.className=_),o.setStyle(c.style,"height",b),o.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var M=s.getFoldWidgetRange(r);M?c.setAttribute("aria-label",l("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[M.start.row+1,M.end.row+1])):n?c.setAttribute("aria-label",l("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[r+1])),k?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("gutter.code-folding.closed.title","Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("gutter.code-folding.open.title","Fold code")))}else c&&(o.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));var T=this.session.$gutterCustomWidgets[r];if(T?this.$addCustomWidget(r,T,e):p&&this.$removeCustomWidget(r,e),E&&this.$showFoldedAnnotations){switch(u.className="ace_gutter_annotation",h.className=x,h.className+=$,o.setStyle(h.style,"height",b),o.setStyle(u.style,"display","block"),o.setStyle(u.style,"height",b),$){case" ace_error_fold":A=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[S]);break;case" ace_security_fold":A=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[S]);break;case" ace_warning_fold":A=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[S])}u.setAttribute("aria-label",A),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")}else if(this.$annotations[r]){var A;switch(u.className="ace_gutter_annotation",h.className=x,this.$useSvgGutterIcons?h.className+=this.$annotations[r].className:i.classList.add(this.$annotations[r].className.replace(" ","")),o.setStyle(h.style,"height",b),o.setStyle(u.style,"display","block"),o.setStyle(u.style,"height",b),this.$annotations[r].className){case" ace_error":A=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[S]);break;case" ace_security":A=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[S]);break;case" ace_warning":A=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[S]);break;case" ace_info":A=l("gutter.annotation.aria-label.info","Info, read annotations row $0",[S]);break;case" ace_hint":A=l("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[S])}u.setAttribute("aria-label",A),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")}else o.setStyle(u.style,"display","none"),u.removeAttribute("aria-label"),u.removeAttribute("role"),u.setAttribute("tabindex","0");return S!==a.data&&(a.data=S),i.className!=w&&(i.className=w),o.setStyle(e.element.style,"height",this.$lines.computeLineHeight(r,t,s)+"px"),o.setStyle(e.element.style,"top",this.$lines.computeLineTop(r,t,s)+"px"),e.text=S,"none"!==u.style.display||"none"!==c.style.display||T?e.element.setAttribute("aria-hidden",!1):e.element.setAttribute("aria-hidden",!0),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?o.addCssClass(this.element,"ace_folding-enabled"):o.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$hideFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var r=n.element.childNodes[1];r&&o.setStyle(r.style,"display","none")}},e.prototype.$showFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var r=n.element.childNodes[1];r&&this.session.foldWidgets&&this.session.foldWidgets[n.row]&&o.setStyle(r.style,"display","inline-block")}},e.prototype.$getGutterCell=function(e){var t=this.$lines.cells,n=this.session.documentToScreenRow(e,0);return t[e-this.config.firstRowScreen-(e-n)]},e.prototype.$addCustomWidget=function(e,t,n){var r=t.className,i=t.label,s=t.title,a=t.callbacks;this.session.$gutterCustomWidgets[e]={className:r,label:i,title:s,callbacks:a},this.$hideFoldWidget(e,n);var l=n||this.$getGutterCell(e);if(l&&l.element){var c=l.element.querySelector(".ace_custom-widget");c&&c.remove(),(c=o.createElement("span")).className="ace_custom-widget ".concat(r),c.setAttribute("tabindex","-1"),c.setAttribute("role","button"),c.setAttribute("aria-label",i),c.setAttribute("title",s),o.setStyle(c.style,"display","inline-block"),o.setStyle(c.style,"height","inherit"),a&&a.onClick&&c.addEventListener("click",function(t){a.onClick(t,e),t.stopPropagation()}),l.element.appendChild(c)}},e.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var n=t||this.$getGutterCell(e);if(n&&n.element){var o=n.element.querySelector(".ace_custom-widget");o&&n.element.removeChild(o)}},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=o.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0},e}();function u(e){var t=document.createTextNode("");e.appendChild(t);var n=o.createElement("span");e.appendChild(n);var r=o.createElement("span");e.appendChild(r);var i=o.createElement("span");return r.appendChild(i),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,r.implement(c.prototype,s),t.Gutter=c}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var o=e("../range").Range,r=e("../lib/dom"),i=function(){function e(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var o=this.markers[n];if(o.range){var r=o.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),o.renderer){var i=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;o.renderer(t,r,s,i,e)}else"fullLine"==o.type?this.drawFullLineMarker(t,r,o.clazz,e):"screenLine"==o.type?this.drawScreenLineMarker(t,r,o.clazz,e):r.isMultiLine()?"text"==o.type?this.drawTextMarker(t,r,o.clazz,e):this.drawMultiLineMarker(t,r,o.clazz,e):this.drawSingleLineMarker(t,r,o.clazz+" ace_start ace_br15",e)}else o.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,r,i){for(var a=this.session,l=t.start.row,c=t.end.row,u=l,p=0,h=0,d=a.getScreenLastRowColumn(u),f=new o(u,t.start.column,u,h);u<=c;u++)f.start.row=f.end.row=u,f.start.column=u==l?t.start.column:a.getRowWrapIndent(u),f.end.column=d,p=h,h=d,d=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:t.end.column,this.drawSingleLineMarker(e,f,n+(u==l?" ace_start":"")+" ace_br"+s(u==l||u==l+1&&t.start.column,p<h,h>d,u==c),r,u==c?0:1,i)},e.prototype.drawMultiLineMarker=function(e,t,n,o,r){var i=this.$padding,s=o.lineHeight,a=this.$getTop(t.start.row,o),l=i+t.start.column*o.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",o,null,r)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:"+i+"px;top:"+a+"px;left:"+l+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",o,null,r)}else{a=this.$getTop(t.end.row,o);var u=t.end.column*o.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+i+"px;"+(r||""))}if(!((s=(t.end.row-t.start.row-1)*o.lineHeight)<=0)){a=this.$getTop(t.start.row+1,o);var p=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(p?" ace_br"+p:""),"height:"+s+"px;right:"+i+"px;top:"+a+"px;left:"+i+"px;"+(r||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,o,r,i){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,o,r,i);var s=o.lineHeight,a=(t.end.column+(r||0)-t.start.column)*o.characterWidth,l=this.$getTop(t.start.row,o),c=this.$padding+t.start.column*o.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(i||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,o,r,i){var s=o.lineHeight,a=this.$getTop(t.start.row,o),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(r||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(i||""))},this)},e.prototype.drawFullLineMarker=function(e,t,n,o,r){var i=this.$getTop(t.start.row,o),s=o.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,o)-i),this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(r||""))},e.prototype.drawScreenLineMarker=function(e,t,n,o,r){var i=this.$getTop(t.start.row,o),s=o.lineHeight;this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(r||""))},e}();function s(e,t,n,o){return(e?1:0)|(t?2:0)|(n?4:0)|(o?8:0)}i.prototype.$padding=0,t.Marker=i}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,t,n){var o=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return o.has(e)}}),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,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/dom"),i=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,u=function(){function e(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showTabs?((o=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",o.textContent=i.stringRepeat(this.TAB_CHAR,n),t.push(o)):t.push(this.dom.createTextNode(i.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var o,r="ace_indent-guide",s=this.showSpaces?" ace_invisible ace_invisible_space":"",a=this.showSpaces?i.stringRepeat(this.SPACE_CHAR,this.tabSize):i.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?i.stringRepeat(this.TAB_CHAR,this.tabSize):a;(o=this.dom.createElement("span")).className=r+s,o.textContent=a,this.$tabStrings[" "]=o,(o=this.dom.createElement("span")).className=r+l,o.textContent=c,this.$tabStrings["\t"]=o}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var o=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),i=this.element.childNodes,s=0,a=e.firstRow;a<o;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(o)){o=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,u=(a=o,(l=this.session.getNextFoldLine(a))?l.start.row:1/0);a>u&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var p=i[s++];if(p){this.dom.removeChildren(p),this.$renderLine(p,a,a==u&&l),c&&(p.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(a)+"px";p.style.height!=h&&(c=!0,p.style.height=h)}a++}if(c)for(;s<this.$lines.cells.length;){var d=this.$lines.cells[s++];d.element.style.top=this.$lines.computeLineTop(d.row,e,this.session)+"px"}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,o=t?t.lastRow:-1;if(!t||o<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var o=[],i=t,s=this.session.getNextFoldLine(i),a=s?s.start.row:1/0;i>a&&(i=s.end.row+1,a=(s=this.session.getNextFoldLine(i,s))?s.start.row:1/0),!(i>n);){var l=this.$lines.createCell(i,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(i,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(i,e,this.session)+"px"),this.$renderLine(c,i,i==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",o.push(l),i++}return o},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,o=this.$lines;o.getLength();)o.pop();o.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,o){for(var r,s=this,a=/(\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,u=this.dom.createFragment(this.element),p=0;r=a.exec(o);){var h=r[1],d=r[2],f=r[3],g=r[4],m=r[5];if(s.showSpaces||!d){var v=p!=r.index?o.slice(p,r.index):"";if(p=r.index+r[0].length,v&&u.appendChild(this.dom.createTextNode(v,this.element)),h){var y=s.session.getScreenTabSize(t+r.index);u.appendChild(s.$tabStrings[y].cloneNode(!0)),t+=y-1}else d?s.showSpaces?((w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",w.textContent=i.stringRepeat(s.SPACE_CHAR,d.length),u.appendChild(w)):u.appendChild(this.dom.createTextNode(d,this.element)):f?((w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",w.textContent=i.stringRepeat(s.SPACE_CHAR,f.length),u.appendChild(w)):g?(t+=1,(w=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",w.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=s.showSpaces?s.SPACE_CHAR:g,u.appendChild(w)):m&&(t+=1,(w=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",w.className="ace_cjk",w.textContent=m,u.appendChild(w))}}if(u.appendChild(this.dom.createTextNode(p?o.slice(p):o,this.element)),c(n.type))e.appendChild(u);else{var b="ace_"+n.type.replace(/\./g," ace_"),w=this.dom.createElement("span");"fold"==n.type&&(w.style.width=n.value.length*this.config.characterWidth+"px",w.setAttribute("title",l("inline-fold.closed.title","Unfold code"))),w.className=b,w.appendChild(u),e.appendChild(w)}return t+o.length},e.prototype.renderIndentGuide=function(e,t,n){var o=t.search(this.$indentGuideRe);if(o<=0||o>=n)return t;if(" "==t[0]){for(var r=(o-=o%this.tabSize)/this.tabSize,i=0;i<r;i++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(o)}if("\t"==t[0]){for(i=0;i<o;i++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(o)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,o=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:o,start:t.row},this.session.$bracketHighlight)for(var r=this.session.$bracketHighlight.ranges,i=0;i<r.length;i++)if(t.row!==r[i].start.row){this.$highlightIndentGuideMarker.end=r[i].start.row+1,t.row>r[i].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,i=t.row+1;i<e.length;i++){var s=e[i],a=/^\s*/.exec(s)[0].length;if(""!==s&&(this.$highlightIndentGuideMarker.end=i,a<=n))break}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},e.prototype.$setIndentGuideActive=function(e,t){if(""!==this.session.doc.getLine(e.row)){var n=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group")){if(!(e.element.childNodes.length>0))return;n=e.element.childNodes[0]}var o=n.childNodes;if(o){var r=o[t-1];r&&r.classList&&r.classList.contains("ace_indent-guide")&&r.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var o=e[n];if(this.$highlightIndentGuideMarker.end&&o.row>=this.$highlightIndentGuideMarker.start+1){if(o.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,t)}}else for(n=e.length-1;n>=0;n--)if(o=e[n],this.$highlightIndentGuideMarker.end&&o.row<this.$highlightIndentGuideMarker.start){if(o.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,t)}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},e.prototype.$renderWrappedLine=function(e,t,n){var o=0,r=0,s=n[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var u=t[c],p=u.value;if(0==c&&this.displayIndentGuides){if(o=p.length,!(p=this.renderIndentGuide(l,p,s)))continue;o-=p.length}if(o+p.length<s)a=this.$renderToken(l,a,u,p),o+=p.length;else{for(;o+p.length>=s;)a=this.$renderToken(l,a,u,p.substring(0,s-o)),p=p.substring(s-o),o=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(i.stringRepeat(" ",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=p.length&&(o+=p.length,a=this.$renderToken(l,a,u,p))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,o=0;o<t.length;o++){var r=t[o],i=r.value;if(0!=o||!this.displayIndentGuides||(i=this.renderIndentGuide(e,i))){if(n+i.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,i);n=this.$renderToken(e,n,r,i)}}},e.prototype.$renderOverflowMessage=function(e,t,n,o,r){n&&this.$renderToken(e,t,n,o.slice(0,this.MAX_LINE_LENGTH-t));var i=this.dom.createElement("span");i.className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=r?"<hide>":"<click to see more...>",e.appendChild(i)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var o=this.$getFoldLineTokens(t,n);else o=this.session.getTokens(t);var r=e;if(o.length){var i=this.session.getRowSplitData(t);i&&i.length?(this.$renderWrappedLine(e,o,i),r=e.lastChild):(r=e,this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,o))}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showEOL&&r){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,o=[],r=n.getTokens(e);return t.walk(function(e,t,i,s,a){null!=e?o.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,i=0;i+e[r].value.length<t;)if(i+=e[r].value.length,++r==e.length)return;for(i!=t&&((s=e[r].value.substring(t-i)).length>n-t&&(s=s.substring(0,n-t)),o.push({type:e[r].type,value:s}),i=t+s.length,r+=1);i<n&&r<e.length;){var s;(s=e[r].value).length+i>n?o.push({type:e[r].type,value:s.substring(0,n-i)}):o.push(e[r]),i+=s.length,r+=1}}(r,s,i))},t.end.row,this.session.getLine(t.end.row).length),o},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,o.implement(u.prototype,a),t.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var o=e("../lib/dom"),r=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)o.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&o.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,o.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,o.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=o.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,o.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),o.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]),n=0;for(var i=t.length;n<i;n++){var s=this.getPixelPosition(t[n].cursor,!0);if(!((s.top>e.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(o.setStyle(l,"display","block"),o.translate(a,s.left,s.top),o.setStyle(l,"width",Math.round(e.characterWidth)+"px"),o.setStyle(l,"height",e.lineHeight+"px")):o.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();r.prototype.$padding=0,r.prototype.drawCursor=null,t.Cursor=r}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter,c=32768,u=function(){function e(e,t){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(u.prototype,l);var p=function(e){function t(t,n){var o=e.call(this,t,"-v")||this;return o.scrollTop=0,o.scrollHeight=0,n.$scrollbarWidth=o.width=s.scrollbarWidth(t.ownerDocument),o.inner.style.width=o.element.style.width=(o.width||15)+5+"px",o.$minWidth=0,o}return r(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(u);p.prototype.setInnerHeight=p.prototype.setScrollHeight;var h=function(e){function t(t,n){var o=e.call(this,t,"-h")||this;return o.scrollLeft=0,o.height=n.$scrollbarWidth,o.inner.style.height=o.element.style.height=(o.height||15)+5+"px",o}return r(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(u);t.ScrollBar=p,t.ScrollBarV=p,t.ScrollBarH=h,t.VScrollBar=p,t.HScrollBar=h}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter;s.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n  position: absolute;\n  background: rgba(128, 128, 128, 0.6);\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  border: 1px solid #bbb;\n  border-radius: 2px;\n  z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n  position: absolute;\n  z-index: 6;\n  background: none;\n  overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n  z-index: 6;\n  right: 0;\n  top: 0;\n  width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n  z-index: 8;\n  right: 0;\n  width: 100%;\n}\n.ace_editor>.ace_sb-h {\n  bottom: 0;\n  left: 0;\n  height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n  bottom: 0;\n  height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n  z-index: 8;\n  background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=s.createElement("div"),this.element.className="ace_sb"+t,this.inner=s.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(c.prototype,l);var u=function(e){function t(t,n){var o=e.call(this,t,"-v")||this;return o.scrollTop=0,o.scrollHeight=0,o.parent=t,o.width=o.VScrollWidth,o.renderer=n,o.inner.style.width=o.element.style.width=(o.width||15)+"px",o.$minWidth=0,o}return r(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,o=t.clientY,r=t.clientY,i=this.thumbTop;a.capture(this.inner,function(e){o=e.clientY},function(){clearInterval(s)});var s=setInterval(function(){if(void 0!==o){var e=n.scrollTopFromThumbTop(i+o-r);e!==n.scrollTop&&n._emit("scroll",{data:e})}},20);return a.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),a.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,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})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var p=function(e){function t(t,n){var o=e.call(this,t,"-h")||this;return o.scrollLeft=0,o.scrollWidth=0,o.height=o.HScrollHeight,o.inner.style.height=o.element.style.height=(o.height||12)+"px",o.renderer=n,o}return r(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,o=t.clientX,r=t.clientX,i=this.thumbLeft;a.capture(this.inner,function(e){o=e.clientX},function(){clearInterval(s)});var s=setInterval(function(){if(void 0!==o){var e=n.scrollLeftFromThumbLeft(i+o-r);e!==n.scrollLeft&&n._emit("scroll",{data:e})}},20);return a.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),a.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,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})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);p.prototype.setInnerWidth=p.prototype.setScrollWidth,t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=p,t.VScrollBar=u,t.HScrollBar=p}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var o=e("./lib/event"),r=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(o.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(o.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=r}),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,t,n){var o=e("../lib/oop"),r=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,u="function"==typeof ResizeObserver,p=200,h=function(){function e(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=i.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){e.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle(function t(){e.checkForSizeChanges(),s.onIdle(t,500)},500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=i.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=r.buildDom([e(0,0),e(p,0),e(0,p),e(p,p)],this.el)},e.prototype.transformCoordinates=function(e,t){function n(e,t,n){var o=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/o,(+e[1]*n[0]-e[0]*n[1])/o]}function o(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function i(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=i(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),u=s(this.els[3]),h=n(o(u,l),o(u,c),o(r(l,c),r(u,a))),d=i(1+h[0],o(l,a)),f=i(1+h[1],o(c,a));if(t){var g=t,m=h[0]*g[0]/p+h[1]*g[1]/p+1,v=r(i(g[0],d),i(g[1],f));return r(i(1/m/p,v),a)}var y=o(e,a),b=n(o(d,i(h[0],y)),o(f,i(h[1],y)),y);return i(p,b)},e}();h.prototype.$characterSize={width:0,height:0},o.implement(h.prototype,l),t.FontMetrics=h}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius    : 3px;}\n.ace_br2 {border-top-right-radius   : 3px;}\n.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}\n.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}\n.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\n.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\n.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\n.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n    position: relative;\n    overflow: hidden;\n    padding: 0;\n    font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n    direction: ltr;\n    text-align: left;\n    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n    forced-color-adjust: none;\n}\n\n.ace_scroller {\n    position: absolute;\n    overflow: hidden;\n    top: 0;\n    bottom: 0;\n    background-color: inherit;\n    -ms-user-select: none;\n    -moz-user-select: none;\n    -webkit-user-select: none;\n    user-select: none;\n    cursor: text;\n}\n\n.ace_content {\n    position: absolute;\n    box-sizing: border-box;\n    min-width: 100%;\n    contain: style size layout;\n    font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n    font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n    box-shadow: inset 0 0 0 2px #5E9ED6;\n    outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    content: \'\';\n    background: rgba(250, 250, 250, 0.01);\n    z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n    background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n    position: absolute;\n    overflow : hidden;\n    width: auto;\n    top: 0;\n    bottom: 0;\n    left: 0;\n    cursor: default;\n    z-index: 4;\n    -ms-user-select: none;\n    -moz-user-select: none;\n    -webkit-user-select: none;\n    user-select: none;\n    contain: style size layout;\n}\n\n.ace_gutter-active-line {\n    position: absolute;\n    left: 0;\n    right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n    content: "";\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n    pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    padding-left: 19px;\n    padding-right: 6px;\n    background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n    margin-left: -14px;\n    float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n    margin-left: -19px;\n    float: left;\n}\n\n.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 {\n    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==");\n    background-repeat: no-repeat;\n    background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n    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==");\n    background-repeat: no-repeat;\n    background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n    background-repeat: no-repeat;\n    background-position: 2px center;\n}\n\n.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 {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n    background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n    background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n    background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n    background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n    background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n    background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n    -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n    background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n    background-color: darkorange;\n}\n\n.ace_scrollbar {\n    contain: strict;\n    position: absolute;\n    right: 0;\n    bottom: 0;\n    z-index: 6;\n}\n\n.ace_scrollbar-inner {\n    position: absolute;\n    cursor: text;\n    left: 0;\n    top: 0;\n}\n\n.ace_scrollbar-v{\n    overflow-x: hidden;\n    overflow-y: scroll;\n    top: 0;\n}\n\n.ace_scrollbar-h {\n    overflow-x: scroll;\n    overflow-y: hidden;\n    left: 0;\n}\n\n.ace_print-margin {\n    position: absolute;\n    height: 100%;\n}\n\n.ace_text-input {\n    position: absolute;\n    z-index: 0;\n    width: 0.5em;\n    height: 1em;\n    opacity: 0;\n    background: transparent;\n    -moz-appearance: none;\n    appearance: none;\n    border: none;\n    resize: none;\n    outline: none;\n    overflow: hidden;\n    font: inherit;\n    padding: 0 1px;\n    margin: 0 -1px;\n    contain: strict;\n    -ms-user-select: text;\n    -moz-user-select: text;\n    -webkit-user-select: text;\n    user-select: text;\n    /*with `pre-line` chrome inserts &nbsp; instead of space*/\n    white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n    background: transparent;\n    color: inherit;\n    z-index: 1000;\n    opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n    border-bottom: 1px solid;\n    position: absolute;\n    border-radius: 0;\n    margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n    transform: none!important;\n    filter: none!important;\n    clip-path: none!important;\n    mask : none!important;\n    contain: none!important;\n    perspective: none!important;\n    mix-blend-mode: initial!important;\n    z-index: auto;\n}\n\n.ace_layer {\n    z-index: 1;\n    position: absolute;\n    overflow: hidden;\n    /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n    word-wrap: normal;\n    white-space: pre;\n    height: 100%;\n    width: 100%;\n    box-sizing: border-box;\n    /* setting pointer-events: auto; on node under the mouse, which changes\n        during scroll, will break mouse wheel scrolling in Safari */\n    pointer-events: none;\n}\n\n.ace_gutter-layer {\n    position: relative;\n    width: auto;\n    text-align: right;\n    pointer-events: auto;\n    height: 1000000px;\n    contain: style size layout;\n}\n\n.ace_text-layer {\n    font: inherit !important;\n    position: absolute;\n    height: 1000000px;\n    width: 1000000px;\n    contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n    contain: style size layout;\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n    contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n    contain: strict;\n}\n\n.ace_cjk {\n    display: inline-block;\n    text-align: center;\n}\n\n.ace_cursor-layer {\n    z-index: 4;\n}\n\n.ace_cursor {\n    z-index: 4;\n    position: absolute;\n    box-sizing: border-box;\n    border-left: 2px solid;\n    /* workaround for smooth cursor repaintng whole screen in chrome */\n    transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n    border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n    border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n    border-left-width: 0;\n    border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n    opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n    opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n    transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n    animation-duration: 1000ms;\n    animation-timing-function: step-end;\n    animation-name: blink-ace-animate;\n    animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n    animation-duration: 1000ms;\n    animation-timing-function: ease-in-out;\n    animation-name: blink-ace-animate-smooth;\n}\n    \n@keyframes blink-ace-animate {\n    from, to { opacity: 1; }\n    60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n    from, to { opacity: 1; }\n    45% { opacity: 1; }\n    60% { opacity: 0; }\n    85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n    position: absolute;\n    z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n    position: absolute;\n    z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n    position: absolute;\n    z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n    position: absolute;\n    border-bottom: 1px solid #DE5555;\n    border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n    position: absolute;\n    z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n    position: absolute;\n    z-index: 4;\n    box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n    box-sizing: border-box;\n\n    display: inline-block;\n    height: 11px;\n    margin-top: -2px;\n    vertical-align: middle;\n\n    background-image:\n        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n    background-repeat: no-repeat, repeat-x;\n    background-position: center center, top left;\n    color: transparent;\n\n    border: 1px solid black;\n    border-radius: 2px;\n\n    cursor: pointer;\n    pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n    background-image:\n        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n    background-color: #f5f5f5;\n    border: 1px solid gray;\n    border-radius: 1px;\n    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n    color: black;\n    padding: 3px 4px;\n    position: fixed;\n    z-index: 999999;\n    box-sizing: border-box;\n    cursor: default;\n    white-space: pre-wrap;\n    word-wrap: break-word;\n    line-height: normal;\n    font-style: normal;\n    font-weight: normal;\n    letter-spacing: normal;\n    pointer-events: none;\n    overflow: auto;\n    max-width: min(33em, 66vw);\n    overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n    white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n    background-color: #636363;\n    color: #fff;\n}\n\n.ace_tooltip:focus {\n    outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n    display: inline-block;\n    width: 18px;\n    vertical-align: top;\n}\n\n.ace_icon_svg {\n    display: inline-block;\n    width: 12px;\n    vertical-align: top;\n    -webkit-mask-repeat: no-repeat;\n    -webkit-mask-size: 12px;\n    -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n    padding-right: 13px;\n}\n\n.ace_fold-widget, .ace_custom-widget {\n    box-sizing: border-box;\n\n    margin: 0 -12px 0 1px;\n    display: none;\n    width: 11px;\n    vertical-align: top;\n\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n    background-repeat: no-repeat;\n    background-position: center;\n\n    border-radius: 3px;\n    \n    border: 1px solid transparent;\n    cursor: pointer;\n    pointer-events: auto;\n}\n\n.ace_custom-widget {\n    background: none;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n    display: inline-block;   \n}\n\n.ace_fold-widget.ace_end {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n    border: 1px solid rgba(0, 0, 0, 0.3);\n    background-color: rgba(255, 255, 255, 0.2);\n    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n    border: 1px solid rgba(0, 0, 0, 0.4);\n    background-color: rgba(0, 0, 0, 0.05);\n    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n    background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n    border: 1px solid lightgray;\n    display: inline-block;\n    margin: -1px 8px;\n    padding: 0 5px;\n    pointer-events: auto;\n    cursor: pointer;\n}\n.ace_inline_button:hover {\n    border-color: gray;\n    background: rgba(200,200,200,0.2);\n    display: inline-block;\n    pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n    background-color: #FFB4B4;\n    border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n    transition: opacity 0.4s ease 0.05s;\n    opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n    transition: opacity 0.05s ease 0.05s;\n    opacity:1;\n}\n\n.ace_underline {\n    text-decoration: underline;\n}\n\n.ace_bold {\n    font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n    font-weight: normal;\n}\n\n.ace_italic {\n    font-style: italic;\n}\n\n\n.ace_error-marker {\n    background-color: rgba(255, 0, 0,0.2);\n    position: absolute;\n    z-index: 9;\n}\n\n.ace_highlight-marker {\n    background-color: rgba(255, 255, 0,0.2);\n    position: absolute;\n    z-index: 8;\n}\n\n.ace_mobile-menu {\n    position: absolute;\n    line-height: 1.5;\n    border-radius: 4px;\n    -ms-user-select: none;\n    -moz-user-select: none;\n    -webkit-user-select: none;\n    user-select: none;\n    background: white;\n    box-shadow: 1px 3px 2px grey;\n    border: 1px solid #dcdcdc;\n    color: black;\n}\n.ace_dark > .ace_mobile-menu {\n    background: #333;\n    color: #ccc;\n    box-shadow: 1px 3px 2px grey;\n    border: 1px solid #444;\n\n}\n.ace_mobile-button {\n    padding: 2px;\n    cursor: pointer;\n    overflow: hidden;\n}\n.ace_mobile-button:hover {\n    background-color: #eee;\n    opacity:1;\n}\n.ace_mobile-button:active {\n    background-color: #ddd;\n}\n\n.ace_placeholder {\n    position: relative;\n    font-family: arial;\n    transform: scale(0.9);\n    transform-origin: left;\n    white-space: pre;\n    opacity: 0.7;\n    margin: 0 10px;\n    z-index: 1;\n}\n\n.ace_ghost_text {\n    opacity: 0.5;\n    font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n    white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n    content: "↩";\n    position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n    margin: 0px 4px\n}\n\n.ace_screenreader-only {\n    position:absolute;\n    left:-10000px;\n    top:auto;\n    width:1px;\n    height:1px;\n    overflow:hidden;\n}\n\n.ace_hidden_token {\n    display: none;\n}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var o=e("../lib/dom"),r=e("../lib/oop"),i=e("../lib/event_emitter").EventEmitter,s=function(){function e(e,t){this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(e)}return e.prototype.$createCanvas=function(){this.canvas=o.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},e.prototype.setScrollBarV=function(e){this.$createCanvas(),this.scrollbarV=e,e.element.appendChild(this.canvas),this.setDimensions()},e.prototype.$updateDecorators=function(e){if("function"==typeof this.canvas.getContext){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;this.setDimensions(e);var n=this.canvas.getContext("2d"),o=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),o){var r={info:1,warning:2,error:3};o.forEach(function(e){e.priority=r[e.type]||null}),o=o.sort(function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0});for(var i=0;i<o.length;i++){var s=o[i].row,a=this.getVerticalOffsetForRow(s),l=a+this.lineHeight,c=Math.round(this.heightRatio*a),u=Math.round(this.heightRatio*l),p=Math.round((c+u)/2),h=u-p;h<this.halfMinDecorationHeight&&(h=this.halfMinDecorationHeight),p-h<0&&(p=h),p+h>this.canvasHeight&&(p=this.canvasHeight-h);var d=p-h,f=p+h-d;n.fillStyle=t[o[i].type]||null,n.fillRect(0,d,Math.round(this.oneZoneWidth-1),f)}}var g=this.renderer.session.selection.getCursor();if(g){var m=Math.round(this.getVerticalOffsetForRow(g.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,m,this.canvasWidth,2)}}},e.prototype.getVerticalOffsetForRow=function(e){return e|=0,this.renderer.session.documentToScreenRow(e,0)*this.lineHeight},e.prototype.setDimensions=function(e){e=e||this.renderer.layerConfig,this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},e.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},e.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},e}();r.implement(s.prototype,i),t.Decorator=s}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,t,n){"use strict";var o=e("./lib/oop"),r=e("./lib/dom"),i=e("./lib/lang"),s=e("./config"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,u=e("./layer/cursor").Cursor,p=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,d=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,g=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,y=e("./css/editor-css"),b=e("./layer/decorators").Decorator,w=e("./lib/useragent"),x=e("./layer/text_util").isTextToken;r.importCssString(y,"ace_editor.css",!1);var S=function(){function e(e,t){var n=this;this.container=e||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==s.get("useStrictCSP")&&s.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var o=this.$textLayer=new c(this.content);this.canvas=o.element,this.$markerFront=new l(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,o){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;o||(o=r.clientHeight||r.scrollHeight),!o&&this.$maxLines&&this.lineHeight>1&&(r.style.height&&"0px"!=r.style.height||(r.style.height="1px",o=r.clientHeight||r.scrollHeight)),n||(n=r.clientWidth||r.scrollWidth);var i=this.$updateCachedSize(e,t,n,o);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!o)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(i|this.$changes,!0):this.$loop.schedule(i|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,o){o-=this.$extraHeight||0;var i=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(o&&(e||s.height!=o)&&(s.height=o,i|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){i|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)}return s.$dirty=!n||!o,i&&this._signal("resize",a),i},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var o=this.layerConfig,i=n.top,s=n.left;i-=o.offset;var a=t&&t.useTextareaForIME||w.isMobile?this.lineHeight:1;if(i<0||i>o.height-a)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else i+=this.lineHeight+2;else i+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",a+"px"),r.setStyle(e,"width",l+"px"),r.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(i,c))}}}else r.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,o){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|o,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,o){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|o,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var o=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;o>0&&(this.scrollTop=o,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var i=n.width+2*this.$padding+"px",s=n.minHeight+"px";r.setStyle(this.content.style,"width",i),r.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var o=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||o!=this.$vScroll){o!=this.$vScroll&&(this.$vScroll=o,this.scrollBarV.setVisible(o));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,o=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),i=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==i;s&&(this.$horizScroll=i,this.scrollBarH.setVisible(i));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;o+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,o-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+u.right)));var p=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-o+c<0||this.scrollTop>u.top),h=a!==p;h&&(this.$vScroll=p,this.scrollBarV.setVisible(p));var d,f,g=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-g)/this.lineHeight)),y=v+m,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),d=e.documentToScreenRow(v,0),f=e.getRowLength(v)*b,y=Math.min(e.screenToDocumentRow(y,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(y)*b+f,(g=this.scrollTop-d*b)<0&&d>0&&(d=Math.max(0,d+Math.floor(g/b)),g=this.scrollTop-d*b);var x=0;return(this.layerConfig.width!=r||s)&&(x=this.CHANGE_H_SCROLL),(s||h)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),h&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:d,lastRow:y,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:o,offset:g,gutterOffset:b?Math.max(0,Math.ceil((g+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),x},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},e.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var o=this.$cursorLayer.getPixelPosition(e),r=o.left,i=o.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>i?(t&&l+s>i+this.lineHeight&&(i-=t*this.$size.scrollerHeight),0===i&&(i=-this.scrollMargin.top),this.session.setScrollTop(i)):l+this.$size.scrollerHeight-a<i+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<i-this.lineHeight&&(i+=t*this.$size.scrollerHeight),this.session.setScrollTop(i+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft,u=2*this.layerConfig.characterWidth;r-u<c?((r-=u)<this.$padding+u&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):(r+=u,c+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&r-c<this.characterWidth&&this.session.setScrollLeft(0))}},e.prototype.getScrollTop=function(){return this.session.getScrollTop()},e.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},e.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},e.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},e.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},e.prototype.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),o=this.$size.scrollerHeight-this.lineHeight,r=n.top-o*(t||0);return this.session.setScrollTop(r),r},e.prototype.$calcSteps=function(e,t){var n=0,o=this.STEPS,r=[],i=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<o;++n)r.push(i(n/this.STEPS,e,t-e));return r},e.prototype.scrollToLine=function(e,t,n,o){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(r-=this.$size.scrollerHeight/2);var i=this.scrollTop;this.session.setScrollTop(r),!1!==n&&this.animateScrolling(i,o)},e.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var o=this;if(e!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==n)return}var i=o.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:i},clearInterval(this.$timer),o.session.setScrollTop(i.shift()),o.session.$scrollTop=n,this.$timer=setInterval(function(){if(!o.$stopAnimation)return o.session?void(i.length?(o.session.setScrollTop(i.shift()),o.session.$scrollTop=n):null!=n?(o.session.$scrollTop=-1,o.session.setScrollTop(n),n=null):s()):clearInterval(o.$timer);s()},10)}}function s(){o.$timer=clearInterval(o.$timer),o.$scrollAnimation=null,o.$stopAnimation=!1,t&&t()}},e.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},e.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},e.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},e.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},e.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var o=this.$fontMetrics.transformCoordinates([e,t]);e=o[1]-this.gutterWidth-this.margin.left,t=o[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,i=r/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(i):Math.round(i);return{row:s,column:a,side:i-a>0?1:-1,offsetX:r}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var o=this.$fontMetrics.transformCoordinates([e,t]);e=o[1]-this.gutterWidth-this.margin.left,t=o[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,i=r/this.characterWidth,s=this.$blockCursor?Math.floor(i):Math.round(i),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),o=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,e)?this.session.$bidiHandler.getPosLeft(o.column):Math.round(o.column*this.characterWidth)),i=o.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+i-this.scrollTop}},e.prototype.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,o=t||{row:n.row,column:n.column};this.removeGhostText();var i=this.$calculateWrappedTextChunks(e,o);this.addToken(i[0].text,"ghost_text",o.row,o.column),this.$ghostText={text:e,position:{row:o.row,column:o.column}};var s=r.createElement("div");if(i.length>1){var a,l=this.hideTokensAfterPosition(o.row,o.column);i.slice(1).forEach(function(e){var t=r.createElement("div"),n=r.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),n.appendChild(r.createTextNode(e.text)),t.appendChild(n),s.appendChild(t),a=t}),l.forEach(function(e){var t=r.createElement("span");x(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(r.createTextNode(e.value)),a.appendChild(t)}),this.$ghostTextWidget={el:s,row:o.row,column:o.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(o,!0),u=this.container.getBoundingClientRect().height,p=i.length*this.lineHeight;if(p<u-c.top)return;p<u?this.scrollBy(0,(i.length-1)*this.lineHeight):this.scrollToRow(o.row)}},e.prototype.$calculateWrappedTextChunks=function(e,t){var n=this.$size.scrollerWidth-2*this.$padding,o=Math.floor(n/this.characterWidth)-2;o=o<=0?60:o;for(var r=e.split(/\r?\n/),i=[],s=0;s<r.length;s++){var a=this.session.$getDisplayTokens(r[s],t.column),l=this.session.$computeWrapSplits(a,o,this.session.$tabSize);if(l.length>0){var c=0;l.push(r[s].length);for(var u=0;u<l.length;u++){var p=r[s].slice(c,l[u]);i.push({text:p,wrapped:!0}),c=l[u]}}else i.push({text:r[s],wrapped:!1})}return i},e.prototype.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},e.prototype.addToken=function(e,t,n,o){var r=this.session;r.bgTokenizer.lines[n]=null;var i={type:t,value:e},s=r.getTokens(n);if(null!=o&&s.length)for(var a=0,l=0;l<s.length;l++){var c=s[l];if(o<=(a+=c.value.length)){var u=c.value.length-(a-o),p=c.value.slice(0,u),h=c.value.slice(u);s.splice(l,1,{type:c.type,value:p},i,{type:c.type,value:h});break}}else s.push(i);this.updateLines(n,n)},e.prototype.hideTokensAfterPosition=function(e,t){for(var n=this.session.getTokens(e),o=0,r=!1,i=[],s=0;s<n.length;s++){var a=n[s];o+=a.value.length,"ghost_text"!==a.type&&(r?(i.push({type:a.type,value:a.value}),a.type="hidden_token"):o===t&&(r=!0))}return this.updateLines(e,e),i},e.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},e.prototype.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)i(e);else{var o=e||this.$options.theme.initialValue;s.loadModule(["theme",o],i)}function i(o){if(n.$themeId!=e)return t&&t();if(!o||!o.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");o.$id&&(n.$themeId=o.$id),r.importCssString(o.cssText,o.cssClass,n.container),n.theme&&r.removeCssClass(n.container,n.theme.cssClass);var i="padding"in o?o.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&i!=n.$padding&&n.setPadding(i),n.$theme=o.cssClass,n.theme=o,r.addCssClass(n.container,o.cssClass),r.setCssClass(n.container,"ace_dark",o.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:o}),t&&t(),w.isSafari&&n.scroller&&(n.scroller.style.background="red",n.scroller.style.background="")}},e.prototype.getTheme=function(){return this.$themeId},e.prototype.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},e.prototype.unsetStyle=function(e){r.removeCssClass(this.container,e)},e.prototype.setCursorStyle=function(e){r.setStyle(this.scroller.style,"cursor",e)},e.prototype.setMouseCursor=function(e){r.setStyle(this.scroller.style,"cursor",e)},e.prototype.attachToShadowRoot=function(){r.importCssString(y,"ace_editor.css",this.container)},e.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},e.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),!0===e?(this.scrollBarV=new f(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new b(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new h(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}))},e.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var e=this;this.$resizeTimer=i.delayedCall(function(){e.destroyed||e.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(t){var n=t[0].contentRect.width,o=t[0].contentRect.height;Math.abs(e.$size.width-n)>1||Math.abs(e.$size.height-o)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},e}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,o.implement(S.prototype,v),s.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&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(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),t.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/net"),i=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+r.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,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(){o.implement(this,i),this.$createWorkerFromOldConfig=function(t,n,o,r,i){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)r=r||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;r=r||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach(function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(r),i&&this.send("importScripts",i),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:o}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var o=this.callbackId++;this.callbacks[o]=n,t.push(o)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var o=null,r=!1,a=Object.create(i),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),o&&(r?setTimeout(p):p())}});u.setEmitSync=function(e){r=e};var p=function(){var e=c.shift();e.command?o[e.command].apply(o,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){u.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],function(e){for(o=new e[n](a);c.length;)p()}),u},t.WorkerClient=l,t.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var o=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),s=function(){function e(e,t,n,o,r,i){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=o,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new o(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var o=t.createAnchor(n.row,n.column);o.$insertRight=!0,o.detach(),e.others.push(o)}),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new o(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},e.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,i=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+i};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+i},this.doc.remove(new o(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new o(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.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},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},e}();i.implement(s.prototype,r),t.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var o=e("../lib/event"),r=e("../lib/useragent");function i(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&r.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,p=e.editor,h=p.selection,d=p.inMultiSelectMode,f=e.getDocumentPosition(),g=h.getCursor(),m=e.inSelection()||h.isEmpty()&&i(f,g),v=e.x,y=e.y,b=p.session,w=p.renderer.pixelToScreenCoordinates(v,y),x=w;if(p.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&p.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!d&&s)return}else n&&p.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&t.ctrlKey&&p.$mouseHandler.cancelContextMenu(),"add"==u){if(!d&&m)return;if(!d){var S=h.toOrientedRange();p.addSelectionMarker(S)}var C=h.rangeList.rangeAtPoint(f);p.inVirtualSelectionMode=!0,s&&(C=null,S=h.ranges[0]||S,p.removeSelectionMarker(S)),p.once("mouseup",function(){var e=h.toOrientedRange();C&&e.isEmpty()&&i(C.cursor,e.cursor)?h.substractPoint(e.cursor):(s?h.substractPoint(S.cursor):S&&(p.removeSelectionMarker(S),h.addRange(S)),h.addRange(e)),p.inVirtualSelectionMode=!1})}else if("block"==u){var _;e.stop(),p.inVirtualSelectionMode=!0;var k=[],$=function(){var e=p.renderer.pixelToScreenCoordinates(v,y),t=b.screenToDocumentPosition(e.row,e.column,e.offsetX);i(x,e)&&i(t,h.lead)||(x=e,p.selection.moveToPosition(t),p.renderer.scrollCursorIntoView(),p.removeSelectionMarkers(k),k=h.rectangularRangeBlock(x,w),p.$mouseHandler.$clickSelection&&1==k.length&&k[0].isEmpty()&&(k[0]=p.$mouseHandler.$clickSelection.clone()),k.forEach(p.addSelectionMarker,p),p.updateSelectionMarkers())};d&&!l?h.toSingleRange():!d&&l&&(_=h.toOrientedRange(),p.addSelectionMarker(_)),s?w=b.documentToScreenPosition(h.lead):h.moveToPosition(f),x={row:-1,column:-1};var E=$;o.capture(p.container,function(e){v=e.clientX,y=e.clientY},function(e){$(),clearInterval(O),p.removeSelectionMarkers(k),k.length||(k=[h.toOrientedRange()]),_&&(p.removeSelectionMarker(_),h.toSingleRange(_));for(var t=0;t<k.length;t++)h.addRange(k[t]);p.inVirtualSelectionMode=!1,p.$mouseHandler.$clickSelection=null});var O=setInterval(function(){E()},20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var o=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new o(t.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,t,n){var o=e("./range_list").RangeList,r=e("./range").Range,i=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,e("./search").Search),p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var o=this.rangeList.add(e);return this.$onAddRange(e),o.length&&this.$onRemoveRange(o),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var o=this.ranges.indexOf(e[n]);this.ranges.splice(o,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var o=e[n],i=o.start.row,s=o.end.row;if(i===s)t.push(o.clone());else{for(t.push(new r(i,o.start.column,i,this.session.getLine(i).length));++i<s;)t.push(this.getLineRange(i,!0));t.push(new r(s,0,s,o.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}for(this.toSingleRange(),n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var o=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(o,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var o=[],i=e.column<t.column;if(i)var s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;else s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;var u,p=e.row<t.row;if(p)var h=e.row,f=t.row;else h=t.row,f=e.row;s<0&&(s=0),h<0&&(h=0),h==f&&(n=!0);for(var g=h;g<=f;g++){var m=r.fromPoints(this.session.screenToDocumentPosition(g,s,l),this.session.screenToDocumentPosition(g,a,c));if(m.isEmpty()){if(u&&d(m.end,u))break;u=m.end}m.cursor=i?m.start:m.end,o.push(m)}if(p&&o.reverse(),!n){for(var v=o.length-1;o[v].isEmpty()&&v>0;)v--;if(v>0)for(var y=0;o[y].isEmpty();)y++;for(var b=v;b>=y;b--)o[b].isEmpty()&&o.splice(b,1)}return o}}.call(i.prototype);var h=e("./editor").Editor;function d(e,t){return e.row==t.row&&e.column==t.column}function f(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;a.addListener(t,"keydown",function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&o()},e),a.addListener(t,"keyup",o,e),a.addListener(t,"blur",o,e)}function o(t){n&&(e.renderer.setMouseCursor(""),n=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var o=e[n];if(o.marker){this.session.removeMarker(o.marker);var r=t.indexOf(o);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?o=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?o=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),o=t.exec(n,e.args||{})):o=t.multiSelectAction(n,e.args||{});else{var o=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return o}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var o,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(r?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var p=l._eventRegistry;l._eventRegistry={};var h=new i(a);this.inVirtualSelectionMode=!0;for(var d=u.length;d--;){if(s)for(;d>0&&u[d].start.row==u[d-1].end.row;)d--;h.fromOrientedRange(u[d]),h.index=d,this.selection=a.selection=h;var f=e.exec?e.exec(this,t||{}):e(this,t||{});o||void 0===f||(o=f),h.toOrientedRange(u[d])}h.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=p,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),o}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],o=0;o<t.length;o++)n.push(this.session.getTextRange(t[o]));var r=this.session.getDocument().getNewLineCharacter();(e=n.join(r)).length==(n.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var o=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;o.row!=t.row||this.session.$clipPositionToDocument(o.row,o.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,null==t.needle){var o=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(o)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;var i=this.multiSelect;n||i.toSingleRange(r[0]);for(var s=r.length;s--;)i.addRange(r[s],!0);return o&&i.rangeList.rangeAtPoint(o.start)&&i.addRange(o,!0),r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),o=n.cursor==n.end,i=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(i.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(i.row+e,i.column);if(n.isEmpty())c=a;else var l=this.session.documentToScreenPosition(o?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);if(o?(s=r.fromPoints(a,c)).cursor=s.start:(s=r.fromPoints(c,a)).cursor=s.end,s.desiredColumn=i.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(s),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,o=n.ranges,r=o.length;r--;)if((a=o[r]).isEmpty()){var i=t.getWordRange(a.start.row,a.start.column);a.start.row=i.start.row,a.start.column=i.start.column,a.end.row=i.end.row,a.end.column=i.end.column}n.mergeOverlappingRanges();var s=[];for(r=o.length;r--;){var a=o[r];s.unshift(t.getTextRange(a))}for(e<0?s.unshift(s.pop()):s.push(s.shift()),r=o.length;r--;){var l=(a=o[r]).clone();t.replace(a,s[r]),a.start.row=l.start.row,a.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var o=this.session,r=o.multiSelect.toOrientedRange();if(!r.isEmpty()||((r=o.getWordRange(r.start.row,r.start.column)).cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!n)){var i=o.getTextRange(r),s=function(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}(o,i,e);s&&(s.cursor=-1==e?s.start:s.end,this.session.unfold(s),this.multiSelect.addRange(s),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,o=-1,i=n.filter(function(e){if(e.cursor.row==o)return!0;o=e.cursor.row});if(n.length&&i.length!=n.length-1){i.forEach(function(e){t.substractPoint(e.cursor)});var s=0,a=1/0,c=n.map(function(t){var n=t.cursor,o=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==o&&(o=0),n.column>s&&(s=n.column),o<a&&(a=o),o});n.forEach(function(t,n){var o=t.cursor,i=s-o.column,u=c[n]-a;i>u?e.insert(o,l.stringRepeat(" ",i-u)):e.remove(new r(o.row,o.column,o.row,o.column-i+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=o.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),p=u.start.row,h=u.end.row,d=p==h;if(d){var f,g=this.session.getLength();do{f=this.session.getLine(h)}while(/[=:]/.test(f)&&++h<g);do{f=this.session.getLine(p)}while(/[=:]/.test(f)&&--p>0);p<0&&(p=0),h>=g&&(h=g-1)}var m=this.session.removeFullLines(p,h);m=this.$reAlignText(m,d),this.session.insert({row:p,column:0},m.join("\n")+"\n"),d||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,o,r,i=!0,s=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,o=t[2].length,r=t[3].length,t):(n+o+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(i=!1),n>t[1].length&&(n=t[1].length),o<t[2].length&&(o=t[2].length),r>t[3].length&&(r=t[3].length),t):[e]}).map(t?c:i?s?function(e){return e[2]?a(n+o-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(o-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(h.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=f,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){f(this),e?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);return this.foldingStartMarker.test(o)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,i=e.getLine(t),s=i.search(r);if(-1!=s){for(var a=n||i.length,l=e.getLength(),c=t,u=t;++t<l;){var p=e.getLine(t).search(r);if(-1!=p){if(p<=s){var h=e.getTokenAt(t,0);if(!h||"string"!==h.type)break}u=t}}if(u>c){var d=e.getLine(u).length;return new o(c,a,u,d)}}},this.openingBracketBlock=function(e,t,n,r,i){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,i);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),o.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,i){var s={row:n,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,o.fromPoints(a,s)}}).call(r.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,t,n){"use strict";var o=e("../lib/dom"),r=e("../range").Range,i=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():a-=t;var c,u=function(e,t,n){var o=e.getAnnotations().sort(r.comparePoints);if(o.length){var i=function(e,t,n){for(var o=0,r=e.length-1;o<=r;){var i=o+r>>1,s=n(t,e[i]);if(s>0)o=i+1;else{if(!(s<0))return i;r=i-1}}return-(o+1)}(o,{row:t,column:-1},r.comparePoints);i<0&&(i=-i-1),i>=o.length?i=n>0?0:o.length-1:0===i&&n<0&&(i=o.length-1);var s=o[i];if(s&&n){if(s.row===t){do{s=o[i+=n]}while(s&&s.row===t);if(!s)return o.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=o[i+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var p=u[0];s.column=(p.pos&&"number"!=typeof p.column?p.pos.sc:p.column)||0,s.row=p.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={displayText:[i("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},d=h.el.appendChild(o.createElement("div")),f=h.el.appendChild(o.createElement("div"));f.className="error_widget_arrow "+c.className;var g=e.renderer.$cursorLayer.getPixelPosition(s).left;f.style.left=g+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",d.className="error_widget "+c.className,c.displayText.forEach(function(e,t){d.appendChild(o.createTextNode(e)),t<c.displayText.length-1&&d.appendChild(o.createElement("br"))}),d.appendChild(o.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},o.importCssString("\n    .error_widget_wrapper {\n        background: inherit;\n        color: inherit;\n        border:none\n    }\n    .error_widget {\n        border-top: solid 2px;\n        border-bottom: solid 2px;\n        margin: 5px 0;\n        padding: 10px 40px;\n        white-space: pre-wrap;\n    }\n    .error_widget.ace_error, .error_widget_arrow.ace_error{\n        border-color: #ff5a5a\n    }\n    .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n        border-color: #F1D817\n    }\n    .error_widget.ace_info, .error_widget_arrow.ace_info{\n        border-color: #5a5a5a\n    }\n    .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n        border-color: #5aaa5a\n    }\n    .error_widget_arrow {\n        position: absolute;\n        border: solid 5px;\n        border-top-color: transparent!important;\n        border-right-color: transparent!important;\n        border-left-color: transparent!important;\n        top: -5px;\n    }\n","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,t,n){"use strict";e("./loader_build")(t);var o=e("./lib/dom"),r=e("./range").Range,i=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=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"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof i)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;s=a.value,e=o.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(s=e.textContent,e.innerHTML="");var c=t.createEditSession(s),u=new i(new l(e),c,n),p={document:c,editor:u,onResize:u.resize.bind(u,null)};return a&&(p.textarea=a),u.on("destroy",function(){p.editor.container.env=null}),u.container.env=u.env=p,u},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new a),n},t.Range=r,t.Editor=i,t.EditSession=s,t.UndoManager=a,t.VirtualRenderer=l;var c=t.config.version;t.version=c}),ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var o in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(o)&&(n.ace[o]=t[o]);n.ace.default=n.ace,e&&(e.exports=n.ace)})},1609:e=>{"use strict";e.exports=window.React},1766:(e,t,n)=>{e=n.nmd(e),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=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|$)"},i.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=i}),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,t,n){"use strict";var o=e("../lib/oop"),r=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(e){var t={"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"},n=this.createKeywordMapper(t,"identifier"),o="\\\\(?: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]?|.)",i="(function)(\\s*)(\\*?)",a={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[r.getStartRule("doc-start"),c("no_regex"),a,{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:"("+s+")(\\s*)(=)(\\s*)"+i+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+i+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+i+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\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:n,regex:s},{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:i+"(\\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:s},{regex:"",token:"empty",next:"no_regex"}],start:[r.getStartRule("doc-start"),c("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:[c("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:o},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:o},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:o},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\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"}),e&&0==e.jsx||l.call(this)),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var o="/"==e.charAt(1)?2:1;return 1==o?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==o&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==o?"":"end-")+"tag-open.xml",value:e.slice(0,o)},{type:"meta.tag.tag-name.xml",value:e.substr(o)}]},regex:"</?(?:"+e+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[r.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}o.inherits(a,i),t.JavaScriptHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var r=n[1].length,i=e.findMatchingBracket({row:t,column:r});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator;function s(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var a=function(){this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){var a=r,l=o.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:a+l+a,selection:!1};var c=n.getCursorPosition(),u=o.doc.getLine(c.row).substring(c.column,c.column+1),p=new i(o,c.row,c.column),h=p.getCurrentToken();if(u==a&&(s(h,"attribute-value")||s(h,"string")))return{text:"",selection:[1,1]};if(h||(h=p.stepBackward()),!h)return;for(;s(h,"tag-whitespace")||s(h,"whitespace");)h=p.stepBackward();var d=!u||u.match(/\s/);if(s(h,"attribute-equals")&&(d||">"==u)||s(h,"decl-attribute-equals")&&(d||"?"==u))return{text:a+a,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)&&o.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==i)return r.end.column++,r}),this.add("autoclosing","insertion",function(e,t,n,o,r){if(">"==r){var a=n.getSelectionRange().start,l=new i(o,a.row,a.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(s(c,"tag-name")||s(c,"tag-whitespace")||s(c,"attribute-name")||s(c,"attribute-equals")||s(c,"attribute-value")))return;if(s(c,"reference.attribute-value"))return;if(s(c,"attribute-value")){var u=l.getCurrentTokenColumn()+c.value.length;if(a.column<u)return;if(a.column==u){var p=l.stepForward();if(p&&s(p,"attribute-value"))return;l.stepBackward()}}if(/^\s*>/.test(o.getLine(a.row).slice(a.column)))return;for(;!s(c,"tag-name");)if("<"==(c=l.stepBackward()).value){c=l.stepForward();break}var h=l.getCurrentTokenRow(),d=l.getCurrentTokenColumn();if(s(l.stepBackward(),"end-tag-open"))return;var f=c.value;if(h==a.row&&(f=f.substring(0,a.column-d)),this.voidElements&&this.voidElements.hasOwnProperty(f.toLowerCase()))return;return{text:"></"+f+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var a=n.getCursorPosition(),l=o.getLine(a.row),c=new i(o,a.row,a.column),u=c.getCurrentToken();if(s(u,"")&&-1!==u.type.indexOf("tag-close")){if("/>"==u.value)return;for(;u&&-1===u.type.indexOf("tag-name");)u=c.stepBackward();if(!u)return;var p=u.value,h=c.getCurrentTokenRow();if(!(u=c.stepBackward())||-1!==u.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[p]||!this.voidElements){var d=o.getTokenAt(a.row,a.column+1),f=(l=o.getLine(h),this.$getIndent(l)),g=f+o.getTabString();return d&&"</"===d.value?{text:"\n"+g+"\n"+f,selection:[1,g.length,1,g.length]}:{text:"\n"+g}}}}})};o.inherits(a,r),t.XmlBehaviour=a}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../token_iterator").TokenIterator,i=e("../behaviour/cstyle").CstyleBehaviour,s=e("../behaviour/xml").XmlBehaviour,a=function(){var e=new s({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(e),this.inherit(i),this.add("autoclosing-fragment","insertion",function(e,t,n,o,i){if(">"==i){var s=n.getSelectionRange().start,a=new r(o,s.row,s.column),l=a.getCurrentToken()||a.stepBackward();if(!l)return;if("<"==l.value)return{text:"></>",selection:[1,1]}}})};o.inherits(a,i),t.JavaScriptBehaviour=a}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=o.mixin({},this.voidElements),t&&o.mixin(this.optionalEndTags,t)};o.inherits(s,i);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function l(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"===t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/<!-/.test(e.getLine(t))?"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),o=new a,r=0;r<n.length;r++){var i=n[r];if(l(i,"tag-open")){if(o.end.column=o.start.column+i.value.length,o.closing=l(i,"end-tag-open"),!(i=n[++r]))return null;if(o.tagName=i.value,""===i.value){if(!(i=n[++r]))return null;o.tagName=i.value}for(o.end.column+=i.value.length,r++;r<n.length;r++)if(i=n[r],o.end.column+=i.value.length,l(i,"tag-close")){o.selfClosing="/>"==i.value;break}return o}if(l(i,"tag-close"))return o.selfClosing="/>"==i.value,o;o.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,o){for(var r=e.getTokens(t),i=0,s=0;s<r.length;s++){var a=r[s];if(!((i+=a.value.length)<o-1)&&l(a,"end-tag-open")&&(l(a=r[s+1],"tag-name")&&""===a.value&&(a=r[s+2]),a&&a.value==n))return!0}return!1},this.getFoldWidgetRange=function(e,t,n){if(!this._getFirstTagInLine(e,n))return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var o=e.getMatchingTags({row:n,column:0});return o?new r(o.openTag.end.row,o.openTag.end.column,o.closeTag.start.row,o.closeTag.start.column):void 0}}).call(s.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(s,i),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(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r,i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);if(r=i.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(o?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}return"markbegin"!==t&&(r=i.match(this.foldingStopMarker))?(s=r.index+r[0].length,r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)):void 0},this.getSectionRange=function(e,t){for(var n=e.getLine(t),o=n.search(/\S/),i=t,s=n.length,a=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(o>c)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(o==c)break}a=t}}return new r(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<i;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>s)return new r(s,o,n,t.length)}}.call(s.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./xml").FoldMode,i=e("./cstyle").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new r};o.inherits(s,i),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){return this.getFoldWidgetBase(e,t,n)||this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,o){return this.getFoldWidgetRangeBase(e,t,n,o)||this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(s.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,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./behaviour/javascript").JavaScriptBehaviour,c=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new l,this.foldingRules=new c};o.inherits(u,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,s=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e)t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/)&&(o+=n);else if("doc-start"==e&&("start"==s||"no_regex"==s))return"";return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(u.prototype),t.Mode=u}),ace.require(["ace/mode/javascript"],function(t){e&&(e.exports=t)})},2189:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,o,r){void 0===r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=r;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===o&&(o=!0);var s=o,a=this.diff_commonPrefix(e,n),l=e.substring(0,a);e=e.substring(a),n=n.substring(a),a=this.diff_commonSuffix(e,n);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),n=n.substring(0,n.length-a);var u=this.diff_compute_(e,n,s,i);return l&&u.unshift(new t.Diff(0,l)),c&&u.push(new t.Diff(0,c)),this.diff_cleanupMerge(u),u},t.prototype.diff_compute_=function(e,o,r,i){var s;if(!e)return[new t.Diff(1,o)];if(!o)return[new t.Diff(n,e)];var a=e.length>o.length?e:o,l=e.length>o.length?o:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>o.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,o)];var u=this.diff_halfMatch_(e,o);if(u){var p=u[0],h=u[1],d=u[2],f=u[3],g=u[4],m=this.diff_main(p,d,r,i),v=this.diff_main(h,f,r,i);return m.concat([new t.Diff(0,g)],v)}return r&&e.length>100&&o.length>100?this.diff_lineMode_(e,o,i):this.diff_bisect_(e,o,i)},t.prototype.diff_lineMode_=function(e,o,r){var i=this.diff_linesToChars_(e,o);e=i.chars1,o=i.chars2;var s=i.lineArray,a=this.diff_main(e,o,!1,r);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,u=0,p="",h="";l<a.length;){switch(a[l][0]){case 1:u++,h+=a[l][1];break;case n:c++,p+=a[l][1];break;case 0:if(c>=1&&u>=1){a.splice(l-c-u,c+u),l=l-c-u;for(var d=this.diff_main(p,h,!1,r),f=d.length-1;f>=0;f--)a.splice(l,0,d[f]);l+=d.length}u=0,c=0,p="",h=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,o,r){for(var i=e.length,s=o.length,a=Math.ceil((i+s)/2),l=a,c=2*a,u=new Array(c),p=new Array(c),h=0;h<c;h++)u[h]=-1,p[h]=-1;u[l+1]=0,p[l+1]=0;for(var d=i-s,f=d%2!=0,g=0,m=0,v=0,y=0,b=0;b<a&&!((new Date).getTime()>r);b++){for(var w=-b+g;w<=b-m;w+=2){for(var x=l+w,S=(E=w==-b||w!=b&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1)-w;E<i&&S<s&&e.charAt(E)==o.charAt(S);)E++,S++;if(u[x]=E,E>i)m+=2;else if(S>s)g+=2;else if(f&&(k=l+d-w)>=0&&k<c&&-1!=p[k]&&E>=(_=i-p[k]))return this.diff_bisectSplit_(e,o,E,S,r)}for(var C=-b+v;C<=b-y;C+=2){for(var _,k=l+C,$=(_=C==-b||C!=b&&p[k-1]<p[k+1]?p[k+1]:p[k-1]+1)-C;_<i&&$<s&&e.charAt(i-_-1)==o.charAt(s-$-1);)_++,$++;if(p[k]=_,_>i)y+=2;else if($>s)v+=2;else if(!f){var E;if((x=l+d-C)>=0&&x<c&&-1!=u[x])if(S=l+(E=u[x])-x,E>=(_=i-_))return this.diff_bisectSplit_(e,o,E,S,r)}}}return[new t.Diff(n,e),new t.Diff(1,o)]},t.prototype.diff_bisectSplit_=function(e,t,n,o,r){var i=e.substring(0,n),s=t.substring(0,o),a=e.substring(n),l=t.substring(o),c=this.diff_main(i,s,!1,r),u=this.diff_main(a,l,!1,r);return c.concat(u)},t.prototype.diff_linesToChars_=function(e,t){var n=[],o={};function r(e){for(var t="",r=0,s=-1,a=n.length;s<e.length-1;){-1==(s=e.indexOf("\n",r))&&(s=e.length-1);var l=e.substring(r,s+1);(o.hasOwnProperty?o.hasOwnProperty(l):void 0!==o[l])?t+=String.fromCharCode(o[l]):(a==i&&(l=e.substring(r),s=e.length),t+=String.fromCharCode(a),o[l]=a,n[a++]=l),r=s+1}return t}n[0]="";var i=4e4,s=r(e);return i=65535,{chars1:s,chars2:r(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var o=e[n][1],r=[],i=0;i<o.length;i++)r[i]=t[o.charCodeAt(i)];e[n][1]=r.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(i,r)==t.substring(i,r)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(e.length-r,e.length-i)==t.substring(t.length-r,t.length-i)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,o=t.length;if(0==n||0==o)return 0;n>o?e=e.substring(n-o):n<o&&(t=t.substring(0,n));var r=Math.min(n,o);if(e==t)return r;for(var i=0,s=1;;){var a=e.substring(r-s),l=t.indexOf(a);if(-1==l)return i;s+=l,0!=l&&e.substring(r-s)!=t.substring(0,s)||(i=s,s++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,o=e.length>t.length?t:e;if(n.length<4||2*o.length<n.length)return null;var r=this;function i(e,t,n){for(var o,i,s,a,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,u="";-1!=(c=t.indexOf(l,c+1));){var p=r.diff_commonPrefix(e.substring(n),t.substring(c)),h=r.diff_commonSuffix(e.substring(0,n),t.substring(0,c));u.length<h+p&&(u=t.substring(c-h,c)+t.substring(c,c+p),o=e.substring(0,n-h),i=e.substring(n+p),s=t.substring(0,c-h),a=t.substring(c+p))}return 2*u.length>=e.length?[o,i,s,a,u]:null}var s,a,l,c,u,p=i(n,o,Math.ceil(n.length/4)),h=i(n,o,Math.ceil(n.length/2));return p||h?(s=h?p&&p[4].length>h[4].length?p:h:p,e.length>t.length?(a=s[0],l=s[1],c=s[2],u=s[3]):(c=s[0],u=s[1],a=s[2],l=s[3]),[a,l,c,u,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var o=!1,r=[],i=0,s=null,a=0,l=0,c=0,u=0,p=0;a<e.length;)0==e[a][0]?(r[i++]=a,l=u,c=p,u=0,p=0,s=e[a][1]):(1==e[a][0]?u+=e[a][1].length:p+=e[a][1].length,s&&s.length<=Math.max(l,c)&&s.length<=Math.max(u,p)&&(e.splice(r[i-1],0,new t.Diff(n,s)),e[r[i-1]+1][0]=1,i--,a=--i>0?r[i-1]:-1,l=0,c=0,u=0,p=0,s=null,o=!0)),a++;for(o&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a<e.length;){if(e[a-1][0]==n&&1==e[a][0]){var h=e[a-1][1],d=e[a][1],f=this.diff_commonOverlap_(h,d),g=this.diff_commonOverlap_(d,h);f>=g?(f>=h.length/2||f>=d.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,f))),e[a-1][1]=h.substring(0,h.length-f),e[a+1][1]=d.substring(f),a++):(g>=h.length/2||g>=d.length/2)&&(e.splice(a,0,new t.Diff(0,h.substring(0,g))),e[a-1][0]=1,e[a-1][1]=d.substring(0,d.length-g),e[a+1][0]=n,e[a+1][1]=h.substring(g),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var o=e.charAt(e.length-1),r=n.charAt(0),i=o.match(t.nonAlphaNumericRegex_),s=r.match(t.nonAlphaNumericRegex_),a=i&&o.match(t.whitespaceRegex_),l=s&&r.match(t.whitespaceRegex_),c=a&&o.match(t.linebreakRegex_),u=l&&r.match(t.linebreakRegex_),p=c&&e.match(t.blanklineEndRegex_),h=u&&n.match(t.blanklineStartRegex_);return p||h?5:c||u?4:i&&!a&&l?3:a||l?2:i||s?1:0}for(var o=1;o<e.length-1;){if(0==e[o-1][0]&&0==e[o+1][0]){var r=e[o-1][1],i=e[o][1],s=e[o+1][1],a=this.diff_commonSuffix(r,i);if(a){var l=i.substring(i.length-a);r=r.substring(0,r.length-a),i=l+i.substring(0,i.length-a),s=l+s}for(var c=r,u=i,p=s,h=n(r,i)+n(i,s);i.charAt(0)===s.charAt(0);){r+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var d=n(r,i)+n(i,s);d>=h&&(h=d,c=r,u=i,p=s)}e[o-1][1]!=c&&(c?e[o-1][1]=c:(e.splice(o-1,1),o--),e[o][1]=u,p?e[o+1][1]=p:(e.splice(o+1,1),o--))}o++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var o=!1,r=[],i=0,s=null,a=0,l=!1,c=!1,u=!1,p=!1;a<e.length;)0==e[a][0]?(e[a][1].length<this.Diff_EditCost&&(u||p)?(r[i++]=a,l=u,c=p,s=e[a][1]):(i=0,s=null),u=p=!1):(e[a][0]==n?p=!0:u=!0,s&&(l&&c&&u&&p||s.length<this.Diff_EditCost/2&&l+c+u+p==3)&&(e.splice(r[i-1],0,new t.Diff(n,s)),e[r[i-1]+1][0]=1,i--,s=null,l&&c?(u=p=!0,i=0):(a=--i>0?r[i-1]:-1,u=p=!1),o=!0)),a++;o&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var o,r=0,i=0,s=0,a="",l="";r<e.length;)switch(e[r][0]){case 1:s++,l+=e[r][1],r++;break;case n:i++,a+=e[r][1],r++;break;case 0:i+s>1?(0!==i&&0!==s&&(0!==(o=this.diff_commonPrefix(l,a))&&(r-i-s>0&&0==e[r-i-s-1][0]?e[r-i-s-1][1]+=l.substring(0,o):(e.splice(0,0,new t.Diff(0,l.substring(0,o))),r++),l=l.substring(o),a=a.substring(o)),0!==(o=this.diff_commonSuffix(l,a))&&(e[r][1]=l.substring(l.length-o)+e[r][1],l=l.substring(0,l.length-o),a=a.substring(0,a.length-o))),r-=i+s,e.splice(r,i+s),a.length&&(e.splice(r,0,new t.Diff(n,a)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,s=0,i=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;r<e.length-1;)0==e[r-1][0]&&0==e[r+1][0]&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),c=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),c=!0)),r++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var o,r=0,i=0,s=0,a=0;for(o=0;o<e.length&&(1!==e[o][0]&&(r+=e[o][1].length),e[o][0]!==n&&(i+=e[o][1].length),!(r>t));o++)s=r,a=i;return e.length!=o&&e[o][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],o=/&/g,r=/</g,i=/>/g,s=/\n/g,a=0;a<e.length;a++){var l=e[a][0],c=e[a][1].replace(o,"&amp;").replace(r,"&lt;").replace(i,"&gt;").replace(s,"&para;<br>");switch(l){case 1:t[a]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[a]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[a]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],o=0;o<e.length;o++)e[o][0]!==n&&(t[o]=e[o][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,o=0,r=0,i=0;i<e.length;i++){var s=e[i][0],a=e[i][1];switch(s){case 1:o+=a.length;break;case n:r+=a.length;break;case 0:t+=Math.max(o,r),o=0,r=0}}return t+Math.max(o,r)},t.prototype.diff_toDelta=function(e){for(var t=[],o=0;o<e.length;o++)switch(e[o][0]){case 1:t[o]="+"+encodeURI(e[o][1]);break;case n:t[o]="-"+e[o][1].length;break;case 0:t[o]="="+e[o][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,o){for(var r=[],i=0,s=0,a=o.split(/\t/g),l=0;l<a.length;l++){var c=a[l].substring(1);switch(a[l].charAt(0)){case"+":try{r[i++]=new t.Diff(1,decodeURI(c))}catch(e){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var u=parseInt(c,10);if(isNaN(u)||u<0)throw new Error("Invalid number in diff_fromDelta: "+c);var p=e.substring(s,s+=u);"="==a[l].charAt(0)?r[i++]=new t.Diff(0,p):r[i++]=new t.Diff(n,p);break;default:if(a[l])throw new Error("Invalid diff operation in diff_fromDelta: "+a[l])}}if(s!=e.length)throw new Error("Delta length ("+s+") does not equal source text length ("+e.length+").");return r},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(t),r=this;function i(e,o){var i=e/t.length,s=Math.abs(n-o);return r.Match_Distance?i+s/r.Match_Distance:s?1:i}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(i(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(i(0,a),s)));var l,c,u=1<<t.length-1;a=-1;for(var p,h=t.length+e.length,d=0;d<t.length;d++){for(l=0,c=h;l<c;)i(d,n+c)<=s?l=c:h=c,c=Math.floor((h-l)/2+l);h=c;var f=Math.max(1,n-c+1),g=Math.min(n+c,e.length)+t.length,m=Array(g+2);m[g+1]=(1<<d)-1;for(var v=g;v>=f;v--){var y=o[e.charAt(v-1)];if(m[v]=0===d?(m[v+1]<<1|1)&y:(m[v+1]<<1|1)&y|(p[v+1]|p[v])<<1|1|p[v+1],m[v]&u){var b=i(d,v-1);if(b<=s){if(s=b,!((a=v-1)>n))break;f=Math.max(1,2*n-a)}}}if(i(d+1,n)>s)break;p=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var o=n.substring(e.start2,e.start2+e.length1),r=0;n.indexOf(o)!=n.lastIndexOf(o)&&o.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,o=n.substring(e.start2-r,e.start2+e.length1+r);r+=this.Patch_Margin;var i=n.substring(e.start2-r,e.start2);i&&e.diffs.unshift(new t.Diff(0,i));var s=n.substring(e.start2+e.length1,e.start2+e.length1+r);s&&e.diffs.push(new t.Diff(0,s)),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+s.length,e.length2+=i.length+s.length}},t.prototype.patch_make=function(e,o,r){var i,s;if("string"==typeof e&&"string"==typeof o&&void 0===r)i=e,(s=this.diff_main(i,o,!0)).length>2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&void 0===o&&void 0===r)s=e,i=this.diff_text1(s);else if("string"==typeof e&&o&&"object"==typeof o&&void 0===r)i=e,s=o;else{if("string"!=typeof e||"string"!=typeof o||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");i=e,s=r}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,u=0,p=0,h=i,d=i,f=0;f<s.length;f++){var g=s[f][0],m=s[f][1];switch(c||0===g||(l.start1=u,l.start2=p),g){case 1:l.diffs[c++]=s[f],l.length2+=m.length,d=d.substring(0,p)+m+d.substring(p);break;case n:l.length1+=m.length,l.diffs[c++]=s[f],d=d.substring(0,p)+d.substring(p+m.length);break;case 0:m.length<=2*this.Patch_Margin&&c&&s.length!=f+1?(l.diffs[c++]=s[f],l.length1+=m.length,l.length2+=m.length):m.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,h),a.push(l),l=new t.patch_obj,c=0,h=d,u=p)}1!==g&&(u+=m.length),g!==n&&(p+=m.length)}return c&&(this.patch_addContext_(l,h),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],o=0;o<e.length;o++){var r=e[o],i=new t.patch_obj;i.diffs=[];for(var s=0;s<r.diffs.length;s++)i.diffs[s]=new t.Diff(r.diffs[s][0],r.diffs[s][1]);i.start1=r.start1,i.start2=r.start2,i.length1=r.length1,i.length2=r.length2,n[o]=i}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var o=this.patch_addPadding(e);t=o+t+o,this.patch_splitMax(e);for(var r=0,i=[],s=0;s<e.length;s++){var a,l,c=e[s].start2+r,u=this.diff_text1(e[s].diffs),p=-1;if(u.length>this.Match_MaxBits?-1!=(a=this.match_main(t,u.substring(0,this.Match_MaxBits),c))&&(-1==(p=this.match_main(t,u.substring(u.length-this.Match_MaxBits),c+u.length-this.Match_MaxBits))||a>=p)&&(a=-1):a=this.match_main(t,u,c),-1==a)i[s]=!1,r-=e[s].length2-e[s].length1;else if(i[s]=!0,r=a-c,u==(l=-1==p?t.substring(a,a+u.length):t.substring(a,p+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+u.length);else{var h=this.diff_main(u,l,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(h)/u.length>this.Patch_DeleteThreshold)i[s]=!1;else{this.diff_cleanupSemanticLossless(h);for(var d,f=0,g=0;g<e[s].diffs.length;g++){var m=e[s].diffs[g];0!==m[0]&&(d=this.diff_xIndex(h,f)),1===m[0]?t=t.substring(0,a+d)+m[1]+t.substring(a+d):m[0]===n&&(t=t.substring(0,a+d)+t.substring(a+this.diff_xIndex(h,f+m[1].length))),m[0]!==n&&(f+=m[1].length)}}}}return[t=t.substring(o.length,t.length-o.length),i]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,o="",r=1;r<=n;r++)o+=String.fromCharCode(r);for(r=0;r<e.length;r++)e[r].start1+=n,e[r].start2+=n;var i=e[0],s=i.diffs;if(0==s.length||0!=s[0][0])s.unshift(new t.Diff(0,o)),i.start1-=n,i.start2-=n,i.length1+=n,i.length2+=n;else if(n>s[0][1].length){var a=n-s[0][1].length;s[0][1]=o.substring(s[0][1].length)+s[0][1],i.start1-=a,i.start2-=a,i.length1+=a,i.length2+=a}return 0==(s=(i=e[e.length-1]).diffs).length||0!=s[s.length-1][0]?(s.push(new t.Diff(0,o)),i.length1+=n,i.length2+=n):n>s[s.length-1][1].length&&(a=n-s[s.length-1][1].length,s[s.length-1][1]+=o.substring(0,a),i.length1+=a,i.length2+=a),o},t.prototype.patch_splitMax=function(e){for(var o=this.Match_MaxBits,r=0;r<e.length;r++)if(!(e[r].length1<=o)){var i=e[r];e.splice(r--,1);for(var s=i.start1,a=i.start2,l="";0!==i.diffs.length;){var c=new t.patch_obj,u=!0;for(c.start1=s-l.length,c.start2=a-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==i.diffs.length&&c.length1<o-this.Patch_Margin;){var p=i.diffs[0][0],h=i.diffs[0][1];1===p?(c.length2+=h.length,a+=h.length,c.diffs.push(i.diffs.shift()),u=!1):p===n&&1==c.diffs.length&&0==c.diffs[0][0]&&h.length>2*o?(c.length1+=h.length,s+=h.length,u=!1,c.diffs.push(new t.Diff(p,h)),i.diffs.shift()):(h=h.substring(0,o-c.length1-this.Patch_Margin),c.length1+=h.length,s+=h.length,0===p?(c.length2+=h.length,a+=h.length):u=!1,c.diffs.push(new t.Diff(p,h)),h==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(h.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var d=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==d&&(c.length1+=d.length,c.length2+=d.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=d:c.diffs.push(new t.Diff(0,d))),u||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var o=[];if(!e)return o;for(var r=e.split("\n"),i=0,s=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<r.length;){var a=r[i].match(s);if(!a)throw new Error("Invalid patch string: "+r[i]);var l=new t.patch_obj;for(o.push(l),l.start1=parseInt(a[1],10),""===a[2]?(l.start1--,l.length1=1):"0"==a[2]?l.length1=0:(l.start1--,l.length1=parseInt(a[2],10)),l.start2=parseInt(a[3],10),""===a[4]?(l.start2--,l.length2=1):"0"==a[4]?l.length2=0:(l.start2--,l.length2=parseInt(a[4],10)),i++;i<r.length;){var c=r[i].charAt(0);try{var u=decodeURI(r[i].substring(1))}catch(e){throw new Error("Illegal escape in patch_fromText: "+u)}if("-"==c)l.diffs.push(new t.Diff(n,u));else if("+"==c)l.diffs.push(new t.Diff(1,u));else if(" "==c)l.diffs.push(new t.Diff(0,u));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+u)}i++}}return o},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],o=0;o<this.diffs.length;o++){switch(this.diffs[o][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[o+1]=e+encodeURI(this.diffs[o][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},3072:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case p:case i:case a:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case h:case m:case g:case l:return e;default:return t}}case r:return t}}}function S(e){return x(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=h,t.Fragment=i,t.Lazy=m,t.Memo=g,t.Portal=r,t.Profiler=a,t.StrictMode=s,t.Suspense=d,t.isAsyncMode=function(e){return S(e)||x(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===h},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===r},t.isProfiler=function(e){return x(e)===a},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===a||e===s||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=x},3091:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(5556),s=n(1609),a=n(4038),l=n(2189),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n}return r(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new l,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var o=e.diff_main(t,n);e.diff_cleanupSemantic(o);var r=this.generateDiffedLines(o);return this.setCodeMarkers(r)},t.prototype.generateDiffedLines=function(e){var t={left:[],right:[]},n={left:1,right:1};return e.forEach(function(e){var o=e[0],r=e[1],i=r.split("\n").length-1;if(0!==r.length){var s=r[0],a=r[r.length-1],l=0;switch(o){case 0:n.left+=i,n.right+=i;break;case-1:"\n"===s&&(n.left++,i--),0===(l=i)&&t.right.push({startLine:n.right,endLine:n.right}),"\n"===a&&(l-=1),t.left.push({startLine:n.left,endLine:n.left+l}),n.left+=i;break;case 1:"\n"===s&&(n.right++,i--),0===(l=i)&&t.left.push({startLine:n.left,endLine:n.left}),"\n"===a&&(l-=1),t.right.push({startLine:n.right,endLine:n.right+l}),n.right+=i;break;default:throw new Error("Diff type was not defined.")}}}),t},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},o=0;o<e.left.length;o++){var r={startRow:e.left[o].startLine-1,endRow:e.left[o].endLine,type:"text",className:"codeMarker"};n.left.push(r)}for(o=0;o<e.right.length;o++)r={startRow:e.right[o].startLine-1,endRow:e.right[o].endLine,type:"text",className:"codeMarker"},n.right.push(r);return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return s.createElement(a.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:i.number,editorProps:i.object,enableBasicAutocompletion:i.bool,enableLiveAutocompletion:i.bool,focus:i.bool,fontSize:i.number,height:i.string,highlightActiveLine:i.bool,maxLines:i.number,minLines:i.number,mode:i.string,name:i.string,className:i.string,onLoad:i.func,onPaste:i.func,onScroll:i.func,onChange:i.func,orientation:i.string,readOnly:i.bool,scrollMargin:i.array,setOptions:i.object,showGutter:i.bool,showPrintMargin:i.bool,splits:i.number,style:i.object,tabSize:i.number,theme:i.string,value:i.array,width:i.string,wrapEnabled:i.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(s.Component);t.default=c},3158:(e,t,n)=>{e=n.nmd(e),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.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",s=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",l=t.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",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",p=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",h=t.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",d=function(){var e=this.createKeywordMapper({"support.function":s,"support.constant":a,"support.type":i,"support.constant.color":l,"support.constant.fonts":c},"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:u},{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:"("+u+")(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:u},{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:p},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:h},{include:"url"},{token:e,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()};o.inherits(d,r),t.CssHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var r=n[1].length,i=e.findMatchingBracket({row:t,column:r});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var o={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}},r=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});o.hasOwnProperty(n)||(o[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,o){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var r=t.getLine(n.row).substr(0,n.column),i=/\([^)]*$/.test(r);return i&&(r=r.substr(r.lastIndexOf("(")+1)),/:[^;]+$/.test(r)?(/([\w\-]+):[^:]*$/.test(r),this.getPropertyValueCompletions(e,t,n,o)):this.getPropertyCompletions(e,t,n,o,i)}return[]},this.getPropertyCompletions=function(e,t,n,r,i){return i=i||!1,Object.keys(o).map(function(e){return{caption:e,snippet:e+": $0"+(i?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,r){var i=t.getLine(n.row).substr(0,n.column),s=(/([\w\-]+):[^:]*$/.exec(i)||{})[1];if(!s)return[];var a=[];return s in o&&"object"==typeof o[s]&&(a=Object.keys(o[s])),a.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(r.prototype),t.CssCompletions=r}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,s=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r&&n.selection.isEmpty()){var s=n.getCursorPosition(),a=new i(o,s.row,s.column),l=a.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=a.stepBackward()),l&&"support.type"===l.type){var c=o.doc.getLine(s.row);if(":"===c.substring(s.column,s.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===s){var a=n.getCursorPosition(),l=new i(o,a.row,a.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type&&";"===o.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r&&n.selection.isEmpty()){var i=n.getCursorPosition();if(";"===o.doc.getLine(i.row).substring(i.column,i.column+1))return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,o,r){if("!"===r&&n.selection.isEmpty()){var i=n.getCursorPosition(),s=o.doc.getLine(i.row);if(/^\s*(;|}|$)/.test(s.substring(i.column)))return{text:"!important",selection:[10,10]}}})};o.inherits(s,r),t.CssBehaviour=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(s,i),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(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r,i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);if(r=i.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(o?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}return"markbegin"!==t&&(r=i.match(this.foldingStopMarker))?(s=r.index+r[0].length,r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)):void 0},this.getSectionRange=function(e,t){for(var n=e.getLine(t),o=n.search(/\S/),i=t,s=n.length,a=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(o>c)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(o==c)break}a=t}}return new r(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<i;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>s)return new r(s,o,n,t.length)}}.call(s.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,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new u};o.inherits(p,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;return r.length&&"comment"==r[r.length-1].type||t.match(/^.*\{\s*$/)&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(p.prototype),t.Mode=p}),ace.require(["ace/mode/css"],function(t){e&&(e.exports=t)})},3404:(e,t,n)=>{"use strict";e.exports=n(3072)},4038:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5707),a=(0,s.getAceInstance)(),l=n(952),c=n(9),u=n(5556),p=n(1609),h=n(8142),d=n(6762),f=function(e){function t(t){var n=e.call(this,t)||this;return s.editorEvents.forEach(function(e){n[e]=n[e].bind(n)}),n.debounce=s.debounce,n}return r(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,o=t.onBeforeLoad,r=t.mode,i=t.focus,l=t.theme,u=t.fontSize,p=t.value,h=t.defaultValue,f=t.cursorStart,g=t.showGutter,m=t.wrapEnabled,v=t.showPrintMargin,y=t.scrollMargin,b=void 0===y?[0,0,0,0]:y,w=t.keyboardHandler,x=t.onLoad,S=t.commands,C=t.annotations,_=t.markers,k=t.splits;this.editor=a.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(l)),o&&o(a);var $=Object.keys(this.props.editorProps),E=new c.Split(this.editor.container,"ace/theme/".concat(l),k);this.editor.env.split=E,this.splitEditor=E.getEditor(0),this.split=E,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var O=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),E.forEach(function(t,n){for(var o=0;o<$.length;o++)t[$[o]]=e.props.editorProps[$[o]];var i=d(h,n),c=d(p,n,"");t.session.setUndoManager(new a.UndoManager),t.setTheme("ace/theme/".concat(l)),t.renderer.setScrollMargin(b[0],b[1],b[2],b[3]),t.getSession().setMode("ace/mode/".concat(r)),t.setFontSize(u),t.renderer.setShowGutter(g),t.getSession().setUseWrapMode(m),t.setShowPrintMargin(v),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===i?c:i,f);var y=d(C,n,[]),x=d(_,n,[]);for(t.getSession().setAnnotations(y),x&&x.length>0&&e.handleMarkers(x,t),o=0;o<s.editorOptions.length;o++){var k=s.editorOptions[o];O.hasOwnProperty(k)?t.setOption(k,e.props[k]):e.props[k]&&console.warn("ReaceAce: editor option ".concat(k," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}e.handleOptions(e.props,t),Array.isArray(S)&&S.forEach(function(e){"string"==typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)}),w&&t.setKeyboardHandler("ace/keyboard/"+w)}),n&&(this.refEditor.className+=" "+n),i&&this.splitEditor.focus();var M=this.editor.env.split;M.setOrientation("below"===this.props.orientation?M.BELOW:M.BESIDE),M.resize(!0),x&&x(M)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,o=this.props,r=this.editor.env.split;if(o.splits!==n.splits&&r.setSplits(o.splits),o.orientation!==n.orientation&&r.setOrientation("below"===o.orientation?r.BELOW:r.BESIDE),r.forEach(function(e,r){o.mode!==n.mode&&e.getSession().setMode("ace/mode/"+o.mode),o.keyboardHandler!==n.keyboardHandler&&(o.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+o.keyboardHandler):e.setKeyboardHandler(null)),o.fontSize!==n.fontSize&&e.setFontSize(o.fontSize),o.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(o.wrapEnabled),o.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(o.showPrintMargin),o.showGutter!==n.showGutter&&e.renderer.setShowGutter(o.showGutter);for(var i=0;i<s.editorOptions.length;i++){var a=s.editorOptions[i];o[a]!==n[a]&&e.setOption(a,o[a])}h(o.setOptions,n.setOptions)||t.handleOptions(o,e);var l=d(o.value,r,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,o.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var u=d(o.annotations,r,[]),p=d(n.annotations,r,[]);h(u,p)||e.getSession().setAnnotations(u);var f=d(o.markers,r,[]),g=d(n.markers,r,[]);!h(f,g)&&Array.isArray(f)&&t.handleMarkers(f,e)}),o.className!==n.className){var i=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach(function(e){var t=i.indexOf(e);i.splice(t,1)}),this.refEditor.className=" "+o.className+" "+i.join(" ")}o.theme!==n.theme&&r.setTheme("ace/theme/"+o.theme),o.focus&&!n.focus&&this.splitEditor.focus(),o.height===this.props.height&&o.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getValue())}),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getSelection())}),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),o=0;o<n.length;o++)t.setOption(n[o],e.setOptions[n[o]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var o in n)n.hasOwnProperty(o)&&t.getSession().removeMarker(n[o].id);for(var o in n=t.getSession().getMarkers(!1))n.hasOwnProperty(o)&&t.getSession().removeMarker(n[o].id);e.forEach(function(e){var n=e.startRow,o=e.startCol,r=e.endRow,i=e.endCol,s=e.className,a=e.type,c=e.inFront,u=void 0!==c&&c,p=new l.Range(n,o,r,i);t.getSession().addMarker(p,s,a,u)})},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,o=e.height,r=e.style,s=i({width:n,height:o},r);return p.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={className:u.string,debounceChangePeriod:u.number,defaultValue:u.arrayOf(u.string),focus:u.bool,fontSize:u.oneOfType([u.number,u.string]),height:u.string,mode:u.string,name:u.string,onBlur:u.func,onChange:u.func,onCopy:u.func,onFocus:u.func,onInput:u.func,onLoad:u.func,onPaste:u.func,onScroll:u.func,orientation:u.string,showGutter:u.bool,splits:u.number,theme:u.string,value:u.arrayOf(u.string),width:u.string,onSelectionChange:u.func,onCursorChange:u.func,onBeforeLoad:u.func,minLines:u.number,maxLines:u.number,readOnly:u.bool,highlightActiveLine:u.bool,tabSize:u.number,showPrintMargin:u.bool,cursorStart:u.number,editorProps:u.object,setOptions:u.object,style:u.object,scrollMargin:u.array,annotations:u.array,markers:u.array,keyboardHandler:u.string,wrapEnabled:u.bool,enableBasicAutocompletion:u.oneOfType([u.bool,u.array]),enableLiveAutocompletion:u.oneOfType([u.bool,u.array]),commands:u.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(p.Component);t.default=f},4139:(e,t,n)=>{e=n.nmd(e),ace.define("ace/snippets/javascript.snippets",["require","exports","module"],function(e,t,n){n.exports='# Prototype\nsnippet proto\n\t${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n\t\t${4:// body...}\n\t};\n# Function\nsnippet fun\n\tfunction ${1?:function_name}(${2:argument}) {\n\t\t${3:// body...}\n\t}\n# Anonymous Function\nregex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\nsnippet f\n\tfunction${M1?: ${1:functionName}}($2) {\n\t\t${0:$TM_SELECTED_TEXT}\n\t}${M2?;}${M3?,}${M4?)}\n# Immediate function\ntrigger \\(?f\\(\nendTrigger \\)?\nsnippet f(\n\t(function(${1}) {\n\t\t${0:${TM_SELECTED_TEXT:/* code */}}\n\t}(${1}));\n# if\nsnippet if\n\tif (${1:true}) {\n\t\t${0}\n\t}\n# if ... else\nsnippet ife\n\tif (${1:true}) {\n\t\t${2}\n\t} else {\n\t\t${0}\n\t}\n# tertiary conditional\nsnippet ter\n\t${1:/* condition */} ? ${2:a} : ${3:b}\n# switch\nsnippet switch\n\tswitch (${1:expression}) {\n\t\tcase \'${3:case}\':\n\t\t\t${4:// code}\n\t\t\tbreak;\n\t\t${5}\n\t\tdefault:\n\t\t\t${2:// code}\n\t}\n# case\nsnippet case\n\tcase \'${1:case}\':\n\t\t${2:// code}\n\t\tbreak;\n\t${3}\n\n# while (...) {...}\nsnippet wh\n\twhile (${1:/* condition */}) {\n\t\t${0:/* code */}\n\t}\n# try\nsnippet try\n\ttry {\n\t\t${0:/* code */}\n\t} catch (e) {}\n# do...while\nsnippet do\n\tdo {\n\t\t${2:/* code */}\n\t} while (${1:/* condition */});\n# Object Method\nsnippet :f\nregex /([,{[])|^\\s*/:f/\n\t${1:method_name}: function(${2:attribute}) {\n\t\t${0}\n\t}${3:,}\n# setTimeout function\nsnippet setTimeout\nregex /\\b/st|timeout|setTimeo?u?t?/\n\tsetTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n# Get Elements\nsnippet gett\n\tgetElementsBy${1:TagName}(\'${2}\')${3}\n# Get Element\nsnippet get\n\tgetElementBy${1:Id}(\'${2}\')${3}\n# console.log (Firebug)\nsnippet cl\n\tconsole.log(${1});\n# return\nsnippet ret\n\treturn ${1:result}\n# for (property in object ) { ... }\nsnippet fori\n\tfor (var ${1:prop} in ${2:Things}) {\n\t\t${0:$2[$1]}\n\t}\n# hasOwnProperty\nsnippet has\n\thasOwnProperty(${1})\n# docstring\nsnippet /**\n\t/**\n\t * ${1:description}\n\t *\n\t */\nsnippet @par\nregex /^\\s*\\*\\s*/@(para?m?)?/\n\t@param {${1:type}} ${2:name} ${3:description}\nsnippet @ret\n\t@return {${1:type}} ${2:description}\n# JSON.parse\nsnippet jsonp\n\tJSON.parse(${1:jstr});\n# JSON.stringify\nsnippet jsons\n\tJSON.stringify(${1:object});\n# self-defining function\nsnippet sdf\n\tvar ${1:function_name} = function(${2:argument}) {\n\t\t${3:// initial code ...}\n\n\t\t$1 = function($2) {\n\t\t\t${4:// main code}\n\t\t};\n\t}\n# singleton\nsnippet sing\n\tfunction ${1:Singleton} (${2:argument}) {\n\t\t// the cached instance\n\t\tvar instance;\n\n\t\t// rewrite the constructor\n\t\t$1 = function $1($2) {\n\t\t\treturn instance;\n\t\t};\n\t\t\n\t\t// carry over the prototype properties\n\t\t$1.prototype = this;\n\n\t\t// the instance\n\t\tinstance = new $1();\n\n\t\t// reset the constructor pointer\n\t\tinstance.constructor = $1;\n\n\t\t${3:// code ...}\n\n\t\treturn instance;\n\t}\n# class\nsnippet class\nregex /^\\s*/clas{0,2}/\n\tvar ${1:class} = function(${20}) {\n\t\t$40$0\n\t};\n\t\n\t(function() {\n\t\t${60:this.prop = ""}\n\t}).call(${1:class}.prototype);\n\t\n\texports.${1:class} = ${1:class};\n# \nsnippet for-\n\tfor (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n\t\t${0:${2:Things}[${1:i}];}\n\t}\n# for (...) {...}\nsnippet for\n\tfor (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n\t\t${3:$2[$1]}$0\n\t}\n# for (...) {...} (Improved Native For-Loop)\nsnippet forr\n\tfor (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n\t\t${3:$2[$1]}$0\n\t}\n\n\n#modules\nsnippet def\n\tdefine(function(require, exports, module) {\n\t"use strict";\n\tvar ${1/.*\\///} = require("${1}");\n\t\n\t$TM_SELECTED_TEXT\n\t});\nsnippet req\nguard ^\\s*\n\tvar ${1/.*\\///} = require("${1}");\n\t$0\nsnippet requ\nguard ^\\s*\n\tvar ${1/.*\\/(.)/\\u$1/} = require("${1}").${1/.*\\/(.)/\\u$1/};\n\t$0\n'}),ace.define("ace/snippets/javascript",["require","exports","module","ace/snippets/javascript.snippets"],function(e,t,n){"use strict";t.snippetText=e("./javascript.snippets"),t.scope="javascript"}),ace.require(["ace/snippets/javascript"],function(t){e&&(e.exports=t)})},4146:(e,t,n)=>{"use strict";var o=n(3404),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return o.isMemo(e)?s:a[e.$$typeof]||r}a[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[o.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(f){var r=d(n);r&&r!==f&&e(t,r,o)}var s=u(n);p&&(s=s.concat(p(n)));for(var a=l(t),g=l(n),m=0;m<s.length;++m){var v=s[m];if(!(i[v]||o&&o[v]||g&&g[v]||a&&a[v])){var y=h(n,v);try{c(t,v,y)}catch(e){}}}}return t}},4217:(e,t,n)=>{e.exports=n(139)},5549:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(952),a=n(5556),l=n(1609),c=n(8142),u=n(5707),p=(0,u.getAceInstance)(),h=function(e){function t(t){var n=e.call(this,t)||this;return u.editorEvents.forEach(function(e){n[e]=n[e].bind(n)}),n.debounce=u.debounce,n}return r(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,o=t.onBeforeLoad,r=t.onValidate,i=t.mode,s=t.focus,a=t.theme,l=t.fontSize,c=t.lineHeight,h=t.value,d=t.defaultValue,f=t.showGutter,g=t.wrapEnabled,m=t.showPrintMargin,v=t.scrollMargin,y=void 0===v?[0,0,0,0]:v,b=t.keyboardHandler,w=t.onLoad,x=t.commands,S=t.annotations,C=t.markers,_=t.placeholder;this.editor=p.edit(this.refEditor),o&&o(p);for(var k=Object.keys(this.props.editorProps),$=0;$<k.length;$++)this.editor[k[$]]=this.props.editorProps[k[$]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode("string"==typeof i?"ace/mode/".concat(i):i),a&&""!==a&&this.editor.setTheme("ace/theme/".concat(a)),this.editor.setFontSize("number"==typeof l?"".concat(l,"px"):l),c&&(this.editor.container.style.lineHeight="number"==typeof c?"".concat(c,"px"):"".concat(c),this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(d||h||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(f),this.editor.getSession().setUseWrapMode(g),this.editor.setShowPrintMargin(m),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),_&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),r&&this.editor.getSession().on("changeAnnotation",function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(S||[]),C&&C.length>0&&this.handleMarkers(C);var E=this.editor.$options;u.editorOptions.forEach(function(t){E.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(x)&&x.forEach(function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)}),b&&this.editor.setKeyboardHandler("ace/keyboard/"+b),n&&(this.refEditor.className+=" "+n),w&&w(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,o=0;o<u.editorOptions.length;o++){var r=u.editorOptions[o];n[r]!==t[r]&&this.editor.setOption(r,n[r])}if(n.className!==t.className){var i=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach(function(e){var t=i.indexOf(e);i.splice(t,1)}),this.refEditor.className=" "+n.className+" "+i.join(" ")}var s=this.editor&&null!=n.value&&this.editor.getValue()!==n.value;if(s){this.silent=!0;var a=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(a),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("string"==typeof n.mode?"ace/mode/".concat(n.mode):n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize("number"==typeof n.fontSize?"".concat(n.fontSize,"px"):n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight="number"==typeof n.lineHeight?"".concat(n.lineHeight,"px"):n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),c(n.setOptions,t.setOptions)||this.handleOptions(n),!s&&c(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!c(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),c(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(e){if(this.editor&&this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){var t=e.text;this.props.onCopy&&this.props.onCopy(t)},t.prototype.onPaste=function(e){var t=e.text;this.props.onPaste&&this.props.onPaste(t)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var o in n)n.hasOwnProperty(o)&&this.editor.getSession().removeMarker(n[o].id);for(var o in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(o)&&"ace_active-line"!==n[o].clazz&&"ace_selected-word"!==n[o].clazz&&this.editor.getSession().removeMarker(n[o].id);e.forEach(function(e){var n=e.startRow,o=e.startCol,r=e.endRow,i=e.endCol,a=e.className,l=e.type,c=e.inFront,u=void 0!==c&&c,p=new s.Range(n,o,r,i);t.editor.getSession().addMarker(p,a,l,u)})},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,o=e.renderer.placeholderNode;!n&&o?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!o?((o=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",o.className="ace_comment ace_placeholder",o.style.padding="0 9px",o.style.position="absolute",o.style.zIndex="3",e.renderer.scroller.appendChild(o)):n&&o&&(o.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,o=e.height,r=e.style,s=i({width:n,height:o},r);return l.createElement("div",{ref:this.updateRef,id:t,style:s})},t.propTypes={mode:a.oneOfType([a.string,a.object]),focus:a.bool,theme:a.string,name:a.string,className:a.string,height:a.string,width:a.string,fontSize:a.oneOfType([a.number,a.string]),lineHeight:a.oneOfType([a.number,a.string]),showGutter:a.bool,onChange:a.func,onCopy:a.func,onPaste:a.func,onFocus:a.func,onInput:a.func,onBlur:a.func,onScroll:a.func,value:a.string,defaultValue:a.string,onLoad:a.func,onSelectionChange:a.func,onCursorChange:a.func,onBeforeLoad:a.func,onValidate:a.func,minLines:a.number,maxLines:a.number,readOnly:a.bool,highlightActiveLine:a.bool,tabSize:a.number,showPrintMargin:a.bool,cursorStart:a.number,debounceChangePeriod:a.number,editorProps:a.object,setOptions:a.object,style:a.object,scrollMargin:a.array,annotations:a.array,markers:a.array,keyboardHandler:a.string,wrapEnabled:a.bool,enableSnippets:a.bool,enableBasicAutocompletion:a.oneOfType([a.bool,a.array]),enableLiveAutocompletion:a.oneOfType([a.bool,a.array]),navigateToFileEnd:a.bool,commands:a.array,placeholder:a.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(l.Component);t.default=h},5556:(e,t,n)=>{e.exports=n(2694)()},5707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0,t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"],t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"],t.getAceInstance=function(){var e;return"undefined"==typeof window?(n.g.window={},e=n(952),delete n.g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(952),e},t.debounce=function(e,t){var n=null;return function(){var o=this,r=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(o,r)},t)}}},6762:(e,t,n)=>{var o,r="__lodash_hash_undefined__",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,a=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,d=p||h||Function("return this")(),f=Array.prototype,g=Function.prototype,m=Object.prototype,v=d["__core-js_shared__"],y=(o=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",b=g.toString,w=m.hasOwnProperty,x=m.toString,S=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=d.Symbol,_=f.splice,k=I(d,"Map"),$=I(Object,"create"),E=C?C.prototype:void 0,O=E?E.toString:void 0;function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function A(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function L(e,t){for(var n=e.length;n--;)if(j(e[n][0],t))return n;return-1}function R(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function I(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!z(e)||y&&y in e)return!1;var t=function(e){var t=z(e)?x.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?S:u;return t.test(function(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}M.prototype.clear=function(){this.__data__=$?$(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return n===r?void 0:n}return w.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:w.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=$&&void 0===t?r:t,this},T.prototype.clear=function(){this.__data__=[]},T.prototype.delete=function(e){var t=this.__data__,n=L(t,e);return!(n<0||(n==t.length-1?t.pop():_.call(t,n,1),0))},T.prototype.get=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},T.prototype.has=function(e){return L(this.__data__,e)>-1},T.prototype.set=function(e,t){var n=this.__data__,o=L(n,e);return o<0?n.push([e,t]):n[o][1]=t,this},A.prototype.clear=function(){this.__data__={hash:new M,map:new(k||T),string:new M}},A.prototype.delete=function(e){return R(this,e).delete(e)},A.prototype.get=function(e){return R(this,e).get(e)},A.prototype.has=function(e){return R(this,e).has(e)},A.prototype.set=function(e,t){return R(this,e).set(e,t),this};var D=N(function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(B(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return a.test(e)&&t.push(""),e.replace(l,function(e,n,o,r){t.push(o?r.replace(c,"$1"):n||e)}),t});function P(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function N(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var s=e.apply(this,o);return n.cache=i.set(r,s),s};return n.cache=new(N.Cache||A),n}function j(e,t){return e===t||e!=e&&t!=t}N.Cache=A;var F=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==x.call(e)}e.exports=function(e,t,n){var o=null==e?void 0:function(e,t){t=function(e,t){if(F(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!B(e))||s.test(e)||!i.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return F(e)?e:D(e)}(t);for(var n=0,o=t.length;null!=e&&n<o;)e=e[P(t[n++])];return n&&n==o?e:void 0}(e,t);return void 0===o?n:o}},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8142:(e,t,n)=>{e=n.nmd(e);var o="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",p="[object Map]",h="[object Number]",d="[object Object]",f="[object Promise]",g="[object RegExp]",m="[object Set]",v="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",x=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[i]=C[s]=C[b]=C[a]=C[w]=C[l]=C[c]=C[u]=C[p]=C[h]=C[d]=C[g]=C[m]=C[v]=C[y]=!1;var _="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,k="object"==typeof self&&self&&self.Object===Object&&self,$=_||k||Function("return this")(),E=t&&!t.nodeType&&t,O=E&&e&&!e.nodeType&&e,M=O&&O.exports===E,T=M&&_.process,A=function(){try{return T&&T.binding&&T.binding("util")}catch(e){}}(),L=A&&A.isTypedArray;function R(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function I(e){var t=-1,n=Array(e.size);return e.forEach(function(e,o){n[++t]=[o,e]}),n}function D(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var P,N,j,F=Array.prototype,z=Function.prototype,B=Object.prototype,W=$["__core-js_shared__"],H=z.toString,V=B.hasOwnProperty,U=(P=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||""))?"Symbol(src)_1."+P:"",G=B.toString,K=RegExp("^"+H.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=M?$.Buffer:void 0,q=$.Symbol,Q=$.Uint8Array,X=B.propertyIsEnumerable,Z=F.splice,J=q?q.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Y?Y.isBuffer:void 0,ne=(N=Object.keys,j=Object,function(e){return N(j(e))}),oe=Oe($,"DataView"),re=Oe($,"Map"),ie=Oe($,"Promise"),se=Oe($,"Set"),ae=Oe($,"WeakMap"),le=Oe(Object,"create"),ce=Le(oe),ue=Le(re),pe=Le(ie),he=Le(se),de=Le(ae),fe=q?q.prototype:void 0,ge=fe?fe.valueOf:void 0;function me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function be(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function we(e){var t=this.__data__=new ve(e);this.size=t.size}function xe(e,t){for(var n=e.length;n--;)if(Re(e[n][0],t))return n;return-1}function Se(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=V.call(e,J),n=e[J];try{e[J]=void 0;var o=!0}catch(e){}var r=G.call(e);return o&&(t?e[J]=n:delete e[J]),r}(e):function(e){return G.call(e)}(e)}function Ce(e){return ze(e)&&Se(e)==i}function _e(e,t,n,o,r){return e===t||(null==e||null==t||!ze(e)&&!ze(t)?e!=e&&t!=t:function(e,t,n,o,r,u){var f=De(e),y=De(t),x=f?s:Te(e),S=y?s:Te(t),C=(x=x==i?d:x)==d,_=(S=S==i?d:S)==d,k=x==S;if(k&&Pe(e)){if(!Pe(t))return!1;f=!0,C=!1}if(k&&!C)return u||(u=new we),f||Be(e)?ke(e,t,n,o,r,u):function(e,t,n,o,r,i,s){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!i(new Q(e),new Q(t)));case a:case l:case h:return Re(+e,+t);case c:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+"";case p:var u=I;case m:var d=1&o;if(u||(u=D),e.size!=t.size&&!d)return!1;var f=s.get(e);if(f)return f==t;o|=2,s.set(e,t);var y=ke(u(e),u(t),o,r,i,s);return s.delete(e),y;case"[object Symbol]":if(ge)return ge.call(e)==ge.call(t)}return!1}(e,t,x,n,o,r,u);if(!(1&n)){var $=C&&V.call(e,"__wrapped__"),E=_&&V.call(t,"__wrapped__");if($||E){var O=$?e.value():e,M=E?t.value():t;return u||(u=new we),r(O,M,n,o,u)}}return!!k&&(u||(u=new we),function(e,t,n,o,r,i){var s=1&n,a=$e(e),l=a.length;if(l!=$e(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:V.call(t,u)))return!1}var p=i.get(e);if(p&&i.get(t))return p==t;var h=!0;i.set(e,t),i.set(t,e);for(var d=s;++c<l;){var f=e[u=a[c]],g=t[u];if(o)var m=s?o(g,f,u,t,e,i):o(f,g,u,e,t,i);if(!(void 0===m?f===g||r(f,g,n,o,i):m)){h=!1;break}d||(d="constructor"==u)}if(h&&!d){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,o,r,u))}(e,t,n,o,_e,r))}function ke(e,t,n,o,r,i){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var u=-1,p=!0,h=2&n?new be:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var d=e[u],f=t[u];if(o)var g=s?o(f,d,u,t,e,i):o(d,f,u,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(h){if(!R(t,function(e,t){if(s=t,!h.has(s)&&(d===e||r(d,e,n,o,i)))return h.push(t);var s})){p=!1;break}}else if(d!==f&&!r(d,f,n,o,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function $e(e){return function(e,t,n){var o=t(e);return De(e)?o:function(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}(o,n(e))}(e,We,Me)}function Ee(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Fe(e)||function(e){return!!U&&U in e}(e))&&(Ne(e)?K:x).test(Le(e))}(n)?n:void 0}me.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},me.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},me.prototype.get=function(e){var t=this.__data__;if(le){var n=t[e];return n===o?void 0:n}return V.call(t,e)?t[e]:void 0},me.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:V.call(t,e)},me.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&void 0===t?o:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=xe(t,e);return!(n<0||(n==t.length-1?t.pop():Z.call(t,n,1),--this.size,0))},ve.prototype.get=function(e){var t=this.__data__,n=xe(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return xe(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,o=xe(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new me,map:new(re||ve),string:new me}},ye.prototype.delete=function(e){var t=Ee(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Ee(this,e).get(e)},ye.prototype.has=function(e){return Ee(this,e).has(e)},ye.prototype.set=function(e,t){var n=Ee(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this},be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,o),this},be.prototype.has=function(e){return this.__data__.has(e)},we.prototype.clear=function(){this.__data__=new ve,this.size=0},we.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},we.prototype.get=function(e){return this.__data__.get(e)},we.prototype.has=function(e){return this.__data__.has(e)},we.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var o=n.__data__;if(!re||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(o)}return n.set(e,t),this.size=n.size,this};var Me=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,o=null==e?0:e.length,r=0,i=[];++n<o;){var s=e[n];t(s)&&(i[r++]=s)}return i}(ee(e),function(t){return X.call(e,t)}))}:function(){return[]},Te=Se;function Ae(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||S.test(e))&&e>-1&&e%1==0&&e<t}function Le(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Re(e,t){return e===t||e!=e&&t!=t}(oe&&Te(new oe(new ArrayBuffer(1)))!=w||re&&Te(new re)!=p||ie&&Te(ie.resolve())!=f||se&&Te(new se)!=m||ae&&Te(new ae)!=y)&&(Te=function(e){var t=Se(e),n=t==d?e.constructor:void 0,o=n?Le(n):"";if(o)switch(o){case ce:return w;case ue:return p;case pe:return f;case he:return m;case de:return y}return t});var Ie=Ce(function(){return arguments}())?Ce:function(e){return ze(e)&&V.call(e,"callee")&&!X.call(e,"callee")},De=Array.isArray,Pe=te||function(){return!1};function Ne(e){if(!Fe(e))return!1;var t=Se(e);return t==u||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function je(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ze(e){return null!=e&&"object"==typeof e}var Be=L?function(e){return function(t){return e(t)}}(L):function(e){return ze(e)&&je(e.length)&&!!C[Se(e)]};function We(e){return function(e){return null!=e&&je(e.length)&&!Ne(e)}(e)?function(e,t){var n=De(e),o=!n&&Ie(e),r=!n&&!o&&Pe(e),i=!n&&!o&&!r&&Be(e),s=n||o||r||i,a=s?function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}(e.length,String):[],l=a.length;for(var c in e)!t&&!V.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ae(c,l))||a.push(c);return a}(e):function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||B)}(e))return ne(e);var t=[];for(var n in Object(e))V.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e,t){return _e(e,t)}},8171:(e,t,n)=>{e=n.nmd(e),ace.require(["ace/snippets/text"],function(t){e&&(e.exports=t)})},8457:(e,t,n)=>{e=n.nmd(e),ace.define("ace/snippets/css.snippets",["require","exports","module"],function(e,t,n){n.exports="snippet .\n\t${1} {\n\t\t${2}\n\t}\nsnippet !\n\t !important\nsnippet bdi:m+\n\t-moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:m\n\t-moz-border-image: ${1};\nsnippet bdrz:m\n\t-moz-border-radius: ${1};\nsnippet bxsh:m+\n\t-moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:m\n\t-moz-box-shadow: ${1};\nsnippet bdi:w+\n\t-webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:w\n\t-webkit-border-image: ${1};\nsnippet bdrz:w\n\t-webkit-border-radius: ${1};\nsnippet bxsh:w+\n\t-webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:w\n\t-webkit-box-shadow: ${1};\nsnippet @f\n\t@font-face {\n\t\tfont-family: ${1};\n\t\tsrc: url(${2});\n\t}\nsnippet @i\n\t@import url(${1});\nsnippet @m\n\t@media ${1:print} {\n\t\t${2}\n\t}\nsnippet bg+\n\tbackground: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\nsnippet bga\n\tbackground-attachment: ${1};\nsnippet bga:f\n\tbackground-attachment: fixed;\nsnippet bga:s\n\tbackground-attachment: scroll;\nsnippet bgbk\n\tbackground-break: ${1};\nsnippet bgbk:bb\n\tbackground-break: bounding-box;\nsnippet bgbk:c\n\tbackground-break: continuous;\nsnippet bgbk:eb\n\tbackground-break: each-box;\nsnippet bgcp\n\tbackground-clip: ${1};\nsnippet bgcp:bb\n\tbackground-clip: border-box;\nsnippet bgcp:cb\n\tbackground-clip: content-box;\nsnippet bgcp:nc\n\tbackground-clip: no-clip;\nsnippet bgcp:pb\n\tbackground-clip: padding-box;\nsnippet bgc\n\tbackground-color: #${1:FFF};\nsnippet bgc:t\n\tbackground-color: transparent;\nsnippet bgi\n\tbackground-image: url(${1});\nsnippet bgi:n\n\tbackground-image: none;\nsnippet bgo\n\tbackground-origin: ${1};\nsnippet bgo:bb\n\tbackground-origin: border-box;\nsnippet bgo:cb\n\tbackground-origin: content-box;\nsnippet bgo:pb\n\tbackground-origin: padding-box;\nsnippet bgpx\n\tbackground-position-x: ${1};\nsnippet bgpy\n\tbackground-position-y: ${1};\nsnippet bgp\n\tbackground-position: ${1:0} ${2:0};\nsnippet bgr\n\tbackground-repeat: ${1};\nsnippet bgr:n\n\tbackground-repeat: no-repeat;\nsnippet bgr:x\n\tbackground-repeat: repeat-x;\nsnippet bgr:y\n\tbackground-repeat: repeat-y;\nsnippet bgr:r\n\tbackground-repeat: repeat;\nsnippet bgz\n\tbackground-size: ${1};\nsnippet bgz:a\n\tbackground-size: auto;\nsnippet bgz:ct\n\tbackground-size: contain;\nsnippet bgz:cv\n\tbackground-size: cover;\nsnippet bg\n\tbackground: ${1};\nsnippet bg:ie\n\tfilter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\nsnippet bg:n\n\tbackground: none;\nsnippet bd+\n\tborder: ${1:1px} ${2:solid} #${3:000};\nsnippet bdb+\n\tborder-bottom: ${1:1px} ${2:solid} #${3:000};\nsnippet bdbc\n\tborder-bottom-color: #${1:000};\nsnippet bdbi\n\tborder-bottom-image: url(${1});\nsnippet bdbi:n\n\tborder-bottom-image: none;\nsnippet bdbli\n\tborder-bottom-left-image: url(${1});\nsnippet bdbli:c\n\tborder-bottom-left-image: continue;\nsnippet bdbli:n\n\tborder-bottom-left-image: none;\nsnippet bdblrz\n\tborder-bottom-left-radius: ${1};\nsnippet bdbri\n\tborder-bottom-right-image: url(${1});\nsnippet bdbri:c\n\tborder-bottom-right-image: continue;\nsnippet bdbri:n\n\tborder-bottom-right-image: none;\nsnippet bdbrrz\n\tborder-bottom-right-radius: ${1};\nsnippet bdbs\n\tborder-bottom-style: ${1};\nsnippet bdbs:n\n\tborder-bottom-style: none;\nsnippet bdbw\n\tborder-bottom-width: ${1};\nsnippet bdb\n\tborder-bottom: ${1};\nsnippet bdb:n\n\tborder-bottom: none;\nsnippet bdbk\n\tborder-break: ${1};\nsnippet bdbk:c\n\tborder-break: close;\nsnippet bdcl\n\tborder-collapse: ${1};\nsnippet bdcl:c\n\tborder-collapse: collapse;\nsnippet bdcl:s\n\tborder-collapse: separate;\nsnippet bdc\n\tborder-color: #${1:000};\nsnippet bdci\n\tborder-corner-image: url(${1});\nsnippet bdci:c\n\tborder-corner-image: continue;\nsnippet bdci:n\n\tborder-corner-image: none;\nsnippet bdf\n\tborder-fit: ${1};\nsnippet bdf:c\n\tborder-fit: clip;\nsnippet bdf:of\n\tborder-fit: overwrite;\nsnippet bdf:ow\n\tborder-fit: overwrite;\nsnippet bdf:r\n\tborder-fit: repeat;\nsnippet bdf:sc\n\tborder-fit: scale;\nsnippet bdf:sp\n\tborder-fit: space;\nsnippet bdf:st\n\tborder-fit: stretch;\nsnippet bdi\n\tborder-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:n\n\tborder-image: none;\nsnippet bdl+\n\tborder-left: ${1:1px} ${2:solid} #${3:000};\nsnippet bdlc\n\tborder-left-color: #${1:000};\nsnippet bdli\n\tborder-left-image: url(${1});\nsnippet bdli:n\n\tborder-left-image: none;\nsnippet bdls\n\tborder-left-style: ${1};\nsnippet bdls:n\n\tborder-left-style: none;\nsnippet bdlw\n\tborder-left-width: ${1};\nsnippet bdl\n\tborder-left: ${1};\nsnippet bdl:n\n\tborder-left: none;\nsnippet bdlt\n\tborder-length: ${1};\nsnippet bdlt:a\n\tborder-length: auto;\nsnippet bdrz\n\tborder-radius: ${1};\nsnippet bdr+\n\tborder-right: ${1:1px} ${2:solid} #${3:000};\nsnippet bdrc\n\tborder-right-color: #${1:000};\nsnippet bdri\n\tborder-right-image: url(${1});\nsnippet bdri:n\n\tborder-right-image: none;\nsnippet bdrs\n\tborder-right-style: ${1};\nsnippet bdrs:n\n\tborder-right-style: none;\nsnippet bdrw\n\tborder-right-width: ${1};\nsnippet bdr\n\tborder-right: ${1};\nsnippet bdr:n\n\tborder-right: none;\nsnippet bdsp\n\tborder-spacing: ${1};\nsnippet bds\n\tborder-style: ${1};\nsnippet bds:ds\n\tborder-style: dashed;\nsnippet bds:dtds\n\tborder-style: dot-dash;\nsnippet bds:dtdtds\n\tborder-style: dot-dot-dash;\nsnippet bds:dt\n\tborder-style: dotted;\nsnippet bds:db\n\tborder-style: double;\nsnippet bds:g\n\tborder-style: groove;\nsnippet bds:h\n\tborder-style: hidden;\nsnippet bds:i\n\tborder-style: inset;\nsnippet bds:n\n\tborder-style: none;\nsnippet bds:o\n\tborder-style: outset;\nsnippet bds:r\n\tborder-style: ridge;\nsnippet bds:s\n\tborder-style: solid;\nsnippet bds:w\n\tborder-style: wave;\nsnippet bdt+\n\tborder-top: ${1:1px} ${2:solid} #${3:000};\nsnippet bdtc\n\tborder-top-color: #${1:000};\nsnippet bdti\n\tborder-top-image: url(${1});\nsnippet bdti:n\n\tborder-top-image: none;\nsnippet bdtli\n\tborder-top-left-image: url(${1});\nsnippet bdtli:c\n\tborder-corner-image: continue;\nsnippet bdtli:n\n\tborder-corner-image: none;\nsnippet bdtlrz\n\tborder-top-left-radius: ${1};\nsnippet bdtri\n\tborder-top-right-image: url(${1});\nsnippet bdtri:c\n\tborder-top-right-image: continue;\nsnippet bdtri:n\n\tborder-top-right-image: none;\nsnippet bdtrrz\n\tborder-top-right-radius: ${1};\nsnippet bdts\n\tborder-top-style: ${1};\nsnippet bdts:n\n\tborder-top-style: none;\nsnippet bdtw\n\tborder-top-width: ${1};\nsnippet bdt\n\tborder-top: ${1};\nsnippet bdt:n\n\tborder-top: none;\nsnippet bdw\n\tborder-width: ${1};\nsnippet bd\n\tborder: ${1};\nsnippet bd:n\n\tborder: none;\nsnippet b\n\tbottom: ${1};\nsnippet b:a\n\tbottom: auto;\nsnippet bxsh+\n\tbox-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh\n\tbox-shadow: ${1};\nsnippet bxsh:n\n\tbox-shadow: none;\nsnippet bxz\n\tbox-sizing: ${1};\nsnippet bxz:bb\n\tbox-sizing: border-box;\nsnippet bxz:cb\n\tbox-sizing: content-box;\nsnippet cps\n\tcaption-side: ${1};\nsnippet cps:b\n\tcaption-side: bottom;\nsnippet cps:t\n\tcaption-side: top;\nsnippet cl\n\tclear: ${1};\nsnippet cl:b\n\tclear: both;\nsnippet cl:l\n\tclear: left;\nsnippet cl:n\n\tclear: none;\nsnippet cl:r\n\tclear: right;\nsnippet cp\n\tclip: ${1};\nsnippet cp:a\n\tclip: auto;\nsnippet cp:r\n\tclip: rect(${1:0} ${2:0} ${3:0} ${4:0});\nsnippet c\n\tcolor: #${1:000};\nsnippet ct\n\tcontent: ${1};\nsnippet ct:a\n\tcontent: attr(${1});\nsnippet ct:cq\n\tcontent: close-quote;\nsnippet ct:c\n\tcontent: counter(${1});\nsnippet ct:cs\n\tcontent: counters(${1});\nsnippet ct:ncq\n\tcontent: no-close-quote;\nsnippet ct:noq\n\tcontent: no-open-quote;\nsnippet ct:n\n\tcontent: normal;\nsnippet ct:oq\n\tcontent: open-quote;\nsnippet coi\n\tcounter-increment: ${1};\nsnippet cor\n\tcounter-reset: ${1};\nsnippet cur\n\tcursor: ${1};\nsnippet cur:a\n\tcursor: auto;\nsnippet cur:c\n\tcursor: crosshair;\nsnippet cur:d\n\tcursor: default;\nsnippet cur:ha\n\tcursor: hand;\nsnippet cur:he\n\tcursor: help;\nsnippet cur:m\n\tcursor: move;\nsnippet cur:p\n\tcursor: pointer;\nsnippet cur:t\n\tcursor: text;\nsnippet d\n\tdisplay: ${1};\nsnippet d:mib\n\tdisplay: -moz-inline-box;\nsnippet d:mis\n\tdisplay: -moz-inline-stack;\nsnippet d:b\n\tdisplay: block;\nsnippet d:cp\n\tdisplay: compact;\nsnippet d:ib\n\tdisplay: inline-block;\nsnippet d:itb\n\tdisplay: inline-table;\nsnippet d:i\n\tdisplay: inline;\nsnippet d:li\n\tdisplay: list-item;\nsnippet d:n\n\tdisplay: none;\nsnippet d:ri\n\tdisplay: run-in;\nsnippet d:tbcp\n\tdisplay: table-caption;\nsnippet d:tbc\n\tdisplay: table-cell;\nsnippet d:tbclg\n\tdisplay: table-column-group;\nsnippet d:tbcl\n\tdisplay: table-column;\nsnippet d:tbfg\n\tdisplay: table-footer-group;\nsnippet d:tbhg\n\tdisplay: table-header-group;\nsnippet d:tbrg\n\tdisplay: table-row-group;\nsnippet d:tbr\n\tdisplay: table-row;\nsnippet d:tb\n\tdisplay: table;\nsnippet ec\n\tempty-cells: ${1};\nsnippet ec:h\n\tempty-cells: hide;\nsnippet ec:s\n\tempty-cells: show;\nsnippet exp\n\texpression()\nsnippet fl\n\tfloat: ${1};\nsnippet fl:l\n\tfloat: left;\nsnippet fl:n\n\tfloat: none;\nsnippet fl:r\n\tfloat: right;\nsnippet f+\n\tfont: ${1:1em} ${2:Arial},${3:sans-serif};\nsnippet fef\n\tfont-effect: ${1};\nsnippet fef:eb\n\tfont-effect: emboss;\nsnippet fef:eg\n\tfont-effect: engrave;\nsnippet fef:n\n\tfont-effect: none;\nsnippet fef:o\n\tfont-effect: outline;\nsnippet femp\n\tfont-emphasize-position: ${1};\nsnippet femp:a\n\tfont-emphasize-position: after;\nsnippet femp:b\n\tfont-emphasize-position: before;\nsnippet fems\n\tfont-emphasize-style: ${1};\nsnippet fems:ac\n\tfont-emphasize-style: accent;\nsnippet fems:c\n\tfont-emphasize-style: circle;\nsnippet fems:ds\n\tfont-emphasize-style: disc;\nsnippet fems:dt\n\tfont-emphasize-style: dot;\nsnippet fems:n\n\tfont-emphasize-style: none;\nsnippet fem\n\tfont-emphasize: ${1};\nsnippet ff\n\tfont-family: ${1};\nsnippet ff:c\n\tfont-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\nsnippet ff:f\n\tfont-family: ${1:Capitals,Impact},fantasy;\nsnippet ff:m\n\tfont-family: ${1:Monaco,'Courier New'},monospace;\nsnippet ff:ss\n\tfont-family: ${1:Helvetica,Arial},sans-serif;\nsnippet ff:s\n\tfont-family: ${1:Georgia,'Times New Roman'},serif;\nsnippet fza\n\tfont-size-adjust: ${1};\nsnippet fza:n\n\tfont-size-adjust: none;\nsnippet fz\n\tfont-size: ${1};\nsnippet fsm\n\tfont-smooth: ${1};\nsnippet fsm:aw\n\tfont-smooth: always;\nsnippet fsm:a\n\tfont-smooth: auto;\nsnippet fsm:n\n\tfont-smooth: never;\nsnippet fst\n\tfont-stretch: ${1};\nsnippet fst:c\n\tfont-stretch: condensed;\nsnippet fst:e\n\tfont-stretch: expanded;\nsnippet fst:ec\n\tfont-stretch: extra-condensed;\nsnippet fst:ee\n\tfont-stretch: extra-expanded;\nsnippet fst:n\n\tfont-stretch: normal;\nsnippet fst:sc\n\tfont-stretch: semi-condensed;\nsnippet fst:se\n\tfont-stretch: semi-expanded;\nsnippet fst:uc\n\tfont-stretch: ultra-condensed;\nsnippet fst:ue\n\tfont-stretch: ultra-expanded;\nsnippet fs\n\tfont-style: ${1};\nsnippet fs:i\n\tfont-style: italic;\nsnippet fs:n\n\tfont-style: normal;\nsnippet fs:o\n\tfont-style: oblique;\nsnippet fv\n\tfont-variant: ${1};\nsnippet fv:n\n\tfont-variant: normal;\nsnippet fv:sc\n\tfont-variant: small-caps;\nsnippet fw\n\tfont-weight: ${1};\nsnippet fw:b\n\tfont-weight: bold;\nsnippet fw:br\n\tfont-weight: bolder;\nsnippet fw:lr\n\tfont-weight: lighter;\nsnippet fw:n\n\tfont-weight: normal;\nsnippet f\n\tfont: ${1};\nsnippet h\n\theight: ${1};\nsnippet h:a\n\theight: auto;\nsnippet l\n\tleft: ${1};\nsnippet l:a\n\tleft: auto;\nsnippet lts\n\tletter-spacing: ${1};\nsnippet lh\n\tline-height: ${1};\nsnippet lisi\n\tlist-style-image: url(${1});\nsnippet lisi:n\n\tlist-style-image: none;\nsnippet lisp\n\tlist-style-position: ${1};\nsnippet lisp:i\n\tlist-style-position: inside;\nsnippet lisp:o\n\tlist-style-position: outside;\nsnippet list\n\tlist-style-type: ${1};\nsnippet list:c\n\tlist-style-type: circle;\nsnippet list:dclz\n\tlist-style-type: decimal-leading-zero;\nsnippet list:dc\n\tlist-style-type: decimal;\nsnippet list:d\n\tlist-style-type: disc;\nsnippet list:lr\n\tlist-style-type: lower-roman;\nsnippet list:n\n\tlist-style-type: none;\nsnippet list:s\n\tlist-style-type: square;\nsnippet list:ur\n\tlist-style-type: upper-roman;\nsnippet lis\n\tlist-style: ${1};\nsnippet lis:n\n\tlist-style: none;\nsnippet mb\n\tmargin-bottom: ${1};\nsnippet mb:a\n\tmargin-bottom: auto;\nsnippet ml\n\tmargin-left: ${1};\nsnippet ml:a\n\tmargin-left: auto;\nsnippet mr\n\tmargin-right: ${1};\nsnippet mr:a\n\tmargin-right: auto;\nsnippet mt\n\tmargin-top: ${1};\nsnippet mt:a\n\tmargin-top: auto;\nsnippet m\n\tmargin: ${1};\nsnippet m:4\n\tmargin: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet m:3\n\tmargin: ${1:0} ${2:0} ${3:0};\nsnippet m:2\n\tmargin: ${1:0} ${2:0};\nsnippet m:0\n\tmargin: 0;\nsnippet m:a\n\tmargin: auto;\nsnippet mah\n\tmax-height: ${1};\nsnippet mah:n\n\tmax-height: none;\nsnippet maw\n\tmax-width: ${1};\nsnippet maw:n\n\tmax-width: none;\nsnippet mih\n\tmin-height: ${1};\nsnippet miw\n\tmin-width: ${1};\nsnippet op\n\topacity: ${1};\nsnippet op:ie\n\tfilter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\nsnippet op:ms\n\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\nsnippet orp\n\torphans: ${1};\nsnippet o+\n\toutline: ${1:1px} ${2:solid} #${3:000};\nsnippet oc\n\toutline-color: ${1:#000};\nsnippet oc:i\n\toutline-color: invert;\nsnippet oo\n\toutline-offset: ${1};\nsnippet os\n\toutline-style: ${1};\nsnippet ow\n\toutline-width: ${1};\nsnippet o\n\toutline: ${1};\nsnippet o:n\n\toutline: none;\nsnippet ovs\n\toverflow-style: ${1};\nsnippet ovs:a\n\toverflow-style: auto;\nsnippet ovs:mq\n\toverflow-style: marquee;\nsnippet ovs:mv\n\toverflow-style: move;\nsnippet ovs:p\n\toverflow-style: panner;\nsnippet ovs:s\n\toverflow-style: scrollbar;\nsnippet ovx\n\toverflow-x: ${1};\nsnippet ovx:a\n\toverflow-x: auto;\nsnippet ovx:h\n\toverflow-x: hidden;\nsnippet ovx:s\n\toverflow-x: scroll;\nsnippet ovx:v\n\toverflow-x: visible;\nsnippet ovy\n\toverflow-y: ${1};\nsnippet ovy:a\n\toverflow-y: auto;\nsnippet ovy:h\n\toverflow-y: hidden;\nsnippet ovy:s\n\toverflow-y: scroll;\nsnippet ovy:v\n\toverflow-y: visible;\nsnippet ov\n\toverflow: ${1};\nsnippet ov:a\n\toverflow: auto;\nsnippet ov:h\n\toverflow: hidden;\nsnippet ov:s\n\toverflow: scroll;\nsnippet ov:v\n\toverflow: visible;\nsnippet pb\n\tpadding-bottom: ${1};\nsnippet pl\n\tpadding-left: ${1};\nsnippet pr\n\tpadding-right: ${1};\nsnippet pt\n\tpadding-top: ${1};\nsnippet p\n\tpadding: ${1};\nsnippet p:4\n\tpadding: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet p:3\n\tpadding: ${1:0} ${2:0} ${3:0};\nsnippet p:2\n\tpadding: ${1:0} ${2:0};\nsnippet p:0\n\tpadding: 0;\nsnippet pgba\n\tpage-break-after: ${1};\nsnippet pgba:aw\n\tpage-break-after: always;\nsnippet pgba:a\n\tpage-break-after: auto;\nsnippet pgba:l\n\tpage-break-after: left;\nsnippet pgba:r\n\tpage-break-after: right;\nsnippet pgbb\n\tpage-break-before: ${1};\nsnippet pgbb:aw\n\tpage-break-before: always;\nsnippet pgbb:a\n\tpage-break-before: auto;\nsnippet pgbb:l\n\tpage-break-before: left;\nsnippet pgbb:r\n\tpage-break-before: right;\nsnippet pgbi\n\tpage-break-inside: ${1};\nsnippet pgbi:a\n\tpage-break-inside: auto;\nsnippet pgbi:av\n\tpage-break-inside: avoid;\nsnippet pos\n\tposition: ${1};\nsnippet pos:a\n\tposition: absolute;\nsnippet pos:f\n\tposition: fixed;\nsnippet pos:r\n\tposition: relative;\nsnippet pos:s\n\tposition: static;\nsnippet q\n\tquotes: ${1};\nsnippet q:en\n\tquotes: '\\201C' '\\201D' '\\2018' '\\2019';\nsnippet q:n\n\tquotes: none;\nsnippet q:ru\n\tquotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\nsnippet rz\n\tresize: ${1};\nsnippet rz:b\n\tresize: both;\nsnippet rz:h\n\tresize: horizontal;\nsnippet rz:n\n\tresize: none;\nsnippet rz:v\n\tresize: vertical;\nsnippet r\n\tright: ${1};\nsnippet r:a\n\tright: auto;\nsnippet tbl\n\ttable-layout: ${1};\nsnippet tbl:a\n\ttable-layout: auto;\nsnippet tbl:f\n\ttable-layout: fixed;\nsnippet tal\n\ttext-align-last: ${1};\nsnippet tal:a\n\ttext-align-last: auto;\nsnippet tal:c\n\ttext-align-last: center;\nsnippet tal:l\n\ttext-align-last: left;\nsnippet tal:r\n\ttext-align-last: right;\nsnippet ta\n\ttext-align: ${1};\nsnippet ta:c\n\ttext-align: center;\nsnippet ta:l\n\ttext-align: left;\nsnippet ta:r\n\ttext-align: right;\nsnippet td\n\ttext-decoration: ${1};\nsnippet td:l\n\ttext-decoration: line-through;\nsnippet td:n\n\ttext-decoration: none;\nsnippet td:o\n\ttext-decoration: overline;\nsnippet td:u\n\ttext-decoration: underline;\nsnippet te\n\ttext-emphasis: ${1};\nsnippet te:ac\n\ttext-emphasis: accent;\nsnippet te:a\n\ttext-emphasis: after;\nsnippet te:b\n\ttext-emphasis: before;\nsnippet te:c\n\ttext-emphasis: circle;\nsnippet te:ds\n\ttext-emphasis: disc;\nsnippet te:dt\n\ttext-emphasis: dot;\nsnippet te:n\n\ttext-emphasis: none;\nsnippet th\n\ttext-height: ${1};\nsnippet th:a\n\ttext-height: auto;\nsnippet th:f\n\ttext-height: font-size;\nsnippet th:m\n\ttext-height: max-size;\nsnippet th:t\n\ttext-height: text-size;\nsnippet ti\n\ttext-indent: ${1};\nsnippet ti:-\n\ttext-indent: -9999px;\nsnippet tj\n\ttext-justify: ${1};\nsnippet tj:a\n\ttext-justify: auto;\nsnippet tj:d\n\ttext-justify: distribute;\nsnippet tj:ic\n\ttext-justify: inter-cluster;\nsnippet tj:ii\n\ttext-justify: inter-ideograph;\nsnippet tj:iw\n\ttext-justify: inter-word;\nsnippet tj:k\n\ttext-justify: kashida;\nsnippet tj:t\n\ttext-justify: tibetan;\nsnippet to+\n\ttext-outline: ${1:0} ${2:0} #${3:000};\nsnippet to\n\ttext-outline: ${1};\nsnippet to:n\n\ttext-outline: none;\nsnippet tr\n\ttext-replace: ${1};\nsnippet tr:n\n\ttext-replace: none;\nsnippet tsh+\n\ttext-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet tsh\n\ttext-shadow: ${1};\nsnippet tsh:n\n\ttext-shadow: none;\nsnippet tt\n\ttext-transform: ${1};\nsnippet tt:c\n\ttext-transform: capitalize;\nsnippet tt:l\n\ttext-transform: lowercase;\nsnippet tt:n\n\ttext-transform: none;\nsnippet tt:u\n\ttext-transform: uppercase;\nsnippet tw\n\ttext-wrap: ${1};\nsnippet tw:no\n\ttext-wrap: none;\nsnippet tw:n\n\ttext-wrap: normal;\nsnippet tw:s\n\ttext-wrap: suppress;\nsnippet tw:u\n\ttext-wrap: unrestricted;\nsnippet t\n\ttop: ${1};\nsnippet t:a\n\ttop: auto;\nsnippet va\n\tvertical-align: ${1};\nsnippet va:bl\n\tvertical-align: baseline;\nsnippet va:b\n\tvertical-align: bottom;\nsnippet va:m\n\tvertical-align: middle;\nsnippet va:sub\n\tvertical-align: sub;\nsnippet va:sup\n\tvertical-align: super;\nsnippet va:tb\n\tvertical-align: text-bottom;\nsnippet va:tt\n\tvertical-align: text-top;\nsnippet va:t\n\tvertical-align: top;\nsnippet v\n\tvisibility: ${1};\nsnippet v:c\n\tvisibility: collapse;\nsnippet v:h\n\tvisibility: hidden;\nsnippet v:v\n\tvisibility: visible;\nsnippet whsc\n\twhite-space-collapse: ${1};\nsnippet whsc:ba\n\twhite-space-collapse: break-all;\nsnippet whsc:bs\n\twhite-space-collapse: break-strict;\nsnippet whsc:k\n\twhite-space-collapse: keep-all;\nsnippet whsc:l\n\twhite-space-collapse: loose;\nsnippet whsc:n\n\twhite-space-collapse: normal;\nsnippet whs\n\twhite-space: ${1};\nsnippet whs:n\n\twhite-space: normal;\nsnippet whs:nw\n\twhite-space: nowrap;\nsnippet whs:pl\n\twhite-space: pre-line;\nsnippet whs:pw\n\twhite-space: pre-wrap;\nsnippet whs:p\n\twhite-space: pre;\nsnippet wid\n\twidows: ${1};\nsnippet w\n\twidth: ${1};\nsnippet w:a\n\twidth: auto;\nsnippet wob\n\tword-break: ${1};\nsnippet wob:ba\n\tword-break: break-all;\nsnippet wob:bs\n\tword-break: break-strict;\nsnippet wob:k\n\tword-break: keep-all;\nsnippet wob:l\n\tword-break: loose;\nsnippet wob:n\n\tword-break: normal;\nsnippet wos\n\tword-spacing: ${1};\nsnippet wow\n\tword-wrap: ${1};\nsnippet wow:no\n\tword-wrap: none;\nsnippet wow:n\n\tword-wrap: normal;\nsnippet wow:s\n\tword-wrap: suppress;\nsnippet wow:u\n\tword-wrap: unrestricted;\nsnippet z\n\tz-index: ${1};\nsnippet z:a\n\tz-index: auto;\nsnippet zoo\n\tzoom: 1;\n"}),ace.define("ace/snippets/css",["require","exports","module","ace/snippets/css.snippets"],function(e,t,n){"use strict";t.snippetText=e("./css.snippets"),t.scope="css"}),ace.require(["ace/snippets/css"],function(t){e&&(e.exports=t)})},8655:(e,t)=>{var n;!function(){"use strict";var o=function(){function e(){}function t(e,t){for(var n=t.length,o=0;o<n;++o)r(e,t[o])}e.prototype=Object.create(null);var n={}.hasOwnProperty,o=/\s+/;function r(e,r){if(r){var i=typeof r;"string"===i?function(e,t){for(var n=t.split(o),r=n.length,i=0;i<r;++i)e[n[i]]=!0}(e,r):Array.isArray(r)?t(e,r):"object"===i?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var o in t)n.call(t,o)&&(e[o]=!!t[o]);else e[t.toString()]=!0}(e,r):"number"===i&&function(e,t){e[t]=!0}(e,r)}}return function(){for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var i=new e;t(i,o);var s=[];for(var a in i)i[a]&&s.push(a);return s.join(" ")}}();e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.amdD=function(){throw new Error("define cannot be used indirect")},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e={};n.r(e),n.d(e,{apiFetch:()=>Rg,setPortfolioLayouts:()=>Ig});var t={};n.r(t),n.d(t,{API_FETCH:()=>Dg});var o={};n.r(o),n.d(o,{getPortfolioLayouts:()=>Fg});var r={};n.r(r),n.d(r,{getPortfolioLayouts:()=>zg});var i={};n.r(i),n.d(i,{get:()=>qg});var s={};n.r(s),n.d(s,{get:()=>Xg});const a=window.wp.blocks;var l,c,u,p,h=n(1609),d=n.n(h);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},f.apply(null,arguments)}var g=function(e){return h.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),l||(l=h.createElement("rect",{width:24,height:24,fill:"currentColor",rx:12})),c||(c=h.createElement("path",{fill:"url(#a)",d:"m13.808 16.68 3.05-8.76h-2.83l-2.748 8.76z"})),u||(u=h.createElement("path",{fill:"#fff",d:"M10.251 16.68 7.2 7.92h2.831l2.747 8.76z"})),p||(p=h.createElement("defs",null,h.createElement("linearGradient",{id:"a",x1:15.48,x2:7.92,y1:7.92,y2:18.48,gradientUnits:"userSpaceOnUse"},h.createElement("stop",{stopColor:"#fff"}),h.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:0})))))};const m=JSON.parse('{"UU":"visual-portfolio/block","aM":["vp/queryType","vp/baseQuery","vp/postsQuery","vp/imagesQuery"]}');function v(){return null}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){x(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x(e,t,n){return(t=function(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=window.VPGutenbergVariables.attributes,C={items_style_default__align:"items_style_default__caption_text_align",items_style_fade__align:"items_style_fade__overlay_text_align",items_style_fly__align:"items_style_fly__overlay_text_align",items_style_emerge__align:"items_style_emerge__caption_text_align",items_style_caption_move__align:"items_style_caption_move__caption_text_align",items_style_default__bg_color:"items_style_default__overlay_bg_color",items_style_default__text_color:"items_style_default__overlay_text_color",items_style_default__meta_text_color:"items_style_default__caption_text_color",items_style_default__meta_links_color:"items_style_default__caption_links_color",items_style_default__meta_links_hover_color:"items_style_default__caption_links_hover_color",items_style_fade__bg_color:"items_style_fade__overlay_bg_color",items_style_fade__text_color:"items_style_fade__overlay_text_color",items_style_fly__bg_color:"items_style_fly__overlay_bg_color",items_style_fly__text_color:"items_style_fly__overlay_text_color",items_style_emerge__bg_color:"items_style_emerge__caption_bg_color",items_style_emerge__text_color:"items_style_emerge__caption_text_color",items_style_emerge__links_color:"items_style_emerge__caption_links_color",items_style_emerge__links_hover_color:"items_style_emerge__caption_links_hover_color",items_style_emerge__img_overlay_bg_color:"items_style_emerge__overlay_bg_color","items_style_caption-move__bg_color":"items_style_caption-move__caption_bg_color","items_style_caption-move__text_color":"items_style_caption-move__caption_text_color","items_style_caption-move__img_overlay_bg_color":"items_style_caption-move__overlay_bg_color","items_style_caption-move__overlay_text_color":"items_style_caption-move__overlay_text_color",items_style_fade__move_overlay_under_image:"items_style_fade__overlay_under_image",items_style_fly__move_overlay_under_image:"items_style_fly__overlay_under_image",items_style_emerge__move_overlay_under_image:"items_style_emerge__caption_under_image","items_style_caption-move__move_overlay_under_image":"items_style_caption-move__caption_under_image"},_=["items_style_default__images_rounded_corners","items_style_fade__images_rounded_corners","items_style_fly__images_rounded_corners","items_style_emerge__images_rounded_corners","items_style_caption_move__images_rounded_corners"];const k=[{attributes:w(w(w({},S),($={},Object.keys(C).forEach(function(e){$[e]={type:"string"}}),$)),function(){var e={};return _.forEach(function(t){e[t]={type:"number",default:0}}),e}()),migrate:function(e){var t=w({},e);return Object.keys(C).forEach(function(e){e in t&&(t[e]&&(t[C[e]]=t[e]),delete t[e])}),_.forEach(function(e){"number"==typeof t[e]&&(t[e]="".concat(t[e],"px"))}),[t,[]]},isEligible:function(e){var t=Object.keys(C),n=!1;return t.forEach(function(t){!n&&t in e&&(n=!0)}),_.forEach(function(t){n||"number"!=typeof e[t]||(n=!0)}),n},save:v}];var $;const E=window.wp.blockEditor,O=window.wp.element;var M=n(8655),T=n.n(M);const A=window.wp.components,L=window.wp.hooks,R=window.wp.i18n;function I(e,t){var n=t[e];if(void 0===n&&/[\[\.]/g.test(e)){var o=e.split("."),r=[];if(o&&o.length&&(o.forEach(function(e){if(/[\[]/g.test(e)){var t=e.split(/[\[\]]/g);t&&t.length&&t.forEach(function(e){""!==e&&("".concat(parseInt(e,10))===e?r.push(parseInt(e,10)):r.push(e))})}else r.push(e)}),r.length)){var i=t;r.forEach(function(e){i=i&&void 0!==i[e]?i[e]:void 0}),n=i}}return n}function D(e,t,n){var o=!0;switch(t){case"==":o=e==n;break;case"===":o=e===n;break;case"!=":o=e!=n;break;case"!==":o=e!==n;break;case"*=":o=-1!==e.indexOf(n);break;case">=":o=e>=n;break;case"<=":o=e<=n;break;case">":o=e>n;break;case"<":o=e<n;break;case"&&":case"AND":o=e&&n;break;case"||":case"OR":o=e||n;break;default:o=e}return o}function P(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"AND",o="AND"===n,r=o?"OR":"AND";return e.forEach(function(e){if(Array.isArray(e)&&!e.control)o=D(o,n,P(e,t,r));else if(e.control){var i=I(e.control,t),s=e.operator||"==",a=void 0!==e.value?e.value:"true";"true"===i?i=!0:"false"===i&&(i=!1),"true"===a?a=!0:"false"===a&&(a=!1),o=D(o,n,D(i,s,a))}}),o}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){z(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function z(e,t,n){return(t=function(e){var t=function(e){if("object"!=N(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var H={queryType:"content_source"},V={"baseQuery.perPage":"items_count","postsQuery.source":"posts_source","postsQuery.postTypesSet":"post_types_set","postsQuery.ids":"posts_ids","postsQuery.excludeIds":"posts_excluded_ids","postsQuery.order":"posts_order_direction","postsQuery.orderBy":"posts_order_by","postsQuery.offset":"posts_offset","postsQuery.taxonomies":"posts_taxonomies","postsQuery.taxonomiesRelation":"posts_taxonomies_relation","postsQuery.avoidDuplicates":"posts_avoid_duplicate_posts","postsQuery.customQuery":"posts_custom_query","imagesQuery.images":"images","imagesQuery.categories":"image_categories","imagesQuery.orderBy":"images_order_by","imagesQuery.order":"images_order_direction","imagesQuery.titlesSource":"images_titles_source","imagesQuery.descriptionsSource":"images_descriptions_source"},U={modernToLegacy:{queryType:{posts:"post-based"}},legacyToModern:{content_source:{"post-based":"posts"}}},G={baseQuery:{perPage:6,maxPages:1},postsQuery:{source:"portfolio",postTypesSet:["post"],ids:[],excludeIds:[],order:"desc",orderBy:"post_date",offset:0,taxonomies:[],taxonomiesRelation:"or",avoidDuplicates:!1,customQuery:""},imagesQuery:{images:[],categories:[],orderBy:"default",order:"asc",titlesSource:"custom",descriptionsSource:"custom"}};function K(e){var t={},n=e;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(n={},Object.entries(G).forEach(function(t){var o=B(t,2),r=o[0],i=o[1];n[r]=F(F({},i),e[r])}),Object.keys(e).forEach(function(t){G[t]||(n[t]=e[t])})),Object.entries(H).forEach(function(e){var o=B(e,2),r=o[0],i=o[1];if(void 0!==n[r]){var s=n[r];U.modernToLegacy[r]&&(s=U.modernToLegacy[r][s]||s),t[i]=s}}),Object.entries(V).forEach(function(e){var o,r=B(e,2),i=r[0],s=r[1],a=(o=n,i.split(".").reduce(function(e,t){return null==e?void 0:e[t]},o));void 0!==a&&(t[s]=a)}),t}function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}var q={},Q={};function X(e){if(q[e])return q[e];var t={};if("object"===Y(e))return Object.keys(e).forEach(function(n){t[X(n)]=X(e[n])}),t;if("string"==typeof(t=e))try{t=t.replace(/--/gm,"_u002d__u002d_"),t=encodeURIComponent(t)}catch(e){console.warn(e)}return q[e]=t,t}function Z(e){if(Q[e])return Q[e];var t={};if("object"===Y(e))return Object.keys(e).forEach(function(n){t[Z(n)]=Z(e[n])}),t;if("string"==typeof(t=e))try{t=(t=decodeURIComponent(t)).replace(/_u002d__u002d_/gm,"--")}catch(e){console.warn(e)}return Q[e]=t,t}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ee(e){var t,n=e.options,o=e.value,r=e.onChange,i=["left","center","right"];return"box"===n&&(i=["top-left","top-center","top-right"].concat(function(e){if(Array.isArray(e))return J(e)}(t=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return J(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),["bottom-left","bottom-center","bottom-right"])),wp.element.createElement("div",{className:"vpf-component-align-control"},i.map(function(e){var t=e.split("-").map(function(e){return e.slice(0,1).toUpperCase()+e.slice(1)}).join(" ");return wp.element.createElement(A.Tooltip,{key:"align-".concat(e),text:t},wp.element.createElement(A.Button,{className:T()("vpf-component-align-control-".concat(e),o===e?"vpf-component-align-control-active":""),onClick:function(){r(e)}},wp.element.createElement("span",null),wp.element.createElement("span",null),wp.element.createElement("span",null)))}))}function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function oe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,re(o.key),o)}}function re(e){var t=function(e){if("object"!=te(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==te(t)?t:t+""}function ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ie=function(){return!!e})()}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}var le={"":(0,R.__)("Auto","visual-portfolio"),"16:9":(0,R.__)("Wide 16:9","visual-portfolio"),"21:9":(0,R.__)("Ultra Wide 21:9","visual-portfolio"),"4:3":(0,R.__)("TV 4:3","visual-portfolio"),"3:2":(0,R.__)("Classic Film 3:2","visual-portfolio"),custom:(0,R.__)("Custom","visual-portfolio")},ce=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=function(e,t,n){return t=se(t),function(e,t){if(t&&("object"==te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ie()?Reflect.construct(t,n||[],se(e).constructor):t.apply(e,n))}(this,t,[].concat(o))).state={isCustom:void 0===le[e.props.value]},e.updatePart=e.updatePart.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ae(e,t)}(t,e),n=t,o=[{key:"parseParts",value:function(e){var t="",n="";if(e&&/:/g.test(e)){var o=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ne(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split(":"),2);t=o[0],n=o[1]}return[t,n]}},{key:"updatePart",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.props,o=n.value,r=n.onChange,i=this.parseParts(o);e&&i[0]&&i[1]&&(t?i[0]=e:i[1]=e,r("".concat(i[0],":").concat(i[1])))}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,o=t.onChange,r=this.state.isCustom,i=this.parseParts(n);return wp.element.createElement("div",{className:"vpf-component-aspect-ratio"},wp.element.createElement(A.SelectControl,{value:r?"custom":n,onChange:function(t){"custom"===t?(e.setState({isCustom:!0}),n||o("3:4")):(e.setState({isCustom:!1}),o(t))},options:Object.keys(le).map(function(e){return{label:le[e],value:e}}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),r?wp.element.createElement("div",{className:"vpf-component-aspect-ratio-custom"},wp.element.createElement(A.TextControl,{label:(0,R.__)("Width","visual-portfolio"),type:"number",value:i[0],onChange:function(t){return e.updatePart(t,!0)},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),wp.element.createElement(A.TextControl,{label:(0,R.__)("Height","visual-portfolio"),type:"number",value:i[1],onChange:function(t){return e.updatePart(t,!1)},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})):"")}}],o&&oe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(O.Component);function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},pe.apply(null,arguments)}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function de(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ge(o.key),o)}}function fe(e,t,n){return t&&de(e.prototype,t),n&&de(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ge(e){var t=function(e){if("object"!=ue(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ue(t)?t:t+""}function me(e,t,n){return t=ye(t),function(e,t){if(t&&("object"==ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ve()?Reflect.construct(t,n||[],ye(e).constructor):t.apply(e,n))}function ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ve=function(){return!!e})()}function ye(e){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ye(e)}function be(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&we(e,t)}function we(e,t){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},we(e,t)}var xe=window.navigator;function Se(e){if(e&&e.hasChildNodes()){for(var t=[],n=0;n<e.childNodes.length;n+=1)t.push(Se(e.childNodes[n]));return{classList:e.classList,nodeName:e.nodeName,children:t}}return!1}var Ce=function(e){function t(){var e;he(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=me(this,t,[].concat(o))).state={nodes:!1},e.onFrameLoad=e.onFrameLoad.bind(e),e.maybeFindIframe=e.maybeFindIframe.bind(e),e.updateTreeData=e.updateTreeData.bind(e),e}return be(t,e),fe(t,[{key:"componentDidMount",value:function(){this.maybeFindIframe()}},{key:"componentDidUpdate",value:function(){this.maybeFindIframe()}},{key:"componentWillUnmount",value:function(){this.iframePreview&&this.iframePreview.removeEventListener("load",this.onFrameLoad)}},{key:"onFrameLoad",value:function(){this.iframePreview.contentWindow&&(this.frameJQuery=this.iframePreview.contentWindow.jQuery,this.frameJQuery&&(this.$framePortfolio=this.frameJQuery(".vp-portfolio")),this.updateTreeData())}},{key:"maybeFindIframe",value:function(){if(!this.iframePreview){var e=this.props.clientId,t=document.querySelector("#block-".concat(e," iframe"));t&&(this.iframePreview=t,this.iframePreview.addEventListener("load",this.onFrameLoad),this.onFrameLoad())}}},{key:"updateTreeData",value:function(){this.$framePortfolio&&this.setState({nodes:Se(this.$framePortfolio[0])})}},{key:"render",value:function(){return this.iframePreview?wp.element.createElement("div",{className:"vpf-component-classes-tree"},wp.element.createElement(t.TreeItem,{node:this.state.nodes,skipNodeByClass:/vp-portfolio__item-popup/,collapseByClass:/^(vp-portfolio__preloader-wrap|vp-portfolio__filter-wrap|vp-portfolio__sort-wrap|vp-portfolio__items-wrap|vp-portfolio__pagination-wrap)$/,skipClass:/vp-uid-/})):null}}])}(O.Component);Ce.TreeItem=function(e){function t(){var e;he(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=me(this,t,[].concat(o))).state={isCollapsed:null},e.isCollapsed=e.isCollapsed.bind(e),e}return be(t,e),fe(t,[{key:"isCollapsed",value:function(){var e=this.props,t=e.node,n=e.collapseByClass,o=this.state.isCollapsed;return null===o&&t&&t.classList&&t.classList.length&&t.classList.forEach(function(e){n&&n.test(e)&&(o=!0)}),o}},{key:"render",value:function(){var e=this,t=this.props,n=t.node,o=t.skipNodeByClass,r=t.skipClass;if(!n||!n.children.length)return null;var i=[],s=!1;return n.classList&&n.classList.length&&n.classList.forEach(function(e){r&&r.test(e)||i.push(e),o&&o.test(e)&&(s=!0)}),s?null:wp.element.createElement("ul",null,wp.element.createElement("li",{className:"vpf-component-classes-tree-node ".concat(this.isCollapsed()?"":"is-collapsed")},wp.element.createElement("div",null,n.children.length?wp.element.createElement("button",{type:"button",className:"vpf-component-classes-tree-node-collapse",onClick:function(){return e.setState({isCollapsed:!e.isCollapsed()})}}):"","<",n.nodeName.toLowerCase(),i.length?wp.element.createElement(wp.element.Fragment,null,' class="',i.map(function(e){return wp.element.createElement("button",{key:e,type:"button",className:"vpf-component-classes-tree-node-class",onClick:function(){xe.clipboard.writeText(e)}},e)}),'" '):"",">")),n.children.length&&this.isCollapsed()?n.children.map(function(t){return t?wp.element.createElement("li",{className:"vpf-component-classes-tree-child"},wp.element.createElement(Ce.TreeItem,pe({},e.props,{node:t}))):null}):"")}}])}(O.Component);var _e=n(470);function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function $e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ee(o.key),o)}}function Ee(e){var t=function(e){if("object"!=ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ke(t)?t:t+""}function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}function Te(e,t){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Te(e,t)}n(3158),n(1766),n(8457),n(4139),n(8171),n(47);var Ae=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=function(e,t,n){return t=Me(t),function(e,t){if(t&&("object"==ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oe()?Reflect.construct(t,n||[],Me(e).constructor):t.apply(e,n))}(this,t,[].concat(o))).state={codePlaceholder:e.props.codePlaceholder},e.maybeRemovePlaceholder=e.maybeRemovePlaceholder.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Te(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){this.maybeRemovePlaceholder()}},{key:"maybeRemovePlaceholder",value:function(){var e=this.props.value,t=this.state.codePlaceholder;e&&t&&this.setState({codePlaceholder:""})}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,o=t.onChange,r=t.mode,i=t.maxLines,s=t.minLines,a=this.state.codePlaceholder;return wp.element.createElement(_e.Ay,{className:"vpf-component-code-editor",theme:"textmate",onLoad:function(e){e.renderer.setScrollMargin(16,16,16,16),e.renderer.setPadding(16)},fontSize:12,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!1,width:"100%",setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,printMargin:!1,tabSize:2},editorProps:{$blockScrolling:1/0},value:n||a,onChange:function(t){o(t===a?"":t),e.maybeRemovePlaceholder()},mode:r,maxLines:i,minLines:s})}}])&&$e(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(O.Component);function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Re(e){var t=e.children,n=e.options,o=e.initialOpen,r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Le(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Le(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,O.useState)(o),2),i=r[0],s=r[1];return wp.element.createElement("div",{className:"vpf-component-collapse-control"},n.map(function(e){return wp.element.createElement(O.Fragment,{key:e.category},wp.element.createElement(A.Button,{onClick:function(){s(e.category===i?"":e.category)},className:T()("vpf-component-collapse-control-toggle",e.category===i?"vpf-component-collapse-control-active":"")},wp.element.createElement("span",null,e.title),wp.element.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",className:"components-panel__arrow","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}))),wp.element.createElement("div",{className:T()("vpf-component-collapse-control-content",e.category===i?"vpf-component-collapse-control-content-active":"")},t(e)))}))}const Ie=window.wp.data;function De(e){var t=e.label,n=e.value,o=e.onChange,r=e.alpha,i=void 0!==r&&r,s=e.gradient,a=void 0!==s&&s,l=e.afterDropdownContent,c=function(){if(E.__experimentalUseMultipleOriginColorsAndGradients&&(0,E.__experimentalUseMultipleOriginColorsAndGradients)()){var e=(0,E.__experimentalUseMultipleOriginColorsAndGradients)();return{colors:e.colors,gradients:e.gradients}}var t=(0,Ie.useSelect)(function(e){var t=e("core/block-editor").getSettings(),n=[],o=[];return t.colors&&t.colors.length&&n.push({name:"Theme",colors:t.colors}),t.gradients&&t.gradients.length&&o.push({name:"Theme",gradients:t.gradients}),{colors:n,gradients:o}});return{colors:t.colors,gradients:t.gradients}}(),u=c.colors,p=c.gradients,h=n&&n.match(/gradient/),d=h?void 0:n,f=h?n:void 0,g={solid:wp.element.createElement(A.ColorPalette,{colors:u,value:d,enableAlpha:i,onChange:function(e){o(e)},__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0}),gradient:wp.element.createElement(A.GradientPicker,{__nextHasNoMargin:!0,value:f,onChange:function(e){o(e)},gradients:p})};return wp.element.createElement(A.Dropdown,{className:"vpf-component-color-picker__dropdown",contentClassName:"vpf-component-color-picker__dropdown-content",popoverProps:{placement:"left-start",offset:36,shift:!0},renderToggle:function(e){var o=e.isOpen,r=e.onToggle;return wp.element.createElement(A.Button,{className:T()("vpf-component-color-toggle",o?"vpf-component-color-toggle-active":""),onClick:r},wp.element.createElement("span",{className:"vpf-component-color-toggle-indicator",style:{background:n||""}}),wp.element.createElement("span",{className:"vpf-component-color-toggle-label"},t))},renderContent:function(){return wp.element.createElement("div",{className:"vpf-component-color-picker"},a?wp.element.createElement(A.TabPanel,{tabs:[{name:"solid",title:"Solid"},{name:"gradient",title:"Gradient"}],initialTabName:h?"gradient":"solid"},function(e){return g[e.name]}):g.solid,l||"")}})}const Pe=window.wp.date;function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function je(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Fe(o.key),o)}}function Fe(e){var t=function(e){if("object"!=Ne(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:t+""}function ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ze=function(){return!!e})()}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Be(e)}function We(e,t){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},We(e,t)}var He=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Be(t),function(e,t){if(t&&("object"==Ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ze()?Reflect.construct(t,n||[],Be(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&We(e,t)}(t,e),n=t,o=[{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,o=(0,Pe.__experimentalGetSettings)().formats.datetime||"F j, Y";return wp.element.createElement(A.Dropdown,{renderToggle:function(e){var n=e.onToggle;return wp.element.createElement(A.Button,{variant:"secondary",onClick:n},t?(0,Pe.dateI18n)(o,t):(0,R.__)("Select Date","visual-portfolio"))},renderContent:function(){return wp.element.createElement("div",{className:"components-datetime vpf-component-date-picker"},wp.element.createElement(A.DatePicker,{currentDate:t,onChange:n}),t?wp.element.createElement(A.Button,{variant:"secondary",onClick:function(){n("")}},(0,R.__)("Reset Date","visual-portfolio")):"")}})}}],o&&je(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(O.Component);function Ve(e){var t=(0,Ie.select)(E.store),n=t.getBlockParents,o=t.getBlock;return n(e).some(function(e){return"visual-portfolio/loop"===o(e).name})}function Ue(e){return Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(e)}function Ge(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Je(o.key),o)}}function Ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ke=function(){return!!e})()}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ye(e)}function qe(e,t){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qe(e,t)}function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach(function(t){Ze(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ze(e,t,n){return(t=Je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e){var t=function(e){if("object"!=Ue(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ue(t)?t:t+""}function et(){return et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},et.apply(null,arguments)}function tt(e,t){if(e){if("string"==typeof e)return nt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nt(e,t):void 0}}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var ot={left:wp.element.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),center:wp.element.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),right:wp.element.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),between:wp.element.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}))};function rt(e){var t=e.location,n=e.locationData,o=e.value,r=e.onChange,i=e.options,s=e.optionName,a=e.parentProps,l=a.props.clientId,c=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||tt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,O.useState)(!1),2),u=c[0],p=c[1];return Ve(l)?i[s]&&i[s].category?wp.element.createElement(_p,et({},a.props,{category:"layouts",categoryToggle:!1,showPanel:!1})):null:wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("button",{type:"button","aria-expanded":u,className:"vpf-component-elements-selector-control-location-options-item",onClick:function(){return p(!0)}},i[s]?i[s].title:s,wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M11 4L17 10M17 10L11 16M17 10H3",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),u&&wp.element.createElement(A.Modal,{title:"".concat(i[s]?i[s].title:s," ").concat((0,R.__)("Settings","visual-portfolio")),onRequestClose:function(e){var t;null!=e&&null!==(t=e.relatedTarget)&&void 0!==t&&null!==(t=t.classList)&&void 0!==t&&t.contains("media-modal")||p(!1)},className:"vpf-component-elements-selector-modal"},i[s]&&i[s].category&&wp.element.createElement(_p,et({},a.props,{category:i[s].category,categoryToggle:!1})),"items"!==s&&wp.element.createElement(A.PanelBody,null,wp.element.createElement(A.Button,{isLink:!0,style:{color:"red",marginTop:"5px"},onClick:function(){window.confirm((0,R.__)("Are you sure you want to remove the element?","visual-portfolio"))&&r(Xe(Xe({},o),{},Ze({},t,Xe(Xe({},o[t]),{},{elements:n.elements.filter(function(e){return e!==s})}))))}},(0,R.__)("Remove","visual-portfolio")," ".concat(i[s]?i[s].title:s)))))}var it=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=function(e,t,n){return t=Ye(t),function(e,t){if(t&&("object"==Ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ke()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n))}(this,t,[].concat(o))).getLocationData=e.getLocationData.bind(e),e.renderLocation=e.renderLocation.bind(e),e.renderAlignSettings=e.renderAlignSettings.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qe(e,t)}(t,e),n=t,o=[{key:"getLocationData",value:function(e){var t=this.props,n=t.options,o=t.locations,r=t.value,i=o[e]&&o[e].title||!1,s=r[e]&&r[e].elements?r[e].elements:[],a=!(!r[e]||!r[e].align)&&r[e].align,l=o[e]&&o[e].align?o[e].align:[],c={};return Object.keys(n).forEach(function(t){var o=n[t];o.allowed_locations&&-1===o.allowed_locations.indexOf(e)||-1!==s.indexOf(t)||(c[t]=o)}),{title:i,elements:s,align:a,availableAlign:l,availableElements:c}}},{key:"renderAlignSettings",value:function(e){var t=this.props,n=t.value,o=t.onChange,r=this.getLocationData(e),i=[];return r.availableAlign.length&&r.availableAlign.forEach(function(t){i.push(wp.element.createElement(A.ToolbarButton,{key:t,icon:ot[t],label:"".concat(t.charAt(0).toUpperCase()+t.slice(1)),onClick:function(){return o(Xe(Xe({},n),{},Ze({},e,Xe(Xe({},n[e]),{},{align:t}))))},isActive:!!r.align&&r.align===t}))}),i.length?wp.element.createElement(A.Dropdown,{className:"vpf-component-elements-selector-align__dropdown",contentClassName:"vpf-component-elements-selector-align__dropdown-content",popoverProps:{placement:"left-start",offset:36,shift:!0},renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return wp.element.createElement("button",{type:"button","aria-expanded":t,className:"vpf-component-elements-selector-control-location-options-item",onClick:n},r.align&&ot[r.align]?ot[r.align]:ot.center)},renderContent:function(){return wp.element.createElement(A.Toolbar,{label:"Elements Selector"},i)}}):null}},{key:"renderLocation",value:function(e){var t=this,n=this.props,o=n.value,r=n.onChange,i=n.options,s=n.props.clientId,a=this.getLocationData(e),l=a.availableElements;return Ve(s)?a.elements.length>0&&a.elements.filter(function(e){return"items"===e}).map(function(n){return wp.element.createElement(rt,{key:n+e,location:e,locationData:a,value:o,onChange:r,options:i,optionName:n,parentProps:t.props})}):wp.element.createElement("div",{key:e,className:"vpf-component-elements-selector-control-location"},a.title?wp.element.createElement("div",{className:"vpf-component-elements-selector-control-location-title"},a.title):null,a.availableAlign.length&&a.elements.length?wp.element.createElement("div",{className:"vpf-component-elements-selector-control-location-align"},this.renderAlignSettings(e)):null,wp.element.createElement("div",{className:T()("vpf-component-elements-selector-control-location-options",a.align?"vpf-component-elements-selector-control-location-options-".concat(a.align):"")},a.elements.length?a.elements.map(function(n){return wp.element.createElement(rt,{key:n,location:e,locationData:a,value:o,onChange:r,options:i,optionName:n,parentProps:t.props})}):null,Object.keys(l).length?wp.element.createElement(A.DropdownMenu,{className:"vpf-component-elements-selector-control-location-options-add-button",popoverProps:{position:"bottom center"},icon:wp.element.createElement("svg",{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),controls:Object.keys(l).map(function(t){return{title:wp.element.createElement(wp.element.Fragment,null,l[t].title,l[t].is_pro?wp.element.createElement("span",{className:"vpf-component-elements-selector-control-location-options-title-pro"},(0,R.__)("PRO","visual-portfolio")):""),onClick:function(){if(!l[t].is_pro){var n=function(e){return function(e){if(Array.isArray(e))return nt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.elements);-1===n.indexOf(t)&&(n.push(t),r(Xe(Xe({},o),{},Ze({},e,Xe(Xe({},o[e]),{},{elements:n})))))}}}})}):""))}},{key:"render",value:function(){var e=this,t=this.props.locations;return wp.element.createElement("div",{className:"vpf-component-elements-selector-control"},Object.keys(t).map(function(t){return e.renderLocation(t)}))}}],o&&Ge(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(O.Component);function st(e){var t=[];return null!=e&&e.length&&e.forEach(function(e){e.categories&&e.categories.length&&e.categories.forEach(function(e){-1===t.indexOf(e)&&t.push(e)})}),t}function at(e){var t,n,o,r=e.data,i=e.textSource,s=e.img,a=e.name,l=e.index,c=(0,Ie.useSelect)(function(e){var t=e("core").getMedia;return{imgData:s.id?t(s.id):null}},[s]).imgData,u="",p="";switch(i){case"title":u=(null==c||null===(t=c.title)||void 0===t?void 0:t.raw)||"",p=(0,R.__)("Loaded automatically from the image Title","visual-portfolio");break;case"caption":u=(null==c||null===(n=c.caption)||void 0===n?void 0:n.raw)||"",p=(0,R.__)("Loaded automatically from the image Caption","visual-portfolio");break;case"alt":u=(null==c?void 0:c.alt_text)||"",p=(0,R.__)("Loaded automatically from the image Alt","visual-portfolio");break;case"description":u=(null==c||null===(o=c.description)||void 0===o?void 0:o.raw)||"",p=(0,R.__)("Loaded automatically from the image Description","visual-portfolio")}var h="title"===a?A.TextControl:A.TextareaControl;return wp.element.createElement(h,{className:"vpf-control-wrap vpf-control-wrap-".concat("title"===a?"text":"textarea"),key:"".concat(s.id||s.imgThumbnailUrl||s.imgUrl,"-").concat(l,"-").concat(a),label:r.label,value:u,help:p,disabled:!0})}(0,L.addFilter)("vpf.editor.controls-render-data","vpf/editor/controls-render-data/images-categories-suggestions",function(e){if("images"===e.name){var t=st(e.attributes.images);t.length&&e.image_controls&&e.image_controls.categories&&e.image_controls.categories.options&&(e.image_controls.categories.options=t.map(function(e){return{label:e,value:e}}))}return e}),(0,L.addFilter)("vpf.editor.gallery-controls-render","vpf/editor/gallery-controls-render/title-and-description-render-by-source",function(e,t,n,o){var r=n.attributes,i=n.img,s=o.name,a=o.index;return("title"===s&&r.images_titles_source&&"custom"!==r.images_titles_source||"description"===s&&r.images_descriptions_source&&"custom"!==r.images_descriptions_source)&&(e=wp.element.createElement(at,{data:t,textSource:r["images_".concat(s,"s_source")],img:i,name:s,index:a})),e});const lt=window.ReactDOM,ct="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ut(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function pt(e){return"nodeType"in e}function ht(e){var t,n;return e?ut(e)?e:pt(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function dt(e){const{Document:t}=ht(e);return e instanceof t}function ft(e){return!ut(e)&&e instanceof ht(e).HTMLElement}function gt(e){return e instanceof ht(e).SVGElement}function mt(e){return e?ut(e)?e.document:pt(e)?dt(e)?e:ft(e)||gt(e)?e.ownerDocument:document:document:document}const vt=ct?h.useLayoutEffect:h.useEffect;function yt(e){const t=(0,h.useRef)(e);return vt(()=>{t.current=e}),(0,h.useCallback)(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)},[])}function bt(e,t){void 0===t&&(t=[e]);const n=(0,h.useRef)(e);return vt(()=>{n.current!==e&&(n.current=e)},t),n}function wt(e,t){const n=(0,h.useRef)();return(0,h.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function xt(e){const t=yt(e),n=(0,h.useRef)(null),o=(0,h.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,o]}function St(e){const t=(0,h.useRef)();return(0,h.useEffect)(()=>{t.current=e},[e]),t.current}let Ct={};function _t(e,t){return(0,h.useMemo)(()=>{if(t)return t;const n=null==Ct[e]?0:Ct[e]+1;return Ct[e]=n,e+"-"+n},[e,t])}function kt(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t},{...t})}}const $t=kt(1),Et=kt(-1);function Ot(e){if(!e)return!1;const{KeyboardEvent:t}=ht(e.target);return t&&e instanceof t}function Mt(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=ht(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Tt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Tt.Translate.toString(e),Tt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),At="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Lt(e){return e.matches(At)?e:e.querySelector(At)}const Rt={display:"none"};function It(e){let{id:t,value:n}=e;return d().createElement("div",{id:t,style:Rt},n)}function Dt(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return d().createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const Pt=(0,h.createContext)(null),Nt={draggable:"\n    To pick up a draggable item, press the space bar.\n    While dragging, use the arrow keys to move the item.\n    Press space again to drop the item in its new position, or press escape to cancel.\n  "},jt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Ft(e){let{announcements:t=jt,container:n,hiddenTextDescribedById:o,screenReaderInstructions:r=Nt}=e;const{announce:i,announcement:s}=function(){const[e,t]=(0,h.useState)("");return{announce:(0,h.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),a=_t("DndLiveRegion"),[l,c]=(0,h.useState)(!1);if((0,h.useEffect)(()=>{c(!0)},[]),function(e){const t=(0,h.useContext)(Pt);(0,h.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}((0,h.useMemo)(()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:o}=e;t.onDragMove&&i(t.onDragMove({active:n,over:o}))},onDragOver(e){let{active:n,over:o}=e;i(t.onDragOver({active:n,over:o}))},onDragEnd(e){let{active:n,over:o}=e;i(t.onDragEnd({active:n,over:o}))},onDragCancel(e){let{active:n,over:o}=e;i(t.onDragCancel({active:n,over:o}))}}),[i,t])),!l)return null;const u=d().createElement(d().Fragment,null,d().createElement(It,{id:o,value:r.draggable}),d().createElement(Dt,{id:a,announcement:s}));return n?(0,lt.createPortal)(u,n):u}var zt;function Bt(){}function Wt(e,t){return(0,h.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function Ht(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,h.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(zt||(zt={}));const Vt=Object.freeze({x:0,y:0});function Ut(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Gt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function Kt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Yt(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const qt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=Yt(t,t.left,t.top),i=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=Ut(Yt(o),r);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Gt)};function Qt(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=r-o,a=i-n;if(o<r&&n<i){const n=t.width*t.height,o=e.width*e.height,r=s*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const Xt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,i=n.get(o);if(i){const n=Qt(i,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(Kt)};function Zt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Vt}function Jt(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const en=Jt(1);const tn={ignoreTransform:!1};function nn(e,t){void 0===t&&(t=tn);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=ht(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:r,scaleY:i,x:s,y:a}=o,l=e.left-s-(1-r)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,p=i?e.height/i:e.height;return{width:u,height:p,top:c,right:l+u,bottom:c+p,left:l}}(n,t,o))}const{top:o,left:r,width:i,height:s,bottom:a,right:l}=n;return{top:o,left:r,width:i,height:s,bottom:a,right:l}}function on(e){return nn(e,{ignoreTransform:!0})}function rn(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(dt(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!ft(r)||gt(r))return n;if(n.includes(r))return n;const i=ht(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=ht(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const o=t[e];return"string"==typeof o&&n.test(o)})}(r,i)&&n.push(r),function(e,t){return void 0===t&&(t=ht(e).getComputedStyle(e)),"fixed"===t.position}(r,i)?n:o(r.parentNode)}(e):n}function sn(e){const[t]=rn(e,1);return null!=t?t:null}function an(e){return ct&&e?ut(e)?e:pt(e)?dt(e)||e===mt(e).scrollingElement?window:ft(e)?e:null:null:null}function ln(e){return ut(e)?e.scrollX:e.scrollLeft}function cn(e){return ut(e)?e.scrollY:e.scrollTop}function un(e){return{x:ln(e),y:cn(e)}}var pn;function hn(e){return!(!ct||!e)&&e===document.scrollingElement}function dn(e){const t={x:0,y:0},n=hn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(pn||(pn={}));const fn={x:.2,y:.2};function gn(e,t,n,o,r){let{top:i,left:s,right:a,bottom:l}=n;void 0===o&&(o=10),void 0===r&&(r=fn);const{isTop:c,isBottom:u,isLeft:p,isRight:h}=dn(e),d={x:0,y:0},f={x:0,y:0},g=t.height*r.y,m=t.width*r.x;return!c&&i<=t.top+g?(d.y=pn.Backward,f.y=o*Math.abs((t.top+g-i)/g)):!u&&l>=t.bottom-g&&(d.y=pn.Forward,f.y=o*Math.abs((t.bottom-g-l)/g)),!h&&a>=t.right-m?(d.x=pn.Forward,f.x=o*Math.abs((t.right-m-a)/m)):!p&&s<=t.left+m&&(d.x=pn.Backward,f.x=o*Math.abs((t.left+m-s)/m)),{direction:d,speed:f}}function mn(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function vn(e){return e.reduce((e,t)=>$t(e,un(t)),Vt)}const yn=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+ln(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+cn(t),0)}]];class bn{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=rn(t),o=vn(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of yn)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=r(n),s=o[e]-t;return this.rect[i]+s},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class wn{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function xn(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var Sn,Cn,kn;function $n(e){e.preventDefault()}function En(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Sn||(Sn={})),(kn=Cn||(Cn={})).Space="Space",kn.Down="ArrowDown",kn.Right="ArrowRight",kn.Left="ArrowLeft",kn.Up="ArrowUp",kn.Esc="Escape",kn.Enter="Enter",kn.Tab="Tab";const On={start:[Cn.Space,Cn.Enter],cancel:[Cn.Esc],end:[Cn.Space,Cn.Enter,Cn.Tab]},Mn=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Cn.Right:return{...n,x:n.x+25};case Cn.Left:return{...n,x:n.x-25};case Cn.Down:return{...n,y:n.y+25};case Cn.Up:return{...n,y:n.y-25}}};class Tn{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new wn(mt(t)),this.windowListeners=new wn(ht(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Sn.Resize,this.handleCancel),this.windowListeners.add(Sn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Sn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=nn),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);sn(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Vt)}handleKeyDown(e){if(Ot(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=On,coordinateGetter:i=Mn,scrollBehavior:s="smooth"}=o,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:Vt;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=Et(u,c),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:i,isRight:a,isLeft:l,isBottom:c,maxScroll:p,minScroll:h}=dn(n),d=mn(n),f={x:Math.min(r===Cn.Right?d.right-d.width/2:d.right,Math.max(r===Cn.Right?d.left:d.left+d.width/2,u.x)),y:Math.min(r===Cn.Down?d.bottom-d.height/2:d.bottom,Math.max(r===Cn.Down?d.top:d.top+d.height/2,u.y))},g=r===Cn.Right&&!a||r===Cn.Left&&!l,m=r===Cn.Down&&!c||r===Cn.Up&&!i;if(g&&f.x!==u.x){const e=n.scrollLeft+t.x,i=r===Cn.Right&&e<=p.x||r===Cn.Left&&e>=h.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:s});o.x=i?n.scrollLeft-e:r===Cn.Right?n.scrollLeft-p.x:n.scrollLeft-h.x,o.x&&n.scrollBy({left:-o.x,behavior:s});break}if(m&&f.y!==u.y){const e=n.scrollTop+t.y,i=r===Cn.Down&&e<=p.y||r===Cn.Up&&e>=h.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:s});o.y=i?n.scrollTop-e:r===Cn.Down?n.scrollTop-p.y:n.scrollTop-h.y,o.y&&n.scrollBy({top:-o.y,behavior:s});break}}this.handleMove(e,$t(Et(u,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function An(e){return Boolean(e&&"distance"in e)}function Ln(e){return Boolean(e&&"delay"in e)}Tn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=On,onActivation:r}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(o.start.includes(s)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==r||r({event:e.nativeEvent}),0))}return!1}}];class Rn{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=ht(e);return e instanceof t?e:mt(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=mt(i),this.documentListeners=new wn(this.document),this.listeners=new wn(n),this.windowListeners=new wn(ht(i)),this.initialCoordinates=null!=(o=Mt(r))?o:Vt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Sn.Resize,this.handleCancel),this.windowListeners.add(Sn.DragStart,$n),this.windowListeners.add(Sn.VisibilityChange,this.handleCancel),this.windowListeners.add(Sn.ContextMenu,$n),this.documentListeners.add(Sn.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ln(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(An(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:o}=this.props;o(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Sn.Click,En,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Sn.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:i,options:{activationConstraint:s}}=r;if(!o)return;const a=null!=(t=Mt(e))?t:Vt,l=Et(o,a);if(!n&&s){if(An(s)){if(null!=s.tolerance&&xn(l,s.tolerance))return this.handleCancel();if(xn(l,s.distance))return this.handleStart()}return Ln(s)&&xn(l,s.tolerance)?this.handleCancel():void this.handlePending(s,l)}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Cn.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const In={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Dn extends Rn{constructor(e){const{event:t}=e,n=mt(t.target);super(e,In,n)}}Dn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button||(null==o||o({event:n}),0))}}];const Pn={move:{name:"mousemove"},end:{name:"mouseup"}};var Nn;!function(e){e[e.RightClick=2]="RightClick"}(Nn||(Nn={})),class extends Rn{constructor(e){super(e,Pn,mt(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==Nn.RightClick&&(null==o||o({event:n}),!0)}}];const jn={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var Fn,zn;(class extends Rn{constructor(e){super(e,jn)}static setup(){return window.addEventListener(jn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(jn.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1||(null==o||o({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Fn||(Fn={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(zn||(zn={}));const Bn={x:{[pn.Backward]:!1,[pn.Forward]:!1},y:{[pn.Backward]:!1,[pn.Forward]:!1}};var Wn,Hn;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Wn||(Wn={})),function(e){e.Optimized="optimized"}(Hn||(Hn={}));const Vn=new Map;function Un(e,t){return wt(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Gn(e){let{callback:t,disabled:n}=e;const o=yt(t),r=(0,h.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)},[n]);return(0,h.useEffect)(()=>()=>null==r?void 0:r.disconnect(),[r]),r}function Kn(e){return new bn(nn(e),e)}function Yn(e,t,n){void 0===t&&(t=Kn);const[o,r]=(0,h.useState)(null);function i(){r(o=>{if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=o?o:n)?r:null;const i=t(e);return JSON.stringify(o)===JSON.stringify(i)?o:i})}const s=function(e){let{callback:t,disabled:n}=e;const o=yt(t),r=(0,h.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)},[o,n]);return(0,h.useEffect)(()=>()=>null==r?void 0:r.disconnect(),[r]),r}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){i();break}}}}),a=Gn({callback:i});return vt(()=>{i(),e?(null==a||a.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==s||s.disconnect())},[e]),o}const qn=[];function Qn(e,t){void 0===t&&(t=[]);const n=(0,h.useRef)(null);return(0,h.useEffect)(()=>{n.current=null},t),(0,h.useEffect)(()=>{const t=e!==Vt;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Et(e,n.current):Vt}function Xn(e){return(0,h.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Zn=[];const Jn=[{sensor:Dn,options:{}},{sensor:Tn,options:{}}],eo={current:{}},to={draggable:{measure:on},droppable:{measure:on,strategy:Wn.WhileDragging,frequency:Hn.Optimized},dragOverlay:{measure:nn}};class no extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const oo={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new no,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Bt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:to,measureDroppableContainers:Bt,windowRect:null,measuringScheduled:!1},ro={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Bt,draggableNodes:new Map,over:null,measureDroppableContainers:Bt},io=(0,h.createContext)(ro),so=(0,h.createContext)(oo);function ao(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new no}}}function lo(e,t){switch(t.type){case zt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case zt.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case zt.DragEnd:case zt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case zt.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new no(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case zt.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const s=new no(e.droppable.containers);return s.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:s}}}case zt.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new no(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function co(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:r}=(0,h.useContext)(io),i=St(o),s=St(null==n?void 0:n.id);return(0,h.useEffect)(()=>{if(!t&&!o&&i&&null!=s){if(!Ot(i))return;if(document.activeElement===i.target)return;const e=r.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=Lt(e);if(t){t.focus();break}}})}},[o,t,r,s,i]),null}const uo=(0,h.createContext)({...Vt,scaleX:1,scaleY:1});var po;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(po||(po={}));const ho=(0,h.memo)(function(e){var t,n,o,r;let{id:i,accessibility:s,autoScroll:a=!0,children:l,sensors:c=Jn,collisionDetection:u=Xt,measuring:p,modifiers:f,...g}=e;const m=(0,h.useReducer)(lo,void 0,ao),[v,y]=m,[b,w]=function(){const[e]=(0,h.useState)(()=>new Set),t=(0,h.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]),n=(0,h.useCallback)(t=>{let{type:n,event:o}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)})},[e]);return[n,t]}(),[x,S]=(0,h.useState)(po.Uninitialized),C=x===po.Initialized,{draggable:{active:_,nodes:k,translate:$},droppable:{containers:E}}=v,O=null!=_?k.get(_):null,M=(0,h.useRef)({initial:null,translated:null}),T=(0,h.useMemo)(()=>{var e;return null!=_?{id:_,data:null!=(e=null==O?void 0:O.data)?e:eo,rect:M}:null},[_,O]),A=(0,h.useRef)(null),[L,R]=(0,h.useState)(null),[I,D]=(0,h.useState)(null),P=bt(g,Object.values(g)),N=_t("DndDescribedBy",i),j=(0,h.useMemo)(()=>E.getEnabled(),[E]),F=(z=p,(0,h.useMemo)(()=>({draggable:{...to.draggable,...null==z?void 0:z.draggable},droppable:{...to.droppable,...null==z?void 0:z.droppable},dragOverlay:{...to.dragOverlay,...null==z?void 0:z.dragOverlay}}),[null==z?void 0:z.draggable,null==z?void 0:z.droppable,null==z?void 0:z.dragOverlay]));var z;const{droppableRects:B,measureDroppableContainers:W,measuringScheduled:H}=function(e,t){let{dragging:n,dependencies:o,config:r}=t;const[i,s]=(0,h.useState)(null),{frequency:a,measure:l,strategy:c}=r,u=(0,h.useRef)(e),p=function(){switch(c){case Wn.Always:return!1;case Wn.BeforeDragging:return n;default:return!n}}(),d=bt(p),f=(0,h.useCallback)(function(e){void 0===e&&(e=[]),d.current||s(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[d]),g=(0,h.useRef)(null),m=wt(t=>{if(p&&!n)return Vn;if(!t||t===Vn||u.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new bn(l(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t},[e,i,n,p,l]);return(0,h.useEffect)(()=>{u.current=e},[e]),(0,h.useEffect)(()=>{p||f()},[n,p]),(0,h.useEffect)(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),(0,h.useEffect)(()=>{p||"number"!=typeof a||null!==g.current||(g.current=setTimeout(()=>{f(),g.current=null},a))},[a,p,f,...o]),{droppableRects:m,measureDroppableContainers:f,measuringScheduled:null!=i}}(j,{dragging:C,dependencies:[$.x,$.y],config:F.droppable}),V=function(e,t){const n=null!=t?e.get(t):void 0,o=n?n.node.current:null;return wt(e=>{var n;return null==t?null:null!=(n=null!=o?o:e)?n:null},[o,t])}(k,_),U=(0,h.useMemo)(()=>I?Mt(I):null,[I]),G=function(){const e=!1===(null==L?void 0:L.autoScrollEnabled),t="object"==typeof a?!1===a.enabled:!1===a,n=C&&!e&&!t;return"object"==typeof a?{...a,enabled:n}:{enabled:n}}(),K=function(e,t){return Un(e,t)}(V,F.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=(0,h.useRef)(!1),{x:s,y:a}="boolean"==typeof r?{x:r,y:r}:r;vt(()=>{if(!s&&!a||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Zt(n(e),o);if(s||(r.x=0),a||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=sn(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,s,a,o,n])}({activeNode:null!=_?k.get(_):null,config:G.layoutShiftCompensation,initialRect:K,measure:F.draggable.measure});const Y=Yn(V,F.draggable.measure,K),q=Yn(V?V.parentElement:null),Q=(0,h.useRef)({activatorEvent:null,active:null,activeNode:V,collisionRect:null,collisions:null,droppableRects:B,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),X=E.getNodeFor(null==(t=Q.current.over)?void 0:t.id),Z=function(e){let{measure:t}=e;const[n,o]=(0,h.useState)(null),r=Gn({callback:(0,h.useCallback)(e=>{for(const{target:n}of e)if(ft(n)){o(e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o});break}},[t])}),i=(0,h.useCallback)(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ft(t)?t:e}(e);null==r||r.disconnect(),n&&(null==r||r.observe(n)),o(n?t(n):null)},[t,r]),[s,a]=xt(i);return(0,h.useMemo)(()=>({nodeRef:s,rect:n,setRef:a}),[n,s,a])}({measure:F.dragOverlay.measure}),J=null!=(n=Z.nodeRef.current)?n:V,ee=C?null!=(o=Z.rect)?o:Y:null,te=Boolean(Z.nodeRef.current&&Z.rect),ne=Zt(oe=te?null:Y,Un(oe));var oe;const re=Xn(J?ht(J):null),ie=function(e){const t=(0,h.useRef)(e),n=wt(n=>e?n&&n!==qn&&e&&t.current&&e.parentNode===t.current.parentNode?n:rn(e):qn,[e]);return(0,h.useEffect)(()=>{t.current=e},[e]),n}(C?null!=X?X:V:null),se=function(e,t){void 0===t&&(t=nn);const[n]=e,o=Xn(n?ht(n):null),[r,i]=(0,h.useState)(Zn);function s(){i(()=>e.length?e.map(e=>hn(e)?o:new bn(t(e),e)):Zn)}const a=Gn({callback:s});return vt(()=>{null==a||a.disconnect(),s(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),r}(ie),ae=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...o}),n):n}(f,{transform:{x:$.x-ne.x,y:$.y-ne.y,scaleX:1,scaleY:1},activatorEvent:I,active:T,activeNodeRect:Y,containerNodeRect:q,draggingNodeRect:ee,over:Q.current.over,overlayNodeRect:Z.rect,scrollableAncestors:ie,scrollableAncestorRects:se,windowRect:re}),le=U?$t(U,$):null,ce=function(e){const[t,n]=(0,h.useState)(null),o=(0,h.useRef)(e),r=(0,h.useCallback)(e=>{const t=an(e.target);t&&n(e=>e?(e.set(t,un(t)),new Map(e)):null)},[]);return(0,h.useEffect)(()=>{const t=o.current;if(e!==t){i(t);const s=e.map(e=>{const t=an(e);return t?(t.addEventListener("scroll",r,{passive:!0}),[t,un(t)]):null}).filter(e=>null!=e);n(s.length?new Map(s):null),o.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{const t=an(e);null==t||t.removeEventListener("scroll",r)})}},[r,e]),(0,h.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>$t(e,t),Vt):vn(e):Vt,[e,t])}(ie),ue=Qn(ce),pe=Qn(ce,[Y]),he=$t(ae,ue),de=ee?en(ee,ae):null,fe=T&&de?u({active:T,collisionRect:de,droppableRects:B,droppableContainers:j,pointerCoordinates:le}):null,ge=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(fe),[me,ve]=(0,h.useState)(null),ye=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(te?ae:$t(ae,pe),null!=(r=null==me?void 0:me.rect)?r:null,Y),be=(0,h.useRef)(null),we=(0,h.useCallback)((e,t)=>{let{sensor:n,options:o}=t;if(null==A.current)return;const r=k.get(A.current);if(!r)return;const i=e.nativeEvent,s=new n({active:A.current,activeNode:r,event:i,options:o,context:Q,onAbort(e){if(!k.get(e))return;const{onDragAbort:t}=P.current,n={id:e};null==t||t(n),b({type:"onDragAbort",event:n})},onPending(e,t,n,o){if(!k.get(e))return;const{onDragPending:r}=P.current,i={id:e,constraint:t,initialCoordinates:n,offset:o};null==r||r(i),b({type:"onDragPending",event:i})},onStart(e){const t=A.current;if(null==t)return;const n=k.get(t);if(!n)return;const{onDragStart:o}=P.current,r={activatorEvent:i,active:{id:t,data:n.data,rect:M}};(0,lt.unstable_batchedUpdates)(()=>{null==o||o(r),S(po.Initializing),y({type:zt.DragStart,initialCoordinates:e,active:t}),b({type:"onDragStart",event:r}),R(be.current),D(i)})},onMove(e){y({type:zt.DragMove,coordinates:e})},onEnd:a(zt.DragEnd),onCancel:a(zt.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=Q.current;let s=null;if(t&&r){const{cancelDrop:a}=P.current;s={activatorEvent:i,active:t,collisions:n,delta:r,over:o},e===zt.DragEnd&&"function"==typeof a&&await Promise.resolve(a(s))&&(e=zt.DragCancel)}A.current=null,(0,lt.unstable_batchedUpdates)(()=>{y({type:e}),S(po.Uninitialized),ve(null),R(null),D(null),be.current=null;const t=e===zt.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=P.current[t];null==e||e(s),b({type:t,event:s})}})}}be.current=s},[k]),xe=(0,h.useCallback)((e,t)=>(n,o)=>{const r=n.nativeEvent,i=k.get(o);if(null!==A.current||!i||r.dndKit||r.defaultPrevented)return;const s={active:i};!0===e(n,t.options,s)&&(r.dndKit={capturedBy:t.sensor},A.current=o,we(n,t))},[k,we]),Se=function(e,t){return(0,h.useMemo)(()=>e.reduce((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,xe);!function(e){(0,h.useEffect)(()=>{if(!ct)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),vt(()=>{Y&&x===po.Initializing&&S(po.Initialized)},[Y,x]),(0,h.useEffect)(()=>{const{onDragMove:e}=P.current,{active:t,activatorEvent:n,collisions:o,over:r}=Q.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:o,delta:{x:he.x,y:he.y},over:r};(0,lt.unstable_batchedUpdates)(()=>{null==e||e(i),b({type:"onDragMove",event:i})})},[he.x,he.y]),(0,h.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=Q.current;if(!e||null==A.current||!t||!r)return;const{onDragOver:i}=P.current,s=o.get(ge),a=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};(0,lt.unstable_batchedUpdates)(()=>{ve(a),null==i||i(l),b({type:"onDragOver",event:l})})},[ge]),vt(()=>{Q.current={activatorEvent:I,active:T,activeNode:V,collisionRect:de,collisions:fe,droppableRects:B,draggableNodes:k,draggingNode:J,draggingNodeRect:ee,droppableContainers:E,over:me,scrollableAncestors:ie,scrollAdjustedTranslate:he},M.current={initial:ee,translated:de}},[T,V,fe,de,k,J,ee,B,E,me,ie,he]),function(e){let{acceleration:t,activator:n=Fn.Pointer,canScroll:o,draggingRect:r,enabled:i,interval:s=5,order:a=zn.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:p,threshold:d}=e;const f=function(e){let{delta:t,disabled:n}=e;const o=St(t);return wt(e=>{if(n||!o||!e)return Bn;const r=Math.sign(t.x-o.x),i=Math.sign(t.y-o.y);return{x:{[pn.Backward]:e.x[pn.Backward]||-1===r,[pn.Forward]:e.x[pn.Forward]||1===r},y:{[pn.Backward]:e.y[pn.Backward]||-1===i,[pn.Forward]:e.y[pn.Forward]||1===i}}},[n,t,o])}({delta:p,disabled:!i}),[g,m]=function(){const e=(0,h.useRef)(null);return[(0,h.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,h.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),v=(0,h.useRef)({x:0,y:0}),y=(0,h.useRef)({x:0,y:0}),b=(0,h.useMemo)(()=>{switch(n){case Fn.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Fn.DraggableRect:return r}},[n,r,l]),w=(0,h.useRef)(null),x=(0,h.useCallback)(()=>{const e=w.current;if(!e)return;const t=v.current.x*y.current.x,n=v.current.y*y.current.y;e.scrollBy(t,n)},[]),S=(0,h.useMemo)(()=>a===zn.TreeOrder?[...c].reverse():c,[a,c]);(0,h.useEffect)(()=>{if(i&&c.length&&b){for(const e of S){if(!1===(null==o?void 0:o(e)))continue;const n=c.indexOf(e),r=u[n];if(!r)continue;const{direction:i,speed:a}=gn(e,r,b,t,d);for(const e of["x","y"])f[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return m(),w.current=e,g(x,s),v.current=a,void(y.current=i)}v.current={x:0,y:0},y.current={x:0,y:0},m()}else m()},[t,x,o,m,i,s,JSON.stringify(b),JSON.stringify(f),g,c,S,u,JSON.stringify(d)])}({...G,delta:$,draggingRect:de,pointerCoordinates:le,scrollableAncestors:ie,scrollableAncestorRects:se});const Ce=(0,h.useMemo)(()=>({active:T,activeNode:V,activeNodeRect:Y,activatorEvent:I,collisions:fe,containerNodeRect:q,dragOverlay:Z,draggableNodes:k,droppableContainers:E,droppableRects:B,over:me,measureDroppableContainers:W,scrollableAncestors:ie,scrollableAncestorRects:se,measuringConfiguration:F,measuringScheduled:H,windowRect:re}),[T,V,Y,I,fe,q,Z,k,E,B,me,W,ie,se,F,H,re]),_e=(0,h.useMemo)(()=>({activatorEvent:I,activators:Se,active:T,activeNodeRect:Y,ariaDescribedById:{draggable:N},dispatch:y,draggableNodes:k,over:me,measureDroppableContainers:W}),[I,Se,T,Y,y,N,k,me,W]);return d().createElement(Pt.Provider,{value:w},d().createElement(io.Provider,{value:_e},d().createElement(so.Provider,{value:Ce},d().createElement(uo.Provider,{value:ye},l)),d().createElement(co,{disabled:!1===(null==s?void 0:s.restoreFocus)})),d().createElement(Ft,{...s,hiddenTextDescribedById:N}))}),fo=(0,h.createContext)(null),go="button";const mo={timeout:25};function vo(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function yo(e,t){return e.reduce((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e},Array(e.length))}function bo(e){return null!==e&&e>=0}const wo=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=vo(t,o,n),s=t[r],a=i[r];return a&&s?{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}:null},xo={scaleX:1,scaleY:1},So=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:i,overIndex:s}=e;const a=null!=(t=i[n])?t:o;if(!a)return null;if(r===n){const e=i[s];return e?{x:0,y:n<s?e.top+e.height-(a.top+a.height):e.top-a.top,...xo}:null}const l=function(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];return o?n<t?r?o.top-(r.top+r.height):i?i.top-(o.top+o.height):0:i?i.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}(i,r,n);return r>n&&r<=s?{x:0,y:-a.height-l,...xo}:r<n&&r>=s?{x:0,y:a.height+l,...xo}:{x:0,y:0,...xo}},Co="Sortable",_o=d().createContext({activeIndex:-1,containerId:Co,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:wo,disabled:{draggable:!1,droppable:!1}});function ko(e){let{children:t,id:n,items:o,strategy:r=wo,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=(0,h.useContext)(so),p=_t(Co,n),f=Boolean(null!==a.rect),g=(0,h.useMemo)(()=>o.map(e=>"object"==typeof e&&"id"in e?e.id:e),[o]),m=null!=s,v=s?g.indexOf(s.id):-1,y=c?g.indexOf(c.id):-1,b=(0,h.useRef)(g),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(g,b.current),x=-1!==y&&-1===v||w,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(i);vt(()=>{w&&m&&u(g)},[w,g,m,u]),(0,h.useEffect)(()=>{b.current=g},[g]);const C=(0,h.useMemo)(()=>({activeIndex:v,containerId:p,disabled:S,disableTransforms:x,items:g,overIndex:y,useDragOverlay:f,sortedRects:yo(g,l),strategy:r}),[v,p,S.draggable,S.droppable,x,g,y,l,f,r]);return d().createElement(_o.Provider,{value:C},t)}const $o=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return vo(n,o,r).indexOf(t)},Eo=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!(!c||!o||a!==i&&r===s||!n&&(s===r||t!==l))},Oo={duration:200,easing:"ease"},Mo="transform",To=Tt.Transition.toString({property:Mo,duration:0,easing:"linear"}),Ao={roleDescription:"sortable"};function Lo(e){let{animateLayoutChanges:t=Eo,attributes:n,disabled:o,data:r,getNewIndex:i=$o,id:s,strategy:a,resizeObserverConfig:l,transition:c=Oo}=e;const{items:u,containerId:p,activeIndex:d,disabled:f,disableTransforms:g,sortedRects:m,overIndex:v,useDragOverlay:y,strategy:b}=(0,h.useContext)(_o),w=function(e,t){var n,o;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(o,f),x=u.indexOf(s),S=(0,h.useMemo)(()=>({sortable:{containerId:p,index:x,items:u},...r}),[p,r,x,u]),C=(0,h.useMemo)(()=>u.slice(u.indexOf(s)),[u,s]),{rect:_,node:k,isOver:$,setNodeRef:E}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:r}=e;const i=_t("Droppable"),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=(0,h.useContext)(io),u=(0,h.useRef)({disabled:n}),p=(0,h.useRef)(!1),d=(0,h.useRef)(null),f=(0,h.useRef)(null),{disabled:g,updateMeasurementsFor:m,timeout:v}={...mo,...r},y=bt(null!=m?m:o),b=Gn({callback:(0,h.useCallback)(()=>{p.current?(null!=f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),f.current=null},v)):p.current=!0},[v]),disabled:g||!s}),w=(0,h.useCallback)((e,t)=>{b&&(t&&(b.unobserve(t),p.current=!1),e&&b.observe(e))},[b]),[x,S]=xt(w),C=bt(t);return(0,h.useEffect)(()=>{b&&x.current&&(b.disconnect(),p.current=!1,b.observe(x.current))},[x,b]),(0,h.useEffect)(()=>(a({type:zt.RegisterDroppable,element:{id:o,key:i,disabled:n,node:x,rect:d,data:C}}),()=>a({type:zt.UnregisterDroppable,key:i,id:o})),[o]),(0,h.useEffect)(()=>{n!==u.current.disabled&&(a({type:zt.SetDroppableDisabled,id:o,key:i,disabled:n}),u.current.disabled=n)},[o,i,n,a]),{active:s,rect:d,isOver:(null==l?void 0:l.id)===o,node:x,over:l,setNodeRef:S}}({id:s,data:S,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...l}}),{active:O,activatorEvent:M,activeNodeRect:T,attributes:A,setNodeRef:L,listeners:R,isDragging:I,over:D,setActivatorNodeRef:P,transform:N}=function(e){let{id:t,data:n,disabled:o=!1,attributes:r}=e;const i=_t("Draggable"),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:p,over:d}=(0,h.useContext)(io),{role:f=go,roleDescription:g="draggable",tabIndex:m=0}=null!=r?r:{},v=(null==l?void 0:l.id)===t,y=(0,h.useContext)(v?uo:fo),[b,w]=xt(),[x,S]=xt(),C=function(e,t){return(0,h.useMemo)(()=>e.reduce((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e},{}),[e,t])}(s,t),_=bt(n);return vt(()=>(p.set(t,{id:t,key:i,node:b,activatorNode:x,data:_}),()=>{const e=p.get(t);e&&e.key===i&&p.delete(t)}),[p,t]),{active:l,activatorEvent:a,activeNodeRect:c,attributes:(0,h.useMemo)(()=>({role:f,tabIndex:m,"aria-disabled":o,"aria-pressed":!(!v||f!==go)||void 0,"aria-roledescription":g,"aria-describedby":u.draggable}),[o,f,m,v,g,u.draggable]),isDragging:v,listeners:o?void 0:C,node:b,over:d,setNodeRef:w,setActivatorNodeRef:S,transform:y}}({id:s,data:S,attributes:{...Ao,...n},disabled:w.draggable}),j=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,h.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}(E,L),F=Boolean(O),z=F&&!g&&bo(d)&&bo(v),B=!y&&I,W=B&&z?N:null,H=z?null!=W?W:(null!=a?a:b)({rects:m,activeNodeRect:T,activeIndex:d,overIndex:v,index:x}):null,V=bo(d)&&bo(v)?i({id:s,items:u,activeIndex:d,overIndex:v}):x,U=null==O?void 0:O.id,G=(0,h.useRef)({activeId:U,items:u,newIndex:V,containerId:p}),K=u!==G.current.items,Y=t({active:O,containerId:p,isDragging:I,isSorting:F,id:s,index:x,items:u,newIndex:G.current.newIndex,previousItems:G.current.items,previousContainerId:G.current.containerId,transition:c,wasDragging:null!=G.current.activeId}),q=function(e){let{disabled:t,index:n,node:o,rect:r}=e;const[i,s]=(0,h.useState)(null),a=(0,h.useRef)(n);return vt(()=>{if(!t&&n!==a.current&&o.current){const e=r.current;if(e){const t=nn(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}n!==a.current&&(a.current=n)},[t,n,o,r]),(0,h.useEffect)(()=>{i&&s(null)},[i]),i}({disabled:!Y,index:x,node:k,rect:_});return(0,h.useEffect)(()=>{F&&G.current.newIndex!==V&&(G.current.newIndex=V),p!==G.current.containerId&&(G.current.containerId=p),u!==G.current.items&&(G.current.items=u)},[F,V,p,u]),(0,h.useEffect)(()=>{if(U===G.current.activeId)return;if(U&&!G.current.activeId)return void(G.current.activeId=U);const e=setTimeout(()=>{G.current.activeId=U},50);return()=>clearTimeout(e)},[U]),{active:O,activeIndex:d,attributes:A,data:S,rect:_,index:x,newIndex:V,items:u,isOver:$,isSorting:F,isDragging:I,listeners:R,node:k,overIndex:v,over:D,setNodeRef:j,setActivatorNodeRef:P,setDroppableNodeRef:E,setDraggableNodeRef:L,transform:null!=q?q:H,transition:q||K&&G.current.newIndex===x?To:B&&!Ot(M)||!c?void 0:F||Y?Tt.Transition.toString({...c,property:Mo}):void 0}}Cn.Down,Cn.Right,Cn.Up,Cn.Left;const Ro=window.lodash;function Io(e){return Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Io(e)}function Do(e){return function(e){if(Array.isArray(e))return Wo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Bo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Po(){return Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Po.apply(null,arguments)}function No(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function jo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?No(Object(n),!0).forEach(function(t){Fo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):No(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fo(e,t,n){return(t=function(e){var t=function(e){if("object"!=Io(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Io(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Io(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||Bo(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bo(e,t){if(e){if("string"==typeof e)return Wo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wo(e,t):void 0}}function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Ho=window,Vo=Ho.navigator,Uo=Ho.VPGutenbergVariables,Go=["image"],Ko="------";function Yo(e){var t=e.open,n=e.items,o=e.isSetupWizard,r=(0,O.useRef)(!1);return(0,O.useEffect)(function(){r.current||!o||n&&n.length||(t(),r.current=!0)},[o,n,t]),wp.element.createElement(A.Button,{className:"vpf-component-gallery-control-item-fullwidth vpf-component-gallery-control-item-add",onClick:function(e){e.stopPropagation(),t()}},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"20",width:"20",role:"img","aria-hidden":"true",focusable:"false"},n&&n.length?wp.element.createElement("path",{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}):wp.element.createElement("path",{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),wp.element.createElement("span",null,n&&n.length?(0,R.__)("Edit Gallery","visual-portfolio"):(0,R.__)("Add Images","visual-portfolio")))}function qo(e){var t={id:e.id,imgUrl:e.url,imgThumbnailUrl:e.url};return e.mime&&"image/gif"===e.mime||(e.sizes&&e.sizes.large&&e.sizes.large.url?t.imgThumbnailUrl=e.sizes.large.url:e.sizes&&e.sizes.medium&&e.sizes.medium.url?t.imgThumbnailUrl=e.sizes.medium.url:e.sizes&&e.sizes.thumbnail&&e.sizes.thumbnail.url&&(t.imgThumbnailUrl=e.sizes.thumbnail.url)),e.title&&(t.title=e.title),e.description&&(t.description=e.description),t}function Qo(e,t){var n=[],o=t&&Object.keys(t).length?t.map(function(e){return e.id}):[];return e&&e.length&&e.forEach(function(e){if(e.url){var r=!1;if(o.length){var i=o.indexOf(e.id);i>-1&&t[i]&&(r=t[i])}var s=r||qo(e);n.push(s)}}),n}function Xo(e,t){return e.findIndex(function(e){return e.id===t})}function Zo(e,t,n){var o=null;if(t&&t.length){var r=e.filter(function(e){return t.includes(e.id)});r.length&&(o=r[0][n],r.forEach(function(e){o&&!(0,Ro.isEqual)(o,e[n])&&(o=null)}))}return o}var Jo=function(e){var t,n,o,r,i=e.showFocalPoint,s=e.focalPoint,a=e.imgId,l=e.imgUrl,c=e.onChangeFocalPoint,u=e.onChangeImage,p=zo((0,O.useState)(!1),2),h=p[0],d=p[1],f=zo((0,O.useState)(!1),2),g=f[0],m=f[1],v=(0,Ie.useSelect)(function(e){if(!a)return{};var t=(0,e("core").getMedia)(a);return t?{imageData:t}:{}},[h,a]).imageData;return wp.element.createElement(E.MediaUploadCheck,null,wp.element.createElement("div",{className:"vpf-component-gallery-control-item-modal-image-info editor-post-featured-image ".concat(h?"vpf-component-gallery-control-item-modal-image-info-sticky-bottom":"")},i?wp.element.createElement(A.FocalPointPicker,{url:(null==v?void 0:v.source_url)||l,value:s,dimensions:{width:(null==v||null===(t=v.media_details)||void 0===t?void 0:t.width)||80,height:(null==v||null===(n=v.media_details)||void 0===n?void 0:n.height)||80},onChange:function(e){c(e)},__nextHasNoMarginBottom:!0}):null,wp.element.createElement(E.MediaUpload,{onSelect:function(e){var t=qo(e);u(t)},allowedTypes:Go,render:function(e){var t=e.open;return wp.element.createElement(A.Button,{onClick:t,variant:"secondary"},(0,R.__)("Replace Image","visual-portfolio"))}}),wp.element.createElement(A.Button,{onClick:function(){u(!1)},isLink:!0,isDestructive:!0},(0,R.__)("Remove Image from Gallery","visual-portfolio")),wp.element.createElement("div",{className:"vpf-component-gallery-control-item-modal-image-additional-info"},wp.element.createElement(A.Button,{onClick:function(){d(!h)},isLink:!0},h?(0,R.__)("Hide Additional Info","visual-portfolio"):(0,R.__)("Show Additional Info","visual-portfolio"),wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M8 4L14 10L8 16",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(".concat(h?"-":"","90 10 10)")}))),h?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",null,wp.element.createElement("strong",null,(0,R.__)("File name:","visual-portfolio"))," ",(null==v?void 0:v.source_url.split("/").pop())||"-",wp.element.createElement("br",null)," ",wp.element.createElement("strong",null,(0,R.__)("File type:","visual-portfolio"))," ",(null==v?void 0:v.mime_type)||"-",wp.element.createElement("br",null)," ",wp.element.createElement("strong",null,(0,R.__)("File size:","@text_domain"))," ",null!=v&&null!==(o=v.media_details)&&void 0!==o&&o.filesize?function(e){var t=Math.floor(Math.log(e)/Math.log(1024));return"".concat(1*(e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB","TB"][t])}(v.media_details.filesize):"-",null!=v&&null!==(r=v.media_details)&&void 0!==r&&r.width?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("br",null)," ",wp.element.createElement("strong",null,(0,R.__)("Dimensions:","@text_domain"))," ",v.media_details.width," by"," ",v.media_details.height," pixels"):null),wp.element.createElement("div",null,wp.element.createElement(A.TextControl,{label:(0,R.__)("File URL:","visual-portfolio"),value:(null==v?void 0:v.source_url)||"",readOnly:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),wp.element.createElement(A.Button,{onClick:function(){Vo.clipboard.writeText((null==v?void 0:v.source_url)||"").then(function(){m(!0)})},variant:"secondary"},(0,R.__)("Copy URL to Clipboard","visual-portfolio")),g?wp.element.createElement("span",{className:"vpf-component-gallery-control-item-modal-image-additional-info-copied"},(0,R.__)("Copied!","visual-portfolio")):null),null!=v&&v.link?wp.element.createElement("div",null,wp.element.createElement("a",{href:null==v?void 0:v.link,target:"_blank",rel:"noreferrer"},(0,R.__)("View attachment page","visual-portfolio"))," | ",wp.element.createElement("a",{href:"".concat(Uo.admin_url,"post.php?post=").concat(v.id,"&action=edit"),target:"_blank",rel:"noreferrer"},(0,R.__)("Edit more details","visual-portfolio"))):null):null)))},er=function(e){var t,n=e.idx,o=e.title,r=e.img,i=e.onChange,s=e.onRemove,a=e.imageControls,l=e.controlName,c=e.focalPoint,u=e.clientId,p=e.isSetupWizard,h=e.isBulkEdit,d=e.bulkItems,f=e.close,g=e.attributes,m=null==r?void 0:r.focalPoint,v=n;return-1===n&&null!=d&&d.length&&null!=g&&g[l]&&Zo(g[l],d,"focalPoint")&&(v=Xo(g[l],d[0]))>=0&&(m=null===(t=g[l])||void 0===t||null===(t=t[v])||void 0===t?void 0:t.focalPoint),wp.element.createElement(A.Modal,{title:o,onRequestClose:function(e){var t;null!=e&&null!==(t=e.relatedTarget)&&void 0!==t&&null!==(t=t.classList)&&void 0!==t&&t.contains("media-modal")||f(e)}},wp.element.createElement("div",{className:"vpf-component-gallery-control-item-modal"},c&&null!=r&&r.id?wp.element.createElement(Jo,{showFocalPoint:c,focalPoint:m,imgId:null==r?void 0:r.id,imgUrl:r.imgThumbnailUrl||r.imgUrl,onChangeFocalPoint:function(e){i({focalPoint:e})},onChangeImage:function(e){!1===e?s():i(e)}}):null,!c||null!=r&&r.id||null==r||!r.imgThumbnailUrl?null:wp.element.createElement("div",{className:"vpf-component-gallery-control-item-modal-image-info"},wp.element.createElement(A.FocalPointPicker,{url:r.imgThumbnailUrl,value:m,onChange:function(e){i({focalPoint:e})},__nextHasNoMarginBottom:!0})),wp.element.createElement("div",null,Object.keys(a).map(function(t){var o=[];if(h&&!a[t].allow_bulk_edit)return null;var s=n;-1===n&&null!=d&&d.length&&null!=g&&g[l]&&Zo(g[l],d,t)&&(s=Xo(g[l],d[0]));var c="".concat(l,"[").concat(s,"].").concat(t);return a[t].condition.length&&a[t].condition.forEach(function(e){var t=jo({},e);t.control&&/SELF/g.test(t.control)&&(t.control=t.control.replace(/SELF/g,"".concat(l,"[").concat(s,"]"))),o.push(t)}),(0,L.applyFilters)("vpf.editor.gallery-controls-render",wp.element.createElement(_p.Control,Po({key:"".concat((null==r?void 0:r.id)||(null==r?void 0:r.imgThumbnailUrl)||(null==r?void 0:r.imgUrl),"-").concat(s,"-").concat(t),attributes:g,onChange:function(e){i(Fo({},t,e))}},a[t],{name:c,value:null==r?void 0:r[t],condition:o,clientId:u,isSetupWizard:p})),a[t],e,{name:t,fullName:c,index:s,condition:o})}))))},tr=function(e){var t=e.img,n=e.items,o=e.index,r=e.onChange,i=e.imageControls,s=e.controlName,a=e.focalPoint,l=e.clientId,c=e.isSetupWizard,u=e.isMuffled,p=e.isChecked,h=e.onCheck,d=e.attributes,f=o-1,g=Lo({id:e.id}),m=g.attributes,v=g.listeners,y=g.setNodeRef,b=g.transform,w=g.transition,x=g.isDragging,S=g.isSorting,C={transform:Tt.Translate.toString(b),transition:S?w:""},_=zo((0,O.useState)(!1),2),k=_[0],$=_[1],E=function(){return $(!0)},M=function(){return $(!1)};return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",Po({className:T()("vpf-component-gallery-control-item",x&&"vpf-component-gallery-control-item-dragging",u&&"vpf-component-gallery-control-item-muffled",p&&"vpf-component-gallery-control-item-checked"),ref:y,style:C},m,v),wp.element.createElement("div",{className:"vpf-component-gallery-control-item-toolbar"},c?null:wp.element.createElement(A.CheckboxControl,{className:"vpf-component-gallery-control-item-checkbox",title:(0,R.__)("Select","visual-portfolio"),checked:p,onChange:function(e){h(e)},__nextHasNoMarginBottom:!0}),wp.element.createElement(A.Button,{className:"vpf-component-gallery-control-item-edit",onClick:E,"aria-expanded":k},wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.11459 1.9405C8.15924 1.67781 8.29774 1.43913 8.50542 1.26692C8.71311 1.0947 8.97653 1.00012 9.24883 1H10.7512C11.0237 0.999856 11.2874 1.09432 11.4953 1.26655C11.7032 1.43879 11.8419 1.67762 11.8866 1.9405L12.1672 3.58975C13.0726 3.88225 13.8962 4.35363 14.5922 4.96L16.1946 4.37275C16.4495 4.27963 16.73 4.27793 16.9861 4.36794C17.2422 4.45796 17.4574 4.63385 17.5934 4.86438L18.3446 6.13562C18.4811 6.3663 18.5294 6.63688 18.481 6.89916C18.4325 7.16144 18.2904 7.39837 18.08 7.56775L16.7594 8.62975C16.9501 9.53336 16.9501 10.4655 16.7594 11.3691L18.0812 12.4334C18.2913 12.6027 18.4332 12.8394 18.4816 13.1014C18.5301 13.3635 18.4819 13.6338 18.3457 13.8644L17.5946 15.1356C17.4585 15.3661 17.2434 15.542 16.9872 15.6321C16.7311 15.7221 16.4507 15.7204 16.1957 15.6273L14.5922 15.04C13.8962 15.6475 13.0737 16.1177 12.1672 16.4102L11.8866 18.0595C11.8419 18.3224 11.7032 18.5612 11.4953 18.7334C11.2874 18.9057 11.0237 19.0001 10.7512 19H9.24883C8.97653 18.9999 8.71311 18.9053 8.50542 18.7331C8.29774 18.5609 8.15924 18.3222 8.11459 18.0595L7.83391 16.4102C6.93828 16.1205 6.11295 15.6541 5.40898 15.04L3.80541 15.6273C3.55045 15.7208 3.26983 15.7228 3.01348 15.633C2.75714 15.5432 2.54168 15.3673 2.40544 15.1367L1.65427 13.8644C1.51807 13.6338 1.46991 13.3635 1.51836 13.1014C1.5668 12.8394 1.70871 12.6027 1.91885 12.4334L3.24059 11.3691C3.04998 10.4655 3.04998 9.53336 3.24059 8.62975L1.92 7.56775C1.70986 7.39843 1.56795 7.1617 1.51951 6.89968C1.47106 6.63765 1.51922 6.36732 1.65542 6.13675L2.40659 4.86438C2.54265 4.6336 2.75803 4.45752 3.01439 4.3675C3.27076 4.27747 3.55147 4.27933 3.80656 4.37275L5.40898 4.96C6.11293 4.34583 6.93826 3.87946 7.83391 3.58975L8.11459 1.9405ZM13.4522 10C13.4522 10.4432 13.3629 10.8821 13.1895 11.2916C13.0161 11.701 12.7619 12.0731 12.4414 12.3865C12.1209 12.6999 11.7405 12.9485 11.3218 13.1181C10.9031 13.2877 10.4543 13.375 10.0011 13.375C9.54795 13.375 9.0992 13.2877 8.6805 13.1181C8.2618 12.9485 7.88136 12.6999 7.56091 12.3865C7.24045 12.0731 6.98625 11.701 6.81282 11.2916C6.63939 10.8821 6.55012 10.4432 6.55012 10C6.55012 9.10489 6.91371 8.24645 7.56091 7.61351C8.2081 6.98058 9.08588 6.625 10.0011 6.625C10.9164 6.625 11.7942 6.98058 12.4414 7.61351C13.0886 8.24645 13.4522 9.10489 13.4522 10Z"}))),wp.element.createElement(A.Button,{className:"vpf-component-gallery-control-item-remove",onClick:function(){var e=Do(n);e[f]&&(e.splice(f,1),r(e))}},wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 2.68771C9.46811 2.68755 8.94926 2.84978 8.51493 3.15204C8.08059 3.4543 7.75215 3.88173 7.57486 4.37542H12.4251C12.2477 3.88182 11.9192 3.45449 11.4849 3.15225C11.0506 2.85001 10.5319 2.68772 10 2.68771ZM10 1C9.01207 1.00001 8.05446 1.33596 7.28915 1.95102C6.52384 2.56608 5.9978 3.4225 5.8 4.37542H2V6.06313H3.45143L4.38629 16.186C4.4573 16.955 4.81782 17.6701 5.39702 18.1908C5.97622 18.7114 6.73224 19.0001 7.51657 19H12.4846C13.2685 18.9998 14.0241 18.7112 14.603 18.1908C15.182 17.6704 15.5424 16.9558 15.6137 16.1871L16.5486 6.06313H18V4.37542H14.2C14.0022 3.4225 13.4762 2.56608 12.7108 1.95102C11.9455 1.33596 10.9879 1.00001 10 1ZM14.8274 6.06313H5.17257L6.09371 16.033C6.12595 16.3826 6.2898 16.7077 6.55307 16.9444C6.81635 17.1811 7.16002 17.3123 7.51657 17.3123H12.4846C12.8411 17.3123 13.1848 17.1811 13.4481 16.9444C13.7113 16.7077 13.8752 16.3826 13.9074 16.033L14.8274 6.06313Z"})))),wp.element.createElement(A.Button,{className:"vpf-component-gallery-control-item-button",onClick:E,"aria-expanded":k},wp.element.createElement("img",{src:t.imgThumbnailUrl||t.imgUrl,alt:t.alt||t.imgThumbnailUrl||t.imgUrl,loading:"lazy"}))),k?wp.element.createElement(er,{title:(0,R.__)("Image Settings","visual-portfolio"),img:t,idx:f,onChange:function(e){var t=Do(n);t[f]&&(t[f]=jo(jo({},t[f]),e),r(t))},onRemove:function(){var e=Do(n);e[f]&&(e.splice(f,1),r(e),M())},imageControls:i,controlName:s,attributes:d,focalPoint:a,clientId:l,isSetupWizard:c,close:function(){M()}}):null)},nr=function(e){var t=e.items,n=e.onChange,o=e.onSortEnd,r=e.imageControls,i=e.controlName,s=e.attributes,a=e.focalPoint,l=e.isSetupWizard,c=e.clientId,u=Ht(Wt(Dn,{activationConstraint:{distance:5}})),p=zo((0,O.useState)(18),2),h=p[0],d=p[1],f=zo((0,O.useState)(""),2),g=f[0],m=f[1],v=zo((0,O.useState)([]),2),y=v[0],b=v[1],w=zo((0,O.useState)(!1),2),x=w[0],S=w[1],C=zo((0,O.useState)(!1),2),_=C[0],k=C[1],$=zo((0,O.useState)(!1),2),M=$[0],T=$[1];(0,O.useEffect)(function(){function e(e){"Shift"===e.key&&T(!0)}function t(e){"Shift"===e.key&&T(!1)}return window.addEventListener("keydown",e),window.addEventListener("keyup",t),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",t)}},[]);var L=st(t);(0,O.useEffect)(function(){!g||g===Ko||L&&L.length&&L.includes(g)||m("")},[g,L]);var I=[];t&&t.length&&t.forEach(function(e,t){t<h&&I.push({id:t+1,data:e})});var D=wp.element.createElement(E.MediaUpload,{multiple:"add",onSelect:function(e){n(Qo(e,t))},allowedTypes:Go,value:!(!t||!t.length)&&t.map(function(e){return e.id}),render:function(e){var n=e.open;return wp.element.createElement(Yo,{open:n,items:t,isSetupWizard:l})}});return wp.element.createElement("div",{className:"vpf-component-gallery-control-items"},t&&t.length&&t.length>9?D:null,null!=t&&t.length&&!l?wp.element.createElement("div",{className:"vpf-component-gallery-control-item-fullwidth"},wp.element.createElement("div",{className:"vpf-component-gallery-control-item-bulk-actions"},wp.element.createElement(A.CheckboxControl,{title:(0,R.__)("Select All","visual-portfolio"),checked:t.length===y.length,indeterminate:y.length>0&&t.length!==y.length,onChange:function(){t.length===y.length?b([]):b(t.map(function(e){return e.id})),S(!1)},__nextHasNoMarginBottom:!0}),wp.element.createElement(A.SelectControl,{title:(0,R.__)("Bulk Actions","visual-portfolio"),value:g,disabled:!y.length,options:[{label:(0,R.__)("Bulk actions","visual-portfolio"),value:""},{label:(0,R.__)("Edit","visual-portfolio"),value:"edit"},{label:(0,R.__)("Delete","visual-portfolio"),value:"delete"}],onChange:function(e){"delete"===e&&window.confirm((0,R.__)("Are you sure you want to remove selected items?","visual-portfolio"))?(n(t.filter(function(e){return!y.includes(e.id)})),b([]),S(!1)):"edit"===e&&k(!0)},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})),null!=L&&L.length?wp.element.createElement("div",{className:"vpf-component-gallery-control-item-filter"},wp.element.createElement(A.SelectControl,{title:(0,R.__)("Filter by Category","visual-portfolio"),value:g,options:[{label:(0,R.__)("All","visual-portfolio"),value:""},{label:(0,R.__)("Uncategorized","visual-portfolio"),value:Ko}].concat(Do(L.map(function(e){return{label:e,value:e}}))),onChange:function(e){m(e)},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M8 16H12V14.5652H8V16ZM4 5V6.43478H16V5H4ZM6 11.2174H14V9.78261H6V11.2174Z",fill:"currentColor"}))):null):null,_&&!l?wp.element.createElement(er,{title:(0,R.__)("Bulk Image Settings","visual-portfolio"),img:{imgThumbnailUrl:"".concat(Uo.plugin_url,"assets/images/placeholder.png")},idx:-1,onChange:function(e){var o=Do(t);o.forEach(function(t,n){y.includes(t.id)&&(o[n]=jo(jo({},t),e))}),n(o)},imageControls:r,controlName:i,attributes:s,focalPoint:a,clientId:c,isSetupWizard:l,isBulkEdit:!0,bulkItems:y,close:function(){k(!1)}}):null,wp.element.createElement(ho,{sensors:u,collisionDetection:qt,onDragEnd:function(e){var t=e.active,n=e.over;t.id!==n.id&&o(t.id-1,n.id-1)}},wp.element.createElement(ko,{items:I,strategy:wo},I.map(function(e){var o,u=e.data,p=e.id,h=!1;if(g===Ko)h=null==u||null===(o=u.categories)||void 0===o?void 0:o.length;else if(g){var d;h=null==u||null===(d=u.categories)||void 0===d||!d.length||!u.categories.includes(g)}return wp.element.createElement(tr,{key:"vpf-component-gallery-control-items-sortable-".concat(p),index:p,id:p,img:u,items:t,onChange:n,imageControls:r,controlName:i,attributes:s,focalPoint:a,isSetupWizard:l,isMuffled:h,clientId:c,isChecked:y.includes(u.id),onCheck:function(){if(M&&x){for(var e=t.findIndex(function(e){return e.id===x}),n=t.findIndex(function(e){return e.id===u.id}),o=Do(y),r=y.includes(u.id),i=e<n?1:-1,s=e;s!==n+i;s+=i){var a=t[s].id,l=o.indexOf(a);r?-1!==l&&o.splice(l,1):-1===l&&o.push(a)}b(o)}else b(function(e){return e.includes(u.id)?e.filter(function(e){return e!==u.id}):[].concat(Do(e),[u.id])});S(u.id)}})}))),t&&t.length?wp.element.createElement("span",{className:"vpf-component-gallery-control-item-fullwidth vpf-component-gallery-control-item-pagination"},wp.element.createElement("span",null,(0,R.sprintf)((0,R._n)("Showing %1$s of %2$s Image","Showing %1$s of %2$s Images",t.length,"visual-portfolio"),h>t.length?t.length:h,t.length)),t.length>h?wp.element.createElement("div",{className:"vpf-component-gallery-control-item-pagination-buttons"},wp.element.createElement(A.Button,{variant:"secondary",onClick:function(){d(h+18)}},(0,R.__)("Show More","visual-portfolio")),wp.element.createElement(A.Button,{isLink:!0,onClick:function(){d(t.length)}},(0,R.__)("Show All","visual-portfolio"))):null):null,D)};function or(e){var t=e.imageControls,n=e.attributes,o=e.name,r=e.value,i=e.onChange,s=e.focalPoint,a=e.isSetupWizard,l=e.clientId,c=r.filter(function(e){return e.id});return wp.element.createElement("div",{className:"vpf-component-gallery-control"},wp.element.createElement(E.MediaUpload,{onSelect:function(e){i(Qo(e))},allowedTypes:Go,multiple:"add",value:c&&Object.keys(c).length?c.map(function(e){return e.id}):[],render:function(){return wp.element.createElement(nr,{items:c,onChange:i,imageControls:t,controlName:o,attributes:n,focalPoint:s,clientId:l,isSetupWizard:a,onSortEnd:function(e,t){var n=vo(c,e,t);i(n)}})}}))}const rr=window.jQuery;var ir=n.n(rr);function sr(e){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sr(e)}function ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(n),!0).forEach(function(t){cr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ar(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cr(e,t,n){return(t=pr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ur(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,pr(o.key),o)}}function pr(e){var t=function(e){if("object"!=sr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sr(t)?t:t+""}function hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hr=function(){return!!e})()}function dr(e){return dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dr(e)}function fr(e,t){return fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fr(e,t)}var gr=window,mr=gr.ajaxurl,vr=gr.VPGutenbergVariables,yr={},br=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];var i=(e=function(e,t,n){return t=dr(t),function(e,t){if(t&&("object"==sr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hr()?Reflect.construct(t,n||[],dr(e).constructor):t.apply(e,n))}(this,t,[].concat(o))).props.callback;return e.state={options:lr({},e.props.options),ajaxStatus:!!i,collapsed:!0},yr[e.props.controlName]=lr({},e.props.options),e.requestAjax=e.requestAjax.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fr(e,t)}(t,e),n=t,o=[{key:"componentDidMount",value:function(){var e=this;this.props.callback&&this.requestAjax({},function(t){t.options&&e.setState({options:t.options})})}},{key:"requestAjax",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.props,i=r.controlName,s=r.attributes;if(!this.isAJAXinProgress){this.isAJAXinProgress=!0,o&&this.setState({ajaxStatus:"progress"});var a=lr({action:"vp_dynamic_control_callback",nonce:vr.nonce,vp_control_name:i,vp_attributes:s},t);ir().ajax({url:mr,method:"POST",dataType:"json",data:a,complete:function(t){var r=t.responseJSON;n&&r.response&&(r.response.options&&(yr[i]=lr(lr({},yr[i]),r.response.options)),n(r.response)),o&&e.setState({ajaxStatus:!0}),e.isAJAXinProgress=!1}})}}},{key:"render",value:function(){var e=this,t=this.props,n=t.controlName,o=t.value,r=t.onChange,i=t.collapseRows,s=t.isSetupWizard,a=this.state,l=a.options,c=a.ajaxStatus,u=a.collapsed;if(c&&"progress"===c)return wp.element.createElement("div",{className:"vpf-component-icon-selector"},wp.element.createElement(A.Spinner,null));var p=Object.keys(l),h=p.indexOf(o),d=i*(s?5:3),f=!1!==i&&p.length>d,g=d-1;if(f&&u&&h>=g){var m=g-1,v=p[h];p.splice(h,1),p.splice(m,0,v)}return wp.element.createElement("div",{className:T()("vpf-component-icon-selector",f?"vpf-component-icon-selector-allow-collapsing":""),"data-control-name":n},p.filter(function(e,t){return!f||!u||t<g}).map(function(e){var t=l[e],n=t.icon;return s&&(t.image_preview_wizard?n='<img src="'.concat(t.image_preview_wizard,'" alt="').concat(t.title,' Preview">'):t.icon_wizard&&(n=t.icon_wizard)),wp.element.createElement(A.Button,{key:"icon-selector-".concat(t.title,"-").concat(t.value),onClick:function(){return r(t.value)},className:T()("vpf-component-icon-selector-item",o===t.value?"vpf-component-icon-selector-item-active":"",t.className)},n?wp.element.createElement(O.RawHTML,null,n):"",t.title?wp.element.createElement("span",null,t.title):"")}),f?wp.element.createElement(A.Button,{onClick:function(){e.setState({collapsed:!u})},className:T()("vpf-component-icon-selector-item","vpf-component-icon-selector-item-collapse",u?"":"vpf-component-icon-selector-item-expanded")},wp.element.createElement("div",{className:"vpf-component-icon-selector-item-collapse"},wp.element.createElement("svg",{width:"11",height:"6",viewBox:"0 0 11 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M10 1.25L5.5 4.75L1 1.25",stroke:"currentColor",strokeWidth:"1"}))),wp.element.createElement("span",null,u?(0,R.__)("More","visual-portfolio"):(0,R.__)("Less","visual-portfolio"))):null)}}],o&&ur(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(O.Component),wr=A.NavigatorProvider||A.__experimentalNavigatorProvider,xr=A.NavigatorScreen||A.__experimentalNavigatorScreen,Sr=A.NavigatorButton||A.__experimentalNavigatorButton,Cr=A.NavigatorBackButton||A.__experimentalNavigatorBackButton;function _r(e){var t=e.children,n=e.options;return wp.element.createElement(wr,{initialPath:"/",className:"vpf-component-navigator-control"},wp.element.createElement(xr,{path:"/",className:"vpf-component-navigator-control-toggles"},n.map(function(e){return wp.element.createElement(Sr,{key:e.category,path:"/".concat(e.category)},wp.element.createElement("span",null,e.title),wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})))})),n.map(function(e){return wp.element.createElement(xr,{key:e.category,path:"/".concat(e.category)},wp.element.createElement("div",{className:"vpf-component-navigator-control-screen-title"},wp.element.createElement(Cr,null,wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},wp.element.createElement("path",{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}))),wp.element.createElement("span",null,e.title)),t(e))}))}function kr(e){return kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kr(e)}function $r(){return $r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},$r.apply(null,arguments)}function Er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Or(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Tr(o.key),o)}}function Mr(e,t,n){return t&&Or(e.prototype,t),n&&Or(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tr(e){var t=function(e){if("object"!=kr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kr(t)?t:t+""}function Ar(e,t,n){return t=Rr(t),function(e,t){if(t&&("object"==kr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Lr()?Reflect.construct(t,n||[],Rr(e).constructor):t.apply(e,n))}function Lr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lr=function(){return!!e})()}function Rr(e){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rr(e)}function Ir(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dr(e,t)}function Dr(e,t){return Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dr(e,t)}var Pr=function(e){function t(){return Er(this,t),Ar(this,t,arguments)}return Ir(t,e),Mr(t,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.children,o=e.contentBefore,r=void 0===o?"":o,i=e.contentAfter,s=void 0===i?"":i;return wp.element.createElement("div",{className:"vpf-pro-note-wrapper"},r,wp.element.createElement("div",{className:"vpf-pro-note"},t?wp.element.createElement("h3",null,t):"",n?wp.element.createElement("div",null,n):""),s)}}])}(O.Component);Pr.Button=function(e){function t(){return Er(this,t),Ar(this,t,arguments)}return Ir(t,e),Mr(t,[{key:"render",value:function(){var e=this.props.children;return wp.element.createElement("a",$r({className:"vpf-pro-note-button"},this.props),e)}}])}(O.Component);var Nr=n(28),jr=n.n(Nr);const Fr=function(e){var t=[],n=null,o=function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];t=r,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return o.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},o};function zr(e){return zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zr(e)}function Br(e){var t=function(e){if("object"!=zr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zr(t)?t:t+""}function Wr(e,t,n){return(t=Br(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hr(Object(n),!0).forEach(function(t){Wr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ur(){return Ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ur.apply(null,arguments)}var Gr=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Kr=Math.abs,Yr=String.fromCharCode,qr=Object.assign;function Qr(e){return e.trim()}function Xr(e,t,n){return e.replace(t,n)}function Zr(e,t){return e.indexOf(t)}function Jr(e,t){return 0|e.charCodeAt(t)}function ei(e,t,n){return e.slice(t,n)}function ti(e){return e.length}function ni(e){return e.length}function oi(e,t){return t.push(e),e}var ri=1,ii=1,si=0,ai=0,li=0,ci="";function ui(e,t,n,o,r,i,s){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:ri,column:ii,length:s,return:""}}function pi(e,t){return qr(ui("",null,null,"",null,null,0),e,{length:-e.length},t)}function hi(){return li=ai>0?Jr(ci,--ai):0,ii--,10===li&&(ii=1,ri--),li}function di(){return li=ai<si?Jr(ci,ai++):0,ii++,10===li&&(ii=1,ri++),li}function fi(){return Jr(ci,ai)}function gi(){return ai}function mi(e,t){return ei(ci,e,t)}function vi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yi(e){return ri=ii=1,si=ti(ci=e),ai=0,[]}function bi(e){return ci="",e}function wi(e){return Qr(mi(ai-1,Ci(91===e?e+2:40===e?e+1:e)))}function xi(e){for(;(li=fi())&&li<33;)di();return vi(e)>2||vi(li)>3?"":" "}function Si(e,t){for(;--t&&di()&&!(li<48||li>102||li>57&&li<65||li>70&&li<97););return mi(e,gi()+(t<6&&32==fi()&&32==di()))}function Ci(e){for(;di();)switch(li){case e:return ai;case 34:case 39:34!==e&&39!==e&&Ci(li);break;case 40:41===e&&Ci(e);break;case 92:di()}return ai}function _i(e,t){for(;di()&&e+li!==57&&(e+li!==84||47!==fi()););return"/*"+mi(t,ai-1)+"*"+Yr(47===e?e:di())}function ki(e){for(;!vi(fi());)di();return mi(e,ai)}var $i="-ms-",Ei="-moz-",Oi="-webkit-",Mi="comm",Ti="rule",Ai="decl",Li="@keyframes";function Ri(e,t){for(var n="",o=ni(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function Ii(e,t,n,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Ai:return e.return=e.return||e.value;case Mi:return"";case Li:return e.return=e.value+"{"+Ri(e.children,o)+"}";case Ti:e.value=e.props.join(",")}return ti(n=Ri(e.children,o))?e.return=e.value+"{"+n+"}":""}function Di(e){return bi(Pi("",null,null,null,[""],e=yi(e),0,[0],e))}function Pi(e,t,n,o,r,i,s,a,l){for(var c=0,u=0,p=s,h=0,d=0,f=0,g=1,m=1,v=1,y=0,b="",w=r,x=i,S=o,C=b;m;)switch(f=y,y=di()){case 40:if(108!=f&&58==Jr(C,p-1)){-1!=Zr(C+=Xr(wi(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=wi(y);break;case 9:case 10:case 13:case 32:C+=xi(f);break;case 92:C+=Si(gi()-1,7);continue;case 47:switch(fi()){case 42:case 47:oi(ji(_i(di(),gi()),t,n),l);break;default:C+="/"}break;case 123*g:a[c++]=ti(C)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:-1==v&&(C=Xr(C,/\f/g,"")),d>0&&ti(C)-p&&oi(d>32?Fi(C+";",o,n,p-1):Fi(Xr(C," ","")+";",o,n,p-2),l);break;case 59:C+=";";default:if(oi(S=Ni(C,t,n,c,u,r,a,b,w=[],x=[],p),i),123===y)if(0===u)Pi(C,t,S,S,w,i,p,a,x);else switch(99===h&&110===Jr(C,3)?100:h){case 100:case 108:case 109:case 115:Pi(e,S,S,o&&oi(Ni(e,S,S,0,0,r,a,b,r,w=[],p),x),r,x,p,a,o?w:x);break;default:Pi(C,S,S,S,[""],x,0,a,x)}}c=u=d=0,g=v=1,b=C="",p=s;break;case 58:p=1+ti(C),d=f;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==hi())continue;switch(C+=Yr(y),y*g){case 38:v=u>0?1:(C+="\f",-1);break;case 44:a[c++]=(ti(C)-1)*v,v=1;break;case 64:45===fi()&&(C+=wi(di())),h=fi(),u=p=ti(b=C+=ki(gi())),y++;break;case 45:45===f&&2==ti(C)&&(g=0)}}return i}function Ni(e,t,n,o,r,i,s,a,l,c,u){for(var p=r-1,h=0===r?i:[""],d=ni(h),f=0,g=0,m=0;f<o;++f)for(var v=0,y=ei(e,p+1,p=Kr(g=s[f])),b=e;v<d;++v)(b=Qr(g>0?h[v]+" "+y:Xr(y,/&\f/g,h[v])))&&(l[m++]=b);return ui(e,t,n,0===r?Ti:a,l,c,u)}function ji(e,t,n){return ui(e,t,n,Mi,Yr(li),ei(e,2,-2),0)}function Fi(e,t,n,o){return ui(e,t,n,Ai,ei(e,0,o),ei(e,o+1,-1),o)}var zi=function(e,t,n){for(var o=0,r=0;o=r,r=fi(),38===o&&12===r&&(t[n]=1),!vi(r);)di();return mi(e,ai)},Bi=new WeakMap,Wi=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Bi.get(n))&&!o){Bi.set(e,!0);for(var r=[],i=function(e,t){return bi(function(e,t){var n=-1,o=44;do{switch(vi(o)){case 0:38===o&&12===fi()&&(t[n]=1),e[n]+=zi(ai-1,t,n);break;case 2:e[n]+=wi(o);break;case 4:if(44===o){e[++n]=58===fi()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Yr(o)}}while(o=di());return e}(yi(e),t))}(t,r),s=n.props,a=0,l=0;a<i.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=r[a]?i[a].replace(/&\f/g,s[c]):s[c]+" "+i[a]}}},Hi=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Vi(e,t){switch(function(e,t){return 45^Jr(e,0)?(((t<<2^Jr(e,0))<<2^Jr(e,1))<<2^Jr(e,2))<<2^Jr(e,3):0}(e,t)){case 5103:return Oi+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Oi+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Oi+e+Ei+e+$i+e+e;case 6828:case 4268:return Oi+e+$i+e+e;case 6165:return Oi+e+$i+"flex-"+e+e;case 5187:return Oi+e+Xr(e,/(\w+).+(:[^]+)/,Oi+"box-$1$2"+$i+"flex-$1$2")+e;case 5443:return Oi+e+$i+"flex-item-"+Xr(e,/flex-|-self/,"")+e;case 4675:return Oi+e+$i+"flex-line-pack"+Xr(e,/align-content|flex-|-self/,"")+e;case 5548:return Oi+e+$i+Xr(e,"shrink","negative")+e;case 5292:return Oi+e+$i+Xr(e,"basis","preferred-size")+e;case 6060:return Oi+"box-"+Xr(e,"-grow","")+Oi+e+$i+Xr(e,"grow","positive")+e;case 4554:return Oi+Xr(e,/([^-])(transform)/g,"$1"+Oi+"$2")+e;case 6187:return Xr(Xr(Xr(e,/(zoom-|grab)/,Oi+"$1"),/(image-set)/,Oi+"$1"),e,"")+e;case 5495:case 3959:return Xr(e,/(image-set\([^]*)/,Oi+"$1$`$1");case 4968:return Xr(Xr(e,/(.+:)(flex-)?(.*)/,Oi+"box-pack:$3"+$i+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Oi+e+e;case 4095:case 3583:case 4068:case 2532:return Xr(e,/(.+)-inline(.+)/,Oi+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ti(e)-1-t>6)switch(Jr(e,t+1)){case 109:if(45!==Jr(e,t+4))break;case 102:return Xr(e,/(.+:)(.+)-([^]+)/,"$1"+Oi+"$2-$3$1"+Ei+(108==Jr(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Zr(e,"stretch")?Vi(Xr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Jr(e,t+1))break;case 6444:switch(Jr(e,ti(e)-3-(~Zr(e,"!important")&&10))){case 107:return Xr(e,":",":"+Oi)+e;case 101:return Xr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Oi+(45===Jr(e,14)?"inline-":"")+"box$3$1"+Oi+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Jr(e,t+11)){case 114:return Oi+e+$i+Xr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Oi+e+$i+Xr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Oi+e+$i+Xr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Oi+e+$i+e+e}return e}var Ui=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case Ai:e.return=Vi(e.value,e.length);break;case Li:return Ri([pi(e,{value:Xr(e.value,"@","@"+Oi)})],o);case Ti:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Ri([pi(e,{props:[Xr(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return Ri([pi(e,{props:[Xr(t,/:(plac\w+)/,":"+Oi+"input-$1")]}),pi(e,{props:[Xr(t,/:(plac\w+)/,":-moz-$1")]}),pi(e,{props:[Xr(t,/:(plac\w+)/,$i+"input-$1")]})],o)}return""})}}],Gi=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var o,r,i=e.stylisPlugins||Ui,s={},a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)});var l,c,u,p,h=[Ii,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],d=(c=[Wi,Hi].concat(i,h),u=ni(c),function(e,t,n,o){for(var r="",i=0;i<u;i++)r+=c[i](e,t,n,o)||"";return r});r=function(e,t,n,o){l=n,Ri(Di(e?e+"{"+t.styles+"}":t.styles),d),o&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new Gr({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:r};return f.sheet.hydrate(a),f},Ki=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},Yi={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function qi(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Qi=/[A-Z]|^ms/g,Xi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zi=function(e){return 45===e.charCodeAt(1)},Ji=function(e){return null!=e&&"boolean"!=typeof e},es=qi(function(e){return Zi(e)?e:e.replace(Qi,"-$&").toLowerCase()}),ts=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Xi,function(e,t,n){return os={name:t,styles:n,next:os},t})}return 1===Yi[e]||Zi(e)||"number"!=typeof t||0===t?t:t+"px"};function ns(e,t,n){if(null==n)return"";var o=n;if(void 0!==o.__emotion_styles)return o;switch(typeof n){case"boolean":return"";case"object":var r=n;if(1===r.anim)return os={name:r.name,styles:r.styles,next:os},r.name;var i=n;if(void 0!==i.styles){var s=i.next;if(void 0!==s)for(;void 0!==s;)os={name:s.name,styles:s.styles,next:os},s=s.next;return i.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=ns(e,t,n[r])+";";else for(var i in n){var s=n[i];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?o+=i+"{"+t[a]+"}":Ji(a)&&(o+=es(i)+":"+ts(i,a)+";")}else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=ns(e,t,s);switch(i){case"animation":case"animationName":o+=es(i)+":"+l+";";break;default:o+=i+"{"+l+"}"}}else for(var c=0;c<s.length;c++)Ji(s[c])&&(o+=es(i)+":"+ts(i,s[c])+";")}return o}(e,t,n);case"function":if(void 0!==e){var a=os,l=n(e);return os=a,ns(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var os,rs=/label:\s*([^\s;{]+)\s*(;|$)/g;function is(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";os=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=ns(n,t,i)):r+=i[0];for(var s=1;s<e.length;s++)r+=ns(n,t,e[s]),o&&(r+=i[s]);rs.lastIndex=0;for(var a,l="";null!==(a=rs.exec(r));)l+="-"+a[1];var c=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(r)+l;return{name:c,styles:r,next:os}}var ss,as,ls=!!h.useInsertionEffect&&h.useInsertionEffect,cs=ls||function(e){return e()},us=(ls||h.useLayoutEffect,h.createContext("undefined"!=typeof HTMLElement?Gi({key:"css"}):null)),ps=(us.Provider,function(e){return(0,h.forwardRef)(function(t,n){var o=(0,h.useContext)(us);return e(t,o,n)})}),hs=h.createContext({}),ds={}.hasOwnProperty,fs="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",gs=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return Ki(t,n,o),cs(function(){return function(e,t,n){Ki(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)}),null},ms=ps(function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var r=e[fs],i=[o],s="";"string"==typeof e.className?s=function(e,t,n){var o="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(o+=n+" ")}),o}(t.registered,i,e.className):null!=e.className&&(s=e.className+" ");var a=is(i,void 0,h.useContext(hs));s+=t.key+"-"+a.name;var l={};for(var c in e)ds.call(e,c)&&"css"!==c&&c!==fs&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),h.createElement(h.Fragment,null,h.createElement(gs,{cache:t,serialized:a,isStringTag:"string"==typeof r}),h.createElement(r,l))}),vs=ms,ys=(n(4146),function(e,t){var n=arguments;if(null==t||!ds.call(t,"css"))return h.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=vs,r[1]=function(e,t){var n={};for(var o in t)ds.call(t,o)&&(n[o]=t[o]);return n[fs]=e,n}(e,t);for(var i=2;i<o;i++)r[i]=n[i];return h.createElement.apply(null,r)});function bs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return is(t)}function ws(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function xs(e,t){if(e){if("string"==typeof e)return ws(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ws(e,t):void 0}}function Ss(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||xs(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cs(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}ss=ys||(ys={}),as||(as=ss.JSX||(ss.JSX={}));const _s=Math.min,ks=Math.max,$s=Math.round,Es=Math.floor,Os=e=>({x:e,y:e});function Ms(){return"undefined"!=typeof window}function Ts(e){return Rs(e)?(e.nodeName||"").toLowerCase():"#document"}function As(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ls(e){var t;return null==(t=(Rs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Rs(e){return!!Ms()&&(e instanceof Node||e instanceof As(e).Node)}function Is(e){return!!Ms()&&(e instanceof Element||e instanceof As(e).Element)}function Ds(e){return!!Ms()&&(e instanceof HTMLElement||e instanceof As(e).HTMLElement)}function Ps(e){return!(!Ms()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof As(e).ShadowRoot)}function Ns(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=js(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function js(e){return As(e).getComputedStyle(e)}function Fs(e){const t=function(e){if("html"===Ts(e))return e;const t=e.assignedSlot||e.parentNode||Ps(e)&&e.host||Ls(e);return Ps(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(Ts(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ds(t)&&Ns(t)?t:Fs(t)}function zs(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Fs(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=As(r);if(i){const e=Bs(s);return t.concat(s,s.visualViewport||[],Ns(r)?r:[],e&&n?zs(e):[])}return t.concat(r,zs(r,[],n))}function Bs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ws(e){return Is(e)?e:e.contextElement}function Hs(e){const t=Ws(e);if(!Ds(t))return Os(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=function(e){const t=js(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ds(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=$s(n)!==i||$s(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}(t);let s=(i?$s(n.width):n.width)/o,a=(i?$s(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Vs=Os(0);function Us(e){const t=As(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Vs}function Gs(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Ws(e);let s=Os(1);t&&(o?Is(o)&&(s=Hs(o)):s=Hs(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==As(e))&&t}(i,n,o)?Us(i):Os(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,p=r.height/s.y;if(i){const e=As(i),t=o&&Is(o)?As(o):o;let n=e,r=Bs(n);for(;r&&o&&t!==n;){const e=Hs(r),t=r.getBoundingClientRect(),o=js(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,p*=e.y,l+=i,c+=s,n=As(r),r=Bs(n)}}return function(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}({width:u,height:p,x:l,y:c})}function Ks(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var Ys=h.useLayoutEffect,qs=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Qs=function(){};function Xs(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Zs(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var i=[].concat(o);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&i.push("".concat(Xs(e,s)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var Js=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===zr(e)&&null!==e?[e]:[];var t},ea=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Vr({},Cs(e,qs))},ta=function(e,t,n){var o=e.cx,r=e.getStyles,i=e.getClassNames,s=e.className;return{css:r(t,e),className:o(null!=n?n:{},i(t,e),s)}};function na(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function oa(e){return na(e)?window.pageYOffset:e.scrollTop}function ra(e,t){na(e)?window.scrollTo(0,t):e.scrollTop=t}function ia(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Qs,r=oa(e),i=t-r,s=0;!function t(){var a,l=i*((a=(a=s+=10)/n-1)*a*a+1)+r;ra(e,l),s<n?window.requestAnimationFrame(t):o(e)}()}function sa(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?ra(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&ra(e,Math.max(t.offsetTop-r,0))}function aa(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var la=!1,ca={get passive(){return la=!0}},ua="undefined"!=typeof window?window:{};ua.addEventListener&&ua.removeEventListener&&(ua.addEventListener("p",Qs,ca),ua.removeEventListener("p",Qs,!1));var pa=la;function ha(e){return null!=e}function da(e,t,n){return e?t:n}var fa=["children","innerProps"],ga=["children","innerProps"];var ma,va,ya,ba=function(e){return"auto"===e?"bottom":e},wa=(0,h.createContext)(null),xa=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,s=e.menuShouldScrollIntoView,a=e.theme,l=((0,h.useContext)(wa)||{}).setPortalPlacement,c=(0,h.useRef)(null),u=Ss((0,h.useState)(o),2),p=u[0],d=u[1],f=Ss((0,h.useState)(null),2),g=f[0],m=f[1],v=a.spacing.controlHeight;return Ys(function(){var e=c.current;if(e){var t="fixed"===i,a=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,i=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,p=l.getBoundingClientRect().height,h=n.getBoundingClientRect(),d=h.bottom,f=h.height,g=h.top,m=n.offsetParent.getBoundingClientRect().top,v=s||na(u=l)?window.innerHeight:u.clientHeight,y=oa(l),b=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=m-w,S=v-g,C=x+y,_=p-y-g,k=d-v+y+b,$=y+g-w,E=160;switch(r){case"auto":case"bottom":if(S>=f)return{placement:"bottom",maxHeight:t};if(_>=f&&!s)return i&&ia(l,k,E),{placement:"bottom",maxHeight:t};if(!s&&_>=o||s&&S>=o)return i&&ia(l,k,E),{placement:"bottom",maxHeight:s?S-b:_-b};if("auto"===r||s){var O=t,M=s?x:C;return M>=o&&(O=Math.min(M-b-a,t)),{placement:"top",maxHeight:O}}if("bottom"===r)return i&&ra(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(x>=f)return{placement:"top",maxHeight:t};if(C>=f&&!s)return i&&ia(l,$,E),{placement:"top",maxHeight:t};if(!s&&C>=o||s&&x>=o){var T=t;return(!s&&C>=o||s&&x>=o)&&(T=s?x-w:C-w),i&&ia(l,$,E),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:r,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:v});d(a.maxHeight),m(a.placement),null==l||l(a.placement)}},[o,r,i,s,n,l,v]),t({ref:c,placerProps:Vr(Vr({},e),{},{placement:g||ba(r),maxHeight:p})})},Sa=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return Vr({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},Ca=Sa,_a=Sa,ka=["size"],$a=["innerProps","isRtl","size"],Ea={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Oa=function(e){var t=e.size,n=Cs(e,ka);return ys("svg",Ur({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ea},n))},Ma=function(e){return ys(Oa,Ur({size:20},e),ys("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ta=function(e){return ys(Oa,Ur({size:20},e),ys("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Aa=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return Vr({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},La=Aa,Ra=Aa,Ia=function(){var e=bs.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(ma||(va=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],ya||(ya=va.slice(0)),ma=Object.freeze(Object.defineProperties(va,{raw:{value:Object.freeze(ya)}})))),Da=function(e){var t=e.delay,n=e.offset;return ys("span",{css:bs({animation:"".concat(Ia," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Pa=["data"],Na=["innerRef","isDisabled","isHidden","inputClassName"],ja={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Fa={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Vr({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},ja)},za=function(e){return Vr({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},ja)},Ba=function(e){var t=e.children,n=e.innerProps;return ys("div",n,t)},Wa={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return ys("div",Ur({},ta(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||ys(Ma,null))},Control:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,s=e.menuIsOpen;return ys("div",Ur({ref:r},ta(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":s}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return ys("div",Ur({},ta(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||ys(Ta,null))},DownChevron:Ta,CrossIcon:Ma,Group:function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,s=e.headingProps,a=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return ys("div",Ur({},ta(e,"group",{group:!0}),a),ys(i,Ur({},s,{selectProps:u,theme:c,getStyles:o,getClassNames:r,cx:n}),l),ys("div",null,t))},GroupHeading:function(e){var t=ea(e);t.data;var n=Cs(t,Pa);return ys("div",Ur({},ta(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return ys("div",Ur({},ta(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return ys("span",Ur({},t,ta(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,o=ea(e),r=o.innerRef,i=o.isDisabled,s=o.isHidden,a=o.inputClassName,l=Cs(o,Na);return ys("div",Ur({},ta(e,"input",{"input-container":!0}),{"data-value":n||""}),ys("input",Ur({className:t({input:!0},a),ref:r,style:za(s),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=Cs(e,$a);return ys("div",Ur({},ta(Vr(Vr({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),ys(Da,{delay:0,offset:n}),ys(Da,{delay:160,offset:!0}),ys(Da,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return ys("div",Ur({},ta(e,"menu",{menu:!0}),{ref:n},o),t)},MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return ys("div",Ur({},ta(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,s=e.menuPosition,a=(0,h.useRef)(null),l=(0,h.useRef)(null),c=Ss((0,h.useState)(ba(i)),2),u=c[0],p=c[1],d=(0,h.useMemo)(function(){return{setPortalPlacement:p}},[]),f=Ss((0,h.useState)(null),2),g=f[0],m=f[1],v=(0,h.useCallback)(function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===s?0:window.pageYOffset,n=e[u]+t;n===(null==g?void 0:g.offset)&&e.left===(null==g?void 0:g.rect.left)&&e.width===(null==g?void 0:g.rect.width)||m({offset:n,rect:e})}},[o,s,u,null==g?void 0:g.offset,null==g?void 0:g.rect.left,null==g?void 0:g.rect.width]);Ys(function(){v()},[v]);var y=(0,h.useCallback)(function(){"function"==typeof l.current&&(l.current(),l.current=null),o&&a.current&&(l.current=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=Ws(e),u=r||i?[...c?zs(c):[],...zs(t)]:[];u.forEach(e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const p=c&&a?function(e,t){let n,o=null;const r=Ls(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:p,width:h,height:d}=c;if(a||t(),!h||!d)return;const f={rootMargin:-Es(p)+"px "+-Es(r.clientWidth-(u+h))+"px "+-Es(r.clientHeight-(p+d))+"px "+-Es(u)+"px",threshold:ks(0,_s(1,l))||1};let g=!0;function m(t){const o=t[0].intersectionRatio;if(o!==l){if(!g)return s();o?s(!1,o):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==o||Ks(c,e.getBoundingClientRect())||s(),g=!1}try{o=new IntersectionObserver(m,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,f)}o.observe(e)}(!0),i}(c,n):null;let h,d=-1,f=null;s&&(f=new ResizeObserver(e=>{let[o]=e;o&&o.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let g=l?Gs(e):null;return l&&function t(){const o=Gs(e);g&&!Ks(g,o)&&n(),g=o,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==p||p(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}(o,a.current,v,{elementResize:"ResizeObserver"in window}))},[o,v]);Ys(function(){y()},[y]);var b=(0,h.useCallback)(function(e){a.current=e,y()},[y]);if(!t&&"fixed"!==s||!g)return null;var w=ys("div",Ur({ref:b},ta(Vr(Vr({},e),{},{offset:g.offset,position:s,rect:g.rect}),"menuPortal",{"menu-portal":!0}),r),n);return ys(wa.Provider,{value:d},t?(0,lt.createPortal)(w,t):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=Cs(e,ga);return ys("div",Ur({},ta(Vr(Vr({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=Cs(e,fa);return ys("div",Ur({},ta(Vr(Vr({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,s=e.removeProps,a=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return ys(l,{data:o,innerProps:Vr(Vr({},ta(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:a},ys(c,{data:o,innerProps:Vr({},ta(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},t),ys(u,{data:o,innerProps:Vr(Vr({},ta(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},s),selectProps:a}))},MultiValueContainer:Ba,MultiValueLabel:Ba,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return ys("div",Ur({role:"button"},n),t||ys(Ma,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,s=e.innerProps;return ys("div",Ur({},ta(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},s),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return ys("div",Ur({},ta(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return ys("div",Ur({},ta(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return ys("div",Ur({},ta(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return ys("div",Ur({},ta(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},Ha=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Va(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,r=void 0!==o&&o,i=e.defaultValue,s=void 0===i?null:i,a=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,p=e.onMenuClose,d=e.onMenuOpen,f=e.value,g=Cs(e,Ha),m=Ss((0,h.useState)(void 0!==a?a:n),2),v=m[0],y=m[1],b=Ss((0,h.useState)(void 0!==l?l:r),2),w=b[0],x=b[1],S=Ss((0,h.useState)(void 0!==f?f:s),2),C=S[0],_=S[1],k=(0,h.useCallback)(function(e,t){"function"==typeof c&&c(e,t),_(e)},[c]),$=(0,h.useCallback)(function(e,t){var n;"function"==typeof u&&(n=u(e,t)),y(void 0!==n?n:e)},[u]),E=(0,h.useCallback)(function(){"function"==typeof d&&d(),x(!0)},[d]),O=(0,h.useCallback)(function(){"function"==typeof p&&p(),x(!1)},[p]),M=void 0!==a?a:v,T=void 0!==l?l:w,A=void 0!==f?f:C;return Vr(Vr({},g),{},{inputValue:M,menuIsOpen:T,onChange:k,onInputChange:$,onMenuClose:O,onMenuOpen:E,value:A})}function Ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ga(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Br(o.key),o)}}function Ka(e,t,n){return t&&Ga(e.prototype,t),n&&Ga(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ya(e,t){return Ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ya(e,t)}function qa(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ya(e,t)}function Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qa(e)}function Xa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xa=function(){return!!e})()}function Za(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ja(e,t){if(t&&("object"==zr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Za(e)}function el(e){return function(e){if(Array.isArray(e))return ws(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xs(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tl=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function nl(e,t){return e===t||!(!tl(e)||!tl(t))}function ol(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!nl(e[n],t[n]))return!1;return!0}for(var rl={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},il=function(e){return ys("span",Ur({css:rl},e))},sl={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=void 0===n?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,s=e.selectValue,a=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(i," focused, ").concat(u(s,n),".");if("menu"===t&&c){var p=a?" disabled":"",h="".concat(l?" selected":"").concat(p);return"".concat(i).concat(h,", ").concat(u(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},al=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,s=e.selectValue,a=e.selectProps,l=e.id,c=e.isAppleDevice,u=a.ariaLiveMessages,p=a.getOptionLabel,d=a.inputValue,f=a.isMulti,g=a.isOptionDisabled,m=a.isSearchable,v=a.menuIsOpen,y=a.options,b=a.screenReaderStatus,w=a.tabSelectsValue,x=a.isLoading,S=a["aria-label"],C=a["aria-live"],_=(0,h.useMemo)(function(){return Vr(Vr({},sl),u||{})},[u]),k=(0,h.useMemo)(function(){var e,n="";if(t&&_.onChange){var o=t.option,r=t.options,i=t.removedValue,a=t.removedValues,l=t.value,c=i||o||(e=l,Array.isArray(e)?null:e),u=c?p(c):"",h=r||a||void 0,d=h?h.map(p):[],f=Vr({isDisabled:c&&g(c,s),label:u,labels:d},t);n=_.onChange(f)}return n},[t,_,g,s,p]),$=(0,h.useMemo)(function(){var e="",t=n||o,i=!!(n&&s&&s.includes(n));if(t&&_.onFocus){var a={focused:t,label:p(t),isDisabled:g(t,s),isSelected:i,options:r,context:t===n?"menu":"value",selectValue:s,isAppleDevice:c};e=_.onFocus(a)}return e},[n,o,p,g,_,r,s,c]),E=(0,h.useMemo)(function(){var e="";if(v&&y.length&&!x&&_.onFilter){var t=b({count:r.length});e=_.onFilter({inputValue:d,resultsMessage:t})}return e},[r,d,v,_,y,b,x]),O="initial-input-focus"===(null==t?void 0:t.action),M=(0,h.useMemo)(function(){var e="";if(_.guidance){var t=o?"value":v?"menu":"input";e=_.guidance({"aria-label":S,context:t,isDisabled:n&&g(n,s),isMulti:f,isSearchable:m,tabSelectsValue:w,isInitialFocus:O})}return e},[S,n,o,f,g,m,v,_,s,w,O]),T=ys(h.Fragment,null,ys("span",{id:"aria-selection"},k),ys("span",{id:"aria-focused"},$),ys("span",{id:"aria-results"},E),ys("span",{id:"aria-guidance"},M));return ys(h.Fragment,null,ys(il,{id:l},O&&T),ys(il,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!O&&T))},ll=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],cl=new RegExp("["+ll.map(function(e){return e.letters}).join("")+"]","g"),ul={},pl=0;pl<ll.length;pl++)for(var hl=ll[pl],dl=0;dl<hl.letters.length;dl++)ul[hl.letters[dl]]=hl.base;var fl=function(e){return e.replace(cl,function(e){return ul[e]})},gl=function(e,t){void 0===t&&(t=ol);var n=null;function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return o.clear=function(){n=null},o}(fl),ml=function(e){return e.replace(/^\s+|\s+$/g,"")},vl=function(e){return"".concat(e.label," ").concat(e.value)},yl=["innerRef"];function bl(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=Object.entries(e).filter(function(e){var t=Ss(e,1)[0];return!n.includes(t)});return r.reduce(function(e,t){var n=Ss(t,2),o=n[0],r=n[1];return e[o]=r,e},{})}(Cs(e,yl),"onExited","in","enter","exit","appear");return ys("input",Ur({ref:t},n,{css:bs({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var wl=["boxSizing","height","overflow","paddingRight","position"],xl={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Sl(e){e.cancelable&&e.preventDefault()}function Cl(e){e.stopPropagation()}function _l(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function kl(){return"ontouchstart"in window||navigator.maxTouchPoints}var $l=!("undefined"==typeof window||!window.document||!window.document.createElement),El=0,Ol={capture:!1,passive:!1},Ml=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Tl={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Al(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,s=(0,h.useRef)(!1),a=(0,h.useRef)(!1),l=(0,h.useRef)(0),c=(0,h.useRef)(null),u=(0,h.useCallback)(function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,p=l.scrollHeight,h=l.clientHeight,d=c.current,f=t>0,g=p-h-u,m=!1;g>t&&s.current&&(o&&o(e),s.current=!1),f&&a.current&&(i&&i(e),a.current=!1),f&&t>g?(n&&!s.current&&n(e),d.scrollTop=p,m=!0,s.current=!0):!f&&-t>u&&(r&&!a.current&&r(e),d.scrollTop=0,m=!0,a.current=!0),m&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,o,r,i]),p=(0,h.useCallback)(function(e){u(e,e.deltaY)},[u]),d=(0,h.useCallback)(function(e){l.current=e.changedTouches[0].clientY},[]),f=(0,h.useCallback)(function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)},[u]),g=(0,h.useCallback)(function(e){if(e){var t=!!pa&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",d,t),e.addEventListener("touchmove",f,t)}},[f,d,p]),m=(0,h.useCallback)(function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",d,!1),e.removeEventListener("touchmove",f,!1))},[f,d,p]);return(0,h.useEffect)(function(){if(t){var e=c.current;return g(e),function(){m(e)}}},[t,g,m]),function(e){c.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,r=(0,h.useRef)({}),i=(0,h.useRef)(null),s=(0,h.useCallback)(function(e){if($l){var t=document.body,n=t&&t.style;if(o&&wl.forEach(function(e){var t=n&&n[e];r.current[e]=t}),o&&El<1){var i=parseInt(r.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+i||0;Object.keys(xl).forEach(function(e){var t=xl[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(a,"px"))}t&&kl()&&(t.addEventListener("touchmove",Sl,Ol),e&&(e.addEventListener("touchstart",_l,Ol),e.addEventListener("touchmove",Cl,Ol))),El+=1}},[o]),a=(0,h.useCallback)(function(e){if($l){var t=document.body,n=t&&t.style;El=Math.max(El-1,0),o&&El<1&&wl.forEach(function(e){var t=r.current[e];n&&(n[e]=t)}),t&&kl()&&(t.removeEventListener("touchmove",Sl,Ol),e&&(e.removeEventListener("touchstart",_l,Ol),e.removeEventListener("touchmove",Cl,Ol)))}},[o]);return(0,h.useEffect)(function(){if(t){var e=i.current;return s(e),function(){a(e)}}},[t,s,a]),function(e){i.current=e}}({isEnabled:n});return ys(h.Fragment,null,n&&ys("div",{onClick:Ml,css:Tl}),t(function(e){r(e),i(e)}))}var Ll={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Rl=function(e){var t=e.name,n=e.onFocus;return ys("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Ll,value:"",onChange:function(){}})};function Il(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Dl(){return Il(/^Mac/i)}var Pl=function(e){return e.label},Nl=function(e){return e.value},jl={clearIndicator:Ra,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,s=r.borderRadius;return Vr({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:La,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return Vr({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return Vr({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,s=r.colors;return Vr(Vr({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},Fa),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:s.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,s=r.spacing.baseUnit;return Vr({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*s})},loadingMessage:_a,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,s=r.spacing,a=r.colors;return Vr((Wr(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),Wr(n,"position","absolute"),Wr(n,"width","100%"),Wr(n,"zIndex",1),n),t?{}:{backgroundColor:a.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return Vr({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return Vr({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return Vr({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,s=e.isFocused;return Vr({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:s?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Ca,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,s=i.spacing,a=i.colors;return Vr({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?a.primary:o?a.primary25:"transparent",color:n?a.neutral20:r?a.neutral0:"inherit",padding:"".concat(2*s.baseUnit,"px ").concat(3*s.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?a.primary:a.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return Vr({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return Vr({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Vr({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Fl={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},zl={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:aa(),captureMenuScroll:!aa(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=Vr({ignoreCase:!0,ignoreAccents:!0,stringify:vl,trim:!0,matchFrom:"any"},undefined),o=n.ignoreCase,r=n.ignoreAccents,i=n.stringify,s=n.trim,a=n.matchFrom,l=s?ml(t):t,c=s?ml(i(e)):i(e);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),r&&(l=gl(l),c=fl(c)),"start"===a?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:Pl,getOptionValue:Nl,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Bl(e,t,n,o){return{type:"option",data:t,isDisabled:ql(e,t,n),isSelected:Ql(e,t,n),label:Kl(e,t),value:Yl(e,t),index:o}}function Wl(e,t){return e.options.map(function(n,o){if("options"in n){var r=n.options.map(function(n,o){return Bl(e,n,t,o)}).filter(function(t){return Ul(e,t)});return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Bl(e,n,t,o);return Ul(e,i)?i:void 0}).filter(ha)}function Hl(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,el(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function Vl(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,el(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function Ul(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,s=t.label,a=t.value;return(!Zl(e)||!i)&&Xl(e,{label:s,value:a,data:r},o)}var Gl=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},Kl=function(e,t){return e.getOptionLabel(t)},Yl=function(e,t){return e.getOptionValue(t)};function ql(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Ql(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=Yl(e,t);return n.some(function(t){return Yl(e,t)===o})}function Xl(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Zl=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Jl=1,ec=function(e){qa(n,e);var t=function(e){var t=Xa();return function(){var n,o=Qa(e);if(t){var r=Qa(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Ja(this,n)}}(n);function n(e){var o;if(Ua(this,n),(o=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=Dl()||Il(/^iPhone/i)||Il(/^iPad/i)||Dl()&&navigator.maxTouchPoints>1,o.controlRef=null,o.getControlRef=function(e){o.controlRef=e},o.focusedOptionRef=null,o.getFocusedOptionRef=function(e){o.focusedOptionRef=e},o.menuListRef=null,o.getMenuListRef=function(e){o.menuListRef=e},o.inputRef=null,o.getInputRef=function(e){o.inputRef=e},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(e,t){var n=o.props,r=n.onChange,i=n.name;t.name=i,o.ariaOnChange(e,t),r(e,t)},o.setValue=function(e,t,n){var r=o.props,i=r.closeMenuOnSelect,s=r.isMulti,a=r.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:a}),i&&(o.setState({inputIsHiddenAfterUpdate:!s}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(e,{action:t,option:n})},o.selectOption=function(e){var t=o.props,n=t.blurInputOnSelect,r=t.isMulti,i=t.name,s=o.state.selectValue,a=r&&o.isOptionSelected(e,s),l=o.isOptionDisabled(e,s);if(a){var c=o.getOptionValue(e);o.setValue(s.filter(function(e){return o.getOptionValue(e)!==c}),"deselect-option",e)}else{if(l)return void o.ariaOnChange(e,{action:"select-option",option:e,name:i});r?o.setValue([].concat(el(s),[e]),"select-option",e):o.setValue(e,"select-option")}n&&o.blurInput()},o.removeValue=function(e){var t=o.props.isMulti,n=o.state.selectValue,r=o.getOptionValue(e),i=n.filter(function(e){return o.getOptionValue(e)!==r}),s=da(t,i,i[0]||null);o.onChange(s,{action:"remove-value",removedValue:e}),o.focusInput()},o.clearValue=function(){var e=o.state.selectValue;o.onChange(da(o.props.isMulti,[],null),{action:"clear",removedValues:e})},o.popValue=function(){var e=o.props.isMulti,t=o.state.selectValue,n=t[t.length-1],r=t.slice(0,t.length-1),i=da(e,r,r[0]||null);n&&o.onChange(i,{action:"pop-value",removedValue:n})},o.getFocusedOptionId=function(e){return Gl(o.state.focusableOptionsWithIds,e)},o.getFocusableOptionsWithIds=function(){return Vl(Wl(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zs.apply(void 0,[o.props.classNamePrefix].concat(t))},o.getOptionLabel=function(e){return Kl(o.props,e)},o.getOptionValue=function(e){return Yl(o.props,e)},o.getStyles=function(e,t){var n=o.props.unstyled,r=jl[e](t,n);r.boxSizing="border-box";var i=o.props.styles[e];return i?i(r,t):r},o.getClassNames=function(e,t){var n,r;return null===(n=(r=o.props.classNames)[e])||void 0===n?void 0:n.call(r,t)},o.getElementId=function(e){return"".concat(o.state.instancePrefix,"-").concat(e)},o.getComponents=function(){return e=o.props,Vr(Vr({},Wa),e.components);var e},o.buildCategorizedOptions=function(){return Wl(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Hl(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(e,t){o.setState({ariaSelection:Vr({value:e},t)})},o.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(e){o.blockOptionHover=!1},o.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&o.onMenuClose():t&&o.openMenu("first"):(t&&(o.openAfterFocus=!0),o.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},o.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||o.props.isDisabled)){var t=o.props,n=t.isMulti,r=t.menuIsOpen;o.focusInput(),r?(o.setState({inputIsHiddenAfterUpdate:!n}),o.onMenuClose()):o.openMenu("first"),e.preventDefault()}},o.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(o.clearValue(),e.preventDefault(),o.openAfterFocus=!1,"touchend"===e.type?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(e){"boolean"==typeof o.props.closeMenuOnScroll?e.target instanceof HTMLElement&&na(e.target)&&o.props.onMenuClose():"function"==typeof o.props.closeMenuOnScroll&&o.props.closeMenuOnScroll(e)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(o.initialTouchX=n.clientX,o.initialTouchY=n.clientY,o.userIsDragging=!1)},o.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var r=Math.abs(n.clientX-o.initialTouchX),i=Math.abs(n.clientY-o.initialTouchY);o.userIsDragging=r>5||i>5}},o.onTouchEnd=function(e){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(e.target)&&o.menuListRef&&!o.menuListRef.contains(e.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(e){o.userIsDragging||o.onControlMouseDown(e)},o.onClearIndicatorTouchEnd=function(e){o.userIsDragging||o.onClearIndicatorMouseDown(e)},o.onDropdownIndicatorTouchEnd=function(e){o.userIsDragging||o.onDropdownIndicatorMouseDown(e)},o.handleInputChange=function(e){var t=o.props.inputValue,n=e.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(n,{action:"input-change",prevInputValue:t}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(e){o.props.onFocus&&o.props.onFocus(e),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(e){var t=o.props.inputValue;o.menuListRef&&o.menuListRef.contains(document.activeElement)?o.inputRef.focus():(o.props.onBlur&&o.props.onBlur(e),o.onInputChange("",{action:"input-blur",prevInputValue:t}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1}))},o.onOptionHover=function(e){if(!o.blockOptionHover&&o.state.focusedOption!==e){var t=o.getFocusableOptions().indexOf(e);o.setState({focusedOption:e,focusedOptionId:t>-1?o.getFocusedOptionId(e):null})}},o.shouldHideSelectedOptions=function(){return Zl(o.props)},o.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),o.focus()},o.onKeyDown=function(e){var t=o.props,n=t.isMulti,r=t.backspaceRemovesValue,i=t.escapeClearsValue,s=t.inputValue,a=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,p=t.tabSelectsValue,h=t.openMenuOnFocus,d=o.state,f=d.focusedOption,g=d.focusedValue,m=d.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(o.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||s)return;o.focusValue("previous");break;case"ArrowRight":if(!n||s)return;o.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(g)o.removeValue(g);else{if(!r)return;n?o.popValue():a&&o.clearValue()}break;case"Tab":if(o.isComposing)return;if(e.shiftKey||!c||!p||!f||h&&o.isOptionSelected(f,m))return;o.selectOption(f);break;case"Enter":if(229===e.keyCode)break;if(c){if(!f)return;if(o.isComposing)return;o.selectOption(f);break}return;case"Escape":c?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:s}),o.onMenuClose()):a&&i&&o.clearValue();break;case" ":if(s)return;if(!c){o.openMenu("first");break}if(!f)return;o.selectOption(f);break;case"ArrowUp":c?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":c?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!c)return;o.focusOption("pageup");break;case"PageDown":if(!c)return;o.focusOption("pagedown");break;case"Home":if(!c)return;o.focusOption("first");break;case"End":if(!c)return;o.focusOption("last");break;default:return}e.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++Jl),o.state.selectValue=Js(e.value),e.menuIsOpen&&o.state.selectValue.length){var r=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),s=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=r,o.state.focusedOption=i[s],o.state.focusedOptionId=Gl(r,i[s])}return o}return Ka(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&sa(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(sa(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),s="first"===e?0:i.length-1;if(!this.props.isMulti){var a=i.indexOf(o[0]);a>-1&&(s=a)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[s],focusedOptionId:this.getFocusedOptionId(i[s])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,s=-1;if(n.length){switch(e){case"previous":s=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r<i&&(s=r+1)}this.setState({inputIsHidden:-1!==s,focusedValue:n[s]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[r])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Fl):Vr(Vr({},Fl),this.props.theme):Fl}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,s=this.setValue,a=this.props,l=a.isMulti,c=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:a,setValue:s,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return ql(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Ql(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Xl(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,r=e.inputValue,i=e.tabIndex,s=e.form,a=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,p=u.inputIsHidden,d=u.ariaSelection,f=this.commonProps,g=o||this.getElementId("input"),m=Vr(Vr(Vr({"aria-autocomplete":"list","aria-expanded":a,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},a&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?h.createElement(c,Ur({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:s,type:"text",value:r},m)):h.createElement(bl,Ur({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Qs,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:s,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,s=t.SingleValue,a=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,p=c.isDisabled,d=c.isMulti,f=c.inputValue,g=c.placeholder,m=this.state,v=m.selectValue,y=m.focusedValue,b=m.isFocused;if(!this.hasValue()||!u)return f?null:h.createElement(a,Ur({},l,{key:"placeholder",isDisabled:p,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),g);if(d)return v.map(function(t,s){var a=t===y,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return h.createElement(n,Ur({},l,{components:{Container:o,Label:r,Remove:i},isFocused:a,isDisabled:p,key:c,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(f)return null;var w=v[0];return h.createElement(s,Ur({},l,{data:w,isDisabled:p}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||r)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return h.createElement(e,Ur({},t,{innerProps:s,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;return e&&r?h.createElement(e,Ur({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return h.createElement(n,Ur({},o,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return h.createElement(e,Ur({},t,{innerProps:r,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,r=t.Menu,i=t.MenuList,s=t.MenuPortal,a=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,p=this.state.focusedOption,d=this.props,f=d.captureMenuScroll,g=d.inputValue,m=d.isLoading,v=d.loadingMessage,y=d.minMenuHeight,b=d.maxMenuHeight,w=d.menuIsOpen,x=d.menuPlacement,S=d.menuPosition,C=d.menuPortalTarget,_=d.menuShouldBlockScroll,k=d.menuShouldScrollIntoView,$=d.noOptionsMessage,E=d.onMenuScrollToTop,O=d.onMenuScrollToBottom;if(!w)return null;var M,T=function(t,n){var o=t.type,r=t.data,i=t.isDisabled,s=t.isSelected,a=t.label,l=t.value,d=p===r,f=i?void 0:function(){return e.onOptionHover(r)},g=i?void 0:function(){return e.selectOption(r)},m="".concat(e.getElementId("option"),"-").concat(n),v={id:m,onClick:g,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:s};return h.createElement(c,Ur({},u,{innerProps:v,data:r,isDisabled:i,isSelected:s,key:m,label:a,type:o,value:l,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map(function(t){if("group"===t.type){var r=t.data,i=t.options,s=t.index,a="".concat(e.getElementId("group"),"-").concat(s),l="".concat(a,"-heading");return h.createElement(n,Ur({},u,{key:a,data:r,options:i,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e,"".concat(s,"-").concat(e.index))}))}if("option"===t.type)return T(t,"".concat(t.index))});else if(m){var A=v({inputValue:g});if(null===A)return null;M=h.createElement(a,u,A)}else{var L=$({inputValue:g});if(null===L)return null;M=h.createElement(l,u,L)}var R={minMenuHeight:y,maxMenuHeight:b,menuPlacement:x,menuPosition:S,menuShouldScrollIntoView:k},I=h.createElement(xa,Ur({},u,R),function(t){var n=t.ref,o=t.placerProps,s=o.placement,a=o.maxHeight;return h.createElement(r,Ur({},u,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:s}),h.createElement(Al,{captureEnabled:f,onTopArrive:E,onBottomArrive:O,lockEnabled:_},function(t){return h.createElement(i,Ur({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:a,focusedOption:p}),M)}))});return C||"fixed"===S?h.createElement(s,Ur({},u,{appendTo:C,controlElement:this.controlRef,menuPlacement:x,menuPosition:S}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,r=t.isMulti,i=t.name,s=t.required,a=this.state.selectValue;if(s&&!this.hasValue()&&!o)return h.createElement(Rl,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(r){if(n){var l=a.map(function(t){return e.getOptionValue(t)}).join(n);return h.createElement("input",{name:i,type:"hidden",value:l})}var c=a.length>0?a.map(function(t,n){return h.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):h.createElement("input",{name:i,type:"hidden",value:""});return h.createElement("div",null,c)}var u=a[0]?this.getOptionValue(a[0]):"";return h.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.isFocused,s=t.selectValue,a=this.getFocusableOptions();return h.createElement(al,Ur({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:r,isFocused:i,selectValue:s,focusableOptions:a,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,r=e.ValueContainer,i=this.props,s=i.className,a=i.id,l=i.isDisabled,c=i.menuIsOpen,u=this.state.isFocused,p=this.commonProps=this.getCommonProps();return h.createElement(o,Ur({},p,{className:s,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),h.createElement(t,Ur({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),h.createElement(r,Ur({},p,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),h.createElement(n,Ur({},p,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,s=t.isFocused,a=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,p=e.menuIsOpen,h=e.inputValue,d=e.isMulti,f=Js(u),g={};if(n&&(u!==n.value||c!==n.options||p!==n.menuIsOpen||h!==n.inputValue)){var m=p?function(e,t){return Hl(Wl(e,t))}(e,f):[],v=p?Vl(Wl(e,f),"".concat(l,"-option")):[],y=o?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o<t.length)return t[o]}return null}(t,f):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);g={selectValue:f,focusedOption:b,focusedOptionId:Gl(v,b),focusableOptionsWithIds:v,focusedValue:y,clearFocusValueOnUpdate:!1}}var w=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},x=i,S=s&&a;return s&&!S&&(x={value:da(d,f,f[0]||null),options:f,action:"initial-input-focus"},S=!a),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),Vr(Vr(Vr({},g),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:S})}}]),n}(h.Component);ec.defaultProps=zl;var tc=(0,h.forwardRef)(function(e,t){var n=Va(e);return h.createElement(ec,Ur({ref:t},n))}),nc=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],oc=(0,h.forwardRef)(function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,o=e.cacheOptions,r=void 0!==o&&o,i=e.loadOptions;e.options;var s=e.isLoading,a=void 0!==s&&s,l=e.onInputChange,c=e.filterOption,u=void 0===c?null:c,p=Cs(e,nc),d=p.inputValue,f=(0,h.useRef)(void 0),g=(0,h.useRef)(!1),m=Ss((0,h.useState)(Array.isArray(n)?n:void 0),2),v=m[0],y=m[1],b=Ss((0,h.useState)(void 0!==d?d:""),2),w=b[0],x=b[1],S=Ss((0,h.useState)(!0===n),2),C=S[0],_=S[1],k=Ss((0,h.useState)(void 0),2),$=k[0],E=k[1],O=Ss((0,h.useState)([]),2),M=O[0],T=O[1],A=Ss((0,h.useState)(!1),2),L=A[0],R=A[1],I=Ss((0,h.useState)({}),2),D=I[0],P=I[1],N=Ss((0,h.useState)(void 0),2),j=N[0],F=N[1],z=Ss((0,h.useState)(void 0),2),B=z[0],W=z[1];r!==B&&(P({}),W(r)),n!==j&&(y(Array.isArray(n)?n:void 0),F(n)),(0,h.useEffect)(function(){return g.current=!0,function(){g.current=!1}},[]);var H=(0,h.useCallback)(function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,function(){return t()})},[i]);(0,h.useEffect)(function(){!0===n&&H(w,function(e){g.current&&(y(e||[]),_(!!f.current))})},[]);var V=(0,h.useCallback)(function(e,t){var n=function(e,t,n){if(n){var o=n(e,t);if("string"==typeof o)return o}return e}(e,t,l);if(!n)return f.current=void 0,x(""),E(""),T([]),_(!1),void R(!1);if(r&&D[n])x(n),E(n),T(D[n]),_(!1),R(!1);else{var o=f.current={};x(n),_(!0),R(!$),H(n,function(e){g&&o===f.current&&(f.current=void 0,_(!1),E(n),T(e||[]),R(!1),P(e?Vr(Vr({},D),{},Wr({},n,e)):D))})}},[r,H,$,D,l]),U=L?[]:w&&$?M:v||[];return Vr(Vr({},p),{},{options:U,isLoading:C||a,onInputChange:V,filterOption:u})}(e),o=Va(n);return h.createElement(ec,Ur({ref:t},o))}),rc=oc,ic=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],sc=function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase(),o=String(t.getOptionValue(e)).toLowerCase(),r=String(t.getOptionLabel(e)).toLowerCase();return o===n||r===n},ac={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,o){return!(!e||t.some(function(t){return sc(e,t,o)})||n.some(function(t){return sc(e,t,o)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}},lc=(0,h.forwardRef)(function(e,t){var n=function(e){var t=e.allowCreateWhileLoading,n=void 0!==t&&t,o=e.createOptionPosition,r=void 0===o?"last":o,i=e.formatCreateLabel,s=void 0===i?ac.formatCreateLabel:i,a=e.isValidNewOption,l=void 0===a?ac.isValidNewOption:a,c=e.getNewOptionData,u=void 0===c?ac.getNewOptionData:c,p=e.onCreateOption,d=e.options,f=void 0===d?[]:d,g=e.onChange,m=Cs(e,ic),v=m.getOptionValue,y=void 0===v?Nl:v,b=m.getOptionLabel,w=void 0===b?Pl:b,x=m.inputValue,S=m.isLoading,C=m.isMulti,_=m.value,k=m.name,$=(0,h.useMemo)(function(){return l(x,Js(_),f,{getOptionValue:y,getOptionLabel:w})?u(x,s(x)):void 0},[s,u,w,y,x,l,f,_]),E=(0,h.useMemo)(function(){return!n&&S||!$?f:"first"===r?[$].concat(el(f)):[].concat(el(f),[$])},[n,r,S,$,f]),O=(0,h.useCallback)(function(e,t){if("select-option"!==t.action)return g(e,t);var n=Array.isArray(e)?e:[e];if(n[n.length-1]!==$)g(e,t);else if(p)p(x);else{var o=u(x,x),r={action:"create-option",name:k,option:o};g(da(C,[].concat(el(Js(_)),[o]),o),r)}},[u,x,C,k,$,p,g,_]);return Vr(Vr({},m),{},{options:E,onChange:O})}(Va(e));return h.createElement(ec,Ur({ref:t},n))}),cc=lc;function uc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),o.forEach(function(t){Wr(e,t,n[t])})}return e}var pc=n(311),hc=n.n(pc),dc=n(5556),fc=n.n(dc),gc=function(){function e(){Ua(this,e),Wr(this,"refs",{})}return Ka(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find(function(t){return t.node.sortableInfo.index==e.active.index})}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(mc)}}]),e}();function mc(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function vc(e,t){return Object.keys(e).reduce(function(n,o){return-1===t.indexOf(o)&&(n[o]=e[o]),n},{})}var yc={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},bc=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function wc(e,t){Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function xc(e,t){e.style["".concat(bc,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function Sc(e,t){e.style["".concat(bc,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function Cc(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function _c(e,t,n){return Math.max(e,Math.min(n,t))}function kc(e){return"px"===e.substr(-2)?parseFloat(e):0}function $c(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function Ec(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function Oc(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function Mc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var o={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?o:Mc(e.parentNode,t,o)}}function Tc(e){var t=e.lockOffset,n=e.width,o=e.height,r=t,i=t,s="px";if("string"==typeof t){var a=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);hc()(null!==a,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),r=parseFloat(t),i=parseFloat(t),s=a[1]}return hc()(isFinite(r)&&isFinite(i),"lockOffset value should be a finite. Given %s",t),"%"===s&&(r=r*n/100,i=i*o/100),{x:r,y:i}}function Ac(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find(function(e){return n.test(t[e])})}(e)?e:Ac(e.parentNode):null}var Lc="BUTTON",Rc="INPUT",Ic="OPTION",Dc="TEXTAREA",Pc="SELECT";function Nc(e){return null!=e.sortableHandle}var jc=function(){function e(t,n){Ua(this,e),this.container=t,this.onScrollCallback=n}return Ka(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,o=e.minTranslate,r=e.maxTranslate,i=e.width,s=e.height,a={x:0,y:0},l={x:1,y:1},c=this.container,u=c.scrollTop,p=c.scrollLeft,h=c.scrollHeight,d=c.scrollWidth,f=0===u,g=h-u-c.clientHeight===0,m=0===p,v=d-p-c.clientWidth===0;n.y>=r.y-s/2&&!g?(a.y=1,l.y=10*Math.abs((r.y-s/2-n.y)/s)):n.x>=r.x-i/2&&!v?(a.x=1,l.x=10*Math.abs((r.x-i/2-n.x)/i)):n.y<=o.y+s/2&&!f?(a.y=-1,l.y=10*Math.abs((n.y-s/2-o.y)/s)):n.x<=o.x+i/2&&!m&&(a.x=-1,l.x=10*Math.abs((n.x-i/2-o.x)/i)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===a.x&&0===a.y||(this.interval=setInterval(function(){t.isAutoScrolling=!0;var e={left:l.x*a.x,top:l.y*a.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)},5))}}]),e}(),Fc={axis:fc().oneOf(["x","y","xy"]),contentWindow:fc().any,disableAutoscroll:fc().bool,distance:fc().number,getContainer:fc().func,getHelperDimensions:fc().func,helperClass:fc().string,helperContainer:fc().oneOfType([fc().func,"undefined"==typeof HTMLElement?fc().any:fc().instanceOf(HTMLElement)]),hideSortableGhost:fc().bool,keyboardSortingTransitionDuration:fc().number,lockAxis:fc().string,lockOffset:fc().oneOfType([fc().number,fc().string,fc().arrayOf(fc().oneOfType([fc().number,fc().string]))]),lockToContainerEdges:fc().bool,onSortEnd:fc().func,onSortMove:fc().func,onSortOver:fc().func,onSortStart:fc().func,pressDelay:fc().number,pressThreshold:fc().number,keyCodes:fc().shape({lift:fc().arrayOf(fc().number),drop:fc().arrayOf(fc().number),cancel:fc().arrayOf(fc().number),up:fc().arrayOf(fc().number),down:fc().arrayOf(fc().number)}),shouldCancelStart:fc().func,transitionDuration:fc().number,updateBeforeSortStart:fc().func,useDragHandle:fc().bool,useWindowAsScrollContainer:fc().bool},zc={lift:[32],drop:[32],cancel:[27],up:[38,37],down:[40,39]},Bc={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:zc,shouldCancelStart:function(e){return-1!==[Rc,Dc,Pc,Ic,Lc].indexOf(e.target.tagName)||!!Cc(e.target,function(e){return"true"===e.contentEditable})},transitionDuration:300,useWindowAsScrollContainer:!1},Wc=Object.keys(Fc),Hc=(0,h.createContext)({manager:{}});function Vc(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;Ua(this,n),Wr(Za(Za(t=Ja(this,Qa(n).call(this,e)))),"state",{}),Wr(Za(Za(t)),"handleStart",function(e){var n=t.props,o=n.distance,r=n.shouldCancelStart;if(2!==e.button&&!r(e)){t.touched=!0,t.position=Oc(e);var i=Cc(e.target,function(e){return null!=e.sortableInfo});if(i&&i.sortableInfo&&t.nodeIsChild(i)&&!t.state.sorting){var s=t.props.useDragHandle,a=i.sortableInfo,l=a.index,c=a.collection;if(a.disabled)return;if(s&&!Cc(e.target,Nc))return;t.manager.active={collection:c,index:l},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||"A"!==e.target.tagName||e.preventDefault(),o||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout(function(){return t.handlePress(e)},t.props.pressDelay))}}}),Wr(Za(Za(t)),"nodeIsChild",function(e){return e.sortableInfo.manager===t.manager}),Wr(Za(Za(t)),"handleMove",function(e){var n=t.props,o=n.distance,r=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var i=Oc(e),s={x:t.position.x-i.x,y:t.position.y-i.y},a=Math.abs(s.x)+Math.abs(s.y);t.delta=s,o||r&&!(a>=r)?o&&a>=o&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}}),Wr(Za(Za(t)),"handleEnd",function(){t.touched=!1,t.cancel()}),Wr(Za(Za(t)),"cancel",function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)}),Wr(Za(Za(t)),"handlePress",function(e){try{var n=t.manager.getActive(),o=function(){if(n){var o=function(){var n,o,r=h.sortableInfo.index,c=(n=h,{bottom:kc((o=window.getComputedStyle(n)).marginBottom),left:kc(o.marginLeft),right:kc(o.marginRight),top:kc(o.marginTop)}),g=function(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:kc(t.gridColumnGap),y:kc(t.gridRowGap)}:{x:0,y:0}}(t.container),m=t.scrollContainer.getBoundingClientRect(),v=s({index:r,node:h,collection:d});if(t.node=h,t.margin=c,t.gridGap=g,t.width=v.width,t.height=v.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=h.getBoundingClientRect(),t.containerBoundingRect=m,t.index=r,t.newIndex=r,t.axis={x:i.indexOf("x")>=0,y:i.indexOf("y")>=0},t.offsetEdge=Mc(h,t.container),t.initialOffset=Oc(f?uc({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(function(e){var t="input, textarea, select, canvas, [contenteditable]",n=e.querySelectorAll(t),o=e.cloneNode(!0);return el(o.querySelectorAll(t)).forEach(function(e,t){"file"!==e.type&&(e.value=n[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),"CANVAS"===e.tagName&&n[t].width>0&&n[t].height>0&&e.getContext("2d").drawImage(n[t],0,0)}),o}(h)),wc(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-c.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-c.top,"px"),width:"".concat(t.width,"px")}),f&&t.helper.focus(),l&&(t.sortableGhost=h,wc(h,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},f){var y=p?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,b=y.top,w=y.left,x=y.width,S=b+y.height,C=w+x;t.axis.x&&(t.minTranslate.x=w-t.boundingClientRect.left,t.maxTranslate.x=C-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=b-t.boundingClientRect.top,t.maxTranslate.y=S-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(p?0:m.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(p?t.contentWindow.innerWidth:m.left+m.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(p?0:m.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(p?t.contentWindow.innerHeight:m.top+m.height)-t.boundingClientRect.top-t.height/2);a&&a.split(" ").forEach(function(e){return t.helper.classList.add(e)}),t.listenerNode=e.touches?e.target:t.contentWindow,f?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(yc.move.forEach(function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)}),yc.end.forEach(function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)})),t.setState({sorting:!0,sortingIndex:r}),u&&u({node:h,index:r,collection:d,isKeySorting:f,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),f&&t.keyMove(0)},r=t.props,i=r.axis,s=r.getHelperDimensions,a=r.helperClass,l=r.hideSortableGhost,c=r.updateBeforeSortStart,u=r.onSortStart,p=r.useWindowAsScrollContainer,h=n.node,d=n.collection,f=t.manager.isKeySorting,g=function(){if("function"==typeof c){t._awaitingUpdateBeforeSortStart=!0;var n=function(t,n){try{var o=function(){var t=h.sortableInfo.index;return Promise.resolve(c({collection:d,index:t,node:h,isKeySorting:f},e)).then(function(){})}()}catch(e){return n(!0,e)}return o&&o.then?o.then(n.bind(null,!1),n.bind(null,!0)):n(!1,value)}(0,function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n});if(n&&n.then)return n.then(function(){})}}();return g&&g.then?g.then(o):o()}}();return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}),Wr(Za(Za(t)),"handleSortMove",function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)}),Wr(Za(Za(t)),"handleSortEnd",function(e){var n=t.props,o=n.hideSortableGhost,r=n.onSortEnd,i=t.manager,s=i.active.collection,a=i.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(a?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(yc.move.forEach(function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)}),yc.end.forEach(function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)}))),t.helper.parentNode.removeChild(t.helper),o&&t.sortableGhost&&wc(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=l.length;c<u;c++){var p=l[c],h=p.node;p.edgeOffset=null,p.boundingClientRect=null,xc(h,null),Sc(h,null),p.translate=null}t.autoScroller.clear(),t.manager.active=null,t.manager.isKeySorting=!1,t.setState({sorting:!1,sortingIndex:null}),"function"==typeof r&&r({collection:s,newIndex:t.newIndex,oldIndex:t.index,isKeySorting:a,nodes:l},e),t.touched=!1}),Wr(Za(Za(t)),"autoscroll",function(){var e=t.props.disableAutoscroll,n=t.manager.isKeySorting;if(e)t.autoScroller.clear();else{if(n){var o=uc({},t.translate),r=0,i=0;return t.axis.x&&(o.x=Math.min(t.maxTranslate.x,Math.max(t.minTranslate.x,t.translate.x)),r=t.translate.x-o.x),t.axis.y&&(o.y=Math.min(t.maxTranslate.y,Math.max(t.minTranslate.y,t.translate.y)),i=t.translate.y-o.y),t.translate=o,xc(t.helper,t.translate),t.scrollContainer.scrollLeft+=r,void(t.scrollContainer.scrollTop+=i)}t.autoScroller.update({height:t.height,maxTranslate:t.maxTranslate,minTranslate:t.minTranslate,translate:t.translate,width:t.width})}}),Wr(Za(Za(t)),"onAutoScroll",function(e){t.translate.x+=e.left,t.translate.y+=e.top,t.animateNodes()}),Wr(Za(Za(t)),"handleKeyDown",function(e){var n=e.keyCode,o=t.props,r=o.shouldCancelStart,i=o.keyCodes,s=uc({},zc,void 0===i?{}:i);t.manager.active&&!t.manager.isKeySorting||!(t.manager.active||s.lift.includes(n)&&!r(e)&&t.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),s.lift.includes(n)&&!t.manager.active?t.keyLift(e):s.drop.includes(n)&&t.manager.active?t.keyDrop(e):s.cancel.includes(n)?(t.newIndex=t.manager.active.index,t.keyDrop(e)):s.up.includes(n)?t.keyMove(-1):s.down.includes(n)&&t.keyMove(1))}),Wr(Za(Za(t)),"keyLift",function(e){var n=e.target,o=Cc(n,function(e){return null!=e.sortableInfo}).sortableInfo,r=o.index,i=o.collection;t.initialFocusedNode=n,t.manager.isKeySorting=!0,t.manager.active={index:r,collection:i},t.handlePress(e)}),Wr(Za(Za(t)),"keyMove",function(e){var n=t.manager.getOrderedRefs(),o=n[n.length-1].node.sortableInfo.index,r=t.newIndex+e,i=t.newIndex;if(!(r<0||r>o)){t.prevIndex=i,t.newIndex=r;var s=function(e,t,n){return e<n&&e>t?e-1:e>n&&e<t?e+1:e}(t.newIndex,t.prevIndex,t.index),a=n.find(function(e){return e.node.sortableInfo.index===s}),l=a.node,c=t.containerScrollDelta,u=a.boundingClientRect||Ec(l,c),p=a.translate||{x:0,y:0},h=u.top+p.y-c.top,d=u.left+p.x-c.left,f=i<r,g=f&&t.axis.x?l.offsetWidth-t.width:0,m=f&&t.axis.y?l.offsetHeight-t.height:0;t.handleSortMove({pageX:d+g,pageY:h+m,ignoreTransition:0===e})}}),Wr(Za(Za(t)),"keyDrop",function(e){t.handleSortEnd(e),t.initialFocusedNode&&t.initialFocusedNode.focus()}),Wr(Za(Za(t)),"handleKeyEnd",function(e){t.manager.active&&t.keyDrop(e)}),Wr(Za(Za(t)),"isValidSortingTarget",function(e){var n=t.props.useDragHandle,o=e.target,r=Cc(o,function(e){return null!=e.sortableInfo});return r&&r.sortableInfo&&!r.sortableInfo.disabled&&(n?Nc(o):o.sortableInfo)});var o=new gc;return function(e){hc()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}(e),t.manager=o,t.wrappedInstance=(0,h.createRef)(),t.sortableContextValue={manager:o},t.events={end:t.handleEnd,move:t.handleMove,start:t.handleStart},t}return qa(n,t),Ka(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.useWindowAsScrollContainer,n=this.getContainer();Promise.resolve(n).then(function(n){e.container=n,e.document=e.container.ownerDocument||document;var o=e.props.contentWindow||e.document.defaultView||window;e.contentWindow="function"==typeof o?o():o,e.scrollContainer=t?e.document.scrollingElement||e.document.documentElement:Ac(e.container)||e.container,e.autoScroller=new jc(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach(function(t){return yc[t].forEach(function(n){return e.container.addEventListener(n,e.events[t],!1)})}),e.container.addEventListener("keydown",e.handleKeyDown)})}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach(function(t){return yc[t].forEach(function(n){return e.container.removeEventListener(n,e.events[t])})}),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var t=this.props,n=t.lockAxis,o=t.lockOffset,r=t.lockToContainerEdges,i=t.transitionDuration,s=t.keyboardSortingTransitionDuration,a=void 0===s?i:s,l=this.manager.isKeySorting,c=e.ignoreTransition,u=Oc(e),p={x:u.x-this.initialOffset.x,y:u.y-this.initialOffset.y};if(p.y-=window.pageYOffset-this.initialWindowScroll.top,p.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=p,r){var h=function(e){var t=e.height,n=e.width,o=e.lockOffset,r=Array.isArray(o)?o:[o,o];hc()(2===r.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",o);var i=Ss(r,2),s=i[0],a=i[1];return[Tc({height:t,lockOffset:s,width:n}),Tc({height:t,lockOffset:a,width:n})]}({height:this.height,lockOffset:o,width:this.width}),d=Ss(h,2),f=d[0],g=d[1],m={x:this.width/2-f.x,y:this.height/2-f.y},v={x:this.width/2-g.x,y:this.height/2-g.y};p.x=_c(this.minTranslate.x+m.x,this.maxTranslate.x-v.x,p.x),p.y=_c(this.minTranslate.y+m.y,this.maxTranslate.y-v.y,p.y)}"x"===n?p.y=0:"y"===n&&(p.x=0),l&&a&&!c&&Sc(this.helper,a),xc(this.helper,p)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,o=e.onSortOver,r=this.containerScrollDelta,i=this.windowScrollDelta,s=this.manager.getOrderedRefs(),a=this.offsetEdge.left+this.translate.x+r.left,l=this.offsetEdge.top+this.translate.y+r.top,c=this.manager.isKeySorting,u=this.newIndex;this.newIndex=null;for(var p=0,h=s.length;p<h;p++){var d=s[p].node,f=d.sortableInfo.index,g=d.offsetWidth,m=d.offsetHeight,v={height:this.height>m?m/2:this.height/2,width:this.width>g?g/2:this.width/2},y=c&&f>this.index&&f<=u,b=c&&f<this.index&&f>=u,w={x:0,y:0},x=s[p].edgeOffset;x||(x=Mc(d,this.container),s[p].edgeOffset=x,c&&(s[p].boundingClientRect=Ec(d,r)));var S=p<s.length-1&&s[p+1],C=p>0&&s[p-1];S&&!S.edgeOffset&&(S.edgeOffset=Mc(S.node,this.container),c&&(S.boundingClientRect=Ec(S.node,r))),f!==this.index?(t&&Sc(d,t),this.axis.x?this.axis.y?b||f<this.index&&(a+i.left-v.width<=x.left&&l+i.top<=x.top+v.height||l+i.top+v.height<=x.top)?(w.x=this.width+this.marginOffset.x,x.left+w.x>this.containerBoundingRect.width-v.width&&S&&(w.x=S.edgeOffset.left-x.left,w.y=S.edgeOffset.top-x.top),null===this.newIndex&&(this.newIndex=f)):(y||f>this.index&&(a+i.left+v.width>=x.left&&l+i.top+v.height>=x.top||l+i.top+v.height>=x.top+m))&&(w.x=-(this.width+this.marginOffset.x),x.left+w.x<this.containerBoundingRect.left+v.width&&C&&(w.x=C.edgeOffset.left-x.left,w.y=C.edgeOffset.top-x.top),this.newIndex=f):y||f>this.index&&a+i.left+v.width>=x.left?(w.x=-(this.width+this.marginOffset.x),this.newIndex=f):(b||f<this.index&&a+i.left<=x.left+v.width)&&(w.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=f)):this.axis.y&&(y||f>this.index&&l+i.top+v.height>=x.top?(w.y=-(this.height+this.marginOffset.y),this.newIndex=f):(b||f<this.index&&l+i.top<=x.top+v.height)&&(w.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=f))),xc(d,w),s[p].translate=w):n&&(this.sortableGhost=d,wc(d,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),c&&(this.newIndex=u);var _=c?this.prevIndex:u;o&&this.newIndex!==_&&o({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:_,isKeySorting:c,nodes:s,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return hc()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.wrappedInstance.current}},{key:"getContainer",value:function(){var e=this.props.getContainer;return"function"!=typeof e?(0,lt.findDOMNode)(this):e(o.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var t=o.withRef?this.wrappedInstance:null;return(0,h.createElement)(Hc.Provider,{value:this.sortableContextValue},(0,h.createElement)(e,Ur({ref:t},vc(this.props,Wc))))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return"function"==typeof e?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){return this.props.useWindowAsScrollContainer?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),n}(h.Component),Wr(t,"displayName",$c("sortableList",e)),Wr(t,"defaultProps",Bc),Wr(t,"propTypes",Fc),n}var Uc={index:fc().number.isRequired,collection:fc().oneOfType([fc().number,fc().string]),disabled:fc().bool},Gc=Object.keys(Uc);function Kc(e,t,n){var o,r=n||{},i=r.noTrailing,s=void 0!==i&&i,a=r.noLeading,l=void 0!==a&&a,c=r.debounceMode,u=void 0===c?void 0:c,p=!1,h=0;function d(){o&&clearTimeout(o)}function f(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=this,c=Date.now()-h;function f(){h=Date.now(),t.apply(a,r)}function g(){o=void 0}p||(l||!u||o||f(),d(),void 0===u&&c>e?l?(h=Date.now(),s||(o=setTimeout(u?g:f,e))):f():!0!==s&&(o=setTimeout(u?g:f,void 0===u?e-c:e)))}return f.cancel=function(e){var t=(e||{}).upcomingOnly,n=void 0!==t&&t;d(),p=!n},f}function Yc(e,t,n){var o=(n||{}).atBegin;return Kc(e,t,{debounceMode:!1!==(void 0!==o&&o)})}function qc(e){return qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qc(e)}function Qc(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ru(o.key),o)}}function Xc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xc=function(){return!!e})()}function Zc(e){return Zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zc(e)}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jc(e,t)}function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},eu.apply(null,arguments)}function tu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function nu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tu(Object(n),!0).forEach(function(t){ou(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ou(e,t,n){return(t=ru(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ru(e){var t=function(e){if("object"!=qc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qc(t)?t:t+""}var iu=Wa.Option,su=window,au=su.ajaxurl,lu=su.VPGutenbergVariables,cu={},uu=Vc(tc),pu=Vc(cc),hu=Vc(rc),du=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;Ua(this,n);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return Wr(Za(Za(t=Ja(this,(e=Qa(n)).call.apply(e,[this].concat(r))))),"wrappedInstance",(0,h.createRef)()),t}return qa(n,t),Ka(n,[{key:"componentDidMount",value:function(){(0,lt.findDOMNode)(this).sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return hc()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=o.withRef?this.wrappedInstance:null;return(0,h.createElement)(e,Ur({ref:t},this.props))}}]),n}(h.Component),Wr(t,"displayName",$c("sortableHandle",e)),n}(function(e){return wp.element.createElement(Wa.MultiValueLabel,e)}),fu=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;Ua(this,n);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return Wr(Za(Za(t=Ja(this,(e=Qa(n)).call.apply(e,[this].concat(r))))),"wrappedInstance",(0,h.createRef)()),t}return qa(n,t),Ka(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,o=e.index,r=(0,lt.findDOMNode)(this);r.sortableInfo={collection:t,disabled:n,index:o,manager:this.context.manager},this.node=r,this.ref={node:r},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return hc()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=o.withRef?this.wrappedInstance:null;return(0,h.createElement)(e,Ur({ref:t},vc(this.props,Gc)))}}]),n}(h.Component),Wr(t,"displayName",$c("sortableElement",e)),Wr(t,"contextType",Hc),Wr(t,"propTypes",Uc),Wr(t,"defaultProps",{collection:0}),n}(function(e){var t=nu(nu({},e.innerProps),{},{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}});return wp.element.createElement(Wa.MultiValue,eu({},e,{innerProps:t}))}),gu=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];var i=(e=function(e,t,n){return t=Zc(t),function(e,t){if(t&&("object"==qc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xc()?Reflect.construct(t,n||[],Zc(e).constructor):t.apply(e,n))}(this,t,[].concat(o))).props.callback;return e.state={options:{},ajaxStatus:!!i},e.getOptions=e.getOptions.bind(e),e.getDefaultValue=e.getDefaultValue.bind(e),e.findValueData=e.findValueData.bind(e),e.requestAjax=e.requestAjax.bind(e),e.requestAjaxDebounce=Yc(300,Fr(e.requestAjax)),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}(t,e),function(e,t){return t&&Qc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){var e=this;this.props.callback&&this.requestAjax({},function(t){t.options&&e.setState({options:t.options})})}},{key:"getOptions",value:function(){var e=this.props.controlName;return cu[e]?cu[e]:Object.keys(this.state.options).length?this.state.options:this.props.options}},{key:"getDefaultValue",value:function(){var e=this,t=this.props,n=t.value,o=t.isMultiple,r=null;if(o){if(!n&&"string"!=typeof n||!n.length)return r;r=[],n.forEach(function(t){r.push(e.findValueData(t))})}else{if(!n&&"string"!=typeof n)return r;r=this.findValueData(n)}return r}},{key:"findValueData",value:function(e){var t={value:e,label:e},n=this.getOptions();return n&&Object.keys(n).forEach(function(o){var r=n[o];o===e&&("string"==typeof r?t.label=r:t=r)}),t}},{key:"requestAjax",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.props,i=r.controlName,s=r.attributes;if(!this.isAJAXinProgress){this.isAJAXinProgress=!0,o&&this.setState({ajaxStatus:"progress"});var a=nu({action:"vp_dynamic_control_callback",nonce:lu.nonce,vp_control_name:i,vp_attributes:s},t);ir().ajax({url:au,method:"POST",dataType:"json",data:a,complete:function(t){var r=t.responseJSON;n&&r.response&&(r.response.options&&(cu[i]=nu(nu({},cu[i]),r.response.options)),n(r.response)),o&&e.setState({ajaxStatus:!0}),e.isAJAXinProgress=!1}})}}},{key:"prepareOptions",value:function(e){return Object.keys(e||{}).map(function(t){var n=e[t],o={value:t,label:e[t]};return"object"===qc(n)&&(o=nu({},n)),o})}},{key:"render",value:function(){var e=this,t=this.props,n=t.onChange,o=t.isMultiple,r=t.isSearchable,i=t.isCreatable,s=t.callback,a=this.state.ajaxStatus,l=!!s&&r,c=a&&"progress"===a,u={className:"vpf-component-select",styles:nu(nu({},jr()),{},{menuPortal:function(e){return nu(nu({},e),{},{zIndex:1e6})}}),menuPortalTarget:document.body,components:{Option:function(e){var t=e.data;return wp.element.createElement(iu,e,void 0!==t.img?wp.element.createElement("div",{className:"vpf-component-select-option-img"},t.img?wp.element.createElement("img",{src:t.img,alt:t.label}):""):"",wp.element.createElement("span",{className:"vpf-component-select-option-label"},t.label),t.category?wp.element.createElement("div",{className:"vpf-component-select-option-category"},t.category):"")}},value:this.getDefaultValue(),options:this.prepareOptions(this.getOptions()),onChange:function(e){if(o)if(Array.isArray(e)){var t=[];e.forEach(function(e){t.push(e?e.value:"")}),n(t)}else n([]);else n(e?e.value:"")},isMulti:o,isSearchable:r,isLoading:c,isClearable:!1,placeholder:r?(0,R.__)("Type to search…","visual-portfolio"):(0,R.__)("Select…","visual-portfolio")};return o&&(u.useDragHandle=!0,u.axis="xy",u.onSortEnd=function(t){var n,o,r,i=t.oldIndex,s=t.newIndex,a=(n=e.getDefaultValue(),o=i,r=s,(n=n.slice()).splice(r<0?n.length+r:r,0,n.splice(o,1)[0]),n);u.onChange(a)},u.distance=4,u.getHelperDimensions=function(e){return e.node.getBoundingClientRect()},u.components.MultiValue=fu,u.components.MultiValueLabel=du,u.closeMenuOnSelect=!1),i?(u.placeholder=(0,R.__)("Type and press Enter…","visual-portfolio"),u.isSearchable=!0,o?wp.element.createElement(pu,u):wp.element.createElement(cc,u)):l?(u.loadOptions=function(t,n){e.requestAjaxDebounce({q:t},function(e){var t=[];e&&e.options&&Object.keys(e.options).forEach(function(n){t.push(e.options[n])}),n(t.length?t:null)},!1)},u.cacheOptions=!0,u.defaultOptions=u.options,delete u.options,delete u.isLoading,o?wp.element.createElement(hu,u):wp.element.createElement(rc,u)):o?wp.element.createElement(uu,u):wp.element.createElement(tc,u)}}])}(O.Component);function mu(e){return mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mu(e)}function vu(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,yu(o.key),o)}}function yu(e){var t=function(e){if("object"!=mu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mu(t)?t:t+""}function bu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(bu=function(){return!!e})()}function wu(e){return wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wu(e)}function xu(e,t){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xu(e,t)}function Su(e){return function(e){if(Array.isArray(e))return Cu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Cu(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cu(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_u.apply(null,arguments)}var ku=function(e){var t=e.id,n=e.element,o=e.sourceOptions,r=e.items,i=e.props,s=i.allowDisablingOptions,a=i.onChange,l=Lo({id:t}),c=l.attributes,u=l.listeners,p=l.setNodeRef,h=l.transform,d=l.transition,f=l.isDragging,g=l.isSorting,m={transform:Tt.Translate.toString(h),transition:g?d:""},v=o[n];return wp.element.createElement("li",{className:T()("vpf-component-sortable-item",f?"vpf-component-sortable-item-dragging":""),ref:p,style:m},wp.element.createElement("span",_u({},c,u),wp.element.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M10 4.99976H8V6.99976H10V4.99976Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M10 10.9998H8V12.9998H10V10.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M10 16.9998H8V18.9998H10V16.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 4.99976H14V6.99976H16V4.99976Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 10.9998H14V12.9998H16V10.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 16.9998H14V18.9998H16V16.9998Z",fill:"currentColor"}))),v,s?wp.element.createElement(A.Button,{className:"vpf-component-sortable-delete",onClick:function(){var e=Su(r),t=r.indexOf(n);e.splice(t,1),a(e)}},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},wp.element.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 12H4"}))):null)},$u=function(e){var t=e.items,n=e.sourceOptions,o=e.classes,r=e.onSortEnd,i=e.props,s=Ht(Wt(Dn));return wp.element.createElement("ul",{className:o},wp.element.createElement(ho,{sensors:s,collisionDetection:qt,onDragEnd:function(e){var n=e.active,o=e.over;n.id!==o.id&&r(t.indexOf(n.id),t.indexOf(o.id))}},wp.element.createElement(ko,{items:t,strategy:So},t.map(function(e){return wp.element.createElement(ku,{key:"item-".concat(e),id:e,element:e,sourceOptions:n,props:i,items:t})}))))},Eu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=wu(t),function(e,t){if(t&&("object"==mu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bu()?Reflect.construct(t,n||[],wu(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xu(e,t)}(t,e),function(e,t){return t&&vu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,t=e.options,n=e.defaultOptions,o=e.allowDisablingOptions,r=e.onChange,i=this.props.value;void 0===i&&(i=void 0!==n?n:[]);var s=Object.keys(t).filter(function(e){return!i.includes(e)}),a=T()("vpf-component-sortable",s.length>0?"vpf-dragging-has-disabled-options":"");return wp.element.createElement("div",null,wp.element.createElement($u,{items:i,sourceOptions:t,classes:a,props:this.props,onSortEnd:function(e,t){var n=vo(i,e,t);r(n)}}),s.length>0?wp.element.createElement("ul",{className:"vpf-component-sortable-disabled"},s.map(function(e){return wp.element.createElement("li",{key:"disabled-item-".concat(e)},o?wp.element.createElement(A.Button,{className:"vpf-component-sortable-add",onClick:function(){var t=Su(i);t.push(e),r(t)}},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},wp.element.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))):null,t[e])})):null)}}])}(O.Component);function Ou(e){return Ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ou(e)}function Mu(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Tu(o.key),o)}}function Tu(e){var t=function(e){if("object"!=Ou(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ou(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ou(t)?t:t+""}function Au(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Au=function(){return!!e})()}function Lu(e){return Lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lu(e)}function Ru(e,t){return Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ru(e,t)}var Iu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Lu(t),function(e,t){if(t&&("object"==Ou(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Au()?Reflect.construct(t,n||[],Lu(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ru(e,t)}(t,e),function(e,t){return t&&Mu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,t=e.onChange,n=e.children,o=e.options;return wp.element.createElement(A.TabPanel,{className:"vpf-component-tabs-control",onSelect:t,tabs:o.map(function(e){return{name:e.category,title:e.title,icon:e.icon?wp.element.createElement(O.RawHTML,null,e.icon):null}})},n)}}])}(O.Component),Du=["options","children"];function Pu(){return Pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Pu.apply(null,arguments)}var Nu=window.Masonry;function ju(e){var t=e.options,n=e.children,o=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,Du),r=(0,O.useRef)();return(0,O.useEffect)(function(){var e=new Nu(r.current,t);return function(){e.destroy()}},[r,t,n]),wp.element.createElement("div",Pu({ref:r},o),n)}function Fu(e){var t=e.children;return(0,O.useEffect)(function(){var e=document.createElement("style");return e.innerHTML=t,document.body.appendChild(e),function(){return document.body.removeChild(e)}},[t]),null}function zu(e){return zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zu(e)}function Bu(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Wu(o.key),o)}}function Wu(e){var t=function(e){if("object"!=zu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zu(t)?t:t+""}function Hu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hu=function(){return!!e})()}function Vu(e){return Vu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vu(e)}function Uu(e,t){return Uu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uu(e,t)}var Gu=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=function(e,t,n){return t=Vu(t),function(e,t){if(t&&("object"==zu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hu()?Reflect.construct(t,n||[],Vu(e).constructor):t.apply(e,n))}(this,t,[].concat(o))).state={isOpened:!1},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uu(e,t)}(t,e),function(e,t){return t&&Bu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=t.modalTitle,r=t.buttonLabel,i=t.size,s=this.state.isOpened;return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(A.Button,{variant:"secondary",onClick:function(){return e.setState({isOpened:!s})}},r),s?wp.element.createElement(A.Modal,{title:o,onRequestClose:function(){return e.setState({isOpened:!s})},className:T()("vpf-component-modal",i?"vpf-component-modal-size-".concat(i):"")},n):"")}}])}(O.Component);function Ku(e){return Ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ku(e)}function Yu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function qu(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Qu(o.key),o)}}function Qu(e){var t=function(e){if("object"!=Ku(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ku(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ku(t)?t:t+""}function Xu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xu=function(){return!!e})()}function Zu(e){return Zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zu(e)}function Ju(e,t){return Ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ju(e,t)}var ep=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=function(e,t,n){return t=Zu(t),function(e,t){if(t&&("object"==Ku(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xu()?Reflect.construct(t,n||[],Zu(e).constructor):t.apply(e,n))}(this,t,[].concat(o))).renderPreview=e.renderPreview.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ju(e,t)}(t,e),function(e,t){return t&&qu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderPreview",value:function(e){var t=e.split(/[:|]/),n='[data-tiles-preview="'.concat(e,'"]'),o="";void 0===t[t.length-1]||t[t.length-1]||t.pop();var r,i=parseInt(t[0],10)||1;if(t.shift(),o+="".concat(n," .vpf-tiles-preview-item-wrap { width: ").concat(100/i,"%; }"),t&&t.length)for(var s=0;s<t.length;s+=1){var a=t[s].split(","),l=parseFloat(a[0])||1,c=parseFloat(a[1])||1,u=".vpf-tiles-preview-item-wrap";t.length>1&&(u+=":nth-of-type(".concat(t.length,"n+").concat(s+1,")")),l&&1!==l&&(o+="".concat(n," ").concat(u," { width: ").concat(100*l/i,"%; }")),o+="".concat(n," ").concat(u," .vpf-tiles-preview-item::after { padding-top: ").concat(100*c,"%; }")}return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Fu,null,o),wp.element.createElement(ju,{"data-tiles-preview":e,options:{transitionDuration:0}},Array.apply(void 0,(r=Array(4*i),function(e){if(Array.isArray(e))return Yu(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Yu(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yu(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).map(function(e){return wp.element.createElement("div",{key:e,className:"vpf-tiles-preview-item-wrap"},wp.element.createElement("div",{className:"vpf-tiles-preview-item"}))})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,o=t.options,r=t.onChange;return wp.element.createElement("div",{className:"vpf-component-tiles-selector"},wp.element.createElement(Gu,{modalTitle:(0,R.__)("Tiles","visual-portfolio"),buttonLabel:(0,R.__)("Edit Tiles","visual-portfolio")},wp.element.createElement("div",{className:"vpf-component-tiles-selector-items"},o.map(function(t){return wp.element.createElement(A.Button,{key:t.value,onClick:function(){return r(t.value)},className:T()("vpf-tiles-preview-button",n===t.value?"vpf-tiles-preview-button-active":"")},e.renderPreview(t.value))}))),wp.element.createElement("div",{className:"vpf-tiles-preview-button"},this.renderPreview(n)))}}])}(O.Component);function tp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var np=A.ToggleGroupControl||A.__experimentalToggleGroupControl,op=A.ToggleGroupControlOption||A.__experimentalToggleGroupControlOption;function rp(e){var t=e.children,n=e.options,o=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tp(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tp(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,O.useState)(n[0].category),2),r=o[0],i=o[1];return wp.element.createElement("div",{className:"vpf-component-toggle-group-control"},wp.element.createElement(np,{className:"vpf-component-toggle-group-control-toggle",value:r,onChange:function(e){i(e)},isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},n.map(function(e){return wp.element.createElement(op,{key:e.category,value:e.category,label:e.title})})),n.map(function(e){return r===e.category?wp.element.createElement(O.Fragment,{key:e.category},t(e)):null}))}function ip(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function sp(){return sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},sp.apply(null,arguments)}function ap(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function lp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ap(Object(n),!0).forEach(function(t){cp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ap(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cp(e,t,n){return(t=hp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function up(e){return up="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},up(e)}function pp(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,hp(o.key),o)}}function hp(e){var t=function(e){if("object"!=up(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=up(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==up(t)?t:t+""}function dp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dp=function(){return!!e})()}function fp(e){return fp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fp(e)}function gp(e,t){return gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gp(e,t)}var mp=A.UnitControl||A.__experimentalUnitControl,vp=window.VPGutenbergVariables,yp=vp.controls,bp=vp.controls_categories,xp=vp.plugin_version,Sp={},Cp=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=fp(t),function(e,t){if(t&&("object"==up(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dp()?Reflect.construct(t,n||[],fp(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gp(e,t)}(t,e),function(e,t){return t&&pp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this,n=this.props,o=n.category,r=n.categoryToggle,i=void 0===r||r,s=n.categoryInitialOpen,a=void 0!==s&&s,l=n.controls,c=n.clientId,u=n.isSetupWizard,p=n.isModernBlock,h=void 0!==p&&p,d=n.showPanel,f=void 0===d||d;if(!this.props.attributes)return null;var g=h?K(this.props.attributes):this.props.attributes,m=function(t){h&&(t=function(e){var t={};return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&Object.entries(G).forEach(function(e){var n=B(e,2),o=n[0],r=n[1];t[o]=F({},r)}),Object.entries(H).forEach(function(n){var o=B(n,2),r=o[0],i=o[1];if(void 0!==e[i]){var s=e[i];U.legacyToModern[i]&&(s=U.legacyToModern[i][s]||s),t[r]=s}}),Object.entries(V).forEach(function(n){var o=B(n,2),r=o[0],i=o[1];void 0!==e[i]&&function(e,t,n){var o=t.split("."),r=o.pop();o.reduce(function(e,t){return e[t]||(e[t]={}),e[t]},e)[r]=n}(t,r,e[i])}),t}(t),Object.keys(t).forEach(function(n){"object"===up(t[n])&&(t[n]=lp(lp({},e.props.attributes[n]),t[n]))})),e.props.setAttributes(t)};if(/^content-source-/g.test(o)&&"content-source-general"!==o&&"content-source-".concat(g.content_source)!==o)return null;var v=l||yp,y=[];Object.keys(v).forEach(function(n){var r=v[n];if(!o||r.category&&o===r.category){var i=(0,L.applyFilters)("vpf.editor.controls-render-data",lp({attributes:g,setAttributes:m,onChange:function(e){var t=(0,L.applyFilters)("vpf.editor.controls-on-change",cp({},r.name,e),r,e,g);m(t)}},r));t.AllowRender(i,u)&&y.push((0,L.applyFilters)("vpf.editor.controls-render",wp.element.createElement(t.Control,sp({key:"control-".concat(r.name,"-").concat(r.label)},i,{clientId:c,isSetupWizard:u,renderProps:e.props})),i,e.props))}});var b=!!i&&o,w=!1,x=!1,S=a||!i;return i&&void 0!==bp[o]&&(b=bp[o].title,w=bp[o].icon||!1,x=!!bp[o].is_pro,void 0===Sp[o]&&(Sp[o]=bp[o].is_opened||!1),S=S||Sp[o]),u?y.length?wp.element.createElement("div",{className:"vpf-setup-wizard-panel"},y):"":f?y.length?wp.element.createElement(A.PanelBody,{title:!!b&&wp.element.createElement(wp.element.Fragment,null,w?wp.element.createElement("span",{className:"vpf-control-category-title-icon"},wp.element.createElement(O.RawHTML,null,w)):null,wp.element.createElement("span",null,b),x?wp.element.createElement("span",{className:"vpf-control-category-title-pro"},(0,R.__)("PRO","visual-portfolio")):""),onToggle:function(){Sp[o]=!S},initialOpen:S,scrollAfterOpen:!0},y):"":y.length?y:""}}])}(O.Component);Cp.Control=function(e){var t=e.attributes,n=e.onChange,o=e.isSetupWizard,r=(0,O.useRef)(),i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ip(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ip(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,O.useState)(""),2),s=i[0],a=i[1],l=I(e.name,t);if((0,O.useEffect)(function(){if(e.group&&r.current){for(var t=r.current.parentElement.parentElement,n=t.previousElementSibling,o=t.nextElementSibling;n&&n.classList.contains("vpf-control-group-separator");)n=n.previousElementSibling;for(;o&&o.classList.contains("vpf-control-group-separator");)o=o.nextElementSibling;var i=n&&n.classList.contains("vpf-control-group-".concat(e.group))||o&&o.classList.contains("vpf-control-group-".concat(e.group)),l=n&&!n.classList.contains("vpf-control-group-".concat(e.group))&&n.classList.contains("vpf-control-wrap"),c=o&&!o.classList.contains("vpf-control-group-".concat(e.group))&&o.classList.contains("vpf-control-wrap"),u="";i&&(l?u="start":c&&(u="end")),s!==u&&a(u)}},[r,e.group,l,s]),!Cp.AllowRender(e,o))return null;var c="",u=e.label,p="",h=e.description?wp.element.createElement(O.RawHTML,{className:"components-base-control__help"},e.description):null,d=T()("vpf-control-wrap","vpf-control-wrap-".concat(e.type));e.group&&(d=T()(d,"vpf-control-with-group","vpf-control-group-".concat(e.group),!!s&&"vpf-control-group-position-".concat(s)));var f=[];switch(("category_tabs"===e.type||"category_toggle_group"===e.type||"category_collapse"===e.type||"category_navigator"===e.type)&&e.options&&e.options.length&&e.options.forEach(function(t){Cp.isCategoryEmpty(lp(lp({},e.renderProps),{},{category:t.category,categoryToggle:!1}))||f.push(t)}),e.type){case"category_tabs":c=f.length?wp.element.createElement(Iu,{controlName:e.name,options:f,key:f},function(t){return wp.element.createElement(Cp,sp({},e.renderProps,{category:t.name,categoryToggle:!1}))}):null;break;case"category_toggle_group":c=f.length?wp.element.createElement(rp,{controlName:e.name,options:f,key:f,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},function(t){return wp.element.createElement(Cp,sp({},e.renderProps,{category:t.category,categoryToggle:!1}))}):null;break;case"category_collapse":c=f.length?wp.element.createElement(Re,{controlName:e.name,initialOpen:e.initialOpen,options:f,key:f},function(t){return wp.element.createElement(Cp,sp({},e.renderProps,{category:t.category,categoryToggle:!1}))}):null;break;case"category_navigator":c=f.length?wp.element.createElement(_r,{controlName:e.name,options:f,key:f},function(t){return wp.element.createElement(Cp,sp({},e.renderProps,{category:t.category,categoryToggle:!1}))}):null;break;case"html":c=wp.element.createElement(O.RawHTML,null,e.default);break;case"select":case"select2":c=wp.element.createElement(gu,{controlName:e.name,callback:e.value_callback,attributes:t,value:l,options:e.options||{},onChange:function(e){return n(e)},isSearchable:e.searchable,isMultiple:e.multiple,isCreatable:e.creatable||e.tags});break;case"buttons":c=wp.element.createElement(A.ButtonGroup,null,Object.keys(e.options||{}).map(function(t){return wp.element.createElement(A.Button,{variant:l===t?"primary":"",isPressed:l===t,key:t,onClick:function(){return n(t)}},e.options[t])}));break;case"icons_selector":c=wp.element.createElement(br,{controlName:e.name,callback:e.value_callback,attributes:t,value:l,options:e.options,onChange:function(e){return n(e)},collapseRows:e.collapse_rows||!1,isSetupWizard:o});break;case"tiles_selector":c=wp.element.createElement(ep,{value:l,options:e.options,onChange:function(e){return n(e)}});break;case"elements_selector":c=wp.element.createElement(it,{value:l,locations:e.locations,options:e.options,onChange:function(e){return n(e)},props:e});break;case"align":c=wp.element.createElement(ee,{value:l,options:e.options||"horizontal",onChange:function(e){return n(e)}});break;case"aspect_ratio":c=wp.element.createElement(ce,{value:l,onChange:function(e){return n(e)}});break;case"gallery":c=wp.element.createElement(or,{imageControls:e.image_controls,focalPoint:e.focal_point,attributes:t,name:e.name,value:l,onChange:function(e){return n(e)},isSetupWizard:o});break;case"code_editor":c=wp.element.createElement(Ae,{value:e.encode?Z(l):l,mode:e.mode,maxLines:e.max_lines,minLines:e.min_lines,codePlaceholder:e.code_placeholder,onChange:function(t){return n(e.encode?X(t):t)}}),e.allow_modal&&(p=wp.element.createElement(Gu,{modalTitle:(0,R.__)("Custom CSS","visual-portfolio"),buttonLabel:(0,R.__)("Open in Modal","visual-portfolio"),size:"md"},wp.element.createElement(A.BaseControl,{id:"vpf-custom-css-".concat(e.label||e.name),label:e.label,help:!!e.description&&wp.element.createElement(O.RawHTML,null,e.description),className:T()("vpf-control-wrap","vpf-control-wrap-".concat(e.type)),__nextHasNoMarginBottom:!0},wp.element.createElement("div",null,c)),e.classes_tree?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("p",null,(0,R.__)("Classes Tree:","visual-portfolio")),wp.element.createElement(Ce,e)):""));break;case"range":c=wp.element.createElement(A.RangeControl,{min:e.min,max:e.max,step:e.step,value:parseFloat(l),onChange:function(e){return n(parseFloat(e))},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0});break;case"toggle":c=wp.element.createElement(A.ToggleControl,{checked:l,label:e.alongside,onChange:function(e){return n(e)},__nextHasNoMarginBottom:!0});break;case"checkbox":c=wp.element.createElement(A.CheckboxControl,{checked:l,label:e.alongside,onChange:function(e){return n(e)},__nextHasNoMarginBottom:!0});break;case"radio":c=wp.element.createElement(A.RadioControl,{label:u,selected:l,options:Object.keys(e.options||{}).map(function(t){return{label:e.options[t],value:t}}),onChange:function(e){return n(e)}}),u=!1;break;case"color":c=wp.element.createElement(De,{label:u,value:l,alpha:e.alpha,gradient:e.gradient,onChange:function(e){return n(e)}}),u=!1;break;case"date":c=wp.element.createElement(He,{value:l,onChange:function(e){return n(e)}});break;case"textarea":c=wp.element.createElement(A.TextareaControl,{label:u,value:l,onChange:function(e){return n(e)},__nextHasNoMarginBottom:!0}),u=!1;break;case"url":c=wp.element.createElement(A.TextControl,{label:u,type:"url",value:l,onChange:function(e){return n(e)},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),u=!1;break;case"number":c=wp.element.createElement(A.TextControl,{label:u,type:"number",min:e.min,max:e.max,step:e.step,value:parseFloat(l),onChange:function(e){return n(parseFloat(e))},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),u=!1;break;case"unit":c=wp.element.createElement(mp,{label:u,value:l,onChange:function(e){return n(e)},labelPosition:"edge",__unstableInputWidth:"70px",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),u=!1;break;case"hidden":c=wp.element.createElement(A.TextControl,{type:"hidden",value:l,onChange:function(e){return n(e)},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0});break;case"notice":c=h?wp.element.createElement(A.Notice,{status:e.status,isDismissible:!1},h):"",h=!1;break;case"pro_note":c=wp.element.createElement(Pr,{title:u},h||"",wp.element.createElement(Pr.Button,{target:"_blank",rel:"noopener noreferrer",href:"https://www.visualportfolio.com/pricing/?utm_source=plugin&utm_medium=block_settings&utm_campaign=".concat(e.name,"&utm_content=").concat(xp)},(0,R.__)("Go Pro","visual-portfolio"))),u=!1,h=!1;break;case"sortable":c=wp.element.createElement(Eu,{label:u,controlName:e.name,attributes:t,value:l,options:e.options||{},defaultVal:e.default||{},allowDisablingOptions:e.allow_disabling_options||!1,onChange:function(e){return n(e)}});break;default:c=wp.element.createElement(A.TextControl,{label:u,value:l,onChange:function(e){return n(e)},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),u=!1}e.hint&&(c=wp.element.createElement(A.Tooltip,{text:e.hint,position:e.hint_place},wp.element.createElement("div",null,c)));var g=(0,L.applyFilters)("vpf.editor.controls-render-inner-data",{renderControl:c,renderControlLabel:u,renderControlHelp:h,renderControlAfter:p,renderControlClassName:d},{props:e,controlVal:l});return null===g.renderControl?null:wp.element.createElement(wp.element.Fragment,null,"start"===s?wp.element.createElement("div",{className:"vpf-control-group-separator"}):null,wp.element.createElement(A.BaseControl,{id:"vpf-control-group-".concat(e.name),label:g.renderControlLabel,className:g.renderControlClassName,__nextHasNoMarginBottom:!0},wp.element.createElement("div",{ref:r},g.renderControl),g.renderControlHelp),g.renderControlAfter,"end"===s?wp.element.createElement("div",{className:"vpf-control-group-separator"}):null)},Cp.AllowRender=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(e.skip||e.condition&&e.condition.length&&!P(e.condition,e.attributes)||t&&!e.setup_wizard)},Cp.isCategoryEmpty=function(e){var t=e.category,n=e.attributes,o=e.setAttributes,r=e.controls,i=e.isSetupWizard,s=r||yp,a=!0;return Object.keys(s).forEach(function(e){if(a){var r=s[e];if(!t||r.category&&t===r.category){var l=(0,L.applyFilters)("vpf.editor.controls-render-data",lp({attributes:n,setAttributes:o,onChange:function(e){var t=(0,L.applyFilters)("vpf.editor.controls-on-change",cp({},r.name,e),r,e,n);o(t)}},r));Cp.AllowRender(l,i)&&(a=!1)}}}),a};const _p=Cp;function kp(e){return kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kp(e)}function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ep(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$p(Object(n),!0).forEach(function(t){Op(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Op(e,t,n){return(t=function(e){var t=function(e){if("object"!=kp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kp(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,L.addFilter)("vpf.editor.changed-attributes","vpf/editor/changed-attributes/live-reload",function(e){if(!e.$framePortfolio)return e;var t=!1;return Object.keys(e.attributes).forEach(function(n){var o=e.attributes[n];switch(n){case"tiles_type":case"masonry_columns":case"masonry_images_aspect_ratio":case"grid_columns":case"grid_images_aspect_ratio":case"justified_row_height":case"justified_row_height_tolerance":case"justified_max_rows_count":case"justified_last_row":case"slider_effect":case"slider_speed":case"slider_autoplay":case"slider_autoplay_hover_pause":case"slider_centered_slides":case"slider_loop":case"slider_free_mode":case"slider_free_mode_sticky":case"slider_bullets_dynamic":case"items_gap":case"items_gap_vertical":e.$framePortfolio.attr("data-vp-".concat(n.replace(/_/g,"-")),o),e.$framePortfolio.vpf("init");break;case"items_style_default__align":case"items_style_fade__align":case"items_style_fly__align":case"items_style_emerge__align":var r="";["left","center","right","top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"].forEach(function(e){r+="".concat(r?" ":"","vp-portfolio__item-align-").concat(e)}),e.$framePortfolio.find(".vp-portfolio__item-overlay").removeClass(r).addClass("vp-portfolio__item-align-".concat(o));break;case"items_style_default__caption_text_align":case"items_style_fade__caption_text_align":case"items_style_fly__caption_text_align":case"items_style_emerge__caption_text_align":var i="";["left","center","right","top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"].forEach(function(e){i+="".concat(i?" ":"","vp-portfolio__item-caption-text-align-").concat(e)}),e.$framePortfolio.find(".vp-portfolio__item-caption").removeClass(i).addClass("vp-portfolio__item-caption-text-align-".concat(o));break;case"items_style_default__overlay_text_align":case"items_style_fade__overlay_text_align":case"items_style_fly__overlay_text_align":case"items_style_emerge__overlay_text_align":var s="";["left","center","right","top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"].forEach(function(e){s+="".concat(s?" ":"","vp-portfolio__item-overlay-text-align-").concat(e)}),e.$framePortfolio.find(".vp-portfolio__item-overlay").removeClass(s).addClass("vp-portfolio__item-overlay-text-align-".concat(o));break;case"list_name":break;default:t=t||e.reload}}),Ep(Ep({},e),{},{reload:t})});var Mp=n(570),Tp=n.n(Mp);function Ap(e){return Ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ap(e)}function Lp(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ap(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ap(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ap(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rp=window.VPGutenbergVariables.controls;function Ip(e,t,n){return!(!e||void 0===t||""===t||null===t||void 0===n.property)&&(void 0!==n.mask&&(t=n.mask.replace("$",t)),void 0!==n.element&&/\$/g.test(n.element)?e=n.element.replace("$",e):e+=void 0!==n.element?" ".concat(n.element):"",Lp({},e,Lp({},n.property,t)))}function Dp(e){return void 0!==Rp[e]&&void 0!==Rp[e].style&&Rp[e].style.length}function Pp(e){var t="",n="";if(void 0!==e.block_id&&e.block_id?n=e.block_id:void 0!==e.id&&e.id&&(n=e.id),!n)return t;n=".vp-id-".concat(n);var o={};if(Object.keys(Rp).forEach(function(t){var r=Rp[t],i=void 0!==r.style&&r.style;i&&void 0!==r.condition&&r.condition.length&&(i=P(r.condition,e)),i&&r.style.forEach(function(t){var i=e[r.name];if(i=(0,L.applyFilters)("vpf.editor.controls-dynamic-css-value",i,e,r,n,t),r.type&&"aspect_ratio"===r.type&&i){var s=i.split(":");s[0]&&s[1]&&(i="".concat(s[1]/s[0]*100,"%"))}var a=Ip(n,i,t);(a=(0,L.applyFilters)("vpf.editor.controls-dynamic-css-styles-object",a,n,i,t,e,r))&&(o=(0,Ro.merge)(o,a))})}),Object.keys(o).forEach(function(e){t+="".concat(e," {\n"),Object.keys(o[e]).forEach(function(n){t+="  ".concat(n,": ").concat(o[e][n],";\n")}),t+="}\n"}),void 0!==e.custom_css&&e.custom_css){var r=e.custom_css;r=(r=(r=Z(r)).replace(/selector/g,n)).replace(/<\//g,"&lt;/"),t+=r}return t}function Np(e){return Np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Np(e)}function jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Fp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jp(Object(n),!0).forEach(function(t){zp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zp(e,t,n){return(t=Hp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||Yp(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wp(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Hp(o.key),o)}}function Hp(e){var t=function(e){if("object"!=Np(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Np(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Np(t)?t:t+""}function Vp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vp=function(){return!!e})()}function Up(e){return Up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Up(e)}function Gp(e,t){return Gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gp(e,t)}function Kp(e){return function(e){if(Array.isArray(e))return qp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Yp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yp(e,t){if(e){if("string"==typeof e)return qp(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qp(e,t):void 0}}function qp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Qp=window,Xp=Qp.VPAdminGutenbergVariables,Zp=Qp.VPGutenbergVariables.controls,Jp=1,eh=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=function(e,t,n){return t=Up(t),function(e,t){if(t&&("object"==Np(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vp()?Reflect.construct(t,n||[],Up(e).constructor):t.apply(e,n))}(this,t,[].concat(o))).state={loading:!0,uniqueId:"vpf-preview-".concat(Jp),currentIframeHeight:0,latestIframeHeight:0,blockPosition:null},Jp+=1,e.frameRef=(0,O.createRef)(),e.formRef=(0,O.createRef)(),e.maybePreviewTypeChanged=e.maybePreviewTypeChanged.bind(e),e.maybeAttributesChanged=e.maybeAttributesChanged.bind(e),e.onFrameLoad=e.onFrameLoad.bind(e),e.maybeReload=e.maybeReload.bind(e),e.maybeReloadDebounce=Yc(300,Fr(e.maybeReload.bind(e))),e.maybeResizePreviews=e.maybeResizePreviews.bind(e),e.maybeResizePreviewsThrottle=Kc(100,Fr(e.maybeResizePreviews)),e.updateIframeHeight=e.updateIframeHeight.bind(e),e.updateIframeHeightThrottle=Kc(100,Fr(e.updateIframeHeight)),e.printInput=e.printInput.bind(e),e.trackBlockPosition=e.trackBlockPosition.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gp(e,t)}(t,e),function(e,t){return t&&Wp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){var e=this,t=this,n=t.props.clientId;this.setState({blockPosition:this.getBlockPosition(n)}),this.unsubscribe=(0,Ie.subscribe)(function(){e.trackBlockPosition(n)}),Tp()({interval:10,warningTimeout:6e4,checkOrigin:!1,onMessage:function(e){"clicked"===e.message&&((0,Ie.dispatch)("core/block-editor").selectBlock(n),window.focus())},onResized:function(e){var n=e.height;t.updateIframeHeightThrottle("".concat(n,"px"))}},t.frameRef.current),t.frameRef.current.addEventListener("load",t.onFrameLoad),window.addEventListener("resize",t.maybeResizePreviewsThrottle),t.maybeReload()}},{key:"componentDidUpdate",value:function(e){this.maybePreviewTypeChanged(e),this.maybeAttributesChanged(e)}},{key:"componentWillUnmount",value:function(){this.unsubscribe&&this.unsubscribe(),this.frameRef.current.removeEventListener("load",this.onFrameLoad),window.removeEventListener("resize",this.maybeResizePreviewsThrottle),this.frameRef.current.iframeResizer&&(this.frameRef.current.iframeResizer.close(),this.frameRef.current.iframeResizer.removeListeners())}},{key:"onFrameLoad",value:function(e){var t=this;this.frameWindow=e.target.contentWindow,this.frameJQuery=e.target.contentWindow.jQuery,this.frameJQuery&&(this.$framePortfolio=this.frameJQuery(".vp-portfolio"),this.maybeResizePreviews(),this.frameTimeout&&clearTimeout(this.frameTimeout),this.frameTimeout=setTimeout(function(){t.setState({loading:!1})},300))}},{key:"maybePreviewTypeChanged",value:function(e){e.previewDeviceType!==this.props.previewDeviceType&&this.maybeResizePreviews()}},{key:"maybeAttributesChanged",value:function(e){if(!this.busyReload){this.busyReload=!0;var t,n,o,r,i=this.frameRef.current,s=this.props.context?Object.fromEntries(Object.entries(this.props.context).map(function(e){var t=Bp(e,2),n=t[0],o=t[1];return[n.replace("vp/",""),o]})):{},a=e.context?Object.fromEntries(Object.entries(e.context).map(function(e){var t=Bp(e,2),n=t[0],o=t[1];return[n.replace("vp/",""),o]})):{},l=Fp(Fp({},this.props.attributes),K(s)),c=Fp(Fp({},e.attributes),K(a)),u={};if((t=c,n=l,o=(0,Ro.uniq)([].concat(Kp(Object.keys(t)),Kp(Object.keys(n)))),r=[],o.forEach(function(e){(0,Ro.isEqual)(t[e],n[e])||r.push(e)}),r).forEach(function(e){void 0!==l[e]&&(u[e]=l[e])}),Object.keys(u).length){var p=!1;Object.keys(u).forEach(function(e){var t=Dp(e),n=Zp[e]&&Zp[e].reload_iframe;p=p||!t&&n});var h=(0,L.applyFilters)("vpf.editor.changed-attributes",{attributes:u,reload:p,$frame:this.frameRef.current,frameWindow:this.frameWindow,frameJQuery:this.frameJQuery,$framePortfolio:this.$framePortfolio});h.reload||(h.frameWindow&&h.frameWindow.vp_preview_post_data&&(h.frameWindow.vp_preview_post_data[h.name]=h.value),i.iFrameResizer&&l.block_id&&i.iFrameResizer.sendMessage({name:"dynamic-css",blockId:l.block_id,styles:Pp(l)})),h.reload&&this.maybeReloadDebounce(),this.busyReload=!1}else this.busyReload=!1}}},{key:"getBlockPosition",value:function(e){var t=(0,Ie.select)("core/block-editor");return(0,t.getBlockIndex)(e,(0,t.getBlockRootClientId)(e))}},{key:"trackBlockPosition",value:function(e){var t=this,n=this.getBlockPosition(e);this.state.blockPosition!==n&&this.setState({blockPosition:n,loading:!0},function(){setTimeout(function(){t.maybeReload()},100)})}},{key:"maybeReload",value:function(){var e=this,t=0;this.frameRef.current&&(t=this.state.currentIframeHeight),this.setState({loading:!0,latestIframeHeight:t},function(){e.formRef.current&&e.formRef.current.submit()})}},{key:"maybeResizePreviews",value:function(){var e=ir()(".editor-styles-wrapper, .edit-post-visual-editor__content-area").eq(0).width();if(e&&this.frameRef.current){var t=this.frameRef.current,n=ir()(t),o=n.closest(".visual-portfolio-gutenberg-preview").width();n.css({width:e}),t.iFrameResizer&&(t.iFrameResizer.sendMessage({name:"resize",width:o}),t.iFrameResizer.resize())}}},{key:"updateIframeHeight",value:function(e){this.setState({currentIframeHeight:e})}},{key:"printInput",value:function(e,t){var n=this,o={type:"text",name:e,value:t,readOnly:!0};if("number"==typeof t)o.type="number";else if("boolean"==typeof t)o.type="number",o.value=t?1:0;else{if("object"===Np(t)&&null!==t)return wp.element.createElement(wp.element.Fragment,null,Object.keys(t).map(function(o){return wp.element.createElement(O.Fragment,{key:"".concat(e,"[").concat(o,"]")},n.printInput("".concat(e,"[").concat(o,"]"),t[o]))}));o.value=o.value||""}return wp.element.createElement("input",o)}},{key:"render",value:function(){var e=this,t=this.props,n=t.postType,o=t.postId,r=t.context,i=this.state,s=i.loading,a=i.uniqueId,l=i.currentIframeHeight,c=i.latestIframeHeight,u={},p={};r&&(Object.entries(r).forEach(function(e){var t=Bp(e,2),n=t[0],o=t[1];if(n.startsWith("vp/")){var r="vp_".concat(n.replace("vp/",""));u[r]=o}}),p=Object.fromEntries(Object.entries(this.props.context).map(function(e){var t=Bp(e,2),n=t[0],o=t[1];return[n.replace("vp/",""),o]})));var h=Fp(Fp({},this.props.attributes),K(p)),d=h.id,f=h.content_source;return Object.keys(h).forEach(function(e){u["vp_".concat(e)]=h[e]}),wp.element.createElement("div",{className:T()("visual-portfolio-gutenberg-preview",s?"visual-portfolio-gutenberg-preview-loading":""),style:{height:s?c:l}},wp.element.createElement("div",{className:"visual-portfolio-gutenberg-preview-inner"},wp.element.createElement("form",{action:Xp.preview_url,target:a,method:"POST",style:{display:"none"},ref:this.formRef},wp.element.createElement("input",{type:"hidden",name:"vp_preview_frame",value:"true",readOnly:!0}),wp.element.createElement("input",{type:"hidden",name:"vp_preview_type",value:"gutenberg",readOnly:!0}),wp.element.createElement("input",{type:"hidden",name:"vp_preview_post_type",value:n,readOnly:!0}),wp.element.createElement("input",{type:"hidden",name:"vp_preview_post_id",value:o,readOnly:!0}),wp.element.createElement("input",{type:"hidden",name:"vp_preview_nonce",value:Xp.nonce,readOnly:!0}),"saved"===f?wp.element.createElement("input",{type:"text",name:"vp_id",value:d,readOnly:!0}):wp.element.createElement(wp.element.Fragment,null,Object.entries(u).map(function(t){var n=Bp(t,2),o=n[0],r=n[1];return wp.element.createElement(O.Fragment,{key:o},e.printInput(o,r))}))),wp.element.createElement("iframe",{title:"vp-preview",id:a,name:a,allowtransparency:"true",ref:this.frameRef})),s?wp.element.createElement(A.Spinner,null):"")}}])}(O.Component);const th=(0,Ie.withSelect)(function(e){var t=e("core/editor")||{},n=t.getDeviceType,o=t.getCurrentPost,r=t.getBlockIndex,i=t.getBlockRootClientId;return{previewDeviceType:n?n():"desktop",postType:o?o().type:"standard",postId:o?o().id:"widgets",getBlockIndex:r,getBlockRootClientId:i}})(eh);function nh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oh(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var rh=window,ih=rh.ResizeObserver,sh=rh.MutationObserver;function ah(e){var t=e.step,n=e.children,o=(0,O.useRef)(),r=nh((0,O.useState)(t),2),i=r[0],s=r[1],a=nh((0,O.useState)(0),2),l=a[0],c=a[1],u=(0,O.useCallback)(function(){var e=0;null!==o.current.childNodes&&o.current.childNodes.forEach(function(t){var n=window.getComputedStyle(t),o=parseFloat(n.marginTop)+parseFloat(n.marginBottom);e+=Math.ceil(t.offsetHeight+o)}),c("".concat(e,"px"))},[o]);return(0,O.useEffect)(function(){t!==i&&s(t)},[t,i]),(0,O.useEffect)(function(){u()},[i]),(0,O.useEffect)(function(){var e=o.current,t=Yc(100,function(){u()}),n=new ih(t),r=new sh(t);return n.observe(e),r.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0}),function(){n.disconnect(),r.disconnect()}},[o.current]),void 0!==n[i]?wp.element.createElement("div",{ref:o,className:T()("vpf-component-steps-wizard",t!==i&&"vpf-component-steps-wizard-animate-".concat(i>t?"left":"right")),style:l?{height:l}:{}},n[i]):null}ah.Step=function(e){return e.children};const lh=ah;function ch(e){return ch="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ch(e)}function uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uh(Object(n),!0).forEach(function(t){hh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hh(e,t,n){return(t=function(e){var t=function(e){if("object"!=ch(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ch(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ch(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fh(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function gh(){return gh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},gh.apply(null,arguments)}var mh=window.VPGutenbergVariables.plugin_name,vh=parseInt(window.VPGutenbergVariables.items_count_notice_limit,10);function yh(e,t){return wp.element.createElement(_p,gh({},e,{category:t,isSetupWizard:!0}))}function bh(e,t){var n,o=t.layout_elements,r="filter"===e?"top":"bottom";return void 0!==o[r]&&(null===(n=o[r])||void 0===n?void 0:n.elements.includes(e))}function wh(e,t){var n,o=t.layout_elements,r="filter"===e?"top":"bottom";if(void 0===o[r]||null===(n=o[r])||void 0===n||!n.elements)return o;var i=JSON.parse(JSON.stringify(o));return bh(e,t)?i[r].elements=[]:i[r].elements=[e],i}function xh(e){var t=e.attributes,n=e.setAttributes,o=t.align,r=t.content_source,i=t.items_click_action,s=t.layout,a=t.images,l=dh((0,O.useState)(0),2),c=l[0],u=l[1],p=dh((0,O.useState)(!1),2),h=p[0],d=p[1];(0,O.useEffect)(function(){o||r||n({align:"wide"})},[]);var f=(0,O.useCallback)(function(){var e={};switch(r){case"images":a&&a.length&&(e=ph(ph({},e),{},{items_count:-1,items_click_action:"popup_gallery"}),"slider"!==s&&a.length>vh&&(e=ph(ph({},e),{},{items_count:vh,layout_elements:{top:{elements:[],align:"center"},items:{elements:["items"]},bottom:{elements:["pagination"],align:"center"}},pagination:"infinite",pagination_hide_on_end:!0})));break;case"post-based":case"social-stream":e=ph(ph({},e),{},{layout_elements:{top:{elements:[],align:"center"},items:{elements:["items"]},bottom:{elements:["pagination"],align:"center"}}})}e=ph(ph({},e),{},{items_click_action_popup_title_source:"post-based"===r?"title":"item_title",items_click_action_popup_description_source:"post-based"===r?"description":"item_description",items_click_action_popup_deep_link_pid:"filename"}),n(e),d(!0)},[r,a,s,n]);return(0,O.useEffect)(function(){r&&f()},[r]),wp.element.createElement("div",{className:"vpf-setup-wizard vpf-setup-wizard-step-".concat(c)},wp.element.createElement(lh,{step:c},wp.element.createElement(lh.Step,null,wp.element.createElement("div",{className:"vpf-setup-wizard-title"},mh),wp.element.createElement("div",{className:"vpf-setup-wizard-description",dangerouslySetInnerHTML:{__html:(0,R.__)("Set the common settings in the setup wizard,<br />more options will be available in the block settings.<br />Select the Content Source first:","visual-portfolio")}}),yh(e,"content-source"),yh(e,"content-source-images"),yh(e,"content-source-social-stream")),wp.element.createElement(lh.Step,null,wp.element.createElement("div",{className:"vpf-setup-wizard-title"},(0,R.__)("Items Style","visual-portfolio")),wp.element.createElement("div",{className:"vpf-setup-wizard-description",dangerouslySetInnerHTML:{__html:(0,R.__)("Select one of the featured styles to get started.<br />More style settings will be available in the block settings.","visual-portfolio")}}),yh(e,"items-style")),wp.element.createElement(lh.Step,null,wp.element.createElement("div",{className:"vpf-setup-wizard-title"},(0,R.__)("Additional Settings","visual-portfolio")),wp.element.createElement("div",{className:"vpf-setup-wizard-layout-elements"},wp.element.createElement("div",null,wp.element.createElement(A.ToggleControl,{label:(0,R.__)("Filter","visual-portfolio"),checked:bh("filter",t),onChange:function(){n({layout_elements:wh("filter",t)})},__nextHasNoMarginBottom:!0})),wp.element.createElement("div",null,wp.element.createElement(A.ToggleControl,{label:(0,R.__)("Pagination","visual-portfolio"),checked:bh("pagination",t),onChange:function(){n({layout_elements:wh("pagination",t)})},__nextHasNoMarginBottom:!0})),wp.element.createElement("div",null,wp.element.createElement(A.ToggleControl,{label:(0,R.__)("Popup Gallery","visual-portfolio"),checked:"popup_gallery"===i,onChange:function(){n({items_click_action:"popup_gallery"===i?"url":"popup_gallery"})},__nextHasNoMarginBottom:!0}))))),wp.element.createElement("div",{className:"vpf-setup-wizard-pagination"},r?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"vpf-setup-wizard-pagination-button"},wp.element.createElement(A.Button,{isLink:!0,onClick:function(){0===c?n({setup_wizard:"",content_source:t.contentSource||"images"}):u(c-1)}},0===c?(0,R.__)("Skip Setup","visual-portfolio"):(0,R.__)("Previous Step","visual-portfolio"))),wp.element.createElement("div",{className:"vpf-setup-wizard-pagination-progress"},wp.element.createElement("div",{style:{width:"".concat(Math.max(15,Math.min(100,100*c/2.5)),"%")}})),wp.element.createElement("div",{className:"vpf-setup-wizard-pagination-button vpf-setup-wizard-pagination-button-end"},wp.element.createElement(A.Button,{variant:"primary",disabled:!h,onClick:function(){2===c?n({setup_wizard:""}):u(c+1)}},(0,R.__)("Continue","visual-portfolio"),wp.element.createElement("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{marginLeft:"5px"}},wp.element.createElement("path",{d:"M3 10H17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),wp.element.createElement("path",{d:"M11 4L17 10L11 16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}))))):null))}function Sh(){return Sh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Sh.apply(null,arguments)}function Ch(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var _h=window.VPGutenbergVariables,kh=_h.plugin_url,$h=_h.controls_categories;function Eh(e,t){var n=e.attributes,o=e.context,r=n.content_source;"portfolio"===r&&(r=""),r=o&&o["vp/queryType"]||r;var i=function(e,t){if(!t)return e;var n=["content-source","content-source-general","content-source-images","content-source-post-based","content-source-social-stream"];return Object.fromEntries(Object.entries(e).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ch(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ch(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,1)[0];return!n.includes(t)}))}($h,t);return wp.element.createElement(wp.element.Fragment,null,!t&&wp.element.createElement(_p,Sh({category:"content-source"},e)),r?wp.element.createElement(wp.element.Fragment,null,Object.keys(i).map(function(n){if("content-source"===n)return null;var o=t&&"layout-elements"===n;return wp.element.createElement(_p,Sh({key:n,category:n,categoryInitialOpen:o},e))})):null)}const Oh={from:[{type:"block",blocks:["core/gallery"],isMatch:function(e,t){return t&&t.innerBlocks&&t.innerBlocks.length||e&&e.images&&e.images.length},transform:function(e,t){var n,o=e.className,r=t&&t.length;return n=r?t.map(function(e){return{id:parseInt(e.attributes.id,10),imgUrl:e.attributes.url,imgThumbnailUrl:e.attributes.url,title:e.attributes.caption,url:"custom"!==e.attributes.linkDestination&&"attachment"!==e.attributes.linkDestination||!e.attributes.href?"":e.attributes.href}}):e.images.map(function(e){return{id:parseInt(e.id,10),imgUrl:e.fullUrl,imgThumbnailUrl:e.url,title:e.caption}}),(0,a.createBlock)("visual-portfolio/block",{setup_wizard:"false",content_source:"images",items_count:-1,layout:"masonry",items_style_fly__align:"bottom-center",masonry_columns:parseInt(e.columns,10)||3,items_click_action:"none"!==e.linkTo||r?"url":"false",images:n,className:o})}},{type:"block",blocks:["core/latest-posts"],transform:function(e){var t=e.className,n=e.postLayout,o=e.columns,r=void 0===o?3:o,i=e.postsToShow,s=void 0===i?6:i,l=e.displayPostContent,c=e.displayPostContentRadio,u=e.excerptLength,p=e.displayPostDate,h=e.orderBy,d=void 0===h?"date":h,f=e.order,g=void 0===f?"desc":f,m=e.categories;return(0,a.createBlock)("visual-portfolio/block",{content_source:"post-based",posts_source:"post",posts_order_by:d,posts_order_direction:g,posts_taxonomies:!!m&&[m],items_count:s,layout:"grid",grid_columns:"grid"===n?r:1,items_style:"default",items_style_default__show_categories:!1,items_style_default__show_date:p?"true":"false",items_style_default__show_excerpt:l,items_style_default__excerpt_words_count:"full_post"===c?100:u,items_style_default__align:"left",items_style_default__show_read_more:l?"true":"false",className:t})}}]};var Mh=window.VPGutenbergVariables.controls;const Th=Object.keys(Mh.layout.options).map(function(e){var t=Mh.layout.options[e];return{name:t.value,attributes:{layout:t.value},title:t.title,icon:t.icon?{foreground:"#2540CC",src:wp.element.createElement(O.RawHTML,null,t.icon)}:null}})||[];var Ah,Lh,Rh,Ih,Dh,Ph=m.UU,Nh=m.aM,jh={icon:{foreground:"#2540CC",src:wp.element.createElement(g,{width:"20",height:"20"})},example:{attributes:{preview_image_example:"true"}},variations:Th,edit:function(e){var t=e.attributes,n=e.setAttributes,o=e.context,r=t.block_id,i=t.content_source,s=t.setup_wizard,a=t.preview_image_example,l=t.layout,c=(o||{})["vp/queryType"],u=c||i,p=!!c;if((0,O.useEffect)(function(){s||r&&u||p||n({setup_wizard:"true"})},[]),"true"===a)return wp.element.createElement("div",{className:"vpf-example-preview"},wp.element.createElement("img",{src:"".concat(kh,"/assets/admin/images/example-").concat(l,".png"),alt:"Preview of ".concat(l," layout")}));var h=(0,E.useBlockProps)();return wp.element.createElement("div",h,"true"===s?wp.element.createElement(xh,e):wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(E.InspectorControls,null,Eh(e,p)),wp.element.createElement(th,e)))},save:v,transforms:Oh,deprecated:k,usesContext:Nh};function Fh(){return Fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Fh.apply(null,arguments)}(0,a.registerBlockType)(Ph,jh);const zh=JSON.parse('{"UU":"visual-portfolio/saved","DD":"Visual Portfolio Saved Layout","xY":{"ghostkit":true,"anchor":true,"className":false,"html":false,"align":["wide","full"]}}');var Bh,Wh,Hh,Vh;function Uh(){return Uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Uh.apply(null,arguments)}var Gh=function(e){return h.createElement("svg",Uh({xmlns:"http://www.w3.org/2000/svg",width:100,height:100,fill:"none",viewBox:"0 0 100 100"},e),Bh||(Bh=h.createElement("rect",{width:100,height:100,fill:"currentColor",rx:50})),Wh||(Wh=h.createElement("path",{fill:"url(#a)",d:"M57.531 69.5 70.244 33H58.447L47 69.5z"})),Hh||(Hh=h.createElement("path",{fill:"#fff",d:"M42.713 69.5 30 33h11.797l11.447 36.5z"})),Vh||(Vh=h.createElement("defs",null,h.createElement("linearGradient",{id:"a",x1:64.5,x2:33,y1:33,y2:77,gradientUnits:"userSpaceOnUse"},h.createElement("stop",{stopColor:"#fff"}),h.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:0})))))};function Kh(e){return Kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kh(e)}var Yh=window.VPGutenbergVariables.plugin_name;function qh(e){return qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qh(e)}function Qh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qh(Object(n),!0).forEach(function(t){Zh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zh(e,t,n){return(t=function(e){var t=function(e){if("object"!=qh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jh=zh.UU,ed=zh.DD,td={icon:{foreground:"#2540CC",src:wp.element.createElement(function(e){return h.createElement("svg",Fh({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),h.createElement("mask",{id:"b",width:5,height:7,x:11,y:10,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},Ah||(Ah=h.createElement("path",{fill:"url(#a)",d:"m13.369 16.6 2.299-6.6h-2.133l-2.07 6.6z"}))),Lh||(Lh=h.createElement("g",{mask:"url(#b)"},h.createElement("path",{fill:"currentColor",d:"m13.369 16.6 2.299-6.6h-2.133l-2.07 6.6z"}))),Rh||(Rh=h.createElement("path",{fill:"currentColor",d:"M10.69 16.6 8.39 10h2.134l2.07 6.6z"})),Ih||(Ih=h.createElement("path",{fill:"transparent",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M22.8 19.267a2.12 2.12 0 0 1-.633 1.508c-.405.4-.954.625-1.527.625H3.36a2.17 2.17 0 0 1-1.527-.625 2.12 2.12 0 0 1-.633-1.508V4.333c0-.565.228-1.108.633-1.508S2.787 2.2 3.36 2.2h5.4l2.16 3.2h9.72c.573 0 1.122.225 1.527.625s.633.943.633 1.508z"})),Dh||(Dh=h.createElement("defs",null,h.createElement("linearGradient",{id:"a",x1:14.629,x2:8.933,y1:10,y2:17.956,gradientUnits:"userSpaceOnUse"},h.createElement("stop",null),h.createElement("stop",{offset:1,stopOpacity:0})))))},{width:"20",height:"20"})},edit:function(e){var t=e.clientId,n=e.setAttributes,o=e.attributes.id,r=(0,Ie.useSelect)(function(e){return{portfolioLayouts:e("visual-portfolio").getPortfolioLayouts()}},[]).portfolioLayouts;function i(){var e=!1,t=!1;return r?(e={"":(0,R.__)("--- Select Layout ---","visual-portfolio")},Object.keys(r).forEach(function(n){var i=r[n];e[" ".concat(i.id)]="".concat(i.title," (#").concat(i.id,")"),o&&parseInt(o,10)===i.id&&(t=i.edit_url)})):o&&(e=function(e,t,n){return(t=function(e){var t=function(e){if("object"!=Kh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({}," ".concat(o),"#".concat(o))),wp.element.createElement(wp.element.Fragment,null,e?"":wp.element.createElement(A.Spinner,null),e&&Object.keys(e).length?wp.element.createElement("div",{className:"vpf-component-layout-select"},wp.element.createElement(gu,{value:o?" ".concat(o):"",onChange:function(e){return n({id:e?"".concat(parseInt(e,10)):""})},options:e}),t?wp.element.createElement(A.Button,{href:t,target:"_blank",rel:"noopener noreferrer"},wp.element.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M10 13C11.6569 13 13 11.6569 13 10C13 8.34315 11.6569 7 10 7C8.34315 7 7 8.34315 7 10C7 11.6569 8.34315 13 10 13Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),wp.element.createElement("path",{d:"M16.0545 12.4545C15.9456 12.7013 15.9131 12.9751 15.9613 13.2405C16.0094 13.5059 16.1359 13.7508 16.3245 13.9436L16.3736 13.9927C16.5258 14.1447 16.6465 14.3252 16.7288 14.5238C16.8112 14.7225 16.8536 14.9354 16.8536 15.1505C16.8536 15.3655 16.8112 15.5784 16.7288 15.7771C16.6465 15.9757 16.5258 16.1562 16.3736 16.3082C16.2217 16.4603 16.0412 16.581 15.8425 16.6634C15.6439 16.7457 15.431 16.7881 15.2159 16.7881C15.0009 16.7881 14.7879 16.7457 14.5893 16.6634C14.3906 16.581 14.2102 16.4603 14.0582 16.3082L14.0091 16.2591C13.8163 16.0705 13.5714 15.9439 13.3059 15.8958C13.0405 15.8477 12.7668 15.8802 12.52 15.9891C12.278 16.0928 12.0716 16.265 11.9263 16.4845C11.7809 16.704 11.7029 16.9613 11.7018 17.2245V17.3636C11.7018 17.7976 11.5294 18.2138 11.2225 18.5207C10.9157 18.8276 10.4994 19 10.0655 19C9.63146 19 9.21525 18.8276 8.90837 18.5207C8.60149 18.2138 8.42909 17.7976 8.42909 17.3636V17.29C8.42276 17.0192 8.3351 16.7565 8.17751 16.5362C8.01992 16.3159 7.79969 16.1481 7.54545 16.0545C7.29868 15.9456 7.02493 15.9131 6.75952 15.9613C6.4941 16.0094 6.24919 16.1359 6.05636 16.3245L6.00727 16.3736C5.8553 16.5258 5.67483 16.6465 5.47617 16.7288C5.27752 16.8112 5.06459 16.8536 4.84955 16.8536C4.6345 16.8536 4.42157 16.8112 4.22292 16.7288C4.02426 16.6465 3.84379 16.5258 3.69182 16.3736C3.53967 16.2217 3.41898 16.0412 3.33663 15.8425C3.25428 15.6439 3.21189 15.431 3.21189 15.2159C3.21189 15.0009 3.25428 14.7879 3.33663 14.5893C3.41898 14.3906 3.53967 14.2102 3.69182 14.0582L3.74091 14.0091C3.92953 13.8163 4.05606 13.5714 4.10419 13.3059C4.15231 13.0405 4.11982 12.7668 4.01091 12.52C3.90719 12.278 3.73498 12.0716 3.51547 11.9263C3.29596 11.7809 3.03873 11.7029 2.77545 11.7018H2.63636C2.20237 11.7018 1.78616 11.5294 1.47928 11.2225C1.1724 10.9157 1 10.4994 1 10.0655C1 9.63146 1.1724 9.21525 1.47928 8.90837C1.78616 8.60149 2.20237 8.42909 2.63636 8.42909H2.71C2.98081 8.42276 3.24346 8.3351 3.46379 8.17751C3.68412 8.01992 3.85195 7.79969 3.94545 7.54545C4.05437 7.29868 4.08686 7.02493 4.03873 6.75952C3.99061 6.4941 3.86408 6.24919 3.67545 6.05636L3.62636 6.00727C3.47422 5.8553 3.35352 5.67483 3.27118 5.47617C3.18883 5.27752 3.14644 5.06459 3.14644 4.84955C3.14644 4.6345 3.18883 4.42157 3.27118 4.22292C3.35352 4.02426 3.47422 3.84379 3.62636 3.69182C3.77834 3.53967 3.95881 3.41898 4.15746 3.33663C4.35611 3.25428 4.56905 3.21189 4.78409 3.21189C4.99913 3.21189 5.21207 3.25428 5.41072 3.33663C5.60937 3.41898 5.78984 3.53967 5.94182 3.69182L5.99091 3.74091C6.18374 3.92953 6.42865 4.05606 6.69406 4.10419C6.95948 4.15231 7.23322 4.11982 7.48 4.01091H7.54545C7.78745 3.90719 7.99383 3.73498 8.1392 3.51547C8.28457 3.29596 8.36259 3.03873 8.36364 2.77545V2.63636C8.36364 2.20237 8.53604 1.78616 8.84292 1.47928C9.14979 1.1724 9.56601 1 10 1C10.434 1 10.8502 1.1724 11.1571 1.47928C11.464 1.78616 11.6364 2.20237 11.6364 2.63636V2.71C11.6374 2.97328 11.7154 3.23051 11.8608 3.45002C12.0062 3.66953 12.2126 3.84174 12.4545 3.94545C12.7013 4.05437 12.9751 4.08686 13.2405 4.03873C13.5059 3.99061 13.7508 3.86408 13.9436 3.67545L13.9927 3.62636C14.1447 3.47422 14.3252 3.35352 14.5238 3.27118C14.7225 3.18883 14.9354 3.14644 15.1505 3.14644C15.3655 3.14644 15.5784 3.18883 15.7771 3.27118C15.9757 3.35352 16.1562 3.47422 16.3082 3.62636C16.4603 3.77834 16.581 3.95881 16.6634 4.15746C16.7457 4.35611 16.7881 4.56905 16.7881 4.78409C16.7881 4.99913 16.7457 5.21207 16.6634 5.41072C16.581 5.60937 16.4603 5.78984 16.3082 5.94182L16.2591 5.99091C16.0705 6.18374 15.9439 6.42865 15.8958 6.69406C15.8477 6.95948 15.8802 7.23322 15.9891 7.48V7.54545C16.0928 7.78745 16.265 7.99383 16.4845 8.1392C16.704 8.28457 16.9613 8.36259 17.2245 8.36364H17.3636C17.7976 8.36364 18.2138 8.53604 18.5207 8.84292C18.8276 9.14979 19 9.56601 19 10C19 10.434 18.8276 10.8502 18.5207 11.1571C18.2138 11.464 17.7976 11.6364 17.3636 11.6364H17.29C17.0267 11.6374 16.7695 11.7154 16.55 11.8608C16.3305 12.0062 16.1583 12.2126 16.0545 12.4545V12.4545Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))):""):"",e&&!Object.keys(e).length?(0,R.__)("No saved layouts found."):"")}var s=(0,E.useBlockProps)();return wp.element.createElement("div",s,wp.element.createElement(E.InspectorControls,null,wp.element.createElement(A.PanelBody,null,i())),o?wp.element.createElement(th,{attributes:{content_source:"saved",id:o},clientId:t}):wp.element.createElement(A.Placeholder,{className:"vpf-setup-wizard-saved",icon:wp.element.createElement(Gh,{width:"20",height:"20"}),label:(0,R.sprintf)((0,R.__)("Saved %s","visual-portfolio"),Yh)},i()))},save:function(){return null},transforms:{from:[{type:"shortcode",tag:"visual_portfolio",attributes:{id:{type:"string",shortcode:function(e){return e.named.id}},className:{type:"string",shortcode:function(e){return e.named.class}}}}]}};(0,a.registerBlockType)(Jh,td),(0,a.registerBlockType)("nk/visual-portfolio",Xh(Xh({},td),{},{title:ed,name:"nk/visual-portfolio",attributes:{id:{type:"string"},align:{type:"string"},className:{type:"string"},anchor:{type:"string"}},edit:function(e){return(0,(0,Ie.useDispatch)("core/block-editor").replaceBlocks)([e.clientId],(0,a.createBlock)("visual-portfolio/saved",e.attributes||{})),null},supports:Xh(Xh({},zh.xY),{},{inserter:!1})}));const nd=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/loop","category":"media","title":"Gallery Loop (Experimental)","description":"Display gallery loop. Block is experimental and will change in future releases. Please use with caution.","keywords":["gallery","images","posts","portfolio","vpf","loop","query"],"textdomain":"visual-portfolio","attributes":{"layout":{"type":"string","default":"default"},"block_id":{"type":"string"},"queryType":{"type":"string","default":"posts"},"baseQuery":{"type":"object","default":{"perPage":6,"maxPages":1}},"postsQuery":{"type":"object","default":{"source":"portfolio","postTypesSet":["post"],"ids":[],"excludeIds":[],"order":"desc","orderBy":"post_date","offset":0,"taxonomies":[],"taxonomiesRelation":"or","avoidDuplicates":false,"customQuery":""}},"imagesQuery":{"type":"object","default":{"images":[],"categories":[],"orderBy":"default","order":"asc","titlesSource":"custom","descriptionsSource":"custom"}},"customCss":{"type":"string","default":""},"previewImageExample":{"type":"string","default":""},"setupWizard":{"type":"string","default":""}},"supports":{"html":false,"className":false,"anchor":true,"align":["wide","full"],"layout":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"example":{"attributes":{"preview_image_example":true,"layout":"justified"}},"providesContext":{"vp/queryType":"queryType","vp/baseQuery":"baseQuery","vp/postsQuery":"postsQuery","vp/imagesQuery":"imagesQuery"},"viewScript":"visual-portfolio-block-loop"}'),od=window.wp.apiFetch;var rd=n.n(od);function id(e){return id="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},id(e)}function sd(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var l=o&&o.prototype instanceof a?o:a,c=Object.create(l.prototype);return ad(c,"_invoke",function(n,o,r){var i,a,l,c=0,u=r||[],p=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,a=0,l=e,h.n=n,s}};function d(n,o){for(a=n,l=o,t=0;!p&&c&&!r&&t<u.length;t++){var r,i=u[t],d=h.p,f=i[2];n>3?(r=f===o)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((r=n<2&&d<i[1])?(a=0,h.v=o,h.n=i[1]):d<f&&(r=n<3||i[0]>o||o>f)&&(i[4]=n,i[5]=o,h.n=f,a=0))}if(r||n>1)return s;throw p=!0,o}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(p&&1===u&&d(u,f),a=u,l=f;(t=a<2?e:l)||!p;){i||(a?a<3?(a>1&&(h.n=-1),d(a,l)):h.n=l:h.v=l);try{if(c=2,i){if(a||(r="next"),t=i[r]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=e}else if((t=(p=h.n<0)?l:n.call(o,h))!==s)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:p}}}(n,r,i),!0),c}var s={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][o]?t(t([][o]())):(ad(t={},o,function(){return this}),t),p=c.prototype=a.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ad(e,r,"GeneratorFunction")),e.prototype=Object.create(p),e}return l.prototype=c,ad(p,"constructor",c),ad(c,"constructor",l),l.displayName="GeneratorFunction",ad(c,r,"GeneratorFunction"),ad(p),ad(p,r,"Generator"),ad(p,o,function(){return this}),ad(p,"toString",function(){return"[object Generator]"}),(sd=function(){return{w:i,m:h}})()}function ad(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}ad=function(e,t,n,o){if(t)r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n;else{var i=function(t,n){ad(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},ad(e,t,n,o)}function ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function cd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ld(Object(n),!0).forEach(function(t){ud(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ld(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ud(e,t,n){return(t=function(e){var t=function(e){if("object"!=id(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=id(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==id(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pd(e,t,n,o,r,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(o,r)}function hd(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function s(e){pd(i,o,r,s,a,"next",e)}function a(e){pd(i,o,r,s,a,"throw",e)}s(void 0)})}}function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},dd.apply(null,arguments)}function fd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gd(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gd(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var md=window.VPGutenbergVariables,vd=md.plugin_url,yd=md.controls_categories,bd=["content-source","content-source-general","content-source-images","content-source-post-based","content-source-social-stream","custom_css"];function wd(e){return wd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wd(e)}function xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Sd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xd(Object(n),!0).forEach(function(t){Cd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cd(e,t,n){return(t=function(e){var t=function(e){if("object"!=wd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _d,kd=nd.name,$d=Sd(Sd({},nd),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(g,{width:"20",height:"20"})},edit:function(e){var t,n,o=e.attributes,r=e.clientId,i=e.setAttributes,s=o.layout,a=o.queryType,l=o.baseQuery,c=o.imagesQuery,u=o.preview_image_example,p=(0,O.useRef)({}),h=(t=hd(sd().m(function e(){var t,n,s;return sd().w(function(e){for(;;)switch(e.n){case 0:if(a&&l.perPage){e.n=1;break}return e.a(2);case 1:return e.p=1,t={},Object.entries(o).forEach(function(e){var n=fd(e,2),o=n[0],r=n[1];null!==r&&(t[o]=r)}),t.block_id=r,e.n=2,rd()({path:"/visual-portfolio/v1/get-max-pages/",method:"POST",data:t});case 2:void 0!==(null==(n=e.v)?void 0:n.max_pages)&&i({baseQuery:cd(cd({},l),{},{maxPages:parseInt(n.max_pages,10)})}),e.n=4;break;case 3:e.p=3,s=e.v,console.error("Error fetching max pages:",s);case 4:return e.a(2)}},e,null,[[1,3]])})),function(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];clearTimeout(n),n=setTimeout(function(){return t.apply(void 0,o)},500)});if((0,O.useEffect)(function(){if(a&&l.perPage){var e=p.current;Object.keys(o).some(function(t){return JSON.stringify(e[t])!==JSON.stringify(o[t])})&&(h(),p.current=cd({},o))}},[o,a,l.perPage,h]),(0,O.useEffect)(function(){if("images"===a&&Array.isArray(c.images)){var e=new Set;c.images.forEach(function(t){t.categories&&Array.isArray(t.categories)&&t.categories.forEach(function(t){e.add(t)})});var t=Array.from(e),n=c.categories||[];JSON.stringify(n)!==JSON.stringify(t)&&i({imagesQuery:cd(cd({},c),{},{categories:t})})}},[a,i,c]),"true"===u)return wp.element.createElement("div",{className:"vpf-example-preview"},wp.element.createElement("img",{src:"".concat(vd,"/assets/admin/images/example-").concat(s,".png"),alt:"Preview of ".concat(s," layout")}));var d=(0,E.useBlockProps)({className:"vp-block-loop"}),f=(0,E.useInnerBlocksProps)({},{template:[["visual-portfolio/filter-by-category",{},[["visual-portfolio/filter-by-category-item",{text:"All",isAll:!0,url:"#",isActive:!0}]]],["visual-portfolio/block",{setup_wizard:"false"}],["visual-portfolio/pagination",{},[["visual-portfolio/pagination-previous"],["visual-portfolio/pagination-numbers"],["visual-portfolio/pagination-next"]]]]});return wp.element.createElement("div",d,wp.element.createElement(E.InspectorControls,null,function(e){var t,n=e.attributes.queryType;return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(_p,dd({isModernBlock:!0,category:"content-source"},e)),n&&Object.keys((t=yd,Object.fromEntries(Object.entries(t).filter(function(e){var t=fd(e,1)[0];return bd.includes(t)})))).filter(function(e){return"content-source"!==e}).map(function(t){return wp.element.createElement(_p,dd({isModernBlock:!0,key:t,category:t},e))}))}(e)),wp.element.createElement("div",f))},save:function(){var e=E.useBlockProps.save({className:"vp-block-loop"}),t=E.useInnerBlocksProps.save(e);return wp.element.createElement("div",t)}});function Ed(){return Ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ed.apply(null,arguments)}(0,a.registerBlockType)(kd,$d);const Od=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/filter-by-category","title":"Filter by Category (Experimental)","category":"media","description":"Displays category filter buttons for the gallery loop. Block is experimental and will change in future releases. Please use with caution.","ancestor":["visual-portfolio/loop"],"allowedBlocks":["visual-portfolio/filter-by-category-item"],"textdomain":"visual-portfolio","supports":{"html":false,"className":false,"anchor":true,"align":["wide","full"],"color":{"text":true,"gradients":true,"__experimentalDefaultControls":{"text":true,"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"blockGap":["horizontal","vertical"],"padding":true,"margin":["top","bottom"],"__experimentalDefaultControls":{"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}}},"usesContext":["vp/queryType","vp/baseQuery","vp/postsQuery","vp/imagesQuery"],"providesContext":{"visual-portfolio-filter-by-category/showCount":"showCount"},"styles":[{"name":"fill","label":"Fill"}],"attributes":{"showCount":{"type":"boolean","default":false}},"style":"visual-portfolio-block-filter-by-category","viewScript":"visual-portfolio-block-filter-by-category"}'),Md=window.wp.url;function Td(e){return Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Td(e)}function Ad(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var l=o&&o.prototype instanceof a?o:a,c=Object.create(l.prototype);return Ld(c,"_invoke",function(n,o,r){var i,a,l,c=0,u=r||[],p=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,a=0,l=e,h.n=n,s}};function d(n,o){for(a=n,l=o,t=0;!p&&c&&!r&&t<u.length;t++){var r,i=u[t],d=h.p,f=i[2];n>3?(r=f===o)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((r=n<2&&d<i[1])?(a=0,h.v=o,h.n=i[1]):d<f&&(r=n<3||i[0]>o||o>f)&&(i[4]=n,i[5]=o,h.n=f,a=0))}if(r||n>1)return s;throw p=!0,o}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(p&&1===u&&d(u,f),a=u,l=f;(t=a<2?e:l)||!p;){i||(a?a<3?(a>1&&(h.n=-1),d(a,l)):h.n=l:h.v=l);try{if(c=2,i){if(a||(r="next"),t=i[r]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=e}else if((t=(p=h.n<0)?l:n.call(o,h))!==s)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:p}}}(n,r,i),!0),c}var s={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][o]?t(t([][o]())):(Ld(t={},o,function(){return this}),t),p=c.prototype=a.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ld(e,r,"GeneratorFunction")),e.prototype=Object.create(p),e}return l.prototype=c,Ld(p,"constructor",c),Ld(c,"constructor",l),l.displayName="GeneratorFunction",Ld(c,r,"GeneratorFunction"),Ld(p),Ld(p,r,"Generator"),Ld(p,o,function(){return this}),Ld(p,"toString",function(){return"[object Generator]"}),(Ad=function(){return{w:i,m:h}})()}function Ld(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Ld=function(e,t,n,o){if(t)r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n;else{var i=function(t,n){Ld(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Ld(e,t,n,o)}function Rd(e){return function(e){if(Array.isArray(e))return Fd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jd(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Dd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Id(Object(n),!0).forEach(function(t){Pd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Id(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pd(e,t,n){return(t=function(e){var t=function(e){if("object"!=Td(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Td(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Td(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nd(e,t,n,o,r,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(o,r)}function jd(e,t){if(e){if("string"==typeof e)return Fd(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fd(e,t):void 0}}function Fd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function zd(e){return zd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zd(e)}function Bd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(n),!0).forEach(function(t){Hd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Hd(e,t,n){return(t=function(e){var t=function(e){if("object"!=zd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vd;function Ud(){return Ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ud.apply(null,arguments)}(0,a.registerBlockType)(Od.name,Wd(Wd({},Od),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(function(e){return h.createElement("svg",Ed({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),_d||(_d=h.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 7h16M7 12h10M10 17h4"})))},{width:"20",height:"20"})},edit:function(e){var t=e.attributes,n=e.setAttributes,o=e.context,r=e.clientId,i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||jd(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,O.useState)(!0),2),s=i[0],l=i[1],c=(0,O.useRef)(null),u=(0,O.useRef)(!1),p=o["vp/queryType"],h=o["vp/baseQuery"],d=o["vp/imagesQuery"],f=o["vp/postsQuery"],g=d.images,m=f.source,v=f.taxonomies,y=(null==h?void 0:h.perPage)||6,b=(0,Ie.useSelect)(function(e){var t;return{currentBlocks:e(E.store).getBlocks(r),hasInnerBlocks:e(E.store).getBlocks(r).length>0,selectedBlockClientId:e(E.store).getSelectedBlockClientId(),postId:null===(t=e("core/editor"))||void 0===t?void 0:t.getCurrentPostId()}},[r]),w=b.currentBlocks,x=b.hasInnerBlocks,S=b.selectedBlockClientId,C=b.postId,_=(0,Ie.useDispatch)(E.store),k=_.replaceInnerBlocks,$=_.selectBlock;(0,O.useEffect)(function(){var e=function(){var e={contentSource:p,postsSource:m,postsTaxonomies:v,images:g,postId:C};if(!c.current)return c.current=e,!0;var t=!(0,Ro.isEqual)(c.current,e);return t&&(c.current=e),t},t=function(){var t,n=(t=Ad().m(function t(){var n,o,i,s,c,h,d,f;return Ad().w(function(t){for(;;)switch(t.n){case 0:if(!x||u.current){t.n=1;break}return u.current=!0,l(!1),t.a(2);case 1:if(e()||!x){t.n=2;break}return l(!1),t.a(2);case 2:return l(!0),t.p=3,n={content_source:p,post_id:C,items_count:y},"posts"===p?n=Dd(Dd({},n),{},{posts_source:m,posts_taxonomies:v}):"images"===p&&(n=Dd(Dd({},n),{},{images:JSON.stringify(g)})),t.n=4,rd()({path:(0,Md.addQueryArgs)("/visual-portfolio/v1/get_filter_items/",n)});case 4:null!=(o=t.v)&&o.success&&(i=[],s=new Set,w.forEach(function(e){var t=e.attributes.filter,n=o.response.find(function(e){return e.filter===t});n&&(i.push(Dd(Dd({},e),{},{attributes:Dd(Dd({},e.attributes),{},{text:n.label,filter:n.filter,url:n.url,taxonomyId:n.id,parentId:n.parent,isActive:n.active,count:n.count||0})})),s.add(t))}),c=o.response.filter(function(e){return!s.has(e.filter)}).map(function(e){var t="*"===e.filter;return(0,a.createBlock)("visual-portfolio/filter-by-category-item",{text:t?(0,R.__)("All","visual-portfolio"):e.label,filter:e.filter,url:e.url,taxonomyId:e.id,parentId:e.parent,isActive:e.active,count:e.count||0})}),h=[].concat(i,Rd(c)),d=S,k(r,h,!1),d&&d!==r&&setTimeout(function(){$(d)},0)),t.n=6;break;case 5:t.p=5,f=t.v,console.error("Error fetching filter items:",f);case 6:l(!1);case 7:return t.a(2)}},t,null,[[3,5]])}),function(){var e=this,n=arguments;return new Promise(function(o,r){var i=t.apply(e,n);function s(e){Nd(i,o,r,s,a,"next",e)}function a(e){Nd(i,o,r,s,a,"throw",e)}s(void 0)})});return function(){return n.apply(this,arguments)}}();t()},[p,m,v,g,r,x,w,S,k,$,C,y,t.showCount]),(0,O.useEffect)(function(){if(x&&!s){var e=w.map(function(e){return Dd(Dd({},e),{},{attributes:Dd(Dd({},e.attributes),{},{__timestamp:Date.now()})})});k(r,e,!1)}},[t.showCount]);var M=(0,E.useBlockProps)({className:"vp-block-filter-by-category"}),T=(0,E.useInnerBlocksProps)(M,{orientation:"horizontal",renderAppender:!1,templateLock:!1});return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(E.InspectorControls,null,wp.element.createElement(A.PanelBody,null,wp.element.createElement(A.ToggleControl,{label:(0,R.__)("Display Count","visual-portfolio"),checked:t.showCount,onChange:function(){return n({showCount:!t.showCount})}}))),s?wp.element.createElement("div",M,wp.element.createElement(A.Spinner,null)):wp.element.createElement("div",T))},save:function(){return wp.element.createElement(E.InnerBlocks.Content,null)}}));const Gd=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/filter-by-category-item","title":"Filter by Category Item (Experimental)","category":"media","description":"Displays individual filter item. Block is experimental and will change in future releases. Please use with caution.","ancestor":["visual-portfolio/filter-by-category"],"textdomain":"visual-portfolio","usesContext":["visual-portfolio-filter-by-category/showCount"],"supports":{"lock":true,"html":false,"className":false,"anchor":true,"align":false,"alignWide":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"reusable":false,"spacing":{"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}}},"attributes":{"lock":{"type":"object","default":{"move":true,"remove":true}},"text":{"type":"string","default":""},"filter":{"type":"string","default":"*"},"isAll":{"type":"boolean","default":false},"url":{"type":"string","default":""},"taxonomyId":{"type":"number","default":0},"parentId":{"type":"number","default":0},"isActive":{"type":"boolean","default":false},"count":{"type":"number","default":0},"style":{"type":"object"}}}');function Kd(){return Kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Kd.apply(null,arguments)}function Yd(e){return Yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yd(e)}function qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Qd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qd(Object(n),!0).forEach(function(t){Xd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xd(e,t,n){return(t=function(e){var t=function(e){if("object"!=Yd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zd;function Jd(){return Jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Jd.apply(null,arguments)}(0,a.registerBlockType)("vp/filter-by-category-item",Qd(Qd({},Gd),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(function(e){return h.createElement("svg",Ud({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),Vd||(Vd=h.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 7h16M7 12h10M10 17h4"})))},{width:"20",height:"20"})},edit:function(e){var t=e.attributes,n=e.setAttributes,o=e.context,r=t.text,i=t.isActive,s=t.isAll,a=t.count,l=(null==o?void 0:o["visual-portfolio-filter-by-category/showCount"])||!1,c=(0,E.useBlockProps)({className:T()("vp-block-filter-by-category-item",{"is-active":i})});return wp.element.createElement("a",Kd({href:"#filter-pseudo-link",onClick:function(e){return e.preventDefault()}},c),wp.element.createElement(E.RichText,{tagName:"span",value:r,onChange:function(e){return n({text:e})},placeholder:(0,R.__)("Add category text…","visual-portfolio"),allowedFormats:[]}),l&&!s&&a>0&&wp.element.createElement("span",{className:"vp-block-filter-by-category-count"},a))},save:function(){return null}}));var ef=function(e){return h.createElement("svg",Jd({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),Zd||(Zd=h.createElement("path",{fill:"currentColor",d:"M4 13.5h6v-3H4zm8 0h3v-3h-3zm5-3v3h3v-3z"})))};const tf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/pagination","title":"Pagination Wrapper (Experimental)","category":"media","description":"Displays pagination wrapper which can include paged, load more and infinite scroll pagination. Block is experimental and will change in future releases. Please use with caution.","ancestor":["visual-portfolio/loop"],"allowedBlocks":["visual-portfolio/pagination-previous","visual-portfolio/pagination-numbers","visual-portfolio/pagination-next","visual-portfolio/pagination-load-more","visual-portfolio/pagination-infinite"],"textdomain":"visual-portfolio","supports":{"html":false,"className":false,"anchor":true,"align":["wide","full"],"color":{"text":true,"gradients":true,"__experimentalDefaultControls":{"text":true,"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"blockGap":["horizontal","vertical"],"padding":true,"margin":["top","bottom"],"__experimentalDefaultControls":{"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}}},"styles":[{"name":"fill","label":"Fill"}],"style":"visual-portfolio-block-pagination","viewScript":"visual-portfolio-block-pagination"}');var nf,of=["visual-portfolio/pagination-previous","visual-portfolio/pagination-numbers","visual-portfolio/pagination-next","visual-portfolio/pagination-load-more","visual-portfolio/pagination-infinite"];function rf(){return rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},rf.apply(null,arguments)}var sf,af,lf=function(e){return h.createElement("svg",rf({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),nf||(nf=h.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 5v4M15 12h4M12 15v4M5 12h4M16.95 7.05 14.12 9.88M14.121 14.121l2.829 2.829M9.879 14.121 7.05 16.95M7.05 7.05 9.88 9.88"})))};function cf(){return cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},cf.apply(null,arguments)}var uf=function(e){return h.createElement("svg",cf({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),sf||(sf=h.createElement("path",{fill:"currentColor",d:"M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2M5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8"})),af||(af=h.createElement("path",{fill:"currentColor",d:"M7 10.75h2v2H7zM11 10.75h2v2h-2zM15 10.75h2v2h-2z"})))};const pf=[{name:"paged",scope:["inserter","block"],title:(0,R.__)("Pagination Paged (Experimental)"),description:"Displays paged pagination for Gallery Loop. Block is experimental and will change in future releases. Please use with caution.",attributes:{layout:{type:"flex",justifyContent:"space-between"}},innerBlocks:[["visual-portfolio/pagination-previous"],["visual-portfolio/pagination-numbers"],["visual-portfolio/pagination-next"]],icon:{foreground:"#2540CC",src:wp.element.createElement(ef,{width:"20",height:"20"})}},{name:"load-more",scope:["inserter","block"],title:(0,R.__)("Pagination Load More (Experimental)"),description:"Displays a load more button for pagination. Block is experimental and will change in future releases. Please use with caution.",attributes:{layout:{type:"flex",justifyContent:"center"}},innerBlocks:[["visual-portfolio/pagination-load-more"]],icon:{foreground:"#2540CC",src:wp.element.createElement(uf,{width:"20",height:"20"})}},{name:"infinite",scope:["inserter","block"],title:(0,R.__)("Pagination Infinite (Experimental)"),description:"Displays a infinite scroll pagination. Block is experimental and will change in future releases. Please use with caution.",attributes:{layout:{type:"flex",justifyContent:"center"}},innerBlocks:[["visual-portfolio/pagination-infinite"]],icon:{foreground:"#2540CC",src:wp.element.createElement(lf,{width:"20",height:"20"})}}];function hf(e){return hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hf(e)}function df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ff(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?df(Object(n),!0).forEach(function(t){gf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gf(e,t,n){return(t=function(e){var t=function(e){if("object"!=hf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,a.registerBlockType)(tf.name,ff(ff({},tf),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(ef,{width:"20",height:"20"})},edit:function(){var e=(0,E.useBlockProps)({className:"vp-block-pagination"}),t=(0,E.useInnerBlocksProps)(e,{allowedBlocks:of,orientation:"horizontal"});return wp.element.createElement("div",t)},save:function(){return wp.element.createElement(E.InnerBlocks.Content,null)},variations:pf}));const mf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/pagination-infinite","title":"Infinite","description":"Displays a infinite scroll trigger for pagination.","category":"media","ancestor":["visual-portfolio/pagination"],"textdomain":"visual-portfolio","usesContext":["vp/queryType","vp/baseQuery","vp/postsQuery","vp/imagesQuery"],"attributes":{"label":{"type":"string"},"loadingLabel":{"type":"string"}},"supports":{"reusable":false,"html":false,"className":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}}}}');function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},vf.apply(null,arguments)}function yf(e){return yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yf(e)}function bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function wf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bf(Object(n),!0).forEach(function(t){xf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xf(e,t,n){return(t=function(e){var t=function(e){if("object"!=yf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,a.registerBlockType)(mf.name,wf(wf({},mf),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(lf,{width:"20",height:"20"})},variations:pf,edit:function(e){var t=e.attributes,n=e.setAttributes,o=t.label;return wp.element.createElement("a",vf({href:"#pagination-load-more-pseudo-link",onClick:function(e){return e.preventDefault()}},(0,E.useBlockProps)({className:"vp-block-pagination-infinite"})),wp.element.createElement(E.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,R.__)("Load more link","visual-portfolio"),placeholder:(0,R.__)("Load More","visual-portfolio"),value:o,onChange:function(e){return n({label:e})}}))}}));const Sf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/pagination-load-more","title":"Load More","description":"Displays a load more button for pagination.","category":"media","ancestor":["visual-portfolio/pagination"],"textdomain":"visual-portfolio","usesContext":["vp/queryType","vp/baseQuery","vp/postsQuery","vp/imagesQuery"],"attributes":{"label":{"type":"string"},"loadingLabel":{"type":"string"}},"supports":{"reusable":false,"html":false,"className":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}}}}');function Cf(){return Cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Cf.apply(null,arguments)}function _f(e){return _f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_f(e)}function kf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function $f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kf(Object(n),!0).forEach(function(t){Ef(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ef(e,t,n){return(t=function(e){var t=function(e){if("object"!=_f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Of;function Mf(){return Mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Mf.apply(null,arguments)}(0,a.registerBlockType)(Sf.name,$f($f({},Sf),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(uf,{width:"20",height:"20"})},variations:pf,edit:function(e){var t=e.attributes,n=e.setAttributes,o=t.label;return wp.element.createElement("a",Cf({href:"#pagination-load-more-pseudo-link",onClick:function(e){return e.preventDefault()}},(0,E.useBlockProps)({className:"vp-block-pagination-load-more"})),wp.element.createElement(E.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,R.__)("Load more link","visual-portfolio"),placeholder:(0,R.__)("Load More","visual-portfolio"),value:o,onChange:function(e){return n({label:e})}}))}}));const Tf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/pagination-next","title":"Next","category":"media","ancestor":["visual-portfolio/pagination"],"description":"Displays the next page link.","textdomain":"visual-portfolio","usesContext":["vp/queryType","vp/baseQuery","vp/postsQuery","vp/imagesQuery"],"attributes":{"label":{"type":"string"},"showLabel":{"type":"boolean","default":true},"showArrow":{"type":"boolean","default":true}},"supports":{"reusable":false,"html":false,"className":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}}}}');function Af(){return Af=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Af.apply(null,arguments)}function Lf(e){return Lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lf(e)}function Rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function If(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rf(Object(n),!0).forEach(function(t){Df(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Df(e,t,n){return(t=function(e){var t=function(e){if("object"!=Lf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pf;function Nf(){return Nf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Nf.apply(null,arguments)}(0,a.registerBlockType)(Tf.name,If(If({},Tf),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(function(e){return h.createElement("svg",Mf({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),Of||(Of=h.createElement("path",{fill:"currentColor",d:"M5 13.5h3v-3H5zm5 0h3v-3h-3zM17 9l-1 1 2 2-2 2 1 1 3-3z"})))},{width:"20",height:"20"})},edit:function(e){var t=e.attributes,n=e.setAttributes,o=t.label,r=t.showLabel,i=t.showArrow;return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(E.InspectorControls,null,wp.element.createElement(A.PanelBody,null,wp.element.createElement(A.ToggleControl,{label:(0,R.__)("Show label text","visual-portfolio"),checked:r,onChange:function(){return n({showLabel:!r})},disabled:!i&&r}),wp.element.createElement(A.ToggleControl,{label:(0,R.__)("Show arrow","visual-portfolio"),checked:i,onChange:function(){return n({showArrow:!i})},disabled:!r&&i}))),wp.element.createElement("a",Af({href:"#pagination-next-pseudo-link",onClick:function(e){return e.preventDefault()}},(0,E.useBlockProps)({className:"vp-block-pagination-next"})),r&&wp.element.createElement(E.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,R.__)("Next page link","visual-portfolio"),placeholder:(0,R.__)("Next","visual-portfolio"),value:o,onChange:function(e){return n({label:e})}}),i&&wp.element.createElement("span",{className:"vp-block-pagination-next-arrow","aria-hidden":!0},"›")))}}));const jf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/pagination-numbers","title":"Numbers","category":"media","ancestor":["visual-portfolio/pagination"],"description":"Displays page numbers for pagination.","textdomain":"visual-portfolio","usesContext":["vp/queryType","vp/baseQuery","vp/postsQuery","vp/imagesQuery"],"attributes":{"midSize":{"type":"number","default":2}},"supports":{"reusable":false,"html":false,"className":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}}}}');var Ff,zf=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"a",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return wp.element.createElement(t,{key:e,className:n},e)};function Bf(e){return Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bf(e)}function Wf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Hf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wf(Object(n),!0).forEach(function(t){Vf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vf(e,t,n){return(t=function(e){var t=function(e){if("object"!=Bf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Bf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uf(){return Uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Uf.apply(null,arguments)}(0,a.registerBlockType)(jf.name,Hf(Hf({},jf),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(function(e){return h.createElement("svg",Nf({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),Pf||(Pf=h.createElement("path",{fill:"currentColor",d:"M4 13.5h6v-3H4zm8.2-2.5.8-.3V14h1V9.3l-2.2.7zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5s.6 0 .7.1c.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1"})))},{width:"20",height:"20"})},edit:function(e){var t=e.attributes,n=e.setAttributes,o=e.context,r=t.midSize,i=o["vp/baseQuery"],s=(null==i?void 0:i.maxPages)||1,a=function(e,t){for(var n=[],o=1;o<=e;o++)n.push(zf(o));n.push(zf(e+1,"span","is-active"));for(var r=1;r<=e;r++)n.push(zf(e+1+r));return n.push(zf("...","span","vp-block-pagination-dots")),n.push(zf(t)),wp.element.createElement(wp.element.Fragment,null,n)}(parseInt(r,10),Math.max(s,2*r+3));return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(E.InspectorControls,null,wp.element.createElement(A.PanelBody,null,wp.element.createElement(A.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,R.__)("Number of links"),help:(0,R.__)("Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."),value:r,onChange:function(e){n({midSize:parseInt(e,10)})},min:0,max:5,withInputField:!1}))),wp.element.createElement("div",(0,E.useBlockProps)({className:"vp-block-pagination-numbers"}),a))}}));const Gf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/pagination-previous","title":"Previous","category":"media","ancestor":["visual-portfolio/pagination"],"description":"Displays the previous page link.","textdomain":"visual-portfolio","usesContext":["vp/queryType","vp/baseQuery","vp/postsQuery","vp/imagesQuery"],"attributes":{"label":{"type":"string"},"showLabel":{"type":"boolean","default":true},"showArrow":{"type":"boolean","default":true}},"supports":{"reusable":false,"html":false,"className":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}}}}');function Kf(){return Kf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Kf.apply(null,arguments)}function Yf(e){return Yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yf(e)}function qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Qf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qf(Object(n),!0).forEach(function(t){Xf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xf(e,t,n){return(t=function(e){var t=function(e){if("object"!=Yf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zf;function Jf(){return Jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Jf.apply(null,arguments)}(0,a.registerBlockType)(Gf.name,Qf(Qf({},Gf),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(function(e){return h.createElement("svg",Uf({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),Ff||(Ff=h.createElement("path",{fill:"currentColor",d:"M16 10.5v3h3v-3zm-5 3h3v-3h-3zM7 9l-3 3 3 3 1-1-2-2 2-2z"})))},{width:"20",height:"20"})},edit:function(e){var t=e.attributes,n=e.setAttributes,o=t.label,r=t.showLabel,i=t.showArrow;return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(E.InspectorControls,null,wp.element.createElement(A.PanelBody,null,wp.element.createElement(A.ToggleControl,{label:(0,R.__)("Show label text","visual-portfolio"),checked:r,onChange:function(){return n({showLabel:!r})},disabled:!i&&r}),wp.element.createElement(A.ToggleControl,{label:(0,R.__)("Show arrow","visual-portfolio"),checked:i,onChange:function(){return n({showArrow:!i})},disabled:!r&&i}))),wp.element.createElement("a",Kf({href:"#pagination-previous-pseudo-link",onClick:function(e){return e.preventDefault()}},(0,E.useBlockProps)({className:"vp-block-pagination-previous"})),i&&wp.element.createElement("span",{className:"vp-block-pagination-previous-arrow","aria-hidden":!0},"‹"),r&&wp.element.createElement(E.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,R.__)("Previous page link","visual-portfolio"),placeholder:(0,R.__)("Previous","visual-portfolio"),value:o,onChange:function(e){return n({label:e})}})))}}));const eg=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"visual-portfolio/sort","title":"Sort (Experimental)","description":"Displays sort options for Gallery Loop. Block is experimental and will change in future releases. Please use with caution.","category":"media","ancestor":["visual-portfolio/loop"],"textdomain":"visual-portfolio","supports":{"html":false,"className":false,"anchor":true,"color":{"text":true,"gradients":true,"__experimentalDefaultControls":{"text":true,"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"padding":true,"margin":["top","bottom"]}},"style":"visual-portfolio-block-sort","viewScript":"visual-portfolio-block-sort"}');function tg(e){return tg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tg(e)}function ng(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function og(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ng(Object(n),!0).forEach(function(t){rg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ng(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rg(e,t,n){return(t=function(e){var t=function(e){if("object"!=tg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,a.registerBlockType)(eg.name,og(og({},eg),{},{icon:{foreground:"#2540CC",src:wp.element.createElement(function(e){return h.createElement("svg",Jf({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),Zf||(Zf=h.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 17h14M4 12h10M4 7h4"})))},{width:"20",height:"20"})},edit:function(){return wp.element.createElement("div",(0,E.useBlockProps)({className:"vp-block-sort"}),wp.element.createElement(A.Disabled,null,wp.element.createElement("select",null,wp.element.createElement("option",null,(0,R.__)("Default sorting","visual-portfolio")))))}}));var ig=n(4217);const sg=window.wp.compose;function ag(e){return ag="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ag(e)}function lg(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,cg(o.key),o)}}function cg(e){var t=function(e){if("object"!=ag(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ag(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ag(t)?t:t+""}function ug(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ug=function(){return!!e})()}function pg(e){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pg(e)}function hg(e,t){return hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hg(e,t)}var dg={},fg=(0,sg.createHigherOrderComponent)(function(e){var t=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];var i=(e=function(e,t,n){return t=pg(t),function(e,t){if(t&&("object"==ag(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ug()?Reflect.construct(t,n||[],pg(e).constructor):t.apply(e,n))}(this,n,[].concat(o))).props,s=i.attributes,a=i.clientId;return a&&s.block_id&&void 0===dg[s.block_id]&&(dg[s.block_id]=a),e.maybeCreateBlockId=e.maybeCreateBlockId.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hg(e,t)}(n,t),function(e,t){return t&&lg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentDidMount",value:function(){this.maybeCreateBlockId()}},{key:"componentDidUpdate",value:function(){this.maybeCreateBlockId()}},{key:"maybeCreateBlockId",value:function(){if("visual-portfolio/block"===this.props.blockName){var e=this.props,t=e.setAttributes,n=e.attributes,o=e.clientId,r=n.block_id;if(!r||dg[r]!==o){for(var i="",s=10;!i||void 0!==dg[i]&&dg[i]!==o&&s>0;)i=ig.unique(o),s-=1;i&&void 0===dg[i]&&(dg[i]=o),i!==r&&t({block_id:i})}}}},{key:"render",value:function(){return wp.element.createElement(e,this.props)}}])}(O.Component);return(0,Ie.withSelect)(function(e,t){return{blockName:t.name}})(t)},"withUniqueBlockId");(0,L.addFilter)("editor.BlockEdit","vpf/editor/unique-block-id",fg),(0,L.addFilter)("vpf.editor.controls-on-change","vpf/editor/controls-on-change/classic-icon-with-overlay",function(e,t,n,o){return"items_style_default__show_icon"===t.name&&n&&!o.items_style_default__bg_color&&(e.items_style_default__bg_color="#000",e.items_style_default__text_color="#fff"),e});var gg=["className"];function mg(){return mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},mg.apply(null,arguments)}function vg(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,gg);return wp.element.createElement(A.Notice,mg({className:T()("vpf-component-notice",t)},n))}function yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var bg=window.VPGutenbergVariables,wg=parseInt(bg.items_count_notice_limit,10),xg=wg+5;function Sg(){return bg.items_count_notice}var Cg=Yc(3e3,function(e){rd()({path:"/visual-portfolio/v1/update_gallery_items_count_notice_state",method:"POST",data:{notice_state:Sg(),post_id:e}})});function _g(e){var t="hide"===Sg()?"show":"hide";bg.items_count_notice=t,Cg(e)}function kg(e){var t=e.onToggle,n=e.postId;return wp.element.createElement(vg,{status:"warning",isDismissible:!1},wp.element.createElement("p",{dangerouslySetInnerHTML:{__html:(0,R.__)("Using large galleries may <u>decrease page loading speed</u>. We recommend you add these improvements:","visual-portfolio")}}),wp.element.createElement("ol",{className:"ol-decimal"},wp.element.createElement("li",{dangerouslySetInnerHTML:{__html:(0,R.sprintf)((0,R.__)("Set the items per page to <u>less than %d</u>","visual-portfolio"),wg)}}),wp.element.createElement("li",{dangerouslySetInnerHTML:{__html:(0,R.__)("Add <em>`Load More`</em> or <em>`Infinite Scroll`</em> pagination for best results.","visual-portfolio")}})),wp.element.createElement("p",null,wp.element.createElement(A.Button,{isLink:!0,onClick:function(){_g(n),t()}},(0,R.__)("Ok, I understand","visual-portfolio"))))}function $g(e,t){var n;return"images"===t.content_source?(null==t||null===(n=t.images)||void 0===n?void 0:n.length)>xg&&(e>xg||-1===e):e>xg||-1===e}function Eg(e){var t=e.data,n=t.description,o=t.attributes,r=t.onChange,i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yg(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yg(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,O.useState)(1),2),s=i[0],a=i[1],l=(0,Ie.useSelect)(function(e){var t;return{postId:(null===(t=e("core/editor"))||void 0===t?void 0:t.getCurrentPostId())||!1}},[]).postId,c=!!n&&wp.element.createElement(O.RawHTML,null,n),u=T()("vpf-control-wrap","vpf-control-wrap-".concat(t.type)),p=parseInt(I(t.name,o),10);return wp.element.createElement(A.BaseControl,{id:"vpf-control-items-count-all",label:wp.element.createElement(wp.element.Fragment,null,t.label,"hide"===Sg()&&$g(p,o)?wp.element.createElement(A.Button,{onClick:function(){_g(l),a(s+1)},style:{position:"absolute",marginTop:"-5px",padding:"0 4px",color:"#cd7a0f"}},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 24 24",fill:"red"},wp.element.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z",fill:"currentColor"}))):null),help:c,className:u,__nextHasNoMarginBottom:!0},wp.element.createElement("div",null,wp.element.createElement(A.ButtonGroup,null,wp.element.createElement(A.Button,{variant:-1!==p?"primary":"",isPressed:-1!==p,onClick:function(){-1===p&&r(parseFloat(t.default||6))}},(0,R.__)("Custom Count","visual-portfolio")),wp.element.createElement(A.Button,{variant:-1===p?"primary":"",isPressed:-1===p,onClick:function(){-1!==p&&window.confirm((0,R.__)("Be careful, the output of all your items can adversely affect the performance of your site, this option may be helpful for image galleries.","visual-portfolio"))&&r(-1)}},(0,R.__)("All Items","visual-portfolio")))),-1!==p?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("br",null),wp.element.createElement(A.TextControl,{type:"number",min:t.min,max:t.max,step:t.step,value:p,onChange:function(e){return r(parseFloat(e))},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})):null,"show"===Sg()&&$g(p,o)?wp.element.createElement("div",null,wp.element.createElement(kg,{postId:l,onToggle:function(){a(s+1)}})):null)}(0,L.addFilter)("vpf.editor.controls-render","vpf/editor/controls-render/customize-controls",function(e,t){return"items_count"!==t.name?e:wp.element.createElement(Eg,{key:"control-".concat(t.name,"-").concat(t.label),data:t})});var Og="noopener noreferrer";function Mg(e){return Mg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mg(e)}function Tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ag(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tg(Object(n),!0).forEach(function(t){Lg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lg(e,t,n){return(t=function(e){var t=function(e){if("object"!=Mg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rg(e){return{type:"API_FETCH",request:e}}function Ig(e){return{type:"SET_PORTFOLIO_LAYOUTS",layouts:e}}function Dg(e){var t=e.request;return rd()(t).catch(function(e){return!(!e||!e.error||"no_layouts_found"!==e.error_code)&&{response:[],error:!1,success:!0}}).then(function(e){return!!(e&&e.success&&e.response)&&e.response})}(0,L.addFilter)("vpf.editor.controls-on-change","vpf/editor/controls-on-change/link-rel",function(e,t,n,o){return"items_click_action_url_target"===t.name&&("_blank"!==n||o.items_click_action_url_rel||(e.items_click_action_url_rel=Og),"_blank"!==n&&Og===o.items_click_action_url_rel&&(e.items_click_action_url_rel="")),e}),(0,L.addFilter)("vpf.editor.controls-render-data","vpf/editor/controls-render-data/customize-controls",function(e){return"stretch"!==e.name||window.VPSavedLayoutVariables||(e=Ag(Ag({},e),{},{skip:!0})),e});function Pg(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var l=o&&o.prototype instanceof a?o:a,c=Object.create(l.prototype);return Ng(c,"_invoke",function(n,o,r){var i,a,l,c=0,u=r||[],p=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,a=0,l=e,h.n=n,s}};function d(n,o){for(a=n,l=o,t=0;!p&&c&&!r&&t<u.length;t++){var r,i=u[t],d=h.p,f=i[2];n>3?(r=f===o)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((r=n<2&&d<i[1])?(a=0,h.v=o,h.n=i[1]):d<f&&(r=n<3||i[0]>o||o>f)&&(i[4]=n,i[5]=o,h.n=f,a=0))}if(r||n>1)return s;throw p=!0,o}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(p&&1===u&&d(u,f),a=u,l=f;(t=a<2?e:l)||!p;){i||(a?a<3?(a>1&&(h.n=-1),d(a,l)):h.n=l:h.v=l);try{if(c=2,i){if(a||(r="next"),t=i[r]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=e}else if((t=(p=h.n<0)?l:n.call(o,h))!==s)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:p}}}(n,r,i),!0),c}var s={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][o]?t(t([][o]())):(Ng(t={},o,function(){return this}),t),p=c.prototype=a.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ng(e,r,"GeneratorFunction")),e.prototype=Object.create(p),e}return l.prototype=c,Ng(p,"constructor",c),Ng(c,"constructor",l),l.displayName="GeneratorFunction",Ng(c,r,"GeneratorFunction"),Ng(p),Ng(p,r,"Generator"),Ng(p,o,function(){return this}),Ng(p,"toString",function(){return"[object Generator]"}),(Pg=function(){return{w:i,m:h}})()}function Ng(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Ng=function(e,t,n,o){if(t)r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n;else{var i=function(t,n){Ng(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},Ng(e,t,n,o)}var jg=Pg().m(Fg);function Fg(){var e;return Pg().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Rg({path:"/visual-portfolio/v1/get_layouts/"});case 1:return e=t.v,t.a(2,Ig(e))}},jg)}function zg(e){return e.layouts}var Bg=(0,Ie.createReduxStore)("visual-portfolio",{selectors:r,actions:e,controls:t,resolvers:o,reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{layouts:[]},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"SET_PORTFOLIO_LAYOUTS"===t.type?(!e.layouts.length&&t.layouts&&t.layouts.length&&(e.layouts=t.layouts),e):e}});function Wg(e){return Wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wg(e)}function Hg(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Vg(o.key),o)}}function Vg(e){var t=function(e){if("object"!=Wg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Wg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wg(t)?t:t+""}function Ug(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ug=function(){return!!e})()}function Gg(e){return Gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gg(e)}function Kg(e,t){return Kg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kg(e,t)}(0,Ie.register)(Bg);var Yg=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Gg(t),function(e,t){if(t&&("object"==Wg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ug()?Reflect.construct(t,n||[],Gg(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kg(e,t)}(t,e),function(e,t){return t&&Hg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return wp.element.createElement("div",{className:"vpf-component-spinner"},wp.element.createElement(A.Spinner,null))}}])}(O.Component);function qg(){return{ClassesTree:Ce,ColorPicker:De,ControlsRender:_p,VPDatePicker:He,ElementsSelector:it,IconsSelector:br,VpfSelectControl:gu,SpinnerComponent:Yg,ToggleModal:Gu}}var Qg=(0,Ie.createReduxStore)("visual-portfolio/components",{selectors:i,reducer:function(e){return e}});function Xg(){return{conditionCheck:P,controlGetValue:I,prepareStylesFromParams:Ip,hasDynamicCSS:Dp,getDynamicCSS:Pp,maybeEncode:X,maybeDecode:Z}}(0,Ie.register)(Qg);var Zg=(0,Ie.createReduxStore)("visual-portfolio/utils",{selectors:s,reducer:function(e){return e}});(0,Ie.register)(Zg);var Jg=window.VPGutenbergVariables.plugin_name;(0,a.registerBlockCollection)("visual-portfolio",{title:Jg,icon:wp.element.createElement(Gh,{width:"20",height:"20"})})})()})();