From 53ad47a53e4b3f69a4540d332095b0862f4f5391 Mon Sep 17 00:00:00 2001 From: lehieulol <42810931+lehieulol@users.noreply.github.com> Date: Tue, 21 Jan 2020 04:28:40 +0700 Subject: [PATCH 1/4] update --- package-lock.json | 184 +++++++++++++-- package.json | 1 + src/Components/customEditor/customEditor.js | 239 ++++++++++++++++++-- src/Components/toolbar/toolbar.js | 138 +++++++++-- 4 files changed, 501 insertions(+), 61 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83b3fcf..11eb9ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2867,7 +2867,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2885,11 +2886,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2902,15 +2905,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3013,7 +3019,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3023,6 +3030,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3035,17 +3043,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3062,6 +3073,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3134,7 +3146,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3144,6 +3157,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3219,7 +3233,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3249,6 +3264,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3266,6 +3282,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3304,11 +3321,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -5974,6 +5993,11 @@ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==" + }, "gzip-size": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", @@ -6122,6 +6146,19 @@ "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==" }, + "history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "requires": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" + } + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -6132,6 +6169,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-wbg3bpgA/ZqWrZuMOeJi8+SKMhr7X9TesL/rXMjTzh0p0JUBo3II8DHboYbuIXWRlttrUFxwcu/5kygrCw8fJw==", + "requires": { + "react-is": "^16.7.0" + } + }, "hosted-git-info": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", @@ -7050,7 +7095,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -7068,11 +7114,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7085,15 +7133,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -7196,7 +7247,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -7206,6 +7258,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7218,17 +7271,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7245,6 +7301,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -7317,7 +7374,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -7327,6 +7385,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -7402,7 +7461,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -7432,6 +7492,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7449,6 +7510,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7487,11 +7549,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } } @@ -8382,6 +8446,16 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, + "mini-create-react-context": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz", + "integrity": "sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw==", + "requires": { + "@babel/runtime": "^7.4.0", + "gud": "^1.0.0", + "tiny-warning": "^1.0.2" + } + }, "mini-css-extract-plugin": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.0.tgz", @@ -10644,6 +10718,52 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" }, + "react-router": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.1.2.tgz", + "integrity": "sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A==", + "requires": { + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", + "hoist-non-react-statics": "^3.1.0", + "loose-envify": "^1.3.1", + "mini-create-react-context": "^0.3.0", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.2", + "react-is": "^16.6.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "requires": { + "isarray": "0.0.1" + } + } + } + }, + "react-router-dom": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.1.2.tgz", + "integrity": "sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew==", + "requires": { + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.1.2", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + } + }, "react-scripts": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.2.0.tgz", @@ -11039,6 +11159,11 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" }, + "resolve-pathname": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -12351,6 +12476,16 @@ "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=" }, + "tiny-invariant": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.0.6.tgz", + "integrity": "sha512-FOyLWWVjG+aC0UqG76V53yAWdXfH8bO6FNmyZOuUrzDzK8DI3/JRY25UD7+g49JWM1LXwymsKERB+DzI0dTEQA==" + }, + "tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -12757,6 +12892,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/package.json b/package.json index ce7c62e..02405d1 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "react-ace": "^8.0.0", "react-dom": "^16.12.0", "react-filepond": "^7.0.1", + "react-router-dom": "^5.1.2", "react-scripts": "3.2.0" }, "scripts": { diff --git a/src/Components/customEditor/customEditor.js b/src/Components/customEditor/customEditor.js index caee3df..0ba33a4 100644 --- a/src/Components/customEditor/customEditor.js +++ b/src/Components/customEditor/customEditor.js @@ -3,6 +3,10 @@ import AceEditor from 'react-ace'; import "ace-builds/src-min-noconflict/ext-language_tools"; import "ace-builds/src-noconflict/mode-javascript"; import "ace-builds/src-noconflict/snippets/javascript"; +import "ace-builds/src-noconflict/mode-html"; +import "ace-builds/src-noconflict/snippets/html"; +import "ace-builds/src-noconflict/mode-css"; +import "ace-builds/src-noconflict/snippets/css"; import "ace-builds/src-noconflict/theme-monokai"; import "ace-builds/src-noconflict/ext-emmet"; import './editor.css'; @@ -10,60 +14,251 @@ import Toolbar from '../toolbar/toolbar'; import FileSaver from 'file-saver'; export default class CustomEditor extends Component { - + bS = (a) => { + return { + height: "30vh", + width: "2vw", + top: ""+(a*30)+"vh", + position: "absolute", "zIndex": -1, + } + } + styl(a, b){ + return{ + height: ""+b+"vh", + width: ""+(a-1)+"vw", + padding: "0", + margin: "0", + border: "0px solid black", + backgroundColor: "#888888", + borderLeftWidth: "1vw", + borderTopWidth: "1vh", + textAlign: "left", + } + } aceRef = null - + reff = [] + width= ['60vw','38vw','38vw','38vw'] + height= ['86vh','26vh','26vh','26vh'] constructor() { super() this.state = { isModalOpen: false, - fileName: '', - fileType: 'text/javascript' + fileName: ["new.txt","new.txt","new.txt","new.txt"], + fileType: ['text/javascript','text/javascript','text/javascript','text/javascript'], + mode: ["javascript","javascript","javascript","javascript"], + value: ["","","",""], } + this.reff = [React.createRef(),React.createRef(),React.createRef(),React.createRef()] } componentDidMount() { - this.aceRef = this.refs.aceEditor; + } onFileUpload = (file) => { - const fileName = file.name; - const fileType = file.type; + let fileName = this.state.fileName.slice(); fileName[0] = file.name; + const fileType = this.state.fileType.slice(); fileType[0] = file.type; this.setState({ fileName, fileType }); const reader = new FileReader(); reader.onload = (e) => { - this.aceRef = this.refs.aceEditor; - this.aceRef.editor.setValue(e.target.result); + let value = this.state.value; + value[0] = e.target.result + this.setState({value}); } reader.readAsText(file, "UTF-8"); } onFileDownload = () => { - const file = new File([this.aceRef.editor.getValue()], this.state.fileName, {type: this.state.fileType+";charset=utf-8"}); + const file = new File([this.state.value], this.state.fileName[0], {type: this.state.fileType[0]+";charset=utf-8"}); FileSaver.saveAs(file); } - + + swape(ax,ay){ + let fileName = this.state.fileName.slice(); [fileName[ax],fileName[ay]]=[fileName[ay],fileName[ax]]; + let fileType = this.state.fileType.slice(); [fileType[ax],fileType[ay]]=[fileType[ay],fileType[ax]]; + let value = this.state.value.slice(); [value[ax],value[ay]]=[value[ay],value[ax]]; + let mode = this.state.mode.slice(); [mode[ax],mode[ay]]=[mode[ay],mode[ax]]; + this.setState({fileName,fileType,mode,value}); + } + + onChange(x){ + return ((newValue)=>{let value = this.state.value.slice(); value[x] = newValue; this.setState({value});}) + } + + functidy = () => { + alert("Not completed yet"); + /* + let q = [], val, re = '', spec = false; + let value = this.state.value.slice(); + let code = value[0]; + for(let i = 0; i < code.length; i++){ + console.log('\''+code[i]+'\''); + } + for(let i = 0; i < code.length; i++){ + if(spec === true && code[i] !== '\n' && code[i] !== ''){ + re += '\n'; + for(let x = 0; x < val; x++){ + re += '\t'; + } + } + re += code[i]; + if(code[i] === '\n'){ + for(let x = 0; x < val; x++){ + re += '\t'; + } + } + if(code[i] === '{' ||code[i] === '['){ + q.push(code[i]); + val++; + spec = true; + }else if(code[i] === '}'){ + while (q.length > 0 && q[q.length-1] !== '{'){ + val--; + } + spec = false; + }else if(code[i] === ']'){ + while (q.length > 0 && q[q.length-1] !== '['){ + val--; + } + spec = false; + }else{ + spec = false; + } + + } + console.log(re); + //value[0] = re; + //this.setState({value}); + */ + } + render() { return ( - + {let fileName = this.state.fileName.slice(); fileName[0] = a; this.setState({fileName});}} setMode = {(a) => {let mode = this.state.mode.slice(); mode[0] = a; this.setState({mode}); console.log(mode, this.state.mode);}} functidy = {this.functidy}/> +
+

{this.state.fileName[0]}

{ this.onFileDownload()} //function to execute when keys are pressed. + } + ]} + */ + /> +
+
+

{this.state.fileName[1]}

+ { this.onFileDownload()} //function to execute when keys are pressed. + } + ]} + */ + /> +

{this.state.fileName[2]}

+ { this.onFileDownload()} //function to execute when keys are pressed. + } + ]} + */ + /> +

{this.state.fileName[3]}

+ { this.onFileDownload()} //function to execute when keys are pressed. } ]} + */ /> +
+
+ + + +
) } diff --git a/src/Components/toolbar/toolbar.js b/src/Components/toolbar/toolbar.js index 060c1a9..d06aa7b 100644 --- a/src/Components/toolbar/toolbar.js +++ b/src/Components/toolbar/toolbar.js @@ -5,7 +5,7 @@ import { initializeIcons } from 'office-ui-fabric-react/lib/Icons'; import React, { Component } from 'react'; import { FilePond } from 'react-filepond'; import './toolbar.css'; - +import 'ace-builds/src-min-noconflict/ext-searchbox'; //icons for fabric ui initializeIcons(); @@ -49,37 +49,132 @@ const contentStyles = mergeStyleSets({ export default class Toolbar extends Component { - state = { + newModal: false, isModalOpen: false, fileUploaded: false, files: [], - fileCount: 0 + fileCount: 0, + op: 0, + redic: '', } handleUpload = () => { this.setState({isModalOpen: true}) } - closeModal = () => { this.setState({isModalOpen: false}) } - - items = [ - { - key: 'upload', - text: 'Upload', - iconProps: { iconName: 'Upload' }, - onClick: this.handleUpload - }, - { - key: 'download', - text: 'Download', - iconProps: { iconName: 'Download' }, - onClick: () => this.props.onFileDownload() - } - ]; - + + items = [ + { + key: 'file', + text: 'File', + iconProps: { iconName: "Page" }, + subMenuProps: { + items: [ + { + key: 'upload', + text: 'Open', + iconProps: { iconName: 'Folder' }, + onClick: this.handleUpload, + }, + { + key: 'download', + text: 'Download', + iconProps: { iconName: 'Download' }, + onClick: () => this.props.onFileDownload() + }, + { + key: 'new', + text: 'Change file name', + iconProps: { iconName: 'Add' }, + onClick: () => {console.log("X");let name = window.prompt("Enter the file name:", "new.txt"); if(name === null || name === ""){}else{this.props.make(name)};}, + }, + ] + } + }, + { + key: 'edit', + text: 'Edit', + iconProps: { iconName: 'Edit' }, + subMenuProps: { + items: [ + { + key: 'tidy', + text: 'Tidy code', + subMenuProps: { + items: [ + { + key: 'tidyjs', + text: 'Javascript', + onClick: () => {console.log("?"); this.props.functidy()}, + }, + ] + } + }, + { + key: 'mode', + text: 'Mode', + subMenuProps: { + items: [ + { + key: 'mhtml', + text: 'Html', + onClick: () => this.props.setMode('html'), + }, + { + key: 'mcss', + text: 'Css', + onClick: () => this.props.setMode('css'), + }, + { + key: 'mjs', + text: 'Javascript', + onClick: () => this.props.setMode('javascript'), + }, + ] + } + }, + ] + } + }, + { + key: 'help', + text: 'Help', + iconProps: { iconName: 'Help' }, + subMenuProps: { + items: [ + { + key: 'html', + text: 'HTML', + onClick: ()=> window.open("https://www.w3schools.com/html/default.asp", "_blank"), + }, + { + key: 'css', + text: 'CSS', + onClick: ()=> window.open("https://www.w3schools.com/css/default.asp", "_blank"), + }, + { + key: 'javascript', + text: 'JAVASCRIPT', + onClick: ()=> window.open("https://www.w3schools.com/js/default.asp", "_blank"), + }, + { + key: 'react', + text: 'REACT.JS', + onClick: ()=> window.open("https://reactjs.org/tutorial/tutorial.html", "_blank"), + }, + { + key: 'react reference', + text: 'React Reference', + onClick: ()=> window.open("https://www.npmjs.com","_blank"), + } + ] + } + }, + ]; + farItems = [ { key: 'info', @@ -97,6 +192,7 @@ export default class Toolbar extends Component { return (
+
{this.state.redic}
Date: Tue, 21 Jan 2020 04:52:15 +0700 Subject: [PATCH 2/4] Add files via upload --- README.md | 50 +- build/asset-manifest.json | 24 + build/favicon.ico | Bin 0 -> 22382 bytes build/index.html | 1 + build/logo192.png | Bin 0 -> 8581 bytes build/logo512.png | Bin 0 -> 22920 bytes build/manifest.json | 25 + ...nifest.ea82dc23791e9ecfe897cd51df1da56b.js | 26 + build/robots.txt | 2 + build/service-worker.js | 39 + build/static/css/2.8a8a300c.chunk.css | 6 + build/static/css/2.8a8a300c.chunk.css.map | 1 + build/static/css/main.d0a9e55e.chunk.css | 2 + build/static/css/main.d0a9e55e.chunk.css.map | 1 + build/static/js/2.1a4d3499.chunk.js | 2 + build/static/js/2.1a4d3499.chunk.js.map | 1 + build/static/js/main.2af20b4a.chunk.js | 2 + build/static/js/main.2af20b4a.chunk.js.map | 1 + build/static/js/runtime-main.097ce451.js | 2 + build/static/js/runtime-main.097ce451.js.map | 1 + package-lock.json | 27208 ++++++++-------- package.json | 73 +- public/index.html | 90 +- public/manifest.json | 50 +- public/robots.txt | 4 +- src/App.css | 44 +- src/App.js | 26 +- src/App.test.js | 18 +- src/Components/customEditor/customEditor.js | 375 +- src/Components/toolbar/toolbar.css | 4 +- src/Components/toolbar/toolbar.js | 382 +- src/Views/editor.js | 24 +- src/index.css | 26 +- src/index.js | 24 +- src/serviceWorker.js | 270 +- yarn.lock | 10658 ++++++ 36 files changed, 25348 insertions(+), 14114 deletions(-) create mode 100644 build/asset-manifest.json create mode 100644 build/favicon.ico create mode 100644 build/index.html create mode 100644 build/logo192.png create mode 100644 build/logo512.png create mode 100644 build/manifest.json create mode 100644 build/precache-manifest.ea82dc23791e9ecfe897cd51df1da56b.js create mode 100644 build/robots.txt create mode 100644 build/service-worker.js create mode 100644 build/static/css/2.8a8a300c.chunk.css create mode 100644 build/static/css/2.8a8a300c.chunk.css.map create mode 100644 build/static/css/main.d0a9e55e.chunk.css create mode 100644 build/static/css/main.d0a9e55e.chunk.css.map create mode 100644 build/static/js/2.1a4d3499.chunk.js create mode 100644 build/static/js/2.1a4d3499.chunk.js.map create mode 100644 build/static/js/main.2af20b4a.chunk.js create mode 100644 build/static/js/main.2af20b4a.chunk.js.map create mode 100644 build/static/js/runtime-main.097ce451.js create mode 100644 build/static/js/runtime-main.097ce451.js.map create mode 100644 yarn.lock diff --git a/README.md b/README.md index 220d441..a965f11 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,25 @@ -# react-online-editor - -In this project, create a react app to support online editor to view and edit a file using intellisense - -for example: we can use npm `react-ace` - https://www.npmjs.com/package/react-ace - -## Setup 🛠 - -- To install dependencies, use - -```sh -yarn -``` - -- To run react server, use - -```sh -yarn start -``` - -- To build, use - -```sh -yarn build -``` +# react-online-editor + +In this project, create a react app to support online editor to view and edit a file using intellisense + +for example: we can use npm `react-ace` - https://www.npmjs.com/package/react-ace + +## Setup 🛠 + +- To install dependencies, use + +```sh +yarn +``` + +- To run react server, use + +```sh +yarn start +``` + +- To build, use + +```sh +yarn build +``` diff --git a/build/asset-manifest.json b/build/asset-manifest.json new file mode 100644 index 0000000..4a3dc75 --- /dev/null +++ b/build/asset-manifest.json @@ -0,0 +1,24 @@ +{ + "files": { + "main.css": "/static/css/main.d0a9e55e.chunk.css", + "main.js": "/static/js/main.2af20b4a.chunk.js", + "main.js.map": "/static/js/main.2af20b4a.chunk.js.map", + "runtime-main.js": "/static/js/runtime-main.097ce451.js", + "runtime-main.js.map": "/static/js/runtime-main.097ce451.js.map", + "static/css/2.8a8a300c.chunk.css": "/static/css/2.8a8a300c.chunk.css", + "static/js/2.1a4d3499.chunk.js": "/static/js/2.1a4d3499.chunk.js", + "static/js/2.1a4d3499.chunk.js.map": "/static/js/2.1a4d3499.chunk.js.map", + "index.html": "/index.html", + "precache-manifest.ea82dc23791e9ecfe897cd51df1da56b.js": "/precache-manifest.ea82dc23791e9ecfe897cd51df1da56b.js", + "service-worker.js": "/service-worker.js", + "static/css/2.8a8a300c.chunk.css.map": "/static/css/2.8a8a300c.chunk.css.map", + "static/css/main.d0a9e55e.chunk.css.map": "/static/css/main.d0a9e55e.chunk.css.map" + }, + "entrypoints": [ + "static/js/runtime-main.097ce451.js", + "static/css/2.8a8a300c.chunk.css", + "static/js/2.1a4d3499.chunk.js", + "static/css/main.d0a9e55e.chunk.css", + "static/js/main.2af20b4a.chunk.js" + ] +} \ No newline at end of file diff --git a/build/favicon.ico b/build/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c2c86b859eaa20639adf92ff979c2be8d580433e GIT binary patch literal 22382 zcmeI4_m@>g631uH?hiA>Aq+VTNjPWS;EE`MGJt>?K?MV56hy>`7*J7EOc)R|k_>>b z$<4tHZVqnp59+N?_4~fpbLZao?tAP3ciB0o&waPMLU(m_RdsdWX>0pJ+ZWq9JKOBp z-M02iZEdsK+SiSaLvu*!^O)cRqLua3I8RFCx>l&hKB3cjSJ6zFeF@g z-Gs36nhD|g14F_Mw~Y%=?H(G=J$G{N{wBO{Tt6;cedBoNG3#s7!}dd+;l&R-!|7k2 z?sd?+X~WpweMtCUw|1QO6L~CO(H*wFH7q>-#;|bd%84$Yt8W_b{pcmH3V-;myMJ_e z^?QTD_Jf^a*T)0Gv+oY^^3E>?gclEYhS$D7D6D^IbhSS&1LJ?`6%)e?*4H)nj&a-v zo*xk|xwJc6v~*Iq@Zw4So4V}>I>XI(j&+#JubSv`IO~jQ;koyRgfqSo<-O^d5#Dcb z5C5wp9R6oVxbUJ$UU&bqBYf9Ok?o-)PVW>NbII z{e>4i;msH>yKE^q}`n)~3y(=tTZv8hr`oUPd|2D?8HpUlhP8hSs4`1eJ{ez=j zM$8%VduIO-FS|Y-=<-3f$QW5y^|c~@Xx(6Xvubsmf98+5qu>0d9UZ*x)^U-q@RIpQ zH?F*Xg3AFO%n3#O(5)NSk1f`b?n9xK?VqCcPO7W??0!adbwmeM+w@9;XFg>ly# zFKc|;-l5@@?+gx)yfQp2yR5qqo;Cf@3ti#mZw_{S=e-gARPNc|3wox8_y624y#9kh z;gOxg!`nX_=(dag%$qy4I%n7_Y%+EUo4V!I;chQJ_)EWV&cZ2GxGa6W7mfe!ts}#G zf9x0LoL2E!Cr=NnYz^-HP5-d(xBcCgA)h_J8W8sXu79}RY{+R}F?(rqI{Va<9Ok~K zM-<8n{`KY_`|$L>p?zS^K69G;jRT+d3yg8cw+Dxwv!?ceLnio_dOXwz$s&E<`O%>8 z@Q&e*pKZU)?6mv<_AJ}ZJGTAx9}ddJPvMJxzx=JiVasd7d(j4VkFLwpTP()w#Mf3mUJHwoQ+K!JyAMrit-JDs|!dpKb7~cHxK%aAH3LgKd z`4g|SUB8Rw=guvo!hRbk{smp6KX3koHP9Xo{k_A>hyRFA>Y{HP8qhgnmVKtD_dGGO z>G_{GXPW!m$jf2{qrLZ&0pXor4)8f=PVmXMZX6TVTH!Z!=)-PX3-Fb0Ag4PY9Tn!E zU0bh`Pbw3BpK0riSmNN{I=no&YgjwRMavOf1bi!%-W z;!7sEO~NM1&YgGuWQRd6JIr1(_Zk;6djC)T+&-nc3awezUu2DaTfAsWulZu`ktO|l z=*6zc+hPI6!@N)!Cw2&0=sY$P9AX~oRIsP4NBAHk>gnI*SI4zXT*kZV`Av+o$L1a$ zn!`uU7HfXvv)%auzhK_faL8b>k&3TVddP@AuUJ)y^9*N2h5z{%WMUv|g9fzVkBx&z zU;Z6c{=fjc_mloHJ~Mc5RFD&WX3VOC$6F?oH-0oIEHoLV{Y8erV`m>U{Q-x$NB&2w zp2BbG05HIU!@dA`(OYab3LRsvnRB(#P8+_9xx3x=0{9&2(IM>nZ4ZnNhtNNZ6RE!l z{WIOeFT$I;^Gr9q@JQa@Fbpmz+!a9!x$d3I2l>qzB%qq zz$NaTX?_rR6{lnCkF}|>VXqE;+F>?psMCNBYnwGLzQWHwnZpeakE;56WVz?p1H$f# z{bAheHjNHz?j94?+%qQJX0iXH=JSEe+8_GE-U^$R<)im(fAo&+#IIvZv8hk*AL@4h zi0LmfLe{ds=mGYL@iKPi9$ajR=;iUFt*9{f!~kjgZ2XVuDf&9cY#H{9d0}1Sn^IWz zoAf8G%l@WM)TwXj`_7Ln<}>}uwl6Xp_3j_~yDl*2{KkHYhTyTi=&s(g?RqbIGA8zn zdF`?p%sKnaJeY@fbcI)KZ=Khc))n=Su|4tjus;1qm+&>L5!MvH&rbA9^oUcpSLUyX zAFxGbhxkEYS!cvW_n0mg(Wjn%>8U>I{hS3; ze2nBLm`mad z4*6jAidWq*!E+;=tC6=-d!v0gW3M+p+FB{>*~m#ScIKTk&nz8sY^&{zk(?E9Dv#Ox zrh9te?tgAX)Sn6*d+&9d#`J;{eR6H&jG%{n&_lH~`)nkiqIS-hrSF{YraDF+(s%Mt z?B4{>dS)-jc?bD0av|umbo~j-57QKfCX3oPC`Z zL$eLV_%&X@z>l*S)`G8>7IFf}t&F_bqg=aYoX;`(DP2Vef80NHee?Rb=aT-5Ke04%IeV*I`pKN9?e%`oGTkC3 zPyMvUo<2E4>q+je`QErP26VQpU#Bm?5)X+!cVNAbCLin$`~E1`I1hr;lRY&0nc9nb zV=S6~&LEu^KC9xNd2(J)K8k%PI?Q^9x9*XU_d+k-Kbt=LJ=Tis=|>Si^^taBDriCj zTF|7Ob8)|;VfE-5_foj4#Jvc?D}TTpCC-rR@uMwUh(Fj)JbYx@VW=!MQr;y4*v-o@Cp3=k9~}6BkkE`#z(~7+Du79(S-gQ;l+n z{E0O0NAAtp98-u4UK?~1!q`rMZ$2gSKEJR<#ezgwiZvKM@!m+;1C z*YG<0-b~$fWHRB7pvJ*k7k+kM&i$O!&x0d8p3-N@iYNYG^ptDl9lxRRr11L9d=nR< z!@|$@N3fCy=l%E~bPgQu8v&#CEWF;aPtlLZ^$I@rQgRbMIooJQ&`s8sO6{GyID&^h zcO>wYf)ze@m&8AXr!IYGjeUqd8ZUgwe6ts6JHJ)1nex5di$K0=tM?>VRm)Se7TN>f zMx;2zXmK85yZpEK=^Yr|tq?x3vD$fJ|L`?xZ}j9F5#b}Z6h4&~_dlXewtKu;M!v%5 z?w<6SxljEa{P;#l?XfRW_o>r*Ry#IUym{i!J%?(rz>q&p+o50Yoo_Hio4co3c;S+F zjQz3ucxG!-*yy+39%m@~E2dv35b1x{L+FaO3W zq3`Ep6}T9q^u__7^Rko|>xlcKDQ$jZ%Tu_b-`uBk{W2W(oSd1Zu*jEp%~gzBu~Bvh z(qw@D!I!8#3y+P&7fHXkQ>OI{?-ZUmC;Gogzoz%`o%mk1Py9Fo5j|p2*CDfk#3b^6 zY5&C!o57u3!P7r-Hfk6BK2IADF&pqI+;#N(X^EVKr#KZ@@^{>|*0|WCDyJ!UWbmAQ z>nIrT_)T3_?}?o}H)ie31+f+1JqS1V&Ybn1?>4eI2Vc+DrhcT)to)EG=W4``(eK81 zfP2Rtb0u`hy+z&Z@bf?D@*Q5pv%C3~yX{$i#DSb^liNt|m;$H%5J!tYziA`Z7eD-( z;K>1yQzPzEJGjI@9`_`D7JcFJo>#~*az=x{lK({Z=piu=b4kob8#ak=Mxeuay>?|Ft+;_=-b;C4OUH zC*E=WMEfCl;t%ow?A`O|XZfjL^`6*rz6Is`5An`>V)wbD%6GNy6HNxdA&=beTN1g$ zA3Y|Y6USxWAedgU#?t&p9$)InzmcO!WnFJfYRk%_?z^ocVp+yR-Y@#q#DBYAxB2jA z^w+FM`iDHQiOdi7i97rh?!2>(-ZOf>UorST_(rc*S8G?UgSFVoco=Id1)r!~Cvw1N zu-=q2DDv;oHX$#@P+aob@!#x!IY)sf`1sSZ`;@$KBD1>lUC>_J&vf`V;F3M-gm{yE z7w6)flaU+K+C&eSGv&UO|0b7O)9ZG(yNr|X$5*bJ5Wn}V#3A&TSW58NTk&sYJSlG3 z-<&yUO!TuJ9^dx(zS_nPPHNADN8BZP%yXlhKKWI_r{7$OUNg^D<{zKRdZZAar~LBh zac_tD!d|dOs{aqb^oz43?a_hZyPQV!;`v+T&;Ga(d{H}nZKV)T$=|Lp{VYR+Z?N#4 z6yiF*>te0A9dV!9?s@Yvw1{=YpL>U8aPnY~3-v|vDQfo^ucFW70L$RxkBM^?Ki~(5 zE8;jheD8z*E7Kq1Bk4ajrVM|rw{CH%i?ku>NWd@20Ym>p2YQh+f$Yf zcP@mV&4-kwA-JqO%DnsdZ7s8&*_VhG&qnym>^>-c2iJ@JPR|G$;nVK>t_nWBw;BE^ zeSWu6*jvhfvri~XgS~+7fiu3J{8lsj1nyjjKmMmI|14aY`2r^^U-Br@zgsNVnQia$ zZgC^uxM^R6{*x;p4%GUm4cni`FH6sJRYn6knuJqqUp@vJM_1N0idKwLrYGuyxF-q?8KL+a+I8rUOfw_5oB2lD5f;d3X4 zJ5Ah&WdE1FA3)secO`Rp62r5<~m_U#9gdeUyLKJ9CbYQqHy>{e|9{^t8& zegB|7>&clAck|MNVbeFrktOvg3z02+fklW+i z75E(uea`*)|61hwI0Glv#osFTd$jcF+lgF`R(}5r_>AF1E=RLI|J&#PL|*%vcRjTR QPNaAH_W=L@JAozeZ|l@fegFUf literal 0 HcmV?d00001 diff --git a/build/index.html b/build/index.html new file mode 100644 index 0000000..0d8abd0 --- /dev/null +++ b/build/index.html @@ -0,0 +1 @@ +React App
\ No newline at end of file diff --git a/build/logo192.png b/build/logo192.png new file mode 100644 index 0000000000000000000000000000000000000000..fa313abf53936aefc517dbd583b724a57199d415 GIT binary patch literal 8581 zcmaiac_5VE{_rzKwn+A*7-QepMq}U2*s@1OwlPM=Fi2!eWJ~rfBhg5aqM0lSqfKO~ zNmx@9*BR`^U^P=X{puv!8Q5XVM+)t$4T&asdFqgGQM|Oj~&iEny;YNmB`sZ{(26#+_59}O1I3!&6 zoB{j~UtRF`?z9>l_6H^6i~-!;&H-jdAYx!gRF9~t!wtD$`b7T#T_r>z`wlWAK-r@1kLxKNzVC%{wHKRyZ<*j9{(?DghyDM1r71HQU67z|9L^U zOLQnk%?T4uh$Q-9EY4y=BBcIUV%ILZ4!CoeV0UvI9upD{TGs%sfzu>U#ftP(*?cJuFlgw$92H#PMCApEa{1?m2p0}BCIQPloXQozAKiV`LStVBex zKzZ?yVb0=q95+@1O6epKJWbED;n?{l$x9(CKT3H^-)LqZKB zDON(RN?gY{j@1jh<~OJ471+k2S6xPK^z2C?*cmu7Me^UcZfkmES|)kpMb6eFgnbfG z5>=5?R;!UK_H>N@;n(rBv~O?#H7ESjRL(RF2$2<)ORIob`Y(UR|VV65ilX0O1pBw~-cAurF3 zSk@-1mKVdn_Oh#Qs>a;Dxin`s&PMWlM}4}FL@=GccyRcWP>*bgT{UBg^@Jbe;iaOK zpuzZMWJl`E!`Qb%b3aTfNQ9G{Y@2(q4=i5FM}eycXDG@e902w`-TgocmG+4Nz`+k_ za}$?yr0?ZX6Xh0#-3e$^s5zSBNP+wvR4&AkkM9)jpu6#CB*4ci=wRX*>M>g@80ERg zf*T>|p5f%*z&0cl+GXk?6t-VTD7RM0BI6LN#zuGf3Ug}e!^$-+X7p6F*5u&y7P+5< zY>gTi(wYVet*f1GyD0w0$D2!{c%_`Z%(-Ad4;bO4bpUSAP@Y63NGv-o3SDM3_NIZm zfT9ICl>A|uDv(&XvAq@#hyX_=Xm82=r^|-b)!y_11r!47d}(6sF!bCJTzI%|VTKt} zZ!hgOaD_uK431kINLGAcJsv@k?1ntgmN?v8ZzZ9HE~~~XUMIb0rKyb# z`6LeKBCrqYS&Ih_Bofa$14e|C*^-CM$4KLrPkKkoAi)!s<9;PJWBMaa{D&U;1NB#^ z+}BLUHmlPw6;Q?@t0n^Y6nf#7v0Q=6fEN$L0^%x?hiK+~F?NXN2zwSyC^fpH_3Sz+ zZcpMpS-~|7u#t<%)*3$zFjUb{&yqbE#~qLxF#tC7Wq0gM?`S_TA$TGo@d>)@jWdVS zzy}uZC#+RJAPwR;frt|~NaYX)AxUvi8Xqr0cXN*D0!D5m)bd#&+c;=C0%_~IxWx>V zr;|#wn+#q&L#T@6dDy_r*Ku9hflBNhO#xb@UQFgAChaD+eE~vNp#Yt8lRo!xqzMv8 zpL)(plyw{sXJ@zvEO?N!{NDu@(0Q&eyiQ0K&juWFeFMVZr*BzqVROG@46X^q>Qun+ zRqVN^A{J!N9XLNFXg{VeL_3k|D}H<+ME!0Karr^o?B;Y1LhE2l*(!oEaq@l;Uk|ke za`hBe5gP>w^+--LK$qEAzA)saZS&oq4m}p>Bu18T1MAIn> zIDuL#<>pW>1uSo0JxczWy`5*NS0QB<+7cJs#Vt6WFuC7WD)8j6V}U+2f`vYHMYv;v zVl(4F?k9}DlPn4X(&rEVs%5)6*8EInkb2{wu_>yonB|<^b6Er&ui7i0kOI#6qRJK_ zcgjqDlfE{5kRReP`l#f#(=K@mQr18F6*;f;1n;IkCR9F<=0tie|8@x^!$I(&#ou=gg zxIb1t{%M@)%agctHG_)&s7lHbJlq1coEHdag`3%dA}4$ibQ&1w0oCpGc)i%Aao>8M z!He?xItYiiD3CZE@D{$GIX4X`qvVNE%;4J^*3I5Uex2|$c}_fu8$Rvob;1yN>}hsJ z19z3toM)rWXJj8Sl5Ib&9Fn04Fy|HlQfXuQ%L2;a3wa~fcl>G8weS!N(_3sg96Rot zRy^8~b;PE<-8agwyFeM2mOn_>3ERfL6IwVpe43aN%dQj~RO3<*1n5xf6LWGVJSY$v z`>?0kiB{+?2@1-vj8uX!gHfnoDO-H-Slyf7S;p)SvISU>QP3GK!=U$LkAu$hJXhKS z(5DUp-5i+jVB(v(*U+twBpSyagr9w3Ip|9dAkPB0aLq5-K}D;u6NNx6Bw4DzD^da% zKGb5m?U+?immbmrmkfGUC19bkT80C=8Q@hUv!NA03r$le9g@hsZiv*6kdSQBzk<6!# z%ViAiP90o^R4G%nuhxQ9MvRuA@$$%8g7-7pSHF{V*`tnNA!bi}pYrxPN4gShc+YK`~gW@(954+66+E&0wx)Y6Y;ghQ9SuoZ>Q%|e&EA&>alzla?J-uP|t z3Wfm2OEGi0)ndjy-Pa4P&(=a*i2P+UYI+v-$9hMjfxBjvT?LB1hMbK0?S*5Gf_^~n zXbp7LFwr-=PZ7P!kr-9r%Z;xYDTOku0kt6KY>xOnjD5eIq~BlokpA}j_V9VggqT44 zKt)hLdxLD^5=8mXf^%?UgT^7Nu|tzLS?YJ!0Ht}eZ-u>H&ITbke&*Z)@L{q^Jhu-l zj=>LKTk3T6j(*;33{WWFu>>+ruY9xqx(OJM9TIc+jsxsb^){@$^4MZUY-{C0e$JNc zNOwc47;Rz#pY>5|#;!Htz$QEM&TqS}UYv_{??XU(0oA;6iE?>C9xDPlDoUH;jLZ*B z=`1xYry}*E{6>q6dq+oSqK_c@J!cG5J9FAz^LsVLl~ALP=LD2G4tVV~X;A;sS3~jy z7|@wDyCeO>sIucz{MVj=E4U6YqL~`Z_EQEwlI>PN;RW0aPj>t+v#ZoNZ8|nrias0k z;n-L#?7=JYc`#3L+h##^i_loPdd_Tzv(r{TpH@d~dpVrtWzIQMaCt=no8liUoVe_K zL5p9E>mFpTt(@n$Cd~EA@xAP;k2if5Vy!PybJr*oV;~0IkR0d^vV5W z=mM}r$Z1MmD>N;Y47MKYgW-iaDum;4r@**0vJsTTxA@R(jK6T!k>Zdy4y^cWK*{~7 zn@(XeUtWHmDxgee3h@Vn?=6SeGS$R;#XH^%!tn9PdBV6lCKO>OAu>ZnIW$E+lGu5j zq&R6kvgzLvL7(EJ2SgFL&p@sxe+OvG@d%E1qzJXrdEf&y@$mGet~OK|uh#ff$kVA@ z1n=dX1@_+^`-Q6su~w23R4?1H5S z1A@)QHXUw3S8UodsU8H>mMbiij7X(&4*VXG?Hzsl>b%P!=3T>a@1(&^UUF8Tw%fq= ze%hi;aKAE0U0m_BA5{*Nj`1pJg68?i!58d$G z*z<3jX&VXlrendgJYTP(9HWR=tZTHvU}|Jo1&Tcn==i*YFnzAx(u$Mg)AcZTE^2Ty zaFz%paMl~yN-%@xSB%HfNW6uVvW?R+7gA*`5yJEUJp#wDRa)3Kl_)I*?h7|ee?QJj zoi zYKxUq@i8H_$Xk$AGGUkv(V~MB(8JVxabnJ$WMw9dR&=0D1v)e<@t1Y^uT_;FzaTNH z`qEejf(!TivhC~tXvk5^*nu5TFQcvnd3!2|arRzQly56_;k)i()tJ^K9Wrq?HW%Gg zsK}qBlVoQ4?aF#zkrt@@ah5L$uhgPVd8}+N#q9x33IB3)MT)ig2;3kQPWVFsR9QD| zuuD02e8fhTJ{8P;=q*vSiN6Ht;2k+X!LdGCK>a9djp|1$q~s#h^4~3FuZf95*!Qn# zE=k&b)43wW|59u(&MY3$V(z{))FtqsOVs#acbs3(CG8{Rem(vSJ*@_>&p+MeIBefi z1�j1_K1^)Wa2c{unU5x90^=B%`#p^GI<=?J!r*2&WAY3!!t z{tJ1(wl-?wp$uJV1N$-5;^%;iF&^*yFptzyR6UcZ>Grp*#>i(0`z+7d>b53a<+P27 zCW6R2 zPrk)#Hq?FzKPVi=^oQpoUk_=4W$xvd>uK&cQa7)*bf87aul`tHnU z$v&9%sY;zd@(VyJUALHrId=k36?R!`OP}Nxzi4f_{G^alv$uB|jy}4NIk!?Bi7Fdf zPG?8`jxrqgzxtGN0!3z( zn4QMmj&K-|9UOxPo;P^0LY`gO@ezg2Z@>R3#1;D>+w0w>GOGXBXV?cuK4JypP3Yj~ z|JF+yOFcbyI`2BkfUA9?kN>U|{>R)-W~CI$d?YIlC5Aql<^8COIdYlZ;$nzyf*WI| zQxR~Cg~^IxGU$zm;*0kEvN*V0$`hHA#$g(fOKiIRNTysOZTSTd8 zQ$3d5uF$Hog4gn3iGKoRACQB{Y!xb?l%*Z{)Z;l*Tr9?xv8s&=AH9|Eg-nSy{8U~6 z?#wivQ@MLb>u3=lzyH*J9J&6Eeyewj)xSy{@@q;Cb7kX__Vs2cnxV%S0 zR@ue*h&Has7B*XvWS<)~gV9UL*L&V>c_d8Fi&)H2emPR?1~A}B5s6|H52ecU6whF? zvsLw+~JsSx+G9ii-U7zTcO9TJsMi==bPWimv!@=sfMtLCEdx zZN5TWW(DTbqBxE2eMgm5e*7e$7QQ}OLFFV4?u#G)nvKTZiukG`=Pp6J*z0j!NAd88 z2xX@>`MWZUk=eQxm?#l42a|Xqs+=na7FE4->R#(KC}O9piirw}Um1et%rJY+2TIsx zRyAjvf~?yRuUpYShS|cn=tHu1d{W$wgF}WXYk|Qxvf) zCXm;{Er(r^b$~v6f4cx~(a6O52)M^*G6sWz>n*Bp?KbqX7>e|%>f6aOJej6rr@rV- zE+{ak9-r^D=0^Nh>_AJG?<_uEVfD!WsNt@FnP%6l2m!aUz=#x9OzNCYVs_YMFPBx5 z7)tC%Ys?L>z_4}MsCC)40tU^~Qc%}SOzGT`0?yyAj$|Ou}V0d!JjECbuNMc9xUG64Hd{J1~LX>nHWL2IeFBj_#9?3UIJlYR$=dY8sX?Wm@ zEWTr6i6@M<9?SC^?z?%0Ez-B;>GXC`vRj9F#c=I|FU0ht3SoI2-USp1bHeB_W*IMa zB5L+V331sS=zdUd#qwj%d|OAw$&L5~k(h0p?8|L7^J>?wWq46j-@bnNA3_HNS;?v0Td!XZKP9*>1 zi@eyH8J-N{G8aI)Jf|j$e~M(;e7ge&2tY$Kbz7TZ2w;Ju`BXl=hhc;Yn-3f!2GGRe zH9q=UTze;E_0o<9SeRo0_NtW@|EwGY7vt1#-8I)Z-b}@7V5`P;({J?|AiP0_(E-|Y zl}Olm@x-+_Bj=u0iT3@McvmNPIB80fqH%3-X!Y2fHxW zb-srmRjT3N%0VO~=^viujdN(+-vXh@HjuN9zOiGSNL_h$jioRcVAp(kWPLM_x&{aA zH>={G@-3Nun9M_Lpk|-Kjv^I5hV?sGBLFvXFZ$HGz8LN^&LnSpdSxMnj^TA!j`C1m zGTSRBt@nB4ix_xng9OV8wp$o{;s%>AFvF{lRUZdY3MtsEbt~qaea`gu`T^XcmQQ&` z%|T;Ua=#Fu%IBu%j@-D~)#);DH_Nbi--UfU@OtOyydWT#)sV5BWHiaH{xwhXO1#4h zjEGXrRbErKLvI28{UdyYUmpH|N6Rwj6x&cwS9S^0tHd?axE4b8Q>SpHrb3_a7^YGc zWNM#hmondh-2fO!_Ay*e`{PCjFHV4Hdv)&*?uLNfmJS`*yjo)B_SRI z{ly*^=nG&t@_O2e!yZ>OPJ3}AK1p9kD)AsmbW;3VcPoSz=>meu#>%d#x^ z>7l|PpjrLp5n+p?1utHo=b_7fxpG~jfHJFy9_z=iH<53f z8$0)0`MCet@~@ih!srar2`@_**{6LGV?YK8^6(1rY`~{vVzvTS$68)Z<`gu?5FV5a zcFh*nsKh(t3E&3Vusb-(^|?qXxBDMcR*~NGwEG`uZ2?aLYnOi=KUxcsHbrh|T;^yf zEP-n)xedIhjz@l2vqKnqKp`z^SGT}_yfl1(% zJE;Yfd)a|TTwRRC**h8LU@USx5}(Gp`h#t2XJ8XS?ckl>PTtviIK!Oc`FL5l*nFZ3 zJ9+1XxdSyjosn67M0LYgv4BDWLJ!j}g(=`D-5jHB&=zgeWeU3Nw8fB!#^EY65j`kJ zYg4*q0i_0hcToaay9fnvi#)&S*Dnz%lVW`tIbEO|gg%eqj`JgFSL!p#aS+ZSY$gG7J0Q{wNmxb}s9cjF|ejK?W zG!NZ#?3oR!?59kQ)VjU3*AA4ab^-8)nvAw>-Qi0no|R$FeMh}nldxT2<|EESk1Ag< zoLt(tc&ixm7^3j?GU;MfeRxu0HBAduHePc7xT)GeT!!P>q%CwA`53&AQde30MoH#m z=o7_tnp;(0S#|cdaTK?A0x-SD<$VTq?d$&NMM$hLt<^b<0j@x` zx!LTrIQ`~pb};Nu1APty;;f80+3|q;k>gyUUmwdJ0Gl-Wtc(ZvSq++-UDS3wsw~{$ zL)0pUJ|%}&>Z%ra<6_i1n%WhcoSQ3=gBWkV^F&h~8?|Ttd(+ZPFCCj?ub^l0as#r= z=`1FXRlBGkW~CUgmjxqaBF6)uVoaW5;(p$I#aTd^hKzJpPQ{yz>DN^@<q5vmZ z*y()gSJSzw+=vgry5m5+pmE^9op8vZ6QP^s{_)7vx>z}nKvR3(z_wEt9c6p33`x`*E{R_K(bfz>|P)iYjNPff4)Zg f>uyPRUv^M&LL@+9#K}Dnr0aT>-P$OM>Z_+!`Nu-DnLFv*3K>`sh^xi~)D55AB zKp|j9EQv%Z0@BGD-gkd{pMCcCo%8c}U0x=cdFGi}Yt5Rq?sbo87G?(Q`;PB}Ac)<_ zP}d5ASinaXXfG@HXE}O&1A-8}0X7ae2U8P_S7@-5hj*x_k5qJU7-)web*<4LkUA?#pkA*2%;;UlCdr6?sMthrA}J;K`; zW2LMA9}k0X8p8fKTo^`LIw~qkDoS1|G{R3>R#jD1T1HMD?A-St%Lm z|9f{_fbajI`)=P0Rq^lvUC@c5>Xm$KQwd#Zhg+^Edv+~gpmi_0UUD;ubf<63v>;t@U{{J=Fe>Ir+ zg!uiBmfhI};dj+*8xjE4^Y0Y?dC1|v+BAe!m4IRGD*c}($Nz29f9eAB&-_e7y}|V4 z|9R@anv8UGEFwaE1A;(Xq?N&0AtOBm>O)-W6k+{%^n16oy z*VL_j!vFpD@7JJ!e{5Vx=pRjEJiK;=q#+y@5$cWi^6~y>Szx$-TO&h#aZw%-K3G4X zWDQ}guWtYlXN(ZoJ^_9qJ`qAEv3NfrSy`do#hm)@&qn$CfN}rNtCaqaIZE&DzyCE! zb?N`H4E29H{NFY#c<$fdfFl4NMfyKo3i$G$PRS<(c%lg4a)kF?cmhGNqyV6x|DhNN zI+=^l9g*nw;Ct@&esD_n)#Jw=$or-`l2R`V^^GpvJ5codg4TF^+-AJ^3)=?`C&L#R zWH+*{s)XL1Z!K#&$=}F+)GmJ(&CA{e2F!pUD@~Ih0)` zVWn|ORy5X1zfiH2nXp-NKbf_5f(Y}ElgsRM^?#Qb@j^zElf5zy(P7XvIQeHko6MF} zZ1ugBUpntuOI@gKPdQ3M&(e~PPtF{9Ar@kKcX|ckt~zZwkFTZsN$V zIc#}psPh)<)*iohy`hs);PgO-89GKn5XaNqzpxt;9J~-D1R3dKZK6wmeT;b&;`Nqo zL6CM#O8&Wef$E!JN>2Jg9=T7U>8z)`tI+J@yr;g@`yb3ZJ7~-;ns@t3-k+B_&i4)r zFXb#=Z%kQFxkvqG_oP$bJS|dFoc3$`d>`f0rsHJyqz0t>|IeTPk^u~) zSdJj>Cx3wM>C?(PC^`jjB!-P33e|B;2SZAGnhp{6PE%$k`3L4#;a#E_W|gT^ps*68 za2UD43bC=QnINU3xCyn;dE|5+eTz%>SW^&*KHEc-K7 z!iF&Rb5?E!?wmbrN*a^kJkzbKAyM*Wo@MIs$tQ22zt<^Rem3QS$?TA+Vd5M#eU`yj zsm?atbBsqcdH{2vJslI6rPAQ}x zd8AfoO_(53-?|*2m{n#e9t8QbqHsJAvxOpibrY%+Bqlt?>{U!ceB>jC)7xuj(ajV3KR8TUInJ&KV~Y@BoP@WTl{Q~Kj;&|Z>*Q!CL6YKF zakzi~ow?ZHq&TC|x3E&UJ2&G@n#qsZD;K@sqn;?7JrqdnCp(R;-vVzCK+`YD zMtlja46axza!L{64T78u6Dj)$M6IR^xE&V8L2sSJIkstC24C^br$-cj_p_3G(Db8F zd@xZ&Uhq1FIf_BtJ%QzfhZW$n4)n-k+-OMhxHy=NFqRXxfM@XWYzE=Vn40XO*gn|w z8>*^YCle)p-#sljHZg&(pVRsn{y5fqNRvSyEryzwK#P&hLoBGH$GT+!b zcfC%VZFBhm7xbf(@|tD89<98M1N(hOgpiy|l1Soa+T1%g`W1A_MQkhRE49uHXk8ai zPtG`gRRm%e#?qjLM0{4^j7$Iv3bzM}a-{j!($yPz*q=!ICWXCrJNhGwq7}+t5rC$n zGx?kbR?j$VWl|ExF^C&UIvDm7So0=|HbkJI>BZC&C3hSyFQTFsM;;rX=`6b<-MSJ8 zAu-AXzxv2glTU|;eXlXPF5wpwde=^pcvM(M4?J3<{ft5_doT{-(O7es^v>HnQh75) zyWfl3J`#l!gg$ptuv|`}n1mF3>W6TJTDu>a6!UftY|_`g+SiW^Ma)Jl_OX&psV5G6 zl)_3kapcM)yOrNXE!smVuqhb11hRvgkOYxj=E#0~z6m}9DDX_bBeOi6l5io%ynwWy zWo;h;{_=Xk-D{Og+0H40dSipVLBvW=KhJL`=iXN=Nwfc98Ib!N3ZLp6cGq!I#W16Q zT8=3}ilSIQww(Tj_kyx=Z-brQN}s{f;9&;{+b`pPABdC1BoyHHUO+9^Lp$!oN){$- zQ!sAl$7$E|i4BNp%4ye!Zlwnu+_s)f6d*41bYzF+mGekpqXq_Z0`lAbs@5QS_{q1x ze)JcF{O)`Z=su=_gzSuMTa&(5E=BQD@57p5RkuB@3$7#|GH!{*?b!8iI6bJ{rNU-1VRZ~mSBCKg5xunAHNIFTO2LIza<)Xq)(23NcTSA&u-`L9 z)2Wb@>G_LU1+68uLfA?80yl#XUh~_xkJS-jZGFrYPda#)Hbt!8!_&~9}#>WG9( zxX;!YaVJ2j6z07yowu(r#^qAALx=hYmUg;bwkEGrMqamNBzRDsuEdvj39w%gffRE$ z90Pfi|DfqRP_G}c()_K|k-9HSJFhC1>>X38N)R78$OF~0?O%E-Ppw_6NqedjbHTR# zT0j<>UIdGKfiVy~3QmYXe$TcNjrqQln7$-@Y5^+Ya#k8eu%t;~S6A$YqcM6G&P8oR8DC3Eg5 zX~Aa7>m+_Oy>{S=jM0&iO-9oLbMoM$v^#9}KBwOv9Y!rDRR@kutC(2Bk>#Ja&tUqD zE1cRbD*fIY>(c~HEK`|cD>wdJc>Ww(2iyAxnl4ryxHzNLI%7HvrvDg@!fl@hF4-|K zVo{59Y>qaN;Co6?-0H^^^ld(n0R?jt`|kQ9C@mDZD-5*1=q0|x;;)MN&Q9EaF}BWC zuj75@?QDwYA32{)aISU|@PrR~G%ZMIRk@vcgXAW$v`3UK+@$8)VSnjJ)b`u5@uH-s zOwIdZb$W1jIB;?ul&m>>+|C0}1$R!ynXf7~i8~#c+sG~?mU{raSFBiv3l zmFFa95cKEoiY{Ks+~$6Gx|q8;gYVfqG$%iZ6AqtV)bbvg6JU` z{eyQ){rra&=6lRu%QsE1!O2dm!)cVs?=nSBX_P((b=2B5d?ANa0VxGWKpgq@@bQQg z*ueEV3RB8fhnrPu6Jz_OO?o5BZ1gqKDf4^X;S4^0K2dBVY~c|;M+zKFON%z`y*X8s zOQ?z4n$0l(PU|{&+wKwnZN0Ul8BZ`vKfyfDoBu48(s#3JJZiVs_qBVvKhZJ6+S<6C ziJ4q-RDG-Wug>Do2Hm9MuodK6u=W#3jH(`yz7>3Gc9c=ER1PgjflvZN;N3iUcYsyM z{6lf$V-T{O`279iQR)|Dyl+S+hxSEaf~O|0J5-^^))Qbi-(U<_e`HWTd-GQeWc^2T z8VDzJY4q+CG?D9p?F_zOP1rm!STtkfh&mq0jlgKg+weu~+N^Cd~87 zf`QksZW6k5@m0V&-Z9=&VRZc1`dwJt7u7Xdd=|%J~&(0NvE4qqB3rp{`hu7kvmdC6@T0@R(q(_HM$vRZkjW7q<+qtt>z#N)kgCjLm z*h#Iiby4WNC$W<4k{&G^gg%$Q6bnfL;cA(d!puZdDWPoB#~6HHr!+AMCHTFw@4r%E zgCJt`jfOmE_qKcd(H4Ez;vnrho0G0=)M4R~u2 znT^@A(!g#P)!!1XBYz~7*{MAm@>2JaU9$P7c||KdcrA?odJ0#v1|KQ zEUA9rx7vfI$3t~ReWn?d(8(_&ktJ5Ph5s5}A@K4Je*XJ+GdkY-NE3x|kT`LWTLNBZGEQk0nSm7n z7ixx2i{cDSdn07f)YU zo)$)822^zN!?;LC!TLiUg7vc?F=~XqW6y8O>*dn7`XMDF%L{zjJd>e$*jCq#4Bb zWr4nBTAiU!(_;HtypCFaSh!N{R|Jd|?8I*jbq1uMiHto+&|?=-=O=2tu8GFQx7hxE zas@TM5sokw`c6N*lESXts}fWwi|l40e3g{frO`U;-00Dd!p_=r-c|Iip2_*=sKNnJ`g-9?04oiM zY7Q*$I@c{ZA?)ha-+Q75=vxxWE1M`{!d`-MW>W^@Be_ZQNX62slixpGU*R6wvY_d4 zkePgDlN)YFFnNUyOka@jeX(cqoCV{0dW$HQ8wlku7+3Oz#XZD#b;4YkTpfSKk~l9_ z@Ek7Q@9W+-nG9Nx8`$R{L4Q`URQ=b9X;pz~7siHm)|Ef5+qms$zVBNM%!NOQpYSU@ zH4}0dT*z_DRZYcLWGtjGFVMjH_yIxKw|Orr%qcb0>6P^@+ry@hGZJ>9CyP{(7^HT(BHb9I zIz*D05}KY2U6hEI4B$(ti8?~?f}Q6gc9wn!IG5PFpWIl}&~G`gwYc8~o|ep@WK*0Q zK1$s{xa?_k`%rIQTN&GhBtJM7aJT_%BmdI-zze%Uh1K00;Jge+37K}*;tBCaqxCWo zg^wTBwOWYOxoojOhNEVJOCp&;p_?f)C%<88wq`h|2N8u}YM^|K8 zyaS>bXLO;zr{k{&A1q@FQ`gsj9ilLJuJN9-xN3Fn; z|J9!9{ZQ|y$G7Qu$P5beaPD|^ow8(c@A$NQ$?=mN3Z}9jx&kK{cSY$n#~!Fn-F}JD zRa~%#++bmrHS4ScUado5$u#B)S=!1JU9vaY78lODeC_#lQ7hp5Q%H{(|kM0V};w6nmjl(GE6HJ?O| zJ&0N3A-s~63$!?;$!z3|za5Ak)72KPxB}95P61W`clxNl1h2_rhYlUOag7VQaFt!V zCl35{$WnQ1omMYzF%M)s1fr1C)G8kE(GVA3gJ%^M4rB!o1V9meiC0pqGEy>%Zk}RTtQ$}Ma_k{J}IfN@vU_E!}>Z`IZ4)7983`Z3q z1cOgk_sGUx!keiB->$F|P9VGY5#HBD9z4V|1#l=X#=+octU~{IIkm^gn>NHEm^%A( zv1Omu`!6G|Cp9mIKug?xM~|&s*s<(Ot@&2DL~~B@=T(A`hNH?XYrOiO{HuEeo(?{k zOMnCLa8rLfwu`;LV&Jx&F+94z%B>de(7HyX|BENK!FUPjhNE|(4+wV;#+ibrb-`T( znsy=vQg)`1&>iU%HxK@b>M5uIpoJ{c?}3XXUdwwYhDoT#rz+)=Rz1C!3Gcj`>02To zLjmGMqUniHSrY}T6uni=E|C4v>AfCJx|w4PkzWrVFGgGzCk)j`=2X80XZMsCwByg8 zn74Tsv4=7F4c7tT>kWwwe;quooQEJ~bfE*?Npb3pEYw;kL zT+|#5Jb6=x88f)Zkj576Sx|)pjgO{6?lk(=2uRiUd?o`|6NMm$R?U7$%-z3j&h}RM ze4;Cx`}S+=6$=c8nTT}(=RpXZJX5@oJhskc(74d_!%#V5;q!!U#S?SbFUq0r#by|t zq%t;p9(w5H7jQEl;yX@EsLA98v8R`J@a4cwJ({^vm9fh=m3^bxo{c$NP>|a*#@KB-7~v$&;0wT!fB^c^(f$%Kc9AWNDM(tr$BbK zGb_&io%F33>WPRa%5o5Dxd);&Q!KqYJ-wCY+N<}S8y$hx%57Hki={ElOsq=@0r8Qa z{Fe2uUpB?u*wQeumyP@rLhJP;ckd-PRQLL-Ucke_5rYUT!Dp4kaFEN!Vp@wwK#U1l zv!4?@O4NEsl3J+>t~@(HeOb;*o*&xz$mu>ne>8B(=%~|MXdx>>$XuVs-NFHDn>Q_s z-9@XLx>_$q;&!B2L8%N|1YZEzwqm3jLGitc@Mz6t2u-I93;^_WN7A1k0^gjkpEH-O zF}{4#_j1A$(lVY^QSAW;u-WTbruC4qE@Rpq`Vz+>WOs1*mp(GanCR2;_L<;;Kml$d z&2B{T5RuuS=YlNhe|b>gqk7j0%p{-GmrttiQc{XFv`!3RnGOUP@1G!Cyld?YYPksN zFm)-?VXlZ^_mG!Z@8+BCfXws#HJDvtLji`wO||lGvQss?Sx<1*Lo3dI+8IBi?;%qBJ2> zvKD2B+kvyOox1y?^dkdv`R#V^nE>mN z$_zU9M(LJ5O-++wtb*tQIQ^%?*US~EE34Q#y27)#5=PzDUeci9LaHtwr+lAr=EK9N-X@=ea9x&aG zx2jRQq8l2-2^sdRk~cw=e5*@L)LmiU=xXlc?L3keyvh28;ynh9*6Yt2qI2o5m3ywA@HZ=cWGgx!fs& zZA3IxWme$M#q3IWoy}c$OYPNL&S!n=^v~KmE_>J-iFWG7bl5fUaQGK$0a!f?0mJwZG48kM2GqN z1aNj1Z@<=t)T{{@ueVx#A4x@A<}G=c|D_XPE-f5mMi;ZezPmJ9m%)^P?j6?Iy5Y99 zzt7NyMrm;y^{4;pVO4x#h}#i>M(#C8U?(NkSFAM61*6ycxPgifvp=hY+Fm-ba-3E= z_;T*f7td`o|%scY7>|5fV71@?T3QH zR;JEuRbfNSc)?H{PVEV!z*@QSdp|W#OMxiAANh_vpF_OWaPqp2&h0)$v@D z-=d+=_kCGeCc9?MMaY+wKk(D_QSa6HLkt+IH(cYdJ-@dYFw1p$M? zh2t7&6t|KZsxFYP#PKU)!|!9Ti6spLnM;2imntRt1c}U>_|!D?mhvYlOu`FNd60s{ zrCm3kcEMLKQHs@lKU8!$Y^un^(GtF1IL&empt+Yvu{ zO;YUQFjDAVgL59IE^P$pQUbYwK=G$whHvS96!-dGz-|hce8C$#3DLQo;lW+~6 z3gTKl*qzvC8mBOyS6OvYIBUqhP|)vu``emU!8DE+-5erZF8PhrsyxJHErL8(5m6j; zOuL6#z6gcZ2#uJ`QcrSAkOUAiqlE*{1hOg8r7i9)(hXyCA^mdBFYODjMk#4!Q4*>? zo6B`Abt_@|EN4n?oD@skMiRcCPj)Ixq#C*CSEy`hHG3K@DtOC`U50ct1ZEBL5=v(% zcg(n%Ty;f%ZqR3S@f)t6(Ad>l;lb#Vu*D)0^RyI8Bl$1D)0wAy6|_Q1D-XPwKQ2oD zb2)y?x#s2T#}|Ja`-wqj^W73zt=GUhP`g(>+ zf!~f)9+PnP`}rmxg}YsoVRPBUr-fLPyetgyeB-&u|4qf)At<@ouRXwbroHRe|KbAJ zeEl-40ge0q3Ao)+d**<^o*;f=-=iYV;YGg(W@x${B(+nsIiiOb zU@|ihG3)K$OxIeur8+J2)qqxWI7>lVy?;OPph7n@qgHjcAkBjJ3aKY8!`#cec&7^jBrwKQDb; z%Gs?47j*s5PJbiQ2P!{j?TtsR>vWcdF$tlwB`Dk@qo`Ay{nhWUKDez*bCc9p@7OJ7 zh>Ox6`SiLM8(247!?BGnGp6ZVi_{Z!qI_r7wJ`H)<8G|vK9mn+QGR>4B=q{nPE4Fj z=0!=O2uACTq#FL(3vN`Tot;unRLS@~`r9NT*gC)=Zx`Ii^#j_qqoIT=rz}lUT=WsO;2F{L8k> zi*BG9)wttWq_An;J&Vsyp6fzww?=i3ev%{6%Ak0LP_ z)uyyW>q6s~Lpdsz5+wD{Hh|Jm8e$vI(xQVZYnTH&PORYdSOVR=!RAQnb^iOig{}dv68+e27Ll0*Ca_ay|=%2(1M+S z*j{Rao$D~i#fLBs78@%GTm5>@j@-z#QM^C2z95F|mL*7o0SEE_pq3wXXWfx*p$M+`5kp-Tk~6`>->Xi@C4+q(ymYJ1M@GA>t*QQH>+3@WNj+LXUT>XlH};(oC@z- zyIO~Syp4VDSN~UH(d$;eC8c;-V`zQzM8AQrT#*~RI}q7^DZ~~0k-O#Lcde( zX7I_7T|Y6Nj~rDOdH6>fWwm|G$xQ?r7&YMFPWUoVj&XR6(H2J)aP4d?DI!Z4Avn`g z@2yYH(2xGe0aV{RzSDWl>~-*hUo=%Ik35nDi=k@%!&7rj z9HXET76Yw1(oQ-yyt0!#Ond1aUIw%`AFtU<^AJRKOF+NXEYnm>Y#YSb{eEopjNM7_ z+P~FpCq0?)6(gtevn@ZSa!KPl>++lSg_+OlcYlf9xS~@J#|dNe`N`upZ&vdLM?orm zu4VG6;MpEv&TP|CUyo_b55IrIS%lDVUpUkMb)Zkq*_rL64le#fr42jLho1zCa12)f z_2L~W&&z{EtydVGH@Y&mq8(lZC zEQEOb6xzQ~LJj&A!cX{fn3%vtcz-}-xsAAd6_}+);My5@%xR3)rw4y*vH(tgOdq%7 z$vEH=H;BhJTS?KC>>9j*q&sz)`vTFmH%P&m%{%pqPg@DhcH5&k3G&=eDgV}fM-woxNmwu=O z^-zS*ynP?}VfgOP*|kssA~OZgdQNJkIuC>;wwN$gPiOTSXgIpPME4_l{h|?N|ZWy@FK@-rx(yHFstM zb%gE$d~&!71Ns^bu%7FnKzX(8RulfwgIm==Gx;?me~ykOx9%l-TZ%Nv!U)m9 zu8JkQlmLs~Jn6f$2F;(;xLqc%-?}OA-%m7u6nc!F;*vRLo^u>7r-ODi7-%B zg!y}pt=lX$_(qpvI$%?1%e^&h46kC<@U+f66*~i z3^O(Svf23xCs3JnKhM+~+9)7~^AZk=K=z;@`2Fpts<~U&XHhp^&0bPnosd_kyo?&3 z@?TEK42G=K?Z3)@Jf22jzOI^cJ2U&&II+PWln#AYdWI+D+anzlkIVmBE{WrD$L*wz zD+c)cp&OLnWZCj;g4$ipwO3q|o9Aa@6&`I`ahrSs;OnXC3$I7b%+EKP8SGGe_z8hu z61XOv6~Z+@0>3jct|+O*@-i^x%M}treFY+{0sB}8vuBFRylk|L;-_4xBG3ek5sPB0YulO6@^J6g_-6P4ccI&-G zdRDH_WaEWq&n1?5@_jk;bwd}#=8-H-u3|53?N@Ru93T4rBdNS!kHoMerj{wm9i4ax zx#7w$V`TZ>0tlW zPLQ#NgIMMWD-?gD>FC7!7%HsWNF^#+P8{o}Q{pwT3CK-tpxT~CIz>wxRu~}%agcF< z3`XUl;{nZ(ap0q&MJVw~i%cJ$5PnBxEZBm%Tk?A#Y74^AH(ty-XZV8WfTR9q5`tLJ zByc^{9Jq?LYS8(N7e7f7)06vMJJC$P|V|8%BDL-ESopukJm5_vRy; z{XEhEvA2M~1se;Tc^RdG=C8C9Lwtz0U!mz9RGxdhjj%QMmcxz4N+%M1t?ow(wVZzq zy!AT_{I315$GcrdQ$$(Sls^i03NjFtVsvloO|pXh8lmX;tSHw1s%vW&C}J3n@&kQE zI6JY?g;)H4j?OB~Ov=2V?bD+@{N!M+ATs`q%`7n@fp9gj`|uJCs08pZw5|1Mt+&W_ zU?qz|`M-7~Z&Bz!{w6Q(M0{W+FR;zIpbGkJer`R+kcH560V>b4bU-hpj9LtV6TG5f z-nz6gF9)G9QMJ7Bb=yb!!r4iQQ-*yVc_jN|6CvzKOa?yrL@9_7@_}Pxnzn*9y~p%B z0PG5SP+Ia<8QGnNPgcqy`LV2}Vt>|FEPc(wm`p*swCDV1tELK31v<79Rt%^goW>oL z(QDsFOy7Lla1ebcFTe5BsP;%ci3W@A)B8=|^5wd0()jRfy~6o|+d)#;NcHoTr&>NZ z+~+L+Cv5r@_^mEHBCbvt%MF)#h|lr}=cdjYj_!v!@O%FK>Z)0FA4oG{GR!f#qZrZi zQbp&h;piD<+n+@UaDwY_8#u64J!9;X3dYGE2c)H zqVhb&ngE&d*D4>4f?FJ>N4Mm_zVExT1DfjPZS)dD{K59g6mR|hV}>4AsCMPts7Rf> z4P61mw`i;u%k*d9u7ogsZhhtQgL|QhCH|44N-d6yhJ?_j9^-ZPOBPR@pat5~l?~a^ z5$9U~vkV5~c|Q2?C2fdO)MRJg`s^og2~v=q+Sc`UvQW9gFz;*aJrc|52p0+l@#-X| zJg!mz*=;{t(sT0Scc+&ag9bT4Q6r6PFHpJXfoOM5PkqaMEN5hKDtXJkiDIQ9hGC8i zm8*n-#S91Y4kw%&)v4F{W|A0E*7PBKV7_{lcgv`F2?+cQ#%@~%nDdmSz{GTaJQx8<9UDtdX(JU|44sNubn!|P&Lj@{8Xpi4hooZ zsJR0d@XY2$F0J-s>+;anYm9+@i*t|cGm$jLcHoA<9N?62QNJI0{56Nf+&_IBaM{`4 zt8i|c$YGc<-yTR%tx?OH)D!Q{V3;4Om?k}S7v_Pu00U8g&ORzJZ#C`y-6sDO;3~A5)@V=LpJg{nXdQz?gJZ4|XrUO#4gi7CI|mT__H1uafl{_+D-D~IQaMY$Jj zn2&Ek{RkH3@q`aL$Ti7p$S;*D`c?$f*NaaTxb}4Aq5y3^k2rW5>--RHkw~#Tzb4&E zc|EXaY`yhmY_rw;J3w284X%WfamvP{y%&uGQ@K#oSmVw<0GAcWuz{0QirD=_C|zvY z1c1#>3YgH#WrpTx|34pjE0?qcY4dZ&$G$HE#wXyQ>&`qcxZDjOmD#z@yPWS0Xo6>V zOvz6M{K>TXBy?Ls4M4=x%)-^sMmdvr9fIIdW^)VaLi@uDOe`h3n|NLTg)QwT7fT1}?!(YIo4ABFjF ztp<)GAhMpGNKR~jiB0^iCMx%(tu9FkQ`y#c#6fN%Ga!6X{Viq)DwLSpxS$wgnn+=v z{+c!<^ziwYg)9w8?UD45=!maaDQ}Vg=Jn~2Ak4Z&)kSld0W(o){6=S z8GM=i=M4JR*}

zrzRk6Nu6~M{Bt@-dzTlMFMQGm@YYw`g2C3*+*WvxJd0N+gx5` zLuEoHAo|#o6S24UOhOhVG>G5R0<|3TsJAitE^7?+)+WC_<)2chOlDXhPLsjUz3H*g z6YYZQohPoQ+nQ)-C>^u=m|%ydcT|1uc>nyU+Alk)b?(U-_CEBkHTm;bxFMN6g2%lL z24_e&XkuIBi1nurYi$8DjWuk4jT?613w`V7kx4_dM1kz52KJn>;gTKVX6-s(wj`7TfroRQ)s$&YY zI|!)sh(r1H;L?Hs1fXRW_{iFC`^6uH=ic&Oz-bsYoklJH9anr&I`H)Qs{?_Bq7!pT zjk%;thuO`nrFQOf-}3PZ2eaYboz2c(a!P%q&7Ifn?Wkod$k~2nqtZ5fHK@)0>2BH= zDK-e?!A54UX4oya{;`GJPHy7WjAX4q*o|12uVEZ>kiaAW`g3#3@!fg#aT9KU;lA~H z+K_5=T=ULv!OpvkF(}Ssj4bhojue~XZ`=tss~X#P(_N#)2Cn`-?HY9y8S6Q=rVQxk zr=DkMSSGzyvJT8<@UJMd}?|3 z4$z5zb@q(>Jw$dGTTjUd?G1JItDd?C-8+)KH{SBY*s2JqRs|#vYn70m9Y_yOt1ixS z+p?T%=?l@!C9x7FIq;0tNHOEl{EXxs9)-=Bz5v-V=}iCwR~{marAz(cVeqAa(sR)w zMab}x+7vG!blJK*^*=jpHMY)nVAe_xO?QGq&bcU0q*^^G&u;`#quLnTk)=Imdls(D ziuio_3^>d6I?J_6B2Xo`pd=aJ#L-5{8wHi=Gy1Gjg(M>7kQUnZ=3#E;lRs&*nbfCg zhQUREktFo}1g4~l;@7=>4MDU{3>?ce(YqwIbAh@z!#R#axSv68_}$?N92#qcejOv0 z7yb!R{oWc;X-R0*r!n7?q;8lbmLaFN(}o1Nh*}D^vb$IMxUI&IZ@0RY-l>8<-KeO56vpynGrq)|p^XX)y0Zp=u*V+h8M?ra7l;)czB~6x^ zeB`6hr?M*75P^Zg-V^Q76sFmH4-ZPF_l%DNjxm8*D)`D6-aGs;q zD5THahBo9sKac<{q{6go4bC12fs~2a?vHr+siN?J9*wi9N&+ihx}X~aoRGrFO%URl zC3Qnh^_Cx%rdn=(1Qog*ImHIpO;B*CuQ;@J9bcH-97kQXODcJObi}?IFp&>KFDRdn z`Q%|up}S=-jT$%2!oP%m!`}e_0B&quQuYsXiCNdG0BG`Z{qGVKP7}Q&j@)=TWA>YL zAUQdv$yQbBq|_F;LuPgNnKA?&Bqk_g`cCL~FZDUnZr{EcH*#)tTXNQliKf#eXThzZ zsXJ%Z14`JJ7&A}$YVkRToyH&&K*$!w^s(w6zj7(_>-bnN6_&16mvrDO_ zAfb}|oV1Tcq!=i%*UOKO-E*0+F|`@NG%Q+-9mbC}?tfQ*@A}N2iydH73 zbZ_<#)_t)v6L_ijQYY-$nhPNAnk88B+0Q}0QvQ~v7UctmOrIBj1;-S000fOJ(}w_2 z=^_U~q;jb-IM#}G!u@#Z_emE(VR9GA3&gu1ef?*yBBbt zVsv={+Yq|>+r-FmT84QLFtv0OL$2rEy*e((x5u#YrYL~W*^0l&Bp}zG*~;~={Pa#W z)pkNHheP`vX{2u|!*0U80idS&@Aa#bX-l$y+I!i_`OuE_R%|lYo)qi4#d1#a)s62POTbP)gzT0ixH-{CXFkHFeW3)&_=JNZullW_vUI?Wycz61z*iiz zxN+^0CS>g8o%{&i#7a0a%wk26f|_{Cf7@rU6JW@0E<(8@O-T6VU??nzmslRie@Ai( zI`);?uRHFk3{5Fun05FZCBVBrgxolh85FOhJ8lyNcgQy2e(wbbeEbdB%%EIjU7IL# z76))B=HL&;^79go=a2v?OLCWMcRBh9Ibv-6QhkzzUl0^{=cetp8g$Fa?}YHI=fv21 zoOLf?`eh<6A0t;#RZ~-+%_KXl$bqXBv%Jzfx&@+0%tJiuEI%(KEPQ$h3mEf&;0FeQ zYwH%&dI7lVAIc!de^LgAUi{a`8Dt=z!|=C{C^8&5d&u&*@|}~ySU+Qc)+xWmKt42^ z-CJy|WUDt!i`}SBW-T+jN(z{7x$Fif+CROrniEo%s@-FDx;D*|#r-?YW3@HQ9*_g3 z)u2z-F2cgIk6%EVVE@NH;ygDFg=rB=ruS-J4hrRWuiNEr1CA>Ul!RHqJ?5$5lSeJz ze1xX^0V2<~_Ms7`Quj^W#v1TXE01zPl}k*vY5q#4Ng@R{tqn2Z6txqx&&{FTo0U;U zjZufEAd4&g3W~Y@^f@wsm{H>}0IN>OL>RPq)s*NKcXN{cV5Pjo#$`W^u}d$$(YJ<> zv!e%9ShOpNB`pr%#w4V6eW%s4p`QwA?s2azh)G4Q3+!5ZwgX%BC?K_hYqVd%Ei}_R z^mmcvUDoR7ruao(U6IeyQ7G$!)|3cKAo6ia;knKQ3&3PS*tq##xx@u01v}JH@-m`PL|6*R;^s%%ByFxgNdsg~oc8-C;lPrqPPX`CK z)ggOut%!$abb9R4%RBVA@0W^3r`Prp?ipiXG6n;^tZV?uWNEsC7dXxDckg~X_gZhB zV#5nDs8PdB9OSQe#dc2C6u*jIG@nE7lHRi*Z?nV@FXHXHM_CtcdTjp&mz@f>D+Y== z_Om!tttpy+b8Lnn)QjE!7eI{=0J*X*ST!=$z|mKZ&mUHwpP8j^*(R?3HIprET*(c9z>;D`qUt2N3f5oJhrWlxoxfYe7u4nUd{Dwu-fVz;RUSe z#y_BTDTuDJR2z$7TsH~qv&=+jd{TMx;n_-S!ECr;b2GP3Iy(gW&|E9QP&>wWNb@ip z?S!ig$~?KWaoGlYcas3N3!v44(rrFId06s-BVbMXIVK!L;WVMbk&l8|6y|u7=JmCf zfBI=ZL(_w(JbP0qpEGi;$Ls2(v8(cRTB-NXWEjx60jr;DM6{|oDDk+05V${a>EZv? z$(cVwwfAxS3?sRgER`&wYtV*DiXn`Iv1O}>ER{&Qwvjz!DqUB|@{na1v{2UU3ezp5 zGE8I*6`En}Ydq6>9fuXp4ykf)=tZ#iprIps&lZoQdF0Y8W)7H0S zkd;EMCy|z8yBx^}j|2B9MJ-K}%3m6-D0WqWTCP~*zAEg`+`rbd(c;ocCB+s&BIj9hv371#z_4_-_D#^T(J_&oB)J5`aUDc=sk~SLgg^^S>7x8-dwv z^oWEpK_2?_t+N)^iY?B{(ufR_kAjVfeCcjI{GoTqyekpq(Dzi2%HSxOR&4i+10Ol? zhDVfe>6J7Ci8z`({}=c7LOV~+ixZUk<=3!@{y&uuk-N-lxO_yTfVacx&)&CXZ;(?c zk}AcTQdeUV+A19hdM#Er;#(`l2jc;=u=U|tESK=?ps^e=*(e= z>+uAC$AyR{=*#P$dHILF)?`@@rf}uC;}lWYAP&k@=*S+WuXmpJMEpDlvdXrHvz>gI z&kOw{r9UhGi_Mv(wO^Qude^`LYCUE_ZWFlyZ8h)gydqoKoHw^Rj=b4IER=pMv%K9! zdX)hd-aosZV6ld_Hh{sWxM9^~j433AjHY8o)q8C5E{bBJGPtp65Z zDV_zz#F$syPMy2@i}kq7EiBCt$N_g)JbNnV^ zJKsx#jQYASKtv!6UnYML=ZTuPxDy&y?MxVn7;x|QKjIe-JYKgITz1_Ii{CyQljKIm z+L~;yCXY-@lbhSHXqyx+(==4VTlK*Qm?qghxL~O{-hh54KeY%*VnE$AVP0F^hz}wj z1ELe{wvQ!?(9$W_f;I#NHr9IFu_1@C&9y;W^N+a!%#{5j1;$+z;^f3Y{8G>tE-%ZQ zcG)4tUa1UC`nooNPnsC!G)RD4-i~!1cwT6y%Tfy-ZdTo zAKd%F+hjRas z{3_g6H>!GuUki8_gBrFH4eOIE()iEo=wdg+0r`7~3b7+e_wd7`Q1iW7#En_Q6(;v= zMdqzZ(!kqE!HSstrA{7Z-NCZS{H14(o|L|MF$2L0l){mn8s0&XS)R_)c`a+h#x@)>k{zAgiE0Jq-@hIQ_S-ht0QDOUe! z4TL6ie*M!uQ%Z)o6PTXVj2J!n(c{>tM}S4{Z`qH$6M~0PS98*H={A$SuXm4^vn8msy&GBYX;HEH!eQY|67=4wru2)w8 zo^`lOi7v^ev}y==TgwBmm5QDS9L!9nu$(-ZUm{?FN(H^PR_WK@+T~(?o}U7(dR4?3 z%v87bi7%f4K(&0kFtz00pZCdtY8M4YQiMH-Z42o~_w+&y1T-?h53A?l23fJU$!P*HW)CD&=mS+S4ec7PCC()EuA>h(4xW9*9LH%_f>G-PapZIn7BqXl_(Y?906{@`~Wf2HJoG11>g?$sXG`Woj*lB%=g2c!*pN z^K@=YtMTQzlz#xn8$+E~gDhYi;uzlo9Xt;Ql%glb)WYMG3K!A=mpKhjv;eV-G3{E*XgUuzvG~I3dM&}O;iaye0+X)f)XqmF}QS~d?!F2 z1l1E@Wd+yc@Dv2#yZBKNy;zg)vniCh8WH+V@zgd_?JgM0l`=98;OZ6KS}@FmErGM! zO-fg}Bf@UBA?YS$MVLDS4L1!}5xP}VMvt@vUl@uLE+A#xdyCFw8zZZ=A|GGrwY)@{ zOwL?839Q&%edj6|ryeI$BzfybuqKj$kT}2x;uIb^cAVDT@m_p+H{6kX+qf474jx(u zv@=5MzF?J)1FXx=WE0+)gORg`-f1L_nsq^f&Cz)Du!2od!9Vc%+oA4#e{Fx=W6vYd zphIL72NER6xj=XN4@VL>xyW~O*`jl$AsDLmfr)x$F32dcZ_0WT=D(S-*eU0XLaPFN z*Hwg8L!-CM(AOQ6Hz-WD1`^@H3!D7HkJIPaN)(+QxfyJ z$xEq^LonqvAgv`+8EonC~ z&aUTMIG&@$W4+Dk$$t9}-YUSY$o7nVi#ql0_z*llnxTQNu>FwSp!@eQ^*`)R^nAVh zfNDcb<+6Jmh>S4-5U8^fECii=^K#ENBF`Vf=FU8CeYzv@l$?eA>^hVEIo6v_gf|e4 zBucxnY{2h070LLs(7!i#0Glajh%&_Msv65*@d6t#55?GCU`MkVf5H265B}ZEX?077 z1A^kq4oG)#;Iex!*!O$)fbaxBd9pd#u>uZLjKSaQ70R4VQTiC}E^+=*z{?1+}s%grxr=p3s!57`b#XDujE!LX0k z_Pn5%T%|{(;z*@izs$itQdgEZE}#5ds9teK3|9Fh-Qpl;ICRZbT^3cCyCUp8au9cI z<(4Y$oZ1M&3R~#pghrM975BIG6LIOVs$F6ZJy=tHU`xPL5>*{$_e3lv*gmCTNnPgC zEZ9=F6C38P)P)c@5LD!mLb-;jYsa?T*OMV{HU#~-z^!7YuUj|lIIy1!oC)K*?x1wN z?QfPcBaS{DPU4CS`p_2tavJ_*hr5O6JLCoK)qu}OjU@_C{V3A^Ise$*P1ar4^2{SQ zC5H8|o93@K_R8V2`KeCd_tH1$>#UNK4}Zr6^UP~N8dv>RY61XIx$PG}UQ~Kwuv%#I zOl6QHYyfI@3-W*_RLlIK#N3+zXD>n|w*|-21*5&&m*;1yDa*$J0 zxl@92Q$@1+PiZWyFxj3UWt)*)5I0YVA8_IE6C@&E_>du#!^fjGzTf4lGWLW+FT@IR z#1vSMLYFg*)#eUlp)Uwf$-UZMhNH2xsE=5*aDuP_uW45#5;2P94+^p*G+kHReKLiT zh&a4~1+96T8)H^PVeooFE<{kZo;v4NEKU8lFS~oS3k$fV=Y0Pw&D-c5NW{+c#7Z#q zmW$B0i!b{iFPs<(2sh^~zW5}32|4;F`ovB|<-q`076gGtG$zralLP`T|9Nt=b zT=Ok zQGTRXRB``uw6bHKUW=il7Y8vT?-7h!zjFA)gTtfY`fE2k$83Uwbr_DdL!rS9Ymuu& z*Ocij^Pho)t((`UX1XzJ@w5Fm)HvZ;+k#P#M{=wd2bl?~E0>agrY{l|TQkCRa>kj= zgzMwqn%CBek{73D{E`z*f_;+8l0Vne7!8$JJKr+p&?|(tv>$({t$bl_J==+tE8N@_ zg3~h#xUBZcb>AALs8%xhrB=hGTa7yD8~x0!y|0n-Lw3G>DhoypQDL5HD+_e7;XHC%ym$uO_h3(b2xB4@GqikTqnH{m=rSD@&i z&Pyd(HtsfCTxTZWa&pZhLkZ|C_o*4TWMAW8q503wQx$Zvd+vxE{@JbYg4i znar>ks_lKS;BU*oq9?{C<)K1Ic3;m>5WdMG;5{=fFhrqUU~|axc2Vv7WLf;;S7utJ z?veDc2snujgvvJ*`e8m6vnFEp<5>Iaz@niWo+Q43`tVhkWT(D}DOi$Qyq@iIm>1c6 zPuuoz_H@9(_UIkt?;V&<+9S^M{IS>XEE_MRjMFi}D%z=+N7ZCk<1y+Tk2o&{+b-q_ zA=6KbYGqPB|7ZMrrOWZ@mlIDguHzp#(J6Q<_)Z1KwqI8#c%am5amaaUl78Y>^zr}s b!B~?t+WWKS5u5)CcMJGaRz{_UZlwPKNp@r} literal 0 HcmV?d00001 diff --git a/build/manifest.json b/build/manifest.json new file mode 100644 index 0000000..2f2be64 --- /dev/null +++ b/build/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/build/precache-manifest.ea82dc23791e9ecfe897cd51df1da56b.js b/build/precache-manifest.ea82dc23791e9ecfe897cd51df1da56b.js new file mode 100644 index 0000000..487a29b --- /dev/null +++ b/build/precache-manifest.ea82dc23791e9ecfe897cd51df1da56b.js @@ -0,0 +1,26 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "3821f50caf7631bef79612d7d17eeac5", + "url": "/index.html" + }, + { + "revision": "58ecfd814e3b8028895d", + "url": "/static/css/2.8a8a300c.chunk.css" + }, + { + "revision": "46f8cd52c831966eacfa", + "url": "/static/css/main.d0a9e55e.chunk.css" + }, + { + "revision": "58ecfd814e3b8028895d", + "url": "/static/js/2.1a4d3499.chunk.js" + }, + { + "revision": "46f8cd52c831966eacfa", + "url": "/static/js/main.2af20b4a.chunk.js" + }, + { + "revision": "98c0dadde4ddefef1f47", + "url": "/static/js/runtime-main.097ce451.js" + } +]); \ No newline at end of file diff --git a/build/robots.txt b/build/robots.txt new file mode 100644 index 0000000..fa06a75 --- /dev/null +++ b/build/robots.txt @@ -0,0 +1,2 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * diff --git a/build/service-worker.js b/build/service-worker.js new file mode 100644 index 0000000..85fe246 --- /dev/null +++ b/build/service-worker.js @@ -0,0 +1,39 @@ +/** + * Welcome to your Workbox-powered service worker! + * + * You'll need to register this file in your web app and you should + * disable HTTP caching for this file too. + * See https://goo.gl/nhQhGp + * + * The rest of the code is auto-generated. Please don't update this file + * directly; instead, make changes to your Workbox build configuration + * and re-run your build process. + * See https://goo.gl/2aRDsh + */ + +importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); + +importScripts( + "/precache-manifest.ea82dc23791e9ecfe897cd51df1da56b.js" +); + +self.addEventListener('message', (event) => { + if (event.data && event.data.type === 'SKIP_WAITING') { + self.skipWaiting(); + } +}); + +workbox.core.clientsClaim(); + +/** + * The workboxSW.precacheAndRoute() method efficiently caches and responds to + * requests for URLs in the manifest. + * See https://goo.gl/S9QRab + */ +self.__precacheManifest = [].concat(self.__precacheManifest || []); +workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); + +workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), { + + blacklist: [/^\/_/,/\/[^\/?]+\.[^\/]+$/], +}); diff --git a/build/static/css/2.8a8a300c.chunk.css b/build/static/css/2.8a8a300c.chunk.css new file mode 100644 index 0000000..026db52 --- /dev/null +++ b/build/static/css/2.8a8a300c.chunk.css @@ -0,0 +1,6 @@ +/*! + * FilePond 4.9.4 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:""}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;box-shadow:0 0 0 0 hsla(0,0%,100%,0);transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1 1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:"";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status,.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:"";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:"";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em} +/*# sourceMappingURL=2.8a8a300c.chunk.css.map */ \ No newline at end of file diff --git a/build/static/css/2.8a8a300c.chunk.css.map b/build/static/css/2.8a8a300c.chunk.css.map new file mode 100644 index 0000000..de3b227 --- /dev/null +++ b/build/static/css/2.8a8a300c.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["filepond.min.css"],"names":[],"mappings":"AAAA;;;;EAIE,CAGF,qBAAqB,iBAAiB,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,0BAA0B,CAAC,4BAA4B,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,qCAAqC,iBAAiB,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,WAAW,CAAC,gBAAgB,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,qBAAqB,sCAAsC,CAAC,8BAA8B,CAAC,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC,eAAe,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,2CAA2C,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,6BAA6B,CAAC,sBAAsB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,iDAAiD,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,4BAA4B,cAAc,CAAC,gBAAgB,CAAC,eAAe,CAAC,iBAAiB,CAAC,eAAe,CAAC,wBAAwB,yBAAyB,CAAC,gCAAgC,CAAC,6BAA6B,CAAC,qCAAqC,CAAC,6BAA6B,CAAC,cAAc,CAAC,2DAA2D,UAAU,CAAC,2DAA2D,aAAa,CAAC,aAAa,CAAC,cAAc,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,6BAA6B,CAAC,gEAAgE,iBAAiB,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,0BAA0B,CAAC,4BAA4B,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,+DAA+D,UAAU,CAAC,WAAW,CAAC,iEAAiE,iBAAiB,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,8BAA8B,WAAW,CAAC,UAAU,CAAC,iBAAiB,CAAC,+BAA+B,CAAC,qBAAqB,CAAC,oCAAoC,CAAC,kCAAkC,CAAC,wEAAwE,0CAA0C,CAAC,wCAAwC,wBAAwB,CAAC,gCAAgC,CAAC,qBAAqB,eAAe,CAAC,YAAY,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,QAAM,CAAC,iBAAiB,CAAC,WAAW,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,uBAAuB,QAAQ,CAAC,+CAA+C,eAAe,CAAC,eAAe,CAAC,sBAAsB,CAAC,eAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,8CAA8C,gBAAgB,CAAC,UAAU,CAAC,mCAAmC,CAAC,kBAAkB,CAAC,oDAAoD,YAAY,CAAC,uBAAuB,eAAe,CAAC,YAAY,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,yBAAyB,QAAQ,CAAC,kBAAkB,CAAC,mDAAmD,eAAe,CAAC,eAAe,CAAC,kDAAkD,gBAAgB,CAAC,UAAU,CAAC,mCAAmC,CAAC,+CAA+C,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,sDAAsD,iBAAiB,CAAC,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,0BAA0B,CAAC,4BAA4B,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,gBAAgB,eAAe,CAAC,YAAY,CAAC,WAAW,CAAC,sBAAsB,CAAC,eAAe,CAAC,UAAU,CAAC,kBAAkB,CAAC,uCAAuC,gBAAgB,CAAC,mBAAmB,CAAC,yDAAyD,mBAAmB,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,SAAS,CAAC,qJAAqJ,iBAAiB,CAAC,mCAAmC,YAAY,CAAC,oCAAoC,aAAa,CAAC,qCAAqC,wBAAwB,CAAC,qCAAqC,cAAc,CAAC,oCAAoC,uBAAuB,CAAC,8CAA8C,kBAAkB,CAAC,iEAAiE,oBAAoB,CAAC,gEAAgE,mBAAmB,CAAC,0KAA0K,mBAAmB,CAAC,4FAA4F,4CAA4C,CAAC,oCAAoC,CAAC,kJAAkJ,SAAS,CAAC,gRAAgR,UAAU,CAAC,8NAA8N,wCAAwC,CAAC,gCAAgC,CAAC,mEAAmE,yCAAyC,CAAC,iCAAiC,CAAC,wBAAwB,GAAG,8BAA8B,CAAC,sBAAsB,CAAC,GAAG,+BAA+B,CAAC,uBAAuB,CAAC,CAAC,gBAAgB,GAAG,8BAA8B,CAAC,sBAAsB,CAAC,GAAG,+BAA+B,CAAC,uBAAuB,CAAC,CAAC,yBAAyB,QAAQ,sCAAsC,CAAC,8BAA8B,CAAC,QAAQ,oCAAoC,CAAC,4BAA4B,CAAC,YAAY,oCAAoC,CAAC,4BAA4B,CAAC,QAAQ,mCAAmC,CAAC,2BAA2B,CAAC,CAAC,iBAAiB,QAAQ,sCAAsC,CAAC,8BAA8B,CAAC,QAAQ,oCAAoC,CAAC,4BAA4B,CAAC,YAAY,oCAAoC,CAAC,4BAA4B,CAAC,QAAQ,mCAAmC,CAAC,2BAA2B,CAAC,CAAC,wBAAwB,GAAG,SAAS,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,IAAI,SAAS,CAAC,4BAA4B,CAAC,oBAAoB,CAAC,6CAA6C,CAAC,qCAAqC,CAAC,GAAG,0BAA0B,CAAC,kBAAkB,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,CAAC,gBAAgB,GAAG,SAAS,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,IAAI,SAAS,CAAC,4BAA4B,CAAC,oBAAoB,CAAC,6CAA6C,CAAC,qCAAqC,CAAC,GAAG,0BAA0B,CAAC,kBAAkB,CAAC,0CAA0C,CAAC,kCAAkC,CAAC,CAAC,iDAAiD,mBAAmB,CAAC,qDAAqD,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,8BAA8B,WAAW,CAAC,8BAA8B,WAAW,CAAC,uBAAuB,WAAW,CAAC,qBAAqB,WAAW,CAAC,gBAAgB,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,6BAA6B,CAAC,iCAAiC,UAAU,CAAC,yDAAyD,oDAAoD,CAAC,yEAAyE,gCAAgC,CAAC,iCAAiC,mBAAmB,CAAC,WAAW,CAAC,kDAAkD,uCAAuC,CAAC,4BAA4B,CAAC,sCAAsC,uBAAuB,CAAC,eAAe,CAAC,uDAAuD,4CAA4C,CAAC,6DAA6D,SAAS,CAAC,sBAAsB,wBAAwB,CAAC,qEAAqE,wBAAwB,CAAC,kHAAkH,wBAAwB,CAAC,sBAAsB,kBAAkB,CAAC,gCAAgC,CAAC,yBAAyB,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,8CAA8C,iBAAiB,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,uEAAuE,CAAC,+DAA+D,CAAC,8DAA8D,QAAQ,CAAC,OAAO,CAAC,4CAA4C,sBAAsB,CAAC,qDAAqD,SAAS,CAAC,uDAAuD,QAAQ,CAAC,kDAAkD,+BAA+B,CAAC,qBAAqB,CAAC,gCAAgC,CAAC,2BAA2B,CAAC,+BAA+B,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,gBAAgB,UAAU,CAAC,WAAW,CAAC,qDAAqD,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,QAAQ,CAAC,kJAAkJ,eAAe,CAAC,sJAAsJ,YAAY,CAAC,kJAAkJ,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,SAAS,CAAC,kJAAkJ,YAAY,CAAC,yJAAyJ,eAAe,CAAC,WAAW,CAAC,YAAY,CAAC,eAAe,CAAC,uIAAuI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,uIAAuI,QAAQ,CAAC,uJAAuJ,WAAW,CAAC,iDAAiD,sBAAsB,CAAC,eAAe,CAAC,kEAAkE,qBAAqB,CAAC,kNAAkN,YAAY,CAAC,sBAAsB,kBAAkB,CAAC,wBAAwB,CAAC,iBAAiB,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,2CAA2C,qBAAqB,CAAC,0CAA0C,YAAY,CAAC,qCAAqC,mCAAmC,CAAC,2BAA2B,CAAC,sCAAsC,CAAC,qBAAqB,CAAC,qEAAqE,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,6CAA6C,WAAW,CAAC,qBAAqB,qCAAqC,CAAC,sCAAsC,CAAC,4BAA4B,CAAC,2BAA2B,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,wBAAwB,CAAC,gDAAgD,qBAAqB,CAAC,kCAAkC,CAAC,0BAA0B,CAAC,iCAAiC,CAAC,yBAAyB,CAAC,uCAAuC,CAAC,+BAA+B,CAAC,wBAAwB,kCAAkC,CAAC,mCAAmC,CAAC,yBAAyB,CAAC,+BAA+B,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,wBAAwB,sBAAsB,CAAC,yBAAyB,CAAC,4BAA4B,CAAC,yBAAyB,CAAC,qCAAqC,iBAAiB,CAAC,8BAA8B,eAAe,CAAC,YAAY,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,6BAA6B,CAAC,kCAAkC,UAAU,CAAC,WAAW,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,mCAAmC,SAAS,CAAC,mBAAmB,CAAC,yBAAyB,SAAS,CAAC,sBAAsB,SAAS,CAAC,gBAAgB,SAAS,CAAC,iCAAiC,SAAS,CAAC,mBAAmB,SAAS,CAAC,gBAAgB,qBAAqB,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,CAAC,kBAAkB,CAAC,wIAAwI,CAAC,eAAe,CAAC,eAAe,CAAC,iCAAiC,CAAC,aAAa,CAAC,yBAAyB,CAAC,kBAAkB,kBAAkB,CAAC,mBAAmB,CAAC,2BAA2B,iBAAiB,CAAC,+BAA+B,mBAAmB,CAAC,sCAAsC,iBAAiB,CAAC,yCAAyC,cAAc,CAAC,iBAAiB","file":"2.8a8a300c.chunk.css","sourcesContent":["/*!\n * FilePond 4.9.4\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:\"\"}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;box-shadow:0 0 0 0 hsla(0,0%,100%,0);transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status,.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:\"\";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:\"\";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}"]} \ No newline at end of file diff --git a/build/static/css/main.d0a9e55e.chunk.css b/build/static/css/main.d0a9e55e.chunk.css new file mode 100644 index 0000000..6a43d91 --- /dev/null +++ b/build/static/css/main.d0a9e55e.chunk.css @@ -0,0 +1,2 @@ +body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{text-align:center}.App-logo{height:40vmin}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#09d3ac}.fileUploadBox{margin:10px 20px} +/*# sourceMappingURL=main.d0a9e55e.chunk.css.map */ \ No newline at end of file diff --git a/build/static/css/main.d0a9e55e.chunk.css.map b/build/static/css/main.d0a9e55e.chunk.css.map new file mode 100644 index 0000000..4f65be4 --- /dev/null +++ b/build/static/css/main.d0a9e55e.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["index.css","App.css","toolbar.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mIAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,uEAEF,CCZA,KACE,iBACF,CAEA,UACE,aACF,CAEA,YACE,wBAAyB,CACzB,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BAA6B,CAC7B,UACF,CAEA,UACE,aACF,CCrBA,eACI,gBACJ","file":"main.d0a9e55e.chunk.css","sourcesContent":["body {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\",\r\n \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\r\n sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\r\n monospace;\r\n}\r\n",".App {\r\n text-align: center;\r\n}\r\n\r\n.App-logo {\r\n height: 40vmin;\r\n}\r\n\r\n.App-header {\r\n background-color: #282c34;\r\n min-height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: calc(10px + 2vmin);\r\n color: white;\r\n}\r\n\r\n.App-link {\r\n color: #09d3ac;\r\n}\r\n",".fileUploadBox {\r\n margin: 10px 20px;\r\n}"]} \ No newline at end of file diff --git a/build/static/js/2.1a4d3499.chunk.js b/build/static/js/2.1a4d3499.chunk.js new file mode 100644 index 0000000..d96fcf6 --- /dev/null +++ b/build/static/js/2.1a4d3499.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonponline-editor"]=this["webpackJsonponline-editor"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(69)},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return a}));var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function r(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}},,function(e,t,n){"use strict";var i=n(29),r=n(92),o=n(93);function s(e){var t={},n=function(n){var i;e.hasOwnProperty(n)&&Object.defineProperty(t,n,{get:function(){return void 0===i&&(i=Object(o.a)(e[n]).toString()),i},enumerable:!0,configurable:!0})};for(var i in e)n(i);return t}var a=n(1),l=n(56),c=n(32),u=n(10),d=n(16),h=n(14);function f(e){u.a.getInstance().insertRule("@font-face{"+Object(h.b)(Object(d.a)(),e)+"}",!0)}var p=l.a.getValue("icons",{__options:{disableWarnings:!1,warnOnMissingIcons:!0},__remapped:{}}),g=u.a.getInstance();g&&g.onReset&&g.onReset((function(){for(var e in p)p.hasOwnProperty(e)&&p[e].subset&&(p[e].subset.className=void 0)}));var m=function(e){return e.toLowerCase()};function v(e,t){var n=a.a({},e,{isRegistered:!1,className:void 0}),i=e.icons;for(var r in t=t?a.a({},p.__options,t):p.__options,i)if(i.hasOwnProperty(r)){var o=i[r],s=m(r);p[s]?S(r):p[s]={code:o,subset:n}}}function b(e,t){p.__remapped[m(e)]=m(t)}function y(e){var t=void 0,n=p.__options;if(e=e?m(e):"",e=p.__remapped[e]||e)if(t=p[e]){var i=t.subset;i&&i.fontFace&&(i.isRegistered||(f(i.fontFace),i.isRegistered=!0),i.className||(i.className=Object(o.a)(i.style,{fontFamily:i.fontFace.fontFamily,fontWeight:i.fontFace.fontWeight||"normal",fontStyle:i.fontFace.fontStyle||"normal"})))}else!n.disableWarnings&&n.warnOnMissingIcons&&Object(c.a)('The icon "'+e+'" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.');return t}var _=[],w=void 0;function S(e){var t=p.__options;t.disableWarnings||(_.push(e),void 0===w&&(w=setTimeout((function(){Object(c.a)("Some icons were re-registered. Applications should only call registerIcons for any given icon once. Redefining what an icon is may have unintended consequences. Duplicates include: \n"+_.slice(0,10).join(", ")+(_.length>10?" (+ "+(_.length-10)+" more)":"")),w=void 0,_=[]}),2e3)))}function E(e){var t=u.a.getInstance(),n=t.getClassName(),i=[];for(var r in e)e.hasOwnProperty(r)&&i.push(r,"{",Object(h.b)(Object(d.a)(),e[r]),"}");var o=i.join("");return t.insertRule("@keyframes "+n+"{"+o+"}",!0),t.cacheClassName(n,o,[],["keyframes",o]),n}var C="cubic-bezier(.1,.9,.2,1)",T="cubic-bezier(.1,.25,.75,.9)",x=E({from:{opacity:0},to:{opacity:1}}),k=E({from:{opacity:1},to:{opacity:0,visibility:"hidden"}}),M=ae(-10),R=ae(-20),I=ae(-40),L=ae(-400),A=ae(10),O=ae(20),$=ae(40),D=ae(400),P=le(10),F=le(20),N=le(-10),B=le(-20),H=ce(10),W=ce(20),j=ce(40),U=ce(400),z=ce(-10),V=ce(-20),G=ce(-40),K=ce(-400),q=ue(-10),Y=ue(-20),X=ue(10),Q=ue(20),Z=E({from:{transform:"scale3d(.98,.98,1)"},to:{transform:"scale3d(1,1,1)"}}),J=E({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(.98,.98,1)"}}),ee=E({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),te=E({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),ne=E({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(90deg)"}}),ie=E({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(-90deg)"}}),re={easeFunction1:C,easeFunction2:T,durationValue1:"0.167s",durationValue2:"0.267s",durationValue3:"0.367s",durationValue4:"0.467s"},oe={slideRightIn10:se(x+","+M,"0.367s",C),slideRightIn20:se(x+","+R,"0.367s",C),slideRightIn40:se(x+","+I,"0.367s",C),slideRightIn400:se(x+","+L,"0.367s",C),slideLeftIn10:se(x+","+A,"0.367s",C),slideLeftIn20:se(x+","+O,"0.367s",C),slideLeftIn40:se(x+","+$,"0.367s",C),slideLeftIn400:se(x+","+D,"0.367s",C),slideUpIn10:se(x+","+P,"0.367s",C),slideUpIn20:se(x+","+F,"0.367s",C),slideDownIn10:se(x+","+N,"0.367s",C),slideDownIn20:se(x+","+B,"0.367s",C),slideRightOut10:se(k+","+H,"0.367s",C),slideRightOut20:se(k+","+W,"0.367s",C),slideRightOut40:se(k+","+j,"0.367s",C),slideRightOut400:se(k+","+U,"0.367s",C),slideLeftOut10:se(k+","+z,"0.367s",C),slideLeftOut20:se(k+","+V,"0.367s",C),slideLeftOut40:se(k+","+G,"0.367s",C),slideLeftOut400:se(k+","+K,"0.367s",C),slideUpOut10:se(k+","+q,"0.367s",C),slideUpOut20:se(k+","+Y,"0.367s",C),slideDownOut10:se(k+","+X,"0.367s",C),slideDownOut20:se(k+","+Q,"0.367s",C),scaleUpIn100:se(x+","+Z,"0.367s",C),scaleDownIn100:se(x+","+ee,"0.367s",C),scaleUpOut103:se(k+","+te,"0.167s",T),scaleDownOut98:se(k+","+J,"0.167s",T),fadeIn100:se(x,"0.167s",T),fadeIn200:se(x,"0.267s",T),fadeIn400:se(x,"0.367s",T),fadeIn500:se(x,"0.467s",T),fadeOut100:se(k,"0.167s",T),fadeOut200:se(k,"0.267s",T),fadeOut400:se(k,"0.367s",T),fadeOut500:se(k,"0.467s",T),rotate90deg:se(ne,"0.1s",T),rotateN90deg:se(ie,"0.1s",T)};function se(e,t,n){return{animationName:e,animationDuration:t,animationTimingFunction:n,animationFillMode:"both"}}function ae(e){return E({from:{transform:"translate3d("+e+"px,0,0)"},to:{transform:"translate3d(0,0,0)"}})}function le(e){return E({from:{transform:"translate3d(0,"+e+"px,0)"},to:{transform:"translate3d(0,0,0)"}})}function ce(e){return E({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d("+e+"px,0,0)"}})}function ue(e){return E({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(0,"+e+"px,0)"}})}var de,he,fe={themeDarker:"#004578",themeDark:"#005a9e",themeDarkAlt:"#106ebe",themePrimary:"#0078d4",themeSecondary:"#2b88d8",themeTertiary:"#71afe5",themeLight:"#c7e0f4",themeLighter:"#deecf9",themeLighterAlt:"#eff6fc",black:"#000000",blackTranslucent40:"rgba(0,0,0,.4)",neutralDark:"#201f1e",neutralPrimary:"#323130",neutralPrimaryAlt:"#3b3a39",neutralSecondary:"#605e5c",neutralSecondaryAlt:"#8a8886",neutralTertiary:"#a19f9d",neutralTertiaryAlt:"#c8c6c4",neutralQuaternary:"#d2d0ce",neutralQuaternaryAlt:"#e1dfdd",neutralLight:"#edebe9",neutralLighter:"#f3f2f1",neutralLighterAlt:"#faf9f8",accent:"#0078d4",white:"#ffffff",whiteTranslucent40:"rgba(255,255,255,.4)",yellowDark:"#d29200",yellow:"#ffb900",yellowLight:"#fff100",orange:"#d83b01",orangeLight:"#ea4300",orangeLighter:"#ff8c00",redDark:"#a4262c",red:"#e81123",magentaDark:"#5c005c",magenta:"#b4009e",magentaLight:"#e3008c",purpleDark:"#32145a",purple:"#5c2d91",purpleLight:"#b4a0ff",blueDark:"#002050",blueMid:"#00188f",blue:"#0078d4",blueLight:"#00bcf2",tealDark:"#004b50",teal:"#008272",tealLight:"#00b294",greenDark:"#004b1c",green:"#107c10",greenLight:"#bad80a"},pe={elevation4:"0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)",elevation8:"0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)",elevation16:"0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)",elevation64:"0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)",roundedCorner2:"2px"};!function(e){e.Arabic="Segoe UI Web (Arabic)",e.Cyrillic="Segoe UI Web (Cyrillic)",e.EastEuropean="Segoe UI Web (East European)",e.Greek="Segoe UI Web (Greek)",e.Hebrew="Segoe UI Web (Hebrew)",e.Thai="Leelawadee UI Web",e.Vietnamese="Segoe UI Web (Vietnamese)",e.WestEuropean="Segoe UI Web (West European)",e.Selawik="Selawik Web",e.Armenian="Segoe UI Web (Armenian)",e.Georgian="Segoe UI Web (Georgian)"}(de||(de={})),function(e){e.Arabic="'"+de.Arabic+"'",e.ChineseSimplified="'Microsoft Yahei UI', Verdana, Simsun",e.ChineseTraditional="'Microsoft Jhenghei UI', Pmingliu",e.Cyrillic="'"+de.Cyrillic+"'",e.EastEuropean="'"+de.EastEuropean+"'",e.Greek="'"+de.Greek+"'",e.Hebrew="'"+de.Hebrew+"'",e.Hindi="'Nirmala UI'",e.Japanese="'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka",e.Korean="'Malgun Gothic', Gulim",e.Selawik="'"+de.Selawik+"'",e.Thai="'Leelawadee UI Web', 'Kmer UI'",e.Vietnamese="'"+de.Vietnamese+"'",e.WestEuropean="'"+de.WestEuropean+"'",e.Armenian="'"+de.Armenian+"'",e.Georgian="'"+de.Georgian+"'"}(he||(he={}));var ge,me,ve,be="'Segoe UI', '"+de.WestEuropean+"'",ye={ar:he.Arabic,bg:he.Cyrillic,cs:he.EastEuropean,el:he.Greek,et:he.EastEuropean,he:he.Hebrew,hi:he.Hindi,hr:he.EastEuropean,hu:he.EastEuropean,ja:he.Japanese,kk:he.EastEuropean,ko:he.Korean,lt:he.EastEuropean,lv:he.EastEuropean,pl:he.EastEuropean,ru:he.Cyrillic,sk:he.EastEuropean,"sr-latn":he.EastEuropean,th:he.Thai,tr:he.EastEuropean,uk:he.Cyrillic,vi:he.Vietnamese,"zh-hans":he.ChineseSimplified,"zh-hant":he.ChineseTraditional,hy:he.Armenian,ka:he.Georgian};function _e(e,t,n){return{fontFamily:n,MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontSize:e,fontWeight:t}}!function(e){e.mini="10px",e.xSmall="10px",e.small="12px",e.smallPlus="12px",e.medium="14px",e.mediumPlus="16px",e.icon="16px",e.large="18px",e.xLarge="20px",e.xLargePlus="24px",e.xxLarge="28px",e.xxLargePlus="32px",e.superLarge="42px",e.mega="68px"}(ge||(ge={})),function(e){e.light=100,e.semilight=300,e.regular=400,e.semibold=600,e.bold=700}(me||(me={})),function(e){e.xSmall="10px",e.small="12px",e.medium="16px",e.large="20px"}(ve||(ve={}));var we,Se=n(11),Ee=n(6);var Ce=function(e){var t=function(e){for(var t in ye)if(ye.hasOwnProperty(t)&&e&&0===t.indexOf(e))return ye[t];return be}(e)+", 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif";return{tiny:_e(ge.mini,me.regular,t),xSmall:_e(ge.xSmall,me.regular,t),small:_e(ge.small,me.regular,t),smallPlus:_e(ge.smallPlus,me.regular,t),medium:_e(ge.medium,me.regular,t),mediumPlus:_e(ge.mediumPlus,me.regular,t),large:_e(ge.large,me.regular,t),xLarge:_e(ge.xLarge,me.semibold,t),xLargePlus:_e(ge.xLargePlus,me.semibold,t),xxLarge:_e(ge.xxLarge,me.semibold,t),xxLargePlus:_e(ge.xxLargePlus,me.semibold,t),superLarge:_e(ge.superLarge,me.semibold,t),mega:_e(ge.mega,me.semibold,t)}}(function(){if(void 0===we){var e=Object(Se.a)(),t=function(e){var t=null;try{var n=Object(Ee.a)();t=n?n.localStorage.getItem(e):null}catch(i){}return t}("language");null!==t&&(we=t),void 0===we&&e&&(we=e.documentElement.getAttribute("lang")),void 0===we&&(we="en")}return we}());function Te(e,t,n,i){f({fontFamily:e="'"+e+"'",src:(void 0!==i?"local('"+i+"'),":"")+"url('"+t+".woff2') format('woff2'),url('"+t+".woff') format('woff')",fontWeight:n,fontStyle:"normal",fontDisplay:"swap"})}function xe(e,t,n,i,r){void 0===i&&(i="segoeui");var o=e+"/"+n+"/"+i;Te(t,o+"-light",me.light,r&&r+" Light"),Te(t,o+"-semilight",me.semilight,r&&r+" SemiLight"),Te(t,o+"-regular",me.regular,r),Te(t,o+"-semibold",me.semibold,r&&r+" SemiBold")}!function(e){if(e){var t=e+"/fonts";xe(t,de.Thai,"leelawadeeui-thai","leelawadeeui"),xe(t,de.Arabic,"segoeui-arabic"),xe(t,de.Cyrillic,"segoeui-cyrillic"),xe(t,de.EastEuropean,"segoeui-easteuropean"),xe(t,de.Greek,"segoeui-greek"),xe(t,de.Hebrew,"segoeui-hebrew"),xe(t,de.Vietnamese,"segoeui-vietnamese"),xe(t,de.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),xe(t,he.Selawik,"selawik","selawik"),xe(t,de.Armenian,"segoeui-armenian"),xe(t,de.Georgian,"segoeui-georgian"),Te("Leelawadee UI Web",t+"/leelawadeeui-thai/leelawadeeui-semilight",me.light),Te("Leelawadee UI Web",t+"/leelawadeeui-thai/leelawadeeui-bold",me.semibold)}}(function(){var e=Object(Ee.a)(),t=e?e.FabricConfig:void 0;return t&&void 0!==t.fontBaseUrl?t.fontBaseUrl:"https://static2.sharepointonline.com/files/fabric/assets"}());var ke="@media screen and (-ms-high-contrast: active)";function Me(e,t){return"@media only screen and (min-width: "+e+"px) and (max-width: "+t+"px)"}var Re,Ie=n(28);function Le(e,t,n,i,r,o,s){return Ae(e,"number"!==typeof t&&t?t:{inset:t,position:n,highContrastStyle:i,borderColor:r,outlineColor:o,isFocusedOnly:s})}function Ae(e,t){var n,i;void 0===t&&(t={});var r=t.inset,o=void 0===r?0:r,s=t.width,a=void 0===s?1:s,l=t.position,c=void 0===l?"relative":l,u=t.highContrastStyle,d=t.borderColor,h=void 0===d?e.palette.white:d,f=t.outlineColor,p=void 0===f?e.palette.neutralSecondary:f,g=t.isFocusedOnly,m=void 0===g||g;return{outline:"transparent",position:c,selectors:(n={"::-moz-focus-inner":{border:"0"}},n["."+Ie.a+" &"+(m?":focus":"")+":after"]={content:'""',position:"absolute",left:o+1,top:o+1,bottom:o+1,right:o+1,border:a+"px solid "+h,outline:a+"px solid "+p,zIndex:Re.FocusStyle,selectors:(i={},i[ke]=u,i)},n)}}function Oe(){return{selectors:{"&::-moz-focus-inner":{border:0},"&":{outline:"transparent"}}}}!function(e){e.Nav=1,e.ScrollablePane=1,e.FocusStyle=1,e.Coachmark=1e3,e.Layer=1e6,e.KeytipLayer=1000001}(Re||(Re={}));var $e={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden"};var De=n(27),Pe=Object(De.b)((function(e,t){var n=u.a.getInstance();return t?Object.keys(e).reduce((function(t,i){return t[i]=n.getClassName(e[i]),t}),{}):e}));function Fe(e,t,n){return Pe(e,void 0!==n?n:t.disableGlobalClassNames)}var Ne=n(12);n(43);function Be(e){for(var t=[],n=1;n-1;e[i]=o?r:He(e[i]||{},r,n)}else e[i]=r}return n.pop(),e}var We,je={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"},Ue=(n(57),Ge({palette:fe,semanticColors:Ke(fe,!1,!1),fonts:Ce,isInverted:!1,disableGlobalClassNames:!1}));if(!Ne.a.getSettings(["theme"]).theme){var ze=Object(Ee.a)();ze&&ze.FabricConfig&&ze.FabricConfig.theme&&(Ue=Ge(ze.FabricConfig.theme)),Ne.a.applySettings(((We={}).theme=Ue,We))}function Ve(e){return void 0===e&&(e=!1),!0===e&&(Ue=Ge({},e)),Ue}function Ge(e,t){void 0===t&&(t=!1);var n=a.a({},fe,e.palette);e.palette&&e.palette.accent||(n.accent=n.themePrimary);var i=a.a({},Ke(n,!!e.isInverted,t),e.semanticColors),r=a.a({},Ce);if(e.defaultFontStyle)for(var o=0,s=Object.keys(r);o-1),isOpera:!!(n&&n.indexOf("opera")>-1),isMs:!(!t||!/rv:11.0/i.test(t.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return i}(),r=e[t];if(a[r]){var o=e[t+1];a[r]&&(n.isWebkit&&e.push("-webkit-"+r,o),n.isMoz&&e.push("-moz-"+r,o),n.isMs&&e.push("-ms-"+r,o),n.isOpera&&e.push("-o-"+r,o))}}var c,u=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function d(e,t){var n=e[t],i=e[t+1];if("number"===typeof i){var r=-1===u.indexOf(n)?"px":"";e[t+1]=""+i+r}}var h="left",f="right",p=((c={}).left=f,c.right=h,c),g={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function m(e,t,n){if(e.rtl){var i=t[n];if(!i)return;var r=t[n+1];if("string"===typeof r&&r.indexOf("@noflip")>=0)t[n+1]=r.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(i.indexOf(h)>=0)t[n]=i.replace(h,f);else if(i.indexOf(f)>=0)t[n]=i.replace(f,h);else if(String(r).indexOf(h)>=0)t[n+1]=r.replace(h,f);else if(String(r).indexOf(f)>=0)t[n+1]=r.replace(f,h);else if(p[i])t[n]=p[i];else if(g[r])t[n+1]=g[r];else switch(i){case"margin":case"padding":t[n+1]=function(e){if("string"===typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}(r);break;case"box-shadow":t[n+1]=function(e,t){var n=e.split(" "),i=parseInt(n[t],10);return n[0]=n[0].replace(String(i),String(-1*i)),n.join(" ")}(r,0)}}}n.d(t,"b",(function(){return C})),n.d(t,"d",(function(){return T})),n.d(t,"a",(function(){return x})),n.d(t,"c",(function(){return k}));function v(e){var t=e&&e["&"];return t?t.displayName:void 0}var b=/\:global\((.+?)\)/g;function y(e){if(!b.test(e))return e;for(var t=[],n=/\:global\((.+?)\)/g,i=null;i=n.exec(e);)i[1].indexOf(",")>-1&&t.push([i.index,i.index+i[0].length,i[1].split(",").map((function(e){return":global("+e.trim()+")"})).join(", ")]);return t.reverse().reduce((function(e,t){var n=t[0],i=t[1],r=t[2];return e.slice(0,n)+r+e.slice(i)}),e)}function _(e,t){return e.indexOf(":global(")>=0?e.replace(b,"$1"):0===e.indexOf(":")?t+e:e.indexOf("&")<0?t+" "+e:e}function w(e,t,n){void 0===t&&(t={__order:[]}),void 0===n&&(n="&");var i=r.a.getInstance(),o=t[n];o||(o={},t[n]=o,t.__order.push(n));for(var s=0,a=e;s-1?y(e).split(",").map((function(e){return e.trim()})).forEach((function(e){return w([i],t,_(e,n))})):w([i],t,_(e,n))}};for(var f in d)h(f)}else void 0!==l[u]&&("margin"===u||"padding"===u?S(o,u,l[u]):o[u]=l[u])}return t}function S(e,t,n){var i="string"===typeof n?n.split(" "):[n];e[t+"Top"]=i[0],e[t+"Right"]=i[1]||i[0],e[t+"Bottom"]=i[2]||i[0],e[t+"Left"]=i[3]||i[1]||i[0]}function E(e,t){for(var n=[e.rtl?"rtl":"ltr"],i=!1,r=0,o=t.__order;rf[e];)e++}catch(i){e=d||h||a.large}h=e}else{if(void 0===d)throw new Error("Content was rendered in a server environment without providing a default responsive mode. Call setResponsiveMode to define what the responsive mode is.");e=d}return e},n}(l);return Object(u.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var i=n(10),r=i.a.getInstance();r&&r.onReset&&i.a.getInstance().onReset((function(){o++}));var o=0,s={empty:!0},a={},l="undefined"===typeof WeakMap?null:WeakMap;function c(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=!1),!l)return e;var i,r=0,s=o;return function(){for(var a=[],l=0;l0&&r>t)&&(i=h(),r=0,s=o),c=i;for(var u=0;u0){n.subComponentStyles={};var f=n.subComponentStyles,p=function(e){if(r.hasOwnProperty(e)){var t=r[e];f[e]=function(e){return i.apply(void 0,t.map((function(t){return"function"===typeof t?t(e):t})))}}};for(var u in r)p(u)}return n}n.d(t,"a",(function(){return i}))},,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));function i(e){console&&console.warn&&console.warn(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var i=n(6),r=Object(i.a)()||{};function o(e){return(e||"id__")+r.__currentId__++}function s(e){void 0===e&&(e=0),r.__currentId__=e}void 0===r.__currentId__&&(r.__currentId__=0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(10);function r(){for(var e=[],t=0;t=0)s(a.split(" "));else{var l=o.argsFromClassName(a);l?s(l):-1===n.indexOf(a)&&n.push(a)}else Array.isArray(a)?s(a):"object"===typeof a&&r.push(a)}}return s(e),{classes:n,objects:r}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=!1},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(23);function r(e,t){return e&&e!==document.body?t(e)?e:r(Object(i.a)(e),t):null}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));var i=n(10),r=n(33);function o(e,t){for(var n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0}function s(e,t){return o(e,t)&&o(t,e)}function a(e){for(var t=[],n=1;n0&&this._imageElement.current.naturalHeight>0||this._imageElement.current.complete&&t._svgRegex.test(e))&&(this._computeCoverStyle(this.props),this.setState({loadState:l.c.loaded})))},t.prototype._computeCoverStyle=function(e){var t=e.imageFit,n=e.width,i=e.height;if((t===l.b.cover||t===l.b.contain||t===l.b.centerContain||t===l.b.centerCover)&&void 0===this.props.coverStyle&&this._imageElement.current&&this._frameElement.current){var r=void 0;r=n&&i&&t!==l.b.centerContain&&t!==l.b.centerCover?n/i:this._frameElement.current.clientWidth/this._frameElement.current.clientHeight;var o=this._imageElement.current.naturalWidth/this._imageElement.current.naturalHeight;this._coverStyle=o>r?l.a.landscape:l.a.portrait}},t.defaultProps={shouldFadeIn:!0},t._svgRegex=/\.svg$/i,t}(o.Component),d=n(3),h=n(6),f={root:"ms-Image",rootMaximizeFrame:"ms-Image--maximizeFrame",image:"ms-Image-image",imageCenter:"ms-Image-image--center",imageContain:"ms-Image-image--contain",imageCover:"ms-Image-image--cover",imageCenterContain:"ms-Image-image--centerContain",imageCenterCover:"ms-Image-image--centerCover",imageNone:"ms-Image-image--none",imageLandscape:"ms-Image-image--landscape",imagePortrait:"ms-Image-image--portrait"};n.d(t,"a",(function(){return p}));var p=Object(i.a)(u,(function(e){var t=e.className,n=e.width,i=e.height,r=e.maximizeFrame,o=e.isLoaded,s=e.shouldFadeIn,a=e.shouldStartVisible,l=e.isLandscape,c=e.isCenter,u=e.isContain,p=e.isCover,g=e.isCenterContain,m=e.isCenterCover,v=e.isNone,b=e.isError,y=e.isNotImageFit,_=e.theme,w=Object(d.l)(f,_),S={position:"absolute",left:"50% /* @noflip */",top:"50%",transform:"translate(-50%,-50%)"},E=Object(h.a)(),C=void 0!==E&&void 0===E.navigator.msMaxTouchPoints,T=u&&l||p&&!l?{width:"100%",height:"auto"}:{width:"auto",height:"100%"};return{root:[w.root,_.fonts.medium,{overflow:"hidden"},r&&[w.rootMaximizeFrame,{height:"100%",width:"100%"}],o&&s&&!a&&d.a.fadeIn400,(c||u||p||g||m)&&{position:"relative"},t],image:[w.image,{display:"block",opacity:0},o&&["is-loaded",{opacity:1}],c&&[w.imageCenter,S],u&&[w.imageContain,C&&{width:"100%",height:"100%",objectFit:"contain"},!C&&T,S],p&&[w.imageCover,C&&{width:"100%",height:"100%",objectFit:"cover"},!C&&T,S],g&&[w.imageCenterContain,l&&{maxWidth:"100%"},!l&&{maxHeight:"100%"},S],m&&[w.imageCenterCover,l&&{maxHeight:"100%"},!l&&{maxWidth:"100%"},S],v&&[w.imageNone,{width:"auto",height:"auto"}],y&&[!!n&&!i&&{height:"auto",width:"100%"},!n&&!!i&&{height:"100%",width:"auto"},!!n&&!!i&&{height:"100%",width:"100%"}],l&&w.imageLandscape,!l&&w.imagePortrait,!o&&"is-notLoaded",s&&"is-fadeIn",b&&"is-error"]}}),void 0,{scope:"Image"},!0)},function(e,t,n){"use strict";var i={},r=void 0;try{r=window}catch(s){}function o(e,t){if("undefined"!==typeof r){var n=r.__packages__=r.__packages__||{};if(!n[e]||!i[e])i[e]=t,(n[e]=n[e]||[]).push(t)}}n.d(t,"a",(function(){return o})),o("@uifabric/set-version","6.0.0")},function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return c}));var i=n(37),r=["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","role","style","tabIndex","title","translate","spellCheck","name"].concat(["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),o=(r.concat(["form"]),r.concat(["height","loop","muted","preload","src","width"]).concat(["poster"]),r.concat(["start"]),r.concat(["value"]),r.concat(["download","href","hrefLang","media","rel","target","type"])),s=r.concat(["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"]),a=(s.concat(["accept","alt","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),s.concat(["cols","dirname","form","maxLength","placeholder","readOnly","required","rows","wrap"]),s.concat(["form","multiple","required"]),r.concat(["selected","value"]),r.concat(["cellPadding","cellSpacing"]),r.concat(["rowSpan","scope"]),r.concat(["colSpan","headers","rowSpan","scope"]),r.concat(["span"]),r.concat(["span"]),r.concat(["acceptCharset","action","encType","encType","method","noValidate","target"]),r.concat(["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),r.concat(["alt","crossOrigin","height","src","srcSet","useMap","width"])),l=r;function c(e,t,n){return Object(i.b)((function(e){return(!n||n.indexOf(e)<0)&&(0===e.indexOf("data-")||0===e.indexOf("aria-")||t.indexOf(e)>=0)}),{},e)}},,function(e,t,n){e.exports=n(76)()},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var i=n(1);function r(e,t){return void 0===e&&(e={}),(s(t)?t:function(e){return function(t){return e?i.a({},t,e):t}}(t))(e)}function o(e,t){return void 0===e&&(e={}),(s(t)?t:function(e){void 0===e&&(e={});return function(t){var n=i.a({},t);for(var r in e)e.hasOwnProperty(r)&&(n[r]=i.a({},t[r],e[r]));return n}}(t))(e)}function s(e){return"function"===typeof e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));var i="data-portal-element";function r(e){e.setAttribute(i,"true")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(6),r=function(){function e(e,t){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=e||null,this._onErrorHandler=t,this._noop=function(){}}return e.prototype.dispose=function(){var e;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(e in this._timeoutIds)this._timeoutIds.hasOwnProperty(e)&&this.clearTimeout(parseInt(e,10));this._timeoutIds=null}if(this._immediateIds){for(e in this._immediateIds)this._immediateIds.hasOwnProperty(e)&&this.clearImmediate(parseInt(e,10));this._immediateIds=null}if(this._intervalIds){for(e in this._intervalIds)this._intervalIds.hasOwnProperty(e)&&this.clearInterval(parseInt(e,10));this._intervalIds=null}if(this._animationFrameIds){for(e in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(e)&&this.cancelAnimationFrame(parseInt(e,10));this._animationFrameIds=null}},e.prototype.setTimeout=function(e,t){var n=this,i=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),i=setTimeout((function(){try{n._timeoutIds&&delete n._timeoutIds[i],e.apply(n._parent)}catch(t){n._onErrorHandler&&n._onErrorHandler(t)}}),t),this._timeoutIds[i]=!0),i},e.prototype.clearTimeout=function(e){this._timeoutIds&&this._timeoutIds[e]&&(clearTimeout(e),delete this._timeoutIds[e])},e.prototype.setImmediate=function(e,t){var n=this,r=0,o=Object(i.a)(t);if(!this._isDisposed){this._immediateIds||(this._immediateIds={});r=o.setTimeout((function(){try{n._immediateIds&&delete n._immediateIds[r],e.apply(n._parent)}catch(t){n._logError(t)}}),0),this._immediateIds[r]=!0}return r},e.prototype.clearImmediate=function(e,t){var n=Object(i.a)(t);this._immediateIds&&this._immediateIds[e]&&(n.clearTimeout(e),delete this._immediateIds[e])},e.prototype.setInterval=function(e,t){var n=this,i=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),i=setInterval((function(){try{e.apply(n._parent)}catch(t){n._logError(t)}}),t),this._intervalIds[i]=!0),i},e.prototype.clearInterval=function(e){this._intervalIds&&this._intervalIds[e]&&(clearInterval(e),delete this._intervalIds[e])},e.prototype.throttle=function(e,t,n){var i=this;if(this._isDisposed)return this._noop;var r,o,s=t||0,a=!0,l=!0,c=0,u=null;n&&"boolean"===typeof n.leading&&(a=n.leading),n&&"boolean"===typeof n.trailing&&(l=n.trailing);var d=function t(n){var d=(new Date).getTime(),h=d-c,f=a?s-h:s;return h>=s&&(!n||a)?(c=d,u&&(i.clearTimeout(u),u=null),r=e.apply(i._parent,o)):null===u&&l&&(u=i.setTimeout(t,f)),r};return function(){for(var e=[],t=0;t=a&&(r=!0),d=n);var s=n-d,p=a-s,m=n-h,v=!1;return null!==u&&(m>=u&&f?v=!0:p=Math.min(p,u-m)),s>=a||v||r?g(n):null!==f&&t||!c||(f=i.setTimeout(e,p)),o},v=function(){return!!f},b=function(){for(var e=[],t=0;ta))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,d=!0,h=2&n?new re:void 0;for(o.set(e,t),o.set(t,e);++u-1},ne.prototype.set=function(e,t){var n=this.__data__,i=ae(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ie.prototype.clear=function(){this.size=0,this.__data__={hash:new te,map:new(U||ne),string:new te}},ie.prototype.delete=function(e){var t=ge(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return ge(this,e).get(e)},ie.prototype.has=function(e){return ge(this,e).has(e)},ie.prototype.set=function(e,t){var n=ge(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},re.prototype.add=re.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},re.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.clear=function(){this.__data__=new ne,this.size=0},oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},oe.prototype.get=function(e){return this.__data__.get(e)},oe.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ne){var i=n.__data__;if(!U||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ie(i)}return n.set(e,t),this.size=n.size,this};var ve=B?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Me(e){return null!=e&&"object"==typeof e}var Re=b?function(e){return function(t){return e(t)}}(b):function(e){return Me(e)&&xe(e.length)&&!!c[le(e)]};function Ie(e){return null!=(t=e)&&xe(t.length)&&!Te(t)?se(e):he(e);var t}n.exports=function(e,t){return ue(e,t)}}).call(this,n(31),n(15)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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 window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(51),e};t.debounce=function(e,t){var n=null;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(i,r)}),t)}}},function(e,t,n){(function(e){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,i){"string"===typeof t?(2==arguments.length&&(i=n),e.modules[t]||(e.payloads[t]=i,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var o=r(e,t);if(void 0!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;a1&&a(l,"")>-1&&(n=RegExp(this.source,i.replace.call(s(this),"g","")),i.replace.call(e.slice(l.index),n,(function(){for(var e=1;el.index&&this.lastIndex--}return l},o||(RegExp.prototype.test=function(e){var t=i.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,n){function i(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=h.call(arguments,1),r=function i(){if(this instanceof i){var r=t.apply(this,n.concat(h.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(h.call(arguments)))};return t.prototype&&(i.prototype=t.prototype,r.prototype=new i,i.prototype=null),r});var r,o,s,a,l,c=Function.prototype.call,u=Array.prototype,d=Object.prototype,h=u.slice,f=c.bind(d.toString),p=c.bind(d.hasOwnProperty);if((l=p(d,"__defineGetter__"))&&(r=c.bind(d.__defineGetter__),o=c.bind(d.__defineSetter__),s=c.bind(d.__lookupGetter__),a=c.bind(d.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var g=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?g.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(h.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+ta)for(d=c;d--;)this[l+d]=this[a+d];if(o&&e===u)this.length=u,this.push.apply(this,r);else for(this.length=u+o,d=0;d>>0;if("[object Function]"!=f(e))throw new TypeError;for(;++r>>0,r=Array(i),o=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var s=0;s>>0,o=[],s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,o=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o++];break}if(++o>=i)throw new TypeError("reduce of empty array with no initial value")}for(;o>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=i-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(r=e.call(void 0,r,n[o],o,t))}while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=y&&"[object String]"==f(this)?this.split(""):A(this),n=t.length>>>0;if(!n)return-1;var i=0;for(arguments.length>1&&(i=L(arguments[1])),i=i>=0?i:Math.max(0,n+i);i>>0;if(!n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,L(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in t&&e===t[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:d)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(p(e,t)){var n;if(n={enumerable:!0,configurable:!0},l){var i=e.__proto__;e.__proto__=d;var r=s(e,t),o=a(e,t);if(e.__proto__=i,r||o)return r&&(n.get=r),o&&(n.set=o),n}return n.value=e[t],n}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(m=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=m();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var i=function(){};i.prototype=e,(n=new i).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n});function _(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}if(Object.defineProperty){var w=_({}),S="undefined"==typeof document||_(document.createElement("div"));if(!w||!S)var E=Object.defineProperty}if(!Object.defineProperty||E){Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(E)try{return E.call(Object,e,t,n)}catch(c){}if(p(n,"value"))if(l&&(s(e,t)||a(e,t))){var i=e.__proto__;e.__proto__=d,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!l)throw new TypeError("getters & setters can not be defined on this javascript engine");p(n,"get")&&r(e,t,n.get),p(n,"set")&&o(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(O){Object.freeze=(v=Object.freeze,function(e){return"function"==typeof e?e:v(e)})}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";p(e,t);)t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n}),!Object.keys){var C=!0,T=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],x=T.length;for(var k in{toString:null})C=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)p(e,n)&&t.push(n);if(C)for(var i=0,r=x;i0||-1)*Math.floor(Math.abs(e))),e}var A=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,n){"use strict";e("./regexp"),e("./es5-shim"),"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})})),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 i="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),o=i.userAgent||"",s=i.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!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 i=e("./useragent");if(t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t;if("string"!=typeof t[0]||!t[0]){for(var o=[],s=0;s=1.5,"undefined"!==typeof document){var r=document.createElement("div");t.HI_DPI&&void 0!==r.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),i.isEdge||"undefined"===typeof r.style.animationName||(t.HAS_CSS_ANIMATION=!0),r=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/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/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./oop"),r=function(){var e,t,n={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},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",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),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 i=e("./keys"),r=e("./useragent"),o=null,s=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var i=function(){n.call(e,window.event)};n._wrapper=i,e.attachEvent("on"+t,i)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,i){function r(e){n&&n(e),i&&i(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),n(e)})):"onwheel"in e?t.addListener(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)})):t.addListener(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)}))},t.addMultiMouseDownListener=function(e,n,i,o){var s,a,l,c=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};function d(e){if(0!==t.getButton(e)?c=0:e.detail>1?++c>4&&(c=1):c=1,r.isIE){var d=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-a)>5;l&&!d||(c=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[c-1]||600),1==c&&(s=e.clientX,a=e.clientY)}if(e._clicks=c,i[o]("mousedown",e),c>4)c=0;else if(c>1)return i[o](u[c],e)}function h(e){c=2,l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[c-1]||600),i[o]("mousedown",e),i[o](u[c],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){t.addListener(e,"mousedown",d),r.isOldIE&&t.addListener(e,"dblclick",h)}))};var a=!r.isMac||!r.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};function l(e,t,n){var l=a(t);if(!r.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(l|=8),o.altGr){if(3==(3&l))return;o.altGr=0}if(18===n||17===n){var c="location"in t?t.location:t.keyLocation;if(17===n&&1===c)1==o[n]&&(s=t.timeStamp);else if(18===n&&3===l&&2===c){t.timeStamp-s<50&&(o.altGr=!0)}}}if((n in i.MODIFIER_KEYS&&(n=-1),!l&&13===n)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,l,-n),t.defaultPrevented)))return;if(r.isChromeOS&&8&l){if(e(t,l,n),t.defaultPrevented)return;l&=-9}return!!(l||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,l,n)}function c(){o=Object.create(null)}if(t.getModifierString=function(e){return i.KEY_MODS[a(e)]},t.addCommandKeyListener=function(e,n){var i=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var s=null;i(e,"keydown",(function(e){s=e.keyCode})),i(e,"keypress",(function(e){return l(n,e,s)}))}else{var a=null;i(e,"keydown",(function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=l(n,e,e.keyCode);return a=e.defaultPrevented,t})),i(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)})),i(e,"keyup",(function(e){o[e.keyCode]=null})),o||(c(),i(window,"focus",c))}},"object"==typeof window&&window.postMessage&&!r.isOldIE){var u=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+u++;t.addListener(n,"message",(function r(o){o.data==i&&(t.stopPropagation(o),t.removeListener(n,"message",r),e())})),n.postMessage(i,"*")}}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/range",["require","exports","module"],(function(e,t,n){"use strict";var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.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},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.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)},this.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)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.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)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var r={row:t+1,column:0};else if(this.start.row0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},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,i=e.length;nDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../clipboard"),l=r.isChrome<18,c=r.isIE,u=r.isChrome>63,d=e("../lib/keys"),h=d.KEY_MODS,f=r.isIOS,p=f?/\s/:/\n/;t.TextInput=function(e,t){var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var g=!1,m=!1,v=!1,b=!1,y="";r.isMobile||(n.style.fontSize="1px");var _=!1,w=!1,S="",E=0,C=0,T=0;try{var x=document.activeElement===n}catch(z){}i.addListener(n,"blur",(function(e){w||(t.onBlur(e),x=!1)})),i.addListener(n,"focus",(function(e){if(!w){if(x=!0,r.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),r.isEdge?setTimeout(k):k()}})),this.$focusScroll=!1,this.focus=function(){if(y||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(z){return}var i=[];if(t)for(var r=n.parentElement;r&&1==r.nodeType;)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return x},t.on("beforeEndOperation",(function(){t.curOp&&"insertstring"==t.curOp.command.name||(v&&(S=n.value="",N()),k())}));var k=f?function(e){if(x&&(!g||e)&&!b){e||(e="");var i="\n ab"+e+"cde fg\n";i!=n.value&&(n.value=S=i);var r=4+(e.length||(t.selection.isEmpty()?0:1));4==E&&C==r||n.setSelectionRange(4,r),E=4,C=r}}:function(){if(!v&&!b&&(x||R)){v=!0;var e=t.selection,i=e.getRange(),r=e.cursor.row,o=i.start.column,s=i.end.column,a=t.session.getLine(r);if(i.start.row!=r){var l=t.session.getLine(r-1);o=i.start.rowr+1?c.length:s,s+=a.length+1,a=a+"\n"+c}a.length>400&&(o<400&&s<400?a=a.slice(0,400):(a="\n",o=0,s=1));var u=a+"\n\n";if(u!=S&&(n.value=S=u,E=C=u.length),R&&(E=n.selectionStart,C=n.selectionEnd),C!=s||E!=o||n.selectionEnd!=C)try{n.setSelectionRange(o,s),E=o,C=s}catch(z){}v=!1}};x&&t.onFocus();var M=null;this.setInputHandler=function(e){M=e},this.getInputHandler=function(){return M};var R=!1,I=function(e,i){if(R&&(R=!1),m)return k(),e&&t.onPaste(e),m=!1,"";for(var r=n.selectionStart,o=n.selectionEnd,s=E,a=S.length-C,l=e,c=e.length-r,u=e.length-o,d=0;s>0&&S[d]==e[d];)d++,s--;for(l=l.slice(d),d=1;a>0&&S.length-d>E-1&&S[S.length-d]==e[e.length-d];)d++,a--;c-=d-1,u-=d-1;var h=l.length-d+1;return h<0&&(s=-h,h=0),l=l.slice(0,h),i||l||c||s||a||u?(b=!0,l&&!s&&!a&&!c&&!u||_?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:a,restoreStart:c,restoreEnd:u}),b=!1,S=e,E=r,C=o,T=u,l):""},L=function(e){if(v)return F();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,r=I(i,!0);(i.length>500||p.test(r))&&k()},A=function e(t,n,i){var r=t.clipboardData||window.clipboardData;if(r&&!l){var o=c||i?"Text":"text/plain";try{return n?!1!==r.setData(o,n):r.getData(o)}catch(t){if(!i)return e(t,n,!0)}}},O=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);A(e,o)?(f&&(k(o),g=o,setTimeout((function(){g=!1}),10)),r?t.onCut():t.onCopy(),i.preventDefault(e)):(g=!0,n.value=o,n.select(),setTimeout((function(){g=!1,k(),r?t.onCut():t.onCopy()})))},$=function(e){O(e,!0)},D=function(e){O(e,!1)},P=function(e){var o=A(e);a.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(k),i.preventDefault(e)):(n.value="",m=!0))};i.addCommandKeyListener(n,t.onCommandKey.bind(t)),i.addListener(n,"select",(function(e){v||(g?g=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=S.length&&e.value===S&&S&&e.selectionEnd!==C}(n)&&(t.selectAll(),k()))})),i.addListener(n,"input",L),i.addListener(n,"cut",$),i.addListener(n,"copy",D),i.addListener(n,"paste",P),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:P(e);break;case 88:$(e)}}));var F=function(){if(v&&t.onCompositionUpdate&&!t.$readOnly){if(_)return B();if(v.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;I(e),v.markerRange&&(v.context&&(v.markerRange.start.column=v.selectionStart=v.context.compositionStartOffset),v.markerRange.end.column=v.markerRange.start.column+C-v.selectionStart+T)}}},N=function(e){t.onCompositionEnd&&!t.$readOnly&&(v=!1,t.onCompositionEnd(),t.off("mousedown",B),e&&L())};function B(){w=!0,n.blur(),n.focus(),w=!1}var H,W=s.delayedCall(F,50).schedule.bind(null,null);function j(){clearTimeout(H),H=setTimeout((function(){y&&(n.style.cssText=y,y=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}i.addListener(n,"compositionstart",(function(e){if(!v&&t.onCompositionStart&&!t.$readOnly&&(v={},!_)){setTimeout(F,0),t.on("mousedown",B);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,v.markerRange=i,v.selectionStart=E,t.onCompositionStart(v),v.useTextareaForIME?(n.value="",S="",E=0,C=0):(n.msGetInputContext&&(v.context=n.msGetInputContext()),n.getInputContext&&(v.context=n.getInputContext()))}})),i.addListener(n,"compositionupdate",F),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthC&&"\n"==S[o]?s=d.end:iC&&S.slice(0,o).split("\n").length>2?s=d.down:o>C&&" "==S[o-1]?(s=d.right,a=h.option):(o>C||o==C&&C!=E&&i==o)&&(s=d.right),i!==o&&(a|=h.shift),s){if(!t.onCommandKey({},a,s)&&t.commands){s=d.keyCodeToString(s);var l=t.commands.findKeyCommand(a,s);l&&t.execCommand(l)}E=i,C=o,k("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,n)}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/useragent");function r(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")}function o(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 var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();return 0!==o?((r.getSelectionRange().isEmpty()||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.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)))},this.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.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.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==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,i,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),o=Date.now();(r>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.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,i=e.domEvent.timeStamp,r=i-n.t,o=r?e.wheelX/r:n.vx,s=r?e.wheelY/r:n.vy;r<550&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),l=!1;if(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=i;else if(i-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=o,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");function r(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.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)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),t.Tooltip=r})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+o>i&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,s=e.editor,l=s.renderer.$gutterLayer,c=new a(s.container);function u(){t&&(t=clearTimeout(t)),r&&(c.hide(),r=null,s._signal("hideGutterTooltip",c),s.removeEventListener("mousewheel",u))}function d(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return u();r&&e.$tooltipFollowsMouse&&d(o),n=o,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=l.$annotations[t];if(!i)return u();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return u()}if(r!=i)if(r=i.text.join("
"),c.setHtml(r),c.show(),s._signal("showGutterTooltip",c),s.on("mousewheel",u),e.$tooltipFollowsMouse)d(n);else{var h=n.domEvent.target.getBoundingClientRect(),f=c.getElement().style;f.left=h.right+"px",f.top=h.bottom+"px"}}():u()}),50))})),o.addListener(s.renderer.$gutter,"mouseout",(function(e){n=null,r&&!t&&(t=setTimeout((function(){t=null,u()}),50))})),s.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){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};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.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},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),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 i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var s,l,c,u,d,h,f,p,g,m,v,b=t.container,y=0;function _(){var e=h;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,o=!n||e.column!=n.column;!m||r||o?(t.moveCursorToPosition(e),m=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(h=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=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),d=Math.min(a.y.top,a.y.bottom),h={row:e.row,column:e.column};u/o<=2&&(h.column+=a.x.left=200&&t.renderer.scrollCursorIntoView(h):g=i:g=null}(h,e)}function w(){d=t.selection.toOrientedRange(),s=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),_(),u=setInterval(_,20),y=0,r.addListener(document,"mousemove",C)}function S(){clearInterval(u),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(d),t.isFocused()&&!p&&t.$resetCursorStyle(),d=null,h=null,y=0,g=null,m=null,r.removeListener(document,"mousemove",C)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(n),n.scrollTop=0),r.setDragImage&&r.setDragImage(n,0,0),o.isOpera&&t.container.removeChild(n),r.clearData(),r.setData("Text",t.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,p=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;f||"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()&&T(e.dataTransfer))return l=e.clientX,c=e.clientY,s||w(),y++,e.dataTransfer.dropEffect=f=x(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&T(e.dataTransfer))return l=e.clientX,c=e.clientY,s||(w(),y++),null!==E&&(E=null),e.dataTransfer.dropEffect=f=x(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&s)return S(),f=null,r.preventDefault(e)},this.onDrop=function(e){if(h){var n=e.dataTransfer;if(p)switch(f){case"move":d=d.contains(h.row,h.column)?{start:h,end:h}:t.moveText(d,h);break;case"copy":d=t.moveText(d,h,!0)}else{var i=n.getData("Text");d={start:h,end:t.session.insert(h,i)},t.focus(),f=null}return S(),r.preventDefault(e)}},r.addListener(b,"dragstart",this.onDragStart.bind(e)),r.addListener(b,"dragend",this.onDragEnd.bind(e)),r.addListener(b,"dragenter",this.onDragEnter.bind(e)),r.addListener(b,"dragover",this.onDragOver.bind(e)),r.addListener(b,"dragleave",this.onDragLeave.bind(e)),r.addListener(b,"drop",this.onDrop.bind(e));var E=null;function C(){null==E&&(E=setTimeout((function(){null!=E&&s&&S()}),20))}function T(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function x(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-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=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.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(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else 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/dom"],(function(e,t,n){"use strict";var i=e("./mouse_event").MouseEvent,r=e("../lib/dom");t.addTouchListeners=function(e,t){var n,o,s,a,l,c,u,d,h,f="scroll",p=0,g=0,m=0,v=0;function b(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var o=i.target.getAttribute("action");if("more"==o||!n)return n=!n,function(){var i=t.getCopyText(),o=t.session.getUndoManager().hasUndo();h.replaceChild(r.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),h.firstChild)}();"paste"==o?e.readText().then((function(e){t.execCommand(o,e)})):o&&("cut"!=o&&"copy"!=o||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),h.firstChild.style.display="none",n=!1,"openCommandPallete"!=o&&t.focus()};h=r.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(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function y(){h||b();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.container.getBoundingClientRect();h.style.top=n.pageY-i.top-3+"px",h.style.right="10px",h.style.display="",h.firstChild.style.display="none",t.on("input",_)}function _(e){h&&(h.style.display="none"),t.off("input",_)}function w(){l=null,clearTimeout(l);var e=t.selection.getRange(),n=e.contains(u.row,u.column);!e.isEmpty()&&n||(t.selection.moveToPosition(u),t.selection.selectWord()),f="wait",y()}e.addEventListener("contextmenu",(function(e){d&&t.textInput.getElement().focus()})),e.addEventListener("touchstart",(function(e){var r=e.touches;if(l||r.length>1)return clearTimeout(l),l=null,s=-1,void(f="zoom");d=t.$mouseHandler.isMousePressed=!0;var c=t.renderer.layerConfig.lineHeight,h=t.renderer.layerConfig.lineHeight,b=e.timeStamp;a=b;var y=r[0],_=y.clientX,S=y.clientY;Math.abs(n-_)+Math.abs(o-S)>c&&(s=-1),n=e.clientX=_,o=e.clientY=S,m=v=0;var E=new i(e,t);if(u=E.getDocumentPosition(),b-s<500&&1==r.length&&!p)g++,e.preventDefault(),e.button=0,function(){l=null,clearTimeout(l),t.selection.moveToPosition(u);var e=g>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),f="wait"}();else{g=0;var C=t.selection.cursor,T=t.selection.isEmpty()?C:t.selection.anchor,x=t.renderer.$cursorLayer.getPixelPosition(C,!0),k=t.renderer.$cursorLayer.getPixelPosition(T,!0),M=t.renderer.scroller.getBoundingClientRect(),R=function(e,t){return(e/=h)*e+(t=t/c-.75)*t};if(e.clientXL?"cursor":"anchor"),f=L<3.5?"anchor":I<3.5?"cursor":"scroll",l=setTimeout(w,450)}s=b})),e.addEventListener("touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),"zoom"==f?(f="",p=0):l?(t.selection.moveToPosition(u),p=0,y()):"scroll"==f?(p+=60,c=setInterval((function(){p--<=0&&(clearInterval(c),c=null),Math.abs(m)<.01&&(m=0),Math.abs(v)<.01&&(v=0),p<20&&(m*=.9),p<20&&(v*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*m,10*v),e==t.session.getScrollTop()&&(p=0)}),10),e.preventDefault(),_()):y(),clearTimeout(l),l=null})),e.addEventListener("touchmove",(function(e){l&&(clearTimeout(l),l=null);var r=e.touches;if(!(r.length>1||"zoom"==f)){var s=r[0],c=n-s.clientX,u=o-s.clientY;if("wait"==f){if(!(c*c+u*u>4))return e.preventDefault();f="cursor"}n=s.clientX,o=s.clientY,e.clientX=s.clientX,e.clientY=s.clientY;var d=e.timeStamp,h=d-a;if(a=d,"scroll"==f){var p=new i(e,t);p.speed=1,p.wheelX=c,p.wheelY=u,10*Math.abs(c)1&&(r=n[n.length-2]);var s=l[t+"Path"];return null==s?s=l.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var r,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{r=e(n)}catch(l){}if(r&&!t.$loading[n])return i&&i(r);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(n,s),a),c()}};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(){})};function u(r){if(a&&a.document){l.packaged=r||e.packaged||i.packaged||a.define&&n(52).packaged;for(var o,s={},c="",u=document.currentScript||document._currentScript,d=(u&&u.ownerDocument||document).getElementsByTagName("script"),h=0;h=e){for(o=d+1;o=e;)o++;for(a=d,l=o-1;a=t.length||2!=(l=n[r-1])&&3!=l||2!=(c=t[r+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+10&&2==n[r-1])return 2;if(o)return 4;for(d=r+1,u=t.length;d=1425&&f<=2303||64286==f;if(l=t[d],p&&(1==l||7==l))return 1}return r<1||5==(l=t[r-1])?4:n[r-1];case 5:return o=!1,s=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case 18:return 4}}function p(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:u[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?11:/[\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="\xb7",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var d=e.split(""),g=new Array(d.length),m=new Array(d.length),v=[];i=u?1:0,function(e,t,n,u){var d=i?c:l,h=null,g=null,m=null,v=0,b=null,y=-1,_=null,w=null,S=[];if(!u)for(_=0,u=[];_0)if(16==b){for(_=y;_-1){for(_=y;_=0&&8==u[E];E--)t[E]=i}}(d,v,d.length,n);for(var b=0;b7&&n[b]<13||4===n[b]||18===n[b])?v[b]=t.ON_R:b>0&&"\u0644"===d[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[b])&&(v[b-1]=v[b]=t.R_H,b++);d[d.length-1]===t.DOT&&(v[d.length-1]=t.B),"\u202b"===d[0]&&(v[0]=t.RLE);for(b=0;b=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.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 o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[r]%2!==0&&r++;for(var a=0;at&&o[r]%2===0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,d=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,f=0;f=a&&hn+o/2;){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!==0&&r[i]%2===0?(e0&&r[i-1]%2===0&&r[i]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2===0||!this.isRtlDir&&0===i&&r[i]%2!==0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!==0&&0!==o&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(s.prototype),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 i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(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")}))};(function(){i.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.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)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.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)}},this.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.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=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(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=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 o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var r=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||e>0)&&r.row++,this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.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)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.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},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(i){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.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},this.fromJSON=function(e){if(void 0==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)},this.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}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var i=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l1?this.$applyToken:c.token),d>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(d=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=d,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$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 i=[],r=0,o=n.length;ru){var v=e.substring(u,m-g.length);h.type==f?h.value+=v:(h.type&&c.push(h),h={type:f,value:v})}for(var b=0;br){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r=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]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.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},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),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 i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},h=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},p=function e(t){this.add("braces","insertion",(function(n,r,o,s,l){var c=o.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==l){h(o);var d=o.getSelectionRange(),p=s.doc.getTextRange(d);if(""!==p&&"{"!==p&&o.getWrapBehavioursEnabled())return f(d,p,"{","}");if(e.isSaneInsertion(o,s))return/[\]\}\)]/.test(u[c.column])||o.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(o,s,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(o,s,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(h(o),"}"==u.substring(c.column,c.column+1))if(null!==s.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,u,l))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){h(o);var g="";if(e.isMaybeInsertedClosing(c,u)&&(g=a.stringRepeat("}",i.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var m=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!m)return null;var v=this.$getIndent(s.getLine(m.row))}else{if(!g)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+s.getTabString();return{text:"\n"+b+"\n"+v+g,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(h(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,i,r,o){if("("==o){h(i);var s=i.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&i.getWrapBehavioursEnabled())return f(s,a,"(",")");if(e.isSaneInsertion(i,r))return e.recordAutoInsert(i,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){h(i);var l=i.getCursorPosition(),c=r.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(h(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(t,n,i,r,o){if("["==o){h(i);var s=i.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&i.getWrapBehavioursEnabled())return f(s,a,"[","]");if(e.isSaneInsertion(i,r))return e.recordAutoInsert(i,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){h(i);var l=i.getCursorPosition(),c=r.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,c,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(h(n),"]"==i.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,i,r){var o=i.$mode.$quotes||d;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;h(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return f(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),p=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==p&&m&&/escape/.test(m.type))return null;var b,y=m&&/string|escape/.test(m.type),_=!v||/string|escape/.test(v.type);if(g==s)(b=y!==_)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!_)return null;if(y&&_)return null;var w=i.$mode.tokenRe;w.lastIndex=0;var S=w.test(p);w.lastIndex=0;var E=w.test(p);if(S||E)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var C=u[c.column-2];if(p==s&&(C==s||w.test(C)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,r){var o=i.$mode.$quotes||d,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)&&(h(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==s))return r.end.column++,r}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new s(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,o),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var i=[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,o=[],s=0;s2?i%c!=c-1:i%c==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+l.escapeRegExp(f)+")"),m=new RegExp("(?:"+l.escapeRegExp(p)+")\\s*$"),v=function(e,t){y(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},p),r.insertInLine({row:t,column:a},f))},b=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)},y=function(e,n){if(g.test(e))return!0;for(var i=t.getTokens(n),r=0;re.length&&(w=e.length)})),a==1/0&&(a=w,o=!1,s=!1),u&&a%c!=0&&(a=Math.floor(a/c)*c),_(s?b:v)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=(g=new c(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var d,h;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(r.start))){var f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m;d=new u(f,p,f,p+r.start.length);break}a=g.stepBackward()}var g;for(a=(g=new c(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(r.end))){f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m;h=new u(f,p,f,p+r.end.length);break}a=g.stepForward()}h&&t.remove(h),d&&(t.remove(d),o=d.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==o&&(l.start.column+=s),l.end.row==o&&(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],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;if(e(n,a,i))return{row:n.row,column:n.column};if(e(l,n,!i))return{row:n.row+o,column:n.column+(n.row==l.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$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}}).call(o.prototype)})),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 i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(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)};(function(){i.implement(this,o),this.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)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.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},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.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 i=this.getLine(e);return void 0==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$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},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.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)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.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)))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length-t+1,r=e.start.row,o=e.start.column,s=0,a=0;s20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.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)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$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 i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=i.getMatchOffsets(n.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new r(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var u=c.length;u--;)t.drawSingleLineMarker(e,c[u].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(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)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.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},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,s.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=r-i,c=-t.column+n.column;si)break;if(u.start.row==i&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==i&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&su.start.column&&u.end.column==o[s+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=i-r,c=t.column-n.column;sr)break;u.end.rowt.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.rowt.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=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r=t){a=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},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,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(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,d=this.getFoldAt(a,l,1),h=this.getFoldAt(c,u,-1);if(d&&h==d)return d.addSubFold(n);d&&!d.range.isStart(a,l)&&this.removeFold(d),h&&!h.range.isEnd(c,u)&&this.removeFold(h);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),f.forEach((function(e){n.addSubFold(e)})));for(var p=0;p0&&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 i(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,r=this.getFoldsInRangeList(n),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(r.length)return r},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,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(tu)break}while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var r=e=e||0;r=e){r=o.end.row;try{var s=this.addFold("...",o);s&&(s.collapseChildren=n)}catch(a){}}}}},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 i,r=e-1;r>=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;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 i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.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 i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},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 i=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 i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(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),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(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)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=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],o=1,s=new i(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)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;ln&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.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(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;se&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$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,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;ls){if((l=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,l=o.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 o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new u(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$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}},this.$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},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.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")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.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"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,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,i.column-r.column),g.shiftRow(-a);var d=this.getFoldLine(o);d&&d!==g&&(d.merge(g),g=d),u=c.indexOf(g)+1}for(;u=r.row&&g.shiftRow(-a)}s=o}else{var h=Array(a);h.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,h);c=this.$foldData,u=0;if(g=this.getFoldLine(o)){var p=g.range.compareInside(i.row,i.column);0==p?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,r.column-i.column)):-1==p&&(g.addRemoveChars(o,0,r.column-i.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u=o&&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(o))&&g.addRemoveChars(o,i.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(o,s):this.$updateRowLengthCache(o,s),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(i=Math.min(i,s.length-1);u<=i;)(o=this.getFoldLine(u,o))?(r=[],o.walk(function(n,i,o,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=e;for(var c=1;c=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)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var o=[],s=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,d=i<=Math.max(2*r,8)||!1===u?0:Math.floor(i/2);function h(e){for(var t=e-a,i=a;ii-f;){var p=a+i-f;if(n[p-1]>=10&&n[p]>=10)h(p);else if(n[p]!=e&&n[p]!=t){for(var g=Math.max(p-(i-(i>>2)),a-1);p>g&&n[p]g&&n[p]g&&9==n[p];)p--}else for(;p>g&&n[p]<10;)p--;p>g?h(++p):(2==n[p=a+i]&&p--,h(p-f))}else{for(;p!=a-1&&n[p]!=e;p--);if(p>a){h(p);continue}for(p=a+i;p39&&s<48||s>57&&s<64?r.push(9):s>=4352&&n(s)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var r,o;for(null==t&&(t=1/0),i=i||0,o=0;o=4352&&n(r)?i+=2:i+=1,!(i>t));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=c[u],o=this.$docRowCache[u];var h=e>c[d-1]}else h=!d;for(var f=this.getLength()-1,p=this.getNextFoldLine(o),g=p?p.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=f);)a+=l,++o>g&&(o=p.end.row+1,g=(p=this.getNextFoldLine(o,p))?p.start.row:1/0),h&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(p&&p.start.row<=o)i=this.getFoldDisplayLine(p),o=p.start.row;else{if(a+l<=e||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),p=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(r=b[v],v>0&&b.length&&(m=b.indent,s=b[v-1]||b[b.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),p?p.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.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 d=e>l[u-1]}else d=!u;for(var h=this.getNextFoldLine(a),f=h?h.start.row:1/0;a=f){if((s=h.end.row+1)>e)break;f=(h=this.getNextFoldLine(s,h))?h.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,d&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var p="";h&&a>=f?(p=this.getFoldDisplayLine(h,e,t),o=h.start.row):(p=this.getLine(e).substring(0,t),o=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){for(var v=0;p.length>=m[v];)r++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return{row:r,column:g+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);ir&&(i=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;an);o++);return[i,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=n}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.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=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},this.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 d=a.offset||0;d<=u;d++){for(var h=0;hg||(s.push(l=new o(d,g,d+c-1,m)),c>2&&(d=d+c-2))}}else for(var v=0;vw&&s[h].end.row==n.end.row;)h--;for(s=s.slice(v,h+1),v=0,h=s.length;v=a;n--)if(d(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(d(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!d(n,s.column,e)){for(n+=1;n<=l;n++)if(d(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(d(n,0,e))return}};if(t.$isMultiLine)var u=n.length,d=function(t,r,o){var s=i?t-u+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&lr))return!!o(s,l,s+u-1,d)||void 0}}};else if(i)d=function(t,i,r){var o,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;o=n.exec(s);){var c=o[0].length;if(l=o.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(o.index+c>i)break;a.push(o.index,c)}for(var u=a.length-1;u>=0;u-=2){var d=a[u-1];if(r(t,d,t,d+(c=a[u])))return!0}};else d=function(t,i,r){var o,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(r(t,o=s.index,t,o+l))return!0;if(!l&&(n.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),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 i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==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 i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,t,n)}),this)},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;ri)break}s.splice(r,0,n)}else delete o[t]},this.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)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].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 o=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;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=o[t]+n,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a})),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 i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("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)},this.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}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("./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",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",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:"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(i.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:"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:"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=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}r.row+10?(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,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.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);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.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}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var i=new f(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)i=t.$mode.getMatching(e.session);i&&(t.$bracketHighlight=t.addMarker(i,"ace_bracket","text"))}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),i=new b(e.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=i.stepForward())){var o=r.value,s=0,a=i.stepBackward();if("<"==a.value)do{a=r,(r=i.stepForward())&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"=0);else{do{r=a,a=i.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"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"))},this.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(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,r=e.getLine(t.start.row),o=r.substring(n,i);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=r.substring(n-1,i+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;ra.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),d=(a=n.getLine(r.row),i.checkOutdent(u,a,e));if(n.insert(r,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new f(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new f(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var h=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},h)}d&&i.autoOutdent(u,n,r.row)},this.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()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,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))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.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,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.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()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.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()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var r=new f(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new f(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n=a&&s<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var u,d=this.$toggleWordPairs,h=0;hf+1)break;f=p.last}for(u--,a=this.session.$moveLines(h,f,t?0:e),t&&-1==e&&(d=u+1);d<=u;)s[d].moveBy(a,0),d++;t||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.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)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new b(this.session,n.row,n.column),r=i.getCurrentToken(),o=r||i.stepForward();if(o){var s,a,l=!1,c={},u=n.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),i},this.$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},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&i.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.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)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!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 o=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;v.loadModule("./ext/prompt",(function(r){r.prompt(i,e,t,n)}))}}.call(_.prototype),v.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){this.textInput.setReadOnly(e),this.$resetCursorStyle()},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},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?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?w.attach(this):w.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.renderer.$composition||this.getValue();if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!e&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var t=r.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()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"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 w={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},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/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=e("./range").Range,o=r.comparePoints;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,i="insert"==t.action;if(n&&i)if(o(t.start,e.end)>=0)h(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;h(e,t,1)}else if(n&&!i)if(o(t.start,e.end)>=0)h(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;h(e,t,-1)}else if(!n&&i)if(o(t.start,e.start)>=0)h(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;h(e,t,1)}else if(!n&&!i)if(o(t.start,e.start)>=0)h(t,e,1);else{if(!(o(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 i=0;i=0?h(e,t,-1):o(e.start,t.start)<=0?h(t,e,1):(h(e,r.fromPoints(t.start,e.start),-1),h(t,e,1));else if(!n&&i)o(t.start,e.end)>=0?h(t,e,-1):o(t.start,e.start)<=0?h(e,t,1):(h(t,r.fromPoints(e.start,t.start),-1),h(e,t,1));else if(!n&&!i)if(o(t.start,e.end)>=0)h(t,e,-1);else{var s,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(s=e,e=p(e,t.start)),o(e.end,t.end)>0&&(a=p(e,t.end)),f(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){f(e.start,t.start,t.end,n),f(e.end,t.start,t.end,n)}function f(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function p(e,t){var n=e.lines,i=e.end;e.end=s(t);var r=e.end.row-e.start.row,o=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:s(t),end:i,lines:o,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 i=e[n],r=0;ro&&(l=r.end.row+1,o=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>i){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,c),this.$lines.push(s)),this.$renderCell(s,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1);var o=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(o+=s.left+s.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.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=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.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),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var i=[],r=t,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,e,this.session,c);this.$renderCell(a,e,o,r),i.push(a),r++}return i},this.$renderCell=function(e,t,n,r){var o=e.element,s=this.session,a=o.childNodes[0],l=o.childNodes[1],c=s.$firstLineNumber,u=s.$breakpoints,d=s.$decorations,h=s.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&s.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,g="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r=p&&this.$cursorRow<=n.end.row)&&(g+="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)),u[r]&&(g+=u[r]),d[r]&&(g+=d[r]),this.$annotations[r]&&(g+=this.$annotations[r].className),o.className!=g&&(o.className=g),f){var m=f[r];null==m&&(m=f[r]=s.getFoldWidget(r))}if(m){g="ace_fold-widget ace_"+m;"start"==m&&r==p&&rn.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.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},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ih?4:0)|(c==l?8:0)),r,c==l?0:1,o)},this.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;(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",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(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",i,null,r)}else{a=this.$getTop(t.end.row,i);var u=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(e,t,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,o);var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),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;"+(o||""))}),this)},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(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)};(function(){i.implement(this,a),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$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},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nu&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>r);){var d=o[s++];if(d){this.dom.removeChildren(d),this.$renderLine(d,a,a==u&&l),c&&(d.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(a)+"px";d.style.height!=h&&(c=!0,d.style.height=h)}a++}if(c)for(;s0;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.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){for(var r,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\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,a=this.dom.createFragment(this.element),l=0;r=s.exec(i);){var c=r[1],u=r[2],d=r[3],h=r[4],f=r[5];if(this.showInvisibles||!u){var p=l!=r.index?i.slice(l,r.index):"";if(l=r.index+r[0].length,p&&a.appendChild(this.dom.createTextNode(p,this.element)),c){var g=this.session.getScreenTabSize(t+r.index);a.appendChild(this.$tabStrings[g].cloneNode(!0)),t+=g-1}else if(u){if(this.showInvisibles)(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",v.textContent=o.stringRepeat(this.SPACE_CHAR,u.length),a.appendChild(v);else a.appendChild(this.com.createTextNode(u,this.element))}else if(d){(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",v.textContent=o.stringRepeat(this.SPACE_CHAR,d.length),a.appendChild(v)}else if(h){t+=1,(v=this.dom.createElement("span")).style.width=2*this.config.characterWidth+"px",v.className=this.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=this.showInvisibles?this.SPACE_CHAR:h,a.appendChild(v)}else if(f){t+=1,(v=this.dom.createElement("span")).style.width=2*this.config.characterWidth+"px",v.className="ace_cjk",v.textContent=f,a.appendChild(v)}}}if(a.appendChild(this.dom.createTextNode(l?i.slice(l):i,this.element)),this.$textToken[n.type])e.appendChild(a);else{var m="ace_"+n.type.replace(/\./g," ace_"),v=this.dom.createElement("span");"fold"==n.type&&(v.style.width=n.value.length*this.config.characterWidth+"px"),v.className=m,v.appendChild(a),e.appendChild(v)}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,o=0;o=s;)a=this.$renderToken(l,a,u,d.substring(0,s-i)),d=d.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat("\xa0",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=d.length&&(i+=d.length,a=this.$renderToken(l,a,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(n=this.$renderToken(e,n,i,r));for(var o=1;othis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,r);n=this.$renderToken(e,n,i,r)}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"":"",e.appendChild(o)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var r=e;if(i.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,i,o);r=e.lastChild}else{r=e;this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showInvisibles&&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)}},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var r=n.getTokens(e);return t.walk((function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);on?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))}),t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=function(e){this.element=i.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(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout(function(){i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),i.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()},this.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}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.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)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),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 i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){i.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(l,a),function(){this.classSuffix="-v",this.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},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>32768?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var i=e("./lib/event"),r=function(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&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(r.prototype),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 i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,u=200,d=t.FontMetrics=function(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.innerHTML=o.stringRepeat("X",256),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$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"},this.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})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){var n=t[0].contentRect;e.checkForSizeChanges({height:n.height,width:n.width/256})})),this.$observer.observe(this.$measureNode)},this.$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)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/256};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$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(u,0),e(0,u),e(u,u)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(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 o(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),d=s(this.els[3]),h=n(i(d,l),i(d,c),i(r(l,c),r(d,a))),f=o(1+h[0],i(l,a)),p=o(1+h[1],i(c,a));if(t){var g=t,m=h[0]*g[0]/u+h[1]*g[1]/u+1,v=r(o(g[0],f),o(g[1],p));return r(o(1/m/u,v),a)}var b=i(e,a),y=n(i(f,o(h[0],b)),i(p,o(h[1],b)),b);return o(u,y)}}).call(d.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,h=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,g='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;perspective: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);opacity: 0.7;transform-origin: left;text-indent: 10px;}',m=e("./lib/useragent"),v=m.isIE;r.importCssString(g,"ace_editor.css");var b=function(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),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),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 s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.addEventListener("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 f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("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=!m.isIOS,this.$loop=new h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,p),this.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")},this.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))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(e||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){o|=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.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},this.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.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.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)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$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()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$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 i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(o<0||o>i.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 o+=this.lineHeight+2;else o+=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(o,c))}}}else r.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.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},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.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()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,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()},this.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,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()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$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)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$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"),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 i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,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 o=n.width+2*this.$padding+"px",s=n.minHeight+"px";r.setStyle(this.content.style,"width",o),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"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender");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.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(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")}else this.$changes|=e},this.$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 i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,i-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>u.top),h=a!==d;h&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var f,p,g=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-g)/this.lineHeight)),b=v+m,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var _=e.getFoldLine(v);_&&(v=_.start.row),f=e.documentToScreenRow(v,0),p=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*y+p,g=this.scrollTop-f*y;var w=0;return(this.layerConfig.width!=r||s)&&(w=this.CHANGE_H_SCROLL),(s||h)&&(w|=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:f,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:g,gutterOffset:y?Math.max(0,Math.ceil((g+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),w},this.$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)&&!(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(t&&l+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-ar?(r=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)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),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")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,this.$composition=null,this.$cursorLayer.element.style.display="")},this.addToken=function(e,t,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:t,value:e},s=r.getTokens(n);if(null==i)s.push(o);else for(var a=0,l=0;l50&&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 i=null,r=!1,a=Object.create(o),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(r?setTimeout(d):d())}});u.setEmitSync=function(e){r=e};var d=function(){var e=c.shift();e.command?i[e.command].apply(i,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(i=new e[n](a);c.length;)d()})),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 i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,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)};(function(){o.implement(this,r),this.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 i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=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+o};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+o};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(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)}},this.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))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1&&!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 i=this.ranges.indexOf(e[n]);this.ranges.splice(i,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 i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=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{n=this.getRange();var i=this.isBackwards(),o=n.start.row,s=n.end.row;if(o==s){if(i)var a=n.end,l=n.start;else a=n.start,l=n.end;return this.addRange(r.fromPoints(l,l)),void this.addRange(r.fromPoints(a,a))}var c=[],u=this.getLineRange(o,!0);u.start.column=n.start.column,c.push(u);for(var d=o+1;d1){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 i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column0;)b--;if(b>0)for(var y=0;i[y].isEmpty();)y++;for(var _=b;_>=y;_--)i[_].isEmpty()&&i.splice(_,1)}return i}}.call(o.prototype);var h=e("./editor").Editor;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)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),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&&i()})),a.addListener(t,"keyup",i),a.addListener(t,"blur",i)}(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 i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-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?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,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 d=l._eventRegistry;l._eventRegistry={};var h=new o(a);this.inVirtualSelectionMode=!0;for(var f=u.length;f--;){if(s)for(;f>0&&u[f].start.row==u[f-1].end.row;)f--;h.fromOrientedRange(u[f]),h.index=f,this.selection=a.selection=h;var p=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===p||(i=p),h.toOrientedRange(u[f])}h.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=d,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),i}},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=[],i=0;is&&(s=n.column),iu?e.insert(i,l.stringRepeat(" ",o-u)):e.remove(new r(i.row,i.column,i.row,i.column-o+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,h=u.end.row,f=d==h;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&++h0);d<0&&(d=0),h>=g&&(h=g-1)}var m=this.session.removeFullLines(d,h);m=this.$reAlignText(m,f),this.session.insert({row:d,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(r=t[3].length),t):[e]})).map(t?c:o?s?function(e){return e[2]?a(n+i-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(i-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("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),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 i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=e.getLength(),c=t,u=t;++tc){var f=e.getLine(u).length;return new i(c,a,u,f)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);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),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");e("./range").Range;function r(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)}(function(){this.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},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.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)))},this.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))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,r=i.start.row,o=i.end.row,s="add"==e.action,a=r+1;a0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[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=""}}}}}).call(r.prototype),t.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var 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 i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var d=u[0];s.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,s.row=d.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=h.el.appendChild(r.createElement("div")),p=h.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var g=e.renderer.$cursorLayer.getPixelPosition(s).left;p.style.left=g+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("
"),f.appendChild(r.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})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","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"],(function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),o=e("./lib/event"),s=e("./range").Range,a=e("./editor").Editor,l=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,u=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.require=e,t.define=n(52),t.edit=function(e,n){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;s=l.value,e=r.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(s=e.textContent,e.innerHTML="");var c=t.createEditSession(s),d=new a(new u(e),c,n),h={document:c,editor:d,onResize:d.resize.bind(d,null)};return l&&(h.textarea=l),o.addListener(window,"resize",h.onResize),d.on("destroy",(function(){o.removeListener(window,"resize",h.onResize),h.editor.container.env=null})),d.container.env=d.env=h,d},t.createEditSession=function(e,t){var n=new l(e,t);return n.setUndoManager(new c),n},t.Range=s,t.Editor=a,t.EditSession=l,t.UndoManager=c,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}).call(this,n(15)(e))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&e.handleMarkers(w,t);for(i=0;i0&&(!function(e){void 0===e&&(e=3);3!==e&&2!==e||(c(s.registeredStyles),s.registeredStyles=[]);3!==e&&1!==e||(c(s.registeredThemableStyles),s.registeredThemableStyles=[])}(1),a([].concat.apply([],e)))}}()}function c(e){e.forEach((function(e){var t=e&&e.styleElement;t&&t.parentElement&&t.parentElement.removeChild(t)}))}function u(e){var t=s.theme,n=!1;return{styleString:(e||[]).map((function(e){var i=e.theme;if(i){n=!0;var r=t?t[i]:void 0,o=e.defaultValue||"inherit";return!t||r||!console||i in t||"undefined"===typeof DEBUG||!DEBUG||console.warn('Theming value not provided for "'+i+'". Falling back to "'+o+'".'),r||o}return e.rawString})).join(""),themable:n}}}).call(this,n(31))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(23);function r(e,t,n){void 0===n&&(n=!0);var r=!1;if(e&&t)if(n)for(r=!1;t;){var o=Object(i.a)(t);if(o===e){r=!0;break}t=o}else e.contains&&(r=e.contains(t));return r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(37),r=function(){function e(t){this._id=e._uniqueId++,this._parent=t,this._eventRecords=[]}return e.raise=function(t,n,r,o){var s;if(e._isElement(t)){if("undefined"!==typeof document&&document.createEvent){var a=document.createEvent("HTMLEvents");a.initEvent(n,o||!1,!0),Object(i.a)(a,r),s=t.dispatchEvent(a)}else if("undefined"!==typeof document&&document.createEventObject){var l=document.createEventObject(r);t.fireEvent("on"+n,l)}}else for(;t&&!1!==s;){var c=t.__events__,u=c?c[n]:null;if(u)for(var d in u)if(u.hasOwnProperty(d))for(var h=u[d],f=0;!1!==s&&f-1)for(var s=n.split(/[ ,]+/),a=0;a=t.status}function r(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(t){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,s){var a=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?r(l):i(l.href)?t(e,n,s):r(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){r(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(i(e))t(e,n,o);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){r(s)}))}}:function(e,n,i,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,i);var s="application/octet-stream"===e.type,a=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&a)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},c.readAsDataURL(e)}else{var u=o.URL||o.webkitURL,d=u.createObjectURL(e);r?r.location=d:location.href=d,r=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s})?i.apply(t,r):i)||(e.exports=o)}).call(this,n(31))},function(e,t,n){"use strict";n(8);var i=n(11);var r=n(16);n.d(t,"a",(function(){return s}));var o;function s(e){if(void 0===e&&(e={}),void 0!==e.rtl)return e.rtl;if(void 0===o){var t=function(e){var t=null;try{t=window.sessionStorage.getItem(e)}catch(n){}return t}("isRTL");null!==t&&function(e,t){void 0===t&&(t=!1);var n=Object(i.a)();n&&n.documentElement.setAttribute("dir",e?"rtl":"ltr");t&&function(e,t){try{window.sessionStorage.setItem(e,t)}catch(n){}}("isRTL",e?"1":"0");o=e,Object(r.b)(o)}(o="1"===t);var n=Object(i.a)();void 0===o&&n&&(o="rtl"===(n.body&&n.body.getAttribute("dir")||n.documentElement.getAttribute("dir")),Object(r.b)(o))}return!!o}},,,,,function(e,t,n){"use strict";var i=n(48),r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,s=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,d=r?Symbol.for("react.context"):60110,h=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113;r&&Symbol.for("react.suspense_list");var p=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116;r&&Symbol.for("react.fundamental"),r&&Symbol.for("react.responder"),r&&Symbol.for("react.scope");var m="function"===typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nL.length&&L.push(e)}function $(e,t,n){return null==e?0:function e(t,n,i,r){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var l=!1;if(null===t)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case s:l=!0}}if(l)return i(r,t,""===n?"."+D(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c


",s.escapeHTML(e.snippet)].join(""))}},d=[u,l,c];t.setCompleters=function(e){d.length=0,e&&d.push.apply(d,e)},t.addCompleter=function(e){d.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var h={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){p(t.session.$mode)},p=function e(t){var n=t.$id;i.files||(i.files={}),g(n),t.modes&&t.modes.forEach(e)},g=function e(t){if(t&&!i.files[t]){var n=t.replace("mode","snippets");i.files[t]={},o.loadModule(n,(function(n){n&&(i.files[t]=n,!n.snippets&&n.snippetText&&(n.snippets=i.parseSnippetFile(n.snippetText)),i.register(n.snippets||[],n.scope),n.includeScopes&&(i.snippetMap[n.scope].includeScopes=n.includeScopes,n.includeScopes.forEach((function(t){e("ace/mode/"+t)}))))}))}},m=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){if(a.getCompletionPrefix(t)&&!n){var i=r.for(t);i.autoInsert=!1,i.showPopup(t)}}},v=e("../editor").Editor;e("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),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:d),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(h),this.off("changeMode",f))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))}).call(this,n(15)(e))},function(e,t,n){(function(e){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function e(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},e.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};i.inherits(o,r),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o})),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*",a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[r.getStartRule("doc-start"),c("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+s+")(\\.)(prototype)(\\.)("+s+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?: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|time|trace|timeEnd|assert)\b/},{token:t,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:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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"}],function_arguments:[{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{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:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),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 i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},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}]}]}i.inherits(a,o),t.JavaScriptHighlightRules=a})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=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,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new i(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/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var i=e("../../lib/oop"),r=e("../../range").Range,o=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)))};i.inherits(s,o),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 i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.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()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(i==c)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new r(s,i,n,t.length)}}.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/cstyle","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new l,this.foldingRules=new c};i.inherits(u,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),o=r.tokens,s=r.state;if(o.length&&"comment"==o[o.length-1].type)return i;if("start"==e||"no_regex"==e)(a=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(i+=n);else if("doc-start"==e){if("start"==s||"no_regex"==s)return"";var a;(a=t.match(/^\s*(\/?)\*/))&&(a[1]&&(i+=" "),i+="* ")}return i},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"}.call(u.prototype),t.Mode=u})),ace.require(["ace/mode/javascript"],(function(t){e&&(e.exports=t)}))}).call(this,n(15)(e))},function(e,t,n){(function(e){ace.define("ace/snippets/javascript",["require","exports","module"],(function(e,t,n){"use strict";t.snippetText='# 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',t.scope="javascript"})),ace.require(["ace/snippets/javascript"],(function(t){e&&(e.exports=t)}))}).call(this,n(15)(e))},function(e,t,n){(function(e){ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.require(["ace/theme/monokai"],(function(t){e&&(e.exports=t)}))}).call(this,n(15)(e))},function(e,t,n){(function(e){ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),s=e("./range").Range,a=e("./range_list").RangeList,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,u=e("./clipboard"),d={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},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 u.getText&&u.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:h.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:h.bind(null,{year:"2-digit"}),CURRENT_MONTH:h.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:h.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:h.bind(null,{month:"short"}),CURRENT_DATE:h.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:h.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:h.bind(null,{weekday:"short"}),CURRENT_HOUR:h.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:h.bind(null,{minute:"2-digit"}),CURRENT_SECOND:h.bind(null,{second:"2-digit"})};function h(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}d.SELECTED_TEXT=d.SELECTION;var f=function(){this.snippetMap={},this.snippetNameMap={}};(function(){i.implement(this,r),this.getTokenizer=function(){return f.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+t("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return f.$tokenizer=new c({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0");return n[0].choices=i,[i[0]]},next:"start"},n,{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 i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},n,{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"}]})},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.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 i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),null==i?"":i},this.variables=d,this.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this;return e.replace(r,(function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(o,n),i="E",r=0;r1?(b=t[t.length-1].length,v+=t.length-1):b+=e.length,y+=e}else e&&(e.start?e.end={row:v,column:b}:e.start={row:v,column:b})}));var _=e.getSelectionRange(),w=e.session.replace(_,y),S=new p(e),E=e.inVirtualSelectionMode&&e.selection.index;S.addTabstops(a,_.start,w,E)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection((function(){n.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$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(),i=e.session.getState(n.row);"object"===typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?t="javascript":"css-"==i.substring(0,4)?t="css":"php-"==i.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],i=this.snippetMap;return i[t]&&i[t].includeScopes&&n.push.apply(n,i[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),r=e.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,o,s)),!!n}),this),!!n&&(!(!t||!t.dryRun)||(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.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))},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var r=e[i];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}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var n=this.snippetMap,i=this.snippetNameMap,r=this;function s(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,n){return e=s(e),t=s(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]=[],i[t]={});var s=i[t];if(e.name){var l=s[e.name];l&&r.unregister(l),s[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=o.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=[]),e&&e.content?l(e):Array.isArray(e)&&e.forEach(l),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var n=this.snippetMap,i=this.snippetNameMap;function r(e){var r=i[e.scope||t];if(r&&r[e.name]){delete r[e.name];var o=n[e.scope||t],s=o&&o.indexOf(e);s>=0&&o.splice(s,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(l){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=t[2],s=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=a.exec(s)[1],i.trigger=a.exec(s)[1],i.endTrigger=a.exec(s)[1],i.endGuard=a.exec(s)[1]}else"snippet"==o?(i.tabTrigger=s.match(/^\S*/)[0],i.name||(i.name=s)):i[o]=s}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var r=i[t];return r&&(n=r[e]),!!n}),this),n}}).call(f.prototype);var p=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop&&this.selectedTabstop.parents||{},i=(this.tabstops||[]).slice(),r=0;r2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.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.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(p.prototype);var g=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},m=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new f;var v=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(v.prototype)})),ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config","resources","resources","tabStops","resources","utils","actions"],(function(e,t,n){"use strict";var i,r,o=e("../keyboard/hash_handler").HashHandler,s=e("../editor").Editor,a=e("../snippets").snippetManager,l=e("../range").Range,c=e("../config");function u(){}u.prototype={setupContext:function(e){this.ace=e,this.indentation=e.session.getTabString(),i||(i=window.emmet),(i.resources||i.require("resources")).setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},getSelectionRange:function(){var e=this.ace.getSelectionRange(),t=this.ace.session.doc;return{start:t.positionToIndex(e.start),end:t.positionToIndex(e.end)}},createSelection:function(e,t){var n=this.ace.session.doc;this.ace.selection.setRange({start:n.indexToPosition(e),end:n.indexToPosition(t)})},getCurrentLineRange:function(){var e=this.ace,t=e.getCursorPosition().row,n=e.session.getLine(t).length,i=e.session.doc.positionToIndex({row:t,column:0});return{start:i,end:i+n}},getCaretPos:function(){var e=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(e)},setCaretPos:function(e){var t=this.ace.session.doc.indexToPosition(e);this.ace.selection.moveToPosition(t)},getCurrentLine:function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},replaceContent:function(e,t,n,i){null==n&&(n=null==t?this.getContent().length:t),null==t&&(t=0);var r=this.ace,o=r.session.doc,s=l.fromPoints(o.indexToPosition(t),o.indexToPosition(n));r.session.remove(s),s.end=s.start,e=this.$updateTabstops(e),a.insertSnippet(r,e)},getContent:function(){return this.ace.getValue()},getSyntax:function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if("html"==e||"php"==e){var t=this.ace.getCursorPosition(),n=this.ace.session.getState(t.row);"string"!=typeof n&&(n=n[0]),n&&((n=n.split("-")).length>1?e=n[0]:"php"==e&&(e="html"))}return e},getProfileName:function(){var e=i.resources||i.require("resources");switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var t=e.getVariable("profile");return t||(t=-1!=this.ace.session.getLines(0,2).join("").search(/]+XHTML/i)?"xhtml":"html"),t;default:var n=this.ace.session.$mode;return n.emmetConfig&&n.emmetConfig.profile||"xhtml"}},prompt:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return prompt(e)})),getSelection:function(){return this.ace.session.getTextRange()},getFilePath:function(){return""},$updateTabstops:function(e){var t=0,n=null,r=i.tabStops||i.require("tabStops"),o=(i.resources||i.require("resources")).getVocabulary("user"),s={tabstop:function(e){var i=parseInt(e.group,10),o=0===i;o?i=++t:i+=1e3;var a=e.placeholder;a&&(a=r.processText(a,s));var l="${"+i+(a?":"+a:"")+"}";return o&&(n=[e.start,l]),l},escape:function(e){return"$"==e?"\\$":"\\"==e?"\\\\":e}};if(e=r.processText(e,s),o.variables.insert_final_tabstop&&!/\$\{0\}$/.test(e))e+="${0}";else if(n){e=(i.utils?i.utils.common:i.require("utils")).replaceSubstring(e,"${0}",n[0],n[1])}return e}};var d={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},h=new u;for(var f in t.commands=new o,t.runEmmetCommand=function e(n){if("expand_abbreviation_with_tab"==this.action){if(!n.selection.isEmpty())return!1;var r=n.selection.lead,o=n.session.getTokenAt(r.row,r.column);if(o&&/\btag\b/.test(o.type))return!1}try{h.setupContext(n);var s=i.actions||i.require("actions");if("wrap_with_abbreviation"==this.action)return setTimeout((function(){s.run("wrap_with_abbreviation",h)}),0);var a=s.run(this.action,h)}catch(u){if(!i){var l=t.load(e.bind(this,n));return"expand_abbreviation_with_tab"!=this.action&&l}n._signal("changeStatus","string"==typeof u?u:u.message),c.warn(u),a=!1}return a},d)t.commands.addCommand({name:"emmet:"+f,action:f,bindKey:d[f],exec:t.runEmmetCommand,multiSelectAction:"forEach"});t.updateCommands=function(e,n){n?e.keyBinding.addKeyboardHandler(t.commands):e.keyBinding.removeKeyboardHandler(t.commands)},t.isSupportedMode=function(e){if(!e)return!1;if(e.emmetConfig)return!0;var t=e.$id||e;return/css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(t)},t.isAvailable=function(e,n){if(/(evaluate_math_expression|expand_abbreviation)$/.test(n))return!0;var i=e.session.$mode,r=t.isSupportedMode(i);if(r&&i.$modes)try{h.setupContext(e),/js|php/.test(h.getSyntax())&&(r=!1)}catch(o){}return r};var p=function(e,n){var i=n;if(i){var r=t.isSupportedMode(i.session.$mode);!1===e.enableEmmet&&(r=!1),r&&t.load(),t.updateCommands(i,r)}};t.load=function(e){return"string"!==typeof r?(c.warn("script for emmet-core is not loaded"),!1):(c.loadModule(r,(function(){r=null,e&&e()})),!0)},t.AceEmmetEditor=u,c.defineOptions(s.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",p),p({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){"string"==typeof e?r=e:i=e}})),ace.require(["ace/ext/emmet"],(function(t){e&&(e.exports=t)}))}).call(this,n(15)(e))},,function(e,t,n){},function(e,t,n){!function(e){"use strict";var t=function(e){return e instanceof HTMLElement},n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=Object.assign({},e),r=[],o=[],s=function(){return Object.assign({},i)},a=function(){var e=[].concat(r);return r.length=0,e},l=function(){var e=[].concat(o);o.length=0,e.forEach((function(e){var t=e.type,n=e.data;c(t,n)}))},c=function(e,t,n){n?o.push({type:e,data:t}):(f[e]&&f[e](t),r.push({type:e,data:t}))},u=function(e){for(var t,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,n)},s="http://www.w3.org/2000/svg",a=["svg","path"],l=function(e){return a.includes(e)},c=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"===typeof t&&(n=t,t=null);var r=l(e)?document.createElementNS(s,e):document.createElement(e);return t&&(l(e)?o(r,"class",t):r.className=t),i(n,(function(e,t){o(r,e,t)})),r},u=function(e){return function(t,n){"undefined"!==typeof n&&e.children[n]?e.insertBefore(t,e.children[n]):e.appendChild(t)}},d=function(e,t){return function(e,n){return"undefined"!==typeof n?t.splice(n,0,e):t.push(e),e}},h=function(e,t){return function(n){return t.splice(t.indexOf(n),1),n.element.parentNode&&e.removeChild(n.element),n}},f="undefined"!==typeof window&&"undefined"!==typeof window.document,p=function(){return f},g="children"in(p()?c("svg"):{})?function(e){return e.children.length}:function(e){return e.childNodes.length},m=function(e,t,n,i){var r=n[0]||e.left,o=n[1]||e.top,s=r+e.width,a=o+e.height*(i[1]||1),l={element:Object.assign({},e),inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:r,top:o,right:s,bottom:a}};return t.filter((function(e){return!e.isRectIgnored()})).map((function(e){return e.rect})).forEach((function(e){v(l.inner,Object.assign({},e.inner)),v(l.outer,Object.assign({},e.outer))})),b(l.inner),l.outer.bottom+=l.element.marginBottom,l.outer.right+=l.element.marginRight,b(l.outer),l},v=function(e,t){t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},b=function(e){e.width=e.right-e.left,e.height=e.bottom-e.top},y=function(e){return"number"===typeof e},_=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(e-t)0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiffness,n=void 0===t?.5:t,i=e.damping,o=void 0===i?.75:i,s=e.mass,a=void 0===s?10:s,l=null,c=null,u=0,d=!1,h=function(){if(!d){if(!y(l)||!y(c))return d=!0,void(u=0);_(c+=u+=-(c-l)*n/a,l,u*=o)?(c=l,u=0,d=!0,p.onupdate(c),p.oncomplete(c)):p.onupdate(c)}},f=function(e){if(y(e)&&!y(c)&&(c=e),null===l&&(l=e,c=e),c===(l=e)||"undefined"===typeof l)return d=!0,u=0,p.onupdate(c),void p.oncomplete(c);d=!1},p=r({interpolate:h,target:{set:f,get:function(){return l}},resting:{get:function(){return d}},onupdate:function(e){},oncomplete:function(e){}});return p},tween:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.duration,o=void 0===i?500:i,s=n.easing,a=void 0===s?w:s,l=n.delay,c=void 0===l?0:l,u=null,d=!0,h=!1,f=null,p=function(n){d||null===f||(null===u&&(u=n),n-u=0?a(h?1-t:t):0)*f)):(e=1,t=h?0:1,g.onupdate(t*f),g.oncomplete(t*f),d=!0)))},g=r({interpolate:p,target:{get:function(){return h?0:f},set:function(e){if(null===f)return f=e,g.onupdate(e),void g.oncomplete(e);e3&&void 0!==arguments[3]&&arguments[3];(t=Array.isArray(t)?t:[t]).forEach((function(t){e.forEach((function(e){var r=e,o=function(){return n[e]},s=function(t){return n[e]=t};"object"===typeof e&&(r=e.key,o=e.getter||o,s=e.setter||s),t[r]&&!i||(t[r]={get:o,set:s})}))}))},T=function(e){return null!=e},x={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},k=function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!0;for(var n in t)if(t[n]!==e[n])return!0;return!1},M=function(e,t){var n=t.opacity,i=t.perspective,r=t.translateX,o=t.translateY,s=t.scaleX,a=t.scaleY,l=t.rotateX,c=t.rotateY,u=t.rotateZ,d=t.originX,h=t.originY,f=t.width,p=t.height,g="",m="";(T(d)||T(h))&&(m+="transform-origin: "+(d||0)+"px "+(h||0)+"px;"),T(i)&&(g+="perspective("+i+"px) "),(T(r)||T(o))&&(g+="translate3d("+(r||0)+"px, "+(o||0)+"px, 0) "),(T(s)||T(a))&&(g+="scale3d("+(T(s)?s:1)+", "+(T(a)?a:1)+", 1) "),T(u)&&(g+="rotateZ("+u+"rad) "),T(l)&&(g+="rotateX("+l+"rad) "),T(c)&&(g+="rotateY("+c+"rad) "),g.length&&(m+="transform:"+g+";"),T(n)&&(m+="opacity:"+n+";",0===n&&(m+="visibility:hidden;"),n<1&&(m+="pointer-events:none;")),T(p)&&(m+="height:"+p+"px;"),T(f)&&(m+="width:"+f+"px;");var v=e.elementCurrentStyle||"";m.length===v.length&&m===v||(e.style.cssText=m,e.elementCurrentStyle=m)},R={styles:function(e){var t=e.mixinConfig,n=e.viewProps,i=e.viewInternalAPI,r=e.viewExternalAPI,o=e.view,s=Object.assign({},n),a={};C(t,[i,r],n);var l=function(){return o.rect?m(o.rect,o.childViews,[n.translateX||0,n.translateY||0],[n.scaleX||0,n.scaleY||0]):null};return i.rect={get:l},r.rect={get:l},t.forEach((function(e){n[e]="undefined"===typeof s[e]?x[e]:s[e]})),{write:function(){if(k(a,n))return M(o.element,n),Object.assign(a,Object.assign({},n)),!0},destroy:function(){}}},listeners:function(e){e.mixinConfig,e.viewProps,e.viewInternalAPI;var t,n=e.viewExternalAPI,i=(e.viewState,e.view),r=[],o=(t=i.element,function(e,n){t.addEventListener(e,n)}),s=function(e){return function(t,n){e.removeEventListener(t,n)}}(i.element);return n.on=function(e,t){r.push({type:e,fn:t}),o(e,t)},n.off=function(e,t){r.splice(r.findIndex((function(n){return n.type===e&&n.fn===t})),1),s(e,t)},{write:function(){return!0},destroy:function(){r.forEach((function(e){s(e.type,e.fn)}))}}},animations:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,o=e.viewExternalAPI,s=(e.viewState,Object.assign({},n)),a=[];return i(t,(function(e,t){var i=E(t);i&&(i.onupdate=function(t){n[e]=t},i.target=s[e],C([{key:e,setter:function(e){i.target!==e&&(i.target=e)},getter:function(){return n[e]}}],[r,o],n,!0),a.push(i))})),{write:function(e){var t=!0;return a.forEach((function(n){n.resting||(t=!1),n.interpolate(e)})),t},destroy:function(){}}},apis:function(e){var t=e.mixinConfig,n=e.viewProps,i=e.viewExternalAPI;C(t,i,n)}},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.layoutCalculated||(e.paddingTop=parseInt(n.paddingTop,10)||0,e.marginTop=parseInt(n.marginTop,10)||0,e.marginRight=parseInt(n.marginRight,10)||0,e.marginBottom=parseInt(n.marginBottom,10)||0,e.marginLeft=parseInt(n.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=null===t.offsetParent,e},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,i=e.name,o=void 0===i?null:i,s=e.attributes,a=void 0===s?{}:s,l=e.read,f=void 0===l?function(){}:l,p=e.write,v=void 0===p?function(){}:p,b=e.create,y=void 0===b?function(){}:b,_=e.destroy,w=void 0===_?function(){}:_,S=e.filterFrameActionsForChild,E=void 0===S?function(e,t){return t}:S,C=e.didCreateView,T=void 0===C?function(){}:C,x=e.didWriteView,k=void 0===x?function(){}:x,M=e.ignoreRect,L=void 0!==M&&M,A=e.ignoreRectUpdate,O=void 0!==A&&A,$=e.mixins,D=void 0===$?[]:$;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=c(n,"filepond--"+o,a),s=window.getComputedStyle(i,null),l=I(),p=null,b=!1,_=[],S=[],C={},x={},M=[v],A=[f],$=[w],P=function(){return i},F=function(){return _.concat()},N=function(){return C},B=function(e){return function(t,n){return t(e,n)}},H=function(){return p||(p=m(l,_,[0,0],[1,1]))},W=function(){return s},j=function(){p=null,_.forEach((function(e){return e._read()})),!(O&&l.width&&l.height)&&I(l,i,s);var e={root:Y,props:t,rect:l};A.forEach((function(t){return t(e)}))},U=function(e,n,i){var r=0===n.length;return M.forEach((function(o){!1===o({props:t,root:Y,actions:n,timestamp:e,shouldOptimize:i})&&(r=!1)})),S.forEach((function(t){!1===t.write(e)&&(r=!1)})),_.filter((function(e){return!!e.element.parentNode})).forEach((function(t){t._write(e,E(t,n),i)||(r=!1)})),_.forEach((function(t,o){t.element.parentNode||(Y.appendChild(t.element,o),t._read(),t._write(e,E(t,n),i),r=!1)})),b=r,k({props:t,root:Y,actions:n,timestamp:e}),r},z=function(){S.forEach((function(e){return e.destroy()})),$.forEach((function(e){e({root:Y,props:t})})),_.forEach((function(e){return e._destroy()}))},V={element:{get:P},style:{get:W},childViews:{get:F}},G=Object.assign({},V,{rect:{get:H},ref:{get:N},is:function(e){return o===e},appendChild:u(i),createChildView:B(e),linkView:function(e){return _.push(e),e},unlinkView:function(e){_.splice(_.indexOf(e),1)},appendChildView:d(0,_),removeChildView:h(i,_),registerWriter:function(e){return M.push(e)},registerReader:function(e){return A.push(e)},registerDestroyer:function(e){return $.push(e)},invalidateLayout:function(){return i.layoutCalculated=!1},dispatch:e.dispatch,query:e.query}),K={element:{get:P},childViews:{get:F},rect:{get:H},resting:{get:function(){return b}},isRectIgnored:function(){return L},_read:j,_write:U,_destroy:z},q=Object.assign({},V,{rect:{get:function(){return l}}});Object.keys(D).sort((function(e,t){return"styles"===e?1:"styles"===t?-1:0})).forEach((function(e){var n=R[e]({mixinConfig:D[e],viewProps:t,viewState:x,viewInternalAPI:G,viewExternalAPI:K,view:r(q)});n&&S.push(n)}));var Y=r(G);y({root:Y,props:t});var X=g(i);return _.forEach((function(e,t){Y.appendChild(e.element,X+t)})),T(Y),r(K)}},A=function(e,t){return function(n){var i=n.root,r=n.props,o=n.actions,s=void 0===o?[]:o,a=n.timestamp,l=n.shouldOptimize;s.filter((function(t){return e[t.type]})).forEach((function(t){return e[t.type]({root:i,props:r,action:t.data,timestamp:a,shouldOptimize:l})})),t&&t({root:i,props:r,actions:s,timestamp:a,shouldOptimize:l})}},O=function(e,t){return t.parentNode.insertBefore(e,t)},$=function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},D=function(e){return Array.isArray(e)},P=function(e){return null==e},F=function(e){return e.trim()},N=function(e){return""+e},B=function(e){return"boolean"===typeof e},H=function(e){return B(e)?e:"true"===e},W=function(e){return"string"===typeof e},j=function(e){return y(e)?e:W(e)?N(e).replace(/[a-z]+/gi,""):0},U=function(e){return parseInt(j(e),10)},z=function(e){return parseFloat(j(e))},V=function(e){return y(e)&&isFinite(e)&&Math.floor(e)===e},G=function(e){if(V(e))return e;var t=N(e).trim();return/MB$/i.test(t)?(t=t.replace(/MB$i/,"").trim(),1e3*U(t)*1e3):/KB/i.test(t)?(t=t.replace(/KB$i/,"").trim(),1e3*U(t)):U(t)},K=function(e){return"function"===typeof e},q={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},Y=function(e,t,n,i,r){if(null===t)return null;if("function"===typeof t)return t;var o={url:"GET"===n||"PATCH"===n?"?"+e+"=":"",method:n,headers:r,withCredentials:!1,timeout:i,onload:null,ondata:null,onerror:null};if(W(t))return o.url=t,o;if(Object.assign(o,t),W(o.headers)){var s=o.headers.split(/:(.+)/);o.headers={header:s[0],value:s[1]}}return o.withCredentials=H(o.withCredentials),o},X=function(e){return"object"===typeof e&&null!==e},Q=function(e){return D(e)?"array":function(e){return null===e}(e)?"null":V(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":function(e){return X(e)&&W(e.url)&&X(e.process)&&X(e.revert)&&X(e.restore)&&X(e.fetch)}(e)?"api":typeof e},Z={array:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return P(e)?[]:D(e)?e:N(e).split(t).map(F).filter((function(e){return e.length}))},boolean:H,int:function(e){return"bytes"===Q(e)?G(e):U(e)},number:z,float:z,bytes:G,string:function(e){return K(e)?e:N(e)},function:function(e){return function(e){for(var t=self,n=e.split("."),i=null;i=n.shift();)if(!(t=t[i]))return null;return t}(e)},serverapi:function(e){return function(e){var t={};return t.url=W(e)?e:e.url||"",t.timeout=e.timeout?parseInt(e.timeout,10):0,t.headers=e.headers?e.headers:{},i(q,(function(n){t[n]=Y(n,e[n],q[n],t.timeout,t.headers)})),t.remove=e.remove||null,delete t.headers,t}(e)},object:function(e){try{return JSON.parse(e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'))}catch(t){return null}}},J=function(e,t,n){if(e===t)return e;var i,r=Q(e);if(r!==n){var o=(i=e,Z[n](i));if(r=Q(o),null===o)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';e=o}return e},ee=function(e){var t={};return i(e,(function(n){var i=e[n];t[n]=function(e,t){var n=e;return{enumerable:!0,get:function(){return n},set:function(i){n=J(i,e,t)}}}(i[0],i[1])})),r(t)},te=function(e){return{items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:ee(e)}},ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.split(/(?=[A-Z])/).map((function(e){return e.toLowerCase()})).join(t)},ie=function(e,t){var n={};return i(t,(function(t){n[t]={get:function(){return e.getState().options[t]},set:function(n){e.dispatch("SET_"+ne(t,"_").toUpperCase(),{value:n})}}})),n},re=function(e){return function(t,n,r){var o={};return i(e,(function(e){var n=ne(e,"_").toUpperCase();o["SET_"+n]=function(i){try{r.options[e]=i.value}catch(o){}t("DID_SET_"+n,{value:r.options[e]})}})),o}},oe=function(e){return function(t){var n={};return i(e,(function(e){n["GET_"+ne(e,"_").toUpperCase()]=function(n){return t.options[e]}})),n}},se=1,ae=2,le=3,ce=4,ue=5,de=function(){return Math.random().toString(36).substr(2,9)},he=function(e,t){return e.splice(t,1)},fe=function(){var e=[],t=function(t,n){he(e,e.findIndex((function(e){return e.event===t&&(e.cb===n||!n)})))};return{fire:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rBrowse',Se.STRING],labelInvalidField:["Field contains invalid files",Se.STRING],labelFileWaitingForSize:["Waiting for size",Se.STRING],labelFileSizeNotAvailable:["Size not available",Se.STRING],labelFileCountSingular:["file in list",Se.STRING],labelFileCountPlural:["files in list",Se.STRING],labelFileLoading:["Loading",Se.STRING],labelFileAdded:["Added",Se.STRING],labelFileLoadError:["Error during load",Se.STRING],labelFileRemoved:["Removed",Se.STRING],labelFileRemoveError:["Error during remove",Se.STRING],labelFileProcessing:["Uploading",Se.STRING],labelFileProcessingComplete:["Upload complete",Se.STRING],labelFileProcessingAborted:["Upload cancelled",Se.STRING],labelFileProcessingError:["Error during upload",Se.STRING],labelFileProcessingRevertError:["Error during revert",Se.STRING],labelTapToCancel:["tap to cancel",Se.STRING],labelTapToRetry:["tap to retry",Se.STRING],labelTapToUndo:["tap to undo",Se.STRING],labelButtonRemoveItem:["Remove",Se.STRING],labelButtonAbortItemLoad:["Abort",Se.STRING],labelButtonRetryItemLoad:["Retry",Se.STRING],labelButtonAbortItemProcessing:["Cancel",Se.STRING],labelButtonUndoItemProcessing:["Undo",Se.STRING],labelButtonRetryItemProcessing:["Retry",Se.STRING],labelButtonProcessItem:["Upload",Se.STRING],iconRemove:['',Se.STRING],iconProcess:['',Se.STRING],iconRetry:['',Se.STRING],iconUndo:['',Se.STRING],iconDone:['',Se.STRING],oninit:[null,Se.FUNCTION],onwarning:[null,Se.FUNCTION],onerror:[null,Se.FUNCTION],onactivatefile:[null,Se.FUNCTION],onaddfilestart:[null,Se.FUNCTION],onaddfileprogress:[null,Se.FUNCTION],onaddfile:[null,Se.FUNCTION],onprocessfilestart:[null,Se.FUNCTION],onprocessfileprogress:[null,Se.FUNCTION],onprocessfileabort:[null,Se.FUNCTION],onprocessfilerevert:[null,Se.FUNCTION],onprocessfile:[null,Se.FUNCTION],onprocessfiles:[null,Se.FUNCTION],onremovefile:[null,Se.FUNCTION],onpreparefile:[null,Se.FUNCTION],onupdatefiles:[null,Se.FUNCTION],beforeDropFile:[null,Se.FUNCTION],beforeAddFile:[null,Se.FUNCTION],beforeRemoveFile:[null,Se.FUNCTION],stylePanelLayout:[null,Se.STRING],stylePanelAspectRatio:[null,Se.STRING],styleItemPanelAspectRatio:[null,Se.STRING],styleButtonRemoveItemPosition:["left",Se.STRING],styleButtonProcessItemPosition:["right",Se.STRING],styleLoadIndicatorPosition:["right",Se.STRING],styleProgressIndicatorPosition:["right",Se.STRING],files:[[],Se.ARRAY]},Re=function(e,t){return P(t)?e[0]||null:V(t)?e[t]||null:("object"===typeof t&&(t=t.id),e.find((function(e){return e.id===t}))||null)},Ie=function(e){if(P(e))return e;if(/:/.test(e)){var t=e.split(":");return t[1]/t[0]}return parseFloat(e)},Le=function(e){return e.filter((function(e){return!e.archived}))},Ae={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},Oe=[be.LOAD_ERROR,be.PROCESSING_ERROR,be.PROCESSING_REVERT_ERROR],$e=[be.LOADING,be.PROCESSING,be.PROCESSING_QUEUED,be.INIT],De=[be.PROCESSING_COMPLETE],Pe=function(e){return Oe.includes(e.status)},Fe=function(e){return $e.includes(e.status)},Ne=function(e){return De.includes(e.status)},Be=function(e){return{GET_STATUS:function(){var t=Le(e.items),n=Ae.EMPTY,i=Ae.ERROR,r=Ae.BUSY,o=Ae.IDLE,s=Ae.READY;return 0===t.length?n:t.some(Pe)?i:t.some(Fe)?r:t.some(Ne)?s:o},GET_ITEM:function(t){return Re(e.items,t)},GET_ACTIVE_ITEM:function(t){return Re(Le(e.items),t)},GET_ACTIVE_ITEMS:function(){return Le(e.items)},GET_ITEMS:function(){return e.items},GET_ITEM_NAME:function(t){var n=Re(e.items,t);return n?n.filename:null},GET_ITEM_SIZE:function(t){var n=Re(e.items,t);return n?n.fileSize:null},GET_STYLES:function(){return Object.keys(e.options).filter((function(e){return/^style/.test(e)})).map((function(t){return{name:t,value:e.options[t]}}))},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(e.options.stylePanelLayout)?1:Ie(e.options.stylePanelAspectRatio)},GET_ITEM_PANEL_ASPECT_RATIO:function(){return e.options.styleItemPanelAspectRatio},GET_ITEMS_BY_STATUS:function(t){return Le(e.items).filter((function(e){return e.status===t}))},GET_TOTAL_ITEMS:function(){return Le(e.items).length},IS_ASYNC:function(){return X(e.options.server)&&(X(e.options.server.process)||K(e.options.server.process))}}},He=function(e,t,n){return Math.max(Math.min(n,e),t)},We=function(e){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e)},je=function(e){return e.split("/").pop().split("?").shift()},Ue=function(e){return e.split(".").pop()},ze=function(e){if("string"!==typeof e)return"";var t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?"jpeg"===t?"jpg":t:""},Ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t+e).slice(-t.length)},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return e.getFullYear()+"-"+Ve(e.getMonth()+1,"00")+"-"+Ve(e.getDate(),"00")+"_"+Ve(e.getHours(),"00")+"-"+Ve(e.getMinutes(),"00")+"-"+Ve(e.getSeconds(),"00")},Ke=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r="string"===typeof n?e.slice(0,e.size,n):e.slice(0,e.size,e.type);return r.lastModifiedDate=new Date,W(t)||(t=Ge()),t&&null===i&&Ue(t)?r.name=t:(i=i||ze(r.type),r.name=t+(i?"."+i:"")),r},qe=function(e,t){var n=window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(n){var i=new n;return i.append(e),i.getBlob(t)}return new Blob([e],{type:t})},Ye=function(e){return(/^data:(.+);/.exec(e)||[])[1]||null},Xe=function(e){var t=Ye(e);return function(e,t){for(var n=new ArrayBuffer(e.length),i=new Uint8Array(n),r=0;r=200&&s.status<300?i.onload(s):i.onerror(s)},s.onerror=function(){return i.onerror(s)},s.onabort=function(){r=!0,i.onabort()},s.ontimeout=function(){return i.ontimeout(s)},s.open(n.method,t,!0),V(n.timeout)&&(s.timeout=n.timeout),Object.keys(n.headers).forEach((function(e){var t=unescape(encodeURIComponent(n.headers[e]));s.setRequestHeader(e,t)})),n.responseType&&(s.responseType=n.responseType),n.withCredentials&&(s.withCredentials=!0),s.send(e),i},rt=function(e,t,n,i){return{type:e,code:t,body:n,headers:i}},ot=function(e){return function(t){e(rt("error",0,"Timeout",t.getAllResponseHeaders()))}},st=function(e){return/\?/.test(e)},at=function(){for(var e="",t=arguments.length,n=new Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"===typeof t)return t;if(!t||!W(t.url))return null;var n=t.onload||function(e){return e},i=t.onerror||function(e){return null};return function(r,o,s,a,l,c){var u=it(r,at(e,t.url),Object.assign({},t,{responseType:"blob"}));return u.onload=function(e){var t=e.getAllResponseHeaders(),i=et(t).name||je(r);o(rt("load",e.status,Ke(n(e.response),i),t))},u.onerror=function(e){s(rt("error",e.status,i(e.response)||e.statusText,e.getAllResponseHeaders()))},u.onheaders=function(e){c(rt("headers",e.status,null,e.getAllResponseHeaders()))},u.ontimeout=ot(s),u.onprogress=a,u.onabort=l,u}};function ct(e){this.wrapped=e}function ut(e){var t,n;function i(t,n){try{var o=e[t](n),s=o.value,a=s instanceof ct;Promise.resolve(a?s.wrapped:s).then((function(e){a?i("next",e):r(o.done?"return":"normal",e)}),(function(e){i("throw",e)}))}catch(l){r("throw",l)}}function r(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise((function(o,s){var a={key:e,arg:r,resolve:o,reject:s,next:null};n?n=n.next=a:(t=n=a,i(e,r))}))},"function"!==typeof e.return&&(this.return=void 0)}function dt(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=1||T()};return m.serverId?function(n){var i=at(e,f.url,m.serverId),r={headers:"function"===typeof t.headers?t.headers(m.serverId):Object.assign({},t.headers),method:"HEAD"},o=it(null,i,r);o.onload=function(e){return n(b(e,r.method))},o.onerror=function(e){return s(rt("error",e.status,y(e.response)||e.statusText,e.getAllResponseHeaders()))},o.ontimeout=ot(s)}((function(e){m.aborted||(d.filter((function(t){return t.offseti.chunkSize,f=d&&(h||i.chunkForce);if(r instanceof Blob&&f)return bt(e,t,n,r,o,s,a,l,c,u,i);var p=t.ondata||function(e){return e},g=t.onload||function(e){return e},m=t.onerror||function(e){return null},v=new FormData;X(o)&&v.append(n,JSON.stringify(o)),(r instanceof Blob?[{name:null,file:r}]:r).forEach((function(e){v.append(n,e.file,null===e.name?e.file.name:""+e.name+e.file.name)}));var b=it(p(v),at(e,t.url),t);return b.onload=function(e){s(rt("load",e.status,g(e.response),e.getAllResponseHeaders()))},b.onerror=function(e){a(rt("error",e.status,m(e.response)||e.statusText,e.getAllResponseHeaders()))},b.ontimeout=ot(a),b.onprogress=l,b.onabort=c,b}}},_t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"===typeof t)return t;if(!t||!W(t.url))return function(e,t){return t()};var n=t.onload||function(e){return e},i=t.onerror||function(e){return null};return function(r,o,s){var a=it(r,e+t.url,t);return a.onload=function(e){o(rt("load",e.status,n(e.response),e.getAllResponseHeaders()))},a.onerror=function(e){s(rt("error",e.status,i(e.response)||e.statusText,e.getAllResponseHeaders()))},a.ontimeout=ot(s),a}},wt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e+Math.random()*(t-e)},St=function(e){var t={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},n=function(){t.request&&(t.perceivedPerformanceUpdater.clear(),t.request.abort(),t.complete=!0)},i=Object.assign({},fe(),{process:function(n,r){var o=function(){0!==t.duration&&null!==t.progress&&i.fire("progress",i.getProgress())},s=function(){t.complete=!0,i.fire("load-perceived",t.response.body)};i.fire("start"),t.timestamp=Date.now(),t.perceivedPerformanceUpdater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]?arguments[3]:25),i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,r=null,o=Date.now(),s=function s(){var a=Date.now()-o,l=wt(n,i);a+l>t&&(l=a+l-t);var c=a/t;c>=1?e(1):(e(c),r=setTimeout(s,l))};return s(),{clear:function(){clearTimeout(r)}}}((function(e){t.perceivedProgress=e,t.perceivedDuration=Date.now()-t.timestamp,o(),t.response&&1===t.perceivedProgress&&!t.complete&&s()}),wt(750,1500)),t.request=e(n,r,(function(e){t.response=X(e)?e:{type:"load",code:200,body:""+e,headers:{}},t.duration=Date.now()-t.timestamp,t.progress=1,i.fire("load",t.response.body),1===t.perceivedProgress&&s()}),(function(e){t.perceivedPerformanceUpdater.clear(),i.fire("error",X(e)?e:{type:"error",code:0,body:""+e})}),(function(e,n,i){t.duration=Date.now()-t.timestamp,t.progress=e?n/i:null,o()}),(function(){t.perceivedPerformanceUpdater.clear(),i.fire("abort",t.response?t.response.body:null)}),(function(e){i.fire("transfer",e)}))},abort:n,getProgress:function(){return t.progress?Math.min(t.progress,t.perceivedProgress):null},getDuration:function(){return Math.min(t.duration,t.perceivedDuration)},reset:function(){n(),t.complete=!1,t.perceivedProgress=0,t.progress=0,t.timestamp=null,t.perceivedDuration=0,t.duration=0,t.request=null,t.response=null}});return i},Et=function(e){return e.substr(0,e.lastIndexOf("."))||e},Ct=function(e){var t=[e.name,e.size,e.type];return e instanceof Blob||We(e)?t[0]=e.name||Ge():We(e)?(t[1]=e.length,t[2]=Ye(e)):W(e)&&(t[0]=je(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},Tt=function(e){return!!(e instanceof File||e instanceof Blob&&e.name)},xt=function e(t){if(!X(t))return t;var n=D(t)?[]:{};for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];n[i]=r&&X(r)?e(r):r}return n},kt=function(e,t){var n=function(e,t){return P(t)?0:W(t)?e.findIndex((function(e){return e.id===t})):-1}(e,t);if(!(n<0))return e[n]||null},Mt=function(e,t,n,i,r,o){var s=it(null,e,{method:"GET",responseType:"blob"});return s.onload=function(n){var i=n.getAllResponseHeaders(),r=et(i).name||je(e);t(rt("load",n.status,Ke(n.response,r),i))},s.onerror=function(e){n(rt("error",e.status,e.statusText,e.getAllResponseHeaders()))},s.onheaders=function(e){o(rt("headers",e.status,null,e.getAllResponseHeaders()))},s.ontimeout=ot(n),s.onprogress=i,s.onabort=r,s},Rt=function(e){return 0===e.indexOf("//")&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},It=function(e){return function(){return K(e)?e.apply(void 0,arguments):e}},Lt=function(e,t){clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout((function(){e("DID_UPDATE_ITEMS",{items:Le(t.items)})}),0)},At=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},i=n.query,r=n.success,o=void 0===r?function(){}:r,s=n.failure,a=void 0===s?function(){}:s,l=Re(e.items,i);l?t(l,o,a):a({error:rt("error",0,"Item not found"),file:null})}},Dt=function(e,t,n){return{ABORT_ALL:function(){Le(n.items).forEach((function(e){e.freeze(),e.abortLoad(),e.abortProcessing()}))},DID_SET_FILES:function(t){var i=t.value,r=(void 0===i?[]:i).map((function(e){return{source:e.source?e.source:e,options:e.options}})),o=Le(n.items);o.forEach((function(t){r.find((function(e){return e.source===t.source||e.source===t.file}))||e("REMOVE_ITEM",{query:t})})),o=Le(n.items),r.forEach((function(t,n){o.find((function(e){return e.source===t.source||e.file===t.source}))||e("ADD_ITEM",Object.assign({},t,{interactionMethod:ue,index:n}))}))},DID_UPDATE_ITEM_METADATA:function(i){var r=i.id;clearTimeout(n.itemUpdateTimeout),n.itemUpdateTimeout=setTimeout((function(){var i=kt(n.items,r);if(t("IS_ASYNC")){var o,s=function(){setTimeout((function(){e("REQUEST_ITEM_PROCESSING",{query:r})}),32)};return i.status===be.PROCESSING_COMPLETE?(o=n.options.instantUpload,void i.revert(_t(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(o?s:function(){}).catch((function(){}))):i.status===be.PROCESSING?function(e){i.abortProcessing().then(e?s:function(){})}(n.options.instantUpload):void(n.options.instantUpload&&s())}Ce("SHOULD_PREPARE_OUTPUT",!1,{item:i,query:t}).then((function(t){t&&e("REQUEST_PREPARE_OUTPUT",{query:r,item:i,success:function(t){e("DID_PREPARE_OUTPUT",{id:r,file:t})}},!0)}))}),0)},MOVE_ITEM:function(e){var t=e.query,i=e.index,r=Re(n.items,t);if(r){var o=n.items.indexOf(r);o!==(i=He(i,0,n.items.length-1))&&n.items.splice(i,0,n.items.splice(o,1)[0])}},SORT:function(e){var t=e.compare;Ot(n,t)},ADD_ITEMS:function(n){var i=n.items,r=n.index,o=n.interactionMethod,s=n.success,a=void 0===s?function(){}:s,l=n.failure,c=void 0===l?function(){}:l,u=r;if(-1===r||"undefined"===typeof r){var d=t("GET_ITEM_INSERT_LOCATION"),h=t("GET_TOTAL_ITEMS");u="before"===d?0:h}var f=t("GET_IGNORED_FILES"),p=i.filter((function(e){return Tt(e)?!f.includes(e.name.toLowerCase()):!P(e)})).map((function(t){return new Promise((function(n,i){e("ADD_ITEM",{interactionMethod:o,source:t.source||t,success:n,failure:i,index:u++,options:t.options||{}})}))}));Promise.all(p).then(a).catch(c)},ADD_ITEM:function(i){var o=i.source,s=i.index,a=void 0===s?-1:s,l=i.interactionMethod,c=i.success,u=void 0===c?function(){}:c,d=i.failure,h=void 0===d?function(){}:d,f=i.options,p=void 0===f?{}:f;if(P(o))h({error:rt("error",0,"No source"),file:null});else if(!Tt(o)||!n.options.ignoredFiles.includes(o.name.toLowerCase())){if(!function(e){var t=Le(e.items).length;if(!e.options.allowMultiple)return 0===t;var n=e.options.maxFiles;return null===n||t0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=de(),o={archived:!1,frozen:!1,released:!1,source:null,file:n,serverFileReference:t,transferId:null,processingAborted:!1,status:t?be.PROCESSING_COMPLETE:be.INIT,activeLoader:null,activeProcessor:null},s=null,a={},l=function(e){return o.status=e},c=function(e){if(!o.released&&!o.frozen){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i=400&&t.code<500)return e("DID_THROW_ITEM_INVALID",{id:w,error:t,status:{main:i,sub:t.code+" ("+t.body+")"}}),void h({error:t,file:me(y)});e("DID_THROW_ITEM_LOAD_ERROR",{id:w,error:t,status:{main:i,sub:n.options.labelTapToRetry}})})),y.on("load-file-error",(function(t){e("DID_THROW_ITEM_INVALID",{id:w,error:t.status,status:t.status}),h({error:t.status,file:me(y)})})),y.on("load-abort",(function(){e("REMOVE_ITEM",{query:w})})),y.on("load-skip",(function(){e("COMPLETE_LOAD_ITEM",{query:w,item:y,data:{source:o,success:u}})})),y.on("load",(function(){var i=function(i){i?(y.on("metadata-update",(function(t){e("DID_UPDATE_ITEM_METADATA",{id:w,change:t})})),Ce("SHOULD_PREPARE_OUTPUT",!1,{item:y,query:t}).then((function(t){var i=function(){e("COMPLETE_LOAD_ITEM",{query:w,item:y,data:{source:o,success:u}}),Lt(e,n)};t?e("REQUEST_PREPARE_OUTPUT",{query:w,item:y,success:function(t){e("DID_PREPARE_OUTPUT",{id:w,file:t}),i()}},!0):i()}))):e("REMOVE_ITEM",{query:w})};Ce("DID_LOAD_ITEM",y,{query:t,dispatch:e}).then((function(){At(t("GET_BEFORE_ADD_FILE"),me(y)).then(i)})).catch((function(){i(!1)}))})),y.on("process-start",(function(){e("DID_START_ITEM_PROCESSING",{id:w})})),y.on("process-progress",(function(t){e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:w,progress:t})})),y.on("process-error",(function(t){e("DID_THROW_ITEM_PROCESSING_ERROR",{id:w,error:t,status:{main:It(n.options.labelFileProcessingError)(t),sub:n.options.labelTapToRetry}})})),y.on("process-revert-error",(function(t){e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:w,error:t,status:{main:It(n.options.labelFileProcessingRevertError)(t),sub:n.options.labelTapToRetry}})})),y.on("process-complete",(function(t){e("DID_COMPLETE_ITEM_PROCESSING",{id:w,error:null,serverFileReference:t})})),y.on("process-abort",(function(){e("DID_ABORT_ITEM_PROCESSING",{id:w})})),y.on("process-revert",(function(){e("DID_REVERT_ITEM_PROCESSING",{id:w})})),e("DID_ADD_ITEM",{id:w,index:a,interactionMethod:l}),Lt(e,n);var S=n.options.server||{},E=S.url,C=S.load,T=S.restore,x=S.fetch;y.load(o,tt(b===ye.INPUT?W(o)&&function(e){return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&Rt(location.href)!==Rt(e)}(o)?lt(E,x):Mt:lt(E,b===ye.LIMBO?T:C)),(function(e,n,i){Ce("LOAD_FILE",e,{query:t}).then(n).catch(i)}))}},REQUEST_PREPARE_OUTPUT:function(e){var n=e.item,i=e.success,r=e.failure,o=void 0===r?function(){}:r,s={error:rt("error",0,"Item not found"),file:null};if(n.archived)return o(s);Ce("PREPARE_OUTPUT",n.file,{query:t,item:n}).then((function(e){Ce("COMPLETE_PREPARE_OUTPUT",e,{query:t,item:n}).then((function(e){if(n.archived)return o(s);i(e)}))}))},COMPLETE_LOAD_ITEM:function(i){var r=i.item,o=i.data,s=o.success,a=o.source,l=t("GET_ITEM_INSERT_LOCATION");K(l)&&a&&Ot(n,l),e("DID_LOAD_ITEM",{id:r.id,error:null,serverFileReference:r.origin===ye.INPUT?null:a}),s(me(r)),r.origin!==ye.LOCAL?r.origin!==ye.LIMBO?t("IS_ASYNC")&&n.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:r.id}):e("DID_COMPLETE_ITEM_PROCESSING",{id:r.id,error:null,serverFileReference:a}):e("DID_LOAD_LOCAL_ITEM",{id:r.id})},RETRY_ITEM_LOAD:$t(n,(function(e){e.retryLoad()})),REQUEST_ITEM_PREPARE:$t(n,(function(t,n,i){e("REQUEST_PREPARE_OUTPUT",{query:t.id,item:t,success:function(i){e("DID_PREPARE_OUTPUT",{id:t.id,file:i}),n({file:t,output:i})},failure:i},!0)})),REQUEST_ITEM_PROCESSING:$t(n,(function(i,r,o){if(i.status===be.IDLE||i.status===be.PROCESSING_ERROR)i.status!==be.PROCESSING_QUEUED&&(i.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:i.id}),e("PROCESS_ITEM",{query:i,success:r,failure:o},!0));else{var s=function(){setTimeout((function(){e("REQUEST_ITEM_PROCESSING",{query:i,success:r,failure:o})}),32)};i.status===be.PROCESSING_COMPLETE||i.status===be.PROCESSING_REVERT_ERROR?i.revert(_t(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(s).catch((function(){})):i.status===be.PROCESSING&&i.abortProcessing().then(s)}})),PROCESS_ITEM:$t(n,(function(i,r,o){var s=t("GET_MAX_PARALLEL_UPLOADS");if(t("GET_ITEMS_BY_STATUS",be.PROCESSING).length!==s){if(i.status!==be.PROCESSING){var a=function t(){var i=n.processingQueue.shift();if(i){var r=i.id,o=i.success,s=i.failure,a=Re(n.items,r);a&&!a.archived?e("PROCESS_ITEM",{query:r,success:o,failure:s},!0):t()}};i.onOnce("process-complete",(function(){r(me(i)),a(),t("GET_ITEMS_BY_STATUS",be.PROCESSING_COMPLETE).length===n.items.length&&e("DID_COMPLETE_ITEM_PROCESSING_ALL")})),i.onOnce("process-error",(function(e){o({error:e,file:me(i)}),a()}));var l=n.options;i.process(St(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return"function"===typeof t?function(){for(var e=arguments.length,r=new Array(e),o=0;oi&&r-i<=.5&&(o=0),i>r&&i-r>=.5&&(o=0),function(e,t,n,i,r,o){var s=Nt(e,t,n,r),a=Nt(e,t,n,i);return["M",s.x,s.y,"A",n,n,0,o,0,a.x,a.y].join(" ")}(e,t,n,360*Math.min(.9999,i),360*Math.min(.9999,r),o)},Ht=L({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(e){var t=e.root,n=e.props;n.spin=!1,n.progress=0,n.opacity=0;var i=c("svg");t.ref.path=c("path",{"stroke-width":2,"stroke-linecap":"round"}),i.appendChild(t.ref.path),t.ref.svg=i,t.appendChild(i)},write:function(e){var t=e.root,n=e.props;if(0!==n.opacity){n.align&&(t.element.dataset.align=n.align);var i=parseInt(o(t.ref.path,"stroke-width"),10),r=.5*t.rect.element.width,s=0,a=0;n.spin?(s=0,a=.5):(s=0,a=n.progress);var l=Bt(r,r,r-i,s,a);o(t.ref.path,"d",l),o(t.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),Wt=L({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(e){var t=e.root,n=e.props;t.element.innerHTML=(n.icon||"")+""+n.label+"",n.isDisabled=!1},write:function(e){var t=e.root,n=e.props,i=n.isDisabled,r=t.query("GET_DISABLED")||0===n.opacity;r&&!i?(n.isDisabled=!0,o(t.element,"disabled","disabled")):!r&&i&&(n.isDisabled=!1,t.element.removeAttribute("disabled"))}}),jt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";return(e=Math.round(Math.abs(e)))<1e3?e+" bytes":e0&&(t.height=t.ref.container.rect.element.height)),r&&(t.ref.panel.height=null),t.ref.panel.height=t.height})),En=L({create:function(e){var t=e.root,n=e.props;t.ref.handleClick=function(){return t.dispatch("DID_ACTIVATE_ITEM",{id:n.id})},t.element.id="filepond--item-"+n.id,t.element.addEventListener("click",t.ref.handleClick),t.ref.container=t.appendChildView(t.createChildView(gn,{id:n.id})),t.ref.panel=t.appendChildView(t.createChildView(bn,{name:"item-panel"})),t.ref.panel.height=null,n.markedForRemoval=!1,t.query("GET_ALLOW_REORDER")&&(t.element.dataset.dragState="idle",t.element.addEventListener("pointerdown",(function(e){if(e.isPrimary){var i=e.pageX,r=e.pageY;n.dragOrigin={x:t.translateX,y:t.translateY},n.dragCenter={x:e.offsetX,y:e.offsetY},t.dispatch("DID_GRAB_ITEM",{id:n.id});var o=function(e){e.isPrimary&&(e.stopPropagation(),e.preventDefault(),n.dragOffset={x:e.pageX-i,y:e.pageY-r},t.dispatch("DID_DRAG_ITEM",{id:n.id}))};document.addEventListener("pointermove",o),document.addEventListener("pointerup",(function e(s){s.isPrimary&&(document.removeEventListener("pointermove",o),document.removeEventListener("pointerup",e),n.dragOffset={x:s.pageX-i,y:s.pageY-r},t.dispatch("DID_DROP_ITEM",{id:n.id}))}))}})))},write:Sn,destroy:function(e){var t=e.root,n=e.props;t.element.removeEventListener("click",t.ref.handleClick),t.dispatch("RELEASE_ITEM",{query:n.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:"spring",scaleY:"spring",translateX:yn,translateY:yn,opacity:{type:"tween",duration:150}}}}),Cn=function(e,t,n){if(n){var i=e.rect.element.width,r=t.length,o=null;if(0===r||n.topb){if(n.left3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;e.dragOffset?(e.translateX=null,e.translateY=null,e.translateX=e.dragOrigin.x+e.dragOffset.x,e.translateY=e.dragOrigin.y+e.dragOffset.y,e.scaleX=1.025,e.scaleY=1.025):(e.translateX=t,e.translateY=n,Date.now()>e.spawnDate&&(0===e.opacity&&xn(e,t,n,i,r),e.scaleX=1,e.scaleY=1,e.opacity=1))},xn=function(e,t,n,i,r){e.interactionMethod===ue?(e.translateX=null,e.translateX=t,e.translateY=null,e.translateY=n):e.interactionMethod===ae?(e.translateX=null,e.translateX=t-20*i,e.translateY=null,e.translateY=n-10*r,e.scaleX=.8,e.scaleY=.8):e.interactionMethod===le?(e.translateY=null,e.translateY=n-30):e.interactionMethod===se&&(e.translateX=null,e.translateX=t-30,e.translateY=null)},kn=function(e){return e.rect.element.height+.5*e.rect.element.marginBottom+.5*e.rect.element.marginTop},Mn=A({DID_ADD_ITEM:function(e){var t=e.root,n=e.action,i=n.id,r=n.index,o=n.interactionMethod;t.ref.addIndex=r;var s=Date.now(),a=s,l=1;if(o!==ue){l=0;var c=t.query("GET_ITEM_INSERT_INTERVAL"),u=s-t.ref.lastItemSpanwDate;a=ug){if(o3&&void 0!==arguments[3]?arguments[3]:"";n?o(e,t,i):e.removeAttribute(t)},On=function(e){var t=e.root,n=(e.action,t.query("GET_DISABLED")),i=t.query("GET_ALLOW_BROWSE"),r=n||!i;An(t.element,"disabled",r)},$n=function(e){var t=e.root,n=t.element;t.query("GET_TOTAL_ITEMS")>0?(An(n,"required",!1),An(n,"name",!1)):(An(n,"name",!0,t.query("GET_NAME")),t.query("GET_CHECK_VALIDITY")&&n.setCustomValidity(""),t.query("GET_REQUIRED")&&An(n,"required",!0))},Dn=L({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:function(e){var t=e.root,n=e.props;t.element.id="filepond--browser-"+n.id,o(t.element,"name",t.query("GET_NAME")),o(t.element,"aria-controls","filepond--assistant-"+n.id),o(t.element,"aria-labelledby","filepond--drop-label-"+n.id),t.ref.handleChange=function(e){if(t.element.value){var i=Array.from(t.element.files);setTimeout((function(){n.onload(i),function(e){if(e&&""!==e.value){try{e.value=""}catch(r){}if(e.value){var t=Pt("form"),n=e.parentNode,i=e.nextSibling;t.appendChild(e),t.reset(),i?n.insertBefore(e,i):n.appendChild(e)}}}(t.element)}),250)}},t.element.addEventListener("change",t.ref.handleChange)},destroy:function(e){var t=e.root;t.element.removeEventListener("change",t.ref.handleChange)},write:A({DID_LOAD_ITEM:$n,DID_REMOVE_ITEM:$n,DID_THROW_ITEM_INVALID:function(e){var t=e.root;t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(t.query("GET_LABEL_INVALID_FIELD"))},DID_SET_DISABLED:On,DID_SET_ALLOW_BROWSE:On,DID_SET_ALLOW_MULTIPLE:function(e){var t=e.root,n=e.action;An(t.element,"multiple",n.value)},DID_SET_ACCEPTED_FILE_TYPES:function(e){var t=e.root,n=e.action;An(t.element,"accept",!!n.value,n.value?n.value.join(","):"")},DID_SET_CAPTURE_METHOD:function(e){var t=e.root,n=e.action;An(t.element,"capture",!!n.value,!0===n.value?"":n.value)},DID_SET_REQUIRED:function(e){var t=e.root;e.action.value?0===t.query("GET_TOTAL_ITEMS")&&An(t.element,"required",!0):An(t.element,"required",!1)}})}),Pn=13,Fn=32,Nn=function(e,t){e.innerHTML=t;var n=e.querySelector(".filepond--label-action");return n&&o(n,"tabindex","0"),t},Bn=L({name:"drop-label",ignoreRect:!0,create:function(e){var t=e.root,n=e.props,i=Pt("label");o(i,"for","filepond--browser-"+n.id),o(i,"id","filepond--drop-label-"+n.id),o(i,"aria-hidden","true"),t.ref.handleKeyDown=function(e){(e.keyCode===Pn||e.keyCode===Fn)&&(e.preventDefault(),t.ref.label.click())},t.ref.handleClick=function(e){e.target===i||i.contains(e.target)||t.ref.label.click()},i.addEventListener("keydown",t.ref.handleKeyDown),t.element.addEventListener("click",t.ref.handleClick),Nn(i,n.caption),t.appendChild(i),t.ref.label=i},destroy:function(e){var t=e.root;t.ref.label.addEventListener("keydown",t.ref.handleKeyDown),t.element.removeEventListener("click",t.ref.handleClick)},write:A({DID_SET_LABEL_IDLE:function(e){var t=e.root,n=e.action;Nn(t.ref.label,n.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),Hn=L({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),Wn=A({DID_DRAG:function(e){var t=e.root,n=e.action;t.ref.blob?(t.ref.blob.translateX=n.position.scopeLeft,t.ref.blob.translateY=n.position.scopeTop,t.ref.blob.scaleX=1,t.ref.blob.scaleY=1,t.ref.blob.opacity=1):function(e){var t=e.root,n=.5*t.rect.element.width,i=.5*t.rect.element.height;t.ref.blob=t.appendChildView(t.createChildView(Hn,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:n,translateY:i}))}({root:t})},DID_DROP:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.scaleX=2.5,t.ref.blob.scaleY=2.5,t.ref.blob.opacity=0)},DID_END_DRAG:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.opacity=0)}}),jn=L({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:function(e){var t=e.root,n=e.props,i=e.actions;Wn({root:t,props:n,actions:i});var r=t.ref.blob;0===i.length&&r&&0===r.opacity&&(t.removeChildView(r),t.ref.blob=null)}}),Un=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],zn=["css","csv","html","txt"],Vn={zip:"zip|compressed",epub:"application/epub+zip"},Gn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.toLowerCase(),Un.includes(e)?"image/"+("jpg"===e?"jpeg":"svg"===e?"svg+xml":e):zn.includes(e)?"text/"+e:Vn[e]||null},Kn=function(e){return new Promise((function(t,n){var i=ii(e);if(i.length&&!qn(e))return t(i);Yn(e).then(t)}))},qn=function(e){return!!e.files&&e.files.length>0},Yn=function(e){return new Promise((function(t,n){var i=(e.items?Array.from(e.items):[]).filter((function(e){return Xn(e)})).map((function(e){return Qn(e)}));i.length?Promise.all(i).then((function(e){var n=[];e.forEach((function(e){n.push.apply(n,e)})),t(n.filter((function(e){return e})))})).catch(console.error):t(e.files?Array.from(e.files):[])}))},Xn=function(e){if(ti(e)){var t=ni(e);if(t)return t.isFile||t.isDirectory}return"file"===e.kind},Qn=function(e){return new Promise((function(t,n){ei(e)?Zn(ni(e)).then(t).catch(n):t([e.getAsFile()])}))},Zn=function(e){return new Promise((function(t,n){var i=[],r=0,o=0,s=function(){0===o&&0===r&&t(i)};!function e(t){r++;var a=t.createReader();!function t(){a.readEntries((function(n){if(0===n.length)return r--,void s();n.forEach((function(t){t.isDirectory?e(t):(o++,t.file((function(e){i.push(Jn(e)),o--,s()})))})),t()}),n)}()}(e)}))},Jn=function(e){if(e.type.length)return e;var t=e.lastModifiedDate,n=e.name;return(e=e.slice(0,e.size,Gn(Ue(e.name)))).name=n,e.lastModifiedDate=t,e},ei=function(e){return ti(e)&&(ni(e)||{}).isDirectory},ti=function(e){return"webkitGetAsEntry"in e},ni=function(e){return e.webkitGetAsEntry()},ii=function(e){var t=[];try{if((t=oi(e)).length)return t;t=ri(e)}catch(n){}return t},ri=function(e){var t=e.getData("url");return"string"===typeof t&&t.length?[t]:[]},oi=function(e){var t=e.getData("text/html");if("string"===typeof t&&t.length){var n=t.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},si=[],ai=function(e){return{pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}},li=function(e){var t=si.find((function(t){return t.element===e}));if(t)return t;var n=ci(e);return si.push(n),n},ci=function(e){var t=[],n={dragenter:fi,dragover:pi,dragleave:mi,drop:gi},r={};i(n,(function(n,i){r[n]=i(e,t),e.addEventListener(n,r[n],!1)}));var o={element:e,addListener:function(s){return t.push(s),function(){t.splice(t.indexOf(s),1),0===t.length&&(si.splice(si.indexOf(o),1),i(n,(function(t){e.removeEventListener(t,r[t],!1)})))}}};return o},ui=function(e,t){var n,i=function(e,t){return"elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)}("getRootNode"in(n=t)?n.getRootNode():document,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return i===t||t.contains(i)},di=null,hi=function(e,t){try{e.dropEffect=t}catch(n){}},fi=function(e,t){return function(e){e.preventDefault(),di=e.target,t.forEach((function(t){var n=t.element,i=t.onenter;ui(e,n)&&(t.state="enter",i(ai(e)))}))}},pi=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;Kn(n).then((function(i){var r=!1;t.some((function(t){var o=t.filterElement,s=t.element,a=t.onenter,l=t.onexit,c=t.ondrag,u=t.allowdrop;hi(n,"copy");var d=u(i);if(d)if(ui(e,s)){if(r=!0,null===t.state)return t.state="enter",void a(ai(e));if(t.state="over",o&&!d)return void hi(n,"none");c(ai(e))}else o&&!r&&hi(n,"none"),t.state&&(t.state=null,l(ai(e)));else hi(n,"none")}))}))}},gi=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;Kn(n).then((function(n){t.forEach((function(t){var i=t.filterElement,r=t.element,o=t.ondrop,s=t.onexit,a=t.allowdrop;if(t.state=null,!i||ui(e,r))return a(n)?void o(ai(e),n):s(ai(e))}))}))}},mi=function(e,t){return function(e){di===e.target&&t.forEach((function(t){var n=t.onexit;t.state=null,n(ai(e))}))}},vi=function(e,t,n){e.classList.add("filepond--hopper");var i=n.catchesDropsOnPage,r=n.requiresDropOnElement,o=n.filterItems,s=void 0===o?function(e){return e}:o,a=function(e,t,n){var i=li(t),r={element:e,filterElement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return r.destroy=i.addListener(r),r}(e,i?document.documentElement:e,r),l="",c="";a.allowdrop=function(e){return t(s(e))},a.ondrop=function(e,n){var i=s(n);t(i)?(c="drag-drop",u.onload(i,e)):u.ondragend(e)},a.ondrag=function(e){u.ondrag(e)},a.onenter=function(e){c="drag-over",u.ondragstart(e)},a.onexit=function(e){c="drag-exit",u.ondragend(e)};var u={updateHopperState:function(){l!==c&&(e.dataset.hopperState=c,l=c)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){a.destroy()}};return u},bi=!1,yi=[],_i=function(e){Kn(e.clipboardData).then((function(e){e.length&&yi.forEach((function(t){return t(e)}))}))},wi=function(){var e=function(e){t.onload(e)},t={destroy:function(){var t;t=e,he(yi,yi.indexOf(t)),0===yi.length&&(document.removeEventListener("paste",_i),bi=!1)},onload:function(){}};return function(e){yi.includes(e)||(yi.push(e),bi||(bi=!0,document.addEventListener("paste",_i)))}(e),t},Si=null,Ei=null,Ci=[],Ti=function(e,t){e.element.textContent=t},xi=function(e,t,n){var i=e.query("GET_TOTAL_ITEMS");Ti(e,n+" "+t+", "+i+" "+(1===i?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(Ei),Ei=setTimeout((function(){!function(e){e.element.textContent=""}(e)}),1500)},ki=function(e){return e.element.parentNode.contains(document.activeElement)},Mi=function(e){var t=e.root,n=e.action,i=t.query("GET_ITEM",n.id).filename,r=t.query("GET_LABEL_FILE_PROCESSING_ABORTED");Ti(t,i+" "+r)},Ri=function(e){var t=e.root,n=e.action,i=t.query("GET_ITEM",n.id).filename;Ti(t,n.status.main+" "+i+" "+n.status.sub)},Ii=L({create:function(e){var t=e.root,n=e.props;t.element.id="filepond--assistant-"+n.id,o(t.element,"role","status"),o(t.element,"aria-live","polite"),o(t.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:A({DID_LOAD_ITEM:function(e){var t=e.root,n=e.action;if(ki(t)){t.element.textContent="";var i=t.query("GET_ITEM",n.id);Ci.push(i.filename),clearTimeout(Si),Si=setTimeout((function(){xi(t,Ci.join(", "),t.query("GET_LABEL_FILE_ADDED")),Ci.length=0}),750)}},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action;if(ki(t)){var i=n.item;xi(t,i.filename,t.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root,n=e.action,i=t.query("GET_ITEM",n.id).filename,r=t.query("GET_LABEL_FILE_PROCESSING_COMPLETE");Ti(t,i+" "+r)},DID_ABORT_ITEM_PROCESSING:Mi,DID_REVERT_ITEM_PROCESSING:Mi,DID_THROW_ITEM_REMOVE_ERROR:Ri,DID_THROW_ITEM_LOAD_ERROR:Ri,DID_THROW_ITEM_INVALID:Ri,DID_THROW_ITEM_PROCESSING_ERROR:Ri}),tag:"span",name:"assistant"}),Li=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(new RegExp(t+".","g"),(function(e){return e.charAt(1).toUpperCase()}))},Ai=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=Date.now(),r=null;return function(){for(var o=arguments.length,s=new Array(o),a=0;a=0?1:0,g=s.find((function(e){return e.markedForRemoval&&e.opacity<.45}))?-1:0,m=s.length+p+g,v=Math.round(a/h);return 1===v?s.forEach((function(e){var i=e.rect.element.height+u;n+=i,t+=i*e.opacity})):(n=Math.ceil(m/v)*f,t=n),{visual:t,bounds:n}},Pi=function(e){var t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:0===t?null:t}},Fi=function(e,t){var n=e.query("GET_ALLOW_REPLACE"),i=e.query("GET_ALLOW_MULTIPLE"),r=e.query("GET_TOTAL_ITEMS"),o=e.query("GET_MAX_FILES"),s=t.length;return!i&&s>1||!!(V(o=i?o:n?o:1)&&r+s>o)&&(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:rt("warning",0,"Max files")}),!0)},Ni=function(e,t,n){var i=e.childViews[0];return Cn(i,t,{left:n.scopeLeft-i.rect.element.left,top:n.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},Bi=function(e){var t=e.query("GET_ALLOW_DROP"),n=e.query("GET_DISABLED"),i=t&&!n;if(i&&!e.ref.hopper){var r=vi(e.element,(function(t){if(Fi(e,t))return!1;var n=e.query("GET_BEFORE_DROP_FILE")||function(){return!0};return!e.query("GET_DROP_VALIDATION")||t.every((function(t){return Te("ALLOW_HOPPER_ITEM",t,{query:e.query}).every((function(e){return!0===e}))&&n(t)}))}),{filterItems:function(t){var n=e.query("GET_IGNORED_FILES");return t.filter((function(e){return!Tt(e)||!n.includes(e.name.toLowerCase())}))},catchesDropsOnPage:e.query("GET_DROP_ON_PAGE"),requiresDropOnElement:e.query("GET_DROP_ON_ELEMENT")});r.onload=function(t,n){var i=e.ref.list.childViews[0].childViews.filter((function(e){return e.rect.element.height})),r=e.query("GET_ACTIVE_ITEMS").map((function(e){return i.find((function(t){return t.id===e.id}))})).filter((function(e){return e}));e.dispatch("ADD_ITEMS",{items:t,index:Ni(e.ref.list,r,n),interactionMethod:ae}),e.dispatch("DID_DROP",{position:n}),e.dispatch("DID_END_DRAG",{position:n})},r.ondragstart=function(t){e.dispatch("DID_START_DRAG",{position:t})},r.ondrag=Ai((function(t){e.dispatch("DID_DRAG",{position:t})})),r.ondragend=function(t){e.dispatch("DID_END_DRAG",{position:t})},e.ref.hopper=r,e.ref.drip=e.appendChildView(e.createChildView(jn))}else!i&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removeChildView(e.ref.drip))},Hi=function(e,t){var n=e.query("GET_ALLOW_BROWSE"),i=e.query("GET_DISABLED"),r=n&&!i;r&&!e.ref.browser?e.ref.browser=e.appendChildView(e.createChildView(Dn,Object.assign({},t,{onload:function(t){if(Fi(e,t))return!1;e.dispatch("ADD_ITEMS",{items:t,index:-1,interactionMethod:le})}})),0):!r&&e.ref.browser&&(e.removeChildView(e.ref.browser),e.ref.browser=null)},Wi=function(e){var t=e.query("GET_ALLOW_PASTE"),n=e.query("GET_DISABLED"),i=t&&!n;i&&!e.ref.paster?(e.ref.paster=wi(),e.ref.paster.onload=function(t){e.dispatch("ADD_ITEMS",{items:t,index:-1,interactionMethod:ce})}):!i&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},ji=A({DID_SET_ALLOW_BROWSE:function(e){var t=e.root,n=e.props;Hi(t,n)},DID_SET_ALLOW_DROP:function(e){var t=e.root;Bi(t)},DID_SET_ALLOW_PASTE:function(e){var t=e.root;Wi(t)},DID_SET_DISABLED:function(e){var t=e.root,n=e.props;Bi(t),Wi(t),Hi(t,n),t.query("GET_DISABLED")?t.element.dataset.disabled="disabled":t.element.removeAttribute("data-disabled")}}),Ui=L({name:"root",read:function(e){var t=e.root;t.ref.measure&&(t.ref.measureHeight=t.ref.measure.offsetHeight)},create:function(e){var t=e.root,n=e.props,i=t.query("GET_ID");i&&(t.element.id=i);var r=t.query("GET_CLASS_NAME");r&&r.split(" ").filter((function(e){return e.length})).forEach((function(e){t.element.classList.add(e)})),t.ref.label=t.appendChildView(t.createChildView(Bn,Object.assign({},n,{translateY:null,caption:t.query("GET_LABEL_IDLE")}))),t.ref.list=t.appendChildView(t.createChildView(Ln,{translateY:null})),t.ref.panel=t.appendChildView(t.createChildView(bn,{name:"panel-root"})),t.ref.assistant=t.appendChildView(t.createChildView(Ii,Object.assign({},n))),t.ref.measure=Pt("div"),t.ref.measure.style.height="100%",t.element.appendChild(t.ref.measure),t.ref.bounds=null,t.query("GET_STYLES").filter((function(e){return!P(e.value)})).map((function(e){var n=e.name,i=e.value;t.element.dataset[n]=i})),t.ref.widthPrevious=null,t.ref.widthUpdated=Ai((function(){t.ref.updateHistory=[],t.dispatch("DID_RESIZE_ROOT")}),250),t.ref.previousAspectRatio=null,t.ref.updateHistory=[];var o=window.matchMedia("(pointer: fine) and (hover: hover)").matches,s="PointerEvent"in window;t.query("GET_ALLOW_REORDER")&&s&&!o&&(t.element.addEventListener("touchmove",Oi,{passive:!1}),t.element.addEventListener("gesturestart",Oi))},write:function(e){var t=e.root,n=e.props,i=e.actions;if(ji({root:t,props:n,actions:i}),i.filter((function(e){return/^DID_SET_STYLE_/.test(e.type)})).filter((function(e){return!P(e.data.value)})).map((function(e){var n=e.type,i=e.data,r=Li(n.substr(8).toLowerCase(),"_");t.element.dataset[r]=i.value,t.invalidateLayout()})),!t.rect.element.hidden){t.rect.element.width!==t.ref.widthPrevious&&(t.ref.widthPrevious=t.rect.element.width,t.ref.widthUpdated());var r=t.ref.bounds;r||(r=t.ref.bounds=Pi(t),t.element.removeChild(t.ref.measure),t.ref.measure=null);var o=t.ref,s=o.hopper,a=o.label,l=o.list,c=o.panel;s&&s.updateHopperState();var u=t.query("GET_PANEL_ASPECT_RATIO"),d=t.query("GET_ALLOW_MULTIPLE"),h=t.query("GET_TOTAL_ITEMS"),f=h===(d?t.query("GET_MAX_FILES")||1e6:1),p=i.find((function(e){return"DID_ADD_ITEM"===e.type}));if(f&&p){var g=p.data.interactionMethod;a.opacity=0,d?a.translateY=-40:g===se?a.translateX=40:a.translateY=g===le?40:30}else f||(a.opacity=1,a.translateX=0,a.translateY=0);var m=$i(t),v=Di(t),b=a.rect.element.height,y=!d||f?0:b,_=f?l.rect.element.marginTop:0,w=0===h?0:l.rect.element.marginBottom,S=y+_+v.visual+w,E=y+_+v.bounds+w;if(l.translateY=Math.max(0,y-l.rect.element.marginTop)-m.top,u){var C=t.rect.element.width,T=C*u;u!==t.ref.previousAspectRatio&&(t.ref.previousAspectRatio=u,t.ref.updateHistory=[]);var x=t.ref.updateHistory;if(x.push(C),x.length>4)for(var k=x.length,M=k-10,R=0,I=k;I>=M;I--)if(x[I]===x[I-2]&&R++,R>=2)return;c.scalable=!1,c.height=T;var L=T-y-(w-m.bottom)-(f?_:0);v.visual>L?l.overflow=L:l.overflow=null,t.height=T}else if(r.fixedHeight){c.scalable=!1;var A=r.fixedHeight-y-(w-m.bottom)-(f?_:0);v.visual>A?l.overflow=A:l.overflow=null}else if(r.cappedHeight){var O=S>=r.cappedHeight,$=Math.min(r.cappedHeight,S);c.scalable=!0,c.height=O?$:$-m.top-m.bottom;var D=$-y-(w-m.bottom)-(f?_:0);S>r.cappedHeight&&v.visual>D?l.overflow=D:l.overflow=null,t.height=Math.min(r.cappedHeight,E-m.top-m.bottom)}else{var F=h>0?m.top+m.bottom:0;c.scalable=!0,c.height=Math.max(b,S-F),t.height=Math.max(b,E-F)}}},destroy:function(e){var t=e.root;t.ref.paster&&t.ref.paster.destroy(),t.ref.hopper&&t.ref.hopper.destroy(),t.element.removeEventListener("touchmove",Oi),t.element.removeEventListener("gesturestart",Oi)},mixins:{styles:["height"]}}),zi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,i=ke(),o=n(te(i),[Be,oe(i)],[Dt,re(i)]);o.dispatch("SET_OPTIONS",{options:e});var s=function(){document.hidden||o.dispatch("KICK")};document.addEventListener("visibilitychange",s);var a=null,l=!1,c=!1,u=null,d=null,h=function(){l||(l=!0),clearTimeout(a),a=setTimeout((function(){l=!1,u=null,d=null,c&&(c=!1,o.dispatch("DID_STOP_RESIZE"))}),500)};window.addEventListener("resize",h);var f=Ui(o,{id:de()}),p=!1,g=!1,m={_read:function(){l&&(d=window.innerWidth,u||(u=d),c||d===u||(o.dispatch("DID_START_RESIZE"),c=!0)),g&&p&&(p=null===f.element.offsetParent),p||(f._read(),g=f.rect.element.hidden)},_write:function(e){var t=o.processActionQueue().filter((function(e){return!/^SET_/.test(e.type)}));p&&!t.length||(w(t),p=f._write(e,t,c),ve(o.query("GET_ITEMS")),p&&o.processDispatchQueue())}},v=function(e){return function(t){var n={type:e};if(!t)return n;if(t.hasOwnProperty("error")&&(n.error=t.error?Object.assign({},t.error):null),t.status&&(n.status=Object.assign({},t.status)),t.file&&(n.output=t.file),t.source)n.file=t.source;else if(t.item||t.id){var i=t.item?t.item:o.query("GET_ITEM",t.id);n.file=i?me(i):null}return t.items&&(n.items=t.items.map(me)),/progress/.test(e)&&(n.progress=t.progress),n}},b={DID_DESTROY:v("destroy"),DID_INIT:v("init"),DID_THROW_MAX_FILES:v("warning"),DID_START_ITEM_LOAD:v("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:v("addfileprogress"),DID_LOAD_ITEM:v("addfile"),DID_THROW_ITEM_INVALID:[v("error"),v("addfile")],DID_THROW_ITEM_LOAD_ERROR:[v("error"),v("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[v("error"),v("removefile")],DID_PREPARE_OUTPUT:v("preparefile"),DID_START_ITEM_PROCESSING:v("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:v("processfileprogress"),DID_ABORT_ITEM_PROCESSING:v("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:v("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:v("processfiles"),DID_REVERT_ITEM_PROCESSING:v("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[v("error"),v("processfile")],DID_REMOVE_ITEM:v("removefile"),DID_UPDATE_ITEMS:v("updatefiles"),DID_ACTIVATE_ITEM:v("activatefile")},_=function(e){var t=Object.assign({pond:P},e);delete t.type,f.element.dispatchEvent(new CustomEvent("FilePond:"+e.type,{detail:t,bubbles:!0,cancelable:!0,composed:!0}));var n=[];e.hasOwnProperty("error")&&n.push(e.error),e.hasOwnProperty("file")&&n.push(e.file);var i=["type","error","file"];Object.keys(e).filter((function(e){return!i.includes(e)})).forEach((function(t){return n.push(e[t])})),P.fire.apply(P,[e.type].concat(n));var r=o.query("GET_ON"+e.type.toUpperCase());r&&r.apply(void 0,n)},w=function(e){e.length&&e.forEach((function(e){if(b[e.type]){var t=b[e.type];(Array.isArray(t)?t:[t]).forEach((function(t){setTimeout((function(){_(t(e.data))}),0)}))}}))},S=function(e){return o.dispatch("SET_OPTIONS",{options:e})},E=function(e){return o.query("GET_ACTIVE_ITEM",e)},C=function(e){return new Promise((function(t,n){o.dispatch("REQUEST_ITEM_PREPARE",{query:e,success:function(e){t(e)},failure:function(e){n(e)}})}))},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,i){k([{source:e,options:t}],{index:t.index}).then((function(e){return n(e&&e[0])})).catch(i)}))},x=function(e){return o.dispatch("REMOVE_ITEM",{query:e}),null===o.query("GET_ACTIVE_ITEM",e)},k=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t={};i(ke(),(function(e,n){t[e]=n[0]}));var n=zi(Object.assign({},t,{},e));return n},Gi=function(e){return Li(e.replace(/^data-/,""))},Ki=function e(t,n){i(n,(function(n,r){i(t,(function(e,i){var o=new RegExp(n);if(o.test(e)&&(delete t[e],!1!==r))if(W(r))t[r]=i;else{var s,a=r.group;X(r)&&!t[a]&&(t[a]={}),t[a][(s=e.replace(o,""),s.charAt(0).toLowerCase()+s.slice(1))]=i}})),r.mapping&&e(t[r.group],r.mapping)}))},qi=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];i(e.attributes,(function(t){n.push(e.attributes[t])}));var r=n.filter((function(e){return e.name})).reduce((function(t,n){var i=o(e,n.name);return t[Gi(n.name)]=i===n.name||i,t}),{});return Ki(r,t),r},Yi=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};Te("SET_ATTRIBUTE_TO_OPTION_MAP",n);var i=Object.assign({},t),r=qi("FIELDSET"===e.nodeName?e.querySelector("input[type=file]"):e,n);Object.keys(r).forEach((function(e){X(r[e])?(X(i[e])||(i[e]={}),Object.assign(i[e],r[e])):i[e]=r[e]})),i.files=(t.files||[]).concat(Array.from(e.querySelectorAll("input:not([type=file])")).map((function(e){return{source:e.value,options:{type:e.dataset.type}}})));var o=Vi(i);return e.files&&Array.from(e.files).forEach((function(e){o.addFile(e)})),o.replaceElement(e),o},Xi=function(){return t(arguments.length<=0?void 0:arguments[0])?Yi.apply(void 0,arguments):Vi.apply(void 0,arguments)},Qi=["fire","_read","_write"],Zi=function(e){var t={};return pe(e,t,Qi),t},Ji=function(e,t){return e.replace(/(?:{([a-zA-Z]+)})/g,(function(e,n){return t[n]}))},er=function(e){var t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(t),i=new Worker(n);return{transfer:function(e,t){},post:function(e,t,n){var r=de();i.onmessage=function(e){e.data.id===r&&t(e.data.message)},i.postMessage({id:r,message:e},n)},terminate:function(){i.terminate(),URL.revokeObjectURL(n)}}},tr=function(e){return new Promise((function(t,n){var i=new Image;i.onload=function(){t(i)},i.onerror=function(e){n(e)},i.src=e}))},nr=function(e,t){var n=e.slice(0,e.size,e.type);return n.lastModifiedDate=e.lastModifiedDate,n.name=t,n},ir=function(e){return nr(e,e.name)},rr=[],or=function(e){if(!rr.includes(e)){rr.push(e);var t,n=e({addFilter:xe,utils:{Type:Se,forin:i,isString:W,isFile:Tt,toNaturalFileSize:jt,replaceInString:Ji,getExtensionFromFilename:Ue,getFilenameWithoutExtension:Et,guesstimateMimeType:Gn,getFileFromBlob:Ke,getFilenameFromURL:je,createRoute:A,createWorker:er,createView:L,createItemAPI:me,loadImage:tr,copyFile:ir,renameFile:nr,createBlob:qe,applyFilterChain:Ce,text:Ft,getNumericAspectRatioFromString:Ie},views:{fileActionButton:Wt}});t=n.options,Object.assign(Me,t)}},sr=function(){var e=p()&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"slice"in Blob.prototype&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window;return function(){return e}}(),ar={apps:[]},lr=function(){};if(e.Status={},e.FileStatus={},e.FileOrigin={},e.OptionTypes={},e.create=lr,e.destroy=lr,e.parse=lr,e.find=lr,e.registerPlugin=lr,e.getOptions=lr,e.setOptions=lr,sr()){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,i="__framePainter";if(window[i])return window[i].readers.push(e),void window[i].writers.push(t);window[i]={readers:[e],writers:[t]};var r=window[i],o=1e3/n,s=null,a=null,l=null,c=null,u=function(){document.hidden?(l=function(){return window.setTimeout((function(){return d(performance.now())}),o)},c=function(){return window.clearTimeout(a)}):(l=function(){return window.requestAnimationFrame(d)},c=function(){return window.cancelAnimationFrame(a)})};document.addEventListener("visibilitychange",(function(){c&&c(),u(),d(performance.now())}));var d=function e(t){a=l(e),s||(s=t);var n=t-s;n<=o||(s=t-n%o,r.readers.forEach((function(e){return e()})),r.writers.forEach((function(e){return e(t)})))};u(),d(performance.now())}((function(){ar.apps.forEach((function(e){return e._read()}))}),(function(e){ar.apps.forEach((function(t){return t._write(e)}))}));var cr=function t(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:sr,create:e.create,destroy:e.destroy,parse:e.parse,find:e.find,registerPlugin:e.registerPlugin,setOptions:e.setOptions}})),document.removeEventListener("DOMContentLoaded",t)};"loading"!==document.readyState?setTimeout((function(){return cr()}),0):document.addEventListener("DOMContentLoaded",cr);var ur=function(){return i(ke(),(function(t,n){e.OptionTypes[t]=n[1]}))};e.Status=Object.assign({},Ae),e.FileOrigin=Object.assign({},ye),e.FileStatus=Object.assign({},be),e.OptionTypes={},ur(),e.create=function(){var t=Xi.apply(void 0,arguments);return t.on("destroy",e.destroy),ar.apps.push(t),Zi(t)},e.destroy=function(e){var t=ar.apps.findIndex((function(t){return t.isAttachedTo(e)}));return t>=0&&(ar.apps.splice(t,1)[0].restoreElement(),!0)},e.parse=function(t){return Array.from(t.querySelectorAll(".filepond")).filter((function(e){return!ar.apps.find((function(t){return t.isAttachedTo(e)}))})).map((function(t){return e.create(t)}))},e.find=function(e){var t=ar.apps.find((function(t){return t.isAttachedTo(e)}));return t?Zi(t):null},e.registerPlugin=function(){for(var e=arguments.length,t=new Array(e),n=0;n=0,s=!!e&&"false"!==r&&("A"===e.tagName||"BUTTON"===e.tagName||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||"true"===r||o);return t?-1!==n&&s:s}function v(e){return!!(e&&e.getAttribute&&e.getAttribute("data-focuszone-id"))}function b(e){return!(!e||!e.getAttribute||"true"!==e.getAttribute("data-is-sub-focuszone"))}function y(e){var t=Object(a.a)(e),n=t&&t.activeElement;return!(!n||!Object(r.a)(e,n))}function _(e,t){return"true"!==function(e,t){var n=Object(i.a)(e,(function(e){return e.hasAttribute(t)}));return n&&n.getAttribute(t)}(e,t)}var w=void 0;function S(e){if(e){if(w)return void(w=e);w=e;var t=Object(s.a)(e);t&&t.requestAnimationFrame((function(){w&&w.focus(),w=void 0}))}}function E(e,t){for(var n=e,i=0,r=t;i50&&(t.clear(),n=0,e.disableCaching=!0),u[l]}}function u(e,t){return t=function(e){switch(e){case void 0:return"__undefined__";case null:return"__null__";default:return e}}(t),e.has(t)||e.set(t,new Map),e.get(t)}function d(e,t){if("function"===typeof t&&t.__cachedInputs__)for(var n=0,i=t.__cachedInputs__;n0&&n.preventDefault(),t.scrollHeight-t.scrollTop<=t.clientHeight&&i<0&&n.preventDefault()}};return function(e,r){e&&(r.on(e,"touchstart",n,{passive:!1}),r.on(e,"touchmove",i,{passive:!1}),t=e)}}(),u=function(e,t){if(e){t.on(e,"touchmove",(function(e){e.stopPropagation()}),{passive:!1})}},d=function(e){e.preventDefault()};function h(){var e=Object(r.a)();e&&e.body&&!a&&(e.body.classList.add(l),e.body.addEventListener("touchmove",d,{passive:!1,capture:!1})),a++}function f(){if(a>0){var e=Object(r.a)();e&&e.body&&1===a&&(e.body.classList.remove(l),e.body.removeEventListener("touchmove",d)),a--}}function p(){if(void 0===i){var e=document.createElement("div");e.style.setProperty("width","100px"),e.style.setProperty("height","100px"),e.style.setProperty("overflow","scroll"),e.style.setProperty("position","absolute"),e.style.setProperty("top","-9999px"),document.body.appendChild(e),i=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return i}function g(e){for(var t=e,n=Object(r.a)(e);t&&t!==n.body;){if("true"===t.getAttribute("data-is-scrollable"))return t;t=t.parentElement}for(t=e;t&&t!==n.body;){if("false"!==t.getAttribute("data-is-scrollable")){var i=getComputedStyle(t),o=i?i.getPropertyValue("overflow-y"):"";if(o&&("scroll"===o||"auto"===o))return t}t=t.parentElement}return t&&t!==n.body||(t=Object(s.a)(e)),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n(1),r=n(0),o=n(8),s=n(45),a=n(11),l=n(46),c=n(6),u=n(96),d=n(40),h=function(e){function t(t){var n=e.call(this,t)||this;return n._root=r.createRef(),n._disposables=[],n._onKeyDown=function(e){switch(e.which){case o.a.escape:n.props.onDismiss&&(n.props.onDismiss(e),e.preventDefault(),e.stopPropagation())}},n._onFocus=function(){n._containsFocus=!0},n._onBlur=function(e){n._root.current&&e.relatedTarget&&!n._root.current.contains(e.relatedTarget)&&(n._containsFocus=!1)},n._async=new s.a(n),n.state={needsVerticalScrollBar:!1},n}return i.c(t,e),t.prototype.UNSAFE_componentWillMount=function(){this._originalFocusedElement=Object(a.a)().activeElement},t.prototype.componentDidMount=function(){if(this._root.current){this._disposables.push(Object(l.a)(this._root.current,"focus",this._onFocus,!0),Object(l.a)(this._root.current,"blur",this._onBlur,!0));var e=Object(c.a)(this._root.current);e&&this._disposables.push(Object(l.a)(e,"keydown",this._onKeyDown)),Object(u.a)(this._root.current)&&(this._containsFocus=!0)}this._updateScrollBarAsync()},t.prototype.componentDidUpdate=function(){this._updateScrollBarAsync(),this._async.dispose()},t.prototype.componentWillUnmount=function(){this._disposables.forEach((function(e){return e()})),this.props.shouldRestoreFocus&&this._originalFocusedElement&&this._containsFocus&&this._originalFocusedElement!==window&&this._originalFocusedElement&&this._originalFocusedElement.focus(),delete this._originalFocusedElement},t.prototype.render=function(){var e=this.props,t=e.role,n=e.className,o=e.ariaLabel,s=e.ariaLabelledBy,a=e.ariaDescribedBy,l=e.style;return r.createElement("div",i.a({ref:this._root},Object(d.d)(this.props,d.c),{className:n,role:t,"aria-label":o,"aria-labelledby":s,"aria-describedby":a,onKeyDown:this._onKeyDown,style:i.a({overflowY:this.state.needsVerticalScrollBar?"scroll":void 0,outline:"none"},l)}),this.props.children)},t.prototype._updateScrollBarAsync=function(){var e=this;this._async.requestAnimationFrame((function(){e._getScrollBar()}))},t.prototype._getScrollBar=function(){if(!this.props.style||!this.props.style.overflowY){var e=!1;if(this._root&&this._root.current&&this._root.current.firstElementChild){var t=this._root.current.clientHeight,n=this._root.current.firstElementChild.clientHeight;t>0&&n>t&&(e=n-t>1)}this.state.needsVerticalScrollBar!==e&&this.setState({needsVerticalScrollBar:e})}},t.defaultProps={shouldRestoreFocus:!0},t}(r.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(1),r=n(0),o=n(12),s=n(61),a=n(17),l=n(29);function c(e,t,n){return function(c){var u,d=((u=function(s){function u(e){var t=s.call(this,e)||this;return t._onSettingChanged=t._onSettingChanged.bind(t),t}return i.c(u,s),u.prototype.componentDidMount=function(){o.a.observe(this._onSettingChanged)},u.prototype.componentWillUnmount=function(){o.a.unobserve(this._onSettingChanged)},u.prototype.render=function(){var s=this;return r.createElement(a.a.Consumer,null,(function(a){var u=o.a.getSettings(t,e,a.customizations),d=s.props;if(u.styles&&"function"===typeof u.styles&&(u.styles=u.styles(i.a({},u,d))),n&&(u.styles||d.styles)){var h=Object(l.a)(u.styles,d.styles);return r.createElement(c,i.a({},u,d,{styles:h}))}return r.createElement(c,i.a({},u,d))}))},u.prototype._onSettingChanged=function(){this.forceUpdate()},u}(r.Component)).displayName="Customized"+e,u);return Object(s.a)(c,d)}}},function(e,t,n){"use strict";var i,r=n(116),o=n(1),s=n(0),a=n(95),l=n(125),c=1,u=2;!function(e){e[e.vertical=0]="vertical",e[e.horizontal=1]="horizontal",e[e.bidirectional=2]="bidirectional",e[e.domOrder=3]="domOrder"}(i||(i={}));var d=n(96),h=n(23),f=n(8),p=n(64),g=n(126),m=n(33),v=n(6),b=n(46),y=n(40),_=n(58);function w(e){var t=function(e){var t;"function"===typeof Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0);return t}("MouseEvents");t.initEvent("click",!0,!0),e.dispatchEvent(t)}var S=n(118),E=n(36),C=n(44);function T(e,t){var n=Object(E.a)(e,(function(e){return t===e||e.hasAttribute(C.a)}));return null!==n&&n.hasAttribute(C.a)}var x,k=n(11),M=n(93);var R,I={},L=new Set,A=["text","number","password","email","tel","url","search"],O=function(e){function t(t){var n=e.call(this,t)||this;return n._disposables=[],n._root=s.createRef(),n._onFocus=function(e){if(!n._portalContainsElement(e.target)){var t,i=n.props,r=i.onActiveElementChanged,o=i.doNotAllowFocusEventToPropagate,s=i.onFocusNotification,a=n._isImmediateDescendantOfZone(e.target);if(s&&s(),a)t=e.target;else for(var l=e.target;l&&l!==n._root.current;){if(Object(d.n)(l)&&n._isImmediateDescendantOfZone(l)){t=l;break}l=Object(h.a)(l,!1)}var c=!n._activeElement;t&&t!==n._activeElement&&((a||c)&&n._setFocusAlignment(t,!0,!0),n._activeElement=t,c&&n._updateTabIndexes()),r&&r(n._activeElement,e),o&&e.stopPropagation()}},n._onBlur=function(){n._setParkedFocus(!1)},n._onKeyDownCapture=function(e){e.which===f.a.tab&&L.forEach((function(e){return e._updateTabIndexes()}))},n._onMouseDown=function(e){if(!n._portalContainsElement(e.target)&&!n.props.disabled){for(var t=e.target,i=[];t&&t!==n._root.current;)i.push(t),t=Object(h.a)(t,!1);for(;i.length&&((t=i.pop())&&Object(d.n)(t)&&n._setActiveElement(t,!0),!Object(d.m)(t)););}},n._onKeyDown=function(e){if(!n._portalContainsElement(e.target)){var t=n.props,r=t.direction,o=t.disabled,s=t.isInnerZoneKeystroke;if(!o&&(n.props.onKeyDown&&n.props.onKeyDown(e),!e.isDefaultPrevented()&&(n._getDocument().activeElement!==n._root.current||!n._isInnerZone))){if(s&&s(e)&&n._isImmediateDescendantOfZone(e.target)){var a=n._getFirstInnerZone();if(a){if(!a.focus(!0))return}else{if(!Object(d.l)(e.target))return;if(!n.focusElement(Object(d.j)(e.target,e.target.firstChild,!0)))return}}else{if(e.altKey)return;switch(e.which){case f.a.space:if(n._tryInvokeClickForFocusable(e.target))break;return;case f.a.left:if(r!==i.vertical&&n._moveFocusLeft())break;return;case f.a.right:if(r!==i.vertical&&n._moveFocusRight())break;return;case f.a.up:if(r!==i.horizontal&&n._moveFocusUp())break;return;case f.a.down:if(r!==i.horizontal&&n._moveFocusDown())break;return;case f.a.pageDown:if(n._moveFocusPaging(!0))break;return;case f.a.pageUp:if(n._moveFocusPaging(!1))break;return;case f.a.tab:if(n.props.allowTabKey||n.props.handleTabKey===c||n.props.handleTabKey===u&&n._isElementInput(e.target)){var l=!1;if(n._processingTabKey=!0,r!==i.vertical&&n._shouldWrapFocus(n._activeElement,"data-no-horizontal-wrap"))l=(Object(p.a)()?!e.shiftKey:e.shiftKey)?n._moveFocusLeft():n._moveFocusRight();else l=e.shiftKey?n._moveFocusUp():n._moveFocusDown();if(n._processingTabKey=!1,l)break}return;case f.a.home:if(n._isElementInput(e.target)&&!n._shouldInputLoseFocus(e.target,!1))return!1;var h=n._root.current&&n._root.current.firstChild;if(n._root.current&&h&&n.focusElement(Object(d.j)(n._root.current,h,!0)))break;return;case f.a.end:if(n._isElementInput(e.target)&&!n._shouldInputLoseFocus(e.target,!0))return!1;var g=n._root.current&&n._root.current.lastChild;if(n._root.current&&n.focusElement(Object(d.k)(n._root.current,g,!0,!0,!0)))break;return;case f.a.enter:if(n._tryInvokeClickForFocusable(e.target))break;return;default:return}}e.preventDefault(),e.stopPropagation()}}},n._getHorizontalDistanceFromCenter=function(e,t,i){var r=n._focusAlignment.x,o=Math.floor(i.top),s=Math.floor(t.bottom),a=Math.floor(i.bottom),l=Math.floor(t.top);return e&&o>s||!e&&a=i.left&&r<=i.left+i.width?0:Math.abs(i.left+i.width/2-r):n._shouldWrapFocus(n._activeElement,"data-no-vertical-wrap")?999999999:-999999999},Object(g.a)(n),n._id=Object(m.a)("FocusZone"),n._focusAlignment={x:0,y:0},n._processingTabKey=!1,n}return o.c(t,e),t.getOuterZones=function(){return L.size},t.prototype.componentDidMount=function(){var e=this._root.current;if(I[this._id]=this,e){for(var t=Object(v.a)(e),n=Object(h.a)(e,!1);n&&n!==this._getDocument().body&&1===n.nodeType;){if(Object(d.m)(n)){this._isInnerZone=!0;break}n=Object(h.a)(n,!1)}this._isInnerZone||L.add(this),t&&1===L.size&&(R=Object(b.a)(t,"keydown",this._onKeyDownCapture,!0)),this._disposables.push(Object(b.a)(e,"blur",this._onBlur,!0)),this._updateTabIndexes(),this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement),this.focus())}},t.prototype.componentDidUpdate=function(){var e=this._root.current,t=this._getDocument();if(t&&this._lastIndexPath&&(t.activeElement===t.body||t.activeElement===e)){var n=Object(d.g)(e,this._lastIndexPath);n?(this._setActiveElement(n,!0),n.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},t.prototype.componentWillUnmount=function(){delete I[this._id],this._isInnerZone||L.delete(this),this._disposables.forEach((function(e){return e()})),delete this._disposables,0===L.size&&R&&R()},t.prototype.render=function(){var e=this.props,t=e.rootProps,n=e.ariaDescribedBy,i=e.ariaLabelledBy,r=e.className,l=Object(y.d)(this.props,y.e),c=this.props.as||this.props.elementType||"div";return this._evaluateFocusBeforeRender(),s.createElement(c,o.a({"aria-labelledby":i,"aria-describedby":n},l,t,{className:Object(a.a)((x||(x=Object(M.a)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),x),r),ref:this._root,"data-focuszone-id":this._id,onKeyDown:this._onKeyDown,onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},t.prototype.focus=function(e){if(void 0===e&&(e=!1),this._root.current){if(!e&&"true"===this._root.current.getAttribute("data-is-focusable")&&this._isInnerZone){var t=this._getOwnerZone(this._root.current);if(t!==this._root.current){var n=I[t.getAttribute("data-focuszone-id")];return!!n&&n.focusElement(this._root.current)}return!1}if(!e&&this._activeElement&&Object(_.a)(this._root.current,this._activeElement)&&Object(d.n)(this._activeElement))return this._activeElement.focus(),!0;var i=this._root.current.firstChild;return this.focusElement(Object(d.j)(this._root.current,i,!0))}return!1},t.prototype.focusElement=function(e){var t=this.props.onBeforeFocus;return!(t&&!t(e))&&(!!e&&(this._setActiveElement(e),this._activeElement&&this._activeElement.focus(),!0))},t.prototype.setFocusAlignment=function(e){this._focusAlignment=e},t.prototype._evaluateFocusBeforeRender=function(){var e=this._root.current,t=this._getDocument();if(t){var n=t.activeElement;if(n!==e){var i=Object(_.a)(e,n,!1);this._lastIndexPath=i?Object(d.d)(e,n):void 0}}},t.prototype._setParkedFocus=function(e){var t=this._root.current;t&&this._isParked!==e&&(this._isParked=e,e?(this.props.allowFocusRoot||(this._parkedTabIndex=t.getAttribute("tabindex"),t.setAttribute("tabindex","-1")),t.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(t.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):t.removeAttribute("tabindex")))},t.prototype._setActiveElement=function(e,t){var n=this._activeElement;this._activeElement=e,n&&(Object(d.m)(n)&&this._updateTabIndexes(n),n.tabIndex=-1),this._activeElement&&(this._focusAlignment&&!t||this._setFocusAlignment(e,!0,!0),this._activeElement.tabIndex=0)},t.prototype._tryInvokeClickForFocusable=function(e){if(e===this._root.current)return!1;do{if("BUTTON"===e.tagName||"A"===e.tagName||"INPUT"===e.tagName||"TEXTAREA"===e.tagName)return!1;if(this._isImmediateDescendantOfZone(e)&&"true"===e.getAttribute("data-is-focusable")&&"true"!==e.getAttribute("data-disable-click-on-enter"))return w(e),!0;e=Object(h.a)(e,!1)}while(e!==this._root.current);return!1},t.prototype._getFirstInnerZone=function(e){if(!(e=e||this._activeElement||this._root.current))return null;if(Object(d.m)(e))return I[e.getAttribute("data-focuszone-id")];for(var t=e.firstElementChild;t;){if(Object(d.m)(t))return I[t.getAttribute("data-focuszone-id")];var n=this._getFirstInnerZone(t);if(n)return n;t=t.nextElementSibling}return null},t.prototype._moveFocus=function(e,t,n,r){void 0===r&&(r=!0);var o=this._activeElement,s=-1,a=void 0,l=!1,c=this.props.direction===i.bidirectional;if(!o||!this._root.current)return!1;if(this._isElementInput(o)&&!this._shouldInputLoseFocus(o,e))return!1;var u=c?o.getBoundingClientRect():null;do{if(o=e?Object(d.j)(this._root.current,o):Object(d.k)(this._root.current,o),!c){a=o;break}if(o){var h=t(u,o.getBoundingClientRect());if(-1===h&&-1===s){a=o;break}if(h>-1&&(-1===s||h=0&&h<0)break}}while(o);if(a&&a!==this._activeElement)l=!0,this.focusElement(a);else if(this.props.isCircularNavigation&&r)return e?this.focusElement(Object(d.j)(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(Object(d.k)(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return l},t.prototype._moveFocusDown=function(){var e=this,t=-1,n=this._focusAlignment.x;return!!this._moveFocus(!0,(function(i,r){var o=-1,s=Math.floor(r.top),a=Math.floor(i.bottom);return s=a||s===t)&&(t=s,o=n>=r.left&&n<=r.left+r.width?0:Math.abs(r.left+r.width/2-n)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},t.prototype._moveFocusUp=function(){var e=this,t=-1,n=this._focusAlignment.x;return!!this._moveFocus(!1,(function(i,r){var o=-1,s=Math.floor(r.bottom),a=Math.floor(r.top),l=Math.floor(i.top);return s>l?e._shouldWrapFocus(e._activeElement,"data-no-vertical-wrap")?999999999:-999999999:((-1===t&&s<=l||a===t)&&(t=a,o=n>=r.left&&n<=r.left+r.width?0:Math.abs(r.left+r.width/2-n)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},t.prototype._moveFocusLeft=function(){var e=this,t=this._shouldWrapFocus(this._activeElement,"data-no-horizontal-wrap");return!!this._moveFocus(Object(p.a)(),(function(n,r){var o=-1;return(Object(p.a)()?parseFloat(r.top.toFixed(3))parseFloat(n.top.toFixed(3)))&&r.right<=n.right&&e.props.direction!==i.vertical?o=n.right-r.right:t||(o=-999999999),o}),void 0,t)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},t.prototype._moveFocusRight=function(){var e=this,t=this._shouldWrapFocus(this._activeElement,"data-no-horizontal-wrap");return!!this._moveFocus(!Object(p.a)(),(function(n,r){var o=-1;return(Object(p.a)()?parseFloat(r.bottom.toFixed(3))>parseFloat(n.top.toFixed(3)):parseFloat(r.top.toFixed(3))=n.left&&e.props.direction!==i.vertical?o=r.left-n.left:t||(o=-999999999),o}),void 0,t)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},t.prototype._moveFocusPaging=function(e,t){void 0===t&&(t=!0),void 0===t&&(t=!0);var n=this._activeElement;if(!n||!this._root.current)return!1;if(this._isElementInput(n)&&!this._shouldInputLoseFocus(n,e))return!1;var i=Object(S.e)(n);if(!i)return!1;var r=-1,o=void 0,s=-1,a=-1,l=i.clientHeight,c=n.getBoundingClientRect();do{if(n=e?Object(d.j)(this._root.current,n):Object(d.k)(this._root.current,n)){var u=n.getBoundingClientRect(),h=Math.floor(u.top),f=Math.floor(c.bottom),p=Math.floor(u.bottom),g=Math.floor(c.top),m=this._getHorizontalDistanceFromCenter(e,c,u);if(e&&h>f+l||!e&&p-1&&(e&&h>s?(s=h,r=m,o=n):!e&&p-1){var n=e.selectionStart,i=n!==e.selectionEnd,r=e.value,o=e.readOnly;if(i||n>0&&!t&&!o||n!==r.length&&t&&!o||this.props.handleTabKey&&(!this.props.shouldInputLoseFocusOnArrowKey||!this.props.shouldInputLoseFocusOnArrowKey(e)))return!1}return!0},t.prototype._shouldWrapFocus=function(e,t){return!this.props.checkForNoWrap||Object(d.o)(e,t)},t.prototype._portalContainsElement=function(e){return e&&!!this._root.current&&T(e,this._root.current)},t.prototype._getDocument=function(){return Object(k.a)(this._root.current)},t.defaultProps={isCircularNavigation:!1,direction:i.bidirectional},t}(s.Component),$=n(117),D=n(59);function P(e,t){for(var n=-1,i=0;e&&i=0&&(i.keytip.visible=this.keytips[r].keytip.visible,this.keytips=function(e,t,n){var i=e.slice();return i[n]=t,i}(this.keytips,i,r),D.a.raise(this,F.KEYTIP_UPDATED,{keytip:i.keytip,uniqueID:i.uniqueID}))},e.prototype.unregister=function(e,t,n){void 0===n&&(n=!1),n?this.persistedKeytips=this.persistedKeytips.filter((function(e){return e.uniqueID!==t})):this.keytips=this.keytips.filter((function(e){return e.uniqueID!==t}));var i=n?F.PERSISTED_KEYTIP_REMOVED:F.KEYTIP_REMOVED;D.a.raise(this,i,{keytip:e,uniqueID:t})},e.prototype.enterKeytipMode=function(){D.a.raise(this,F.ENTER_KEYTIP_MODE)},e.prototype.exitKeytipMode=function(){D.a.raise(this,F.EXIT_KEYTIP_MODE)},e.prototype.getKeytips=function(){return this.keytips.map((function(e){return e.keytip}))},e.prototype.addParentOverflow=function(e){var t=e.keySequences.slice();if(t.pop(),0!==t.length){var n=function(e,t){var n=P(e,t);if(!(n<0))return e[n]}(this.getKeytips(),(function(e){return function(e,t){if(e.length!==t.length)return!1;for(var n=0;n0&&this._onRenderOverflowButtonWrapper(n))},t.prototype.focus=function(e){var t=!1;return this.props.doNotContainWithinFocusZone?this._divContainer.current&&(t=Object(d.c)(this._divContainer.current)):this._focusZone.current&&(t=this._focusZone.current.focus(e)),t},t.prototype.focusElement=function(e){var t=!1;return!!e&&(this.props.doNotContainWithinFocusZone?this._divContainer.current&&Object(_.a)(this._divContainer.current,e)&&(e.focus(),t=document.activeElement===e):this._focusZone.current&&(t=this._focusZone.current.focusElement(e)),t)},t.prototype.componentDidMount=function(){this._registerPersistedKeytips()},t.prototype.componentWillUnmount=function(){this._unregisterPersistedKeytips()},t.prototype.UNSAFE_componentWillUpdate=function(){this._unregisterPersistedKeytips()},t.prototype.componentDidUpdate=function(){this._registerPersistedKeytips()},t.prototype._registerPersistedKeytips=function(){var e=this;Object.keys(this._persistedKeytips).forEach((function(t){var n=e._persistedKeytips[t],i=e._keytipManager.register(n,!0);e._persistedKeytips[i]=n,delete e._persistedKeytips[t]}))},t.prototype._unregisterPersistedKeytips=function(){var e=this;Object.keys(this._persistedKeytips).forEach((function(t){e._keytipManager.unregister(e._persistedKeytips[t],t,!0)})),this._persistedKeytips={}},t.prototype._getSubMenuForItem=function(e){return this.props.itemSubMenuProvider?this.props.itemSubMenuProvider(e):e.subMenuProps?e.subMenuProps.items:void 0},t}(l.a),j={flexShrink:0,display:"inherit"},U=Object(r.a)(W,(function(e){var t=e.className;return{root:["ms-OverflowSet",{position:"relative",display:"flex",flexWrap:"nowrap"},e.vertical&&{flexDirection:"column"},t],item:["ms-OverflowSet-item",j],overflowButton:["ms-OverflowSet-overflowButton",j]}}),void 0,{scope:"OverflowSet"});!function(e){e[e.horizontal=0]="horizontal",e[e.vertical=1]="vertical"}(N||(N={}));var z=function(e){void 0===e&&(e=function(){var e={};return{getCachedMeasurement:function(t){if(t&&t.cacheKey&&e.hasOwnProperty(t.cacheKey))return e[t.cacheKey]},addMeasurementToCache:function(t,n){t.cacheKey&&(e[t.cacheKey]=n)}}}());var t,n=e;function i(e,t){var i=n.getCachedMeasurement(e);if(void 0!==i)return i;var r=t();return n.addMeasurementToCache(e,r),r}function r(e,r,o){for(var s=e,a=i(e,o);a>t;){var l=r(s);if(void 0===l)return{renderedData:s,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(a=n.getCachedMeasurement(l)))return{dataToMeasure:l,resizeDirection:"shrink"};s=l}return{renderedData:s,resizeDirection:void 0,dataToMeasure:void 0}}return{getNextState:function(e,s,a,l){if(void 0!==l||void 0!==s.dataToMeasure){if(l){if(t&&s.renderedData&&!s.dataToMeasure)return o.a({},s,function(e,n,i,r){var s;return s=e>t?r?{resizeDirection:"grow",dataToMeasure:r(i)}:{resizeDirection:"shrink",dataToMeasure:n}:{resizeDirection:"shrink",dataToMeasure:i},t=e,o.a({},s,{measureContainer:!1})}(l,e.data,s.renderedData,e.onGrowData));t=l}var c=o.a({},s,{measureContainer:!1});return s.dataToMeasure&&(c="grow"===s.resizeDirection&&e.onGrowData?o.a({},c,function(e,s,a,l){for(var c=e,u=i(e,a);ut.bottom)&&(!(e.leftt.right)))}function _e(e,t){var n=new Array;return e.topt.bottom&&n.push(de.bottom),e.leftt.right&&n.push(de.right),n}function we(e,t){return e[de[t]]}function Se(e,t,n){return e[de[t]]=n,e}function Ee(e,t){var n=$e(t);return(we(e,n.positiveEdge)+we(e,n.negativeEdge))/2}function Ce(e,t){return e>0?t:-1*t}function Te(e,t){return Ce(e,we(t,e))}function xe(e,t,n){return Ce(n,we(e,n)-we(t,n))}function ke(e,t,n){var i=we(e,t)-n;return e=Se(e,t,n),e=Se(e,-1*t,we(e,-1*t)-i)}function Me(e,t,n,i){return void 0===i&&(i=0),ke(e,n,we(t,n)+Ce(n,i))}function Re(e,t,n){return Te(n,e)>Te(n,t)}function Ie(e,t,n,i,r,o,s){void 0===r&&(r=0);var a=i.alignmentEdge,l=i.alignTargetEdge,c={elementRectangle:e,targetEdge:i.targetEdge,alignmentEdge:a};o||s||(c=function(e,t,n,i,r){void 0===r&&(r=0);var o=[de.left,de.right,de.bottom,de.top];Object(p.a)()&&(o[0]*=-1,o[1]*=-1);for(var s=e,a=i.targetEdge,l=i.alignmentEdge,c=0;c<4;c++){if(Re(s,n,a))return{elementRectangle:s,targetEdge:a,alignmentEdge:l};o.splice(o.indexOf(a),1),o.length>0&&(o.indexOf(-1*a)>-1?a*=-1:(l=a,a=o.slice(-1)[0]),s=Oe(e,t,{targetEdge:a,alignmentEdge:l},r))}return{elementRectangle:e,targetEdge:i.targetEdge,alignmentEdge:l}}(e,t,n,i,r));var u=_e(e,n);if(l){if(c.alignmentEdge&&u.indexOf(-1*c.alignmentEdge)>-1){var d=function(e,t,n,i){var r=e.alignmentEdge,o=e.targetEdge,s=-1*r;return{elementRectangle:Oe(e.elementRectangle,t,{targetEdge:o,alignmentEdge:s},n,i),targetEdge:o,alignmentEdge:s}}(c,t,r,s);if(ye(d.elementRectangle,n))return d;c=Le(_e(d.elementRectangle,n),c,n)}}else c=Le(u,c,n);return c}function Le(e,t,n){for(var i=0,r=e;iMath.abs(xe(e,n,-1*t))?-1*t:t}function Pe(e){return Math.sqrt(e*e*2)}function Fe(e,t,n){if(void 0===e&&(e=oe.a.bottomAutoEdge),n)return{alignmentEdge:n.alignmentEdge,isAuto:n.isAuto,targetEdge:n.targetEdge};var i=o.a({},be[e]);return Object(p.a)()?(i.alignmentEdge&&i.alignmentEdge%2===0&&(i.alignmentEdge=-1*i.alignmentEdge),void 0!==t?be[t]:i):i}function Ne(e,t,n){var i=Ee(t,e),r=Ee(n,e),o=$e(e),s=o.positiveEdge,a=o.negativeEdge;return i<=r?s:a}function Be(e,t,n,i,r,o,s){var a=Oe(e,t,i,r,s);return ye(a,n)?{elementRectangle:a,targetEdge:i.targetEdge,alignmentEdge:i.alignmentEdge}:Ie(e,t,n,i,r,o,s)}function He(e,t,n){var i=-1*e.targetEdge,r=new me(0,e.elementRectangle.width,0,e.elementRectangle.height),s={},a=De(e.elementRectangle,e.alignmentEdge?e.alignmentEdge:$e(i).positiveEdge,n);return s[de[i]]=we(t,i),s[de[a]]=xe(t,r,a),{elementPosition:o.a({},s),closestEdge:Ne(e.targetEdge,t,r),targetEdge:i}}function We(e,t){var n=t.targetRectangle,i=$e(t.targetEdge),r=i.positiveEdge,o=i.negativeEdge,s=Ee(n,t.targetEdge),a=new me(e/2,t.elementRectangle.width-e/2,e/2,t.elementRectangle.height-e/2),l=new me(0,e,0,e);return Re(l=Ae(l=ke(l,-1*t.targetEdge,-e/2),-1*t.targetEdge,s-Te(r,t.elementRectangle)),a,r)?Re(l,a,o)||(l=Me(l,a,o)):l=Me(l,a,r),l}function je(e){var t=e.getBoundingClientRect();return new me(t.left,t.right,t.top,t.bottom)}function Ue(e){return new me(e.left,e.right,e.top,e.bottom)}function ze(e,t,n,i,r){var o=0,s=be[t],a=r?-1*s.targetEdge:s.targetEdge;return(o=a===de.top?we(e,s.targetEdge)-i.top-n:a===de.bottom?i.bottom-we(e,s.targetEdge)-n:i.bottom-e.top-n)>0?o:i.height}function Ve(e,t,n,i){var r=e.gapSpace?e.gapSpace:0,s=function(e,t){var n;if(t){if(t.preventDefault){var i=t;n=new me(i.clientX,i.clientX,i.clientY,i.clientY)}else if(t.getBoundingClientRect)n=je(t);else{var r=t;n=new me(r.x,r.x,r.y,r.y)}if(!ye(n,e))for(var o=0,s=_e(n,e);o0&&(this._positionAttempts=0,this.props.onPositioned&&this.props.onPositioned(this.state.positions))}},t.prototype._getBounds=function(){if(!this._bounds){var e=this.props.bounds,t="function"===typeof e?e(this.props.target,this._targetWindow):e;t||(t={top:0+this.props.minPagePadding,left:0+this.props.minPagePadding,right:this._targetWindow.innerWidth-this.props.minPagePadding,bottom:this._targetWindow.innerHeight-this.props.minPagePadding,width:this._targetWindow.innerWidth-2*this.props.minPagePadding,height:this._targetWindow.innerHeight-2*this.props.minPagePadding}),this._bounds=t}return this._bounds},t.prototype._getMaxHeight=function(){var e=this;if(!this._maxHeight)if(this.props.directionalHintFixed&&this._target){var t=this.props.isBeakVisible?this.props.beakWidth:0,n=(this.props.gapSpace?this.props.gapSpace:0)+t;this._async.requestAnimationFrame((function(){e._target&&(e._maxHeight=function(e,t,n,i,r){void 0===n&&(n=0);var o=e,s=e,a=e,l=i?Ue(i):new me(0,window.innerWidth-Object(S.f)(),0,window.innerHeight);return ze(o.stopPropagation?new me(o.clientX,o.clientX,o.clientY,o.clientY):void 0!==a.x&&void 0!==a.y?new me(a.x,a.x,a.y,a.y):je(s),t,n,l,r)}(e._target,e.props.directionalHint,n,e._getBounds(),e.props.coverTarget),e._blockResetHeight=!0,e.forceUpdate())}),this._target)}else this._maxHeight=this._getBounds().height;return this._maxHeight},t.prototype._arePositionsEqual=function(e,t){return this._comparePositions(e.elementPosition,t.elementPosition)&&this._comparePositions(e.beakPosition.elementPosition,t.beakPosition.elementPosition)},t.prototype._comparePositions=function(e,t){for(var n in t)if(t.hasOwnProperty(n)){var i=e[n],r=t[n];if(void 0===i||void 0===r)return!1;if(i.toFixed(2)!==r.toFixed(2))return!1}return!0},t.prototype._setTargetWindowAndElement=function(e){var t=this._calloutElement.current;if(e)if("string"===typeof e){var n=Object(k.a)(t);this._target=n?n.querySelector(e):null,this._targetWindow=Object(v.a)(t)}else if(e.stopPropagation)this._targetWindow=Object(v.a)(e.toElement),this._target=e;else if(e.getBoundingClientRect){var i=e;this._targetWindow=Object(v.a)(i),this._target=e}else void 0!==e.current?(this._target=e.current,this._targetWindow=Object(v.a)(this._target)):(this._targetWindow=Object(v.a)(t),this._target=e);else this._targetWindow=Object(v.a)(t)},t.prototype._setHeightOffsetEveryFrame=function(){var e=this;this._calloutElement.current&&this.props.finalHeight&&(this._setHeightOffsetTimer=this._async.requestAnimationFrame((function(){var t=e._calloutElement.current&&e._calloutElement.current.lastChild;if(t){var n=t.scrollHeight-t.offsetHeight;e.setState({heightOffset:e.state.heightOffset+n}),t.offsetHeight0){for(var U=0,z=0,V=i;z0?s.createElement("li",{role:"presentation",key:l.key||e.key||"section-"+n},s.createElement("div",o.a({},u),s.createElement("ul",{className:this._classNames.list},l.topDivider&&this._renderSeparator(n,t,!0,!0),c&&this._renderListItem(c,e.key||n,t,e.title),l.items.map((function(e,t){return a._renderMenuItem(e,t,t,l.items.length,i,r)})),l.bottomDivider&&this._renderSeparator(n,t,!1,!0)))):void 0}},t.prototype._renderListItem=function(e,t,n,i){return s.createElement("li",{role:"presentation",title:i,key:t,className:n.item},e)},t.prototype._renderSeparator=function(e,t,n,i){return i||e>0?s.createElement("li",{role:"separator",key:"separator-"+e+(void 0===n?"":n?"-top":"-bottom"),className:t.divider,"aria-hidden":"true"}):null},t.prototype._renderNormalItem=function(e,t,n,i,r,s,a){return e.onRender?e.onRender(o.a({"aria-posinset":i+1,"aria-setsize":r},e),this.dismiss):e.href?this._renderAnchorMenuItem(e,t,n,i,r,s,a):e.split&&ce(e)?this._renderSplitButton(e,t,n,i,r,s,a):this._renderButtonItem(e,t,n,i,r,s,a)},t.prototype._renderHeaderMenuItem=function(e,t,n,i,r){var a=this.props.contextualMenuItemAs,l=void 0===a?wt:a,c=e.itemProps,u=e.id,d=c&&Object(y.d)(c,y.c);return s.createElement("div",o.a({id:u,className:this._classNames.header},d,{style:e.style}),s.createElement(l,o.a({item:e,classNames:t,index:n,onCheckmarkClick:i?this._onItemClick:void 0,hasIcons:r},c)))},t.prototype._renderAnchorMenuItem=function(e,t,n,i,r,o,a){var l=this.props.contextualMenuItemAs,c=this.state.expandedMenuItemKey;return s.createElement(Tt,{item:e,classNames:t,index:n,focusableElementIndex:i,totalItemCount:r,hasCheckmarks:o,hasIcons:a,contextualMenuItemAs:l,onItemMouseEnter:this._onItemMouseEnterBase,onItemMouseLeave:this._onMouseItemLeave,onItemMouseMove:this._onItemMouseMoveBase,onItemMouseDown:this._onItemMouseDown,executeItemClick:this._executeItemClick,onItemClick:this._onAnchorClick,onItemKeyDown:this._onItemKeyDown,getSubMenuId:this._getSubMenuId,expandedMenuItemKey:c,openSubMenu:this._onItemSubMenuExpand,dismissSubMenu:this._onSubMenuDismiss,dismissMenu:this.dismiss})},t.prototype._renderButtonItem=function(e,t,n,i,r,o,a){var l=this.props.contextualMenuItemAs,c=this.state.expandedMenuItemKey;return s.createElement(xt,{item:e,classNames:t,index:n,focusableElementIndex:i,totalItemCount:r,hasCheckmarks:o,hasIcons:a,contextualMenuItemAs:l,onItemMouseEnter:this._onItemMouseEnterBase,onItemMouseLeave:this._onMouseItemLeave,onItemMouseMove:this._onItemMouseMoveBase,onItemMouseDown:this._onItemMouseDown,executeItemClick:this._executeItemClick,onItemClick:this._onItemClick,onItemClickBase:this._onItemClickBase,onItemKeyDown:this._onItemKeyDown,getSubMenuId:this._getSubMenuId,expandedMenuItemKey:c,openSubMenu:this._onItemSubMenuExpand,dismissSubMenu:this._onSubMenuDismiss,dismissMenu:this.dismiss})},t.prototype._renderSplitButton=function(e,t,n,i,r,o,a){var l=this.props.contextualMenuItemAs,c=this.state.expandedMenuItemKey;return s.createElement(Rt,{item:e,classNames:t,index:n,focusableElementIndex:i,totalItemCount:r,hasCheckmarks:o,hasIcons:a,contextualMenuItemAs:l,onItemMouseEnter:this._onItemMouseEnterBase,onItemMouseLeave:this._onMouseItemLeave,onItemMouseMove:this._onItemMouseMoveBase,onItemMouseDown:this._onItemMouseDown,executeItemClick:this._executeItemClick,onItemClick:this._onItemClick,onItemClickBase:this._onItemClickBase,onItemKeyDown:this._onItemKeyDown,openSubMenu:this._onItemSubMenuExpand,dismissSubMenu:this._onSubMenuDismiss,dismissMenu:this.dismiss,expandedMenuItemKey:c,onTap:this._onPointerAndTouchEvent})},t.prototype._isAltOrMeta=function(e){return e.which===f.a.alt||"Meta"===e.key},t.prototype._shouldIgnoreMouseEvent=function(){return!this._isScrollIdle||!this._gotMouseMove},t.prototype._updateFocusOnMouseEvent=function(e,t,n){var i=this,r=n||t.currentTarget,o=this.props.subMenuHoverDelay,s=void 0===o?250:o;e.key!==this.state.expandedMenuItemKey&&(void 0!==this._enterTimerId&&(this._async.clearTimeout(this._enterTimerId),this._enterTimerId=void 0),void 0===this.state.expandedMenuItemKey&&r.focus(),ce(e)?(t.stopPropagation(),this._enterTimerId=this._async.setTimeout((function(){r.focus(),i.setState({expandedByMouseClick:!0}),i._onItemSubMenuExpand(e,r),i._enterTimerId=void 0}),s)):this._enterTimerId=this._async.setTimeout((function(){i._onSubMenuDismiss(t),r.focus(),i._enterTimerId=void 0}),s))},t.prototype._getSubmenuProps=function(){var e=this.state,t=e.submenuTarget,n=e.expandedMenuItemKey,i=this._findItemByKey(n),r=null;return i&&(r={items:At(i),target:t,onDismiss:this._onSubMenuDismiss,isSubMenu:!0,id:this.state.subMenuId,shouldFocusOnMount:!0,shouldFocusOnContainer:this.state.expandedByMouseClick,directionalHint:Object(p.a)(this.props.theme)?oe.a.leftTopEdge:oe.a.rightTopEdge,className:this.props.className,gapSpace:0,isBeakVisible:!1},i.subMenuProps&&Object(X.a)(r,i.subMenuProps)),r},t.prototype._findItemByKey=function(e){var t=this.props.items;return this._findItemByKeyFromItems(e,t)},t.prototype._findItemByKeyFromItems=function(e,t){for(var n=0,i=t;n *":{position:"relative",left:0,top:0}}}],rootDisabled:[Object(Qe.k)(e,{inset:1,highContrastStyle:l,borderColor:"transparent"}),{backgroundColor:s,borderColor:s,color:a,cursor:"default",pointerEvents:"none",selectors:(t={":hover":zt,":focus":zt},t[Qe.e]={color:"grayText",borderColor:"grayText"},t)}],iconDisabled:{color:a},menuIconDisabled:{color:a},flexContainer:{display:"flex",height:"100%",flexWrap:"nowrap",justifyContent:"center",alignItems:"center"},description:{display:"block"},textContainer:{flexGrow:1,display:"block"},icon:Vt(r.mediumPlus.fontSize),menuIcon:Vt(r.small.fontSize),label:{margin:"0 4px",lineHeight:"100%",display:"block"},screenReaderText:Qe.p}})),Kt=Object(Y.b)((function(e,t){var n,i,r,s,a,l,c,u,d,h,f=e.effects,p=e.palette,g={position:"absolute",width:1,right:31,top:8,bottom:8},m={splitButtonContainer:[Object(Qe.k)(e,{highContrastStyle:{left:-2,top:-2,bottom:-2,right:-2,border:"none"},inset:2}),{display:"inline-flex",selectors:{".ms-Button--default":{borderTopRightRadius:"0",borderBottomRightRadius:"0",borderRight:"none"},".ms-Button--primary":{borderTopRightRadius:"0",borderBottomRightRadius:"0",border:"none",selectors:(n={},n[Qe.e]={color:"Window",backgroundColor:"WindowText",MsHighContrastAdjust:"none"},n)},".ms-Button--primary + .ms-Button":{border:"none"}}}],splitButtonContainerHovered:{selectors:{".ms-Button--primary":{selectors:(i={},i[Qe.e]={color:"Window",backgroundColor:"Highlight"},i)},".ms-Button.is-disabled":{selectors:(r={},r[Qe.e]={color:"GrayText",borderColor:"GrayText",backgroundColor:"Window"},r)}}},splitButtonContainerChecked:{selectors:{".ms-Button--primary":{selectors:(s={},s[Qe.e]={color:"Window",backgroundColor:"WindowText",MsHighContrastAdjust:"none"},s)}}},splitButtonContainerCheckedHovered:{selectors:{".ms-Button--primary":{selectors:(a={},a[Qe.e]={color:"Window",backgroundColor:"WindowText",MsHighContrastAdjust:"none"},a)}}},splitButtonContainerFocused:{outline:"none!important"},splitButtonMenuButton:{padding:6,height:"auto",boxSizing:"border-box",borderRadius:0,borderTopRightRadius:f.roundedCorner2,borderBottomRightRadius:f.roundedCorner2,border:"1px solid "+p.neutralSecondaryAlt,borderLeft:"none",outline:"transparent",userSelect:"none",display:"inline-block",textDecoration:"none",textAlign:"center",cursor:"pointer",verticalAlign:"top",width:32,marginLeft:-1,marginTop:0,marginRight:0,marginBottom:0},splitButtonDivider:o.a({},g,{selectors:(l={},l[Qe.e]={backgroundColor:"WindowText"},l)}),splitButtonDividerDisabled:o.a({},g,{selectors:(c={},c[Qe.e]={backgroundColor:"GrayText"},c)}),splitButtonMenuButtonDisabled:{pointerEvents:"none",border:"none",selectors:(u={":hover":{cursor:"default"},".ms-Button--primary":{selectors:(d={},d[Qe.e]={color:"GrayText",borderColor:"GrayText",backgroundColor:"Window"},d)}},u[Qe.e]={border:"1px solid GrayText",color:"GrayText",backgroundColor:"Window"},u)},splitButtonFlexContainer:{display:"flex",height:"100%",flexWrap:"nowrap",justifyContent:"center",alignItems:"center"},splitButtonContainerDisabled:{outline:"none",border:"none",selectors:(h={},h[Qe.e]={color:"GrayText",borderColor:"GrayText",backgroundColor:"Window"},h)}};return Object(Qe.i)(m,t)})),qt=Object(Y.b)((function(e,t,n,i){var r,o,s,a,l,c,u,d,h,f,p=Gt(e),g=Kt(e),m=e.palette,v=e.semanticColors,b={root:[Object(Qe.k)(e,{inset:2,highContrastStyle:{left:4,top:4,bottom:4,right:4,border:"none"},borderColor:"transparent"}),e.fonts.medium,{minWidth:"40px",backgroundColor:m.white,color:m.neutralPrimary,padding:"0 4px",border:"none",borderRadius:0,selectors:(r={},r[Qe.e]={border:"none"},r)}],rootHovered:{backgroundColor:m.neutralLighter,color:m.neutralDark,selectors:(o={},o[Qe.e]={color:"Highlight"},o["."+Bt.msButtonIcon]={color:m.themeDarkAlt},o["."+Bt.msButtonMenuIcon]={color:m.neutralPrimary},o)},rootPressed:{backgroundColor:m.neutralLight,color:m.neutralDark,selectors:(s={},s["."+Bt.msButtonIcon]={color:m.themeDark},s["."+Bt.msButtonMenuIcon]={color:m.neutralPrimary},s)},rootChecked:{backgroundColor:m.neutralLight,color:m.neutralDark,selectors:(a={},a["."+Bt.msButtonIcon]={color:m.themeDark},a["."+Bt.msButtonMenuIcon]={color:m.neutralPrimary},a)},rootCheckedHovered:{backgroundColor:m.neutralQuaternaryAlt,selectors:(l={},l["."+Bt.msButtonIcon]={color:m.themeDark},l["."+Bt.msButtonMenuIcon]={color:m.neutralPrimary},l)},rootExpanded:{backgroundColor:m.neutralLight,color:m.neutralDark,selectors:(c={},c["."+Bt.msButtonIcon]={color:m.themeDark},c["."+Bt.msButtonMenuIcon]={color:m.neutralPrimary},c)},rootExpandedHovered:{backgroundColor:m.neutralQuaternaryAlt},rootDisabled:{backgroundColor:m.white,selectors:(u={},u["."+Bt.msButtonIcon]={color:v.disabledBodySubtext},u)},splitButtonContainer:{height:"100%",selectors:(d={},d[Qe.e]={border:"none"},d)},splitButtonDivider:{backgroundColor:m.neutralTertiaryAlt},splitButtonMenuButton:{backgroundColor:m.white,border:"none",borderTopRightRadius:"0",borderBottomRightRadius:"0",color:m.neutralSecondary,selectors:{":hover":{backgroundColor:m.neutralLighter,color:m.neutralDark,selectors:(h={},h[Qe.e]={color:"Highlight"},h["."+Bt.msButtonIcon]={color:m.neutralPrimary},h)},":active":{backgroundColor:m.neutralLight,selectors:(f={},f["."+Bt.msButtonIcon]={color:m.neutralPrimary},f)}}},splitButtonMenuButtonDisabled:{backgroundColor:m.white},splitButtonMenuButtonChecked:{backgroundColor:m.neutralLight,color:m.neutralDark,selectors:{":hover":{backgroundColor:m.neutralQuaternaryAlt}}},splitButtonMenuButtonExpanded:{backgroundColor:m.neutralLight,color:m.black,selectors:{":hover":{backgroundColor:m.neutralQuaternaryAlt}}},splitButtonMenuIcon:{color:m.neutralPrimary},splitButtonMenuIconDisabled:{color:m.neutralTertiary},label:{fontWeight:"normal"},icon:{color:m.themePrimary},menuIcon:{color:m.neutralSecondary}};return Object(Qe.i)(p,g,b,t)})),Yt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._skipComponentRefResolution=!0,t}return o.c(t,e),t.prototype.render=function(){var e=this.props,t=e.styles,n=e.theme;return s.createElement(jt,o.a({},this.props,{variantClassName:"ms-Button--commandBar",styles:qt(n,t),onRenderDescription:l.b}))},t=o.b([Object(Ut.a)("CommandBarButton",["theme","styles"],!0)],t)}(l.a);!function(e){e[e.Parent=0]="Parent",e[e.Self=1]="Self"}(Ft||(Ft={}));var Xt,Qt=Object($.a)(),Zt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onRenderContent=function(e){return s.createElement("p",{className:t._classNames.subText},e.content)},t}return o.c(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.calloutProps,i=e.directionalHint,r=e.directionalHintForRTL,a=e.styles,l=e.id,c=e.maxWidth,u=e.onRenderContent,d=void 0===u?this._onRenderContent:u,h=e.targetElement,f=e.theme;return this._classNames=Qt(a,{theme:f,className:t||n&&n.className,beakWidth:n&&n.beakWidth,gapSpace:n&&n.gapSpace,maxWidth:c}),s.createElement(ct,o.a({target:h,directionalHint:i,directionalHintForRTL:r},n,Object(y.d)(this.props,y.c,["id"]),{className:this._classNames.root}),s.createElement("div",{className:this._classNames.content,id:l,role:"tooltip",onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},d(this.props,this._onRenderContent)))},t.defaultProps={directionalHint:oe.a.topCenter,maxWidth:"364px",calloutProps:{isBeakVisible:!0,beakWidth:16,gapSpace:0,setInitialFocus:!0,doNotLayer:!1}},t}(s.Component),Jt=Object(r.a)(Zt,(function(e){var t=e.className,n=e.beakWidth,i=void 0===n?16:n,r=e.gapSpace,o=void 0===r?0:r,s=e.maxWidth,a=e.theme,l=a.semanticColors,c=a.fonts,u=a.effects,d=-(Math.sqrt(i*i/2)+o);return{root:["ms-Tooltip",a.fonts.medium,Qe.a.fadeIn200,{background:l.menuBackground,boxShadow:u.elevation8,padding:"8px",maxWidth:s,selectors:{":after":{content:"''",position:"absolute",bottom:d,left:d,right:d,top:d,zIndex:0}}},t],content:["ms-Tooltip-content",c.small,{position:"relative",zIndex:1,color:l.menuItemText,wordWrap:"break-word",overflowWrap:"break-word",overflow:"hidden"}],subText:["ms-Tooltip-subtext",{fontSize:"inherit",fontWeight:"inherit",color:"inherit",margin:0}]}}),void 0,{scope:"Tooltip"});!function(e){e[e.zero=0]="zero",e[e.medium=1]="medium",e[e.long=2]="long"}(Xt||(Xt={}));var en=Object($.a)(),tn=function(e){function t(n){var i=e.call(this,n)||this;return i._tooltipHost=s.createRef(),i._defaultTooltipId=Object(m.a)("tooltip"),i.show=function(){i._toggleTooltip(!0)},i.dismiss=function(){i._hideTooltip()},i._getTargetElement=function(){if(i._tooltipHost.current){var e=i.props.overflowMode;if(void 0!==e)switch(e){case Ft.Parent:return i._tooltipHost.current.parentElement;case Ft.Self:return i._tooltipHost.current}return i._tooltipHost.current}},i._onTooltipMouseEnter=function(e){var n,r=i.props,o=r.overflowMode,s=r.delay;if(t._currentVisibleTooltip&&t._currentVisibleTooltip!==i&&t._currentVisibleTooltip.dismiss(),t._currentVisibleTooltip=i,void 0!==o){var a=i._getTargetElement();if(a&&(!function(e){return e.clientWidths){u.renderedInOverflow=!1,l=l.slice(1),a=i?[u].concat(a):a.concat([u]);var d=o.a({},e,{primaryItems:a,overflowItems:l});return c=t._computeCacheKey(d),r&&r(u),d.cacheKey=c,d}},t}return o.c(t,e),t.prototype.render=function(){var e=this.props,t=e.items,n=e.overflowItems,i=e.farItems,r=e.styles,a=e.theme,l=e.dataDidRender,c=e.onReduceData,u=void 0===c?this._onReduceData:c,d=e.onGrowData,h=void 0===d?this._onGrowData:d,f={primaryItems:t.slice(),overflowItems:n.slice(),minimumOverflowItems:n.slice().length,farItems:i,cacheKey:""};this._classNames=an(r,{theme:a});var p=Object(y.d)(this.props,y.c);return s.createElement(q,o.a({},p,{componentRef:this._resizeGroup,data:f,onReduceData:u,onGrowData:h,onRenderData:this._onRenderData,dataDidRender:l}))},t.prototype.focus=function(){var e=this._overflowSet.current;e&&e.focus()},t.prototype.remeasure=function(){this._resizeGroup.current&&this._resizeGroup.current.remeasure()},t.prototype._onButtonClick=function(e){return function(t){e.inactive||e.onClick&&e.onClick(t,e)}},t.prototype._computeCacheKey=function(e){var t=e.primaryItems,n=e.farItems,i=void 0===n?[]:n,r=e.overflowItems,o=function(e,t){var n=t.cacheKey;return e+(void 0===n?t.key:n)};return[t.reduce(o,""),i.reduce(o,""),r.length?"overflow":""].join(" ")},t.defaultProps={items:[],overflowItems:[]},t}(l.a);n.d(t,"a",(function(){return cn}));var cn=Object(r.a)(ln,(function(e){var t=e.className,n=e.theme,i=n.palette;return{root:[n.fonts.medium,"ms-CommandBar",{display:"flex",backgroundColor:i.white,padding:"0 14px 0 24px",height:44},t],primarySet:["ms-CommandBar-primaryCommand",{flexGrow:"1",display:"flex",alignItems:"stretch"}],secondarySet:["ms-CommandBar-secondaryCommand",{flexShrink:"0",display:"flex",alignItems:"stretch"}]}}),void 0,{scope:"CommandBar"})},function(e,t,n){"use strict";var i=n(3);function r(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons"',src:"url('"+e+"fabric-icons-a13498cf.woff') format('woff')"},icons:{GlobalNavButton:"\ue700",ChevronDown:"\ue70d",ChevronUp:"\ue70e",Edit:"\ue70f",Add:"\ue710",Cancel:"\ue711",More:"\ue712",Settings:"\ue713",Mail:"\ue715",Filter:"\ue71c",Search:"\ue721",Share:"\ue72d",BlockedSite:"\ue72f",FavoriteStar:"\ue734",FavoriteStarFill:"\ue735",CheckMark:"\ue73e",Delete:"\ue74d",ChevronLeft:"\ue76b",ChevronRight:"\ue76c",Calendar:"\ue787",Megaphone:"\ue789",Undo:"\ue7a7",Flag:"\ue7c1",Page:"\ue7c3",Pinned:"\ue840",View:"\ue890",Clear:"\ue894",Download:"\ue896",Upload:"\ue898",Folder:"\ue8b7",Sort:"\ue8cb",AlignRight:"\ue8e2",AlignLeft:"\ue8e4",Tag:"\ue8ec",AddFriend:"\ue8fa",Info:"\ue946",SortLines:"\ue9d0",List:"\uea37",CircleRing:"\uea3a",Heart:"\ueb51",HeartFill:"\ueb52",Tiles:"\ueca5",Embed:"\uecce",Glimmer:"\uecf4",Ascending:"\uedc0",Descending:"\uedc1",SortUp:"\uee68",SortDown:"\uee69",SyncToPC:"\uee6e",LargeGrid:"\ueecb",SkypeCheck:"\uef80",SkypeClock:"\uef81",SkypeMinus:"\uef82",ClearFilter:"\uef8f",Flow:"\uef90",StatusCircleCheckmark:"\uf13e",MoreVertical:"\uf2bc"}};Object(i.t)(n,t)}function o(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-0"',src:"url('"+e+"fabric-icons-0-467ee27f.woff') format('woff')"},icons:{PageLink:"\ue302",CommentSolid:"\ue30e",ChangeEntitlements:"\ue310",Installation:"\ue311",WebAppBuilderModule:"\ue313",WebAppBuilderFragment:"\ue314",WebAppBuilderSlot:"\ue315",BullseyeTargetEdit:"\ue319",WebAppBuilderFragmentCreate:"\ue31b",PageData:"\ue31c",PageHeaderEdit:"\ue31d",ProductList:"\ue31e",UnpublishContent:"\ue31f",DependencyAdd:"\ue344",DependencyRemove:"\ue345",EntitlementPolicy:"\ue346",EntitlementRedemption:"\ue347",SchoolDataSyncLogo:"\ue34c",PinSolid12:"\ue352",PinSolidOff12:"\ue353",AddLink:"\ue35e",SharepointAppIcon16:"\ue365",DataflowsLink:"\ue366",TimePicker:"\ue367",UserWarning:"\ue368",ComplianceAudit:"\ue369",InternetSharing:"\ue704",Brightness:"\ue706",MapPin:"\ue707",Airplane:"\ue709",Tablet:"\ue70a",QuickNote:"\ue70b",Video:"\ue714",People:"\ue716",Phone:"\ue717",Pin:"\ue718",Shop:"\ue719",Stop:"\ue71a",Link:"\ue71b",AllApps:"\ue71d",Zoom:"\ue71e",ZoomOut:"\ue71f",Microphone:"\ue720",Camera:"\ue722",Attach:"\ue723",Send:"\ue724",FavoriteList:"\ue728",PageSolid:"\ue729",Forward:"\ue72a",Back:"\ue72b",Refresh:"\ue72c",Lock:"\ue72e",ReportHacked:"\ue730",EMI:"\ue731",MiniLink:"\ue732",Blocked:"\ue733",ReadingMode:"\ue736",Favicon:"\ue737",Remove:"\ue738",Checkbox:"\ue739",CheckboxComposite:"\ue73a",CheckboxFill:"\ue73b",CheckboxIndeterminate:"\ue73c",CheckboxCompositeReversed:"\ue73d",BackToWindow:"\ue73f",FullScreen:"\ue740",Print:"\ue749",Up:"\ue74a",Down:"\ue74b",OEM:"\ue74c",Save:"\ue74e",ReturnKey:"\ue751",Cloud:"\ue753",Flashlight:"\ue754",CommandPrompt:"\ue756",Sad:"\ue757",RealEstate:"\ue758",SIPMove:"\ue759",EraseTool:"\ue75c",GripperTool:"\ue75e",Dialpad:"\ue75f",PageLeft:"\ue760",PageRight:"\ue761",MultiSelect:"\ue762",KeyboardClassic:"\ue765",Play:"\ue768",Pause:"\ue769",InkingTool:"\ue76d",Emoji2:"\ue76e",GripperBarHorizontal:"\ue76f",System:"\ue770",Personalize:"\ue771",SearchAndApps:"\ue773",Globe:"\ue774",EaseOfAccess:"\ue776",ContactInfo:"\ue779",Unpin:"\ue77a",Contact:"\ue77b",Memo:"\ue77c",IncomingCall:"\ue77e"}};Object(i.t)(n,t)}function s(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-1"',src:"url('"+e+"fabric-icons-1-4d521695.woff') format('woff')"},icons:{Paste:"\ue77f",WindowsLogo:"\ue782",Error:"\ue783",GripperBarVertical:"\ue784",Unlock:"\ue785",Slideshow:"\ue786",Trim:"\ue78a",AutoEnhanceOn:"\ue78d",AutoEnhanceOff:"\ue78e",Color:"\ue790",SaveAs:"\ue792",Light:"\ue793",Filters:"\ue795",AspectRatio:"\ue799",Contrast:"\ue7a1",Redo:"\ue7a6",Crop:"\ue7a8",PhotoCollection:"\ue7aa",Album:"\ue7ab",Rotate:"\ue7ad",PanoIndicator:"\ue7b0",Translate:"\ue7b2",RedEye:"\ue7b3",ViewOriginal:"\ue7b4",ThumbnailView:"\ue7b6",Package:"\ue7b8",Telemarketer:"\ue7b9",Warning:"\ue7ba",Financial:"\ue7bb",Education:"\ue7be",ShoppingCart:"\ue7bf",Train:"\ue7c0",Move:"\ue7c2",TouchPointer:"\ue7c9",Merge:"\ue7d5",TurnRight:"\ue7db",Ferry:"\ue7e3",Highlight:"\ue7e6",PowerButton:"\ue7e8",Tab:"\ue7e9",Admin:"\ue7ef",TVMonitor:"\ue7f4",Speakers:"\ue7f5",Game:"\ue7fc",HorizontalTabKey:"\ue7fd",UnstackSelected:"\ue7fe",StackIndicator:"\ue7ff",Nav2DMapView:"\ue800",StreetsideSplitMinimize:"\ue802",Car:"\ue804",Bus:"\ue806",EatDrink:"\ue807",SeeDo:"\ue808",LocationCircle:"\ue80e",Home:"\ue80f",SwitcherStartEnd:"\ue810",ParkingLocation:"\ue811",IncidentTriangle:"\ue814",Touch:"\ue815",MapDirections:"\ue816",CaretHollow:"\ue817",CaretSolid:"\ue818",History:"\ue81c",Location:"\ue81d",MapLayers:"\ue81e",SearchNearby:"\ue820",Work:"\ue821",Recent:"\ue823",Hotel:"\ue824",Bank:"\ue825",LocationDot:"\ue827",Dictionary:"\ue82d",ChromeBack:"\ue830",FolderOpen:"\ue838",PinnedFill:"\ue842",RevToggleKey:"\ue845",USB:"\ue88e",Previous:"\ue892",Next:"\ue893",Sync:"\ue895",Help:"\ue897",Emoji:"\ue899",MailForward:"\ue89c",ClosePane:"\ue89f",OpenPane:"\ue8a0",PreviewLink:"\ue8a1",ZoomIn:"\ue8a3",Bookmarks:"\ue8a4",Document:"\ue8a5",ProtectedDocument:"\ue8a6",OpenInNewWindow:"\ue8a7",MailFill:"\ue8a8",ViewAll:"\ue8a9",Switch:"\ue8ab",Rename:"\ue8ac",Go:"\ue8ad",Remote:"\ue8af",SelectAll:"\ue8b3",Orientation:"\ue8b4",Import:"\ue8b5"}};Object(i.t)(n,t)}function a(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-2"',src:"url('"+e+"fabric-icons-2-63c99abf.woff') format('woff')"},icons:{Picture:"\ue8b9",ChromeClose:"\ue8bb",ShowResults:"\ue8bc",Message:"\ue8bd",CalendarDay:"\ue8bf",CalendarWeek:"\ue8c0",MailReplyAll:"\ue8c2",Read:"\ue8c3",Cut:"\ue8c6",PaymentCard:"\ue8c7",Copy:"\ue8c8",Important:"\ue8c9",MailReply:"\ue8ca",GotoToday:"\ue8d1",Font:"\ue8d2",FontColor:"\ue8d3",FolderFill:"\ue8d5",Permissions:"\ue8d7",DisableUpdates:"\ue8d8",Unfavorite:"\ue8d9",Italic:"\ue8db",Underline:"\ue8dc",Bold:"\ue8dd",MoveToFolder:"\ue8de",Dislike:"\ue8e0",Like:"\ue8e1",AlignCenter:"\ue8e3",OpenFile:"\ue8e5",ClearSelection:"\ue8e6",FontDecrease:"\ue8e7",FontIncrease:"\ue8e8",FontSize:"\ue8e9",CellPhone:"\ue8ea",RepeatOne:"\ue8ed",RepeatAll:"\ue8ee",Calculator:"\ue8ef",Library:"\ue8f1",PostUpdate:"\ue8f3",NewFolder:"\ue8f4",CalendarReply:"\ue8f5",UnsyncFolder:"\ue8f6",SyncFolder:"\ue8f7",BlockContact:"\ue8f8",Accept:"\ue8fb",BulletedList:"\ue8fd",Preview:"\ue8ff",News:"\ue900",Chat:"\ue901",Group:"\ue902",World:"\ue909",Comment:"\ue90a",DockLeft:"\ue90c",DockRight:"\ue90d",Repair:"\ue90f",Accounts:"\ue910",Street:"\ue913",RadioBullet:"\ue915",Stopwatch:"\ue916",Clock:"\ue917",WorldClock:"\ue918",AlarmClock:"\ue919",Photo:"\ue91b",ActionCenter:"\ue91c",Hospital:"\ue91d",Timer:"\ue91e",FullCircleMask:"\ue91f",LocationFill:"\ue920",ChromeMinimize:"\ue921",ChromeRestore:"\ue923",Annotation:"\ue924",Fingerprint:"\ue928",Handwriting:"\ue929",ChromeFullScreen:"\ue92d",Completed:"\ue930",Label:"\ue932",FlickDown:"\ue935",FlickUp:"\ue936",FlickLeft:"\ue937",FlickRight:"\ue938",MiniExpand:"\ue93a",MiniContract:"\ue93b",Streaming:"\ue93e",MusicInCollection:"\ue940",OneDriveLogo:"\ue941",CompassNW:"\ue942",Code:"\ue943",LightningBolt:"\ue945",CalculatorMultiply:"\ue947",CalculatorAddition:"\ue948",CalculatorSubtract:"\ue949",CalculatorPercentage:"\ue94c",CalculatorEqualTo:"\ue94e",PrintfaxPrinterFile:"\ue956",StorageOptical:"\ue958",Communications:"\ue95a",Headset:"\ue95b",Health:"\ue95e",Webcam2:"\ue960",FrontCamera:"\ue96b",ChevronUpSmall:"\ue96d"}};Object(i.t)(n,t)}function l(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-3"',src:"url('"+e+"fabric-icons-3-089e217a.woff') format('woff')"},icons:{ChevronDownSmall:"\ue96e",ChevronLeftSmall:"\ue96f",ChevronRightSmall:"\ue970",ChevronUpMed:"\ue971",ChevronDownMed:"\ue972",ChevronLeftMed:"\ue973",ChevronRightMed:"\ue974",Devices2:"\ue975",PC1:"\ue977",PresenceChickletVideo:"\ue979",Reply:"\ue97a",HalfAlpha:"\ue97e",ConstructionCone:"\ue98f",DoubleChevronLeftMed:"\ue991",Volume0:"\ue992",Volume1:"\ue993",Volume2:"\ue994",Volume3:"\ue995",Chart:"\ue999",Robot:"\ue99a",Manufacturing:"\ue99c",LockSolid:"\ue9a2",FitPage:"\ue9a6",FitWidth:"\ue9a7",BidiLtr:"\ue9aa",BidiRtl:"\ue9ab",RightDoubleQuote:"\ue9b1",Sunny:"\ue9bd",CloudWeather:"\ue9be",Cloudy:"\ue9bf",PartlyCloudyDay:"\ue9c0",PartlyCloudyNight:"\ue9c1",ClearNight:"\ue9c2",RainShowersDay:"\ue9c3",Rain:"\ue9c4",Thunderstorms:"\ue9c6",RainSnow:"\ue9c7",Snow:"\ue9c8",BlowingSnow:"\ue9c9",Frigid:"\ue9ca",Fog:"\ue9cb",Squalls:"\ue9cc",Duststorm:"\ue9cd",Unknown:"\ue9ce",Precipitation:"\ue9cf",Ribbon:"\ue9d1",AreaChart:"\ue9d2",Assign:"\ue9d3",FlowChart:"\ue9d4",CheckList:"\ue9d5",Diagnostic:"\ue9d9",Generate:"\ue9da",LineChart:"\ue9e6",Equalizer:"\ue9e9",BarChartHorizontal:"\ue9eb",BarChartVertical:"\ue9ec",Freezing:"\ue9ef",FunnelChart:"\ue9f1",Processing:"\ue9f5",Quantity:"\ue9f8",ReportDocument:"\ue9f9",StackColumnChart:"\ue9fc",SnowShowerDay:"\ue9fd",HailDay:"\uea00",WorkFlow:"\uea01",HourGlass:"\uea03",StoreLogoMed20:"\uea04",TimeSheet:"\uea05",TriangleSolid:"\uea08",UpgradeAnalysis:"\uea0b",VideoSolid:"\uea0c",RainShowersNight:"\uea0f",SnowShowerNight:"\uea11",Teamwork:"\uea12",HailNight:"\uea13",PeopleAdd:"\uea15",Glasses:"\uea16",DateTime2:"\uea17",Shield:"\uea18",Header1:"\uea19",PageAdd:"\uea1a",NumberedList:"\uea1c",PowerBILogo:"\uea1e",Info2:"\uea1f",MusicInCollectionFill:"\uea36",Asterisk:"\uea38",ErrorBadge:"\uea39",CircleFill:"\uea3b",Record2:"\uea3f",AllAppsMirrored:"\uea40",BookmarksMirrored:"\uea41",BulletedListMirrored:"\uea42",CaretHollowMirrored:"\uea45",CaretSolidMirrored:"\uea46",ChromeBackMirrored:"\uea47",ClearSelectionMirrored:"\uea48",ClosePaneMirrored:"\uea49",DockLeftMirrored:"\uea4c",DoubleChevronLeftMedMirrored:"\uea4d",GoMirrored:"\uea4f"}};Object(i.t)(n,t)}function c(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-4"',src:"url('"+e+"fabric-icons-4-a656cc0a.woff') format('woff')"},icons:{HelpMirrored:"\uea51",ImportMirrored:"\uea52",ImportAllMirrored:"\uea53",ListMirrored:"\uea55",MailForwardMirrored:"\uea56",MailReplyMirrored:"\uea57",MailReplyAllMirrored:"\uea58",MiniContractMirrored:"\uea59",MiniExpandMirrored:"\uea5a",OpenPaneMirrored:"\uea5b",ParkingLocationMirrored:"\uea5e",SendMirrored:"\uea63",ShowResultsMirrored:"\uea65",ThumbnailViewMirrored:"\uea67",Media:"\uea69",Devices3:"\uea6c",Focus:"\uea6f",VideoLightOff:"\uea74",Lightbulb:"\uea80",StatusTriangle:"\uea82",VolumeDisabled:"\uea85",Puzzle:"\uea86",EmojiNeutral:"\uea87",EmojiDisappointed:"\uea88",HomeSolid:"\uea8a",Ringer:"\uea8f",PDF:"\uea90",HeartBroken:"\uea92",StoreLogo16:"\uea96",MultiSelectMirrored:"\uea98",Broom:"\uea99",AddToShoppingList:"\uea9a",Cocktails:"\uea9d",Wines:"\ueabf",Articles:"\ueac1",Cycling:"\ueac7",DietPlanNotebook:"\ueac8",Pill:"\ueacb",ExerciseTracker:"\ueacc",HandsFree:"\uead0",Medical:"\uead4",Running:"\ueada",Weights:"\ueadb",Trackers:"\ueadf",AddNotes:"\ueae3",AllCurrency:"\ueae4",BarChart4:"\ueae7",CirclePlus:"\ueaee",Coffee:"\ueaef",Cotton:"\ueaf3",Market:"\ueafc",Money:"\ueafd",PieDouble:"\ueb04",PieSingle:"\ueb05",RemoveFilter:"\ueb08",Savings:"\ueb0b",Sell:"\ueb0c",StockDown:"\ueb0f",StockUp:"\ueb11",Lamp:"\ueb19",Source:"\ueb1b",MSNVideos:"\ueb1c",Cricket:"\ueb1e",Golf:"\ueb1f",Baseball:"\ueb20",Soccer:"\ueb21",MoreSports:"\ueb22",AutoRacing:"\ueb24",CollegeHoops:"\ueb25",CollegeFootball:"\ueb26",ProFootball:"\ueb27",ProHockey:"\ueb28",Rugby:"\ueb2d",SubstitutionsIn:"\ueb31",Tennis:"\ueb33",Arrivals:"\ueb34",Design:"\ueb3c",Website:"\ueb41",Drop:"\ueb42",HistoricalWeather:"\ueb43",SkiResorts:"\ueb45",Snowflake:"\ueb46",BusSolid:"\ueb47",FerrySolid:"\ueb48",AirplaneSolid:"\ueb4c",TrainSolid:"\ueb4d",Ticket:"\ueb54",WifiWarning4:"\ueb63",Devices4:"\ueb66",AzureLogo:"\ueb6a",BingLogo:"\ueb6b",MSNLogo:"\ueb6c",OutlookLogoInverse:"\ueb6d",OfficeLogo:"\ueb6e",SkypeLogo:"\ueb6f",Door:"\ueb75",EditMirrored:"\ueb7e",GiftCard:"\ueb8e",DoubleBookmark:"\ueb8f",StatusErrorFull:"\ueb90"}};Object(i.t)(n,t)}function u(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-5"',src:"url('"+e+"fabric-icons-5-f95ba260.woff') format('woff')"},icons:{Certificate:"\ueb95",FastForward:"\ueb9d",Rewind:"\ueb9e",Photo2:"\ueb9f",OpenSource:"\uebc2",Movers:"\uebcd",CloudDownload:"\uebd3",Family:"\uebda",WindDirection:"\uebe6",Bug:"\uebe8",SiteScan:"\uebec",BrowserScreenShot:"\uebed",F12DevTools:"\uebee",CSS:"\uebef",JS:"\uebf0",DeliveryTruck:"\uebf4",ReminderPerson:"\uebf7",ReminderGroup:"\uebf8",ReminderTime:"\uebf9",TabletMode:"\uebfc",Umbrella:"\uec04",NetworkTower:"\uec05",CityNext:"\uec06",CityNext2:"\uec07",Section:"\uec0c",OneNoteLogoInverse:"\uec0d",ToggleFilled:"\uec11",ToggleBorder:"\uec12",SliderThumb:"\uec13",ToggleThumb:"\uec14",Documentation:"\uec17",Badge:"\uec1b",Giftbox:"\uec1f",VisualStudioLogo:"\uec22",HomeGroup:"\uec26",ExcelLogoInverse:"\uec28",WordLogoInverse:"\uec29",PowerPointLogoInverse:"\uec2a",Cafe:"\uec32",SpeedHigh:"\uec4a",Commitments:"\uec4d",ThisPC:"\uec4e",MusicNote:"\uec4f",MicOff:"\uec54",PlaybackRate1x:"\uec57",EdgeLogo:"\uec60",CompletedSolid:"\uec61",AlbumRemove:"\uec62",MessageFill:"\uec70",TabletSelected:"\uec74",MobileSelected:"\uec75",LaptopSelected:"\uec76",TVMonitorSelected:"\uec77",DeveloperTools:"\uec7a",Shapes:"\uec7c",InsertTextBox:"\uec7d",LowerBrightness:"\uec8a",WebComponents:"\uec8b",OfflineStorage:"\uec8c",DOM:"\uec8d",CloudUpload:"\uec8e",ScrollUpDown:"\uec8f",DateTime:"\uec92",Event:"\ueca3",Cake:"\ueca4",Org:"\ueca6",PartyLeader:"\ueca7",DRM:"\ueca8",CloudAdd:"\ueca9",AppIconDefault:"\uecaa",Photo2Add:"\uecab",Photo2Remove:"\uecac",Calories:"\uecad",POI:"\uecaf",AddTo:"\uecc8",RadioBtnOff:"\uecca",RadioBtnOn:"\ueccb",ExploreContent:"\ueccd",Product:"\uecdc",ProgressLoopInner:"\uecde",ProgressLoopOuter:"\uecdf",Blocked2:"\uece4",FangBody:"\ueceb",Toolbox:"\ueced",PageHeader:"\uecee",ChatInviteFriend:"\uecfe",Brush:"\uecff",Shirt:"\ued00",Crown:"\ued01",Diamond:"\ued02",ScaleUp:"\ued09",QRCode:"\ued14",Feedback:"\ued15",SharepointLogoInverse:"\ued18",YammerLogo:"\ued19",Hide:"\ued1a",Uneditable:"\ued1d",ReturnToSession:"\ued24",OpenFolderHorizontal:"\ued25",CalendarMirrored:"\ued28"}};Object(i.t)(n,t)}function d(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-6"',src:"url('"+e+"fabric-icons-6-ef6fd590.woff') format('woff')"},icons:{SwayLogoInverse:"\ued29",OutOfOffice:"\ued34",Trophy:"\ued3f",ReopenPages:"\ued50",EmojiTabSymbols:"\ued58",AADLogo:"\ued68",AccessLogo:"\ued69",AdminALogoInverse32:"\ued6a",AdminCLogoInverse32:"\ued6b",AdminDLogoInverse32:"\ued6c",AdminELogoInverse32:"\ued6d",AdminLLogoInverse32:"\ued6e",AdminMLogoInverse32:"\ued6f",AdminOLogoInverse32:"\ued70",AdminPLogoInverse32:"\ued71",AdminSLogoInverse32:"\ued72",AdminYLogoInverse32:"\ued73",DelveLogoInverse:"\ued76",ExchangeLogoInverse:"\ued78",LyncLogo:"\ued79",OfficeVideoLogoInverse:"\ued7a",SocialListeningLogo:"\ued7c",VisioLogoInverse:"\ued7d",Balloons:"\ued7e",Cat:"\ued7f",MailAlert:"\ued80",MailCheck:"\ued81",MailLowImportance:"\ued82",MailPause:"\ued83",MailRepeat:"\ued84",SecurityGroup:"\ued85",Table:"\ued86",VoicemailForward:"\ued87",VoicemailReply:"\ued88",Waffle:"\ued89",RemoveEvent:"\ued8a",EventInfo:"\ued8b",ForwardEvent:"\ued8c",WipePhone:"\ued8d",AddOnlineMeeting:"\ued8e",JoinOnlineMeeting:"\ued8f",RemoveLink:"\ued90",PeopleBlock:"\ued91",PeopleRepeat:"\ued92",PeopleAlert:"\ued93",PeoplePause:"\ued94",TransferCall:"\ued95",AddPhone:"\ued96",UnknownCall:"\ued97",NoteReply:"\ued98",NoteForward:"\ued99",NotePinned:"\ued9a",RemoveOccurrence:"\ued9b",Timeline:"\ued9c",EditNote:"\ued9d",CircleHalfFull:"\ued9e",Room:"\ued9f",Unsubscribe:"\ueda0",Subscribe:"\ueda1",HardDrive:"\ueda2",RecurringTask:"\uedb2",TaskManager:"\uedb7",TaskManagerMirrored:"\uedb8",Combine:"\uedbb",Split:"\uedbc",DoubleChevronUp:"\uedbd",DoubleChevronLeft:"\uedbe",DoubleChevronRight:"\uedbf",TextBox:"\uedc2",TextField:"\uedc3",NumberField:"\uedc4",Dropdown:"\uedc5",PenWorkspace:"\uedc6",BookingsLogo:"\uedc7",ClassNotebookLogoInverse:"\uedc8",DelveAnalyticsLogo:"\uedca",DocsLogoInverse:"\uedcb",Dynamics365Logo:"\uedcc",DynamicSMBLogo:"\uedcd",OfficeAssistantLogo:"\uedce",OfficeStoreLogo:"\uedcf",OneNoteEduLogoInverse:"\uedd0",PlannerLogo:"\uedd1",PowerApps:"\uedd2",Suitcase:"\uedd3",ProjectLogoInverse:"\uedd4",CaretLeft8:"\uedd5",CaretRight8:"\uedd6",CaretUp8:"\uedd7",CaretDown8:"\uedd8",CaretLeftSolid8:"\uedd9",CaretRightSolid8:"\uedda",CaretUpSolid8:"\ueddb",CaretDownSolid8:"\ueddc",ClearFormatting:"\ueddd",Superscript:"\uedde",Subscript:"\ueddf",Strikethrough:"\uede0",Export:"\uede1",ExportMirrored:"\uede2"}};Object(i.t)(n,t)}function h(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-7"',src:"url('"+e+"fabric-icons-7-2b97bb99.woff') format('woff')"},icons:{SingleBookmark:"\uedff",SingleBookmarkSolid:"\uee00",DoubleChevronDown:"\uee04",FollowUser:"\uee05",ReplyAll:"\uee0a",WorkforceManagement:"\uee0f",RecruitmentManagement:"\uee12",Questionnaire:"\uee19",ManagerSelfService:"\uee23",ProductionFloorManagement:"\uee29",ProductRelease:"\uee2e",ProductVariant:"\uee30",ReplyMirrored:"\uee35",ReplyAllMirrored:"\uee36",Medal:"\uee38",AddGroup:"\uee3d",QuestionnaireMirrored:"\uee4b",CloudImportExport:"\uee55",TemporaryUser:"\uee58",CaretSolid16:"\uee62",GroupedDescending:"\uee66",GroupedAscending:"\uee67",AwayStatus:"\uee6a",MyMoviesTV:"\uee6c",GenericScan:"\uee6f",AustralianRules:"\uee70",WifiEthernet:"\uee77",TrackersMirrored:"\uee92",DateTimeMirrored:"\uee93",StopSolid:"\uee95",DoubleChevronUp12:"\uee96",DoubleChevronDown12:"\uee97",DoubleChevronLeft12:"\uee98",DoubleChevronRight12:"\uee99",CalendarAgenda:"\uee9a",ConnectVirtualMachine:"\uee9d",AddEvent:"\ueeb5",AssetLibrary:"\ueeb6",DataConnectionLibrary:"\ueeb7",DocLibrary:"\ueeb8",FormLibrary:"\ueeb9",FormLibraryMirrored:"\ueeba",ReportLibrary:"\ueebb",ReportLibraryMirrored:"\ueebc",ContactCard:"\ueebd",CustomList:"\ueebe",CustomListMirrored:"\ueebf",IssueTracking:"\ueec0",IssueTrackingMirrored:"\ueec1",PictureLibrary:"\ueec2",OfficeAddinsLogo:"\ueec7",OfflineOneDriveParachute:"\ueec8",OfflineOneDriveParachuteDisabled:"\ueec9",TriangleSolidUp12:"\ueecc",TriangleSolidDown12:"\ueecd",TriangleSolidLeft12:"\ueece",TriangleSolidRight12:"\ueecf",TriangleUp12:"\ueed0",TriangleDown12:"\ueed1",TriangleLeft12:"\ueed2",TriangleRight12:"\ueed3",ArrowUpRight8:"\ueed4",ArrowDownRight8:"\ueed5",DocumentSet:"\ueed6",GoToDashboard:"\ueeed",DelveAnalytics:"\ueeee",ArrowUpRightMirrored8:"\ueeef",ArrowDownRightMirrored8:"\ueef0",CompanyDirectory:"\uef0d",OpenEnrollment:"\uef1c",CompanyDirectoryMirrored:"\uef2b",OneDriveAdd:"\uef32",ProfileSearch:"\uef35",Header2:"\uef36",Header3:"\uef37",Header4:"\uef38",RingerSolid:"\uef3a",Eyedropper:"\uef3c",MarketDown:"\uef42",CalendarWorkWeek:"\uef51",SidePanel:"\uef52",GlobeFavorite:"\uef53",CaretTopLeftSolid8:"\uef54",CaretTopRightSolid8:"\uef55",ViewAll2:"\uef56",DocumentReply:"\uef57",PlayerSettings:"\uef58",ReceiptForward:"\uef59",ReceiptReply:"\uef5a",ReceiptCheck:"\uef5b",Fax:"\uef5c",RecurringEvent:"\uef5d",ReplyAlt:"\uef5e",ReplyAllAlt:"\uef5f",EditStyle:"\uef60",EditMail:"\uef61",Lifesaver:"\uef62",LifesaverLock:"\uef63",InboxCheck:"\uef64",FolderSearch:"\uef65"}};Object(i.t)(n,t)}function f(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-8"',src:"url('"+e+"fabric-icons-8-6fdf1528.woff') format('woff')"},icons:{CollapseMenu:"\uef66",ExpandMenu:"\uef67",Boards:"\uef68",SunAdd:"\uef69",SunQuestionMark:"\uef6a",LandscapeOrientation:"\uef6b",DocumentSearch:"\uef6c",PublicCalendar:"\uef6d",PublicContactCard:"\uef6e",PublicEmail:"\uef6f",PublicFolder:"\uef70",WordDocument:"\uef71",PowerPointDocument:"\uef72",ExcelDocument:"\uef73",GroupedList:"\uef74",ClassroomLogo:"\uef75",Sections:"\uef76",EditPhoto:"\uef77",Starburst:"\uef78",ShareiOS:"\uef79",AirTickets:"\uef7a",PencilReply:"\uef7b",Tiles2:"\uef7c",SkypeCircleCheck:"\uef7d",SkypeCircleClock:"\uef7e",SkypeCircleMinus:"\uef7f",SkypeMessage:"\uef83",ClosedCaption:"\uef84",ATPLogo:"\uef85",OfficeFormsLogoInverse:"\uef86",RecycleBin:"\uef87",EmptyRecycleBin:"\uef88",Hide2:"\uef89",Breadcrumb:"\uef8c",BirthdayCake:"\uef8d",TimeEntry:"\uef95",CRMProcesses:"\uefb1",PageEdit:"\uefb6",PageArrowRight:"\uefb8",PageRemove:"\uefba",Database:"\uefc7",DataManagementSettings:"\uefc8",CRMServices:"\uefd2",EditContact:"\uefd3",ConnectContacts:"\uefd4",AppIconDefaultAdd:"\uefda",AppIconDefaultList:"\uefde",ActivateOrders:"\uefe0",DeactivateOrders:"\uefe1",ProductCatalog:"\uefe8",ScatterChart:"\uefeb",AccountActivity:"\ueff4",DocumentManagement:"\ueffc",CRMReport:"\ueffe",KnowledgeArticle:"\uf000",Relationship:"\uf003",HomeVerify:"\uf00e",ZipFolder:"\uf012",SurveyQuestions:"\uf01b",TextDocument:"\uf029",TextDocumentShared:"\uf02b",PageCheckedOut:"\uf02c",PageShared:"\uf02d",SaveAndClose:"\uf038",Script:"\uf03a",Archive:"\uf03f",ActivityFeed:"\uf056",Compare:"\uf057",EventDate:"\uf059",ArrowUpRight:"\uf069",CaretRight:"\uf06b",SetAction:"\uf071",ChatBot:"\uf08b",CaretSolidLeft:"\uf08d",CaretSolidDown:"\uf08e",CaretSolidRight:"\uf08f",CaretSolidUp:"\uf090",PowerAppsLogo:"\uf091",PowerApps2Logo:"\uf092",SearchIssue:"\uf09a",SearchIssueMirrored:"\uf09b",FabricAssetLibrary:"\uf09c",FabricDataConnectionLibrary:"\uf09d",FabricDocLibrary:"\uf09e",FabricFormLibrary:"\uf09f",FabricFormLibraryMirrored:"\uf0a0",FabricReportLibrary:"\uf0a1",FabricReportLibraryMirrored:"\uf0a2",FabricPublicFolder:"\uf0a3",FabricFolderSearch:"\uf0a4",FabricMovetoFolder:"\uf0a5",FabricUnsyncFolder:"\uf0a6",FabricSyncFolder:"\uf0a7",FabricOpenFolderHorizontal:"\uf0a8",FabricFolder:"\uf0a9",FabricFolderFill:"\uf0aa",FabricNewFolder:"\uf0ab",FabricPictureLibrary:"\uf0ac",PhotoVideoMedia:"\uf0b1",AddFavorite:"\uf0c8"}};Object(i.t)(n,t)}function p(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-9"',src:"url('"+e+"fabric-icons-9-c6162b42.woff') format('woff')"},icons:{AddFavoriteFill:"\uf0c9",BufferTimeBefore:"\uf0cf",BufferTimeAfter:"\uf0d0",BufferTimeBoth:"\uf0d1",PublishContent:"\uf0d4",ClipboardList:"\uf0e3",ClipboardListMirrored:"\uf0e4",CannedChat:"\uf0f2",SkypeForBusinessLogo:"\uf0fc",TabCenter:"\uf100",PageCheckedin:"\uf104",PageList:"\uf106",ReadOutLoud:"\uf112",CaretBottomLeftSolid8:"\uf121",CaretBottomRightSolid8:"\uf122",FolderHorizontal:"\uf12b",MicrosoftStaffhubLogo:"\uf130",GiftboxOpen:"\uf133",StatusCircleOuter:"\uf136",StatusCircleInner:"\uf137",StatusCircleRing:"\uf138",StatusTriangleOuter:"\uf139",StatusTriangleInner:"\uf13a",StatusTriangleExclamation:"\uf13b",StatusCircleExclamation:"\uf13c",StatusCircleErrorX:"\uf13d",StatusCircleInfo:"\uf13f",StatusCircleBlock:"\uf140",StatusCircleBlock2:"\uf141",StatusCircleQuestionMark:"\uf142",StatusCircleSync:"\uf143",Toll:"\uf160",ExploreContentSingle:"\uf164",CollapseContent:"\uf165",CollapseContentSingle:"\uf166",InfoSolid:"\uf167",GroupList:"\uf168",ProgressRingDots:"\uf16a",CaloriesAdd:"\uf172",BranchFork:"\uf173",MuteChat:"\uf17a",AddHome:"\uf17b",AddWork:"\uf17c",MobileReport:"\uf18a",ScaleVolume:"\uf18c",HardDriveGroup:"\uf18f",FastMode:"\uf19a",ToggleLeft:"\uf19e",ToggleRight:"\uf19f",TriangleShape:"\uf1a7",RectangleShape:"\uf1a9",CubeShape:"\uf1aa",Trophy2:"\uf1ae",BucketColor:"\uf1b6",BucketColorFill:"\uf1b7",Taskboard:"\uf1c2",SingleColumn:"\uf1d3",DoubleColumn:"\uf1d4",TripleColumn:"\uf1d5",ColumnLeftTwoThirds:"\uf1d6",ColumnRightTwoThirds:"\uf1d7",AccessLogoFill:"\uf1db",AnalyticsLogo:"\uf1de",AnalyticsQuery:"\uf1df",NewAnalyticsQuery:"\uf1e0",AnalyticsReport:"\uf1e1",WordLogo:"\uf1e3",WordLogoFill:"\uf1e4",ExcelLogo:"\uf1e5",ExcelLogoFill:"\uf1e6",OneNoteLogo:"\uf1e7",OneNoteLogoFill:"\uf1e8",OutlookLogo:"\uf1e9",OutlookLogoFill:"\uf1ea",PowerPointLogo:"\uf1eb",PowerPointLogoFill:"\uf1ec",PublisherLogo:"\uf1ed",PublisherLogoFill:"\uf1ee",ScheduleEventAction:"\uf1ef",FlameSolid:"\uf1f3",ServerProcesses:"\uf1fe",Server:"\uf201",SaveAll:"\uf203",LinkedInLogo:"\uf20a",Decimals:"\uf218",SidePanelMirrored:"\uf221",ProtectRestrict:"\uf22a",Blog:"\uf22b",UnknownMirrored:"\uf22e",PublicContactCardMirrored:"\uf230",GridViewSmall:"\uf232",GridViewMedium:"\uf233",GridViewLarge:"\uf234",Step:"\uf241",StepInsert:"\uf242",StepShared:"\uf243",StepSharedAdd:"\uf244",StepSharedInsert:"\uf245",ViewDashboard:"\uf246",ViewList:"\uf247"}};Object(i.t)(n,t)}function g(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-10"',src:"url('"+e+"fabric-icons-10-c4ded8e4.woff') format('woff')"},icons:{ViewListGroup:"\uf248",ViewListTree:"\uf249",TriggerAuto:"\uf24a",TriggerUser:"\uf24b",PivotChart:"\uf24c",StackedBarChart:"\uf24d",StackedLineChart:"\uf24e",BuildQueue:"\uf24f",BuildQueueNew:"\uf250",UserFollowed:"\uf25c",ContactLink:"\uf25f",Stack:"\uf26f",Bullseye:"\uf272",VennDiagram:"\uf273",FiveTileGrid:"\uf274",FocalPoint:"\uf277",Insert:"\uf278",RingerRemove:"\uf279",TeamsLogoInverse:"\uf27a",TeamsLogo:"\uf27b",TeamsLogoFill:"\uf27c",SkypeForBusinessLogoFill:"\uf27d",SharepointLogo:"\uf27e",SharepointLogoFill:"\uf27f",DelveLogo:"\uf280",DelveLogoFill:"\uf281",OfficeVideoLogo:"\uf282",OfficeVideoLogoFill:"\uf283",ExchangeLogo:"\uf284",ExchangeLogoFill:"\uf285",Signin:"\uf286",DocumentApproval:"\uf28b",CloneToDesktop:"\uf28c",InstallToDrive:"\uf28d",Blur:"\uf28e",Build:"\uf28f",ProcessMetaTask:"\uf290",BranchFork2:"\uf291",BranchLocked:"\uf292",BranchCommit:"\uf293",BranchCompare:"\uf294",BranchMerge:"\uf295",BranchPullRequest:"\uf296",BranchSearch:"\uf297",BranchShelveset:"\uf298",RawSource:"\uf299",MergeDuplicate:"\uf29a",RowsGroup:"\uf29b",RowsChild:"\uf29c",Deploy:"\uf29d",Redeploy:"\uf29e",ServerEnviroment:"\uf29f",VisioDiagram:"\uf2a0",HighlightMappedShapes:"\uf2a1",TextCallout:"\uf2a2",IconSetsFlag:"\uf2a4",VisioLogo:"\uf2a7",VisioLogoFill:"\uf2a8",VisioDocument:"\uf2a9",TimelineProgress:"\uf2aa",TimelineDelivery:"\uf2ab",Backlog:"\uf2ac",TeamFavorite:"\uf2ad",TaskGroup:"\uf2ae",TaskGroupMirrored:"\uf2af",ScopeTemplate:"\uf2b0",AssessmentGroupTemplate:"\uf2b1",NewTeamProject:"\uf2b2",CommentAdd:"\uf2b3",CommentNext:"\uf2b4",CommentPrevious:"\uf2b5",ShopServer:"\uf2b6",LocaleLanguage:"\uf2b7",QueryList:"\uf2b8",UserSync:"\uf2b9",UserPause:"\uf2ba",StreamingOff:"\uf2bb",ArrowTallUpLeft:"\uf2bd",ArrowTallUpRight:"\uf2be",ArrowTallDownLeft:"\uf2bf",ArrowTallDownRight:"\uf2c0",FieldEmpty:"\uf2c1",FieldFilled:"\uf2c2",FieldChanged:"\uf2c3",FieldNotChanged:"\uf2c4",RingerOff:"\uf2c5",PlayResume:"\uf2c6",BulletedList2:"\uf2c7",BulletedList2Mirrored:"\uf2c8",ImageCrosshair:"\uf2c9",GitGraph:"\uf2ca",Repo:"\uf2cb",RepoSolid:"\uf2cc",FolderQuery:"\uf2cd",FolderList:"\uf2ce",FolderListMirrored:"\uf2cf",LocationOutline:"\uf2d0",POISolid:"\uf2d1",CalculatorNotEqualTo:"\uf2d2",BoxSubtractSolid:"\uf2d3"}};Object(i.t)(n,t)}function m(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-11"',src:"url('"+e+"fabric-icons-11-2a8393d6.woff') format('woff')"},icons:{BoxAdditionSolid:"\uf2d4",BoxMultiplySolid:"\uf2d5",BoxPlaySolid:"\uf2d6",BoxCheckmarkSolid:"\uf2d7",CirclePauseSolid:"\uf2d8",CirclePause:"\uf2d9",MSNVideosSolid:"\uf2da",CircleStopSolid:"\uf2db",CircleStop:"\uf2dc",NavigateBack:"\uf2dd",NavigateBackMirrored:"\uf2de",NavigateForward:"\uf2df",NavigateForwardMirrored:"\uf2e0",UnknownSolid:"\uf2e1",UnknownMirroredSolid:"\uf2e2",CircleAddition:"\uf2e3",CircleAdditionSolid:"\uf2e4",FilePDB:"\uf2e5",FileTemplate:"\uf2e6",FileSQL:"\uf2e7",FileJAVA:"\uf2e8",FileASPX:"\uf2e9",FileCSS:"\uf2ea",FileSass:"\uf2eb",FileLess:"\uf2ec",FileHTML:"\uf2ed",JavaScriptLanguage:"\uf2ee",CSharpLanguage:"\uf2ef",CSharp:"\uf2f0",VisualBasicLanguage:"\uf2f1",VB:"\uf2f2",CPlusPlusLanguage:"\uf2f3",CPlusPlus:"\uf2f4",FSharpLanguage:"\uf2f5",FSharp:"\uf2f6",TypeScriptLanguage:"\uf2f7",PythonLanguage:"\uf2f8",PY:"\uf2f9",CoffeeScript:"\uf2fa",MarkDownLanguage:"\uf2fb",FullWidth:"\uf2fe",FullWidthEdit:"\uf2ff",Plug:"\uf300",PlugSolid:"\uf301",PlugConnected:"\uf302",PlugDisconnected:"\uf303",UnlockSolid:"\uf304",Variable:"\uf305",Parameter:"\uf306",CommentUrgent:"\uf307",Storyboard:"\uf308",DiffInline:"\uf309",DiffSideBySide:"\uf30a",ImageDiff:"\uf30b",ImagePixel:"\uf30c",FileBug:"\uf30d",FileCode:"\uf30e",FileComment:"\uf30f",BusinessHoursSign:"\uf310",FileImage:"\uf311",FileSymlink:"\uf312",AutoFillTemplate:"\uf313",WorkItem:"\uf314",WorkItemBug:"\uf315",LogRemove:"\uf316",ColumnOptions:"\uf317",Packages:"\uf318",BuildIssue:"\uf319",AssessmentGroup:"\uf31a",VariableGroup:"\uf31b",FullHistory:"\uf31c",Wheelchair:"\uf31f",SingleColumnEdit:"\uf321",DoubleColumnEdit:"\uf322",TripleColumnEdit:"\uf323",ColumnLeftTwoThirdsEdit:"\uf324",ColumnRightTwoThirdsEdit:"\uf325",StreamLogo:"\uf329",PassiveAuthentication:"\uf32a",AlertSolid:"\uf331",MegaphoneSolid:"\uf332",TaskSolid:"\uf333",ConfigurationSolid:"\uf334",BugSolid:"\uf335",CrownSolid:"\uf336",Trophy2Solid:"\uf337",QuickNoteSolid:"\uf338",ConstructionConeSolid:"\uf339",PageListSolid:"\uf33a",PageListMirroredSolid:"\uf33b",StarburstSolid:"\uf33c",ReadingModeSolid:"\uf33d",SadSolid:"\uf33e",HealthSolid:"\uf33f",ShieldSolid:"\uf340",GiftBoxSolid:"\uf341",ShoppingCartSolid:"\uf342",MailSolid:"\uf343",ChatSolid:"\uf344",RibbonSolid:"\uf345"}};Object(i.t)(n,t)}function v(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-12"',src:"url('"+e+"fabric-icons-12-7e945a1e.woff') format('woff')"},icons:{FinancialSolid:"\uf346",FinancialMirroredSolid:"\uf347",HeadsetSolid:"\uf348",PermissionsSolid:"\uf349",ParkingSolid:"\uf34a",ParkingMirroredSolid:"\uf34b",DiamondSolid:"\uf34c",AsteriskSolid:"\uf34d",OfflineStorageSolid:"\uf34e",BankSolid:"\uf34f",DecisionSolid:"\uf350",Parachute:"\uf351",ParachuteSolid:"\uf352",FiltersSolid:"\uf353",ColorSolid:"\uf354",ReviewSolid:"\uf355",ReviewRequestSolid:"\uf356",ReviewRequestMirroredSolid:"\uf357",ReviewResponseSolid:"\uf358",FeedbackRequestSolid:"\uf359",FeedbackRequestMirroredSolid:"\uf35a",FeedbackResponseSolid:"\uf35b",WorkItemBar:"\uf35c",WorkItemBarSolid:"\uf35d",Separator:"\uf35e",NavigateExternalInline:"\uf35f",PlanView:"\uf360",TimelineMatrixView:"\uf361",EngineeringGroup:"\uf362",ProjectCollection:"\uf363",CaretBottomRightCenter8:"\uf364",CaretBottomLeftCenter8:"\uf365",CaretTopRightCenter8:"\uf366",CaretTopLeftCenter8:"\uf367",DonutChart:"\uf368",ChevronUnfold10:"\uf369",ChevronFold10:"\uf36a",DoubleChevronDown8:"\uf36b",DoubleChevronUp8:"\uf36c",DoubleChevronLeft8:"\uf36d",DoubleChevronRight8:"\uf36e",ChevronDownEnd6:"\uf36f",ChevronUpEnd6:"\uf370",ChevronLeftEnd6:"\uf371",ChevronRightEnd6:"\uf372",ContextMenu:"\uf37c",AzureAPIManagement:"\uf37f",AzureServiceEndpoint:"\uf380",VSTSLogo:"\uf381",VSTSAltLogo1:"\uf382",VSTSAltLogo2:"\uf383",FileTypeSolution:"\uf387",WordLogoInverse16:"\uf390",WordLogo16:"\uf391",WordLogoFill16:"\uf392",PowerPointLogoInverse16:"\uf393",PowerPointLogo16:"\uf394",PowerPointLogoFill16:"\uf395",ExcelLogoInverse16:"\uf396",ExcelLogo16:"\uf397",ExcelLogoFill16:"\uf398",OneNoteLogoInverse16:"\uf399",OneNoteLogo16:"\uf39a",OneNoteLogoFill16:"\uf39b",OutlookLogoInverse16:"\uf39c",OutlookLogo16:"\uf39d",OutlookLogoFill16:"\uf39e",PublisherLogoInverse16:"\uf39f",PublisherLogo16:"\uf3a0",PublisherLogoFill16:"\uf3a1",VisioLogoInverse16:"\uf3a2",VisioLogo16:"\uf3a3",VisioLogoFill16:"\uf3a4",TestBeaker:"\uf3a5",TestBeakerSolid:"\uf3a6",TestExploreSolid:"\uf3a7",TestAutoSolid:"\uf3a8",TestUserSolid:"\uf3a9",TestImpactSolid:"\uf3aa",TestPlan:"\uf3ab",TestStep:"\uf3ac",TestParameter:"\uf3ad",TestSuite:"\uf3ae",TestCase:"\uf3af",Sprint:"\uf3b0",SignOut:"\uf3b1",TriggerApproval:"\uf3b2",Rocket:"\uf3b3",AzureKeyVault:"\uf3b4",Onboarding:"\uf3ba",Transition:"\uf3bc",LikeSolid:"\uf3bf",DislikeSolid:"\uf3c0",CRMCustomerInsightsApp:"\uf3c8",EditCreate:"\uf3c9",PlayReverseResume:"\uf3e4",PlayReverse:"\uf3e5",SearchData:"\uf3f1",UnSetColor:"\uf3f9",DeclineCall:"\uf405"}};Object(i.t)(n,t)}function b(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-13"',src:"url('"+e+"fabric-icons-13-c3989a02.woff') format('woff')"},icons:{RectangularClipping:"\uf407",TeamsLogo16:"\uf40a",TeamsLogoFill16:"\uf40b",Spacer:"\uf40d",SkypeLogo16:"\uf40e",SkypeForBusinessLogo16:"\uf40f",SkypeForBusinessLogoFill16:"\uf410",FilterSolid:"\uf412",MailUndelivered:"\uf415",MailTentative:"\uf416",MailTentativeMirrored:"\uf417",MailReminder:"\uf418",ReceiptUndelivered:"\uf419",ReceiptTentative:"\uf41a",ReceiptTentativeMirrored:"\uf41b",Inbox:"\uf41c",IRMReply:"\uf41d",IRMReplyMirrored:"\uf41e",IRMForward:"\uf41f",IRMForwardMirrored:"\uf420",VoicemailIRM:"\uf421",EventAccepted:"\uf422",EventTentative:"\uf423",EventTentativeMirrored:"\uf424",EventDeclined:"\uf425",IDBadge:"\uf427",BackgroundColor:"\uf42b",OfficeFormsLogoInverse16:"\uf433",OfficeFormsLogo:"\uf434",OfficeFormsLogoFill:"\uf435",OfficeFormsLogo16:"\uf436",OfficeFormsLogoFill16:"\uf437",OfficeFormsLogoInverse24:"\uf43a",OfficeFormsLogo24:"\uf43b",OfficeFormsLogoFill24:"\uf43c",PageLock:"\uf43f",NotExecuted:"\uf440",NotImpactedSolid:"\uf441",FieldReadOnly:"\uf442",FieldRequired:"\uf443",BacklogBoard:"\uf444",ExternalBuild:"\uf445",ExternalTFVC:"\uf446",ExternalXAML:"\uf447",IssueSolid:"\uf448",DefectSolid:"\uf449",LadybugSolid:"\uf44a",NugetLogo:"\uf44c",TFVCLogo:"\uf44d",ProjectLogo32:"\uf47e",ProjectLogoFill32:"\uf47f",ProjectLogo16:"\uf480",ProjectLogoFill16:"\uf481",SwayLogo32:"\uf482",SwayLogoFill32:"\uf483",SwayLogo16:"\uf484",SwayLogoFill16:"\uf485",ClassNotebookLogo32:"\uf486",ClassNotebookLogoFill32:"\uf487",ClassNotebookLogo16:"\uf488",ClassNotebookLogoFill16:"\uf489",ClassNotebookLogoInverse32:"\uf48a",ClassNotebookLogoInverse16:"\uf48b",StaffNotebookLogo32:"\uf48c",StaffNotebookLogoFill32:"\uf48d",StaffNotebookLogo16:"\uf48e",StaffNotebookLogoFill16:"\uf48f",StaffNotebookLogoInverted32:"\uf490",StaffNotebookLogoInverted16:"\uf491",KaizalaLogo:"\uf492",TaskLogo:"\uf493",ProtectionCenterLogo32:"\uf494",GallatinLogo:"\uf496",Globe2:"\uf49a",Guitar:"\uf49b",Breakfast:"\uf49c",Brunch:"\uf49d",BeerMug:"\uf49e",Vacation:"\uf49f",Teeth:"\uf4a0",Taxi:"\uf4a1",Chopsticks:"\uf4a2",SyncOccurence:"\uf4a3",UnsyncOccurence:"\uf4a4",GIF:"\uf4a9",PrimaryCalendar:"\uf4ae",SearchCalendar:"\uf4af",VideoOff:"\uf4b0",MicrosoftFlowLogo:"\uf4b1",BusinessCenterLogo:"\uf4b2",ToDoLogoBottom:"\uf4b3",ToDoLogoTop:"\uf4b4",EditSolid12:"\uf4b5",EditSolidMirrored12:"\uf4b6",UneditableSolid12:"\uf4b7",UneditableSolidMirrored12:"\uf4b8",UneditableMirrored:"\uf4b9",AdminALogo32:"\uf4ba",AdminALogoFill32:"\uf4bb",ToDoLogoInverse:"\uf4bc"}};Object(i.t)(n,t)}function y(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-14"',src:"url('"+e+"fabric-icons-14-5cf58db8.woff') format('woff')"},icons:{Snooze:"\uf4bd",WaffleOffice365:"\uf4e0",ImageSearch:"\uf4e8",NewsSearch:"\uf4e9",VideoSearch:"\uf4ea",R:"\uf4eb",FontColorA:"\uf4ec",FontColorSwatch:"\uf4ed",LightWeight:"\uf4ee",NormalWeight:"\uf4ef",SemiboldWeight:"\uf4f0",GroupObject:"\uf4f1",UngroupObject:"\uf4f2",AlignHorizontalLeft:"\uf4f3",AlignHorizontalCenter:"\uf4f4",AlignHorizontalRight:"\uf4f5",AlignVerticalTop:"\uf4f6",AlignVerticalCenter:"\uf4f7",AlignVerticalBottom:"\uf4f8",HorizontalDistributeCenter:"\uf4f9",VerticalDistributeCenter:"\uf4fa",Ellipse:"\uf4fb",Line:"\uf4fc",Octagon:"\uf4fd",Hexagon:"\uf4fe",Pentagon:"\uf4ff",RightTriangle:"\uf500",HalfCircle:"\uf501",QuarterCircle:"\uf502",ThreeQuarterCircle:"\uf503","6PointStar":"\uf504","12PointStar":"\uf505",ArrangeBringToFront:"\uf506",ArrangeSendToBack:"\uf507",ArrangeSendBackward:"\uf508",ArrangeBringForward:"\uf509",BorderDash:"\uf50a",BorderDot:"\uf50b",LineStyle:"\uf50c",LineThickness:"\uf50d",WindowEdit:"\uf50e",HintText:"\uf50f",MediaAdd:"\uf510",AnchorLock:"\uf511",AutoHeight:"\uf512",ChartSeries:"\uf513",ChartXAngle:"\uf514",ChartYAngle:"\uf515",Combobox:"\uf516",LineSpacing:"\uf517",Padding:"\uf518",PaddingTop:"\uf519",PaddingBottom:"\uf51a",PaddingLeft:"\uf51b",PaddingRight:"\uf51c",NavigationFlipper:"\uf51d",AlignJustify:"\uf51e",TextOverflow:"\uf51f",VisualsFolder:"\uf520",VisualsStore:"\uf521",PictureCenter:"\uf522",PictureFill:"\uf523",PicturePosition:"\uf524",PictureStretch:"\uf525",PictureTile:"\uf526",Slider:"\uf527",SliderHandleSize:"\uf528",DefaultRatio:"\uf529",NumberSequence:"\uf52a",GUID:"\uf52b",ReportAdd:"\uf52c",DashboardAdd:"\uf52d",MapPinSolid:"\uf52e",WebPublish:"\uf52f",PieSingleSolid:"\uf530",BlockedSolid:"\uf531",DrillDown:"\uf532",DrillDownSolid:"\uf533",DrillExpand:"\uf534",DrillShow:"\uf535",SpecialEvent:"\uf536",OneDriveFolder16:"\uf53b",FunctionalManagerDashboard:"\uf542",BIDashboard:"\uf543",CodeEdit:"\uf544",RenewalCurrent:"\uf545",RenewalFuture:"\uf546",SplitObject:"\uf547",BulkUpload:"\uf548",DownloadDocument:"\uf549",GreetingCard:"\uf54b",Flower:"\uf54e",WaitlistConfirm:"\uf550",WaitlistConfirmMirrored:"\uf551",LaptopSecure:"\uf552",DragObject:"\uf553",EntryView:"\uf554",EntryDecline:"\uf555",ContactCardSettings:"\uf556",ContactCardSettingsMirrored:"\uf557"}};Object(i.t)(n,t)}function _(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-15"',src:"url('"+e+"fabric-icons-15-3807251b.woff') format('woff')"},icons:{CalendarSettings:"\uf558",CalendarSettingsMirrored:"\uf559",HardDriveLock:"\uf55a",HardDriveUnlock:"\uf55b",AccountManagement:"\uf55c",ReportWarning:"\uf569",TransitionPop:"\uf5b2",TransitionPush:"\uf5b3",TransitionEffect:"\uf5b4",LookupEntities:"\uf5b5",ExploreData:"\uf5b6",AddBookmark:"\uf5b7",SearchBookmark:"\uf5b8",DrillThrough:"\uf5b9",MasterDatabase:"\uf5ba",CertifiedDatabase:"\uf5bb",MaximumValue:"\uf5bc",MinimumValue:"\uf5bd",VisualStudioIDELogo32:"\uf5d0",PasteAsText:"\uf5d5",PasteAsCode:"\uf5d6",BrowserTab:"\uf5d7",BrowserTabScreenshot:"\uf5d8",DesktopScreenshot:"\uf5d9",FileYML:"\uf5da",ClipboardSolid:"\uf5dc",FabricUserFolder:"\uf5e5",FabricNetworkFolder:"\uf5e6",BullseyeTarget:"\uf5f0",AnalyticsView:"\uf5f1",Video360Generic:"\uf609",Untag:"\uf60b",Leave:"\uf627",Trending12:"\uf62d",Blocked12:"\uf62e",Warning12:"\uf62f",CheckedOutByOther12:"\uf630",CheckedOutByYou12:"\uf631",CircleShapeSolid:"\uf63c",SquareShapeSolid:"\uf63d",TriangleShapeSolid:"\uf63e",DropShapeSolid:"\uf63f",RectangleShapeSolid:"\uf640",ZoomToFit:"\uf649",InsertColumnsLeft:"\uf64a",InsertColumnsRight:"\uf64b",InsertRowsAbove:"\uf64c",InsertRowsBelow:"\uf64d",DeleteColumns:"\uf64e",DeleteRows:"\uf64f",DeleteRowsMirrored:"\uf650",DeleteTable:"\uf651",AccountBrowser:"\uf652",VersionControlPush:"\uf664",StackedColumnChart2:"\uf666",TripleColumnWide:"\uf66e",QuadColumn:"\uf66f",WhiteBoardApp16:"\uf673",WhiteBoardApp32:"\uf674",PinnedSolid:"\uf676",InsertSignatureLine:"\uf677",ArrangeByFrom:"\uf678",Phishing:"\uf679",CreateMailRule:"\uf67a",PublishCourse:"\uf699",DictionaryRemove:"\uf69a",UserRemove:"\uf69b",UserEvent:"\uf69c",Encryption:"\uf69d",PasswordField:"\uf6aa",OpenInNewTab:"\uf6ab",Hide3:"\uf6ac",VerifiedBrandSolid:"\uf6ad",MarkAsProtected:"\uf6ae",AuthenticatorApp:"\uf6b1",WebTemplate:"\uf6b2",DefenderTVM:"\uf6b3",MedalSolid:"\uf6b9",D365TalentLearn:"\uf6bb",D365TalentInsight:"\uf6bc",D365TalentHRCore:"\uf6bd",BacklogList:"\uf6bf",ButtonControl:"\uf6c0",TableGroup:"\uf6d9",MountainClimbing:"\uf6db",TagUnknown:"\uf6df",TagUnknownMirror:"\uf6e0",TagUnknown12:"\uf6e1",TagUnknown12Mirror:"\uf6e2",Link12:"\uf6e3",Presentation:"\uf6e4",Presentation12:"\uf6e5",Lock12:"\uf6e6",BuildDefinition:"\uf6e9",ReleaseDefinition:"\uf6ea",SaveTemplate:"\uf6ec",UserGauge:"\uf6ed",BlockedSiteSolid12:"\uf70a",TagSolid:"\uf70e",OfficeChat:"\uf70f"}};Object(i.t)(n,t)}function w(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-16"',src:"url('"+e+"fabric-icons-16-9cf93f3b.woff') format('woff')"},icons:{OfficeChatSolid:"\uf710",MailSchedule:"\uf72e",WarningSolid:"\uf736",Blocked2Solid:"\uf737",SkypeCircleArrow:"\uf747",SkypeArrow:"\uf748",SyncStatus:"\uf751",SyncStatusSolid:"\uf752",ProjectDocument:"\uf759",ToDoLogoOutline:"\uf75b",VisioOnlineLogoFill32:"\uf75f",VisioOnlineLogo32:"\uf760",VisioOnlineLogoCloud32:"\uf761",VisioDiagramSync:"\uf762",Event12:"\uf763",EventDateMissed12:"\uf764",UserOptional:"\uf767",ResponsesMenu:"\uf768",DoubleDownArrow:"\uf769",DistributeDown:"\uf76a",BookmarkReport:"\uf76b",FilterSettings:"\uf76c",GripperDotsVertical:"\uf772",MailAttached:"\uf774",AddIn:"\uf775",LinkedDatabase:"\uf779",TableLink:"\uf77a",PromotedDatabase:"\uf77d",BarChartVerticalFilter:"\uf77e",BarChartVerticalFilterSolid:"\uf77f",MicOff2:"\uf781",MicrosoftTranslatorLogo:"\uf782",ShowTimeAs:"\uf787",FileRequest:"\uf789",WorkItemAlert:"\uf78f",PowerBILogo16:"\uf790",PowerBILogoBackplate16:"\uf791",BulletedListText:"\uf792",BulletedListBullet:"\uf793",BulletedListTextMirrored:"\uf794",BulletedListBulletMirrored:"\uf795",NumberedListText:"\uf796",NumberedListNumber:"\uf797",NumberedListTextMirrored:"\uf798",NumberedListNumberMirrored:"\uf799",RemoveLinkChain:"\uf79a",RemoveLinkX:"\uf79b",FabricTextHighlight:"\uf79c",ClearFormattingA:"\uf79d",ClearFormattingEraser:"\uf79e",Photo2Fill:"\uf79f",IncreaseIndentText:"\uf7a0",IncreaseIndentArrow:"\uf7a1",DecreaseIndentText:"\uf7a2",DecreaseIndentArrow:"\uf7a3",IncreaseIndentTextMirrored:"\uf7a4",IncreaseIndentArrowMirrored:"\uf7a5",DecreaseIndentTextMirrored:"\uf7a6",DecreaseIndentArrowMirrored:"\uf7a7",CheckListText:"\uf7a8",CheckListCheck:"\uf7a9",CheckListTextMirrored:"\uf7aa",CheckListCheckMirrored:"\uf7ab",NumberSymbol:"\uf7ac",Coupon:"\uf7bc",VerifiedBrand:"\uf7bd",ReleaseGate:"\uf7be",ReleaseGateCheck:"\uf7bf",ReleaseGateError:"\uf7c0",M365InvoicingLogo:"\uf7c1",RemoveFromShoppingList:"\uf7d5",ShieldAlert:"\uf7d7",FabricTextHighlightComposite:"\uf7da",Dataflows:"\uf7dd",GenericScanFilled:"\uf7de",DiagnosticDataBarTooltip:"\uf7df",SaveToMobile:"\uf7e0",Orientation2:"\uf7e1",ScreenCast:"\uf7e2",ShowGrid:"\uf7e3",SnapToGrid:"\uf7e4",ContactList:"\uf7e5",NewMail:"\uf7ea",EyeShadow:"\uf7eb",FabricFolderConfirm:"\uf7ff",InformationBarriers:"\uf803",CommentActive:"\uf804",ColumnVerticalSectionEdit:"\uf806",WavingHand:"\uf807",ShakeDevice:"\uf80a",SmartGlassRemote:"\uf80b",Rotate90Clockwise:"\uf80d",Rotate90CounterClockwise:"\uf80e",CampaignTemplate:"\uf811",ChartTemplate:"\uf812",PageListFilter:"\uf813",SecondaryNav:"\uf814",ColumnVerticalSection:"\uf81e",SkypeCircleSlash:"\uf825",SkypeSlash:"\uf826"}};Object(i.t)(n,t)}function S(e,t){void 0===e&&(e="");var n={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-17"',src:"url('"+e+"fabric-icons-17-0c4ed701.woff') format('woff')"},icons:{CustomizeToolbar:"\uf828",DuplicateRow:"\uf82a",RemoveFromTrash:"\uf82b",MailOptions:"\uf82c",Childof:"\uf82d",Footer:"\uf82e",Header:"\uf82f",BarChartVerticalFill:"\uf830",StackedColumnChart2Fill:"\uf831",PlainText:"\uf834",AccessibiltyChecker:"\uf835",DatabaseSync:"\uf842",ReservationOrders:"\uf845",TabOneColumn:"\uf849",TabTwoColumn:"\uf84a",TabThreeColumn:"\uf84b",BulletedTreeList:"\uf84c",MicrosoftTranslatorLogoGreen:"\uf852",MicrosoftTranslatorLogoBlue:"\uf853",InternalInvestigation:"\uf854",AddReaction:"\uf85d",ContactHeart:"\uf862",VisuallyImpaired:"\uf866",EventToDoLogo:"\uf869",Variable2:"\uf86d",ModelingView:"\uf871",DisconnectVirtualMachine:"\uf873",ReportLock:"\uf875",Uneditable2:"\uf876",Uneditable2Mirrored:"\uf877",BarChartVerticalEdit:"\uf89d",GlobalNavButtonActive:"\uf89f",PollResults:"\uf8a0",Rerun:"\uf8a1",QandA:"\uf8a2",QandAMirror:"\uf8a3",BookAnswers:"\uf8a4",AlertSettings:"\uf8b6",TrimStart:"\uf8bb",TrimEnd:"\uf8bc",TableComputed:"\uf8f5",DecreaseIndentLegacy:"\ue290",IncreaseIndentLegacy:"\ue291",SizeLegacy:"\ue2b2"}};Object(i.t)(n,t)}var E=function(){Object(i.s)("trash","delete"),Object(i.s)("onedrive","onedrivelogo"),Object(i.s)("alertsolid12","eventdatemissed12"),Object(i.s)("sixpointstar","6pointstar"),Object(i.s)("twelvepointstar","12pointstar"),Object(i.s)("toggleon","toggleleft"),Object(i.s)("toggleoff","toggleright")},C=n(39);Object(C.a)("@uifabric/icons","7.3.0"),n.d(t,"a",(function(){return T}));function T(e,t){void 0===e&&(e="https://spoprod-a.akamaihd.net/files/fabric/assets/icons/"),[r,o,s,a,l,c,u,d,h,f,p,g,m,v,b,y,_,w,S].forEach((function(n){return n(e,t)})),E()}},function(e,t,n){"use strict";var i=n(116),r=n(1),o=n(0),s=n(19),a=n(117),l=n(27),c=n(60),u=n(40),d=n(12),h=n(17),f=n(43);var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onCustomizationChange=function(){return t.forceUpdate()},t}return r.c(t,e),t.prototype.componentDidMount=function(){d.a.observe(this._onCustomizationChange)},t.prototype.componentWillUnmount=function(){d.a.unobserve(this._onCustomizationChange)},t.prototype.render=function(){var e=this,t=this.props.contextTransform;return o.createElement(h.a.Consumer,null,(function(n){var i=function(e,t){var n=(t||{}).customizations,i=void 0===n?{settings:{},scopedSettings:{}}:n;return{customizations:{settings:Object(f.b)(i.settings,e.settings),scopedSettings:Object(f.a)(i.scopedSettings,e.scopedSettings),inCustomizerContext:!0}}}(e.props,n);return t&&(i=t(i)),o.createElement(h.a.Provider,{value:i},e.props.children)}))},t}(o.Component),g=n(6),m=n(46),v=n(11),b=n(3),y={fontFamily:"inherit"},_={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},w=function(e){var t=e.theme,n=e.className,i=e.isFocusVisible,r=e.applyTheme,o=i?"Visible":"Hidden";return{root:[Object(b.l)(_,t).root,"is-focus"+o+" ms-Fabric--isFocus"+o,t.fonts.medium,{direction:t.rtl?"rtl":void 0,color:t.palette.neutralPrimary,selectors:{"& button":y,"& input":y,"& textarea":y}},r&&{color:t.semanticColors.bodyText,backgroundColor:t.semanticColors.bodyBackground},n],bodyThemed:[{backgroundColor:t.semanticColors.bodyBackground}]}},S=Object(a.a)(),E=Object(l.b)((function(e,t){return r.a({},e,{rtl:t})})),C=function(e){function t(t){var n=e.call(this,t)||this;return n._rootElement=o.createRef(),n._disposables=[],n._removeClassNameFromBody=void 0,n._onMouseDown=function(e){n.setState({isFocusVisible:!1})},n._onKeyDown=function(e){Object(c.a)(e.which)&&n.setState({isFocusVisible:!0})},n.state={isFocusVisible:!1},n}return r.c(t,e),t.prototype.render=function(){var e=this.props,t=e.as,n=void 0===t?"div":t,i=e.theme,s=e.dir,a=this._getClassNames(),l=Object(u.d)(this.props,u.c),c="rtl"===s,d=o.createElement(n,r.a({},l,{className:a.root,ref:this._rootElement}));return void 0===s||!i||void 0!==i.rtl&&i.rtl===c||(d=o.createElement(p,{settings:{theme:E(i,c)}},d)),d},t.prototype.componentDidMount=function(){var e=Object(g.a)(this._rootElement.current);e&&this._disposables.push(Object(m.a)(e,"mousedown",this._onMouseDown,!0),Object(m.a)(e,"keydown",this._onKeyDown,!0)),this._addClassNameToBody()},t.prototype.componentWillUnmount=function(){this._disposables.forEach((function(e){return e()})),this._removeClassNameFromBody&&this._removeClassNameFromBody()},t.prototype._getClassNames=function(){var e=this.props,t=e.className,n=e.theme,i=e.applyTheme;return S(w,{theme:n,applyTheme:i,className:t,isFocusVisible:this.state.isFocusVisible})},t.prototype._addClassNameToBody=function(){if(this.props.applyThemeToBody){var e=this._getClassNames(),t=Object(v.a)(this._rootElement.current);t&&(t.body.classList.add(e.bodyThemed),this._removeClassNameFromBody=function(){t.body.classList.remove(e.bodyThemed)})}},t}(o.Component),T=Object(i.a)(C,w,void 0,{scope:"Fabric"}),x=n(44);var k,M=n(120),R={};var I,L=Object(a.a)(),A=function(e){function t(t){var n=e.call(this,t)||this;return n._rootRef=o.createRef(),n._createLayerElement=function(){var e=n.props.hostId,t=Object(v.a)(n._rootRef.current),i=n._getHost();if(t&&i){n._removeLayerElement();var r=t.createElement("div"),o=n._getClassNames();r.className=o.root,Object(x.b)(r),function(e,t){var n=e,i=t;n._virtual||(n._virtual={children:[]});var r=n._virtual.parent;if(r&&r!==t){var o=r._virtual.children.indexOf(n);o>-1&&r._virtual.children.splice(o,1)}n._virtual.parent=i||void 0,i&&(i._virtual||(i._virtual={children:[]}),i._virtual.children.push(n))}(r,n._rootRef.current),n.props.insertFirst?i.insertBefore(r,i.firstChild):i.appendChild(r),n.setState({hostId:e,layerElement:r},(function(){var e=n.props,t=e.onLayerDidMount,i=e.onLayerMounted;i&&i(),t&&t()}))}},n.state={},n}return r.c(t,e),t.prototype.componentDidMount=function(){var e=this.props.hostId;this._createLayerElement(),e&&function(e,t){R[e]||(R[e]=[]),R[e].push(t)}(e,this._createLayerElement)},t.prototype.render=function(){var e=this.state.layerElement,t=this._getClassNames(),n=this.props.eventBubblingEnabled;return o.createElement("span",{className:"ms-layer",ref:this._rootRef},e&&s.createPortal(o.createElement(T,r.a({},!n&&function(){I||(I={},["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","onTouchMove","onTouchStart","onTouchCancel","onTouchEnd","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit"].forEach((function(e){return I[e]=O})));return I}(),{className:t.content}),this.props.children),e))},t.prototype.componentDidUpdate=function(){this.props.hostId!==this.state.hostId&&this._createLayerElement()},t.prototype.componentWillUnmount=function(){var e=this.props.hostId;this._removeLayerElement(),e&&function(e,t){if(R[e]){var n=R[e].indexOf(t);n>=0&&(R[e].splice(n,1),0===R[e].length&&delete R[e])}}(e,this._createLayerElement)},t.prototype._removeLayerElement=function(){var e=this.props.onLayerWillUnmount,t=this.state.layerElement;if(e&&e(),t&&t.parentNode){var n=t.parentNode;n&&n.removeChild(t)}},t.prototype._getClassNames=function(){var e=this.props,t=e.className,n=e.styles,i=e.theme;return L(n,{theme:i,className:t,isNotHost:!this.props.hostId})},t.prototype._getHost=function(){var e=this.props.hostId,t=Object(v.a)(this._rootRef.current);if(t){if(e)return t.getElementById(e);var n=k;return n?t.querySelector(n):t.body}},t.defaultProps={onLayerDidMount:function(){},onLayerWillUnmount:function(){}},t=r.b([Object(M.a)("Layer",["theme","hostId"])],t)}(o.Component),O=function(e){e.eventPhase===Event.BUBBLING_PHASE&&"mouseenter"!==e.type&&"mouseleave"!==e.type&&"touchstart"!==e.type&&"touchend"!==e.type&&e.stopPropagation()};var $={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"};n.d(t,"a",(function(){return D}));var D=Object(i.a)(A,(function(e){var t=e.className,n=e.isNotHost,i=e.theme,r=Object(b.l)($,i);return{root:[r.root,i.fonts.medium,n&&[r.rootNoHost,{position:"fixed",zIndex:b.h.Layer,top:0,left:0,bottom:0,right:0,visibility:"hidden"}],t],content:[r.content,{visibility:"visible"}]}}),void 0,{scope:"Layer",fields:["hostId","theme","styles"]})},function(e,t,n){"use strict";var i=n(116),r=n(1),o=n(0),s=n(117),a=n(118),l=n(8),c=n(58),u=n(33),d=n(125),h=n(96),f=n(126),p=n(40),g=n(46),m=n(11),v=function(e){function t(n){var i=e.call(this,n)||this;return i._root=o.createRef(),i._firstBumper=o.createRef(),i._lastBumper=o.createRef(),i._hasFocus=!1,i._onRootFocus=function(e){i.props.onFocus&&i.props.onFocus(e),i._hasFocus=!0},i._onRootBlur=function(e){i.props.onBlur&&i.props.onBlur(e);var t=e.relatedTarget;null===e.relatedTarget&&(t=i._getDocument().activeElement),Object(c.a)(i._root.current,t)||(i._hasFocus=!1)},i._onFirstBumperFocus=function(){i._onBumperFocus(!0)},i._onLastBumperFocus=function(){i._onBumperFocus(!1)},i._onBumperFocus=function(e){if(!i.props.disabled){var t=e===i._hasFocus?i._lastBumper.current:i._firstBumper.current;if(i._root.current){var n=e===i._hasFocus?Object(h.i)(i._root.current,t,!0,!1):Object(h.f)(i._root.current,t,!0,!1);n&&(i._isBumper(n)?i.focus():n.focus())}}},i._onFocusCapture=function(e){i.props.onFocusCapture&&i.props.onFocusCapture(e),e.target===e.currentTarget||i._isBumper(e.target)||(i._previouslyFocusedElementInTrapZone=e.target)},i._forceFocusInTrap=function(e){if(!i.props.disabled&&t._focusStack.length&&i===t._focusStack[t._focusStack.length-1]){var n=i._getDocument().activeElement;Object(c.a)(i._root.current,n)||(i.focus(),i._hasFocus=!0,e.preventDefault(),e.stopPropagation())}},i._forceClickInTrap=function(e){if(!i.props.disabled&&t._focusStack.length&&i===t._focusStack[t._focusStack.length-1]){var n=e.target;n&&!Object(c.a)(i._root.current,n)&&(i.focus(),i._hasFocus=!0,e.preventDefault(),e.stopPropagation())}},Object(f.a)(i),i}return r.c(t,e),t.prototype.componentDidMount=function(){this._bringFocusIntoZone(),this._updateEventHandlers(this.props)},t.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=e.elementToFocusOnDismiss;t&&this._previouslyFocusedElementOutsideTrapZone!==t&&(this._previouslyFocusedElementOutsideTrapZone=t),this._updateEventHandlers(e)},t.prototype.componentDidUpdate=function(e){var t=void 0===e.forceFocusInsideTrap||e.forceFocusInsideTrap,n=void 0===this.props.forceFocusInsideTrap||this.props.forceFocusInsideTrap,i=void 0!==e.disabled&&e.disabled,r=void 0!==this.props.disabled&&this.props.disabled;!t&&n||i&&!r?this._bringFocusIntoZone():(t&&!n||!i&&r)&&this._returnFocusToInitiator()},t.prototype.componentWillUnmount=function(){this.props.disabled&&!this.props.forceFocusInsideTrap&&Object(c.a)(this._root.current,this._getDocument().activeElement)||this._returnFocusToInitiator(),this._disposeClickHandler&&(this._disposeClickHandler(),this._disposeClickHandler=void 0),this._disposeFocusHandler&&(this._disposeFocusHandler(),this._disposeFocusHandler=void 0),delete this._previouslyFocusedElementInTrapZone,delete this._previouslyFocusedElementOutsideTrapZone},t.prototype.render=function(){var e=this.props,t=e.className,n=e.disabled,i=void 0!==n&&n,s=e.ariaLabelledBy,a=Object(p.d)(this.props,p.c),l={style:{pointerEvents:"none",position:"fixed"},tabIndex:i?-1:0,"data-is-visible":!0};return o.createElement("div",r.a({},a,{className:t,ref:this._root,"aria-labelledby":s,onFocusCapture:this._onFocusCapture,onFocus:this._onRootFocus,onBlur:this._onRootBlur}),o.createElement("div",r.a({},l,{ref:this._firstBumper,onFocus:this._onFirstBumperFocus})),this.props.children,o.createElement("div",r.a({},l,{ref:this._lastBumper,onFocus:this._onLastBumperFocus})))},t.prototype.focus=function(){var e=this.props,t=e.focusPreviouslyFocusedInnerElement,n=e.firstFocusableSelector;if(t&&this._previouslyFocusedElementInTrapZone&&Object(c.a)(this._root.current,this._previouslyFocusedElementInTrapZone))this._focusAsync(this._previouslyFocusedElementInTrapZone);else{var i="string"===typeof n?n:n&&n(),r=null;this._root.current&&(i&&(r=this._root.current.querySelector("."+i)),r||(r=Object(h.j)(this._root.current,this._root.current.firstChild,!1,!1,!1,!0))),r&&this._focusAsync(r)}},t.prototype._focusAsync=function(e){this._isBumper(e)||Object(h.b)(e)},t.prototype._bringFocusIntoZone=function(){var e=this.props,n=e.elementToFocusOnDismiss,i=e.disabled,r=void 0!==i&&i,o=e.disableFirstFocus,s=void 0!==o&&o;r||(t._focusStack.push(this),this._previouslyFocusedElementOutsideTrapZone=n||this._getDocument().activeElement,s||Object(c.a)(this._root.current,this._previouslyFocusedElementOutsideTrapZone)||this.focus())},t.prototype._returnFocusToInitiator=function(){var e=this,n=this.props.ignoreExternalFocusing;t._focusStack=t._focusStack.filter((function(t){return e!==t}));var i=this._getDocument(),r=i.activeElement;n||!this._previouslyFocusedElementOutsideTrapZone||"function"!==typeof this._previouslyFocusedElementOutsideTrapZone.focus||!Object(c.a)(this._root.current,r)&&r!==i.body||this._focusAsync(this._previouslyFocusedElementOutsideTrapZone)},t.prototype._updateEventHandlers=function(e){var t=e.isClickableOutsideFocusTrap,n=void 0!==t&&t,i=e.forceFocusInsideTrap,r=void 0===i||i;r&&!this._disposeFocusHandler?this._disposeFocusHandler=Object(g.a)(window,"focus",this._forceFocusInTrap,!0):!r&&this._disposeFocusHandler&&(this._disposeFocusHandler(),this._disposeFocusHandler=void 0),n||this._disposeClickHandler?n&&this._disposeClickHandler&&(this._disposeClickHandler(),this._disposeClickHandler=void 0):this._disposeClickHandler=Object(g.a)(window,"click",this._forceClickInTrap,!0)},t.prototype._isBumper=function(e){return e===this._firstBumper.current||e===this._lastBumper.current},t.prototype._getDocument=function(){return Object(m.a)(this._root.current)},t._focusStack=[],t}(o.Component),b=n(3),y=b.b.durationValue2,_={root:"ms-Modal",main:"ms-Dialog-main",scrollableContent:"ms-Modal-scrollableContent",isOpen:"is-open",layer:"ms-Modal-Layer"},w=Object(s.a)(),S=function(e){function t(t){var n=e.call(this,t)||this,i=n.props.allowTouchBodyScroll,r=void 0!==i&&i;return n._allowTouchBodyScroll=r,n}return r.c(t,e),t.prototype.componentDidMount=function(){!this._allowTouchBodyScroll&&Object(a.c)()},t.prototype.componentWillUnmount=function(){!this._allowTouchBodyScroll&&Object(a.d)()},t.prototype.render=function(){var e=this.props,t=e.isDarkThemed,n=e.className,i=e.theme,s=e.styles,a=Object(p.d)(this.props,p.c),l=w(s,{theme:i,className:n,isDark:t});return o.createElement("div",r.a({},a,{className:l.root}))},t}(d.a),E={root:"ms-Overlay",rootDark:"ms-Overlay--dark"},C=Object(i.a)(S,(function(e){var t,n=e.className,i=e.theme,r=e.isNone,o=e.isDark,s=i.palette,a=Object(b.l)(E,i);return{root:[a.root,i.fonts.medium,{backgroundColor:s.whiteTranslucent40,top:0,right:0,bottom:0,left:0,position:"absolute",selectors:(t={},t[b.e]={border:"1px solid WindowText",opacity:0},t)},r&&{visibility:"hidden"},o&&[a.rootDark,{backgroundColor:s.blackTranslucent40}],n]}}),void 0,{scope:"Overlay"}),T=n(123),x=n(119),k=n(26),M=n(5),R=n(127),I=n(27),L=Object(I.b)((function(e,t){return{root:Object(b.r)(e,t&&{touchAction:"none",selectors:{"& *":{userSelect:"none"}}})}})),A={start:"touchstart",move:"touchmove",stop:"touchend"},O={start:"mousedown",move:"mousemove",stop:"mouseup"},$=function(e){function t(t){var n=e.call(this,t)||this;return n._currentEventType=O,n._events=[],n._onMouseDown=function(e){var t=o.Children.only(n.props.children).props.onMouseDown;return t&&t(e),n._currentEventType=O,n._onDragStart(e)},n._onMouseUp=function(e){var t=o.Children.only(n.props.children).props.onMouseUp;return t&&t(e),n._currentEventType=O,n._onDragStop(e)},n._onTouchStart=function(e){var t=o.Children.only(n.props.children).props.onTouchStart;return t&&t(e),n._currentEventType=A,n._onDragStart(e)},n._onTouchEnd=function(e){var t=o.Children.only(n.props.children).props.onTouchEnd;t&&t(e),n._currentEventType=A,n._onDragStop(e)},n._onDragStart=function(e){if("number"===typeof e.button&&0!==e.button)return!1;if(!(n.props.handleSelector&&!n._matchesSelector(e.target,n.props.handleSelector)||n.props.preventDragSelector&&n._matchesSelector(e.target,n.props.preventDragSelector))){n._touchId=n._getTouchId(e);var t=n._getControlPosition(e);if(void 0!==t){var i=n._createDragDataFromPosition(t);n.props.onStart&&n.props.onStart(e,i),n.setState({isDragging:!0,lastPosition:t}),n._events=[Object(g.a)(document.body,n._currentEventType.move,n._onDrag),Object(g.a)(document.body,n._currentEventType.stop,n._onDragStop)]}}},n._onDrag=function(e){"touchmove"===e.type&&e.preventDefault();var t=n._getControlPosition(e);if(t){var i=n._createUpdatedDragData(n._createDragDataFromPosition(t)),r=i.position;n.props.onDragChange&&n.props.onDragChange(e,i),n.setState({position:r,lastPosition:t})}},n._onDragStop=function(e){if(n.state.isDragging){var t=n._getControlPosition(e);if(t){var i=n._createDragDataFromPosition(t);n.setState({isDragging:!1,lastPosition:void 0}),n.props.onStop&&n.props.onStop(e,i),n.props.position&&n.setState({position:n.props.position}),n._events.forEach((function(e){return e()}))}}},n.state={isDragging:!1,position:n.props.position||{x:0,y:0},lastPosition:void 0},n}return r.c(t,e),t.prototype.componentDidUpdate=function(e){!this.props.position||e.position&&this.props.position===e.position||this.setState({position:this.props.position})},t.prototype.componentWillUnmount=function(){this._events.forEach((function(e){return e()}))},t.prototype.render=function(){var e=o.Children.only(this.props.children),t=e.props,n=this.props.position,i=this.state,s=i.position,a=i.isDragging,l=s.x,c=s.y;return n&&!a&&(l=n.x,c=n.y),o.cloneElement(e,{style:r.a({},t.style,{transform:"translate("+l+"px, "+c+"px)"}),className:L(t.className,this.state.isDragging).root,onMouseDown:this._onMouseDown,onMouseUp:this._onMouseUp,onTouchStart:this._onTouchStart,onTouchEnd:this._onTouchEnd})},t.prototype._getControlPosition=function(e){var t=this._getActiveTouch(e);if(void 0===this._touchId||t){var n=t||e;return{x:n.clientX,y:n.clientY}}},t.prototype._getActiveTouch=function(e){return e.targetTouches&&this._findTouchInTouchList(e.targetTouches)||e.changedTouches&&this._findTouchInTouchList(e.changedTouches)},t.prototype._getTouchId=function(e){var t=e.targetTouches&&e.targetTouches[0]||e.changedTouches&&e.changedTouches[0];if(t)return t.identifier},t.prototype._matchesSelector=function(e,t){if(!e||e===document.body)return!1;var n=e.matches||e.webkitMatchesSelector||e.msMatchesSelector;return!!n&&(n.call(e,t)||this._matchesSelector(e.parentElement,t))},t.prototype._findTouchInTouchList=function(e){if(void 0!==this._touchId)for(var t=0;t0&&(n=t[0].getBoundingClientRect(),this.setState({modalRectangleTop:n.top}))}}else this.setState({isOpen:!0}),e.dragOptions&&this._registerForKeyUp();!e.isOpen&&this.state.isOpen&&(this._onModalCloseTimer=this._async.setTimeout(this._onModalClose,1e3*parseFloat(y)),this.setState({isVisible:!1}))},t.prototype.componentDidMount=function(){this.state.isOpen&&this.state.isVisible&&this._registerForKeyUp()},t.prototype.componentDidUpdate=function(e,t){e.isOpen||t.isVisible||this.setState({isVisible:!0})},t.prototype.render=function(){var e=this.props,t=e.className,n=e.containerClassName,i=e.scrollableContentClassName,s=e.elementToFocusOnDismiss,a=e.firstFocusableSelector,l=e.forceFocusInsideTrap,c=e.ignoreExternalFocusing,u=e.isBlocking,d=e.isClickableOutsideFocusTrap,h=e.isDarkOverlay,f=e.onDismiss,p=e.layerProps,g=e.overlay,m=e.responsiveMode,b=e.titleAriaId,y=e.styles,_=e.subtitleAriaId,w=e.theme,S=e.topOffsetFixed,E=e.onLayerDidMount,I=e.isModeless,L=e.dragOptions,A=this.state,O=A.isOpen,F=A.isVisible,N=A.hasBeenOpened,B=A.modalRectangleTop,H=A.x,W=A.y,j=A.isInKeyboardMoveMode;if(!O)return null;var U=void 0===p?"":p.className,z=P(y,{theme:w,className:t,containerClassName:n,scrollableContentClassName:i,isOpen:O,isVisible:F,hasBeenOpened:N,modalRectangleTop:B,topOffsetFixed:S,isModeless:I,layerClassName:U,isDefaultDragHandle:L&&!L.dragHandleSelector}),V=r.a({},D,this.props.layerProps,{onLayerDidMount:p&&p.onLayerDidMount?p.onLayerDidMount:E,insertFirst:I,className:z.layer}),G=o.createElement(v,{componentRef:this._focusTrapZone,className:z.main,elementToFocusOnDismiss:s,isClickableOutsideFocusTrap:I||d||!u,ignoreExternalFocusing:c,forceFocusInsideTrap:I?!I:l,firstFocusableSelector:a,focusPreviouslyFocusedInnerElement:!0,onBlur:j?this._onExitKeyboardMoveMode:void 0},L&&j&&o.createElement("div",{className:z.keyboardMoveIconContainer},L.keyboardMoveIconProps?o.createElement(R.a,r.a({},L.keyboardMoveIconProps)):o.createElement(R.a,{iconName:"move",className:z.keyboardMoveIcon})),o.createElement("div",{ref:this._allowScrollOnModal,className:z.scrollableContent,"data-is-scrollable":!0},L&&this.state.isModalMenuOpen&&o.createElement(L.menu,{items:[{key:"move",text:L.moveMenuItemText,onClick:this._onEnterKeyboardMoveMode},{key:"close",text:L.closeMenuItemText,onClick:this._onModalClose}],onDismiss:this._onModalContextMenuClose,alignTargetEdge:!0,coverTarget:!0,directionalHint:M.a.topLeftEdge,directionalHintFixed:!0,shouldFocusOnMount:!0,target:this._scrollableContent}),this.props.children));return m>=k.a.small?o.createElement(T.a,r.a({},V),o.createElement(x.a,{role:I||!u?"dialog":"alertdialog","aria-modal":!I,ariaLabelledBy:b,ariaDescribedBy:_,onDismiss:f,shouldRestoreFocus:!c},o.createElement("div",{className:z.root},!I&&o.createElement(C,r.a({isDarkThemed:h,onClick:u?void 0:f,allowTouchBodyScroll:this._allowTouchBodyScroll},g)),L?o.createElement($,{handleSelector:L.dragHandleSelector||"."+z.main.split(" ")[0],preventDragSelector:"button",onStart:this._onDragStart,onDragChange:this._onDrag,onStop:this._onDragStop,position:{x:H,y:W}},G):G))):null},t.prototype.focus=function(){this._focusTrapZone.current&&this._focusTrapZone.current.focus()},t.prototype._getMoveDelta=function(e){var t=10;return e.shiftKey?e.ctrlKey||(t=50):e.ctrlKey&&(t=1),t},t.defaultProps={isOpen:!1,isDarkOverlay:!0,isBlocking:!1,className:"",containerClassName:""},t=r.b([k.b],t)}(d.a);n.d(t,"a",(function(){return N}));var N=Object(i.a)(F,(function(e){var t,n=e.className,i=e.containerClassName,r=e.scrollableContentClassName,o=e.isOpen,s=e.isVisible,a=e.hasBeenOpened,l=e.modalRectangleTop,c=e.theme,u=e.topOffsetFixed,d=e.isModeless,h=e.layerClassName,f=e.isDefaultDragHandle,p=c.palette,g=c.effects,m=c.fonts,v=Object(b.l)(_,c);return{root:[v.root,m.medium,{backgroundColor:"transparent",position:d?"absolute":"fixed",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",opacity:0,pointerEvents:"none",transition:"opacity "+y},u&&a&&{alignItems:"flex-start"},o&&v.isOpen,s&&{opacity:1,pointerEvents:"auto"},n],main:[v.main,{boxShadow:g.elevation64,borderRadius:g.roundedCorner2,backgroundColor:p.white,boxSizing:"border-box",position:"relative",textAlign:"left",outline:"3px solid transparent",maxHeight:"calc(100% - 32px)",maxWidth:"calc(100% - 32px)",minHeight:"176px",minWidth:"288px",overflowY:"auto",zIndex:d?b.h.Layer:void 0},u&&a&&{top:l},f&&{cursor:"move"},i],scrollableContent:[v.scrollableContent,{overflowY:"auto",flexGrow:1,maxHeight:"100vh",selectors:(t={},t["@supports (-webkit-overflow-scrolling: touch)"]={maxHeight:window.innerHeight},t)},r],layer:d&&[h,v.layer,{position:"static",width:"unset",height:"unset"}],keyboardMoveIconContainer:{position:"absolute",display:"flex",justifyContent:"center",width:"100%",padding:"3px 0px"},keyboardMoveIcon:{fontSize:m.xLargePlus.fontSize,width:"24px"}}}),void 0,{scope:"Modal"})},function(e,t,n){"use strict";var i=n(1),r=n(0),o=n(45),s=n(59);n(32);var a=n(6),l=n(60),c=n(28);function u(e){Object(c.b)(!1,e.target)}function d(e){Object(l.a)(e.which)&&Object(c.b)(!0,e.target)}n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var h=function(e){function t(n,i){var r=e.call(this,n,i)||this;return function(e){var t=e||Object(a.a)();t&&!t.__hasInitializeFocusRects__&&(t.__hasInitializeFocusRects__=!0,t.addEventListener("mousedown",u,!0),t.addEventListener("keydown",d,!0))}(),function(e){var t=e||Object(a.a)();if(t&&!t.__hasInitializedDir__){t.__hasInitializedDir__=!0;var n=t.document.documentElement;n.hasAttribute("dir")||n.setAttribute("dir","ltr")}}(),function(e,t,n){for(var i=0,r=n.length;i1?e[1]:""}return this.__className},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_disposables",{get:function(){return this.__disposables||(this.__disposables=[]),this.__disposables},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_async",{get:function(){return this.__async||(this.__async=new o.a(this),this._disposables.push(this.__async)),this.__async},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_events",{get:function(){return this.__events||(this.__events=new s.a(this),this._disposables.push(this.__events)),this.__events},enumerable:!0,configurable:!0}),t.prototype._resolveRef=function(e){var t=this;return this.__resolves||(this.__resolves={}),this.__resolves[e]||(this.__resolves[e]=function(n){return t[e]=n}),this.__resolves[e]},t.prototype._updateComponentRef=function(e,t){void 0===t&&(t={}),e&&t&&e.componentRef!==t.componentRef&&(this._setComponentRef(e.componentRef,null),this._setComponentRef(t.componentRef,this))},t.prototype._warnDeprecations=function(e){this.className,this.props},t.prototype._warnMutuallyExclusive=function(e){this.className,this.props},t.prototype._warnConditionallyRequiredProps=function(e,t,n){this.className,this.props},t.prototype._setComponentRef=function(e,t){!this._skipComponentRefResolution&&e&&("function"===typeof e&&e(t),"object"===typeof e&&(e.current=t))},t}(r.Component);function f(e,t,n){var i=e[n],r=t[n];(i||r)&&(e[n]=function(){var e;return r&&(e=r.apply(this,arguments)),i!==r&&(e=i.apply(this,arguments)),e})}function p(){return null}},function(e,t,n){"use strict";function i(e){for(var t=[],n=1;n= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : new P(function (resolve) {\n resolve(result.value);\n }).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport function __exportStar(m, exports) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nexport function __values(o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator],\n i = 0;\n if (m) return m.call(o);\n return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n}\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) {\n ar = ar.concat(__read(arguments[i]));\n }\n\n return ar;\n}\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\n;\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n\n function fulfill(value) {\n resume(\"next\", value);\n }\n\n function reject(value) {\n resume(\"throw\", value);\n }\n\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n\n return cooked;\n}\n;\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n }\n result.default = mod;\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}","import { mergeStyles } from '../MergeStyles';\n/**\n * Builds a class names object from a given map.\n *\n * @param styles - Map of unprocessed styles.\n * @returns Map of property name to class name.\n */\n\nexport function buildClassMap(styles) {\n var classes = {};\n\n var _loop_1 = function _loop_1(styleName) {\n if (styles.hasOwnProperty(styleName)) {\n var className_1;\n Object.defineProperty(classes, styleName, {\n get: function get() {\n if (className_1 === undefined) {\n // tslint:disable-next-line:no-any\n className_1 = mergeStyles(styles[styleName]).toString();\n }\n\n return className_1;\n },\n enumerable: true,\n configurable: true\n });\n }\n };\n\n for (var styleName in styles) {\n _loop_1(styleName);\n }\n\n return classes;\n}","import { getStyleOptions } from './StyleOptionsState';\nimport { Stylesheet } from './Stylesheet';\nimport { serializeRuleEntries } from './styleToClassName';\n/**\n * Registers a font face.\n * @public\n */\n\nexport function fontFace(font) {\n Stylesheet.getInstance().insertRule(\"@font-face{\" + serializeRuleEntries(getStyleOptions(), font) + \"}\", true);\n}","import * as tslib_1 from \"tslib\";\nimport { GlobalSettings, warn } from '@uifabric/utilities';\nimport { fontFace, mergeStyles, Stylesheet } from '@uifabric/merge-styles';\nvar ICON_SETTING_NAME = 'icons';\n\nvar _iconSettings = GlobalSettings.getValue(ICON_SETTING_NAME, {\n __options: {\n disableWarnings: false,\n warnOnMissingIcons: true\n },\n __remapped: {}\n}); // Reset icon registration on stylesheet resets.\n\n\nvar stylesheet = Stylesheet.getInstance();\n\nif (stylesheet && stylesheet.onReset) {\n stylesheet.onReset(function () {\n for (var name_1 in _iconSettings) {\n if (_iconSettings.hasOwnProperty(name_1) && !!_iconSettings[name_1].subset) {\n _iconSettings[name_1].subset.className = undefined;\n }\n }\n });\n}\n/**\n * Normalizes an icon name for consistent mapping.\n * Current implementation is to convert the icon name to lower case.\n *\n * @param name - Icon name to normalize.\n * @returns {string} Normalized icon name to use for indexing and mapping.\n */\n\n\nvar normalizeIconName = function normalizeIconName(name) {\n return name.toLowerCase();\n};\n/**\n * Registers a given subset of icons.\n *\n * @param iconSubset - the icon subset definition.\n */\n\n\nexport function registerIcons(iconSubset, options) {\n var subset = tslib_1.__assign({}, iconSubset, {\n isRegistered: false,\n className: undefined\n });\n\n var icons = iconSubset.icons; // Grab options, optionally mix user provided ones on top.\n\n options = options ? tslib_1.__assign({}, _iconSettings.__options, options) : _iconSettings.__options;\n\n for (var iconName in icons) {\n if (icons.hasOwnProperty(iconName)) {\n var code = icons[iconName];\n var normalizedIconName = normalizeIconName(iconName);\n\n if (_iconSettings[normalizedIconName]) {\n _warnDuplicateIcon(iconName);\n } else {\n _iconSettings[normalizedIconName] = {\n code: code,\n subset: subset\n };\n }\n }\n }\n}\n/**\n * Unregisters icons by name.\n *\n * @param iconNames - List of icons to unregister.\n */\n\nexport function unregisterIcons(iconNames) {\n var options = _iconSettings.__options;\n\n var _loop_1 = function _loop_1(iconName) {\n var normalizedIconName = normalizeIconName(iconName);\n\n if (_iconSettings[normalizedIconName]) {\n delete _iconSettings[normalizedIconName];\n } else {\n // Warn that we are trying to delete an icon that doesn't exist\n if (!options.disableWarnings) {\n warn(\"The icon \\\"\" + iconName + \"\\\" tried to unregister but was not registered.\");\n }\n } // Delete any aliases for this iconName\n\n\n if (_iconSettings.__remapped[normalizedIconName]) {\n delete _iconSettings.__remapped[normalizedIconName];\n } // Delete any items that were an alias for this iconName\n\n\n Object.keys(_iconSettings.__remapped).forEach(function (key) {\n if (_iconSettings.__remapped[key] === normalizedIconName) {\n delete _iconSettings.__remapped[key];\n }\n });\n };\n\n for (var _i = 0, iconNames_1 = iconNames; _i < iconNames_1.length; _i++) {\n var iconName = iconNames_1[_i];\n\n _loop_1(iconName);\n }\n}\n/**\n * Remaps one icon name to another.\n */\n\nexport function registerIconAlias(iconName, mappedToName) {\n _iconSettings.__remapped[normalizeIconName(iconName)] = normalizeIconName(mappedToName);\n}\n/**\n * Gets an icon definition. If an icon is requested but the subset has yet to be registered,\n * it will get registered immediately.\n *\n * @public\n * @param name - Name of icon.\n */\n\nexport function getIcon(name) {\n var icon = undefined;\n var options = _iconSettings.__options;\n name = name ? normalizeIconName(name) : '';\n name = _iconSettings.__remapped[name] || name;\n\n if (name) {\n icon = _iconSettings[name];\n\n if (icon) {\n var subset = icon.subset;\n\n if (subset && subset.fontFace) {\n if (!subset.isRegistered) {\n fontFace(subset.fontFace);\n subset.isRegistered = true;\n }\n\n if (!subset.className) {\n subset.className = mergeStyles(subset.style, {\n fontFamily: subset.fontFace.fontFamily,\n fontWeight: subset.fontFace.fontWeight || 'normal',\n fontStyle: subset.fontFace.fontStyle || 'normal'\n });\n }\n }\n } else {\n if (!options.disableWarnings && options.warnOnMissingIcons) {\n warn(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\n }\n }\n }\n\n return icon;\n}\n/**\n * Sets the icon options.\n *\n * @public\n */\n\nexport function setIconOptions(options) {\n _iconSettings.__options = tslib_1.__assign({}, _iconSettings.__options, options);\n}\nvar _missingIcons = [];\nvar _missingIconsTimer = undefined;\n\nfunction _warnDuplicateIcon(iconName) {\n var options = _iconSettings.__options;\n var warningDelay = 2000;\n var maxIconsInMessage = 10;\n\n if (!options.disableWarnings) {\n _missingIcons.push(iconName);\n\n if (_missingIconsTimer === undefined) {\n _missingIconsTimer = setTimeout(function () {\n warn(\"Some icons were re-registered. Applications should only call registerIcons for any given \" + \"icon once. Redefining what an icon is may have unintended consequences. Duplicates \" + \"include: \\n\" + _missingIcons.slice(0, maxIconsInMessage).join(', ') + (_missingIcons.length > maxIconsInMessage ? \" (+ \" + (_missingIcons.length - maxIconsInMessage) + \" more)\" : ''));\n _missingIconsTimer = undefined;\n _missingIcons = [];\n }, warningDelay);\n }\n }\n}","import { getStyleOptions } from './StyleOptionsState';\nimport { Stylesheet } from './Stylesheet';\nimport { serializeRuleEntries } from './styleToClassName';\n/**\n * Registers keyframe definitions.\n *\n * @public\n */\n\nexport function keyframes(timeline) {\n var stylesheet = Stylesheet.getInstance();\n var name = stylesheet.getClassName();\n var rulesArray = [];\n\n for (var prop in timeline) {\n if (timeline.hasOwnProperty(prop)) {\n rulesArray.push(prop, '{', serializeRuleEntries(getStyleOptions(), timeline[prop]), '}');\n }\n }\n\n var rules = rulesArray.join('');\n stylesheet.insertRule(\"@keyframes \" + name + \"{\" + rules + \"}\", true);\n stylesheet.cacheClassName(name, rules, [], ['keyframes', rules]);\n return name;\n}","import { keyframes } from '@uifabric/merge-styles';\n/* Register the keyframes */\n\nvar EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';\nvar EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';\nvar DURATION_1 = '0.167s';\nvar DURATION_2 = '0.267s';\nvar DURATION_3 = '0.367s';\nvar DURATION_4 = '0.467s';\nvar FADE_IN = keyframes({\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n});\nvar FADE_OUT = keyframes({\n from: {\n opacity: 1\n },\n to: {\n opacity: 0,\n visibility: 'hidden'\n }\n});\n\nvar SLIDE_RIGHT_IN10 = _createSlideInX(-10);\n\nvar SLIDE_RIGHT_IN20 = _createSlideInX(-20);\n\nvar SLIDE_RIGHT_IN40 = _createSlideInX(-40);\n\nvar SLIDE_RIGHT_IN400 = _createSlideInX(-400);\n\nvar SLIDE_LEFT_IN10 = _createSlideInX(10);\n\nvar SLIDE_LEFT_IN20 = _createSlideInX(20);\n\nvar SLIDE_LEFT_IN40 = _createSlideInX(40);\n\nvar SLIDE_LEFT_IN400 = _createSlideInX(400);\n\nvar SLIDE_UP_IN10 = _createSlideInY(10);\n\nvar SLIDE_UP_IN20 = _createSlideInY(20);\n\nvar SLIDE_DOWN_IN10 = _createSlideInY(-10);\n\nvar SLIDE_DOWN_IN20 = _createSlideInY(-20);\n\nvar SLIDE_RIGHT_OUT10 = _createSlideOutX(10);\n\nvar SLIDE_RIGHT_OUT20 = _createSlideOutX(20);\n\nvar SLIDE_RIGHT_OUT40 = _createSlideOutX(40);\n\nvar SLIDE_RIGHT_OUT400 = _createSlideOutX(400);\n\nvar SLIDE_LEFT_OUT10 = _createSlideOutX(-10);\n\nvar SLIDE_LEFT_OUT20 = _createSlideOutX(-20);\n\nvar SLIDE_LEFT_OUT40 = _createSlideOutX(-40);\n\nvar SLIDE_LEFT_OUT400 = _createSlideOutX(-400);\n\nvar SLIDE_UP_OUT10 = _createSlideOutY(-10);\n\nvar SLIDE_UP_OUT20 = _createSlideOutY(-20);\n\nvar SLIDE_DOWN_OUT10 = _createSlideOutY(10);\n\nvar SLIDE_DOWN_OUT20 = _createSlideOutY(20);\n\nvar SCALE_UP100 = keyframes({\n from: {\n transform: 'scale3d(.98,.98,1)'\n },\n to: {\n transform: 'scale3d(1,1,1)'\n }\n});\nvar SCALE_DOWN98 = keyframes({\n from: {\n transform: 'scale3d(1,1,1)'\n },\n to: {\n transform: 'scale3d(.98,.98,1)'\n }\n});\nvar SCALE_DOWN100 = keyframes({\n from: {\n transform: 'scale3d(1.03,1.03,1)'\n },\n to: {\n transform: 'scale3d(1,1,1)'\n }\n});\nvar SCALE_UP103 = keyframes({\n from: {\n transform: 'scale3d(1,1,1)'\n },\n to: {\n transform: 'scale3d(1.03,1.03,1)'\n }\n});\nvar ROTATE90 = keyframes({\n from: {\n transform: 'rotateZ(0deg)'\n },\n to: {\n transform: 'rotateZ(90deg)'\n }\n});\nvar ROTATE_N90 = keyframes({\n from: {\n transform: 'rotateZ(0deg)'\n },\n to: {\n transform: 'rotateZ(-90deg)'\n }\n});\n/**\n * Exporting raw duraction values and easing functions to be used in custom animations\n */\n\nexport var AnimationVariables = {\n easeFunction1: EASING_FUNCTION_1,\n easeFunction2: EASING_FUNCTION_2,\n durationValue1: DURATION_1,\n durationValue2: DURATION_2,\n durationValue3: DURATION_3,\n durationValue4: DURATION_4\n};\n/**\n * All Fabric standard animations, exposed as json objects referencing predefined\n * keyframes. These objects can be mixed in with other class definitions.\n */\n\nexport var AnimationStyles = {\n slideRightIn10: _createAnimation(FADE_IN + \",\" + SLIDE_RIGHT_IN10, DURATION_3, EASING_FUNCTION_1),\n slideRightIn20: _createAnimation(FADE_IN + \",\" + SLIDE_RIGHT_IN20, DURATION_3, EASING_FUNCTION_1),\n slideRightIn40: _createAnimation(FADE_IN + \",\" + SLIDE_RIGHT_IN40, DURATION_3, EASING_FUNCTION_1),\n slideRightIn400: _createAnimation(FADE_IN + \",\" + SLIDE_RIGHT_IN400, DURATION_3, EASING_FUNCTION_1),\n slideLeftIn10: _createAnimation(FADE_IN + \",\" + SLIDE_LEFT_IN10, DURATION_3, EASING_FUNCTION_1),\n slideLeftIn20: _createAnimation(FADE_IN + \",\" + SLIDE_LEFT_IN20, DURATION_3, EASING_FUNCTION_1),\n slideLeftIn40: _createAnimation(FADE_IN + \",\" + SLIDE_LEFT_IN40, DURATION_3, EASING_FUNCTION_1),\n slideLeftIn400: _createAnimation(FADE_IN + \",\" + SLIDE_LEFT_IN400, DURATION_3, EASING_FUNCTION_1),\n slideUpIn10: _createAnimation(FADE_IN + \",\" + SLIDE_UP_IN10, DURATION_3, EASING_FUNCTION_1),\n slideUpIn20: _createAnimation(FADE_IN + \",\" + SLIDE_UP_IN20, DURATION_3, EASING_FUNCTION_1),\n slideDownIn10: _createAnimation(FADE_IN + \",\" + SLIDE_DOWN_IN10, DURATION_3, EASING_FUNCTION_1),\n slideDownIn20: _createAnimation(FADE_IN + \",\" + SLIDE_DOWN_IN20, DURATION_3, EASING_FUNCTION_1),\n slideRightOut10: _createAnimation(FADE_OUT + \",\" + SLIDE_RIGHT_OUT10, DURATION_3, EASING_FUNCTION_1),\n slideRightOut20: _createAnimation(FADE_OUT + \",\" + SLIDE_RIGHT_OUT20, DURATION_3, EASING_FUNCTION_1),\n slideRightOut40: _createAnimation(FADE_OUT + \",\" + SLIDE_RIGHT_OUT40, DURATION_3, EASING_FUNCTION_1),\n slideRightOut400: _createAnimation(FADE_OUT + \",\" + SLIDE_RIGHT_OUT400, DURATION_3, EASING_FUNCTION_1),\n slideLeftOut10: _createAnimation(FADE_OUT + \",\" + SLIDE_LEFT_OUT10, DURATION_3, EASING_FUNCTION_1),\n slideLeftOut20: _createAnimation(FADE_OUT + \",\" + SLIDE_LEFT_OUT20, DURATION_3, EASING_FUNCTION_1),\n slideLeftOut40: _createAnimation(FADE_OUT + \",\" + SLIDE_LEFT_OUT40, DURATION_3, EASING_FUNCTION_1),\n slideLeftOut400: _createAnimation(FADE_OUT + \",\" + SLIDE_LEFT_OUT400, DURATION_3, EASING_FUNCTION_1),\n slideUpOut10: _createAnimation(FADE_OUT + \",\" + SLIDE_UP_OUT10, DURATION_3, EASING_FUNCTION_1),\n slideUpOut20: _createAnimation(FADE_OUT + \",\" + SLIDE_UP_OUT20, DURATION_3, EASING_FUNCTION_1),\n slideDownOut10: _createAnimation(FADE_OUT + \",\" + SLIDE_DOWN_OUT10, DURATION_3, EASING_FUNCTION_1),\n slideDownOut20: _createAnimation(FADE_OUT + \",\" + SLIDE_DOWN_OUT20, DURATION_3, EASING_FUNCTION_1),\n scaleUpIn100: _createAnimation(FADE_IN + \",\" + SCALE_UP100, DURATION_3, EASING_FUNCTION_1),\n scaleDownIn100: _createAnimation(FADE_IN + \",\" + SCALE_DOWN100, DURATION_3, EASING_FUNCTION_1),\n scaleUpOut103: _createAnimation(FADE_OUT + \",\" + SCALE_UP103, DURATION_1, EASING_FUNCTION_2),\n scaleDownOut98: _createAnimation(FADE_OUT + \",\" + SCALE_DOWN98, DURATION_1, EASING_FUNCTION_2),\n fadeIn100: _createAnimation(FADE_IN, DURATION_1, EASING_FUNCTION_2),\n fadeIn200: _createAnimation(FADE_IN, DURATION_2, EASING_FUNCTION_2),\n fadeIn400: _createAnimation(FADE_IN, DURATION_3, EASING_FUNCTION_2),\n fadeIn500: _createAnimation(FADE_IN, DURATION_4, EASING_FUNCTION_2),\n fadeOut100: _createAnimation(FADE_OUT, DURATION_1, EASING_FUNCTION_2),\n fadeOut200: _createAnimation(FADE_OUT, DURATION_2, EASING_FUNCTION_2),\n fadeOut400: _createAnimation(FADE_OUT, DURATION_3, EASING_FUNCTION_2),\n fadeOut500: _createAnimation(FADE_OUT, DURATION_4, EASING_FUNCTION_2),\n rotate90deg: _createAnimation(ROTATE90, '0.1s', EASING_FUNCTION_2),\n rotateN90deg: _createAnimation(ROTATE_N90, '0.1s', EASING_FUNCTION_2) // expandCollapse 100/200/400, delay 100/200\n\n};\n\nfunction _createAnimation(animationName, animationDuration, animationTimingFunction) {\n return {\n animationName: animationName,\n animationDuration: animationDuration,\n animationTimingFunction: animationTimingFunction,\n animationFillMode: 'both'\n };\n}\n\nfunction _createSlideInX(fromX) {\n return keyframes({\n from: {\n transform: \"translate3d(\" + fromX + \"px,0,0)\"\n },\n to: {\n transform: \"translate3d(0,0,0)\"\n }\n });\n}\n\nfunction _createSlideInY(fromY) {\n return keyframes({\n from: {\n transform: \"translate3d(0,\" + fromY + \"px,0)\"\n },\n to: {\n transform: \"translate3d(0,0,0)\"\n }\n });\n}\n\nfunction _createSlideOutX(toX) {\n return keyframes({\n from: {\n transform: \"translate3d(0,0,0)\"\n },\n to: {\n transform: \"translate3d(\" + toX + \"px,0,0)\"\n }\n });\n}\n\nfunction _createSlideOutY(toY) {\n return keyframes({\n from: {\n transform: \"translate3d(0,0,0)\"\n },\n to: {\n transform: \"translate3d(0,\" + toY + \"px,0)\"\n }\n });\n}","// When adding or removing a color, make sure you keep this consistent with IColorClassNames by adding the color variants.\nexport var DefaultPalette = {\n themeDarker: '#004578',\n themeDark: '#005a9e',\n themeDarkAlt: '#106ebe',\n themePrimary: '#0078d4',\n themeSecondary: '#2b88d8',\n themeTertiary: '#71afe5',\n themeLight: '#c7e0f4',\n themeLighter: '#deecf9',\n themeLighterAlt: '#eff6fc',\n black: '#000000',\n blackTranslucent40: 'rgba(0,0,0,.4)',\n neutralDark: '#201f1e',\n neutralPrimary: '#323130',\n neutralPrimaryAlt: '#3b3a39',\n neutralSecondary: '#605e5c',\n neutralSecondaryAlt: '#8a8886',\n neutralTertiary: '#a19f9d',\n neutralTertiaryAlt: '#c8c6c4',\n neutralQuaternary: '#d2d0ce',\n neutralQuaternaryAlt: '#e1dfdd',\n neutralLight: '#edebe9',\n neutralLighter: '#f3f2f1',\n neutralLighterAlt: '#faf9f8',\n accent: '#0078d4',\n white: '#ffffff',\n whiteTranslucent40: 'rgba(255,255,255,.4)',\n yellowDark: '#d29200',\n yellow: '#ffb900',\n yellowLight: '#fff100',\n orange: '#d83b01',\n orangeLight: '#ea4300',\n orangeLighter: '#ff8c00',\n redDark: '#a4262c',\n red: '#e81123',\n magentaDark: '#5c005c',\n magenta: '#b4009e',\n magentaLight: '#e3008c',\n purpleDark: '#32145a',\n purple: '#5c2d91',\n purpleLight: '#b4a0ff',\n blueDark: '#002050',\n blueMid: '#00188f',\n blue: '#0078d4',\n blueLight: '#00bcf2',\n tealDark: '#004b50',\n teal: '#008272',\n tealLight: '#00b294',\n greenDark: '#004b1c',\n green: '#107c10',\n greenLight: '#bad80a'\n};","// Fallback fonts, if specified system or web fonts are unavailable.\nvar FontFamilyFallbacks = \"'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif\"; // Font face names to be registered.\n\nexport var LocalizedFontNames;\n\n(function (LocalizedFontNames) {\n LocalizedFontNames.Arabic = 'Segoe UI Web (Arabic)';\n LocalizedFontNames.Cyrillic = 'Segoe UI Web (Cyrillic)';\n LocalizedFontNames.EastEuropean = 'Segoe UI Web (East European)';\n LocalizedFontNames.Greek = 'Segoe UI Web (Greek)';\n LocalizedFontNames.Hebrew = 'Segoe UI Web (Hebrew)';\n LocalizedFontNames.Thai = 'Leelawadee UI Web';\n LocalizedFontNames.Vietnamese = 'Segoe UI Web (Vietnamese)';\n LocalizedFontNames.WestEuropean = 'Segoe UI Web (West European)';\n LocalizedFontNames.Selawik = 'Selawik Web';\n LocalizedFontNames.Armenian = 'Segoe UI Web (Armenian)';\n LocalizedFontNames.Georgian = 'Segoe UI Web (Georgian)';\n})(LocalizedFontNames || (LocalizedFontNames = {})); // Font families with fallbacks, for the general regions.\n\n\nexport var LocalizedFontFamilies;\n\n(function (LocalizedFontFamilies) {\n LocalizedFontFamilies.Arabic = \"'\" + LocalizedFontNames.Arabic + \"'\";\n LocalizedFontFamilies.ChineseSimplified = \"'Microsoft Yahei UI', Verdana, Simsun\";\n LocalizedFontFamilies.ChineseTraditional = \"'Microsoft Jhenghei UI', Pmingliu\";\n LocalizedFontFamilies.Cyrillic = \"'\" + LocalizedFontNames.Cyrillic + \"'\";\n LocalizedFontFamilies.EastEuropean = \"'\" + LocalizedFontNames.EastEuropean + \"'\";\n LocalizedFontFamilies.Greek = \"'\" + LocalizedFontNames.Greek + \"'\";\n LocalizedFontFamilies.Hebrew = \"'\" + LocalizedFontNames.Hebrew + \"'\";\n LocalizedFontFamilies.Hindi = \"'Nirmala UI'\";\n LocalizedFontFamilies.Japanese = \"'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka\";\n LocalizedFontFamilies.Korean = \"'Malgun Gothic', Gulim\";\n LocalizedFontFamilies.Selawik = \"'\" + LocalizedFontNames.Selawik + \"'\";\n LocalizedFontFamilies.Thai = \"'Leelawadee UI Web', 'Kmer UI'\";\n LocalizedFontFamilies.Vietnamese = \"'\" + LocalizedFontNames.Vietnamese + \"'\";\n LocalizedFontFamilies.WestEuropean = \"'\" + LocalizedFontNames.WestEuropean + \"'\";\n LocalizedFontFamilies.Armenian = \"'\" + LocalizedFontNames.Armenian + \"'\";\n LocalizedFontFamilies.Georgian = \"'\" + LocalizedFontNames.Georgian + \"'\";\n})(LocalizedFontFamilies || (LocalizedFontFamilies = {})); // By default, we favor system fonts for the default.\n// All localized fonts use a web font and never use the system font.\n\n\nvar defaultFontFamily = \"'Segoe UI', '\" + LocalizedFontNames.WestEuropean + \"'\"; // Mapping of language prefix to to font family.\n\nvar LanguageToFontMap = {\n ar: LocalizedFontFamilies.Arabic,\n bg: LocalizedFontFamilies.Cyrillic,\n cs: LocalizedFontFamilies.EastEuropean,\n el: LocalizedFontFamilies.Greek,\n et: LocalizedFontFamilies.EastEuropean,\n he: LocalizedFontFamilies.Hebrew,\n hi: LocalizedFontFamilies.Hindi,\n hr: LocalizedFontFamilies.EastEuropean,\n hu: LocalizedFontFamilies.EastEuropean,\n ja: LocalizedFontFamilies.Japanese,\n kk: LocalizedFontFamilies.EastEuropean,\n ko: LocalizedFontFamilies.Korean,\n lt: LocalizedFontFamilies.EastEuropean,\n lv: LocalizedFontFamilies.EastEuropean,\n pl: LocalizedFontFamilies.EastEuropean,\n ru: LocalizedFontFamilies.Cyrillic,\n sk: LocalizedFontFamilies.EastEuropean,\n 'sr-latn': LocalizedFontFamilies.EastEuropean,\n th: LocalizedFontFamilies.Thai,\n tr: LocalizedFontFamilies.EastEuropean,\n uk: LocalizedFontFamilies.Cyrillic,\n vi: LocalizedFontFamilies.Vietnamese,\n 'zh-hans': LocalizedFontFamilies.ChineseSimplified,\n 'zh-hant': LocalizedFontFamilies.ChineseTraditional,\n hy: LocalizedFontFamilies.Armenian,\n ka: LocalizedFontFamilies.Georgian\n}; // Standard font sizes.\n\nexport var FontSizes;\n\n(function (FontSizes) {\n FontSizes.mini = '10px';\n FontSizes.xSmall = '10px';\n FontSizes.small = '12px';\n FontSizes.smallPlus = '12px';\n FontSizes.medium = '14px';\n FontSizes.mediumPlus = '16px';\n FontSizes.icon = '16px';\n FontSizes.large = '18px';\n FontSizes.xLarge = '20px';\n FontSizes.xLargePlus = '24px';\n FontSizes.xxLarge = '28px';\n FontSizes.xxLargePlus = '32px';\n FontSizes.superLarge = '42px';\n FontSizes.mega = '68px';\n})(FontSizes || (FontSizes = {})); // Standard font weights.\n\n\nexport var FontWeights;\n\n(function (FontWeights) {\n FontWeights.light = 100;\n FontWeights.semilight = 300;\n FontWeights.regular = 400;\n FontWeights.semibold = 600;\n FontWeights.bold = 700;\n})(FontWeights || (FontWeights = {})); // Standard Icon Sizes.\n\n\nexport var IconFontSizes;\n\n(function (IconFontSizes) {\n IconFontSizes.xSmall = '10px';\n IconFontSizes.small = '12px';\n IconFontSizes.medium = '16px';\n IconFontSizes.large = '20px';\n})(IconFontSizes || (IconFontSizes = {}));\n\nfunction _fontFamilyWithFallbacks(fontFamily) {\n return fontFamily + \", \" + FontFamilyFallbacks;\n}\n\nexport function createFontStyles(localeCode) {\n var localizedFont = _getLocalizedFontFamily(localeCode);\n\n var fontFamilyWithFallback = _fontFamilyWithFallbacks(localizedFont);\n\n var fontStyles = {\n tiny: _createFont(FontSizes.mini, FontWeights.regular, fontFamilyWithFallback),\n xSmall: _createFont(FontSizes.xSmall, FontWeights.regular, fontFamilyWithFallback),\n small: _createFont(FontSizes.small, FontWeights.regular, fontFamilyWithFallback),\n smallPlus: _createFont(FontSizes.smallPlus, FontWeights.regular, fontFamilyWithFallback),\n medium: _createFont(FontSizes.medium, FontWeights.regular, fontFamilyWithFallback),\n mediumPlus: _createFont(FontSizes.mediumPlus, FontWeights.regular, fontFamilyWithFallback),\n large: _createFont(FontSizes.large, FontWeights.regular, fontFamilyWithFallback),\n xLarge: _createFont(FontSizes.xLarge, FontWeights.semibold, fontFamilyWithFallback),\n xLargePlus: _createFont(FontSizes.xLargePlus, FontWeights.semibold, fontFamilyWithFallback),\n xxLarge: _createFont(FontSizes.xxLarge, FontWeights.semibold, fontFamilyWithFallback),\n xxLargePlus: _createFont(FontSizes.xxLargePlus, FontWeights.semibold, fontFamilyWithFallback),\n superLarge: _createFont(FontSizes.superLarge, FontWeights.semibold, fontFamilyWithFallback),\n mega: _createFont(FontSizes.mega, FontWeights.semibold, fontFamilyWithFallback)\n };\n return fontStyles;\n}\n/**\n * If there is a localized font for this language, return that. Returns undefined if there is no localized font for that language.\n */\n\nfunction _getLocalizedFontFamily(language) {\n for (var lang in LanguageToFontMap) {\n if (LanguageToFontMap.hasOwnProperty(lang) && language && lang.indexOf(language) === 0) {\n // tslint:disable-next-line:no-any\n return LanguageToFontMap[lang];\n }\n }\n\n return defaultFontFamily;\n}\n\nfunction _createFont(size, weight, fontFamily) {\n return {\n fontFamily: fontFamily,\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontSize: size,\n fontWeight: weight\n };\n}","export var DefaultEffects = {\n // commented values are the defaults for Fluent\n elevation4: '0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)',\n elevation8: '0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)',\n elevation16: '0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)',\n elevation64: '0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)',\n roundedCorner2: '2px'\n};","import { getDocument } from './dom/getDocument';\nimport { getItem, setItem } from './localStorage'; // Default to undefined so that we initialize on first read.\n\nvar _language;\n/**\n * Gets the rtl state of the page (returns true if in rtl.)\n *\n * @public\n */\n\n\nexport function getLanguage() {\n if (_language === undefined) {\n var doc = getDocument();\n var savedLanguage = getItem('language');\n\n if (savedLanguage !== null) {\n _language = savedLanguage;\n }\n\n if (_language === undefined && doc) {\n _language = doc.documentElement.getAttribute('lang');\n }\n\n if (_language === undefined) {\n _language = 'en';\n }\n }\n\n return _language;\n}\n/**\n * Sets the rtl state of the page (by adjusting the dir attribute of the html element.)\n *\n * @public\n */\n\nexport function setLanguage(language, avoidPersisting) {\n if (avoidPersisting === void 0) {\n avoidPersisting = false;\n }\n\n var doc = getDocument();\n\n if (doc) {\n doc.documentElement.setAttribute('lang', language);\n }\n\n if (!avoidPersisting) {\n setItem('language', language);\n }\n\n _language = language;\n}","import { fontFace } from '@uifabric/merge-styles';\nimport { createFontStyles, FontWeights, LocalizedFontFamilies, LocalizedFontNames } from './fonts';\nimport { getLanguage, getWindow } from '@uifabric/utilities'; // Default urls.\n\nvar DefaultBaseUrl = 'https://static2.sharepointonline.com/files/fabric/assets'; // Standard font styling.\n\nexport var DefaultFontStyles = createFontStyles(getLanguage());\n\nfunction _registerFontFace(fontFamily, url, fontWeight, localFontName) {\n fontFamily = \"'\" + fontFamily + \"'\";\n var localFontSrc = localFontName !== undefined ? \"local('\" + localFontName + \"'),\" : '';\n fontFace({\n fontFamily: fontFamily,\n src: localFontSrc + (\"url('\" + url + \".woff2') format('woff2'),\") + (\"url('\" + url + \".woff') format('woff')\"),\n fontWeight: fontWeight,\n fontStyle: 'normal',\n fontDisplay: 'swap'\n });\n}\n\nfunction _registerFontFaceSet(baseUrl, fontFamily, cdnFolder, cdnFontName, localFontName) {\n if (cdnFontName === void 0) {\n cdnFontName = 'segoeui';\n }\n\n var urlBase = baseUrl + \"/\" + cdnFolder + \"/\" + cdnFontName;\n\n _registerFontFace(fontFamily, urlBase + '-light', FontWeights.light, localFontName && localFontName + ' Light');\n\n _registerFontFace(fontFamily, urlBase + '-semilight', FontWeights.semilight, localFontName && localFontName + ' SemiLight');\n\n _registerFontFace(fontFamily, urlBase + '-regular', FontWeights.regular, localFontName);\n\n _registerFontFace(fontFamily, urlBase + '-semibold', FontWeights.semibold, localFontName && localFontName + ' SemiBold');\n}\n\nexport function registerDefaultFontFaces(baseUrl) {\n if (baseUrl) {\n var fontUrl = baseUrl + \"/fonts\"; // Produce @font-face definitions for all supported web fonts.\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Thai, 'leelawadeeui-thai', 'leelawadeeui');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Arabic, 'segoeui-arabic');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Cyrillic, 'segoeui-cyrillic');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.EastEuropean, 'segoeui-easteuropean');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Greek, 'segoeui-greek');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Hebrew, 'segoeui-hebrew');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Vietnamese, 'segoeui-vietnamese');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.WestEuropean, 'segoeui-westeuropean', 'segoeui', 'Segoe UI');\n\n _registerFontFaceSet(fontUrl, LocalizedFontFamilies.Selawik, 'selawik', 'selawik');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Armenian, 'segoeui-armenian');\n\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Georgian, 'segoeui-georgian'); // Leelawadee UI (Thai) does not have a 'light' weight, so we override\n // the font-face generated above to use the 'semilight' weight instead.\n\n\n _registerFontFace('Leelawadee UI Web', fontUrl + \"/leelawadeeui-thai/leelawadeeui-semilight\", FontWeights.light); // Leelawadee UI (Thai) does not have a 'semibold' weight, so we override\n // the font-face generated above to use the 'bold' weight instead.\n\n\n _registerFontFace('Leelawadee UI Web', fontUrl + \"/leelawadeeui-thai/leelawadeeui-bold\", FontWeights.semibold);\n }\n}\n/**\n * Reads the fontBaseUrl from window.FabricConfig.fontBaseUrl or falls back to a default.\n */\n\nfunction _getFontBaseUrl() {\n var win = getWindow(); // tslint:disable-next-line:no-string-literal no-any\n\n var fabricConfig = win ? win['FabricConfig'] : undefined;\n return fabricConfig && fabricConfig.fontBaseUrl !== undefined ? fabricConfig.fontBaseUrl : DefaultBaseUrl;\n}\n/**\n * Register the font faces.\n */\n\n\nregisterDefaultFontFaces(_getFontBaseUrl());","import { getWindow } from './dom/getWindow';\n/**\n * Fetches an item from local storage without throwing an exception\n * @param key The key of the item to fetch from local storage\n */\n\nexport function getItem(key) {\n var result = null;\n\n try {\n var win = getWindow();\n result = win ? win.localStorage.getItem(key) : null;\n } catch (e) {\n /* Eat the exception */\n }\n\n return result;\n}\n/**\n * Inserts an item into local storage without throwing an exception\n * @param key The key of the item to add to local storage\n * @param data The data to put into local storage\n */\n\nexport function setItem(key, data) {\n try {\n var win = getWindow();\n win && win.localStorage.setItem(key, data);\n } catch (e) {\n /* Eat the exception */\n }\n}","export var HighContrastSelector = '@media screen and (-ms-high-contrast: active)';\nexport var HighContrastSelectorWhite = '@media screen and (-ms-high-contrast: black-on-white)';\nexport var HighContrastSelectorBlack = '@media screen and (-ms-high-contrast: white-on-black)';\nexport var ScreenWidthMinSmall = 320;\nexport var ScreenWidthMinMedium = 480;\nexport var ScreenWidthMinLarge = 640;\nexport var ScreenWidthMinXLarge = 1024;\nexport var ScreenWidthMinXXLarge = 1366;\nexport var ScreenWidthMinXXXLarge = 1920;\nexport var ScreenWidthMaxSmall = ScreenWidthMinMedium - 1;\nexport var ScreenWidthMaxMedium = ScreenWidthMinLarge - 1;\nexport var ScreenWidthMaxLarge = ScreenWidthMinXLarge - 1;\nexport var ScreenWidthMaxXLarge = ScreenWidthMinXXLarge - 1;\nexport var ScreenWidthMaxXXLarge = ScreenWidthMinXXXLarge - 1;\nexport var ScreenWidthMinUhfMobile = 768;\nexport function getScreenSelector(min, max) {\n return \"@media only screen and (min-width: \" + min + \"px) and (max-width: \" + max + \"px)\";\n}","export var ZIndexes;\n\n(function (ZIndexes) {\n ZIndexes.Nav = 1;\n /**\n * @deprecated ScrollablePane\n */\n\n ZIndexes.ScrollablePane = 1;\n ZIndexes.FocusStyle = 1;\n ZIndexes.Coachmark = 1000;\n ZIndexes.Layer = 1000000;\n ZIndexes.KeytipLayer = 1000001;\n})(ZIndexes || (ZIndexes = {}));","import { HighContrastSelector } from './CommonStyles';\nimport { IsFocusVisibleClassName } from '@uifabric/utilities';\nimport { ZIndexes } from './zIndexes';\nexport function getFocusStyle(theme, insetOrOptions, position, highContrastStyle, borderColor, outlineColor, isFocusedOnly) {\n if (typeof insetOrOptions === 'number' || !insetOrOptions) {\n return _getFocusStyleInternal(theme, {\n inset: insetOrOptions,\n position: position,\n highContrastStyle: highContrastStyle,\n borderColor: borderColor,\n outlineColor: outlineColor,\n isFocusedOnly: isFocusedOnly\n });\n } else {\n return _getFocusStyleInternal(theme, insetOrOptions);\n }\n}\n\nfunction _getFocusStyleInternal(theme, options) {\n var _a, _b;\n\n if (options === void 0) {\n options = {};\n }\n\n var _c = options.inset,\n inset = _c === void 0 ? 0 : _c,\n _d = options.width,\n width = _d === void 0 ? 1 : _d,\n _e = options.position,\n position = _e === void 0 ? 'relative' : _e,\n highContrastStyle = options.highContrastStyle,\n _f = options.borderColor,\n borderColor = _f === void 0 ? theme.palette.white : _f,\n _g = options.outlineColor,\n outlineColor = _g === void 0 ? theme.palette.neutralSecondary : _g,\n _h = options.isFocusedOnly,\n isFocusedOnly = _h === void 0 ? true : _h;\n return {\n // Clear browser-specific focus styles and use 'transparent' as placeholder for focus style.\n outline: 'transparent',\n // Requirement because pseudo-element is absolutely positioned.\n position: position,\n selectors: (_a = {\n // Clear the focus border in Firefox.\n // Reference: http://stackoverflow.com/a/199319/1436671\n '::-moz-focus-inner': {\n border: '0'\n }\n }, // When the element that uses this mixin is in a :focus state, add a pseudo-element to\n // create a border.\n _a[\".\" + IsFocusVisibleClassName + \" &\" + (isFocusedOnly ? ':focus' : '') + \":after\"] = {\n content: '\"\"',\n position: 'absolute',\n left: inset + 1,\n top: inset + 1,\n bottom: inset + 1,\n right: inset + 1,\n border: width + \"px solid \" + borderColor,\n outline: width + \"px solid \" + outlineColor,\n zIndex: ZIndexes.FocusStyle,\n selectors: (_b = {}, _b[HighContrastSelector] = highContrastStyle, _b)\n }, _a)\n };\n}\n/**\n * Generates style to clear browser specific focus styles.\n */\n\n\nexport function focusClear() {\n return {\n selectors: {\n '&::-moz-focus-inner': {\n // Clear the focus border in Firefox. Reference: http://stackoverflow.com/a/199319/1436671\n border: 0\n },\n '&': {\n // Clear browser specific focus styles and use transparent as placeholder for focus style\n outline: 'transparent'\n }\n }\n };\n}\n/**\n * Generates a style which can be used to set a border on focus.\n *\n * @param theme - The theme object to use.\n * @param inset - The number of pixels to inset the border (default 0)\n * @param width - The border width in pixels (default 1)\n * @param color - Color of the outline (default `theme.palette.neutralSecondary`)\n * @returns The style object.\n */\n\nexport function getFocusOutlineStyle(theme, inset, width, color) {\n var _a;\n\n if (inset === void 0) {\n inset = 0;\n }\n\n if (width === void 0) {\n width = 1;\n }\n\n return {\n selectors: (_a = {}, _a[\":global(\" + IsFocusVisibleClassName + \") &:focus\"] = {\n outline: width + \" solid \" + (color || theme.palette.neutralSecondary),\n outlineOffset: -inset + \"px\"\n }, _a)\n };\n}\n/**\n * Generates text input border styles on focus.\n *\n * @param borderColor - Color of the border.\n * @param borderRadius - Radius of the border.\n * @param borderType - Type of the border.\n * @param borderPosition - Position of the border relative to the input element (default to -1\n * as it's the most common border width of the input element)\n * @returns The style object.\n */\n\nexport var getInputFocusStyle = function getInputFocusStyle(borderColor, borderRadius, borderType, borderPosition) {\n var _a, _b, _c;\n\n if (borderType === void 0) {\n borderType = 'border';\n }\n\n if (borderPosition === void 0) {\n borderPosition = -1;\n }\n\n return {\n borderColor: borderColor,\n selectors: {\n ':after': (_a = {\n pointerEvents: 'none',\n content: \"''\",\n position: 'absolute',\n left: borderPosition,\n top: borderPosition,\n bottom: borderPosition,\n right: borderPosition\n }, _a[borderType] = \"2px solid \" + borderColor, _a.borderRadius = borderRadius, _a.width = borderType === 'borderBottom' ? '100%' : undefined, _a.selectors = (_b = {}, _b[HighContrastSelector] = (_c = {}, _c[borderType === 'border' ? 'borderColor' : 'borderBottomColor'] = 'Highlight', _c), _b), _a)\n }\n };\n};","export var hiddenContentStyle = {\n position: 'absolute',\n width: 1,\n height: 1,\n margin: -1,\n padding: 0,\n border: 0,\n overflow: 'hidden'\n};","import * as tslib_1 from \"tslib\";\nimport { keyframes } from '@uifabric/merge-styles';\nvar DEFAULT_DURATION = '14s';\nvar DEFAULT_DELAY = '2s';\nvar DEFAULT_ITERATION_COUNT = '1';\n\nfunction _continuousPulseStepOne(beaconColorOne, innerDimension) {\n return {\n borderColor: beaconColorOne,\n borderWidth: '0px',\n width: innerDimension,\n height: innerDimension\n };\n}\n\nfunction _continuousPulseStepTwo(borderWidth) {\n return {\n opacity: 1,\n borderWidth: borderWidth\n };\n}\n\nfunction _continuousPulseStepThree() {\n return {\n opacity: 1\n };\n}\n\nfunction _continuousPulseStepFour(beaconColorTwo, outerDimension) {\n return {\n borderWidth: '0',\n width: outerDimension,\n height: outerDimension,\n opacity: 0,\n borderColor: beaconColorTwo\n };\n}\n\nfunction _continuousPulseStepFive(beaconColorOne, innerDimension) {\n return tslib_1.__assign({}, _continuousPulseStepOne(beaconColorOne, innerDimension), {\n opacity: 0\n });\n}\n\nfunction _continuousPulseAnimationDouble(beaconColorOne, beaconColorTwo, innerDimension, outerDimension, borderWidth) {\n return keyframes({\n '0%': _continuousPulseStepOne(beaconColorOne, innerDimension),\n '1.42%': _continuousPulseStepTwo(borderWidth),\n '3.57%': _continuousPulseStepThree(),\n '7.14%': _continuousPulseStepFour(beaconColorTwo, outerDimension),\n '8%': _continuousPulseStepFive(beaconColorOne, innerDimension),\n '29.99%': _continuousPulseStepFive(beaconColorOne, innerDimension),\n '30%': _continuousPulseStepOne(beaconColorOne, innerDimension),\n '31.42%': _continuousPulseStepTwo(borderWidth),\n '33.57%': _continuousPulseStepThree(),\n '37.14%': _continuousPulseStepFour(beaconColorTwo, outerDimension),\n '38%': _continuousPulseStepFive(beaconColorOne, innerDimension),\n '79.42%': _continuousPulseStepFive(beaconColorOne, innerDimension),\n '79.43': _continuousPulseStepOne(beaconColorOne, innerDimension),\n '81.85': _continuousPulseStepTwo(borderWidth),\n '83.42': _continuousPulseStepThree(),\n '87%': _continuousPulseStepFour(beaconColorTwo, outerDimension),\n '100%': {}\n });\n}\n\nfunction _continuousPulseAnimationSingle(beaconColorOne, beaconColorTwo, innerDimension, outerDimension, borderWidth) {\n return keyframes({\n '0%': _continuousPulseStepOne(beaconColorOne, innerDimension),\n '14.2%': _continuousPulseStepTwo(borderWidth),\n '35.7%': _continuousPulseStepThree(),\n '71.4%': _continuousPulseStepFour(beaconColorTwo, outerDimension),\n '100%': {}\n });\n}\n\nfunction _createDefaultAnimation(animationName, delayLength) {\n return {\n animationName: animationName,\n animationIterationCount: DEFAULT_ITERATION_COUNT,\n animationDuration: DEFAULT_DURATION,\n animationDelay: delayLength || DEFAULT_DELAY\n };\n}\n\nexport var PulsingBeaconAnimationStyles = {\n continuousPulseAnimationDouble: _continuousPulseAnimationDouble,\n continuousPulseAnimationSingle: _continuousPulseAnimationSingle,\n createDefaultAnimation: _createDefaultAnimation\n};","import { Stylesheet } from '@uifabric/merge-styles';\nimport { memoizeFunction } from '@uifabric/utilities';\n/**\n * Internal memoized function which simply takes in the class map and the\n * disable boolean. These immutable values can be memoized.\n */\n\nvar _getGlobalClassNames = memoizeFunction(function (classNames, disableGlobalClassNames) {\n var styleSheet = Stylesheet.getInstance();\n\n if (disableGlobalClassNames) {\n // disable global classnames\n return Object.keys(classNames).reduce(function (acc, className) {\n acc[className] = styleSheet.getClassName(classNames[className]);\n return acc;\n }, {});\n } // use global classnames\n\n\n return classNames;\n});\n/**\n * Checks for the `disableGlobalClassNames` property on the `theme` to determine if it should return `classNames`\n * Note that calls to this function are memoized.\n *\n * @param classNames - The collection of global class names that apply when the flag is false. Make sure to pass in\n * the same instance on each call to benefit from memoization.\n * @param theme - The theme to check the flag on\n * @param disableGlobalClassNames - Optional. Explicitly opt in/out of disabling global classnames. Defaults to false.\n */\n\n\nexport function getGlobalClassNames(classNames, theme, disableGlobalClassNames) {\n return _getGlobalClassNames(classNames, disableGlobalClassNames !== undefined ? disableGlobalClassNames : theme.disableGlobalClassNames);\n}","/**\n * Simple deep merge function. Takes all arguments and returns a deep copy of the objects merged\n * together in the order provided. If an object creates a circular reference, it will assign the\n * original reference.\n */\nexport function merge(target) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var arg = args_1[_a];\n\n _merge(target || {}, arg);\n }\n\n return target;\n}\n/**\n * The _merge helper iterates through all props on source and assigns them to target.\n * When the value is an object, we will create a deep clone of the object. However if\n * there is a circular reference, the value will not be deep cloned and will persist\n * the reference.\n */\n// tslint:disable-next-line:no-any\n\nfunction _merge(target, source, circularReferences) {\n if (circularReferences === void 0) {\n circularReferences = [];\n }\n\n circularReferences.push(source);\n\n for (var name_1 in source) {\n if (source.hasOwnProperty(name_1)) {\n var value = source[name_1];\n\n if (typeof value === 'object') {\n var isCircularReference = circularReferences.indexOf(value) > -1;\n target[name_1] = isCircularReference ? value : _merge(target[name_1] || {}, value, circularReferences);\n } else {\n target[name_1] = value;\n }\n }\n }\n\n circularReferences.pop();\n return target;\n}","export var DefaultSpacing = {\n s2: '4px',\n s1: '8px',\n m: '16px',\n l1: '20px',\n l2: '32px'\n};","var _a;\n\nimport * as tslib_1 from \"tslib\";\nimport { Customizations, merge, getWindow } from '@uifabric/utilities';\nimport { DefaultFontStyles } from './DefaultFontStyles';\nimport { DefaultPalette } from './DefaultPalette';\nimport { DefaultSpacing } from './DefaultSpacing';\nimport { loadTheme as legacyLoadTheme } from '@microsoft/load-themed-styles';\nimport { DefaultEffects } from './DefaultEffects';\n\nvar _theme = createTheme({\n palette: DefaultPalette,\n semanticColors: _makeSemanticColorsFromPalette(DefaultPalette, false, false),\n fonts: DefaultFontStyles,\n isInverted: false,\n disableGlobalClassNames: false\n});\n\nvar _onThemeChangeCallbacks = [];\nexport var ThemeSettingName = 'theme';\n\nif (!Customizations.getSettings([ThemeSettingName]).theme) {\n var win = getWindow(); // tslint:disable:no-string-literal no-any\n\n if (win && win['FabricConfig'] && win['FabricConfig'].theme) {\n _theme = createTheme(win['FabricConfig'].theme);\n } // tslint:enable:no-string-literal no-any\n // Set the default theme.\n\n\n Customizations.applySettings((_a = {}, _a[ThemeSettingName] = _theme, _a));\n}\n/**\n * Gets the theme object\n * @param depComments - Whether to include deprecated tags as comments for deprecated slots.\n */\n\n\nexport function getTheme(depComments) {\n if (depComments === void 0) {\n depComments = false;\n }\n\n if (depComments === true) {\n _theme = createTheme({}, depComments);\n }\n\n return _theme;\n}\n/**\n * Registers a callback that gets called whenever the theme changes.\n * This should only be used when the component cannot automatically get theme changes through its state.\n * This will not register duplicate callbacks.\n */\n\nexport function registerOnThemeChangeCallback(callback) {\n if (_onThemeChangeCallbacks.indexOf(callback) === -1) {\n _onThemeChangeCallbacks.push(callback);\n }\n}\n/**\n * See registerOnThemeChangeCallback().\n * Removes previously registered callbacks.\n */\n\nexport function removeOnThemeChangeCallback(callback) {\n var i = _onThemeChangeCallbacks.indexOf(callback);\n\n if (i === -1) {\n return;\n }\n\n _onThemeChangeCallbacks.splice(i, 1);\n}\n/**\n * Applies the theme, while filling in missing slots.\n * @param theme - Partial theme object.\n * @param depComments - Whether to include deprecated tags as comments for deprecated slots.\n */\n\nexport function loadTheme(theme, depComments) {\n var _a;\n\n if (depComments === void 0) {\n depComments = false;\n }\n\n _theme = createTheme(theme, depComments); // Invoke the legacy method of theming the page as well.\n\n legacyLoadTheme(tslib_1.__assign({}, _theme.palette, _theme.semanticColors, _theme.effects, _loadFonts(_theme)));\n Customizations.applySettings((_a = {}, _a[ThemeSettingName] = _theme, _a));\n\n _onThemeChangeCallbacks.forEach(function (callback) {\n try {\n callback(_theme);\n } catch (e) {// don't let a bad callback break everything else\n }\n });\n\n return _theme;\n}\n/**\n * Loads font variables into a JSON object.\n * @param theme - The theme object\n */\n\nfunction _loadFonts(theme) {\n var lines = {};\n\n for (var _i = 0, _a = Object.keys(theme.fonts); _i < _a.length; _i++) {\n var fontName = _a[_i];\n var font = theme.fonts[fontName];\n\n for (var _b = 0, _c = Object.keys(font); _b < _c.length; _b++) {\n var propName = _c[_b];\n var name_1 = fontName + propName.charAt(0).toUpperCase() + propName.slice(1);\n var value = font[propName];\n\n if (propName === 'fontSize' && typeof value === 'number') {\n // if it's a number, convert it to px by default like our theming system does\n value = value + 'px';\n }\n\n lines[name_1] = value;\n }\n }\n\n return lines;\n}\n/**\n * Creates a custom theme definition which can be used with the Customizer.\n * @param theme - Partial theme object.\n * @param depComments - Whether to include deprecated tags as comments for deprecated slots.\n */\n\n\nexport function createTheme(theme, depComments) {\n if (depComments === void 0) {\n depComments = false;\n }\n\n var newPalette = tslib_1.__assign({}, DefaultPalette, theme.palette);\n\n if (!theme.palette || !theme.palette.accent) {\n newPalette.accent = newPalette.themePrimary;\n } // mix in custom overrides with good slots first, since custom overrides might be used in fixing deprecated slots\n\n\n var newSemanticColors = tslib_1.__assign({}, _makeSemanticColorsFromPalette(newPalette, !!theme.isInverted, depComments), theme.semanticColors);\n\n var defaultFontStyles = tslib_1.__assign({}, DefaultFontStyles);\n\n if (theme.defaultFontStyle) {\n for (var _i = 0, _a = Object.keys(defaultFontStyles); _i < _a.length; _i++) {\n var fontStyle = _a[_i];\n defaultFontStyles[fontStyle] = merge({}, defaultFontStyles[fontStyle], theme.defaultFontStyle);\n }\n }\n\n if (theme.fonts) {\n for (var _b = 0, _c = Object.keys(theme.fonts); _b < _c.length; _b++) {\n var fontStyle = _c[_b];\n defaultFontStyles[fontStyle] = merge({}, defaultFontStyles[fontStyle], theme.fonts[fontStyle]);\n }\n }\n\n return {\n palette: newPalette,\n fonts: tslib_1.__assign({}, defaultFontStyles),\n rtl: theme.rtl,\n semanticColors: newSemanticColors,\n isInverted: !!theme.isInverted,\n disableGlobalClassNames: !!theme.disableGlobalClassNames,\n spacing: tslib_1.__assign({}, DefaultSpacing, theme.spacing),\n effects: tslib_1.__assign({}, DefaultEffects, theme.effects)\n };\n}\n/**\n * Helper to pull a given property name from a given set of sources, in order, if available. Otherwise returns the property name.\n */\n\nfunction _expandFrom(propertyName) {\n var maps = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n maps[_i - 1] = arguments[_i];\n }\n\n if (propertyName) {\n for (var _a = 0, maps_1 = maps; _a < maps_1.length; _a++) {\n var map = maps_1[_a];\n\n if (map[propertyName]) {\n return map[propertyName];\n }\n }\n }\n\n return propertyName;\n} // Generates all the semantic slot colors based on the Fabric palette.\n// We'll use these as fallbacks for semantic slots that the passed in theme did not define.\n\n\nfunction _makeSemanticColorsFromPalette(p, isInverted, depComments) {\n var toReturn = {\n // DEFAULTS\n bodyBackground: p.white,\n bodyBackgroundHovered: p.neutralLighter,\n bodyBackgroundChecked: p.neutralLight,\n bodyStandoutBackground: p.neutralLighterAlt,\n bodyFrameBackground: p.white,\n bodyFrameDivider: p.neutralLight,\n bodyText: p.neutralPrimary,\n bodyTextChecked: p.black,\n bodySubtext: p.neutralSecondary,\n bodyDivider: p.neutralLight,\n disabledBodyText: p.neutralTertiary,\n disabledBodySubtext: p.neutralTertiaryAlt,\n disabledBorder: p.neutralTertiaryAlt,\n focusBorder: p.neutralSecondary,\n variantBorder: p.neutralLight,\n variantBorderHovered: p.neutralTertiary,\n defaultStateBackground: p.neutralLighterAlt,\n // LINKS\n actionLink: p.neutralPrimary,\n actionLinkHovered: p.neutralDark,\n link: p.themePrimary,\n linkHovered: p.themeDarker,\n // BUTTONS\n buttonBackground: p.white,\n buttonBackgroundChecked: p.neutralTertiaryAlt,\n buttonBackgroundHovered: p.neutralLighter,\n buttonBackgroundCheckedHovered: p.neutralLight,\n buttonBackgroundPressed: p.neutralLight,\n buttonBackgroundDisabled: p.neutralLighter,\n buttonBorder: p.neutralSecondaryAlt,\n buttonText: p.neutralPrimary,\n buttonTextHovered: p.neutralDark,\n buttonTextChecked: p.neutralDark,\n buttonTextCheckedHovered: p.black,\n buttonTextPressed: p.neutralDark,\n buttonTextDisabled: p.neutralTertiary,\n buttonBorderDisabled: p.neutralLighter,\n primaryButtonBackground: p.themePrimary,\n primaryButtonBackgroundHovered: p.themeDarkAlt,\n primaryButtonBackgroundPressed: p.themeDark,\n primaryButtonBackgroundDisabled: p.neutralLighter,\n primaryButtonBorder: 'transparent',\n primaryButtonText: p.white,\n primaryButtonTextHovered: p.white,\n primaryButtonTextPressed: p.white,\n primaryButtonTextDisabled: p.neutralQuaternary,\n accentButtonBackground: p.accent,\n accentButtonText: p.white,\n // INPUTS\n inputBorder: p.neutralSecondary,\n inputBorderHovered: p.neutralPrimary,\n inputBackground: p.white,\n inputBackgroundChecked: p.themePrimary,\n inputBackgroundCheckedHovered: p.themeDark,\n inputPlaceholderBackgroundChecked: p.themeLighter,\n inputForegroundChecked: p.white,\n inputIcon: p.themePrimary,\n inputIconHovered: p.themeDark,\n inputIconDisabled: p.neutralTertiary,\n inputFocusBorderAlt: p.themePrimary,\n smallInputBorder: p.neutralSecondary,\n inputText: p.neutralPrimary,\n inputTextHovered: p.neutralDark,\n inputPlaceholderText: p.neutralSecondary,\n disabledBackground: p.neutralLighter,\n disabledText: p.neutralTertiary,\n disabledSubtext: p.neutralQuaternary,\n // LISTS\n listBackground: p.white,\n listText: p.neutralPrimary,\n listItemBackgroundHovered: p.neutralLighter,\n listItemBackgroundChecked: p.neutralLight,\n listItemBackgroundCheckedHovered: p.neutralQuaternaryAlt,\n listHeaderBackgroundHovered: p.neutralLighter,\n listHeaderBackgroundPressed: p.neutralLight,\n // MENUS\n menuBackground: p.white,\n menuDivider: p.neutralTertiaryAlt,\n menuIcon: p.themePrimary,\n menuHeader: p.themePrimary,\n menuItemBackgroundHovered: p.neutralLighter,\n menuItemBackgroundPressed: p.neutralLight,\n menuItemText: p.neutralPrimary,\n menuItemTextHovered: p.neutralDark,\n errorText: !isInverted ? p.redDark : '#ff5f5f',\n warningText: !isInverted ? '#333333' : '#ffffff',\n successText: !isInverted ? '#107C10' : '#92c353',\n errorBackground: !isInverted ? 'rgba(245, 135, 145, .2)' : 'rgba(232, 17, 35, .5)',\n blockingBackground: !isInverted ? 'rgba(250, 65, 0, .2)' : 'rgba(234, 67, 0, .5)',\n warningBackground: !isInverted ? 'rgba(255, 200, 10, .2)' : 'rgba(255, 251, 0, .6)',\n warningHighlight: !isInverted ? '#ffb900' : '#fff100',\n successBackground: !isInverted ? 'rgba(95, 210, 85, .2)' : 'rgba(186, 216, 10, .4)',\n // Deprecated slots, second pass by _fixDeprecatedSlots() later for self-referential slots\n listTextColor: '',\n menuItemBackgroundChecked: p.neutralLight\n };\n return _fixDeprecatedSlots(toReturn, depComments);\n}\n\nfunction _fixDeprecatedSlots(s, depComments) {\n // Add @deprecated tag as comment if enabled\n var dep = '';\n\n if (depComments === true) {\n dep = ' /* @deprecated */';\n }\n\n s.listTextColor = s.listText + dep;\n s.menuItemBackgroundChecked += dep;\n return s;\n}","import { buildClassMap } from '../utilities/index';\nimport { AnimationStyles } from '../styles/index';\n/**\n * {@docCategory AnimationClassNames}\n */\n\nexport var AnimationClassNames = buildClassMap(AnimationStyles);","import { mergeStyles } from '@uifabric/merge-styles';\nimport { DefaultPalette } from '../styles/DefaultPalette';\nimport { getTheme } from '../styles/index';\nexport var ColorClassNames = {};\n\nfor (var colorName in DefaultPalette) {\n if (DefaultPalette.hasOwnProperty(colorName)) {\n // Foreground color\n _defineGetter(ColorClassNames, colorName, '', false, 'color'); // Hover color\n\n\n _defineGetter(ColorClassNames, colorName, 'Hover', true, 'color'); // Background color\n\n\n _defineGetter(ColorClassNames, colorName, 'Background', false, 'background'); // Background hover\n\n\n _defineGetter(ColorClassNames, colorName, 'BackgroundHover', true, 'background'); // Border color\n\n\n _defineGetter(ColorClassNames, colorName, 'Border', false, 'borderColor'); // Border hover color\n\n\n _defineGetter(ColorClassNames, colorName, 'BorderHover', true, 'borderColor');\n }\n}\n/**\n * Defines a getter for the given class configuration.\n */\n\n\nfunction _defineGetter(obj, colorName, suffix, isHover, cssProperty) {\n Object.defineProperty(obj, colorName + suffix, {\n get: function get() {\n var _a; // tslint:disable-next-line:no-any\n\n\n var style = (_a = {}, _a[cssProperty] = getTheme().palette[colorName], _a);\n return mergeStyles(isHover ? {\n selectors: {\n ':hover': style\n }\n } : style).toString();\n },\n enumerable: true,\n configurable: true\n });\n}","import { buildClassMap } from '../utilities/buildClassMap';\nimport { DefaultFontStyles } from '../styles/DefaultFontStyles';\n/**\n * {@docCategory FontClassNames}\n */\n\nexport var FontClassNames = buildClassMap(DefaultFontStyles);","// @uifabric/styling@7.10.0\n// Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only.\nimport { setVersion } from '@uifabric/set-version';\nsetVersion('@uifabric/styling', '7.10.0');","export * from './classNames/index';\nexport * from './styles/index';\nexport * from './utilities/index';\nexport * from './MergeStyles';\nimport './version';","/**\n * The possible methods that can be used to fit the image.\n * {@docCategory Image}\n */\nexport var ImageFit;\n\n(function (ImageFit) {\n /**\n * The image is not scaled. The image is centered and cropped within the content box.\n */\n ImageFit[ImageFit[\"center\"] = 0] = \"center\";\n /**\n * The image is scaled to maintain its aspect ratio while being fully contained within the frame. The image will\n * be centered horizontally and vertically within the frame. The space in the top and bottom or in the sides of\n * the frame will be empty depending on the difference in aspect ratio between the image and the frame.\n */\n\n ImageFit[ImageFit[\"contain\"] = 1] = \"contain\";\n /**\n * The image is scaled to maintain its aspect ratio while filling the frame. Portions of the image will be cropped from\n * the top and bottom, or from the sides, depending on the difference in aspect ratio between the image and the frame.\n */\n\n ImageFit[ImageFit[\"cover\"] = 2] = \"cover\";\n /**\n * Neither the image nor the frame are scaled. If their sizes do not match, the image will either be cropped or the\n * frame will have empty space.\n */\n\n ImageFit[ImageFit[\"none\"] = 3] = \"none\";\n /**\n * The image will be centered horizontally and vertically within the frame and maintains its aspect ratio. It will\n * behave as ImageFit.center if the image's natural height or width is less than the Image frame's height or width,\n * but if both natural height and width are larger than the frame it will behave as ImageFit.cover.\n */\n\n ImageFit[ImageFit[\"centerCover\"] = 4] = \"centerCover\";\n /**\n * The image will be centered horizontally and vertically within the frame and maintains its aspect ratio. It will\n * behave as ImageFit.center if the image's natural height and width is less than the Image frame's height and width,\n * but if either natural height or width are larger than the frame it will behave as ImageFit.contain.\n */\n\n ImageFit[ImageFit[\"centerContain\"] = 5] = \"centerContain\";\n})(ImageFit || (ImageFit = {}));\n/**\n * The cover style to be used on the image\n * {@docCategory Image}\n */\n\n\nexport var ImageCoverStyle;\n\n(function (ImageCoverStyle) {\n /**\n * The image will be shown at 100% height of container and the width will be scaled accordingly\n */\n ImageCoverStyle[ImageCoverStyle[\"landscape\"] = 0] = \"landscape\";\n /**\n * The image will be shown at 100% width of container and the height will be scaled accordingly\n */\n\n ImageCoverStyle[ImageCoverStyle[\"portrait\"] = 1] = \"portrait\";\n})(ImageCoverStyle || (ImageCoverStyle = {}));\n/**\n * {@docCategory Image}\n */\n\n\nexport var ImageLoadState;\n\n(function (ImageLoadState) {\n /**\n * The image has not yet been loaded, and there is no error yet.\n */\n ImageLoadState[ImageLoadState[\"notLoaded\"] = 0] = \"notLoaded\";\n /**\n * The image has been loaded successfully.\n */\n\n ImageLoadState[ImageLoadState[\"loaded\"] = 1] = \"loaded\";\n /**\n * An error has been encountered while loading the image.\n */\n\n ImageLoadState[ImageLoadState[\"error\"] = 2] = \"error\";\n /**\n * Deprecated at v1.3.6, to replace the src in case of errors, use `onLoadingStateChange` instead\n * and rerender the Image with a difference src.\n * @deprecated Use `onLoadingStateChange` instead\n * and rerender the Image with a difference src.\n */\n\n ImageLoadState[ImageLoadState[\"errorLoaded\"] = 3] = \"errorLoaded\";\n})(ImageLoadState || (ImageLoadState = {}));","export var DirectionalHint = {\n /**\n * Appear above the target element, with the left edges of the callout and target aligning.\n */\n topLeftEdge: 0,\n\n /**\n * Appear above the target element, with the centers of the callout and target aligning.\n */\n topCenter: 1,\n\n /**\n * Appear above the target element, with the right edges of the callout and target aligning.\n */\n topRightEdge: 2,\n\n /**\n * Appear above the target element, aligning with the target element such that the callout tends toward the center of the screen.\n */\n topAutoEdge: 3,\n\n /**\n * Appear below the target element, with the left edges of the callout and target aligning.\n */\n bottomLeftEdge: 4,\n\n /**\n * Appear below the target element, with the centers of the callout and target aligning.\n */\n bottomCenter: 5,\n\n /**\n * Appear below the target element, with the right edges of the callout and target aligning.\n */\n bottomRightEdge: 6,\n\n /**\n * Appear below the target element, aligning with the target element such that the callout tends toward the center of the screen.\n */\n bottomAutoEdge: 7,\n\n /**\n * Appear to the left of the target element, with the top edges of the callout and target aligning.\n */\n leftTopEdge: 8,\n\n /**\n * Appear to the left of the target element, with the centers of the callout and target aligning.\n */\n leftCenter: 9,\n\n /**\n * Appear to the left of the target element, with the bottom edges of the callout and target aligning.\n */\n leftBottomEdge: 10,\n\n /**\n * Appear to the right of the target element, with the top edges of the callout and target aligning.\n */\n rightTopEdge: 11,\n\n /**\n * Appear to the right of the target element, with the centers of the callout and target aligning.\n */\n rightCenter: 12,\n\n /**\n * Appear to the right of the target element, with the bottom edges of the callout and target aligning.\n */\n rightBottomEdge: 13\n};","import { _isSSR } from './setSSR';\nvar _window = undefined; // Note: Accessing \"window\" in IE11 is somewhat expensive, and calling \"typeof window\"\n// hits a memory leak, whereas aliasing it and calling \"typeof _window\" does not.\n// Caching the window value at the file scope lets us minimize the impact.\n\ntry {\n _window = window;\n} catch (e) {}\n/* no-op */\n\n/**\n * Helper to get the window object. The helper will make sure to use a cached variable\n * of \"window\", to avoid overhead and memory leaks in IE11. Note that in popup scenarios the\n * window object won't match the \"global\" window object, and for these scenarios, you should\n * pass in an element hosted within the popup.\n *\n * @public\n */\n\n\nexport function getWindow(rootElement) {\n if (_isSSR || typeof _window === 'undefined') {\n return undefined;\n } else {\n var el = rootElement;\n return el && el.ownerDocument && el.ownerDocument.defaultView ? el.ownerDocument.defaultView : _window;\n }\n}","/**\n * Simulated enum for keycodes. These will get inlined by uglify when used much like an enum\n *\n * @public\n * {@docCategory KeyCodes}\n */\nexport var KeyCodes = {\n backspace: 8,\n tab: 9,\n enter: 13,\n shift: 16,\n ctrl: 17,\n alt: 18,\n pauseBreak: 19,\n capslock: 20,\n escape: 27,\n space: 32,\n pageUp: 33,\n pageDown: 34,\n end: 35,\n home: 36,\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n insert: 45,\n del: 46,\n zero: 48,\n one: 49,\n two: 50,\n three: 51,\n four: 52,\n five: 53,\n six: 54,\n seven: 55,\n eight: 56,\n nine: 57,\n a: 65,\n b: 66,\n c: 67,\n d: 68,\n e: 69,\n f: 70,\n g: 71,\n h: 72,\n i: 73,\n j: 74,\n k: 75,\n l: 76,\n m: 77,\n n: 78,\n o: 79,\n p: 80,\n q: 81,\n r: 82,\n s: 83,\n t: 84,\n u: 85,\n v: 86,\n w: 87,\n x: 88,\n y: 89,\n z: 90,\n leftWindow: 91,\n rightWindow: 92,\n select: 93,\n zero_numpad: 96,\n one_numpad: 97,\n two_numpad: 98,\n three_numpad: 99,\n four_numpad: 100,\n five_numpad: 101,\n six_numpad: 102,\n seven_numpad: 103,\n eight_numpad: 104,\n nine_numpad: 105,\n multiply: 106,\n add: 107,\n subtract: 109,\n decimalPoint: 110,\n divide: 111,\n f1: 112,\n f2: 113,\n f3: 114,\n f4: 115,\n f5: 116,\n f6: 117,\n f7: 118,\n f8: 119,\n f9: 120,\n f10: 121,\n f11: 122,\n f12: 123,\n numlock: 144,\n scrollLock: 145,\n semicolon: 186,\n equalSign: 187,\n comma: 188,\n dash: 189,\n period: 190,\n forwardSlash: 191,\n graveAccent: 192,\n openBracket: 219,\n backSlash: 220,\n closeBracket: 221,\n singleQuote: 222\n};","import * as tslib_1 from \"tslib\";\nexport var InjectionMode = {\n /**\n * Avoids style injection, use getRules() to read the styles.\n */\n none: 0,\n\n /**\n * Inserts rules using the insertRule api.\n */\n insertNode: 1,\n\n /**\n * Appends rules using appendChild.\n */\n appendChild: 2\n};\nvar STYLESHEET_SETTING = '__stylesheet__';\n/**\n * MSIE 11 doesn't cascade styles based on DOM ordering, but rather on the order that each style node\n * is created. As such, to maintain consistent priority, IE11 should reuse a single style node.\n */\n\nvar REUSE_STYLE_NODE = typeof navigator !== 'undefined' && /rv:11.0/.test(navigator.userAgent); // tslint:disable-next-line:no-any\n\nvar _global = {}; // Grab window.\n\ntry {\n _global = window;\n} catch (_a) {\n /* leave as blank object */\n}\n\nvar _stylesheet;\n/**\n * Represents the state of styles registered in the page. Abstracts\n * the surface for adding styles to the stylesheet, exposes helpers\n * for reading the styles registered in server rendered scenarios.\n *\n * @public\n */\n\n\nvar Stylesheet =\n/** @class */\nfunction () {\n function Stylesheet(config) {\n this._rules = [];\n this._preservedRules = [];\n this._rulesToInsert = [];\n this._counter = 0;\n this._keyToClassName = {};\n this._onResetCallbacks = []; // tslint:disable-next-line:no-any\n\n this._classNameToArgs = {};\n this._config = tslib_1.__assign({\n injectionMode: InjectionMode.insertNode,\n defaultPrefix: 'css',\n namespace: undefined,\n cspSettings: undefined\n }, config);\n }\n /**\n * Gets the singleton instance.\n */\n\n\n Stylesheet.getInstance = function () {\n // tslint:disable-next-line:no-any\n _stylesheet = _global[STYLESHEET_SETTING];\n\n if (!_stylesheet || _stylesheet._lastStyleElement && _stylesheet._lastStyleElement.ownerDocument !== document) {\n // tslint:disable-next-line:no-string-literal\n var fabricConfig = _global && _global['FabricConfig'] || {};\n _stylesheet = _global[STYLESHEET_SETTING] = new Stylesheet(fabricConfig.mergeStyles);\n }\n\n return _stylesheet;\n };\n /**\n * Configures the stylesheet.\n */\n\n\n Stylesheet.prototype.setConfig = function (config) {\n this._config = tslib_1.__assign({}, this._config, config);\n };\n /**\n * Configures a reset callback.\n *\n * @param callback - A callback which will be called when the Stylesheet is reset.\n */\n\n\n Stylesheet.prototype.onReset = function (callback) {\n this._onResetCallbacks.push(callback);\n };\n /**\n * Generates a unique classname.\n *\n * @param displayName - Optional value to use as a prefix.\n */\n\n\n Stylesheet.prototype.getClassName = function (displayName) {\n var namespace = this._config.namespace;\n var prefix = displayName || this._config.defaultPrefix;\n return \"\" + (namespace ? namespace + '-' : '') + prefix + \"-\" + this._counter++;\n };\n /**\n * Used internally to cache information about a class which was\n * registered with the stylesheet.\n */\n\n\n Stylesheet.prototype.cacheClassName = function (className, key, args, rules) {\n this._keyToClassName[key] = className;\n this._classNameToArgs[className] = {\n args: args,\n rules: rules\n };\n };\n /**\n * Gets the appropriate classname given a key which was previously\n * registered using cacheClassName.\n */\n\n\n Stylesheet.prototype.classNameFromKey = function (key) {\n return this._keyToClassName[key];\n };\n /**\n * Gets the arguments associated with a given classname which was\n * previously registered using cacheClassName.\n */\n\n\n Stylesheet.prototype.argsFromClassName = function (className) {\n var entry = this._classNameToArgs[className];\n return entry && entry.args;\n };\n /**\n * Gets the arguments associated with a given classname which was\n * previously registered using cacheClassName.\n */\n\n\n Stylesheet.prototype.insertedRulesFromClassName = function (className) {\n var entry = this._classNameToArgs[className];\n return entry && entry.rules;\n };\n /**\n * Inserts a css rule into the stylesheet.\n * @param preserve - Preserves the rule beyond a reset boundary.\n */\n\n\n Stylesheet.prototype.insertRule = function (rule, preserve) {\n var injectionMode = this._config.injectionMode;\n var element = injectionMode !== InjectionMode.none ? this._getStyleElement() : undefined;\n\n if (preserve) {\n this._preservedRules.push(rule);\n }\n\n if (element) {\n switch (this._config.injectionMode) {\n case InjectionMode.insertNode:\n var sheet = element.sheet;\n\n try {\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {// The browser will throw exceptions on unsupported rules (such as a moz prefix in webkit.)\n // We need to swallow the exceptions for this scenario, otherwise we'd need to filter\n // which could be slower and bulkier.\n }\n\n break;\n\n case InjectionMode.appendChild:\n element.appendChild(document.createTextNode(rule));\n break;\n }\n } else {\n this._rules.push(rule);\n }\n\n if (this._config.onInsertRule) {\n this._config.onInsertRule(rule);\n }\n };\n /**\n * Gets all rules registered with the stylesheet; only valid when\n * using InsertionMode.none.\n */\n\n\n Stylesheet.prototype.getRules = function (includePreservedRules) {\n return (includePreservedRules ? this._preservedRules.join('') : '') + this._rules.join('') + this._rulesToInsert.join('');\n };\n /**\n * Resets the internal state of the stylesheet. Only used in server\n * rendered scenarios where we're using InsertionMode.none.\n */\n\n\n Stylesheet.prototype.reset = function () {\n this._rules = [];\n this._rulesToInsert = [];\n this._counter = 0;\n this._classNameToArgs = {};\n this._keyToClassName = {};\n\n this._onResetCallbacks.forEach(function (callback) {\n return callback();\n });\n }; // Forces the regeneration of incoming styles without totally resetting the stylesheet.\n\n\n Stylesheet.prototype.resetKeys = function () {\n this._keyToClassName = {};\n };\n\n Stylesheet.prototype._getStyleElement = function () {\n var _this = this;\n\n if (!this._styleElement && typeof document !== 'undefined') {\n this._styleElement = this._createStyleElement();\n\n if (!REUSE_STYLE_NODE) {\n // Reset the style element on the next frame.\n window.requestAnimationFrame(function () {\n _this._styleElement = undefined;\n });\n }\n }\n\n return this._styleElement;\n };\n\n Stylesheet.prototype._createStyleElement = function () {\n var head = document.head;\n var styleElement = document.createElement('style');\n styleElement.setAttribute('data-merge-styles', 'true');\n var cspSettings = this._config.cspSettings;\n\n if (cspSettings) {\n if (cspSettings.nonce) {\n styleElement.setAttribute('nonce', cspSettings.nonce);\n }\n }\n\n if (this._lastStyleElement) {\n // If the `nextElementSibling` is null, then the insertBefore will act as a regular append.\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore#Syntax\n head.insertBefore(styleElement, this._lastStyleElement.nextElementSibling);\n } else {\n var placeholderStyleTag = this._findPlaceholderStyleTag();\n\n if (placeholderStyleTag) {\n head.insertBefore(styleElement, placeholderStyleTag.nextElementSibling);\n } else {\n head.insertBefore(styleElement, head.childNodes[0]);\n }\n }\n\n this._lastStyleElement = styleElement;\n return styleElement;\n };\n\n Stylesheet.prototype._findPlaceholderStyleTag = function () {\n var head = document.head;\n\n if (head) {\n return head.querySelector('style[data-merge-styles]');\n }\n\n return null;\n };\n\n return Stylesheet;\n}();\n\nexport { Stylesheet };","import { _isSSR } from './setSSR';\n/**\n * Helper to get the document object. Note that in popup window cases, document\n * might be the wrong document, which is why we look at ownerDocument for the\n * truth. Also note that the SSR flag is used to test ssr scenarios even if\n * document is defined (from JSDOM for example.)\n *\n * @public\n */\n\nexport function getDocument(rootElement) {\n if (_isSSR || typeof document === 'undefined') {\n return undefined;\n } else {\n var el = rootElement;\n return el && el.ownerDocument ? el.ownerDocument : document;\n }\n}","import * as tslib_1 from \"tslib\";\nimport { GlobalSettings } from '../GlobalSettings';\nvar CustomizationsGlobalKey = 'customizations';\nvar NO_CUSTOMIZATIONS = {\n settings: {},\n scopedSettings: {},\n inCustomizerContext: false\n};\n\nvar _allSettings = GlobalSettings.getValue(CustomizationsGlobalKey, {\n settings: {},\n scopedSettings: {},\n inCustomizerContext: false\n});\n\nvar _events = [];\n\nvar Customizations =\n/** @class */\nfunction () {\n function Customizations() {}\n\n Customizations.reset = function () {\n _allSettings.settings = {};\n _allSettings.scopedSettings = {};\n };\n /** Apply global Customization settings.\n * @example Customizations.applySettings(\\{ theme: \\{...\\} \\});\n */\n\n\n Customizations.applySettings = function (settings) {\n _allSettings.settings = tslib_1.__assign({}, _allSettings.settings, settings);\n\n Customizations._raiseChange();\n };\n /** Apply Customizations to a particular named scope, like a component.\n * @example Customizations.applyScopedSettings('Nav', \\{ styles: () =\\> \\{\\} \\});\n */\n\n\n Customizations.applyScopedSettings = function (scopeName, settings) {\n _allSettings.scopedSettings[scopeName] = tslib_1.__assign({}, _allSettings.scopedSettings[scopeName], settings);\n\n Customizations._raiseChange();\n };\n\n Customizations.getSettings = function (properties, scopeName, localSettings // tslint:disable-next-line:no-any\n ) {\n if (localSettings === void 0) {\n localSettings = NO_CUSTOMIZATIONS;\n }\n\n var settings = {};\n var localScopedSettings = scopeName && localSettings.scopedSettings[scopeName] || {};\n var globalScopedSettings = scopeName && _allSettings.scopedSettings[scopeName] || {};\n\n for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {\n var property = properties_1[_i];\n settings[property] = localScopedSettings[property] || localSettings.settings[property] || globalScopedSettings[property] || _allSettings.settings[property];\n }\n\n return settings;\n };\n /** Used to run some code that sets Customizations without triggering an update until the end.\n * Useful for applying Customizations that don't affect anything currently rendered, or for\n * applying many customizations at once.\n * @param suppressUpdate - Do not raise the change event at the end, preventing all updates\n */\n\n\n Customizations.applyBatchedUpdates = function (code, suppressUpdate) {\n Customizations._suppressUpdates = true;\n\n try {\n code();\n } catch (_a) {\n /* do nothing */\n }\n\n Customizations._suppressUpdates = false;\n\n if (!suppressUpdate) {\n Customizations._raiseChange();\n }\n };\n\n Customizations.observe = function (onChange) {\n _events.push(onChange);\n };\n\n Customizations.unobserve = function (onChange) {\n _events = _events.filter(function (cb) {\n return cb !== onChange;\n });\n };\n\n Customizations._raiseChange = function () {\n if (!Customizations._suppressUpdates) {\n _events.forEach(function (cb) {\n return cb();\n });\n }\n };\n\n return Customizations;\n}();\n\nexport { Customizations };","import { mergeStyleSets } from '../../Styling';\n/** Class names used in themeable and non-themeable Icon components */\n\nexport var classNames = mergeStyleSets({\n root: {\n display: 'inline-block'\n },\n placeholder: ['ms-Icon-placeHolder', {\n width: '1em'\n }],\n image: ['ms-Icon-imageContainer', {\n overflow: 'hidden'\n }]\n});\n/** Class name used only in non-themeable Icon components */\n\nexport var MS_ICON = 'ms-Icon';\nexport var getStyles = function getStyles(props) {\n var className = props.className,\n iconClassName = props.iconClassName,\n isPlaceholder = props.isPlaceholder,\n isImage = props.isImage,\n styles = props.styles;\n return {\n root: [isPlaceholder && classNames.placeholder, classNames.root, isImage && classNames.image, iconClassName, className, styles && styles.root, styles && styles.imageContainer]\n };\n};","var _vendorSettings;\n\nexport function getVendorSettings() {\n if (!_vendorSettings) {\n var doc = typeof document !== 'undefined' ? document : undefined;\n var nav = typeof navigator !== 'undefined' ? navigator : undefined;\n var userAgent = nav ? nav.userAgent.toLowerCase() : undefined;\n\n if (!doc) {\n _vendorSettings = {\n isWebkit: true,\n isMoz: true,\n isOpera: true,\n isMs: true\n };\n } else {\n _vendorSettings = {\n isWebkit: !!(doc && 'WebkitAppearance' in doc.documentElement.style),\n isMoz: !!(userAgent && userAgent.indexOf('firefox') > -1),\n isOpera: !!(userAgent && userAgent.indexOf('opera') > -1),\n isMs: !!(nav && (/rv:11.0/i.test(nav.userAgent) || /Edge\\/\\d./i.test(navigator.userAgent)))\n };\n }\n }\n\n return _vendorSettings;\n}\n/**\n * Sets the vendor settings for prefixing and vendor specific operations.\n */\n\nexport function setVendorSettings(vendorSettings) {\n _vendorSettings = vendorSettings;\n}","var rules = {};\nexport function kebabRules(rulePairs, index) {\n var rule = rulePairs[index];\n rulePairs[index] = rules[rule] = rules[rule] || rule.replace(/([A-Z])/g, '-$1').toLowerCase();\n}","import { getVendorSettings } from '../getVendorSettings';\nvar autoPrefixNames = {\n 'user-select': 1\n};\nexport function prefixRules(rulePairs, index) {\n var vendorSettings = getVendorSettings();\n var name = rulePairs[index];\n\n if (autoPrefixNames[name]) {\n var value = rulePairs[index + 1];\n\n if (autoPrefixNames[name]) {\n if (vendorSettings.isWebkit) {\n rulePairs.push('-webkit-' + name, value);\n }\n\n if (vendorSettings.isMoz) {\n rulePairs.push('-moz-' + name, value);\n }\n\n if (vendorSettings.isMs) {\n rulePairs.push('-ms-' + name, value);\n }\n\n if (vendorSettings.isOpera) {\n rulePairs.push('-o-' + name, value);\n }\n }\n }\n}","var NON_PIXEL_NUMBER_PROPS = ['column-count', 'font-weight', 'flex', 'flex-grow', 'flex-shrink', 'fill-opacity', 'opacity', 'order', 'z-index', 'zoom'];\nexport function provideUnits(rulePairs, index) {\n var name = rulePairs[index];\n var value = rulePairs[index + 1];\n\n if (typeof value === 'number') {\n var unit = NON_PIXEL_NUMBER_PROPS.indexOf(name) === -1 ? 'px' : '';\n rulePairs[index + 1] = \"\" + value + unit;\n }\n}","var _a;\n\nvar LEFT = 'left';\nvar RIGHT = 'right';\nvar NO_FLIP = '@noflip';\nvar NAME_REPLACEMENTS = (_a = {}, _a[LEFT] = RIGHT, _a[RIGHT] = LEFT, _a);\nvar VALUE_REPLACEMENTS = {\n 'w-resize': 'e-resize',\n 'sw-resize': 'se-resize',\n 'nw-resize': 'ne-resize'\n};\n/**\n * RTLifies the rulePair in the array at the current index. This mutates the array for performance\n * reasons.\n */\n\nexport function rtlifyRules(options, rulePairs, index) {\n if (options.rtl) {\n var name_1 = rulePairs[index];\n\n if (!name_1) {\n return;\n }\n\n var value = rulePairs[index + 1];\n\n if (typeof value === 'string' && value.indexOf(NO_FLIP) >= 0) {\n rulePairs[index + 1] = value.replace(/\\s*(?:\\/\\*\\s*)?\\@noflip\\b(?:\\s*\\*\\/)?\\s*?/g, '');\n } else if (name_1.indexOf(LEFT) >= 0) {\n rulePairs[index] = name_1.replace(LEFT, RIGHT);\n } else if (name_1.indexOf(RIGHT) >= 0) {\n rulePairs[index] = name_1.replace(RIGHT, LEFT);\n } else if (String(value).indexOf(LEFT) >= 0) {\n rulePairs[index + 1] = value.replace(LEFT, RIGHT);\n } else if (String(value).indexOf(RIGHT) >= 0) {\n rulePairs[index + 1] = value.replace(RIGHT, LEFT);\n } else if (NAME_REPLACEMENTS[name_1]) {\n rulePairs[index] = NAME_REPLACEMENTS[name_1];\n } else if (VALUE_REPLACEMENTS[value]) {\n rulePairs[index + 1] = VALUE_REPLACEMENTS[value];\n } else {\n switch (name_1) {\n case 'margin':\n case 'padding':\n rulePairs[index + 1] = flipQuad(value);\n break;\n\n case 'box-shadow':\n rulePairs[index + 1] = negateNum(value, 0);\n break;\n }\n }\n }\n}\n/**\n * Given a string value in a space delimited format (e.g. \"1 2 3 4\"), negates a particular value.\n */\n\nfunction negateNum(value, partIndex) {\n var parts = value.split(' ');\n var numberVal = parseInt(parts[partIndex], 10);\n parts[0] = parts[0].replace(String(numberVal), String(numberVal * -1));\n return parts.join(' ');\n}\n/**\n * Given a string quad, flips the left and right values.\n */\n\n\nfunction flipQuad(value) {\n if (typeof value === 'string') {\n var parts = value.split(' ');\n\n if (parts.length === 4) {\n return parts[0] + \" \" + parts[3] + \" \" + parts[2] + \" \" + parts[1];\n }\n }\n\n return value;\n}","import { Stylesheet } from './Stylesheet';\nimport { kebabRules } from './transforms/kebabRules';\nimport { prefixRules } from './transforms/prefixRules';\nimport { provideUnits } from './transforms/provideUnits';\nimport { rtlifyRules } from './transforms/rtlifyRules';\nvar DISPLAY_NAME = 'displayName';\n\nfunction getDisplayName(rules) {\n var rootStyle = rules && rules['&'];\n return rootStyle ? rootStyle.displayName : undefined;\n}\n\nvar globalSelectorRegExp = /\\:global\\((.+?)\\)/g;\n/**\n * Finds comma separated selectors in a :global() e.g. \":global(.class1, .class2, .class3)\"\n * and wraps them each in their own global \":global(.class1), :global(.class2), :global(.class3)\"\n *\n * @param selectorWithGlobals The selector to process\n * @returns The updated selector\n */\n\nfunction expandCommaSeparatedGlobals(selectorWithGlobals) {\n // We the selector does not have a :global() we can shortcut\n if (!globalSelectorRegExp.test(selectorWithGlobals)) {\n return selectorWithGlobals;\n }\n\n var replacementInfo = [];\n var findGlobal = /\\:global\\((.+?)\\)/g;\n var match = null; // Create a result list for global selectors so we can replace them.\n\n while (match = findGlobal.exec(selectorWithGlobals)) {\n // Only if the found selector is a comma separated list we'll process it.\n if (match[1].indexOf(',') > -1) {\n replacementInfo.push([match.index, match.index + match[0].length, // Wrap each of the found selectors in :global()\n match[1].split(',').map(function (v) {\n return \":global(\" + v.trim() + \")\";\n }).join(', ')]);\n }\n } // Replace the found selectors with their wrapped variants in reverse order\n\n\n return replacementInfo.reverse().reduce(function (selector, _a) {\n var matchIndex = _a[0],\n matchEndIndex = _a[1],\n replacement = _a[2];\n var prefix = selector.slice(0, matchIndex);\n var suffix = selector.slice(matchEndIndex);\n return prefix + replacement + suffix;\n }, selectorWithGlobals);\n}\n\nfunction expandSelector(newSelector, currentSelector) {\n if (newSelector.indexOf(':global(') >= 0) {\n return newSelector.replace(globalSelectorRegExp, '$1');\n } else if (newSelector.indexOf(':') === 0) {\n return currentSelector + newSelector;\n } else if (newSelector.indexOf('&') < 0) {\n return currentSelector + ' ' + newSelector;\n }\n\n return newSelector;\n}\n\nfunction extractRules(args, rules, currentSelector) {\n if (rules === void 0) {\n rules = {\n __order: []\n };\n }\n\n if (currentSelector === void 0) {\n currentSelector = '&';\n }\n\n var stylesheet = Stylesheet.getInstance();\n var currentRules = rules[currentSelector];\n\n if (!currentRules) {\n currentRules = {};\n rules[currentSelector] = currentRules;\n\n rules.__order.push(currentSelector);\n }\n\n for (var _i = 0, args_1 = args; _i < args_1.length; _i++) {\n var arg = args_1[_i]; // If the arg is a string, we need to look up the class map and merge.\n\n if (typeof arg === 'string') {\n var expandedRules = stylesheet.argsFromClassName(arg);\n\n if (expandedRules) {\n extractRules(expandedRules, rules, currentSelector);\n } // Else if the arg is an array, we need to recurse in.\n\n } else if (Array.isArray(arg)) {\n extractRules(arg, rules, currentSelector);\n } else {\n // tslint:disable-next-line:no-any\n for (var prop in arg) {\n if (prop === 'selectors') {\n // tslint:disable-next-line:no-any\n var selectors = arg.selectors;\n\n var _loop_1 = function _loop_1(newSelector) {\n if (selectors.hasOwnProperty(newSelector)) {\n var selectorValue_1 = selectors[newSelector];\n\n if (newSelector.indexOf('@') === 0) {\n newSelector = newSelector + '{' + currentSelector;\n extractRules([selectorValue_1], rules, newSelector);\n } else if (newSelector.indexOf(',') > -1) {\n expandCommaSeparatedGlobals(newSelector).split(',').map(function (s) {\n return s.trim();\n }).forEach(function (separatedSelector) {\n return extractRules([selectorValue_1], rules, expandSelector(separatedSelector, currentSelector));\n });\n } else {\n extractRules([selectorValue_1], rules, expandSelector(newSelector, currentSelector));\n }\n }\n };\n\n for (var newSelector in selectors) {\n _loop_1(newSelector);\n }\n } else {\n if (arg[prop] !== undefined) {\n // Else, add the rule to the currentSelector.\n if (prop === 'margin' || prop === 'padding') {\n // tslint:disable-next-line:no-any\n expandQuads(currentRules, prop, arg[prop]);\n } else {\n // tslint:disable-next-line:no-any\n currentRules[prop] = arg[prop];\n }\n }\n }\n }\n }\n }\n\n return rules;\n}\n\nfunction expandQuads(currentRules, name, value) {\n var parts = typeof value === 'string' ? value.split(' ') : [value];\n currentRules[name + 'Top'] = parts[0];\n currentRules[name + 'Right'] = parts[1] || parts[0];\n currentRules[name + 'Bottom'] = parts[2] || parts[0];\n currentRules[name + 'Left'] = parts[3] || parts[1] || parts[0];\n}\n\nfunction getKeyForRules(options, rules) {\n var serialized = [options.rtl ? 'rtl' : 'ltr'];\n var hasProps = false;\n\n for (var _i = 0, _a = rules.__order; _i < _a.length; _i++) {\n var selector = _a[_i];\n serialized.push(selector);\n var rulesForSelector = rules[selector];\n\n for (var propName in rulesForSelector) {\n if (rulesForSelector.hasOwnProperty(propName) && rulesForSelector[propName] !== undefined) {\n hasProps = true;\n serialized.push(propName, rulesForSelector[propName]);\n }\n }\n }\n\n return hasProps ? serialized.join('') : undefined;\n}\n\nexport function serializeRuleEntries(options, ruleEntries) {\n if (!ruleEntries) {\n return '';\n }\n\n var allEntries = [];\n\n for (var entry in ruleEntries) {\n if (ruleEntries.hasOwnProperty(entry) && entry !== DISPLAY_NAME && ruleEntries[entry] !== undefined) {\n allEntries.push(entry, ruleEntries[entry]);\n }\n } // Apply transforms.\n\n\n for (var i = 0; i < allEntries.length; i += 2) {\n kebabRules(allEntries, i);\n provideUnits(allEntries, i);\n rtlifyRules(options, allEntries, i);\n prefixRules(allEntries, i);\n } // Apply punctuation.\n\n\n for (var i = 1; i < allEntries.length; i += 4) {\n allEntries.splice(i, 1, ':', allEntries[i], ';');\n }\n\n return allEntries.join('');\n}\nexport function styleToRegistration(options) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var rules = extractRules(args);\n var key = getKeyForRules(options, rules);\n\n if (key) {\n var stylesheet = Stylesheet.getInstance();\n var registration = {\n className: stylesheet.classNameFromKey(key),\n key: key,\n args: args\n };\n\n if (!registration.className) {\n registration.className = stylesheet.getClassName(getDisplayName(rules));\n var rulesToInsert = [];\n\n for (var _a = 0, _b = rules.__order; _a < _b.length; _a++) {\n var selector = _b[_a];\n rulesToInsert.push(selector, serializeRuleEntries(options, rules[selector]));\n }\n\n registration.rulesToInsert = rulesToInsert;\n }\n\n return registration;\n }\n}\nexport function applyRegistration(registration) {\n var stylesheet = Stylesheet.getInstance();\n var className = registration.className,\n key = registration.key,\n args = registration.args,\n rulesToInsert = registration.rulesToInsert;\n\n if (rulesToInsert) {\n // rulesToInsert is an ordered array of selector/rule pairs.\n for (var i = 0; i < rulesToInsert.length; i += 2) {\n var rules = rulesToInsert[i + 1];\n\n if (rules) {\n var selector = rulesToInsert[i];\n selector = selector.replace(/&/g, '.' + registration.className); // Insert. Note if a media query, we must close the query with a final bracket.\n\n var processedRule = selector + \"{\" + rules + \"}\" + (selector.indexOf('@') === 0 ? '}' : '');\n stylesheet.insertRule(processedRule);\n }\n }\n\n stylesheet.cacheClassName(className, key, args, rulesToInsert);\n }\n}\nexport function styleToClassName(options) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var registration = styleToRegistration.apply(void 0, [options].concat(args));\n\n if (registration) {\n applyRegistration(registration);\n return registration.className;\n }\n\n return '';\n}","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","/**\n * Sets the current RTL value.\n */\nexport function setRTL(isRTL) {\n if (_rtl !== isRTL) {\n _rtl = isRTL;\n }\n}\n/**\n * Gets the current RTL value.\n */\n\nexport function getRTL() {\n if (_rtl === undefined) {\n _rtl = typeof document !== 'undefined' && !!document.documentElement && document.documentElement.getAttribute('dir') === 'rtl';\n }\n\n return _rtl;\n}\n\nvar _rtl = getRTL();\n\nexport function getStyleOptions() {\n return {\n rtl: getRTL()\n };\n}","import * as React from 'react';\nexport var CustomizerContext = React.createContext({\n customizations: {\n inCustomizerContext: false,\n settings: {},\n scopedSettings: {}\n }\n});","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function') {\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import { getVirtualParent } from './getVirtualParent';\n/**\n * Gets the element which is the parent of a given element.\n * If `allowVirtuaParents` is `true`, this method prefers the virtual parent over\n * real DOM parent when present.\n *\n * @public\n */\n\nexport function getParent(child, allowVirtualParents) {\n if (allowVirtualParents === void 0) {\n allowVirtualParents = true;\n }\n\n return child && (allowVirtualParents && getVirtualParent(child) || child.parentNode && child.parentNode);\n}","import { isVirtualElement } from './isVirtualElement';\n/**\n * Gets the virtual parent given the child element, if it exists.\n *\n * @public\n */\n\nexport function getVirtualParent(child) {\n var parent;\n\n if (child && isVirtualElement(child)) {\n parent = child._virtual.parent;\n }\n\n return parent;\n}","/**\n * Determines whether or not an element has the virtual hierarchy extension.\n *\n * @public\n */\nexport function isVirtualElement(element) {\n return element && !!element._virtual;\n}","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nexport default function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}","import _typeof from \"../../helpers/esm/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","var REACT_LIFECYCLE_EXCLUSIONS = ['setState', 'render', 'componentWillMount', 'UNSAFE_componentWillMount', 'componentDidMount', 'componentWillReceiveProps', 'UNSAFE_componentWillReceiveProps', 'shouldComponentUpdate', 'componentWillUpdate', 'getSnapshotBeforeUpdate', 'UNSAFE_componentWillUpdate', 'componentDidUpdate', 'componentWillUnmount'];\n/**\n * Allows you to hoist methods, except those in an exclusion set from a source object into a destination object.\n *\n * @public\n * @param destination - The instance of the object to hoist the methods onto.\n * @param source - The instance of the object where the methods are hoisted from.\n * @param exclusions - (Optional) What methods to exclude from being hoisted.\n * @returns An array of names of methods that were hoisted.\n */\n\nexport function hoistMethods( // tslint:disable-next-line:no-any\ndestination, // tslint:disable-next-line:no-any\nsource, exclusions) {\n if (exclusions === void 0) {\n exclusions = REACT_LIFECYCLE_EXCLUSIONS;\n }\n\n var hoisted = [];\n\n var _loop_1 = function _loop_1(methodName) {\n if (typeof source[methodName] === 'function' && destination[methodName] === undefined && (!exclusions || exclusions.indexOf(methodName) === -1)) {\n hoisted.push(methodName);\n /* tslint:disable:no-function-expression */\n\n destination[methodName] = function () {\n source[methodName].apply(source, arguments);\n };\n /* tslint:enable */\n\n }\n };\n\n for (var methodName in source) {\n _loop_1(methodName);\n }\n\n return hoisted;\n}\n/**\n * Provides a method for convenience to unhoist hoisted methods.\n *\n * @public\n * @param source - The source object upon which methods were hoisted.\n * @param methodNames - An array of method names to unhoist.\n */\n// tslint:disable-next-line:no-any\n\nexport function unhoistMethods(source, methodNames) {\n methodNames.forEach(function (methodName) {\n return delete source[methodName];\n });\n}","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport { BaseDecorator } from './BaseDecorator';\nimport { getWindow, hoistStatics } from '../../Utilities';\nexport var ResponsiveMode;\n\n(function (ResponsiveMode) {\n ResponsiveMode[ResponsiveMode[\"small\"] = 0] = \"small\";\n ResponsiveMode[ResponsiveMode[\"medium\"] = 1] = \"medium\";\n ResponsiveMode[ResponsiveMode[\"large\"] = 2] = \"large\";\n ResponsiveMode[ResponsiveMode[\"xLarge\"] = 3] = \"xLarge\";\n ResponsiveMode[ResponsiveMode[\"xxLarge\"] = 4] = \"xxLarge\";\n ResponsiveMode[ResponsiveMode[\"xxxLarge\"] = 5] = \"xxxLarge\";\n ResponsiveMode[ResponsiveMode[\"unknown\"] = 999] = \"unknown\";\n})(ResponsiveMode || (ResponsiveMode = {}));\n\nvar RESPONSIVE_MAX_CONSTRAINT = [479, 639, 1023, 1365, 1919, 99999999];\n/**\n * User specified mode to default to, useful for server side rendering scenarios.\n */\n\nvar _defaultMode;\n/**\n * Tracking the last mode we successfully rendered, which allows us to\n * paint initial renders with the correct size.\n */\n\n\nvar _lastMode;\n/**\n * Allows a server rendered scenario to provide a default responsive mode.\n */\n\n\nexport function setResponsiveMode(responsiveMode) {\n _defaultMode = responsiveMode;\n}\nexport function withResponsiveMode(ComposedComponent) {\n var resultClass =\n /** @class */\n function (_super) {\n tslib_1.__extends(WithResponsiveMode, _super);\n\n function WithResponsiveMode(props) {\n var _this = _super.call(this, props) || this;\n\n _this._onResize = function () {\n var responsiveMode = _this._getResponsiveMode();\n\n if (responsiveMode !== _this.state.responsiveMode) {\n _this.setState({\n responsiveMode: responsiveMode\n });\n }\n };\n\n _this._updateComposedComponentRef = _this._updateComposedComponentRef.bind(_this);\n _this.state = {\n responsiveMode: _defaultMode || _lastMode || ResponsiveMode.large\n };\n return _this;\n }\n\n WithResponsiveMode.prototype.componentDidMount = function () {\n this._events.on(window, 'resize', this._onResize);\n\n this._onResize();\n };\n\n WithResponsiveMode.prototype.componentWillUnmount = function () {\n this._events.dispose();\n };\n\n WithResponsiveMode.prototype.render = function () {\n var responsiveMode = this.state.responsiveMode;\n return responsiveMode === ResponsiveMode.unknown ? null : React.createElement(ComposedComponent, tslib_1.__assign({\n ref: this._updateComposedComponentRef,\n responsiveMode: responsiveMode\n }, this.props));\n };\n\n WithResponsiveMode.prototype._getResponsiveMode = function () {\n var responsiveMode = ResponsiveMode.small;\n var element = findDOMNode(this);\n var win = getWindow(element);\n\n if (typeof win !== 'undefined') {\n try {\n while (win.innerWidth > RESPONSIVE_MAX_CONSTRAINT[responsiveMode]) {\n responsiveMode++;\n }\n } catch (e) {\n // Return a best effort result in cases where we're in the browser but it throws on getting innerWidth.\n responsiveMode = _defaultMode || _lastMode || ResponsiveMode.large;\n } // Tracking last mode just gives us a better default in future renders,\n // which avoids starting with the wrong value if we've measured once.\n\n\n _lastMode = responsiveMode;\n } else {\n if (_defaultMode !== undefined) {\n responsiveMode = _defaultMode;\n } else {\n throw new Error('Content was rendered in a server environment without providing a default responsive mode. ' + 'Call setResponsiveMode to define what the responsive mode is.');\n }\n }\n\n return responsiveMode;\n };\n\n return WithResponsiveMode;\n }(BaseDecorator);\n\n return hoistStatics(ComposedComponent, resultClass);\n}","import * as tslib_1 from \"tslib\";\nimport { BaseComponent, hoistMethods, unhoistMethods } from '../../Utilities';\n\nvar BaseDecorator =\n/** @class */\nfunction (_super) {\n tslib_1.__extends(BaseDecorator, _super);\n\n function BaseDecorator(props) {\n var _this = _super.call(this, props) || this; // tslint:disable-next-line:typedef\n\n\n _this._skipComponentRefResolution = true;\n _this._updateComposedComponentRef = _this._updateComposedComponentRef.bind(_this);\n return _this;\n }\n /**\n * Updates the ref to the component composed by the decorator, which will also take care of hoisting\n * (and unhoisting as appropriate) methods from said component.\n *\n * Pass this method as the argument to the 'ref' property of the composed component.\n */\n\n\n BaseDecorator.prototype._updateComposedComponentRef = function (composedComponentInstance) {\n this._composedComponentInstance = composedComponentInstance;\n\n if (composedComponentInstance) {\n this._hoisted = hoistMethods(this, composedComponentInstance);\n } else if (this._hoisted) {\n unhoistMethods(this, this._hoisted);\n }\n };\n\n return BaseDecorator;\n}(BaseComponent);\n\nexport { BaseDecorator };","import { Stylesheet } from '@uifabric/merge-styles';\nvar stylesheet = Stylesheet.getInstance();\n\nif (stylesheet && stylesheet.onReset) {\n Stylesheet.getInstance().onReset(resetMemoizations);\n}\n\nvar _resetCounter = 0;\nvar _emptyObject = {\n empty: true\n};\nvar _dictionary = {};\n\nvar _weakMap = typeof WeakMap === 'undefined' ? null : WeakMap;\n/**\n * Test utility for providing a custom weakmap.\n *\n * @internal\n * */\n\n\nexport function setMemoizeWeakMap(weakMap) {\n _weakMap = weakMap;\n}\n/**\n * Reset memoizations.\n */\n\nexport function resetMemoizations() {\n _resetCounter++;\n}\n/**\n * Memoize decorator to be used on class methods. WARNING: the `this` reference\n * will be inaccessible within a memoized method, given that a cached method's `this`\n * would not be instance-specific.\n *\n * @public\n */\n\nexport function memoize(target, key, descriptor) {\n // We bind to \"null\" to prevent people from inadvertently pulling values from \"this\",\n // rather than passing them in as input values which can be memoized.\n var fn = memoizeFunction(descriptor.value && descriptor.value.bind(null));\n return {\n configurable: true,\n get: function get() {\n return fn;\n }\n };\n}\n/**\n * Memoizes a function; when you pass in the same parameters multiple times, it returns a cached result.\n * Be careful when passing in objects, you need to pass in the same INSTANCE for caching to work. Otherwise\n * it will grow the cache unnecessarily. Also avoid using default values that evaluate functions; passing in\n * undefined for a value and relying on a default function will execute it the first time, but will not\n * re-evaluate subsequent times which may have been unexpected.\n *\n * By default, the cache will reset after 100 permutations, to avoid abuse cases where the function is\n * unintendedly called with unique objects. Without a reset, the cache could grow infinitely, so we safeguard\n * by resetting. To override this behavior, pass a value of 0 to the maxCacheSize parameter.\n *\n * @public\n * @param cb - The function to memoize.\n * @param maxCacheSize - Max results to cache. If the cache exceeds this value, it will reset on the next call.\n * @param ignoreNullOrUndefinedResult - Flag to decide whether to cache callback result if it is undefined/null.\n * If the flag is set to true, the callback result is recomputed every time till the callback result is not undefined/null\n * for the first time and then the non-undefined/null version gets cached.\n * @returns A memoized version of the function.\n */\n\nexport function memoizeFunction(cb, maxCacheSize, ignoreNullOrUndefinedResult) {\n if (maxCacheSize === void 0) {\n maxCacheSize = 100;\n }\n\n if (ignoreNullOrUndefinedResult === void 0) {\n ignoreNullOrUndefinedResult = false;\n } // Avoid breaking scenarios which don't have weak map.\n\n\n if (!_weakMap) {\n return cb;\n }\n\n var rootNode;\n var cacheSize = 0;\n var localResetCounter = _resetCounter; // tslint:disable-next-line:no-function-expression\n\n return function memoizedFunction() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var currentNode = rootNode;\n\n if (rootNode === undefined || localResetCounter !== _resetCounter || maxCacheSize > 0 && cacheSize > maxCacheSize) {\n rootNode = _createNode();\n cacheSize = 0;\n localResetCounter = _resetCounter;\n }\n\n currentNode = rootNode; // Traverse the tree until we find the match.\n\n for (var i = 0; i < args.length; i++) {\n var arg = _normalizeArg(args[i]);\n\n if (!currentNode.map.has(arg)) {\n currentNode.map.set(arg, _createNode());\n }\n\n currentNode = currentNode.map.get(arg);\n }\n\n if (!currentNode.hasOwnProperty('value')) {\n currentNode.value = cb.apply(void 0, args);\n cacheSize++;\n }\n\n if (ignoreNullOrUndefinedResult && (currentNode.value === null || currentNode.value === undefined)) {\n currentNode.value = cb.apply(void 0, args);\n }\n\n return currentNode.value;\n };\n}\n/**\n * Creates a memoizer for a single-value function, backed by a WeakMap.\n * With a WeakMap, the memoized values are only kept as long as the source objects,\n * ensuring that there is no memory leak.\n *\n * This function assumes that the input values passed to the wrapped function will be\n * `function` or `object` types. To memoize functions which accept other inputs, use\n * `memoizeFunction`, which memoizes against arbitrary inputs using a lookup cache.\n *\n * @public\n */\n\nexport function createMemoizer(getValue) {\n if (!_weakMap) {\n // Without a `WeakMap` implementation, memoization is not possible.\n return getValue;\n }\n\n var cache = new _weakMap();\n\n function memoizedGetValue(input) {\n if (!input || typeof input !== 'function' && typeof input !== 'object') {\n // A WeakMap can only be used to test against reference values, i.e. 'function' and 'object'.\n // All other inputs cannot be memoized against in this manner.\n return getValue(input);\n }\n\n if (cache.has(input)) {\n // tslint:disable-next-line:no-non-null-assertion\n return cache.get(input);\n }\n\n var value = getValue(input);\n cache.set(input, value);\n return value;\n }\n\n return memoizedGetValue;\n}\n\nfunction _normalizeArg(val) {\n if (!val) {\n return _emptyObject;\n } else if (typeof val === 'object' || typeof val === 'function') {\n return val;\n } else if (!_dictionary[val]) {\n _dictionary[val] = {\n val: val\n };\n }\n\n return _dictionary[val];\n}\n\nfunction _createNode() {\n return {\n map: _weakMap ? new _weakMap() : null\n };\n}","import { getWindow } from './dom/getWindow';\nexport var IsFocusVisibleClassName = 'ms-Fabric--isFocusVisible';\nexport var IsFocusHiddenClassName = 'ms-Fabric--isFocusHidden';\n/**\n * Sets the visibility of focus styling.\n * By default, focus styling (the box surrounding a focused Button, for example) only show up when navigational\n * keypresses occur (through Tab, arrows, PgUp/PgDn, Home and End), and are hidden when mouse interactions occur.\n * This API provides an imperative way to turn them on/off.\n * A use case might be when you have a keypress like ctrl-f6 navigate to a particular region on the page, and want focus to show up.\n *\n * @param enabled - whether to remove or add focus\n * @param target - optional target\n */\n\nexport function setFocusVisibility(enabled, target) {\n var win = target ? getWindow(target) : getWindow();\n\n if (win) {\n var classList = win.document.body.classList;\n classList.add(enabled ? IsFocusVisibleClassName : IsFocusHiddenClassName);\n classList.remove(enabled ? IsFocusHiddenClassName : IsFocusVisibleClassName);\n }\n}","/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSets - One or more stylesets to be merged (each param can also be falsy).\n */\nexport function concatStyleSets() {\n var styleSets = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n styleSets[_i] = arguments[_i];\n }\n\n if (styleSets && styleSets.length === 1 && styleSets[0] && !styleSets[0].subComponentStyles) {\n return styleSets[0];\n }\n\n var mergedSet = {}; // We process sub component styles in two phases. First we collect them, then we combine them into 1 style function.\n\n var workingSubcomponentStyles = {};\n\n for (var _a = 0, styleSets_1 = styleSets; _a < styleSets_1.length; _a++) {\n var currentSet = styleSets_1[_a];\n\n if (currentSet) {\n for (var prop in currentSet) {\n if (currentSet.hasOwnProperty(prop)) {\n if (prop === 'subComponentStyles' && currentSet.subComponentStyles !== undefined) {\n // subcomponent styles - style functions or objects\n var currentComponentStyles = currentSet.subComponentStyles;\n\n for (var subCompProp in currentComponentStyles) {\n if (currentComponentStyles.hasOwnProperty(subCompProp)) {\n if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {\n workingSubcomponentStyles[subCompProp].push(currentComponentStyles[subCompProp]);\n } else {\n workingSubcomponentStyles[subCompProp] = [currentComponentStyles[subCompProp]];\n }\n }\n }\n\n continue;\n } // the as any casts below is a workaround for ts 2.8.\n // todo: remove cast to any in ts 2.9.\n\n\n var mergedValue = mergedSet[prop];\n var currentValue = currentSet[prop];\n\n if (mergedValue === undefined) {\n mergedSet[prop] = currentValue;\n } else {\n mergedSet[prop] = (Array.isArray(mergedValue) ? mergedValue : [mergedValue]).concat(Array.isArray(currentValue) ? currentValue : [currentValue]);\n }\n }\n }\n }\n }\n\n if (Object.keys(workingSubcomponentStyles).length > 0) {\n mergedSet.subComponentStyles = {};\n var mergedSubStyles = mergedSet.subComponentStyles;\n\n var _loop_1 = function _loop_1(subCompProp) {\n if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {\n var workingSet_1 = workingSubcomponentStyles[subCompProp];\n\n mergedSubStyles[subCompProp] = function (styleProps) {\n return concatStyleSets.apply(void 0, workingSet_1.map(function (styleFunctionOrObject) {\n return typeof styleFunctionOrObject === 'function' ? styleFunctionOrObject(styleProps) : styleFunctionOrObject;\n }));\n };\n }\n }; // now we process the subcomponent styles if there are any\n\n\n for (var subCompProp in workingSubcomponentStyles) {\n _loop_1(subCompProp);\n }\n }\n\n return mergedSet;\n}","var g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if (typeof window === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;","var _warningCallback = undefined;\n/**\n * Sends a warning to console, if the api is present.\n *\n * @public\n * @param message - Warning message.\n */\n\nexport function warn(message) {\n if (_warningCallback && process.env.NODE_ENV !== 'production') {\n _warningCallback(message);\n } else if (console && console.warn) {\n console.warn(message);\n }\n}\n/**\n * Configures the warning callback. Passing in undefined will reset it to use the default\n * console.warn function.\n *\n * @public\n * @param warningCallback - Callback to override the generated warnings.\n */\n\nexport function setWarningCallback(warningCallback) {\n _warningCallback = warningCallback;\n}","import { getWindow } from './dom/getWindow'; // Initialize global window id.\n\nvar CURRENT_ID_PROPERTY = '__currentId__';\nvar DEFAULT_ID_STRING = 'id__'; // tslint:disable-next-line:no-any\n\nvar _global = getWindow() || {};\n\nif (_global[CURRENT_ID_PROPERTY] === undefined) {\n _global[CURRENT_ID_PROPERTY] = 0;\n}\n/**\n * Generates a unique id in the global scope (this spans across duplicate copies of the same library.)\n *\n * @public\n */\n\n\nexport function getId(prefix) {\n var index = _global[CURRENT_ID_PROPERTY]++;\n return (prefix || DEFAULT_ID_STRING) + index;\n}\n/**\n * Resets id counter to an (optional) number.\n *\n * @public\n */\n\nexport function resetIds(counter) {\n if (counter === void 0) {\n counter = 0;\n }\n\n _global[CURRENT_ID_PROPERTY] = counter;\n}","import { Stylesheet } from './Stylesheet';\n/**\n * Separates the classes and style objects. Any classes that are pre-registered\n * args are auto expanded into objects.\n */\n\nexport function extractStyleParts() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var classes = [];\n var objects = [];\n var stylesheet = Stylesheet.getInstance();\n\n function _processArgs(argsList) {\n for (var _i = 0, argsList_1 = argsList; _i < argsList_1.length; _i++) {\n var arg = argsList_1[_i];\n\n if (arg) {\n if (typeof arg === 'string') {\n if (arg.indexOf(' ') >= 0) {\n _processArgs(arg.split(' '));\n } else {\n var translatedArgs = stylesheet.argsFromClassName(arg);\n\n if (translatedArgs) {\n _processArgs(translatedArgs);\n } else {\n // Avoid adding the same class twice.\n if (classes.indexOf(arg) === -1) {\n classes.push(arg);\n }\n }\n }\n } else if (Array.isArray(arg)) {\n _processArgs(arg);\n } else if (typeof arg === 'object') {\n objects.push(arg);\n }\n }\n }\n }\n\n _processArgs(args);\n\n return {\n classes: classes,\n objects: objects\n };\n}","export var _isSSR = false;\n/**\n * Helper to set ssr mode to simulate no window object returned from getWindow helper.\n *\n * @public\n */\n\nexport function setSSR(isEnabled) {\n _isSSR = isEnabled;\n}","import { getParent } from './getParent';\n/**\n * Finds the first parent element where the matchFunction returns true\n * @param element - element to start searching at\n * @param matchFunction - the function that determines if the element is a match\n * @returns the matched element or null no match was found\n */\n\nexport function findElementRecursive(element, matchFunction) {\n if (!element || element === document.body) {\n return null;\n }\n\n return matchFunction(element) ? element : findElementRecursive(getParent(element), matchFunction);\n}","import { Stylesheet } from '@uifabric/merge-styles';\nimport { getId, resetIds } from './getId';\nexport { getId, resetIds }; // tslint:disable-next-line:no-any\n\nfunction checkProperties(a, b) {\n for (var propName in a) {\n if (a.hasOwnProperty(propName)) {\n if (!b.hasOwnProperty(propName) || b[propName] !== a[propName]) {\n return false;\n }\n }\n }\n\n return true;\n}\n/**\n * Compares a to b and b to a.\n *\n * @public\n */\n\n\nexport function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}\n/**\n * Makes a resulting merge of a bunch of objects. Pass in the target object followed by 1 or more\n * objects as arguments and they will be merged sequentially into the target. Note that this will\n * shallow merge; it will not create new cloned values for target members.\n *\n * @public\n * @param target - Target object to merge following object arguments into.\n * @param args - One or more objects that will be mixed into the target in the order they are provided.\n * @returns Resulting merged target.\n */\n// tslint:disable-next-line:no-any\n\nexport function assign(target) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n return filteredAssign.apply(this, [null, target].concat(args));\n}\n/**\n * Makes a resulting merge of a bunch of objects, but allows a filter function to be passed in to filter\n * the resulting merges. This allows for scenarios where you want to merge \"everything except that one thing\"\n * or \"properties that start with data-\". Note that this will shallow merge; it will not create new cloned\n * values for target members.\n *\n * @public\n * @param isAllowed - Callback to determine if the given propName is allowed in the result.\n * @param target - Target object to merge following object arguments into.\n * @param args - One or more objects that will be mixed into the target in the order they are provided.\n * @returns Resulting merged target.\n */\n// tslint:disable-next-line:no-any\n\nexport function filteredAssign(isAllowed, target) {\n var args = [];\n\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n\n target = target || {};\n\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var sourceObject = args_1[_a];\n\n if (sourceObject) {\n for (var propName in sourceObject) {\n if (sourceObject.hasOwnProperty(propName) && (!isAllowed || isAllowed(propName))) {\n target[propName] = sourceObject[propName];\n }\n }\n }\n }\n\n return target;\n} // Configure ids to reset on stylesheet resets.\n\nvar stylesheet = Stylesheet.getInstance();\n\nif (stylesheet && stylesheet.onReset) {\n stylesheet.onReset(resetIds);\n}\n/* Takes an enum and iterates over each value of the enum (as a string), running the callback on each, returning a mapped array.\n * The callback takes as a first parameter the string that represents the name of the entry, and the second parameter is the\n * value of that entry, which is the value you'd normally use when using the enum (usually a number).\n * */\n\n\nexport function mapEnumByName( // tslint:disable-next-line:no-any\ntheEnum, callback) {\n // map to satisfy compiler since it doesn't realize we strip out undefineds in the .filter() call\n return Object.keys(theEnum).map(function (p) {\n // map on each property name as a string\n if (String(Number(p)) !== p) {\n // if the property is not just a number (because enums in TypeScript will map both ways)\n return callback(p, theEnum[p]);\n }\n }).filter(function (v) {\n return !!v;\n }); // only return elements with values\n}\n/**\n * Get all values in an object dictionary\n *\n * @param obj - The dictionary to get values for\n */\n// tslint:disable-next-line:no-any\n\nexport function values(obj) {\n return Object.keys(obj).reduce(function (arr, key) {\n arr.push(obj[key]);\n return arr;\n }, []);\n}","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\nimport { classNamesFunction, getNativeProps, imageProperties } from '../../Utilities';\nimport { ImageCoverStyle, ImageFit, ImageLoadState } from './Image.types';\nvar getClassNames = classNamesFunction();\nvar KEY_PREFIX = 'fabricImage';\n\nvar ImageBase =\n/** @class */\nfunction (_super) {\n tslib_1.__extends(ImageBase, _super);\n\n function ImageBase(props) {\n var _this = _super.call(this, props) || this; // Make an initial assumption about the image layout until we can\n // check the rendered element. The value here only takes effect when\n // shouldStartVisible is true.\n\n\n _this._coverStyle = ImageCoverStyle.portrait;\n _this._imageElement = React.createRef();\n _this._frameElement = React.createRef();\n\n _this._onImageLoaded = function (ev) {\n var _a = _this.props,\n src = _a.src,\n onLoad = _a.onLoad;\n\n if (onLoad) {\n onLoad(ev);\n }\n\n _this._computeCoverStyle(_this.props);\n\n if (src) {\n _this.setState({\n loadState: ImageLoadState.loaded\n });\n }\n };\n\n _this._onImageError = function (ev) {\n if (_this.props.onError) {\n _this.props.onError(ev);\n }\n\n _this.setState({\n loadState: ImageLoadState.error\n });\n };\n\n _this.state = {\n loadState: ImageLoadState.notLoaded\n };\n return _this;\n } // tslint:disable-next-line function-name\n\n\n ImageBase.prototype.UNSAFE_componentWillReceiveProps = function (nextProps) {\n if (nextProps.src !== this.props.src) {\n this.setState({\n loadState: ImageLoadState.notLoaded\n });\n } else if (this.state.loadState === ImageLoadState.loaded) {\n this._computeCoverStyle(nextProps);\n }\n };\n\n ImageBase.prototype.componentDidUpdate = function (prevProps, prevState) {\n this._checkImageLoaded();\n\n if (this.props.onLoadingStateChange && prevState.loadState !== this.state.loadState) {\n this.props.onLoadingStateChange(this.state.loadState);\n }\n };\n\n ImageBase.prototype.render = function () {\n var imageProps = getNativeProps(this.props, imageProperties, ['width', 'height']);\n var _a = this.props,\n src = _a.src,\n alt = _a.alt,\n width = _a.width,\n height = _a.height,\n shouldFadeIn = _a.shouldFadeIn,\n shouldStartVisible = _a.shouldStartVisible,\n className = _a.className,\n imageFit = _a.imageFit,\n role = _a.role,\n maximizeFrame = _a.maximizeFrame,\n styles = _a.styles,\n theme = _a.theme;\n var loadState = this.state.loadState;\n var coverStyle = this.props.coverStyle !== undefined ? this.props.coverStyle : this._coverStyle;\n var classNames = getClassNames(styles, {\n theme: theme,\n className: className,\n width: width,\n height: height,\n maximizeFrame: maximizeFrame,\n shouldFadeIn: shouldFadeIn,\n shouldStartVisible: shouldStartVisible,\n isLoaded: loadState === ImageLoadState.loaded || loadState === ImageLoadState.notLoaded && this.props.shouldStartVisible,\n isLandscape: coverStyle === ImageCoverStyle.landscape,\n isCenter: imageFit === ImageFit.center,\n isCenterContain: imageFit === ImageFit.centerContain,\n isCenterCover: imageFit === ImageFit.centerCover,\n isContain: imageFit === ImageFit.contain,\n isCover: imageFit === ImageFit.cover,\n isNone: imageFit === ImageFit.none,\n isError: loadState === ImageLoadState.error,\n isNotImageFit: imageFit === undefined\n }); // If image dimensions aren't specified, the natural size of the image is used.\n\n return React.createElement(\"div\", {\n className: classNames.root,\n style: {\n width: width,\n height: height\n },\n ref: this._frameElement\n }, React.createElement(\"img\", tslib_1.__assign({}, imageProps, {\n onLoad: this._onImageLoaded,\n onError: this._onImageError,\n key: KEY_PREFIX + this.props.src || '',\n className: classNames.image,\n ref: this._imageElement,\n src: src,\n alt: alt,\n role: role\n })));\n };\n\n ImageBase.prototype._checkImageLoaded = function () {\n var src = this.props.src;\n var loadState = this.state.loadState;\n\n if (loadState === ImageLoadState.notLoaded) {\n // testing if naturalWidth and naturalHeight are greater than zero is better than checking\n // .complete, because .complete will also be set to true if the image breaks. However,\n // for some browsers, SVG images do not have a naturalWidth or naturalHeight, so fall back\n // to checking .complete for these images.\n var isLoaded = this._imageElement.current ? src && this._imageElement.current.naturalWidth > 0 && this._imageElement.current.naturalHeight > 0 || this._imageElement.current.complete && ImageBase._svgRegex.test(src) : false;\n\n if (isLoaded) {\n this._computeCoverStyle(this.props);\n\n this.setState({\n loadState: ImageLoadState.loaded\n });\n }\n }\n };\n\n ImageBase.prototype._computeCoverStyle = function (props) {\n var imageFit = props.imageFit,\n width = props.width,\n height = props.height; // Do not compute cover style if it was already specified in props\n\n if ((imageFit === ImageFit.cover || imageFit === ImageFit.contain || imageFit === ImageFit.centerContain || imageFit === ImageFit.centerCover) && this.props.coverStyle === undefined && this._imageElement.current && this._frameElement.current) {\n // Determine the desired ratio using the width and height props.\n // If those props aren't available, measure measure the frame.\n var desiredRatio = void 0;\n\n if (!!width && !!height && imageFit !== ImageFit.centerContain && imageFit !== ImageFit.centerCover) {\n desiredRatio = width / height;\n } else {\n desiredRatio = this._frameElement.current.clientWidth / this._frameElement.current.clientHeight;\n } // Examine the source image to determine its original ratio.\n\n\n var naturalRatio = this._imageElement.current.naturalWidth / this._imageElement.current.naturalHeight; // Should we crop from the top or the sides?\n\n if (naturalRatio > desiredRatio) {\n this._coverStyle = ImageCoverStyle.landscape;\n } else {\n this._coverStyle = ImageCoverStyle.portrait;\n }\n }\n };\n\n ImageBase.defaultProps = {\n shouldFadeIn: true\n };\n ImageBase._svgRegex = /\\.svg$/i;\n return ImageBase;\n}(React.Component);\n\nexport { ImageBase };","import { AnimationClassNames, getGlobalClassNames } from '../../Styling';\nimport { getWindow } from '../../Utilities';\nvar GlobalClassNames = {\n root: 'ms-Image',\n rootMaximizeFrame: 'ms-Image--maximizeFrame',\n image: 'ms-Image-image',\n imageCenter: 'ms-Image-image--center',\n imageContain: 'ms-Image-image--contain',\n imageCover: 'ms-Image-image--cover',\n imageCenterContain: 'ms-Image-image--centerContain',\n imageCenterCover: 'ms-Image-image--centerCover',\n imageNone: 'ms-Image-image--none',\n imageLandscape: 'ms-Image-image--landscape',\n imagePortrait: 'ms-Image-image--portrait'\n};\nexport var getStyles = function getStyles(props) {\n var className = props.className,\n width = props.width,\n height = props.height,\n maximizeFrame = props.maximizeFrame,\n isLoaded = props.isLoaded,\n shouldFadeIn = props.shouldFadeIn,\n shouldStartVisible = props.shouldStartVisible,\n isLandscape = props.isLandscape,\n isCenter = props.isCenter,\n isContain = props.isContain,\n isCover = props.isCover,\n isCenterContain = props.isCenterContain,\n isCenterCover = props.isCenterCover,\n isNone = props.isNone,\n isError = props.isError,\n isNotImageFit = props.isNotImageFit,\n theme = props.theme;\n var classNames = getGlobalClassNames(GlobalClassNames, theme);\n var ImageFitStyles = {\n position: 'absolute',\n left: '50% /* @noflip */',\n top: '50%',\n transform: 'translate(-50%,-50%)' // @todo test RTL renders transform: translate(50%,-50%);\n\n }; // Cut the mustard using msMaxTouchPoints to detect IE11 which does not support CSS object-fit\n\n var window = getWindow();\n var supportsObjectFit = window !== undefined && window.navigator.msMaxTouchPoints === undefined;\n var fallbackObjectFitStyles = isContain && isLandscape || isCover && !isLandscape ? {\n width: '100%',\n height: 'auto'\n } : {\n width: 'auto',\n height: '100%'\n };\n return {\n root: [classNames.root, theme.fonts.medium, {\n overflow: 'hidden'\n }, maximizeFrame && [classNames.rootMaximizeFrame, {\n height: '100%',\n width: '100%'\n }], isLoaded && shouldFadeIn && !shouldStartVisible && AnimationClassNames.fadeIn400, (isCenter || isContain || isCover || isCenterContain || isCenterCover) && {\n position: 'relative'\n }, className],\n image: [classNames.image, {\n display: 'block',\n opacity: 0\n }, isLoaded && ['is-loaded', {\n opacity: 1\n }], isCenter && [classNames.imageCenter, ImageFitStyles], isContain && [classNames.imageContain, supportsObjectFit && {\n width: '100%',\n height: '100%',\n objectFit: 'contain'\n }, !supportsObjectFit && fallbackObjectFitStyles, ImageFitStyles], isCover && [classNames.imageCover, supportsObjectFit && {\n width: '100%',\n height: '100%',\n objectFit: 'cover'\n }, !supportsObjectFit && fallbackObjectFitStyles, ImageFitStyles], isCenterContain && [classNames.imageCenterContain, isLandscape && {\n maxWidth: '100%'\n }, !isLandscape && {\n maxHeight: '100%'\n }, ImageFitStyles], isCenterCover && [classNames.imageCenterCover, isLandscape && {\n maxHeight: '100%'\n }, !isLandscape && {\n maxWidth: '100%'\n }, ImageFitStyles], isNone && [classNames.imageNone, {\n width: 'auto',\n height: 'auto'\n }], isNotImageFit && [!!width && !height && {\n height: 'auto',\n width: '100%'\n }, !width && !!height && {\n height: '100%',\n width: 'auto'\n }, !!width && !!height && {\n height: '100%',\n width: '100%'\n }], isLandscape && classNames.imageLandscape, !isLandscape && classNames.imagePortrait, !isLoaded && 'is-notLoaded', shouldFadeIn && 'is-fadeIn', isError && 'is-error']\n };\n};","import { styled } from '../../Utilities';\nimport { ImageBase } from './Image.base';\nimport { getStyles } from './Image.styles';\nexport var Image = styled(ImageBase, getStyles, undefined, {\n scope: 'Image'\n}, true);","// A packages cache that makes sure that we don't inject the same packageName twice in the same bundle -\n// this cache is local to the module closure inside this bundle\nvar packagesCache = {}; // Cache access to window to avoid IE11 memory leak.\n\nvar _win = undefined;\n\ntry {\n _win = window;\n} catch (e) {\n /* no-op */\n}\n\nexport function setVersion(packageName, packageVersion) {\n if (typeof _win !== 'undefined') {\n // tslint:disable-next-line:no-any\n var packages = _win.__packages__ = _win.__packages__ || {}; // We allow either the global packages or local packages caches to invalidate so testing can just clear the global to set this state\n\n if (!packages[packageName] || !packagesCache[packageName]) {\n packagesCache[packageName] = packageVersion;\n var versions = packages[packageName] = packages[packageName] || [];\n versions.push(packageVersion);\n }\n }\n}","import { setVersion } from './setVersion';\nexport { setVersion };\nsetVersion('@uifabric/set-version', '6.0.0');","import { filteredAssign } from './object';\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */\n\nexport var baseElementEvents = ['onCopy', 'onCut', 'onPaste', 'onCompositionEnd', 'onCompositionStart', 'onCompositionUpdate', 'onFocus', 'onFocusCapture', 'onBlur', 'onBlurCapture', 'onChange', 'onInput', 'onSubmit', 'onLoad', 'onError', 'onKeyDown', 'onKeyDownCapture', 'onKeyPress', 'onKeyUp', 'onAbort', 'onCanPlay', 'onCanPlayThrough', 'onDurationChange', 'onEmptied', 'onEncrypted', 'onEnded', 'onLoadedData', 'onLoadedMetadata', 'onLoadStart', 'onPause', 'onPlay', 'onPlaying', 'onProgress', 'onRateChange', 'onSeeked', 'onSeeking', 'onStalled', 'onSuspend', 'onTimeUpdate', 'onVolumeChange', 'onWaiting', 'onClick', 'onClickCapture', 'onContextMenu', 'onDoubleClick', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragExit', 'onDragLeave', 'onDragOver', 'onDragStart', 'onDrop', 'onMouseDown', 'onMouseDownCapture', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onMouseUpCapture', 'onSelect', 'onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart', 'onScroll', 'onWheel', 'onPointerCancel', 'onPointerDown', 'onPointerEnter', 'onPointerLeave', 'onPointerMove', 'onPointerOut', 'onPointerOver', 'onPointerUp', 'onGotPointerCapture', 'onLostPointerCapture'];\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */\n\nexport var baseElementProperties = ['accessKey', 'children', 'className', 'contentEditable', 'dir', 'draggable', 'hidden', 'htmlFor', 'id', 'lang', 'role', 'style', 'tabIndex', 'title', 'translate', 'spellCheck', 'name' // global\n];\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */\n\nexport var htmlElementProperties = baseElementProperties.concat(baseElementEvents);\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */\n\nexport var labelProperties = htmlElementProperties.concat(['form' // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n/**\n * An array of AUDIO tag properties and events.\n *\n * @public\n */\n\nexport var audioProperties = htmlElementProperties.concat(['height', 'loop', 'muted', 'preload', 'src', 'width' // canvas, embed, iframe, img, input, object, video\n]);\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */\n\nexport var videoProperties = audioProperties.concat(['poster' // video\n]);\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */\n\nexport var olProperties = htmlElementProperties.concat(['start' // ol\n]);\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */\n\nexport var liProperties = htmlElementProperties.concat(['value' // button, input, li, option, meter, progress, param\n]);\n/**\n * An array of A tag properties and events.\n *\n * @public\n */\n\nexport var anchorProperties = htmlElementProperties.concat(['download', 'href', 'hrefLang', 'media', 'rel', 'target', 'type' // a, button, input, link, menu, object, script, source, style\n]);\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */\n\nexport var buttonProperties = htmlElementProperties.concat(['autoFocus', 'disabled', 'form', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget', 'type', 'value' // button, input, li, option, meter, progress, param,\n]);\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */\n\nexport var inputProperties = buttonProperties.concat(['accept', 'alt', 'autoComplete', 'checked', 'dirname', 'form', 'height', 'inputMode', 'list', 'max', 'maxLength', 'min', 'multiple', 'pattern', 'placeholder', 'readOnly', 'required', 'src', 'step', 'size', 'type', 'value', 'width' // canvas, embed, iframe, img, input, object, video\n]);\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */\n\nexport var textAreaProperties = buttonProperties.concat(['cols', 'dirname', 'form', 'maxLength', 'placeholder', 'readOnly', 'required', 'rows', 'wrap' // textarea\n]);\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */\n\nexport var selectProperties = buttonProperties.concat(['form', 'multiple', 'required' // input, select, textarea\n]);\nexport var optionProperties = htmlElementProperties.concat(['selected', 'value' // button, input, li, option, meter, progress, param\n]);\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */\n\nexport var tableProperties = htmlElementProperties.concat(['cellPadding', 'cellSpacing' // table\n]);\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */\n\nexport var trProperties = htmlElementProperties;\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */\n\nexport var thProperties = htmlElementProperties.concat(['rowSpan', 'scope' // th\n]);\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */\n\nexport var tdProperties = htmlElementProperties.concat(['colSpan', 'headers', 'rowSpan', 'scope' // th\n]);\nexport var colGroupProperties = htmlElementProperties.concat(['span' // col, colgroup\n]);\nexport var colProperties = htmlElementProperties.concat(['span' // col, colgroup\n]);\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */\n\nexport var formProperties = htmlElementProperties.concat(['acceptCharset', 'action', 'encType', 'encType', 'method', 'noValidate', 'target' // form\n]);\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */\n\nexport var iframeProperties = htmlElementProperties.concat(['allow', 'allowFullScreen', 'allowPaymentRequest', 'allowTransparency', 'csp', 'height', 'importance', 'referrerPolicy', 'sandbox', 'src', 'srcDoc', 'width' // canvas, embed, iframe, img, input, object, video,\n]);\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */\n\nexport var imgProperties = htmlElementProperties.concat(['alt', 'crossOrigin', 'height', 'src', 'srcSet', 'useMap', 'width' // canvas, embed, iframe, img, input, object, video\n]);\n/**\n * @deprecated Use imgProperties for img elements.\n */\n\nexport var imageProperties = imgProperties;\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */\n\nexport var divProperties = htmlElementProperties;\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropsNames- The array of allowed propnames.\n * @returns The filtered props\n */\n\nexport function getNativeProps(props, allowedPropNames, excludedPropNames) {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for JSX attributes,\n // but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n return filteredAssign(function (propName) {\n return (!excludedPropNames || excludedPropNames.indexOf(propName) < 0) && (propName.indexOf('data-') === 0 || propName.indexOf('aria-') === 0 || allowedPropNames.indexOf(propName) >= 0);\n }, {}, props);\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is'); // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n\n\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}","import * as tslib_1 from \"tslib\";\n/**\n * Merge new and old settings, giving priority to new settings.\n * New settings is optional in which case oldSettings is returned as-is.\n * @param oldSettings - Old settings to fall back to.\n * @param newSettings - New settings that will be merged over oldSettings.\n * @returns Merged settings.\n */\n\nexport function mergeSettings(oldSettings, newSettings) {\n if (oldSettings === void 0) {\n oldSettings = {};\n }\n\n var mergeSettingsWith = _isSettingsFunction(newSettings) ? newSettings : _settingsMergeWith(newSettings);\n return mergeSettingsWith(oldSettings);\n}\nexport function mergeScopedSettings(oldSettings, newSettings) {\n if (oldSettings === void 0) {\n oldSettings = {};\n }\n\n var mergeSettingsWith = _isSettingsFunction(newSettings) ? newSettings : _scopedSettingsMergeWith(newSettings);\n return mergeSettingsWith(oldSettings);\n}\n\nfunction _isSettingsFunction(settings) {\n return typeof settings === 'function';\n}\n\nfunction _settingsMergeWith(newSettings) {\n return function (settings) {\n return newSettings ? tslib_1.__assign({}, settings, newSettings) : settings;\n };\n}\n\nfunction _scopedSettingsMergeWith(scopedSettingsFromProps) {\n if (scopedSettingsFromProps === void 0) {\n scopedSettingsFromProps = {};\n }\n\n return function (oldScopedSettings) {\n var newScopedSettings = tslib_1.__assign({}, oldScopedSettings);\n\n for (var scopeName in scopedSettingsFromProps) {\n if (scopedSettingsFromProps.hasOwnProperty(scopeName)) {\n newScopedSettings[scopeName] = tslib_1.__assign({}, oldScopedSettings[scopeName], scopedSettingsFromProps[scopeName]);\n }\n }\n\n return newScopedSettings;\n };\n}","export var DATA_PORTAL_ATTRIBUTE = 'data-portal-element';\n/**\n * Identify element as a portal by setting an attribute.\n * @param element - Element to mark as a portal.\n */\n\nexport function setPortalAttribute(element) {\n element.setAttribute(DATA_PORTAL_ATTRIBUTE, 'true');\n}","import { getWindow } from './dom/getWindow';\n/**\n * Bugs often appear in async code when stuff gets disposed, but async operations don't get canceled.\n * This Async helper class solves these issues by tying async code to the lifetime of a disposable object.\n *\n * Usage: Anything class extending from BaseModel can access this helper via this.async. Otherwise create a\n * new instance of the class and remember to call dispose() during your code's dispose handler.\n *\n * @public\n */\n\nvar Async =\n/** @class */\nfunction () {\n // tslint:disable-next-line:no-any\n function Async(parent, onError) {\n this._timeoutIds = null;\n this._immediateIds = null;\n this._intervalIds = null;\n this._animationFrameIds = null;\n this._isDisposed = false;\n this._parent = parent || null;\n this._onErrorHandler = onError;\n\n this._noop = function () {\n /* do nothing */\n };\n }\n /**\n * Dispose function, clears all async operations.\n */\n\n\n Async.prototype.dispose = function () {\n var id;\n this._isDisposed = true;\n this._parent = null; // Clear timeouts.\n\n if (this._timeoutIds) {\n for (id in this._timeoutIds) {\n if (this._timeoutIds.hasOwnProperty(id)) {\n this.clearTimeout(parseInt(id, 10));\n }\n }\n\n this._timeoutIds = null;\n } // Clear immediates.\n\n\n if (this._immediateIds) {\n for (id in this._immediateIds) {\n if (this._immediateIds.hasOwnProperty(id)) {\n this.clearImmediate(parseInt(id, 10));\n }\n }\n\n this._immediateIds = null;\n } // Clear intervals.\n\n\n if (this._intervalIds) {\n for (id in this._intervalIds) {\n if (this._intervalIds.hasOwnProperty(id)) {\n this.clearInterval(parseInt(id, 10));\n }\n }\n\n this._intervalIds = null;\n } // Clear animation frames.\n\n\n if (this._animationFrameIds) {\n for (id in this._animationFrameIds) {\n if (this._animationFrameIds.hasOwnProperty(id)) {\n this.cancelAnimationFrame(parseInt(id, 10));\n }\n }\n\n this._animationFrameIds = null;\n }\n };\n /**\n * SetTimeout override, which will auto cancel the timeout during dispose.\n * @param callback - Callback to execute.\n * @param duration - Duration in milliseconds.\n * @returns The setTimeout id.\n */\n\n\n Async.prototype.setTimeout = function (callback, duration) {\n var _this = this;\n\n var timeoutId = 0;\n\n if (!this._isDisposed) {\n if (!this._timeoutIds) {\n this._timeoutIds = {};\n }\n /* tslint:disable:ban-native-functions */\n\n\n timeoutId = setTimeout(function () {\n // Time to execute the timeout, enqueue it as a foreground task to be executed.\n try {\n // Now delete the record and call the callback.\n if (_this._timeoutIds) {\n delete _this._timeoutIds[timeoutId];\n }\n\n callback.apply(_this._parent);\n } catch (e) {\n if (_this._onErrorHandler) {\n _this._onErrorHandler(e);\n }\n }\n }, duration);\n /* tslint:enable:ban-native-functions */\n\n this._timeoutIds[timeoutId] = true;\n }\n\n return timeoutId;\n };\n /**\n * Clears the timeout.\n * @param id - Id to cancel.\n */\n\n\n Async.prototype.clearTimeout = function (id) {\n if (this._timeoutIds && this._timeoutIds[id]) {\n /* tslint:disable:ban-native-functions */\n clearTimeout(id);\n delete this._timeoutIds[id];\n /* tslint:enable:ban-native-functions */\n }\n };\n /**\n * SetImmediate override, which will auto cancel the immediate during dispose.\n * @param callback - Callback to execute.\n * @param targetElement - Optional target element to use for identifying the correct window.\n * @returns The setTimeout id.\n */\n\n\n Async.prototype.setImmediate = function (callback, targetElement) {\n var _this = this;\n\n var immediateId = 0;\n var win = getWindow(targetElement);\n\n if (!this._isDisposed) {\n if (!this._immediateIds) {\n this._immediateIds = {};\n }\n /* tslint:disable:ban-native-functions */\n\n\n var setImmediateCallback = function setImmediateCallback() {\n // Time to execute the timeout, enqueue it as a foreground task to be executed.\n try {\n // Now delete the record and call the callback.\n if (_this._immediateIds) {\n delete _this._immediateIds[immediateId];\n }\n\n callback.apply(_this._parent);\n } catch (e) {\n _this._logError(e);\n }\n };\n\n immediateId = win.setTimeout(setImmediateCallback, 0);\n /* tslint:enable:ban-native-functions */\n\n this._immediateIds[immediateId] = true;\n }\n\n return immediateId;\n };\n /**\n * Clears the immediate.\n * @param id - Id to cancel.\n * @param targetElement - Optional target element to use for identifying the correct window.\n */\n\n\n Async.prototype.clearImmediate = function (id, targetElement) {\n var win = getWindow(targetElement);\n\n if (this._immediateIds && this._immediateIds[id]) {\n /* tslint:disable:ban-native-functions */\n win.clearTimeout(id);\n delete this._immediateIds[id];\n /* tslint:enable:ban-native-functions */\n }\n };\n /**\n * SetInterval override, which will auto cancel the timeout during dispose.\n * @param callback - Callback to execute.\n * @param duration - Duration in milliseconds.\n * @returns The setTimeout id.\n */\n\n\n Async.prototype.setInterval = function (callback, duration) {\n var _this = this;\n\n var intervalId = 0;\n\n if (!this._isDisposed) {\n if (!this._intervalIds) {\n this._intervalIds = {};\n }\n /* tslint:disable:ban-native-functions */\n\n\n intervalId = setInterval(function () {\n // Time to execute the interval callback, enqueue it as a foreground task to be executed.\n try {\n callback.apply(_this._parent);\n } catch (e) {\n _this._logError(e);\n }\n }, duration);\n /* tslint:enable:ban-native-functions */\n\n this._intervalIds[intervalId] = true;\n }\n\n return intervalId;\n };\n /**\n * Clears the interval.\n * @param id - Id to cancel.\n */\n\n\n Async.prototype.clearInterval = function (id) {\n if (this._intervalIds && this._intervalIds[id]) {\n /* tslint:disable:ban-native-functions */\n clearInterval(id);\n delete this._intervalIds[id];\n /* tslint:enable:ban-native-functions */\n }\n };\n /**\n * Creates a function that, when executed, will only call the func function at most once per\n * every wait milliseconds. Provide an options object to indicate that func should be invoked\n * on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled\n * function will return the result of the last func call.\n *\n * Note: If leading and trailing options are true func will be called on the trailing edge of\n * the timeout only if the throttled function is invoked more than once during the wait timeout.\n *\n * @param func - The function to throttle.\n * @param wait - The number of milliseconds to throttle executions to. Defaults to 0.\n * @param options - The options object.\n * @returns The new throttled function.\n */\n\n\n Async.prototype.throttle = function (func, wait, options) {\n var _this = this;\n\n if (this._isDisposed) {\n return this._noop;\n }\n\n var waitMS = wait || 0;\n var leading = true;\n var trailing = true;\n var lastExecuteTime = 0;\n var lastResult; // tslint:disable-next-line:no-any\n\n var lastArgs;\n var timeoutId = null;\n\n if (options && typeof options.leading === 'boolean') {\n leading = options.leading;\n }\n\n if (options && typeof options.trailing === 'boolean') {\n trailing = options.trailing;\n }\n\n var callback = function callback(userCall) {\n var now = new Date().getTime();\n var delta = now - lastExecuteTime;\n var waitLength = leading ? waitMS - delta : waitMS;\n\n if (delta >= waitMS && (!userCall || leading)) {\n lastExecuteTime = now;\n\n if (timeoutId) {\n _this.clearTimeout(timeoutId);\n\n timeoutId = null;\n }\n\n lastResult = func.apply(_this._parent, lastArgs);\n } else if (timeoutId === null && trailing) {\n timeoutId = _this.setTimeout(callback, waitLength);\n }\n\n return lastResult;\n }; // tslint:disable-next-line:no-any\n\n\n var resultFunction = function resultFunction() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n lastArgs = args;\n return callback(true);\n };\n\n return resultFunction;\n };\n /**\n * Creates a function that will delay the execution of func until after wait milliseconds have\n * elapsed since the last time it was invoked. Provide an options object to indicate that func\n * should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls\n * to the debounced function will return the result of the last func call.\n *\n * Note: If leading and trailing options are true func will be called on the trailing edge of\n * the timeout only if the debounced function is invoked more than once during the wait\n * timeout.\n *\n * @param func - The function to debounce.\n * @param wait - The number of milliseconds to delay.\n * @param options - The options object.\n * @returns The new debounced function.\n */\n\n\n Async.prototype.debounce = function (func, wait, options) {\n var _this = this;\n\n if (this._isDisposed) {\n var noOpFunction = function noOpFunction() {\n /** Do nothing */\n };\n\n noOpFunction.cancel = function () {\n return;\n };\n /* tslint:disable:no-any */\n\n\n noOpFunction.flush = function () {\n return null;\n };\n /* tslint:enable:no-any */\n\n\n noOpFunction.pending = function () {\n return false;\n };\n\n return noOpFunction;\n }\n\n var waitMS = wait || 0;\n var leading = false;\n var trailing = true;\n var maxWait = null;\n var lastCallTime = 0;\n var lastExecuteTime = new Date().getTime();\n var lastResult; // tslint:disable-next-line:no-any\n\n var lastArgs;\n var timeoutId = null;\n\n if (options && typeof options.leading === 'boolean') {\n leading = options.leading;\n }\n\n if (options && typeof options.trailing === 'boolean') {\n trailing = options.trailing;\n }\n\n if (options && typeof options.maxWait === 'number' && !isNaN(options.maxWait)) {\n maxWait = options.maxWait;\n }\n\n var markExecuted = function markExecuted(time) {\n if (timeoutId) {\n _this.clearTimeout(timeoutId);\n\n timeoutId = null;\n }\n\n lastExecuteTime = time;\n };\n\n var invokeFunction = function invokeFunction(time) {\n markExecuted(time);\n lastResult = func.apply(_this._parent, lastArgs);\n };\n\n var callback = function callback(userCall) {\n var now = new Date().getTime();\n var executeImmediately = false;\n\n if (userCall) {\n if (leading && now - lastCallTime >= waitMS) {\n executeImmediately = true;\n }\n\n lastCallTime = now;\n }\n\n var delta = now - lastCallTime;\n var waitLength = waitMS - delta;\n var maxWaitDelta = now - lastExecuteTime;\n var maxWaitExpired = false;\n\n if (maxWait !== null) {\n // maxWait only matters when there is a pending callback\n if (maxWaitDelta >= maxWait && timeoutId) {\n maxWaitExpired = true;\n } else {\n waitLength = Math.min(waitLength, maxWait - maxWaitDelta);\n }\n }\n\n if (delta >= waitMS || maxWaitExpired || executeImmediately) {\n invokeFunction(now);\n } else if ((timeoutId === null || !userCall) && trailing) {\n timeoutId = _this.setTimeout(callback, waitLength);\n }\n\n return lastResult;\n };\n\n var pending = function pending() {\n return !!timeoutId;\n };\n\n var cancel = function cancel() {\n if (pending()) {\n // Mark the debounced function as having executed\n markExecuted(new Date().getTime());\n }\n };\n\n var flush = function flush() {\n if (pending()) {\n invokeFunction(new Date().getTime());\n }\n\n return lastResult;\n }; // tslint:disable-next-line:no-any\n\n\n var resultFunction = function resultFunction() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n lastArgs = args;\n return callback(true);\n };\n\n resultFunction.cancel = cancel;\n resultFunction.flush = flush;\n resultFunction.pending = pending;\n return resultFunction;\n };\n\n Async.prototype.requestAnimationFrame = function (callback, targetElement) {\n var _this = this;\n\n var animationFrameId = 0;\n var win = getWindow(targetElement);\n\n if (!this._isDisposed) {\n if (!this._animationFrameIds) {\n this._animationFrameIds = {};\n }\n /* tslint:disable:ban-native-functions */\n\n\n var animationFrameCallback = function animationFrameCallback() {\n try {\n // Now delete the record and call the callback.\n if (_this._animationFrameIds) {\n delete _this._animationFrameIds[animationFrameId];\n }\n\n callback.apply(_this._parent);\n } catch (e) {\n _this._logError(e);\n }\n };\n\n animationFrameId = win.requestAnimationFrame ? win.requestAnimationFrame(animationFrameCallback) : win.setTimeout(animationFrameCallback, 0);\n /* tslint:enable:ban-native-functions */\n\n this._animationFrameIds[animationFrameId] = true;\n }\n\n return animationFrameId;\n };\n\n Async.prototype.cancelAnimationFrame = function (id, targetElement) {\n var win = getWindow(targetElement);\n\n if (this._animationFrameIds && this._animationFrameIds[id]) {\n /* tslint:disable:ban-native-functions */\n win.cancelAnimationFrame ? win.cancelAnimationFrame(id) : win.clearTimeout(id);\n /* tslint:enable:ban-native-functions */\n\n delete this._animationFrameIds[id];\n }\n }; // tslint:disable-next-line:no-any\n\n\n Async.prototype._logError = function (e) {\n if (this._onErrorHandler) {\n this._onErrorHandler(e);\n }\n };\n\n return Async;\n}();\n\nexport { Async };","export function on(element, eventName, callback, options) {\n element.addEventListener(eventName, callback, options);\n return function () {\n return element.removeEventListener(eventName, callback, options);\n };\n}","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n};","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n/** Used to stand-in for `undefined` hash values. */\n\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n/** Used to compose bitmasks for value comparisons. */\n\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n/** Used as references for various `Number` constants. */\n\nvar MAX_SAFE_INTEGER = 9007199254740991;\n/** `Object#toString` result references. */\n\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n/** Used to detect host constructors (Safari). */\n\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n/** Used to detect unsigned integer values. */\n\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n/** Used to identify `toStringTag` values of typed arrays. */\n\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n/** Detect free variable `global` from Node.js. */\n\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n/** Detect free variable `self`. */\n\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n/** Used as a reference to the global object. */\n\nvar root = freeGlobal || freeSelf || Function('return this')();\n/** Detect free variable `exports`. */\n\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n/** Detect free variable `module`. */\n\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n/** Detect the popular CommonJS extension `module.exports`. */\n\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n/** Detect free variable `process` from Node.js. */\n\nvar freeProcess = moduleExports && freeGlobal.process;\n/** Used to access faster Node.js helpers. */\n\nvar nodeUtil = function () {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}();\n/* Node.js helper references. */\n\n\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n\n return result;\n}\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n\n\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n\n return array;\n}\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n\n\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n\n\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n\n return result;\n}\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n\n\nfunction baseUnary(func) {\n return function (value) {\n return func(value);\n };\n}\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n\n\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n\n\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n map.forEach(function (value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n\n\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n\n\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n set.forEach(function (value) {\n result[++index] = value;\n });\n return result;\n}\n/** Used for built-in method references. */\n\n\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n/** Used to detect overreaching core-js shims. */\n\nvar coreJsData = root['__core-js_shared__'];\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Used to detect methods masquerading as native. */\n\nvar maskSrcKey = function () {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? 'Symbol(src)_1.' + uid : '';\n}();\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\n\nvar nativeObjectToString = objectProto.toString;\n/** Used to detect if a method is native. */\n\nvar reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\n/** Built-in value references. */\n\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n/* Built-in method references that are verified to be native. */\n\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n/** Used to detect maps, sets, and weakmaps. */\n\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n/** Used to convert symbols to primitives and strings. */\n\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n\n\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\n\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction hashGet(key) {\n var data = this.__data__;\n\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n\n\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;\n return this;\n} // Add methods to `Hash`.\n\n\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n\n\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\n\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n\n var lastIndex = data.length - 1;\n\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n\n --this.size;\n return true;\n}\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n return index < 0 ? undefined : data[index][1];\n}\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n\n\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n\n return this;\n} // Add methods to `ListCache`.\n\n\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n\n\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n}\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\n\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n\n\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n} // Add methods to `MapCache`.\n\n\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n this.__data__ = new MapCache();\n\n while (++index < length) {\n this.add(values[index]);\n }\n}\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n\n\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n\n return this;\n}\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n\n\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n} // Add methods to `SetCache`.\n\n\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n\n\nfunction stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\n\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n this.size = data.size;\n return result;\n}\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n\n\nfunction stackSet(key, value) {\n var data = this.__data__;\n\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n\n if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n\n data = this.__data__ = new MapCache(pairs);\n }\n\n data.set(key, value);\n this.size = data.size;\n return this;\n} // Add methods to `Stack`.\n\n\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.\n isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays.\n isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.\n isIndex(key, length)))) {\n result.push(key);\n }\n }\n\n return result;\n}\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n\n\nfunction assocIndexOf(array, key) {\n var length = array.length;\n\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n\n return -1;\n}\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n\n\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n\n\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);\n}\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n\n\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n\n\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n\n if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {\n return value !== value && other !== other;\n }\n\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n\n\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n\n objIsArr = true;\n objIsObj = false;\n }\n\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack());\n return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n stack || (stack = new Stack());\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n\n if (!isSameTag) {\n return false;\n }\n\n stack || (stack = new Stack());\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n\n\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n\n\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n\n\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n\n var result = [];\n\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n\n return result;\n}\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n\n\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n } // Assume cyclic values are equal.\n\n\n var stacked = stack.get(array);\n\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n\n var index = -1,\n result = true,\n seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;\n stack.set(array, other);\n stack.set(other, array); // Ignore non-index properties.\n\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);\n }\n\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n\n result = false;\n break;\n } // Recursively compare arrays (susceptible to call stack limits).\n\n\n if (seen) {\n if (!arraySome(other, function (othValue, othIndex) {\n if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n result = false;\n break;\n }\n }\n\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n\n\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {\n return false;\n }\n\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == other + '';\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n } // Assume cyclic values are equal.\n\n\n var stacked = stack.get(object);\n\n if (stacked) {\n return stacked == other;\n }\n\n bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits).\n\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n\n }\n\n return false;\n}\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n\n\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n\n var index = objLength;\n\n while (index--) {\n var key = objProps[index];\n\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n } // Assume cyclic values are equal.\n\n\n var stacked = stack.get(object);\n\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n var skipCtor = isPartial;\n\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);\n } // Recursively compare objects (susceptible to call stack limits).\n\n\n if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {\n result = false;\n break;\n }\n\n skipCtor || (skipCtor = key == 'constructor');\n }\n\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal.\n\n if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n\n\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n\n\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;\n}\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n\n\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n\n\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n\n return result;\n}\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n\n\nvar getSymbols = !nativeGetSymbols ? stubArray : function (object) {\n if (object == null) {\n return [];\n }\n\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function (symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n\nvar getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n\nif (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {\n getTag = function getTag(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString:\n return dataViewTag;\n\n case mapCtorString:\n return mapTag;\n\n case promiseCtorString:\n return promiseTag;\n\n case setCtorString:\n return setTag;\n\n case weakMapCtorString:\n return weakMapTag;\n }\n }\n\n return result;\n };\n}\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n\n\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;\n}\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n\n\nfunction isKeyable(value) {\n var type = typeof value;\n return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;\n}\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n\n\nfunction isMasked(func) {\n return !!maskSrcKey && maskSrcKey in func;\n}\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n\n\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;\n return value === proto;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n\n\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n\n\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n\n try {\n return func + '';\n } catch (e) {}\n }\n\n return '';\n}\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n\n\nfunction eq(value, other) {\n return value === other || value !== value && other !== other;\n}\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n\n\nvar isArguments = baseIsArguments(function () {\n return arguments;\n}()) ? baseIsArguments : function (value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n};\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n\nvar isArray = Array.isArray;\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n\n\nvar isBuffer = nativeIsBuffer || stubFalse;\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n\n\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n } // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n\n\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n\n\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n\n\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n\n\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n\n\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\n\n\nfunction stubArray() {\n return [];\n}\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\n\n\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar editorOptions = [\"minLines\", \"maxLines\", \"readOnly\", \"highlightActiveLine\", \"tabSize\", \"enableBasicAutocompletion\", \"enableLiveAutocompletion\", \"enableSnippets\"];\nexports.editorOptions = editorOptions;\nvar editorEvents = [\"onChange\", \"onFocus\", \"onInput\", \"onBlur\", \"onCopy\", \"onPaste\", \"onSelectionChange\", \"onCursorChange\", \"onScroll\", \"handleOptions\", \"updateRef\"];\nexports.editorEvents = editorEvents;\n\nvar getAceInstance = function getAceInstance() {\n var ace; // Fallback for ace.require when vanilla ACE is hosted over a CDN\n\n if (window.ace) {\n ace = window.ace;\n ace.acequire = window.ace.require || window.ace.acequire;\n } else {\n ace = require(\"ace-builds\");\n }\n\n return ace;\n};\n\nexports.getAceInstance = getAceInstance;\n\nvar debounce = function debounce(fn, delay) {\n var timer = null;\n return function () {\n var context = this;\n var args = arguments;\n clearTimeout(timer);\n timer = setTimeout(function () {\n fn.apply(context, args);\n }, delay);\n };\n};\n\nexports.debounce = debounce;","/* ***** BEGIN LICENSE BLOCK *****\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * ***** END LICENSE BLOCK ***** */\n\n/**\n * Define a module along with a payload\n * @param module a name for the payload\n * @param payload a function to call with (require, exports, module) params\n */\n(function () {\n var ACE_NAMESPACE = \"ace\";\n\n var global = function () {\n return this;\n }();\n\n if (!global && typeof window != \"undefined\") global = window; // strict mode\n\n if (!ACE_NAMESPACE && typeof requirejs !== \"undefined\") return;\n\n var define = function define(module, deps, payload) {\n if (typeof module !== \"string\") {\n if (define.original) define.original.apply(this, arguments);else {\n console.error(\"dropping module because define wasn\\'t a string.\");\n console.trace();\n }\n return;\n }\n\n if (arguments.length == 2) payload = deps;\n\n if (!define.modules[module]) {\n define.payloads[module] = payload;\n define.modules[module] = null;\n }\n };\n\n define.modules = {};\n define.payloads = {};\n /**\n * Get at functionality define()ed using the function above\n */\n\n var _require = function _require(parentId, module, callback) {\n if (typeof module === \"string\") {\n var payload = lookup(parentId, module);\n\n if (payload != undefined) {\n callback && callback();\n return payload;\n }\n } else if (Object.prototype.toString.call(module) === \"[object Array]\") {\n var params = [];\n\n for (var i = 0, l = module.length; i < l; ++i) {\n var dep = lookup(parentId, module[i]);\n if (dep == undefined && require.original) return;\n params.push(dep);\n }\n\n return callback && callback.apply(null, params) || true;\n }\n };\n\n var require = function require(module, callback) {\n var packagedModule = _require(\"\", module, callback);\n\n if (packagedModule == undefined && require.original) return require.original.apply(this, arguments);\n return packagedModule;\n };\n\n var normalizeModule = function normalizeModule(parentId, moduleName) {\n // normalize plugin requires\n if (moduleName.indexOf(\"!\") !== -1) {\n var chunks = moduleName.split(\"!\");\n return normalizeModule(parentId, chunks[0]) + \"!\" + normalizeModule(parentId, chunks[1]);\n } // normalize relative requires\n\n\n if (moduleName.charAt(0) == \".\") {\n var base = parentId.split(\"/\").slice(0, -1).join(\"/\");\n moduleName = base + \"/\" + moduleName;\n\n while (moduleName.indexOf(\".\") !== -1 && previous != moduleName) {\n var previous = moduleName;\n moduleName = moduleName.replace(/\\/\\.\\//, \"/\").replace(/[^\\/]+\\/\\.\\.\\//, \"\");\n }\n }\n\n return moduleName;\n };\n /**\n * Internal function to lookup moduleNames and resolve them by calling the\n * definition function if needed.\n */\n\n\n var lookup = function lookup(parentId, moduleName) {\n moduleName = normalizeModule(parentId, moduleName);\n var module = define.modules[moduleName];\n\n if (!module) {\n module = define.payloads[moduleName];\n\n if (typeof module === 'function') {\n var exports = {};\n var mod = {\n id: moduleName,\n uri: '',\n exports: exports,\n packaged: true\n };\n\n var req = function req(module, callback) {\n return _require(moduleName, module, callback);\n };\n\n var returnValue = module(req, exports, mod);\n exports = returnValue || mod.exports;\n define.modules[moduleName] = exports;\n delete define.payloads[moduleName];\n }\n\n module = define.modules[moduleName] = exports || module;\n }\n\n return module;\n };\n\n function exportAce(ns) {\n var root = global;\n\n if (ns) {\n if (!global[ns]) global[ns] = {};\n root = global[ns];\n }\n\n if (!root.define || !root.define.packaged) {\n define.original = root.define;\n root.define = define;\n root.define.packaged = true;\n }\n\n if (!root.require || !root.require.packaged) {\n require.original = root.require;\n root.require = require;\n root.require.packaged = true;\n }\n }\n\n exportAce(ACE_NAMESPACE);\n})();\n\nace.define(\"ace/lib/regexp\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n var real = {\n exec: RegExp.prototype.exec,\n test: RegExp.prototype.test,\n match: String.prototype.match,\n replace: String.prototype.replace,\n split: String.prototype.split\n },\n compliantExecNpcg = real.exec.call(/()??/, \"\")[1] === undefined,\n // check `exec` handling of nonparticipating capturing groups\n compliantLastIndexIncrement = function () {\n var x = /^/g;\n real.test.call(x, \"\");\n return !x.lastIndex;\n }();\n\n if (compliantLastIndexIncrement && compliantExecNpcg) return;\n\n RegExp.prototype.exec = function (str) {\n var match = real.exec.apply(this, arguments),\n name,\n r2;\n\n if (typeof str == 'string' && match) {\n if (!compliantExecNpcg && match.length > 1 && indexOf(match, \"\") > -1) {\n r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), \"g\", \"\"));\n real.replace.call(str.slice(match.index), r2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n if (this._xregexp && this._xregexp.captureNames) {\n for (var i = 1; i < match.length; i++) {\n name = this._xregexp.captureNames[i - 1];\n if (name) match[name] = match[i];\n }\n }\n\n if (!compliantLastIndexIncrement && this.global && !match[0].length && this.lastIndex > match.index) this.lastIndex--;\n }\n\n return match;\n };\n\n if (!compliantLastIndexIncrement) {\n RegExp.prototype.test = function (str) {\n var match = real.exec.call(this, str);\n if (match && this.global && !match[0].length && this.lastIndex > match.index) this.lastIndex--;\n return !!match;\n };\n }\n\n function getNativeFlags(regex) {\n return (regex.global ? \"g\" : \"\") + (regex.ignoreCase ? \"i\" : \"\") + (regex.multiline ? \"m\" : \"\") + (regex.extended ? \"x\" : \"\") + ( // Proposed for ES4; included in AS3\n regex.sticky ? \"y\" : \"\");\n }\n\n function indexOf(array, item, from) {\n if (Array.prototype.indexOf) // Use the native array method if available\n return array.indexOf(item, from);\n\n for (var i = from || 0; i < array.length; i++) {\n if (array[i] === item) return i;\n }\n\n return -1;\n }\n});\nace.define(\"ace/lib/es5-shim\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n function Empty() {}\n\n if (!Function.prototype.bind) {\n Function.prototype.bind = function bind(that) {\n // .length is 1\n var target = this;\n\n if (typeof target != \"function\") {\n throw new TypeError(\"Function.prototype.bind called on incompatible \" + target);\n }\n\n var args = slice.call(arguments, 1); // for normal call\n\n var bound = function bound() {\n if (this instanceof bound) {\n var result = target.apply(this, args.concat(slice.call(arguments)));\n\n if (Object(result) === result) {\n return result;\n }\n\n return this;\n } else {\n return target.apply(that, args.concat(slice.call(arguments)));\n }\n };\n\n if (target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n };\n }\n\n var call = Function.prototype.call;\n var prototypeOfArray = Array.prototype;\n var prototypeOfObject = Object.prototype;\n var slice = prototypeOfArray.slice;\n\n var _toString = call.bind(prototypeOfObject.toString);\n\n var owns = call.bind(prototypeOfObject.hasOwnProperty);\n var defineGetter;\n var defineSetter;\n var lookupGetter;\n var lookupSetter;\n var supportsAccessors;\n\n if (supportsAccessors = owns(prototypeOfObject, \"__defineGetter__\")) {\n defineGetter = call.bind(prototypeOfObject.__defineGetter__);\n defineSetter = call.bind(prototypeOfObject.__defineSetter__);\n lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);\n lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);\n }\n\n if ([1, 2].splice(0).length != 2) {\n if (function () {\n // test IE < 9 to splice bug - see issue #138\n function makeArray(l) {\n var a = new Array(l + 2);\n a[0] = a[1] = 0;\n return a;\n }\n\n var array = [],\n lengthBefore;\n array.splice.apply(array, makeArray(20));\n array.splice.apply(array, makeArray(26));\n lengthBefore = array.length; //46\n\n array.splice(5, 0, \"XXX\"); // add one element\n\n lengthBefore + 1 == array.length;\n\n if (lengthBefore + 1 == array.length) {\n return true; // has right splice implementation without bugs\n }\n }()) {\n //IE 6/7\n var array_splice = Array.prototype.splice;\n\n Array.prototype.splice = function (start, deleteCount) {\n if (!arguments.length) {\n return [];\n } else {\n return array_splice.apply(this, [start === void 0 ? 0 : start, deleteCount === void 0 ? this.length - start : deleteCount].concat(slice.call(arguments, 2)));\n }\n };\n } else {\n //IE8\n Array.prototype.splice = function (pos, removeCount) {\n var length = this.length;\n\n if (pos > 0) {\n if (pos > length) pos = length;\n } else if (pos == void 0) {\n pos = 0;\n } else if (pos < 0) {\n pos = Math.max(length + pos, 0);\n }\n\n if (!(pos + removeCount < length)) removeCount = length - pos;\n var removed = this.slice(pos, pos + removeCount);\n var insert = slice.call(arguments, 2);\n var add = insert.length;\n\n if (pos === length) {\n if (add) {\n this.push.apply(this, insert);\n }\n } else {\n var remove = Math.min(removeCount, length - pos);\n var tailOldPos = pos + remove;\n var tailNewPos = tailOldPos + add - remove;\n var tailCount = length - tailOldPos;\n var lengthAfterRemove = length - remove;\n\n if (tailNewPos < tailOldPos) {\n // case A\n for (var i = 0; i < tailCount; ++i) {\n this[tailNewPos + i] = this[tailOldPos + i];\n }\n } else if (tailNewPos > tailOldPos) {\n // case B\n for (i = tailCount; i--;) {\n this[tailNewPos + i] = this[tailOldPos + i];\n }\n } // else, add == remove (nothing to do)\n\n\n if (add && pos === lengthAfterRemove) {\n this.length = lengthAfterRemove; // truncate array\n\n this.push.apply(this, insert);\n } else {\n this.length = lengthAfterRemove + add; // reserves space\n\n for (i = 0; i < add; ++i) {\n this[pos + i] = insert[i];\n }\n }\n }\n\n return removed;\n };\n }\n }\n\n if (!Array.isArray) {\n Array.isArray = function isArray(obj) {\n return _toString(obj) == \"[object Array]\";\n };\n }\n\n var boxedString = Object(\"a\"),\n splitString = boxedString[0] != \"a\" || !(0 in boxedString);\n\n if (!Array.prototype.forEach) {\n Array.prototype.forEach = function forEach(fun\n /*, thisp*/\n ) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : object,\n thisp = arguments[1],\n i = -1,\n length = self.length >>> 0;\n\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(); // TODO message\n }\n\n while (++i < length) {\n if (i in self) {\n fun.call(thisp, self[i], i, object);\n }\n }\n };\n }\n\n if (!Array.prototype.map) {\n Array.prototype.map = function map(fun\n /*, thisp*/\n ) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : object,\n length = self.length >>> 0,\n result = Array(length),\n thisp = arguments[1];\n\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self) result[i] = fun.call(thisp, self[i], i, object);\n }\n\n return result;\n };\n }\n\n if (!Array.prototype.filter) {\n Array.prototype.filter = function filter(fun\n /*, thisp */\n ) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : object,\n length = self.length >>> 0,\n result = [],\n value,\n thisp = arguments[1];\n\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self) {\n value = self[i];\n\n if (fun.call(thisp, value, i, object)) {\n result.push(value);\n }\n }\n }\n\n return result;\n };\n }\n\n if (!Array.prototype.every) {\n Array.prototype.every = function every(fun\n /*, thisp */\n ) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : object,\n length = self.length >>> 0,\n thisp = arguments[1];\n\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && !fun.call(thisp, self[i], i, object)) {\n return false;\n }\n }\n\n return true;\n };\n }\n\n if (!Array.prototype.some) {\n Array.prototype.some = function some(fun\n /*, thisp */\n ) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : object,\n length = self.length >>> 0,\n thisp = arguments[1];\n\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && fun.call(thisp, self[i], i, object)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n if (!Array.prototype.reduce) {\n Array.prototype.reduce = function reduce(fun\n /*, initial*/\n ) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : object,\n length = self.length >>> 0;\n\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n\n var i = 0;\n var result;\n\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i++];\n break;\n }\n\n if (++i >= length) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n } while (true);\n }\n\n for (; i < length; i++) {\n if (i in self) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n }\n\n return result;\n };\n }\n\n if (!Array.prototype.reduceRight) {\n Array.prototype.reduceRight = function reduceRight(fun\n /*, initial*/\n ) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : object,\n length = self.length >>> 0;\n\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n\n var result,\n i = length - 1;\n\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i--];\n break;\n }\n\n if (--i < 0) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n } while (true);\n }\n\n do {\n if (i in this) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n } while (i--);\n\n return result;\n };\n }\n\n if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1) {\n Array.prototype.indexOf = function indexOf(sought\n /*, fromIndex */\n ) {\n var self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = 0;\n\n if (arguments.length > 1) {\n i = toInteger(arguments[1]);\n }\n\n i = i >= 0 ? i : Math.max(0, length + i);\n\n for (; i < length; i++) {\n if (i in self && self[i] === sought) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1) {\n Array.prototype.lastIndexOf = function lastIndexOf(sought\n /*, fromIndex */\n ) {\n var self = splitString && _toString(this) == \"[object String]\" ? this.split(\"\") : toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = length - 1;\n\n if (arguments.length > 1) {\n i = Math.min(i, toInteger(arguments[1]));\n }\n\n i = i >= 0 ? i : length - Math.abs(i);\n\n for (; i >= 0; i--) {\n if (i in self && sought === self[i]) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n if (!Object.getPrototypeOf) {\n Object.getPrototypeOf = function getPrototypeOf(object) {\n return object.__proto__ || (object.constructor ? object.constructor.prototype : prototypeOfObject);\n };\n }\n\n if (!Object.getOwnPropertyDescriptor) {\n var ERR_NON_OBJECT = \"Object.getOwnPropertyDescriptor called on a \" + \"non-object: \";\n\n Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {\n if (typeof object != \"object\" && typeof object != \"function\" || object === null) throw new TypeError(ERR_NON_OBJECT + object);\n if (!owns(object, property)) return;\n var descriptor, getter, setter;\n descriptor = {\n enumerable: true,\n configurable: true\n };\n\n if (supportsAccessors) {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n var getter = lookupGetter(object, property);\n var setter = lookupSetter(object, property);\n object.__proto__ = prototype;\n\n if (getter || setter) {\n if (getter) descriptor.get = getter;\n if (setter) descriptor.set = setter;\n return descriptor;\n }\n }\n\n descriptor.value = object[property];\n return descriptor;\n };\n }\n\n if (!Object.getOwnPropertyNames) {\n Object.getOwnPropertyNames = function getOwnPropertyNames(object) {\n return Object.keys(object);\n };\n }\n\n if (!Object.create) {\n var createEmpty;\n\n if (Object.prototype.__proto__ === null) {\n createEmpty = function createEmpty() {\n return {\n \"__proto__\": null\n };\n };\n } else {\n createEmpty = function createEmpty() {\n var empty = {};\n\n for (var i in empty) {\n empty[i] = null;\n }\n\n empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null;\n return empty;\n };\n }\n\n Object.create = function create(prototype, properties) {\n var object;\n\n if (prototype === null) {\n object = createEmpty();\n } else {\n if (typeof prototype != \"object\") throw new TypeError(\"typeof prototype[\" + typeof prototype + \"] != 'object'\");\n\n var Type = function Type() {};\n\n Type.prototype = prototype;\n object = new Type();\n object.__proto__ = prototype;\n }\n\n if (properties !== void 0) Object.defineProperties(object, properties);\n return object;\n };\n }\n\n function doesDefinePropertyWork(object) {\n try {\n Object.defineProperty(object, \"sentinel\", {});\n return \"sentinel\" in object;\n } catch (exception) {}\n }\n\n if (Object.defineProperty) {\n var definePropertyWorksOnObject = doesDefinePropertyWork({});\n var definePropertyWorksOnDom = typeof document == \"undefined\" || doesDefinePropertyWork(document.createElement(\"div\"));\n\n if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {\n var definePropertyFallback = Object.defineProperty;\n }\n }\n\n if (!Object.defineProperty || definePropertyFallback) {\n var ERR_NON_OBJECT_DESCRIPTOR = \"Property description must be an object: \";\n var ERR_NON_OBJECT_TARGET = \"Object.defineProperty called on non-object: \";\n var ERR_ACCESSORS_NOT_SUPPORTED = \"getters & setters can not be defined \" + \"on this javascript engine\";\n\n Object.defineProperty = function defineProperty(object, property, descriptor) {\n if (typeof object != \"object\" && typeof object != \"function\" || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object);\n if (typeof descriptor != \"object\" && typeof descriptor != \"function\" || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);\n\n if (definePropertyFallback) {\n try {\n return definePropertyFallback.call(Object, object, property, descriptor);\n } catch (exception) {}\n }\n\n if (owns(descriptor, \"value\")) {\n if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n delete object[property];\n object[property] = descriptor.value;\n object.__proto__ = prototype;\n } else {\n object[property] = descriptor.value;\n }\n } else {\n if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n if (owns(descriptor, \"get\")) defineGetter(object, property, descriptor.get);\n if (owns(descriptor, \"set\")) defineSetter(object, property, descriptor.set);\n }\n\n return object;\n };\n }\n\n if (!Object.defineProperties) {\n Object.defineProperties = function defineProperties(object, properties) {\n for (var property in properties) {\n if (owns(properties, property)) Object.defineProperty(object, property, properties[property]);\n }\n\n return object;\n };\n }\n\n if (!Object.seal) {\n Object.seal = function seal(object) {\n return object;\n };\n }\n\n if (!Object.freeze) {\n Object.freeze = function freeze(object) {\n return object;\n };\n }\n\n try {\n Object.freeze(function () {});\n } catch (exception) {\n Object.freeze = function freeze(freezeObject) {\n return function freeze(object) {\n if (typeof object == \"function\") {\n return object;\n } else {\n return freezeObject(object);\n }\n };\n }(Object.freeze);\n }\n\n if (!Object.preventExtensions) {\n Object.preventExtensions = function preventExtensions(object) {\n return object;\n };\n }\n\n if (!Object.isSealed) {\n Object.isSealed = function isSealed(object) {\n return false;\n };\n }\n\n if (!Object.isFrozen) {\n Object.isFrozen = function isFrozen(object) {\n return false;\n };\n }\n\n if (!Object.isExtensible) {\n Object.isExtensible = function isExtensible(object) {\n if (Object(object) === object) {\n throw new TypeError(); // TODO message\n }\n\n var name = '';\n\n while (owns(object, name)) {\n name += '?';\n }\n\n object[name] = true;\n var returnValue = owns(object, name);\n delete object[name];\n return returnValue;\n };\n }\n\n if (!Object.keys) {\n var hasDontEnumBug = true,\n dontEnums = [\"toString\", \"toLocaleString\", \"valueOf\", \"hasOwnProperty\", \"isPrototypeOf\", \"propertyIsEnumerable\", \"constructor\"],\n dontEnumsLength = dontEnums.length;\n\n for (var key in {\n \"toString\": null\n }) {\n hasDontEnumBug = false;\n }\n\n Object.keys = function keys(object) {\n if (typeof object != \"object\" && typeof object != \"function\" || object === null) {\n throw new TypeError(\"Object.keys called on a non-object\");\n }\n\n var keys = [];\n\n for (var name in object) {\n if (owns(object, name)) {\n keys.push(name);\n }\n }\n\n if (hasDontEnumBug) {\n for (var i = 0, ii = dontEnumsLength; i < ii; i++) {\n var dontEnum = dontEnums[i];\n\n if (owns(object, dontEnum)) {\n keys.push(dontEnum);\n }\n }\n }\n\n return keys;\n };\n }\n\n if (!Date.now) {\n Date.now = function now() {\n return new Date().getTime();\n };\n }\n\n var ws = \"\\t\\n\\x0B\\f\\r \\xA0\\u1680\\u2000\\u2001\\u2002\\u2003\" + \"\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\" + \"\\u2029\\uFEFF\";\n\n if (!String.prototype.trim) {\n ws = \"[\" + ws + \"]\";\n var trimBeginRegexp = new RegExp(\"^\" + ws + ws + \"*\"),\n trimEndRegexp = new RegExp(ws + ws + \"*$\");\n\n String.prototype.trim = function trim() {\n return String(this).replace(trimBeginRegexp, \"\").replace(trimEndRegexp, \"\");\n };\n }\n\n function toInteger(n) {\n n = +n;\n\n if (n !== n) {\n // isNaN\n n = 0;\n } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n\n return n;\n }\n\n function isPrimitive(input) {\n var type = typeof input;\n return input === null || type === \"undefined\" || type === \"boolean\" || type === \"number\" || type === \"string\";\n }\n\n function toPrimitive(input) {\n var val, valueOf, toString;\n\n if (isPrimitive(input)) {\n return input;\n }\n\n valueOf = input.valueOf;\n\n if (typeof valueOf === \"function\") {\n val = valueOf.call(input);\n\n if (isPrimitive(val)) {\n return val;\n }\n }\n\n toString = input.toString;\n\n if (typeof toString === \"function\") {\n val = toString.call(input);\n\n if (isPrimitive(val)) {\n return val;\n }\n }\n\n throw new TypeError();\n }\n\n var toObject = function toObject(o) {\n if (o == null) {\n // this matches both null and undefined\n throw new TypeError(\"can't convert \" + o + \" to object\");\n }\n\n return Object(o);\n };\n});\nace.define(\"ace/lib/fixoldbrowsers\", [\"require\", \"exports\", \"module\", \"ace/lib/regexp\", \"ace/lib/es5-shim\"], function (require, exports, module) {\n \"use strict\";\n\n require(\"./regexp\");\n\n require(\"./es5-shim\");\n\n if (typeof Element != \"undefined\" && !Element.prototype.remove) {\n Object.defineProperty(Element.prototype, \"remove\", {\n enumerable: false,\n writable: true,\n configurable: true,\n value: function value() {\n this.parentNode && this.parentNode.removeChild(this);\n }\n });\n }\n});\nace.define(\"ace/lib/useragent\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n exports.OS = {\n LINUX: \"LINUX\",\n MAC: \"MAC\",\n WINDOWS: \"WINDOWS\"\n };\n\n exports.getOS = function () {\n if (exports.isMac) {\n return exports.OS.MAC;\n } else if (exports.isLinux) {\n return exports.OS.LINUX;\n } else {\n return exports.OS.WINDOWS;\n }\n };\n\n var _navigator = typeof navigator == \"object\" ? navigator : {};\n\n var os = (/mac|win|linux/i.exec(_navigator.platform) || [\"other\"])[0].toLowerCase();\n var ua = _navigator.userAgent || \"\";\n var appName = _navigator.appName || \"\";\n exports.isWin = os == \"win\";\n exports.isMac = os == \"mac\";\n exports.isLinux = os == \"linux\";\n exports.isIE = appName == \"Microsoft Internet Explorer\" || appName.indexOf(\"MSAppHost\") >= 0 ? parseFloat((ua.match(/(?:MSIE |Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/) || [])[1]) : parseFloat((ua.match(/(?:Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/) || [])[1]); // for ie\n\n exports.isOldIE = exports.isIE && exports.isIE < 9;\n exports.isGecko = exports.isMozilla = ua.match(/ Gecko\\/\\d+/);\n exports.isOpera = typeof opera == \"object\" && Object.prototype.toString.call(window.opera) == \"[object Opera]\";\n exports.isWebKit = parseFloat(ua.split(\"WebKit/\")[1]) || undefined;\n exports.isChrome = parseFloat(ua.split(\" Chrome/\")[1]) || undefined;\n exports.isEdge = parseFloat(ua.split(\" Edge/\")[1]) || undefined;\n exports.isAIR = ua.indexOf(\"AdobeAIR\") >= 0;\n exports.isAndroid = ua.indexOf(\"Android\") >= 0;\n exports.isChromeOS = ua.indexOf(\" CrOS \") >= 0;\n exports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream;\n if (exports.isIOS) exports.isMac = true;\n exports.isMobile = exports.isIOS || exports.isAndroid;\n});\nace.define(\"ace/lib/dom\", [\"require\", \"exports\", \"module\", \"ace/lib/useragent\"], function (require, exports, module) {\n \"use strict\";\n\n var useragent = require(\"./useragent\");\n\n var XHTML_NS = \"http://www.w3.org/1999/xhtml\";\n\n exports.buildDom = function buildDom(arr, parent, refs) {\n if (typeof arr == \"string\" && arr) {\n var txt = document.createTextNode(arr);\n if (parent) parent.appendChild(txt);\n return txt;\n }\n\n if (!Array.isArray(arr)) return arr;\n\n if (typeof arr[0] != \"string\" || !arr[0]) {\n var els = [];\n\n for (var i = 0; i < arr.length; i++) {\n var ch = buildDom(arr[i], parent, refs);\n ch && els.push(ch);\n }\n\n return els;\n }\n\n var el = document.createElement(arr[0]);\n var options = arr[1];\n var childIndex = 1;\n if (options && typeof options == \"object\" && !Array.isArray(options)) childIndex = 2;\n\n for (var i = childIndex; i < arr.length; i++) {\n buildDom(arr[i], el, refs);\n }\n\n if (childIndex == 2) {\n Object.keys(options).forEach(function (n) {\n var val = options[n];\n\n if (n === \"class\") {\n el.className = Array.isArray(val) ? val.join(\" \") : val;\n } else if (typeof val == \"function\" || n == \"value\") {\n el[n] = val;\n } else if (n === \"ref\") {\n if (refs) refs[val] = el;\n } else if (val != null) {\n el.setAttribute(n, val);\n }\n });\n }\n\n if (parent) parent.appendChild(el);\n return el;\n };\n\n exports.getDocumentHead = function (doc) {\n if (!doc) doc = document;\n return doc.head || doc.getElementsByTagName(\"head\")[0] || doc.documentElement;\n };\n\n exports.createElement = function (tag, ns) {\n return document.createElementNS ? document.createElementNS(ns || XHTML_NS, tag) : document.createElement(tag);\n };\n\n exports.removeChildren = function (element) {\n element.innerHTML = \"\";\n };\n\n exports.createTextNode = function (textContent, element) {\n var doc = element ? element.ownerDocument : document;\n return doc.createTextNode(textContent);\n };\n\n exports.createFragment = function (element) {\n var doc = element ? element.ownerDocument : document;\n return doc.createDocumentFragment();\n };\n\n exports.hasCssClass = function (el, name) {\n var classes = (el.className + \"\").split(/\\s+/g);\n return classes.indexOf(name) !== -1;\n };\n\n exports.addCssClass = function (el, name) {\n if (!exports.hasCssClass(el, name)) {\n el.className += \" \" + name;\n }\n };\n\n exports.removeCssClass = function (el, name) {\n var classes = el.className.split(/\\s+/g);\n\n while (true) {\n var index = classes.indexOf(name);\n\n if (index == -1) {\n break;\n }\n\n classes.splice(index, 1);\n }\n\n el.className = classes.join(\" \");\n };\n\n exports.toggleCssClass = function (el, name) {\n var classes = el.className.split(/\\s+/g),\n add = true;\n\n while (true) {\n var index = classes.indexOf(name);\n\n if (index == -1) {\n break;\n }\n\n add = false;\n classes.splice(index, 1);\n }\n\n if (add) classes.push(name);\n el.className = classes.join(\" \");\n return add;\n };\n\n exports.setCssClass = function (node, className, include) {\n if (include) {\n exports.addCssClass(node, className);\n } else {\n exports.removeCssClass(node, className);\n }\n };\n\n exports.hasCssString = function (id, doc) {\n var index = 0,\n sheets;\n doc = doc || document;\n\n if (sheets = doc.querySelectorAll(\"style\")) {\n while (index < sheets.length) {\n if (sheets[index++].id === id) return true;\n }\n }\n };\n\n exports.importCssString = function importCssString(cssText, id, target) {\n var container = target;\n\n if (!target || !target.getRootNode) {\n container = document;\n } else {\n container = target.getRootNode();\n if (!container || container == target) container = document;\n }\n\n var doc = container.ownerDocument || container;\n if (id && exports.hasCssString(id, container)) return null;\n if (id) cssText += \"\\n/*# sourceURL=ace/css/\" + id + \" */\";\n var style = exports.createElement(\"style\");\n style.appendChild(doc.createTextNode(cssText));\n if (id) style.id = id;\n if (container == doc) container = exports.getDocumentHead(doc);\n container.insertBefore(style, container.firstChild);\n };\n\n exports.importCssStylsheet = function (uri, doc) {\n exports.buildDom([\"link\", {\n rel: \"stylesheet\",\n href: uri\n }], exports.getDocumentHead(doc));\n };\n\n exports.scrollbarWidth = function (document) {\n var inner = exports.createElement(\"ace_inner\");\n inner.style.width = \"100%\";\n inner.style.minWidth = \"0px\";\n inner.style.height = \"200px\";\n inner.style.display = \"block\";\n var outer = exports.createElement(\"ace_outer\");\n var style = outer.style;\n style.position = \"absolute\";\n style.left = \"-10000px\";\n style.overflow = \"hidden\";\n style.width = \"200px\";\n style.minWidth = \"0px\";\n style.height = \"150px\";\n style.display = \"block\";\n outer.appendChild(inner);\n var body = document.documentElement;\n body.appendChild(outer);\n var noScrollbar = inner.offsetWidth;\n style.overflow = \"scroll\";\n var withScrollbar = inner.offsetWidth;\n\n if (noScrollbar == withScrollbar) {\n withScrollbar = outer.clientWidth;\n }\n\n body.removeChild(outer);\n return noScrollbar - withScrollbar;\n };\n\n if (typeof document == \"undefined\") {\n exports.importCssString = function () {};\n }\n\n exports.computedStyle = function (element, style) {\n return window.getComputedStyle(element, \"\") || {};\n };\n\n exports.setStyle = function (styles, property, value) {\n if (styles[property] !== value) {\n styles[property] = value;\n }\n };\n\n exports.HAS_CSS_ANIMATION = false;\n exports.HAS_CSS_TRANSFORMS = false;\n exports.HI_DPI = useragent.isWin ? typeof window !== \"undefined\" && window.devicePixelRatio >= 1.5 : true;\n\n if (typeof document !== \"undefined\") {\n var div = document.createElement(\"div\");\n if (exports.HI_DPI && div.style.transform !== undefined) exports.HAS_CSS_TRANSFORMS = true;\n if (!useragent.isEdge && typeof div.style.animationName !== \"undefined\") exports.HAS_CSS_ANIMATION = true;\n div = null;\n }\n\n if (exports.HAS_CSS_TRANSFORMS) {\n exports.translate = function (element, tx, ty) {\n element.style.transform = \"translate(\" + Math.round(tx) + \"px, \" + Math.round(ty) + \"px)\";\n };\n } else {\n exports.translate = function (element, tx, ty) {\n element.style.top = Math.round(ty) + \"px\";\n element.style.left = Math.round(tx) + \"px\";\n };\n }\n});\nace.define(\"ace/lib/oop\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n exports.inherits = function (ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n\n exports.mixin = function (obj, mixin) {\n for (var key in mixin) {\n obj[key] = mixin[key];\n }\n\n return obj;\n };\n\n exports.implement = function (proto, mixin) {\n exports.mixin(proto, mixin);\n };\n});\nace.define(\"ace/lib/keys\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./oop\");\n\n var Keys = function () {\n var ret = {\n MODIFIER_KEYS: {\n 16: 'Shift',\n 17: 'Ctrl',\n 18: 'Alt',\n 224: 'Meta',\n 91: 'MetaLeft',\n 92: 'MetaRight',\n 93: 'ContextMenu'\n },\n KEY_MODS: {\n \"ctrl\": 1,\n \"alt\": 2,\n \"option\": 2,\n \"shift\": 4,\n \"super\": 8,\n \"meta\": 8,\n \"command\": 8,\n \"cmd\": 8\n },\n FUNCTION_KEYS: {\n 8: \"Backspace\",\n 9: \"Tab\",\n 13: \"Return\",\n 19: \"Pause\",\n 27: \"Esc\",\n 32: \"Space\",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"Left\",\n 38: \"Up\",\n 39: \"Right\",\n 40: \"Down\",\n 44: \"Print\",\n 45: \"Insert\",\n 46: \"Delete\",\n 96: \"Numpad0\",\n 97: \"Numpad1\",\n 98: \"Numpad2\",\n 99: \"Numpad3\",\n 100: \"Numpad4\",\n 101: \"Numpad5\",\n 102: \"Numpad6\",\n 103: \"Numpad7\",\n 104: \"Numpad8\",\n 105: \"Numpad9\",\n '-13': \"NumpadEnter\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"Numlock\",\n 145: \"Scrolllock\"\n },\n PRINTABLE_KEYS: {\n 32: ' ',\n 48: '0',\n 49: '1',\n 50: '2',\n 51: '3',\n 52: '4',\n 53: '5',\n 54: '6',\n 55: '7',\n 56: '8',\n 57: '9',\n 59: ';',\n 61: '=',\n 65: 'a',\n 66: 'b',\n 67: 'c',\n 68: 'd',\n 69: 'e',\n 70: 'f',\n 71: 'g',\n 72: 'h',\n 73: 'i',\n 74: 'j',\n 75: 'k',\n 76: 'l',\n 77: 'm',\n 78: 'n',\n 79: 'o',\n 80: 'p',\n 81: 'q',\n 82: 'r',\n 83: 's',\n 84: 't',\n 85: 'u',\n 86: 'v',\n 87: 'w',\n 88: 'x',\n 89: 'y',\n 90: 'z',\n 107: '+',\n 109: '-',\n 110: '.',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: \"'\",\n 111: '/',\n 106: '*'\n }\n };\n var name, i;\n\n for (i in ret.FUNCTION_KEYS) {\n name = ret.FUNCTION_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n\n for (i in ret.PRINTABLE_KEYS) {\n name = ret.PRINTABLE_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n\n oop.mixin(ret, ret.MODIFIER_KEYS);\n oop.mixin(ret, ret.PRINTABLE_KEYS);\n oop.mixin(ret, ret.FUNCTION_KEYS);\n ret.enter = ret[\"return\"];\n ret.escape = ret.esc;\n ret.del = ret[\"delete\"];\n ret[173] = '-';\n\n (function () {\n var mods = [\"cmd\", \"ctrl\", \"alt\", \"shift\"];\n\n for (var i = Math.pow(2, mods.length); i--;) {\n ret.KEY_MODS[i] = mods.filter(function (x) {\n return i & ret.KEY_MODS[x];\n }).join(\"-\") + \"-\";\n }\n })();\n\n ret.KEY_MODS[0] = \"\";\n ret.KEY_MODS[-1] = \"input-\";\n return ret;\n }();\n\n oop.mixin(exports, Keys);\n\n exports.keyCodeToString = function (keyCode) {\n var keyString = Keys[keyCode];\n if (typeof keyString != \"string\") keyString = String.fromCharCode(keyCode);\n return keyString.toLowerCase();\n };\n});\nace.define(\"ace/lib/event\", [\"require\", \"exports\", \"module\", \"ace/lib/keys\", \"ace/lib/useragent\"], function (require, exports, module) {\n \"use strict\";\n\n var keys = require(\"./keys\");\n\n var useragent = require(\"./useragent\");\n\n var pressedKeys = null;\n var ts = 0;\n\n exports.addListener = function (elem, type, callback) {\n if (elem.addEventListener) {\n return elem.addEventListener(type, callback, false);\n }\n\n if (elem.attachEvent) {\n var wrapper = function wrapper() {\n callback.call(elem, window.event);\n };\n\n callback._wrapper = wrapper;\n elem.attachEvent(\"on\" + type, wrapper);\n }\n };\n\n exports.removeListener = function (elem, type, callback) {\n if (elem.removeEventListener) {\n return elem.removeEventListener(type, callback, false);\n }\n\n if (elem.detachEvent) {\n elem.detachEvent(\"on\" + type, callback._wrapper || callback);\n }\n };\n\n exports.stopEvent = function (e) {\n exports.stopPropagation(e);\n exports.preventDefault(e);\n return false;\n };\n\n exports.stopPropagation = function (e) {\n if (e.stopPropagation) e.stopPropagation();else e.cancelBubble = true;\n };\n\n exports.preventDefault = function (e) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n };\n\n exports.getButton = function (e) {\n if (e.type == \"dblclick\") return 0;\n if (e.type == \"contextmenu\" || useragent.isMac && e.ctrlKey && !e.altKey && !e.shiftKey) return 2;\n\n if (e.preventDefault) {\n return e.button;\n } else {\n return {\n 1: 0,\n 2: 2,\n 4: 1\n }[e.button];\n }\n };\n\n exports.capture = function (el, eventHandler, releaseCaptureHandler) {\n function onMouseUp(e) {\n eventHandler && eventHandler(e);\n releaseCaptureHandler && releaseCaptureHandler(e);\n exports.removeListener(document, \"mousemove\", eventHandler, true);\n exports.removeListener(document, \"mouseup\", onMouseUp, true);\n exports.removeListener(document, \"dragstart\", onMouseUp, true);\n }\n\n exports.addListener(document, \"mousemove\", eventHandler, true);\n exports.addListener(document, \"mouseup\", onMouseUp, true);\n exports.addListener(document, \"dragstart\", onMouseUp, true);\n return onMouseUp;\n };\n\n exports.addMouseWheelListener = function (el, callback) {\n if (\"onmousewheel\" in el) {\n exports.addListener(el, \"mousewheel\", function (e) {\n var factor = 8;\n\n if (e.wheelDeltaX !== undefined) {\n e.wheelX = -e.wheelDeltaX / factor;\n e.wheelY = -e.wheelDeltaY / factor;\n } else {\n e.wheelX = 0;\n e.wheelY = -e.wheelDelta / factor;\n }\n\n callback(e);\n });\n } else if (\"onwheel\" in el) {\n exports.addListener(el, \"wheel\", function (e) {\n var factor = 0.35;\n\n switch (e.deltaMode) {\n case e.DOM_DELTA_PIXEL:\n e.wheelX = e.deltaX * factor || 0;\n e.wheelY = e.deltaY * factor || 0;\n break;\n\n case e.DOM_DELTA_LINE:\n case e.DOM_DELTA_PAGE:\n e.wheelX = (e.deltaX || 0) * 5;\n e.wheelY = (e.deltaY || 0) * 5;\n break;\n }\n\n callback(e);\n });\n } else {\n exports.addListener(el, \"DOMMouseScroll\", function (e) {\n if (e.axis && e.axis == e.HORIZONTAL_AXIS) {\n e.wheelX = (e.detail || 0) * 5;\n e.wheelY = 0;\n } else {\n e.wheelX = 0;\n e.wheelY = (e.detail || 0) * 5;\n }\n\n callback(e);\n });\n }\n };\n\n exports.addMultiMouseDownListener = function (elements, timeouts, eventHandler, callbackName) {\n var clicks = 0;\n var startX, startY, timer;\n var eventNames = {\n 2: \"dblclick\",\n 3: \"tripleclick\",\n 4: \"quadclick\"\n };\n\n function onMousedown(e) {\n if (exports.getButton(e) !== 0) {\n clicks = 0;\n } else if (e.detail > 1) {\n clicks++;\n if (clicks > 4) clicks = 1;\n } else {\n clicks = 1;\n }\n\n if (useragent.isIE) {\n var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;\n if (!timer || isNewClick) clicks = 1;\n if (timer) clearTimeout(timer);\n timer = setTimeout(function () {\n timer = null;\n }, timeouts[clicks - 1] || 600);\n\n if (clicks == 1) {\n startX = e.clientX;\n startY = e.clientY;\n }\n }\n\n e._clicks = clicks;\n eventHandler[callbackName](\"mousedown\", e);\n if (clicks > 4) clicks = 0;else if (clicks > 1) return eventHandler[callbackName](eventNames[clicks], e);\n }\n\n function onDblclick(e) {\n clicks = 2;\n if (timer) clearTimeout(timer);\n timer = setTimeout(function () {\n timer = null;\n }, timeouts[clicks - 1] || 600);\n eventHandler[callbackName](\"mousedown\", e);\n eventHandler[callbackName](eventNames[clicks], e);\n }\n\n if (!Array.isArray(elements)) elements = [elements];\n elements.forEach(function (el) {\n exports.addListener(el, \"mousedown\", onMousedown);\n if (useragent.isOldIE) exports.addListener(el, \"dblclick\", onDblclick);\n });\n };\n\n var getModifierHash = useragent.isMac && useragent.isOpera && !(\"KeyboardEvent\" in window) ? function (e) {\n return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);\n } : function (e) {\n return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);\n };\n\n exports.getModifierString = function (e) {\n return keys.KEY_MODS[getModifierHash(e)];\n };\n\n function normalizeCommandKeys(callback, e, keyCode) {\n var hashId = getModifierHash(e);\n\n if (!useragent.isMac && pressedKeys) {\n if (e.getModifierState && (e.getModifierState(\"OS\") || e.getModifierState(\"Win\"))) hashId |= 8;\n\n if (pressedKeys.altGr) {\n if ((3 & hashId) != 3) pressedKeys.altGr = 0;else return;\n }\n\n if (keyCode === 18 || keyCode === 17) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n\n if (keyCode === 17 && location === 1) {\n if (pressedKeys[keyCode] == 1) ts = e.timeStamp;\n } else if (keyCode === 18 && hashId === 3 && location === 2) {\n var dt = e.timeStamp - ts;\n if (dt < 50) pressedKeys.altGr = true;\n }\n }\n }\n\n if (keyCode in keys.MODIFIER_KEYS) {\n keyCode = -1;\n }\n\n if (!hashId && keyCode === 13) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n\n if (location === 3) {\n callback(e, hashId, -keyCode);\n if (e.defaultPrevented) return;\n }\n }\n\n if (useragent.isChromeOS && hashId & 8) {\n callback(e, hashId, keyCode);\n if (e.defaultPrevented) return;else hashId &= ~8;\n }\n\n if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {\n return false;\n }\n\n return callback(e, hashId, keyCode);\n }\n\n exports.addCommandKeyListener = function (el, callback) {\n var addListener = exports.addListener;\n\n if (useragent.isOldGecko || useragent.isOpera && !(\"KeyboardEvent\" in window)) {\n var lastKeyDownKeyCode = null;\n addListener(el, \"keydown\", function (e) {\n lastKeyDownKeyCode = e.keyCode;\n });\n addListener(el, \"keypress\", function (e) {\n return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);\n });\n } else {\n var lastDefaultPrevented = null;\n addListener(el, \"keydown\", function (e) {\n pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;\n var result = normalizeCommandKeys(callback, e, e.keyCode);\n lastDefaultPrevented = e.defaultPrevented;\n return result;\n });\n addListener(el, \"keypress\", function (e) {\n if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {\n exports.stopEvent(e);\n lastDefaultPrevented = null;\n }\n });\n addListener(el, \"keyup\", function (e) {\n pressedKeys[e.keyCode] = null;\n });\n\n if (!pressedKeys) {\n resetPressedKeys();\n addListener(window, \"focus\", resetPressedKeys);\n }\n }\n };\n\n function resetPressedKeys() {\n pressedKeys = Object.create(null);\n }\n\n if (typeof window == \"object\" && window.postMessage && !useragent.isOldIE) {\n var postMessageId = 1;\n\n exports.nextTick = function (callback, win) {\n win = win || window;\n var messageName = \"zero-timeout-message-\" + postMessageId++;\n\n var listener = function listener(e) {\n if (e.data == messageName) {\n exports.stopPropagation(e);\n exports.removeListener(win, \"message\", listener);\n callback();\n }\n };\n\n exports.addListener(win, \"message\", listener);\n win.postMessage(messageName, \"*\");\n };\n }\n\n exports.$idleBlocked = false;\n\n exports.onIdle = function (cb, timeout) {\n return setTimeout(function handler() {\n if (!exports.$idleBlocked) {\n cb();\n } else {\n setTimeout(handler, 100);\n }\n }, timeout);\n };\n\n exports.$idleBlockId = null;\n\n exports.blockIdle = function (delay) {\n if (exports.$idleBlockId) clearTimeout(exports.$idleBlockId);\n exports.$idleBlocked = true;\n exports.$idleBlockId = setTimeout(function () {\n exports.$idleBlocked = false;\n }, delay || 100);\n };\n\n exports.nextFrame = typeof window == \"object\" && (window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame);\n if (exports.nextFrame) exports.nextFrame = exports.nextFrame.bind(window);else exports.nextFrame = function (callback) {\n setTimeout(callback, 17);\n };\n});\nace.define(\"ace/range\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n var comparePoints = function comparePoints(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n };\n\n var Range = function Range(startRow, startColumn, endRow, endColumn) {\n this.start = {\n row: startRow,\n column: startColumn\n };\n this.end = {\n row: endRow,\n column: endColumn\n };\n };\n\n (function () {\n this.isEqual = function (range) {\n return this.start.row === range.start.row && this.end.row === range.end.row && this.start.column === range.start.column && this.end.column === range.end.column;\n };\n\n this.toString = function () {\n return \"Range: [\" + this.start.row + \"/\" + this.start.column + \"] -> [\" + this.end.row + \"/\" + this.end.column + \"]\";\n };\n\n this.contains = function (row, column) {\n return this.compare(row, column) == 0;\n };\n\n this.compareRange = function (range) {\n var cmp,\n end = range.end,\n start = range.start;\n cmp = this.compare(end.row, end.column);\n\n if (cmp == 1) {\n cmp = this.compare(start.row, start.column);\n\n if (cmp == 1) {\n return 2;\n } else if (cmp == 0) {\n return 1;\n } else {\n return 0;\n }\n } else if (cmp == -1) {\n return -2;\n } else {\n cmp = this.compare(start.row, start.column);\n\n if (cmp == -1) {\n return -1;\n } else if (cmp == 1) {\n return 42;\n } else {\n return 0;\n }\n }\n };\n\n this.comparePoint = function (p) {\n return this.compare(p.row, p.column);\n };\n\n this.containsRange = function (range) {\n return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;\n };\n\n this.intersects = function (range) {\n var cmp = this.compareRange(range);\n return cmp == -1 || cmp == 0 || cmp == 1;\n };\n\n this.isEnd = function (row, column) {\n return this.end.row == row && this.end.column == column;\n };\n\n this.isStart = function (row, column) {\n return this.start.row == row && this.start.column == column;\n };\n\n this.setStart = function (row, column) {\n if (typeof row == \"object\") {\n this.start.column = row.column;\n this.start.row = row.row;\n } else {\n this.start.row = row;\n this.start.column = column;\n }\n };\n\n this.setEnd = function (row, column) {\n if (typeof row == \"object\") {\n this.end.column = row.column;\n this.end.row = row.row;\n } else {\n this.end.row = row;\n this.end.column = column;\n }\n };\n\n this.inside = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column) || this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n\n return false;\n };\n\n this.insideStart = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n\n return false;\n };\n\n this.insideEnd = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n\n return false;\n };\n\n this.compare = function (row, column) {\n if (!this.isMultiLine()) {\n if (row === this.start.row) {\n return column < this.start.column ? -1 : column > this.end.column ? 1 : 0;\n }\n }\n\n if (row < this.start.row) return -1;\n if (row > this.end.row) return 1;\n if (this.start.row === row) return column >= this.start.column ? 0 : -1;\n if (this.end.row === row) return column <= this.end.column ? 0 : 1;\n return 0;\n };\n\n this.compareStart = function (row, column) {\n if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n\n this.compareEnd = function (row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else {\n return this.compare(row, column);\n }\n };\n\n this.compareInside = function (row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n\n this.clipRows = function (firstRow, lastRow) {\n if (this.end.row > lastRow) var end = {\n row: lastRow + 1,\n column: 0\n };else if (this.end.row < firstRow) var end = {\n row: firstRow,\n column: 0\n };\n if (this.start.row > lastRow) var start = {\n row: lastRow + 1,\n column: 0\n };else if (this.start.row < firstRow) var start = {\n row: firstRow,\n column: 0\n };\n return Range.fromPoints(start || this.start, end || this.end);\n };\n\n this.extend = function (row, column) {\n var cmp = this.compare(row, column);\n if (cmp == 0) return this;else if (cmp == -1) var start = {\n row: row,\n column: column\n };else var end = {\n row: row,\n column: column\n };\n return Range.fromPoints(start || this.start, end || this.end);\n };\n\n this.isEmpty = function () {\n return this.start.row === this.end.row && this.start.column === this.end.column;\n };\n\n this.isMultiLine = function () {\n return this.start.row !== this.end.row;\n };\n\n this.clone = function () {\n return Range.fromPoints(this.start, this.end);\n };\n\n this.collapseRows = function () {\n if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);else return new Range(this.start.row, 0, this.end.row, 0);\n };\n\n this.toScreenRange = function (session) {\n var screenPosStart = session.documentToScreenPosition(this.start);\n var screenPosEnd = session.documentToScreenPosition(this.end);\n return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);\n };\n\n this.moveBy = function (row, column) {\n this.start.row += row;\n this.start.column += column;\n this.end.row += row;\n this.end.column += column;\n };\n }).call(Range.prototype);\n\n Range.fromPoints = function (start, end) {\n return new Range(start.row, start.column, end.row, end.column);\n };\n\n Range.comparePoints = comparePoints;\n\n Range.comparePoints = function (p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n };\n\n exports.Range = Range;\n});\nace.define(\"ace/lib/lang\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n exports.last = function (a) {\n return a[a.length - 1];\n };\n\n exports.stringReverse = function (string) {\n return string.split(\"\").reverse().join(\"\");\n };\n\n exports.stringRepeat = function (string, count) {\n var result = '';\n\n while (count > 0) {\n if (count & 1) result += string;\n if (count >>= 1) string += string;\n }\n\n return result;\n };\n\n var trimBeginRegexp = /^\\s\\s*/;\n var trimEndRegexp = /\\s\\s*$/;\n\n exports.stringTrimLeft = function (string) {\n return string.replace(trimBeginRegexp, '');\n };\n\n exports.stringTrimRight = function (string) {\n return string.replace(trimEndRegexp, '');\n };\n\n exports.copyObject = function (obj) {\n var copy = {};\n\n for (var key in obj) {\n copy[key] = obj[key];\n }\n\n return copy;\n };\n\n exports.copyArray = function (array) {\n var copy = [];\n\n for (var i = 0, l = array.length; i < l; i++) {\n if (array[i] && typeof array[i] == \"object\") copy[i] = this.copyObject(array[i]);else copy[i] = array[i];\n }\n\n return copy;\n };\n\n exports.deepCopy = function deepCopy(obj) {\n if (typeof obj !== \"object\" || !obj) return obj;\n var copy;\n\n if (Array.isArray(obj)) {\n copy = [];\n\n for (var key = 0; key < obj.length; key++) {\n copy[key] = deepCopy(obj[key]);\n }\n\n return copy;\n }\n\n if (Object.prototype.toString.call(obj) !== \"[object Object]\") return obj;\n copy = {};\n\n for (var key in obj) {\n copy[key] = deepCopy(obj[key]);\n }\n\n return copy;\n };\n\n exports.arrayToMap = function (arr) {\n var map = {};\n\n for (var i = 0; i < arr.length; i++) {\n map[arr[i]] = 1;\n }\n\n return map;\n };\n\n exports.createMap = function (props) {\n var map = Object.create(null);\n\n for (var i in props) {\n map[i] = props[i];\n }\n\n return map;\n };\n\n exports.arrayRemove = function (array, value) {\n for (var i = 0; i <= array.length; i++) {\n if (value === array[i]) {\n array.splice(i, 1);\n }\n }\n };\n\n exports.escapeRegExp = function (str) {\n return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g, '\\\\$1');\n };\n\n exports.escapeHTML = function (str) {\n return (\"\" + str).replace(/&/g, \"&\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(/ Date.now() - 50) return true;\n return $cancelT = false;\n },\n cancel: function cancel() {\n $cancelT = Date.now();\n }\n };\n});\nace.define(\"ace/keyboard/textinput\", [\"require\", \"exports\", \"module\", \"ace/lib/event\", \"ace/lib/useragent\", \"ace/lib/dom\", \"ace/lib/lang\", \"ace/clipboard\", \"ace/lib/keys\"], function (require, exports, module) {\n \"use strict\";\n\n var event = require(\"../lib/event\");\n\n var useragent = require(\"../lib/useragent\");\n\n var dom = require(\"../lib/dom\");\n\n var lang = require(\"../lib/lang\");\n\n var clipboard = require(\"../clipboard\");\n\n var BROKEN_SETDATA = useragent.isChrome < 18;\n var USE_IE_MIME_TYPE = useragent.isIE;\n var HAS_FOCUS_ARGS = useragent.isChrome > 63;\n var MAX_LINE_LENGTH = 400;\n\n var KEYS = require(\"../lib/keys\");\n\n var MODS = KEYS.KEY_MODS;\n var isIOS = useragent.isIOS;\n var valueResetRegex = isIOS ? /\\s/ : /\\n/;\n\n var TextInput = function TextInput(parentNode, host) {\n var text = dom.createElement(\"textarea\");\n text.className = \"ace_text-input\";\n text.setAttribute(\"wrap\", \"off\");\n text.setAttribute(\"autocorrect\", \"off\");\n text.setAttribute(\"autocapitalize\", \"off\");\n text.setAttribute(\"spellcheck\", false);\n text.style.opacity = \"0\";\n parentNode.insertBefore(text, parentNode.firstChild);\n var copied = false;\n var pasted = false;\n var inComposition = false;\n var sendingText = false;\n var tempStyle = '';\n if (!useragent.isMobile) text.style.fontSize = \"1px\";\n var commandMode = false;\n var ignoreFocusEvents = false;\n var lastValue = \"\";\n var lastSelectionStart = 0;\n var lastSelectionEnd = 0;\n var lastRestoreEnd = 0;\n\n try {\n var isFocused = document.activeElement === text;\n } catch (e) {}\n\n event.addListener(text, \"blur\", function (e) {\n if (ignoreFocusEvents) return;\n host.onBlur(e);\n isFocused = false;\n });\n event.addListener(text, \"focus\", function (e) {\n if (ignoreFocusEvents) return;\n isFocused = true;\n\n if (useragent.isEdge) {\n try {\n if (!document.hasFocus()) return;\n } catch (e) {}\n }\n\n host.onFocus(e);\n if (useragent.isEdge) setTimeout(resetSelection);else resetSelection();\n });\n this.$focusScroll = false;\n\n this.focus = function () {\n if (tempStyle || HAS_FOCUS_ARGS || this.$focusScroll == \"browser\") return text.focus({\n preventScroll: true\n });\n var top = text.style.top;\n text.style.position = \"fixed\";\n text.style.top = \"0px\";\n\n try {\n var isTransformed = text.getBoundingClientRect().top != 0;\n } catch (e) {\n return;\n }\n\n var ancestors = [];\n\n if (isTransformed) {\n var t = text.parentElement;\n\n while (t && t.nodeType == 1) {\n ancestors.push(t);\n t.setAttribute(\"ace_nocontext\", true);\n if (!t.parentElement && t.getRootNode) t = t.getRootNode().host;else t = t.parentElement;\n }\n }\n\n text.focus({\n preventScroll: true\n });\n\n if (isTransformed) {\n ancestors.forEach(function (p) {\n p.removeAttribute(\"ace_nocontext\");\n });\n }\n\n setTimeout(function () {\n text.style.position = \"\";\n if (text.style.top == \"0px\") text.style.top = top;\n }, 0);\n };\n\n this.blur = function () {\n text.blur();\n };\n\n this.isFocused = function () {\n return isFocused;\n };\n\n host.on(\"beforeEndOperation\", function () {\n if (host.curOp && host.curOp.command.name == \"insertstring\") return;\n\n if (inComposition) {\n lastValue = text.value = \"\";\n onCompositionEnd();\n }\n\n resetSelection();\n });\n var resetSelection = isIOS ? function (value) {\n if (!isFocused || copied && !value || sendingText) return;\n if (!value) value = \"\";\n var newValue = \"\\n ab\" + value + \"cde fg\\n\";\n if (newValue != text.value) text.value = lastValue = newValue;\n var selectionStart = 4;\n var selectionEnd = 4 + (value.length || (host.selection.isEmpty() ? 0 : 1));\n\n if (lastSelectionStart != selectionStart || lastSelectionEnd != selectionEnd) {\n text.setSelectionRange(selectionStart, selectionEnd);\n }\n\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n } : function () {\n if (inComposition || sendingText) return;\n if (!isFocused && !afterContextMenu) return;\n inComposition = true;\n var selection = host.selection;\n var range = selection.getRange();\n var row = selection.cursor.row;\n var selectionStart = range.start.column;\n var selectionEnd = range.end.column;\n var line = host.session.getLine(row);\n\n if (range.start.row != row) {\n var prevLine = host.session.getLine(row - 1);\n selectionStart = range.start.row < row - 1 ? 0 : selectionStart;\n selectionEnd += prevLine.length + 1;\n line = prevLine + \"\\n\" + line;\n } else if (range.end.row != row) {\n var nextLine = host.session.getLine(row + 1);\n selectionEnd = range.end.row > row + 1 ? nextLine.length : selectionEnd;\n selectionEnd += line.length + 1;\n line = line + \"\\n\" + nextLine;\n }\n\n if (line.length > MAX_LINE_LENGTH) {\n if (selectionStart < MAX_LINE_LENGTH && selectionEnd < MAX_LINE_LENGTH) {\n line = line.slice(0, MAX_LINE_LENGTH);\n } else {\n line = \"\\n\";\n selectionStart = 0;\n selectionEnd = 1;\n }\n }\n\n var newValue = line + \"\\n\\n\";\n\n if (newValue != lastValue) {\n text.value = lastValue = newValue;\n lastSelectionStart = lastSelectionEnd = newValue.length;\n }\n\n if (afterContextMenu) {\n lastSelectionStart = text.selectionStart;\n lastSelectionEnd = text.selectionEnd;\n }\n\n if (lastSelectionEnd != selectionEnd || lastSelectionStart != selectionStart || text.selectionEnd != lastSelectionEnd // on ie edge selectionEnd changes silently after the initialization\n ) {\n try {\n text.setSelectionRange(selectionStart, selectionEnd);\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n } catch (e) {}\n }\n\n inComposition = false;\n };\n if (isFocused) host.onFocus();\n\n var isAllSelected = function isAllSelected(text) {\n return text.selectionStart === 0 && text.selectionEnd >= lastValue.length && text.value === lastValue && lastValue && text.selectionEnd !== lastSelectionEnd;\n };\n\n var onSelect = function onSelect(e) {\n if (inComposition) return;\n\n if (copied) {\n copied = false;\n } else if (isAllSelected(text)) {\n host.selectAll();\n resetSelection();\n }\n };\n\n var inputHandler = null;\n\n this.setInputHandler = function (cb) {\n inputHandler = cb;\n };\n\n this.getInputHandler = function () {\n return inputHandler;\n };\n\n var afterContextMenu = false;\n\n var sendText = function sendText(value, fromInput) {\n if (afterContextMenu) afterContextMenu = false;\n\n if (pasted) {\n resetSelection();\n if (value) host.onPaste(value);\n pasted = false;\n return \"\";\n } else {\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n var extendLeft = lastSelectionStart;\n var extendRight = lastValue.length - lastSelectionEnd;\n var inserted = value;\n var restoreStart = value.length - selectionStart;\n var restoreEnd = value.length - selectionEnd;\n var i = 0;\n\n while (extendLeft > 0 && lastValue[i] == value[i]) {\n i++;\n extendLeft--;\n }\n\n inserted = inserted.slice(i);\n i = 1;\n\n while (extendRight > 0 && lastValue.length - i > lastSelectionStart - 1 && lastValue[lastValue.length - i] == value[value.length - i]) {\n i++;\n extendRight--;\n }\n\n restoreStart -= i - 1;\n restoreEnd -= i - 1;\n var endIndex = inserted.length - i + 1;\n\n if (endIndex < 0) {\n extendLeft = -endIndex;\n endIndex = 0;\n }\n\n inserted = inserted.slice(0, endIndex);\n if (!fromInput && !inserted && !restoreStart && !extendLeft && !extendRight && !restoreEnd) return \"\";\n sendingText = true;\n\n if (inserted && !extendLeft && !extendRight && !restoreStart && !restoreEnd || commandMode) {\n host.onTextInput(inserted);\n } else {\n host.onTextInput(inserted, {\n extendLeft: extendLeft,\n extendRight: extendRight,\n restoreStart: restoreStart,\n restoreEnd: restoreEnd\n });\n }\n\n sendingText = false;\n lastValue = value;\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n lastRestoreEnd = restoreEnd;\n return inserted;\n }\n };\n\n var onInput = function onInput(e) {\n if (inComposition) return onCompositionUpdate();\n\n if (e && e.inputType) {\n if (e.inputType == \"historyUndo\") return host.execCommand(\"undo\");\n if (e.inputType == \"historyRedo\") return host.execCommand(\"redo\");\n }\n\n var data = text.value;\n var inserted = sendText(data, true);\n if (data.length > MAX_LINE_LENGTH + 100 || valueResetRegex.test(inserted)) resetSelection();\n };\n\n var handleClipboardData = function handleClipboardData(e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window.clipboardData;\n if (!clipboardData || BROKEN_SETDATA) return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n } else {\n return clipboardData.getData(mime);\n }\n } catch (e) {\n if (!forceIEMime) return handleClipboardData(e, data, true);\n }\n };\n\n var doCopy = function doCopy(e, isCut) {\n var data = host.getCopyText();\n if (!data) return event.preventDefault(e);\n\n if (handleClipboardData(e, data)) {\n if (isIOS) {\n resetSelection(data);\n copied = data;\n setTimeout(function () {\n copied = false;\n }, 10);\n }\n\n isCut ? host.onCut() : host.onCopy();\n event.preventDefault(e);\n } else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function () {\n copied = false;\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n\n var onCut = function onCut(e) {\n doCopy(e, true);\n };\n\n var onCopy = function onCopy(e) {\n doCopy(e, false);\n };\n\n var onPaste = function onPaste(e) {\n var data = handleClipboardData(e);\n if (clipboard.pasteCancelled()) return;\n\n if (typeof data == \"string\") {\n if (data) host.onPaste(data, e);\n if (useragent.isIE) setTimeout(resetSelection);\n event.preventDefault(e);\n } else {\n text.value = \"\";\n pasted = true;\n }\n };\n\n event.addCommandKeyListener(text, host.onCommandKey.bind(host));\n event.addListener(text, \"select\", onSelect);\n event.addListener(text, \"input\", onInput);\n event.addListener(text, \"cut\", onCut);\n event.addListener(text, \"copy\", onCopy);\n event.addListener(text, \"paste\", onPaste);\n\n if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) {\n event.addListener(parentNode, \"keydown\", function (e) {\n if (useragent.isMac && !e.metaKey || !e.ctrlKey) return;\n\n switch (e.keyCode) {\n case 67:\n onCopy(e);\n break;\n\n case 86:\n onPaste(e);\n break;\n\n case 88:\n onCut(e);\n break;\n }\n });\n }\n\n var onCompositionStart = function onCompositionStart(e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly) return;\n inComposition = {};\n if (commandMode) return;\n setTimeout(onCompositionUpdate, 0);\n host.on(\"mousedown\", cancelComposition);\n var range = host.getSelectionRange();\n range.end.row = range.start.row;\n range.end.column = range.start.column;\n inComposition.markerRange = range;\n inComposition.selectionStart = lastSelectionStart;\n host.onCompositionStart(inComposition);\n\n if (inComposition.useTextareaForIME) {\n text.value = \"\";\n lastValue = \"\";\n lastSelectionStart = 0;\n lastSelectionEnd = 0;\n } else {\n if (text.msGetInputContext) inComposition.context = text.msGetInputContext();\n if (text.getInputContext) inComposition.context = text.getInputContext();\n }\n };\n\n var onCompositionUpdate = function onCompositionUpdate() {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly) return;\n if (commandMode) return cancelComposition();\n\n if (inComposition.useTextareaForIME) {\n host.onCompositionUpdate(text.value);\n } else {\n var data = text.value;\n sendText(data);\n\n if (inComposition.markerRange) {\n if (inComposition.context) {\n inComposition.markerRange.start.column = inComposition.selectionStart = inComposition.context.compositionStartOffset;\n }\n\n inComposition.markerRange.end.column = inComposition.markerRange.start.column + lastSelectionEnd - inComposition.selectionStart + lastRestoreEnd;\n }\n }\n };\n\n var onCompositionEnd = function onCompositionEnd(e) {\n if (!host.onCompositionEnd || host.$readOnly) return;\n inComposition = false;\n host.onCompositionEnd();\n host.off(\"mousedown\", cancelComposition);\n if (e) onInput();\n };\n\n function cancelComposition() {\n ignoreFocusEvents = true;\n text.blur();\n text.focus();\n ignoreFocusEvents = false;\n }\n\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50).schedule.bind(null, null);\n\n function onKeyup(e) {\n if (e.keyCode == 27 && text.value.length < text.selectionStart) {\n if (!inComposition) lastValue = text.value;\n lastSelectionStart = lastSelectionEnd = -1;\n resetSelection();\n }\n\n syncComposition();\n }\n\n event.addListener(text, \"compositionstart\", onCompositionStart);\n event.addListener(text, \"compositionupdate\", onCompositionUpdate);\n event.addListener(text, \"keyup\", onKeyup);\n event.addListener(text, \"keydown\", syncComposition);\n event.addListener(text, \"compositionend\", onCompositionEnd);\n\n this.getElement = function () {\n return text;\n };\n\n this.setCommandMode = function (value) {\n commandMode = value;\n text.readOnly = false;\n };\n\n this.setReadOnly = function (readOnly) {\n if (!commandMode) text.readOnly = readOnly;\n };\n\n this.setCopyWithEmptySelection = function (value) {};\n\n this.onContextMenu = function (e) {\n afterContextMenu = true;\n resetSelection();\n\n host._emit(\"nativecontextmenu\", {\n target: host,\n domEvent: e\n });\n\n this.moveToMouse(e, true);\n };\n\n this.moveToMouse = function (e, bringToFront) {\n if (!tempStyle) tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\") + (useragent.isIE ? \"opacity:0.1;\" : \"\") + \"text-indent: -\" + (lastSelectionStart + lastSelectionEnd) * host.renderer.characterWidth * 0.5 + \"px;\";\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight - 2;\n\n var move = function move(e) {\n dom.translate(text, e.clientX - left - 2, Math.min(e.clientY - top - 2, maxTop));\n };\n\n move(e);\n if (e.type != \"mousedown\") return;\n host.renderer.$isMousePressed = true;\n clearTimeout(closeTimeout);\n if (useragent.isWin) event.capture(host.container, move, onContextMenuClose);\n };\n\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n\n host.renderer.$isMousePressed = false;\n if (host.renderer.$keepTextAreaAtCursor) host.renderer.$moveTextAreaToCursor();\n }, 0);\n }\n\n var onContextMenu = function onContextMenu(e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n\n event.addListener(text, \"mouseup\", onContextMenu);\n event.addListener(text, \"mousedown\", function (e) {\n e.preventDefault();\n onContextMenuClose();\n });\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu);\n event.addListener(text, \"contextmenu\", onContextMenu);\n if (isIOS) addIosSelectionHandler(parentNode, host, text);\n\n function addIosSelectionHandler(parentNode, host, text) {\n var typingResetTimeout = null;\n var typing = false;\n text.addEventListener(\"keydown\", function (e) {\n if (typingResetTimeout) clearTimeout(typingResetTimeout);\n typing = true;\n }, true);\n text.addEventListener(\"keyup\", function (e) {\n typingResetTimeout = setTimeout(function () {\n typing = false;\n }, 100);\n }, true);\n\n var detectArrowKeys = function detectArrowKeys(e) {\n if (document.activeElement !== text) return;\n if (typing || inComposition || host.$mouseHandler.isMousePressed) return;\n\n if (copied) {\n return;\n }\n\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n var key = null;\n var modifier = 0;\n\n if (selectionStart == 0) {\n key = KEYS.up;\n } else if (selectionStart == 1) {\n key = KEYS.home;\n } else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd] == \"\\n\") {\n key = KEYS.end;\n } else if (selectionStart < lastSelectionStart && lastValue[selectionStart - 1] == \" \") {\n key = KEYS.left;\n modifier = MODS.option;\n } else if (selectionStart < lastSelectionStart || selectionStart == lastSelectionStart && lastSelectionEnd != lastSelectionStart && selectionStart == selectionEnd) {\n key = KEYS.left;\n } else if (selectionEnd > lastSelectionEnd && lastValue.slice(0, selectionEnd).split(\"\\n\").length > 2) {\n key = KEYS.down;\n } else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd - 1] == \" \") {\n key = KEYS.right;\n modifier = MODS.option;\n } else if (selectionEnd > lastSelectionEnd || selectionEnd == lastSelectionEnd && lastSelectionEnd != lastSelectionStart && selectionStart == selectionEnd) {\n key = KEYS.right;\n }\n\n if (selectionStart !== selectionEnd) modifier |= MODS.shift;\n\n if (key) {\n var result = host.onCommandKey({}, modifier, key);\n\n if (!result && host.commands) {\n key = KEYS.keyCodeToString(key);\n var command = host.commands.findKeyCommand(modifier, key);\n if (command) host.execCommand(command);\n }\n\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n resetSelection(\"\");\n }\n };\n\n document.addEventListener(\"selectionchange\", detectArrowKeys);\n host.on(\"destroy\", function () {\n document.removeEventListener(\"selectionchange\", detectArrowKeys);\n });\n }\n };\n\n exports.TextInput = TextInput;\n});\nace.define(\"ace/mouse/default_handlers\", [\"require\", \"exports\", \"module\", \"ace/lib/useragent\"], function (require, exports, module) {\n \"use strict\";\n\n var useragent = require(\"../lib/useragent\");\n\n var DRAG_OFFSET = 0; // pixels\n\n var SCROLL_COOLDOWN_T = 550; // milliseconds\n\n function DefaultHandlers(mouseHandler) {\n mouseHandler.$clickSelection = null;\n var editor = mouseHandler.editor;\n editor.setDefaultHandler(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n editor.setDefaultHandler(\"dblclick\", this.onDoubleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"tripleclick\", this.onTripleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"quadclick\", this.onQuadClick.bind(mouseHandler));\n editor.setDefaultHandler(\"mousewheel\", this.onMouseWheel.bind(mouseHandler));\n var exports = [\"select\", \"startSelect\", \"selectEnd\", \"selectAllEnd\", \"selectByWordsEnd\", \"selectByLinesEnd\", \"dragWait\", \"dragWaitEnd\", \"focusWait\"];\n exports.forEach(function (x) {\n mouseHandler[x] = this[x];\n }, this);\n mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, \"getLineRange\");\n mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, \"getWordRange\");\n }\n\n (function () {\n this.onMouseDown = function (ev) {\n var inSelection = ev.inSelection();\n var pos = ev.getDocumentPosition();\n this.mousedownEvent = ev;\n var editor = this.editor;\n var button = ev.getButton();\n\n if (button !== 0) {\n var selectionRange = editor.getSelectionRange();\n var selectionEmpty = selectionRange.isEmpty();\n if (selectionEmpty || button == 1) editor.selection.moveToPosition(pos);\n\n if (button == 2) {\n editor.textInput.onContextMenu(ev.domEvent);\n if (!useragent.isMozilla) ev.preventDefault();\n }\n\n return;\n }\n\n this.mousedownEvent.time = Date.now();\n\n if (inSelection && !editor.isFocused()) {\n editor.focus();\n\n if (this.$focusTimeout && !this.$clickSelection && !editor.inMultiSelectMode) {\n this.setState(\"focusWait\");\n this.captureMouse(ev);\n return;\n }\n }\n\n this.captureMouse(ev);\n this.startSelect(pos, ev.domEvent._clicks > 1);\n return ev.preventDefault();\n };\n\n this.startSelect = function (pos, waitForClickSelection) {\n pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);\n var editor = this.editor;\n if (!this.mousedownEvent) return;\n if (this.mousedownEvent.getShiftKey()) editor.selection.selectToPosition(pos);else if (!waitForClickSelection) editor.selection.moveToPosition(pos);\n if (!waitForClickSelection) this.select();\n\n if (editor.renderer.scroller.setCapture) {\n editor.renderer.scroller.setCapture();\n }\n\n editor.setStyle(\"ace_selecting\");\n this.setState(\"select\");\n };\n\n this.select = function () {\n var anchor,\n editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n\n if (this.$clickSelection) {\n var cmp = this.$clickSelection.comparePoint(cursor);\n\n if (cmp == -1) {\n anchor = this.$clickSelection.end;\n } else if (cmp == 1) {\n anchor = this.$clickSelection.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n\n editor.selection.selectToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n };\n\n this.extendSelectionBy = function (unitName) {\n var anchor,\n editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n var range = editor.selection[unitName](cursor.row, cursor.column);\n\n if (this.$clickSelection) {\n var cmpStart = this.$clickSelection.comparePoint(range.start);\n var cmpEnd = this.$clickSelection.comparePoint(range.end);\n\n if (cmpStart == -1 && cmpEnd <= 0) {\n anchor = this.$clickSelection.end;\n if (range.end.row != cursor.row || range.end.column != cursor.column) cursor = range.start;\n } else if (cmpEnd == 1 && cmpStart >= 0) {\n anchor = this.$clickSelection.start;\n if (range.start.row != cursor.row || range.start.column != cursor.column) cursor = range.end;\n } else if (cmpStart == -1 && cmpEnd == 1) {\n cursor = range.end;\n anchor = range.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n\n editor.selection.selectToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n };\n\n this.selectEnd = this.selectAllEnd = this.selectByWordsEnd = this.selectByLinesEnd = function () {\n this.$clickSelection = null;\n this.editor.unsetStyle(\"ace_selecting\");\n\n if (this.editor.renderer.scroller.releaseCapture) {\n this.editor.renderer.scroller.releaseCapture();\n }\n };\n\n this.focusWait = function () {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n var time = Date.now();\n if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimeout) this.startSelect(this.mousedownEvent.getDocumentPosition());\n };\n\n this.onDoubleClick = function (ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n var session = editor.session;\n var range = session.getBracketRange(pos);\n\n if (range) {\n if (range.isEmpty()) {\n range.start.column--;\n range.end.column++;\n }\n\n this.setState(\"select\");\n } else {\n range = editor.selection.getWordRange(pos.row, pos.column);\n this.setState(\"selectByWords\");\n }\n\n this.$clickSelection = range;\n this.select();\n };\n\n this.onTripleClick = function (ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n this.setState(\"selectByLines\");\n var range = editor.getSelectionRange();\n\n if (range.isMultiLine() && range.contains(pos.row, pos.column)) {\n this.$clickSelection = editor.selection.getLineRange(range.start.row);\n this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;\n } else {\n this.$clickSelection = editor.selection.getLineRange(pos.row);\n }\n\n this.select();\n };\n\n this.onQuadClick = function (ev) {\n var editor = this.editor;\n editor.selectAll();\n this.$clickSelection = editor.getSelectionRange();\n this.setState(\"selectAll\");\n };\n\n this.onMouseWheel = function (ev) {\n if (ev.getAccelKey()) return;\n\n if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {\n ev.wheelX = ev.wheelY;\n ev.wheelY = 0;\n }\n\n var editor = this.editor;\n if (!this.$lastScroll) this.$lastScroll = {\n t: 0,\n vx: 0,\n vy: 0,\n allowed: 0\n };\n var prevScroll = this.$lastScroll;\n var t = ev.domEvent.timeStamp;\n var dt = t - prevScroll.t;\n var vx = dt ? ev.wheelX / dt : prevScroll.vx;\n var vy = dt ? ev.wheelY / dt : prevScroll.vy;\n\n if (dt < SCROLL_COOLDOWN_T) {\n vx = (vx + prevScroll.vx) / 2;\n vy = (vy + prevScroll.vy) / 2;\n }\n\n var direction = Math.abs(vx / vy);\n var canScroll = false;\n if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0)) canScroll = true;\n if (direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed)) canScroll = true;\n\n if (canScroll) {\n prevScroll.allowed = t;\n } else if (t - prevScroll.allowed < SCROLL_COOLDOWN_T) {\n var isSlower = Math.abs(vx) <= 1.5 * Math.abs(prevScroll.vx) && Math.abs(vy) <= 1.5 * Math.abs(prevScroll.vy);\n\n if (isSlower) {\n canScroll = true;\n prevScroll.allowed = t;\n } else {\n prevScroll.allowed = 0;\n }\n }\n\n prevScroll.t = t;\n prevScroll.vx = vx;\n prevScroll.vy = vy;\n\n if (canScroll) {\n editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n return ev.stop();\n }\n };\n }).call(DefaultHandlers.prototype);\n exports.DefaultHandlers = DefaultHandlers;\n\n function calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n }\n\n function calcRangeOrientation(range, cursor) {\n if (range.start.row == range.end.row) var cmp = 2 * cursor.column - range.start.column - range.end.column;else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) var cmp = cursor.column - 4;else var cmp = 2 * cursor.row - range.start.row - range.end.row;\n if (cmp < 0) return {\n cursor: range.start,\n anchor: range.end\n };else return {\n cursor: range.end,\n anchor: range.start\n };\n }\n});\nace.define(\"ace/tooltip\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/dom\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var dom = require(\"./lib/dom\");\n\n function Tooltip(parentNode) {\n this.isOpen = false;\n this.$element = null;\n this.$parentNode = parentNode;\n }\n\n (function () {\n this.$init = function () {\n this.$element = dom.createElement(\"div\");\n this.$element.className = \"ace_tooltip\";\n this.$element.style.display = \"none\";\n this.$parentNode.appendChild(this.$element);\n return this.$element;\n };\n\n this.getElement = function () {\n return this.$element || this.$init();\n };\n\n this.setText = function (text) {\n this.getElement().textContent = text;\n };\n\n this.setHtml = function (html) {\n this.getElement().innerHTML = html;\n };\n\n this.setPosition = function (x, y) {\n this.getElement().style.left = x + \"px\";\n this.getElement().style.top = y + \"px\";\n };\n\n this.setClassName = function (className) {\n dom.addCssClass(this.getElement(), className);\n };\n\n this.show = function (text, x, y) {\n if (text != null) this.setText(text);\n if (x != null && y != null) this.setPosition(x, y);\n\n if (!this.isOpen) {\n this.getElement().style.display = \"block\";\n this.isOpen = true;\n }\n };\n\n this.hide = function () {\n if (this.isOpen) {\n this.getElement().style.display = \"none\";\n this.isOpen = false;\n }\n };\n\n this.getHeight = function () {\n return this.getElement().offsetHeight;\n };\n\n this.getWidth = function () {\n return this.getElement().offsetWidth;\n };\n\n this.destroy = function () {\n this.isOpen = false;\n\n if (this.$element && this.$element.parentNode) {\n this.$element.parentNode.removeChild(this.$element);\n }\n };\n }).call(Tooltip.prototype);\n exports.Tooltip = Tooltip;\n});\nace.define(\"ace/mouse/default_gutter_handler\", [\"require\", \"exports\", \"module\", \"ace/lib/dom\", \"ace/lib/oop\", \"ace/lib/event\", \"ace/tooltip\"], function (require, exports, module) {\n \"use strict\";\n\n var dom = require(\"../lib/dom\");\n\n var oop = require(\"../lib/oop\");\n\n var event = require(\"../lib/event\");\n\n var Tooltip = require(\"../tooltip\").Tooltip;\n\n function GutterHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var gutter = editor.renderer.$gutterLayer;\n var tooltip = new GutterTooltip(editor.container);\n mouseHandler.editor.setDefaultHandler(\"guttermousedown\", function (e) {\n if (!editor.isFocused() || e.getButton() != 0) return;\n var gutterRegion = gutter.getRegion(e);\n if (gutterRegion == \"foldWidgets\") return;\n var row = e.getDocumentPosition().row;\n var selection = editor.session.selection;\n if (e.getShiftKey()) selection.selectTo(row, 0);else {\n if (e.domEvent.detail == 2) {\n editor.selectAll();\n return e.preventDefault();\n }\n\n mouseHandler.$clickSelection = editor.selection.getLineRange(row);\n }\n mouseHandler.setState(\"selectByLines\");\n mouseHandler.captureMouse(e);\n return e.preventDefault();\n });\n var tooltipTimeout, mouseEvent, tooltipAnnotation;\n\n function showTooltip() {\n var row = mouseEvent.getDocumentPosition().row;\n var annotation = gutter.$annotations[row];\n if (!annotation) return hideTooltip();\n var maxRow = editor.session.getLength();\n\n if (row == maxRow) {\n var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;\n var pos = mouseEvent.$pos;\n if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) return hideTooltip();\n }\n\n if (tooltipAnnotation == annotation) return;\n tooltipAnnotation = annotation.text.join(\"
\");\n tooltip.setHtml(tooltipAnnotation);\n tooltip.show();\n\n editor._signal(\"showGutterTooltip\", tooltip);\n\n editor.on(\"mousewheel\", hideTooltip);\n\n if (mouseHandler.$tooltipFollowsMouse) {\n moveTooltip(mouseEvent);\n } else {\n var gutterElement = mouseEvent.domEvent.target;\n var rect = gutterElement.getBoundingClientRect();\n var style = tooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n }\n }\n\n function hideTooltip() {\n if (tooltipTimeout) tooltipTimeout = clearTimeout(tooltipTimeout);\n\n if (tooltipAnnotation) {\n tooltip.hide();\n tooltipAnnotation = null;\n\n editor._signal(\"hideGutterTooltip\", tooltip);\n\n editor.removeEventListener(\"mousewheel\", hideTooltip);\n }\n }\n\n function moveTooltip(e) {\n tooltip.setPosition(e.x, e.y);\n }\n\n mouseHandler.editor.setDefaultHandler(\"guttermousemove\", function (e) {\n var target = e.domEvent.target || e.domEvent.srcElement;\n if (dom.hasCssClass(target, \"ace_fold-widget\")) return hideTooltip();\n if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) moveTooltip(e);\n mouseEvent = e;\n if (tooltipTimeout) return;\n tooltipTimeout = setTimeout(function () {\n tooltipTimeout = null;\n if (mouseEvent && !mouseHandler.isMousePressed) showTooltip();else hideTooltip();\n }, 50);\n });\n event.addListener(editor.renderer.$gutter, \"mouseout\", function (e) {\n mouseEvent = null;\n if (!tooltipAnnotation || tooltipTimeout) return;\n tooltipTimeout = setTimeout(function () {\n tooltipTimeout = null;\n hideTooltip();\n }, 50);\n });\n editor.on(\"changeSession\", hideTooltip);\n }\n\n function GutterTooltip(parentNode) {\n Tooltip.call(this, parentNode);\n }\n\n oop.inherits(GutterTooltip, Tooltip);\n (function () {\n this.setPosition = function (x, y) {\n var windowWidth = window.innerWidth || document.documentElement.clientWidth;\n var windowHeight = window.innerHeight || document.documentElement.clientHeight;\n var width = this.getWidth();\n var height = this.getHeight();\n x += 15;\n y += 15;\n\n if (x + width > windowWidth) {\n x -= x + width - windowWidth;\n }\n\n if (y + height > windowHeight) {\n y -= 20 + height;\n }\n\n Tooltip.prototype.setPosition.call(this, x, y);\n };\n }).call(GutterTooltip.prototype);\n exports.GutterHandler = GutterHandler;\n});\nace.define(\"ace/mouse/mouse_event\", [\"require\", \"exports\", \"module\", \"ace/lib/event\", \"ace/lib/useragent\"], function (require, exports, module) {\n \"use strict\";\n\n var event = require(\"../lib/event\");\n\n var useragent = require(\"../lib/useragent\");\n\n var MouseEvent = exports.MouseEvent = function (domEvent, editor) {\n this.domEvent = domEvent;\n this.editor = editor;\n this.x = this.clientX = domEvent.clientX;\n this.y = this.clientY = domEvent.clientY;\n this.$pos = null;\n this.$inSelection = null;\n this.propagationStopped = false;\n this.defaultPrevented = false;\n };\n\n (function () {\n this.stopPropagation = function () {\n event.stopPropagation(this.domEvent);\n this.propagationStopped = true;\n };\n\n this.preventDefault = function () {\n event.preventDefault(this.domEvent);\n this.defaultPrevented = true;\n };\n\n this.stop = function () {\n this.stopPropagation();\n this.preventDefault();\n };\n\n this.getDocumentPosition = function () {\n if (this.$pos) return this.$pos;\n this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);\n return this.$pos;\n };\n\n this.inSelection = function () {\n if (this.$inSelection !== null) return this.$inSelection;\n var editor = this.editor;\n var selectionRange = editor.getSelectionRange();\n if (selectionRange.isEmpty()) this.$inSelection = false;else {\n var pos = this.getDocumentPosition();\n this.$inSelection = selectionRange.contains(pos.row, pos.column);\n }\n return this.$inSelection;\n };\n\n this.getButton = function () {\n return event.getButton(this.domEvent);\n };\n\n this.getShiftKey = function () {\n return this.domEvent.shiftKey;\n };\n\n this.getAccelKey = useragent.isMac ? function () {\n return this.domEvent.metaKey;\n } : function () {\n return this.domEvent.ctrlKey;\n };\n }).call(MouseEvent.prototype);\n});\nace.define(\"ace/mouse/dragdrop_handler\", [\"require\", \"exports\", \"module\", \"ace/lib/dom\", \"ace/lib/event\", \"ace/lib/useragent\"], function (require, exports, module) {\n \"use strict\";\n\n var dom = require(\"../lib/dom\");\n\n var event = require(\"../lib/event\");\n\n var useragent = require(\"../lib/useragent\");\n\n var AUTOSCROLL_DELAY = 200;\n var SCROLL_CURSOR_DELAY = 200;\n var SCROLL_CURSOR_HYSTERESIS = 5;\n\n function DragdropHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var blankImage = dom.createElement(\"img\");\n blankImage.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (useragent.isOpera) blankImage.style.cssText = \"width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;\";\n var exports = [\"dragWait\", \"dragWaitEnd\", \"startDrag\", \"dragReadyEnd\", \"onMouseDrag\"];\n exports.forEach(function (x) {\n mouseHandler[x] = this[x];\n }, this);\n editor.addEventListener(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n var mouseTarget = editor.container;\n var dragSelectionMarker, x, y;\n var timerId, range;\n var dragCursor,\n counter = 0;\n var dragOperation;\n var isInternal;\n var autoScrollStartTime;\n var cursorMovedTime;\n var cursorPointOnCaretMoved;\n\n this.onDragStart = function (e) {\n if (this.cancelDrag || !mouseTarget.draggable) {\n var self = this;\n setTimeout(function () {\n self.startSelect();\n self.captureMouse(e);\n }, 0);\n return e.preventDefault();\n }\n\n range = editor.getSelectionRange();\n var dataTransfer = e.dataTransfer;\n dataTransfer.effectAllowed = editor.getReadOnly() ? \"copy\" : \"copyMove\";\n\n if (useragent.isOpera) {\n editor.container.appendChild(blankImage);\n blankImage.scrollTop = 0;\n }\n\n dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);\n\n if (useragent.isOpera) {\n editor.container.removeChild(blankImage);\n }\n\n dataTransfer.clearData();\n dataTransfer.setData(\"Text\", editor.session.getTextRange());\n isInternal = true;\n this.setState(\"drag\");\n };\n\n this.onDragEnd = function (e) {\n mouseTarget.draggable = false;\n isInternal = false;\n this.setState(null);\n\n if (!editor.getReadOnly()) {\n var dropEffect = e.dataTransfer.dropEffect;\n if (!dragOperation && dropEffect == \"move\") editor.session.remove(editor.getSelectionRange());\n editor.$resetCursorStyle();\n }\n\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n };\n\n this.onDragEnter = function (e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker) addDragMarker();\n counter++;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragOver = function (e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return;\n x = e.clientX;\n y = e.clientY;\n\n if (!dragSelectionMarker) {\n addDragMarker();\n counter++;\n }\n\n if (onMouseMoveTimer !== null) onMouseMoveTimer = null;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragLeave = function (e) {\n counter--;\n\n if (counter <= 0 && dragSelectionMarker) {\n clearDragMarker();\n dragOperation = null;\n return event.preventDefault(e);\n }\n };\n\n this.onDrop = function (e) {\n if (!dragCursor) return;\n var dataTransfer = e.dataTransfer;\n\n if (isInternal) {\n switch (dragOperation) {\n case \"move\":\n if (range.contains(dragCursor.row, dragCursor.column)) {\n range = {\n start: dragCursor,\n end: dragCursor\n };\n } else {\n range = editor.moveText(range, dragCursor);\n }\n\n break;\n\n case \"copy\":\n range = editor.moveText(range, dragCursor, true);\n break;\n }\n } else {\n var dropData = dataTransfer.getData('Text');\n range = {\n start: dragCursor,\n end: editor.session.insert(dragCursor, dropData)\n };\n editor.focus();\n dragOperation = null;\n }\n\n clearDragMarker();\n return event.preventDefault(e);\n };\n\n event.addListener(mouseTarget, \"dragstart\", this.onDragStart.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragend\", this.onDragEnd.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragenter\", this.onDragEnter.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragover\", this.onDragOver.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragleave\", this.onDragLeave.bind(mouseHandler));\n event.addListener(mouseTarget, \"drop\", this.onDrop.bind(mouseHandler));\n\n function scrollCursorIntoView(cursor, prevCursor) {\n var now = Date.now();\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n var hMovement = !prevCursor || cursor.column != prevCursor.column;\n\n if (!cursorMovedTime || vMovement || hMovement) {\n editor.moveCursorToPosition(cursor);\n cursorMovedTime = now;\n cursorPointOnCaretMoved = {\n x: x,\n y: y\n };\n } else {\n var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);\n\n if (distance > SCROLL_CURSOR_HYSTERESIS) {\n cursorMovedTime = null;\n } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {\n editor.renderer.scrollCursorIntoView();\n cursorMovedTime = null;\n }\n }\n }\n\n function autoScroll(cursor, prevCursor) {\n var now = Date.now();\n var lineHeight = editor.renderer.layerConfig.lineHeight;\n var characterWidth = editor.renderer.layerConfig.characterWidth;\n var editorRect = editor.renderer.scroller.getBoundingClientRect();\n var offsets = {\n x: {\n left: x - editorRect.left,\n right: editorRect.right - x\n },\n y: {\n top: y - editorRect.top,\n bottom: editorRect.bottom - y\n }\n };\n var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);\n var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);\n var scrollCursor = {\n row: cursor.row,\n column: cursor.column\n };\n\n if (nearestXOffset / characterWidth <= 2) {\n scrollCursor.column += offsets.x.left < offsets.x.right ? -3 : +2;\n }\n\n if (nearestYOffset / lineHeight <= 1) {\n scrollCursor.row += offsets.y.top < offsets.y.bottom ? -1 : +1;\n }\n\n var vScroll = cursor.row != scrollCursor.row;\n var hScroll = cursor.column != scrollCursor.column;\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n\n if (vScroll || hScroll && !vMovement) {\n if (!autoScrollStartTime) autoScrollStartTime = now;else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) editor.renderer.scrollCursorIntoView(scrollCursor);\n } else {\n autoScrollStartTime = null;\n }\n }\n\n function onDragInterval() {\n var prevCursor = dragCursor;\n dragCursor = editor.renderer.screenToTextCoordinates(x, y);\n scrollCursorIntoView(dragCursor, prevCursor);\n autoScroll(dragCursor, prevCursor);\n }\n\n function addDragMarker() {\n range = editor.selection.toOrientedRange();\n dragSelectionMarker = editor.session.addMarker(range, \"ace_selection\", editor.getSelectionStyle());\n editor.clearSelection();\n if (editor.isFocused()) editor.renderer.$cursorLayer.setBlinking(false);\n clearInterval(timerId);\n onDragInterval();\n timerId = setInterval(onDragInterval, 20);\n counter = 0;\n event.addListener(document, \"mousemove\", onMouseMove);\n }\n\n function clearDragMarker() {\n clearInterval(timerId);\n editor.session.removeMarker(dragSelectionMarker);\n dragSelectionMarker = null;\n editor.selection.fromOrientedRange(range);\n if (editor.isFocused() && !isInternal) editor.$resetCursorStyle();\n range = null;\n dragCursor = null;\n counter = 0;\n autoScrollStartTime = null;\n cursorMovedTime = null;\n event.removeListener(document, \"mousemove\", onMouseMove);\n }\n\n var onMouseMoveTimer = null;\n\n function onMouseMove() {\n if (onMouseMoveTimer == null) {\n onMouseMoveTimer = setTimeout(function () {\n if (onMouseMoveTimer != null && dragSelectionMarker) clearDragMarker();\n }, 20);\n }\n }\n\n function canAccept(dataTransfer) {\n var types = dataTransfer.types;\n return !types || Array.prototype.some.call(types, function (type) {\n return type == 'text/plain' || type == 'Text';\n });\n }\n\n function getDropEffect(e) {\n var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];\n var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];\n var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;\n var effectAllowed = \"uninitialized\";\n\n try {\n effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();\n } catch (e) {}\n\n var dropEffect = \"none\";\n if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = \"copy\";else if (moveAllowed.indexOf(effectAllowed) >= 0) dropEffect = \"move\";else if (copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = \"copy\";\n return dropEffect;\n }\n }\n\n (function () {\n this.dragWait = function () {\n var interval = Date.now() - this.mousedownEvent.time;\n if (interval > this.editor.getDragDelay()) this.startDrag();\n };\n\n this.dragWaitEnd = function () {\n var target = this.editor.container;\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n this.selectEnd();\n };\n\n this.dragReadyEnd = function (e) {\n this.editor.$resetCursorStyle();\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n this.dragWaitEnd();\n };\n\n this.startDrag = function () {\n this.cancelDrag = false;\n var editor = this.editor;\n var target = editor.container;\n target.draggable = true;\n editor.renderer.$cursorLayer.setBlinking(false);\n editor.setStyle(\"ace_dragging\");\n var cursorStyle = useragent.isWin ? \"default\" : \"move\";\n editor.renderer.setCursorStyle(cursorStyle);\n this.setState(\"dragReady\");\n };\n\n this.onMouseDrag = function (e) {\n var target = this.editor.container;\n\n if (useragent.isIE && this.state == \"dragReady\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 3) target.dragDrop();\n }\n\n if (this.state === \"dragWait\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n\n if (distance > 0) {\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n }\n }\n };\n\n this.onMouseDown = function (e) {\n if (!this.$dragEnabled) return;\n this.mousedownEvent = e;\n var editor = this.editor;\n var inSelection = e.inSelection();\n var button = e.getButton();\n var clickCount = e.domEvent.detail || 1;\n\n if (clickCount === 1 && button === 0 && inSelection) {\n if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) return;\n this.mousedownEvent.time = Date.now();\n var eventTarget = e.domEvent.target || e.domEvent.srcElement;\n if (\"unselectable\" in eventTarget) eventTarget.unselectable = \"on\";\n\n if (editor.getDragDelay()) {\n if (useragent.isWebKit) {\n this.cancelDrag = true;\n var mouseTarget = editor.container;\n mouseTarget.draggable = true;\n }\n\n this.setState(\"dragWait\");\n } else {\n this.startDrag();\n }\n\n this.captureMouse(e, this.onMouseDrag.bind(this));\n e.defaultPrevented = true;\n }\n };\n }).call(DragdropHandler.prototype);\n\n function calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n }\n\n exports.DragdropHandler = DragdropHandler;\n});\nace.define(\"ace/mouse/touch_handler\", [\"require\", \"exports\", \"module\", \"ace/mouse/mouse_event\", \"ace/lib/dom\"], function (require, exports, module) {\n \"use strict\";\n\n var MouseEvent = require(\"./mouse_event\").MouseEvent;\n\n var dom = require(\"../lib/dom\");\n\n exports.addTouchListeners = function (el, editor) {\n var mode = \"scroll\";\n var startX;\n var startY;\n var touchStartT;\n var lastT;\n var longTouchTimer;\n var animationTimer;\n var animationSteps = 0;\n var pos;\n var clickCount = 0;\n var vX = 0;\n var vY = 0;\n var pressed;\n var contextMenu;\n\n function createContextMenu() {\n var clipboard = window.navigator && window.navigator.clipboard;\n var isOpen = false;\n\n var updateMenu = function updateMenu() {\n var selected = editor.getCopyText();\n var hasUndo = editor.session.getUndoManager().hasUndo();\n contextMenu.replaceChild(dom.buildDom(isOpen ? [\"span\", !selected && [\"span\", {\n class: \"ace_mobile-button\",\n action: \"selectall\"\n }, \"Select All\"], selected && [\"span\", {\n class: \"ace_mobile-button\",\n action: \"copy\"\n }, \"Copy\"], selected && [\"span\", {\n class: \"ace_mobile-button\",\n action: \"cut\"\n }, \"Cut\"], clipboard && [\"span\", {\n class: \"ace_mobile-button\",\n action: \"paste\"\n }, \"Paste\"], hasUndo && [\"span\", {\n class: \"ace_mobile-button\",\n action: \"undo\"\n }, \"Undo\"], [\"span\", {\n class: \"ace_mobile-button\",\n action: \"find\"\n }, \"Find\"], [\"span\", {\n class: \"ace_mobile-button\",\n action: \"openCommandPallete\"\n }, \"Pallete\"]] : [\"span\"]), contextMenu.firstChild);\n };\n\n var handleClick = function handleClick(e) {\n var action = e.target.getAttribute(\"action\");\n\n if (action == \"more\" || !isOpen) {\n isOpen = !isOpen;\n return updateMenu();\n }\n\n if (action == \"paste\") {\n clipboard.readText().then(function (text) {\n editor.execCommand(action, text);\n });\n } else if (action) {\n if (action == \"cut\" || action == \"copy\") {\n if (clipboard) clipboard.writeText(editor.getCopyText());else document.execCommand(\"copy\");\n }\n\n editor.execCommand(action);\n }\n\n contextMenu.firstChild.style.display = \"none\";\n isOpen = false;\n if (action != \"openCommandPallete\") editor.focus();\n };\n\n contextMenu = dom.buildDom([\"div\", {\n class: \"ace_mobile-menu\",\n ontouchstart: function ontouchstart(e) {\n mode = \"menu\";\n e.stopPropagation();\n e.preventDefault();\n editor.textInput.focus();\n },\n ontouchend: function ontouchend(e) {\n e.stopPropagation();\n e.preventDefault();\n handleClick(e);\n },\n onclick: handleClick\n }, [\"span\"], [\"span\", {\n class: \"ace_mobile-button\",\n action: \"more\"\n }, \"...\"]], editor.container);\n }\n\n function showContextMenu() {\n if (!contextMenu) createContextMenu();\n var cursor = editor.selection.cursor;\n var pagePos = editor.renderer.textToScreenCoordinates(cursor.row, cursor.column);\n var rect = editor.container.getBoundingClientRect();\n contextMenu.style.top = pagePos.pageY - rect.top - 3 + \"px\";\n contextMenu.style.right = \"10px\";\n contextMenu.style.display = \"\";\n contextMenu.firstChild.style.display = \"none\";\n editor.on(\"input\", hideContextMenu);\n }\n\n function hideContextMenu(e) {\n if (contextMenu) contextMenu.style.display = \"none\";\n editor.off(\"input\", hideContextMenu);\n }\n\n function handleLongTap() {\n longTouchTimer = null;\n clearTimeout(longTouchTimer);\n var range = editor.selection.getRange();\n var inSelection = range.contains(pos.row, pos.column);\n\n if (range.isEmpty() || !inSelection) {\n editor.selection.moveToPosition(pos);\n editor.selection.selectWord();\n }\n\n mode = \"wait\";\n showContextMenu();\n }\n\n function switchToSelectionMode() {\n longTouchTimer = null;\n clearTimeout(longTouchTimer);\n editor.selection.moveToPosition(pos);\n var range = clickCount >= 2 ? editor.selection.getLineRange(pos.row) : editor.session.getBracketRange(pos);\n\n if (range && !range.isEmpty()) {\n editor.selection.setRange(range);\n } else {\n editor.selection.selectWord();\n }\n\n mode = \"wait\";\n }\n\n el.addEventListener(\"contextmenu\", function (e) {\n if (!pressed) return;\n var textarea = editor.textInput.getElement();\n textarea.focus();\n });\n el.addEventListener(\"touchstart\", function (e) {\n var touches = e.touches;\n\n if (longTouchTimer || touches.length > 1) {\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n touchStartT = -1;\n mode = \"zoom\";\n return;\n }\n\n pressed = editor.$mouseHandler.isMousePressed = true;\n var h = editor.renderer.layerConfig.lineHeight;\n var w = editor.renderer.layerConfig.lineHeight;\n var t = e.timeStamp;\n lastT = t;\n var touchObj = touches[0];\n var x = touchObj.clientX;\n var y = touchObj.clientY;\n if (Math.abs(startX - x) + Math.abs(startY - y) > h) touchStartT = -1;\n startX = e.clientX = x;\n startY = e.clientY = y;\n vX = vY = 0;\n var ev = new MouseEvent(e, editor);\n pos = ev.getDocumentPosition();\n\n if (t - touchStartT < 500 && touches.length == 1 && !animationSteps) {\n clickCount++;\n e.preventDefault();\n e.button = 0;\n switchToSelectionMode();\n } else {\n clickCount = 0;\n var cursor = editor.selection.cursor;\n var anchor = editor.selection.isEmpty() ? cursor : editor.selection.anchor;\n var cursorPos = editor.renderer.$cursorLayer.getPixelPosition(cursor, true);\n var anchorPos = editor.renderer.$cursorLayer.getPixelPosition(anchor, true);\n var rect = editor.renderer.scroller.getBoundingClientRect();\n\n var weightedDistance = function weightedDistance(x, y) {\n x = x / w;\n y = y / h - 0.75;\n return x * x + y * y;\n };\n\n if (e.clientX < rect.left) {\n mode = \"zoom\";\n return;\n }\n\n var diff1 = weightedDistance(e.clientX - rect.left - cursorPos.left, e.clientY - rect.top - cursorPos.top);\n var diff2 = weightedDistance(e.clientX - rect.left - anchorPos.left, e.clientY - rect.top - anchorPos.top);\n if (diff1 < 3.5 && diff2 < 3.5) mode = diff1 > diff2 ? \"cursor\" : \"anchor\";\n if (diff2 < 3.5) mode = \"anchor\";else if (diff1 < 3.5) mode = \"cursor\";else mode = \"scroll\";\n longTouchTimer = setTimeout(handleLongTap, 450);\n }\n\n touchStartT = t;\n });\n el.addEventListener(\"touchend\", function (e) {\n pressed = editor.$mouseHandler.isMousePressed = false;\n if (animationTimer) clearInterval(animationTimer);\n\n if (mode == \"zoom\") {\n mode = \"\";\n animationSteps = 0;\n } else if (longTouchTimer) {\n editor.selection.moveToPosition(pos);\n animationSteps = 0;\n showContextMenu();\n } else if (mode == \"scroll\") {\n animate();\n e.preventDefault();\n hideContextMenu();\n } else {\n showContextMenu();\n }\n\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n });\n el.addEventListener(\"touchmove\", function (e) {\n if (longTouchTimer) {\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n }\n\n var touches = e.touches;\n if (touches.length > 1 || mode == \"zoom\") return;\n var touchObj = touches[0];\n var wheelX = startX - touchObj.clientX;\n var wheelY = startY - touchObj.clientY;\n\n if (mode == \"wait\") {\n if (wheelX * wheelX + wheelY * wheelY > 4) mode = \"cursor\";else return e.preventDefault();\n }\n\n startX = touchObj.clientX;\n startY = touchObj.clientY;\n e.clientX = touchObj.clientX;\n e.clientY = touchObj.clientY;\n var t = e.timeStamp;\n var dt = t - lastT;\n lastT = t;\n\n if (mode == \"scroll\") {\n var mouseEvent = new MouseEvent(e, editor);\n mouseEvent.speed = 1;\n mouseEvent.wheelX = wheelX;\n mouseEvent.wheelY = wheelY;\n if (10 * Math.abs(wheelX) < Math.abs(wheelY)) wheelX = 0;\n if (10 * Math.abs(wheelY) < Math.abs(wheelX)) wheelY = 0;\n\n if (dt != 0) {\n vX = wheelX / dt;\n vY = wheelY / dt;\n }\n\n editor._emit(\"mousewheel\", mouseEvent);\n\n if (!mouseEvent.propagationStopped) {\n vX = vY = 0;\n }\n } else {\n var ev = new MouseEvent(e, editor);\n var pos = ev.getDocumentPosition();\n if (mode == \"cursor\") editor.selection.moveCursorToPosition(pos);else if (mode == \"anchor\") editor.selection.setSelectionAnchor(pos.row, pos.column);\n editor.renderer.scrollCursorIntoView(pos);\n e.preventDefault();\n }\n });\n\n function animate() {\n animationSteps += 60;\n animationTimer = setInterval(function () {\n if (animationSteps-- <= 0) {\n clearInterval(animationTimer);\n animationTimer = null;\n }\n\n if (Math.abs(vX) < 0.01) vX = 0;\n if (Math.abs(vY) < 0.01) vY = 0;\n if (animationSteps < 20) vX = 0.9 * vX;\n if (animationSteps < 20) vY = 0.9 * vY;\n var oldScrollTop = editor.session.getScrollTop();\n editor.renderer.scrollBy(10 * vX, 10 * vY);\n if (oldScrollTop == editor.session.getScrollTop()) animationSteps = 0;\n }, 10);\n }\n };\n});\nace.define(\"ace/lib/net\", [\"require\", \"exports\", \"module\", \"ace/lib/dom\"], function (require, exports, module) {\n \"use strict\";\n\n var dom = require(\"./dom\");\n\n exports.get = function (url, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n callback(xhr.responseText);\n }\n };\n\n xhr.send(null);\n };\n\n exports.loadScript = function (path, callback) {\n var head = dom.getDocumentHead();\n var s = document.createElement('script');\n s.src = path;\n head.appendChild(s);\n\n s.onload = s.onreadystatechange = function (_, isAbort) {\n if (isAbort || !s.readyState || s.readyState == \"loaded\" || s.readyState == \"complete\") {\n s = s.onload = s.onreadystatechange = null;\n if (!isAbort) callback();\n }\n };\n };\n\n exports.qualifyURL = function (url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n };\n});\nace.define(\"ace/lib/event_emitter\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n var EventEmitter = {};\n\n var stopPropagation = function stopPropagation() {\n this.propagationStopped = true;\n };\n\n var preventDefault = function preventDefault() {\n this.defaultPrevented = true;\n };\n\n EventEmitter._emit = EventEmitter._dispatchEvent = function (eventName, e) {\n this._eventRegistry || (this._eventRegistry = {});\n this._defaultHandlers || (this._defaultHandlers = {});\n var listeners = this._eventRegistry[eventName] || [];\n var defaultHandler = this._defaultHandlers[eventName];\n if (!listeners.length && !defaultHandler) return;\n if (typeof e != \"object\" || !e) e = {};\n if (!e.type) e.type = eventName;\n if (!e.stopPropagation) e.stopPropagation = stopPropagation;\n if (!e.preventDefault) e.preventDefault = preventDefault;\n listeners = listeners.slice();\n\n for (var i = 0; i < listeners.length; i++) {\n listeners[i](e, this);\n if (e.propagationStopped) break;\n }\n\n if (defaultHandler && !e.defaultPrevented) return defaultHandler(e, this);\n };\n\n EventEmitter._signal = function (eventName, e) {\n var listeners = (this._eventRegistry || {})[eventName];\n if (!listeners) return;\n listeners = listeners.slice();\n\n for (var i = 0; i < listeners.length; i++) {\n listeners[i](e, this);\n }\n };\n\n EventEmitter.once = function (eventName, callback) {\n var _self = this;\n\n this.addEventListener(eventName, function newCallback() {\n _self.removeEventListener(eventName, newCallback);\n\n callback.apply(null, arguments);\n });\n\n if (!callback) {\n return new Promise(function (resolve) {\n callback = resolve;\n });\n }\n };\n\n EventEmitter.setDefaultHandler = function (eventName, callback) {\n var handlers = this._defaultHandlers;\n if (!handlers) handlers = this._defaultHandlers = {\n _disabled_: {}\n };\n\n if (handlers[eventName]) {\n var old = handlers[eventName];\n var disabled = handlers._disabled_[eventName];\n if (!disabled) handlers._disabled_[eventName] = disabled = [];\n disabled.push(old);\n var i = disabled.indexOf(callback);\n if (i != -1) disabled.splice(i, 1);\n }\n\n handlers[eventName] = callback;\n };\n\n EventEmitter.removeDefaultHandler = function (eventName, callback) {\n var handlers = this._defaultHandlers;\n if (!handlers) return;\n var disabled = handlers._disabled_[eventName];\n\n if (handlers[eventName] == callback) {\n if (disabled) this.setDefaultHandler(eventName, disabled.pop());\n } else if (disabled) {\n var i = disabled.indexOf(callback);\n if (i != -1) disabled.splice(i, 1);\n }\n };\n\n EventEmitter.on = EventEmitter.addEventListener = function (eventName, callback, capturing) {\n this._eventRegistry = this._eventRegistry || {};\n var listeners = this._eventRegistry[eventName];\n if (!listeners) listeners = this._eventRegistry[eventName] = [];\n if (listeners.indexOf(callback) == -1) listeners[capturing ? \"unshift\" : \"push\"](callback);\n return callback;\n };\n\n EventEmitter.off = EventEmitter.removeListener = EventEmitter.removeEventListener = function (eventName, callback) {\n this._eventRegistry = this._eventRegistry || {};\n var listeners = this._eventRegistry[eventName];\n if (!listeners) return;\n var index = listeners.indexOf(callback);\n if (index !== -1) listeners.splice(index, 1);\n };\n\n EventEmitter.removeAllListeners = function (eventName) {\n if (this._eventRegistry) this._eventRegistry[eventName] = [];\n };\n\n exports.EventEmitter = EventEmitter;\n});\nace.define(\"ace/lib/app_config\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/event_emitter\"], function (require, exports, module) {\n \"no use strict\";\n\n var oop = require(\"./oop\");\n\n var EventEmitter = require(\"./event_emitter\").EventEmitter;\n\n var optionsProvider = {\n setOptions: function setOptions(optList) {\n Object.keys(optList).forEach(function (key) {\n this.setOption(key, optList[key]);\n }, this);\n },\n getOptions: function getOptions(optionNames) {\n var result = {};\n\n if (!optionNames) {\n var options = this.$options;\n optionNames = Object.keys(options).filter(function (key) {\n return !options[key].hidden;\n });\n } else if (!Array.isArray(optionNames)) {\n result = optionNames;\n optionNames = Object.keys(result);\n }\n\n optionNames.forEach(function (key) {\n result[key] = this.getOption(key);\n }, this);\n return result;\n },\n setOption: function setOption(name, value) {\n if (this[\"$\" + name] === value) return;\n var opt = this.$options[name];\n\n if (!opt) {\n return warn('misspelled option \"' + name + '\"');\n }\n\n if (opt.forwardTo) return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);\n if (!opt.handlesSet) this[\"$\" + name] = value;\n if (opt && opt.set) opt.set.call(this, value);\n },\n getOption: function getOption(name) {\n var opt = this.$options[name];\n\n if (!opt) {\n return warn('misspelled option \"' + name + '\"');\n }\n\n if (opt.forwardTo) return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);\n return opt && opt.get ? opt.get.call(this) : this[\"$\" + name];\n }\n };\n\n function warn(message) {\n if (typeof console != \"undefined\" && console.warn) console.warn.apply(console, arguments);\n }\n\n function reportError(msg, data) {\n var e = new Error(msg);\n e.data = data;\n if (typeof console == \"object\" && console.error) console.error(e);\n setTimeout(function () {\n throw e;\n });\n }\n\n var AppConfig = function AppConfig() {\n this.$defaultOptions = {};\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.defineOptions = function (obj, path, options) {\n if (!obj.$options) this.$defaultOptions[path] = obj.$options = {};\n Object.keys(options).forEach(function (key) {\n var opt = options[key];\n if (typeof opt == \"string\") opt = {\n forwardTo: opt\n };\n opt.name || (opt.name = key);\n obj.$options[opt.name] = opt;\n if (\"initialValue\" in opt) obj[\"$\" + opt.name] = opt.initialValue;\n });\n oop.implement(obj, optionsProvider);\n return this;\n };\n\n this.resetOptions = function (obj) {\n Object.keys(obj.$options).forEach(function (key) {\n var opt = obj.$options[key];\n if (\"value\" in opt) obj.setOption(key, opt.value);\n });\n };\n\n this.setDefaultValue = function (path, name, value) {\n if (!path) {\n for (path in this.$defaultOptions) {\n if (this.$defaultOptions[path][name]) break;\n }\n\n if (!this.$defaultOptions[path][name]) return false;\n }\n\n var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {});\n\n if (opts[name]) {\n if (opts.forwardTo) this.setDefaultValue(opts.forwardTo, name, value);else opts[name].value = value;\n }\n };\n\n this.setDefaultValues = function (path, optionHash) {\n Object.keys(optionHash).forEach(function (key) {\n this.setDefaultValue(path, key, optionHash[key]);\n }, this);\n };\n\n this.warn = warn;\n this.reportError = reportError;\n }).call(AppConfig.prototype);\n exports.AppConfig = AppConfig;\n});\nace.define(\"ace/config\", [\"require\", \"exports\", \"module\", \"ace/lib/lang\", \"ace/lib/oop\", \"ace/lib/net\", \"ace/lib/app_config\"], function (require, exports, module) {\n \"no use strict\";\n\n var lang = require(\"./lib/lang\");\n\n var oop = require(\"./lib/oop\");\n\n var net = require(\"./lib/net\");\n\n var AppConfig = require(\"./lib/app_config\").AppConfig;\n\n module.exports = exports = new AppConfig();\n\n var global = function () {\n return this || typeof window != \"undefined\" && window;\n }();\n\n var options = {\n packaged: false,\n workerPath: null,\n modePath: null,\n themePath: null,\n basePath: \"\",\n suffix: \".js\",\n $moduleUrls: {},\n loadWorkerFromBlob: true,\n sharedPopups: false\n };\n\n exports.get = function (key) {\n if (!options.hasOwnProperty(key)) throw new Error(\"Unknown config key: \" + key);\n return options[key];\n };\n\n exports.set = function (key, value) {\n if (options.hasOwnProperty(key)) options[key] = value;else if (this.setDefaultValue(\"\", key, value) == false) throw new Error(\"Unknown config key: \" + key);\n };\n\n exports.all = function () {\n return lang.copyObject(options);\n };\n\n exports.$modes = {};\n\n exports.moduleUrl = function (name, component) {\n if (options.$moduleUrls[name]) return options.$moduleUrls[name];\n var parts = name.split(\"/\");\n component = component || parts[parts.length - 2] || \"\";\n var sep = component == \"snippets\" ? \"/\" : \"-\";\n var base = parts[parts.length - 1];\n\n if (component == \"worker\" && sep == \"-\") {\n var re = new RegExp(\"^\" + component + \"[\\\\-_]|[\\\\-_]\" + component + \"$\", \"g\");\n base = base.replace(re, \"\");\n }\n\n if ((!base || base == component) && parts.length > 1) base = parts[parts.length - 2];\n var path = options[component + \"Path\"];\n\n if (path == null) {\n path = options.basePath;\n } else if (sep == \"/\") {\n component = sep = \"\";\n }\n\n if (path && path.slice(-1) != \"/\") path += \"/\";\n return path + component + sep + base + this.get(\"suffix\");\n };\n\n exports.setModuleUrl = function (name, subst) {\n return options.$moduleUrls[name] = subst;\n };\n\n exports.$loading = {};\n\n exports.loadModule = function (moduleName, onLoad) {\n var module, moduleType;\n\n if (Array.isArray(moduleName)) {\n moduleType = moduleName[0];\n moduleName = moduleName[1];\n }\n\n try {\n module = require(moduleName);\n } catch (e) {}\n\n if (module && !exports.$loading[moduleName]) return onLoad && onLoad(module);\n if (!exports.$loading[moduleName]) exports.$loading[moduleName] = [];\n exports.$loading[moduleName].push(onLoad);\n if (exports.$loading[moduleName].length > 1) return;\n\n var afterLoad = function afterLoad() {\n require([moduleName], function (module) {\n exports._emit(\"load.module\", {\n name: moduleName,\n module: module\n });\n\n var listeners = exports.$loading[moduleName];\n exports.$loading[moduleName] = null;\n listeners.forEach(function (onLoad) {\n onLoad && onLoad(module);\n });\n });\n };\n\n if (!exports.get(\"packaged\")) return afterLoad();\n net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);\n\n _reportErrorIfPathIsNotConfigured();\n };\n\n var _reportErrorIfPathIsNotConfigured = function reportErrorIfPathIsNotConfigured() {\n if (!options.basePath && !options.workerPath && !options.modePath && !options.themePath && !Object.keys(options.$moduleUrls).length) {\n 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\");\n\n _reportErrorIfPathIsNotConfigured = function reportErrorIfPathIsNotConfigured() {};\n }\n };\n\n init(true);\n\n function init(packaged) {\n if (!global || !global.document) return;\n options.packaged = packaged || require.packaged || module.packaged || global.define && define.packaged;\n var scriptOptions = {};\n var scriptUrl = \"\";\n var currentScript = document.currentScript || document._currentScript; // native or polyfill\n\n var currentDocument = currentScript && currentScript.ownerDocument || document;\n var scripts = currentDocument.getElementsByTagName(\"script\");\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n var src = script.src || script.getAttribute(\"src\");\n if (!src) continue;\n var attributes = script.attributes;\n\n for (var j = 0, l = attributes.length; j < l; j++) {\n var attr = attributes[j];\n\n if (attr.name.indexOf(\"data-ace-\") === 0) {\n scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/, \"\"))] = attr.value;\n }\n }\n\n var m = src.match(/^(.*)\\/ace(\\-\\w+)?\\.js(\\?|$)/);\n if (m) scriptUrl = m[1];\n }\n\n if (scriptUrl) {\n scriptOptions.base = scriptOptions.base || scriptUrl;\n scriptOptions.packaged = true;\n }\n\n scriptOptions.basePath = scriptOptions.base;\n scriptOptions.workerPath = scriptOptions.workerPath || scriptOptions.base;\n scriptOptions.modePath = scriptOptions.modePath || scriptOptions.base;\n scriptOptions.themePath = scriptOptions.themePath || scriptOptions.base;\n delete scriptOptions.base;\n\n for (var key in scriptOptions) {\n if (typeof scriptOptions[key] !== \"undefined\") exports.set(key, scriptOptions[key]);\n }\n }\n\n exports.init = init;\n\n function deHyphenate(str) {\n return str.replace(/-(.)/g, function (m, m1) {\n return m1.toUpperCase();\n });\n }\n\n exports.version = \"1.4.7\";\n});\nace.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 (require, exports, module) {\n \"use strict\";\n\n var event = require(\"../lib/event\");\n\n var useragent = require(\"../lib/useragent\");\n\n var DefaultHandlers = require(\"./default_handlers\").DefaultHandlers;\n\n var DefaultGutterHandler = require(\"./default_gutter_handler\").GutterHandler;\n\n var MouseEvent = require(\"./mouse_event\").MouseEvent;\n\n var DragdropHandler = require(\"./dragdrop_handler\").DragdropHandler;\n\n var addTouchListeners = require(\"./touch_handler\").addTouchListeners;\n\n var config = require(\"../config\");\n\n var MouseHandler = function MouseHandler(editor) {\n var _self = this;\n\n this.editor = editor;\n new DefaultHandlers(this);\n new DefaultGutterHandler(this);\n new DragdropHandler(this);\n\n var focusEditor = function focusEditor(e) {\n var windowBlurred = !document.hasFocus || !document.hasFocus() || !editor.isFocused() && document.activeElement == (editor.textInput && editor.textInput.getElement());\n if (windowBlurred) window.focus();\n editor.focus();\n };\n\n var mouseTarget = editor.renderer.getMouseEventTarget();\n event.addListener(mouseTarget, \"click\", this.onMouseEvent.bind(this, \"click\"));\n event.addListener(mouseTarget, \"mousemove\", this.onMouseMove.bind(this, \"mousemove\"));\n event.addMultiMouseDownListener([mouseTarget, editor.renderer.scrollBarV && editor.renderer.scrollBarV.inner, editor.renderer.scrollBarH && editor.renderer.scrollBarH.inner, editor.textInput && editor.textInput.getElement()].filter(Boolean), [400, 300, 250], this, \"onMouseEvent\");\n event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, \"mousewheel\"));\n addTouchListeners(editor.container, editor);\n var gutterEl = editor.renderer.$gutter;\n event.addListener(gutterEl, \"mousedown\", this.onMouseEvent.bind(this, \"guttermousedown\"));\n event.addListener(gutterEl, \"click\", this.onMouseEvent.bind(this, \"gutterclick\"));\n event.addListener(gutterEl, \"dblclick\", this.onMouseEvent.bind(this, \"gutterdblclick\"));\n event.addListener(gutterEl, \"mousemove\", this.onMouseEvent.bind(this, \"guttermousemove\"));\n event.addListener(mouseTarget, \"mousedown\", focusEditor);\n event.addListener(gutterEl, \"mousedown\", focusEditor);\n\n if (useragent.isIE && editor.renderer.scrollBarV) {\n event.addListener(editor.renderer.scrollBarV.element, \"mousedown\", focusEditor);\n event.addListener(editor.renderer.scrollBarH.element, \"mousedown\", focusEditor);\n }\n\n editor.on(\"mousemove\", function (e) {\n if (_self.state || _self.$dragDelay || !_self.$dragEnabled) return;\n var character = editor.renderer.screenToTextCoordinates(e.x, e.y);\n var range = editor.session.selection.getRange();\n var renderer = editor.renderer;\n\n if (!range.isEmpty() && range.insideStart(character.row, character.column)) {\n renderer.setCursorStyle(\"default\");\n } else {\n renderer.setCursorStyle(\"\");\n }\n });\n };\n\n (function () {\n this.onMouseEvent = function (name, e) {\n this.editor._emit(name, new MouseEvent(e, this.editor));\n };\n\n this.onMouseMove = function (name, e) {\n var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;\n if (!listeners || !listeners.length) return;\n\n this.editor._emit(name, new MouseEvent(e, this.editor));\n };\n\n this.onMouseWheel = function (name, e) {\n var mouseEvent = new MouseEvent(e, this.editor);\n mouseEvent.speed = this.$scrollSpeed * 2;\n mouseEvent.wheelX = e.wheelX;\n mouseEvent.wheelY = e.wheelY;\n\n this.editor._emit(name, mouseEvent);\n };\n\n this.setState = function (state) {\n this.state = state;\n };\n\n this.captureMouse = function (ev, mouseMoveHandler) {\n this.x = ev.x;\n this.y = ev.y;\n this.isMousePressed = true;\n var editor = this.editor;\n var renderer = this.editor.renderer;\n renderer.$isMousePressed = true;\n var self = this;\n\n var onMouseMove = function onMouseMove(e) {\n if (!e) return;\n if (useragent.isWebKit && !e.which && self.releaseMouse) return self.releaseMouse();\n self.x = e.clientX;\n self.y = e.clientY;\n mouseMoveHandler && mouseMoveHandler(e);\n self.mouseEvent = new MouseEvent(e, self.editor);\n self.$mouseMoved = true;\n };\n\n var onCaptureEnd = function onCaptureEnd(e) {\n editor.off(\"beforeEndOperation\", onOperationEnd);\n clearInterval(timerId);\n onCaptureInterval();\n self[self.state + \"End\"] && self[self.state + \"End\"](e);\n self.state = \"\";\n self.isMousePressed = renderer.$isMousePressed = false;\n if (renderer.$keepTextAreaAtCursor) renderer.$moveTextAreaToCursor();\n self.$onCaptureMouseMove = self.releaseMouse = null;\n e && self.onMouseEvent(\"mouseup\", e);\n editor.endOperation();\n };\n\n var onCaptureInterval = function onCaptureInterval() {\n self[self.state] && self[self.state]();\n self.$mouseMoved = false;\n };\n\n if (useragent.isOldIE && ev.domEvent.type == \"dblclick\") {\n return setTimeout(function () {\n onCaptureEnd(ev);\n });\n }\n\n var onOperationEnd = function onOperationEnd(e) {\n if (!self.releaseMouse) return;\n\n if (editor.curOp.command.name && editor.curOp.selectionChanged) {\n self[self.state + \"End\"] && self[self.state + \"End\"]();\n self.state = \"\";\n self.releaseMouse();\n }\n };\n\n editor.on(\"beforeEndOperation\", onOperationEnd);\n editor.startOperation({\n command: {\n name: \"mouse\"\n }\n });\n self.$onCaptureMouseMove = onMouseMove;\n self.releaseMouse = event.capture(this.editor.container, onMouseMove, onCaptureEnd);\n var timerId = setInterval(onCaptureInterval, 20);\n };\n\n this.releaseMouse = null;\n\n this.cancelContextMenu = function () {\n var stop = function (e) {\n if (e && e.domEvent && e.domEvent.type != \"contextmenu\") return;\n this.editor.off(\"nativecontextmenu\", stop);\n if (e && e.domEvent) event.stopEvent(e.domEvent);\n }.bind(this);\n\n setTimeout(stop, 10);\n this.editor.on(\"nativecontextmenu\", stop);\n };\n }).call(MouseHandler.prototype);\n config.defineOptions(MouseHandler.prototype, \"mouseHandler\", {\n scrollSpeed: {\n initialValue: 2\n },\n dragDelay: {\n initialValue: useragent.isMac ? 150 : 0\n },\n dragEnabled: {\n initialValue: true\n },\n focusTimeout: {\n initialValue: 0\n },\n tooltipFollowsMouse: {\n initialValue: true\n }\n });\n exports.MouseHandler = MouseHandler;\n});\nace.define(\"ace/mouse/fold_handler\", [\"require\", \"exports\", \"module\", \"ace/lib/dom\"], function (require, exports, module) {\n \"use strict\";\n\n var dom = require(\"../lib/dom\");\n\n function FoldHandler(editor) {\n editor.on(\"click\", function (e) {\n var position = e.getDocumentPosition();\n var session = editor.session;\n var fold = session.getFoldAt(position.row, position.column, 1);\n\n if (fold) {\n if (e.getAccelKey()) session.removeFold(fold);else session.expandFold(fold);\n e.stop();\n }\n\n var target = e.domEvent && e.domEvent.target;\n\n if (target && dom.hasCssClass(target, \"ace_inline_button\")) {\n if (dom.hasCssClass(target, \"ace_toggle_wrap\")) {\n session.setOption(\"wrap\", !session.getUseWrapMode());\n editor.renderer.scrollCursorIntoView();\n }\n }\n });\n editor.on(\"gutterclick\", function (e) {\n var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);\n\n if (gutterRegion == \"foldWidgets\") {\n var row = e.getDocumentPosition().row;\n var session = editor.session;\n if (session.foldWidgets && session.foldWidgets[row]) editor.session.onFoldWidgetClick(row, e);\n if (!editor.isFocused()) editor.focus();\n e.stop();\n }\n });\n editor.on(\"gutterdblclick\", function (e) {\n var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);\n\n if (gutterRegion == \"foldWidgets\") {\n var row = e.getDocumentPosition().row;\n var session = editor.session;\n var data = session.getParentFoldRangeData(row, true);\n var range = data.range || data.firstRange;\n\n if (range) {\n row = range.start.row;\n var fold = session.getFoldAt(row, session.getLine(row).length, 1);\n\n if (fold) {\n session.removeFold(fold);\n } else {\n session.addFold(\"...\", range);\n editor.renderer.scrollCursorIntoView({\n row: range.start.row,\n column: 0\n });\n }\n }\n\n e.stop();\n }\n });\n }\n\n exports.FoldHandler = FoldHandler;\n});\nace.define(\"ace/keyboard/keybinding\", [\"require\", \"exports\", \"module\", \"ace/lib/keys\", \"ace/lib/event\"], function (require, exports, module) {\n \"use strict\";\n\n var keyUtil = require(\"../lib/keys\");\n\n var event = require(\"../lib/event\");\n\n var KeyBinding = function KeyBinding(editor) {\n this.$editor = editor;\n this.$data = {\n editor: editor\n };\n this.$handlers = [];\n this.setDefaultHandler(editor.commands);\n };\n\n (function () {\n this.setDefaultHandler = function (kb) {\n this.removeKeyboardHandler(this.$defaultHandler);\n this.$defaultHandler = kb;\n this.addKeyboardHandler(kb, 0);\n };\n\n this.setKeyboardHandler = function (kb) {\n var h = this.$handlers;\n if (h[h.length - 1] == kb) return;\n\n while (h[h.length - 1] && h[h.length - 1] != this.$defaultHandler) {\n this.removeKeyboardHandler(h[h.length - 1]);\n }\n\n this.addKeyboardHandler(kb, 1);\n };\n\n this.addKeyboardHandler = function (kb, pos) {\n if (!kb) return;\n if (typeof kb == \"function\" && !kb.handleKeyboard) kb.handleKeyboard = kb;\n var i = this.$handlers.indexOf(kb);\n if (i != -1) this.$handlers.splice(i, 1);\n if (pos == undefined) this.$handlers.push(kb);else this.$handlers.splice(pos, 0, kb);\n if (i == -1 && kb.attach) kb.attach(this.$editor);\n };\n\n this.removeKeyboardHandler = function (kb) {\n var i = this.$handlers.indexOf(kb);\n if (i == -1) return false;\n this.$handlers.splice(i, 1);\n kb.detach && kb.detach(this.$editor);\n return true;\n };\n\n this.getKeyboardHandler = function () {\n return this.$handlers[this.$handlers.length - 1];\n };\n\n this.getStatusText = function () {\n var data = this.$data;\n var editor = data.editor;\n return this.$handlers.map(function (h) {\n return h.getStatusText && h.getStatusText(editor, data) || \"\";\n }).filter(Boolean).join(\" \");\n };\n\n this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {\n var toExecute;\n var success = false;\n var commands = this.$editor.commands;\n\n for (var i = this.$handlers.length; i--;) {\n toExecute = this.$handlers[i].handleKeyboard(this.$data, hashId, keyString, keyCode, e);\n if (!toExecute || !toExecute.command) continue;\n\n if (toExecute.command == \"null\") {\n success = true;\n } else {\n success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);\n }\n\n if (success && e && hashId != -1 && toExecute.passEvent != true && toExecute.command.passEvent != true) {\n event.stopEvent(e);\n }\n\n if (success) break;\n }\n\n if (!success && hashId == -1) {\n toExecute = {\n command: \"insertstring\"\n };\n success = commands.exec(\"insertstring\", this.$editor, keyString);\n }\n\n if (success && this.$editor._signal) this.$editor._signal(\"keyboardActivity\", toExecute);\n return success;\n };\n\n this.onCommandKey = function (e, hashId, keyCode) {\n var keyString = keyUtil.keyCodeToString(keyCode);\n return this.$callKeyboardHandlers(hashId, keyString, keyCode, e);\n };\n\n this.onTextInput = function (text) {\n return this.$callKeyboardHandlers(-1, text);\n };\n }).call(KeyBinding.prototype);\n exports.KeyBinding = KeyBinding;\n});\nace.define(\"ace/lib/bidiutil\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n var ArabicAlefBetIntervalsBegine = [\"\\u0621\", \"\\u0641\"];\n var ArabicAlefBetIntervalsEnd = [\"\\u063A\", \"\\u064A\"];\n var dir = 0,\n hiLevel = 0;\n var lastArabic = false,\n hasUBAT_AL = false,\n hasUBAT_B = false,\n hasUBAT_S = false,\n hasBlockSep = false,\n hasSegSep = false;\n var impTab_LTR = [[0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 0x11, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 0x15, 0x15, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]];\n var impTab_RTL = [[2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 0x21, 3, 1, 1]];\n var LTR = 0,\n RTL = 1;\n var L = 0;\n var R = 1;\n var EN = 2;\n var AN = 3;\n var ON = 4;\n var B = 5;\n var S = 6;\n var AL = 7;\n var WS = 8;\n var CS = 9;\n var ES = 10;\n var ET = 11;\n var NSM = 12;\n var LRE = 13;\n var RLE = 14;\n var PDF = 15;\n var LRO = 16;\n var RLO = 17;\n var BN = 18;\n var UnicodeTBL00 = [BN, BN, BN, BN, BN, BN, BN, BN, BN, S, B, S, WS, B, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, B, B, B, S, WS, ON, ON, ET, ET, ET, ON, ON, ON, ON, ON, ES, CS, ES, CS, CS, EN, EN, EN, EN, EN, EN, EN, EN, EN, EN, CS, ON, ON, ON, ON, ON, ON, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, ON, ON, ON, ON, ON, ON, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, ON, ON, ON, ON, BN, BN, BN, BN, BN, BN, B, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, CS, ON, ET, ET, ET, ET, ON, ON, ON, ON, L, ON, ON, BN, ON, ON, ET, ET, EN, EN, ON, L, ON, ON, ON, EN, L, ON, ON, ON, ON, ON];\n var UnicodeTBL20 = [WS, WS, WS, WS, WS, WS, WS, WS, WS, WS, WS, BN, BN, BN, L, R, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, WS, B, LRE, RLE, PDF, LRO, RLO, CS, ET, ET, ET, ET, ET, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, CS, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, WS];\n\n function _computeLevels(chars, levels, len, charTypes) {\n var impTab = dir ? impTab_RTL : impTab_LTR,\n prevState = null,\n newClass = null,\n newLevel = null,\n newState = 0,\n action = null,\n cond = null,\n condPos = -1,\n i = null,\n ix = null,\n classes = [];\n\n if (!charTypes) {\n for (i = 0, charTypes = []; i < len; i++) {\n charTypes[i] = _getCharacterType(chars[i]);\n }\n }\n\n hiLevel = dir;\n lastArabic = false;\n hasUBAT_AL = false;\n hasUBAT_B = false;\n hasUBAT_S = false;\n\n for (ix = 0; ix < len; ix++) {\n prevState = newState;\n classes[ix] = newClass = _getCharClass(chars, charTypes, classes, ix);\n newState = impTab[prevState][newClass];\n action = newState & 0xF0;\n newState &= 0x0F;\n levels[ix] = newLevel = impTab[newState][5];\n\n if (action > 0) {\n if (action == 0x10) {\n for (i = condPos; i < ix; i++) {\n levels[i] = 1;\n }\n\n condPos = -1;\n } else {\n condPos = -1;\n }\n }\n\n cond = impTab[newState][6];\n\n if (cond) {\n if (condPos == -1) {\n condPos = ix;\n }\n } else {\n if (condPos > -1) {\n for (i = condPos; i < ix; i++) {\n levels[i] = newLevel;\n }\n\n condPos = -1;\n }\n }\n\n if (charTypes[ix] == B) {\n levels[ix] = 0;\n }\n\n hiLevel |= newLevel;\n }\n\n if (hasUBAT_S) {\n for (i = 0; i < len; i++) {\n if (charTypes[i] == S) {\n levels[i] = dir;\n\n for (var j = i - 1; j >= 0; j--) {\n if (charTypes[j] == WS) {\n levels[j] = dir;\n } else {\n break;\n }\n }\n }\n }\n }\n }\n\n function _invertLevel(lev, levels, _array) {\n if (hiLevel < lev) {\n return;\n }\n\n if (lev == 1 && dir == RTL && !hasUBAT_B) {\n _array.reverse();\n\n return;\n }\n\n var len = _array.length,\n start = 0,\n end,\n lo,\n hi,\n tmp;\n\n while (start < len) {\n if (levels[start] >= lev) {\n end = start + 1;\n\n while (end < len && levels[end] >= lev) {\n end++;\n }\n\n for (lo = start, hi = end - 1; lo < hi; lo++, hi--) {\n tmp = _array[lo];\n _array[lo] = _array[hi];\n _array[hi] = tmp;\n }\n\n start = end;\n }\n\n start++;\n }\n }\n\n function _getCharClass(chars, types, classes, ix) {\n var cType = types[ix],\n wType,\n nType,\n len,\n i;\n\n switch (cType) {\n case L:\n case R:\n lastArabic = false;\n\n case ON:\n case AN:\n return cType;\n\n case EN:\n return lastArabic ? AN : EN;\n\n case AL:\n lastArabic = true;\n hasUBAT_AL = true;\n return R;\n\n case WS:\n return ON;\n\n case CS:\n if (ix < 1 || ix + 1 >= types.length || (wType = classes[ix - 1]) != EN && wType != AN || (nType = types[ix + 1]) != EN && nType != AN) {\n return ON;\n }\n\n if (lastArabic) {\n nType = AN;\n }\n\n return nType == wType ? nType : ON;\n\n case ES:\n wType = ix > 0 ? classes[ix - 1] : B;\n\n if (wType == EN && ix + 1 < types.length && types[ix + 1] == EN) {\n return EN;\n }\n\n return ON;\n\n case ET:\n if (ix > 0 && classes[ix - 1] == EN) {\n return EN;\n }\n\n if (lastArabic) {\n return ON;\n }\n\n i = ix + 1;\n len = types.length;\n\n while (i < len && types[i] == ET) {\n i++;\n }\n\n if (i < len && types[i] == EN) {\n return EN;\n }\n\n return ON;\n\n case NSM:\n len = types.length;\n i = ix + 1;\n\n while (i < len && types[i] == NSM) {\n i++;\n }\n\n if (i < len) {\n var c = chars[ix],\n rtlCandidate = c >= 0x0591 && c <= 0x08FF || c == 0xFB1E;\n wType = types[i];\n\n if (rtlCandidate && (wType == R || wType == AL)) {\n return R;\n }\n }\n\n if (ix < 1 || (wType = types[ix - 1]) == B) {\n return ON;\n }\n\n return classes[ix - 1];\n\n case B:\n lastArabic = false;\n hasUBAT_B = true;\n return dir;\n\n case S:\n hasUBAT_S = true;\n return ON;\n\n case LRE:\n case RLE:\n case LRO:\n case RLO:\n case PDF:\n lastArabic = false;\n\n case BN:\n return ON;\n }\n }\n\n function _getCharacterType(ch) {\n var uc = ch.charCodeAt(0),\n hi = uc >> 8;\n\n if (hi == 0) {\n return uc > 0x00BF ? L : UnicodeTBL00[uc];\n } else if (hi == 5) {\n return /[\\u0591-\\u05f4]/.test(ch) ? R : L;\n } else if (hi == 6) {\n if (/[\\u0610-\\u061a\\u064b-\\u065f\\u06d6-\\u06e4\\u06e7-\\u06ed]/.test(ch)) return NSM;else if (/[\\u0660-\\u0669\\u066b-\\u066c]/.test(ch)) return AN;else if (uc == 0x066A) return ET;else if (/[\\u06f0-\\u06f9]/.test(ch)) return EN;else return AL;\n } else if (hi == 0x20 && uc <= 0x205F) {\n return UnicodeTBL20[uc & 0xFF];\n } else if (hi == 0xFE) {\n return uc >= 0xFE70 ? AL : ON;\n }\n\n return ON;\n }\n\n function _isArabicDiacritics(ch) {\n return ch >= \"\\u064B\" && ch <= \"\\u0655\";\n }\n\n exports.L = L;\n exports.R = R;\n exports.EN = EN;\n exports.ON_R = 3;\n exports.AN = 4;\n exports.R_H = 5;\n exports.B = 6;\n exports.RLE = 7;\n exports.DOT = \"\\xB7\";\n\n exports.doBidiReorder = function (text, textCharTypes, isRtl) {\n if (text.length < 2) return {};\n var chars = text.split(\"\"),\n logicalFromVisual = new Array(chars.length),\n bidiLevels = new Array(chars.length),\n levels = [];\n dir = isRtl ? RTL : LTR;\n\n _computeLevels(chars, levels, chars.length, textCharTypes);\n\n for (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++) {\n ;\n }\n\n _invertLevel(2, levels, logicalFromVisual);\n\n _invertLevel(1, levels, logicalFromVisual);\n\n for (var i = 0; i < logicalFromVisual.length - 1; i++) {\n //fix levels to reflect character width\n if (textCharTypes[i] === AN) {\n levels[i] = exports.AN;\n } else if (levels[i] === R && (textCharTypes[i] > AL && textCharTypes[i] < LRE || textCharTypes[i] === ON || textCharTypes[i] === BN)) {\n levels[i] = exports.ON_R;\n } else if (i > 0 && chars[i - 1] === \"\\u0644\" && /\\u0622|\\u0623|\\u0625|\\u0627/.test(chars[i])) {\n levels[i - 1] = levels[i] = exports.R_H;\n i++;\n }\n }\n\n if (chars[chars.length - 1] === exports.DOT) levels[chars.length - 1] = exports.B;\n if (chars[0] === \"\\u202B\") levels[0] = exports.RLE;\n\n for (var i = 0; i < logicalFromVisual.length; i++) {\n bidiLevels[i] = levels[logicalFromVisual[i]];\n }\n\n return {\n 'logicalFromVisual': logicalFromVisual,\n 'bidiLevels': bidiLevels\n };\n };\n\n exports.hasBidiCharacters = function (text, textCharTypes) {\n var ret = false;\n\n for (var i = 0; i < text.length; i++) {\n textCharTypes[i] = _getCharacterType(text.charAt(i));\n if (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL || textCharTypes[i] == AN)) ret = true;\n }\n\n return ret;\n };\n\n exports.getVisualFromLogicalIdx = function (logIdx, rowMap) {\n for (var i = 0; i < rowMap.logicalFromVisual.length; i++) {\n if (rowMap.logicalFromVisual[i] == logIdx) return i;\n }\n\n return 0;\n };\n});\nace.define(\"ace/bidihandler\", [\"require\", \"exports\", \"module\", \"ace/lib/bidiutil\", \"ace/lib/lang\"], function (require, exports, module) {\n \"use strict\";\n\n var bidiUtil = require(\"./lib/bidiutil\");\n\n var lang = require(\"./lib/lang\");\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac\\u202B]/;\n\n var BidiHandler = function BidiHandler(session) {\n this.session = session;\n this.bidiMap = {};\n this.currentRow = null;\n this.bidiUtil = bidiUtil;\n this.charWidths = [];\n this.EOL = \"\\xAC\";\n this.showInvisibles = true;\n this.isRtlDir = false;\n this.$isRtl = false;\n this.line = \"\";\n this.wrapIndent = 0;\n this.EOF = \"\\xB6\";\n this.RLE = \"\\u202B\";\n this.contentWidth = 0;\n this.fontMetrics = null;\n this.rtlLineOffset = 0;\n this.wrapOffset = 0;\n this.isMoveLeftOperation = false;\n this.seenBidi = bidiRE.test(session.getValue());\n };\n\n (function () {\n this.isBidiRow = function (screenRow, docRow, splitIndex) {\n if (!this.seenBidi) return false;\n\n if (screenRow !== this.currentRow) {\n this.currentRow = screenRow;\n this.updateRowLine(docRow, splitIndex);\n this.updateBidiMap();\n }\n\n return this.bidiMap.bidiLevels;\n };\n\n this.onChange = function (delta) {\n if (!this.seenBidi) {\n if (delta.action == \"insert\" && bidiRE.test(delta.lines.join(\"\\n\"))) {\n this.seenBidi = true;\n this.currentRow = null;\n }\n } else {\n this.currentRow = null;\n }\n };\n\n this.getDocumentRow = function () {\n var docRow = 0;\n var rowCache = this.session.$screenRowCache;\n\n if (rowCache.length) {\n var index = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n if (index >= 0) docRow = this.session.$docRowCache[index];\n }\n\n return docRow;\n };\n\n this.getSplitIndex = function () {\n var splitIndex = 0;\n var rowCache = this.session.$screenRowCache;\n\n if (rowCache.length) {\n var currentIndex,\n prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n\n while (this.currentRow - splitIndex > 0) {\n currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1);\n if (currentIndex !== prevIndex) break;\n prevIndex = currentIndex;\n splitIndex++;\n }\n } else {\n splitIndex = this.currentRow;\n }\n\n return splitIndex;\n };\n\n this.updateRowLine = function (docRow, splitIndex) {\n if (docRow === undefined) docRow = this.getDocumentRow();\n var isLastRow = docRow === this.session.getLength() - 1,\n endOfLine = isLastRow ? this.EOF : this.EOL;\n this.wrapIndent = 0;\n this.line = this.session.getLine(docRow);\n this.isRtlDir = this.$isRtl || this.line.charAt(0) === this.RLE;\n\n if (this.session.$useWrapMode) {\n var splits = this.session.$wrapData[docRow];\n\n if (splits) {\n if (splitIndex === undefined) splitIndex = this.getSplitIndex();\n\n if (splitIndex > 0 && splits.length) {\n this.wrapIndent = splits.indent;\n this.wrapOffset = this.wrapIndent * this.charWidths[bidiUtil.L];\n this.line = splitIndex < splits.length ? this.line.substring(splits[splitIndex - 1], splits[splitIndex]) : this.line.substring(splits[splits.length - 1]);\n } else {\n this.line = this.line.substring(0, splits[splitIndex]);\n }\n }\n\n if (splitIndex == splits.length) this.line += this.showInvisibles ? endOfLine : bidiUtil.DOT;\n } else {\n this.line += this.showInvisibles ? endOfLine : bidiUtil.DOT;\n }\n\n var session = this.session,\n shift = 0,\n size;\n this.line = this.line.replace(/\\t|[\\u1100-\\u2029, \\u202F-\\uFFE6]/g, function (ch, i) {\n if (ch === '\\t' || session.isFullWidth(ch.charCodeAt(0))) {\n size = ch === '\\t' ? session.getScreenTabSize(i + shift) : 2;\n shift += size - 1;\n return lang.stringRepeat(bidiUtil.DOT, size);\n }\n\n return ch;\n });\n\n if (this.isRtlDir) {\n this.fontMetrics.$main.textContent = this.line.charAt(this.line.length - 1) == bidiUtil.DOT ? this.line.substr(0, this.line.length - 1) : this.line;\n this.rtlLineOffset = this.contentWidth - this.fontMetrics.$main.getBoundingClientRect().width;\n }\n };\n\n this.updateBidiMap = function () {\n var textCharTypes = [];\n\n if (bidiUtil.hasBidiCharacters(this.line, textCharTypes) || this.isRtlDir) {\n this.bidiMap = bidiUtil.doBidiReorder(this.line, textCharTypes, this.isRtlDir);\n } else {\n this.bidiMap = {};\n }\n };\n\n this.markAsDirty = function () {\n this.currentRow = null;\n };\n\n this.updateCharacterWidths = function (fontMetrics) {\n if (this.characterWidth === fontMetrics.$characterSize.width) return;\n this.fontMetrics = fontMetrics;\n var characterWidth = this.characterWidth = fontMetrics.$characterSize.width;\n var bidiCharWidth = fontMetrics.$measureCharWidth(\"\\u05D4\");\n this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth;\n this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth;\n this.charWidths[bidiUtil.R_H] = bidiCharWidth * 0.45;\n this.charWidths[bidiUtil.B] = this.charWidths[bidiUtil.RLE] = 0;\n this.currentRow = null;\n };\n\n this.setShowInvisibles = function (showInvisibles) {\n this.showInvisibles = showInvisibles;\n this.currentRow = null;\n };\n\n this.setEolChar = function (eolChar) {\n this.EOL = eolChar;\n };\n\n this.setContentWidth = function (width) {\n this.contentWidth = width;\n };\n\n this.isRtlLine = function (row) {\n if (this.$isRtl) return true;\n if (row != undefined) return this.session.getLine(row).charAt(0) == this.RLE;else return this.isRtlDir;\n };\n\n this.setRtlDirection = function (editor, isRtlDir) {\n var cursor = editor.getCursorPosition();\n\n for (var row = editor.selection.getSelectionAnchor().row; row <= cursor.row; row++) {\n if (!isRtlDir && editor.session.getLine(row).charAt(0) === editor.session.$bidiHandler.RLE) editor.session.doc.removeInLine(row, 0, 1);else if (isRtlDir && editor.session.getLine(row).charAt(0) !== editor.session.$bidiHandler.RLE) editor.session.doc.insert({\n column: 0,\n row: row\n }, editor.session.$bidiHandler.RLE);\n }\n };\n\n this.getPosLeft = function (col) {\n col -= this.wrapIndent;\n var leftBoundary = this.line.charAt(0) === this.RLE ? 1 : 0;\n var logicalIdx = col > leftBoundary ? this.session.getOverwrite() ? col : col - 1 : leftBoundary;\n var visualIdx = bidiUtil.getVisualFromLogicalIdx(logicalIdx, this.bidiMap),\n levels = this.bidiMap.bidiLevels,\n left = 0;\n if (!this.session.getOverwrite() && col <= leftBoundary && levels[visualIdx] % 2 !== 0) visualIdx++;\n\n for (var i = 0; i < visualIdx; i++) {\n left += this.charWidths[levels[i]];\n }\n\n if (!this.session.getOverwrite() && col > leftBoundary && levels[visualIdx] % 2 === 0) left += this.charWidths[levels[visualIdx]];\n if (this.wrapIndent) left += this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset;\n if (this.isRtlDir) left += this.rtlLineOffset;\n return left;\n };\n\n this.getSelections = function (startCol, endCol) {\n var map = this.bidiMap,\n levels = map.bidiLevels,\n level,\n selections = [],\n offset = 0,\n selColMin = Math.min(startCol, endCol) - this.wrapIndent,\n selColMax = Math.max(startCol, endCol) - this.wrapIndent,\n isSelected = false,\n isSelectedPrev = false,\n selectionStart = 0;\n if (this.wrapIndent) offset += this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset;\n\n for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) {\n logIdx = map.logicalFromVisual[visIdx];\n level = levels[visIdx];\n isSelected = logIdx >= selColMin && logIdx < selColMax;\n\n if (isSelected && !isSelectedPrev) {\n selectionStart = offset;\n } else if (!isSelected && isSelectedPrev) {\n selections.push({\n left: selectionStart,\n width: offset - selectionStart\n });\n }\n\n offset += this.charWidths[level];\n isSelectedPrev = isSelected;\n }\n\n if (isSelected && visIdx === levels.length) {\n selections.push({\n left: selectionStart,\n width: offset - selectionStart\n });\n }\n\n if (this.isRtlDir) {\n for (var i = 0; i < selections.length; i++) {\n selections[i].left += this.rtlLineOffset;\n }\n }\n\n return selections;\n };\n\n this.offsetToCol = function (posX) {\n if (this.isRtlDir) posX -= this.rtlLineOffset;\n var logicalIdx = 0,\n posX = Math.max(posX, 0),\n offset = 0,\n visualIdx = 0,\n levels = this.bidiMap.bidiLevels,\n charWidth = this.charWidths[levels[visualIdx]];\n if (this.wrapIndent) posX -= this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset;\n\n while (posX > offset + charWidth / 2) {\n offset += charWidth;\n\n if (visualIdx === levels.length - 1) {\n charWidth = 0;\n break;\n }\n\n charWidth = this.charWidths[levels[++visualIdx]];\n }\n\n if (visualIdx > 0 && levels[visualIdx - 1] % 2 !== 0 && levels[visualIdx] % 2 === 0) {\n if (posX < offset) visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n } else if (visualIdx > 0 && levels[visualIdx - 1] % 2 === 0 && levels[visualIdx] % 2 !== 0) {\n logicalIdx = 1 + (posX > offset ? this.bidiMap.logicalFromVisual[visualIdx] : this.bidiMap.logicalFromVisual[visualIdx - 1]);\n } else if (this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && levels[visualIdx - 1] % 2 === 0 || !this.isRtlDir && visualIdx === 0 && levels[visualIdx] % 2 !== 0) {\n logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx];\n } else {\n if (visualIdx > 0 && levels[visualIdx - 1] % 2 !== 0 && charWidth !== 0) visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n }\n\n if (logicalIdx === 0 && this.isRtlDir) logicalIdx++;\n return logicalIdx + this.wrapIndent;\n };\n }).call(BidiHandler.prototype);\n exports.BidiHandler = BidiHandler;\n});\nace.define(\"ace/selection\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/lang\", \"ace/lib/event_emitter\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var lang = require(\"./lib/lang\");\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var Range = require(\"./range\").Range;\n\n var Selection = function Selection(session) {\n this.session = session;\n this.doc = session.getDocument();\n this.clearSelection();\n this.cursor = this.lead = this.doc.createAnchor(0, 0);\n this.anchor = this.doc.createAnchor(0, 0);\n this.$silent = false;\n var self = this;\n this.cursor.on(\"change\", function (e) {\n self.$cursorChanged = true;\n if (!self.$silent) self._emit(\"changeCursor\");\n if (!self.$isEmpty && !self.$silent) self._emit(\"changeSelection\");\n if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) self.$desiredColumn = null;\n });\n this.anchor.on(\"change\", function () {\n self.$anchorChanged = true;\n if (!self.$isEmpty && !self.$silent) self._emit(\"changeSelection\");\n });\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.isEmpty = function () {\n return this.$isEmpty || this.anchor.row == this.lead.row && this.anchor.column == this.lead.column;\n };\n\n this.isMultiLine = function () {\n return !this.$isEmpty && this.anchor.row != this.cursor.row;\n };\n\n this.getCursor = function () {\n return this.lead.getPosition();\n };\n\n this.setSelectionAnchor = function (row, column) {\n this.$isEmpty = false;\n this.anchor.setPosition(row, column);\n };\n\n this.getAnchor = this.getSelectionAnchor = function () {\n if (this.$isEmpty) return this.getSelectionLead();\n return this.anchor.getPosition();\n };\n\n this.getSelectionLead = function () {\n return this.lead.getPosition();\n };\n\n this.isBackwards = function () {\n var anchor = this.anchor;\n var lead = this.lead;\n return anchor.row > lead.row || anchor.row == lead.row && anchor.column > lead.column;\n };\n\n this.getRange = function () {\n var anchor = this.anchor;\n var lead = this.lead;\n if (this.$isEmpty) return Range.fromPoints(lead, lead);\n return this.isBackwards() ? Range.fromPoints(lead, anchor) : Range.fromPoints(anchor, lead);\n };\n\n this.clearSelection = function () {\n if (!this.$isEmpty) {\n this.$isEmpty = true;\n\n this._emit(\"changeSelection\");\n }\n };\n\n this.selectAll = function () {\n this.$setSelection(0, 0, Number.MAX_VALUE, Number.MAX_VALUE);\n };\n\n this.setRange = this.setSelectionRange = function (range, reverse) {\n var start = reverse ? range.end : range.start;\n var end = reverse ? range.start : range.end;\n this.$setSelection(start.row, start.column, end.row, end.column);\n };\n\n this.$setSelection = function (anchorRow, anchorColumn, cursorRow, cursorColumn) {\n var wasEmpty = this.$isEmpty;\n var wasMultiselect = this.inMultiSelectMode;\n this.$silent = true;\n this.$cursorChanged = this.$anchorChanged = false;\n this.anchor.setPosition(anchorRow, anchorColumn);\n this.cursor.setPosition(cursorRow, cursorColumn);\n this.$isEmpty = !Range.comparePoints(this.anchor, this.cursor);\n this.$silent = false;\n if (this.$cursorChanged) this._emit(\"changeCursor\");\n if (this.$cursorChanged || this.$anchorChanged || wasEmpty != this.$isEmpty || wasMultiselect) this._emit(\"changeSelection\");\n };\n\n this.$moveSelection = function (mover) {\n var lead = this.lead;\n if (this.$isEmpty) this.setSelectionAnchor(lead.row, lead.column);\n mover.call(this);\n };\n\n this.selectTo = function (row, column) {\n this.$moveSelection(function () {\n this.moveCursorTo(row, column);\n });\n };\n\n this.selectToPosition = function (pos) {\n this.$moveSelection(function () {\n this.moveCursorToPosition(pos);\n });\n };\n\n this.moveTo = function (row, column) {\n this.clearSelection();\n this.moveCursorTo(row, column);\n };\n\n this.moveToPosition = function (pos) {\n this.clearSelection();\n this.moveCursorToPosition(pos);\n };\n\n this.selectUp = function () {\n this.$moveSelection(this.moveCursorUp);\n };\n\n this.selectDown = function () {\n this.$moveSelection(this.moveCursorDown);\n };\n\n this.selectRight = function () {\n this.$moveSelection(this.moveCursorRight);\n };\n\n this.selectLeft = function () {\n this.$moveSelection(this.moveCursorLeft);\n };\n\n this.selectLineStart = function () {\n this.$moveSelection(this.moveCursorLineStart);\n };\n\n this.selectLineEnd = function () {\n this.$moveSelection(this.moveCursorLineEnd);\n };\n\n this.selectFileEnd = function () {\n this.$moveSelection(this.moveCursorFileEnd);\n };\n\n this.selectFileStart = function () {\n this.$moveSelection(this.moveCursorFileStart);\n };\n\n this.selectWordRight = function () {\n this.$moveSelection(this.moveCursorWordRight);\n };\n\n this.selectWordLeft = function () {\n this.$moveSelection(this.moveCursorWordLeft);\n };\n\n this.getWordRange = function (row, column) {\n if (typeof column == \"undefined\") {\n var cursor = row || this.lead;\n row = cursor.row;\n column = cursor.column;\n }\n\n return this.session.getWordRange(row, column);\n };\n\n this.selectWord = function () {\n this.setSelectionRange(this.getWordRange());\n };\n\n this.selectAWord = function () {\n var cursor = this.getCursor();\n var range = this.session.getAWordRange(cursor.row, cursor.column);\n this.setSelectionRange(range);\n };\n\n this.getLineRange = function (row, excludeLastChar) {\n var rowStart = typeof row == \"number\" ? row : this.lead.row;\n var rowEnd;\n var foldLine = this.session.getFoldLine(rowStart);\n\n if (foldLine) {\n rowStart = foldLine.start.row;\n rowEnd = foldLine.end.row;\n } else {\n rowEnd = rowStart;\n }\n\n if (excludeLastChar === true) return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);else return new Range(rowStart, 0, rowEnd + 1, 0);\n };\n\n this.selectLine = function () {\n this.setSelectionRange(this.getLineRange());\n };\n\n this.moveCursorUp = function () {\n this.moveCursorBy(-1, 0);\n };\n\n this.moveCursorDown = function () {\n this.moveCursorBy(1, 0);\n };\n\n this.wouldMoveIntoSoftTab = function (cursor, tabSize, direction) {\n var start = cursor.column;\n var end = cursor.column + tabSize;\n\n if (direction < 0) {\n start = cursor.column - tabSize;\n end = cursor.column;\n }\n\n return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(\" \").length - 1 == tabSize;\n };\n\n this.moveCursorLeft = function () {\n var cursor = this.lead.getPosition(),\n fold;\n\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n } else if (cursor.column === 0) {\n if (cursor.row > 0) {\n this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);\n }\n } else {\n var tabSize = this.session.getTabSize();\n\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, -1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, -tabSize);\n } else {\n this.moveCursorBy(0, -1);\n }\n }\n };\n\n this.moveCursorRight = function () {\n var cursor = this.lead.getPosition(),\n fold;\n\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n } else if (this.lead.column == this.doc.getLine(this.lead.row).length) {\n if (this.lead.row < this.doc.getLength() - 1) {\n this.moveCursorTo(this.lead.row + 1, 0);\n }\n } else {\n var tabSize = this.session.getTabSize();\n var cursor = this.lead;\n\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, 1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, tabSize);\n } else {\n this.moveCursorBy(0, 1);\n }\n }\n };\n\n this.moveCursorLineStart = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var screenRow = this.session.documentToScreenRow(row, column);\n var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);\n var beforeCursor = this.session.getDisplayLine(row, null, firstColumnPosition.row, firstColumnPosition.column);\n var leadingSpace = beforeCursor.match(/^\\s*/);\n if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart) firstColumnPosition.column += leadingSpace[0].length;\n this.moveCursorToPosition(firstColumnPosition);\n };\n\n this.moveCursorLineEnd = function () {\n var lead = this.lead;\n var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);\n\n if (this.lead.column == lineEnd.column) {\n var line = this.session.getLine(lineEnd.row);\n\n if (lineEnd.column == line.length) {\n var textEnd = line.search(/\\s+$/);\n if (textEnd > 0) lineEnd.column = textEnd;\n }\n }\n\n this.moveCursorTo(lineEnd.row, lineEnd.column);\n };\n\n this.moveCursorFileEnd = function () {\n var row = this.doc.getLength() - 1;\n var column = this.doc.getLine(row).length;\n this.moveCursorTo(row, column);\n };\n\n this.moveCursorFileStart = function () {\n this.moveCursorTo(0, 0);\n };\n\n this.moveCursorLongWordRight = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n var fold = this.session.getFoldAt(row, column, 1);\n\n if (fold) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n return;\n }\n\n if (this.session.nonTokenRe.exec(rightOfCursor)) {\n column += this.session.nonTokenRe.lastIndex;\n this.session.nonTokenRe.lastIndex = 0;\n rightOfCursor = line.substring(column);\n }\n\n if (column >= line.length) {\n this.moveCursorTo(row, line.length);\n this.moveCursorRight();\n if (row < this.doc.getLength() - 1) this.moveCursorWordRight();\n return;\n }\n\n if (this.session.tokenRe.exec(rightOfCursor)) {\n column += this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n\n this.moveCursorLongWordLeft = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n\n if (fold = this.session.getFoldAt(row, column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n return;\n }\n\n var str = this.session.getFoldStringAt(row, column, -1);\n\n if (str == null) {\n str = this.doc.getLine(row).substring(0, column);\n }\n\n var leftOfCursor = lang.stringReverse(str);\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n\n if (this.session.nonTokenRe.exec(leftOfCursor)) {\n column -= this.session.nonTokenRe.lastIndex;\n leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);\n this.session.nonTokenRe.lastIndex = 0;\n }\n\n if (column <= 0) {\n this.moveCursorTo(row, 0);\n this.moveCursorLeft();\n if (row > 0) this.moveCursorWordLeft();\n return;\n }\n\n if (this.session.tokenRe.exec(leftOfCursor)) {\n column -= this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n\n this.$shortWordEndIndex = function (rightOfCursor) {\n var index = 0,\n ch;\n var whitespaceRe = /\\s/;\n var tokenRe = this.session.tokenRe;\n tokenRe.lastIndex = 0;\n\n if (this.session.tokenRe.exec(rightOfCursor)) {\n index = this.session.tokenRe.lastIndex;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) {\n index++;\n }\n\n if (index < 1) {\n tokenRe.lastIndex = 0;\n\n while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {\n tokenRe.lastIndex = 0;\n index++;\n\n if (whitespaceRe.test(ch)) {\n if (index > 2) {\n index--;\n break;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) {\n index++;\n }\n\n if (index > 2) break;\n }\n }\n }\n }\n }\n\n tokenRe.lastIndex = 0;\n return index;\n };\n\n this.moveCursorShortWordRight = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) return this.moveCursorTo(fold.end.row, fold.end.column);\n\n if (column == line.length) {\n var l = this.doc.getLength();\n\n do {\n row++;\n rightOfCursor = this.doc.getLine(row);\n } while (row < l && /^\\s*$/.test(rightOfCursor));\n\n if (!/^\\s+/.test(rightOfCursor)) rightOfCursor = \"\";\n column = 0;\n }\n\n var index = this.$shortWordEndIndex(rightOfCursor);\n this.moveCursorTo(row, column + index);\n };\n\n this.moveCursorShortWordLeft = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1)) return this.moveCursorTo(fold.start.row, fold.start.column);\n var line = this.session.getLine(row).substring(0, column);\n\n if (column === 0) {\n do {\n row--;\n line = this.doc.getLine(row);\n } while (row > 0 && /^\\s*$/.test(line));\n\n column = line.length;\n if (!/\\s+$/.test(line)) line = \"\";\n }\n\n var leftOfCursor = lang.stringReverse(line);\n var index = this.$shortWordEndIndex(leftOfCursor);\n return this.moveCursorTo(row, column - index);\n };\n\n this.moveCursorWordRight = function () {\n if (this.session.$selectLongWords) this.moveCursorLongWordRight();else this.moveCursorShortWordRight();\n };\n\n this.moveCursorWordLeft = function () {\n if (this.session.$selectLongWords) this.moveCursorLongWordLeft();else this.moveCursorShortWordLeft();\n };\n\n this.moveCursorBy = function (rows, chars) {\n var screenPos = this.session.documentToScreenPosition(this.lead.row, this.lead.column);\n var offsetX;\n\n if (chars === 0) {\n if (rows !== 0) {\n if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) {\n offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column);\n screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]);\n } else {\n offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0];\n }\n }\n\n if (this.$desiredColumn) screenPos.column = this.$desiredColumn;else this.$desiredColumn = screenPos.column;\n }\n\n var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX);\n\n if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {\n if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) {\n if (docPos.row > 0 || rows > 0) docPos.row++;\n }\n }\n\n this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);\n };\n\n this.moveCursorToPosition = function (position) {\n this.moveCursorTo(position.row, position.column);\n };\n\n this.moveCursorTo = function (row, column, keepDesiredColumn) {\n var fold = this.session.getFoldAt(row, column, 1);\n\n if (fold) {\n row = fold.start.row;\n column = fold.start.column;\n }\n\n this.$keepDesiredColumnOnChange = true;\n var line = this.session.getLine(row);\n\n if (/[\\uDC00-\\uDFFF]/.test(line.charAt(column)) && line.charAt(column - 1)) {\n if (this.lead.row == row && this.lead.column == column + 1) column = column - 1;else column = column + 1;\n }\n\n this.lead.setPosition(row, column);\n this.$keepDesiredColumnOnChange = false;\n if (!keepDesiredColumn) this.$desiredColumn = null;\n };\n\n this.moveCursorToScreen = function (row, column, keepDesiredColumn) {\n var pos = this.session.screenToDocumentPosition(row, column);\n this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);\n };\n\n this.detach = function () {\n this.lead.detach();\n this.anchor.detach();\n this.session = this.doc = null;\n };\n\n this.fromOrientedRange = function (range) {\n this.setSelectionRange(range, range.cursor == range.start);\n this.$desiredColumn = range.desiredColumn || this.$desiredColumn;\n };\n\n this.toOrientedRange = function (range) {\n var r = this.getRange();\n\n if (range) {\n range.start.column = r.start.column;\n range.start.row = r.start.row;\n range.end.column = r.end.column;\n range.end.row = r.end.row;\n } else {\n range = r;\n }\n\n range.cursor = this.isBackwards() ? range.start : range.end;\n range.desiredColumn = this.$desiredColumn;\n return range;\n };\n\n this.getRangeOfMovements = function (func) {\n var start = this.getCursor();\n\n try {\n func(this);\n var end = this.getCursor();\n return Range.fromPoints(start, end);\n } catch (e) {\n return Range.fromPoints(start, start);\n } finally {\n this.moveCursorToPosition(start);\n }\n };\n\n this.toJSON = function () {\n if (this.rangeCount) {\n var data = this.ranges.map(function (r) {\n var r1 = r.clone();\n r1.isBackwards = r.cursor == r.start;\n return r1;\n });\n } else {\n var data = this.getRange();\n data.isBackwards = this.isBackwards();\n }\n\n return data;\n };\n\n this.fromJSON = function (data) {\n if (data.start == undefined) {\n if (this.rangeList && data.length > 1) {\n this.toSingleRange(data[0]);\n\n for (var i = data.length; i--;) {\n var r = Range.fromPoints(data[i].start, data[i].end);\n if (data[i].isBackwards) r.cursor = r.start;\n this.addRange(r, true);\n }\n\n return;\n } else {\n data = data[0];\n }\n }\n\n if (this.rangeList) this.toSingleRange(data);\n this.setSelectionRange(data, data.isBackwards);\n };\n\n this.isEqual = function (data) {\n if ((data.length || this.rangeCount) && data.length != this.rangeCount) return false;\n if (!data.length || !this.ranges) return this.getRange().isEqual(data);\n\n for (var i = this.ranges.length; i--;) {\n if (!this.ranges[i].isEqual(data[i])) return false;\n }\n\n return true;\n };\n }).call(Selection.prototype);\n exports.Selection = Selection;\n});\nace.define(\"ace/tokenizer\", [\"require\", \"exports\", \"module\", \"ace/config\"], function (require, exports, module) {\n \"use strict\";\n\n var config = require(\"./config\");\n\n var MAX_TOKEN_COUNT = 2000;\n\n var Tokenizer = function Tokenizer(rules) {\n this.states = rules;\n this.regExps = {};\n this.matchMappings = {};\n\n for (var key in this.states) {\n var state = this.states[key];\n var ruleRegExps = [];\n var matchTotal = 0;\n var mapping = this.matchMappings[key] = {\n defaultToken: \"text\"\n };\n var flag = \"g\";\n var splitterRurles = [];\n\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.defaultToken) mapping.defaultToken = rule.defaultToken;\n if (rule.caseInsensitive) flag = \"gi\";\n if (rule.regex == null) continue;\n if (rule.regex instanceof RegExp) rule.regex = rule.regex.toString().slice(1, -1);\n var adjustedregex = rule.regex;\n var matchcount = new RegExp(\"(?:(\" + adjustedregex + \")|(.))\").exec(\"a\").length - 2;\n\n if (Array.isArray(rule.token)) {\n if (rule.token.length == 1 || matchcount == 1) {\n rule.token = rule.token[0];\n } else if (matchcount - 1 != rule.token.length) {\n this.reportError(\"number of classes and regexp groups doesn't match\", {\n rule: rule,\n groupCount: matchcount - 1\n });\n rule.token = rule.token[0];\n } else {\n rule.tokenArray = rule.token;\n rule.token = null;\n rule.onMatch = this.$arrayTokens;\n }\n } else if (typeof rule.token == \"function\" && !rule.onMatch) {\n if (matchcount > 1) rule.onMatch = this.$applyToken;else rule.onMatch = rule.token;\n }\n\n if (matchcount > 1) {\n if (/\\\\\\d/.test(rule.regex)) {\n adjustedregex = rule.regex.replace(/\\\\([0-9]+)/g, function (match, digit) {\n return \"\\\\\" + (parseInt(digit, 10) + matchTotal + 1);\n });\n } else {\n matchcount = 1;\n adjustedregex = this.removeCapturingGroups(rule.regex);\n }\n\n if (!rule.splitRegex && typeof rule.token != \"string\") splitterRurles.push(rule); // flag will be known only at the very end\n }\n\n mapping[matchTotal] = i;\n matchTotal += matchcount;\n ruleRegExps.push(adjustedregex);\n if (!rule.onMatch) rule.onMatch = null;\n }\n\n if (!ruleRegExps.length) {\n mapping[0] = 0;\n ruleRegExps.push(\"$\");\n }\n\n splitterRurles.forEach(function (rule) {\n rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);\n }, this);\n this.regExps[key] = new RegExp(\"(\" + ruleRegExps.join(\")|(\") + \")|($)\", flag);\n }\n };\n\n (function () {\n this.$setMaxTokenCount = function (m) {\n MAX_TOKEN_COUNT = m | 0;\n };\n\n this.$applyToken = function (str) {\n var values = this.splitRegex.exec(str).slice(1);\n var types = this.token.apply(this, values);\n if (typeof types === \"string\") return [{\n type: types,\n value: str\n }];\n var tokens = [];\n\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i]) tokens[tokens.length] = {\n type: types[i],\n value: values[i]\n };\n }\n\n return tokens;\n };\n\n this.$arrayTokens = function (str) {\n if (!str) return [];\n var values = this.splitRegex.exec(str);\n if (!values) return \"text\";\n var tokens = [];\n var types = this.tokenArray;\n\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i + 1]) tokens[tokens.length] = {\n type: types[i],\n value: values[i + 1]\n };\n }\n\n return tokens;\n };\n\n this.removeCapturingGroups = function (src) {\n var r = src.replace(/\\\\.|\\[(?:\\\\.|[^\\\\\\]])*|\\(\\?[:=!]|(\\()/g, function (x, y) {\n return y ? \"(?:\" : x;\n });\n return r;\n };\n\n this.createSplitterRegexp = function (src, flag) {\n if (src.indexOf(\"(?=\") != -1) {\n var stack = 0;\n var inChClass = false;\n var lastCapture = {};\n src.replace(/(\\\\.)|(\\((?:\\?[=!])?)|(\\))|([\\[\\]])/g, function (m, esc, parenOpen, parenClose, square, index) {\n if (inChClass) {\n inChClass = square != \"]\";\n } else if (square) {\n inChClass = true;\n } else if (parenClose) {\n if (stack == lastCapture.stack) {\n lastCapture.end = index + 1;\n lastCapture.stack = -1;\n }\n\n stack--;\n } else if (parenOpen) {\n stack++;\n\n if (parenOpen.length != 1) {\n lastCapture.stack = stack;\n lastCapture.start = index;\n }\n }\n\n return m;\n });\n if (lastCapture.end != null && /^\\)*$/.test(src.substr(lastCapture.end))) src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);\n }\n\n if (src.charAt(0) != \"^\") src = \"^\" + src;\n if (src.charAt(src.length - 1) != \"$\") src += \"$\";\n return new RegExp(src, (flag || \"\").replace(\"g\", \"\"));\n };\n\n this.getLineTokens = function (line, startState) {\n if (startState && typeof startState != \"string\") {\n var stack = startState.slice(0);\n startState = stack[0];\n\n if (startState === \"#tmp\") {\n stack.shift();\n startState = stack.shift();\n }\n } else var stack = [];\n\n var currentState = startState || \"start\";\n var state = this.states[currentState];\n\n if (!state) {\n currentState = \"start\";\n state = this.states[currentState];\n }\n\n var mapping = this.matchMappings[currentState];\n var re = this.regExps[currentState];\n re.lastIndex = 0;\n var match,\n tokens = [];\n var lastIndex = 0;\n var matchAttempts = 0;\n var token = {\n type: null,\n value: \"\"\n };\n\n while (match = re.exec(line)) {\n var type = mapping.defaultToken;\n var rule = null;\n var value = match[0];\n var index = re.lastIndex;\n\n if (index - value.length > lastIndex) {\n var skipped = line.substring(lastIndex, index - value.length);\n\n if (token.type == type) {\n token.value += skipped;\n } else {\n if (token.type) tokens.push(token);\n token = {\n type: type,\n value: skipped\n };\n }\n }\n\n for (var i = 0; i < match.length - 2; i++) {\n if (match[i + 1] === undefined) continue;\n rule = state[mapping[i]];\n if (rule.onMatch) type = rule.onMatch(value, currentState, stack, line);else type = rule.token;\n\n if (rule.next) {\n if (typeof rule.next == \"string\") {\n currentState = rule.next;\n } else {\n currentState = rule.next(currentState, stack);\n }\n\n state = this.states[currentState];\n\n if (!state) {\n this.reportError(\"state doesn't exist\", currentState);\n currentState = \"start\";\n state = this.states[currentState];\n }\n\n mapping = this.matchMappings[currentState];\n lastIndex = index;\n re = this.regExps[currentState];\n re.lastIndex = index;\n }\n\n if (rule.consumeLineEnd) lastIndex = index;\n break;\n }\n\n if (value) {\n if (typeof type === \"string\") {\n if ((!rule || rule.merge !== false) && token.type === type) {\n token.value += value;\n } else {\n if (token.type) tokens.push(token);\n token = {\n type: type,\n value: value\n };\n }\n } else if (type) {\n if (token.type) tokens.push(token);\n token = {\n type: null,\n value: \"\"\n };\n\n for (var i = 0; i < type.length; i++) {\n tokens.push(type[i]);\n }\n }\n }\n\n if (lastIndex == line.length) break;\n lastIndex = index;\n\n if (matchAttempts++ > MAX_TOKEN_COUNT) {\n if (matchAttempts > 2 * line.length) {\n this.reportError(\"infinite loop with in ace tokenizer\", {\n startState: startState,\n line: line\n });\n }\n\n while (lastIndex < line.length) {\n if (token.type) tokens.push(token);\n token = {\n value: line.substring(lastIndex, lastIndex += 500),\n type: \"overflow\"\n };\n }\n\n currentState = \"start\";\n stack = [];\n break;\n }\n }\n\n if (token.type) tokens.push(token);\n\n if (stack.length > 1) {\n if (stack[0] !== currentState) stack.unshift(\"#tmp\", currentState);\n }\n\n return {\n tokens: tokens,\n state: stack.length ? stack : currentState\n };\n };\n\n this.reportError = config.reportError;\n }).call(Tokenizer.prototype);\n exports.Tokenizer = Tokenizer;\n});\nace.define(\"ace/mode/text_highlight_rules\", [\"require\", \"exports\", \"module\", \"ace/lib/lang\"], function (require, exports, module) {\n \"use strict\";\n\n var lang = require(\"../lib/lang\");\n\n var TextHighlightRules = function TextHighlightRules() {\n this.$rules = {\n \"start\": [{\n token: \"empty_line\",\n regex: '^$'\n }, {\n defaultToken: \"text\"\n }]\n };\n };\n\n (function () {\n this.addRules = function (rules, prefix) {\n if (!prefix) {\n for (var key in rules) {\n this.$rules[key] = rules[key];\n }\n\n return;\n }\n\n for (var key in rules) {\n var state = rules[key];\n\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n\n if (rule.next || rule.onMatch) {\n if (typeof rule.next == \"string\") {\n if (rule.next.indexOf(prefix) !== 0) rule.next = prefix + rule.next;\n }\n\n if (rule.nextState && rule.nextState.indexOf(prefix) !== 0) rule.nextState = prefix + rule.nextState;\n }\n }\n\n this.$rules[prefix + key] = state;\n }\n };\n\n this.getRules = function () {\n return this.$rules;\n };\n\n this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {\n var embedRules = typeof HighlightRules == \"function\" ? new HighlightRules().getRules() : HighlightRules;\n\n if (states) {\n for (var i = 0; i < states.length; i++) {\n states[i] = prefix + states[i];\n }\n } else {\n states = [];\n\n for (var key in embedRules) {\n states.push(prefix + key);\n }\n }\n\n this.addRules(embedRules, prefix);\n\n if (escapeRules) {\n var addRules = Array.prototype[append ? \"push\" : \"unshift\"];\n\n for (var i = 0; i < states.length; i++) {\n addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));\n }\n }\n\n if (!this.$embeds) this.$embeds = [];\n this.$embeds.push(prefix);\n };\n\n this.getEmbeds = function () {\n return this.$embeds;\n };\n\n var pushState = function pushState(currentState, stack) {\n if (currentState != \"start\" || stack.length) stack.unshift(this.nextState, currentState);\n return this.nextState;\n };\n\n var popState = function popState(currentState, stack) {\n stack.shift();\n return stack.shift() || \"start\";\n };\n\n this.normalizeRules = function () {\n var id = 0;\n var rules = this.$rules;\n\n function processState(key) {\n var state = rules[key];\n state.processed = true;\n\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n var toInsert = null;\n\n if (Array.isArray(rule)) {\n toInsert = rule;\n rule = {};\n }\n\n if (!rule.regex && rule.start) {\n rule.regex = rule.start;\n if (!rule.next) rule.next = [];\n rule.next.push({\n defaultToken: rule.token\n }, {\n token: rule.token + \".end\",\n regex: rule.end || rule.start,\n next: \"pop\"\n });\n rule.token = rule.token + \".start\";\n rule.push = true;\n }\n\n var next = rule.next || rule.push;\n\n if (next && Array.isArray(next)) {\n var stateName = rule.stateName;\n\n if (!stateName) {\n stateName = rule.token;\n if (typeof stateName != \"string\") stateName = stateName[0] || \"\";\n if (rules[stateName]) stateName += id++;\n }\n\n rules[stateName] = next;\n rule.next = stateName;\n processState(stateName);\n } else if (next == \"pop\") {\n rule.next = popState;\n }\n\n if (rule.push) {\n rule.nextState = rule.next || rule.push;\n rule.next = pushState;\n delete rule.push;\n }\n\n if (rule.rules) {\n for (var r in rule.rules) {\n if (rules[r]) {\n if (rules[r].push) rules[r].push.apply(rules[r], rule.rules[r]);\n } else {\n rules[r] = rule.rules[r];\n }\n }\n }\n\n var includeName = typeof rule == \"string\" ? rule : rule.include;\n\n if (includeName) {\n if (Array.isArray(includeName)) toInsert = includeName.map(function (x) {\n return rules[x];\n });else toInsert = rules[includeName];\n }\n\n if (toInsert) {\n var args = [i, 1].concat(toInsert);\n if (rule.noEscape) args = args.filter(function (x) {\n return !x.next;\n });\n state.splice.apply(state, args);\n i--;\n }\n\n if (rule.keywordMap) {\n rule.token = this.createKeywordMapper(rule.keywordMap, rule.defaultToken || \"text\", rule.caseInsensitive);\n delete rule.defaultToken;\n }\n }\n }\n\n Object.keys(rules).forEach(processState, this);\n };\n\n this.createKeywordMapper = function (map, defaultToken, ignoreCase, splitChar) {\n var keywords = Object.create(null);\n Object.keys(map).forEach(function (className) {\n var a = map[className];\n if (ignoreCase) a = a.toLowerCase();\n var list = a.split(splitChar || \"|\");\n\n for (var i = list.length; i--;) {\n keywords[list[i]] = className;\n }\n });\n\n if (Object.getPrototypeOf(keywords)) {\n keywords.__proto__ = null;\n }\n\n this.$keywordList = Object.keys(keywords);\n map = null;\n return ignoreCase ? function (value) {\n return keywords[value.toLowerCase()] || defaultToken;\n } : function (value) {\n return keywords[value] || defaultToken;\n };\n };\n\n this.getKeywords = function () {\n return this.$keywords;\n };\n }).call(TextHighlightRules.prototype);\n exports.TextHighlightRules = TextHighlightRules;\n});\nace.define(\"ace/mode/behaviour\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n var Behaviour = function Behaviour() {\n this.$behaviours = {};\n };\n\n (function () {\n this.add = function (name, action, callback) {\n switch (undefined) {\n case this.$behaviours:\n this.$behaviours = {};\n\n case this.$behaviours[name]:\n this.$behaviours[name] = {};\n }\n\n this.$behaviours[name][action] = callback;\n };\n\n this.addBehaviours = function (behaviours) {\n for (var key in behaviours) {\n for (var action in behaviours[key]) {\n this.add(key, action, behaviours[key][action]);\n }\n }\n };\n\n this.remove = function (name) {\n if (this.$behaviours && this.$behaviours[name]) {\n delete this.$behaviours[name];\n }\n };\n\n this.inherit = function (mode, filter) {\n if (typeof mode === \"function\") {\n var behaviours = new mode().getBehaviours(filter);\n } else {\n var behaviours = mode.getBehaviours(filter);\n }\n\n this.addBehaviours(behaviours);\n };\n\n this.getBehaviours = function (filter) {\n if (!filter) {\n return this.$behaviours;\n } else {\n var ret = {};\n\n for (var i = 0; i < filter.length; i++) {\n if (this.$behaviours[filter[i]]) {\n ret[filter[i]] = this.$behaviours[filter[i]];\n }\n }\n\n return ret;\n }\n };\n }).call(Behaviour.prototype);\n exports.Behaviour = Behaviour;\n});\nace.define(\"ace/token_iterator\", [\"require\", \"exports\", \"module\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var Range = require(\"./range\").Range;\n\n var TokenIterator = function TokenIterator(session, initialRow, initialColumn) {\n this.$session = session;\n this.$row = initialRow;\n this.$rowTokens = session.getTokens(initialRow);\n var token = session.getTokenAt(initialRow, initialColumn);\n this.$tokenIndex = token ? token.index : -1;\n };\n\n (function () {\n this.stepBackward = function () {\n this.$tokenIndex -= 1;\n\n while (this.$tokenIndex < 0) {\n this.$row -= 1;\n\n if (this.$row < 0) {\n this.$row = 0;\n return null;\n }\n\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = this.$rowTokens.length - 1;\n }\n\n return this.$rowTokens[this.$tokenIndex];\n };\n\n this.stepForward = function () {\n this.$tokenIndex += 1;\n var rowCount;\n\n while (this.$tokenIndex >= this.$rowTokens.length) {\n this.$row += 1;\n if (!rowCount) rowCount = this.$session.getLength();\n\n if (this.$row >= rowCount) {\n this.$row = rowCount - 1;\n return null;\n }\n\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = 0;\n }\n\n return this.$rowTokens[this.$tokenIndex];\n };\n\n this.getCurrentToken = function () {\n return this.$rowTokens[this.$tokenIndex];\n };\n\n this.getCurrentTokenRow = function () {\n return this.$row;\n };\n\n this.getCurrentTokenColumn = function () {\n var rowTokens = this.$rowTokens;\n var tokenIndex = this.$tokenIndex;\n var column = rowTokens[tokenIndex].start;\n if (column !== undefined) return column;\n column = 0;\n\n while (tokenIndex > 0) {\n tokenIndex -= 1;\n column += rowTokens[tokenIndex].value.length;\n }\n\n return column;\n };\n\n this.getCurrentTokenPosition = function () {\n return {\n row: this.$row,\n column: this.getCurrentTokenColumn()\n };\n };\n\n this.getCurrentTokenRange = function () {\n var token = this.$rowTokens[this.$tokenIndex];\n var column = this.getCurrentTokenColumn();\n return new Range(this.$row, column, this.$row, column + token.value.length);\n };\n }).call(TokenIterator.prototype);\n exports.TokenIterator = TokenIterator;\n});\nace.define(\"ace/mode/behaviour/cstyle\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/mode/behaviour\", \"ace/token_iterator\", \"ace/lib/lang\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"../../lib/oop\");\n\n var Behaviour = require(\"../behaviour\").Behaviour;\n\n var TokenIterator = require(\"../../token_iterator\").TokenIterator;\n\n var lang = require(\"../../lib/lang\");\n\n var SAFE_INSERT_IN_TOKENS = [\"text\", \"paren.rparen\", \"rparen\", \"paren\", \"punctuation.operator\"];\n var SAFE_INSERT_BEFORE_TOKENS = [\"text\", \"paren.rparen\", \"rparen\", \"paren\", \"punctuation.operator\", \"comment\"];\n var context;\n var contextCache = {};\n var defaultQuotes = {\n '\"': '\"',\n \"'\": \"'\"\n };\n\n var initContext = function initContext(editor) {\n var id = -1;\n\n if (editor.multiSelect) {\n id = editor.selection.index;\n if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {\n rangeCount: editor.multiSelect.rangeCount\n };\n }\n\n if (contextCache[id]) return context = contextCache[id];\n context = contextCache[id] = {\n autoInsertedBrackets: 0,\n autoInsertedRow: -1,\n autoInsertedLineEnd: \"\",\n maybeInsertedBrackets: 0,\n maybeInsertedRow: -1,\n maybeInsertedLineStart: \"\",\n maybeInsertedLineEnd: \"\"\n };\n };\n\n var getWrapped = function getWrapped(selection, selected, opening, closing) {\n var rowDiff = selection.end.row - selection.start.row;\n return {\n text: opening + selected + closing,\n selection: [0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1)]\n };\n };\n\n var CstyleBehaviour = function CstyleBehaviour(options) {\n this.add(\"braces\", \"insertion\", function (state, action, editor, session, text) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n\n if (text == '{') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n\n if (selected !== \"\" && selected !== \"{\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '{', '}');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n if (/[\\]\\}\\)]/.test(line[cursor.column]) || editor.inMultiSelectMode || options && options.braces) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"}\");\n return {\n text: '{}',\n selection: [1, 1]\n };\n } else {\n CstyleBehaviour.recordMaybeInsert(editor, session, \"{\");\n return {\n text: '{',\n selection: [1, 1]\n };\n }\n }\n } else if (text == '}') {\n initContext(editor);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n\n if (rightChar == '}') {\n var matching = session.$findOpeningBracket('}', {\n column: cursor.column + 1,\n row: cursor.row\n });\n\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n } else if (text == \"\\n\" || text == \"\\r\\n\") {\n initContext(editor);\n var closing = \"\";\n\n if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {\n closing = lang.stringRepeat(\"}\", context.maybeInsertedBrackets);\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n\n if (rightChar === '}') {\n var openBracePos = session.findMatchingBracket({\n row: cursor.row,\n column: cursor.column + 1\n }, '}');\n if (!openBracePos) return null;\n var next_indent = this.$getIndent(session.getLine(openBracePos.row));\n } else if (closing) {\n var next_indent = this.$getIndent(line);\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n return;\n }\n\n var indent = next_indent + session.getTabString();\n return {\n text: '\\n' + indent + '\\n' + next_indent + closing,\n selection: [1, indent.length, 1, indent.length]\n };\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n });\n this.add(\"braces\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n\n if (!range.isMultiLine() && selected == '{') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n\n if (rightChar == '}') {\n range.end.column++;\n return range;\n } else {\n context.maybeInsertedBrackets--;\n }\n }\n });\n this.add(\"parens\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '(') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '(', ')');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \")\");\n return {\n text: '()',\n selection: [1, 1]\n };\n }\n } else if (text == ')') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n\n if (rightChar == ')') {\n var matching = session.$findOpeningBracket(')', {\n column: cursor.column + 1,\n row: cursor.row\n });\n\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n this.add(\"parens\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n\n if (!range.isMultiLine() && selected == '(') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n\n if (rightChar == ')') {\n range.end.column++;\n return range;\n }\n }\n });\n this.add(\"brackets\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '[') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '[', ']');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"]\");\n return {\n text: '[]',\n selection: [1, 1]\n };\n }\n } else if (text == ']') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n\n if (rightChar == ']') {\n var matching = session.$findOpeningBracket(']', {\n column: cursor.column + 1,\n row: cursor.row\n });\n\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n this.add(\"brackets\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n\n if (!range.isMultiLine() && selected == '[') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n\n if (rightChar == ']') {\n range.end.column++;\n return range;\n }\n }\n });\n this.add(\"string_dquotes\", \"insertion\", function (state, action, editor, session, text) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n\n if (text.length == 1 && quotes[text]) {\n if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1) return;\n initContext(editor);\n var quote = text;\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n\n if (selected !== \"\" && (selected.length != 1 || !quotes[selected]) && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, quote, quote);\n } else if (!selected) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var leftChar = line.substring(cursor.column - 1, cursor.column);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n var token = session.getTokenAt(cursor.row, cursor.column);\n var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);\n if (leftChar == \"\\\\\" && token && /escape/.test(token.type)) return null;\n var stringBefore = token && /string|escape/.test(token.type);\n var stringAfter = !rightToken || /string|escape/.test(rightToken.type);\n var pair;\n\n if (rightChar == quote) {\n pair = stringBefore !== stringAfter;\n if (pair && /string\\.end/.test(rightToken.type)) pair = false;\n } else {\n if (stringBefore && !stringAfter) return null; // wrap string with different quote\n\n if (stringBefore && stringAfter) return null; // do not pair quotes inside strings\n\n var wordRe = session.$mode.tokenRe;\n wordRe.lastIndex = 0;\n var isWordBefore = wordRe.test(leftChar);\n wordRe.lastIndex = 0;\n var isWordAfter = wordRe.test(leftChar);\n if (isWordBefore || isWordAfter) return null; // before or after alphanumeric\n\n if (rightChar && !/[\\s;,.})\\]\\\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing\n\n var charBefore = line[cursor.column - 2];\n if (leftChar == quote && (charBefore == quote || wordRe.test(charBefore))) return null;\n pair = true;\n }\n\n return {\n text: pair ? quote + quote : \"\",\n selection: [1, 1]\n };\n }\n }\n });\n this.add(\"string_dquotes\", \"deletion\", function (state, action, editor, session, range) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n var selected = session.doc.getTextRange(range);\n\n if (!range.isMultiLine() && quotes.hasOwnProperty(selected)) {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n };\n\n CstyleBehaviour.isSaneInsertion = function (editor, session) {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n\n if (!this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS)) {\n if (/[)}\\]]/.test(editor.session.getLine(cursor.row)[cursor.column])) return true;\n var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);\n if (!this.$matchTokenType(iterator2.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS)) return false;\n }\n\n iterator.stepForward();\n return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_BEFORE_TOKENS);\n };\n\n CstyleBehaviour.$matchTokenType = function (token, types) {\n return types.indexOf(token.type || token) > -1;\n };\n\n CstyleBehaviour.recordAutoInsert = function (editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0;\n context.autoInsertedRow = cursor.row;\n context.autoInsertedLineEnd = bracket + line.substr(cursor.column);\n context.autoInsertedBrackets++;\n };\n\n CstyleBehaviour.recordMaybeInsert = function (editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = cursor.row;\n context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;\n context.maybeInsertedLineEnd = line.substr(cursor.column);\n context.maybeInsertedBrackets++;\n };\n\n CstyleBehaviour.isAutoInsertedClosing = function (cursor, line, bracket) {\n return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd;\n };\n\n CstyleBehaviour.isMaybeInsertedClosing = function (cursor, line) {\n return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart;\n };\n\n CstyleBehaviour.popAutoInsertedClosing = function () {\n context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);\n context.autoInsertedBrackets--;\n };\n\n CstyleBehaviour.clearMaybeInsertedClosing = function () {\n if (context) {\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = -1;\n }\n };\n\n oop.inherits(CstyleBehaviour, Behaviour);\n exports.CstyleBehaviour = CstyleBehaviour;\n});\nace.define(\"ace/unicode\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n var wordChars = [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];\n var code = 0;\n var str = [];\n\n for (var i = 0; i < wordChars.length; i += 2) {\n str.push(code += wordChars[i]);\n if (wordChars[i + 1]) str.push(45, code += wordChars[i + 1]);\n }\n\n exports.wordChars = String.fromCharCode.apply(null, str);\n});\nace.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 (require, exports, module) {\n \"use strict\";\n\n var config = require(\"../config\");\n\n var Tokenizer = require(\"../tokenizer\").Tokenizer;\n\n var TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\n\n var CstyleBehaviour = require(\"./behaviour/cstyle\").CstyleBehaviour;\n\n var unicode = require(\"../unicode\");\n\n var lang = require(\"../lib/lang\");\n\n var TokenIterator = require(\"../token_iterator\").TokenIterator;\n\n var Range = require(\"../range\").Range;\n\n var Mode = function Mode() {\n this.HighlightRules = TextHighlightRules;\n };\n\n (function () {\n this.$defaultBehaviour = new CstyleBehaviour();\n this.tokenRe = new RegExp(\"^[\" + unicode.wordChars + \"\\\\$_]+\", \"g\");\n this.nonTokenRe = new RegExp(\"^(?:[^\" + unicode.wordChars + \"\\\\$_]|\\\\s])+\", \"g\");\n\n this.getTokenizer = function () {\n if (!this.$tokenizer) {\n this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig);\n this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());\n }\n\n return this.$tokenizer;\n };\n\n this.lineCommentStart = \"\";\n this.blockComment = \"\";\n\n this.toggleCommentLines = function (state, session, startRow, endRow) {\n var doc = session.doc;\n var ignoreBlankLines = true;\n var shouldRemove = true;\n var minIndent = Infinity;\n var tabSize = session.getTabSize();\n var insertAtTabStop = false;\n\n if (!this.lineCommentStart) {\n if (!this.blockComment) return false;\n var lineCommentStart = this.blockComment.start;\n var lineCommentEnd = this.blockComment.end;\n var regexpStart = new RegExp(\"^(\\\\s*)(?:\" + lang.escapeRegExp(lineCommentStart) + \")\");\n var regexpEnd = new RegExp(\"(?:\" + lang.escapeRegExp(lineCommentEnd) + \")\\\\s*$\");\n\n var comment = function comment(line, i) {\n if (testRemove(line, i)) return;\n\n if (!ignoreBlankLines || /\\S/.test(line)) {\n doc.insertInLine({\n row: i,\n column: line.length\n }, lineCommentEnd);\n doc.insertInLine({\n row: i,\n column: minIndent\n }, lineCommentStart);\n }\n };\n\n var uncomment = function uncomment(line, i) {\n var m;\n if (m = line.match(regexpEnd)) doc.removeInLine(i, line.length - m[0].length, line.length);\n if (m = line.match(regexpStart)) doc.removeInLine(i, m[1].length, m[0].length);\n };\n\n var testRemove = function testRemove(line, row) {\n if (regexpStart.test(line)) return true;\n var tokens = session.getTokens(row);\n\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].type === \"comment\") return true;\n }\n };\n } else {\n if (Array.isArray(this.lineCommentStart)) {\n var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join(\"|\");\n var lineCommentStart = this.lineCommentStart[0];\n } else {\n var regexpStart = lang.escapeRegExp(this.lineCommentStart);\n var lineCommentStart = this.lineCommentStart;\n }\n\n regexpStart = new RegExp(\"^(\\\\s*)(?:\" + regexpStart + \") ?\");\n insertAtTabStop = session.getUseSoftTabs();\n\n var uncomment = function uncomment(line, i) {\n var m = line.match(regexpStart);\n if (!m) return;\n var start = m[1].length,\n end = m[0].length;\n if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == \" \") end--;\n doc.removeInLine(i, start, end);\n };\n\n var commentWithSpace = lineCommentStart + \" \";\n\n var comment = function comment(line, i) {\n if (!ignoreBlankLines || /\\S/.test(line)) {\n if (shouldInsertSpace(line, minIndent, minIndent)) doc.insertInLine({\n row: i,\n column: minIndent\n }, commentWithSpace);else doc.insertInLine({\n row: i,\n column: minIndent\n }, lineCommentStart);\n }\n };\n\n var testRemove = function testRemove(line, i) {\n return regexpStart.test(line);\n };\n\n var shouldInsertSpace = function shouldInsertSpace(line, before, after) {\n var spaces = 0;\n\n while (before-- && line.charAt(before) == \" \") {\n spaces++;\n }\n\n if (spaces % tabSize != 0) return false;\n var spaces = 0;\n\n while (line.charAt(after++) == \" \") {\n spaces++;\n }\n\n if (tabSize > 2) return spaces % tabSize != tabSize - 1;else return spaces % tabSize == 0;\n };\n }\n\n function iter(fun) {\n for (var i = startRow; i <= endRow; i++) {\n fun(doc.getLine(i), i);\n }\n }\n\n var minEmptyLength = Infinity;\n iter(function (line, i) {\n var indent = line.search(/\\S/);\n\n if (indent !== -1) {\n if (indent < minIndent) minIndent = indent;\n if (shouldRemove && !testRemove(line, i)) shouldRemove = false;\n } else if (minEmptyLength > line.length) {\n minEmptyLength = line.length;\n }\n });\n\n if (minIndent == Infinity) {\n minIndent = minEmptyLength;\n ignoreBlankLines = false;\n shouldRemove = false;\n }\n\n if (insertAtTabStop && minIndent % tabSize != 0) minIndent = Math.floor(minIndent / tabSize) * tabSize;\n iter(shouldRemove ? uncomment : comment);\n };\n\n this.toggleBlockComment = function (state, session, range, cursor) {\n var comment = this.blockComment;\n if (!comment) return;\n if (!comment.start && comment[0]) comment = comment[0];\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n var sel = session.selection;\n var initialRange = session.selection.toOrientedRange();\n var startRow, colDiff;\n\n if (token && /comment/.test(token.type)) {\n var startRange, endRange;\n\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.start);\n\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n startRange = new Range(row, column, row, column + comment.start.length);\n break;\n }\n\n token = iterator.stepBackward();\n }\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.end);\n\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n endRange = new Range(row, column, row, column + comment.end.length);\n break;\n }\n\n token = iterator.stepForward();\n }\n\n if (endRange) session.remove(endRange);\n\n if (startRange) {\n session.remove(startRange);\n startRow = startRange.start.row;\n colDiff = -comment.start.length;\n }\n } else {\n colDiff = comment.start.length;\n startRow = range.start.row;\n session.insert(range.end, comment.end);\n session.insert(range.start, comment.start);\n }\n\n if (initialRange.start.row == startRow) initialRange.start.column += colDiff;\n if (initialRange.end.row == startRow) initialRange.end.column += colDiff;\n session.selection.fromOrientedRange(initialRange);\n };\n\n this.getNextLineIndent = function (state, line, tab) {\n return this.$getIndent(line);\n };\n\n this.checkOutdent = function (state, line, input) {\n return false;\n };\n\n this.autoOutdent = function (state, doc, row) {};\n\n this.$getIndent = function (line) {\n return line.match(/^\\s*/)[0];\n };\n\n this.createWorker = function (session) {\n return null;\n };\n\n this.createModeDelegates = function (mapping) {\n this.$embeds = [];\n this.$modes = {};\n\n for (var i in mapping) {\n if (mapping[i]) {\n var Mode = mapping[i];\n var id = Mode.prototype.$id;\n var mode = config.$modes[id];\n if (!mode) config.$modes[id] = mode = new Mode();\n if (!config.$modes[i]) config.$modes[i] = mode;\n this.$embeds.push(i);\n this.$modes[i] = mode;\n }\n }\n\n var delegations = [\"toggleBlockComment\", \"toggleCommentLines\", \"getNextLineIndent\", \"checkOutdent\", \"autoOutdent\", \"transformAction\", \"getCompletions\"];\n\n for (var i = 0; i < delegations.length; i++) {\n (function (scope) {\n var functionName = delegations[i];\n var defaultHandler = scope[functionName];\n\n scope[delegations[i]] = function () {\n return this.$delegator(functionName, arguments, defaultHandler);\n };\n })(this);\n }\n };\n\n this.$delegator = function (method, args, defaultHandler) {\n var state = args[0] || \"start\";\n\n if (typeof state != \"string\") {\n if (Array.isArray(state[2])) {\n var language = state[2][state[2].length - 1];\n var mode = this.$modes[language];\n if (mode) return mode[method].apply(mode, [state[1]].concat([].slice.call(args, 1)));\n }\n\n state = state[0] || \"start\";\n }\n\n for (var i = 0; i < this.$embeds.length; i++) {\n if (!this.$modes[this.$embeds[i]]) continue;\n var split = state.split(this.$embeds[i]);\n\n if (!split[0] && split[1]) {\n args[0] = split[1];\n var mode = this.$modes[this.$embeds[i]];\n return mode[method].apply(mode, args);\n }\n }\n\n var ret = defaultHandler.apply(this, args);\n return defaultHandler ? ret : undefined;\n };\n\n this.transformAction = function (state, action, editor, session, param) {\n if (this.$behaviour) {\n var behaviours = this.$behaviour.getBehaviours();\n\n for (var key in behaviours) {\n if (behaviours[key][action]) {\n var ret = behaviours[key][action].apply(this, arguments);\n\n if (ret) {\n return ret;\n }\n }\n }\n }\n };\n\n this.getKeywords = function (append) {\n if (!this.completionKeywords) {\n var rules = this.$tokenizer.rules;\n var completionKeywords = [];\n\n for (var rule in rules) {\n var ruleItr = rules[rule];\n\n for (var r = 0, l = ruleItr.length; r < l; r++) {\n if (typeof ruleItr[r].token === \"string\") {\n if (/keyword|support|storage/.test(ruleItr[r].token)) completionKeywords.push(ruleItr[r].regex);\n } else if (typeof ruleItr[r].token === \"object\") {\n for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) {\n if (/keyword|support|storage/.test(ruleItr[r].token[a])) {\n var rule = ruleItr[r].regex.match(/\\(.+?\\)/g)[a];\n completionKeywords.push(rule.substr(1, rule.length - 2));\n }\n }\n }\n }\n }\n\n this.completionKeywords = completionKeywords;\n }\n\n if (!append) return this.$keywordList;\n return completionKeywords.concat(this.$keywordList || []);\n };\n\n this.$createKeywordList = function () {\n if (!this.$highlightRules) this.getTokenizer();\n return this.$keywordList = this.$highlightRules.$keywordList || [];\n };\n\n this.getCompletions = function (state, session, pos, prefix) {\n var keywords = this.$keywordList || this.$createKeywordList();\n return keywords.map(function (word) {\n return {\n name: word,\n value: word,\n score: 0,\n meta: \"keyword\"\n };\n });\n };\n\n this.$id = \"ace/mode/text\";\n }).call(Mode.prototype);\n exports.Mode = Mode;\n});\nace.define(\"ace/apply_delta\", [\"require\", \"exports\", \"module\"], function (require, exports, module) {\n \"use strict\";\n\n function throwDeltaError(delta, errorText) {\n console.log(\"Invalid Delta:\", delta);\n throw \"Invalid Delta: \" + errorText;\n }\n\n function positionInDocument(docLines, position) {\n return position.row >= 0 && position.row < docLines.length && position.column >= 0 && position.column <= docLines[position.row].length;\n }\n\n function validateDelta(docLines, delta) {\n if (delta.action != \"insert\" && delta.action != \"remove\") throwDeltaError(delta, \"delta.action must be 'insert' or 'remove'\");\n if (!(delta.lines instanceof Array)) throwDeltaError(delta, \"delta.lines must be an Array\");\n if (!delta.start || !delta.end) throwDeltaError(delta, \"delta.start/end must be an present\");\n var start = delta.start;\n if (!positionInDocument(docLines, delta.start)) throwDeltaError(delta, \"delta.start must be contained in document\");\n var end = delta.end;\n if (delta.action == \"remove\" && !positionInDocument(docLines, end)) throwDeltaError(delta, \"delta.end must contained in document for 'remove' actions\");\n var numRangeRows = end.row - start.row;\n var numRangeLastLineChars = end.column - (numRangeRows == 0 ? start.column : 0);\n if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) throwDeltaError(delta, \"delta.range must match delta lines\");\n }\n\n exports.applyDelta = function (docLines, delta, doNotValidate) {\n var row = delta.start.row;\n var startColumn = delta.start.column;\n var line = docLines[row] || \"\";\n\n switch (delta.action) {\n case \"insert\":\n var lines = delta.lines;\n\n if (lines.length === 1) {\n docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);\n } else {\n var args = [row, 1].concat(delta.lines);\n docLines.splice.apply(docLines, args);\n docLines[row] = line.substring(0, startColumn) + docLines[row];\n docLines[row + delta.lines.length - 1] += line.substring(startColumn);\n }\n\n break;\n\n case \"remove\":\n var endColumn = delta.end.column;\n var endRow = delta.end.row;\n\n if (row === endRow) {\n docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);\n } else {\n docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn));\n }\n\n break;\n }\n };\n});\nace.define(\"ace/anchor\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/event_emitter\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var Anchor = exports.Anchor = function (doc, row, column) {\n this.$onChange = this.onChange.bind(this);\n this.attach(doc);\n if (typeof column == \"undefined\") this.setPosition(row.row, row.column);else this.setPosition(row, column);\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.getPosition = function () {\n return this.$clipPositionToDocument(this.row, this.column);\n };\n\n this.getDocument = function () {\n return this.document;\n };\n\n this.$insertRight = false;\n\n this.onChange = function (delta) {\n if (delta.start.row == delta.end.row && delta.start.row != this.row) return;\n if (delta.start.row > this.row) return;\n var point = $getTransformedPoint(delta, {\n row: this.row,\n column: this.column\n }, this.$insertRight);\n this.setPosition(point.row, point.column, true);\n };\n\n function $pointsInOrder(point1, point2, equalPointsInOrder) {\n var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;\n return point1.row < point2.row || point1.row == point2.row && bColIsAfter;\n }\n\n function $getTransformedPoint(delta, point, moveIfEqual) {\n var deltaIsInsert = delta.action == \"insert\";\n var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);\n var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);\n var deltaStart = delta.start;\n var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.\n\n if ($pointsInOrder(point, deltaStart, moveIfEqual)) {\n return {\n row: point.row,\n column: point.column\n };\n }\n\n if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {\n return {\n row: point.row + deltaRowShift,\n column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)\n };\n }\n\n return {\n row: deltaStart.row,\n column: deltaStart.column\n };\n }\n\n this.setPosition = function (row, column, noClip) {\n var pos;\n\n if (noClip) {\n pos = {\n row: row,\n column: column\n };\n } else {\n pos = this.$clipPositionToDocument(row, column);\n }\n\n if (this.row == pos.row && this.column == pos.column) return;\n var old = {\n row: this.row,\n column: this.column\n };\n this.row = pos.row;\n this.column = pos.column;\n\n this._signal(\"change\", {\n old: old,\n value: pos\n });\n };\n\n this.detach = function () {\n this.document.removeEventListener(\"change\", this.$onChange);\n };\n\n this.attach = function (doc) {\n this.document = doc || this.document;\n this.document.on(\"change\", this.$onChange);\n };\n\n this.$clipPositionToDocument = function (row, column) {\n var pos = {};\n\n if (row >= this.document.getLength()) {\n pos.row = Math.max(0, this.document.getLength() - 1);\n pos.column = this.document.getLine(pos.row).length;\n } else if (row < 0) {\n pos.row = 0;\n pos.column = 0;\n } else {\n pos.row = row;\n pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));\n }\n\n if (column < 0) pos.column = 0;\n return pos;\n };\n }).call(Anchor.prototype);\n});\nace.define(\"ace/document\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/apply_delta\", \"ace/lib/event_emitter\", \"ace/range\", \"ace/anchor\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var applyDelta = require(\"./apply_delta\").applyDelta;\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var Range = require(\"./range\").Range;\n\n var Anchor = require(\"./anchor\").Anchor;\n\n var Document = function Document(textOrLines) {\n this.$lines = [\"\"];\n\n if (textOrLines.length === 0) {\n this.$lines = [\"\"];\n } else if (Array.isArray(textOrLines)) {\n this.insertMergedLines({\n row: 0,\n column: 0\n }, textOrLines);\n } else {\n this.insert({\n row: 0,\n column: 0\n }, textOrLines);\n }\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.setValue = function (text) {\n var len = this.getLength() - 1;\n this.remove(new Range(0, 0, len, this.getLine(len).length));\n this.insert({\n row: 0,\n column: 0\n }, text);\n };\n\n this.getValue = function () {\n return this.getAllLines().join(this.getNewLineCharacter());\n };\n\n this.createAnchor = function (row, column) {\n return new Anchor(this, row, column);\n };\n\n if (\"aaa\".split(/a/).length === 0) {\n this.$split = function (text) {\n return text.replace(/\\r\\n|\\r/g, \"\\n\").split(\"\\n\");\n };\n } else {\n this.$split = function (text) {\n return text.split(/\\r\\n|\\r|\\n/);\n };\n }\n\n this.$detectNewLine = function (text) {\n var match = text.match(/^.*?(\\r\\n|\\r|\\n)/m);\n this.$autoNewLine = match ? match[1] : \"\\n\";\n\n this._signal(\"changeNewLineMode\");\n };\n\n this.getNewLineCharacter = function () {\n switch (this.$newLineMode) {\n case \"windows\":\n return \"\\r\\n\";\n\n case \"unix\":\n return \"\\n\";\n\n default:\n return this.$autoNewLine || \"\\n\";\n }\n };\n\n this.$autoNewLine = \"\";\n this.$newLineMode = \"auto\";\n\n this.setNewLineMode = function (newLineMode) {\n if (this.$newLineMode === newLineMode) return;\n this.$newLineMode = newLineMode;\n\n this._signal(\"changeNewLineMode\");\n };\n\n this.getNewLineMode = function () {\n return this.$newLineMode;\n };\n\n this.isNewLine = function (text) {\n return text == \"\\r\\n\" || text == \"\\r\" || text == \"\\n\";\n };\n\n this.getLine = function (row) {\n return this.$lines[row] || \"\";\n };\n\n this.getLines = function (firstRow, lastRow) {\n return this.$lines.slice(firstRow, lastRow + 1);\n };\n\n this.getAllLines = function () {\n return this.getLines(0, this.getLength());\n };\n\n this.getLength = function () {\n return this.$lines.length;\n };\n\n this.getTextRange = function (range) {\n return this.getLinesForRange(range).join(this.getNewLineCharacter());\n };\n\n this.getLinesForRange = function (range) {\n var lines;\n\n if (range.start.row === range.end.row) {\n lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];\n } else {\n lines = this.getLines(range.start.row, range.end.row);\n lines[0] = (lines[0] || \"\").substring(range.start.column);\n var l = lines.length - 1;\n if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column);\n }\n\n return lines;\n };\n\n this.insertLines = function (row, lines) {\n console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\");\n return this.insertFullLines(row, lines);\n };\n\n this.removeLines = function (firstRow, lastRow) {\n console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\");\n return this.removeFullLines(firstRow, lastRow);\n };\n\n this.insertNewLine = function (position) {\n console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\");\n return this.insertMergedLines(position, [\"\", \"\"]);\n };\n\n this.insert = function (position, text) {\n if (this.getLength() <= 1) this.$detectNewLine(text);\n return this.insertMergedLines(position, this.$split(text));\n };\n\n this.insertInLine = function (position, text) {\n var start = this.clippedPos(position.row, position.column);\n var end = this.pos(position.row, position.column + text.length);\n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: [text]\n }, true);\n return this.clonePos(end);\n };\n\n this.clippedPos = function (row, column) {\n var length = this.getLength();\n\n if (row === undefined) {\n row = length;\n } else if (row < 0) {\n row = 0;\n } else if (row >= length) {\n row = length - 1;\n column = undefined;\n }\n\n var line = this.getLine(row);\n if (column == undefined) column = line.length;\n column = Math.min(Math.max(column, 0), line.length);\n return {\n row: row,\n column: column\n };\n };\n\n this.clonePos = function (pos) {\n return {\n row: pos.row,\n column: pos.column\n };\n };\n\n this.pos = function (row, column) {\n return {\n row: row,\n column: column\n };\n };\n\n this.$clipPosition = function (position) {\n var length = this.getLength();\n\n if (position.row >= length) {\n position.row = Math.max(0, length - 1);\n position.column = this.getLine(length - 1).length;\n } else {\n position.row = Math.max(0, position.row);\n position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);\n }\n\n return position;\n };\n\n this.insertFullLines = function (row, lines) {\n row = Math.min(Math.max(row, 0), this.getLength());\n var column = 0;\n\n if (row < this.getLength()) {\n lines = lines.concat([\"\"]);\n column = 0;\n } else {\n lines = [\"\"].concat(lines);\n row--;\n column = this.$lines[row].length;\n }\n\n this.insertMergedLines({\n row: row,\n column: column\n }, lines);\n };\n\n this.insertMergedLines = function (position, lines) {\n var start = this.clippedPos(position.row, position.column);\n var end = {\n row: start.row + lines.length - 1,\n column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length\n };\n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: lines\n });\n return this.clonePos(end);\n };\n\n this.remove = function (range) {\n var start = this.clippedPos(range.start.row, range.start.column);\n var end = this.clippedPos(range.end.row, range.end.column);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({\n start: start,\n end: end\n })\n });\n return this.clonePos(start);\n };\n\n this.removeInLine = function (row, startColumn, endColumn) {\n var start = this.clippedPos(row, startColumn);\n var end = this.clippedPos(row, endColumn);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({\n start: start,\n end: end\n })\n }, true);\n return this.clonePos(start);\n };\n\n this.removeFullLines = function (firstRow, lastRow) {\n firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);\n lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);\n var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;\n var deleteLastNewLine = lastRow < this.getLength() - 1;\n var startRow = deleteFirstNewLine ? firstRow - 1 : firstRow;\n var startCol = deleteFirstNewLine ? this.getLine(startRow).length : 0;\n var endRow = deleteLastNewLine ? lastRow + 1 : lastRow;\n var endCol = deleteLastNewLine ? 0 : this.getLine(endRow).length;\n var range = new Range(startRow, startCol, endRow, endCol);\n var deletedLines = this.$lines.slice(firstRow, lastRow + 1);\n this.applyDelta({\n start: range.start,\n end: range.end,\n action: \"remove\",\n lines: this.getLinesForRange(range)\n });\n return deletedLines;\n };\n\n this.removeNewLine = function (row) {\n if (row < this.getLength() - 1 && row >= 0) {\n this.applyDelta({\n start: this.pos(row, this.getLine(row).length),\n end: this.pos(row + 1, 0),\n action: \"remove\",\n lines: [\"\", \"\"]\n });\n }\n };\n\n this.replace = function (range, text) {\n if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end);\n if (text.length === 0 && range.isEmpty()) return range.start;\n if (text == this.getTextRange(range)) return range.end;\n this.remove(range);\n var end;\n\n if (text) {\n end = this.insert(range.start, text);\n } else {\n end = range.start;\n }\n\n return end;\n };\n\n this.applyDeltas = function (deltas) {\n for (var i = 0; i < deltas.length; i++) {\n this.applyDelta(deltas[i]);\n }\n };\n\n this.revertDeltas = function (deltas) {\n for (var i = deltas.length - 1; i >= 0; i--) {\n this.revertDelta(deltas[i]);\n }\n };\n\n this.applyDelta = function (delta, doNotValidate) {\n var isInsert = delta.action == \"insert\";\n\n if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] : !Range.comparePoints(delta.start, delta.end)) {\n return;\n }\n\n if (isInsert && delta.lines.length > 20000) {\n this.$splitAndapplyLargeDelta(delta, 20000);\n } else {\n applyDelta(this.$lines, delta, doNotValidate);\n\n this._signal(\"change\", delta);\n }\n };\n\n this.$splitAndapplyLargeDelta = function (delta, MAX) {\n var lines = delta.lines;\n var l = lines.length - MAX + 1;\n var row = delta.start.row;\n var column = delta.start.column;\n\n for (var from = 0, to = 0; from < l; from = to) {\n to += MAX - 1;\n var chunk = lines.slice(from, to);\n chunk.push(\"\");\n this.applyDelta({\n start: this.pos(row + from, column),\n end: this.pos(row + to, column = 0),\n action: delta.action,\n lines: chunk\n }, true);\n }\n\n delta.lines = lines.slice(from);\n delta.start.row = row + from;\n delta.start.column = column;\n this.applyDelta(delta, true);\n };\n\n this.revertDelta = function (delta) {\n this.applyDelta({\n start: this.clonePos(delta.start),\n end: this.clonePos(delta.end),\n action: delta.action == \"insert\" ? \"remove\" : \"insert\",\n lines: delta.lines.slice()\n });\n };\n\n this.indexToPosition = function (index, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n\n for (var i = startRow || 0, l = lines.length; i < l; i++) {\n index -= lines[i].length + newlineLength;\n if (index < 0) return {\n row: i,\n column: index + lines[i].length + newlineLength\n };\n }\n\n return {\n row: l - 1,\n column: index + lines[l - 1].length + newlineLength\n };\n };\n\n this.positionToIndex = function (pos, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n var index = 0;\n var row = Math.min(pos.row, lines.length);\n\n for (var i = startRow || 0; i < row; ++i) {\n index += lines[i].length + newlineLength;\n }\n\n return index + pos.column;\n };\n }).call(Document.prototype);\n exports.Document = Document;\n});\nace.define(\"ace/background_tokenizer\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/event_emitter\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var BackgroundTokenizer = function BackgroundTokenizer(tokenizer, editor) {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.tokenizer = tokenizer;\n var self = this;\n\n this.$worker = function () {\n if (!self.running) {\n return;\n }\n\n var workerStart = new Date();\n var currentLine = self.currentLine;\n var endLine = -1;\n var doc = self.doc;\n var startLine = currentLine;\n\n while (self.lines[currentLine]) {\n currentLine++;\n }\n\n var len = doc.getLength();\n var processedLines = 0;\n self.running = false;\n\n while (currentLine < len) {\n self.$tokenizeRow(currentLine);\n endLine = currentLine;\n\n do {\n currentLine++;\n } while (self.lines[currentLine]);\n\n processedLines++;\n\n if (processedLines % 5 === 0 && new Date() - workerStart > 20) {\n self.running = setTimeout(self.$worker, 20);\n break;\n }\n }\n\n self.currentLine = currentLine;\n if (endLine == -1) endLine = currentLine;\n if (startLine <= endLine) self.fireUpdateEvent(startLine, endLine);\n };\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.setTokenizer = function (tokenizer) {\n this.tokenizer = tokenizer;\n this.lines = [];\n this.states = [];\n this.start(0);\n };\n\n this.setDocument = function (doc) {\n this.doc = doc;\n this.lines = [];\n this.states = [];\n this.stop();\n };\n\n this.fireUpdateEvent = function (firstRow, lastRow) {\n var data = {\n first: firstRow,\n last: lastRow\n };\n\n this._signal(\"update\", {\n data: data\n });\n };\n\n this.start = function (startRow) {\n this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());\n this.lines.splice(this.currentLine, this.lines.length);\n this.states.splice(this.currentLine, this.states.length);\n this.stop();\n this.running = setTimeout(this.$worker, 700);\n };\n\n this.scheduleStart = function () {\n if (!this.running) this.running = setTimeout(this.$worker, 700);\n };\n\n this.$updateOnChange = function (delta) {\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n this.lines[startRow] = null;\n } else if (delta.action == \"remove\") {\n this.lines.splice(startRow, len + 1, null);\n this.states.splice(startRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(startRow, 1);\n this.lines.splice.apply(this.lines, args);\n this.states.splice.apply(this.states, args);\n }\n\n this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());\n this.stop();\n };\n\n this.stop = function () {\n if (this.running) clearTimeout(this.running);\n this.running = false;\n };\n\n this.getTokens = function (row) {\n return this.lines[row] || this.$tokenizeRow(row);\n };\n\n this.getState = function (row) {\n if (this.currentLine == row) this.$tokenizeRow(row);\n return this.states[row] || \"start\";\n };\n\n this.$tokenizeRow = function (row) {\n var line = this.doc.getLine(row);\n var state = this.states[row - 1];\n var data = this.tokenizer.getLineTokens(line, state, row);\n\n if (this.states[row] + \"\" !== data.state + \"\") {\n this.states[row] = data.state;\n this.lines[row + 1] = null;\n if (this.currentLine > row + 1) this.currentLine = row + 1;\n } else if (this.currentLine == row) {\n this.currentLine = row + 1;\n }\n\n return this.lines[row] = data.tokens;\n };\n }).call(BackgroundTokenizer.prototype);\n exports.BackgroundTokenizer = BackgroundTokenizer;\n});\nace.define(\"ace/search_highlight\", [\"require\", \"exports\", \"module\", \"ace/lib/lang\", \"ace/lib/oop\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var lang = require(\"./lib/lang\");\n\n var oop = require(\"./lib/oop\");\n\n var Range = require(\"./range\").Range;\n\n var SearchHighlight = function SearchHighlight(regExp, clazz, type) {\n this.setRegexp(regExp);\n this.clazz = clazz;\n this.type = type || \"text\";\n };\n\n (function () {\n this.MAX_RANGES = 500;\n\n this.setRegexp = function (regExp) {\n if (this.regExp + \"\" == regExp + \"\") return;\n this.regExp = regExp;\n this.cache = [];\n };\n\n this.update = function (html, markerLayer, session, config) {\n if (!this.regExp) return;\n var start = config.firstRow,\n end = config.lastRow;\n\n for (var i = start; i <= end; i++) {\n var ranges = this.cache[i];\n\n if (ranges == null) {\n ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);\n if (ranges.length > this.MAX_RANGES) ranges = ranges.slice(0, this.MAX_RANGES);\n ranges = ranges.map(function (match) {\n return new Range(i, match.offset, i, match.offset + match.length);\n });\n this.cache[i] = ranges.length ? ranges : \"\";\n }\n\n for (var j = ranges.length; j--;) {\n markerLayer.drawSingleLineMarker(html, ranges[j].toScreenRange(session), this.clazz, config);\n }\n }\n };\n }).call(SearchHighlight.prototype);\n exports.SearchHighlight = SearchHighlight;\n});\nace.define(\"ace/edit_session/fold_line\", [\"require\", \"exports\", \"module\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var Range = require(\"../range\").Range;\n\n function FoldLine(foldData, folds) {\n this.foldData = foldData;\n\n if (Array.isArray(folds)) {\n this.folds = folds;\n } else {\n folds = this.folds = [folds];\n }\n\n var last = folds[folds.length - 1];\n this.range = new Range(folds[0].start.row, folds[0].start.column, last.end.row, last.end.column);\n this.start = this.range.start;\n this.end = this.range.end;\n this.folds.forEach(function (fold) {\n fold.setFoldLine(this);\n }, this);\n }\n\n (function () {\n this.shiftRow = function (shift) {\n this.start.row += shift;\n this.end.row += shift;\n this.folds.forEach(function (fold) {\n fold.start.row += shift;\n fold.end.row += shift;\n });\n };\n\n this.addFold = function (fold) {\n if (fold.sameRow) {\n if (fold.start.row < this.startRow || fold.endRow > this.endRow) {\n throw new Error(\"Can't add a fold to this FoldLine as it has no connection\");\n }\n\n this.folds.push(fold);\n this.folds.sort(function (a, b) {\n return -a.range.compareEnd(b.start.row, b.start.column);\n });\n\n if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n } else if (fold.start.row == this.end.row) {\n this.folds.push(fold);\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (fold.end.row == this.start.row) {\n this.folds.unshift(fold);\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n } else {\n throw new Error(\"Trying to add fold to FoldRow that doesn't have a matching row\");\n }\n\n fold.foldLine = this;\n };\n\n this.containsRow = function (row) {\n return row >= this.start.row && row <= this.end.row;\n };\n\n this.walk = function (callback, endRow, endColumn) {\n var lastEnd = 0,\n folds = this.folds,\n fold,\n cmp,\n stop,\n isNewRow = true;\n\n if (endRow == null) {\n endRow = this.end.row;\n endColumn = this.end.column;\n }\n\n for (var i = 0; i < folds.length; i++) {\n fold = folds[i];\n cmp = fold.range.compareStart(endRow, endColumn);\n\n if (cmp == -1) {\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n return;\n }\n\n stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);\n stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);\n\n if (stop || cmp === 0) {\n return;\n }\n\n isNewRow = !fold.sameRow;\n lastEnd = fold.end.column;\n }\n\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n };\n\n this.getNextFoldTo = function (row, column) {\n var fold, cmp;\n\n for (var i = 0; i < this.folds.length; i++) {\n fold = this.folds[i];\n cmp = fold.range.compareEnd(row, column);\n\n if (cmp == -1) {\n return {\n fold: fold,\n kind: \"after\"\n };\n } else if (cmp === 0) {\n return {\n fold: fold,\n kind: \"inside\"\n };\n }\n }\n\n return null;\n };\n\n this.addRemoveChars = function (row, column, len) {\n var ret = this.getNextFoldTo(row, column),\n fold,\n folds;\n\n if (ret) {\n fold = ret.fold;\n\n if (ret.kind == \"inside\" && fold.start.column != column && fold.start.row != row) {\n window.console && window.console.log(row, column, fold);\n } else if (fold.start.row == row) {\n folds = this.folds;\n var i = folds.indexOf(fold);\n\n if (i === 0) {\n this.start.column += len;\n }\n\n for (i; i < folds.length; i++) {\n fold = folds[i];\n fold.start.column += len;\n\n if (!fold.sameRow) {\n return;\n }\n\n fold.end.column += len;\n }\n\n this.end.column += len;\n }\n }\n };\n\n this.split = function (row, column) {\n var pos = this.getNextFoldTo(row, column);\n if (!pos || pos.kind == \"inside\") return null;\n var fold = pos.fold;\n var folds = this.folds;\n var foldData = this.foldData;\n var i = folds.indexOf(fold);\n var foldBefore = folds[i - 1];\n this.end.row = foldBefore.end.row;\n this.end.column = foldBefore.end.column;\n folds = folds.splice(i, folds.length - i);\n var newFoldLine = new FoldLine(foldData, folds);\n foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);\n return newFoldLine;\n };\n\n this.merge = function (foldLineNext) {\n var folds = foldLineNext.folds;\n\n for (var i = 0; i < folds.length; i++) {\n this.addFold(folds[i]);\n }\n\n var foldData = this.foldData;\n foldData.splice(foldData.indexOf(foldLineNext), 1);\n };\n\n this.toString = function () {\n var ret = [this.range.toString() + \": [\"];\n this.folds.forEach(function (fold) {\n ret.push(\" \" + fold.toString());\n });\n ret.push(\"]\");\n return ret.join(\"\\n\");\n };\n\n this.idxToPosition = function (idx) {\n var lastFoldEndColumn = 0;\n\n for (var i = 0; i < this.folds.length; i++) {\n var fold = this.folds[i];\n idx -= fold.start.column - lastFoldEndColumn;\n\n if (idx < 0) {\n return {\n row: fold.start.row,\n column: fold.start.column + idx\n };\n }\n\n idx -= fold.placeholder.length;\n\n if (idx < 0) {\n return fold.start;\n }\n\n lastFoldEndColumn = fold.end.column;\n }\n\n return {\n row: this.end.row,\n column: this.end.column + idx\n };\n };\n }).call(FoldLine.prototype);\n exports.FoldLine = FoldLine;\n});\nace.define(\"ace/range_list\", [\"require\", \"exports\", \"module\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var Range = require(\"./range\").Range;\n\n var comparePoints = Range.comparePoints;\n\n var RangeList = function RangeList() {\n this.ranges = [];\n this.$bias = 1;\n };\n\n (function () {\n this.comparePoints = comparePoints;\n\n this.pointIndex = function (pos, excludeEdges, startIndex) {\n var list = this.ranges;\n\n for (var i = startIndex || 0; i < list.length; i++) {\n var range = list[i];\n var cmpEnd = comparePoints(pos, range.end);\n if (cmpEnd > 0) continue;\n var cmpStart = comparePoints(pos, range.start);\n if (cmpEnd === 0) return excludeEdges && cmpStart !== 0 ? -i - 2 : i;\n if (cmpStart > 0 || cmpStart === 0 && !excludeEdges) return i;\n return -i - 1;\n }\n\n return -i - 1;\n };\n\n this.add = function (range) {\n var excludeEdges = !range.isEmpty();\n var startIndex = this.pointIndex(range.start, excludeEdges);\n if (startIndex < 0) startIndex = -startIndex - 1;\n var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);\n if (endIndex < 0) endIndex = -endIndex - 1;else endIndex++;\n return this.ranges.splice(startIndex, endIndex - startIndex, range);\n };\n\n this.addList = function (list) {\n var removed = [];\n\n for (var i = list.length; i--;) {\n removed.push.apply(removed, this.add(list[i]));\n }\n\n return removed;\n };\n\n this.substractPoint = function (pos) {\n var i = this.pointIndex(pos);\n if (i >= 0) return this.ranges.splice(i, 1);\n };\n\n this.merge = function () {\n var removed = [];\n var list = this.ranges;\n list = list.sort(function (a, b) {\n return comparePoints(a.start, b.start);\n });\n var next = list[0],\n range;\n\n for (var i = 1; i < list.length; i++) {\n range = next;\n next = list[i];\n var cmp = comparePoints(range.end, next.start);\n if (cmp < 0) continue;\n if (cmp == 0 && !range.isEmpty() && !next.isEmpty()) continue;\n\n if (comparePoints(range.end, next.end) < 0) {\n range.end.row = next.end.row;\n range.end.column = next.end.column;\n }\n\n list.splice(i, 1);\n removed.push(next);\n next = range;\n i--;\n }\n\n this.ranges = list;\n return removed;\n };\n\n this.contains = function (row, column) {\n return this.pointIndex({\n row: row,\n column: column\n }) >= 0;\n };\n\n this.containsPoint = function (pos) {\n return this.pointIndex(pos) >= 0;\n };\n\n this.rangeAtPoint = function (pos) {\n var i = this.pointIndex(pos);\n if (i >= 0) return this.ranges[i];\n };\n\n this.clipRows = function (startRow, endRow) {\n var list = this.ranges;\n if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow) return [];\n var startIndex = this.pointIndex({\n row: startRow,\n column: 0\n });\n if (startIndex < 0) startIndex = -startIndex - 1;\n var endIndex = this.pointIndex({\n row: endRow,\n column: 0\n }, startIndex);\n if (endIndex < 0) endIndex = -endIndex - 1;\n var clipped = [];\n\n for (var i = startIndex; i < endIndex; i++) {\n clipped.push(list[i]);\n }\n\n return clipped;\n };\n\n this.removeAll = function () {\n return this.ranges.splice(0, this.ranges.length);\n };\n\n this.attach = function (session) {\n if (this.session) this.detach();\n this.session = session;\n this.onChange = this.$onChange.bind(this);\n this.session.on('change', this.onChange);\n };\n\n this.detach = function () {\n if (!this.session) return;\n this.session.removeListener('change', this.onChange);\n this.session = null;\n };\n\n this.$onChange = function (delta) {\n var start = delta.start;\n var end = delta.end;\n var startRow = start.row;\n var endRow = end.row;\n var ranges = this.ranges;\n\n for (var i = 0, n = ranges.length; i < n; i++) {\n var r = ranges[i];\n if (r.end.row >= startRow) break;\n }\n\n if (delta.action == \"insert\") {\n var lineDif = endRow - startRow;\n var colDiff = -start.column + end.column;\n\n for (; i < n; i++) {\n var r = ranges[i];\n if (r.start.row > startRow) break;\n\n if (r.start.row == startRow && r.start.column >= start.column) {\n if (r.start.column == start.column && this.$bias <= 0) {} else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n\n if (r.end.row == startRow && r.end.column >= start.column) {\n if (r.end.column == start.column && this.$bias < 0) {\n continue;\n }\n\n if (r.end.column == start.column && colDiff > 0 && i < n - 1) {\n if (r.end.column > r.start.column && r.end.column == ranges[i + 1].start.column) r.end.column -= colDiff;\n }\n\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n } else {\n var lineDif = startRow - endRow;\n var colDiff = start.column - end.column;\n\n for (; i < n; i++) {\n var r = ranges[i];\n if (r.start.row > endRow) break;\n\n if (r.end.row < endRow && (startRow < r.end.row || startRow == r.end.row && start.column < r.end.column)) {\n r.end.row = startRow;\n r.end.column = start.column;\n } else if (r.end.row == endRow) {\n if (r.end.column <= end.column) {\n if (lineDif || r.end.column > start.column) {\n r.end.column = start.column;\n r.end.row = start.row;\n }\n } else {\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n } else if (r.end.row > endRow) {\n r.end.row += lineDif;\n }\n\n if (r.start.row < endRow && (startRow < r.start.row || startRow == r.start.row && start.column < r.start.column)) {\n r.start.row = startRow;\n r.start.column = start.column;\n } else if (r.start.row == endRow) {\n if (r.start.column <= end.column) {\n if (lineDif || r.start.column > start.column) {\n r.start.column = start.column;\n r.start.row = start.row;\n }\n } else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n } else if (r.start.row > endRow) {\n r.start.row += lineDif;\n }\n }\n }\n\n if (lineDif != 0 && i < n) {\n for (; i < n; i++) {\n var r = ranges[i];\n r.start.row += lineDif;\n r.end.row += lineDif;\n }\n }\n };\n }).call(RangeList.prototype);\n exports.RangeList = RangeList;\n});\nace.define(\"ace/edit_session/fold\", [\"require\", \"exports\", \"module\", \"ace/range_list\", \"ace/lib/oop\"], function (require, exports, module) {\n \"use strict\";\n\n var RangeList = require(\"../range_list\").RangeList;\n\n var oop = require(\"../lib/oop\");\n\n var Fold = exports.Fold = function (range, placeholder) {\n this.foldLine = null;\n this.placeholder = placeholder;\n this.range = range;\n this.start = range.start;\n this.end = range.end;\n this.sameRow = range.start.row == range.end.row;\n this.subFolds = this.ranges = [];\n };\n\n oop.inherits(Fold, RangeList);\n (function () {\n this.toString = function () {\n return '\"' + this.placeholder + '\" ' + this.range.toString();\n };\n\n this.setFoldLine = function (foldLine) {\n this.foldLine = foldLine;\n this.subFolds.forEach(function (fold) {\n fold.setFoldLine(foldLine);\n });\n };\n\n this.clone = function () {\n var range = this.range.clone();\n var fold = new Fold(range, this.placeholder);\n this.subFolds.forEach(function (subFold) {\n fold.subFolds.push(subFold.clone());\n });\n fold.collapseChildren = this.collapseChildren;\n return fold;\n };\n\n this.addSubFold = function (fold) {\n if (this.range.isEqual(fold)) return;\n consumeRange(fold, this.start);\n var row = fold.start.row,\n column = fold.start.column;\n\n for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {\n cmp = this.subFolds[i].range.compare(row, column);\n if (cmp != 1) break;\n }\n\n var afterStart = this.subFolds[i];\n var firstConsumed = 0;\n\n if (cmp == 0) {\n if (afterStart.range.containsRange(fold)) return afterStart.addSubFold(fold);else firstConsumed = 1;\n }\n\n var row = fold.range.end.row,\n column = fold.range.end.column;\n\n for (var j = i, cmp = -1; j < this.subFolds.length; j++) {\n cmp = this.subFolds[j].range.compare(row, column);\n if (cmp != 1) break;\n }\n\n if (cmp == 0) j++;\n var consumedFolds = this.subFolds.splice(i, j - i, fold);\n var last = cmp == 0 ? consumedFolds.length - 1 : consumedFolds.length;\n\n for (var k = firstConsumed; k < last; k++) {\n fold.addSubFold(consumedFolds[k]);\n }\n\n fold.setFoldLine(this.foldLine);\n return fold;\n };\n\n this.restoreRange = function (range) {\n return restoreRange(range, this.start);\n };\n }).call(Fold.prototype);\n\n function consumePoint(point, anchor) {\n point.row -= anchor.row;\n if (point.row == 0) point.column -= anchor.column;\n }\n\n function consumeRange(range, anchor) {\n consumePoint(range.start, anchor);\n consumePoint(range.end, anchor);\n }\n\n function restorePoint(point, anchor) {\n if (point.row == 0) point.column += anchor.column;\n point.row += anchor.row;\n }\n\n function restoreRange(range, anchor) {\n restorePoint(range.start, anchor);\n restorePoint(range.end, anchor);\n }\n});\nace.define(\"ace/edit_session/folding\", [\"require\", \"exports\", \"module\", \"ace/range\", \"ace/edit_session/fold_line\", \"ace/edit_session/fold\", \"ace/token_iterator\"], function (require, exports, module) {\n \"use strict\";\n\n var Range = require(\"../range\").Range;\n\n var FoldLine = require(\"./fold_line\").FoldLine;\n\n var Fold = require(\"./fold\").Fold;\n\n var TokenIterator = require(\"../token_iterator\").TokenIterator;\n\n function Folding() {\n this.getFoldAt = function (row, column, side) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine) return null;\n var folds = foldLine.folds;\n\n for (var i = 0; i < folds.length; i++) {\n var range = folds[i].range;\n\n if (range.contains(row, column)) {\n if (side == 1 && range.isEnd(row, column) && !range.isEmpty()) {\n continue;\n } else if (side == -1 && range.isStart(row, column) && !range.isEmpty()) {\n continue;\n }\n\n return folds[i];\n }\n }\n };\n\n this.getFoldsInRange = function (range) {\n var start = range.start;\n var end = range.end;\n var foldLines = this.$foldData;\n var foundFolds = [];\n start.column += 1;\n end.column -= 1;\n\n for (var i = 0; i < foldLines.length; i++) {\n var cmp = foldLines[i].range.compareRange(range);\n\n if (cmp == 2) {\n continue;\n } else if (cmp == -2) {\n break;\n }\n\n var folds = foldLines[i].folds;\n\n for (var j = 0; j < folds.length; j++) {\n var fold = folds[j];\n cmp = fold.range.compareRange(range);\n\n if (cmp == -2) {\n break;\n } else if (cmp == 2) {\n continue;\n } else if (cmp == 42) {\n break;\n }\n\n foundFolds.push(fold);\n }\n }\n\n start.column -= 1;\n end.column += 1;\n return foundFolds;\n };\n\n this.getFoldsInRangeList = function (ranges) {\n if (Array.isArray(ranges)) {\n var folds = [];\n ranges.forEach(function (range) {\n folds = folds.concat(this.getFoldsInRange(range));\n }, this);\n } else {\n var folds = this.getFoldsInRange(ranges);\n }\n\n return folds;\n };\n\n this.getAllFolds = function () {\n var folds = [];\n var foldLines = this.$foldData;\n\n for (var i = 0; i < foldLines.length; i++) {\n for (var j = 0; j < foldLines[i].folds.length; j++) {\n folds.push(foldLines[i].folds[j]);\n }\n }\n\n return folds;\n };\n\n this.getFoldStringAt = function (row, column, trim, foldLine) {\n foldLine = foldLine || this.getFoldLine(row);\n if (!foldLine) return null;\n var lastFold = {\n end: {\n column: 0\n }\n };\n var str, fold;\n\n for (var i = 0; i < foldLine.folds.length; i++) {\n fold = foldLine.folds[i];\n var cmp = fold.range.compareEnd(row, column);\n\n if (cmp == -1) {\n str = this.getLine(fold.start.row).substring(lastFold.end.column, fold.start.column);\n break;\n } else if (cmp === 0) {\n return null;\n }\n\n lastFold = fold;\n }\n\n if (!str) str = this.getLine(fold.start.row).substring(lastFold.end.column);\n if (trim == -1) return str.substring(0, column - lastFold.end.column);else if (trim == 1) return str.substring(column - lastFold.end.column);else return str;\n };\n\n this.getFoldLine = function (docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine) i = foldData.indexOf(startFoldLine);\n if (i == -1) i = 0;\n\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n\n if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {\n return foldLine;\n } else if (foldLine.end.row > docRow) {\n return null;\n }\n }\n\n return null;\n };\n\n this.getNextFoldLine = function (docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine) i = foldData.indexOf(startFoldLine);\n if (i == -1) i = 0;\n\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n\n if (foldLine.end.row >= docRow) {\n return foldLine;\n }\n }\n\n return null;\n };\n\n this.getFoldedRowCount = function (first, last) {\n var foldData = this.$foldData,\n rowCount = last - first + 1;\n\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i],\n end = foldLine.end.row,\n start = foldLine.start.row;\n\n if (end >= last) {\n if (start < last) {\n if (start >= first) rowCount -= last - start;else rowCount = 0; // in one fold\n }\n\n break;\n } else if (end >= first) {\n if (start >= first) // fold inside range\n rowCount -= end - start;else rowCount -= end - first + 1;\n }\n }\n\n return rowCount;\n };\n\n this.$addFoldLine = function (foldLine) {\n this.$foldData.push(foldLine);\n this.$foldData.sort(function (a, b) {\n return a.start.row - b.start.row;\n });\n return foldLine;\n };\n\n this.addFold = function (placeholder, range) {\n var foldData = this.$foldData;\n var added = false;\n var fold;\n if (placeholder instanceof Fold) fold = placeholder;else {\n fold = new Fold(range, placeholder);\n fold.collapseChildren = range.collapseChildren;\n }\n this.$clipRangeToDocument(fold.range);\n var startRow = fold.start.row;\n var startColumn = fold.start.column;\n var endRow = fold.end.row;\n var endColumn = fold.end.column;\n var startFold = this.getFoldAt(startRow, startColumn, 1);\n var endFold = this.getFoldAt(endRow, endColumn, -1);\n if (startFold && endFold == startFold) return startFold.addSubFold(fold);\n if (startFold && !startFold.range.isStart(startRow, startColumn)) this.removeFold(startFold);\n if (endFold && !endFold.range.isEnd(endRow, endColumn)) this.removeFold(endFold);\n var folds = this.getFoldsInRange(fold.range);\n\n if (folds.length > 0) {\n this.removeFolds(folds);\n folds.forEach(function (subFold) {\n fold.addSubFold(subFold);\n });\n }\n\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i];\n\n if (endRow == foldLine.start.row) {\n foldLine.addFold(fold);\n added = true;\n break;\n } else if (startRow == foldLine.end.row) {\n foldLine.addFold(fold);\n added = true;\n\n if (!fold.sameRow) {\n var foldLineNext = foldData[i + 1];\n\n if (foldLineNext && foldLineNext.start.row == endRow) {\n foldLine.merge(foldLineNext);\n break;\n }\n }\n\n break;\n } else if (endRow <= foldLine.start.row) {\n break;\n }\n }\n\n if (!added) foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));\n if (this.$useWrapMode) this.$updateWrapData(foldLine.start.row, foldLine.start.row);else this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);\n this.$modified = true;\n\n this._signal(\"changeFold\", {\n data: fold,\n action: \"add\"\n });\n\n return fold;\n };\n\n this.addFolds = function (folds) {\n folds.forEach(function (fold) {\n this.addFold(fold);\n }, this);\n };\n\n this.removeFold = function (fold) {\n var foldLine = fold.foldLine;\n var startRow = foldLine.start.row;\n var endRow = foldLine.end.row;\n var foldLines = this.$foldData;\n var folds = foldLine.folds;\n\n if (folds.length == 1) {\n foldLines.splice(foldLines.indexOf(foldLine), 1);\n } else if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {\n folds.pop();\n foldLine.end.row = folds[folds.length - 1].end.row;\n foldLine.end.column = folds[folds.length - 1].end.column;\n } else if (foldLine.range.isStart(fold.start.row, fold.start.column)) {\n folds.shift();\n foldLine.start.row = folds[0].start.row;\n foldLine.start.column = folds[0].start.column;\n } else if (fold.sameRow) {\n folds.splice(folds.indexOf(fold), 1);\n } else {\n var newFoldLine = foldLine.split(fold.start.row, fold.start.column);\n folds = newFoldLine.folds;\n folds.shift();\n newFoldLine.start.row = folds[0].start.row;\n newFoldLine.start.column = folds[0].start.column;\n }\n\n if (!this.$updating) {\n if (this.$useWrapMode) this.$updateWrapData(startRow, endRow);else this.$updateRowLengthCache(startRow, endRow);\n }\n\n this.$modified = true;\n\n this._signal(\"changeFold\", {\n data: fold,\n action: \"remove\"\n });\n };\n\n this.removeFolds = function (folds) {\n var cloneFolds = [];\n\n for (var i = 0; i < folds.length; i++) {\n cloneFolds.push(folds[i]);\n }\n\n cloneFolds.forEach(function (fold) {\n this.removeFold(fold);\n }, this);\n this.$modified = true;\n };\n\n this.expandFold = function (fold) {\n this.removeFold(fold);\n fold.subFolds.forEach(function (subFold) {\n fold.restoreRange(subFold);\n this.addFold(subFold);\n }, this);\n\n if (fold.collapseChildren > 0) {\n this.foldAll(fold.start.row + 1, fold.end.row, fold.collapseChildren - 1);\n }\n\n fold.subFolds = [];\n };\n\n this.expandFolds = function (folds) {\n folds.forEach(function (fold) {\n this.expandFold(fold);\n }, this);\n };\n\n this.unfold = function (location, expandInner) {\n var range, folds;\n\n if (location == null) {\n range = new Range(0, 0, this.getLength(), 0);\n expandInner = true;\n } else if (typeof location == \"number\") range = new Range(location, 0, location, this.getLine(location).length);else if (\"row\" in location) range = Range.fromPoints(location, location);else range = location;\n\n folds = this.getFoldsInRangeList(range);\n\n if (expandInner) {\n this.removeFolds(folds);\n } else {\n var subFolds = folds;\n\n while (subFolds.length) {\n this.expandFolds(subFolds);\n subFolds = this.getFoldsInRangeList(range);\n }\n }\n\n if (folds.length) return folds;\n };\n\n this.isRowFolded = function (docRow, startFoldRow) {\n return !!this.getFoldLine(docRow, startFoldRow);\n };\n\n this.getRowFoldEnd = function (docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.end.row : docRow;\n };\n\n this.getRowFoldStart = function (docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.start.row : docRow;\n };\n\n this.getFoldDisplayLine = function (foldLine, endRow, endColumn, startRow, startColumn) {\n if (startRow == null) startRow = foldLine.start.row;\n if (startColumn == null) startColumn = 0;\n if (endRow == null) endRow = foldLine.end.row;\n if (endColumn == null) endColumn = this.getLine(endRow).length;\n var doc = this.doc;\n var textLine = \"\";\n foldLine.walk(function (placeholder, row, column, lastColumn) {\n if (row < startRow) return;\n\n if (row == startRow) {\n if (column < startColumn) return;\n lastColumn = Math.max(startColumn, lastColumn);\n }\n\n if (placeholder != null) {\n textLine += placeholder;\n } else {\n textLine += doc.getLine(row).substring(lastColumn, column);\n }\n }, endRow, endColumn);\n return textLine;\n };\n\n this.getDisplayLine = function (row, endColumn, startRow, startColumn) {\n var foldLine = this.getFoldLine(row);\n\n if (!foldLine) {\n var line;\n line = this.doc.getLine(row);\n return line.substring(startColumn || 0, endColumn || line.length);\n } else {\n return this.getFoldDisplayLine(foldLine, row, endColumn, startRow, startColumn);\n }\n };\n\n this.$cloneFoldData = function () {\n var fd = [];\n fd = this.$foldData.map(function (foldLine) {\n var folds = foldLine.folds.map(function (fold) {\n return fold.clone();\n });\n return new FoldLine(fd, folds);\n });\n return fd;\n };\n\n this.toggleFold = function (tryToUnfold) {\n var selection = this.selection;\n var range = selection.getRange();\n var fold;\n var bracketPos;\n\n if (range.isEmpty()) {\n var cursor = range.start;\n fold = this.getFoldAt(cursor.row, cursor.column);\n\n if (fold) {\n this.expandFold(fold);\n return;\n } else if (bracketPos = this.findMatchingBracket(cursor)) {\n if (range.comparePoint(bracketPos) == 1) {\n range.end = bracketPos;\n } else {\n range.start = bracketPos;\n range.start.column++;\n range.end.column--;\n }\n } else if (bracketPos = this.findMatchingBracket({\n row: cursor.row,\n column: cursor.column + 1\n })) {\n if (range.comparePoint(bracketPos) == 1) range.end = bracketPos;else range.start = bracketPos;\n range.start.column++;\n } else {\n range = this.getCommentFoldRange(cursor.row, cursor.column) || range;\n }\n } else {\n var folds = this.getFoldsInRange(range);\n\n if (tryToUnfold && folds.length) {\n this.expandFolds(folds);\n return;\n } else if (folds.length == 1) {\n fold = folds[0];\n }\n }\n\n if (!fold) fold = this.getFoldAt(range.start.row, range.start.column);\n\n if (fold && fold.range.toString() == range.toString()) {\n this.expandFold(fold);\n return;\n }\n\n var placeholder = \"...\";\n\n if (!range.isMultiLine()) {\n placeholder = this.getTextRange(range);\n if (placeholder.length < 4) return;\n placeholder = placeholder.trim().substring(0, 2) + \"..\";\n }\n\n this.addFold(placeholder, range);\n };\n\n this.getCommentFoldRange = function (row, column, dir) {\n var iterator = new TokenIterator(this, row, column);\n var token = iterator.getCurrentToken();\n var type = token.type;\n\n if (token && /^comment|string/.test(type)) {\n type = type.match(/comment|string/)[0];\n if (type == \"comment\") type += \"|doc-start\";\n var re = new RegExp(type);\n var range = new Range();\n\n if (dir != 1) {\n do {\n token = iterator.stepBackward();\n } while (token && re.test(token.type));\n\n iterator.stepForward();\n }\n\n range.start.row = iterator.getCurrentTokenRow();\n range.start.column = iterator.getCurrentTokenColumn() + 2;\n iterator = new TokenIterator(this, row, column);\n\n if (dir != -1) {\n var lastRow = -1;\n\n do {\n token = iterator.stepForward();\n\n if (lastRow == -1) {\n var state = this.getState(iterator.$row);\n if (!re.test(state)) lastRow = iterator.$row;\n } else if (iterator.$row > lastRow) {\n break;\n }\n } while (token && re.test(token.type));\n\n token = iterator.stepBackward();\n } else token = iterator.getCurrentToken();\n\n range.end.row = iterator.getCurrentTokenRow();\n range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2;\n return range;\n }\n };\n\n this.foldAll = function (startRow, endRow, depth) {\n if (depth == undefined) depth = 100000; // JSON.stringify doesn't hanle Infinity\n\n var foldWidgets = this.foldWidgets;\n if (!foldWidgets) return; // mode doesn't support folding\n\n endRow = endRow || this.getLength();\n startRow = startRow || 0;\n\n for (var row = startRow; row < endRow; row++) {\n if (foldWidgets[row] == null) foldWidgets[row] = this.getFoldWidget(row);\n if (foldWidgets[row] != \"start\") continue;\n var range = this.getFoldWidgetRange(row);\n\n if (range && range.isMultiLine() && range.end.row <= endRow && range.start.row >= startRow) {\n row = range.end.row;\n\n try {\n var fold = this.addFold(\"...\", range);\n if (fold) fold.collapseChildren = depth;\n } catch (e) {}\n }\n }\n };\n\n this.$foldStyles = {\n \"manual\": 1,\n \"markbegin\": 1,\n \"markbeginend\": 1\n };\n this.$foldStyle = \"markbegin\";\n\n this.setFoldStyle = function (style) {\n if (!this.$foldStyles[style]) throw new Error(\"invalid fold style: \" + style + \"[\" + Object.keys(this.$foldStyles).join(\", \") + \"]\");\n if (this.$foldStyle == style) return;\n this.$foldStyle = style;\n if (style == \"manual\") this.unfold();\n var mode = this.$foldMode;\n this.$setFolding(null);\n this.$setFolding(mode);\n };\n\n this.$setFolding = function (foldMode) {\n if (this.$foldMode == foldMode) return;\n this.$foldMode = foldMode;\n this.off('change', this.$updateFoldWidgets);\n this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n\n this._signal(\"changeAnnotation\");\n\n if (!foldMode || this.$foldStyle == \"manual\") {\n this.foldWidgets = null;\n return;\n }\n\n this.foldWidgets = [];\n this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);\n this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);\n this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);\n this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);\n this.on('change', this.$updateFoldWidgets);\n this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n };\n\n this.getParentFoldRangeData = function (row, ignoreCurrent) {\n var fw = this.foldWidgets;\n if (!fw || ignoreCurrent && fw[row]) return {};\n var i = row - 1,\n firstRange;\n\n while (i >= 0) {\n var c = fw[i];\n if (c == null) c = fw[i] = this.getFoldWidget(i);\n\n if (c == \"start\") {\n var range = this.getFoldWidgetRange(i);\n if (!firstRange) firstRange = range;\n if (range && range.end.row >= row) break;\n }\n\n i--;\n }\n\n return {\n range: i !== -1 && range,\n firstRange: firstRange\n };\n };\n\n this.onFoldWidgetClick = function (row, e) {\n e = e.domEvent;\n var options = {\n children: e.shiftKey,\n all: e.ctrlKey || e.metaKey,\n siblings: e.altKey\n };\n var range = this.$toggleFoldWidget(row, options);\n\n if (!range) {\n var el = e.target || e.srcElement;\n if (el && /ace_fold-widget/.test(el.className)) el.className += \" ace_invalid\";\n }\n };\n\n this.$toggleFoldWidget = function (row, options) {\n if (!this.getFoldWidget) return;\n var type = this.getFoldWidget(row);\n var line = this.getLine(row);\n var dir = type === \"end\" ? -1 : 1;\n var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);\n\n if (fold) {\n if (options.children || options.all) this.removeFold(fold);else this.expandFold(fold);\n return fold;\n }\n\n var range = this.getFoldWidgetRange(row, true);\n\n if (range && !range.isMultiLine()) {\n fold = this.getFoldAt(range.start.row, range.start.column, 1);\n\n if (fold && range.isEqual(fold.range)) {\n this.removeFold(fold);\n return fold;\n }\n }\n\n if (options.siblings) {\n var data = this.getParentFoldRangeData(row);\n\n if (data.range) {\n var startRow = data.range.start.row + 1;\n var endRow = data.range.end.row;\n }\n\n this.foldAll(startRow, endRow, options.all ? 10000 : 0);\n } else if (options.children) {\n endRow = range ? range.end.row : this.getLength();\n this.foldAll(row + 1, endRow, options.all ? 10000 : 0);\n } else if (range) {\n if (options.all) range.collapseChildren = 10000;\n this.addFold(\"...\", range);\n }\n\n return range;\n };\n\n this.toggleFoldWidget = function (toggleParent) {\n var row = this.selection.getCursor().row;\n row = this.getRowFoldStart(row);\n var range = this.$toggleFoldWidget(row, {});\n if (range) return;\n var data = this.getParentFoldRangeData(row, true);\n range = data.range || data.firstRange;\n\n if (range) {\n row = range.start.row;\n var fold = this.getFoldAt(row, this.getLine(row).length, 1);\n\n if (fold) {\n this.removeFold(fold);\n } else {\n this.addFold(\"...\", range);\n }\n }\n };\n\n this.updateFoldWidgets = function (delta) {\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n\n if (len === 0) {\n this.foldWidgets[firstRow] = null;\n } else if (delta.action == 'remove') {\n this.foldWidgets.splice(firstRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(firstRow, 1);\n this.foldWidgets.splice.apply(this.foldWidgets, args);\n }\n };\n\n this.tokenizerUpdateFoldWidgets = function (e) {\n var rows = e.data;\n\n if (rows.first != rows.last) {\n if (this.foldWidgets.length > rows.first) this.foldWidgets.splice(rows.first, this.foldWidgets.length);\n }\n };\n }\n\n exports.Folding = Folding;\n});\nace.define(\"ace/edit_session/bracket_match\", [\"require\", \"exports\", \"module\", \"ace/token_iterator\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var TokenIterator = require(\"../token_iterator\").TokenIterator;\n\n var Range = require(\"../range\").Range;\n\n function BracketMatch() {\n this.findMatchingBracket = function (position, chr) {\n if (position.column == 0) return null;\n var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column - 1);\n if (charBeforeCursor == \"\") return null;\n var match = charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match) return null;\n if (match[1]) return this.$findClosingBracket(match[1], position);else return this.$findOpeningBracket(match[2], position);\n };\n\n this.getBracketRange = function (pos) {\n var line = this.getLine(pos.row);\n var before = true,\n range;\n var chr = line.charAt(pos.column - 1);\n var match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n\n if (!match) {\n chr = line.charAt(pos.column);\n pos = {\n row: pos.row,\n column: pos.column + 1\n };\n match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n before = false;\n }\n\n if (!match) return null;\n\n if (match[1]) {\n var bracketPos = this.$findClosingBracket(match[1], pos);\n if (!bracketPos) return null;\n range = Range.fromPoints(pos, bracketPos);\n\n if (!before) {\n range.end.column++;\n range.start.column--;\n }\n\n range.cursor = range.end;\n } else {\n var bracketPos = this.$findOpeningBracket(match[2], pos);\n if (!bracketPos) return null;\n range = Range.fromPoints(bracketPos, pos);\n\n if (!before) {\n range.start.column++;\n range.end.column--;\n }\n\n range.cursor = range.start;\n }\n\n return range;\n };\n\n this.$brackets = {\n \")\": \"(\",\n \"(\": \")\",\n \"]\": \"[\",\n \"[\": \"]\",\n \"{\": \"}\",\n \"}\": \"{\",\n \"<\": \">\",\n \">\": \"<\"\n };\n\n this.$findOpeningBracket = function (bracket, position, typeRe) {\n var openBracket = this.$brackets[bracket];\n var depth = 1;\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token) token = iterator.stepForward();\n if (!token) return;\n\n if (!typeRe) {\n typeRe = new RegExp(\"(\\\\.?\" + token.type.replace(\".\", \"\\\\.\").replace(\"rparen\", \".paren\").replace(/\\b(?:end)\\b/, \"(?:start|begin|end)\") + \")+\");\n }\n\n var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;\n var value = token.value;\n\n while (true) {\n while (valueIndex >= 0) {\n var chr = value.charAt(valueIndex);\n\n if (chr == openBracket) {\n depth -= 1;\n\n if (depth == 0) {\n return {\n row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()\n };\n }\n } else if (chr == bracket) {\n depth += 1;\n }\n\n valueIndex -= 1;\n }\n\n do {\n token = iterator.stepBackward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null) break;\n value = token.value;\n valueIndex = value.length - 1;\n }\n\n return null;\n };\n\n this.$findClosingBracket = function (bracket, position, typeRe) {\n var closingBracket = this.$brackets[bracket];\n var depth = 1;\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token) token = iterator.stepForward();\n if (!token) return;\n\n if (!typeRe) {\n typeRe = new RegExp(\"(\\\\.?\" + token.type.replace(\".\", \"\\\\.\").replace(\"lparen\", \".paren\").replace(/\\b(?:start|begin)\\b/, \"(?:start|begin|end)\") + \")+\");\n }\n\n var valueIndex = position.column - iterator.getCurrentTokenColumn();\n\n while (true) {\n var value = token.value;\n var valueLength = value.length;\n\n while (valueIndex < valueLength) {\n var chr = value.charAt(valueIndex);\n\n if (chr == closingBracket) {\n depth -= 1;\n\n if (depth == 0) {\n return {\n row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()\n };\n }\n } else if (chr == bracket) {\n depth += 1;\n }\n\n valueIndex += 1;\n }\n\n do {\n token = iterator.stepForward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null) break;\n valueIndex = 0;\n }\n\n return null;\n };\n }\n\n exports.BracketMatch = BracketMatch;\n});\nace.define(\"ace/edit_session\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/lang\", \"ace/bidihandler\", \"ace/config\", \"ace/lib/event_emitter\", \"ace/selection\", \"ace/mode/text\", \"ace/range\", \"ace/document\", \"ace/background_tokenizer\", \"ace/search_highlight\", \"ace/edit_session/folding\", \"ace/edit_session/bracket_match\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var lang = require(\"./lib/lang\");\n\n var BidiHandler = require(\"./bidihandler\").BidiHandler;\n\n var config = require(\"./config\");\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var Selection = require(\"./selection\").Selection;\n\n var TextMode = require(\"./mode/text\").Mode;\n\n var Range = require(\"./range\").Range;\n\n var Document = require(\"./document\").Document;\n\n var BackgroundTokenizer = require(\"./background_tokenizer\").BackgroundTokenizer;\n\n var SearchHighlight = require(\"./search_highlight\").SearchHighlight;\n\n var EditSession = function EditSession(text, mode) {\n this.$breakpoints = [];\n this.$decorations = [];\n this.$frontMarkers = {};\n this.$backMarkers = {};\n this.$markerId = 1;\n this.$undoSelect = true;\n this.$foldData = [];\n this.id = \"session\" + ++EditSession.$uid;\n\n this.$foldData.toString = function () {\n return this.join(\"\\n\");\n };\n\n this.on(\"changeFold\", this.onChangeFold.bind(this));\n this.$onChange = this.onChange.bind(this);\n if (typeof text != \"object\" || !text.getLine) text = new Document(text);\n this.setDocument(text);\n this.selection = new Selection(this);\n this.$bidiHandler = new BidiHandler(this);\n config.resetOptions(this);\n this.setMode(mode);\n\n config._signal(\"session\", this);\n };\n\n EditSession.$uid = 0;\n (function () {\n oop.implement(this, EventEmitter);\n\n this.setDocument = function (doc) {\n if (this.doc) this.doc.removeListener(\"change\", this.$onChange);\n this.doc = doc;\n doc.on(\"change\", this.$onChange);\n if (this.bgTokenizer) this.bgTokenizer.setDocument(this.getDocument());\n this.resetCaches();\n };\n\n this.getDocument = function () {\n return this.doc;\n };\n\n this.$resetRowCache = function (docRow) {\n if (!docRow) {\n this.$docRowCache = [];\n this.$screenRowCache = [];\n return;\n }\n\n var l = this.$docRowCache.length;\n var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;\n\n if (l > i) {\n this.$docRowCache.splice(i, l);\n this.$screenRowCache.splice(i, l);\n }\n };\n\n this.$getRowCacheIndex = function (cacheArray, val) {\n var low = 0;\n var hi = cacheArray.length - 1;\n\n while (low <= hi) {\n var mid = low + hi >> 1;\n var c = cacheArray[mid];\n if (val > c) low = mid + 1;else if (val < c) hi = mid - 1;else return mid;\n }\n\n return low - 1;\n };\n\n this.resetCaches = function () {\n this.$modified = true;\n this.$wrapData = [];\n this.$rowLengthCache = [];\n this.$resetRowCache(0);\n if (this.bgTokenizer) this.bgTokenizer.start(0);\n };\n\n this.onChangeFold = function (e) {\n var fold = e.data;\n this.$resetRowCache(fold.start.row);\n };\n\n this.onChange = function (delta) {\n this.$modified = true;\n this.$bidiHandler.onChange(delta);\n this.$resetRowCache(delta.start.row);\n var removedFolds = this.$updateInternalDataOnChange(delta);\n\n if (!this.$fromUndo && this.$undoManager) {\n if (removedFolds && removedFolds.length) {\n this.$undoManager.add({\n action: \"removeFolds\",\n folds: removedFolds\n }, this.mergeUndoDeltas);\n this.mergeUndoDeltas = true;\n }\n\n this.$undoManager.add(delta, this.mergeUndoDeltas);\n this.mergeUndoDeltas = true;\n this.$informUndoManager.schedule();\n }\n\n this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta);\n\n this._signal(\"change\", delta);\n };\n\n this.setValue = function (text) {\n this.doc.setValue(text);\n this.selection.moveTo(0, 0);\n this.$resetRowCache(0);\n this.setUndoManager(this.$undoManager);\n this.getUndoManager().reset();\n };\n\n this.getValue = this.toString = function () {\n return this.doc.getValue();\n };\n\n this.getSelection = function () {\n return this.selection;\n };\n\n this.getState = function (row) {\n return this.bgTokenizer.getState(row);\n };\n\n this.getTokens = function (row) {\n return this.bgTokenizer.getTokens(row);\n };\n\n this.getTokenAt = function (row, column) {\n var tokens = this.bgTokenizer.getTokens(row);\n var token,\n c = 0;\n\n if (column == null) {\n var i = tokens.length - 1;\n c = this.getLine(row).length;\n } else {\n for (var i = 0; i < tokens.length; i++) {\n c += tokens[i].value.length;\n if (c >= column) break;\n }\n }\n\n token = tokens[i];\n if (!token) return null;\n token.index = i;\n token.start = c - token.value.length;\n return token;\n };\n\n this.setUndoManager = function (undoManager) {\n this.$undoManager = undoManager;\n if (this.$informUndoManager) this.$informUndoManager.cancel();\n\n if (undoManager) {\n var self = this;\n undoManager.addSession(this);\n\n this.$syncInformUndoManager = function () {\n self.$informUndoManager.cancel();\n self.mergeUndoDeltas = false;\n };\n\n this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);\n } else {\n this.$syncInformUndoManager = function () {};\n }\n };\n\n this.markUndoGroup = function () {\n if (this.$syncInformUndoManager) this.$syncInformUndoManager();\n };\n\n this.$defaultUndoManager = {\n undo: function undo() {},\n redo: function redo() {},\n hasUndo: function hasUndo() {},\n hasRedo: function hasRedo() {},\n reset: function reset() {},\n add: function add() {},\n addSelection: function addSelection() {},\n startNewGroup: function startNewGroup() {},\n addSession: function addSession() {}\n };\n\n this.getUndoManager = function () {\n return this.$undoManager || this.$defaultUndoManager;\n };\n\n this.getTabString = function () {\n if (this.getUseSoftTabs()) {\n return lang.stringRepeat(\" \", this.getTabSize());\n } else {\n return \"\\t\";\n }\n };\n\n this.setUseSoftTabs = function (val) {\n this.setOption(\"useSoftTabs\", val);\n };\n\n this.getUseSoftTabs = function () {\n return this.$useSoftTabs && !this.$mode.$indentWithTabs;\n };\n\n this.setTabSize = function (tabSize) {\n this.setOption(\"tabSize\", tabSize);\n };\n\n this.getTabSize = function () {\n return this.$tabSize;\n };\n\n this.isTabStop = function (position) {\n return this.$useSoftTabs && position.column % this.$tabSize === 0;\n };\n\n this.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) {\n this.setOption(\"navigateWithinSoftTabs\", navigateWithinSoftTabs);\n };\n\n this.getNavigateWithinSoftTabs = function () {\n return this.$navigateWithinSoftTabs;\n };\n\n this.$overwrite = false;\n\n this.setOverwrite = function (overwrite) {\n this.setOption(\"overwrite\", overwrite);\n };\n\n this.getOverwrite = function () {\n return this.$overwrite;\n };\n\n this.toggleOverwrite = function () {\n this.setOverwrite(!this.$overwrite);\n };\n\n this.addGutterDecoration = function (row, className) {\n if (!this.$decorations[row]) this.$decorations[row] = \"\";\n this.$decorations[row] += \" \" + className;\n\n this._signal(\"changeBreakpoint\", {});\n };\n\n this.removeGutterDecoration = function (row, className) {\n this.$decorations[row] = (this.$decorations[row] || \"\").replace(\" \" + className, \"\");\n\n this._signal(\"changeBreakpoint\", {});\n };\n\n this.getBreakpoints = function () {\n return this.$breakpoints;\n };\n\n this.setBreakpoints = function (rows) {\n this.$breakpoints = [];\n\n for (var i = 0; i < rows.length; i++) {\n this.$breakpoints[rows[i]] = \"ace_breakpoint\";\n }\n\n this._signal(\"changeBreakpoint\", {});\n };\n\n this.clearBreakpoints = function () {\n this.$breakpoints = [];\n\n this._signal(\"changeBreakpoint\", {});\n };\n\n this.setBreakpoint = function (row, className) {\n if (className === undefined) className = \"ace_breakpoint\";\n if (className) this.$breakpoints[row] = className;else delete this.$breakpoints[row];\n\n this._signal(\"changeBreakpoint\", {});\n };\n\n this.clearBreakpoint = function (row) {\n delete this.$breakpoints[row];\n\n this._signal(\"changeBreakpoint\", {});\n };\n\n this.addMarker = function (range, clazz, type, inFront) {\n var id = this.$markerId++;\n var marker = {\n range: range,\n type: type || \"line\",\n renderer: typeof type == \"function\" ? type : null,\n clazz: clazz,\n inFront: !!inFront,\n id: id\n };\n\n if (inFront) {\n this.$frontMarkers[id] = marker;\n\n this._signal(\"changeFrontMarker\");\n } else {\n this.$backMarkers[id] = marker;\n\n this._signal(\"changeBackMarker\");\n }\n\n return id;\n };\n\n this.addDynamicMarker = function (marker, inFront) {\n if (!marker.update) return;\n var id = this.$markerId++;\n marker.id = id;\n marker.inFront = !!inFront;\n\n if (inFront) {\n this.$frontMarkers[id] = marker;\n\n this._signal(\"changeFrontMarker\");\n } else {\n this.$backMarkers[id] = marker;\n\n this._signal(\"changeBackMarker\");\n }\n\n return marker;\n };\n\n this.removeMarker = function (markerId) {\n var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];\n if (!marker) return;\n var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;\n delete markers[markerId];\n\n this._signal(marker.inFront ? \"changeFrontMarker\" : \"changeBackMarker\");\n };\n\n this.getMarkers = function (inFront) {\n return inFront ? this.$frontMarkers : this.$backMarkers;\n };\n\n this.highlight = function (re) {\n if (!this.$searchHighlight) {\n var highlight = new SearchHighlight(null, \"ace_selected-word\", \"text\");\n this.$searchHighlight = this.addDynamicMarker(highlight);\n }\n\n this.$searchHighlight.setRegexp(re);\n };\n\n this.highlightLines = function (startRow, endRow, clazz, inFront) {\n if (typeof endRow != \"number\") {\n clazz = endRow;\n endRow = startRow;\n }\n\n if (!clazz) clazz = \"ace_step\";\n var range = new Range(startRow, 0, endRow, Infinity);\n range.id = this.addMarker(range, clazz, \"fullLine\", inFront);\n return range;\n };\n\n this.setAnnotations = function (annotations) {\n this.$annotations = annotations;\n\n this._signal(\"changeAnnotation\", {});\n };\n\n this.getAnnotations = function () {\n return this.$annotations || [];\n };\n\n this.clearAnnotations = function () {\n this.setAnnotations([]);\n };\n\n this.$detectNewLine = function (text) {\n var match = text.match(/^.*?(\\r?\\n)/m);\n\n if (match) {\n this.$autoNewLine = match[1];\n } else {\n this.$autoNewLine = \"\\n\";\n }\n };\n\n this.getWordRange = function (row, column) {\n var line = this.getLine(row);\n var inToken = false;\n if (column > 0) inToken = !!line.charAt(column - 1).match(this.tokenRe);\n if (!inToken) inToken = !!line.charAt(column).match(this.tokenRe);\n if (inToken) var re = this.tokenRe;else if (/^\\s+$/.test(line.slice(column - 1, column + 1))) var re = /\\s/;else var re = this.nonTokenRe;\n var start = column;\n\n if (start > 0) {\n do {\n start--;\n } while (start >= 0 && line.charAt(start).match(re));\n\n start++;\n }\n\n var end = column;\n\n while (end < line.length && line.charAt(end).match(re)) {\n end++;\n }\n\n return new Range(row, start, row, end);\n };\n\n this.getAWordRange = function (row, column) {\n var wordRange = this.getWordRange(row, column);\n var line = this.getLine(wordRange.end.row);\n\n while (line.charAt(wordRange.end.column).match(/[ \\t]/)) {\n wordRange.end.column += 1;\n }\n\n return wordRange;\n };\n\n this.setNewLineMode = function (newLineMode) {\n this.doc.setNewLineMode(newLineMode);\n };\n\n this.getNewLineMode = function () {\n return this.doc.getNewLineMode();\n };\n\n this.setUseWorker = function (useWorker) {\n this.setOption(\"useWorker\", useWorker);\n };\n\n this.getUseWorker = function () {\n return this.$useWorker;\n };\n\n this.onReloadTokenizer = function (e) {\n var rows = e.data;\n this.bgTokenizer.start(rows.first);\n\n this._signal(\"tokenizerUpdate\", e);\n };\n\n this.$modes = config.$modes;\n this.$mode = null;\n this.$modeId = null;\n\n this.setMode = function (mode, cb) {\n if (mode && typeof mode === \"object\") {\n if (mode.getTokenizer) return this.$onChangeMode(mode);\n var options = mode;\n var path = options.path;\n } else {\n path = mode || \"ace/mode/text\";\n }\n\n if (!this.$modes[\"ace/mode/text\"]) this.$modes[\"ace/mode/text\"] = new TextMode();\n\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n cb && cb();\n return;\n }\n\n this.$modeId = path;\n config.loadModule([\"mode\", path], function (m) {\n if (this.$modeId !== path) return cb && cb();\n\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n } else if (m && m.Mode) {\n m = new m.Mode(options);\n\n if (!options) {\n this.$modes[path] = m;\n m.$id = path;\n }\n\n this.$onChangeMode(m);\n }\n\n cb && cb();\n }.bind(this));\n if (!this.$mode) this.$onChangeMode(this.$modes[\"ace/mode/text\"], true);\n };\n\n this.$onChangeMode = function (mode, $isPlaceholder) {\n if (!$isPlaceholder) this.$modeId = mode.$id;\n if (this.$mode === mode) return;\n this.$mode = mode;\n this.$stopWorker();\n if (this.$useWorker) this.$startWorker();\n var tokenizer = mode.getTokenizer();\n\n if (tokenizer.addEventListener !== undefined) {\n var onReloadTokenizer = this.onReloadTokenizer.bind(this);\n tokenizer.addEventListener(\"update\", onReloadTokenizer);\n }\n\n if (!this.bgTokenizer) {\n this.bgTokenizer = new BackgroundTokenizer(tokenizer);\n\n var _self = this;\n\n this.bgTokenizer.addEventListener(\"update\", function (e) {\n _self._signal(\"tokenizerUpdate\", e);\n });\n } else {\n this.bgTokenizer.setTokenizer(tokenizer);\n }\n\n this.bgTokenizer.setDocument(this.getDocument());\n this.tokenRe = mode.tokenRe;\n this.nonTokenRe = mode.nonTokenRe;\n\n if (!$isPlaceholder) {\n if (mode.attachToSession) mode.attachToSession(this);\n this.$options.wrapMethod.set.call(this, this.$wrapMethod);\n this.$setFolding(mode.foldingRules);\n this.bgTokenizer.start(0);\n\n this._emit(\"changeMode\");\n }\n };\n\n this.$stopWorker = function () {\n if (this.$worker) {\n this.$worker.terminate();\n this.$worker = null;\n }\n };\n\n this.$startWorker = function () {\n try {\n this.$worker = this.$mode.createWorker(this);\n } catch (e) {\n config.warn(\"Could not load worker\", e);\n this.$worker = null;\n }\n };\n\n this.getMode = function () {\n return this.$mode;\n };\n\n this.$scrollTop = 0;\n\n this.setScrollTop = function (scrollTop) {\n if (this.$scrollTop === scrollTop || isNaN(scrollTop)) return;\n this.$scrollTop = scrollTop;\n\n this._signal(\"changeScrollTop\", scrollTop);\n };\n\n this.getScrollTop = function () {\n return this.$scrollTop;\n };\n\n this.$scrollLeft = 0;\n\n this.setScrollLeft = function (scrollLeft) {\n if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) return;\n this.$scrollLeft = scrollLeft;\n\n this._signal(\"changeScrollLeft\", scrollLeft);\n };\n\n this.getScrollLeft = function () {\n return this.$scrollLeft;\n };\n\n this.getScreenWidth = function () {\n this.$computeWidth();\n if (this.lineWidgets) return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);\n return this.screenWidth;\n };\n\n this.getLineWidgetMaxWidth = function () {\n if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;\n var width = 0;\n this.lineWidgets.forEach(function (w) {\n if (w && w.screenWidth > width) width = w.screenWidth;\n });\n return this.lineWidgetWidth = width;\n };\n\n this.$computeWidth = function (force) {\n if (this.$modified || force) {\n this.$modified = false;\n if (this.$useWrapMode) return this.screenWidth = this.$wrapLimit;\n var lines = this.doc.getAllLines();\n var cache = this.$rowLengthCache;\n var longestScreenLine = 0;\n var foldIndex = 0;\n var foldLine = this.$foldData[foldIndex];\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n var len = lines.length;\n\n for (var i = 0; i < len; i++) {\n if (i > foldStart) {\n i = foldLine.end.row + 1;\n if (i >= len) break;\n foldLine = this.$foldData[foldIndex++];\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n\n if (cache[i] == null) cache[i] = this.$getStringScreenWidth(lines[i])[0];\n if (cache[i] > longestScreenLine) longestScreenLine = cache[i];\n }\n\n this.screenWidth = longestScreenLine;\n }\n };\n\n this.getLine = function (row) {\n return this.doc.getLine(row);\n };\n\n this.getLines = function (firstRow, lastRow) {\n return this.doc.getLines(firstRow, lastRow);\n };\n\n this.getLength = function () {\n return this.doc.getLength();\n };\n\n this.getTextRange = function (range) {\n return this.doc.getTextRange(range || this.selection.getRange());\n };\n\n this.insert = function (position, text) {\n return this.doc.insert(position, text);\n };\n\n this.remove = function (range) {\n return this.doc.remove(range);\n };\n\n this.removeFullLines = function (firstRow, lastRow) {\n return this.doc.removeFullLines(firstRow, lastRow);\n };\n\n this.undoChanges = function (deltas, dontSelect) {\n if (!deltas.length) return;\n this.$fromUndo = true;\n\n for (var i = deltas.length - 1; i != -1; i--) {\n var delta = deltas[i];\n\n if (delta.action == \"insert\" || delta.action == \"remove\") {\n this.doc.revertDelta(delta);\n } else if (delta.folds) {\n this.addFolds(delta.folds);\n }\n }\n\n if (!dontSelect && this.$undoSelect) {\n if (deltas.selectionBefore) this.selection.fromJSON(deltas.selectionBefore);else this.selection.setRange(this.$getUndoSelection(deltas, true));\n }\n\n this.$fromUndo = false;\n };\n\n this.redoChanges = function (deltas, dontSelect) {\n if (!deltas.length) return;\n this.$fromUndo = true;\n\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n\n if (delta.action == \"insert\" || delta.action == \"remove\") {\n this.doc.applyDelta(delta);\n }\n }\n\n if (!dontSelect && this.$undoSelect) {\n if (deltas.selectionAfter) this.selection.fromJSON(deltas.selectionAfter);else this.selection.setRange(this.$getUndoSelection(deltas, false));\n }\n\n this.$fromUndo = false;\n };\n\n this.setUndoSelect = function (enable) {\n this.$undoSelect = enable;\n };\n\n this.$getUndoSelection = function (deltas, isUndo) {\n function isInsert(delta) {\n return isUndo ? delta.action !== \"insert\" : delta.action === \"insert\";\n }\n\n var range, point;\n var lastDeltaIsInsert;\n\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (!delta.start) continue; // skip folds\n\n if (!range) {\n if (isInsert(delta)) {\n range = Range.fromPoints(delta.start, delta.end);\n lastDeltaIsInsert = true;\n } else {\n range = Range.fromPoints(delta.start, delta.start);\n lastDeltaIsInsert = false;\n }\n\n continue;\n }\n\n if (isInsert(delta)) {\n point = delta.start;\n\n if (range.compare(point.row, point.column) == -1) {\n range.setStart(point);\n }\n\n point = delta.end;\n\n if (range.compare(point.row, point.column) == 1) {\n range.setEnd(point);\n }\n\n lastDeltaIsInsert = true;\n } else {\n point = delta.start;\n\n if (range.compare(point.row, point.column) == -1) {\n range = Range.fromPoints(delta.start, delta.start);\n }\n\n lastDeltaIsInsert = false;\n }\n }\n\n return range;\n };\n\n this.replace = function (range, text) {\n return this.doc.replace(range, text);\n };\n\n this.moveText = function (fromRange, toPosition, copy) {\n var text = this.getTextRange(fromRange);\n var folds = this.getFoldsInRange(fromRange);\n var toRange = Range.fromPoints(toPosition, toPosition);\n\n if (!copy) {\n this.remove(fromRange);\n var rowDiff = fromRange.start.row - fromRange.end.row;\n var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;\n\n if (collDiff) {\n if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column) toRange.start.column += collDiff;\n if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column) toRange.end.column += collDiff;\n }\n\n if (rowDiff && toRange.start.row >= fromRange.end.row) {\n toRange.start.row += rowDiff;\n toRange.end.row += rowDiff;\n }\n }\n\n toRange.end = this.insert(toRange.start, text);\n\n if (folds.length) {\n var oldStart = fromRange.start;\n var newStart = toRange.start;\n var rowDiff = newStart.row - oldStart.row;\n var collDiff = newStart.column - oldStart.column;\n this.addFolds(folds.map(function (x) {\n x = x.clone();\n if (x.start.row == oldStart.row) x.start.column += collDiff;\n if (x.end.row == oldStart.row) x.end.column += collDiff;\n x.start.row += rowDiff;\n x.end.row += rowDiff;\n return x;\n }));\n }\n\n return toRange;\n };\n\n this.indentRows = function (startRow, endRow, indentString) {\n indentString = indentString.replace(/\\t/g, this.getTabString());\n\n for (var row = startRow; row <= endRow; row++) {\n this.doc.insertInLine({\n row: row,\n column: 0\n }, indentString);\n }\n };\n\n this.outdentRows = function (range) {\n var rowRange = range.collapseRows();\n var deleteRange = new Range(0, 0, 0, 0);\n var size = this.getTabSize();\n\n for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {\n var line = this.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n\n for (var j = 0; j < size; ++j) {\n if (line.charAt(j) != ' ') break;\n }\n\n if (j < size && line.charAt(j) == '\\t') {\n deleteRange.start.column = j;\n deleteRange.end.column = j + 1;\n } else {\n deleteRange.start.column = 0;\n deleteRange.end.column = j;\n }\n\n this.remove(deleteRange);\n }\n };\n\n this.$moveLines = function (firstRow, lastRow, dir) {\n firstRow = this.getRowFoldStart(firstRow);\n lastRow = this.getRowFoldEnd(lastRow);\n\n if (dir < 0) {\n var row = this.getRowFoldStart(firstRow + dir);\n if (row < 0) return 0;\n var diff = row - firstRow;\n } else if (dir > 0) {\n var row = this.getRowFoldEnd(lastRow + dir);\n if (row > this.doc.getLength() - 1) return 0;\n var diff = row - lastRow;\n } else {\n firstRow = this.$clipRowToDocument(firstRow);\n lastRow = this.$clipRowToDocument(lastRow);\n var diff = lastRow - firstRow + 1;\n }\n\n var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);\n var folds = this.getFoldsInRange(range).map(function (x) {\n x = x.clone();\n x.start.row += diff;\n x.end.row += diff;\n return x;\n });\n var lines = dir == 0 ? this.doc.getLines(firstRow, lastRow) : this.doc.removeFullLines(firstRow, lastRow);\n this.doc.insertFullLines(firstRow + diff, lines);\n folds.length && this.addFolds(folds);\n return diff;\n };\n\n this.moveLinesUp = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, -1);\n };\n\n this.moveLinesDown = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 1);\n };\n\n this.duplicateLines = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 0);\n };\n\n this.$clipRowToDocument = function (row) {\n return Math.max(0, Math.min(row, this.doc.getLength() - 1));\n };\n\n this.$clipColumnToRow = function (row, column) {\n if (column < 0) return 0;\n return Math.min(this.doc.getLine(row).length, column);\n };\n\n this.$clipPositionToDocument = function (row, column) {\n column = Math.max(0, column);\n\n if (row < 0) {\n row = 0;\n column = 0;\n } else {\n var len = this.doc.getLength();\n\n if (row >= len) {\n row = len - 1;\n column = this.doc.getLine(len - 1).length;\n } else {\n column = Math.min(this.doc.getLine(row).length, column);\n }\n }\n\n return {\n row: row,\n column: column\n };\n };\n\n this.$clipRangeToDocument = function (range) {\n if (range.start.row < 0) {\n range.start.row = 0;\n range.start.column = 0;\n } else {\n range.start.column = this.$clipColumnToRow(range.start.row, range.start.column);\n }\n\n var len = this.doc.getLength() - 1;\n\n if (range.end.row > len) {\n range.end.row = len;\n range.end.column = this.doc.getLine(len).length;\n } else {\n range.end.column = this.$clipColumnToRow(range.end.row, range.end.column);\n }\n\n return range;\n };\n\n this.$wrapLimit = 80;\n this.$useWrapMode = false;\n this.$wrapLimitRange = {\n min: null,\n max: null\n };\n\n this.setUseWrapMode = function (useWrapMode) {\n if (useWrapMode != this.$useWrapMode) {\n this.$useWrapMode = useWrapMode;\n this.$modified = true;\n this.$resetRowCache(0);\n\n if (useWrapMode) {\n var len = this.getLength();\n this.$wrapData = Array(len);\n this.$updateWrapData(0, len - 1);\n }\n\n this._signal(\"changeWrapMode\");\n }\n };\n\n this.getUseWrapMode = function () {\n return this.$useWrapMode;\n };\n\n this.setWrapLimitRange = function (min, max) {\n if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {\n this.$wrapLimitRange = {\n min: min,\n max: max\n };\n this.$modified = true;\n this.$bidiHandler.markAsDirty();\n if (this.$useWrapMode) this._signal(\"changeWrapMode\");\n }\n };\n\n this.adjustWrapLimit = function (desiredLimit, $printMargin) {\n var limits = this.$wrapLimitRange;\n if (limits.max < 0) limits = {\n min: $printMargin,\n max: $printMargin\n };\n var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);\n\n if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {\n this.$wrapLimit = wrapLimit;\n this.$modified = true;\n\n if (this.$useWrapMode) {\n this.$updateWrapData(0, this.getLength() - 1);\n this.$resetRowCache(0);\n\n this._signal(\"changeWrapLimit\");\n }\n\n return true;\n }\n\n return false;\n };\n\n this.$constrainWrapLimit = function (wrapLimit, min, max) {\n if (min) wrapLimit = Math.max(min, wrapLimit);\n if (max) wrapLimit = Math.min(max, wrapLimit);\n return wrapLimit;\n };\n\n this.getWrapLimit = function () {\n return this.$wrapLimit;\n };\n\n this.setWrapLimit = function (limit) {\n this.setWrapLimitRange(limit, limit);\n };\n\n this.getWrapLimitRange = function () {\n return {\n min: this.$wrapLimitRange.min,\n max: this.$wrapLimitRange.max\n };\n };\n\n this.$updateInternalDataOnChange = function (delta) {\n var useWrapMode = this.$useWrapMode;\n var action = delta.action;\n var start = delta.start;\n var end = delta.end;\n var firstRow = start.row;\n var lastRow = end.row;\n var len = lastRow - firstRow;\n var removedFolds = null;\n this.$updating = true;\n\n if (len != 0) {\n if (action === \"remove\") {\n this[useWrapMode ? \"$wrapData\" : \"$rowLengthCache\"].splice(firstRow, len);\n var foldLines = this.$foldData;\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n var foldLine = this.getFoldLine(end.row);\n var idx = 0;\n\n if (foldLine) {\n foldLine.addRemoveChars(end.row, end.column, start.column - end.column);\n foldLine.shiftRow(-len);\n var foldLineBefore = this.getFoldLine(firstRow);\n\n if (foldLineBefore && foldLineBefore !== foldLine) {\n foldLineBefore.merge(foldLine);\n foldLine = foldLineBefore;\n }\n\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n\n if (foldLine.start.row >= end.row) {\n foldLine.shiftRow(-len);\n }\n }\n\n lastRow = firstRow;\n } else {\n var args = Array(len);\n args.unshift(firstRow, 0);\n var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache;\n arr.splice.apply(arr, args);\n var foldLines = this.$foldData;\n var foldLine = this.getFoldLine(firstRow);\n var idx = 0;\n\n if (foldLine) {\n var cmp = foldLine.range.compareInside(start.row, start.column);\n\n if (cmp == 0) {\n foldLine = foldLine.split(start.row, start.column);\n\n if (foldLine) {\n foldLine.shiftRow(len);\n foldLine.addRemoveChars(lastRow, 0, end.column - start.column);\n }\n } else if (cmp == -1) {\n foldLine.addRemoveChars(firstRow, 0, end.column - start.column);\n foldLine.shiftRow(len);\n }\n\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n\n if (foldLine.start.row >= firstRow) {\n foldLine.shiftRow(len);\n }\n }\n }\n } else {\n len = Math.abs(delta.start.column - delta.end.column);\n\n if (action === \"remove\") {\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n len = -len;\n }\n\n var foldLine = this.getFoldLine(firstRow);\n\n if (foldLine) {\n foldLine.addRemoveChars(firstRow, start.column, len);\n }\n }\n\n if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {\n console.error(\"doc.getLength() and $wrapData.length have to be the same!\");\n }\n\n this.$updating = false;\n if (useWrapMode) this.$updateWrapData(firstRow, lastRow);else this.$updateRowLengthCache(firstRow, lastRow);\n return removedFolds;\n };\n\n this.$updateRowLengthCache = function (firstRow, lastRow, b) {\n this.$rowLengthCache[firstRow] = null;\n this.$rowLengthCache[lastRow] = null;\n };\n\n this.$updateWrapData = function (firstRow, lastRow) {\n var lines = this.doc.getAllLines();\n var tabSize = this.getTabSize();\n var wrapData = this.$wrapData;\n var wrapLimit = this.$wrapLimit;\n var tokens;\n var foldLine;\n var row = firstRow;\n lastRow = Math.min(lastRow, lines.length - 1);\n\n while (row <= lastRow) {\n foldLine = this.getFoldLine(row, foldLine);\n\n if (!foldLine) {\n tokens = this.$getDisplayTokens(lines[row]);\n wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row++;\n } else {\n tokens = [];\n foldLine.walk(function (placeholder, row, column, lastColumn) {\n var walkTokens;\n\n if (placeholder != null) {\n walkTokens = this.$getDisplayTokens(placeholder, tokens.length);\n walkTokens[0] = PLACEHOLDER_START;\n\n for (var i = 1; i < walkTokens.length; i++) {\n walkTokens[i] = PLACEHOLDER_BODY;\n }\n } else {\n walkTokens = this.$getDisplayTokens(lines[row].substring(lastColumn, column), tokens.length);\n }\n\n tokens = tokens.concat(walkTokens);\n }.bind(this), foldLine.end.row, lines[foldLine.end.row].length + 1);\n wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row = foldLine.end.row + 1;\n }\n }\n };\n\n var CHAR = 1,\n CHAR_EXT = 2,\n PLACEHOLDER_START = 3,\n PLACEHOLDER_BODY = 4,\n PUNCTUATION = 9,\n SPACE = 10,\n TAB = 11,\n TAB_SPACE = 12;\n\n this.$computeWrapSplits = function (tokens, wrapLimit, tabSize) {\n if (tokens.length == 0) {\n return [];\n }\n\n var splits = [];\n var displayLength = tokens.length;\n var lastSplit = 0,\n lastDocSplit = 0;\n var isCode = this.$wrapAsCode;\n var indentedSoftWrap = this.$indentedSoftWrap;\n var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8) || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);\n\n function getWrapIndent() {\n var indentation = 0;\n if (maxIndent === 0) return indentation;\n\n if (indentedSoftWrap) {\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token == SPACE) indentation += 1;else if (token == TAB) indentation += tabSize;else if (token == TAB_SPACE) continue;else break;\n }\n }\n\n if (isCode && indentedSoftWrap !== false) indentation += tabSize;\n return Math.min(indentation, maxIndent);\n }\n\n function addSplit(screenPos) {\n var len = screenPos - lastSplit;\n\n for (var i = lastSplit; i < screenPos; i++) {\n var ch = tokens[i];\n if (ch === 12 || ch === 2) len -= 1;\n }\n\n if (!splits.length) {\n indent = getWrapIndent();\n splits.indent = indent;\n }\n\n lastDocSplit += len;\n splits.push(lastDocSplit);\n lastSplit = screenPos;\n }\n\n var indent = 0;\n\n while (displayLength - lastSplit > wrapLimit - indent) {\n var split = lastSplit + wrapLimit - indent;\n\n if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {\n addSplit(split);\n continue;\n }\n\n if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {\n for (split; split != lastSplit - 1; split--) {\n if (tokens[split] == PLACEHOLDER_START) {\n break;\n }\n }\n\n if (split > lastSplit) {\n addSplit(split);\n continue;\n }\n\n split = lastSplit + wrapLimit;\n\n for (split; split < tokens.length; split++) {\n if (tokens[split] != PLACEHOLDER_BODY) {\n break;\n }\n }\n\n if (split == tokens.length) {\n break; // Breaks the while-loop.\n }\n\n addSplit(split);\n continue;\n }\n\n var minSplit = Math.max(split - (wrapLimit - (wrapLimit >> 2)), lastSplit - 1);\n\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split--;\n }\n\n if (isCode) {\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split--;\n }\n\n while (split > minSplit && tokens[split] == PUNCTUATION) {\n split--;\n }\n } else {\n while (split > minSplit && tokens[split] < SPACE) {\n split--;\n }\n }\n\n if (split > minSplit) {\n addSplit(++split);\n continue;\n }\n\n split = lastSplit + wrapLimit;\n if (tokens[split] == CHAR_EXT) split--;\n addSplit(split - indent);\n }\n\n return splits;\n };\n\n this.$getDisplayTokens = function (str, offset) {\n var arr = [];\n var tabSize;\n offset = offset || 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n\n if (c == 9) {\n tabSize = this.getScreenTabSize(arr.length + offset);\n arr.push(TAB);\n\n for (var n = 1; n < tabSize; n++) {\n arr.push(TAB_SPACE);\n }\n } else if (c == 32) {\n arr.push(SPACE);\n } else if (c > 39 && c < 48 || c > 57 && c < 64) {\n arr.push(PUNCTUATION);\n } else if (c >= 0x1100 && isFullWidth(c)) {\n arr.push(CHAR, CHAR_EXT);\n } else {\n arr.push(CHAR);\n }\n }\n\n return arr;\n };\n\n this.$getStringScreenWidth = function (str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn == 0) return [0, 0];\n if (maxScreenColumn == null) maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n var c, column;\n\n for (column = 0; column < str.length; column++) {\n c = str.charCodeAt(column);\n\n if (c == 9) {\n screenColumn += this.getScreenTabSize(screenColumn);\n } else if (c >= 0x1100 && isFullWidth(c)) {\n screenColumn += 2;\n } else {\n screenColumn += 1;\n }\n\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n\n return [screenColumn, column];\n };\n\n this.lineWidgets = null;\n\n this.getRowLength = function (row) {\n if (this.lineWidgets) var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;else h = 0;\n\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n\n this.getRowLineCount = function (row) {\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1;\n } else {\n return this.$wrapData[row].length + 1;\n }\n };\n\n this.getRowWrapIndent = function (screenRow) {\n if (this.$useWrapMode) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n var splits = this.$wrapData[pos.row];\n return splits.length && splits[0] < pos.column ? splits.indent : 0;\n } else {\n return 0;\n }\n };\n\n this.getScreenLastRowColumn = function (screenRow) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n return this.documentToScreenColumn(pos.row, pos.column);\n };\n\n this.getDocumentLastRowColumn = function (docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.getScreenLastRowColumn(screenRow);\n };\n\n this.getDocumentLastRowColumnPosition = function (docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);\n };\n\n this.getRowSplitData = function (row) {\n if (!this.$useWrapMode) {\n return undefined;\n } else {\n return this.$wrapData[row];\n }\n };\n\n this.getScreenTabSize = function (screenColumn) {\n return this.$tabSize - (screenColumn % this.$tabSize | 0);\n };\n\n this.screenToDocumentRow = function (screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).row;\n };\n\n this.screenToDocumentColumn = function (screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).column;\n };\n\n this.screenToDocumentPosition = function (screenRow, screenColumn, offsetX) {\n if (screenRow < 0) return {\n row: 0,\n column: 0\n };\n var line;\n var docRow = 0;\n var docColumn = 0;\n var column;\n var row = 0;\n var rowLength = 0;\n var rowCache = this.$screenRowCache;\n var i = this.$getRowCacheIndex(rowCache, screenRow);\n var l = rowCache.length;\n\n if (l && i >= 0) {\n var row = rowCache[i];\n var docRow = this.$docRowCache[i];\n var doCache = screenRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var maxRow = this.getLength() - 1;\n var foldLine = this.getNextFoldLine(docRow);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (row <= screenRow) {\n rowLength = this.getRowLength(docRow);\n\n if (row + rowLength > screenRow || docRow >= maxRow) {\n break;\n } else {\n row += rowLength;\n docRow++;\n\n if (docRow > foldStart) {\n docRow = foldLine.end.row + 1;\n foldLine = this.getNextFoldLine(docRow, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n }\n\n if (doCache) {\n this.$docRowCache.push(docRow);\n this.$screenRowCache.push(row);\n }\n }\n\n if (foldLine && foldLine.start.row <= docRow) {\n line = this.getFoldDisplayLine(foldLine);\n docRow = foldLine.start.row;\n } else if (row + rowLength <= screenRow || docRow > maxRow) {\n return {\n row: maxRow,\n column: this.getLine(maxRow).length\n };\n } else {\n line = this.getLine(docRow);\n foldLine = null;\n }\n\n var wrapIndent = 0,\n splitIndex = Math.floor(screenRow - row);\n\n if (this.$useWrapMode) {\n var splits = this.$wrapData[docRow];\n\n if (splits) {\n column = splits[splitIndex];\n\n if (splitIndex > 0 && splits.length) {\n wrapIndent = splits.indent;\n docColumn = splits[splitIndex - 1] || splits[splits.length - 1];\n line = line.substring(docColumn);\n }\n }\n }\n\n if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex)) screenColumn = this.$bidiHandler.offsetToCol(offsetX);\n docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];\n if (this.$useWrapMode && docColumn >= column) docColumn = column - 1;\n if (foldLine) return foldLine.idxToPosition(docColumn);\n return {\n row: docRow,\n column: docColumn\n };\n };\n\n this.documentToScreenPosition = function (docRow, docColumn) {\n if (typeof docColumn === \"undefined\") var pos = this.$clipPositionToDocument(docRow.row, docRow.column);else pos = this.$clipPositionToDocument(docRow, docColumn);\n docRow = pos.row;\n docColumn = pos.column;\n var screenRow = 0;\n var foldStartRow = null;\n var fold = null;\n fold = this.getFoldAt(docRow, docColumn, 1);\n\n if (fold) {\n docRow = fold.start.row;\n docColumn = fold.start.column;\n }\n\n var rowEnd,\n row = 0;\n var rowCache = this.$docRowCache;\n var i = this.$getRowCacheIndex(rowCache, docRow);\n var l = rowCache.length;\n\n if (l && i >= 0) {\n var row = rowCache[i];\n var screenRow = this.$screenRowCache[i];\n var doCache = docRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var foldLine = this.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (row < docRow) {\n if (row >= foldStart) {\n rowEnd = foldLine.end.row + 1;\n if (rowEnd > docRow) break;\n foldLine = this.getNextFoldLine(rowEnd, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n } else {\n rowEnd = row + 1;\n }\n\n screenRow += this.getRowLength(row);\n row = rowEnd;\n\n if (doCache) {\n this.$docRowCache.push(row);\n this.$screenRowCache.push(screenRow);\n }\n }\n\n var textLine = \"\";\n\n if (foldLine && row >= foldStart) {\n textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);\n foldStartRow = foldLine.start.row;\n } else {\n textLine = this.getLine(docRow).substring(0, docColumn);\n foldStartRow = docRow;\n }\n\n var wrapIndent = 0;\n\n if (this.$useWrapMode) {\n var wrapRow = this.$wrapData[foldStartRow];\n\n if (wrapRow) {\n var screenRowOffset = 0;\n\n while (textLine.length >= wrapRow[screenRowOffset]) {\n screenRow++;\n screenRowOffset++;\n }\n\n textLine = textLine.substring(wrapRow[screenRowOffset - 1] || 0, textLine.length);\n wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;\n }\n }\n\n return {\n row: screenRow,\n column: wrapIndent + this.$getStringScreenWidth(textLine)[0]\n };\n };\n\n this.documentToScreenColumn = function (row, docColumn) {\n return this.documentToScreenPosition(row, docColumn).column;\n };\n\n this.documentToScreenRow = function (docRow, docColumn) {\n return this.documentToScreenPosition(docRow, docColumn).row;\n };\n\n this.getScreenLength = function () {\n var screenRows = 0;\n var fold = null;\n\n if (!this.$useWrapMode) {\n screenRows = this.getLength();\n var foldData = this.$foldData;\n\n for (var i = 0; i < foldData.length; i++) {\n fold = foldData[i];\n screenRows -= fold.end.row - fold.start.row;\n }\n } else {\n var lastRow = this.$wrapData.length;\n var row = 0,\n i = 0;\n var fold = this.$foldData[i++];\n var foldStart = fold ? fold.start.row : Infinity;\n\n while (row < lastRow) {\n var splits = this.$wrapData[row];\n screenRows += splits ? splits.length + 1 : 1;\n row++;\n\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = this.$foldData[i++];\n foldStart = fold ? fold.start.row : Infinity;\n }\n }\n }\n\n if (this.lineWidgets) screenRows += this.$getWidgetScreenLength();\n return screenRows;\n };\n\n this.$setFontMetrics = function (fm) {\n if (!this.$enableVarChar) return;\n\n this.$getStringScreenWidth = function (str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn === 0) return [0, 0];\n if (!maxScreenColumn) maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n var c, column;\n\n for (column = 0; column < str.length; column++) {\n c = str.charAt(column);\n\n if (c === \"\\t\") {\n screenColumn += this.getScreenTabSize(screenColumn);\n } else {\n screenColumn += fm.getCharacterWidth(c);\n }\n\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n\n return [screenColumn, column];\n };\n };\n\n this.destroy = function () {\n if (this.bgTokenizer) {\n this.bgTokenizer.setDocument(null);\n this.bgTokenizer = null;\n }\n\n this.$stopWorker();\n };\n\n this.isFullWidth = isFullWidth;\n\n function isFullWidth(c) {\n if (c < 0x1100) return false;\n return c >= 0x1100 && c <= 0x115F || c >= 0x11A3 && c <= 0x11A7 || c >= 0x11FA && c <= 0x11FF || c >= 0x2329 && c <= 0x232A || c >= 0x2E80 && c <= 0x2E99 || c >= 0x2E9B && c <= 0x2EF3 || c >= 0x2F00 && c <= 0x2FD5 || c >= 0x2FF0 && c <= 0x2FFB || c >= 0x3000 && c <= 0x303E || c >= 0x3041 && c <= 0x3096 || c >= 0x3099 && c <= 0x30FF || c >= 0x3105 && c <= 0x312D || c >= 0x3131 && c <= 0x318E || c >= 0x3190 && c <= 0x31BA || c >= 0x31C0 && c <= 0x31E3 || c >= 0x31F0 && c <= 0x321E || c >= 0x3220 && c <= 0x3247 || c >= 0x3250 && c <= 0x32FE || c >= 0x3300 && c <= 0x4DBF || c >= 0x4E00 && c <= 0xA48C || c >= 0xA490 && c <= 0xA4C6 || c >= 0xA960 && c <= 0xA97C || c >= 0xAC00 && c <= 0xD7A3 || c >= 0xD7B0 && c <= 0xD7C6 || c >= 0xD7CB && c <= 0xD7FB || c >= 0xF900 && c <= 0xFAFF || c >= 0xFE10 && c <= 0xFE19 || c >= 0xFE30 && c <= 0xFE52 || c >= 0xFE54 && c <= 0xFE66 || c >= 0xFE68 && c <= 0xFE6B || c >= 0xFF01 && c <= 0xFF60 || c >= 0xFFE0 && c <= 0xFFE6;\n }\n }).call(EditSession.prototype);\n\n require(\"./edit_session/folding\").Folding.call(EditSession.prototype);\n\n require(\"./edit_session/bracket_match\").BracketMatch.call(EditSession.prototype);\n\n config.defineOptions(EditSession.prototype, \"session\", {\n wrap: {\n set: function set(value) {\n if (!value || value == \"off\") value = false;else if (value == \"free\") value = true;else if (value == \"printMargin\") value = -1;else if (typeof value == \"string\") value = parseInt(value, 10) || false;\n if (this.$wrap == value) return;\n this.$wrap = value;\n\n if (!value) {\n this.setUseWrapMode(false);\n } else {\n var col = typeof value == \"number\" ? value : null;\n this.setWrapLimitRange(col, col);\n this.setUseWrapMode(true);\n }\n },\n get: function get() {\n if (this.getUseWrapMode()) {\n if (this.$wrap == -1) return \"printMargin\";\n if (!this.getWrapLimitRange().min) return \"free\";\n return this.$wrap;\n }\n\n return \"off\";\n },\n handlesSet: true\n },\n wrapMethod: {\n set: function set(val) {\n val = val == \"auto\" ? this.$mode.type != \"text\" : val != \"text\";\n\n if (val != this.$wrapAsCode) {\n this.$wrapAsCode = val;\n\n if (this.$useWrapMode) {\n this.$useWrapMode = false;\n this.setUseWrapMode(true);\n }\n }\n },\n initialValue: \"auto\"\n },\n indentedSoftWrap: {\n set: function set() {\n if (this.$useWrapMode) {\n this.$useWrapMode = false;\n this.setUseWrapMode(true);\n }\n },\n initialValue: true\n },\n firstLineNumber: {\n set: function set() {\n this._signal(\"changeBreakpoint\");\n },\n initialValue: 1\n },\n useWorker: {\n set: function set(useWorker) {\n this.$useWorker = useWorker;\n this.$stopWorker();\n if (useWorker) this.$startWorker();\n },\n initialValue: true\n },\n useSoftTabs: {\n initialValue: true\n },\n tabSize: {\n set: function set(tabSize) {\n tabSize = parseInt(tabSize);\n\n if (tabSize > 0 && this.$tabSize !== tabSize) {\n this.$modified = true;\n this.$rowLengthCache = [];\n this.$tabSize = tabSize;\n\n this._signal(\"changeTabSize\");\n }\n },\n initialValue: 4,\n handlesSet: true\n },\n navigateWithinSoftTabs: {\n initialValue: false\n },\n foldStyle: {\n set: function set(val) {\n this.setFoldStyle(val);\n },\n handlesSet: true\n },\n overwrite: {\n set: function set(val) {\n this._signal(\"changeOverwrite\");\n },\n initialValue: false\n },\n newLineMode: {\n set: function set(val) {\n this.doc.setNewLineMode(val);\n },\n get: function get() {\n return this.doc.getNewLineMode();\n },\n handlesSet: true\n },\n mode: {\n set: function set(val) {\n this.setMode(val);\n },\n get: function get() {\n return this.$modeId;\n },\n handlesSet: true\n }\n });\n exports.EditSession = EditSession;\n});\nace.define(\"ace/search\", [\"require\", \"exports\", \"module\", \"ace/lib/lang\", \"ace/lib/oop\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var lang = require(\"./lib/lang\");\n\n var oop = require(\"./lib/oop\");\n\n var Range = require(\"./range\").Range;\n\n var Search = function Search() {\n this.$options = {};\n };\n\n (function () {\n this.set = function (options) {\n oop.mixin(this.$options, options);\n return this;\n };\n\n this.getOptions = function () {\n return lang.copyObject(this.$options);\n };\n\n this.setOptions = function (options) {\n this.$options = options;\n };\n\n this.find = function (session) {\n var options = this.$options;\n var iterator = this.$matchIterator(session, options);\n if (!iterator) return false;\n var firstRange = null;\n iterator.forEach(function (sr, sc, er, ec) {\n firstRange = new Range(sr, sc, er, ec);\n\n if (sc == ec && options.start && options.start.start && options.skipCurrent != false && firstRange.isEqual(options.start)) {\n firstRange = null;\n return false;\n }\n\n return true;\n });\n return firstRange;\n };\n\n this.findAll = function (session) {\n var options = this.$options;\n if (!options.needle) return [];\n this.$assembleRegExp(options);\n var range = options.range;\n var lines = range ? session.getLines(range.start.row, range.end.row) : session.doc.getAllLines();\n var ranges = [];\n var re = options.re;\n\n if (options.$isMultiLine) {\n var len = re.length;\n var maxRow = lines.length - len;\n var prevRange;\n\n outer: for (var row = re.offset || 0; row <= maxRow; row++) {\n for (var j = 0; j < len; j++) {\n if (lines[row + j].search(re[j]) == -1) continue outer;\n }\n\n var startLine = lines[row];\n var line = lines[row + len - 1];\n var startIndex = startLine.length - startLine.match(re[0])[0].length;\n var endIndex = line.match(re[len - 1])[0].length;\n\n if (prevRange && prevRange.end.row === row && prevRange.end.column > startIndex) {\n continue;\n }\n\n ranges.push(prevRange = new Range(row, startIndex, row + len - 1, endIndex));\n if (len > 2) row = row + len - 2;\n }\n } else {\n for (var i = 0; i < lines.length; i++) {\n var matches = lang.getMatchOffsets(lines[i], re);\n\n for (var j = 0; j < matches.length; j++) {\n var match = matches[j];\n ranges.push(new Range(i, match.offset, i, match.offset + match.length));\n }\n }\n }\n\n if (range) {\n var startColumn = range.start.column;\n var endColumn = range.start.column;\n var i = 0,\n j = ranges.length - 1;\n\n while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row) {\n i++;\n }\n\n while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row) {\n j--;\n }\n\n ranges = ranges.slice(i, j + 1);\n\n for (i = 0, j = ranges.length; i < j; i++) {\n ranges[i].start.row += range.start.row;\n ranges[i].end.row += range.start.row;\n }\n }\n\n return ranges;\n };\n\n this.replace = function (input, replacement) {\n var options = this.$options;\n var re = this.$assembleRegExp(options);\n if (options.$isMultiLine) return replacement;\n if (!re) return;\n var match = re.exec(input);\n if (!match || match[0].length != input.length) return null;\n replacement = input.replace(re, replacement);\n\n if (options.preserveCase) {\n replacement = replacement.split(\"\");\n\n for (var i = Math.min(input.length, input.length); i--;) {\n var ch = input[i];\n if (ch && ch.toLowerCase() != ch) replacement[i] = replacement[i].toUpperCase();else replacement[i] = replacement[i].toLowerCase();\n }\n\n replacement = replacement.join(\"\");\n }\n\n return replacement;\n };\n\n this.$assembleRegExp = function (options, $disableFakeMultiline) {\n if (options.needle instanceof RegExp) return options.re = options.needle;\n var needle = options.needle;\n if (!options.needle) return options.re = false;\n if (!options.regExp) needle = lang.escapeRegExp(needle);\n if (options.wholeWord) needle = addWordBoundary(needle, options);\n var modifier = options.caseSensitive ? \"gm\" : \"gmi\";\n options.$isMultiLine = !$disableFakeMultiline && /[\\n\\r]/.test(needle);\n if (options.$isMultiLine) return options.re = this.$assembleMultilineRegExp(needle, modifier);\n\n try {\n var re = new RegExp(needle, modifier);\n } catch (e) {\n re = false;\n }\n\n return options.re = re;\n };\n\n this.$assembleMultilineRegExp = function (needle, modifier) {\n var parts = needle.replace(/\\r\\n|\\r|\\n/g, \"$\\n^\").split(\"\\n\");\n var re = [];\n\n for (var i = 0; i < parts.length; i++) {\n try {\n re.push(new RegExp(parts[i], modifier));\n } catch (e) {\n return false;\n }\n }\n\n return re;\n };\n\n this.$matchIterator = function (session, options) {\n var re = this.$assembleRegExp(options);\n if (!re) return false;\n var backwards = options.backwards == true;\n var skipCurrent = options.skipCurrent != false;\n var range = options.range;\n var start = options.start;\n if (!start) start = range ? range[backwards ? \"end\" : \"start\"] : session.selection.getRange();\n if (start.start) start = start[skipCurrent != backwards ? \"end\" : \"start\"];\n var firstRow = range ? range.start.row : 0;\n var lastRow = range ? range.end.row : session.getLength() - 1;\n\n if (backwards) {\n var forEach = function forEach(callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback)) return;\n\n for (row--; row >= firstRow; row--) {\n if (forEachInLine(row, Number.MAX_VALUE, callback)) return;\n }\n\n if (options.wrap == false) return;\n\n for (row = lastRow, firstRow = start.row; row >= firstRow; row--) {\n if (forEachInLine(row, Number.MAX_VALUE, callback)) return;\n }\n };\n } else {\n var forEach = function forEach(callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback)) return;\n\n for (row = row + 1; row <= lastRow; row++) {\n if (forEachInLine(row, 0, callback)) return;\n }\n\n if (options.wrap == false) return;\n\n for (row = firstRow, lastRow = start.row; row <= lastRow; row++) {\n if (forEachInLine(row, 0, callback)) return;\n }\n };\n }\n\n if (options.$isMultiLine) {\n var len = re.length;\n\n var forEachInLine = function forEachInLine(row, offset, callback) {\n var startRow = backwards ? row - len + 1 : row;\n if (startRow < 0) return;\n var line = session.getLine(startRow);\n var startIndex = line.search(re[0]);\n if (!backwards && startIndex < offset || startIndex === -1) return;\n\n for (var i = 1; i < len; i++) {\n line = session.getLine(startRow + i);\n if (line.search(re[i]) == -1) return;\n }\n\n var endIndex = line.match(re[len - 1])[0].length;\n if (backwards && endIndex > offset) return;\n if (callback(startRow, startIndex, startRow + len - 1, endIndex)) return true;\n };\n } else if (backwards) {\n var forEachInLine = function forEachInLine(row, endIndex, callback) {\n var line = session.getLine(row);\n var matches = [];\n var m,\n last = 0;\n re.lastIndex = 0;\n\n while (m = re.exec(line)) {\n var length = m[0].length;\n last = m.index;\n\n if (!length) {\n if (last >= line.length) break;\n re.lastIndex = last += 1;\n }\n\n if (m.index + length > endIndex) break;\n matches.push(m.index, length);\n }\n\n for (var i = matches.length - 1; i >= 0; i -= 2) {\n var column = matches[i - 1];\n var length = matches[i];\n if (callback(row, column, row, column + length)) return true;\n }\n };\n } else {\n var forEachInLine = function forEachInLine(row, startIndex, callback) {\n var line = session.getLine(row);\n var last;\n var m;\n re.lastIndex = startIndex;\n\n while (m = re.exec(line)) {\n var length = m[0].length;\n last = m.index;\n if (callback(row, last, row, last + length)) return true;\n\n if (!length) {\n re.lastIndex = last += 1;\n if (last >= line.length) return false;\n }\n }\n };\n }\n\n return {\n forEach: forEach\n };\n };\n }).call(Search.prototype);\n\n function addWordBoundary(needle, options) {\n function wordBoundary(c) {\n if (/\\w/.test(c) || options.regExp) return \"\\\\b\";\n return \"\";\n }\n\n return wordBoundary(needle[0]) + needle + wordBoundary(needle[needle.length - 1]);\n }\n\n exports.Search = Search;\n});\nace.define(\"ace/keyboard/hash_handler\", [\"require\", \"exports\", \"module\", \"ace/lib/keys\", \"ace/lib/useragent\"], function (require, exports, module) {\n \"use strict\";\n\n var keyUtil = require(\"../lib/keys\");\n\n var useragent = require(\"../lib/useragent\");\n\n var KEY_MODS = keyUtil.KEY_MODS;\n\n function HashHandler(config, platform) {\n this.platform = platform || (useragent.isMac ? \"mac\" : \"win\");\n this.commands = {};\n this.commandKeyBinding = {};\n this.addCommands(config);\n this.$singleCommand = true;\n }\n\n function MultiHashHandler(config, platform) {\n HashHandler.call(this, config, platform);\n this.$singleCommand = false;\n }\n\n MultiHashHandler.prototype = HashHandler.prototype;\n (function () {\n this.addCommand = function (command) {\n if (this.commands[command.name]) this.removeCommand(command);\n this.commands[command.name] = command;\n if (command.bindKey) this._buildKeyHash(command);\n };\n\n this.removeCommand = function (command, keepCommand) {\n var name = command && (typeof command === 'string' ? command : command.name);\n command = this.commands[name];\n if (!keepCommand) delete this.commands[name];\n var ckb = this.commandKeyBinding;\n\n for (var keyId in ckb) {\n var cmdGroup = ckb[keyId];\n\n if (cmdGroup == command) {\n delete ckb[keyId];\n } else if (Array.isArray(cmdGroup)) {\n var i = cmdGroup.indexOf(command);\n\n if (i != -1) {\n cmdGroup.splice(i, 1);\n if (cmdGroup.length == 1) ckb[keyId] = cmdGroup[0];\n }\n }\n }\n };\n\n this.bindKey = function (key, command, position) {\n if (typeof key == \"object\" && key) {\n if (position == undefined) position = key.position;\n key = key[this.platform];\n }\n\n if (!key) return;\n if (typeof command == \"function\") return this.addCommand({\n exec: command,\n bindKey: key,\n name: command.name || key\n });\n key.split(\"|\").forEach(function (keyPart) {\n var chain = \"\";\n\n if (keyPart.indexOf(\" \") != -1) {\n var parts = keyPart.split(/\\s+/);\n keyPart = parts.pop();\n parts.forEach(function (keyPart) {\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n chain += (chain ? \" \" : \"\") + id;\n\n this._addCommandToBinding(chain, \"chainKeys\");\n }, this);\n chain += \" \";\n }\n\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n\n this._addCommandToBinding(chain + id, command, position);\n }, this);\n };\n\n function getPosition(command) {\n return typeof command == \"object\" && command.bindKey && command.bindKey.position || (command.isDefault ? -100 : 0);\n }\n\n this._addCommandToBinding = function (keyId, command, position) {\n var ckb = this.commandKeyBinding,\n i;\n\n if (!command) {\n delete ckb[keyId];\n } else if (!ckb[keyId] || this.$singleCommand) {\n ckb[keyId] = command;\n } else {\n if (!Array.isArray(ckb[keyId])) {\n ckb[keyId] = [ckb[keyId]];\n } else if ((i = ckb[keyId].indexOf(command)) != -1) {\n ckb[keyId].splice(i, 1);\n }\n\n if (typeof position != \"number\") {\n position = getPosition(command);\n }\n\n var commands = ckb[keyId];\n\n for (i = 0; i < commands.length; i++) {\n var other = commands[i];\n var otherPos = getPosition(other);\n if (otherPos > position) break;\n }\n\n commands.splice(i, 0, command);\n }\n };\n\n this.addCommands = function (commands) {\n commands && Object.keys(commands).forEach(function (name) {\n var command = commands[name];\n if (!command) return;\n if (typeof command === \"string\") return this.bindKey(command, name);\n if (typeof command === \"function\") command = {\n exec: command\n };\n if (typeof command !== \"object\") return;\n if (!command.name) command.name = name;\n this.addCommand(command);\n }, this);\n };\n\n this.removeCommands = function (commands) {\n Object.keys(commands).forEach(function (name) {\n this.removeCommand(commands[name]);\n }, this);\n };\n\n this.bindKeys = function (keyList) {\n Object.keys(keyList).forEach(function (key) {\n this.bindKey(key, keyList[key]);\n }, this);\n };\n\n this._buildKeyHash = function (command) {\n this.bindKey(command.bindKey, command);\n };\n\n this.parseKeys = function (keys) {\n var parts = keys.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function (x) {\n return x;\n });\n var key = parts.pop();\n var keyCode = keyUtil[key];\n if (keyUtil.FUNCTION_KEYS[keyCode]) key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();else if (!parts.length) return {\n key: key,\n hashId: -1\n };else if (parts.length == 1 && parts[0] == \"shift\") return {\n key: key.toUpperCase(),\n hashId: -1\n };\n var hashId = 0;\n\n for (var i = parts.length; i--;) {\n var modifier = keyUtil.KEY_MODS[parts[i]];\n\n if (modifier == null) {\n if (typeof console != \"undefined\") console.error(\"invalid modifier \" + parts[i] + \" in \" + keys);\n return false;\n }\n\n hashId |= modifier;\n }\n\n return {\n key: key,\n hashId: hashId\n };\n };\n\n this.findKeyCommand = function findKeyCommand(hashId, keyString) {\n var key = KEY_MODS[hashId] + keyString;\n return this.commandKeyBinding[key];\n };\n\n this.handleKeyboard = function (data, hashId, keyString, keyCode) {\n if (keyCode < 0) return;\n var key = KEY_MODS[hashId] + keyString;\n var command = this.commandKeyBinding[key];\n\n if (data.$keyChain) {\n data.$keyChain += \" \" + key;\n command = this.commandKeyBinding[data.$keyChain] || command;\n }\n\n if (command) {\n if (command == \"chainKeys\" || command[command.length - 1] == \"chainKeys\") {\n data.$keyChain = data.$keyChain || key;\n return {\n command: \"null\"\n };\n }\n }\n\n if (data.$keyChain) {\n if ((!hashId || hashId == 4) && keyString.length == 1) data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input\n else if (hashId == -1 || keyCode > 0) data.$keyChain = \"\"; // reset keyChain\n }\n\n return {\n command: command\n };\n };\n\n this.getStatusText = function (editor, data) {\n return data.$keyChain || \"\";\n };\n }).call(HashHandler.prototype);\n exports.HashHandler = HashHandler;\n exports.MultiHashHandler = MultiHashHandler;\n});\nace.define(\"ace/commands/command_manager\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/keyboard/hash_handler\", \"ace/lib/event_emitter\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"../lib/oop\");\n\n var MultiHashHandler = require(\"../keyboard/hash_handler\").MultiHashHandler;\n\n var EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\n\n var CommandManager = function CommandManager(platform, commands) {\n MultiHashHandler.call(this, commands, platform);\n this.byName = this.commands;\n this.setDefaultHandler(\"exec\", function (e) {\n return e.command.exec(e.editor, e.args || {});\n });\n };\n\n oop.inherits(CommandManager, MultiHashHandler);\n (function () {\n oop.implement(this, EventEmitter);\n\n this.exec = function (command, editor, args) {\n if (Array.isArray(command)) {\n for (var i = command.length; i--;) {\n if (this.exec(command[i], editor, args)) return true;\n }\n\n return false;\n }\n\n if (typeof command === \"string\") command = this.commands[command];\n if (!command) return false;\n if (editor && editor.$readOnly && !command.readOnly) return false;\n if (this.$checkCommandState != false && command.isAvailable && !command.isAvailable(editor)) return false;\n var e = {\n editor: editor,\n command: command,\n args: args\n };\n e.returnValue = this._emit(\"exec\", e);\n\n this._signal(\"afterExec\", e);\n\n return e.returnValue === false ? false : true;\n };\n\n this.toggleRecording = function (editor) {\n if (this.$inReplay) return;\n editor && editor._emit(\"changeStatus\");\n\n if (this.recording) {\n this.macro.pop();\n this.removeEventListener(\"exec\", this.$addCommandToMacro);\n if (!this.macro.length) this.macro = this.oldMacro;\n return this.recording = false;\n }\n\n if (!this.$addCommandToMacro) {\n this.$addCommandToMacro = function (e) {\n this.macro.push([e.command, e.args]);\n }.bind(this);\n }\n\n this.oldMacro = this.macro;\n this.macro = [];\n this.on(\"exec\", this.$addCommandToMacro);\n return this.recording = true;\n };\n\n this.replay = function (editor) {\n if (this.$inReplay || !this.macro) return;\n if (this.recording) return this.toggleRecording(editor);\n\n try {\n this.$inReplay = true;\n this.macro.forEach(function (x) {\n if (typeof x == \"string\") this.exec(x, editor);else this.exec(x[0], editor, x[1]);\n }, this);\n } finally {\n this.$inReplay = false;\n }\n };\n\n this.trimMacro = function (m) {\n return m.map(function (x) {\n if (typeof x[0] != \"string\") x[0] = x[0].name;\n if (!x[1]) x = x[0];\n return x;\n });\n };\n }).call(CommandManager.prototype);\n exports.CommandManager = CommandManager;\n});\nace.define(\"ace/commands/default_commands\", [\"require\", \"exports\", \"module\", \"ace/lib/lang\", \"ace/config\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var lang = require(\"../lib/lang\");\n\n var config = require(\"../config\");\n\n var Range = require(\"../range\").Range;\n\n function bindKey(win, mac) {\n return {\n win: win,\n mac: mac\n };\n }\n\n exports.commands = [{\n name: \"showSettingsMenu\",\n bindKey: bindKey(\"Ctrl-,\", \"Command-,\"),\n exec: function exec(editor) {\n config.loadModule(\"ace/ext/settings_menu\", function (module) {\n module.init(editor);\n editor.showSettingsMenu();\n });\n },\n readOnly: true\n }, {\n name: \"goToNextError\",\n bindKey: bindKey(\"Alt-E\", \"F4\"),\n exec: function exec(editor) {\n config.loadModule(\"./ext/error_marker\", function (module) {\n module.showErrorMarker(editor, 1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"goToPreviousError\",\n bindKey: bindKey(\"Alt-Shift-E\", \"Shift-F4\"),\n exec: function exec(editor) {\n config.loadModule(\"./ext/error_marker\", function (module) {\n module.showErrorMarker(editor, -1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"selectall\",\n description: \"Select all\",\n bindKey: bindKey(\"Ctrl-A\", \"Command-A\"),\n exec: function exec(editor) {\n editor.selectAll();\n },\n readOnly: true\n }, {\n name: \"centerselection\",\n description: \"Center selection\",\n bindKey: bindKey(null, \"Ctrl-L\"),\n exec: function exec(editor) {\n editor.centerSelection();\n },\n readOnly: true\n }, {\n name: \"gotoline\",\n description: \"Go to line...\",\n bindKey: bindKey(\"Ctrl-L\", \"Command-L\"),\n exec: function exec(editor, line) {\n if (typeof line === \"number\" && !isNaN(line)) editor.gotoLine(line);\n editor.prompt({\n $type: \"gotoLine\"\n });\n },\n readOnly: true\n }, {\n name: \"fold\",\n bindKey: bindKey(\"Alt-L|Ctrl-F1\", \"Command-Alt-L|Command-F1\"),\n exec: function exec(editor) {\n editor.session.toggleFold(false);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"unfold\",\n bindKey: bindKey(\"Alt-Shift-L|Ctrl-Shift-F1\", \"Command-Alt-Shift-L|Command-Shift-F1\"),\n exec: function exec(editor) {\n editor.session.toggleFold(true);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"toggleFoldWidget\",\n bindKey: bindKey(\"F2\", \"F2\"),\n exec: function exec(editor) {\n editor.session.toggleFoldWidget();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"toggleParentFoldWidget\",\n bindKey: bindKey(\"Alt-F2\", \"Alt-F2\"),\n exec: function exec(editor) {\n editor.session.toggleFoldWidget(true);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"foldall\",\n description: \"Fold all\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function exec(editor) {\n editor.session.foldAll();\n },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"foldOther\",\n description: \"Fold other\",\n bindKey: bindKey(\"Alt-0\", \"Command-Option-0\"),\n exec: function exec(editor) {\n editor.session.foldAll();\n editor.session.unfold(editor.selection.getAllRanges());\n },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"unfoldall\",\n description: \"Unfold all\",\n bindKey: bindKey(\"Alt-Shift-0\", \"Command-Option-Shift-0\"),\n exec: function exec(editor) {\n editor.session.unfold();\n },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"findnext\",\n description: \"Find next\",\n bindKey: bindKey(\"Ctrl-K\", \"Command-G\"),\n exec: function exec(editor) {\n editor.findNext();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"findprevious\",\n description: \"Find previous\",\n bindKey: bindKey(\"Ctrl-Shift-K\", \"Command-Shift-G\"),\n exec: function exec(editor) {\n editor.findPrevious();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"selectOrFindNext\",\n description: \"Select or find next\",\n bindKey: bindKey(\"Alt-K\", \"Ctrl-G\"),\n exec: function exec(editor) {\n if (editor.selection.isEmpty()) editor.selection.selectWord();else editor.findNext();\n },\n readOnly: true\n }, {\n name: \"selectOrFindPrevious\",\n description: \"Select or find previous\",\n bindKey: bindKey(\"Alt-Shift-K\", \"Ctrl-Shift-G\"),\n exec: function exec(editor) {\n if (editor.selection.isEmpty()) editor.selection.selectWord();else editor.findPrevious();\n },\n readOnly: true\n }, {\n name: \"find\",\n description: \"Find\",\n bindKey: bindKey(\"Ctrl-F\", \"Command-F\"),\n exec: function exec(editor) {\n config.loadModule(\"ace/ext/searchbox\", function (e) {\n e.Search(editor);\n });\n },\n readOnly: true\n }, {\n name: \"overwrite\",\n description: \"Overwrite\",\n bindKey: \"Insert\",\n exec: function exec(editor) {\n editor.toggleOverwrite();\n },\n readOnly: true\n }, {\n name: \"selecttostart\",\n description: \"Select to start\",\n bindKey: bindKey(\"Ctrl-Shift-Home\", \"Command-Shift-Home|Command-Shift-Up\"),\n exec: function exec(editor) {\n editor.getSelection().selectFileStart();\n },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"gotostart\",\n description: \"Go to start\",\n bindKey: bindKey(\"Ctrl-Home\", \"Command-Home|Command-Up\"),\n exec: function exec(editor) {\n editor.navigateFileStart();\n },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"selectup\",\n description: \"Select up\",\n bindKey: bindKey(\"Shift-Up\", \"Shift-Up|Ctrl-Shift-P\"),\n exec: function exec(editor) {\n editor.getSelection().selectUp();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"golineup\",\n description: \"Go line up\",\n bindKey: bindKey(\"Up\", \"Up|Ctrl-P\"),\n exec: function exec(editor, args) {\n editor.navigateUp(args.times);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttoend\",\n description: \"Select to end\",\n bindKey: bindKey(\"Ctrl-Shift-End\", \"Command-Shift-End|Command-Shift-Down\"),\n exec: function exec(editor) {\n editor.getSelection().selectFileEnd();\n },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"gotoend\",\n description: \"Go to end\",\n bindKey: bindKey(\"Ctrl-End\", \"Command-End|Command-Down\"),\n exec: function exec(editor) {\n editor.navigateFileEnd();\n },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"selectdown\",\n description: \"Select down\",\n bindKey: bindKey(\"Shift-Down\", \"Shift-Down|Ctrl-Shift-N\"),\n exec: function exec(editor) {\n editor.getSelection().selectDown();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"golinedown\",\n description: \"Go line down\",\n bindKey: bindKey(\"Down\", \"Down|Ctrl-N\"),\n exec: function exec(editor, args) {\n editor.navigateDown(args.times);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectwordleft\",\n description: \"Select word left\",\n bindKey: bindKey(\"Ctrl-Shift-Left\", \"Option-Shift-Left\"),\n exec: function exec(editor) {\n editor.getSelection().selectWordLeft();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotowordleft\",\n description: \"Go to word left\",\n bindKey: bindKey(\"Ctrl-Left\", \"Option-Left\"),\n exec: function exec(editor) {\n editor.navigateWordLeft();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttolinestart\",\n description: \"Select to line start\",\n bindKey: bindKey(\"Alt-Shift-Left\", \"Command-Shift-Left|Ctrl-Shift-A\"),\n exec: function exec(editor) {\n editor.getSelection().selectLineStart();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotolinestart\",\n description: \"Go to line start\",\n bindKey: bindKey(\"Alt-Left|Home\", \"Command-Left|Home|Ctrl-A\"),\n exec: function exec(editor) {\n editor.navigateLineStart();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectleft\",\n description: \"Select left\",\n bindKey: bindKey(\"Shift-Left\", \"Shift-Left|Ctrl-Shift-B\"),\n exec: function exec(editor) {\n editor.getSelection().selectLeft();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotoleft\",\n description: \"Go to left\",\n bindKey: bindKey(\"Left\", \"Left|Ctrl-B\"),\n exec: function exec(editor, args) {\n editor.navigateLeft(args.times);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectwordright\",\n description: \"Select word right\",\n bindKey: bindKey(\"Ctrl-Shift-Right\", \"Option-Shift-Right\"),\n exec: function exec(editor) {\n editor.getSelection().selectWordRight();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotowordright\",\n description: \"Go to word right\",\n bindKey: bindKey(\"Ctrl-Right\", \"Option-Right\"),\n exec: function exec(editor) {\n editor.navigateWordRight();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttolineend\",\n description: \"Select to line end\",\n bindKey: bindKey(\"Alt-Shift-Right\", \"Command-Shift-Right|Shift-End|Ctrl-Shift-E\"),\n exec: function exec(editor) {\n editor.getSelection().selectLineEnd();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotolineend\",\n description: \"Go to line end\",\n bindKey: bindKey(\"Alt-Right|End\", \"Command-Right|End|Ctrl-E\"),\n exec: function exec(editor) {\n editor.navigateLineEnd();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectright\",\n description: \"Select right\",\n bindKey: bindKey(\"Shift-Right\", \"Shift-Right\"),\n exec: function exec(editor) {\n editor.getSelection().selectRight();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotoright\",\n description: \"Go to right\",\n bindKey: bindKey(\"Right\", \"Right|Ctrl-F\"),\n exec: function exec(editor, args) {\n editor.navigateRight(args.times);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectpagedown\",\n description: \"Select page down\",\n bindKey: \"Shift-PageDown\",\n exec: function exec(editor) {\n editor.selectPageDown();\n },\n readOnly: true\n }, {\n name: \"pagedown\",\n description: \"Page down\",\n bindKey: bindKey(null, \"Option-PageDown\"),\n exec: function exec(editor) {\n editor.scrollPageDown();\n },\n readOnly: true\n }, {\n name: \"gotopagedown\",\n description: \"Go to page down\",\n bindKey: bindKey(\"PageDown\", \"PageDown|Ctrl-V\"),\n exec: function exec(editor) {\n editor.gotoPageDown();\n },\n readOnly: true\n }, {\n name: \"selectpageup\",\n description: \"Select page up\",\n bindKey: \"Shift-PageUp\",\n exec: function exec(editor) {\n editor.selectPageUp();\n },\n readOnly: true\n }, {\n name: \"pageup\",\n description: \"Page up\",\n bindKey: bindKey(null, \"Option-PageUp\"),\n exec: function exec(editor) {\n editor.scrollPageUp();\n },\n readOnly: true\n }, {\n name: \"gotopageup\",\n description: \"Go to page up\",\n bindKey: \"PageUp\",\n exec: function exec(editor) {\n editor.gotoPageUp();\n },\n readOnly: true\n }, {\n name: \"scrollup\",\n description: \"Scroll up\",\n bindKey: bindKey(\"Ctrl-Up\", null),\n exec: function exec(e) {\n e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight);\n },\n readOnly: true\n }, {\n name: \"scrolldown\",\n description: \"Scroll down\",\n bindKey: bindKey(\"Ctrl-Down\", null),\n exec: function exec(e) {\n e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight);\n },\n readOnly: true\n }, {\n name: \"selectlinestart\",\n description: \"Select line start\",\n bindKey: \"Shift-Home\",\n exec: function exec(editor) {\n editor.getSelection().selectLineStart();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectlineend\",\n description: \"Select line end\",\n bindKey: \"Shift-End\",\n exec: function exec(editor) {\n editor.getSelection().selectLineEnd();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"togglerecording\",\n description: \"Toggle recording\",\n bindKey: bindKey(\"Ctrl-Alt-E\", \"Command-Option-E\"),\n exec: function exec(editor) {\n editor.commands.toggleRecording(editor);\n },\n readOnly: true\n }, {\n name: \"replaymacro\",\n description: \"Replay macro\",\n bindKey: bindKey(\"Ctrl-Shift-E\", \"Command-Shift-E\"),\n exec: function exec(editor) {\n editor.commands.replay(editor);\n },\n readOnly: true\n }, {\n name: \"jumptomatching\",\n description: \"Jump to matching\",\n bindKey: bindKey(\"Ctrl-\\\\|Ctrl-P\", \"Command-\\\\\"),\n exec: function exec(editor) {\n editor.jumpToMatching();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"selecttomatching\",\n description: \"Select to matching\",\n bindKey: bindKey(\"Ctrl-Shift-\\\\|Ctrl-Shift-P\", \"Command-Shift-\\\\\"),\n exec: function exec(editor) {\n editor.jumpToMatching(true);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"expandToMatching\",\n description: \"Expand to matching\",\n bindKey: bindKey(\"Ctrl-Shift-M\", \"Ctrl-Shift-M\"),\n exec: function exec(editor) {\n editor.jumpToMatching(true, true);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"passKeysToBrowser\",\n description: \"Pass keys to browser\",\n bindKey: bindKey(null, null),\n exec: function exec() {},\n passEvent: true,\n readOnly: true\n }, {\n name: \"copy\",\n description: \"Copy\",\n exec: function exec(editor) {},\n readOnly: true\n }, {\n name: \"cut\",\n description: \"Cut\",\n exec: function exec(editor) {\n var cutLine = editor.$copyWithEmptySelection && editor.selection.isEmpty();\n var range = cutLine ? editor.selection.getLineRange() : editor.selection.getRange();\n\n editor._emit(\"cut\", range);\n\n if (!range.isEmpty()) editor.session.remove(range);\n editor.clearSelection();\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"paste\",\n description: \"Paste\",\n exec: function exec(editor, args) {\n editor.$handlePaste(args);\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"removeline\",\n description: \"Remove line\",\n bindKey: bindKey(\"Ctrl-D\", \"Command-D\"),\n exec: function exec(editor) {\n editor.removeLines();\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEachLine\"\n }, {\n name: \"duplicateSelection\",\n description: \"Duplicate selection\",\n bindKey: bindKey(\"Ctrl-Shift-D\", \"Command-Shift-D\"),\n exec: function exec(editor) {\n editor.duplicateSelection();\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"sortlines\",\n description: \"Sort lines\",\n bindKey: bindKey(\"Ctrl-Alt-S\", \"Command-Alt-S\"),\n exec: function exec(editor) {\n editor.sortLines();\n },\n scrollIntoView: \"selection\",\n multiSelectAction: \"forEachLine\"\n }, {\n name: \"togglecomment\",\n description: \"Toggle comment\",\n bindKey: bindKey(\"Ctrl-/\", \"Command-/\"),\n exec: function exec(editor) {\n editor.toggleCommentLines();\n },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"toggleBlockComment\",\n description: \"Toggle block comment\",\n bindKey: bindKey(\"Ctrl-Shift-/\", \"Command-Shift-/\"),\n exec: function exec(editor) {\n editor.toggleBlockComment();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"modifyNumberUp\",\n description: \"Modify number up\",\n bindKey: bindKey(\"Ctrl-Shift-Up\", \"Alt-Shift-Up\"),\n exec: function exec(editor) {\n editor.modifyNumber(1);\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"modifyNumberDown\",\n description: \"Modify number down\",\n bindKey: bindKey(\"Ctrl-Shift-Down\", \"Alt-Shift-Down\"),\n exec: function exec(editor) {\n editor.modifyNumber(-1);\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"replace\",\n description: \"Replace\",\n bindKey: bindKey(\"Ctrl-H\", \"Command-Option-F\"),\n exec: function exec(editor) {\n config.loadModule(\"ace/ext/searchbox\", function (e) {\n e.Search(editor, true);\n });\n }\n }, {\n name: \"undo\",\n description: \"Undo\",\n bindKey: bindKey(\"Ctrl-Z\", \"Command-Z\"),\n exec: function exec(editor) {\n editor.undo();\n }\n }, {\n name: \"redo\",\n description: \"Redo\",\n bindKey: bindKey(\"Ctrl-Shift-Z|Ctrl-Y\", \"Command-Shift-Z|Command-Y\"),\n exec: function exec(editor) {\n editor.redo();\n }\n }, {\n name: \"copylinesup\",\n description: \"Copy lines up\",\n bindKey: bindKey(\"Alt-Shift-Up\", \"Command-Option-Up\"),\n exec: function exec(editor) {\n editor.copyLinesUp();\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"movelinesup\",\n description: \"Move lines up\",\n bindKey: bindKey(\"Alt-Up\", \"Option-Up\"),\n exec: function exec(editor) {\n editor.moveLinesUp();\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"copylinesdown\",\n description: \"Copy lines down\",\n bindKey: bindKey(\"Alt-Shift-Down\", \"Command-Option-Down\"),\n exec: function exec(editor) {\n editor.copyLinesDown();\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"movelinesdown\",\n description: \"Move lines down\",\n bindKey: bindKey(\"Alt-Down\", \"Option-Down\"),\n exec: function exec(editor) {\n editor.moveLinesDown();\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"del\",\n description: \"Delete\",\n bindKey: bindKey(\"Delete\", \"Delete|Ctrl-D|Shift-Delete\"),\n exec: function exec(editor) {\n editor.remove(\"right\");\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"backspace\",\n description: \"Backspace\",\n bindKey: bindKey(\"Shift-Backspace|Backspace\", \"Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H\"),\n exec: function exec(editor) {\n editor.remove(\"left\");\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"cut_or_delete\",\n description: \"Cut or delete\",\n bindKey: bindKey(\"Shift-Delete\", null),\n exec: function exec(editor) {\n if (editor.selection.isEmpty()) {\n editor.remove(\"left\");\n } else {\n return false;\n }\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolinestart\",\n description: \"Remove to line start\",\n bindKey: bindKey(\"Alt-Backspace\", \"Command-Backspace\"),\n exec: function exec(editor) {\n editor.removeToLineStart();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolineend\",\n description: \"Remove to line end\",\n bindKey: bindKey(\"Alt-Delete\", \"Ctrl-K|Command-Delete\"),\n exec: function exec(editor) {\n editor.removeToLineEnd();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolinestarthard\",\n description: \"Remove to line start hard\",\n bindKey: bindKey(\"Ctrl-Shift-Backspace\", null),\n exec: function exec(editor) {\n var range = editor.selection.getRange();\n range.start.column = 0;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolineendhard\",\n description: \"Remove to line end hard\",\n bindKey: bindKey(\"Ctrl-Shift-Delete\", null),\n exec: function exec(editor) {\n var range = editor.selection.getRange();\n range.end.column = Number.MAX_VALUE;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removewordleft\",\n description: \"Remove word left\",\n bindKey: bindKey(\"Ctrl-Backspace\", \"Alt-Backspace|Ctrl-Alt-Backspace\"),\n exec: function exec(editor) {\n editor.removeWordLeft();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removewordright\",\n description: \"Remove word right\",\n bindKey: bindKey(\"Ctrl-Delete\", \"Alt-Delete\"),\n exec: function exec(editor) {\n editor.removeWordRight();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"outdent\",\n description: \"Outdent\",\n bindKey: bindKey(\"Shift-Tab\", \"Shift-Tab\"),\n exec: function exec(editor) {\n editor.blockOutdent();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"indent\",\n description: \"Indent\",\n bindKey: bindKey(\"Tab\", \"Tab\"),\n exec: function exec(editor) {\n editor.indent();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"blockoutdent\",\n description: \"Block outdent\",\n bindKey: bindKey(\"Ctrl-[\", \"Ctrl-[\"),\n exec: function exec(editor) {\n editor.blockOutdent();\n },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"blockindent\",\n description: \"Block indent\",\n bindKey: bindKey(\"Ctrl-]\", \"Ctrl-]\"),\n exec: function exec(editor) {\n editor.blockIndent();\n },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"insertstring\",\n description: \"Insert string\",\n exec: function exec(editor, str) {\n editor.insert(str);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"inserttext\",\n description: \"Insert text\",\n exec: function exec(editor, args) {\n editor.insert(lang.stringRepeat(args.text || \"\", args.times || 1));\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"splitline\",\n description: \"Split line\",\n bindKey: bindKey(null, \"Ctrl-O\"),\n exec: function exec(editor) {\n editor.splitLine();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"transposeletters\",\n description: \"Transpose letters\",\n bindKey: bindKey(\"Alt-Shift-X\", \"Ctrl-T\"),\n exec: function exec(editor) {\n editor.transposeLetters();\n },\n multiSelectAction: function multiSelectAction(editor) {\n editor.transposeSelections(1);\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"touppercase\",\n description: \"To uppercase\",\n bindKey: bindKey(\"Ctrl-U\", \"Ctrl-U\"),\n exec: function exec(editor) {\n editor.toUpperCase();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"tolowercase\",\n description: \"To lowercase\",\n bindKey: bindKey(\"Ctrl-Shift-U\", \"Ctrl-Shift-U\"),\n exec: function exec(editor) {\n editor.toLowerCase();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"expandtoline\",\n description: \"Expand to line\",\n bindKey: bindKey(\"Ctrl-Shift-L\", \"Command-Shift-L\"),\n exec: function exec(editor) {\n var range = editor.selection.getRange();\n range.start.column = range.end.column = 0;\n range.end.row++;\n editor.selection.setRange(range, false);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"joinlines\",\n description: \"Join lines\",\n bindKey: bindKey(null, null),\n exec: function exec(editor) {\n var isBackwards = editor.selection.isBackwards();\n var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();\n var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();\n var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;\n var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());\n var selectedCount = selectedText.replace(/\\n\\s*/, \" \").length;\n var insertLine = editor.session.doc.getLine(selectionStart.row);\n\n for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {\n var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));\n\n if (curLine.length !== 0) {\n curLine = \" \" + curLine;\n }\n\n insertLine += curLine;\n }\n\n if (selectionEnd.row + 1 < editor.session.doc.getLength() - 1) {\n insertLine += editor.session.doc.getNewLineCharacter();\n }\n\n editor.clearSelection();\n editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);\n\n if (selectedCount > 0) {\n editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);\n editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);\n } else {\n firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? firstLineEndCol + 1 : firstLineEndCol;\n editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);\n }\n },\n multiSelectAction: \"forEach\",\n readOnly: true\n }, {\n name: \"invertSelection\",\n description: \"Invert selection\",\n bindKey: bindKey(null, null),\n exec: function exec(editor) {\n var endRow = editor.session.doc.getLength() - 1;\n var endCol = editor.session.doc.getLine(endRow).length;\n var ranges = editor.selection.rangeList.ranges;\n var newRanges = [];\n\n if (ranges.length < 1) {\n ranges = [editor.selection.getRange()];\n }\n\n for (var i = 0; i < ranges.length; i++) {\n if (i == ranges.length - 1) {\n if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {\n newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));\n }\n }\n\n if (i === 0) {\n if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {\n newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));\n }\n } else {\n newRanges.push(new Range(ranges[i - 1].end.row, ranges[i - 1].end.column, ranges[i].start.row, ranges[i].start.column));\n }\n }\n\n editor.exitMultiSelectMode();\n editor.clearSelection();\n\n for (var i = 0; i < newRanges.length; i++) {\n editor.selection.addRange(newRanges[i], false);\n }\n },\n readOnly: true,\n scrollIntoView: \"none\"\n }, {\n name: \"openCommandPallete\",\n description: \"Open command pallete\",\n bindKey: bindKey(\"F1\", \"F1\"),\n exec: function exec(editor) {\n editor.prompt({\n $type: \"commands\"\n });\n },\n readOnly: true\n }, {\n name: \"modeSelect\",\n description: \"Change language mode...\",\n bindKey: bindKey(null, null),\n exec: function exec(editor) {\n editor.prompt({\n $type: \"modes\"\n });\n },\n readOnly: true\n }];\n});\nace.define(\"ace/editor\", [\"require\", \"exports\", \"module\", \"ace/lib/fixoldbrowsers\", \"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/clipboard\"], function (require, exports, module) {\n \"use strict\";\n\n require(\"./lib/fixoldbrowsers\");\n\n var oop = require(\"./lib/oop\");\n\n var dom = require(\"./lib/dom\");\n\n var lang = require(\"./lib/lang\");\n\n var useragent = require(\"./lib/useragent\");\n\n var TextInput = require(\"./keyboard/textinput\").TextInput;\n\n var MouseHandler = require(\"./mouse/mouse_handler\").MouseHandler;\n\n var FoldHandler = require(\"./mouse/fold_handler\").FoldHandler;\n\n var KeyBinding = require(\"./keyboard/keybinding\").KeyBinding;\n\n var EditSession = require(\"./edit_session\").EditSession;\n\n var Search = require(\"./search\").Search;\n\n var Range = require(\"./range\").Range;\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var CommandManager = require(\"./commands/command_manager\").CommandManager;\n\n var defaultCommands = require(\"./commands/default_commands\").commands;\n\n var config = require(\"./config\");\n\n var TokenIterator = require(\"./token_iterator\").TokenIterator;\n\n var clipboard = require(\"./clipboard\");\n\n var Editor = function Editor(renderer, session, options) {\n var container = renderer.getContainerElement();\n this.container = container;\n this.renderer = renderer;\n this.id = \"editor\" + ++Editor.$uid;\n this.commands = new CommandManager(useragent.isMac ? \"mac\" : \"win\", defaultCommands);\n\n if (typeof document == \"object\") {\n this.textInput = new TextInput(renderer.getTextAreaContainer(), this);\n this.renderer.textarea = this.textInput.getElement();\n this.$mouseHandler = new MouseHandler(this);\n new FoldHandler(this);\n }\n\n this.keyBinding = new KeyBinding(this);\n this.$search = new Search().set({\n wrap: true\n });\n this.$historyTracker = this.$historyTracker.bind(this);\n this.commands.on(\"exec\", this.$historyTracker);\n this.$initOperationListeners();\n this._$emitInputEvent = lang.delayedCall(function () {\n this._signal(\"input\", {});\n\n if (this.session && this.session.bgTokenizer) this.session.bgTokenizer.scheduleStart();\n }.bind(this));\n this.on(\"change\", function (_, _self) {\n _self._$emitInputEvent.schedule(31);\n });\n this.setSession(session || options && options.session || new EditSession(\"\"));\n config.resetOptions(this);\n if (options) this.setOptions(options);\n\n config._signal(\"editor\", this);\n };\n\n Editor.$uid = 0;\n (function () {\n oop.implement(this, EventEmitter);\n\n this.$initOperationListeners = function () {\n this.commands.on(\"exec\", this.startOperation.bind(this), true);\n this.commands.on(\"afterExec\", this.endOperation.bind(this), true);\n this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this, true));\n this.on(\"change\", function () {\n if (!this.curOp) {\n this.startOperation();\n this.curOp.selectionBefore = this.$lastSel;\n }\n\n this.curOp.docChanged = true;\n }.bind(this), true);\n this.on(\"changeSelection\", function () {\n if (!this.curOp) {\n this.startOperation();\n this.curOp.selectionBefore = this.$lastSel;\n }\n\n this.curOp.selectionChanged = true;\n }.bind(this), true);\n };\n\n this.curOp = null;\n this.prevOp = {};\n\n this.startOperation = function (commandEvent) {\n if (this.curOp) {\n if (!commandEvent || this.curOp.command) return;\n this.prevOp = this.curOp;\n }\n\n if (!commandEvent) {\n this.previousCommand = null;\n commandEvent = {};\n }\n\n this.$opResetTimer.schedule();\n this.curOp = this.session.curOp = {\n command: commandEvent.command || {},\n args: commandEvent.args,\n scrollTop: this.renderer.scrollTop\n };\n this.curOp.selectionBefore = this.selection.toJSON();\n };\n\n this.endOperation = function (e) {\n if (this.curOp) {\n if (e && e.returnValue === false) return this.curOp = null;\n if (e == true && this.curOp.command && this.curOp.command.name == \"mouse\") return;\n\n this._signal(\"beforeEndOperation\");\n\n if (!this.curOp) return;\n var command = this.curOp.command;\n var scrollIntoView = command && command.scrollIntoView;\n\n if (scrollIntoView) {\n switch (scrollIntoView) {\n case \"center-animate\":\n scrollIntoView = \"animate\";\n\n case \"center\":\n this.renderer.scrollCursorIntoView(null, 0.5);\n break;\n\n case \"animate\":\n case \"cursor\":\n this.renderer.scrollCursorIntoView();\n break;\n\n case \"selectionPart\":\n var range = this.selection.getRange();\n var config = this.renderer.layerConfig;\n\n if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {\n this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);\n }\n\n break;\n\n default:\n break;\n }\n\n if (scrollIntoView == \"animate\") this.renderer.animateScrolling(this.curOp.scrollTop);\n }\n\n var sel = this.selection.toJSON();\n this.curOp.selectionAfter = sel;\n this.$lastSel = this.selection.toJSON();\n this.session.getUndoManager().addSelection(sel);\n this.prevOp = this.curOp;\n this.curOp = null;\n }\n };\n\n this.$mergeableCommands = [\"backspace\", \"del\", \"insertstring\"];\n\n this.$historyTracker = function (e) {\n if (!this.$mergeUndoDeltas) return;\n var prev = this.prevOp;\n var mergeableCommands = this.$mergeableCommands;\n var shouldMerge = prev.command && e.command.name == prev.command.name;\n\n if (e.command.name == \"insertstring\") {\n var text = e.args;\n if (this.mergeNextCommand === undefined) this.mergeNextCommand = true;\n shouldMerge = shouldMerge && this.mergeNextCommand // previous command allows to coalesce with\n && (!/\\s/.test(text) || /\\s/.test(prev.args)); // previous insertion was of same type\n\n this.mergeNextCommand = true;\n } else {\n shouldMerge = shouldMerge && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable\n }\n\n if (this.$mergeUndoDeltas != \"always\" && Date.now() - this.sequenceStartTime > 2000) {\n shouldMerge = false; // the sequence is too long\n }\n\n if (shouldMerge) this.session.mergeUndoDeltas = true;else if (mergeableCommands.indexOf(e.command.name) !== -1) this.sequenceStartTime = Date.now();\n };\n\n this.setKeyboardHandler = function (keyboardHandler, cb) {\n if (keyboardHandler && typeof keyboardHandler === \"string\" && keyboardHandler != \"ace\") {\n this.$keybindingId = keyboardHandler;\n\n var _self = this;\n\n config.loadModule([\"keybinding\", keyboardHandler], function (module) {\n if (_self.$keybindingId == keyboardHandler) _self.keyBinding.setKeyboardHandler(module && module.handler);\n cb && cb();\n });\n } else {\n this.$keybindingId = null;\n this.keyBinding.setKeyboardHandler(keyboardHandler);\n cb && cb();\n }\n };\n\n this.getKeyboardHandler = function () {\n return this.keyBinding.getKeyboardHandler();\n };\n\n this.setSession = function (session) {\n if (this.session == session) return;\n if (this.curOp) this.endOperation();\n this.curOp = {};\n var oldSession = this.session;\n\n if (oldSession) {\n this.session.off(\"change\", this.$onDocumentChange);\n this.session.off(\"changeMode\", this.$onChangeMode);\n this.session.off(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.session.off(\"changeTabSize\", this.$onChangeTabSize);\n this.session.off(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.session.off(\"changeWrapMode\", this.$onChangeWrapMode);\n this.session.off(\"changeFold\", this.$onChangeFold);\n this.session.off(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.session.off(\"changeBackMarker\", this.$onChangeBackMarker);\n this.session.off(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.session.off(\"changeAnnotation\", this.$onChangeAnnotation);\n this.session.off(\"changeOverwrite\", this.$onCursorChange);\n this.session.off(\"changeScrollTop\", this.$onScrollTopChange);\n this.session.off(\"changeScrollLeft\", this.$onScrollLeftChange);\n var selection = this.session.getSelection();\n selection.off(\"changeCursor\", this.$onCursorChange);\n selection.off(\"changeSelection\", this.$onSelectionChange);\n }\n\n this.session = session;\n\n if (session) {\n this.$onDocumentChange = this.onDocumentChange.bind(this);\n session.on(\"change\", this.$onDocumentChange);\n this.renderer.setSession(session);\n this.$onChangeMode = this.onChangeMode.bind(this);\n session.on(\"changeMode\", this.$onChangeMode);\n this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);\n session.on(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);\n session.on(\"changeTabSize\", this.$onChangeTabSize);\n this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);\n session.on(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);\n session.on(\"changeWrapMode\", this.$onChangeWrapMode);\n this.$onChangeFold = this.onChangeFold.bind(this);\n session.on(\"changeFold\", this.$onChangeFold);\n this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);\n this.session.on(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);\n this.session.on(\"changeBackMarker\", this.$onChangeBackMarker);\n this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);\n this.session.on(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);\n this.session.on(\"changeAnnotation\", this.$onChangeAnnotation);\n this.$onCursorChange = this.onCursorChange.bind(this);\n this.session.on(\"changeOverwrite\", this.$onCursorChange);\n this.$onScrollTopChange = this.onScrollTopChange.bind(this);\n this.session.on(\"changeScrollTop\", this.$onScrollTopChange);\n this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);\n this.session.on(\"changeScrollLeft\", this.$onScrollLeftChange);\n this.selection = session.getSelection();\n this.selection.on(\"changeCursor\", this.$onCursorChange);\n this.$onSelectionChange = this.onSelectionChange.bind(this);\n this.selection.on(\"changeSelection\", this.$onSelectionChange);\n this.onChangeMode();\n this.onCursorChange();\n this.onScrollTopChange();\n this.onScrollLeftChange();\n this.onSelectionChange();\n this.onChangeFrontMarker();\n this.onChangeBackMarker();\n this.onChangeBreakpoint();\n this.onChangeAnnotation();\n this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();\n this.renderer.updateFull();\n } else {\n this.selection = null;\n this.renderer.setSession(session);\n }\n\n this._signal(\"changeSession\", {\n session: session,\n oldSession: oldSession\n });\n\n this.curOp = null;\n oldSession && oldSession._signal(\"changeEditor\", {\n oldEditor: this\n });\n session && session._signal(\"changeEditor\", {\n editor: this\n });\n if (session && session.bgTokenizer) session.bgTokenizer.scheduleStart();\n };\n\n this.getSession = function () {\n return this.session;\n };\n\n this.setValue = function (val, cursorPos) {\n this.session.doc.setValue(val);\n if (!cursorPos) this.selectAll();else if (cursorPos == 1) this.navigateFileEnd();else if (cursorPos == -1) this.navigateFileStart();\n return val;\n };\n\n this.getValue = function () {\n return this.session.getValue();\n };\n\n this.getSelection = function () {\n return this.selection;\n };\n\n this.resize = function (force) {\n this.renderer.onResize(force);\n };\n\n this.setTheme = function (theme, cb) {\n this.renderer.setTheme(theme, cb);\n };\n\n this.getTheme = function () {\n return this.renderer.getTheme();\n };\n\n this.setStyle = function (style) {\n this.renderer.setStyle(style);\n };\n\n this.unsetStyle = function (style) {\n this.renderer.unsetStyle(style);\n };\n\n this.getFontSize = function () {\n return this.getOption(\"fontSize\") || dom.computedStyle(this.container).fontSize;\n };\n\n this.setFontSize = function (size) {\n this.setOption(\"fontSize\", size);\n };\n\n this.$highlightBrackets = function () {\n if (this.session.$bracketHighlight) {\n this.session.removeMarker(this.session.$bracketHighlight);\n this.session.$bracketHighlight = null;\n }\n\n if (this.$highlightPending) {\n return;\n }\n\n var self = this;\n this.$highlightPending = true;\n setTimeout(function () {\n self.$highlightPending = false;\n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n var pos = session.findMatchingBracket(self.getCursorPosition());\n\n if (pos) {\n var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);\n } else if (session.$mode.getMatching) {\n var range = session.$mode.getMatching(self.session);\n }\n\n if (range) session.$bracketHighlight = session.addMarker(range, \"ace_bracket\", \"text\");\n }, 50);\n };\n\n this.$highlightTags = function () {\n if (this.$highlightTagPending) return;\n var self = this;\n this.$highlightTagPending = true;\n setTimeout(function () {\n self.$highlightTagPending = false;\n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n var pos = self.getCursorPosition();\n var iterator = new TokenIterator(self.session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n\n if (!token || !/\\b(?:tag-open|tag-name)/.test(token.type)) {\n session.removeMarker(session.$tagHighlight);\n session.$tagHighlight = null;\n return;\n }\n\n if (token.type.indexOf(\"tag-open\") != -1) {\n token = iterator.stepForward();\n if (!token) return;\n }\n\n var tag = token.value;\n var depth = 0;\n var prevToken = iterator.stepBackward();\n\n if (prevToken.value == '<') {\n do {\n prevToken = token;\n token = iterator.stepForward();\n\n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<') {\n depth++;\n } else if (prevToken.value === '= 0);\n } else {\n do {\n token = prevToken;\n prevToken = iterator.stepBackward();\n\n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<') {\n depth++;\n } else if (prevToken.value === ' 1)) highlight = false;\n }\n\n if (session.$highlightLineMarker && !highlight) {\n session.removeMarker(session.$highlightLineMarker.id);\n session.$highlightLineMarker = null;\n } else if (!session.$highlightLineMarker && highlight) {\n var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);\n range.id = session.addMarker(range, \"ace_active-line\", \"screenLine\");\n session.$highlightLineMarker = range;\n } else if (highlight) {\n session.$highlightLineMarker.start.row = highlight.row;\n session.$highlightLineMarker.end.row = highlight.row;\n session.$highlightLineMarker.start.column = highlight.column;\n\n session._signal(\"changeBackMarker\");\n }\n };\n\n this.onSelectionChange = function (e) {\n var session = this.session;\n\n if (session.$selectionMarker) {\n session.removeMarker(session.$selectionMarker);\n }\n\n session.$selectionMarker = null;\n\n if (!this.selection.isEmpty()) {\n var range = this.selection.getRange();\n var style = this.getSelectionStyle();\n session.$selectionMarker = session.addMarker(range, \"ace_selection\", style);\n } else {\n this.$updateHighlightActiveLine();\n }\n\n var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();\n this.session.highlight(re);\n\n this._signal(\"changeSelection\");\n };\n\n this.$getSelectionHighLightRegexp = function () {\n var session = this.session;\n var selection = this.getSelectionRange();\n if (selection.isEmpty() || selection.isMultiLine()) return;\n var startColumn = selection.start.column;\n var endColumn = selection.end.column;\n var line = session.getLine(selection.start.row);\n var needle = line.substring(startColumn, endColumn);\n if (needle.length > 5000 || !/[\\w\\d]/.test(needle)) return;\n var re = this.$search.$assembleRegExp({\n wholeWord: true,\n caseSensitive: true,\n needle: needle\n });\n var wordWithBoundary = line.substring(startColumn - 1, endColumn + 1);\n if (!re.test(wordWithBoundary)) return;\n return re;\n };\n\n this.onChangeFrontMarker = function () {\n this.renderer.updateFrontMarkers();\n };\n\n this.onChangeBackMarker = function () {\n this.renderer.updateBackMarkers();\n };\n\n this.onChangeBreakpoint = function () {\n this.renderer.updateBreakpoints();\n };\n\n this.onChangeAnnotation = function () {\n this.renderer.setAnnotations(this.session.getAnnotations());\n };\n\n this.onChangeMode = function (e) {\n this.renderer.updateText();\n\n this._emit(\"changeMode\", e);\n };\n\n this.onChangeWrapLimit = function () {\n this.renderer.updateFull();\n };\n\n this.onChangeWrapMode = function () {\n this.renderer.onResize(true);\n };\n\n this.onChangeFold = function () {\n this.$updateHighlightActiveLine();\n this.renderer.updateFull();\n };\n\n this.getSelectedText = function () {\n return this.session.getTextRange(this.getSelectionRange());\n };\n\n this.getCopyText = function () {\n var text = this.getSelectedText();\n var nl = this.session.doc.getNewLineCharacter();\n var copyLine = false;\n\n if (!text && this.$copyWithEmptySelection) {\n copyLine = true;\n var ranges = this.selection.getAllRanges();\n\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (i && ranges[i - 1].start.row == range.start.row) continue;\n text += this.session.getLine(range.start.row) + nl;\n }\n }\n\n var e = {\n text: text\n };\n\n this._signal(\"copy\", e);\n\n clipboard.lineMode = copyLine ? e.text : \"\";\n return e.text;\n };\n\n this.onCopy = function () {\n this.commands.exec(\"copy\", this);\n };\n\n this.onCut = function () {\n this.commands.exec(\"cut\", this);\n };\n\n this.onPaste = function (text, event) {\n var e = {\n text: text,\n event: event\n };\n this.commands.exec(\"paste\", this, e);\n };\n\n this.$handlePaste = function (e) {\n if (typeof e == \"string\") e = {\n text: e\n };\n\n this._signal(\"paste\", e);\n\n var text = e.text;\n var lineMode = text == clipboard.lineMode;\n var session = this.session;\n\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {\n if (lineMode) session.insert({\n row: this.selection.lead.row,\n column: 0\n }, text);else this.insert(text);\n } else if (lineMode) {\n this.selection.rangeList.ranges.forEach(function (range) {\n session.insert({\n row: range.start.row,\n column: 0\n }, text);\n });\n } else {\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var ranges = this.selection.rangeList.ranges;\n var isFullLine = lines.length == 2 && (!lines[0] || !lines[1]);\n if (lines.length != ranges.length || isFullLine) return this.commands.exec(\"insertstring\", this, text);\n\n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.isEmpty()) session.remove(range);\n session.insert(range.start, lines[i]);\n }\n }\n };\n\n this.execCommand = function (command, args) {\n return this.commands.exec(command, this, args);\n };\n\n this.insert = function (text, pasted) {\n var session = this.session;\n var mode = session.getMode();\n var cursor = this.getCursorPosition();\n\n if (this.getBehavioursEnabled() && !pasted) {\n var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);\n\n if (transform) {\n if (text !== transform.text) {\n if (!this.inVirtualSelectionMode) {\n this.session.mergeUndoDeltas = false;\n this.mergeNextCommand = false;\n }\n }\n\n text = transform.text;\n }\n }\n\n if (text == \"\\t\") text = this.session.getTabString();\n\n if (!this.selection.isEmpty()) {\n var range = this.getSelectionRange();\n cursor = this.session.remove(range);\n this.clearSelection();\n } else if (this.session.getOverwrite() && text.indexOf(\"\\n\") == -1) {\n var range = new Range.fromPoints(cursor, cursor);\n range.end.column += text.length;\n this.session.remove(range);\n }\n\n if (text == \"\\n\" || text == \"\\r\\n\") {\n var line = session.getLine(cursor.row);\n\n if (cursor.column > line.search(/\\S|$/)) {\n var d = line.substr(cursor.column).search(/\\S|$/);\n session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);\n }\n }\n\n this.clearSelection();\n var start = cursor.column;\n var lineState = session.getState(cursor.row);\n var line = session.getLine(cursor.row);\n var shouldOutdent = mode.checkOutdent(lineState, line, text);\n session.insert(cursor, text);\n\n if (transform && transform.selection) {\n if (transform.selection.length == 2) {\n // Transform relative to the current column\n this.selection.setSelectionRange(new Range(cursor.row, start + transform.selection[0], cursor.row, start + transform.selection[1]));\n } else {\n // Transform relative to the current row.\n this.selection.setSelectionRange(new Range(cursor.row + transform.selection[0], transform.selection[1], cursor.row + transform.selection[2], transform.selection[3]));\n }\n }\n\n if (session.getDocument().isNewLine(text)) {\n var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());\n session.insert({\n row: cursor.row + 1,\n column: 0\n }, lineIndent);\n }\n\n if (shouldOutdent) mode.autoOutdent(lineState, session, cursor.row);\n };\n\n this.onTextInput = function (text, composition) {\n if (!composition) return this.keyBinding.onTextInput(text);\n this.startOperation({\n command: {\n name: \"insertstring\"\n }\n });\n var applyComposition = this.applyComposition.bind(this, text, composition);\n if (this.selection.rangeCount) this.forEachSelection(applyComposition);else applyComposition();\n this.endOperation();\n };\n\n this.applyComposition = function (text, composition) {\n if (composition.extendLeft || composition.extendRight) {\n var r = this.selection.getRange();\n r.start.column -= composition.extendLeft;\n r.end.column += composition.extendRight;\n this.selection.setRange(r);\n if (!text && !r.isEmpty()) this.remove();\n }\n\n if (text || !this.selection.isEmpty()) this.insert(text, true);\n\n if (composition.restoreStart || composition.restoreEnd) {\n var r = this.selection.getRange();\n r.start.column -= composition.restoreStart;\n r.end.column -= composition.restoreEnd;\n this.selection.setRange(r);\n }\n };\n\n this.onCommandKey = function (e, hashId, keyCode) {\n return this.keyBinding.onCommandKey(e, hashId, keyCode);\n };\n\n this.setOverwrite = function (overwrite) {\n this.session.setOverwrite(overwrite);\n };\n\n this.getOverwrite = function () {\n return this.session.getOverwrite();\n };\n\n this.toggleOverwrite = function () {\n this.session.toggleOverwrite();\n };\n\n this.setScrollSpeed = function (speed) {\n this.setOption(\"scrollSpeed\", speed);\n };\n\n this.getScrollSpeed = function () {\n return this.getOption(\"scrollSpeed\");\n };\n\n this.setDragDelay = function (dragDelay) {\n this.setOption(\"dragDelay\", dragDelay);\n };\n\n this.getDragDelay = function () {\n return this.getOption(\"dragDelay\");\n };\n\n this.setSelectionStyle = function (val) {\n this.setOption(\"selectionStyle\", val);\n };\n\n this.getSelectionStyle = function () {\n return this.getOption(\"selectionStyle\");\n };\n\n this.setHighlightActiveLine = function (shouldHighlight) {\n this.setOption(\"highlightActiveLine\", shouldHighlight);\n };\n\n this.getHighlightActiveLine = function () {\n return this.getOption(\"highlightActiveLine\");\n };\n\n this.setHighlightGutterLine = function (shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function () {\n return this.getOption(\"highlightGutterLine\");\n };\n\n this.setHighlightSelectedWord = function (shouldHighlight) {\n this.setOption(\"highlightSelectedWord\", shouldHighlight);\n };\n\n this.getHighlightSelectedWord = function () {\n return this.$highlightSelectedWord;\n };\n\n this.setAnimatedScroll = function (shouldAnimate) {\n this.renderer.setAnimatedScroll(shouldAnimate);\n };\n\n this.getAnimatedScroll = function () {\n return this.renderer.getAnimatedScroll();\n };\n\n this.setShowInvisibles = function (showInvisibles) {\n this.renderer.setShowInvisibles(showInvisibles);\n };\n\n this.getShowInvisibles = function () {\n return this.renderer.getShowInvisibles();\n };\n\n this.setDisplayIndentGuides = function (display) {\n this.renderer.setDisplayIndentGuides(display);\n };\n\n this.getDisplayIndentGuides = function () {\n return this.renderer.getDisplayIndentGuides();\n };\n\n this.setShowPrintMargin = function (showPrintMargin) {\n this.renderer.setShowPrintMargin(showPrintMargin);\n };\n\n this.getShowPrintMargin = function () {\n return this.renderer.getShowPrintMargin();\n };\n\n this.setPrintMarginColumn = function (showPrintMargin) {\n this.renderer.setPrintMarginColumn(showPrintMargin);\n };\n\n this.getPrintMarginColumn = function () {\n return this.renderer.getPrintMarginColumn();\n };\n\n this.setReadOnly = function (readOnly) {\n this.setOption(\"readOnly\", readOnly);\n };\n\n this.getReadOnly = function () {\n return this.getOption(\"readOnly\");\n };\n\n this.setBehavioursEnabled = function (enabled) {\n this.setOption(\"behavioursEnabled\", enabled);\n };\n\n this.getBehavioursEnabled = function () {\n return this.getOption(\"behavioursEnabled\");\n };\n\n this.setWrapBehavioursEnabled = function (enabled) {\n this.setOption(\"wrapBehavioursEnabled\", enabled);\n };\n\n this.getWrapBehavioursEnabled = function () {\n return this.getOption(\"wrapBehavioursEnabled\");\n };\n\n this.setShowFoldWidgets = function (show) {\n this.setOption(\"showFoldWidgets\", show);\n };\n\n this.getShowFoldWidgets = function () {\n return this.getOption(\"showFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function (fade) {\n this.setOption(\"fadeFoldWidgets\", fade);\n };\n\n this.getFadeFoldWidgets = function () {\n return this.getOption(\"fadeFoldWidgets\");\n };\n\n this.remove = function (dir) {\n if (this.selection.isEmpty()) {\n if (dir == \"left\") this.selection.selectLeft();else this.selection.selectRight();\n }\n\n var range = this.getSelectionRange();\n\n if (this.getBehavioursEnabled()) {\n var session = this.session;\n var state = session.getState(range.start.row);\n var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);\n\n if (range.end.column === 0) {\n var text = session.getTextRange(range);\n\n if (text[text.length - 1] == \"\\n\") {\n var line = session.getLine(range.end.row);\n\n if (/^\\s+$/.test(line)) {\n range.end.column = line.length;\n }\n }\n }\n\n if (new_range) range = new_range;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n\n this.removeWordRight = function () {\n if (this.selection.isEmpty()) this.selection.selectWordRight();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n\n this.removeWordLeft = function () {\n if (this.selection.isEmpty()) this.selection.selectWordLeft();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n\n this.removeToLineStart = function () {\n if (this.selection.isEmpty()) this.selection.selectLineStart();\n if (this.selection.isEmpty()) this.selection.selectLeft();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n\n this.removeToLineEnd = function () {\n if (this.selection.isEmpty()) this.selection.selectLineEnd();\n var range = this.getSelectionRange();\n\n if (range.start.column == range.end.column && range.start.row == range.end.row) {\n range.end.column = 0;\n range.end.row++;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n\n this.splitLine = function () {\n if (!this.selection.isEmpty()) {\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n }\n\n var cursor = this.getCursorPosition();\n this.insert(\"\\n\");\n this.moveCursorToPosition(cursor);\n };\n\n this.transposeLetters = function () {\n if (!this.selection.isEmpty()) {\n return;\n }\n\n var cursor = this.getCursorPosition();\n var column = cursor.column;\n if (column === 0) return;\n var line = this.session.getLine(cursor.row);\n var swap, range;\n\n if (column < line.length) {\n swap = line.charAt(column) + line.charAt(column - 1);\n range = new Range(cursor.row, column - 1, cursor.row, column + 1);\n } else {\n swap = line.charAt(column - 1) + line.charAt(column - 2);\n range = new Range(cursor.row, column - 2, cursor.row, column);\n }\n\n this.session.replace(range, swap);\n this.session.selection.moveToPosition(range.end);\n };\n\n this.toLowerCase = function () {\n var originalRange = this.getSelectionRange();\n\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toLowerCase());\n this.selection.setSelectionRange(originalRange);\n };\n\n this.toUpperCase = function () {\n var originalRange = this.getSelectionRange();\n\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toUpperCase());\n this.selection.setSelectionRange(originalRange);\n };\n\n this.indent = function () {\n var session = this.session;\n var range = this.getSelectionRange();\n\n if (range.start.row < range.end.row) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n } else if (range.start.column < range.end.column) {\n var text = session.getTextRange(range);\n\n if (!/^\\s+$/.test(text)) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n }\n\n var line = session.getLine(range.start.row);\n var position = range.start;\n var size = session.getTabSize();\n var column = session.documentToScreenColumn(position.row, position.column);\n\n if (this.session.getUseSoftTabs()) {\n var count = size - column % size;\n var indentString = lang.stringRepeat(\" \", count);\n } else {\n var count = column % size;\n\n while (line[range.start.column - 1] == \" \" && count) {\n range.start.column--;\n count--;\n }\n\n this.selection.setSelectionRange(range);\n indentString = \"\\t\";\n }\n\n return this.insert(indentString);\n };\n\n this.blockIndent = function () {\n var rows = this.$getSelectedRows();\n this.session.indentRows(rows.first, rows.last, \"\\t\");\n };\n\n this.blockOutdent = function () {\n var selection = this.session.getSelection();\n this.session.outdentRows(selection.getRange());\n };\n\n this.sortLines = function () {\n var rows = this.$getSelectedRows();\n var session = this.session;\n var lines = [];\n\n for (var i = rows.first; i <= rows.last; i++) {\n lines.push(session.getLine(i));\n }\n\n lines.sort(function (a, b) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n if (a.toLowerCase() > b.toLowerCase()) return 1;\n return 0;\n });\n var deleteRange = new Range(0, 0, 0, 0);\n\n for (var i = rows.first; i <= rows.last; i++) {\n var line = session.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n deleteRange.end.column = line.length;\n session.replace(deleteRange, lines[i - rows.first]);\n }\n };\n\n this.toggleCommentLines = function () {\n var state = this.session.getState(this.getCursorPosition().row);\n var rows = this.$getSelectedRows();\n this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);\n };\n\n this.toggleBlockComment = function () {\n var cursor = this.getCursorPosition();\n var state = this.session.getState(cursor.row);\n var range = this.getSelectionRange();\n this.session.getMode().toggleBlockComment(state, this.session, range, cursor);\n };\n\n this.getNumberAt = function (row, column) {\n var _numberRx = /[\\-]?[0-9]+(?:\\.[0-9]+)?/g;\n _numberRx.lastIndex = 0;\n var s = this.session.getLine(row);\n\n while (_numberRx.lastIndex < column) {\n var m = _numberRx.exec(s);\n\n if (m.index <= column && m.index + m[0].length >= column) {\n var number = {\n value: m[0],\n start: m.index,\n end: m.index + m[0].length\n };\n return number;\n }\n }\n\n return null;\n };\n\n this.modifyNumber = function (amount) {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n var charRange = new Range(row, column - 1, row, column);\n var c = this.session.getTextRange(charRange);\n\n if (!isNaN(parseFloat(c)) && isFinite(c)) {\n var nr = this.getNumberAt(row, column);\n\n if (nr) {\n var fp = nr.value.indexOf(\".\") >= 0 ? nr.start + nr.value.indexOf(\".\") + 1 : nr.end;\n var decimals = nr.start + nr.value.length - fp;\n var t = parseFloat(nr.value);\n t *= Math.pow(10, decimals);\n\n if (fp !== nr.end && column < fp) {\n amount *= Math.pow(10, nr.end - column - 1);\n } else {\n amount *= Math.pow(10, nr.end - column);\n }\n\n t += amount;\n t /= Math.pow(10, decimals);\n var nnr = t.toFixed(decimals);\n var replaceRange = new Range(row, nr.start, row, nr.end);\n this.session.replace(replaceRange, nnr);\n this.moveCursorTo(row, Math.max(nr.start + 1, column + nnr.length - nr.value.length));\n }\n } else {\n this.toggleWord();\n }\n };\n\n this.$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\"], [\"&&\", \"||\"], [\"==\", \"!=\"]];\n\n this.toggleWord = function () {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n this.selection.selectWord();\n var currentState = this.getSelectedText();\n var currWordStart = this.selection.getWordRange().start.column;\n var wordParts = currentState.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g, '$1 ').split(/\\s/);\n var delta = column - currWordStart - 1;\n if (delta < 0) delta = 0;\n var curLength = 0,\n itLength = 0;\n var that = this;\n\n if (currentState.match(/[A-Za-z0-9_]+/)) {\n wordParts.forEach(function (item, i) {\n itLength = curLength + item.length;\n\n if (delta >= curLength && delta <= itLength) {\n currentState = item;\n that.selection.clearSelection();\n that.moveCursorTo(row, curLength + currWordStart);\n that.selection.selectTo(row, itLength + currWordStart);\n }\n\n curLength = itLength;\n });\n }\n\n var wordPairs = this.$toggleWordPairs;\n var reg;\n\n for (var i = 0; i < wordPairs.length; i++) {\n var item = wordPairs[i];\n\n for (var j = 0; j <= 1; j++) {\n var negate = +!j;\n var firstCondition = currentState.match(new RegExp('^\\\\s?_?(' + lang.escapeRegExp(item[j]) + ')\\\\s?$', 'i'));\n\n if (firstCondition) {\n var secondCondition = currentState.match(new RegExp('([_]|^|\\\\s)(' + lang.escapeRegExp(firstCondition[1]) + ')($|\\\\s)', 'g'));\n\n if (secondCondition) {\n reg = currentState.replace(new RegExp(lang.escapeRegExp(item[j]), 'i'), function (result) {\n var res = item[negate];\n\n if (result.toUpperCase() == result) {\n res = res.toUpperCase();\n } else if (result.charAt(0).toUpperCase() == result.charAt(0)) {\n res = res.substr(0, 0) + item[negate].charAt(0).toUpperCase() + res.substr(1);\n }\n\n return res;\n });\n this.insert(reg);\n reg = \"\";\n }\n }\n }\n }\n };\n\n this.removeLines = function () {\n var rows = this.$getSelectedRows();\n this.session.removeFullLines(rows.first, rows.last);\n this.clearSelection();\n };\n\n this.duplicateSelection = function () {\n var sel = this.selection;\n var doc = this.session;\n var range = sel.getRange();\n var reverse = sel.isBackwards();\n\n if (range.isEmpty()) {\n var row = range.start.row;\n doc.duplicateLines(row, row);\n } else {\n var point = reverse ? range.start : range.end;\n var endPoint = doc.insert(point, doc.getTextRange(range), false);\n range.start = point;\n range.end = endPoint;\n sel.setSelectionRange(range, reverse);\n }\n };\n\n this.moveLinesDown = function () {\n this.$moveLines(1, false);\n };\n\n this.moveLinesUp = function () {\n this.$moveLines(-1, false);\n };\n\n this.moveText = function (range, toPosition, copy) {\n return this.session.moveText(range, toPosition, copy);\n };\n\n this.copyLinesUp = function () {\n this.$moveLines(-1, true);\n };\n\n this.copyLinesDown = function () {\n this.$moveLines(1, true);\n };\n\n this.$moveLines = function (dir, copy) {\n var rows, moved;\n var selection = this.selection;\n\n if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {\n var range = selection.toOrientedRange();\n rows = this.$getSelectedRows(range);\n moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);\n if (copy && dir == -1) moved = 0;\n range.moveBy(moved, 0);\n selection.fromOrientedRange(range);\n } else {\n var ranges = selection.rangeList.ranges;\n selection.rangeList.detach(this.session);\n this.inVirtualSelectionMode = true;\n var diff = 0;\n var totalDiff = 0;\n var l = ranges.length;\n\n for (var i = 0; i < l; i++) {\n var rangeIndex = i;\n ranges[i].moveBy(diff, 0);\n rows = this.$getSelectedRows(ranges[i]);\n var first = rows.first;\n var last = rows.last;\n\n while (++i < l) {\n if (totalDiff) ranges[i].moveBy(totalDiff, 0);\n var subRows = this.$getSelectedRows(ranges[i]);\n if (copy && subRows.first != last) break;else if (!copy && subRows.first > last + 1) break;\n last = subRows.last;\n }\n\n i--;\n diff = this.session.$moveLines(first, last, copy ? 0 : dir);\n if (copy && dir == -1) rangeIndex = i + 1;\n\n while (rangeIndex <= i) {\n ranges[rangeIndex].moveBy(diff, 0);\n rangeIndex++;\n }\n\n if (!copy) diff = 0;\n totalDiff += diff;\n }\n\n selection.fromOrientedRange(selection.ranges[0]);\n selection.rangeList.attach(this.session);\n this.inVirtualSelectionMode = false;\n }\n };\n\n this.$getSelectedRows = function (range) {\n range = (range || this.getSelectionRange()).collapseRows();\n return {\n first: this.session.getRowFoldStart(range.start.row),\n last: this.session.getRowFoldEnd(range.end.row)\n };\n };\n\n this.onCompositionStart = function (compositionState) {\n this.renderer.showComposition(compositionState);\n };\n\n this.onCompositionUpdate = function (text) {\n this.renderer.setCompositionText(text);\n };\n\n this.onCompositionEnd = function () {\n this.renderer.hideComposition();\n };\n\n this.getFirstVisibleRow = function () {\n return this.renderer.getFirstVisibleRow();\n };\n\n this.getLastVisibleRow = function () {\n return this.renderer.getLastVisibleRow();\n };\n\n this.isRowVisible = function (row) {\n return row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow();\n };\n\n this.isRowFullyVisible = function (row) {\n return row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow();\n };\n\n this.$getVisibleRowCount = function () {\n return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;\n };\n\n this.$moveByPage = function (dir, select) {\n var renderer = this.renderer;\n var config = this.renderer.layerConfig;\n var rows = dir * Math.floor(config.height / config.lineHeight);\n\n if (select === true) {\n this.selection.$moveSelection(function () {\n this.moveCursorBy(rows, 0);\n });\n } else if (select === false) {\n this.selection.moveCursorBy(rows, 0);\n this.selection.clearSelection();\n }\n\n var scrollTop = renderer.scrollTop;\n renderer.scrollBy(0, rows * config.lineHeight);\n if (select != null) renderer.scrollCursorIntoView(null, 0.5);\n renderer.animateScrolling(scrollTop);\n };\n\n this.selectPageDown = function () {\n this.$moveByPage(1, true);\n };\n\n this.selectPageUp = function () {\n this.$moveByPage(-1, true);\n };\n\n this.gotoPageDown = function () {\n this.$moveByPage(1, false);\n };\n\n this.gotoPageUp = function () {\n this.$moveByPage(-1, false);\n };\n\n this.scrollPageDown = function () {\n this.$moveByPage(1);\n };\n\n this.scrollPageUp = function () {\n this.$moveByPage(-1);\n };\n\n this.scrollToRow = function (row) {\n this.renderer.scrollToRow(row);\n };\n\n this.scrollToLine = function (line, center, animate, callback) {\n this.renderer.scrollToLine(line, center, animate, callback);\n };\n\n this.centerSelection = function () {\n var range = this.getSelectionRange();\n var pos = {\n row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),\n column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)\n };\n this.renderer.alignCursor(pos, 0.5);\n };\n\n this.getCursorPosition = function () {\n return this.selection.getCursor();\n };\n\n this.getCursorPositionScreen = function () {\n return this.session.documentToScreenPosition(this.getCursorPosition());\n };\n\n this.getSelectionRange = function () {\n return this.selection.getRange();\n };\n\n this.selectAll = function () {\n this.selection.selectAll();\n };\n\n this.clearSelection = function () {\n this.selection.clearSelection();\n };\n\n this.moveCursorTo = function (row, column) {\n this.selection.moveCursorTo(row, column);\n };\n\n this.moveCursorToPosition = function (pos) {\n this.selection.moveCursorToPosition(pos);\n };\n\n this.jumpToMatching = function (select, expand) {\n var cursor = this.getCursorPosition();\n var iterator = new TokenIterator(this.session, cursor.row, cursor.column);\n var prevToken = iterator.getCurrentToken();\n var token = prevToken || iterator.stepForward();\n if (!token) return;\n var matchType;\n var found = false;\n var depth = {};\n var i = cursor.column - token.start;\n var bracketType;\n var brackets = {\n \")\": \"(\",\n \"(\": \"(\",\n \"]\": \"[\",\n \"[\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\"\n };\n\n do {\n if (token.value.match(/[{}()\\[\\]]/g)) {\n for (; i < token.value.length && !found; i++) {\n if (!brackets[token.value[i]]) {\n continue;\n }\n\n bracketType = brackets[token.value[i]] + '.' + token.type.replace(\"rparen\", \"lparen\");\n\n if (isNaN(depth[bracketType])) {\n depth[bracketType] = 0;\n }\n\n switch (token.value[i]) {\n case '(':\n case '[':\n case '{':\n depth[bracketType]++;\n break;\n\n case ')':\n case ']':\n case '}':\n depth[bracketType]--;\n\n if (depth[bracketType] === -1) {\n matchType = 'bracket';\n found = true;\n }\n\n break;\n }\n }\n } else if (token.type.indexOf('tag-name') !== -1) {\n if (isNaN(depth[token.value])) {\n depth[token.value] = 0;\n }\n\n if (prevToken.value === '<') {\n depth[token.value]++;\n } else if (prevToken.value === '= 0; --i) {\n if (this.$tryReplace(ranges[i], replacement)) {\n replaced++;\n }\n }\n\n this.selection.setSelectionRange(selection);\n return replaced;\n };\n\n this.$tryReplace = function (range, replacement) {\n var input = this.session.getTextRange(range);\n replacement = this.$search.replace(input, replacement);\n\n if (replacement !== null) {\n range.end = this.session.replace(range, replacement);\n return range;\n } else {\n return null;\n }\n };\n\n this.getLastSearchOptions = function () {\n return this.$search.getOptions();\n };\n\n this.find = function (needle, options, animate) {\n if (!options) options = {};\n if (typeof needle == \"string\" || needle instanceof RegExp) options.needle = needle;else if (typeof needle == \"object\") oop.mixin(options, needle);\n var range = this.selection.getRange();\n\n if (options.needle == null) {\n needle = this.session.getTextRange(range) || this.$search.$options.needle;\n\n if (!needle) {\n range = this.session.getWordRange(range.start.row, range.start.column);\n needle = this.session.getTextRange(range);\n }\n\n this.$search.set({\n needle: needle\n });\n }\n\n this.$search.set(options);\n if (!options.start) this.$search.set({\n start: range\n });\n var newRange = this.$search.find(this.session);\n if (options.preventScroll) return newRange;\n\n if (newRange) {\n this.revealRange(newRange, animate);\n return newRange;\n }\n\n if (options.backwards) range.start = range.end;else range.end = range.start;\n this.selection.setRange(range);\n };\n\n this.findNext = function (options, animate) {\n this.find({\n skipCurrent: true,\n backwards: false\n }, options, animate);\n };\n\n this.findPrevious = function (options, animate) {\n this.find(options, {\n skipCurrent: true,\n backwards: true\n }, animate);\n };\n\n this.revealRange = function (range, animate) {\n this.session.unfold(range);\n this.selection.setSelectionRange(range);\n var scrollTop = this.renderer.scrollTop;\n this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);\n if (animate !== false) this.renderer.animateScrolling(scrollTop);\n };\n\n this.undo = function () {\n this.session.getUndoManager().undo(this.session);\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n\n this.redo = function () {\n this.session.getUndoManager().redo(this.session);\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n\n this.destroy = function () {\n this.renderer.destroy();\n\n this._signal(\"destroy\", this);\n\n if (this.session) {\n this.session.destroy();\n }\n };\n\n this.setAutoScrollEditorIntoView = function (enable) {\n if (!enable) return;\n var rect;\n var self = this;\n var shouldScroll = false;\n if (!this.$scrollAnchor) this.$scrollAnchor = document.createElement(\"div\");\n var scrollAnchor = this.$scrollAnchor;\n scrollAnchor.style.cssText = \"position:absolute\";\n this.container.insertBefore(scrollAnchor, this.container.firstChild);\n var onChangeSelection = this.on(\"changeSelection\", function () {\n shouldScroll = true;\n });\n var onBeforeRender = this.renderer.on(\"beforeRender\", function () {\n if (shouldScroll) rect = self.renderer.container.getBoundingClientRect();\n });\n var onAfterRender = this.renderer.on(\"afterRender\", function () {\n if (shouldScroll && rect && (self.isFocused() || self.searchBox && self.searchBox.isFocused())) {\n var renderer = self.renderer;\n var pos = renderer.$cursorLayer.$pixelPos;\n var config = renderer.layerConfig;\n var top = pos.top - config.offset;\n\n if (pos.top >= 0 && top + rect.top < 0) {\n shouldScroll = true;\n } else if (pos.top < config.height && pos.top + rect.top + config.lineHeight > window.innerHeight) {\n shouldScroll = false;\n } else {\n shouldScroll = null;\n }\n\n if (shouldScroll != null) {\n scrollAnchor.style.top = top + \"px\";\n scrollAnchor.style.left = pos.left + \"px\";\n scrollAnchor.style.height = config.lineHeight + \"px\";\n scrollAnchor.scrollIntoView(shouldScroll);\n }\n\n shouldScroll = rect = null;\n }\n });\n\n this.setAutoScrollEditorIntoView = function (enable) {\n if (enable) return;\n delete this.setAutoScrollEditorIntoView;\n this.off(\"changeSelection\", onChangeSelection);\n this.renderer.off(\"afterRender\", onAfterRender);\n this.renderer.off(\"beforeRender\", onBeforeRender);\n };\n };\n\n this.$resetCursorStyle = function () {\n var style = this.$cursorStyle || \"ace\";\n var cursorLayer = this.renderer.$cursorLayer;\n if (!cursorLayer) return;\n cursorLayer.setSmoothBlinking(/smooth/.test(style));\n cursorLayer.isBlinking = !this.$readOnly && style != \"wide\";\n dom.setCssClass(cursorLayer.element, \"ace_slim-cursors\", /slim/.test(style));\n };\n\n this.prompt = function (message, options, callback) {\n var editor = this;\n config.loadModule(\"./ext/prompt\", function (module) {\n module.prompt(editor, message, options, callback);\n });\n };\n }).call(Editor.prototype);\n config.defineOptions(Editor.prototype, \"editor\", {\n selectionStyle: {\n set: function set(style) {\n this.onSelectionChange();\n\n this._signal(\"changeSelectionStyle\", {\n data: style\n });\n },\n initialValue: \"line\"\n },\n highlightActiveLine: {\n set: function set() {\n this.$updateHighlightActiveLine();\n },\n initialValue: true\n },\n highlightSelectedWord: {\n set: function set(shouldHighlight) {\n this.$onSelectionChange();\n },\n initialValue: true\n },\n readOnly: {\n set: function set(readOnly) {\n this.textInput.setReadOnly(readOnly);\n this.$resetCursorStyle();\n },\n initialValue: false\n },\n copyWithEmptySelection: {\n set: function set(value) {\n this.textInput.setCopyWithEmptySelection(value);\n },\n initialValue: false\n },\n cursorStyle: {\n set: function set(val) {\n this.$resetCursorStyle();\n },\n values: [\"ace\", \"slim\", \"smooth\", \"wide\"],\n initialValue: \"ace\"\n },\n mergeUndoDeltas: {\n values: [false, true, \"always\"],\n initialValue: true\n },\n behavioursEnabled: {\n initialValue: true\n },\n wrapBehavioursEnabled: {\n initialValue: true\n },\n autoScrollEditorIntoView: {\n set: function set(val) {\n this.setAutoScrollEditorIntoView(val);\n }\n },\n keyboardHandler: {\n set: function set(val) {\n this.setKeyboardHandler(val);\n },\n get: function get() {\n return this.$keybindingId;\n },\n handlesSet: true\n },\n value: {\n set: function set(val) {\n this.session.setValue(val);\n },\n get: function get() {\n return this.getValue();\n },\n handlesSet: true,\n hidden: true\n },\n session: {\n set: function set(val) {\n this.setSession(val);\n },\n get: function get() {\n return this.session;\n },\n handlesSet: true,\n hidden: true\n },\n showLineNumbers: {\n set: function set(show) {\n this.renderer.$gutterLayer.setShowLineNumbers(show);\n this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER);\n if (show && this.$relativeLineNumbers) relativeNumberRenderer.attach(this);else relativeNumberRenderer.detach(this);\n },\n initialValue: true\n },\n relativeLineNumbers: {\n set: function set(value) {\n if (this.$showLineNumbers && value) relativeNumberRenderer.attach(this);else relativeNumberRenderer.detach(this);\n }\n },\n placeholder: {\n set: function set(message) {\n if (!this.$updatePlaceholder) {\n this.$updatePlaceholder = function () {\n var value = this.renderer.$composition || this.getValue();\n\n if (value && this.renderer.placeholderNode) {\n this.renderer.off(\"afterRender\", this.$updatePlaceholder);\n dom.removeCssClass(this.container, \"ace_hasPlaceholder\");\n this.renderer.placeholderNode.remove();\n this.renderer.placeholderNode = null;\n } else if (!value && !this.renderer.placeholderNode) {\n this.renderer.on(\"afterRender\", this.$updatePlaceholder);\n dom.addCssClass(this.container, \"ace_hasPlaceholder\");\n var el = dom.createElement(\"div\");\n el.className = \"ace_placeholder\";\n el.textContent = this.$placeholder || \"\";\n this.renderer.placeholderNode = el;\n this.renderer.content.appendChild(this.renderer.placeholderNode);\n }\n }.bind(this);\n\n this.on(\"input\", this.$updatePlaceholder);\n }\n\n this.$updatePlaceholder();\n }\n },\n hScrollBarAlwaysVisible: \"renderer\",\n vScrollBarAlwaysVisible: \"renderer\",\n highlightGutterLine: \"renderer\",\n animatedScroll: \"renderer\",\n showInvisibles: \"renderer\",\n showPrintMargin: \"renderer\",\n printMarginColumn: \"renderer\",\n printMargin: \"renderer\",\n fadeFoldWidgets: \"renderer\",\n showFoldWidgets: \"renderer\",\n displayIndentGuides: \"renderer\",\n showGutter: \"renderer\",\n fontSize: \"renderer\",\n fontFamily: \"renderer\",\n maxLines: \"renderer\",\n minLines: \"renderer\",\n scrollPastEnd: \"renderer\",\n fixedWidthGutter: \"renderer\",\n theme: \"renderer\",\n hasCssTransforms: \"renderer\",\n maxPixelHeight: \"renderer\",\n useTextareaForIME: \"renderer\",\n scrollSpeed: \"$mouseHandler\",\n dragDelay: \"$mouseHandler\",\n dragEnabled: \"$mouseHandler\",\n focusTimeout: \"$mouseHandler\",\n tooltipFollowsMouse: \"$mouseHandler\",\n firstLineNumber: \"session\",\n overwrite: \"session\",\n newLineMode: \"session\",\n useWorker: \"session\",\n useSoftTabs: \"session\",\n navigateWithinSoftTabs: \"session\",\n tabSize: \"session\",\n wrap: \"session\",\n indentedSoftWrap: \"session\",\n foldStyle: \"session\",\n mode: \"session\"\n });\n var relativeNumberRenderer = {\n getText: function getText(session, row) {\n return (Math.abs(session.selection.lead.row - row) || row + 1 + (row < 9 ? \"\\xb7\" : \"\")) + \"\";\n },\n getWidth: function getWidth(session, lastLineNumber, config) {\n return Math.max(lastLineNumber.toString().length, (config.lastRow + 1).toString().length, 2) * config.characterWidth;\n },\n update: function update(e, editor) {\n editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER);\n },\n attach: function attach(editor) {\n editor.renderer.$gutterLayer.$renderer = this;\n editor.on(\"changeSelection\", this.update);\n this.update(null, editor);\n },\n detach: function detach(editor) {\n if (editor.renderer.$gutterLayer.$renderer == this) editor.renderer.$gutterLayer.$renderer = null;\n editor.off(\"changeSelection\", this.update);\n this.update(null, editor);\n }\n };\n exports.Editor = Editor;\n});\nace.define(\"ace/undomanager\", [\"require\", \"exports\", \"module\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var UndoManager = function UndoManager() {\n this.$maxRev = 0;\n this.$fromUndo = false;\n this.reset();\n };\n\n (function () {\n this.addSession = function (session) {\n this.$session = session;\n };\n\n this.add = function (delta, allowMerge, session) {\n if (this.$fromUndo) return;\n if (delta == this.$lastDelta) return;\n\n if (allowMerge === false || !this.lastDeltas) {\n this.lastDeltas = [];\n this.$undoStack.push(this.lastDeltas);\n delta.id = this.$rev = ++this.$maxRev;\n }\n\n if (delta.action == \"remove\" || delta.action == \"insert\") this.$lastDelta = delta;\n this.lastDeltas.push(delta);\n };\n\n this.addSelection = function (selection, rev) {\n this.selections.push({\n value: selection,\n rev: rev || this.$rev\n });\n };\n\n this.startNewGroup = function () {\n this.lastDeltas = null;\n return this.$rev;\n };\n\n this.markIgnored = function (from, to) {\n if (to == null) to = this.$rev + 1;\n var stack = this.$undoStack;\n\n for (var i = stack.length; i--;) {\n var delta = stack[i][0];\n if (delta.id <= from) break;\n if (delta.id < to) delta.ignore = true;\n }\n\n this.lastDeltas = null;\n };\n\n this.getSelection = function (rev, after) {\n var stack = this.selections;\n\n for (var i = stack.length; i--;) {\n var selection = stack[i];\n\n if (selection.rev < rev) {\n if (after) selection = stack[i + 1];\n return selection;\n }\n }\n };\n\n this.getRevision = function () {\n return this.$rev;\n };\n\n this.getDeltas = function (from, to) {\n if (to == null) to = this.$rev + 1;\n var stack = this.$undoStack;\n var end = null,\n start = 0;\n\n for (var i = stack.length; i--;) {\n var delta = stack[i][0];\n if (delta.id < to && !end) end = i + 1;\n\n if (delta.id <= from) {\n start = i + 1;\n break;\n }\n }\n\n return stack.slice(start, end);\n };\n\n this.getChangedRanges = function (from, to) {\n if (to == null) to = this.$rev + 1;\n };\n\n this.getChangedLines = function (from, to) {\n if (to == null) to = this.$rev + 1;\n };\n\n this.undo = function (session, dontSelect) {\n this.lastDeltas = null;\n var stack = this.$undoStack;\n if (!rearrangeUndoStack(stack, stack.length)) return;\n if (!session) session = this.$session;\n if (this.$redoStackBaseRev !== this.$rev && this.$redoStack.length) this.$redoStack = [];\n this.$fromUndo = true;\n var deltaSet = stack.pop();\n var undoSelectionRange = null;\n\n if (deltaSet && deltaSet.length) {\n undoSelectionRange = session.undoChanges(deltaSet, dontSelect);\n this.$redoStack.push(deltaSet);\n this.$syncRev();\n }\n\n this.$fromUndo = false;\n return undoSelectionRange;\n };\n\n this.redo = function (session, dontSelect) {\n this.lastDeltas = null;\n if (!session) session = this.$session;\n this.$fromUndo = true;\n\n if (this.$redoStackBaseRev != this.$rev) {\n var diff = this.getDeltas(this.$redoStackBaseRev, this.$rev + 1);\n rebaseRedoStack(this.$redoStack, diff);\n this.$redoStackBaseRev = this.$rev;\n this.$redoStack.forEach(function (x) {\n x[0].id = ++this.$maxRev;\n }, this);\n }\n\n var deltaSet = this.$redoStack.pop();\n var redoSelectionRange = null;\n\n if (deltaSet) {\n redoSelectionRange = session.redoChanges(deltaSet, dontSelect);\n this.$undoStack.push(deltaSet);\n this.$syncRev();\n }\n\n this.$fromUndo = false;\n return redoSelectionRange;\n };\n\n this.$syncRev = function () {\n var stack = this.$undoStack;\n var nextDelta = stack[stack.length - 1];\n var id = nextDelta && nextDelta[0].id || 0;\n this.$redoStackBaseRev = id;\n this.$rev = id;\n };\n\n this.reset = function () {\n this.lastDeltas = null;\n this.$lastDelta = null;\n this.$undoStack = [];\n this.$redoStack = [];\n this.$rev = 0;\n this.mark = 0;\n this.$redoStackBaseRev = this.$rev;\n this.selections = [];\n };\n\n this.canUndo = function () {\n return this.$undoStack.length > 0;\n };\n\n this.canRedo = function () {\n return this.$redoStack.length > 0;\n };\n\n this.bookmark = function (rev) {\n if (rev == undefined) rev = this.$rev;\n this.mark = rev;\n };\n\n this.isAtBookmark = function () {\n return this.$rev === this.mark;\n };\n\n this.toJSON = function () {};\n\n this.fromJSON = function () {};\n\n this.hasUndo = this.canUndo;\n this.hasRedo = this.canRedo;\n this.isClean = this.isAtBookmark;\n this.markClean = this.bookmark;\n\n this.$prettyPrint = function (delta) {\n if (delta) return stringifyDelta(delta);\n return stringifyDelta(this.$undoStack) + \"\\n---\\n\" + stringifyDelta(this.$redoStack);\n };\n }).call(UndoManager.prototype);\n\n function rearrangeUndoStack(stack, pos) {\n for (var i = pos; i--;) {\n var deltaSet = stack[i];\n\n if (deltaSet && !deltaSet[0].ignore) {\n while (i < pos - 1) {\n var swapped = swapGroups(stack[i], stack[i + 1]);\n stack[i] = swapped[0];\n stack[i + 1] = swapped[1];\n i++;\n }\n\n return true;\n }\n }\n }\n\n var Range = require(\"./range\").Range;\n\n var cmp = Range.comparePoints;\n var comparePoints = Range.comparePoints;\n\n function $updateMarkers(delta) {\n var isInsert = delta.action == \"insert\";\n var start = delta.start;\n var end = delta.end;\n var rowShift = (end.row - start.row) * (isInsert ? 1 : -1);\n var colShift = (end.column - start.column) * (isInsert ? 1 : -1);\n if (isInsert) end = start;\n\n for (var i in this.marks) {\n var point = this.marks[i];\n var cmp = comparePoints(point, start);\n\n if (cmp < 0) {\n continue; // delta starts after the range\n }\n\n if (cmp === 0) {\n if (isInsert) {\n if (point.bias == 1) {\n cmp = 1;\n } else {\n point.bias == -1;\n continue;\n }\n }\n }\n\n var cmp2 = isInsert ? cmp : comparePoints(point, end);\n\n if (cmp2 > 0) {\n point.row += rowShift;\n point.column += point.row == end.row ? colShift : 0;\n continue;\n }\n\n if (!isInsert && cmp2 <= 0) {\n point.row = start.row;\n point.column = start.column;\n if (cmp2 === 0) point.bias = 1;\n }\n }\n }\n\n function clonePos(pos) {\n return {\n row: pos.row,\n column: pos.column\n };\n }\n\n function cloneDelta(d) {\n return {\n start: clonePos(d.start),\n end: clonePos(d.end),\n action: d.action,\n lines: d.lines.slice()\n };\n }\n\n function stringifyDelta(d) {\n d = d || this;\n\n if (Array.isArray(d)) {\n return d.map(stringifyDelta).join(\"\\n\");\n }\n\n var type = \"\";\n\n if (d.action) {\n type = d.action == \"insert\" ? \"+\" : \"-\";\n type += \"[\" + d.lines + \"]\";\n } else if (d.value) {\n if (Array.isArray(d.value)) {\n type = d.value.map(stringifyRange).join(\"\\n\");\n } else {\n type = stringifyRange(d.value);\n }\n }\n\n if (d.start) {\n type += stringifyRange(d);\n }\n\n if (d.id || d.rev) {\n type += \"\\t(\" + (d.id || d.rev) + \")\";\n }\n\n return type;\n }\n\n function stringifyRange(r) {\n return r.start.row + \":\" + r.start.column + \"=>\" + r.end.row + \":\" + r.end.column;\n }\n\n function swap(d1, d2) {\n var i1 = d1.action == \"insert\";\n var i2 = d2.action == \"insert\";\n\n if (i1 && i2) {\n if (cmp(d2.start, d1.end) >= 0) {\n shift(d2, d1, -1);\n } else if (cmp(d2.start, d1.start) <= 0) {\n shift(d1, d2, +1);\n } else {\n return null;\n }\n } else if (i1 && !i2) {\n if (cmp(d2.start, d1.end) >= 0) {\n shift(d2, d1, -1);\n } else if (cmp(d2.end, d1.start) <= 0) {\n shift(d1, d2, -1);\n } else {\n return null;\n }\n } else if (!i1 && i2) {\n if (cmp(d2.start, d1.start) >= 0) {\n shift(d2, d1, +1);\n } else if (cmp(d2.start, d1.start) <= 0) {\n shift(d1, d2, +1);\n } else {\n return null;\n }\n } else if (!i1 && !i2) {\n if (cmp(d2.start, d1.start) >= 0) {\n shift(d2, d1, +1);\n } else if (cmp(d2.end, d1.start) <= 0) {\n shift(d1, d2, -1);\n } else {\n return null;\n }\n }\n\n return [d2, d1];\n }\n\n function swapGroups(ds1, ds2) {\n for (var i = ds1.length; i--;) {\n for (var j = 0; j < ds2.length; j++) {\n if (!swap(ds1[i], ds2[j])) {\n while (i < ds1.length) {\n while (j--) {\n swap(ds2[j], ds1[i]);\n }\n\n j = ds2.length;\n i++;\n }\n\n return [ds1, ds2];\n }\n }\n }\n\n ds1.selectionBefore = ds2.selectionBefore = ds1.selectionAfter = ds2.selectionAfter = null;\n return [ds2, ds1];\n }\n\n function xform(d1, c1) {\n var i1 = d1.action == \"insert\";\n var i2 = c1.action == \"insert\";\n\n if (i1 && i2) {\n if (cmp(d1.start, c1.start) < 0) {\n shift(c1, d1, 1);\n } else {\n shift(d1, c1, 1);\n }\n } else if (i1 && !i2) {\n if (cmp(d1.start, c1.end) >= 0) {\n shift(d1, c1, -1);\n } else if (cmp(d1.start, c1.start) <= 0) {\n shift(c1, d1, +1);\n } else {\n shift(d1, Range.fromPoints(c1.start, d1.start), -1);\n shift(c1, d1, +1);\n }\n } else if (!i1 && i2) {\n if (cmp(c1.start, d1.end) >= 0) {\n shift(c1, d1, -1);\n } else if (cmp(c1.start, d1.start) <= 0) {\n shift(d1, c1, +1);\n } else {\n shift(c1, Range.fromPoints(d1.start, c1.start), -1);\n shift(d1, c1, +1);\n }\n } else if (!i1 && !i2) {\n if (cmp(c1.start, d1.end) >= 0) {\n shift(c1, d1, -1);\n } else if (cmp(c1.end, d1.start) <= 0) {\n shift(d1, c1, -1);\n } else {\n var before, after;\n\n if (cmp(d1.start, c1.start) < 0) {\n before = d1;\n d1 = splitDelta(d1, c1.start);\n }\n\n if (cmp(d1.end, c1.end) > 0) {\n after = splitDelta(d1, c1.end);\n }\n\n shiftPos(c1.end, d1.start, d1.end, -1);\n\n if (after && !before) {\n d1.lines = after.lines;\n d1.start = after.start;\n d1.end = after.end;\n after = d1;\n }\n\n return [c1, before, after].filter(Boolean);\n }\n }\n\n return [c1, d1];\n }\n\n function shift(d1, d2, dir) {\n shiftPos(d1.start, d2.start, d2.end, dir);\n shiftPos(d1.end, d2.start, d2.end, dir);\n }\n\n function shiftPos(pos, start, end, dir) {\n if (pos.row == (dir == 1 ? start : end).row) {\n pos.column += dir * (end.column - start.column);\n }\n\n pos.row += dir * (end.row - start.row);\n }\n\n function splitDelta(c, pos) {\n var lines = c.lines;\n var end = c.end;\n c.end = clonePos(pos);\n var rowsBefore = c.end.row - c.start.row;\n var otherLines = lines.splice(rowsBefore, lines.length);\n var col = rowsBefore ? pos.column : pos.column - c.start.column;\n lines.push(otherLines[0].substring(0, col));\n otherLines[0] = otherLines[0].substr(col);\n var rest = {\n start: clonePos(pos),\n end: end,\n lines: otherLines,\n action: c.action\n };\n return rest;\n }\n\n function moveDeltasByOne(redoStack, d) {\n d = cloneDelta(d);\n\n for (var j = redoStack.length; j--;) {\n var deltaSet = redoStack[j];\n\n for (var i = 0; i < deltaSet.length; i++) {\n var x = deltaSet[i];\n var xformed = xform(x, d);\n d = xformed[0];\n\n if (xformed.length != 2) {\n if (xformed[2]) {\n deltaSet.splice(i + 1, 1, xformed[1], xformed[2]);\n i++;\n } else if (!xformed[1]) {\n deltaSet.splice(i, 1);\n i--;\n }\n }\n }\n\n if (!deltaSet.length) {\n redoStack.splice(j, 1);\n }\n }\n\n return redoStack;\n }\n\n function rebaseRedoStack(redoStack, deltaSets) {\n for (var i = 0; i < deltaSets.length; i++) {\n var deltas = deltaSets[i];\n\n for (var j = 0; j < deltas.length; j++) {\n moveDeltasByOne(redoStack, deltas[j]);\n }\n }\n }\n\n exports.UndoManager = UndoManager;\n});\nace.define(\"ace/layer/lines\", [\"require\", \"exports\", \"module\", \"ace/lib/dom\"], function (require, exports, module) {\n \"use strict\";\n\n var dom = require(\"../lib/dom\");\n\n var Lines = function Lines(element, canvasHeight) {\n this.element = element;\n this.canvasHeight = canvasHeight || 500000;\n this.element.style.height = this.canvasHeight * 2 + \"px\";\n this.cells = [];\n this.cellCache = [];\n this.$offsetCoefficient = 0;\n };\n\n (function () {\n this.moveContainer = function (config) {\n dom.translate(this.element, 0, -(config.firstRowScreen * config.lineHeight % this.canvasHeight) - config.offset * this.$offsetCoefficient);\n };\n\n this.pageChanged = function (oldConfig, newConfig) {\n return Math.floor(oldConfig.firstRowScreen * oldConfig.lineHeight / this.canvasHeight) !== Math.floor(newConfig.firstRowScreen * newConfig.lineHeight / this.canvasHeight);\n };\n\n this.computeLineTop = function (row, config, session) {\n var screenTop = config.firstRowScreen * config.lineHeight;\n var screenPage = Math.floor(screenTop / this.canvasHeight);\n var lineTop = session.documentToScreenRow(row, 0) * config.lineHeight;\n return lineTop - screenPage * this.canvasHeight;\n };\n\n this.computeLineHeight = function (row, config, session) {\n return config.lineHeight * session.getRowLength(row);\n };\n\n this.getLength = function () {\n return this.cells.length;\n };\n\n this.get = function (index) {\n return this.cells[index];\n };\n\n this.shift = function () {\n this.$cacheCell(this.cells.shift());\n };\n\n this.pop = function () {\n this.$cacheCell(this.cells.pop());\n };\n\n this.push = function (cell) {\n if (Array.isArray(cell)) {\n this.cells.push.apply(this.cells, cell);\n var fragment = dom.createFragment(this.element);\n\n for (var i = 0; i < cell.length; i++) {\n fragment.appendChild(cell[i].element);\n }\n\n this.element.appendChild(fragment);\n } else {\n this.cells.push(cell);\n this.element.appendChild(cell.element);\n }\n };\n\n this.unshift = function (cell) {\n if (Array.isArray(cell)) {\n this.cells.unshift.apply(this.cells, cell);\n var fragment = dom.createFragment(this.element);\n\n for (var i = 0; i < cell.length; i++) {\n fragment.appendChild(cell[i].element);\n }\n\n if (this.element.firstChild) this.element.insertBefore(fragment, this.element.firstChild);else this.element.appendChild(fragment);\n } else {\n this.cells.unshift(cell);\n this.element.insertAdjacentElement(\"afterbegin\", cell.element);\n }\n };\n\n this.last = function () {\n if (this.cells.length) return this.cells[this.cells.length - 1];else return null;\n };\n\n this.$cacheCell = function (cell) {\n if (!cell) return;\n cell.element.remove();\n this.cellCache.push(cell);\n };\n\n this.createCell = function (row, config, session, initElement) {\n var cell = this.cellCache.pop();\n\n if (!cell) {\n var element = dom.createElement(\"div\");\n if (initElement) initElement(element);\n this.element.appendChild(element);\n cell = {\n element: element,\n text: \"\",\n row: row\n };\n }\n\n cell.row = row;\n return cell;\n };\n }).call(Lines.prototype);\n exports.Lines = Lines;\n});\nace.define(\"ace/layer/gutter\", [\"require\", \"exports\", \"module\", \"ace/lib/dom\", \"ace/lib/oop\", \"ace/lib/lang\", \"ace/lib/event_emitter\", \"ace/layer/lines\"], function (require, exports, module) {\n \"use strict\";\n\n var dom = require(\"../lib/dom\");\n\n var oop = require(\"../lib/oop\");\n\n var lang = require(\"../lib/lang\");\n\n var EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\n\n var Lines = require(\"./lines\").Lines;\n\n var Gutter = function Gutter(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_gutter-layer\";\n parentEl.appendChild(this.element);\n this.setShowFoldWidgets(this.$showFoldWidgets);\n this.gutterWidth = 0;\n this.$annotations = [];\n this.$updateAnnotations = this.$updateAnnotations.bind(this);\n this.$lines = new Lines(this.element);\n this.$lines.$offsetCoefficient = 1;\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.setSession = function (session) {\n if (this.session) this.session.removeEventListener(\"change\", this.$updateAnnotations);\n this.session = session;\n if (session) session.on(\"change\", this.$updateAnnotations);\n };\n\n this.addGutterDecoration = function (row, className) {\n if (window.console) console.warn && console.warn(\"deprecated use session.addGutterDecoration\");\n this.session.addGutterDecoration(row, className);\n };\n\n this.removeGutterDecoration = function (row, className) {\n if (window.console) console.warn && console.warn(\"deprecated use session.removeGutterDecoration\");\n this.session.removeGutterDecoration(row, className);\n };\n\n this.setAnnotations = function (annotations) {\n this.$annotations = [];\n\n for (var i = 0; i < annotations.length; i++) {\n var annotation = annotations[i];\n var row = annotation.row;\n var rowInfo = this.$annotations[row];\n if (!rowInfo) rowInfo = this.$annotations[row] = {\n text: []\n };\n var annoText = annotation.text;\n annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || \"\";\n if (rowInfo.text.indexOf(annoText) === -1) rowInfo.text.push(annoText);\n var type = annotation.type;\n if (type == \"error\") rowInfo.className = \" ace_error\";else if (type == \"warning\" && rowInfo.className != \" ace_error\") rowInfo.className = \" ace_warning\";else if (type == \"info\" && !rowInfo.className) rowInfo.className = \" ace_info\";\n }\n };\n\n this.$updateAnnotations = function (delta) {\n if (!this.$annotations.length) return;\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n\n if (len === 0) {} else if (delta.action == 'remove') {\n this.$annotations.splice(firstRow, len + 1, null);\n } else {\n var args = new Array(len + 1);\n args.unshift(firstRow, 1);\n this.$annotations.splice.apply(this.$annotations, args);\n }\n };\n\n this.update = function (config) {\n this.config = config;\n var session = this.session;\n var firstRow = config.firstRow;\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n session.getLength() - 1);\n this.oldLastRow = lastRow;\n this.config = config;\n this.$lines.moveContainer(config);\n this.$updateCursorRow();\n var fold = session.getNextFoldLine(firstRow);\n var foldStart = fold ? fold.start.row : Infinity;\n var cell = null;\n var index = -1;\n var row = firstRow;\n\n while (true) {\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = session.getNextFoldLine(row, fold);\n foldStart = fold ? fold.start.row : Infinity;\n }\n\n if (row > lastRow) {\n while (this.$lines.getLength() > index + 1) {\n this.$lines.pop();\n }\n\n break;\n }\n\n cell = this.$lines.get(++index);\n\n if (cell) {\n cell.row = row;\n } else {\n cell = this.$lines.createCell(row, config, this.session, onCreateCell);\n this.$lines.push(cell);\n }\n\n this.$renderCell(cell, config, fold, row);\n row++;\n }\n\n this._signal(\"afterRender\");\n\n this.$updateGutterWidth(config);\n };\n\n this.$updateGutterWidth = function (config) {\n var session = this.session;\n var gutterRenderer = session.gutterRenderer || this.$renderer;\n var firstLineNumber = session.$firstLineNumber;\n var lastLineText = this.$lines.last() ? this.$lines.last().text : \"\";\n if (this.$fixedWidth || session.$useWrapMode) lastLineText = session.getLength() + firstLineNumber - 1;\n var gutterWidth = gutterRenderer ? gutterRenderer.getWidth(session, lastLineText, config) : lastLineText.toString().length * config.characterWidth;\n var padding = this.$padding || this.$computePadding();\n gutterWidth += padding.left + padding.right;\n\n if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {\n this.gutterWidth = gutterWidth;\n this.element.parentNode.style.width = this.element.style.width = Math.ceil(this.gutterWidth) + \"px\";\n\n this._signal(\"changeGutterWidth\", gutterWidth);\n }\n };\n\n this.$updateCursorRow = function () {\n if (!this.$highlightGutterLine) return;\n var position = this.session.selection.getCursor();\n if (this.$cursorRow === position.row) return;\n this.$cursorRow = position.row;\n };\n\n this.updateLineHighlight = function () {\n if (!this.$highlightGutterLine) return;\n var row = this.session.selection.cursor.row;\n this.$cursorRow = row;\n if (this.$cursorCell && this.$cursorCell.row == row) return;\n if (this.$cursorCell) this.$cursorCell.element.className = this.$cursorCell.element.className.replace(\"ace_gutter-active-line \", \"\");\n var cells = this.$lines.cells;\n this.$cursorCell = null;\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n\n if (cell.row >= this.$cursorRow) {\n if (cell.row > this.$cursorRow) {\n var fold = this.session.getFoldLine(this.$cursorRow);\n if (i > 0 && fold && fold.start.row == cells[i - 1].row) cell = cells[i - 1];else break;\n }\n\n cell.element.className = \"ace_gutter-active-line \" + cell.element.className;\n this.$cursorCell = cell;\n break;\n }\n }\n };\n\n this.scrollLines = function (config) {\n var oldConfig = this.config;\n this.config = config;\n this.$updateCursorRow();\n if (this.$lines.pageChanged(oldConfig, config)) return this.update(config);\n this.$lines.moveContainer(config);\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n this.session.getLength() - 1);\n var oldLastRow = this.oldLastRow;\n this.oldLastRow = lastRow;\n if (!oldConfig || oldLastRow < config.firstRow) return this.update(config);\n if (lastRow < oldConfig.firstRow) return this.update(config);\n if (oldConfig.firstRow < config.firstRow) for (var row = this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row > 0; row--) {\n this.$lines.shift();\n }\n if (oldLastRow > lastRow) for (var row = this.session.getFoldedRowCount(lastRow + 1, oldLastRow); row > 0; row--) {\n this.$lines.pop();\n }\n\n if (config.firstRow < oldConfig.firstRow) {\n this.$lines.unshift(this.$renderLines(config, config.firstRow, oldConfig.firstRow - 1));\n }\n\n if (lastRow > oldLastRow) {\n this.$lines.push(this.$renderLines(config, oldLastRow + 1, lastRow));\n }\n\n this.updateLineHighlight();\n\n this._signal(\"afterRender\");\n\n this.$updateGutterWidth(config);\n };\n\n this.$renderLines = function (config, firstRow, lastRow) {\n var fragment = [];\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n\n if (row > lastRow) break;\n var cell = this.$lines.createCell(row, config, this.session, onCreateCell);\n this.$renderCell(cell, config, foldLine, row);\n fragment.push(cell);\n row++;\n }\n\n return fragment;\n };\n\n this.$renderCell = function (cell, config, fold, row) {\n var element = cell.element;\n var session = this.session;\n var textNode = element.childNodes[0];\n var foldWidget = element.childNodes[1];\n var firstLineNumber = session.$firstLineNumber;\n var breakpoints = session.$breakpoints;\n var decorations = session.$decorations;\n var gutterRenderer = session.gutterRenderer || this.$renderer;\n var foldWidgets = this.$showFoldWidgets && session.foldWidgets;\n var foldStart = fold ? fold.start.row : Number.MAX_VALUE;\n var className = \"ace_gutter-cell \";\n\n if (this.$highlightGutterLine) {\n if (row == this.$cursorRow || fold && row < this.$cursorRow && row >= foldStart && this.$cursorRow <= fold.end.row) {\n className += \"ace_gutter-active-line \";\n\n if (this.$cursorCell != cell) {\n if (this.$cursorCell) this.$cursorCell.element.className = this.$cursorCell.element.className.replace(\"ace_gutter-active-line \", \"\");\n this.$cursorCell = cell;\n }\n }\n }\n\n if (breakpoints[row]) className += breakpoints[row];\n if (decorations[row]) className += decorations[row];\n if (this.$annotations[row]) className += this.$annotations[row].className;\n if (element.className != className) element.className = className;\n\n if (foldWidgets) {\n var c = foldWidgets[row];\n if (c == null) c = foldWidgets[row] = session.getFoldWidget(row);\n }\n\n if (c) {\n var className = \"ace_fold-widget ace_\" + c;\n if (c == \"start\" && row == foldStart && row < fold.end.row) className += \" ace_closed\";else className += \" ace_open\";\n if (foldWidget.className != className) foldWidget.className = className;\n var foldHeight = config.lineHeight + \"px\";\n dom.setStyle(foldWidget.style, \"height\", foldHeight);\n dom.setStyle(foldWidget.style, \"display\", \"inline-block\");\n } else {\n if (foldWidget) {\n dom.setStyle(foldWidget.style, \"display\", \"none\");\n }\n }\n\n var text = (gutterRenderer ? gutterRenderer.getText(session, row) : row + firstLineNumber).toString();\n\n if (text !== textNode.data) {\n textNode.data = text;\n }\n\n dom.setStyle(cell.element.style, \"height\", this.$lines.computeLineHeight(row, config, session) + \"px\");\n dom.setStyle(cell.element.style, \"top\", this.$lines.computeLineTop(row, config, session) + \"px\");\n cell.text = text;\n return cell;\n };\n\n this.$fixedWidth = false;\n this.$highlightGutterLine = true;\n this.$renderer = \"\";\n\n this.setHighlightGutterLine = function (highlightGutterLine) {\n this.$highlightGutterLine = highlightGutterLine;\n };\n\n this.$showLineNumbers = true;\n this.$renderer = \"\";\n\n this.setShowLineNumbers = function (show) {\n this.$renderer = !show && {\n getWidth: function getWidth() {\n return 0;\n },\n getText: function getText() {\n return \"\";\n }\n };\n };\n\n this.getShowLineNumbers = function () {\n return this.$showLineNumbers;\n };\n\n this.$showFoldWidgets = true;\n\n this.setShowFoldWidgets = function (show) {\n if (show) dom.addCssClass(this.element, \"ace_folding-enabled\");else dom.removeCssClass(this.element, \"ace_folding-enabled\");\n this.$showFoldWidgets = show;\n this.$padding = null;\n };\n\n this.getShowFoldWidgets = function () {\n return this.$showFoldWidgets;\n };\n\n this.$computePadding = function () {\n if (!this.element.firstChild) return {\n left: 0,\n right: 0\n };\n var style = dom.computedStyle(this.element.firstChild);\n this.$padding = {};\n this.$padding.left = (parseInt(style.borderLeftWidth) || 0) + (parseInt(style.paddingLeft) || 0) + 1;\n this.$padding.right = (parseInt(style.borderRightWidth) || 0) + (parseInt(style.paddingRight) || 0);\n return this.$padding;\n };\n\n this.getRegion = function (point) {\n var padding = this.$padding || this.$computePadding();\n var rect = this.element.getBoundingClientRect();\n if (point.x < padding.left + rect.left) return \"markers\";\n if (this.$showFoldWidgets && point.x > rect.right - padding.right) return \"foldWidgets\";\n };\n }).call(Gutter.prototype);\n\n function onCreateCell(element) {\n var textNode = document.createTextNode('');\n element.appendChild(textNode);\n var foldWidget = dom.createElement(\"span\");\n element.appendChild(foldWidget);\n return element;\n }\n\n exports.Gutter = Gutter;\n});\nace.define(\"ace/layer/marker\", [\"require\", \"exports\", \"module\", \"ace/range\", \"ace/lib/dom\"], function (require, exports, module) {\n \"use strict\";\n\n var Range = require(\"../range\").Range;\n\n var dom = require(\"../lib/dom\");\n\n var Marker = function Marker(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_marker-layer\";\n parentEl.appendChild(this.element);\n };\n\n (function () {\n this.$padding = 0;\n\n this.setPadding = function (padding) {\n this.$padding = padding;\n };\n\n this.setSession = function (session) {\n this.session = session;\n };\n\n this.setMarkers = function (markers) {\n this.markers = markers;\n };\n\n this.elt = function (className, css) {\n var x = this.i != -1 && this.element.childNodes[this.i];\n\n if (!x) {\n x = document.createElement(\"div\");\n this.element.appendChild(x);\n this.i = -1;\n } else {\n this.i++;\n }\n\n x.style.cssText = css;\n x.className = className;\n };\n\n this.update = function (config) {\n if (!config) return;\n this.config = config;\n this.i = 0;\n var html;\n\n for (var key in this.markers) {\n var marker = this.markers[key];\n\n if (!marker.range) {\n marker.update(html, this, this.session, config);\n continue;\n }\n\n var range = marker.range.clipRows(config.firstRow, config.lastRow);\n if (range.isEmpty()) continue;\n range = range.toScreenRange(this.session);\n\n if (marker.renderer) {\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n marker.renderer(html, range, left, top, config);\n } else if (marker.type == \"fullLine\") {\n this.drawFullLineMarker(html, range, marker.clazz, config);\n } else if (marker.type == \"screenLine\") {\n this.drawScreenLineMarker(html, range, marker.clazz, config);\n } else if (range.isMultiLine()) {\n if (marker.type == \"text\") this.drawTextMarker(html, range, marker.clazz, config);else this.drawMultiLineMarker(html, range, marker.clazz, config);\n } else {\n this.drawSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n }\n }\n\n if (this.i != -1) {\n while (this.i < this.element.childElementCount) {\n this.element.removeChild(this.element.lastChild);\n }\n }\n };\n\n this.$getTop = function (row, layerConfig) {\n return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;\n };\n\n function getBorderClass(tl, tr, br, bl) {\n return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);\n }\n\n this.drawTextMarker = function (stringBuilder, range, clazz, layerConfig, extraStyle) {\n var session = this.session;\n var start = range.start.row;\n var end = range.end.row;\n var row = start;\n var prev = 0;\n var curr = 0;\n var next = session.getScreenLastRowColumn(row);\n var lineRange = new Range(row, range.start.column, row, curr);\n\n for (; row <= end; row++) {\n lineRange.start.row = lineRange.end.row = row;\n lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);\n lineRange.end.column = next;\n prev = curr;\n curr = next;\n next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;\n this.drawSingleLineMarker(stringBuilder, lineRange, clazz + (row == start ? \" ace_start\" : \"\") + \" ace_br\" + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end), layerConfig, row == end ? 0 : 1, extraStyle);\n }\n };\n\n this.drawMultiLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var padding = this.$padding;\n var height = config.lineHeight;\n var top = this.$getTop(range.start.row, config);\n var left = padding + range.start.column * config.characterWidth;\n extraStyle = extraStyle || \"\";\n\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n var range1 = range.clone();\n range1.end.row = range1.start.row;\n range1.end.column = this.session.getLine(range1.start.row).length;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br1 ace_start\", config, null, extraStyle);\n } else {\n this.elt(clazz + \" ace_br1 ace_start\", \"height:\" + height + \"px;\" + \"right:0;\" + \"top:\" + top + \"px;left:\" + left + \"px;\" + (extraStyle || \"\"));\n }\n\n if (this.session.$bidiHandler.isBidiRow(range.end.row)) {\n var range1 = range.clone();\n range1.start.row = range1.end.row;\n range1.start.column = 0;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br12\", config, null, extraStyle);\n } else {\n top = this.$getTop(range.end.row, config);\n var width = range.end.column * config.characterWidth;\n this.elt(clazz + \" ace_br12\", \"height:\" + height + \"px;\" + \"width:\" + width + \"px;\" + \"top:\" + top + \"px;\" + \"left:\" + padding + \"px;\" + (extraStyle || \"\"));\n }\n\n height = (range.end.row - range.start.row - 1) * config.lineHeight;\n if (height <= 0) return;\n top = this.$getTop(range.start.row + 1, config);\n var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);\n this.elt(clazz + (radiusClass ? \" ace_br\" + radiusClass : \"\"), \"height:\" + height + \"px;\" + \"right:0;\" + \"top:\" + top + \"px;\" + \"left:\" + padding + \"px;\" + (extraStyle || \"\"));\n };\n\n this.drawSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) {\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) return this.drawBidiSingleLineMarker(stringBuilder, range, clazz, config, extraLength, extraStyle);\n var height = config.lineHeight;\n var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n this.elt(clazz, \"height:\" + height + \"px;\" + \"width:\" + width + \"px;\" + \"top:\" + top + \"px;\" + \"left:\" + left + \"px;\" + (extraStyle || \"\"));\n };\n\n this.drawBidiSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight,\n top = this.$getTop(range.start.row, config),\n padding = this.$padding;\n var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column);\n selections.forEach(function (selection) {\n this.elt(clazz, \"height:\" + height + \"px;\" + \"width:\" + selection.width + (extraLength || 0) + \"px;\" + \"top:\" + top + \"px;\" + \"left:\" + (padding + selection.left) + \"px;\" + (extraStyle || \"\"));\n }, this);\n };\n\n this.drawFullLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n if (range.start.row != range.end.row) height += this.$getTop(range.end.row, config) - top;\n this.elt(clazz, \"height:\" + height + \"px;\" + \"top:\" + top + \"px;\" + \"left:0;right:0;\" + (extraStyle || \"\"));\n };\n\n this.drawScreenLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n this.elt(clazz, \"height:\" + height + \"px;\" + \"top:\" + top + \"px;\" + \"left:0;right:0;\" + (extraStyle || \"\"));\n };\n }).call(Marker.prototype);\n exports.Marker = Marker;\n});\nace.define(\"ace/layer/text\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/dom\", \"ace/lib/lang\", \"ace/layer/lines\", \"ace/lib/event_emitter\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"../lib/oop\");\n\n var dom = require(\"../lib/dom\");\n\n var lang = require(\"../lib/lang\");\n\n var Lines = require(\"./lines\").Lines;\n\n var EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\n\n var Text = function Text(parentEl) {\n this.dom = dom;\n this.element = this.dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_text-layer\";\n parentEl.appendChild(this.element);\n this.$updateEolChar = this.$updateEolChar.bind(this);\n this.$lines = new Lines(this.element);\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n this.EOF_CHAR = \"\\xB6\";\n this.EOL_CHAR_LF = \"\\xAC\";\n this.EOL_CHAR_CRLF = \"\\xa4\";\n this.EOL_CHAR = this.EOL_CHAR_LF;\n this.TAB_CHAR = \"\\u2014\"; //\"\\u21E5\";\n\n this.SPACE_CHAR = \"\\xB7\";\n this.$padding = 0;\n this.MAX_LINE_LENGTH = 10000;\n\n this.$updateEolChar = function () {\n var doc = this.session.doc;\n var unixMode = doc.getNewLineCharacter() == \"\\n\" && doc.getNewLineMode() != \"windows\";\n var EOL_CHAR = unixMode ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF;\n\n if (this.EOL_CHAR != EOL_CHAR) {\n this.EOL_CHAR = EOL_CHAR;\n return true;\n }\n };\n\n this.setPadding = function (padding) {\n this.$padding = padding;\n this.element.style.margin = \"0 \" + padding + \"px\";\n };\n\n this.getLineHeight = function () {\n return this.$fontMetrics.$characterSize.height || 0;\n };\n\n this.getCharacterWidth = function () {\n return this.$fontMetrics.$characterSize.width || 0;\n };\n\n this.$setFontMetrics = function (measure) {\n this.$fontMetrics = measure;\n this.$fontMetrics.on(\"changeCharacterSize\", function (e) {\n this._signal(\"changeCharacterSize\", e);\n }.bind(this));\n this.$pollSizeChanges();\n };\n\n this.checkForSizeChanges = function () {\n this.$fontMetrics.checkForSizeChanges();\n };\n\n this.$pollSizeChanges = function () {\n return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();\n };\n\n this.setSession = function (session) {\n this.session = session;\n if (session) this.$computeTabString();\n };\n\n this.showInvisibles = false;\n\n this.setShowInvisibles = function (showInvisibles) {\n if (this.showInvisibles == showInvisibles) return false;\n this.showInvisibles = showInvisibles;\n this.$computeTabString();\n return true;\n };\n\n this.displayIndentGuides = true;\n\n this.setDisplayIndentGuides = function (display) {\n if (this.displayIndentGuides == display) return false;\n this.displayIndentGuides = display;\n this.$computeTabString();\n return true;\n };\n\n this.$tabStrings = [];\n\n this.onChangeTabSize = this.$computeTabString = function () {\n var tabSize = this.session.getTabSize();\n this.tabSize = tabSize;\n var tabStr = this.$tabStrings = [0];\n\n for (var i = 1; i < tabSize + 1; i++) {\n if (this.showInvisibles) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_tab\";\n span.textContent = lang.stringRepeat(this.TAB_CHAR, i);\n tabStr.push(span);\n } else {\n tabStr.push(this.dom.createTextNode(lang.stringRepeat(\" \", i), this.element));\n }\n }\n\n if (this.displayIndentGuides) {\n this.$indentGuideRe = /\\s\\S| \\t|\\t |\\s$/;\n var className = \"ace_indent-guide\";\n var spaceClass = \"\";\n var tabClass = \"\";\n\n if (this.showInvisibles) {\n className += \" ace_invisible\";\n spaceClass = \" ace_invisible_space\";\n tabClass = \" ace_invisible_tab\";\n var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);\n var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize);\n } else {\n var spaceContent = lang.stringRepeat(\" \", this.tabSize);\n var tabContent = spaceContent;\n }\n\n var span = this.dom.createElement(\"span\");\n span.className = className + spaceClass;\n span.textContent = spaceContent;\n this.$tabStrings[\" \"] = span;\n var span = this.dom.createElement(\"span\");\n span.className = className + tabClass;\n span.textContent = tabContent;\n this.$tabStrings[\"\\t\"] = span;\n }\n };\n\n this.updateLines = function (config, firstRow, lastRow) {\n if (this.config.lastRow != config.lastRow || this.config.firstRow != config.firstRow) {\n return this.update(config);\n }\n\n this.config = config;\n var first = Math.max(firstRow, config.firstRow);\n var last = Math.min(lastRow, config.lastRow);\n var lineElements = this.element.childNodes;\n var lineElementsIdx = 0;\n\n for (var row = config.firstRow; row < first; row++) {\n var foldLine = this.session.getFoldLine(row);\n\n if (foldLine) {\n if (foldLine.containsRow(first)) {\n first = foldLine.start.row;\n break;\n } else {\n row = foldLine.end.row;\n }\n }\n\n lineElementsIdx++;\n }\n\n var heightChanged = false;\n var row = first;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n\n if (row > last) break;\n var lineElement = lineElements[lineElementsIdx++];\n\n if (lineElement) {\n this.dom.removeChildren(lineElement);\n this.$renderLine(lineElement, row, row == foldStart ? foldLine : false);\n if (heightChanged) lineElement.style.top = this.$lines.computeLineTop(row, config, this.session) + \"px\";\n var height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n\n if (lineElement.style.height != height) {\n heightChanged = true;\n lineElement.style.height = height;\n }\n }\n\n row++;\n }\n\n if (heightChanged) {\n while (lineElementsIdx < this.$lines.cells.length) {\n var cell = this.$lines.cells[lineElementsIdx++];\n cell.element.style.top = this.$lines.computeLineTop(cell.row, config, this.session) + \"px\";\n }\n }\n };\n\n this.scrollLines = function (config) {\n var oldConfig = this.config;\n this.config = config;\n if (this.$lines.pageChanged(oldConfig, config)) return this.update(config);\n this.$lines.moveContainer(config);\n var lastRow = config.lastRow;\n var oldLastRow = oldConfig ? oldConfig.lastRow : -1;\n if (!oldConfig || oldLastRow < config.firstRow) return this.update(config);\n if (lastRow < oldConfig.firstRow) return this.update(config);\n if (!oldConfig || oldConfig.lastRow < config.firstRow) return this.update(config);\n if (config.lastRow < oldConfig.firstRow) return this.update(config);\n if (oldConfig.firstRow < config.firstRow) for (var row = this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row > 0; row--) {\n this.$lines.shift();\n }\n if (oldConfig.lastRow > config.lastRow) for (var row = this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row > 0; row--) {\n this.$lines.pop();\n }\n\n if (config.firstRow < oldConfig.firstRow) {\n this.$lines.unshift(this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1));\n }\n\n if (config.lastRow > oldConfig.lastRow) {\n this.$lines.push(this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow));\n }\n };\n\n this.$renderLinesFragment = function (config, firstRow, lastRow) {\n var fragment = [];\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n\n if (row > lastRow) break;\n var line = this.$lines.createCell(row, config, this.session);\n var lineEl = line.element;\n this.dom.removeChildren(lineEl);\n dom.setStyle(lineEl.style, \"height\", this.$lines.computeLineHeight(row, config, this.session) + \"px\");\n dom.setStyle(lineEl.style, \"top\", this.$lines.computeLineTop(row, config, this.session) + \"px\");\n this.$renderLine(lineEl, row, row == foldStart ? foldLine : false);\n\n if (this.$useLineGroups()) {\n lineEl.className = \"ace_line_group\";\n } else {\n lineEl.className = \"ace_line\";\n }\n\n fragment.push(line);\n row++;\n }\n\n return fragment;\n };\n\n this.update = function (config) {\n this.$lines.moveContainer(config);\n this.config = config;\n var firstRow = config.firstRow;\n var lastRow = config.lastRow;\n var lines = this.$lines;\n\n while (lines.getLength()) {\n lines.pop();\n }\n\n lines.push(this.$renderLinesFragment(config, firstRow, lastRow));\n };\n\n this.$textToken = {\n \"text\": true,\n \"rparen\": true,\n \"lparen\": true\n };\n\n this.$renderToken = function (parent, screenColumn, token, value) {\n var self = this;\n var re = /(\\t)|( +)|([\\x00-\\x1f\\x80-\\xa0\\xad\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\uFEFF\\uFFF9-\\uFFFC]+)|(\\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;\n var valueFragment = this.dom.createFragment(this.element);\n var m;\n var i = 0;\n\n while (m = re.exec(value)) {\n var tab = m[1];\n var simpleSpace = m[2];\n var controlCharacter = m[3];\n var cjkSpace = m[4];\n var cjk = m[5];\n if (!self.showInvisibles && simpleSpace) continue;\n var before = i != m.index ? value.slice(i, m.index) : \"\";\n i = m.index + m[0].length;\n\n if (before) {\n valueFragment.appendChild(this.dom.createTextNode(before, this.element));\n }\n\n if (tab) {\n var tabSize = self.session.getScreenTabSize(screenColumn + m.index);\n valueFragment.appendChild(self.$tabStrings[tabSize].cloneNode(true));\n screenColumn += tabSize - 1;\n } else if (simpleSpace) {\n if (self.showInvisibles) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_space\";\n span.textContent = lang.stringRepeat(self.SPACE_CHAR, simpleSpace.length);\n valueFragment.appendChild(span);\n } else {\n valueFragment.appendChild(this.com.createTextNode(simpleSpace, this.element));\n }\n } else if (controlCharacter) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_space ace_invalid\";\n span.textContent = lang.stringRepeat(self.SPACE_CHAR, controlCharacter.length);\n valueFragment.appendChild(span);\n } else if (cjkSpace) {\n screenColumn += 1;\n var span = this.dom.createElement(\"span\");\n span.style.width = self.config.characterWidth * 2 + \"px\";\n span.className = self.showInvisibles ? \"ace_cjk ace_invisible ace_invisible_space\" : \"ace_cjk\";\n span.textContent = self.showInvisibles ? self.SPACE_CHAR : cjkSpace;\n valueFragment.appendChild(span);\n } else if (cjk) {\n screenColumn += 1;\n var span = this.dom.createElement(\"span\");\n span.style.width = self.config.characterWidth * 2 + \"px\";\n span.className = \"ace_cjk\";\n span.textContent = cjk;\n valueFragment.appendChild(span);\n }\n }\n\n valueFragment.appendChild(this.dom.createTextNode(i ? value.slice(i) : value, this.element));\n\n if (!this.$textToken[token.type]) {\n var classes = \"ace_\" + token.type.replace(/\\./g, \" ace_\");\n var span = this.dom.createElement(\"span\");\n if (token.type == \"fold\") span.style.width = token.value.length * this.config.characterWidth + \"px\";\n span.className = classes;\n span.appendChild(valueFragment);\n parent.appendChild(span);\n } else {\n parent.appendChild(valueFragment);\n }\n\n return screenColumn + value.length;\n };\n\n this.renderIndentGuide = function (parent, value, max) {\n var cols = value.search(this.$indentGuideRe);\n if (cols <= 0 || cols >= max) return value;\n\n if (value[0] == \" \") {\n cols -= cols % this.tabSize;\n var count = cols / this.tabSize;\n\n for (var i = 0; i < count; i++) {\n parent.appendChild(this.$tabStrings[\" \"].cloneNode(true));\n }\n\n return value.substr(cols);\n } else if (value[0] == \"\\t\") {\n for (var i = 0; i < cols; i++) {\n parent.appendChild(this.$tabStrings[\"\\t\"].cloneNode(true));\n }\n\n return value.substr(cols);\n }\n\n return value;\n };\n\n this.$createLineElement = function (parent) {\n var lineEl = this.dom.createElement(\"div\");\n lineEl.className = \"ace_line\";\n lineEl.style.height = this.config.lineHeight + \"px\";\n return lineEl;\n };\n\n this.$renderWrappedLine = function (parent, tokens, splits) {\n var chars = 0;\n var split = 0;\n var splitChars = splits[0];\n var screenColumn = 0;\n var lineEl = this.$createLineElement();\n parent.appendChild(lineEl);\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n\n if (i == 0 && this.displayIndentGuides) {\n chars = value.length;\n value = this.renderIndentGuide(lineEl, value, splitChars);\n if (!value) continue;\n chars -= value.length;\n }\n\n if (chars + value.length < splitChars) {\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value);\n chars += value.length;\n } else {\n while (chars + value.length >= splitChars) {\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value.substring(0, splitChars - chars));\n value = value.substring(splitChars - chars);\n chars = splitChars;\n lineEl = this.$createLineElement();\n parent.appendChild(lineEl);\n lineEl.appendChild(this.dom.createTextNode(lang.stringRepeat(\"\\xa0\", splits.indent), this.element));\n split++;\n screenColumn = 0;\n splitChars = splits[split] || Number.MAX_VALUE;\n }\n\n if (value.length != 0) {\n chars += value.length;\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value);\n }\n }\n }\n\n if (splits[splits.length - 1] > this.MAX_LINE_LENGTH) this.$renderOverflowMessage(lineEl, screenColumn, null, \"\", true);\n };\n\n this.$renderSimpleLine = function (parent, tokens) {\n var screenColumn = 0;\n var token = tokens[0];\n var value = token.value;\n if (this.displayIndentGuides) value = this.renderIndentGuide(parent, value);\n if (value) screenColumn = this.$renderToken(parent, screenColumn, token, value);\n\n for (var i = 1; i < tokens.length; i++) {\n token = tokens[i];\n value = token.value;\n if (screenColumn + value.length > this.MAX_LINE_LENGTH) return this.$renderOverflowMessage(parent, screenColumn, token, value);\n screenColumn = this.$renderToken(parent, screenColumn, token, value);\n }\n };\n\n this.$renderOverflowMessage = function (parent, screenColumn, token, value, hide) {\n token && this.$renderToken(parent, screenColumn, token, value.slice(0, this.MAX_LINE_LENGTH - screenColumn));\n var overflowEl = this.dom.createElement(\"span\");\n overflowEl.className = \"ace_inline_button ace_keyword ace_toggle_wrap\";\n overflowEl.textContent = hide ? \"\" : \"\";\n parent.appendChild(overflowEl);\n };\n\n this.$renderLine = function (parent, row, foldLine) {\n if (!foldLine && foldLine != false) foldLine = this.session.getFoldLine(row);\n if (foldLine) var tokens = this.$getFoldLineTokens(row, foldLine);else var tokens = this.session.getTokens(row);\n var lastLineEl = parent;\n\n if (tokens.length) {\n var splits = this.session.getRowSplitData(row);\n\n if (splits && splits.length) {\n this.$renderWrappedLine(parent, tokens, splits);\n var lastLineEl = parent.lastChild;\n } else {\n var lastLineEl = parent;\n\n if (this.$useLineGroups()) {\n lastLineEl = this.$createLineElement();\n parent.appendChild(lastLineEl);\n }\n\n this.$renderSimpleLine(lastLineEl, tokens);\n }\n } else if (this.$useLineGroups()) {\n lastLineEl = this.$createLineElement();\n parent.appendChild(lastLineEl);\n }\n\n if (this.showInvisibles && lastLineEl) {\n if (foldLine) row = foldLine.end.row;\n var invisibleEl = this.dom.createElement(\"span\");\n invisibleEl.className = \"ace_invisible ace_invisible_eol\";\n invisibleEl.textContent = row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR;\n lastLineEl.appendChild(invisibleEl);\n }\n };\n\n this.$getFoldLineTokens = function (row, foldLine) {\n var session = this.session;\n var renderTokens = [];\n\n function addTokens(tokens, from, to) {\n var idx = 0,\n col = 0;\n\n while (col + tokens[idx].value.length < from) {\n col += tokens[idx].value.length;\n idx++;\n if (idx == tokens.length) return;\n }\n\n if (col != from) {\n var value = tokens[idx].value.substring(from - col);\n if (value.length > to - from) value = value.substring(0, to - from);\n renderTokens.push({\n type: tokens[idx].type,\n value: value\n });\n col = from + value.length;\n idx += 1;\n }\n\n while (col < to && idx < tokens.length) {\n var value = tokens[idx].value;\n\n if (value.length + col > to) {\n renderTokens.push({\n type: tokens[idx].type,\n value: value.substring(0, to - col)\n });\n } else renderTokens.push(tokens[idx]);\n\n col += value.length;\n idx += 1;\n }\n }\n\n var tokens = session.getTokens(row);\n foldLine.walk(function (placeholder, row, column, lastColumn, isNewRow) {\n if (placeholder != null) {\n renderTokens.push({\n type: \"fold\",\n value: placeholder\n });\n } else {\n if (isNewRow) tokens = session.getTokens(row);\n if (tokens.length) addTokens(tokens, lastColumn, column);\n }\n }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);\n return renderTokens;\n };\n\n this.$useLineGroups = function () {\n return this.session.getUseWrapMode();\n };\n\n this.destroy = function () {};\n }).call(Text.prototype);\n exports.Text = Text;\n});\nace.define(\"ace/layer/cursor\", [\"require\", \"exports\", \"module\", \"ace/lib/dom\"], function (require, exports, module) {\n \"use strict\";\n\n var dom = require(\"../lib/dom\");\n\n var Cursor = function Cursor(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_cursor-layer\";\n parentEl.appendChild(this.element);\n this.isVisible = false;\n this.isBlinking = true;\n this.blinkInterval = 1000;\n this.smoothBlinking = false;\n this.cursors = [];\n this.cursor = this.addCursor();\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.$updateCursors = this.$updateOpacity.bind(this);\n };\n\n (function () {\n this.$updateOpacity = function (val) {\n var cursors = this.cursors;\n\n for (var i = cursors.length; i--;) {\n dom.setStyle(cursors[i].style, \"opacity\", val ? \"\" : \"0\");\n }\n };\n\n this.$startCssAnimation = function () {\n var cursors = this.cursors;\n\n for (var i = cursors.length; i--;) {\n cursors[i].style.animationDuration = this.blinkInterval + \"ms\";\n }\n\n setTimeout(function () {\n dom.addCssClass(this.element, \"ace_animate-blinking\");\n }.bind(this));\n };\n\n this.$stopCssAnimation = function () {\n dom.removeCssClass(this.element, \"ace_animate-blinking\");\n };\n\n this.$padding = 0;\n\n this.setPadding = function (padding) {\n this.$padding = padding;\n };\n\n this.setSession = function (session) {\n this.session = session;\n };\n\n this.setBlinking = function (blinking) {\n if (blinking != this.isBlinking) {\n this.isBlinking = blinking;\n this.restartTimer();\n }\n };\n\n this.setBlinkInterval = function (blinkInterval) {\n if (blinkInterval != this.blinkInterval) {\n this.blinkInterval = blinkInterval;\n this.restartTimer();\n }\n };\n\n this.setSmoothBlinking = function (smoothBlinking) {\n if (smoothBlinking != this.smoothBlinking) {\n this.smoothBlinking = smoothBlinking;\n dom.setCssClass(this.element, \"ace_smooth-blinking\", smoothBlinking);\n this.$updateCursors(true);\n this.restartTimer();\n }\n };\n\n this.addCursor = function () {\n var el = dom.createElement(\"div\");\n el.className = \"ace_cursor\";\n this.element.appendChild(el);\n this.cursors.push(el);\n return el;\n };\n\n this.removeCursor = function () {\n if (this.cursors.length > 1) {\n var el = this.cursors.pop();\n el.parentNode.removeChild(el);\n return el;\n }\n };\n\n this.hideCursor = function () {\n this.isVisible = false;\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.showCursor = function () {\n this.isVisible = true;\n dom.removeCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.restartTimer = function () {\n var update = this.$updateCursors;\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n this.$stopCssAnimation();\n\n if (this.smoothBlinking) {\n dom.removeCssClass(this.element, \"ace_smooth-blinking\");\n }\n\n update(true);\n\n if (!this.isBlinking || !this.blinkInterval || !this.isVisible) {\n this.$stopCssAnimation();\n return;\n }\n\n if (this.smoothBlinking) {\n setTimeout(function () {\n dom.addCssClass(this.element, \"ace_smooth-blinking\");\n }.bind(this));\n }\n\n if (dom.HAS_CSS_ANIMATION) {\n this.$startCssAnimation();\n } else {\n var blink = function () {\n this.timeoutId = setTimeout(function () {\n update(false);\n }, 0.6 * this.blinkInterval);\n }.bind(this);\n\n this.intervalId = setInterval(function () {\n update(true);\n blink();\n }, this.blinkInterval);\n blink();\n }\n };\n\n this.getPixelPosition = function (position, onScreen) {\n if (!this.config || !this.session) return {\n left: 0,\n top: 0\n };\n if (!position) position = this.session.selection.getCursor();\n var pos = this.session.documentToScreenPosition(position);\n var cursorLeft = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, position.row) ? this.session.$bidiHandler.getPosLeft(pos.column) : pos.column * this.config.characterWidth);\n var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * this.config.lineHeight;\n return {\n left: cursorLeft,\n top: cursorTop\n };\n };\n\n this.isCursorInView = function (pixelPos, config) {\n return pixelPos.top >= 0 && pixelPos.top < config.maxHeight;\n };\n\n this.update = function (config) {\n this.config = config;\n var selections = this.session.$selectionMarkers;\n var i = 0,\n cursorIndex = 0;\n\n if (selections === undefined || selections.length === 0) {\n selections = [{\n cursor: null\n }];\n }\n\n for (var i = 0, n = selections.length; i < n; i++) {\n var pixelPos = this.getPixelPosition(selections[i].cursor, true);\n\n if ((pixelPos.top > config.height + config.offset || pixelPos.top < 0) && i > 1) {\n continue;\n }\n\n var element = this.cursors[cursorIndex++] || this.addCursor();\n var style = element.style;\n\n if (!this.drawCursor) {\n if (!this.isCursorInView(pixelPos, config)) {\n dom.setStyle(style, \"display\", \"none\");\n } else {\n dom.setStyle(style, \"display\", \"block\");\n dom.translate(element, pixelPos.left, pixelPos.top);\n dom.setStyle(style, \"width\", Math.round(config.characterWidth) + \"px\");\n dom.setStyle(style, \"height\", config.lineHeight + \"px\");\n }\n } else {\n this.drawCursor(element, pixelPos, config, selections[i], this.session);\n }\n }\n\n while (this.cursors.length > cursorIndex) {\n this.removeCursor();\n }\n\n var overwrite = this.session.getOverwrite();\n this.$setOverwrite(overwrite);\n this.$pixelPos = pixelPos;\n this.restartTimer();\n };\n\n this.drawCursor = null;\n\n this.$setOverwrite = function (overwrite) {\n if (overwrite != this.overwrite) {\n this.overwrite = overwrite;\n if (overwrite) dom.addCssClass(this.element, \"ace_overwrite-cursors\");else dom.removeCssClass(this.element, \"ace_overwrite-cursors\");\n }\n };\n\n this.destroy = function () {\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n };\n }).call(Cursor.prototype);\n exports.Cursor = Cursor;\n});\nace.define(\"ace/scrollbar\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/dom\", \"ace/lib/event\", \"ace/lib/event_emitter\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var dom = require(\"./lib/dom\");\n\n var event = require(\"./lib/event\");\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var MAX_SCROLL_H = 0x8000;\n\n var ScrollBar = function ScrollBar(parent) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_scrollbar ace_scrollbar\" + this.classSuffix;\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"ace_scrollbar-inner\";\n this.inner.textContent = \"\\xa0\";\n this.element.appendChild(this.inner);\n parent.appendChild(this.element);\n this.setVisible(false);\n this.skipEvent = false;\n event.addListener(this.element, \"scroll\", this.onScroll.bind(this));\n event.addListener(this.element, \"mousedown\", event.preventDefault);\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.setVisible = function (isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n }).call(ScrollBar.prototype);\n\n var VScrollBar = function VScrollBar(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollTop = 0;\n this.scrollHeight = 0;\n renderer.$scrollbarWidth = this.width = dom.scrollbarWidth(parent.ownerDocument);\n this.inner.style.width = this.element.style.width = (this.width || 15) + 5 + \"px\";\n this.$minWidth = 0;\n };\n\n oop.inherits(VScrollBar, ScrollBar);\n (function () {\n this.classSuffix = '-v';\n\n this.onScroll = function () {\n if (!this.skipEvent) {\n this.scrollTop = this.element.scrollTop;\n\n if (this.coeff != 1) {\n var h = this.element.clientHeight / this.scrollHeight;\n this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h);\n }\n\n this._emit(\"scroll\", {\n data: this.scrollTop\n });\n }\n\n this.skipEvent = false;\n };\n\n this.getWidth = function () {\n return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);\n };\n\n this.setHeight = function (height) {\n this.element.style.height = height + \"px\";\n };\n\n this.setInnerHeight = this.setScrollHeight = function (height) {\n this.scrollHeight = height;\n\n if (height > MAX_SCROLL_H) {\n this.coeff = MAX_SCROLL_H / height;\n height = MAX_SCROLL_H;\n } else if (this.coeff != 1) {\n this.coeff = 1;\n }\n\n this.inner.style.height = height + \"px\";\n };\n\n this.setScrollTop = function (scrollTop) {\n if (this.scrollTop != scrollTop) {\n this.skipEvent = true;\n this.scrollTop = scrollTop;\n this.element.scrollTop = scrollTop * this.coeff;\n }\n };\n }).call(VScrollBar.prototype);\n\n var HScrollBar = function HScrollBar(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollLeft = 0;\n this.height = renderer.$scrollbarWidth;\n this.inner.style.height = this.element.style.height = (this.height || 15) + 5 + \"px\";\n };\n\n oop.inherits(HScrollBar, ScrollBar);\n (function () {\n this.classSuffix = '-h';\n\n this.onScroll = function () {\n if (!this.skipEvent) {\n this.scrollLeft = this.element.scrollLeft;\n\n this._emit(\"scroll\", {\n data: this.scrollLeft\n });\n }\n\n this.skipEvent = false;\n };\n\n this.getHeight = function () {\n return this.isVisible ? this.height : 0;\n };\n\n this.setWidth = function (width) {\n this.element.style.width = width + \"px\";\n };\n\n this.setInnerWidth = function (width) {\n this.inner.style.width = width + \"px\";\n };\n\n this.setScrollWidth = function (width) {\n this.inner.style.width = width + \"px\";\n };\n\n this.setScrollLeft = function (scrollLeft) {\n if (this.scrollLeft != scrollLeft) {\n this.skipEvent = true;\n this.scrollLeft = this.element.scrollLeft = scrollLeft;\n }\n };\n }).call(HScrollBar.prototype);\n exports.ScrollBar = VScrollBar; // backward compatibility\n\n exports.ScrollBarV = VScrollBar; // backward compatibility\n\n exports.ScrollBarH = HScrollBar; // backward compatibility\n\n exports.VScrollBar = VScrollBar;\n exports.HScrollBar = HScrollBar;\n});\nace.define(\"ace/renderloop\", [\"require\", \"exports\", \"module\", \"ace/lib/event\"], function (require, exports, module) {\n \"use strict\";\n\n var event = require(\"./lib/event\");\n\n var RenderLoop = function RenderLoop(onRender, win) {\n this.onRender = onRender;\n this.pending = false;\n this.changes = 0;\n this.$recursionLimit = 2;\n this.window = win || window;\n\n var _self = this;\n\n this._flush = function (ts) {\n _self.pending = false;\n var changes = _self.changes;\n\n if (changes) {\n event.blockIdle(100);\n _self.changes = 0;\n\n _self.onRender(changes);\n }\n\n if (_self.changes) {\n if (_self.$recursionLimit-- < 0) return;\n\n _self.schedule();\n } else {\n _self.$recursionLimit = 2;\n }\n };\n };\n\n (function () {\n this.schedule = function (change) {\n this.changes = this.changes | change;\n\n if (this.changes && !this.pending) {\n event.nextFrame(this._flush);\n this.pending = true;\n }\n };\n\n this.clear = function (change) {\n var changes = this.changes;\n this.changes = 0;\n return changes;\n };\n }).call(RenderLoop.prototype);\n exports.RenderLoop = RenderLoop;\n});\nace.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 (require, exports, module) {\n var oop = require(\"../lib/oop\");\n\n var dom = require(\"../lib/dom\");\n\n var lang = require(\"../lib/lang\");\n\n var event = require(\"../lib/event\");\n\n var useragent = require(\"../lib/useragent\");\n\n var EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\n\n var CHAR_COUNT = 256;\n var USE_OBSERVER = typeof ResizeObserver == \"function\";\n var L = 200;\n\n var FontMetrics = exports.FontMetrics = function (parentEl) {\n this.el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.el.style, true);\n this.$main = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$main.style);\n this.$measureNode = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$measureNode.style);\n this.el.appendChild(this.$main);\n this.el.appendChild(this.$measureNode);\n parentEl.appendChild(this.el);\n this.$measureNode.innerHTML = lang.stringRepeat(\"X\", CHAR_COUNT);\n this.$characterSize = {\n width: 0,\n height: 0\n };\n if (USE_OBSERVER) this.$addObserver();else this.checkForSizeChanges();\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n this.$characterSize = {\n width: 0,\n height: 0\n };\n\n this.$setMeasureNodeStyles = function (style, isRoot) {\n style.width = style.height = \"auto\";\n style.left = style.top = \"0px\";\n style.visibility = \"hidden\";\n style.position = \"absolute\";\n style.whiteSpace = \"pre\";\n\n if (useragent.isIE < 8) {\n style[\"font-family\"] = \"inherit\";\n } else {\n style.font = \"inherit\";\n }\n\n style.overflow = isRoot ? \"hidden\" : \"visible\";\n };\n\n this.checkForSizeChanges = function (size) {\n if (size === undefined) size = this.$measureSizes();\n\n if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {\n this.$measureNode.style.fontWeight = \"bold\";\n var boldSize = this.$measureSizes();\n this.$measureNode.style.fontWeight = \"\";\n this.$characterSize = size;\n this.charSizes = Object.create(null);\n this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;\n\n this._emit(\"changeCharacterSize\", {\n data: size\n });\n }\n };\n\n this.$addObserver = function () {\n var self = this;\n this.$observer = new window.ResizeObserver(function (e) {\n var rect = e[0].contentRect;\n self.checkForSizeChanges({\n height: rect.height,\n width: rect.width / CHAR_COUNT\n });\n });\n this.$observer.observe(this.$measureNode);\n };\n\n this.$pollSizeChanges = function () {\n if (this.$pollSizeChangesTimer || this.$observer) return this.$pollSizeChangesTimer;\n var self = this;\n return this.$pollSizeChangesTimer = event.onIdle(function cb() {\n self.checkForSizeChanges();\n event.onIdle(cb, 500);\n }, 500);\n };\n\n this.setPolling = function (val) {\n if (val) {\n this.$pollSizeChanges();\n } else if (this.$pollSizeChangesTimer) {\n clearInterval(this.$pollSizeChangesTimer);\n this.$pollSizeChangesTimer = 0;\n }\n };\n\n this.$measureSizes = function (node) {\n var size = {\n height: (node || this.$measureNode).clientHeight,\n width: (node || this.$measureNode).clientWidth / CHAR_COUNT\n };\n if (size.width === 0 || size.height === 0) return null;\n return size;\n };\n\n this.$measureCharWidth = function (ch) {\n this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT);\n var rect = this.$main.getBoundingClientRect();\n return rect.width / CHAR_COUNT;\n };\n\n this.getCharacterWidth = function (ch) {\n var w = this.charSizes[ch];\n\n if (w === undefined) {\n w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;\n }\n\n return w;\n };\n\n this.destroy = function () {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.$observer) this.$observer.disconnect();\n if (this.el && this.el.parentNode) this.el.parentNode.removeChild(this.el);\n };\n\n this.$getZoom = function getZoom(element) {\n if (!element) return 1;\n return (window.getComputedStyle(element).zoom || 1) * getZoom(element.parentElement);\n };\n\n this.$initTransformMeasureNodes = function () {\n var t = function t(_t, l) {\n return [\"div\", {\n style: \"position: absolute;top:\" + _t + \"px;left:\" + l + \"px;\"\n }];\n };\n\n this.els = dom.buildDom([t(0, 0), t(L, 0), t(0, L), t(L, L)], this.el);\n };\n\n this.transformCoordinates = function (clientPos, elPos) {\n if (clientPos) {\n var zoom = this.$getZoom(this.el);\n clientPos = mul(1 / zoom, clientPos);\n }\n\n function solve(l1, l2, r) {\n var det = l1[1] * l2[0] - l1[0] * l2[1];\n return [(-l2[1] * r[0] + l2[0] * r[1]) / det, (+l1[1] * r[0] - l1[0] * r[1]) / det];\n }\n\n function sub(a, b) {\n return [a[0] - b[0], a[1] - b[1]];\n }\n\n function add(a, b) {\n return [a[0] + b[0], a[1] + b[1]];\n }\n\n function mul(a, b) {\n return [a * b[0], a * b[1]];\n }\n\n if (!this.els) this.$initTransformMeasureNodes();\n\n function p(el) {\n var r = el.getBoundingClientRect();\n return [r.left, r.top];\n }\n\n var a = p(this.els[0]);\n var b = p(this.els[1]);\n var c = p(this.els[2]);\n var d = p(this.els[3]);\n var h = solve(sub(d, b), sub(d, c), sub(add(b, c), add(d, a)));\n var m1 = mul(1 + h[0], sub(b, a));\n var m2 = mul(1 + h[1], sub(c, a));\n\n if (elPos) {\n var x = elPos;\n var k = h[0] * x[0] / L + h[1] * x[1] / L + 1;\n var ut = add(mul(x[0], m1), mul(x[1], m2));\n return add(mul(1 / k / L, ut), a);\n }\n\n var u = sub(clientPos, a);\n var f = solve(sub(m1, mul(h[0], u)), sub(m2, mul(h[1], u)), u);\n return mul(L, f);\n };\n }).call(FontMetrics.prototype);\n});\nace.define(\"ace/virtual_renderer\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/dom\", \"ace/config\", \"ace/layer/gutter\", \"ace/layer/marker\", \"ace/layer/text\", \"ace/layer/cursor\", \"ace/scrollbar\", \"ace/scrollbar\", \"ace/renderloop\", \"ace/layer/font_metrics\", \"ace/lib/event_emitter\", \"ace/lib/useragent\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var dom = require(\"./lib/dom\");\n\n var config = require(\"./config\");\n\n var GutterLayer = require(\"./layer/gutter\").Gutter;\n\n var MarkerLayer = require(\"./layer/marker\").Marker;\n\n var TextLayer = require(\"./layer/text\").Text;\n\n var CursorLayer = require(\"./layer/cursor\").Cursor;\n\n var HScrollBar = require(\"./scrollbar\").HScrollBar;\n\n var VScrollBar = require(\"./scrollbar\").VScrollBar;\n\n var RenderLoop = require(\"./renderloop\").RenderLoop;\n\n var FontMetrics = require(\"./layer/font_metrics\").FontMetrics;\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var editorCss = \"\\\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.ace_editor {\\\nposition: relative;\\\noverflow: hidden;\\\nfont: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\\\ndirection: ltr;\\\ntext-align: left;\\\n-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\\n}\\\n.ace_scroller {\\\nposition: absolute;\\\noverflow: hidden;\\\ntop: 0;\\\nbottom: 0;\\\nbackground-color: inherit;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\ncursor: text;\\\n}\\\n.ace_content {\\\nposition: absolute;\\\nbox-sizing: border-box;\\\nmin-width: 100%;\\\ncontain: style size layout;\\\n}\\\n.ace_dragging .ace_scroller:before{\\\nposition: absolute;\\\ntop: 0;\\\nleft: 0;\\\nright: 0;\\\nbottom: 0;\\\ncontent: '';\\\nbackground: rgba(250, 250, 250, 0.01);\\\nz-index: 1000;\\\n}\\\n.ace_dragging.ace_dark .ace_scroller:before{\\\nbackground: rgba(0, 0, 0, 0.01);\\\n}\\\n.ace_selecting, .ace_selecting * {\\\ncursor: text !important;\\\n}\\\n.ace_gutter {\\\nposition: absolute;\\\noverflow : hidden;\\\nwidth: auto;\\\ntop: 0;\\\nbottom: 0;\\\nleft: 0;\\\ncursor: default;\\\nz-index: 4;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\ncontain: style size layout;\\\n}\\\n.ace_gutter-active-line {\\\nposition: absolute;\\\nleft: 0;\\\nright: 0;\\\n}\\\n.ace_scroller.ace_scroll-left {\\\nbox-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\\\n}\\\n.ace_gutter-cell {\\\nposition: absolute;\\\ntop: 0;\\\nleft: 0;\\\nright: 0;\\\npadding-left: 19px;\\\npadding-right: 6px;\\\nbackground-repeat: no-repeat;\\\n}\\\n.ace_gutter-cell.ace_error {\\\nbackground-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==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_warning {\\\nbackground-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==\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_dark .ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_scrollbar {\\\ncontain: strict;\\\nposition: absolute;\\\nright: 0;\\\nbottom: 0;\\\nz-index: 6;\\\n}\\\n.ace_scrollbar-inner {\\\nposition: absolute;\\\ncursor: text;\\\nleft: 0;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-v{\\\noverflow-x: hidden;\\\noverflow-y: scroll;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-h {\\\noverflow-x: scroll;\\\noverflow-y: hidden;\\\nleft: 0;\\\n}\\\n.ace_print-margin {\\\nposition: absolute;\\\nheight: 100%;\\\n}\\\n.ace_text-input {\\\nposition: absolute;\\\nz-index: 0;\\\nwidth: 0.5em;\\\nheight: 1em;\\\nopacity: 0;\\\nbackground: transparent;\\\n-moz-appearance: none;\\\nappearance: none;\\\nborder: none;\\\nresize: none;\\\noutline: none;\\\noverflow: hidden;\\\nfont: inherit;\\\npadding: 0 1px;\\\nmargin: 0 -1px;\\\ncontain: strict;\\\n-ms-user-select: text;\\\n-moz-user-select: text;\\\n-webkit-user-select: text;\\\nuser-select: text;\\\nwhite-space: pre!important;\\\n}\\\n.ace_text-input.ace_composition {\\\nbackground: transparent;\\\ncolor: inherit;\\\nz-index: 1000;\\\nopacity: 1;\\\n}\\\n.ace_composition_placeholder { color: transparent }\\\n.ace_composition_marker { \\\nborder-bottom: 1px solid;\\\nposition: absolute;\\\nborder-radius: 0;\\\nmargin-top: 1px;\\\n}\\\n[ace_nocontext=true] {\\\ntransform: none!important;\\\nfilter: none!important;\\\nperspective: none!important;\\\nclip-path: none!important;\\\nmask : none!important;\\\ncontain: none!important;\\\nperspective: none!important;\\\nmix-blend-mode: initial!important;\\\nz-index: auto;\\\n}\\\n.ace_layer {\\\nz-index: 1;\\\nposition: absolute;\\\noverflow: hidden;\\\nword-wrap: normal;\\\nwhite-space: pre;\\\nheight: 100%;\\\nwidth: 100%;\\\nbox-sizing: border-box;\\\npointer-events: none;\\\n}\\\n.ace_gutter-layer {\\\nposition: relative;\\\nwidth: auto;\\\ntext-align: right;\\\npointer-events: auto;\\\nheight: 1000000px;\\\ncontain: style size layout;\\\n}\\\n.ace_text-layer {\\\nfont: inherit !important;\\\nposition: absolute;\\\nheight: 1000000px;\\\nwidth: 1000000px;\\\ncontain: style size layout;\\\n}\\\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\\\ncontain: style size layout;\\\nposition: absolute;\\\ntop: 0;\\\nleft: 0;\\\nright: 0;\\\n}\\\n.ace_hidpi .ace_text-layer,\\\n.ace_hidpi .ace_gutter-layer,\\\n.ace_hidpi .ace_content,\\\n.ace_hidpi .ace_gutter {\\\ncontain: strict;\\\nwill-change: transform;\\\n}\\\n.ace_hidpi .ace_text-layer > .ace_line, \\\n.ace_hidpi .ace_text-layer > .ace_line_group {\\\ncontain: strict;\\\n}\\\n.ace_cjk {\\\ndisplay: inline-block;\\\ntext-align: center;\\\n}\\\n.ace_cursor-layer {\\\nz-index: 4;\\\n}\\\n.ace_cursor {\\\nz-index: 4;\\\nposition: absolute;\\\nbox-sizing: border-box;\\\nborder-left: 2px solid;\\\ntransform: translatez(0);\\\n}\\\n.ace_multiselect .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_slim-cursors .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_overwrite-cursors .ace_cursor {\\\nborder-left-width: 0;\\\nborder-bottom: 1px solid;\\\n}\\\n.ace_hidden-cursors .ace_cursor {\\\nopacity: 0.2;\\\n}\\\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\\\nopacity: 0;\\\n}\\\n.ace_smooth-blinking .ace_cursor {\\\ntransition: opacity 0.18s;\\\n}\\\n.ace_animate-blinking .ace_cursor {\\\nanimation-duration: 1000ms;\\\nanimation-timing-function: step-end;\\\nanimation-name: blink-ace-animate;\\\nanimation-iteration-count: infinite;\\\n}\\\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\\\nanimation-duration: 1000ms;\\\nanimation-timing-function: ease-in-out;\\\nanimation-name: blink-ace-animate-smooth;\\\n}\\\n@keyframes blink-ace-animate {\\\nfrom, to { opacity: 1; }\\\n60% { opacity: 0; }\\\n}\\\n@keyframes blink-ace-animate-smooth {\\\nfrom, to { opacity: 1; }\\\n45% { opacity: 1; }\\\n60% { opacity: 0; }\\\n85% { opacity: 0; }\\\n}\\\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\\\nposition: absolute;\\\nz-index: 3;\\\n}\\\n.ace_marker-layer .ace_selection {\\\nposition: absolute;\\\nz-index: 5;\\\n}\\\n.ace_marker-layer .ace_bracket {\\\nposition: absolute;\\\nz-index: 6;\\\n}\\\n.ace_marker-layer .ace_active-line {\\\nposition: absolute;\\\nz-index: 2;\\\n}\\\n.ace_marker-layer .ace_selected-word {\\\nposition: absolute;\\\nz-index: 4;\\\nbox-sizing: border-box;\\\n}\\\n.ace_line .ace_fold {\\\nbox-sizing: border-box;\\\ndisplay: inline-block;\\\nheight: 11px;\\\nmargin-top: -2px;\\\nvertical-align: middle;\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\\\");\\\nbackground-repeat: no-repeat, repeat-x;\\\nbackground-position: center center, top left;\\\ncolor: transparent;\\\nborder: 1px solid black;\\\nborder-radius: 2px;\\\ncursor: pointer;\\\npointer-events: auto;\\\n}\\\n.ace_dark .ace_fold {\\\n}\\\n.ace_fold:hover{\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_tooltip {\\\nbackground-color: #FFF;\\\nbackground-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\\\nborder: 1px solid gray;\\\nborder-radius: 1px;\\\nbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\\\ncolor: black;\\\nmax-width: 100%;\\\npadding: 3px 4px;\\\nposition: fixed;\\\nz-index: 999999;\\\nbox-sizing: border-box;\\\ncursor: default;\\\nwhite-space: pre;\\\nword-wrap: break-word;\\\nline-height: normal;\\\nfont-style: normal;\\\nfont-weight: normal;\\\nletter-spacing: normal;\\\npointer-events: none;\\\n}\\\n.ace_folding-enabled > .ace_gutter-cell {\\\npadding-right: 13px;\\\n}\\\n.ace_fold-widget {\\\nbox-sizing: border-box;\\\nmargin: 0 -12px 0 1px;\\\ndisplay: none;\\\nwidth: 11px;\\\nvertical-align: top;\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: center;\\\nborder-radius: 3px;\\\nborder: 1px solid transparent;\\\ncursor: pointer;\\\n}\\\n.ace_folding-enabled .ace_fold-widget {\\\ndisplay: inline-block; \\\n}\\\n.ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\\\");\\\n}\\\n.ace_fold-widget:hover {\\\nborder: 1px solid rgba(0, 0, 0, 0.3);\\\nbackground-color: rgba(255, 255, 255, 0.2);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\\\n}\\\n.ace_fold-widget:active {\\\nborder: 1px solid rgba(0, 0, 0, 0.4);\\\nbackground-color: rgba(0, 0, 0, 0.05);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\\\n}\\\n.ace_dark .ace_fold-widget {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget:hover {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\nbackground-color: rgba(255, 255, 255, 0.1);\\\n}\\\n.ace_dark .ace_fold-widget:active {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\n}\\\n.ace_inline_button {\\\nborder: 1px solid lightgray;\\\ndisplay: inline-block;\\\nmargin: -1px 8px;\\\npadding: 0 5px;\\\npointer-events: auto;\\\ncursor: pointer;\\\n}\\\n.ace_inline_button:hover {\\\nborder-color: gray;\\\nbackground: rgba(200,200,200,0.2);\\\ndisplay: inline-block;\\\npointer-events: auto;\\\n}\\\n.ace_fold-widget.ace_invalid {\\\nbackground-color: #FFB4B4;\\\nborder-color: #DE5555;\\\n}\\\n.ace_fade-fold-widgets .ace_fold-widget {\\\ntransition: opacity 0.4s ease 0.05s;\\\nopacity: 0;\\\n}\\\n.ace_fade-fold-widgets:hover .ace_fold-widget {\\\ntransition: opacity 0.05s ease 0.05s;\\\nopacity:1;\\\n}\\\n.ace_underline {\\\ntext-decoration: underline;\\\n}\\\n.ace_bold {\\\nfont-weight: bold;\\\n}\\\n.ace_nobold .ace_bold {\\\nfont-weight: normal;\\\n}\\\n.ace_italic {\\\nfont-style: italic;\\\n}\\\n.ace_error-marker {\\\nbackground-color: rgba(255, 0, 0,0.2);\\\nposition: absolute;\\\nz-index: 9;\\\n}\\\n.ace_highlight-marker {\\\nbackground-color: rgba(255, 255, 0,0.2);\\\nposition: absolute;\\\nz-index: 8;\\\n}\\\n.ace_mobile-menu {\\\nposition: absolute;\\\nline-height: 1.5;\\\nborder-radius: 4px;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\nbackground: white;\\\nbox-shadow: 1px 3px 2px grey;\\\nborder: 1px solid #dcdcdc;\\\ncolor: black;\\\n}\\\n.ace_dark > .ace_mobile-menu {\\\nbackground: #333;\\\ncolor: #ccc;\\\nbox-shadow: 1px 3px 2px grey;\\\nborder: 1px solid #444;\\\n}\\\n.ace_mobile-button {\\\npadding: 2px;\\\ncursor: pointer;\\\noverflow: hidden;\\\n}\\\n.ace_mobile-button:hover {\\\nbackground-color: #eee;\\\nopacity:1;\\\n}\\\n.ace_mobile-button:active {\\\nbackground-color: #ddd;\\\n}\\\n.ace_placeholder {\\\nfont-family: arial;\\\ntransform: scale(0.9);\\\nopacity: 0.7;\\\ntransform-origin: left;\\\ntext-indent: 10px;\\\n}\";\n\n var useragent = require(\"./lib/useragent\");\n\n var HIDE_TEXTAREA = useragent.isIE;\n dom.importCssString(editorCss, \"ace_editor.css\");\n\n var VirtualRenderer = function VirtualRenderer(container, theme) {\n var _self = this;\n\n this.container = container || dom.createElement(\"div\");\n dom.addCssClass(this.container, \"ace_editor\");\n if (dom.HI_DPI) dom.addCssClass(this.container, \"ace_hidpi\");\n this.setTheme(theme);\n this.$gutter = dom.createElement(\"div\");\n this.$gutter.className = \"ace_gutter\";\n this.container.appendChild(this.$gutter);\n this.$gutter.setAttribute(\"aria-hidden\", true);\n this.scroller = dom.createElement(\"div\");\n this.scroller.className = \"ace_scroller\";\n this.container.appendChild(this.scroller);\n this.content = dom.createElement(\"div\");\n this.content.className = \"ace_content\";\n this.scroller.appendChild(this.content);\n this.$gutterLayer = new GutterLayer(this.$gutter);\n this.$gutterLayer.on(\"changeGutterWidth\", this.onGutterResize.bind(this));\n this.$markerBack = new MarkerLayer(this.content);\n var textLayer = this.$textLayer = new TextLayer(this.content);\n this.canvas = textLayer.element;\n this.$markerFront = new MarkerLayer(this.content);\n this.$cursorLayer = new CursorLayer(this.content);\n this.$horizScroll = false;\n this.$vScroll = false;\n this.scrollBar = this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation) _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation) _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n this.scrollTop = 0;\n this.scrollLeft = 0;\n this.cursorPos = {\n row: 0,\n column: 0\n };\n this.$fontMetrics = new FontMetrics(this.container);\n this.$textLayer.$setFontMetrics(this.$fontMetrics);\n this.$textLayer.addEventListener(\"changeCharacterSize\", function (e) {\n _self.updateCharacterSize();\n\n _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);\n\n _self._signal(\"changeCharacterSize\", e);\n });\n this.$size = {\n width: 0,\n height: 0,\n scrollerHeight: 0,\n scrollerWidth: 0,\n $dirty: true\n };\n this.layerConfig = {\n width: 1,\n padding: 0,\n firstRow: 0,\n firstRowScreen: 0,\n lastRow: 0,\n lineHeight: 0,\n characterWidth: 0,\n minHeight: 1,\n maxHeight: 1,\n offset: 0,\n height: 1,\n gutterOffset: 1\n };\n this.scrollMargin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n this.margin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n this.$keepTextAreaAtCursor = !useragent.isIOS;\n this.$loop = new RenderLoop(this.$renderChanges.bind(this), this.container.ownerDocument.defaultView);\n this.$loop.schedule(this.CHANGE_FULL);\n this.updateCharacterSize();\n this.setPadding(4);\n config.resetOptions(this);\n\n config._signal(\"renderer\", this);\n };\n\n (function () {\n this.CHANGE_CURSOR = 1;\n this.CHANGE_MARKER = 2;\n this.CHANGE_GUTTER = 4;\n this.CHANGE_SCROLL = 8;\n this.CHANGE_LINES = 16;\n this.CHANGE_TEXT = 32;\n this.CHANGE_SIZE = 64;\n this.CHANGE_MARKER_BACK = 128;\n this.CHANGE_MARKER_FRONT = 256;\n this.CHANGE_FULL = 512;\n this.CHANGE_H_SCROLL = 1024;\n oop.implement(this, EventEmitter);\n\n this.updateCharacterSize = function () {\n if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {\n this.$allowBoldFonts = this.$textLayer.allowBoldFonts;\n this.setStyle(\"ace_nobold\", !this.$allowBoldFonts);\n }\n\n this.layerConfig.characterWidth = this.characterWidth = this.$textLayer.getCharacterWidth();\n this.layerConfig.lineHeight = this.lineHeight = this.$textLayer.getLineHeight();\n this.$updatePrintMargin();\n dom.setStyle(this.scroller.style, \"line-height\", this.lineHeight + \"px\");\n };\n\n this.setSession = function (session) {\n if (this.session) this.session.doc.off(\"changeNewLineMode\", this.onChangeNewLineMode);\n this.session = session;\n if (session && this.scrollMargin.top && session.getScrollTop() <= 0) session.setScrollTop(-this.scrollMargin.top);\n this.$cursorLayer.setSession(session);\n this.$markerBack.setSession(session);\n this.$markerFront.setSession(session);\n this.$gutterLayer.setSession(session);\n this.$textLayer.setSession(session);\n if (!session) return;\n this.$loop.schedule(this.CHANGE_FULL);\n this.session.$setFontMetrics(this.$fontMetrics);\n this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;\n this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);\n this.onChangeNewLineMode();\n this.session.doc.on(\"changeNewLineMode\", this.onChangeNewLineMode);\n };\n\n this.updateLines = function (firstRow, lastRow, force) {\n if (lastRow === undefined) lastRow = Infinity;\n\n if (!this.$changedLines) {\n this.$changedLines = {\n firstRow: firstRow,\n lastRow: lastRow\n };\n } else {\n if (this.$changedLines.firstRow > firstRow) this.$changedLines.firstRow = firstRow;\n if (this.$changedLines.lastRow < lastRow) this.$changedLines.lastRow = lastRow;\n }\n\n if (this.$changedLines.lastRow < this.layerConfig.firstRow) {\n if (force) this.$changedLines.lastRow = this.layerConfig.lastRow;else return;\n }\n\n if (this.$changedLines.firstRow > this.layerConfig.lastRow) return;\n this.$loop.schedule(this.CHANGE_LINES);\n };\n\n this.onChangeNewLineMode = function () {\n this.$loop.schedule(this.CHANGE_TEXT);\n this.$textLayer.$updateEolChar();\n this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);\n };\n\n this.onChangeTabSize = function () {\n this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);\n this.$textLayer.onChangeTabSize();\n };\n\n this.updateText = function () {\n this.$loop.schedule(this.CHANGE_TEXT);\n };\n\n this.updateFull = function (force) {\n if (force) this.$renderChanges(this.CHANGE_FULL, true);else this.$loop.schedule(this.CHANGE_FULL);\n };\n\n this.updateFontSize = function () {\n this.$textLayer.checkForSizeChanges();\n };\n\n this.$changes = 0;\n\n this.$updateSizeAsync = function () {\n if (this.$loop.pending) this.$size.$dirty = true;else this.onResize();\n };\n\n this.onResize = function (force, gutterWidth, width, height) {\n if (this.resizing > 2) return;else if (this.resizing > 0) this.resizing++;else this.resizing = force ? 1 : 0;\n var el = this.container;\n if (!height) height = el.clientHeight || el.scrollHeight;\n if (!width) width = el.clientWidth || el.scrollWidth;\n var changes = this.$updateCachedSize(force, gutterWidth, width, height);\n if (!this.$size.scrollerHeight || !width && !height) return this.resizing = 0;\n if (force) this.$gutterLayer.$padding = null;\n if (force) this.$renderChanges(changes | this.$changes, true);else this.$loop.schedule(changes | this.$changes);\n if (this.resizing) this.resizing = 0;\n this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;\n };\n\n this.$updateCachedSize = function (force, gutterWidth, width, height) {\n height -= this.$extraHeight || 0;\n var changes = 0;\n var size = this.$size;\n var oldSize = {\n width: size.width,\n height: size.height,\n scrollerHeight: size.scrollerHeight,\n scrollerWidth: size.scrollerWidth\n };\n\n if (height && (force || size.height != height)) {\n size.height = height;\n changes |= this.CHANGE_SIZE;\n size.scrollerHeight = size.height;\n if (this.$horizScroll) size.scrollerHeight -= this.scrollBarH.getHeight();\n this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + \"px\";\n changes = changes | this.CHANGE_SCROLL;\n }\n\n if (width && (force || size.width != width)) {\n changes |= this.CHANGE_SIZE;\n size.width = width;\n if (gutterWidth == null) gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n this.gutterWidth = gutterWidth;\n dom.setStyle(this.scrollBarH.element.style, \"left\", gutterWidth + \"px\");\n dom.setStyle(this.scroller.style, \"left\", gutterWidth + this.margin.left + \"px\");\n size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h);\n dom.setStyle(this.$gutter.style, \"left\", this.margin.left + \"px\");\n var right = this.scrollBarV.getWidth() + \"px\";\n dom.setStyle(this.scrollBarH.element.style, \"right\", right);\n dom.setStyle(this.scroller.style, \"right\", right);\n dom.setStyle(this.scroller.style, \"bottom\", this.scrollBarH.getHeight());\n\n if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) {\n changes |= this.CHANGE_FULL;\n }\n }\n\n size.$dirty = !width || !height;\n if (changes) this._signal(\"resize\", oldSize);\n return changes;\n };\n\n this.onGutterResize = function (width) {\n var gutterWidth = this.$showGutter ? width : 0;\n if (gutterWidth != this.gutterWidth) this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);\n\n if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else if (this.$size.$dirty) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else {\n this.$computeLayerConfig();\n }\n };\n\n this.adjustWrapLimit = function () {\n var availableWidth = this.$size.scrollerWidth - this.$padding * 2;\n var limit = Math.floor(availableWidth / this.characterWidth);\n return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);\n };\n\n this.setAnimatedScroll = function (shouldAnimate) {\n this.setOption(\"animatedScroll\", shouldAnimate);\n };\n\n this.getAnimatedScroll = function () {\n return this.$animatedScroll;\n };\n\n this.setShowInvisibles = function (showInvisibles) {\n this.setOption(\"showInvisibles\", showInvisibles);\n this.session.$bidiHandler.setShowInvisibles(showInvisibles);\n };\n\n this.getShowInvisibles = function () {\n return this.getOption(\"showInvisibles\");\n };\n\n this.getDisplayIndentGuides = function () {\n return this.getOption(\"displayIndentGuides\");\n };\n\n this.setDisplayIndentGuides = function (display) {\n this.setOption(\"displayIndentGuides\", display);\n };\n\n this.setShowPrintMargin = function (showPrintMargin) {\n this.setOption(\"showPrintMargin\", showPrintMargin);\n };\n\n this.getShowPrintMargin = function () {\n return this.getOption(\"showPrintMargin\");\n };\n\n this.setPrintMarginColumn = function (showPrintMargin) {\n this.setOption(\"printMarginColumn\", showPrintMargin);\n };\n\n this.getPrintMarginColumn = function () {\n return this.getOption(\"printMarginColumn\");\n };\n\n this.getShowGutter = function () {\n return this.getOption(\"showGutter\");\n };\n\n this.setShowGutter = function (show) {\n return this.setOption(\"showGutter\", show);\n };\n\n this.getFadeFoldWidgets = function () {\n return this.getOption(\"fadeFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function (show) {\n this.setOption(\"fadeFoldWidgets\", show);\n };\n\n this.setHighlightGutterLine = function (shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function () {\n return this.getOption(\"highlightGutterLine\");\n };\n\n this.$updatePrintMargin = function () {\n if (!this.$showPrintMargin && !this.$printMarginEl) return;\n\n if (!this.$printMarginEl) {\n var containerEl = dom.createElement(\"div\");\n containerEl.className = \"ace_layer ace_print-margin-layer\";\n this.$printMarginEl = dom.createElement(\"div\");\n this.$printMarginEl.className = \"ace_print-margin\";\n containerEl.appendChild(this.$printMarginEl);\n this.content.insertBefore(containerEl, this.content.firstChild);\n }\n\n var style = this.$printMarginEl.style;\n style.left = Math.round(this.characterWidth * this.$printMarginColumn + this.$padding) + \"px\";\n style.visibility = this.$showPrintMargin ? \"visible\" : \"hidden\";\n if (this.session && this.session.$wrap == -1) this.adjustWrapLimit();\n };\n\n this.getContainerElement = function () {\n return this.container;\n };\n\n this.getMouseEventTarget = function () {\n return this.scroller;\n };\n\n this.getTextAreaContainer = function () {\n return this.container;\n };\n\n this.$moveTextAreaToCursor = function () {\n if (this.$isMousePressed) return;\n var style = this.textarea.style;\n var composition = this.$composition;\n\n if (!this.$keepTextAreaAtCursor && !composition) {\n dom.translate(this.textarea, -100, 0);\n return;\n }\n\n var pixelPos = this.$cursorLayer.$pixelPos;\n if (!pixelPos) return;\n if (composition && composition.markerRange) pixelPos = this.$cursorLayer.getPixelPosition(composition.markerRange.start, true);\n var config = this.layerConfig;\n var posTop = pixelPos.top;\n var posLeft = pixelPos.left;\n posTop -= config.offset;\n var h = composition && composition.useTextareaForIME ? this.lineHeight : HIDE_TEXTAREA ? 0 : 1;\n\n if (posTop < 0 || posTop > config.height - h) {\n dom.translate(this.textarea, 0, 0);\n return;\n }\n\n var w = 1;\n var maxTop = this.$size.height - h;\n\n if (!composition) {\n posTop += this.lineHeight;\n } else {\n if (composition.useTextareaForIME) {\n var val = this.textarea.value;\n w = this.characterWidth * this.session.$getStringScreenWidth(val)[0];\n } else {\n posTop += this.lineHeight + 2;\n }\n }\n\n posLeft -= this.scrollLeft;\n if (posLeft > this.$size.scrollerWidth - w) posLeft = this.$size.scrollerWidth - w;\n posLeft += this.gutterWidth + this.margin.left;\n dom.setStyle(style, \"height\", h + \"px\");\n dom.setStyle(style, \"width\", w + \"px\");\n dom.translate(this.textarea, Math.min(posLeft, this.$size.scrollerWidth - w), Math.min(posTop, maxTop));\n };\n\n this.getFirstVisibleRow = function () {\n return this.layerConfig.firstRow;\n };\n\n this.getFirstFullyVisibleRow = function () {\n return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);\n };\n\n this.getLastFullyVisibleRow = function () {\n var config = this.layerConfig;\n var lastRow = config.lastRow;\n var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;\n if (top - this.session.getScrollTop() > config.height - config.lineHeight) return lastRow - 1;\n return lastRow;\n };\n\n this.getLastVisibleRow = function () {\n return this.layerConfig.lastRow;\n };\n\n this.$padding = null;\n\n this.setPadding = function (padding) {\n this.$padding = padding;\n this.$textLayer.setPadding(padding);\n this.$cursorLayer.setPadding(padding);\n this.$markerFront.setPadding(padding);\n this.$markerBack.setPadding(padding);\n this.$loop.schedule(this.CHANGE_FULL);\n this.$updatePrintMargin();\n };\n\n this.setScrollMargin = function (top, bottom, left, right) {\n var sm = this.scrollMargin;\n sm.top = top | 0;\n sm.bottom = bottom | 0;\n sm.right = right | 0;\n sm.left = left | 0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n if (sm.top && this.scrollTop <= 0 && this.session) this.session.setScrollTop(-sm.top);\n this.updateFull();\n };\n\n this.setMargin = function (top, bottom, left, right) {\n var sm = this.margin;\n sm.top = top | 0;\n sm.bottom = bottom | 0;\n sm.right = right | 0;\n sm.left = left | 0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height);\n this.updateFull();\n };\n\n this.getHScrollBarAlwaysVisible = function () {\n return this.$hScrollBarAlwaysVisible;\n };\n\n this.setHScrollBarAlwaysVisible = function (alwaysVisible) {\n this.setOption(\"hScrollBarAlwaysVisible\", alwaysVisible);\n };\n\n this.getVScrollBarAlwaysVisible = function () {\n return this.$vScrollBarAlwaysVisible;\n };\n\n this.setVScrollBarAlwaysVisible = function (alwaysVisible) {\n this.setOption(\"vScrollBarAlwaysVisible\", alwaysVisible);\n };\n\n this.$updateScrollBarV = function () {\n var scrollHeight = this.layerConfig.maxHeight;\n var scrollerHeight = this.$size.scrollerHeight;\n\n if (!this.$maxLines && this.$scrollPastEnd) {\n scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;\n\n if (this.scrollTop > scrollHeight - scrollerHeight) {\n scrollHeight = this.scrollTop + scrollerHeight;\n this.scrollBarV.scrollTop = null;\n }\n }\n\n this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);\n this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);\n };\n\n this.$updateScrollBarH = function () {\n this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);\n this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);\n };\n\n this.$frozen = false;\n\n this.freeze = function () {\n this.$frozen = true;\n };\n\n this.unfreeze = function () {\n this.$frozen = false;\n };\n\n this.$renderChanges = function (changes, force) {\n if (this.$changes) {\n changes |= this.$changes;\n this.$changes = 0;\n }\n\n if (!this.session || !this.container.offsetWidth || this.$frozen || !changes && !force) {\n this.$changes |= changes;\n return;\n }\n\n if (this.$size.$dirty) {\n this.$changes |= changes;\n return this.onResize(true);\n }\n\n if (!this.lineHeight) {\n this.$textLayer.checkForSizeChanges();\n }\n\n this._signal(\"beforeRender\");\n\n if (this.session && this.session.$bidiHandler) this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);\n var config = this.layerConfig;\n\n if (changes & this.CHANGE_FULL || changes & this.CHANGE_SIZE || changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES || changes & this.CHANGE_SCROLL || changes & this.CHANGE_H_SCROLL) {\n changes |= this.$computeLayerConfig() | this.$loop.clear();\n\n if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {\n var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;\n\n if (st > 0) {\n this.scrollTop = st;\n changes = changes | this.CHANGE_SCROLL;\n changes |= this.$computeLayerConfig() | this.$loop.clear();\n }\n }\n\n config = this.layerConfig;\n this.$updateScrollBarV();\n if (changes & this.CHANGE_H_SCROLL) this.$updateScrollBarH();\n dom.translate(this.content, -this.scrollLeft, -config.offset);\n var width = config.width + 2 * this.$padding + \"px\";\n var height = config.minHeight + \"px\";\n dom.setStyle(this.content.style, \"width\", width);\n dom.setStyle(this.content.style, \"height\", height);\n }\n\n if (changes & this.CHANGE_H_SCROLL) {\n dom.translate(this.content, -this.scrollLeft, -config.offset);\n this.scroller.className = this.scrollLeft <= 0 ? \"ace_scroller\" : \"ace_scroller ace_scroll-left\";\n }\n\n if (changes & this.CHANGE_FULL) {\n this.$changedLines = null;\n this.$textLayer.update(config);\n if (this.$showGutter) this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n\n this._signal(\"afterRender\");\n\n return;\n }\n\n if (changes & this.CHANGE_SCROLL) {\n this.$changedLines = null;\n if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) this.$textLayer.update(config);else this.$textLayer.scrollLines(config);\n\n if (this.$showGutter) {\n if (changes & this.CHANGE_GUTTER || changes & this.CHANGE_LINES) this.$gutterLayer.update(config);else this.$gutterLayer.scrollLines(config);\n }\n\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n\n this._signal(\"afterRender\");\n\n return;\n }\n\n if (changes & this.CHANGE_TEXT) {\n this.$changedLines = null;\n this.$textLayer.update(config);\n if (this.$showGutter) this.$gutterLayer.update(config);\n } else if (changes & this.CHANGE_LINES) {\n if (this.$updateLines() || changes & this.CHANGE_GUTTER && this.$showGutter) this.$gutterLayer.update(config);\n } else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {\n if (this.$showGutter) this.$gutterLayer.update(config);\n } else if (changes & this.CHANGE_CURSOR) {\n if (this.$highlightGutterLine) this.$gutterLayer.updateLineHighlight(config);\n }\n\n if (changes & this.CHANGE_CURSOR) {\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {\n this.$markerFront.update(config);\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {\n this.$markerBack.update(config);\n }\n\n this._signal(\"afterRender\");\n };\n\n this.$autosize = function () {\n var height = this.session.getScreenLength() * this.lineHeight;\n var maxHeight = this.$maxLines * this.lineHeight;\n var desiredHeight = Math.min(maxHeight, Math.max((this.$minLines || 1) * this.lineHeight, height)) + this.scrollMargin.v + (this.$extraHeight || 0);\n if (this.$horizScroll) desiredHeight += this.scrollBarH.getHeight();\n if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight) desiredHeight = this.$maxPixelHeight;\n var hideScrollbars = desiredHeight <= 2 * this.lineHeight;\n var vScroll = !hideScrollbars && height > maxHeight;\n\n if (desiredHeight != this.desiredHeight || this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {\n if (vScroll != this.$vScroll) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n\n var w = this.container.clientWidth;\n this.container.style.height = desiredHeight + \"px\";\n this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);\n this.desiredHeight = desiredHeight;\n\n this._signal(\"autosize\");\n }\n };\n\n this.$computeLayerConfig = function () {\n var session = this.session;\n var size = this.$size;\n var hideScrollbars = size.height <= 2 * this.lineHeight;\n var screenLines = this.session.getScreenLength();\n var maxHeight = screenLines * this.lineHeight;\n var longestLine = this.$getLongestLine();\n var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible || size.scrollerWidth - longestLine - 2 * this.$padding < 0);\n var hScrollChanged = this.$horizScroll !== horizScroll;\n\n if (hScrollChanged) {\n this.$horizScroll = horizScroll;\n this.scrollBarH.setVisible(horizScroll);\n }\n\n var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine\n\n if (this.$maxLines && this.lineHeight > 1) this.$autosize();\n var minHeight = size.scrollerHeight + this.lineHeight;\n var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd : 0;\n maxHeight += scrollPastEnd;\n var sm = this.scrollMargin;\n this.session.setScrollTop(Math.max(-sm.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));\n this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));\n var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);\n var vScrollChanged = vScrollBefore !== vScroll;\n\n if (vScrollChanged) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n\n var offset = this.scrollTop % this.lineHeight;\n var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;\n var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));\n var lastRow = firstRow + lineCount;\n var firstRowScreen, firstRowHeight;\n var lineHeight = this.lineHeight;\n firstRow = session.screenToDocumentRow(firstRow, 0);\n var foldLine = session.getFoldLine(firstRow);\n\n if (foldLine) {\n firstRow = foldLine.start.row;\n }\n\n firstRowScreen = session.documentToScreenRow(firstRow, 0);\n firstRowHeight = session.getRowLength(firstRow) * lineHeight;\n lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);\n minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight + firstRowHeight;\n offset = this.scrollTop - firstRowScreen * lineHeight;\n var changes = 0;\n if (this.layerConfig.width != longestLine || hScrollChanged) changes = this.CHANGE_H_SCROLL;\n\n if (hScrollChanged || vScrollChanged) {\n changes |= this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);\n\n this._signal(\"scrollbarVisibilityChanged\");\n\n if (vScrollChanged) longestLine = this.$getLongestLine();\n }\n\n this.layerConfig = {\n width: longestLine,\n padding: this.$padding,\n firstRow: firstRow,\n firstRowScreen: firstRowScreen,\n lastRow: lastRow,\n lineHeight: lineHeight,\n characterWidth: this.characterWidth,\n minHeight: minHeight,\n maxHeight: maxHeight,\n offset: offset,\n gutterOffset: lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,\n height: this.$size.scrollerHeight\n };\n if (this.session.$bidiHandler) this.session.$bidiHandler.setContentWidth(longestLine - this.$padding);\n return changes;\n };\n\n this.$updateLines = function () {\n if (!this.$changedLines) return;\n var firstRow = this.$changedLines.firstRow;\n var lastRow = this.$changedLines.lastRow;\n this.$changedLines = null;\n var layerConfig = this.layerConfig;\n\n if (firstRow > layerConfig.lastRow + 1) {\n return;\n }\n\n if (lastRow < layerConfig.firstRow) {\n return;\n }\n\n if (lastRow === Infinity) {\n if (this.$showGutter) this.$gutterLayer.update(layerConfig);\n this.$textLayer.update(layerConfig);\n return;\n }\n\n this.$textLayer.updateLines(layerConfig, firstRow, lastRow);\n return true;\n };\n\n this.$getLongestLine = function () {\n var charCount = this.session.getScreenWidth();\n if (this.showInvisibles && !this.session.$useWrapMode) charCount += 1;\n if (this.$textLayer && charCount > this.$textLayer.MAX_LINE_LENGTH) charCount = this.$textLayer.MAX_LINE_LENGTH + 30;\n return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));\n };\n\n this.updateFrontMarkers = function () {\n this.$markerFront.setMarkers(this.session.getMarkers(true));\n this.$loop.schedule(this.CHANGE_MARKER_FRONT);\n };\n\n this.updateBackMarkers = function () {\n this.$markerBack.setMarkers(this.session.getMarkers());\n this.$loop.schedule(this.CHANGE_MARKER_BACK);\n };\n\n this.addGutterDecoration = function (row, className) {\n this.$gutterLayer.addGutterDecoration(row, className);\n };\n\n this.removeGutterDecoration = function (row, className) {\n this.$gutterLayer.removeGutterDecoration(row, className);\n };\n\n this.updateBreakpoints = function (rows) {\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n\n this.setAnnotations = function (annotations) {\n this.$gutterLayer.setAnnotations(annotations);\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n\n this.updateCursor = function () {\n this.$loop.schedule(this.CHANGE_CURSOR);\n };\n\n this.hideCursor = function () {\n this.$cursorLayer.hideCursor();\n };\n\n this.showCursor = function () {\n this.$cursorLayer.showCursor();\n };\n\n this.scrollSelectionIntoView = function (anchor, lead, offset) {\n this.scrollCursorIntoView(anchor, offset);\n this.scrollCursorIntoView(lead, offset);\n };\n\n this.scrollCursorIntoView = function (cursor, offset, $viewMargin) {\n if (this.$size.scrollerHeight === 0) return;\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var left = pos.left;\n var top = pos.top;\n var topMargin = $viewMargin && $viewMargin.top || 0;\n var bottomMargin = $viewMargin && $viewMargin.bottom || 0;\n var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;\n\n if (scrollTop + topMargin > top) {\n if (offset && scrollTop + topMargin > top + this.lineHeight) top -= offset * this.$size.scrollerHeight;\n if (top === 0) top = -this.scrollMargin.top;\n this.session.setScrollTop(top);\n } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {\n if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight) top += offset * this.$size.scrollerHeight;\n this.session.setScrollTop(top + this.lineHeight + bottomMargin - this.$size.scrollerHeight);\n }\n\n var scrollLeft = this.scrollLeft;\n\n if (scrollLeft > left) {\n if (left < this.$padding + 2 * this.layerConfig.characterWidth) left = -this.scrollMargin.left;\n this.session.setScrollLeft(left);\n } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {\n this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));\n } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {\n this.session.setScrollLeft(0);\n }\n };\n\n this.getScrollTop = function () {\n return this.session.getScrollTop();\n };\n\n this.getScrollLeft = function () {\n return this.session.getScrollLeft();\n };\n\n this.getScrollTopRow = function () {\n return this.scrollTop / this.lineHeight;\n };\n\n this.getScrollBottomRow = function () {\n return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);\n };\n\n this.scrollToRow = function (row) {\n this.session.setScrollTop(row * this.lineHeight);\n };\n\n this.alignCursor = function (cursor, alignment) {\n if (typeof cursor == \"number\") cursor = {\n row: cursor,\n column: 0\n };\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var h = this.$size.scrollerHeight - this.lineHeight;\n var offset = pos.top - h * (alignment || 0);\n this.session.setScrollTop(offset);\n return offset;\n };\n\n this.STEPS = 8;\n\n this.$calcSteps = function (fromValue, toValue) {\n var i = 0;\n var l = this.STEPS;\n var steps = [];\n\n var func = function func(t, x_min, dx) {\n return dx * (Math.pow(t - 1, 3) + 1) + x_min;\n };\n\n for (i = 0; i < l; ++i) {\n steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));\n }\n\n return steps;\n };\n\n this.scrollToLine = function (line, center, animate, callback) {\n var pos = this.$cursorLayer.getPixelPosition({\n row: line,\n column: 0\n });\n var offset = pos.top;\n if (center) offset -= this.$size.scrollerHeight / 2;\n var initialScroll = this.scrollTop;\n this.session.setScrollTop(offset);\n if (animate !== false) this.animateScrolling(initialScroll, callback);\n };\n\n this.animateScrolling = function (fromValue, callback) {\n var toValue = this.scrollTop;\n if (!this.$animatedScroll) return;\n\n var _self = this;\n\n if (fromValue == toValue) return;\n\n if (this.$scrollAnimation) {\n var oldSteps = this.$scrollAnimation.steps;\n\n if (oldSteps.length) {\n fromValue = oldSteps[0];\n if (fromValue == toValue) return;\n }\n }\n\n var steps = _self.$calcSteps(fromValue, toValue);\n\n this.$scrollAnimation = {\n from: fromValue,\n to: toValue,\n steps: steps\n };\n clearInterval(this.$timer);\n\n _self.session.setScrollTop(steps.shift());\n\n _self.session.$scrollTop = toValue;\n this.$timer = setInterval(function () {\n if (steps.length) {\n _self.session.setScrollTop(steps.shift());\n\n _self.session.$scrollTop = toValue;\n } else if (toValue != null) {\n _self.session.$scrollTop = -1;\n\n _self.session.setScrollTop(toValue);\n\n toValue = null;\n } else {\n _self.$timer = clearInterval(_self.$timer);\n _self.$scrollAnimation = null;\n callback && callback();\n }\n }, 10);\n };\n\n this.scrollToY = function (scrollTop) {\n if (this.scrollTop !== scrollTop) {\n this.$loop.schedule(this.CHANGE_SCROLL);\n this.scrollTop = scrollTop;\n }\n };\n\n this.scrollToX = function (scrollLeft) {\n if (this.scrollLeft !== scrollLeft) this.scrollLeft = scrollLeft;\n this.$loop.schedule(this.CHANGE_H_SCROLL);\n };\n\n this.scrollTo = function (x, y) {\n this.session.setScrollTop(y);\n this.session.setScrollLeft(y);\n };\n\n this.scrollBy = function (deltaX, deltaY) {\n deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);\n deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);\n };\n\n this.isScrollableBy = function (deltaX, deltaY) {\n if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) return true;\n if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) return true;\n if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) return true;\n if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth - this.layerConfig.width < -1 + this.scrollMargin.right) return true;\n };\n\n this.pixelToScreenCoordinates = function (x, y) {\n var canvasPos;\n\n if (this.$hasCssTransforms) {\n canvasPos = {\n top: 0,\n left: 0\n };\n var p = this.$fontMetrics.transformCoordinates([x, y]);\n x = p[1] - this.gutterWidth - this.margin.left;\n y = p[0];\n } else {\n canvasPos = this.scroller.getBoundingClientRect();\n }\n\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset);\n return {\n row: row,\n column: col,\n side: offset - col > 0 ? 1 : -1,\n offsetX: offsetX\n };\n };\n\n this.screenToTextCoordinates = function (x, y) {\n var canvasPos;\n\n if (this.$hasCssTransforms) {\n canvasPos = {\n top: 0,\n left: 0\n };\n var p = this.$fontMetrics.transformCoordinates([x, y]);\n x = p[1] - this.gutterWidth - this.margin.left;\n y = p[0];\n } else {\n canvasPos = this.scroller.getBoundingClientRect();\n }\n\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset);\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX);\n };\n\n this.textToScreenCoordinates = function (row, column) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var pos = this.session.documentToScreenPosition(row, column);\n var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row) ? this.session.$bidiHandler.getPosLeft(pos.column) : Math.round(pos.column * this.characterWidth));\n var y = pos.row * this.lineHeight;\n return {\n pageX: canvasPos.left + x - this.scrollLeft,\n pageY: canvasPos.top + y - this.scrollTop\n };\n };\n\n this.visualizeFocus = function () {\n dom.addCssClass(this.container, \"ace_focus\");\n };\n\n this.visualizeBlur = function () {\n dom.removeCssClass(this.container, \"ace_focus\");\n };\n\n this.showComposition = function (composition) {\n this.$composition = composition;\n\n if (!composition.cssText) {\n composition.cssText = this.textarea.style.cssText;\n }\n\n composition.useTextareaForIME = this.$useTextareaForIME;\n\n if (this.$useTextareaForIME) {\n dom.addCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = \"\";\n this.$moveTextAreaToCursor();\n this.$cursorLayer.element.style.display = \"none\";\n } else {\n composition.markerId = this.session.addMarker(composition.markerRange, \"ace_composition_marker\", \"text\");\n }\n };\n\n this.setCompositionText = function (text) {\n var cursor = this.session.selection.cursor;\n this.addToken(text, \"composition_placeholder\", cursor.row, cursor.column);\n this.$moveTextAreaToCursor();\n };\n\n this.hideComposition = function () {\n if (!this.$composition) return;\n if (this.$composition.markerId) this.session.removeMarker(this.$composition.markerId);\n dom.removeCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = this.$composition.cssText;\n this.$composition = null;\n this.$cursorLayer.element.style.display = \"\";\n };\n\n this.addToken = function (text, type, row, column) {\n var session = this.session;\n session.bgTokenizer.lines[row] = null;\n var newToken = {\n type: type,\n value: text\n };\n var tokens = session.getTokens(row);\n\n if (column == null) {\n tokens.push(newToken);\n } else {\n var l = 0;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n l += token.value.length;\n\n if (column <= l) {\n var diff = token.value.length - (l - column);\n var before = token.value.slice(0, diff);\n var after = token.value.slice(diff);\n tokens.splice(i, 1, {\n type: token.type,\n value: before\n }, newToken, {\n type: token.type,\n value: after\n });\n break;\n }\n }\n }\n\n this.updateLines(row, row);\n };\n\n this.setTheme = function (theme, cb) {\n var _self = this;\n\n this.$themeId = theme;\n\n _self._dispatchEvent('themeChange', {\n theme: theme\n });\n\n if (!theme || typeof theme == \"string\") {\n var moduleName = theme || this.$options.theme.initialValue;\n config.loadModule([\"theme\", moduleName], afterLoad);\n } else {\n afterLoad(theme);\n }\n\n function afterLoad(module) {\n if (_self.$themeId != theme) return cb && cb();\n if (!module || !module.cssClass) throw new Error(\"couldn't load module \" + theme + \" or it didn't call define\");\n if (module.$id) _self.$themeId = module.$id;\n dom.importCssString(module.cssText, module.cssClass, _self.container);\n if (_self.theme) dom.removeCssClass(_self.container, _self.theme.cssClass);\n var padding = \"padding\" in module ? module.padding : \"padding\" in (_self.theme || {}) ? 4 : _self.$padding;\n if (_self.$padding && padding != _self.$padding) _self.setPadding(padding);\n _self.$theme = module.cssClass;\n _self.theme = module;\n dom.addCssClass(_self.container, module.cssClass);\n dom.setCssClass(_self.container, \"ace_dark\", module.isDark);\n\n if (_self.$size) {\n _self.$size.width = 0;\n\n _self.$updateSizeAsync();\n }\n\n _self._dispatchEvent('themeLoaded', {\n theme: module\n });\n\n cb && cb();\n }\n };\n\n this.getTheme = function () {\n return this.$themeId;\n };\n\n this.setStyle = function (style, include) {\n dom.setCssClass(this.container, style, include !== false);\n };\n\n this.unsetStyle = function (style) {\n dom.removeCssClass(this.container, style);\n };\n\n this.setCursorStyle = function (style) {\n dom.setStyle(this.scroller.style, \"cursor\", style);\n };\n\n this.setMouseCursor = function (cursorStyle) {\n dom.setStyle(this.scroller.style, \"cursor\", cursorStyle);\n };\n\n this.attachToShadowRoot = function () {\n dom.importCssString(editorCss, \"ace_editor.css\", this.container);\n };\n\n this.destroy = function () {\n this.freeze();\n this.$fontMetrics.destroy();\n this.$cursorLayer.destroy();\n };\n }).call(VirtualRenderer.prototype);\n config.defineOptions(VirtualRenderer.prototype, \"renderer\", {\n animatedScroll: {\n initialValue: false\n },\n showInvisibles: {\n set: function set(value) {\n if (this.$textLayer.setShowInvisibles(value)) this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: false\n },\n showPrintMargin: {\n set: function set() {\n this.$updatePrintMargin();\n },\n initialValue: true\n },\n printMarginColumn: {\n set: function set() {\n this.$updatePrintMargin();\n },\n initialValue: 80\n },\n printMargin: {\n set: function set(val) {\n if (typeof val == \"number\") this.$printMarginColumn = val;\n this.$showPrintMargin = !!val;\n this.$updatePrintMargin();\n },\n get: function get() {\n return this.$showPrintMargin && this.$printMarginColumn;\n }\n },\n showGutter: {\n set: function set(show) {\n this.$gutter.style.display = show ? \"block\" : \"none\";\n this.$loop.schedule(this.CHANGE_FULL);\n this.onGutterResize();\n },\n initialValue: true\n },\n fadeFoldWidgets: {\n set: function set(show) {\n dom.setCssClass(this.$gutter, \"ace_fade-fold-widgets\", show);\n },\n initialValue: false\n },\n showFoldWidgets: {\n set: function set(show) {\n this.$gutterLayer.setShowFoldWidgets(show);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n displayIndentGuides: {\n set: function set(show) {\n if (this.$textLayer.setDisplayIndentGuides(show)) this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: true\n },\n highlightGutterLine: {\n set: function set(shouldHighlight) {\n this.$gutterLayer.setHighlightGutterLine(shouldHighlight);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n hScrollBarAlwaysVisible: {\n set: function set(val) {\n if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n vScrollBarAlwaysVisible: {\n set: function set(val) {\n if (!this.$vScrollBarAlwaysVisible || !this.$vScroll) this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n fontSize: {\n set: function set(size) {\n if (typeof size == \"number\") size = size + \"px\";\n this.container.style.fontSize = size;\n this.updateFontSize();\n },\n initialValue: 12\n },\n fontFamily: {\n set: function set(name) {\n this.container.style.fontFamily = name;\n this.updateFontSize();\n }\n },\n maxLines: {\n set: function set(val) {\n this.updateFull();\n }\n },\n minLines: {\n set: function set(val) {\n if (!(this.$minLines < 0x1ffffffffffff)) this.$minLines = 0;\n this.updateFull();\n }\n },\n maxPixelHeight: {\n set: function set(val) {\n this.updateFull();\n },\n initialValue: 0\n },\n scrollPastEnd: {\n set: function set(val) {\n val = +val || 0;\n if (this.$scrollPastEnd == val) return;\n this.$scrollPastEnd = val;\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: 0,\n handlesSet: true\n },\n fixedWidthGutter: {\n set: function set(val) {\n this.$gutterLayer.$fixedWidth = !!val;\n this.$loop.schedule(this.CHANGE_GUTTER);\n }\n },\n theme: {\n set: function set(val) {\n this.setTheme(val);\n },\n get: function get() {\n return this.$themeId || this.theme;\n },\n initialValue: \"./theme/textmate\",\n handlesSet: true\n },\n hasCssTransforms: {},\n useTextareaForIME: {\n initialValue: !useragent.isMobile && !useragent.isIE\n }\n });\n exports.VirtualRenderer = VirtualRenderer;\n});\nace.define(\"ace/worker/worker_client\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/net\", \"ace/lib/event_emitter\", \"ace/config\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"../lib/oop\");\n\n var net = require(\"../lib/net\");\n\n var EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\n\n var config = require(\"../config\");\n\n function $workerBlob(workerUrl) {\n var script = \"importScripts('\" + net.qualifyURL(workerUrl) + \"');\";\n\n try {\n return new Blob([script], {\n \"type\": \"application/javascript\"\n });\n } catch (e) {\n // Backwards-compatibility\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;\n var blobBuilder = new BlobBuilder();\n blobBuilder.append(script);\n return blobBuilder.getBlob(\"application/javascript\");\n }\n }\n\n function createWorker(workerUrl) {\n if (typeof Worker == \"undefined\") return {\n postMessage: function postMessage() {},\n terminate: function terminate() {}\n };\n\n if (config.get(\"loadWorkerFromBlob\")) {\n var blob = $workerBlob(workerUrl);\n var URL = window.URL || window.webkitURL;\n var blobURL = URL.createObjectURL(blob);\n return new Worker(blobURL);\n }\n\n return new Worker(workerUrl);\n }\n\n var WorkerClient = function WorkerClient(worker) {\n if (!worker.postMessage) worker = this.$createWorkerFromOldConfig.apply(this, arguments);\n this.$worker = worker;\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.onMessage = this.onMessage.bind(this);\n this.callbackId = 1;\n this.callbacks = {};\n this.$worker.onmessage = this.onMessage;\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.$createWorkerFromOldConfig = function (topLevelNamespaces, mod, classname, workerUrl, importScripts) {\n if (require.nameToUrl && !require.toUrl) require.toUrl = require.nameToUrl;\n\n if (config.get(\"packaged\") || !require.toUrl) {\n workerUrl = workerUrl || config.moduleUrl(mod, \"worker\");\n } else {\n var normalizePath = this.$normalizePath;\n workerUrl = workerUrl || normalizePath(require.toUrl(\"ace/worker/worker.js\", null, \"_\"));\n var tlns = {};\n topLevelNamespaces.forEach(function (ns) {\n tlns[ns] = normalizePath(require.toUrl(ns, null, \"_\").replace(/(\\.js)?(\\?.*)?$/, \"\"));\n });\n }\n\n this.$worker = createWorker(workerUrl);\n\n if (importScripts) {\n this.send(\"importScripts\", importScripts);\n }\n\n this.$worker.postMessage({\n init: true,\n tlns: tlns,\n module: mod,\n classname: classname\n });\n return this.$worker;\n };\n\n this.onMessage = function (e) {\n var msg = e.data;\n\n switch (msg.type) {\n case \"event\":\n this._signal(msg.name, {\n data: msg.data\n });\n\n break;\n\n case \"call\":\n var callback = this.callbacks[msg.id];\n\n if (callback) {\n callback(msg.data);\n delete this.callbacks[msg.id];\n }\n\n break;\n\n case \"error\":\n this.reportError(msg.data);\n break;\n\n case \"log\":\n window.console && console.log && console.log.apply(console, msg.data);\n break;\n }\n };\n\n this.reportError = function (err) {\n window.console && console.error && console.error(err);\n };\n\n this.$normalizePath = function (path) {\n return net.qualifyURL(path);\n };\n\n this.terminate = function () {\n this._signal(\"terminate\", {});\n\n this.deltaQueue = null;\n this.$worker.terminate();\n this.$worker = null;\n if (this.$doc) this.$doc.off(\"change\", this.changeListener);\n this.$doc = null;\n };\n\n this.send = function (cmd, args) {\n this.$worker.postMessage({\n command: cmd,\n args: args\n });\n };\n\n this.call = function (cmd, args, callback) {\n if (callback) {\n var id = this.callbackId++;\n this.callbacks[id] = callback;\n args.push(id);\n }\n\n this.send(cmd, args);\n };\n\n this.emit = function (event, data) {\n try {\n if (data.data && data.data.err) data.data.err = {\n message: data.data.err.message,\n stack: data.data.err.stack,\n code: data.data.err.code\n };\n this.$worker.postMessage({\n event: event,\n data: {\n data: data.data\n }\n });\n } catch (ex) {\n console.error(ex.stack);\n }\n };\n\n this.attachToDocument = function (doc) {\n if (this.$doc) this.terminate();\n this.$doc = doc;\n this.call(\"setValue\", [doc.getValue()]);\n doc.on(\"change\", this.changeListener);\n };\n\n this.changeListener = function (delta) {\n if (!this.deltaQueue) {\n this.deltaQueue = [];\n setTimeout(this.$sendDeltaQueue, 0);\n }\n\n if (delta.action == \"insert\") this.deltaQueue.push(delta.start, delta.lines);else this.deltaQueue.push(delta.start, delta.end);\n };\n\n this.$sendDeltaQueue = function () {\n var q = this.deltaQueue;\n if (!q) return;\n this.deltaQueue = null;\n\n if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {\n this.call(\"setValue\", [this.$doc.getValue()]);\n } else this.emit(\"change\", {\n data: q\n });\n };\n }).call(WorkerClient.prototype);\n\n var UIWorkerClient = function UIWorkerClient(topLevelNamespaces, mod, classname) {\n var main = null;\n var emitSync = false;\n var sender = Object.create(EventEmitter);\n var messageBuffer = [];\n var workerClient = new WorkerClient({\n messageBuffer: messageBuffer,\n terminate: function terminate() {},\n postMessage: function postMessage(e) {\n messageBuffer.push(e);\n if (!main) return;\n if (emitSync) setTimeout(processNext);else processNext();\n }\n });\n\n workerClient.setEmitSync = function (val) {\n emitSync = val;\n };\n\n var processNext = function processNext() {\n var msg = messageBuffer.shift();\n if (msg.command) main[msg.command].apply(main, msg.args);else if (msg.event) sender._signal(msg.event, msg.data);\n };\n\n sender.postMessage = function (msg) {\n workerClient.onMessage({\n data: msg\n });\n };\n\n sender.callback = function (data, callbackId) {\n this.postMessage({\n type: \"call\",\n id: callbackId,\n data: data\n });\n };\n\n sender.emit = function (name, data) {\n this.postMessage({\n type: \"event\",\n name: name,\n data: data\n });\n };\n\n config.loadModule([\"worker\", mod], function (Main) {\n main = new Main[classname](sender);\n\n while (messageBuffer.length) {\n processNext();\n }\n });\n return workerClient;\n };\n\n exports.UIWorkerClient = UIWorkerClient;\n exports.WorkerClient = WorkerClient;\n exports.createWorker = createWorker;\n});\nace.define(\"ace/placeholder\", [\"require\", \"exports\", \"module\", \"ace/range\", \"ace/lib/event_emitter\", \"ace/lib/oop\"], function (require, exports, module) {\n \"use strict\";\n\n var Range = require(\"./range\").Range;\n\n var EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\n var oop = require(\"./lib/oop\");\n\n var PlaceHolder = function PlaceHolder(session, length, pos, others, mainClass, othersClass) {\n var _self = this;\n\n this.length = length;\n this.session = session;\n this.doc = session.getDocument();\n this.mainClass = mainClass;\n this.othersClass = othersClass;\n this.$onUpdate = this.onUpdate.bind(this);\n this.doc.on(\"change\", this.$onUpdate);\n this.$others = others;\n\n this.$onCursorChange = function () {\n setTimeout(function () {\n _self.onCursorChange();\n });\n };\n\n this.$pos = pos;\n var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {\n length: -1\n };\n this.$undoStackDepth = undoStack.length;\n this.setup();\n session.selection.on(\"changeCursor\", this.$onCursorChange);\n };\n\n (function () {\n oop.implement(this, EventEmitter);\n\n this.setup = function () {\n var _self = this;\n\n var doc = this.doc;\n var session = this.session;\n this.selectionBefore = session.selection.toJSON();\n if (session.selection.inMultiSelectMode) session.selection.toSingleRange();\n this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);\n var pos = this.pos;\n pos.$insertRight = true;\n pos.detach();\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);\n this.others = [];\n this.$others.forEach(function (other) {\n var anchor = doc.createAnchor(other.row, other.column);\n anchor.$insertRight = true;\n anchor.detach();\n\n _self.others.push(anchor);\n });\n session.setUndoSelect(false);\n };\n\n this.showOtherMarkers = function () {\n if (this.othersActive) return;\n var session = this.session;\n\n var _self = this;\n\n this.othersActive = true;\n this.others.forEach(function (anchor) {\n anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column + _self.length), _self.othersClass, null, false);\n });\n };\n\n this.hideOtherMarkers = function () {\n if (!this.othersActive) return;\n this.othersActive = false;\n\n for (var i = 0; i < this.others.length; i++) {\n this.session.removeMarker(this.others[i].markerId);\n }\n };\n\n this.onUpdate = function (delta) {\n if (this.$updating) return this.updateAnchors(delta);\n var range = delta;\n if (range.start.row !== range.end.row) return;\n if (range.start.row !== this.pos.row) return;\n this.$updating = true;\n var lengthDiff = delta.action === \"insert\" ? range.end.column - range.start.column : range.start.column - range.end.column;\n var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;\n var distanceFromStart = range.start.column - this.pos.column;\n this.updateAnchors(delta);\n if (inMainRange) this.length += lengthDiff;\n\n if (inMainRange && !this.session.$fromUndo) {\n if (delta.action === 'insert') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {\n row: otherPos.row,\n column: otherPos.column + distanceFromStart\n };\n this.doc.insertMergedLines(newPos, delta.lines);\n }\n } else if (delta.action === 'remove') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {\n row: otherPos.row,\n column: otherPos.column + distanceFromStart\n };\n this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));\n }\n }\n }\n\n this.$updating = false;\n this.updateMarkers();\n };\n\n this.updateAnchors = function (delta) {\n this.pos.onChange(delta);\n\n for (var i = this.others.length; i--;) {\n this.others[i].onChange(delta);\n }\n\n this.updateMarkers();\n };\n\n this.updateMarkers = function () {\n if (this.$updating) return;\n\n var _self = this;\n\n var session = this.session;\n\n var updateMarker = function updateMarker(pos, className) {\n session.removeMarker(pos.markerId);\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + _self.length), className, null, false);\n };\n\n updateMarker(this.pos, this.mainClass);\n\n for (var i = this.others.length; i--;) {\n updateMarker(this.others[i], this.othersClass);\n }\n };\n\n this.onCursorChange = function (event) {\n if (this.$updating || !this.session) return;\n var pos = this.session.selection.getCursor();\n\n if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {\n this.showOtherMarkers();\n\n this._emit(\"cursorEnter\", event);\n } else {\n this.hideOtherMarkers();\n\n this._emit(\"cursorLeave\", event);\n }\n };\n\n this.detach = function () {\n this.session.removeMarker(this.pos && this.pos.markerId);\n this.hideOtherMarkers();\n this.doc.removeEventListener(\"change\", this.$onUpdate);\n this.session.selection.removeEventListener(\"changeCursor\", this.$onCursorChange);\n this.session.setUndoSelect(true);\n this.session = null;\n };\n\n this.cancel = function () {\n if (this.$undoStackDepth === -1) return;\n var undoManager = this.session.getUndoManager();\n var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;\n\n for (var i = 0; i < undosRequired; i++) {\n undoManager.undo(this.session, true);\n }\n\n if (this.selectionBefore) this.session.selection.fromJSON(this.selectionBefore);\n };\n }).call(PlaceHolder.prototype);\n exports.PlaceHolder = PlaceHolder;\n});\nace.define(\"ace/mouse/multi_select_handler\", [\"require\", \"exports\", \"module\", \"ace/lib/event\", \"ace/lib/useragent\"], function (require, exports, module) {\n var event = require(\"../lib/event\");\n\n var useragent = require(\"../lib/useragent\");\n\n function isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n }\n\n function onMouseDown(e) {\n var ev = e.domEvent;\n var alt = ev.altKey;\n var shift = ev.shiftKey;\n var ctrl = ev.ctrlKey;\n var accel = e.getAccelKey();\n var button = e.getButton();\n if (ctrl && useragent.isMac) button = ev.button;\n\n if (e.editor.inMultiSelectMode && button == 2) {\n e.editor.textInput.onContextMenu(e.domEvent);\n return;\n }\n\n if (!ctrl && !alt && !accel) {\n if (button === 0 && e.editor.inMultiSelectMode) e.editor.exitMultiSelectMode();\n return;\n }\n\n if (button !== 0) return;\n var editor = e.editor;\n var selection = editor.selection;\n var isMultiSelect = editor.inMultiSelectMode;\n var pos = e.getDocumentPosition();\n var cursor = selection.getCursor();\n var inSelection = e.inSelection() || selection.isEmpty() && isSamePoint(pos, cursor);\n var mouseX = e.x,\n mouseY = e.y;\n\n var onMouseSelection = function onMouseSelection(e) {\n mouseX = e.clientX;\n mouseY = e.clientY;\n };\n\n var session = editor.session;\n var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var screenCursor = screenAnchor;\n var selectionMode;\n\n if (editor.$mouseHandler.$enableJumpToDef) {\n if (ctrl && alt || accel && alt) selectionMode = shift ? \"block\" : \"add\";else if (alt && editor.$blockSelectEnabled) selectionMode = \"block\";\n } else {\n if (accel && !alt) {\n selectionMode = \"add\";\n if (!isMultiSelect && shift) return;\n } else if (alt && editor.$blockSelectEnabled) {\n selectionMode = \"block\";\n }\n }\n\n if (selectionMode && useragent.isMac && ev.ctrlKey) {\n editor.$mouseHandler.cancelContextMenu();\n }\n\n if (selectionMode == \"add\") {\n if (!isMultiSelect && inSelection) return; // dragging\n\n if (!isMultiSelect) {\n var range = selection.toOrientedRange();\n editor.addSelectionMarker(range);\n }\n\n var oldRange = selection.rangeList.rangeAtPoint(pos);\n editor.inVirtualSelectionMode = true;\n\n if (shift) {\n oldRange = null;\n range = selection.ranges[0] || range;\n editor.removeSelectionMarker(range);\n }\n\n editor.once(\"mouseup\", function () {\n var tmpSel = selection.toOrientedRange();\n if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor)) selection.substractPoint(tmpSel.cursor);else {\n if (shift) {\n selection.substractPoint(range.cursor);\n } else if (range) {\n editor.removeSelectionMarker(range);\n selection.addRange(range);\n }\n\n selection.addRange(tmpSel);\n }\n editor.inVirtualSelectionMode = false;\n });\n } else if (selectionMode == \"block\") {\n e.stop();\n editor.inVirtualSelectionMode = true;\n var initialRange;\n var rectSel = [];\n\n var blockSelect = function blockSelect() {\n var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX);\n if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) return;\n screenCursor = newCursor;\n editor.selection.moveToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n editor.removeSelectionMarkers(rectSel);\n rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);\n if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty()) rectSel[0] = editor.$mouseHandler.$clickSelection.clone();\n rectSel.forEach(editor.addSelectionMarker, editor);\n editor.updateSelectionMarkers();\n };\n\n if (isMultiSelect && !accel) {\n selection.toSingleRange();\n } else if (!isMultiSelect && accel) {\n initialRange = selection.toOrientedRange();\n editor.addSelectionMarker(initialRange);\n }\n\n if (shift) screenAnchor = session.documentToScreenPosition(selection.lead);else selection.moveToPosition(pos);\n screenCursor = {\n row: -1,\n column: -1\n };\n\n var onMouseSelectionEnd = function onMouseSelectionEnd(e) {\n blockSelect();\n clearInterval(timerId);\n editor.removeSelectionMarkers(rectSel);\n if (!rectSel.length) rectSel = [selection.toOrientedRange()];\n\n if (initialRange) {\n editor.removeSelectionMarker(initialRange);\n selection.toSingleRange(initialRange);\n }\n\n for (var i = 0; i < rectSel.length; i++) {\n selection.addRange(rectSel[i]);\n }\n\n editor.inVirtualSelectionMode = false;\n editor.$mouseHandler.$clickSelection = null;\n };\n\n var onSelectionInterval = blockSelect;\n event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);\n var timerId = setInterval(function () {\n onSelectionInterval();\n }, 20);\n return e.preventDefault();\n }\n }\n\n exports.onMouseDown = onMouseDown;\n});\nace.define(\"ace/commands/multi_select_commands\", [\"require\", \"exports\", \"module\", \"ace/keyboard/hash_handler\"], function (require, exports, module) {\n exports.defaultCommands = [{\n name: \"addCursorAbove\",\n description: \"Add cursor above\",\n exec: function exec(editor) {\n editor.selectMoreLines(-1);\n },\n bindKey: {\n win: \"Ctrl-Alt-Up\",\n mac: \"Ctrl-Alt-Up\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorBelow\",\n description: \"Add cursor below\",\n exec: function exec(editor) {\n editor.selectMoreLines(1);\n },\n bindKey: {\n win: \"Ctrl-Alt-Down\",\n mac: \"Ctrl-Alt-Down\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorAboveSkipCurrent\",\n description: \"Add cursor above (skip current)\",\n exec: function exec(editor) {\n editor.selectMoreLines(-1, true);\n },\n bindKey: {\n win: \"Ctrl-Alt-Shift-Up\",\n mac: \"Ctrl-Alt-Shift-Up\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorBelowSkipCurrent\",\n description: \"Add cursor below (skip current)\",\n exec: function exec(editor) {\n editor.selectMoreLines(1, true);\n },\n bindKey: {\n win: \"Ctrl-Alt-Shift-Down\",\n mac: \"Ctrl-Alt-Shift-Down\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectMoreBefore\",\n description: \"Select more before\",\n exec: function exec(editor) {\n editor.selectMore(-1);\n },\n bindKey: {\n win: \"Ctrl-Alt-Left\",\n mac: \"Ctrl-Alt-Left\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectMoreAfter\",\n description: \"Select more after\",\n exec: function exec(editor) {\n editor.selectMore(1);\n },\n bindKey: {\n win: \"Ctrl-Alt-Right\",\n mac: \"Ctrl-Alt-Right\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectNextBefore\",\n description: \"Select next before\",\n exec: function exec(editor) {\n editor.selectMore(-1, true);\n },\n bindKey: {\n win: \"Ctrl-Alt-Shift-Left\",\n mac: \"Ctrl-Alt-Shift-Left\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectNextAfter\",\n description: \"Select next after\",\n exec: function exec(editor) {\n editor.selectMore(1, true);\n },\n bindKey: {\n win: \"Ctrl-Alt-Shift-Right\",\n mac: \"Ctrl-Alt-Shift-Right\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"splitIntoLines\",\n description: \"Split into lines\",\n exec: function exec(editor) {\n editor.multiSelect.splitIntoLines();\n },\n bindKey: {\n win: \"Ctrl-Alt-L\",\n mac: \"Ctrl-Alt-L\"\n },\n readOnly: true\n }, {\n name: \"alignCursors\",\n description: \"Align cursors\",\n exec: function exec(editor) {\n editor.alignCursors();\n },\n bindKey: {\n win: \"Ctrl-Alt-A\",\n mac: \"Ctrl-Alt-A\"\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"findAll\",\n description: \"Find all\",\n exec: function exec(editor) {\n editor.findAll();\n },\n bindKey: {\n win: \"Ctrl-Alt-K\",\n mac: \"Ctrl-Alt-G\"\n },\n scrollIntoView: \"cursor\",\n readOnly: true\n }];\n exports.multiSelectCommands = [{\n name: \"singleSelection\",\n description: \"Single selection\",\n bindKey: \"esc\",\n exec: function exec(editor) {\n editor.exitMultiSelectMode();\n },\n scrollIntoView: \"cursor\",\n readOnly: true,\n isAvailable: function isAvailable(editor) {\n return editor && editor.inMultiSelectMode;\n }\n }];\n\n var HashHandler = require(\"../keyboard/hash_handler\").HashHandler;\n\n exports.keyboardHandler = new HashHandler(exports.multiSelectCommands);\n});\nace.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 (require, exports, module) {\n var RangeList = require(\"./range_list\").RangeList;\n\n var Range = require(\"./range\").Range;\n\n var Selection = require(\"./selection\").Selection;\n\n var onMouseDown = require(\"./mouse/multi_select_handler\").onMouseDown;\n\n var event = require(\"./lib/event\");\n\n var lang = require(\"./lib/lang\");\n\n var commands = require(\"./commands/multi_select_commands\");\n\n exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);\n\n var Search = require(\"./search\").Search;\n\n var search = new Search();\n\n function find(session, needle, dir) {\n search.$options.wrap = true;\n search.$options.needle = needle;\n search.$options.backwards = dir == -1;\n return search.find(session);\n }\n\n var EditSession = require(\"./edit_session\").EditSession;\n\n (function () {\n this.getSelectionMarkers = function () {\n return this.$selectionMarkers;\n };\n }).call(EditSession.prototype);\n (function () {\n this.ranges = null;\n this.rangeList = null;\n\n this.addRange = function (range, $blockChangeEvents) {\n if (!range) return;\n\n if (!this.inMultiSelectMode && this.rangeCount === 0) {\n var oldRange = this.toOrientedRange();\n this.rangeList.add(oldRange);\n this.rangeList.add(range);\n\n if (this.rangeList.ranges.length != 2) {\n this.rangeList.removeAll();\n return $blockChangeEvents || this.fromOrientedRange(range);\n }\n\n this.rangeList.removeAll();\n this.rangeList.add(oldRange);\n this.$onAddRange(oldRange);\n }\n\n if (!range.cursor) range.cursor = range.end;\n var removed = this.rangeList.add(range);\n this.$onAddRange(range);\n if (removed.length) this.$onRemoveRange(removed);\n\n if (this.rangeCount > 1 && !this.inMultiSelectMode) {\n this._signal(\"multiSelect\");\n\n this.inMultiSelectMode = true;\n this.session.$undoSelect = false;\n this.rangeList.attach(this.session);\n }\n\n return $blockChangeEvents || this.fromOrientedRange(range);\n };\n\n this.toSingleRange = function (range) {\n range = range || this.ranges[0];\n var removed = this.rangeList.removeAll();\n if (removed.length) this.$onRemoveRange(removed);\n range && this.fromOrientedRange(range);\n };\n\n this.substractPoint = function (pos) {\n var removed = this.rangeList.substractPoint(pos);\n\n if (removed) {\n this.$onRemoveRange(removed);\n return removed[0];\n }\n };\n\n this.mergeOverlappingRanges = function () {\n var removed = this.rangeList.merge();\n if (removed.length) this.$onRemoveRange(removed);\n };\n\n this.$onAddRange = function (range) {\n this.rangeCount = this.rangeList.ranges.length;\n this.ranges.unshift(range);\n\n this._signal(\"addRange\", {\n range: range\n });\n };\n\n this.$onRemoveRange = function (removed) {\n this.rangeCount = this.rangeList.ranges.length;\n\n if (this.rangeCount == 1 && this.inMultiSelectMode) {\n var lastRange = this.rangeList.ranges.pop();\n removed.push(lastRange);\n this.rangeCount = 0;\n }\n\n for (var i = removed.length; i--;) {\n var index = this.ranges.indexOf(removed[i]);\n this.ranges.splice(index, 1);\n }\n\n this._signal(\"removeRange\", {\n ranges: removed\n });\n\n if (this.rangeCount === 0 && this.inMultiSelectMode) {\n this.inMultiSelectMode = false;\n\n this._signal(\"singleSelect\");\n\n this.session.$undoSelect = true;\n this.rangeList.detach(this.session);\n }\n\n lastRange = lastRange || this.ranges[0];\n if (lastRange && !lastRange.isEqual(this.getRange())) this.fromOrientedRange(lastRange);\n };\n\n this.$initRangeList = function () {\n if (this.rangeList) return;\n this.rangeList = new RangeList();\n this.ranges = [];\n this.rangeCount = 0;\n };\n\n this.getAllRanges = function () {\n return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];\n };\n\n this.splitIntoLines = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var range = this.getRange();\n var isBackwards = this.isBackwards();\n var startRow = range.start.row;\n var endRow = range.end.row;\n\n if (startRow == endRow) {\n if (isBackwards) var start = range.end,\n end = range.start;else var start = range.start,\n end = range.end;\n this.addRange(Range.fromPoints(end, end));\n this.addRange(Range.fromPoints(start, start));\n return;\n }\n\n var rectSel = [];\n var r = this.getLineRange(startRow, true);\n r.start.column = range.start.column;\n rectSel.push(r);\n\n for (var i = startRow + 1; i < endRow; i++) {\n rectSel.push(this.getLineRange(i, true));\n }\n\n r = this.getLineRange(endRow, true);\n r.end.column = range.end.column;\n rectSel.push(r);\n rectSel.forEach(this.addRange, this);\n }\n };\n\n this.toggleBlockSelection = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var cursor = this.session.documentToScreenPosition(this.cursor);\n var anchor = this.session.documentToScreenPosition(this.anchor);\n var rectSel = this.rectangularRangeBlock(cursor, anchor);\n rectSel.forEach(this.addRange, this);\n }\n };\n\n this.rectangularRangeBlock = function (screenCursor, screenAnchor, includeEmptyLines) {\n var rectSel = [];\n var xBackwards = screenCursor.column < screenAnchor.column;\n\n if (xBackwards) {\n var startColumn = screenCursor.column;\n var endColumn = screenAnchor.column;\n var startOffsetX = screenCursor.offsetX;\n var endOffsetX = screenAnchor.offsetX;\n } else {\n var startColumn = screenAnchor.column;\n var endColumn = screenCursor.column;\n var startOffsetX = screenAnchor.offsetX;\n var endOffsetX = screenCursor.offsetX;\n }\n\n var yBackwards = screenCursor.row < screenAnchor.row;\n\n if (yBackwards) {\n var startRow = screenCursor.row;\n var endRow = screenAnchor.row;\n } else {\n var startRow = screenAnchor.row;\n var endRow = screenCursor.row;\n }\n\n if (startColumn < 0) startColumn = 0;\n if (startRow < 0) startRow = 0;\n if (startRow == endRow) includeEmptyLines = true;\n var docEnd;\n\n for (var row = startRow; row <= endRow; row++) {\n var range = Range.fromPoints(this.session.screenToDocumentPosition(row, startColumn, startOffsetX), this.session.screenToDocumentPosition(row, endColumn, endOffsetX));\n\n if (range.isEmpty()) {\n if (docEnd && isSamePoint(range.end, docEnd)) break;\n docEnd = range.end;\n }\n\n range.cursor = xBackwards ? range.start : range.end;\n rectSel.push(range);\n }\n\n if (yBackwards) rectSel.reverse();\n\n if (!includeEmptyLines) {\n var end = rectSel.length - 1;\n\n while (rectSel[end].isEmpty() && end > 0) {\n end--;\n }\n\n if (end > 0) {\n var start = 0;\n\n while (rectSel[start].isEmpty()) {\n start++;\n }\n }\n\n for (var i = end; i >= start; i--) {\n if (rectSel[i].isEmpty()) rectSel.splice(i, 1);\n }\n }\n\n return rectSel;\n };\n }).call(Selection.prototype);\n\n var Editor = require(\"./editor\").Editor;\n\n (function () {\n this.updateSelectionMarkers = function () {\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.addSelectionMarker = function (orientedRange) {\n if (!orientedRange.cursor) orientedRange.cursor = orientedRange.end;\n var style = this.getSelectionStyle();\n orientedRange.marker = this.session.addMarker(orientedRange, \"ace_selection\", style);\n this.session.$selectionMarkers.push(orientedRange);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n return orientedRange;\n };\n\n this.removeSelectionMarker = function (range) {\n if (!range.marker) return;\n this.session.removeMarker(range.marker);\n var index = this.session.$selectionMarkers.indexOf(range);\n if (index != -1) this.session.$selectionMarkers.splice(index, 1);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n };\n\n this.removeSelectionMarkers = function (ranges) {\n var markerList = this.session.$selectionMarkers;\n\n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.marker) continue;\n this.session.removeMarker(range.marker);\n var index = markerList.indexOf(range);\n if (index != -1) markerList.splice(index, 1);\n }\n\n this.session.selectionMarkerCount = markerList.length;\n };\n\n this.$onAddRange = function (e) {\n this.addSelectionMarker(e.range);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onRemoveRange = function (e) {\n this.removeSelectionMarkers(e.ranges);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onMultiSelect = function (e) {\n if (this.inMultiSelectMode) return;\n this.inMultiSelectMode = true;\n this.setStyle(\"ace_multiselect\");\n this.keyBinding.addKeyboardHandler(commands.keyboardHandler);\n this.commands.setDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onSingleSelect = function (e) {\n if (this.session.multiSelect.inVirtualMode) return;\n this.inMultiSelectMode = false;\n this.unsetStyle(\"ace_multiselect\");\n this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);\n this.commands.removeDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n\n this._emit(\"changeSelection\");\n };\n\n this.$onMultiSelectExec = function (e) {\n var command = e.command;\n var editor = e.editor;\n if (!editor.multiSelect) return;\n\n if (!command.multiSelectAction) {\n var result = command.exec(editor, e.args || {});\n editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());\n editor.multiSelect.mergeOverlappingRanges();\n } else if (command.multiSelectAction == \"forEach\") {\n result = editor.forEachSelection(command, e.args);\n } else if (command.multiSelectAction == \"forEachLine\") {\n result = editor.forEachSelection(command, e.args, true);\n } else if (command.multiSelectAction == \"single\") {\n editor.exitMultiSelectMode();\n result = command.exec(editor, e.args || {});\n } else {\n result = command.multiSelectAction(editor, e.args || {});\n }\n\n return result;\n };\n\n this.forEachSelection = function (cmd, args, options) {\n if (this.inVirtualSelectionMode) return;\n var keepOrder = options && options.keepOrder;\n var $byLines = options == true || options && options.$byLines;\n var session = this.session;\n var selection = this.selection;\n var rangeList = selection.rangeList;\n var ranges = (keepOrder ? selection : rangeList).ranges;\n var result;\n if (!ranges.length) return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n var reg = selection._eventRegistry;\n selection._eventRegistry = {};\n var tmpSel = new Selection(session);\n this.inVirtualSelectionMode = true;\n\n for (var i = ranges.length; i--;) {\n if ($byLines) {\n while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) {\n i--;\n }\n }\n\n tmpSel.fromOrientedRange(ranges[i]);\n tmpSel.index = i;\n this.selection = session.selection = tmpSel;\n var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n if (!result && cmdResult !== undefined) result = cmdResult;\n tmpSel.toOrientedRange(ranges[i]);\n }\n\n tmpSel.detach();\n this.selection = session.selection = selection;\n this.inVirtualSelectionMode = false;\n selection._eventRegistry = reg;\n selection.mergeOverlappingRanges();\n if (selection.ranges[0]) selection.fromOrientedRange(selection.ranges[0]);\n var anim = this.renderer.$scrollAnimation;\n this.onCursorChange();\n this.onSelectionChange();\n if (anim && anim.from == anim.to) this.renderer.animateScrolling(anim.from);\n return result;\n };\n\n this.exitMultiSelectMode = function () {\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode) return;\n this.multiSelect.toSingleRange();\n };\n\n this.getSelectedText = function () {\n var text = \"\";\n\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var ranges = this.multiSelect.rangeList.ranges;\n var buf = [];\n\n for (var i = 0; i < ranges.length; i++) {\n buf.push(this.session.getTextRange(ranges[i]));\n }\n\n var nl = this.session.getDocument().getNewLineCharacter();\n text = buf.join(nl);\n if (text.length == (buf.length - 1) * nl.length) text = \"\";\n } else if (!this.selection.isEmpty()) {\n text = this.session.getTextRange(this.getSelectionRange());\n }\n\n return text;\n };\n\n this.$checkMultiselectChange = function (e, anchor) {\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var range = this.multiSelect.ranges[0];\n if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor) return;\n var pos = anchor == this.multiSelect.anchor ? range.cursor == range.start ? range.end : range.start : range.cursor;\n if (pos.row != anchor.row || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());else this.multiSelect.mergeOverlappingRanges();\n }\n };\n\n this.findAll = function (needle, options, additive) {\n options = options || {};\n options.needle = needle || options.needle;\n\n if (options.needle == undefined) {\n var range = this.selection.isEmpty() ? this.selection.getWordRange() : this.selection.getRange();\n options.needle = this.session.getTextRange(range);\n }\n\n this.$search.set(options);\n var ranges = this.$search.findAll(this.session);\n if (!ranges.length) return 0;\n var selection = this.multiSelect;\n if (!additive) selection.toSingleRange(ranges[0]);\n\n for (var i = ranges.length; i--;) {\n selection.addRange(ranges[i], true);\n }\n\n if (range && selection.rangeList.rangeAtPoint(range.start)) selection.addRange(range, true);\n return ranges.length;\n };\n\n this.selectMoreLines = function (dir, skip) {\n var range = this.selection.toOrientedRange();\n var isBackwards = range.cursor == range.end;\n var screenLead = this.session.documentToScreenPosition(range.cursor);\n if (this.selection.$desiredColumn) screenLead.column = this.selection.$desiredColumn;\n var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);\n\n if (!range.isEmpty()) {\n var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);\n var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);\n } else {\n var anchor = lead;\n }\n\n if (isBackwards) {\n var newRange = Range.fromPoints(lead, anchor);\n newRange.cursor = newRange.start;\n } else {\n var newRange = Range.fromPoints(anchor, lead);\n newRange.cursor = newRange.end;\n }\n\n newRange.desiredColumn = screenLead.column;\n\n if (!this.selection.inMultiSelectMode) {\n this.selection.addRange(range);\n } else {\n if (skip) var toRemove = range.cursor;\n }\n\n this.selection.addRange(newRange);\n if (toRemove) this.selection.substractPoint(toRemove);\n };\n\n this.transposeSelections = function (dir) {\n var session = this.session;\n var sel = session.multiSelect;\n var all = sel.ranges;\n\n for (var i = all.length; i--;) {\n var range = all[i];\n\n if (range.isEmpty()) {\n var tmp = session.getWordRange(range.start.row, range.start.column);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n range.end.row = tmp.end.row;\n range.end.column = tmp.end.column;\n }\n }\n\n sel.mergeOverlappingRanges();\n var words = [];\n\n for (var i = all.length; i--;) {\n var range = all[i];\n words.unshift(session.getTextRange(range));\n }\n\n if (dir < 0) words.unshift(words.pop());else words.push(words.shift());\n\n for (var i = all.length; i--;) {\n var range = all[i];\n var tmp = range.clone();\n session.replace(range, words[i]);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n }\n\n sel.fromOrientedRange(sel.ranges[0]);\n };\n\n this.selectMore = function (dir, skip, stopAtFirst) {\n var session = this.session;\n var sel = session.multiSelect;\n var range = sel.toOrientedRange();\n\n if (range.isEmpty()) {\n range = session.getWordRange(range.start.row, range.start.column);\n range.cursor = dir == -1 ? range.start : range.end;\n this.multiSelect.addRange(range);\n if (stopAtFirst) return;\n }\n\n var needle = session.getTextRange(range);\n var newRange = find(session, needle, dir);\n\n if (newRange) {\n newRange.cursor = dir == -1 ? newRange.start : newRange.end;\n this.session.unfold(newRange);\n this.multiSelect.addRange(newRange);\n this.renderer.scrollCursorIntoView(null, 0.5);\n }\n\n if (skip) this.multiSelect.substractPoint(range.cursor);\n };\n\n this.alignCursors = function () {\n var session = this.session;\n var sel = session.multiSelect;\n var ranges = sel.ranges;\n var row = -1;\n var sameRowRanges = ranges.filter(function (r) {\n if (r.cursor.row == row) return true;\n row = r.cursor.row;\n });\n\n if (!ranges.length || sameRowRanges.length == ranges.length - 1) {\n var range = this.selection.getRange();\n var fr = range.start.row,\n lr = range.end.row;\n var guessRange = fr == lr;\n\n if (guessRange) {\n var max = this.session.getLength();\n var line;\n\n do {\n line = this.session.getLine(lr);\n } while (/[=:]/.test(line) && ++lr < max);\n\n do {\n line = this.session.getLine(fr);\n } while (/[=:]/.test(line) && --fr > 0);\n\n if (fr < 0) fr = 0;\n if (lr >= max) lr = max - 1;\n }\n\n var lines = this.session.removeFullLines(fr, lr);\n lines = this.$reAlignText(lines, guessRange);\n this.session.insert({\n row: fr,\n column: 0\n }, lines.join(\"\\n\") + \"\\n\");\n\n if (!guessRange) {\n range.start.column = 0;\n range.end.column = lines[lines.length - 1].length;\n }\n\n this.selection.setRange(range);\n } else {\n sameRowRanges.forEach(function (r) {\n sel.substractPoint(r.cursor);\n });\n var maxCol = 0;\n var minSpace = Infinity;\n var spaceOffsets = ranges.map(function (r) {\n var p = r.cursor;\n var line = session.getLine(p.row);\n var spaceOffset = line.substr(p.column).search(/\\S/g);\n if (spaceOffset == -1) spaceOffset = 0;\n if (p.column > maxCol) maxCol = p.column;\n if (spaceOffset < minSpace) minSpace = spaceOffset;\n return spaceOffset;\n });\n ranges.forEach(function (r, i) {\n var p = r.cursor;\n var l = maxCol - p.column;\n var d = spaceOffsets[i] - minSpace;\n if (l > d) session.insert(p, lang.stringRepeat(\" \", l - d));else session.remove(new Range(p.row, p.column, p.row, p.column - l + d));\n r.start.column = r.end.column = maxCol;\n r.start.row = r.end.row = p.row;\n r.cursor = r.end;\n });\n sel.fromOrientedRange(ranges[0]);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n }\n };\n\n this.$reAlignText = function (lines, forceLeft) {\n var isLeftAligned = true,\n isRightAligned = true;\n var startW, textW, endW;\n return lines.map(function (line) {\n var m = line.match(/(\\s*)(.*?)(\\s*)([=:].*)/);\n if (!m) return [line];\n\n if (startW == null) {\n startW = m[1].length;\n textW = m[2].length;\n endW = m[3].length;\n return m;\n }\n\n if (startW + textW + endW != m[1].length + m[2].length + m[3].length) isRightAligned = false;\n if (startW != m[1].length) isLeftAligned = false;\n if (startW > m[1].length) startW = m[1].length;\n if (textW < m[2].length) textW = m[2].length;\n if (endW > m[3].length) endW = m[3].length;\n return m;\n }).map(forceLeft ? alignLeft : isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);\n\n function spaces(n) {\n return lang.stringRepeat(\" \", n);\n }\n\n function alignLeft(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(textW - m[2].length + endW) + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n\n function alignRight(m) {\n return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] + spaces(endW) + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n\n function unAlign(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(endW) + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n };\n }).call(Editor.prototype);\n\n function isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n }\n\n exports.onSessionChange = function (e) {\n var session = e.session;\n\n if (session && !session.multiSelect) {\n session.$selectionMarkers = [];\n session.selection.$initRangeList();\n session.multiSelect = session.selection;\n }\n\n this.multiSelect = session && session.multiSelect;\n var oldSession = e.oldSession;\n\n if (oldSession) {\n oldSession.multiSelect.off(\"addRange\", this.$onAddRange);\n oldSession.multiSelect.off(\"removeRange\", this.$onRemoveRange);\n oldSession.multiSelect.off(\"multiSelect\", this.$onMultiSelect);\n oldSession.multiSelect.off(\"singleSelect\", this.$onSingleSelect);\n oldSession.multiSelect.lead.off(\"change\", this.$checkMultiselectChange);\n oldSession.multiSelect.anchor.off(\"change\", this.$checkMultiselectChange);\n }\n\n if (session) {\n session.multiSelect.on(\"addRange\", this.$onAddRange);\n session.multiSelect.on(\"removeRange\", this.$onRemoveRange);\n session.multiSelect.on(\"multiSelect\", this.$onMultiSelect);\n session.multiSelect.on(\"singleSelect\", this.$onSingleSelect);\n session.multiSelect.lead.on(\"change\", this.$checkMultiselectChange);\n session.multiSelect.anchor.on(\"change\", this.$checkMultiselectChange);\n }\n\n if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {\n if (session.selection.inMultiSelectMode) this.$onMultiSelect();else this.$onSingleSelect();\n }\n };\n\n function MultiSelect(editor) {\n if (editor.$multiselectOnSessionChange) return;\n editor.$onAddRange = editor.$onAddRange.bind(editor);\n editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);\n editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);\n editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);\n editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);\n editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);\n editor.$multiselectOnSessionChange(editor);\n editor.on(\"changeSession\", editor.$multiselectOnSessionChange);\n editor.on(\"mousedown\", onMouseDown);\n editor.commands.addCommands(commands.defaultCommands);\n addAltCursorListeners(editor);\n }\n\n function addAltCursorListeners(editor) {\n if (!editor.textInput) return;\n var el = editor.textInput.getElement();\n var altCursor = false;\n event.addListener(el, \"keydown\", function (e) {\n var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);\n\n if (editor.$blockSelectEnabled && altDown) {\n if (!altCursor) {\n editor.renderer.setMouseCursor(\"crosshair\");\n altCursor = true;\n }\n } else if (altCursor) {\n reset();\n }\n });\n event.addListener(el, \"keyup\", reset);\n event.addListener(el, \"blur\", reset);\n\n function reset(e) {\n if (altCursor) {\n editor.renderer.setMouseCursor(\"\");\n altCursor = false;\n }\n }\n }\n\n exports.MultiSelect = MultiSelect;\n\n require(\"./config\").defineOptions(Editor.prototype, \"editor\", {\n enableMultiselect: {\n set: function set(val) {\n MultiSelect(this);\n\n if (val) {\n this.on(\"changeSession\", this.$multiselectOnSessionChange);\n this.on(\"mousedown\", onMouseDown);\n } else {\n this.off(\"changeSession\", this.$multiselectOnSessionChange);\n this.off(\"mousedown\", onMouseDown);\n }\n },\n value: true\n },\n enableBlockSelect: {\n set: function set(val) {\n this.$blockSelectEnabled = val;\n },\n value: true\n }\n });\n});\nace.define(\"ace/mode/folding/fold_mode\", [\"require\", \"exports\", \"module\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var Range = require(\"../../range\").Range;\n\n var FoldMode = exports.FoldMode = function () {};\n\n (function () {\n this.foldingStartMarker = null;\n this.foldingStopMarker = null;\n\n this.getFoldWidget = function (session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.foldingStartMarker.test(line)) return \"start\";\n if (foldStyle == \"markbeginend\" && this.foldingStopMarker && this.foldingStopMarker.test(line)) return \"end\";\n return \"\";\n };\n\n this.getFoldWidgetRange = function (session, foldStyle, row) {\n return null;\n };\n\n this.indentationBlock = function (session, row, column) {\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1) return;\n var startColumn = column || line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n\n while (++row < maxRow) {\n var level = session.getLine(row).search(re);\n if (level == -1) continue;\n\n if (level <= startLevel) {\n var token = session.getTokenAt(row, 0);\n if (!token || token.type !== \"string\") break;\n }\n\n endRow = row;\n }\n\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n\n this.openingBracketBlock = function (session, bracket, row, column, typeRe) {\n var start = {\n row: row,\n column: column + 1\n };\n var end = session.$findClosingBracket(bracket, start, typeRe);\n if (!end) return;\n var fw = session.foldWidgets[end.row];\n if (fw == null) fw = session.getFoldWidget(end.row);\n\n if (fw == \"start\" && end.row > start.row) {\n end.row--;\n end.column = session.getLine(end.row).length;\n }\n\n return Range.fromPoints(start, end);\n };\n\n this.closingBracketBlock = function (session, bracket, row, column, typeRe) {\n var end = {\n row: row,\n column: column\n };\n var start = session.$findOpeningBracket(bracket, end);\n if (!start) return;\n start.column++;\n end.column--;\n return Range.fromPoints(start, end);\n };\n }).call(FoldMode.prototype);\n});\nace.define(\"ace/theme/textmate\", [\"require\", \"exports\", \"module\", \"ace/lib/dom\"], function (require, exports, module) {\n \"use strict\";\n\n exports.isDark = false;\n exports.cssClass = \"ace-tm\";\n exports.cssText = \".ace-tm .ace_gutter {\\\nbackground: #f0f0f0;\\\ncolor: #333;\\\n}\\\n.ace-tm .ace_print-margin {\\\nwidth: 1px;\\\nbackground: #e8e8e8;\\\n}\\\n.ace-tm .ace_fold {\\\nbackground-color: #6B72E6;\\\n}\\\n.ace-tm {\\\nbackground-color: #FFFFFF;\\\ncolor: black;\\\n}\\\n.ace-tm .ace_cursor {\\\ncolor: black;\\\n}\\\n.ace-tm .ace_invisible {\\\ncolor: rgb(191, 191, 191);\\\n}\\\n.ace-tm .ace_storage,\\\n.ace-tm .ace_keyword {\\\ncolor: blue;\\\n}\\\n.ace-tm .ace_constant {\\\ncolor: rgb(197, 6, 11);\\\n}\\\n.ace-tm .ace_constant.ace_buildin {\\\ncolor: rgb(88, 72, 246);\\\n}\\\n.ace-tm .ace_constant.ace_language {\\\ncolor: rgb(88, 92, 246);\\\n}\\\n.ace-tm .ace_constant.ace_library {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_invalid {\\\nbackground-color: rgba(255, 0, 0, 0.1);\\\ncolor: red;\\\n}\\\n.ace-tm .ace_support.ace_function {\\\ncolor: rgb(60, 76, 114);\\\n}\\\n.ace-tm .ace_support.ace_constant {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_support.ace_type,\\\n.ace-tm .ace_support.ace_class {\\\ncolor: rgb(109, 121, 222);\\\n}\\\n.ace-tm .ace_keyword.ace_operator {\\\ncolor: rgb(104, 118, 135);\\\n}\\\n.ace-tm .ace_string {\\\ncolor: rgb(3, 106, 7);\\\n}\\\n.ace-tm .ace_comment {\\\ncolor: rgb(76, 136, 107);\\\n}\\\n.ace-tm .ace_comment.ace_doc {\\\ncolor: rgb(0, 102, 255);\\\n}\\\n.ace-tm .ace_comment.ace_doc.ace_tag {\\\ncolor: rgb(128, 159, 191);\\\n}\\\n.ace-tm .ace_constant.ace_numeric {\\\ncolor: rgb(0, 0, 205);\\\n}\\\n.ace-tm .ace_variable {\\\ncolor: rgb(49, 132, 149);\\\n}\\\n.ace-tm .ace_xml-pe {\\\ncolor: rgb(104, 104, 91);\\\n}\\\n.ace-tm .ace_entity.ace_name.ace_function {\\\ncolor: #0000A2;\\\n}\\\n.ace-tm .ace_heading {\\\ncolor: rgb(12, 7, 255);\\\n}\\\n.ace-tm .ace_list {\\\ncolor:rgb(185, 6, 144);\\\n}\\\n.ace-tm .ace_meta.ace_tag {\\\ncolor:rgb(0, 22, 142);\\\n}\\\n.ace-tm .ace_string.ace_regex {\\\ncolor: rgb(255, 0, 0)\\\n}\\\n.ace-tm .ace_marker-layer .ace_selection {\\\nbackground: rgb(181, 213, 255);\\\n}\\\n.ace-tm.ace_multiselect .ace_selection.ace_start {\\\nbox-shadow: 0 0 3px 0px white;\\\n}\\\n.ace-tm .ace_marker-layer .ace_step {\\\nbackground: rgb(252, 255, 0);\\\n}\\\n.ace-tm .ace_marker-layer .ace_stack {\\\nbackground: rgb(164, 229, 101);\\\n}\\\n.ace-tm .ace_marker-layer .ace_bracket {\\\nmargin: -1px 0 0 -1px;\\\nborder: 1px solid rgb(192, 192, 192);\\\n}\\\n.ace-tm .ace_marker-layer .ace_active-line {\\\nbackground: rgba(0, 0, 0, 0.07);\\\n}\\\n.ace-tm .ace_gutter-active-line {\\\nbackground-color : #dcdcdc;\\\n}\\\n.ace-tm .ace_marker-layer .ace_selected-word {\\\nbackground: rgb(250, 250, 255);\\\nborder: 1px solid rgb(200, 200, 250);\\\n}\\\n.ace-tm .ace_indent-guide {\\\nbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\\\") right repeat-y;\\\n}\\\n\";\n exports.$id = \"ace/theme/textmate\";\n\n var dom = require(\"../lib/dom\");\n\n dom.importCssString(exports.cssText, exports.cssClass);\n});\nace.define(\"ace/line_widgets\", [\"require\", \"exports\", \"module\", \"ace/lib/oop\", \"ace/lib/dom\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var oop = require(\"./lib/oop\");\n\n var dom = require(\"./lib/dom\");\n\n var Range = require(\"./range\").Range;\n\n function LineWidgets(session) {\n this.session = session;\n this.session.widgetManager = this;\n this.session.getRowLength = this.getRowLength;\n this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;\n this.updateOnChange = this.updateOnChange.bind(this);\n this.renderWidgets = this.renderWidgets.bind(this);\n this.measureWidgets = this.measureWidgets.bind(this);\n this.session._changedWidgets = [];\n this.$onChangeEditor = this.$onChangeEditor.bind(this);\n this.session.on(\"change\", this.updateOnChange);\n this.session.on(\"changeFold\", this.updateOnFold);\n this.session.on(\"changeEditor\", this.$onChangeEditor);\n }\n\n (function () {\n this.getRowLength = function (row) {\n var h;\n if (this.lineWidgets) h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;else h = 0;\n\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n\n this.$getWidgetScreenLength = function () {\n var screenRows = 0;\n this.lineWidgets.forEach(function (w) {\n if (w && w.rowCount && !w.hidden) screenRows += w.rowCount;\n });\n return screenRows;\n };\n\n this.$onChangeEditor = function (e) {\n this.attach(e.editor);\n };\n\n this.attach = function (editor) {\n if (editor && editor.widgetManager && editor.widgetManager != this) editor.widgetManager.detach();\n if (this.editor == editor) return;\n this.detach();\n this.editor = editor;\n\n if (editor) {\n editor.widgetManager = this;\n editor.renderer.on(\"beforeRender\", this.measureWidgets);\n editor.renderer.on(\"afterRender\", this.renderWidgets);\n }\n };\n\n this.detach = function (e) {\n var editor = this.editor;\n if (!editor) return;\n this.editor = null;\n editor.widgetManager = null;\n editor.renderer.off(\"beforeRender\", this.measureWidgets);\n editor.renderer.off(\"afterRender\", this.renderWidgets);\n var lineWidgets = this.session.lineWidgets;\n lineWidgets && lineWidgets.forEach(function (w) {\n if (w && w.el && w.el.parentNode) {\n w._inDocument = false;\n w.el.parentNode.removeChild(w.el);\n }\n });\n };\n\n this.updateOnFold = function (e, session) {\n var lineWidgets = session.lineWidgets;\n if (!lineWidgets || !e.action) return;\n var fold = e.data;\n var start = fold.start.row;\n var end = fold.end.row;\n var hide = e.action == \"add\";\n\n for (var i = start + 1; i < end; i++) {\n if (lineWidgets[i]) lineWidgets[i].hidden = hide;\n }\n\n if (lineWidgets[end]) {\n if (hide) {\n if (!lineWidgets[start]) lineWidgets[start] = lineWidgets[end];else lineWidgets[end].hidden = hide;\n } else {\n if (lineWidgets[start] == lineWidgets[end]) lineWidgets[start] = undefined;\n lineWidgets[end].hidden = hide;\n }\n }\n };\n\n this.updateOnChange = function (delta) {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {} else if (delta.action == 'remove') {\n var removed = lineWidgets.splice(startRow + 1, len);\n removed.forEach(function (w) {\n w && this.removeLineWidget(w);\n }, this);\n this.$updateRows();\n } else {\n var args = new Array(len);\n args.unshift(startRow, 0);\n lineWidgets.splice.apply(lineWidgets, args);\n this.$updateRows();\n }\n };\n\n this.$updateRows = function () {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n var noWidgets = true;\n lineWidgets.forEach(function (w, i) {\n if (w) {\n noWidgets = false;\n w.row = i;\n\n while (w.$oldWidget) {\n w.$oldWidget.row = i;\n w = w.$oldWidget;\n }\n }\n });\n if (noWidgets) this.session.lineWidgets = null;\n };\n\n this.addLineWidget = function (w) {\n if (!this.session.lineWidgets) this.session.lineWidgets = new Array(this.session.getLength());\n var old = this.session.lineWidgets[w.row];\n\n if (old) {\n w.$oldWidget = old;\n\n if (old.el && old.el.parentNode) {\n old.el.parentNode.removeChild(old.el);\n old._inDocument = false;\n }\n }\n\n this.session.lineWidgets[w.row] = w;\n w.session = this.session;\n var renderer = this.editor.renderer;\n\n if (w.html && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.innerHTML = w.html;\n }\n\n if (w.el) {\n dom.addCssClass(w.el, \"ace_lineWidgetContainer\");\n w.el.style.position = \"absolute\";\n w.el.style.zIndex = 5;\n renderer.container.appendChild(w.el);\n w._inDocument = true;\n }\n\n if (!w.coverGutter) {\n w.el.style.zIndex = 3;\n }\n\n if (w.pixelHeight == null) {\n w.pixelHeight = w.el.offsetHeight;\n }\n\n if (w.rowCount == null) {\n w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;\n }\n\n var fold = this.session.getFoldAt(w.row, 0);\n w.$fold = fold;\n\n if (fold) {\n var lineWidgets = this.session.lineWidgets;\n if (w.row == fold.end.row && !lineWidgets[fold.start.row]) lineWidgets[fold.start.row] = w;else w.hidden = true;\n }\n\n this.session._emit(\"changeFold\", {\n data: {\n start: {\n row: w.row\n }\n }\n });\n\n this.$updateRows();\n this.renderWidgets(null, renderer);\n this.onWidgetChanged(w);\n return w;\n };\n\n this.removeLineWidget = function (w) {\n w._inDocument = false;\n w.session = null;\n if (w.el && w.el.parentNode) w.el.parentNode.removeChild(w.el);\n if (w.editor && w.editor.destroy) try {\n w.editor.destroy();\n } catch (e) {}\n\n if (this.session.lineWidgets) {\n var w1 = this.session.lineWidgets[w.row];\n\n if (w1 == w) {\n this.session.lineWidgets[w.row] = w.$oldWidget;\n if (w.$oldWidget) this.onWidgetChanged(w.$oldWidget);\n } else {\n while (w1) {\n if (w1.$oldWidget == w) {\n w1.$oldWidget = w.$oldWidget;\n break;\n }\n\n w1 = w1.$oldWidget;\n }\n }\n }\n\n this.session._emit(\"changeFold\", {\n data: {\n start: {\n row: w.row\n }\n }\n });\n\n this.$updateRows();\n };\n\n this.getWidgetsAtRow = function (row) {\n var lineWidgets = this.session.lineWidgets;\n var w = lineWidgets && lineWidgets[row];\n var list = [];\n\n while (w) {\n list.push(w);\n w = w.$oldWidget;\n }\n\n return list;\n };\n\n this.onWidgetChanged = function (w) {\n this.session._changedWidgets.push(w);\n\n this.editor && this.editor.renderer.updateFull();\n };\n\n this.measureWidgets = function (e, renderer) {\n var changedWidgets = this.session._changedWidgets;\n var config = renderer.layerConfig;\n if (!changedWidgets || !changedWidgets.length) return;\n var min = Infinity;\n\n for (var i = 0; i < changedWidgets.length; i++) {\n var w = changedWidgets[i];\n if (!w || !w.el) continue;\n if (w.session != this.session) continue;\n\n if (!w._inDocument) {\n if (this.session.lineWidgets[w.row] != w) continue;\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n\n w.h = w.el.offsetHeight;\n\n if (!w.fixedWidth) {\n w.w = w.el.offsetWidth;\n w.screenWidth = Math.ceil(w.w / config.characterWidth);\n }\n\n var rowCount = w.h / config.lineHeight;\n\n if (w.coverLine) {\n rowCount -= this.session.getRowLineCount(w.row);\n if (rowCount < 0) rowCount = 0;\n }\n\n if (w.rowCount != rowCount) {\n w.rowCount = rowCount;\n if (w.row < min) min = w.row;\n }\n }\n\n if (min != Infinity) {\n this.session._emit(\"changeFold\", {\n data: {\n start: {\n row: min\n }\n }\n });\n\n this.session.lineWidgetWidth = null;\n }\n\n this.session._changedWidgets = [];\n };\n\n this.renderWidgets = function (e, renderer) {\n var config = renderer.layerConfig;\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n var first = Math.min(this.firstRow, config.firstRow);\n var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);\n\n while (first > 0 && !lineWidgets[first]) {\n first--;\n }\n\n this.firstRow = config.firstRow;\n this.lastRow = config.lastRow;\n renderer.$cursorLayer.config = config;\n\n for (var i = first; i <= last; i++) {\n var w = lineWidgets[i];\n if (!w || !w.el) continue;\n\n if (w.hidden) {\n w.el.style.top = -100 - (w.pixelHeight || 0) + \"px\";\n continue;\n }\n\n if (!w._inDocument) {\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n\n var top = renderer.$cursorLayer.getPixelPosition({\n row: i,\n column: 0\n }, true).top;\n if (!w.coverLine) top += config.lineHeight * this.session.getRowLineCount(w.row);\n w.el.style.top = top - config.offset + \"px\";\n var left = w.coverGutter ? 0 : renderer.gutterWidth;\n if (!w.fixedWidth) left -= renderer.scrollLeft;\n w.el.style.left = left + \"px\";\n\n if (w.fullWidth && w.screenWidth) {\n w.el.style.minWidth = config.width + 2 * config.padding + \"px\";\n }\n\n if (w.fixedWidth) {\n w.el.style.right = renderer.scrollBar.getWidth() + \"px\";\n } else {\n w.el.style.right = \"\";\n }\n }\n };\n }).call(LineWidgets.prototype);\n exports.LineWidgets = LineWidgets;\n});\nace.define(\"ace/ext/error_marker\", [\"require\", \"exports\", \"module\", \"ace/line_widgets\", \"ace/lib/dom\", \"ace/range\"], function (require, exports, module) {\n \"use strict\";\n\n var LineWidgets = require(\"../line_widgets\").LineWidgets;\n\n var dom = require(\"../lib/dom\");\n\n var Range = require(\"../range\").Range;\n\n function binarySearch(array, needle, comparator) {\n var first = 0;\n var last = array.length - 1;\n\n while (first <= last) {\n var mid = first + last >> 1;\n var c = comparator(needle, array[mid]);\n if (c > 0) first = mid + 1;else if (c < 0) last = mid - 1;else return mid;\n }\n\n return -(first + 1);\n }\n\n function findAnnotations(session, row, dir) {\n var annotations = session.getAnnotations().sort(Range.comparePoints);\n if (!annotations.length) return;\n var i = binarySearch(annotations, {\n row: row,\n column: -1\n }, Range.comparePoints);\n if (i < 0) i = -i - 1;\n if (i >= annotations.length) i = dir > 0 ? 0 : annotations.length - 1;else if (i === 0 && dir < 0) i = annotations.length - 1;\n var annotation = annotations[i];\n if (!annotation || !dir) return;\n\n if (annotation.row === row) {\n do {\n annotation = annotations[i += dir];\n } while (annotation && annotation.row === row);\n\n if (!annotation) return annotations.slice();\n }\n\n var matched = [];\n row = annotation.row;\n\n do {\n matched[dir < 0 ? \"unshift\" : \"push\"](annotation);\n annotation = annotations[i += dir];\n } while (annotation && annotation.row == row);\n\n return matched.length && matched;\n }\n\n exports.showErrorMarker = function (editor, dir) {\n var session = editor.session;\n\n if (!session.widgetManager) {\n session.widgetManager = new LineWidgets(session);\n session.widgetManager.attach(editor);\n }\n\n var pos = editor.getCursorPosition();\n var row = pos.row;\n var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function (w) {\n return w.type == \"errorMarker\";\n })[0];\n\n if (oldWidget) {\n oldWidget.destroy();\n } else {\n row -= dir;\n }\n\n var annotations = findAnnotations(session, row, dir);\n var gutterAnno;\n\n if (annotations) {\n var annotation = annotations[0];\n pos.column = (annotation.pos && typeof annotation.column != \"number\" ? annotation.pos.sc : annotation.column) || 0;\n pos.row = annotation.row;\n gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];\n } else if (oldWidget) {\n return;\n } else {\n gutterAnno = {\n text: [\"Looks good!\"],\n className: \"ace_ok\"\n };\n }\n\n editor.session.unfold(pos.row);\n editor.selection.moveToPosition(pos);\n var w = {\n row: pos.row,\n fixedWidth: true,\n coverGutter: true,\n el: dom.createElement(\"div\"),\n type: \"errorMarker\"\n };\n var el = w.el.appendChild(dom.createElement(\"div\"));\n var arrow = w.el.appendChild(dom.createElement(\"div\"));\n arrow.className = \"error_widget_arrow \" + gutterAnno.className;\n var left = editor.renderer.$cursorLayer.getPixelPosition(pos).left;\n arrow.style.left = left + editor.renderer.gutterWidth - 5 + \"px\";\n w.el.className = \"error_widget_wrapper\";\n el.className = \"error_widget \" + gutterAnno.className;\n el.innerHTML = gutterAnno.text.join(\"
\");\n el.appendChild(dom.createElement(\"div\"));\n\n var kb = function kb(_, hashId, keyString) {\n if (hashId === 0 && (keyString === \"esc\" || keyString === \"return\")) {\n w.destroy();\n return {\n command: \"null\"\n };\n }\n };\n\n w.destroy = function () {\n if (editor.$mouseHandler.isMousePressed) return;\n editor.keyBinding.removeKeyboardHandler(kb);\n session.widgetManager.removeLineWidget(w);\n editor.off(\"changeSelection\", w.destroy);\n editor.off(\"changeSession\", w.destroy);\n editor.off(\"mouseup\", w.destroy);\n editor.off(\"change\", w.destroy);\n };\n\n editor.keyBinding.addKeyboardHandler(kb);\n editor.on(\"changeSelection\", w.destroy);\n editor.on(\"changeSession\", w.destroy);\n editor.on(\"mouseup\", w.destroy);\n editor.on(\"change\", w.destroy);\n editor.session.widgetManager.addLineWidget(w);\n w.el.onmousedown = editor.focus.bind(editor);\n editor.renderer.scrollCursorIntoView(null, 0.5, {\n bottom: w.el.offsetHeight\n });\n };\n\n dom.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\", \"\");\n});\nace.define(\"ace/ace\", [\"require\", \"exports\", \"module\", \"ace/lib/fixoldbrowsers\", \"ace/lib/dom\", \"ace/lib/event\", \"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\"], function (require, exports, module) {\n \"use strict\";\n\n require(\"./lib/fixoldbrowsers\");\n\n var dom = require(\"./lib/dom\");\n\n var event = require(\"./lib/event\");\n\n var Range = require(\"./range\").Range;\n\n var Editor = require(\"./editor\").Editor;\n\n var EditSession = require(\"./edit_session\").EditSession;\n\n var UndoManager = require(\"./undomanager\").UndoManager;\n\n var Renderer = require(\"./virtual_renderer\").VirtualRenderer;\n\n require(\"./worker/worker_client\");\n\n require(\"./keyboard/hash_handler\");\n\n require(\"./placeholder\");\n\n require(\"./multi_select\");\n\n require(\"./mode/folding/fold_mode\");\n\n require(\"./theme/textmate\");\n\n require(\"./ext/error_marker\");\n\n exports.config = require(\"./config\");\n exports.require = require;\n if (typeof define === \"function\") exports.define = define;\n\n exports.edit = function (el, options) {\n if (typeof el == \"string\") {\n var _id = el;\n el = document.getElementById(_id);\n if (!el) throw new Error(\"ace.edit can't find div #\" + _id);\n }\n\n if (el && el.env && el.env.editor instanceof Editor) return el.env.editor;\n var value = \"\";\n\n if (el && /input|textarea/i.test(el.tagName)) {\n var oldNode = el;\n value = oldNode.value;\n el = dom.createElement(\"pre\");\n oldNode.parentNode.replaceChild(el, oldNode);\n } else if (el) {\n value = el.textContent;\n el.innerHTML = \"\";\n }\n\n var doc = exports.createEditSession(value);\n var editor = new Editor(new Renderer(el), doc, options);\n var env = {\n document: doc,\n editor: editor,\n onResize: editor.resize.bind(editor, null)\n };\n if (oldNode) env.textarea = oldNode;\n event.addListener(window, \"resize\", env.onResize);\n editor.on(\"destroy\", function () {\n event.removeListener(window, \"resize\", env.onResize);\n env.editor.container.env = null; // prevent memory leak on old ie\n });\n editor.container.env = editor.env = env;\n return editor;\n };\n\n exports.createEditSession = function (text, mode) {\n var doc = new EditSession(text, mode);\n doc.setUndoManager(new UndoManager());\n return doc;\n };\n\n exports.Range = Range;\n exports.Editor = Editor;\n exports.EditSession = EditSession;\n exports.UndoManager = UndoManager;\n exports.VirtualRenderer = Renderer;\n exports.version = exports.config.version;\n});\n\n(function () {\n ace.require([\"ace/ace\"], function (a) {\n if (a) {\n a.config.init(true);\n a.define = ace.define;\n }\n\n if (!window.ace) window.ace = a;\n\n for (var key in a) {\n if (a.hasOwnProperty(key)) window.ace[key] = a[key];\n }\n\n window.ace[\"default\"] = window.ace;\n\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = window.ace;\n }\n });\n})();","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar editorOptions_1 = require(\"./editorOptions\");\n\nvar ace = editorOptions_1.getAceInstance();\n\nvar ace_builds_1 = require(\"ace-builds\");\n\nvar ext_split_1 = require(\"ace-builds/src-noconflict/ext-split\");\n\nvar PropTypes = require(\"prop-types\");\n\nvar React = require(\"react\");\n\nvar isEqual = require(\"lodash.isequal\");\n\nvar get = require(\"lodash.get\");\n\nvar SplitComponent =\n/** @class */\nfunction (_super) {\n __extends(SplitComponent, _super);\n\n function SplitComponent(props) {\n var _this = _super.call(this, props) || this;\n\n editorOptions_1.editorEvents.forEach(function (method) {\n _this[method] = _this[method].bind(_this);\n });\n _this.debounce = editorOptions_1.debounce;\n return _this;\n }\n\n SplitComponent.prototype.componentDidMount = function () {\n var _this = this;\n\n var _a = this.props,\n className = _a.className,\n onBeforeLoad = _a.onBeforeLoad,\n mode = _a.mode,\n focus = _a.focus,\n theme = _a.theme,\n fontSize = _a.fontSize,\n value = _a.value,\n defaultValue = _a.defaultValue,\n cursorStart = _a.cursorStart,\n showGutter = _a.showGutter,\n wrapEnabled = _a.wrapEnabled,\n showPrintMargin = _a.showPrintMargin,\n _b = _a.scrollMargin,\n scrollMargin = _b === void 0 ? [0, 0, 0, 0] : _b,\n keyboardHandler = _a.keyboardHandler,\n onLoad = _a.onLoad,\n commands = _a.commands,\n annotations = _a.annotations,\n markers = _a.markers,\n splits = _a.splits;\n this.editor = ace.edit(this.refEditor);\n\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n\n var editorProps = Object.keys(this.props.editorProps);\n var split = new ext_split_1.Split(this.editor.container, \"ace/theme/\" + theme, splits);\n this.editor.env.split = split;\n this.splitEditor = split.getEditor(0);\n this.split = split; // in a split scenario we don't want a print margin for the entire application\n\n this.editor.setShowPrintMargin(false);\n this.editor.renderer.setShowGutter(false); // get a list of possible options to avoid 'misspelled option errors'\n\n var availableOptions = this.splitEditor.$options;\n\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(this.onChange, this.props.debounceChangePeriod);\n }\n\n split.forEach(function (editor, index) {\n for (var i = 0; i < editorProps.length; i++) {\n editor[editorProps[i]] = _this.props.editorProps[editorProps[i]];\n }\n\n var defaultValueForEditor = get(defaultValue, index);\n var valueForEditor = get(value, index, \"\");\n editor.session.setUndoManager(new ace.UndoManager());\n editor.setTheme(\"ace/theme/\" + theme);\n editor.renderer.setScrollMargin(scrollMargin[0], scrollMargin[1], scrollMargin[2], scrollMargin[3]);\n editor.getSession().setMode(\"ace/mode/\" + mode);\n editor.setFontSize(fontSize);\n editor.renderer.setShowGutter(showGutter);\n editor.getSession().setUseWrapMode(wrapEnabled);\n editor.setShowPrintMargin(showPrintMargin);\n editor.on(\"focus\", _this.onFocus);\n editor.on(\"blur\", _this.onBlur);\n editor.on(\"input\", _this.onInput);\n editor.on(\"copy\", _this.onCopy);\n editor.on(\"paste\", _this.onPaste);\n editor.on(\"change\", _this.onChange);\n editor.getSession().selection.on(\"changeSelection\", _this.onSelectionChange);\n editor.getSession().selection.on(\"changeCursor\", _this.onCursorChange);\n editor.session.on(\"changeScrollTop\", _this.onScroll);\n editor.setValue(defaultValueForEditor === undefined ? valueForEditor : defaultValueForEditor, cursorStart);\n var newAnnotations = get(annotations, index, []);\n var newMarkers = get(markers, index, []);\n editor.getSession().setAnnotations(newAnnotations);\n\n if (newMarkers && newMarkers.length > 0) {\n _this.handleMarkers(newMarkers, editor);\n }\n\n for (var i = 0; i < editorOptions_1.editorOptions.length; i++) {\n var option = editorOptions_1.editorOptions[i];\n\n if (availableOptions.hasOwnProperty(option)) {\n editor.setOption(option, _this.props[option]);\n } else if (_this.props[option]) {\n console.warn(\"ReaceAce: editor option \" + option + \" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?\");\n }\n }\n\n _this.handleOptions(_this.props, editor);\n\n if (Array.isArray(commands)) {\n commands.forEach(function (command) {\n if (typeof command.exec === \"string\") {\n editor.commands.bindKey(command.bindKey, command.exec);\n } else {\n editor.commands.addCommand(command);\n }\n });\n }\n\n if (keyboardHandler) {\n editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n });\n\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n\n if (focus) {\n this.splitEditor.focus();\n }\n\n var sp = this.editor.env.split;\n sp.setOrientation(this.props.orientation === \"below\" ? sp.BELOW : sp.BESIDE);\n sp.resize(true);\n\n if (onLoad) {\n onLoad(sp);\n }\n };\n\n SplitComponent.prototype.componentDidUpdate = function (prevProps) {\n var _this = this;\n\n var oldProps = prevProps;\n var nextProps = this.props;\n var split = this.editor.env.split;\n\n if (nextProps.splits !== oldProps.splits) {\n split.setSplits(nextProps.splits);\n }\n\n if (nextProps.orientation !== oldProps.orientation) {\n split.setOrientation(nextProps.orientation === \"below\" ? split.BELOW : split.BESIDE);\n }\n\n split.forEach(function (editor, index) {\n if (nextProps.mode !== oldProps.mode) {\n editor.getSession().setMode(\"ace/mode/\" + nextProps.mode);\n }\n\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n editor.setKeyboardHandler(\"ace/keyboard/\" + nextProps.keyboardHandler);\n } else {\n editor.setKeyboardHandler(null);\n }\n }\n\n if (nextProps.fontSize !== oldProps.fontSize) {\n editor.setFontSize(nextProps.fontSize);\n }\n\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n\n if (nextProps.showGutter !== oldProps.showGutter) {\n editor.renderer.setShowGutter(nextProps.showGutter);\n }\n\n for (var i = 0; i < editorOptions_1.editorOptions.length; i++) {\n var option = editorOptions_1.editorOptions[i];\n\n if (nextProps[option] !== oldProps[option]) {\n editor.setOption(option, nextProps[option]);\n }\n }\n\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n _this.handleOptions(nextProps, editor);\n }\n\n var nextValue = get(nextProps.value, index, \"\");\n\n if (editor.getValue() !== nextValue) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n _this.silent = true;\n var pos = editor.session.selection.toJSON();\n editor.setValue(nextValue, nextProps.cursorStart);\n editor.session.selection.fromJSON(pos);\n _this.silent = false;\n }\n\n var newAnnotations = get(nextProps.annotations, index, []);\n var oldAnnotations = get(oldProps.annotations, index, []);\n\n if (!isEqual(newAnnotations, oldAnnotations)) {\n editor.getSession().setAnnotations(newAnnotations);\n }\n\n var newMarkers = get(nextProps.markers, index, []);\n var oldMarkers = get(oldProps.markers, index, []);\n\n if (!isEqual(newMarkers, oldMarkers) && Array.isArray(newMarkers)) {\n _this.handleMarkers(newMarkers, editor);\n }\n });\n\n if (nextProps.className !== oldProps.className) {\n var appliedClasses = this.refEditor.className;\n var appliedClassesArray_1 = appliedClasses.trim().split(\" \");\n var oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(function (oldClass) {\n var index = appliedClassesArray_1.indexOf(oldClass);\n appliedClassesArray_1.splice(index, 1);\n });\n this.refEditor.className = \" \" + nextProps.className + \" \" + appliedClassesArray_1.join(\" \");\n }\n\n if (nextProps.theme !== oldProps.theme) {\n split.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n\n if (nextProps.focus && !oldProps.focus) {\n this.splitEditor.focus();\n }\n\n if (nextProps.height !== this.props.height || nextProps.width !== this.props.width) {\n this.editor.resize();\n }\n };\n\n SplitComponent.prototype.componentWillUnmount = function () {\n this.editor.destroy();\n this.editor = null;\n };\n\n SplitComponent.prototype.onChange = function (event) {\n if (this.props.onChange && !this.silent) {\n var value_1 = [];\n this.editor.env.split.forEach(function (editor) {\n value_1.push(editor.getValue());\n });\n this.props.onChange(value_1, event);\n }\n };\n\n SplitComponent.prototype.onSelectionChange = function (event) {\n if (this.props.onSelectionChange) {\n var value_2 = [];\n this.editor.env.split.forEach(function (editor) {\n value_2.push(editor.getSelection());\n });\n this.props.onSelectionChange(value_2, event);\n }\n };\n\n SplitComponent.prototype.onCursorChange = function (event) {\n if (this.props.onCursorChange) {\n var value_3 = [];\n this.editor.env.split.forEach(function (editor) {\n value_3.push(editor.getSelection());\n });\n this.props.onCursorChange(value_3, event);\n }\n };\n\n SplitComponent.prototype.onFocus = function (event) {\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n SplitComponent.prototype.onInput = function (event) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n };\n\n SplitComponent.prototype.onBlur = function (event) {\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n };\n\n SplitComponent.prototype.onCopy = function (text) {\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n };\n\n SplitComponent.prototype.onPaste = function (text) {\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n };\n\n SplitComponent.prototype.onScroll = function () {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n };\n\n SplitComponent.prototype.handleOptions = function (props, editor) {\n var setOptions = Object.keys(props.setOptions);\n\n for (var y = 0; y < setOptions.length; y++) {\n editor.setOption(setOptions[y], props.setOptions[setOptions[y]]);\n }\n };\n\n SplitComponent.prototype.handleMarkers = function (markers, editor) {\n // remove foreground markers\n var currentMarkers = editor.getSession().getMarkers(true);\n\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n } // remove background markers\n\n\n currentMarkers = editor.getSession().getMarkers(false);\n\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n } // add new markers\n\n\n markers.forEach(function (_a) {\n var startRow = _a.startRow,\n startCol = _a.startCol,\n endRow = _a.endRow,\n endCol = _a.endCol,\n className = _a.className,\n type = _a.type,\n _b = _a.inFront,\n inFront = _b === void 0 ? false : _b;\n var range = new ace_builds_1.Range(startRow, startCol, endRow, endCol);\n editor.getSession().addMarker(range, className, type, inFront);\n });\n };\n\n SplitComponent.prototype.updateRef = function (item) {\n this.refEditor = item;\n };\n\n SplitComponent.prototype.render = function () {\n var _a = this.props,\n name = _a.name,\n width = _a.width,\n height = _a.height,\n style = _a.style;\n\n var divStyle = __assign({\n width: width,\n height: height\n }, style);\n\n return React.createElement(\"div\", {\n ref: this.updateRef,\n id: name,\n style: divStyle\n });\n };\n\n SplitComponent.propTypes = {\n className: PropTypes.string,\n debounceChangePeriod: PropTypes.number,\n defaultValue: PropTypes.arrayOf(PropTypes.string),\n focus: PropTypes.bool,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.string,\n mode: PropTypes.string,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n orientation: PropTypes.string,\n showGutter: PropTypes.bool,\n splits: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.arrayOf(PropTypes.string),\n width: PropTypes.string,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),\n enableLiveAutocompletion: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),\n commands: PropTypes.array\n };\n SplitComponent.defaultProps = {\n name: \"ace-editor\",\n focus: false,\n orientation: \"beside\",\n splits: 2,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n value: [],\n fontSize: 12,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false\n };\n return SplitComponent;\n}(React.Component);\n\nexports.default = SplitComponent;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar ace_1 = require(\"./ace\");\n\nvar diff_1 = require(\"./diff\");\n\nexports.diff = diff_1.default;\n\nvar split_1 = require(\"./split\");\n\nexports.split = split_1.default;\nexports.default = ace_1.default;","/*!\n * react-filepond v7.0.1\n * A handy FilePond adapter component for React\n * \n * Copyright (c) 2019 PQINA\n * https://pqina.nl/filepond\n * \n * Licensed under the MIT license.\n */\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FilePond = exports.FileStatus = exports.registerPlugin = undefined;\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _filepond = require('filepond');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // Import required methods and styles from the FilePond module, should not need anything else\n// We need to be able to call the registerPlugin method directly so we can add plugins\n\n\nexports.registerPlugin = _filepond.registerPlugin;\nexports.FileStatus = _filepond.FileStatus; // Do this once\n\nvar isSupported = (0, _filepond.supported)(); // filtered methods\n\nvar filteredMethods = ['setOptions', 'on', 'off', 'onOnce', 'appendTo', 'insertAfter', 'insertBefore', 'isAttachedTo', 'replaceElement', 'restoreElement', 'destroy']; // The React wrapper\n\nvar FilePond = exports.FilePond = function (_React$Component) {\n _inherits(FilePond, _React$Component);\n\n function FilePond(props) {\n _classCallCheck(this, FilePond);\n\n var _this = _possibleConstructorReturn(this, (FilePond.__proto__ || Object.getPrototypeOf(FilePond)).call(this, props));\n\n _this.allowFilesSync = true;\n return _this;\n } // Will setup FilePond instance when mounted\n\n\n _createClass(FilePond, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this; // exit here if not supported\n\n\n if (!isSupported) return;\n var options = Object.assign({}, this.props); // if onupdate files is defined, make sure setFiles does not cause race condition\n\n if (options.onupdatefiles) {\n var cb = options.onupdatefiles;\n\n options.onupdatefiles = function (items) {\n _this2.allowFilesSync = false;\n cb(items);\n };\n } // Create our pond\n\n\n this._pond = (0, _filepond.create)(this._element, options); // Reference pond methods to FilePond component instance\n\n Object.keys(this._pond).filter(function (key) {\n return !filteredMethods.includes(key);\n }).forEach(function (key) {\n _this2[key] = _this2._pond[key];\n });\n } // Will clean up FilePond instance when unmounted\n\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n // exit when no pond defined\n if (!this._pond) return;\n\n this._pond.destroy();\n\n this.allowFilesSync = true;\n }\n }, {\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n if (!this.allowFilesSync) {\n this.allowFilesSync = true;\n return false;\n }\n\n return true;\n } // Something changed\n\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n // exit when no pond defined\n if (!this._pond) return;\n var options = Object.assign({}, this.props); // this is only set onces, on didmount\n\n delete options.onupdatefiles; // update pond options based on new props\n\n this._pond.setOptions(options);\n } // Renders basic element hook for FilePond to attach to\n\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var _props = this.props,\n id = _props.id,\n name = _props.name,\n className = _props.className,\n allowMultiple = _props.allowMultiple,\n required = _props.required,\n captureMethod = _props.captureMethod,\n acceptedFileTypes = _props.acceptedFileTypes;\n return (0, _react.createElement)('div', {\n className: 'filepond--wrapper'\n }, (0, _react.createElement)('input', {\n type: 'file',\n name: name,\n id: id,\n accept: acceptedFileTypes,\n multiple: allowMultiple,\n required: required,\n className: className,\n capture: captureMethod,\n ref: function ref(element) {\n return _this3._element = element;\n }\n }));\n }\n }]);\n\n return FilePond;\n}(_react2.default.Component);","import { getWindow } from './dom/getWindow';\n/**\n * Storing global state in local module variables has issues when more than one copy\n * if the module gets loaded on the page (due to a bundling error or simply by consuming\n * a prebundled script.)\n *\n * This file contains helpers to deal with the getting and setting local state, and allows\n * callers to get called back when it mutates.\n */\n// tslint:disable:no-any\n\nvar GLOBAL_SETTINGS_PROP_NAME = '__globalSettings__';\nvar CALLBACK_STATE_PROP_NAME = '__callbacks__';\nvar _counter = 0;\n/**\n * Global settings helper, which stores settings in the global (window) namespace.\n * If window is not provided, it will store settings in module scope. Provides a\n * way to observe changes as well when their values change.\n *\n * @public\n * {@docCategory GlobalSettings}\n */\n\nvar GlobalSettings =\n/** @class */\nfunction () {\n function GlobalSettings() {}\n\n GlobalSettings.getValue = function (key, defaultValue) {\n var globalSettings = _getGlobalSettings();\n\n if (globalSettings[key] === undefined) {\n globalSettings[key] = typeof defaultValue === 'function' ? defaultValue() : defaultValue;\n }\n\n return globalSettings[key];\n };\n\n GlobalSettings.setValue = function (key, value) {\n var globalSettings = _getGlobalSettings();\n\n var callbacks = globalSettings[CALLBACK_STATE_PROP_NAME];\n var oldValue = globalSettings[key];\n\n if (value !== oldValue) {\n globalSettings[key] = value;\n var changeDescription = {\n oldValue: oldValue,\n value: value,\n key: key\n };\n\n for (var id in callbacks) {\n if (callbacks.hasOwnProperty(id)) {\n callbacks[id](changeDescription);\n }\n }\n }\n\n return value;\n };\n\n GlobalSettings.addChangeListener = function (cb) {\n // Note: we use generated ids on the callbacks to create a map of the callbacks, which optimizes removal.\n // (It's faster to delete a key than it is to look up the index of an object and splice an array.)\n var id = cb.__id__;\n\n var callbacks = _getCallbacks();\n\n if (!id) {\n id = cb.__id__ = String(_counter++);\n }\n\n callbacks[id] = cb;\n };\n\n GlobalSettings.removeChangeListener = function (cb) {\n var callbacks = _getCallbacks();\n\n delete callbacks[cb.__id__];\n };\n\n return GlobalSettings;\n}();\n\nexport { GlobalSettings };\n\nfunction _getGlobalSettings() {\n var _a;\n\n var win = getWindow();\n var globalObj = win || {};\n\n if (!globalObj[GLOBAL_SETTINGS_PROP_NAME]) {\n globalObj[GLOBAL_SETTINGS_PROP_NAME] = (_a = {}, _a[CALLBACK_STATE_PROP_NAME] = {}, _a);\n }\n\n return globalObj[GLOBAL_SETTINGS_PROP_NAME];\n}\n\nfunction _getCallbacks() {\n var globalSettings = _getGlobalSettings();\n\n return globalSettings[CALLBACK_STATE_PROP_NAME];\n}","/**\n * An IThemingInstruction can specify a rawString to be preserved or a theme slot and a default value\n * to use if that slot is not specified by the theme.\n */\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n}; // Store the theming state in __themeState__ global scope for reuse in the case of duplicate\n// load-themed-styles hosted on the page.\n\n\nvar _root = typeof window === 'undefined' ? global : window; // eslint-disable-line @typescript-eslint/no-explicit-any\n// Nonce string to inject into script tag if one provided. This is used in CSP (Content Security Policy).\n\n\nvar _styleNonce = _root && _root.CSPSettings && _root.CSPSettings.nonce;\n\nvar _themeState = initializeThemeState();\n/**\n * Matches theming tokens. For example, \"[theme: themeSlotName, default: #FFF]\" (including the quotes).\n */\n\n\nvar _themeTokenRegex = /[\\'\\\"]\\[theme:\\s*(\\w+)\\s*(?:\\,\\s*default:\\s*([\\\\\"\\']?[\\.\\,\\(\\)\\#\\-\\s\\w]*[\\.\\,\\(\\)\\#\\-\\w][\\\"\\']?))?\\s*\\][\\'\\\"]/g;\n\nvar now = function now() {\n return typeof performance !== 'undefined' && !!performance.now ? performance.now() : Date.now();\n};\n\nfunction measure(func) {\n var start = now();\n func();\n var end = now();\n _themeState.perf.duration += end - start;\n}\n/**\n * initialize global state object\n */\n\n\nfunction initializeThemeState() {\n var state = _root.__themeState__ || {\n theme: undefined,\n lastStyleElement: undefined,\n registeredStyles: []\n };\n\n if (!state.runState) {\n state = __assign({}, state, {\n perf: {\n count: 0,\n duration: 0\n },\n runState: {\n flushTimer: 0,\n mode: 0\n /* sync */\n ,\n buffer: []\n }\n });\n }\n\n if (!state.registeredThemableStyles) {\n state = __assign({}, state, {\n registeredThemableStyles: []\n });\n }\n\n _root.__themeState__ = state;\n return state;\n}\n/**\n * Loads a set of style text. If it is registered too early, we will register it when the window.load\n * event is fired.\n * @param {string | ThemableArray} styles Themable style text to register.\n * @param {boolean} loadAsync When true, always load styles in async mode, irrespective of current sync mode.\n */\n\n\nexport function loadStyles(styles, loadAsync) {\n if (loadAsync === void 0) {\n loadAsync = false;\n }\n\n measure(function () {\n var styleParts = Array.isArray(styles) ? styles : splitStyles(styles);\n var _a = _themeState.runState,\n mode = _a.mode,\n buffer = _a.buffer,\n flushTimer = _a.flushTimer;\n\n if (loadAsync || mode === 1\n /* async */\n ) {\n buffer.push(styleParts);\n\n if (!flushTimer) {\n _themeState.runState.flushTimer = asyncLoadStyles();\n }\n } else {\n applyThemableStyles(styleParts);\n }\n });\n}\n/**\n * Allows for customizable loadStyles logic. e.g. for server side rendering application\n * @param {(processedStyles: string, rawStyles?: string | ThemableArray) => void}\n * a loadStyles callback that gets called when styles are loaded or reloaded\n */\n\nexport function configureLoadStyles(loadStylesFn) {\n _themeState.loadStyles = loadStylesFn;\n}\n/**\n * Configure run mode of load-themable-styles\n * @param mode load-themable-styles run mode, async or sync\n */\n\nexport function configureRunMode(mode) {\n _themeState.runState.mode = mode;\n}\n/**\n * external code can call flush to synchronously force processing of currently buffered styles\n */\n\nexport function flush() {\n measure(function () {\n var styleArrays = _themeState.runState.buffer.slice();\n\n _themeState.runState.buffer = [];\n var mergedStyleArray = [].concat.apply([], styleArrays);\n\n if (mergedStyleArray.length > 0) {\n applyThemableStyles(mergedStyleArray);\n }\n });\n}\n/**\n * register async loadStyles\n */\n\nfunction asyncLoadStyles() {\n return setTimeout(function () {\n _themeState.runState.flushTimer = 0;\n flush();\n }, 0);\n}\n/**\n * Loads a set of style text. If it is registered too early, we will register it when the window.load event\n * is fired.\n * @param {string} styleText Style to register.\n * @param {IStyleRecord} styleRecord Existing style record to re-apply.\n */\n\n\nfunction applyThemableStyles(stylesArray, styleRecord) {\n if (_themeState.loadStyles) {\n _themeState.loadStyles(resolveThemableArray(stylesArray).styleString, stylesArray);\n } else {\n registerStyles(stylesArray);\n }\n}\n/**\n * Registers a set theme tokens to find and replace. If styles were already registered, they will be\n * replaced.\n * @param {theme} theme JSON object of theme tokens to values.\n */\n\n\nexport function loadTheme(theme) {\n _themeState.theme = theme; // reload styles.\n\n reloadStyles();\n}\n/**\n * Clear already registered style elements and style records in theme_State object\n * @param option - specify which group of registered styles should be cleared.\n * Default to be both themable and non-themable styles will be cleared\n */\n\nexport function clearStyles(option) {\n if (option === void 0) {\n option = 3\n /* all */\n ;\n }\n\n if (option === 3\n /* all */\n || option === 2\n /* onlyNonThemable */\n ) {\n clearStylesInternal(_themeState.registeredStyles);\n _themeState.registeredStyles = [];\n }\n\n if (option === 3\n /* all */\n || option === 1\n /* onlyThemable */\n ) {\n clearStylesInternal(_themeState.registeredThemableStyles);\n _themeState.registeredThemableStyles = [];\n }\n}\n\nfunction clearStylesInternal(records) {\n records.forEach(function (styleRecord) {\n var styleElement = styleRecord && styleRecord.styleElement;\n\n if (styleElement && styleElement.parentElement) {\n styleElement.parentElement.removeChild(styleElement);\n }\n });\n}\n/**\n * Reloads styles.\n */\n\n\nfunction reloadStyles() {\n if (_themeState.theme) {\n var themableStyles = [];\n\n for (var _i = 0, _a = _themeState.registeredThemableStyles; _i < _a.length; _i++) {\n var styleRecord = _a[_i];\n themableStyles.push(styleRecord.themableStyle);\n }\n\n if (themableStyles.length > 0) {\n clearStyles(1\n /* onlyThemable */\n );\n applyThemableStyles([].concat.apply([], themableStyles));\n }\n }\n}\n/**\n * Find theme tokens and replaces them with provided theme values.\n * @param {string} styles Tokenized styles to fix.\n */\n\n\nexport function detokenize(styles) {\n if (styles) {\n styles = resolveThemableArray(splitStyles(styles)).styleString;\n }\n\n return styles;\n}\n/**\n * Resolves ThemingInstruction objects in an array and joins the result into a string.\n * @param {ThemableArray} splitStyleArray ThemableArray to resolve and join.\n */\n\nfunction resolveThemableArray(splitStyleArray) {\n var theme = _themeState.theme;\n var themable = false; // Resolve the array of theming instructions to an array of strings.\n // Then join the array to produce the final CSS string.\n\n var resolvedArray = (splitStyleArray || []).map(function (currentValue) {\n var themeSlot = currentValue.theme;\n\n if (themeSlot) {\n themable = true; // A theming annotation. Resolve it.\n\n var themedValue = theme ? theme[themeSlot] : undefined;\n var defaultValue = currentValue.defaultValue || 'inherit'; // Warn to console if we hit an unthemed value even when themes are provided, but only if \"DEBUG\" is true.\n // Allow the themedValue to be undefined to explicitly request the default value.\n\n if (theme && !themedValue && console && !(themeSlot in theme) && typeof DEBUG !== 'undefined' && DEBUG) {\n console.warn(\"Theming value not provided for \\\"\" + themeSlot + \"\\\". Falling back to \\\"\" + defaultValue + \"\\\".\");\n }\n\n return themedValue || defaultValue;\n } else {\n // A non-themable string. Preserve it.\n return currentValue.rawString;\n }\n });\n return {\n styleString: resolvedArray.join(''),\n themable: themable\n };\n}\n/**\n * Split tokenized CSS into an array of strings and theme specification objects\n * @param {string} styles Tokenized styles to split.\n */\n\n\nexport function splitStyles(styles) {\n var result = [];\n\n if (styles) {\n var pos = 0; // Current position in styles.\n\n var tokenMatch = void 0; // eslint-disable-line @rushstack/no-null\n\n while (tokenMatch = _themeTokenRegex.exec(styles)) {\n var matchIndex = tokenMatch.index;\n\n if (matchIndex > pos) {\n result.push({\n rawString: styles.substring(pos, matchIndex)\n });\n }\n\n result.push({\n theme: tokenMatch[1],\n defaultValue: tokenMatch[2] // May be undefined\n\n }); // index of the first character after the current match\n\n pos = _themeTokenRegex.lastIndex;\n } // Push the rest of the string after the last match.\n\n\n result.push({\n rawString: styles.substring(pos)\n });\n }\n\n return result;\n}\n/**\n * Registers a set of style text. If it is registered too early, we will register it when the\n * window.load event is fired.\n * @param {ThemableArray} styleArray Array of IThemingInstruction objects to register.\n * @param {IStyleRecord} styleRecord May specify a style Element to update.\n */\n\nfunction registerStyles(styleArray) {\n if (typeof document === 'undefined') {\n return;\n }\n\n var head = document.getElementsByTagName('head')[0];\n var styleElement = document.createElement('style');\n\n var _a = resolveThemableArray(styleArray),\n styleString = _a.styleString,\n themable = _a.themable;\n\n styleElement.setAttribute('data-load-themed-styles', 'true');\n\n if (_styleNonce) {\n styleElement.setAttribute('nonce', _styleNonce);\n }\n\n styleElement.appendChild(document.createTextNode(styleString));\n _themeState.perf.count++;\n head.appendChild(styleElement);\n var ev = document.createEvent('HTMLEvents');\n ev.initEvent('styleinsert', true\n /* bubbleEvent */\n , false\n /* cancelable */\n );\n ev.args = {\n newStyle: styleElement\n };\n document.dispatchEvent(ev);\n var record = {\n styleElement: styleElement,\n themableStyle: styleArray\n };\n\n if (themable) {\n _themeState.registeredThemableStyles.push(record);\n } else {\n _themeState.registeredStyles.push(record);\n }\n}","import { getParent } from './getParent';\n/**\n * Determines whether or not a parent element contains a given child element.\n * If `allowVirtualParents` is true, this method may return `true` if the child\n * has the parent in its virtual element hierarchy.\n *\n * @public\n */\n\nexport function elementContains(parent, child, allowVirtualParents) {\n if (allowVirtualParents === void 0) {\n allowVirtualParents = true;\n }\n\n var isContained = false;\n\n if (parent && child) {\n if (allowVirtualParents) {\n isContained = false;\n\n while (child) {\n var nextParent = getParent(child);\n\n if (nextParent === parent) {\n isContained = true;\n break;\n }\n\n child = nextParent;\n }\n } else if (parent.contains) {\n isContained = parent.contains(child);\n }\n }\n\n return isContained;\n}","/* tslint:disable:no-string-literal */\nimport { assign } from './object';\n/** An instance of EventGroup allows anything with a handle to it to trigger events on it.\n * If the target is an HTMLElement, the event will be attached to the element and can be\n * triggered as usual (like clicking for onclick).\n * The event can be triggered by calling EventGroup.raise() here. If the target is an\n * HTMLElement, the event gets raised and is handled by the browser. Otherwise, it gets\n * handled here in EventGroup, and the handler is called in the context of the parent\n * (which is passed in in the constructor).\n *\n * @public\n * {@docCategory EventGroup}\n */\n\nvar EventGroup =\n/** @class */\nfunction () {\n /** parent: the context in which events attached to non-HTMLElements are called */\n // tslint:disable-next-line:no-any\n function EventGroup(parent) {\n this._id = EventGroup._uniqueId++;\n this._parent = parent;\n this._eventRecords = [];\n }\n /** For IE8, bubbleEvent is ignored here and must be dealt with by the handler.\n * Events raised here by default have bubbling set to false and cancelable set to true.\n * This applies also to built-in events being raised manually here on HTMLElements,\n * which may lead to unexpected behavior if it differs from the defaults.\n *\n */\n\n\n EventGroup.raise = function ( // tslint:disable-next-line:no-any\n target, eventName, // tslint:disable-next-line:no-any\n eventArgs, bubbleEvent) {\n var retVal;\n\n if (EventGroup._isElement(target)) {\n if (typeof document !== 'undefined' && document.createEvent) {\n var ev = document.createEvent('HTMLEvents');\n ev.initEvent(eventName, bubbleEvent || false, true);\n assign(ev, eventArgs);\n retVal = target.dispatchEvent(ev); // tslint:disable-next-line:no-any\n } else if (typeof document !== 'undefined' && document['createEventObject']) {\n // IE8\n // tslint:disable-next-line:no-any\n var evObj = document['createEventObject'](eventArgs); // cannot set cancelBubble on evObj, fireEvent will overwrite it\n\n target.fireEvent('on' + eventName, evObj);\n }\n } else {\n while (target && retVal !== false) {\n var events = target.__events__;\n var eventRecords = events ? events[eventName] : null;\n\n if (eventRecords) {\n for (var id in eventRecords) {\n if (eventRecords.hasOwnProperty(id)) {\n var eventRecordList = eventRecords[id];\n\n for (var listIndex = 0; retVal !== false && listIndex < eventRecordList.length; listIndex++) {\n var record = eventRecordList[listIndex];\n\n if (record.objectCallback) {\n retVal = record.objectCallback.call(record.parent, eventArgs);\n }\n }\n }\n }\n } // If the target has a parent, bubble the event up.\n\n\n target = bubbleEvent ? target.parent : null;\n }\n }\n\n return retVal;\n }; // tslint:disable-next-line:no-any\n\n\n EventGroup.isObserved = function (target, eventName) {\n var events = target && target.__events__;\n return !!events && !!events[eventName];\n };\n /** Check to see if the target has declared support of the given event. */\n // tslint:disable-next-line:no-any\n\n\n EventGroup.isDeclared = function (target, eventName) {\n var declaredEvents = target && target.__declaredEvents;\n return !!declaredEvents && !!declaredEvents[eventName];\n }; // tslint:disable-next-line:no-any\n\n\n EventGroup.stopPropagation = function (event) {\n if (event.stopPropagation) {\n event.stopPropagation();\n } else {\n // IE8\n event.cancelBubble = true;\n }\n };\n\n EventGroup._isElement = function (target) {\n return !!target && (!!target.addEventListener || typeof HTMLElement !== 'undefined' && target instanceof HTMLElement);\n };\n\n EventGroup.prototype.dispose = function () {\n if (!this._isDisposed) {\n this._isDisposed = true;\n this.off();\n this._parent = null;\n }\n };\n /** On the target, attach a set of events, where the events object is a name to function mapping. */\n // tslint:disable-next-line:no-any\n\n\n EventGroup.prototype.onAll = function (target, events, useCapture) {\n for (var eventName in events) {\n if (events.hasOwnProperty(eventName)) {\n this.on(target, eventName, events[eventName], useCapture);\n }\n }\n };\n /** On the target, attach an event whose handler will be called in the context of the parent\n * of this instance of EventGroup.\n */\n // tslint:disable-next-line:no-any\n\n\n EventGroup.prototype.on = function (target, eventName, callback, options) {\n var _this = this;\n\n if (eventName.indexOf(',') > -1) {\n var events = eventName.split(/[ ,]+/);\n\n for (var i = 0; i < events.length; i++) {\n this.on(target, events[i], callback, options);\n }\n } else {\n var parent_1 = this._parent;\n var eventRecord = {\n target: target,\n eventName: eventName,\n parent: parent_1,\n callback: callback,\n options: options\n }; // Initialize and wire up the record on the target, so that it can call the callback if the event fires.\n\n var events = target.__events__ = target.__events__ || {};\n events[eventName] = events[eventName] || {\n count: 0\n };\n events[eventName][this._id] = events[eventName][this._id] || [];\n\n events[eventName][this._id].push(eventRecord);\n\n events[eventName].count++;\n\n if (EventGroup._isElement(target)) {\n // tslint:disable-next-line:no-any\n var processElementEvent = function processElementEvent() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (_this._isDisposed) {\n return;\n }\n\n var result;\n\n try {\n result = callback.apply(parent_1, args);\n\n if (result === false && args[0]) {\n var e = args[0];\n\n if (e.preventDefault) {\n e.preventDefault();\n }\n\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n\n e.cancelBubble = true;\n }\n } catch (e) {\n /* ErrorHelper.log(e); */\n }\n\n return result;\n };\n\n eventRecord.elementCallback = processElementEvent;\n\n if (target.addEventListener) {\n /* tslint:disable:ban-native-functions */\n target.addEventListener(eventName, processElementEvent, options);\n /* tslint:enable:ban-native-functions */\n } else if (target.attachEvent) {\n // IE8\n target.attachEvent('on' + eventName, processElementEvent);\n }\n } else {\n // tslint:disable-next-line:no-any\n var processObjectEvent = function processObjectEvent() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (_this._isDisposed) {\n return;\n }\n\n return callback.apply(parent_1, args);\n };\n\n eventRecord.objectCallback = processObjectEvent;\n } // Remember the record locally, so that it can be removed.\n\n\n this._eventRecords.push(eventRecord);\n }\n }; // tslint:disable-next-line:no-any\n\n\n EventGroup.prototype.off = function (target, eventName, callback, options) {\n for (var i = 0; i < this._eventRecords.length; i++) {\n var eventRecord = this._eventRecords[i];\n\n if ((!target || target === eventRecord.target) && (!eventName || eventName === eventRecord.eventName) && (!callback || callback === eventRecord.callback) && (typeof options !== 'boolean' || options === eventRecord.options)) {\n var events = eventRecord.target.__events__;\n var targetArrayLookup = events[eventRecord.eventName];\n var targetArray = targetArrayLookup ? targetArrayLookup[this._id] : null; // We may have already target's entries, so check for null.\n\n if (targetArray) {\n if (targetArray.length === 1 || !callback) {\n targetArrayLookup.count -= targetArray.length;\n delete events[eventRecord.eventName][this._id];\n } else {\n targetArrayLookup.count--;\n targetArray.splice(targetArray.indexOf(eventRecord), 1);\n }\n\n if (!targetArrayLookup.count) {\n delete events[eventRecord.eventName];\n }\n }\n\n if (eventRecord.elementCallback) {\n if (eventRecord.target.removeEventListener) {\n eventRecord.target.removeEventListener(eventRecord.eventName, eventRecord.elementCallback, eventRecord.options);\n } else if (eventRecord.target.detachEvent) {\n // IE8\n eventRecord.target.detachEvent('on' + eventRecord.eventName, eventRecord.elementCallback);\n }\n }\n\n this._eventRecords.splice(i--, 1);\n }\n }\n };\n /** Trigger the given event in the context of this instance of EventGroup. */\n // tslint:disable-next-line:no-any\n\n\n EventGroup.prototype.raise = function (eventName, eventArgs, bubbleEvent) {\n return EventGroup.raise(this._parent, eventName, eventArgs, bubbleEvent);\n };\n /** Declare an event as being supported by this instance of EventGroup. */\n\n\n EventGroup.prototype.declare = function (event) {\n var declaredEvents = this._parent.__declaredEvents = this._parent.__declaredEvents || {};\n\n if (typeof event === 'string') {\n declaredEvents[event] = true;\n } else {\n for (var i = 0; i < event.length; i++) {\n declaredEvents[event[i]] = true;\n }\n }\n }; // tslint:disable-next-line:no-inferrable-types\n\n\n EventGroup._uniqueId = 0;\n return EventGroup;\n}();\n\nexport { EventGroup };","var _a;\n\nimport { KeyCodes } from './KeyCodes';\nvar DirectionalKeyCodes = (_a = {}, _a[KeyCodes.up] = 1, _a[KeyCodes.down] = 1, _a[KeyCodes.left] = 1, _a[KeyCodes.right] = 1, _a[KeyCodes.home] = 1, _a[KeyCodes.end] = 1, _a[KeyCodes.tab] = 1, _a[KeyCodes.pageUp] = 1, _a[KeyCodes.pageDown] = 1, _a);\n/**\n * Returns true if the keycode is a directional keyboard key.\n */\n\nexport function isDirectionalKeyCode(which) {\n return !!DirectionalKeyCodes[which];\n}\n/**\n * Adds a keycode to the list of keys that, when pressed, should cause the focus outlines to be visible.\n * This can be used to add global shortcut keys that directionally move from section to section within\n * an app or between focus trap zones.\n */\n\nexport function addDirectionalKeyCode(which) {\n DirectionalKeyCodes[which] = 1;\n}","/**\n * Allows you to hoist static functions in components.\n * Created for the purpose of fixing broken static functions in classes\n * that utilize decorators.\n *\n * @public\n * @param source - The object where the methods are hoisted from.\n * @param dest - The object to hoist the methods onto.\n * @returns The dest object with methods added\n */\nexport function hoistStatics(source, dest) {\n for (var name_1 in source) {\n if (source.hasOwnProperty(name_1)) {\n // tslint:disable-next-line:no-any\n dest[name_1] = source[name_1];\n }\n }\n\n return dest;\n}","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\nimport { classNames, MS_ICON } from './Icon.styles';\nimport { css, getNativeProps, htmlElementProperties, memoizeFunction } from '../../Utilities';\nimport { getIcon } from '../../Styling';\nexport var getIconContent = memoizeFunction(function (iconName) {\n var _a = getIcon(iconName) || {\n subset: {},\n code: undefined\n },\n code = _a.code,\n subset = _a.subset;\n\n if (!code) {\n return null;\n }\n\n return {\n children: code,\n iconClassName: subset.className,\n fontFamily: subset.fontFace && subset.fontFace.fontFamily\n };\n}, undefined, true\n/*ignoreNullOrUndefinedResult */\n);\n/**\n * Fast icon component which only supports font glyphs (not images) and can't be targeted by customizations.\n * To style the icon, use `className` or reference `ms-Icon` in CSS.\n * {@docCategory Icon}\n */\n\nexport var FontIcon = function FontIcon(props) {\n var iconName = props.iconName,\n className = props.className,\n _a = props.style,\n style = _a === void 0 ? {} : _a;\n var iconContent = getIconContent(iconName) || {};\n var iconClassName = iconContent.iconClassName,\n children = iconContent.children,\n fontFamily = iconContent.fontFamily;\n var nativeProps = getNativeProps(props, htmlElementProperties);\n var containerProps = props['aria-label'] ? {} : {\n role: 'presentation',\n 'aria-hidden': true\n };\n return React.createElement(\"i\", tslib_1.__assign({\n \"data-icon-name\": iconName\n }, containerProps, nativeProps, {\n className: css(MS_ICON, classNames.root, iconClassName, !iconName && classNames.placeholder, className),\n // Apply the font family this way to ensure it doesn't get overridden by Fabric Core ms-Icon styles\n // https://github.com/OfficeDev/office-ui-fabric-react/issues/10449\n style: tslib_1.__assign({\n fontFamily: fontFamily\n }, style)\n }), children);\n};\n/**\n * Memoized helper for rendering a FontIcon.\n * @param iconName - The name of the icon to use from the icon font.\n * @param className - Class name for styling the icon.\n * @param ariaLabel - Label for the icon for the benefit of screen readers.\n * {@docCategory Icon}\n */\n\nexport var getFontIcon = memoizeFunction(function (iconName, className, ariaLabel) {\n return FontIcon({\n iconName: iconName,\n className: className,\n 'aria-label': ariaLabel\n });\n});","(function (a, b) {\n if (\"function\" == typeof define && define.amd) define([], b);else if (\"undefined\" != typeof exports) b();else {\n b(), a.FileSaver = {\n exports: {}\n }.exports;\n }\n})(this, function () {\n \"use strict\";\n\n function b(a, b) {\n return \"undefined\" == typeof b ? b = {\n autoBom: !1\n } : \"object\" != typeof b && (console.warn(\"Deprecated: Expected third argument to be a object\"), b = {\n autoBom: !b\n }), b.autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type) ? new Blob([\"\\uFEFF\", a], {\n type: a.type\n }) : a;\n }\n\n function c(b, c, d) {\n var e = new XMLHttpRequest();\n e.open(\"GET\", b), e.responseType = \"blob\", e.onload = function () {\n a(e.response, c, d);\n }, e.onerror = function () {\n console.error(\"could not download file\");\n }, e.send();\n }\n\n function d(a) {\n var b = new XMLHttpRequest();\n b.open(\"HEAD\", a, !1);\n\n try {\n b.send();\n } catch (a) {}\n\n return 200 <= b.status && 299 >= b.status;\n }\n\n function e(a) {\n try {\n a.dispatchEvent(new MouseEvent(\"click\"));\n } catch (c) {\n var b = document.createEvent(\"MouseEvents\");\n b.initMouseEvent(\"click\", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), a.dispatchEvent(b);\n }\n }\n\n var f = \"object\" == typeof window && window.window === window ? window : \"object\" == typeof self && self.self === self ? self : \"object\" == typeof global && global.global === global ? global : void 0,\n a = f.saveAs || (\"object\" != typeof window || window !== f ? function () {} : \"download\" in HTMLAnchorElement.prototype ? function (b, g, h) {\n var i = f.URL || f.webkitURL,\n j = document.createElement(\"a\");\n g = g || b.name || \"download\", j.download = g, j.rel = \"noopener\", \"string\" == typeof b ? (j.href = b, j.origin === location.origin ? e(j) : d(j.href) ? c(b, g, h) : e(j, j.target = \"_blank\")) : (j.href = i.createObjectURL(b), setTimeout(function () {\n i.revokeObjectURL(j.href);\n }, 4E4), setTimeout(function () {\n e(j);\n }, 0));\n } : \"msSaveOrOpenBlob\" in navigator ? function (f, g, h) {\n if (g = g || f.name || \"download\", \"string\" != typeof f) navigator.msSaveOrOpenBlob(b(f, h), g);else if (d(f)) c(f, g, h);else {\n var i = document.createElement(\"a\");\n i.href = f, i.target = \"_blank\", setTimeout(function () {\n e(i);\n });\n }\n } : function (a, b, d, e) {\n if (e = e || open(\"\", \"_blank\"), e && (e.document.title = e.document.body.innerText = \"downloading...\"), \"string\" == typeof a) return c(a, b, d);\n var g = \"application/octet-stream\" === a.type,\n h = /constructor/i.test(f.HTMLElement) || f.safari,\n i = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n\n if ((i || g && h) && \"object\" == typeof FileReader) {\n var j = new FileReader();\n j.onloadend = function () {\n var a = j.result;\n a = i ? a : a.replace(/^data:[^;]*;/, \"data:attachment/file;\"), e ? e.location.href = a : location = a, e = null;\n }, j.readAsDataURL(a);\n } else {\n var k = f.URL || f.webkitURL,\n l = k.createObjectURL(a);\n e ? e.location = l : location.href = l, e = null, setTimeout(function () {\n k.revokeObjectURL(l);\n }, 4E4);\n }\n });\n f.saveAs = a.saveAs = a, \"undefined\" != typeof module && (module.exports = a);\n});","import { KeyCodes } from './KeyCodes';\nimport { getDocument } from './dom/getDocument';\nimport { getItem, setItem } from './sessionStorage';\nimport { setRTL as mergeStylesSetRTL } from '@uifabric/merge-styles';\nvar RTL_LOCAL_STORAGE_KEY = 'isRTL'; // Default to undefined so that we initialize on first read.\n\nvar _isRTL;\n/**\n * Gets the rtl state of the page (returns true if in rtl.)\n */\n\n\nexport function getRTL(theme) {\n if (theme === void 0) {\n theme = {};\n }\n\n if (theme.rtl !== undefined) {\n return theme.rtl;\n }\n\n if (_isRTL === undefined) {\n // Fabric supports persisting the RTL setting between page refreshes via session storage\n var savedRTL = getItem(RTL_LOCAL_STORAGE_KEY);\n\n if (savedRTL !== null) {\n _isRTL = savedRTL === '1';\n setRTL(_isRTL);\n }\n\n var doc = getDocument();\n\n if (_isRTL === undefined && doc) {\n _isRTL = (doc.body && doc.body.getAttribute('dir') || doc.documentElement.getAttribute('dir')) === 'rtl';\n mergeStylesSetRTL(_isRTL);\n }\n }\n\n return !!_isRTL;\n}\n/**\n * Sets the rtl state of the page (by adjusting the dir attribute of the html element.)\n */\n\nexport function setRTL(isRTL, persistSetting) {\n if (persistSetting === void 0) {\n persistSetting = false;\n }\n\n var doc = getDocument();\n\n if (doc) {\n doc.documentElement.setAttribute('dir', isRTL ? 'rtl' : 'ltr');\n }\n\n if (persistSetting) {\n setItem(RTL_LOCAL_STORAGE_KEY, isRTL ? '1' : '0');\n }\n\n _isRTL = isRTL;\n mergeStylesSetRTL(_isRTL);\n}\n/**\n * Returns the given key, but flips right/left arrows if necessary.\n */\n\nexport function getRTLSafeKeyCode(key, theme) {\n if (theme === void 0) {\n theme = {};\n }\n\n if (getRTL(theme)) {\n if (key === KeyCodes.left) {\n key = KeyCodes.right;\n } else if (key === KeyCodes.right) {\n key = KeyCodes.left;\n }\n }\n\n return key;\n}","/**\n * Fetches an item from session storage without throwing an exception\n * @param key The key of the item to fetch from session storage\n */\nexport function getItem(key) {\n var result = null;\n\n try {\n result = window.sessionStorage.getItem(key);\n } catch (e) {\n /* Eat the exception */\n }\n\n return result;\n}\n/**\n * Inserts an item into session storage without throwing an exception\n * @param key The key of the item to add to session storage\n * @param data The data to put into session storage\n */\n\nexport function setItem(key, data) {\n try {\n window.sessionStorage.setItem(key, data);\n } catch (e) {\n /* Eat the exception */\n }\n}","/** @license React v16.12.0\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar h = require(\"object-assign\"),\n n = \"function\" === typeof Symbol && Symbol.for,\n p = n ? Symbol.for(\"react.element\") : 60103,\n q = n ? Symbol.for(\"react.portal\") : 60106,\n r = n ? Symbol.for(\"react.fragment\") : 60107,\n t = n ? Symbol.for(\"react.strict_mode\") : 60108,\n u = n ? Symbol.for(\"react.profiler\") : 60114,\n v = n ? Symbol.for(\"react.provider\") : 60109,\n w = n ? Symbol.for(\"react.context\") : 60110,\n x = n ? Symbol.for(\"react.forward_ref\") : 60112,\n y = n ? Symbol.for(\"react.suspense\") : 60113;\n\nn && Symbol.for(\"react.suspense_list\");\nvar z = n ? Symbol.for(\"react.memo\") : 60115,\n aa = n ? Symbol.for(\"react.lazy\") : 60116;\nn && Symbol.for(\"react.fundamental\");\nn && Symbol.for(\"react.responder\");\nn && Symbol.for(\"react.scope\");\nvar A = \"function\" === typeof Symbol && Symbol.iterator;\n\nfunction B(a) {\n for (var b = \"https://reactjs.org/docs/error-decoder.html?invariant=\" + a, c = 1; c < arguments.length; c++) {\n b += \"&args[]=\" + encodeURIComponent(arguments[c]);\n }\n\n return \"Minified React error #\" + a + \"; visit \" + b + \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\";\n}\n\nvar C = {\n isMounted: function isMounted() {\n return !1;\n },\n enqueueForceUpdate: function enqueueForceUpdate() {},\n enqueueReplaceState: function enqueueReplaceState() {},\n enqueueSetState: function enqueueSetState() {}\n},\n D = {};\n\nfunction E(a, b, c) {\n this.props = a;\n this.context = b;\n this.refs = D;\n this.updater = c || C;\n}\n\nE.prototype.isReactComponent = {};\n\nE.prototype.setState = function (a, b) {\n if (\"object\" !== typeof a && \"function\" !== typeof a && null != a) throw Error(B(85));\n this.updater.enqueueSetState(this, a, b, \"setState\");\n};\n\nE.prototype.forceUpdate = function (a) {\n this.updater.enqueueForceUpdate(this, a, \"forceUpdate\");\n};\n\nfunction F() {}\n\nF.prototype = E.prototype;\n\nfunction G(a, b, c) {\n this.props = a;\n this.context = b;\n this.refs = D;\n this.updater = c || C;\n}\n\nvar H = G.prototype = new F();\nH.constructor = G;\nh(H, E.prototype);\nH.isPureReactComponent = !0;\nvar I = {\n current: null\n},\n J = {\n current: null\n},\n K = Object.prototype.hasOwnProperty,\n L = {\n key: !0,\n ref: !0,\n __self: !0,\n __source: !0\n};\n\nfunction M(a, b, c) {\n var e,\n d = {},\n g = null,\n l = null;\n if (null != b) for (e in void 0 !== b.ref && (l = b.ref), void 0 !== b.key && (g = \"\" + b.key), b) {\n K.call(b, e) && !L.hasOwnProperty(e) && (d[e] = b[e]);\n }\n var f = arguments.length - 2;\n if (1 === f) d.children = c;else if (1 < f) {\n for (var k = Array(f), m = 0; m < f; m++) {\n k[m] = arguments[m + 2];\n }\n\n d.children = k;\n }\n if (a && a.defaultProps) for (e in f = a.defaultProps, f) {\n void 0 === d[e] && (d[e] = f[e]);\n }\n return {\n $$typeof: p,\n type: a,\n key: g,\n ref: l,\n props: d,\n _owner: J.current\n };\n}\n\nfunction ba(a, b) {\n return {\n $$typeof: p,\n type: a.type,\n key: b,\n ref: a.ref,\n props: a.props,\n _owner: a._owner\n };\n}\n\nfunction N(a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === p;\n}\n\nfunction escape(a) {\n var b = {\n \"=\": \"=0\",\n \":\": \"=2\"\n };\n return \"$\" + (\"\" + a).replace(/[=:]/g, function (a) {\n return b[a];\n });\n}\n\nvar O = /\\/+/g,\n P = [];\n\nfunction Q(a, b, c, e) {\n if (P.length) {\n var d = P.pop();\n d.result = a;\n d.keyPrefix = b;\n d.func = c;\n d.context = e;\n d.count = 0;\n return d;\n }\n\n return {\n result: a,\n keyPrefix: b,\n func: c,\n context: e,\n count: 0\n };\n}\n\nfunction R(a) {\n a.result = null;\n a.keyPrefix = null;\n a.func = null;\n a.context = null;\n a.count = 0;\n 10 > P.length && P.push(a);\n}\n\nfunction S(a, b, c, e) {\n var d = typeof a;\n if (\"undefined\" === d || \"boolean\" === d) a = null;\n var g = !1;\n if (null === a) g = !0;else switch (d) {\n case \"string\":\n case \"number\":\n g = !0;\n break;\n\n case \"object\":\n switch (a.$$typeof) {\n case p:\n case q:\n g = !0;\n }\n\n }\n if (g) return c(e, a, \"\" === b ? \".\" + T(a, 0) : b), 1;\n g = 0;\n b = \"\" === b ? \".\" : b + \":\";\n if (Array.isArray(a)) for (var l = 0; l < a.length; l++) {\n d = a[l];\n var f = b + T(d, l);\n g += S(d, f, c, e);\n } else if (null === a || \"object\" !== typeof a ? f = null : (f = A && a[A] || a[\"@@iterator\"], f = \"function\" === typeof f ? f : null), \"function\" === typeof f) for (a = f.call(a), l = 0; !(d = a.next()).done;) {\n d = d.value, f = b + T(d, l++), g += S(d, f, c, e);\n } else if (\"object\" === d) throw c = \"\" + a, Error(B(31, \"[object Object]\" === c ? \"object with keys {\" + Object.keys(a).join(\", \") + \"}\" : c, \"\"));\n return g;\n}\n\nfunction U(a, b, c) {\n return null == a ? 0 : S(a, \"\", b, c);\n}\n\nfunction T(a, b) {\n return \"object\" === typeof a && null !== a && null != a.key ? escape(a.key) : b.toString(36);\n}\n\nfunction ca(a, b) {\n a.func.call(a.context, b, a.count++);\n}\n\nfunction da(a, b, c) {\n var e = a.result,\n d = a.keyPrefix;\n a = a.func.call(a.context, b, a.count++);\n Array.isArray(a) ? V(a, e, c, function (a) {\n return a;\n }) : null != a && (N(a) && (a = ba(a, d + (!a.key || b && b.key === a.key ? \"\" : (\"\" + a.key).replace(O, \"$&/\") + \"/\") + c)), e.push(a));\n}\n\nfunction V(a, b, c, e, d) {\n var g = \"\";\n null != c && (g = (\"\" + c).replace(O, \"$&/\") + \"/\");\n b = Q(b, g, e, d);\n U(a, da, b);\n R(b);\n}\n\nfunction W() {\n var a = I.current;\n if (null === a) throw Error(B(321));\n return a;\n}\n\nvar X = {\n Children: {\n map: function map(a, b, c) {\n if (null == a) return a;\n var e = [];\n V(a, e, null, b, c);\n return e;\n },\n forEach: function forEach(a, b, c) {\n if (null == a) return a;\n b = Q(null, null, b, c);\n U(a, ca, b);\n R(b);\n },\n count: function count(a) {\n return U(a, function () {\n return null;\n }, null);\n },\n toArray: function toArray(a) {\n var b = [];\n V(a, b, null, function (a) {\n return a;\n });\n return b;\n },\n only: function only(a) {\n if (!N(a)) throw Error(B(143));\n return a;\n }\n },\n createRef: function createRef() {\n return {\n current: null\n };\n },\n Component: E,\n PureComponent: G,\n createContext: function createContext(a, b) {\n void 0 === b && (b = null);\n a = {\n $$typeof: w,\n _calculateChangedBits: b,\n _currentValue: a,\n _currentValue2: a,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n a.Provider = {\n $$typeof: v,\n _context: a\n };\n return a.Consumer = a;\n },\n forwardRef: function forwardRef(a) {\n return {\n $$typeof: x,\n render: a\n };\n },\n lazy: function lazy(a) {\n return {\n $$typeof: aa,\n _ctor: a,\n _status: -1,\n _result: null\n };\n },\n memo: function memo(a, b) {\n return {\n $$typeof: z,\n type: a,\n compare: void 0 === b ? null : b\n };\n },\n useCallback: function useCallback(a, b) {\n return W().useCallback(a, b);\n },\n useContext: function useContext(a, b) {\n return W().useContext(a, b);\n },\n useEffect: function useEffect(a, b) {\n return W().useEffect(a, b);\n },\n useImperativeHandle: function useImperativeHandle(a, b, c) {\n return W().useImperativeHandle(a, b, c);\n },\n useDebugValue: function useDebugValue() {},\n useLayoutEffect: function useLayoutEffect(a, b) {\n return W().useLayoutEffect(a, b);\n },\n useMemo: function useMemo(a, b) {\n return W().useMemo(a, b);\n },\n useReducer: function useReducer(a, b, c) {\n return W().useReducer(a, b, c);\n },\n useRef: function useRef(a) {\n return W().useRef(a);\n },\n useState: function useState(a) {\n return W().useState(a);\n },\n Fragment: r,\n Profiler: u,\n StrictMode: t,\n Suspense: y,\n createElement: M,\n cloneElement: function cloneElement(a, b, c) {\n if (null === a || void 0 === a) throw Error(B(267, a));\n var e = h({}, a.props),\n d = a.key,\n g = a.ref,\n l = a._owner;\n\n if (null != b) {\n void 0 !== b.ref && (g = b.ref, l = J.current);\n void 0 !== b.key && (d = \"\" + b.key);\n if (a.type && a.type.defaultProps) var f = a.type.defaultProps;\n\n for (k in b) {\n K.call(b, k) && !L.hasOwnProperty(k) && (e[k] = void 0 === b[k] && void 0 !== f ? f[k] : b[k]);\n }\n }\n\n var k = arguments.length - 2;\n if (1 === k) e.children = c;else if (1 < k) {\n f = Array(k);\n\n for (var m = 0; m < k; m++) {\n f[m] = arguments[m + 2];\n }\n\n e.children = f;\n }\n return {\n $$typeof: p,\n type: a.type,\n key: d,\n ref: g,\n props: e,\n _owner: l\n };\n },\n createFactory: function createFactory(a) {\n var b = M.bind(null, a);\n b.type = a;\n return b;\n },\n isValidElement: N,\n version: \"16.12.0\",\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {\n ReactCurrentDispatcher: I,\n ReactCurrentBatchConfig: {\n suspense: null\n },\n ReactCurrentOwner: J,\n IsSomeRendererActing: {\n current: !1\n },\n assign: h\n }\n},\n Y = {\n default: X\n},\n Z = Y && X || Y;\nmodule.exports = Z.default || Z;","/** @license React v16.12.0\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';\n\nvar aa = require(\"react\"),\n n = require(\"object-assign\"),\n q = require(\"scheduler\");\n\nfunction u(a) {\n for (var b = \"https://reactjs.org/docs/error-decoder.html?invariant=\" + a, c = 1; c < arguments.length; c++) {\n b += \"&args[]=\" + encodeURIComponent(arguments[c]);\n }\n\n return \"Minified React error #\" + a + \"; visit \" + b + \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\";\n}\n\nif (!aa) throw Error(u(227));\nvar ba = null,\n ca = {};\n\nfunction da() {\n if (ba) for (var a in ca) {\n var b = ca[a],\n c = ba.indexOf(a);\n if (!(-1 < c)) throw Error(u(96, a));\n\n if (!ea[c]) {\n if (!b.extractEvents) throw Error(u(97, a));\n ea[c] = b;\n c = b.eventTypes;\n\n for (var d in c) {\n var e = void 0;\n var f = c[d],\n g = b,\n h = d;\n if (fa.hasOwnProperty(h)) throw Error(u(99, h));\n fa[h] = f;\n var k = f.phasedRegistrationNames;\n\n if (k) {\n for (e in k) {\n k.hasOwnProperty(e) && ha(k[e], g, h);\n }\n\n e = !0;\n } else f.registrationName ? (ha(f.registrationName, g, h), e = !0) : e = !1;\n\n if (!e) throw Error(u(98, d, a));\n }\n }\n }\n}\n\nfunction ha(a, b, c) {\n if (ia[a]) throw Error(u(100, a));\n ia[a] = b;\n ja[a] = b.eventTypes[c].dependencies;\n}\n\nvar ea = [],\n fa = {},\n ia = {},\n ja = {};\n\nfunction ka(a, b, c, d, e, f, g, h, k) {\n var l = Array.prototype.slice.call(arguments, 3);\n\n try {\n b.apply(c, l);\n } catch (m) {\n this.onError(m);\n }\n}\n\nvar la = !1,\n ma = null,\n na = !1,\n oa = null,\n pa = {\n onError: function onError(a) {\n la = !0;\n ma = a;\n }\n};\n\nfunction qa(a, b, c, d, e, f, g, h, k) {\n la = !1;\n ma = null;\n ka.apply(pa, arguments);\n}\n\nfunction ra(a, b, c, d, e, f, g, h, k) {\n qa.apply(this, arguments);\n\n if (la) {\n if (la) {\n var l = ma;\n la = !1;\n ma = null;\n } else throw Error(u(198));\n\n na || (na = !0, oa = l);\n }\n}\n\nvar sa = null,\n ua = null,\n va = null;\n\nfunction wa(a, b, c) {\n var d = a.type || \"unknown-event\";\n a.currentTarget = va(c);\n ra(d, b, void 0, a);\n a.currentTarget = null;\n}\n\nfunction xa(a, b) {\n if (null == b) throw Error(u(30));\n if (null == a) return b;\n\n if (Array.isArray(a)) {\n if (Array.isArray(b)) return a.push.apply(a, b), a;\n a.push(b);\n return a;\n }\n\n return Array.isArray(b) ? [a].concat(b) : [a, b];\n}\n\nfunction ya(a, b, c) {\n Array.isArray(a) ? a.forEach(b, c) : a && b.call(c, a);\n}\n\nvar za = null;\n\nfunction Aa(a) {\n if (a) {\n var b = a._dispatchListeners,\n c = a._dispatchInstances;\n if (Array.isArray(b)) for (var d = 0; d < b.length && !a.isPropagationStopped(); d++) {\n wa(a, b[d], c[d]);\n } else b && wa(a, b, c);\n a._dispatchListeners = null;\n a._dispatchInstances = null;\n a.isPersistent() || a.constructor.release(a);\n }\n}\n\nfunction Ba(a) {\n null !== a && (za = xa(za, a));\n a = za;\n za = null;\n\n if (a) {\n ya(a, Aa);\n if (za) throw Error(u(95));\n if (na) throw a = oa, na = !1, oa = null, a;\n }\n}\n\nvar Ca = {\n injectEventPluginOrder: function injectEventPluginOrder(a) {\n if (ba) throw Error(u(101));\n ba = Array.prototype.slice.call(a);\n da();\n },\n injectEventPluginsByName: function injectEventPluginsByName(a) {\n var b = !1,\n c;\n\n for (c in a) {\n if (a.hasOwnProperty(c)) {\n var d = a[c];\n\n if (!ca.hasOwnProperty(c) || ca[c] !== d) {\n if (ca[c]) throw Error(u(102, c));\n ca[c] = d;\n b = !0;\n }\n }\n }\n\n b && da();\n }\n};\n\nfunction Da(a, b) {\n var c = a.stateNode;\n if (!c) return null;\n var d = sa(c);\n if (!d) return null;\n c = d[b];\n\n a: switch (b) {\n case \"onClick\":\n case \"onClickCapture\":\n case \"onDoubleClick\":\n case \"onDoubleClickCapture\":\n case \"onMouseDown\":\n case \"onMouseDownCapture\":\n case \"onMouseMove\":\n case \"onMouseMoveCapture\":\n case \"onMouseUp\":\n case \"onMouseUpCapture\":\n (d = !d.disabled) || (a = a.type, d = !(\"button\" === a || \"input\" === a || \"select\" === a || \"textarea\" === a));\n a = !d;\n break a;\n\n default:\n a = !1;\n }\n\n if (a) return null;\n if (c && \"function\" !== typeof c) throw Error(u(231, b, typeof c));\n return c;\n}\n\nvar Ea = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nEa.hasOwnProperty(\"ReactCurrentDispatcher\") || (Ea.ReactCurrentDispatcher = {\n current: null\n});\nEa.hasOwnProperty(\"ReactCurrentBatchConfig\") || (Ea.ReactCurrentBatchConfig = {\n suspense: null\n});\nvar Fa = /^(.*)[\\\\\\/]/,\n w = \"function\" === typeof Symbol && Symbol.for,\n Ga = w ? Symbol.for(\"react.element\") : 60103,\n Ha = w ? Symbol.for(\"react.portal\") : 60106,\n Ia = w ? Symbol.for(\"react.fragment\") : 60107,\n Ja = w ? Symbol.for(\"react.strict_mode\") : 60108,\n Ka = w ? Symbol.for(\"react.profiler\") : 60114,\n La = w ? Symbol.for(\"react.provider\") : 60109,\n Ma = w ? Symbol.for(\"react.context\") : 60110,\n Na = w ? Symbol.for(\"react.concurrent_mode\") : 60111,\n Oa = w ? Symbol.for(\"react.forward_ref\") : 60112,\n Pa = w ? Symbol.for(\"react.suspense\") : 60113,\n Qa = w ? Symbol.for(\"react.suspense_list\") : 60120,\n Ra = w ? Symbol.for(\"react.memo\") : 60115,\n Sa = w ? Symbol.for(\"react.lazy\") : 60116;\nw && Symbol.for(\"react.fundamental\");\nw && Symbol.for(\"react.responder\");\nw && Symbol.for(\"react.scope\");\nvar Ta = \"function\" === typeof Symbol && Symbol.iterator;\n\nfunction Ua(a) {\n if (null === a || \"object\" !== typeof a) return null;\n a = Ta && a[Ta] || a[\"@@iterator\"];\n return \"function\" === typeof a ? a : null;\n}\n\nfunction Va(a) {\n if (-1 === a._status) {\n a._status = 0;\n var b = a._ctor;\n b = b();\n a._result = b;\n b.then(function (b) {\n 0 === a._status && (b = b.default, a._status = 1, a._result = b);\n }, function (b) {\n 0 === a._status && (a._status = 2, a._result = b);\n });\n }\n}\n\nfunction Wa(a) {\n if (null == a) return null;\n if (\"function\" === typeof a) return a.displayName || a.name || null;\n if (\"string\" === typeof a) return a;\n\n switch (a) {\n case Ia:\n return \"Fragment\";\n\n case Ha:\n return \"Portal\";\n\n case Ka:\n return \"Profiler\";\n\n case Ja:\n return \"StrictMode\";\n\n case Pa:\n return \"Suspense\";\n\n case Qa:\n return \"SuspenseList\";\n }\n\n if (\"object\" === typeof a) switch (a.$$typeof) {\n case Ma:\n return \"Context.Consumer\";\n\n case La:\n return \"Context.Provider\";\n\n case Oa:\n var b = a.render;\n b = b.displayName || b.name || \"\";\n return a.displayName || (\"\" !== b ? \"ForwardRef(\" + b + \")\" : \"ForwardRef\");\n\n case Ra:\n return Wa(a.type);\n\n case Sa:\n if (a = 1 === a._status ? a._result : null) return Wa(a);\n }\n return null;\n}\n\nfunction Xa(a) {\n var b = \"\";\n\n do {\n a: switch (a.tag) {\n case 3:\n case 4:\n case 6:\n case 7:\n case 10:\n case 9:\n var c = \"\";\n break a;\n\n default:\n var d = a._debugOwner,\n e = a._debugSource,\n f = Wa(a.type);\n c = null;\n d && (c = Wa(d.type));\n d = f;\n f = \"\";\n e ? f = \" (at \" + e.fileName.replace(Fa, \"\") + \":\" + e.lineNumber + \")\" : c && (f = \" (created by \" + c + \")\");\n c = \"\\n in \" + (d || \"Unknown\") + f;\n }\n\n b += c;\n a = a.return;\n } while (a);\n\n return b;\n}\n\nvar Ya = !(\"undefined\" === typeof window || \"undefined\" === typeof window.document || \"undefined\" === typeof window.document.createElement),\n Za = null,\n $a = null,\n ab = null;\n\nfunction bb(a) {\n if (a = ua(a)) {\n if (\"function\" !== typeof Za) throw Error(u(280));\n var b = sa(a.stateNode);\n Za(a.stateNode, a.type, b);\n }\n}\n\nfunction cb(a) {\n $a ? ab ? ab.push(a) : ab = [a] : $a = a;\n}\n\nfunction db() {\n if ($a) {\n var a = $a,\n b = ab;\n ab = $a = null;\n bb(a);\n if (b) for (a = 0; a < b.length; a++) {\n bb(b[a]);\n }\n }\n}\n\nfunction eb(a, b) {\n return a(b);\n}\n\nfunction fb(a, b, c, d) {\n return a(b, c, d);\n}\n\nfunction gb() {}\n\nvar hb = eb,\n ib = !1,\n jb = !1;\n\nfunction kb() {\n if (null !== $a || null !== ab) gb(), db();\n}\n\nnew Map();\nvar lb = /^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,\n mb = Object.prototype.hasOwnProperty,\n nb = {},\n ob = {};\n\nfunction pb(a) {\n if (mb.call(ob, a)) return !0;\n if (mb.call(nb, a)) return !1;\n if (lb.test(a)) return ob[a] = !0;\n nb[a] = !0;\n return !1;\n}\n\nfunction qb(a, b, c, d) {\n if (null !== c && 0 === c.type) return !1;\n\n switch (typeof b) {\n case \"function\":\n case \"symbol\":\n return !0;\n\n case \"boolean\":\n if (d) return !1;\n if (null !== c) return !c.acceptsBooleans;\n a = a.toLowerCase().slice(0, 5);\n return \"data-\" !== a && \"aria-\" !== a;\n\n default:\n return !1;\n }\n}\n\nfunction rb(a, b, c, d) {\n if (null === b || \"undefined\" === typeof b || qb(a, b, c, d)) return !0;\n if (d) return !1;\n if (null !== c) switch (c.type) {\n case 3:\n return !b;\n\n case 4:\n return !1 === b;\n\n case 5:\n return isNaN(b);\n\n case 6:\n return isNaN(b) || 1 > b;\n }\n return !1;\n}\n\nfunction B(a, b, c, d, e, f) {\n this.acceptsBooleans = 2 === b || 3 === b || 4 === b;\n this.attributeName = d;\n this.attributeNamespace = e;\n this.mustUseProperty = c;\n this.propertyName = a;\n this.type = b;\n this.sanitizeURL = f;\n}\n\nvar D = {};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function (a) {\n D[a] = new B(a, 0, !1, a, null, !1);\n});\n[[\"acceptCharset\", \"accept-charset\"], [\"className\", \"class\"], [\"htmlFor\", \"for\"], [\"httpEquiv\", \"http-equiv\"]].forEach(function (a) {\n var b = a[0];\n D[b] = new B(b, 1, !1, a[1], null, !1);\n});\n[\"contentEditable\", \"draggable\", \"spellCheck\", \"value\"].forEach(function (a) {\n D[a] = new B(a, 2, !1, a.toLowerCase(), null, !1);\n});\n[\"autoReverse\", \"externalResourcesRequired\", \"focusable\", \"preserveAlpha\"].forEach(function (a) {\n D[a] = new B(a, 2, !1, a, null, !1);\n});\n\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function (a) {\n D[a] = new B(a, 3, !1, a.toLowerCase(), null, !1);\n});\n[\"checked\", \"multiple\", \"muted\", \"selected\"].forEach(function (a) {\n D[a] = new B(a, 3, !0, a, null, !1);\n});\n[\"capture\", \"download\"].forEach(function (a) {\n D[a] = new B(a, 4, !1, a, null, !1);\n});\n[\"cols\", \"rows\", \"size\", \"span\"].forEach(function (a) {\n D[a] = new B(a, 6, !1, a, null, !1);\n});\n[\"rowSpan\", \"start\"].forEach(function (a) {\n D[a] = new B(a, 5, !1, a.toLowerCase(), null, !1);\n});\nvar sb = /[\\-:]([a-z])/g;\n\nfunction tb(a) {\n return a[1].toUpperCase();\n}\n\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function (a) {\n var b = a.replace(sb, tb);\n D[b] = new B(b, 1, !1, a, null, !1);\n});\n\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function (a) {\n var b = a.replace(sb, tb);\n D[b] = new B(b, 1, !1, a, \"http://www.w3.org/1999/xlink\", !1);\n});\n[\"xml:base\", \"xml:lang\", \"xml:space\"].forEach(function (a) {\n var b = a.replace(sb, tb);\n D[b] = new B(b, 1, !1, a, \"http://www.w3.org/XML/1998/namespace\", !1);\n});\n[\"tabIndex\", \"crossOrigin\"].forEach(function (a) {\n D[a] = new B(a, 1, !1, a.toLowerCase(), null, !1);\n});\nD.xlinkHref = new B(\"xlinkHref\", 1, !1, \"xlink:href\", \"http://www.w3.org/1999/xlink\", !0);\n[\"src\", \"href\", \"action\", \"formAction\"].forEach(function (a) {\n D[a] = new B(a, 1, !1, a.toLowerCase(), null, !0);\n});\n\nfunction ub(a) {\n switch (typeof a) {\n case \"boolean\":\n case \"number\":\n case \"object\":\n case \"string\":\n case \"undefined\":\n return a;\n\n default:\n return \"\";\n }\n}\n\nfunction vb(a, b, c, d) {\n var e = D.hasOwnProperty(b) ? D[b] : null;\n var f = null !== e ? 0 === e.type : d ? !1 : !(2 < b.length) || \"o\" !== b[0] && \"O\" !== b[0] || \"n\" !== b[1] && \"N\" !== b[1] ? !1 : !0;\n f || (rb(b, c, e, d) && (c = null), d || null === e ? pb(b) && (null === c ? a.removeAttribute(b) : a.setAttribute(b, \"\" + c)) : e.mustUseProperty ? a[e.propertyName] = null === c ? 3 === e.type ? !1 : \"\" : c : (b = e.attributeName, d = e.attributeNamespace, null === c ? a.removeAttribute(b) : (e = e.type, c = 3 === e || 4 === e && !0 === c ? \"\" : \"\" + c, d ? a.setAttributeNS(d, b, c) : a.setAttribute(b, c))));\n}\n\nfunction wb(a) {\n var b = a.type;\n return (a = a.nodeName) && \"input\" === a.toLowerCase() && (\"checkbox\" === b || \"radio\" === b);\n}\n\nfunction xb(a) {\n var b = wb(a) ? \"checked\" : \"value\",\n c = Object.getOwnPropertyDescriptor(a.constructor.prototype, b),\n d = \"\" + a[b];\n\n if (!a.hasOwnProperty(b) && \"undefined\" !== typeof c && \"function\" === typeof c.get && \"function\" === typeof c.set) {\n var e = c.get,\n f = c.set;\n Object.defineProperty(a, b, {\n configurable: !0,\n get: function get() {\n return e.call(this);\n },\n set: function set(a) {\n d = \"\" + a;\n f.call(this, a);\n }\n });\n Object.defineProperty(a, b, {\n enumerable: c.enumerable\n });\n return {\n getValue: function getValue() {\n return d;\n },\n setValue: function setValue(a) {\n d = \"\" + a;\n },\n stopTracking: function stopTracking() {\n a._valueTracker = null;\n delete a[b];\n }\n };\n }\n}\n\nfunction yb(a) {\n a._valueTracker || (a._valueTracker = xb(a));\n}\n\nfunction zb(a) {\n if (!a) return !1;\n var b = a._valueTracker;\n if (!b) return !0;\n var c = b.getValue();\n var d = \"\";\n a && (d = wb(a) ? a.checked ? \"true\" : \"false\" : a.value);\n a = d;\n return a !== c ? (b.setValue(a), !0) : !1;\n}\n\nfunction Ab(a, b) {\n var c = b.checked;\n return n({}, b, {\n defaultChecked: void 0,\n defaultValue: void 0,\n value: void 0,\n checked: null != c ? c : a._wrapperState.initialChecked\n });\n}\n\nfunction Bb(a, b) {\n var c = null == b.defaultValue ? \"\" : b.defaultValue,\n d = null != b.checked ? b.checked : b.defaultChecked;\n c = ub(null != b.value ? b.value : c);\n a._wrapperState = {\n initialChecked: d,\n initialValue: c,\n controlled: \"checkbox\" === b.type || \"radio\" === b.type ? null != b.checked : null != b.value\n };\n}\n\nfunction Cb(a, b) {\n b = b.checked;\n null != b && vb(a, \"checked\", b, !1);\n}\n\nfunction Eb(a, b) {\n Cb(a, b);\n var c = ub(b.value),\n d = b.type;\n if (null != c) {\n if (\"number\" === d) {\n if (0 === c && \"\" === a.value || a.value != c) a.value = \"\" + c;\n } else a.value !== \"\" + c && (a.value = \"\" + c);\n } else if (\"submit\" === d || \"reset\" === d) {\n a.removeAttribute(\"value\");\n return;\n }\n b.hasOwnProperty(\"value\") ? Fb(a, b.type, c) : b.hasOwnProperty(\"defaultValue\") && Fb(a, b.type, ub(b.defaultValue));\n null == b.checked && null != b.defaultChecked && (a.defaultChecked = !!b.defaultChecked);\n}\n\nfunction Gb(a, b, c) {\n if (b.hasOwnProperty(\"value\") || b.hasOwnProperty(\"defaultValue\")) {\n var d = b.type;\n if (!(\"submit\" !== d && \"reset\" !== d || void 0 !== b.value && null !== b.value)) return;\n b = \"\" + a._wrapperState.initialValue;\n c || b === a.value || (a.value = b);\n a.defaultValue = b;\n }\n\n c = a.name;\n \"\" !== c && (a.name = \"\");\n a.defaultChecked = !a.defaultChecked;\n a.defaultChecked = !!a._wrapperState.initialChecked;\n \"\" !== c && (a.name = c);\n}\n\nfunction Fb(a, b, c) {\n if (\"number\" !== b || a.ownerDocument.activeElement !== a) null == c ? a.defaultValue = \"\" + a._wrapperState.initialValue : a.defaultValue !== \"\" + c && (a.defaultValue = \"\" + c);\n}\n\nfunction Hb(a) {\n var b = \"\";\n aa.Children.forEach(a, function (a) {\n null != a && (b += a);\n });\n return b;\n}\n\nfunction Ib(a, b) {\n a = n({\n children: void 0\n }, b);\n if (b = Hb(b.children)) a.children = b;\n return a;\n}\n\nfunction Jb(a, b, c, d) {\n a = a.options;\n\n if (b) {\n b = {};\n\n for (var e = 0; e < c.length; e++) {\n b[\"$\" + c[e]] = !0;\n }\n\n for (c = 0; c < a.length; c++) {\n e = b.hasOwnProperty(\"$\" + a[c].value), a[c].selected !== e && (a[c].selected = e), e && d && (a[c].defaultSelected = !0);\n }\n } else {\n c = \"\" + ub(c);\n b = null;\n\n for (e = 0; e < a.length; e++) {\n if (a[e].value === c) {\n a[e].selected = !0;\n d && (a[e].defaultSelected = !0);\n return;\n }\n\n null !== b || a[e].disabled || (b = a[e]);\n }\n\n null !== b && (b.selected = !0);\n }\n}\n\nfunction Kb(a, b) {\n if (null != b.dangerouslySetInnerHTML) throw Error(u(91));\n return n({}, b, {\n value: void 0,\n defaultValue: void 0,\n children: \"\" + a._wrapperState.initialValue\n });\n}\n\nfunction Lb(a, b) {\n var c = b.value;\n\n if (null == c) {\n c = b.defaultValue;\n b = b.children;\n\n if (null != b) {\n if (null != c) throw Error(u(92));\n\n if (Array.isArray(b)) {\n if (!(1 >= b.length)) throw Error(u(93));\n b = b[0];\n }\n\n c = b;\n }\n\n null == c && (c = \"\");\n }\n\n a._wrapperState = {\n initialValue: ub(c)\n };\n}\n\nfunction Mb(a, b) {\n var c = ub(b.value),\n d = ub(b.defaultValue);\n null != c && (c = \"\" + c, c !== a.value && (a.value = c), null == b.defaultValue && a.defaultValue !== c && (a.defaultValue = c));\n null != d && (a.defaultValue = \"\" + d);\n}\n\nfunction Nb(a) {\n var b = a.textContent;\n b === a._wrapperState.initialValue && \"\" !== b && null !== b && (a.value = b);\n}\n\nvar Ob = {\n html: \"http://www.w3.org/1999/xhtml\",\n mathml: \"http://www.w3.org/1998/Math/MathML\",\n svg: \"http://www.w3.org/2000/svg\"\n};\n\nfunction Pb(a) {\n switch (a) {\n case \"svg\":\n return \"http://www.w3.org/2000/svg\";\n\n case \"math\":\n return \"http://www.w3.org/1998/Math/MathML\";\n\n default:\n return \"http://www.w3.org/1999/xhtml\";\n }\n}\n\nfunction Qb(a, b) {\n return null == a || \"http://www.w3.org/1999/xhtml\" === a ? Pb(b) : \"http://www.w3.org/2000/svg\" === a && \"foreignObject\" === b ? \"http://www.w3.org/1999/xhtml\" : a;\n}\n\nvar Rb,\n Sb = function (a) {\n return \"undefined\" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function (b, c, d, e) {\n MSApp.execUnsafeLocalFunction(function () {\n return a(b, c, d, e);\n });\n } : a;\n}(function (a, b) {\n if (a.namespaceURI !== Ob.svg || \"innerHTML\" in a) a.innerHTML = b;else {\n Rb = Rb || document.createElement(\"div\");\n Rb.innerHTML = \"\" + b.valueOf().toString() + \"\";\n\n for (b = Rb.firstChild; a.firstChild;) {\n a.removeChild(a.firstChild);\n }\n\n for (; b.firstChild;) {\n a.appendChild(b.firstChild);\n }\n }\n});\n\nfunction Tb(a, b) {\n if (b) {\n var c = a.firstChild;\n\n if (c && c === a.lastChild && 3 === c.nodeType) {\n c.nodeValue = b;\n return;\n }\n }\n\n a.textContent = b;\n}\n\nfunction Ub(a, b) {\n var c = {};\n c[a.toLowerCase()] = b.toLowerCase();\n c[\"Webkit\" + a] = \"webkit\" + b;\n c[\"Moz\" + a] = \"moz\" + b;\n return c;\n}\n\nvar Vb = {\n animationend: Ub(\"Animation\", \"AnimationEnd\"),\n animationiteration: Ub(\"Animation\", \"AnimationIteration\"),\n animationstart: Ub(\"Animation\", \"AnimationStart\"),\n transitionend: Ub(\"Transition\", \"TransitionEnd\")\n},\n Wb = {},\n Xb = {};\nYa && (Xb = document.createElement(\"div\").style, \"AnimationEvent\" in window || (delete Vb.animationend.animation, delete Vb.animationiteration.animation, delete Vb.animationstart.animation), \"TransitionEvent\" in window || delete Vb.transitionend.transition);\n\nfunction Yb(a) {\n if (Wb[a]) return Wb[a];\n if (!Vb[a]) return a;\n var b = Vb[a],\n c;\n\n for (c in b) {\n if (b.hasOwnProperty(c) && c in Xb) return Wb[a] = b[c];\n }\n\n return a;\n}\n\nvar Zb = Yb(\"animationend\"),\n $b = Yb(\"animationiteration\"),\n ac = Yb(\"animationstart\"),\n bc = Yb(\"transitionend\"),\n cc = \"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \");\n\nfunction ec(a) {\n var b = a,\n c = a;\n if (a.alternate) for (; b.return;) {\n b = b.return;\n } else {\n a = b;\n\n do {\n b = a, 0 !== (b.effectTag & 1026) && (c = b.return), a = b.return;\n } while (a);\n }\n return 3 === b.tag ? c : null;\n}\n\nfunction fc(a) {\n if (13 === a.tag) {\n var b = a.memoizedState;\n null === b && (a = a.alternate, null !== a && (b = a.memoizedState));\n if (null !== b) return b.dehydrated;\n }\n\n return null;\n}\n\nfunction gc(a) {\n if (ec(a) !== a) throw Error(u(188));\n}\n\nfunction hc(a) {\n var b = a.alternate;\n\n if (!b) {\n b = ec(a);\n if (null === b) throw Error(u(188));\n return b !== a ? null : a;\n }\n\n for (var c = a, d = b;;) {\n var e = c.return;\n if (null === e) break;\n var f = e.alternate;\n\n if (null === f) {\n d = e.return;\n\n if (null !== d) {\n c = d;\n continue;\n }\n\n break;\n }\n\n if (e.child === f.child) {\n for (f = e.child; f;) {\n if (f === c) return gc(e), a;\n if (f === d) return gc(e), b;\n f = f.sibling;\n }\n\n throw Error(u(188));\n }\n\n if (c.return !== d.return) c = e, d = f;else {\n for (var g = !1, h = e.child; h;) {\n if (h === c) {\n g = !0;\n c = e;\n d = f;\n break;\n }\n\n if (h === d) {\n g = !0;\n d = e;\n c = f;\n break;\n }\n\n h = h.sibling;\n }\n\n if (!g) {\n for (h = f.child; h;) {\n if (h === c) {\n g = !0;\n c = f;\n d = e;\n break;\n }\n\n if (h === d) {\n g = !0;\n d = f;\n c = e;\n break;\n }\n\n h = h.sibling;\n }\n\n if (!g) throw Error(u(189));\n }\n }\n if (c.alternate !== d) throw Error(u(190));\n }\n\n if (3 !== c.tag) throw Error(u(188));\n return c.stateNode.current === c ? a : b;\n}\n\nfunction ic(a) {\n a = hc(a);\n if (!a) return null;\n\n for (var b = a;;) {\n if (5 === b.tag || 6 === b.tag) return b;\n if (b.child) b.child.return = b, b = b.child;else {\n if (b === a) break;\n\n for (; !b.sibling;) {\n if (!b.return || b.return === a) return null;\n b = b.return;\n }\n\n b.sibling.return = b.return;\n b = b.sibling;\n }\n }\n\n return null;\n}\n\nvar jc,\n kc,\n lc,\n mc = !1,\n nc = [],\n oc = null,\n pc = null,\n qc = null,\n rc = new Map(),\n sc = new Map(),\n tc = [],\n uc = \"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit\".split(\" \"),\n vc = \"focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture\".split(\" \");\n\nfunction wc(a) {\n var b = xc(a);\n uc.forEach(function (c) {\n yc(c, a, b);\n });\n vc.forEach(function (c) {\n yc(c, a, b);\n });\n}\n\nfunction zc(a, b, c, d) {\n return {\n blockedOn: a,\n topLevelType: b,\n eventSystemFlags: c | 32,\n nativeEvent: d\n };\n}\n\nfunction Ac(a, b) {\n switch (a) {\n case \"focus\":\n case \"blur\":\n oc = null;\n break;\n\n case \"dragenter\":\n case \"dragleave\":\n pc = null;\n break;\n\n case \"mouseover\":\n case \"mouseout\":\n qc = null;\n break;\n\n case \"pointerover\":\n case \"pointerout\":\n rc.delete(b.pointerId);\n break;\n\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n sc.delete(b.pointerId);\n }\n}\n\nfunction Bc(a, b, c, d, e) {\n if (null === a || a.nativeEvent !== e) return a = zc(b, c, d, e), null !== b && (b = Cc(b), null !== b && kc(b)), a;\n a.eventSystemFlags |= d;\n return a;\n}\n\nfunction Dc(a, b, c, d) {\n switch (b) {\n case \"focus\":\n return oc = Bc(oc, a, b, c, d), !0;\n\n case \"dragenter\":\n return pc = Bc(pc, a, b, c, d), !0;\n\n case \"mouseover\":\n return qc = Bc(qc, a, b, c, d), !0;\n\n case \"pointerover\":\n var e = d.pointerId;\n rc.set(e, Bc(rc.get(e) || null, a, b, c, d));\n return !0;\n\n case \"gotpointercapture\":\n return e = d.pointerId, sc.set(e, Bc(sc.get(e) || null, a, b, c, d)), !0;\n }\n\n return !1;\n}\n\nfunction Ec(a) {\n var b = Fc(a.target);\n\n if (null !== b) {\n var c = ec(b);\n if (null !== c) if (b = c.tag, 13 === b) {\n if (b = fc(c), null !== b) {\n a.blockedOn = b;\n q.unstable_runWithPriority(a.priority, function () {\n lc(c);\n });\n return;\n }\n } else if (3 === b && c.stateNode.hydrate) {\n a.blockedOn = 3 === c.tag ? c.stateNode.containerInfo : null;\n return;\n }\n }\n\n a.blockedOn = null;\n}\n\nfunction Gc(a) {\n if (null !== a.blockedOn) return !1;\n var b = Hc(a.topLevelType, a.eventSystemFlags, a.nativeEvent);\n\n if (null !== b) {\n var c = Cc(b);\n null !== c && kc(c);\n a.blockedOn = b;\n return !1;\n }\n\n return !0;\n}\n\nfunction Ic(a, b, c) {\n Gc(a) && c.delete(b);\n}\n\nfunction Jc() {\n for (mc = !1; 0 < nc.length;) {\n var a = nc[0];\n\n if (null !== a.blockedOn) {\n a = Cc(a.blockedOn);\n null !== a && jc(a);\n break;\n }\n\n var b = Hc(a.topLevelType, a.eventSystemFlags, a.nativeEvent);\n null !== b ? a.blockedOn = b : nc.shift();\n }\n\n null !== oc && Gc(oc) && (oc = null);\n null !== pc && Gc(pc) && (pc = null);\n null !== qc && Gc(qc) && (qc = null);\n rc.forEach(Ic);\n sc.forEach(Ic);\n}\n\nfunction Kc(a, b) {\n a.blockedOn === b && (a.blockedOn = null, mc || (mc = !0, q.unstable_scheduleCallback(q.unstable_NormalPriority, Jc)));\n}\n\nfunction Lc(a) {\n function b(b) {\n return Kc(b, a);\n }\n\n if (0 < nc.length) {\n Kc(nc[0], a);\n\n for (var c = 1; c < nc.length; c++) {\n var d = nc[c];\n d.blockedOn === a && (d.blockedOn = null);\n }\n }\n\n null !== oc && Kc(oc, a);\n null !== pc && Kc(pc, a);\n null !== qc && Kc(qc, a);\n rc.forEach(b);\n sc.forEach(b);\n\n for (c = 0; c < tc.length; c++) {\n d = tc[c], d.blockedOn === a && (d.blockedOn = null);\n }\n\n for (; 0 < tc.length && (c = tc[0], null === c.blockedOn);) {\n Ec(c), null === c.blockedOn && tc.shift();\n }\n}\n\nfunction Mc(a) {\n a = a.target || a.srcElement || window;\n a.correspondingUseElement && (a = a.correspondingUseElement);\n return 3 === a.nodeType ? a.parentNode : a;\n}\n\nfunction Nc(a) {\n do {\n a = a.return;\n } while (a && 5 !== a.tag);\n\n return a ? a : null;\n}\n\nfunction Oc(a, b, c) {\n if (b = Da(a, c.dispatchConfig.phasedRegistrationNames[b])) c._dispatchListeners = xa(c._dispatchListeners, b), c._dispatchInstances = xa(c._dispatchInstances, a);\n}\n\nfunction Pc(a) {\n if (a && a.dispatchConfig.phasedRegistrationNames) {\n for (var b = a._targetInst, c = []; b;) {\n c.push(b), b = Nc(b);\n }\n\n for (b = c.length; 0 < b--;) {\n Oc(c[b], \"captured\", a);\n }\n\n for (b = 0; b < c.length; b++) {\n Oc(c[b], \"bubbled\", a);\n }\n }\n}\n\nfunction Qc(a, b, c) {\n a && c && c.dispatchConfig.registrationName && (b = Da(a, c.dispatchConfig.registrationName)) && (c._dispatchListeners = xa(c._dispatchListeners, b), c._dispatchInstances = xa(c._dispatchInstances, a));\n}\n\nfunction Rc(a) {\n a && a.dispatchConfig.registrationName && Qc(a._targetInst, null, a);\n}\n\nfunction Sc(a) {\n ya(a, Pc);\n}\n\nfunction Tc() {\n return !0;\n}\n\nfunction Uc() {\n return !1;\n}\n\nfunction E(a, b, c, d) {\n this.dispatchConfig = a;\n this._targetInst = b;\n this.nativeEvent = c;\n a = this.constructor.Interface;\n\n for (var e in a) {\n a.hasOwnProperty(e) && ((b = a[e]) ? this[e] = b(c) : \"target\" === e ? this.target = d : this[e] = c[e]);\n }\n\n this.isDefaultPrevented = (null != c.defaultPrevented ? c.defaultPrevented : !1 === c.returnValue) ? Tc : Uc;\n this.isPropagationStopped = Uc;\n return this;\n}\n\nn(E.prototype, {\n preventDefault: function preventDefault() {\n this.defaultPrevented = !0;\n var a = this.nativeEvent;\n a && (a.preventDefault ? a.preventDefault() : \"unknown\" !== typeof a.returnValue && (a.returnValue = !1), this.isDefaultPrevented = Tc);\n },\n stopPropagation: function stopPropagation() {\n var a = this.nativeEvent;\n a && (a.stopPropagation ? a.stopPropagation() : \"unknown\" !== typeof a.cancelBubble && (a.cancelBubble = !0), this.isPropagationStopped = Tc);\n },\n persist: function persist() {\n this.isPersistent = Tc;\n },\n isPersistent: Uc,\n destructor: function destructor() {\n var a = this.constructor.Interface,\n b;\n\n for (b in a) {\n this[b] = null;\n }\n\n this.nativeEvent = this._targetInst = this.dispatchConfig = null;\n this.isPropagationStopped = this.isDefaultPrevented = Uc;\n this._dispatchInstances = this._dispatchListeners = null;\n }\n});\nE.Interface = {\n type: null,\n target: null,\n currentTarget: function currentTarget() {\n return null;\n },\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function timeStamp(a) {\n return a.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\n\nE.extend = function (a) {\n function b() {}\n\n function c() {\n return d.apply(this, arguments);\n }\n\n var d = this;\n b.prototype = d.prototype;\n var e = new b();\n n(e, c.prototype);\n c.prototype = e;\n c.prototype.constructor = c;\n c.Interface = n({}, d.Interface, a);\n c.extend = d.extend;\n Vc(c);\n return c;\n};\n\nVc(E);\n\nfunction Wc(a, b, c, d) {\n if (this.eventPool.length) {\n var e = this.eventPool.pop();\n this.call(e, a, b, c, d);\n return e;\n }\n\n return new this(a, b, c, d);\n}\n\nfunction Xc(a) {\n if (!(a instanceof this)) throw Error(u(279));\n a.destructor();\n 10 > this.eventPool.length && this.eventPool.push(a);\n}\n\nfunction Vc(a) {\n a.eventPool = [];\n a.getPooled = Wc;\n a.release = Xc;\n}\n\nvar Yc = E.extend({\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n}),\n Zc = E.extend({\n clipboardData: function clipboardData(a) {\n return \"clipboardData\" in a ? a.clipboardData : window.clipboardData;\n }\n}),\n $c = E.extend({\n view: null,\n detail: null\n}),\n ad = $c.extend({\n relatedTarget: null\n});\n\nfunction bd(a) {\n var b = a.keyCode;\n \"charCode\" in a ? (a = a.charCode, 0 === a && 13 === b && (a = 13)) : a = b;\n 10 === a && (a = 13);\n return 32 <= a || 13 === a ? a : 0;\n}\n\nvar cd = {\n Esc: \"Escape\",\n Spacebar: \" \",\n Left: \"ArrowLeft\",\n Up: \"ArrowUp\",\n Right: \"ArrowRight\",\n Down: \"ArrowDown\",\n Del: \"Delete\",\n Win: \"OS\",\n Menu: \"ContextMenu\",\n Apps: \"ContextMenu\",\n Scroll: \"ScrollLock\",\n MozPrintableKey: \"Unidentified\"\n},\n dd = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 12: \"Clear\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 19: \"Pause\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 45: \"Insert\",\n 46: \"Delete\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 224: \"Meta\"\n},\n ed = {\n Alt: \"altKey\",\n Control: \"ctrlKey\",\n Meta: \"metaKey\",\n Shift: \"shiftKey\"\n};\n\nfunction gd(a) {\n var b = this.nativeEvent;\n return b.getModifierState ? b.getModifierState(a) : (a = ed[a]) ? !!b[a] : !1;\n}\n\nfunction hd() {\n return gd;\n}\n\nvar id = $c.extend({\n key: function key(a) {\n if (a.key) {\n var b = cd[a.key] || a.key;\n if (\"Unidentified\" !== b) return b;\n }\n\n return \"keypress\" === a.type ? (a = bd(a), 13 === a ? \"Enter\" : String.fromCharCode(a)) : \"keydown\" === a.type || \"keyup\" === a.type ? dd[a.keyCode] || \"Unidentified\" : \"\";\n },\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: hd,\n charCode: function charCode(a) {\n return \"keypress\" === a.type ? bd(a) : 0;\n },\n keyCode: function keyCode(a) {\n return \"keydown\" === a.type || \"keyup\" === a.type ? a.keyCode : 0;\n },\n which: function which(a) {\n return \"keypress\" === a.type ? bd(a) : \"keydown\" === a.type || \"keyup\" === a.type ? a.keyCode : 0;\n }\n}),\n jd = 0,\n kd = 0,\n ld = !1,\n md = !1,\n nd = $c.extend({\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n pageX: null,\n pageY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: hd,\n button: null,\n buttons: null,\n relatedTarget: function relatedTarget(a) {\n return a.relatedTarget || (a.fromElement === a.srcElement ? a.toElement : a.fromElement);\n },\n movementX: function movementX(a) {\n if (\"movementX\" in a) return a.movementX;\n var b = jd;\n jd = a.screenX;\n return ld ? \"mousemove\" === a.type ? a.screenX - b : 0 : (ld = !0, 0);\n },\n movementY: function movementY(a) {\n if (\"movementY\" in a) return a.movementY;\n var b = kd;\n kd = a.screenY;\n return md ? \"mousemove\" === a.type ? a.screenY - b : 0 : (md = !0, 0);\n }\n}),\n od = nd.extend({\n pointerId: null,\n width: null,\n height: null,\n pressure: null,\n tangentialPressure: null,\n tiltX: null,\n tiltY: null,\n twist: null,\n pointerType: null,\n isPrimary: null\n}),\n pd = nd.extend({\n dataTransfer: null\n}),\n qd = $c.extend({\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: hd\n}),\n rd = E.extend({\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n}),\n sd = nd.extend({\n deltaX: function deltaX(a) {\n return \"deltaX\" in a ? a.deltaX : \"wheelDeltaX\" in a ? -a.wheelDeltaX : 0;\n },\n deltaY: function deltaY(a) {\n return \"deltaY\" in a ? a.deltaY : \"wheelDeltaY\" in a ? -a.wheelDeltaY : \"wheelDelta\" in a ? -a.wheelDelta : 0;\n },\n deltaZ: null,\n deltaMode: null\n}),\n td = [[\"blur\", \"blur\", 0], [\"cancel\", \"cancel\", 0], [\"click\", \"click\", 0], [\"close\", \"close\", 0], [\"contextmenu\", \"contextMenu\", 0], [\"copy\", \"copy\", 0], [\"cut\", \"cut\", 0], [\"auxclick\", \"auxClick\", 0], [\"dblclick\", \"doubleClick\", 0], [\"dragend\", \"dragEnd\", 0], [\"dragstart\", \"dragStart\", 0], [\"drop\", \"drop\", 0], [\"focus\", \"focus\", 0], [\"input\", \"input\", 0], [\"invalid\", \"invalid\", 0], [\"keydown\", \"keyDown\", 0], [\"keypress\", \"keyPress\", 0], [\"keyup\", \"keyUp\", 0], [\"mousedown\", \"mouseDown\", 0], [\"mouseup\", \"mouseUp\", 0], [\"paste\", \"paste\", 0], [\"pause\", \"pause\", 0], [\"play\", \"play\", 0], [\"pointercancel\", \"pointerCancel\", 0], [\"pointerdown\", \"pointerDown\", 0], [\"pointerup\", \"pointerUp\", 0], [\"ratechange\", \"rateChange\", 0], [\"reset\", \"reset\", 0], [\"seeked\", \"seeked\", 0], [\"submit\", \"submit\", 0], [\"touchcancel\", \"touchCancel\", 0], [\"touchend\", \"touchEnd\", 0], [\"touchstart\", \"touchStart\", 0], [\"volumechange\", \"volumeChange\", 0], [\"drag\", \"drag\", 1], [\"dragenter\", \"dragEnter\", 1], [\"dragexit\", \"dragExit\", 1], [\"dragleave\", \"dragLeave\", 1], [\"dragover\", \"dragOver\", 1], [\"mousemove\", \"mouseMove\", 1], [\"mouseout\", \"mouseOut\", 1], [\"mouseover\", \"mouseOver\", 1], [\"pointermove\", \"pointerMove\", 1], [\"pointerout\", \"pointerOut\", 1], [\"pointerover\", \"pointerOver\", 1], [\"scroll\", \"scroll\", 1], [\"toggle\", \"toggle\", 1], [\"touchmove\", \"touchMove\", 1], [\"wheel\", \"wheel\", 1], [\"abort\", \"abort\", 2], [Zb, \"animationEnd\", 2], [$b, \"animationIteration\", 2], [ac, \"animationStart\", 2], [\"canplay\", \"canPlay\", 2], [\"canplaythrough\", \"canPlayThrough\", 2], [\"durationchange\", \"durationChange\", 2], [\"emptied\", \"emptied\", 2], [\"encrypted\", \"encrypted\", 2], [\"ended\", \"ended\", 2], [\"error\", \"error\", 2], [\"gotpointercapture\", \"gotPointerCapture\", 2], [\"load\", \"load\", 2], [\"loadeddata\", \"loadedData\", 2], [\"loadedmetadata\", \"loadedMetadata\", 2], [\"loadstart\", \"loadStart\", 2], [\"lostpointercapture\", \"lostPointerCapture\", 2], [\"playing\", \"playing\", 2], [\"progress\", \"progress\", 2], [\"seeking\", \"seeking\", 2], [\"stalled\", \"stalled\", 2], [\"suspend\", \"suspend\", 2], [\"timeupdate\", \"timeUpdate\", 2], [bc, \"transitionEnd\", 2], [\"waiting\", \"waiting\", 2]],\n ud = {},\n vd = {},\n wd = 0;\n\nfor (; wd < td.length; wd++) {\n var yd = td[wd],\n zd = yd[0],\n Ad = yd[1],\n Bd = yd[2],\n Cd = \"on\" + (Ad[0].toUpperCase() + Ad.slice(1)),\n Dd = {\n phasedRegistrationNames: {\n bubbled: Cd,\n captured: Cd + \"Capture\"\n },\n dependencies: [zd],\n eventPriority: Bd\n };\n ud[Ad] = Dd;\n vd[zd] = Dd;\n}\n\nvar Ed = {\n eventTypes: ud,\n getEventPriority: function getEventPriority(a) {\n a = vd[a];\n return void 0 !== a ? a.eventPriority : 2;\n },\n extractEvents: function extractEvents(a, b, c, d) {\n var e = vd[a];\n if (!e) return null;\n\n switch (a) {\n case \"keypress\":\n if (0 === bd(c)) return null;\n\n case \"keydown\":\n case \"keyup\":\n a = id;\n break;\n\n case \"blur\":\n case \"focus\":\n a = ad;\n break;\n\n case \"click\":\n if (2 === c.button) return null;\n\n case \"auxclick\":\n case \"dblclick\":\n case \"mousedown\":\n case \"mousemove\":\n case \"mouseup\":\n case \"mouseout\":\n case \"mouseover\":\n case \"contextmenu\":\n a = nd;\n break;\n\n case \"drag\":\n case \"dragend\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"dragstart\":\n case \"drop\":\n a = pd;\n break;\n\n case \"touchcancel\":\n case \"touchend\":\n case \"touchmove\":\n case \"touchstart\":\n a = qd;\n break;\n\n case Zb:\n case $b:\n case ac:\n a = Yc;\n break;\n\n case bc:\n a = rd;\n break;\n\n case \"scroll\":\n a = $c;\n break;\n\n case \"wheel\":\n a = sd;\n break;\n\n case \"copy\":\n case \"cut\":\n case \"paste\":\n a = Zc;\n break;\n\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"pointerup\":\n a = od;\n break;\n\n default:\n a = E;\n }\n\n b = a.getPooled(e, b, c, d);\n Sc(b);\n return b;\n }\n},\n Fd = q.unstable_UserBlockingPriority,\n Gd = q.unstable_runWithPriority,\n Hd = Ed.getEventPriority,\n Id = 10,\n Jd = [];\n\nfunction Kd(a) {\n var b = a.targetInst,\n c = b;\n\n do {\n if (!c) {\n a.ancestors.push(c);\n break;\n }\n\n var d = c;\n if (3 === d.tag) d = d.stateNode.containerInfo;else {\n for (; d.return;) {\n d = d.return;\n }\n\n d = 3 !== d.tag ? null : d.stateNode.containerInfo;\n }\n if (!d) break;\n b = c.tag;\n 5 !== b && 6 !== b || a.ancestors.push(c);\n c = Fc(d);\n } while (c);\n\n for (c = 0; c < a.ancestors.length; c++) {\n b = a.ancestors[c];\n var e = Mc(a.nativeEvent);\n d = a.topLevelType;\n\n for (var f = a.nativeEvent, g = a.eventSystemFlags, h = null, k = 0; k < ea.length; k++) {\n var l = ea[k];\n l && (l = l.extractEvents(d, b, f, e, g)) && (h = xa(h, l));\n }\n\n Ba(h);\n }\n}\n\nvar Ld = !0;\n\nfunction F(a, b) {\n Md(b, a, !1);\n}\n\nfunction Md(a, b, c) {\n switch (Hd(b)) {\n case 0:\n var d = Nd.bind(null, b, 1);\n break;\n\n case 1:\n d = Od.bind(null, b, 1);\n break;\n\n default:\n d = Pd.bind(null, b, 1);\n }\n\n c ? a.addEventListener(b, d, !0) : a.addEventListener(b, d, !1);\n}\n\nfunction Nd(a, b, c) {\n ib || gb();\n var d = Pd,\n e = ib;\n ib = !0;\n\n try {\n fb(d, a, b, c);\n } finally {\n (ib = e) || kb();\n }\n}\n\nfunction Od(a, b, c) {\n Gd(Fd, Pd.bind(null, a, b, c));\n}\n\nfunction Qd(a, b, c, d) {\n if (Jd.length) {\n var e = Jd.pop();\n e.topLevelType = a;\n e.eventSystemFlags = b;\n e.nativeEvent = c;\n e.targetInst = d;\n a = e;\n } else a = {\n topLevelType: a,\n eventSystemFlags: b,\n nativeEvent: c,\n targetInst: d,\n ancestors: []\n };\n\n try {\n if (b = Kd, c = a, jb) b(c, void 0);else {\n jb = !0;\n\n try {\n hb(b, c, void 0);\n } finally {\n jb = !1, kb();\n }\n }\n } finally {\n a.topLevelType = null, a.nativeEvent = null, a.targetInst = null, a.ancestors.length = 0, Jd.length < Id && Jd.push(a);\n }\n}\n\nfunction Pd(a, b, c) {\n if (Ld) if (0 < nc.length && -1 < uc.indexOf(a)) a = zc(null, a, b, c), nc.push(a);else {\n var d = Hc(a, b, c);\n null === d ? Ac(a, c) : -1 < uc.indexOf(a) ? (a = zc(d, a, b, c), nc.push(a)) : Dc(d, a, b, c) || (Ac(a, c), Qd(a, b, c, null));\n }\n}\n\nfunction Hc(a, b, c) {\n var d = Mc(c);\n d = Fc(d);\n\n if (null !== d) {\n var e = ec(d);\n if (null === e) d = null;else {\n var f = e.tag;\n\n if (13 === f) {\n d = fc(e);\n if (null !== d) return d;\n d = null;\n } else if (3 === f) {\n if (e.stateNode.hydrate) return 3 === e.tag ? e.stateNode.containerInfo : null;\n d = null;\n } else e !== d && (d = null);\n }\n }\n\n Qd(a, b, c, d);\n return null;\n}\n\nfunction Rd(a) {\n if (!Ya) return !1;\n a = \"on\" + a;\n var b = a in document;\n b || (b = document.createElement(\"div\"), b.setAttribute(a, \"return;\"), b = \"function\" === typeof b[a]);\n return b;\n}\n\nvar Sd = new (\"function\" === typeof WeakMap ? WeakMap : Map)();\n\nfunction xc(a) {\n var b = Sd.get(a);\n void 0 === b && (b = new Set(), Sd.set(a, b));\n return b;\n}\n\nfunction yc(a, b, c) {\n if (!c.has(a)) {\n switch (a) {\n case \"scroll\":\n Md(b, \"scroll\", !0);\n break;\n\n case \"focus\":\n case \"blur\":\n Md(b, \"focus\", !0);\n Md(b, \"blur\", !0);\n c.add(\"blur\");\n c.add(\"focus\");\n break;\n\n case \"cancel\":\n case \"close\":\n Rd(a) && Md(b, a, !0);\n break;\n\n case \"invalid\":\n case \"submit\":\n case \"reset\":\n break;\n\n default:\n -1 === cc.indexOf(a) && F(a, b);\n }\n\n c.add(a);\n }\n}\n\nvar Td = {\n animationIterationCount: !0,\n borderImageOutset: !0,\n borderImageSlice: !0,\n borderImageWidth: !0,\n boxFlex: !0,\n boxFlexGroup: !0,\n boxOrdinalGroup: !0,\n columnCount: !0,\n columns: !0,\n flex: !0,\n flexGrow: !0,\n flexPositive: !0,\n flexShrink: !0,\n flexNegative: !0,\n flexOrder: !0,\n gridArea: !0,\n gridRow: !0,\n gridRowEnd: !0,\n gridRowSpan: !0,\n gridRowStart: !0,\n gridColumn: !0,\n gridColumnEnd: !0,\n gridColumnSpan: !0,\n gridColumnStart: !0,\n fontWeight: !0,\n lineClamp: !0,\n lineHeight: !0,\n opacity: !0,\n order: !0,\n orphans: !0,\n tabSize: !0,\n widows: !0,\n zIndex: !0,\n zoom: !0,\n fillOpacity: !0,\n floodOpacity: !0,\n stopOpacity: !0,\n strokeDasharray: !0,\n strokeDashoffset: !0,\n strokeMiterlimit: !0,\n strokeOpacity: !0,\n strokeWidth: !0\n},\n Ud = [\"Webkit\", \"ms\", \"Moz\", \"O\"];\nObject.keys(Td).forEach(function (a) {\n Ud.forEach(function (b) {\n b = b + a.charAt(0).toUpperCase() + a.substring(1);\n Td[b] = Td[a];\n });\n});\n\nfunction Vd(a, b, c) {\n return null == b || \"boolean\" === typeof b || \"\" === b ? \"\" : c || \"number\" !== typeof b || 0 === b || Td.hasOwnProperty(a) && Td[a] ? (\"\" + b).trim() : b + \"px\";\n}\n\nfunction Wd(a, b) {\n a = a.style;\n\n for (var c in b) {\n if (b.hasOwnProperty(c)) {\n var d = 0 === c.indexOf(\"--\"),\n e = Vd(c, b[c], d);\n \"float\" === c && (c = \"cssFloat\");\n d ? a.setProperty(c, e) : a[c] = e;\n }\n }\n}\n\nvar Xd = n({\n menuitem: !0\n}, {\n area: !0,\n base: !0,\n br: !0,\n col: !0,\n embed: !0,\n hr: !0,\n img: !0,\n input: !0,\n keygen: !0,\n link: !0,\n meta: !0,\n param: !0,\n source: !0,\n track: !0,\n wbr: !0\n});\n\nfunction Yd(a, b) {\n if (b) {\n if (Xd[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error(u(137, a, \"\"));\n\n if (null != b.dangerouslySetInnerHTML) {\n if (null != b.children) throw Error(u(60));\n if (!(\"object\" === typeof b.dangerouslySetInnerHTML && \"__html\" in b.dangerouslySetInnerHTML)) throw Error(u(61));\n }\n\n if (null != b.style && \"object\" !== typeof b.style) throw Error(u(62, \"\"));\n }\n}\n\nfunction Zd(a, b) {\n if (-1 === a.indexOf(\"-\")) return \"string\" === typeof b.is;\n\n switch (a) {\n case \"annotation-xml\":\n case \"color-profile\":\n case \"font-face\":\n case \"font-face-src\":\n case \"font-face-uri\":\n case \"font-face-format\":\n case \"font-face-name\":\n case \"missing-glyph\":\n return !1;\n\n default:\n return !0;\n }\n}\n\nfunction $d(a, b) {\n a = 9 === a.nodeType || 11 === a.nodeType ? a : a.ownerDocument;\n var c = xc(a);\n b = ja[b];\n\n for (var d = 0; d < b.length; d++) {\n yc(b[d], a, c);\n }\n}\n\nfunction ae() {}\n\nfunction be(a) {\n a = a || (\"undefined\" !== typeof document ? document : void 0);\n if (\"undefined\" === typeof a) return null;\n\n try {\n return a.activeElement || a.body;\n } catch (b) {\n return a.body;\n }\n}\n\nfunction ce(a) {\n for (; a && a.firstChild;) {\n a = a.firstChild;\n }\n\n return a;\n}\n\nfunction de(a, b) {\n var c = ce(a);\n a = 0;\n\n for (var d; c;) {\n if (3 === c.nodeType) {\n d = a + c.textContent.length;\n if (a <= b && d >= b) return {\n node: c,\n offset: b - a\n };\n a = d;\n }\n\n a: {\n for (; c;) {\n if (c.nextSibling) {\n c = c.nextSibling;\n break a;\n }\n\n c = c.parentNode;\n }\n\n c = void 0;\n }\n\n c = ce(c);\n }\n}\n\nfunction ee(a, b) {\n return a && b ? a === b ? !0 : a && 3 === a.nodeType ? !1 : b && 3 === b.nodeType ? ee(a, b.parentNode) : \"contains\" in a ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : !1 : !1;\n}\n\nfunction fe() {\n for (var a = window, b = be(); b instanceof a.HTMLIFrameElement;) {\n try {\n var c = \"string\" === typeof b.contentWindow.location.href;\n } catch (d) {\n c = !1;\n }\n\n if (c) a = b.contentWindow;else break;\n b = be(a.document);\n }\n\n return b;\n}\n\nfunction ge(a) {\n var b = a && a.nodeName && a.nodeName.toLowerCase();\n return b && (\"input\" === b && (\"text\" === a.type || \"search\" === a.type || \"tel\" === a.type || \"url\" === a.type || \"password\" === a.type) || \"textarea\" === b || \"true\" === a.contentEditable);\n}\n\nvar he = \"$\",\n ie = \"/$\",\n je = \"$?\",\n ke = \"$!\",\n le = null,\n me = null;\n\nfunction ne(a, b) {\n switch (a) {\n case \"button\":\n case \"input\":\n case \"select\":\n case \"textarea\":\n return !!b.autoFocus;\n }\n\n return !1;\n}\n\nfunction oe(a, b) {\n return \"textarea\" === a || \"option\" === a || \"noscript\" === a || \"string\" === typeof b.children || \"number\" === typeof b.children || \"object\" === typeof b.dangerouslySetInnerHTML && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;\n}\n\nvar pe = \"function\" === typeof setTimeout ? setTimeout : void 0,\n qe = \"function\" === typeof clearTimeout ? clearTimeout : void 0;\n\nfunction re(a) {\n for (; null != a; a = a.nextSibling) {\n var b = a.nodeType;\n if (1 === b || 3 === b) break;\n }\n\n return a;\n}\n\nfunction se(a) {\n a = a.previousSibling;\n\n for (var b = 0; a;) {\n if (8 === a.nodeType) {\n var c = a.data;\n\n if (c === he || c === ke || c === je) {\n if (0 === b) return a;\n b--;\n } else c === ie && b++;\n }\n\n a = a.previousSibling;\n }\n\n return null;\n}\n\nvar te = Math.random().toString(36).slice(2),\n ue = \"__reactInternalInstance$\" + te,\n ve = \"__reactEventHandlers$\" + te,\n we = \"__reactContainere$\" + te;\n\nfunction Fc(a) {\n var b = a[ue];\n if (b) return b;\n\n for (var c = a.parentNode; c;) {\n if (b = c[we] || c[ue]) {\n c = b.alternate;\n if (null !== b.child || null !== c && null !== c.child) for (a = se(a); null !== a;) {\n if (c = a[ue]) return c;\n a = se(a);\n }\n return b;\n }\n\n a = c;\n c = a.parentNode;\n }\n\n return null;\n}\n\nfunction Cc(a) {\n a = a[ue] || a[we];\n return !a || 5 !== a.tag && 6 !== a.tag && 13 !== a.tag && 3 !== a.tag ? null : a;\n}\n\nfunction xe(a) {\n if (5 === a.tag || 6 === a.tag) return a.stateNode;\n throw Error(u(33));\n}\n\nfunction ye(a) {\n return a[ve] || null;\n}\n\nvar ze = null,\n Ae = null,\n Be = null;\n\nfunction Ce() {\n if (Be) return Be;\n var a,\n b = Ae,\n c = b.length,\n d,\n e = \"value\" in ze ? ze.value : ze.textContent,\n f = e.length;\n\n for (a = 0; a < c && b[a] === e[a]; a++) {\n ;\n }\n\n var g = c - a;\n\n for (d = 1; d <= g && b[c - d] === e[f - d]; d++) {\n ;\n }\n\n return Be = e.slice(a, 1 < d ? 1 - d : void 0);\n}\n\nvar De = E.extend({\n data: null\n}),\n Ee = E.extend({\n data: null\n}),\n Fe = [9, 13, 27, 32],\n Ge = Ya && \"CompositionEvent\" in window,\n He = null;\nYa && \"documentMode\" in document && (He = document.documentMode);\nvar Ie = Ya && \"TextEvent\" in window && !He,\n Je = Ya && (!Ge || He && 8 < He && 11 >= He),\n Ke = String.fromCharCode(32),\n Le = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: \"onBeforeInput\",\n captured: \"onBeforeInputCapture\"\n },\n dependencies: [\"compositionend\", \"keypress\", \"textInput\", \"paste\"]\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: \"onCompositionEnd\",\n captured: \"onCompositionEndCapture\"\n },\n dependencies: \"blur compositionend keydown keypress keyup mousedown\".split(\" \")\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: \"onCompositionStart\",\n captured: \"onCompositionStartCapture\"\n },\n dependencies: \"blur compositionstart keydown keypress keyup mousedown\".split(\" \")\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: \"onCompositionUpdate\",\n captured: \"onCompositionUpdateCapture\"\n },\n dependencies: \"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")\n }\n},\n Me = !1;\n\nfunction Ne(a, b) {\n switch (a) {\n case \"keyup\":\n return -1 !== Fe.indexOf(b.keyCode);\n\n case \"keydown\":\n return 229 !== b.keyCode;\n\n case \"keypress\":\n case \"mousedown\":\n case \"blur\":\n return !0;\n\n default:\n return !1;\n }\n}\n\nfunction Oe(a) {\n a = a.detail;\n return \"object\" === typeof a && \"data\" in a ? a.data : null;\n}\n\nvar Pe = !1;\n\nfunction Qe(a, b) {\n switch (a) {\n case \"compositionend\":\n return Oe(b);\n\n case \"keypress\":\n if (32 !== b.which) return null;\n Me = !0;\n return Ke;\n\n case \"textInput\":\n return a = b.data, a === Ke && Me ? null : a;\n\n default:\n return null;\n }\n}\n\nfunction Re(a, b) {\n if (Pe) return \"compositionend\" === a || !Ge && Ne(a, b) ? (a = Ce(), Be = Ae = ze = null, Pe = !1, a) : null;\n\n switch (a) {\n case \"paste\":\n return null;\n\n case \"keypress\":\n if (!(b.ctrlKey || b.altKey || b.metaKey) || b.ctrlKey && b.altKey) {\n if (b.char && 1 < b.char.length) return b.char;\n if (b.which) return String.fromCharCode(b.which);\n }\n\n return null;\n\n case \"compositionend\":\n return Je && \"ko\" !== b.locale ? null : b.data;\n\n default:\n return null;\n }\n}\n\nvar Se = {\n eventTypes: Le,\n extractEvents: function extractEvents(a, b, c, d) {\n var e;\n if (Ge) b: {\n switch (a) {\n case \"compositionstart\":\n var f = Le.compositionStart;\n break b;\n\n case \"compositionend\":\n f = Le.compositionEnd;\n break b;\n\n case \"compositionupdate\":\n f = Le.compositionUpdate;\n break b;\n }\n\n f = void 0;\n } else Pe ? Ne(a, c) && (f = Le.compositionEnd) : \"keydown\" === a && 229 === c.keyCode && (f = Le.compositionStart);\n f ? (Je && \"ko\" !== c.locale && (Pe || f !== Le.compositionStart ? f === Le.compositionEnd && Pe && (e = Ce()) : (ze = d, Ae = \"value\" in ze ? ze.value : ze.textContent, Pe = !0)), f = De.getPooled(f, b, c, d), e ? f.data = e : (e = Oe(c), null !== e && (f.data = e)), Sc(f), e = f) : e = null;\n (a = Ie ? Qe(a, c) : Re(a, c)) ? (b = Ee.getPooled(Le.beforeInput, b, c, d), b.data = a, Sc(b)) : b = null;\n return null === e ? b : null === b ? e : [e, b];\n }\n},\n Te = {\n color: !0,\n date: !0,\n datetime: !0,\n \"datetime-local\": !0,\n email: !0,\n month: !0,\n number: !0,\n password: !0,\n range: !0,\n search: !0,\n tel: !0,\n text: !0,\n time: !0,\n url: !0,\n week: !0\n};\n\nfunction Ue(a) {\n var b = a && a.nodeName && a.nodeName.toLowerCase();\n return \"input\" === b ? !!Te[a.type] : \"textarea\" === b ? !0 : !1;\n}\n\nvar Ve = {\n change: {\n phasedRegistrationNames: {\n bubbled: \"onChange\",\n captured: \"onChangeCapture\"\n },\n dependencies: \"blur change click focus input keydown keyup selectionchange\".split(\" \")\n }\n};\n\nfunction We(a, b, c) {\n a = E.getPooled(Ve.change, a, b, c);\n a.type = \"change\";\n cb(c);\n Sc(a);\n return a;\n}\n\nvar Xe = null,\n Ye = null;\n\nfunction Ze(a) {\n Ba(a);\n}\n\nfunction $e(a) {\n var b = xe(a);\n if (zb(b)) return a;\n}\n\nfunction af(a, b) {\n if (\"change\" === a) return b;\n}\n\nvar bf = !1;\nYa && (bf = Rd(\"input\") && (!document.documentMode || 9 < document.documentMode));\n\nfunction cf() {\n Xe && (Xe.detachEvent(\"onpropertychange\", df), Ye = Xe = null);\n}\n\nfunction df(a) {\n if (\"value\" === a.propertyName && $e(Ye)) if (a = We(Ye, a, Mc(a)), ib) Ba(a);else {\n ib = !0;\n\n try {\n eb(Ze, a);\n } finally {\n ib = !1, kb();\n }\n }\n}\n\nfunction ef(a, b, c) {\n \"focus\" === a ? (cf(), Xe = b, Ye = c, Xe.attachEvent(\"onpropertychange\", df)) : \"blur\" === a && cf();\n}\n\nfunction ff(a) {\n if (\"selectionchange\" === a || \"keyup\" === a || \"keydown\" === a) return $e(Ye);\n}\n\nfunction gf(a, b) {\n if (\"click\" === a) return $e(b);\n}\n\nfunction hf(a, b) {\n if (\"input\" === a || \"change\" === a) return $e(b);\n}\n\nvar jf = {\n eventTypes: Ve,\n _isInputEventSupported: bf,\n extractEvents: function extractEvents(a, b, c, d) {\n var e = b ? xe(b) : window,\n f = e.nodeName && e.nodeName.toLowerCase();\n if (\"select\" === f || \"input\" === f && \"file\" === e.type) var g = af;else if (Ue(e)) {\n if (bf) g = hf;else {\n g = ff;\n var h = ef;\n }\n } else (f = e.nodeName) && \"input\" === f.toLowerCase() && (\"checkbox\" === e.type || \"radio\" === e.type) && (g = gf);\n if (g && (g = g(a, b))) return We(g, c, d);\n h && h(a, e, b);\n \"blur\" === a && (a = e._wrapperState) && a.controlled && \"number\" === e.type && Fb(e, \"number\", e.value);\n }\n},\n kf = {\n mouseEnter: {\n registrationName: \"onMouseEnter\",\n dependencies: [\"mouseout\", \"mouseover\"]\n },\n mouseLeave: {\n registrationName: \"onMouseLeave\",\n dependencies: [\"mouseout\", \"mouseover\"]\n },\n pointerEnter: {\n registrationName: \"onPointerEnter\",\n dependencies: [\"pointerout\", \"pointerover\"]\n },\n pointerLeave: {\n registrationName: \"onPointerLeave\",\n dependencies: [\"pointerout\", \"pointerover\"]\n }\n},\n lf,\n mf = {\n eventTypes: kf,\n extractEvents: function extractEvents(a, b, c, d, e) {\n var f = \"mouseover\" === a || \"pointerover\" === a,\n g = \"mouseout\" === a || \"pointerout\" === a;\n if (f && 0 === (e & 32) && (c.relatedTarget || c.fromElement) || !g && !f) return null;\n e = d.window === d ? d : (e = d.ownerDocument) ? e.defaultView || e.parentWindow : window;\n\n if (g) {\n if (g = b, b = (b = c.relatedTarget || c.toElement) ? Fc(b) : null, null !== b && (f = ec(b), b !== f || 5 !== b.tag && 6 !== b.tag)) b = null;\n } else g = null;\n\n if (g === b) return null;\n\n if (\"mouseout\" === a || \"mouseover\" === a) {\n var h = nd;\n var k = kf.mouseLeave;\n var l = kf.mouseEnter;\n var m = \"mouse\";\n } else if (\"pointerout\" === a || \"pointerover\" === a) h = od, k = kf.pointerLeave, l = kf.pointerEnter, m = \"pointer\";\n\n a = null == g ? e : xe(g);\n e = null == b ? e : xe(b);\n k = h.getPooled(k, g, c, d);\n k.type = m + \"leave\";\n k.target = a;\n k.relatedTarget = e;\n d = h.getPooled(l, b, c, d);\n d.type = m + \"enter\";\n d.target = e;\n d.relatedTarget = a;\n h = g;\n m = b;\n if (h && m) a: {\n l = h;\n a = m;\n g = 0;\n\n for (b = l; b; b = Nc(b)) {\n g++;\n }\n\n b = 0;\n\n for (e = a; e; e = Nc(e)) {\n b++;\n }\n\n for (; 0 < g - b;) {\n l = Nc(l), g--;\n }\n\n for (; 0 < b - g;) {\n a = Nc(a), b--;\n }\n\n for (; g--;) {\n if (l === a || l === a.alternate) break a;\n l = Nc(l);\n a = Nc(a);\n }\n\n l = null;\n } else l = null;\n a = l;\n\n for (l = []; h && h !== a;) {\n g = h.alternate;\n if (null !== g && g === a) break;\n l.push(h);\n h = Nc(h);\n }\n\n for (h = []; m && m !== a;) {\n g = m.alternate;\n if (null !== g && g === a) break;\n h.push(m);\n m = Nc(m);\n }\n\n for (m = 0; m < l.length; m++) {\n Qc(l[m], \"bubbled\", k);\n }\n\n for (m = h.length; 0 < m--;) {\n Qc(h[m], \"captured\", d);\n }\n\n if (c === lf) return lf = null, [k];\n lf = c;\n return [k, d];\n }\n};\n\nfunction nf(a, b) {\n return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;\n}\n\nvar of = \"function\" === typeof Object.is ? Object.is : nf,\n pf = Object.prototype.hasOwnProperty;\n\nfunction qf(a, b) {\n if (of(a, b)) return !0;\n if (\"object\" !== typeof a || null === a || \"object\" !== typeof b || null === b) return !1;\n var c = Object.keys(a),\n d = Object.keys(b);\n if (c.length !== d.length) return !1;\n\n for (d = 0; d < c.length; d++) {\n if (!pf.call(b, c[d]) || !of(a[c[d]], b[c[d]])) return !1;\n }\n\n return !0;\n}\n\nvar rf = Ya && \"documentMode\" in document && 11 >= document.documentMode,\n sf = {\n select: {\n phasedRegistrationNames: {\n bubbled: \"onSelect\",\n captured: \"onSelectCapture\"\n },\n dependencies: \"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")\n }\n},\n tf = null,\n uf = null,\n vf = null,\n wf = !1;\n\nfunction xf(a, b) {\n var c = b.window === b ? b.document : 9 === b.nodeType ? b : b.ownerDocument;\n if (wf || null == tf || tf !== be(c)) return null;\n c = tf;\n \"selectionStart\" in c && ge(c) ? c = {\n start: c.selectionStart,\n end: c.selectionEnd\n } : (c = (c.ownerDocument && c.ownerDocument.defaultView || window).getSelection(), c = {\n anchorNode: c.anchorNode,\n anchorOffset: c.anchorOffset,\n focusNode: c.focusNode,\n focusOffset: c.focusOffset\n });\n return vf && qf(vf, c) ? null : (vf = c, a = E.getPooled(sf.select, uf, a, b), a.type = \"select\", a.target = tf, Sc(a), a);\n}\n\nvar yf = {\n eventTypes: sf,\n extractEvents: function extractEvents(a, b, c, d) {\n var e = d.window === d ? d.document : 9 === d.nodeType ? d : d.ownerDocument,\n f;\n\n if (!(f = !e)) {\n a: {\n e = xc(e);\n f = ja.onSelect;\n\n for (var g = 0; g < f.length; g++) {\n if (!e.has(f[g])) {\n e = !1;\n break a;\n }\n }\n\n e = !0;\n }\n\n f = !e;\n }\n\n if (f) return null;\n e = b ? xe(b) : window;\n\n switch (a) {\n case \"focus\":\n if (Ue(e) || \"true\" === e.contentEditable) tf = e, uf = b, vf = null;\n break;\n\n case \"blur\":\n vf = uf = tf = null;\n break;\n\n case \"mousedown\":\n wf = !0;\n break;\n\n case \"contextmenu\":\n case \"mouseup\":\n case \"dragend\":\n return wf = !1, xf(c, d);\n\n case \"selectionchange\":\n if (rf) break;\n\n case \"keydown\":\n case \"keyup\":\n return xf(c, d);\n }\n\n return null;\n }\n};\nCa.injectEventPluginOrder(\"ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin\".split(\" \"));\nvar zf = Cc;\nsa = ye;\nua = zf;\nva = xe;\nCa.injectEventPluginsByName({\n SimpleEventPlugin: Ed,\n EnterLeaveEventPlugin: mf,\n ChangeEventPlugin: jf,\n SelectEventPlugin: yf,\n BeforeInputEventPlugin: Se\n});\nnew Set();\nvar Af = [],\n Bf = -1;\n\nfunction G(a) {\n 0 > Bf || (a.current = Af[Bf], Af[Bf] = null, Bf--);\n}\n\nfunction I(a, b) {\n Bf++;\n Af[Bf] = a.current;\n a.current = b;\n}\n\nvar Cf = {},\n J = {\n current: Cf\n},\n K = {\n current: !1\n},\n Df = Cf;\n\nfunction Ef(a, b) {\n var c = a.type.contextTypes;\n if (!c) return Cf;\n var d = a.stateNode;\n if (d && d.__reactInternalMemoizedUnmaskedChildContext === b) return d.__reactInternalMemoizedMaskedChildContext;\n var e = {},\n f;\n\n for (f in c) {\n e[f] = b[f];\n }\n\n d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b, a.__reactInternalMemoizedMaskedChildContext = e);\n return e;\n}\n\nfunction L(a) {\n a = a.childContextTypes;\n return null !== a && void 0 !== a;\n}\n\nfunction Ff(a) {\n G(K, a);\n G(J, a);\n}\n\nfunction Gf(a) {\n G(K, a);\n G(J, a);\n}\n\nfunction Hf(a, b, c) {\n if (J.current !== Cf) throw Error(u(168));\n I(J, b, a);\n I(K, c, a);\n}\n\nfunction If(a, b, c) {\n var d = a.stateNode;\n a = b.childContextTypes;\n if (\"function\" !== typeof d.getChildContext) return c;\n d = d.getChildContext();\n\n for (var e in d) {\n if (!(e in a)) throw Error(u(108, Wa(b) || \"Unknown\", e));\n }\n\n return n({}, c, {}, d);\n}\n\nfunction Jf(a) {\n var b = a.stateNode;\n b = b && b.__reactInternalMemoizedMergedChildContext || Cf;\n Df = J.current;\n I(J, b, a);\n I(K, K.current, a);\n return !0;\n}\n\nfunction Kf(a, b, c) {\n var d = a.stateNode;\n if (!d) throw Error(u(169));\n c ? (b = If(a, b, Df), d.__reactInternalMemoizedMergedChildContext = b, G(K, a), G(J, a), I(J, b, a)) : G(K, a);\n I(K, c, a);\n}\n\nvar Lf = q.unstable_runWithPriority,\n Mf = q.unstable_scheduleCallback,\n Nf = q.unstable_cancelCallback,\n Of = q.unstable_shouldYield,\n Pf = q.unstable_requestPaint,\n Qf = q.unstable_now,\n Rf = q.unstable_getCurrentPriorityLevel,\n Sf = q.unstable_ImmediatePriority,\n Tf = q.unstable_UserBlockingPriority,\n Uf = q.unstable_NormalPriority,\n Vf = q.unstable_LowPriority,\n Wf = q.unstable_IdlePriority,\n Xf = {},\n Yf = void 0 !== Pf ? Pf : function () {},\n Zf = null,\n $f = null,\n ag = !1,\n bg = Qf(),\n cg = 1E4 > bg ? Qf : function () {\n return Qf() - bg;\n};\n\nfunction dg() {\n switch (Rf()) {\n case Sf:\n return 99;\n\n case Tf:\n return 98;\n\n case Uf:\n return 97;\n\n case Vf:\n return 96;\n\n case Wf:\n return 95;\n\n default:\n throw Error(u(332));\n }\n}\n\nfunction eg(a) {\n switch (a) {\n case 99:\n return Sf;\n\n case 98:\n return Tf;\n\n case 97:\n return Uf;\n\n case 96:\n return Vf;\n\n case 95:\n return Wf;\n\n default:\n throw Error(u(332));\n }\n}\n\nfunction fg(a, b) {\n a = eg(a);\n return Lf(a, b);\n}\n\nfunction gg(a, b, c) {\n a = eg(a);\n return Mf(a, b, c);\n}\n\nfunction hg(a) {\n null === Zf ? (Zf = [a], $f = Mf(Sf, ig)) : Zf.push(a);\n return Xf;\n}\n\nfunction jg() {\n if (null !== $f) {\n var a = $f;\n $f = null;\n Nf(a);\n }\n\n ig();\n}\n\nfunction ig() {\n if (!ag && null !== Zf) {\n ag = !0;\n var a = 0;\n\n try {\n var b = Zf;\n fg(99, function () {\n for (; a < b.length; a++) {\n var c = b[a];\n\n do {\n c = c(!0);\n } while (null !== c);\n }\n });\n Zf = null;\n } catch (c) {\n throw null !== Zf && (Zf = Zf.slice(a + 1)), Mf(Sf, jg), c;\n } finally {\n ag = !1;\n }\n }\n}\n\nvar kg = 3;\n\nfunction lg(a, b, c) {\n c /= 10;\n return 1073741821 - (((1073741821 - a + b / 10) / c | 0) + 1) * c;\n}\n\nfunction mg(a, b) {\n if (a && a.defaultProps) {\n b = n({}, b);\n a = a.defaultProps;\n\n for (var c in a) {\n void 0 === b[c] && (b[c] = a[c]);\n }\n }\n\n return b;\n}\n\nvar ng = {\n current: null\n},\n og = null,\n pg = null,\n qg = null;\n\nfunction rg() {\n qg = pg = og = null;\n}\n\nfunction sg(a, b) {\n var c = a.type._context;\n I(ng, c._currentValue, a);\n c._currentValue = b;\n}\n\nfunction tg(a) {\n var b = ng.current;\n G(ng, a);\n a.type._context._currentValue = b;\n}\n\nfunction ug(a, b) {\n for (; null !== a;) {\n var c = a.alternate;\n if (a.childExpirationTime < b) a.childExpirationTime = b, null !== c && c.childExpirationTime < b && (c.childExpirationTime = b);else if (null !== c && c.childExpirationTime < b) c.childExpirationTime = b;else break;\n a = a.return;\n }\n}\n\nfunction vg(a, b) {\n og = a;\n qg = pg = null;\n a = a.dependencies;\n null !== a && null !== a.firstContext && (a.expirationTime >= b && (wg = !0), a.firstContext = null);\n}\n\nfunction xg(a, b) {\n if (qg !== a && !1 !== b && 0 !== b) {\n if (\"number\" !== typeof b || 1073741823 === b) qg = a, b = 1073741823;\n b = {\n context: a,\n observedBits: b,\n next: null\n };\n\n if (null === pg) {\n if (null === og) throw Error(u(308));\n pg = b;\n og.dependencies = {\n expirationTime: 0,\n firstContext: b,\n responders: null\n };\n } else pg = pg.next = b;\n }\n\n return a._currentValue;\n}\n\nvar yg = !1;\n\nfunction zg(a) {\n return {\n baseState: a,\n firstUpdate: null,\n lastUpdate: null,\n firstCapturedUpdate: null,\n lastCapturedUpdate: null,\n firstEffect: null,\n lastEffect: null,\n firstCapturedEffect: null,\n lastCapturedEffect: null\n };\n}\n\nfunction Ag(a) {\n return {\n baseState: a.baseState,\n firstUpdate: a.firstUpdate,\n lastUpdate: a.lastUpdate,\n firstCapturedUpdate: null,\n lastCapturedUpdate: null,\n firstEffect: null,\n lastEffect: null,\n firstCapturedEffect: null,\n lastCapturedEffect: null\n };\n}\n\nfunction Bg(a, b) {\n return {\n expirationTime: a,\n suspenseConfig: b,\n tag: 0,\n payload: null,\n callback: null,\n next: null,\n nextEffect: null\n };\n}\n\nfunction Cg(a, b) {\n null === a.lastUpdate ? a.firstUpdate = a.lastUpdate = b : (a.lastUpdate.next = b, a.lastUpdate = b);\n}\n\nfunction Dg(a, b) {\n var c = a.alternate;\n\n if (null === c) {\n var d = a.updateQueue;\n var e = null;\n null === d && (d = a.updateQueue = zg(a.memoizedState));\n } else d = a.updateQueue, e = c.updateQueue, null === d ? null === e ? (d = a.updateQueue = zg(a.memoizedState), e = c.updateQueue = zg(c.memoizedState)) : d = a.updateQueue = Ag(e) : null === e && (e = c.updateQueue = Ag(d));\n\n null === e || d === e ? Cg(d, b) : null === d.lastUpdate || null === e.lastUpdate ? (Cg(d, b), Cg(e, b)) : (Cg(d, b), e.lastUpdate = b);\n}\n\nfunction Eg(a, b) {\n var c = a.updateQueue;\n c = null === c ? a.updateQueue = zg(a.memoizedState) : Fg(a, c);\n null === c.lastCapturedUpdate ? c.firstCapturedUpdate = c.lastCapturedUpdate = b : (c.lastCapturedUpdate.next = b, c.lastCapturedUpdate = b);\n}\n\nfunction Fg(a, b) {\n var c = a.alternate;\n null !== c && b === c.updateQueue && (b = a.updateQueue = Ag(b));\n return b;\n}\n\nfunction Gg(a, b, c, d, e, f) {\n switch (c.tag) {\n case 1:\n return a = c.payload, \"function\" === typeof a ? a.call(f, d, e) : a;\n\n case 3:\n a.effectTag = a.effectTag & -4097 | 64;\n\n case 0:\n a = c.payload;\n e = \"function\" === typeof a ? a.call(f, d, e) : a;\n if (null === e || void 0 === e) break;\n return n({}, d, e);\n\n case 2:\n yg = !0;\n }\n\n return d;\n}\n\nfunction Hg(a, b, c, d, e) {\n yg = !1;\n b = Fg(a, b);\n\n for (var f = b.baseState, g = null, h = 0, k = b.firstUpdate, l = f; null !== k;) {\n var m = k.expirationTime;\n m < e ? (null === g && (g = k, f = l), h < m && (h = m)) : (Ig(m, k.suspenseConfig), l = Gg(a, b, k, l, c, d), null !== k.callback && (a.effectTag |= 32, k.nextEffect = null, null === b.lastEffect ? b.firstEffect = b.lastEffect = k : (b.lastEffect.nextEffect = k, b.lastEffect = k)));\n k = k.next;\n }\n\n m = null;\n\n for (k = b.firstCapturedUpdate; null !== k;) {\n var C = k.expirationTime;\n C < e ? (null === m && (m = k, null === g && (f = l)), h < C && (h = C)) : (l = Gg(a, b, k, l, c, d), null !== k.callback && (a.effectTag |= 32, k.nextEffect = null, null === b.lastCapturedEffect ? b.firstCapturedEffect = b.lastCapturedEffect = k : (b.lastCapturedEffect.nextEffect = k, b.lastCapturedEffect = k)));\n k = k.next;\n }\n\n null === g && (b.lastUpdate = null);\n null === m ? b.lastCapturedUpdate = null : a.effectTag |= 32;\n null === g && null === m && (f = l);\n b.baseState = f;\n b.firstUpdate = g;\n b.firstCapturedUpdate = m;\n Jg(h);\n a.expirationTime = h;\n a.memoizedState = l;\n}\n\nfunction Kg(a, b, c) {\n null !== b.firstCapturedUpdate && (null !== b.lastUpdate && (b.lastUpdate.next = b.firstCapturedUpdate, b.lastUpdate = b.lastCapturedUpdate), b.firstCapturedUpdate = b.lastCapturedUpdate = null);\n Lg(b.firstEffect, c);\n b.firstEffect = b.lastEffect = null;\n Lg(b.firstCapturedEffect, c);\n b.firstCapturedEffect = b.lastCapturedEffect = null;\n}\n\nfunction Lg(a, b) {\n for (; null !== a;) {\n var c = a.callback;\n\n if (null !== c) {\n a.callback = null;\n var d = b;\n if (\"function\" !== typeof c) throw Error(u(191, c));\n c.call(d);\n }\n\n a = a.nextEffect;\n }\n}\n\nvar Mg = Ea.ReactCurrentBatchConfig,\n Ng = new aa.Component().refs;\n\nfunction Og(a, b, c, d) {\n b = a.memoizedState;\n c = c(d, b);\n c = null === c || void 0 === c ? b : n({}, b, c);\n a.memoizedState = c;\n d = a.updateQueue;\n null !== d && 0 === a.expirationTime && (d.baseState = c);\n}\n\nvar Sg = {\n isMounted: function isMounted(a) {\n return (a = a._reactInternalFiber) ? ec(a) === a : !1;\n },\n enqueueSetState: function enqueueSetState(a, b, c) {\n a = a._reactInternalFiber;\n var d = Pg(),\n e = Mg.suspense;\n d = Qg(d, a, e);\n e = Bg(d, e);\n e.payload = b;\n void 0 !== c && null !== c && (e.callback = c);\n Dg(a, e);\n Rg(a, d);\n },\n enqueueReplaceState: function enqueueReplaceState(a, b, c) {\n a = a._reactInternalFiber;\n var d = Pg(),\n e = Mg.suspense;\n d = Qg(d, a, e);\n e = Bg(d, e);\n e.tag = 1;\n e.payload = b;\n void 0 !== c && null !== c && (e.callback = c);\n Dg(a, e);\n Rg(a, d);\n },\n enqueueForceUpdate: function enqueueForceUpdate(a, b) {\n a = a._reactInternalFiber;\n var c = Pg(),\n d = Mg.suspense;\n c = Qg(c, a, d);\n d = Bg(c, d);\n d.tag = 2;\n void 0 !== b && null !== b && (d.callback = b);\n Dg(a, d);\n Rg(a, c);\n }\n};\n\nfunction Tg(a, b, c, d, e, f, g) {\n a = a.stateNode;\n return \"function\" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(d, f, g) : b.prototype && b.prototype.isPureReactComponent ? !qf(c, d) || !qf(e, f) : !0;\n}\n\nfunction Ug(a, b, c) {\n var d = !1,\n e = Cf;\n var f = b.contextType;\n \"object\" === typeof f && null !== f ? f = xg(f) : (e = L(b) ? Df : J.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? Ef(a, e) : Cf);\n b = new b(c, f);\n a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null;\n b.updater = Sg;\n a.stateNode = b;\n b._reactInternalFiber = a;\n d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = e, a.__reactInternalMemoizedMaskedChildContext = f);\n return b;\n}\n\nfunction Vg(a, b, c, d) {\n a = b.state;\n \"function\" === typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d);\n \"function\" === typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d);\n b.state !== a && Sg.enqueueReplaceState(b, b.state, null);\n}\n\nfunction Wg(a, b, c, d) {\n var e = a.stateNode;\n e.props = c;\n e.state = a.memoizedState;\n e.refs = Ng;\n var f = b.contextType;\n \"object\" === typeof f && null !== f ? e.context = xg(f) : (f = L(b) ? Df : J.current, e.context = Ef(a, f));\n f = a.updateQueue;\n null !== f && (Hg(a, f, c, e, d), e.state = a.memoizedState);\n f = b.getDerivedStateFromProps;\n \"function\" === typeof f && (Og(a, b, f, c), e.state = a.memoizedState);\n \"function\" === typeof b.getDerivedStateFromProps || \"function\" === typeof e.getSnapshotBeforeUpdate || \"function\" !== typeof e.UNSAFE_componentWillMount && \"function\" !== typeof e.componentWillMount || (b = e.state, \"function\" === typeof e.componentWillMount && e.componentWillMount(), \"function\" === typeof e.UNSAFE_componentWillMount && e.UNSAFE_componentWillMount(), b !== e.state && Sg.enqueueReplaceState(e, e.state, null), f = a.updateQueue, null !== f && (Hg(a, f, c, e, d), e.state = a.memoizedState));\n \"function\" === typeof e.componentDidMount && (a.effectTag |= 4);\n}\n\nvar Xg = Array.isArray;\n\nfunction Yg(a, b, c) {\n a = c.ref;\n\n if (null !== a && \"function\" !== typeof a && \"object\" !== typeof a) {\n if (c._owner) {\n c = c._owner;\n\n if (c) {\n if (1 !== c.tag) throw Error(u(309));\n var d = c.stateNode;\n }\n\n if (!d) throw Error(u(147, a));\n var e = \"\" + a;\n if (null !== b && null !== b.ref && \"function\" === typeof b.ref && b.ref._stringRef === e) return b.ref;\n\n b = function b(a) {\n var b = d.refs;\n b === Ng && (b = d.refs = {});\n null === a ? delete b[e] : b[e] = a;\n };\n\n b._stringRef = e;\n return b;\n }\n\n if (\"string\" !== typeof a) throw Error(u(284));\n if (!c._owner) throw Error(u(290, a));\n }\n\n return a;\n}\n\nfunction Zg(a, b) {\n if (\"textarea\" !== a.type) throw Error(u(31, \"[object Object]\" === Object.prototype.toString.call(b) ? \"object with keys {\" + Object.keys(b).join(\", \") + \"}\" : b, \"\"));\n}\n\nfunction $g(a) {\n function b(b, c) {\n if (a) {\n var d = b.lastEffect;\n null !== d ? (d.nextEffect = c, b.lastEffect = c) : b.firstEffect = b.lastEffect = c;\n c.nextEffect = null;\n c.effectTag = 8;\n }\n }\n\n function c(c, d) {\n if (!a) return null;\n\n for (; null !== d;) {\n b(c, d), d = d.sibling;\n }\n\n return null;\n }\n\n function d(a, b) {\n for (a = new Map(); null !== b;) {\n null !== b.key ? a.set(b.key, b) : a.set(b.index, b), b = b.sibling;\n }\n\n return a;\n }\n\n function e(a, b, c) {\n a = ah(a, b, c);\n a.index = 0;\n a.sibling = null;\n return a;\n }\n\n function f(b, c, d) {\n b.index = d;\n if (!a) return c;\n d = b.alternate;\n if (null !== d) return d = d.index, d < c ? (b.effectTag = 2, c) : d;\n b.effectTag = 2;\n return c;\n }\n\n function g(b) {\n a && null === b.alternate && (b.effectTag = 2);\n return b;\n }\n\n function h(a, b, c, d) {\n if (null === b || 6 !== b.tag) return b = bh(c, a.mode, d), b.return = a, b;\n b = e(b, c, d);\n b.return = a;\n return b;\n }\n\n function k(a, b, c, d) {\n if (null !== b && b.elementType === c.type) return d = e(b, c.props, d), d.ref = Yg(a, b, c), d.return = a, d;\n d = ch(c.type, c.key, c.props, null, a.mode, d);\n d.ref = Yg(a, b, c);\n d.return = a;\n return d;\n }\n\n function l(a, b, c, d) {\n if (null === b || 4 !== b.tag || b.stateNode.containerInfo !== c.containerInfo || b.stateNode.implementation !== c.implementation) return b = dh(c, a.mode, d), b.return = a, b;\n b = e(b, c.children || [], d);\n b.return = a;\n return b;\n }\n\n function m(a, b, c, d, f) {\n if (null === b || 7 !== b.tag) return b = eh(c, a.mode, d, f), b.return = a, b;\n b = e(b, c, d);\n b.return = a;\n return b;\n }\n\n function C(a, b, c) {\n if (\"string\" === typeof b || \"number\" === typeof b) return b = bh(\"\" + b, a.mode, c), b.return = a, b;\n\n if (\"object\" === typeof b && null !== b) {\n switch (b.$$typeof) {\n case Ga:\n return c = ch(b.type, b.key, b.props, null, a.mode, c), c.ref = Yg(a, null, b), c.return = a, c;\n\n case Ha:\n return b = dh(b, a.mode, c), b.return = a, b;\n }\n\n if (Xg(b) || Ua(b)) return b = eh(b, a.mode, c, null), b.return = a, b;\n Zg(a, b);\n }\n\n return null;\n }\n\n function y(a, b, c, d) {\n var e = null !== b ? b.key : null;\n if (\"string\" === typeof c || \"number\" === typeof c) return null !== e ? null : h(a, b, \"\" + c, d);\n\n if (\"object\" === typeof c && null !== c) {\n switch (c.$$typeof) {\n case Ga:\n return c.key === e ? c.type === Ia ? m(a, b, c.props.children, d, e) : k(a, b, c, d) : null;\n\n case Ha:\n return c.key === e ? l(a, b, c, d) : null;\n }\n\n if (Xg(c) || Ua(c)) return null !== e ? null : m(a, b, c, d, null);\n Zg(a, c);\n }\n\n return null;\n }\n\n function H(a, b, c, d, e) {\n if (\"string\" === typeof d || \"number\" === typeof d) return a = a.get(c) || null, h(b, a, \"\" + d, e);\n\n if (\"object\" === typeof d && null !== d) {\n switch (d.$$typeof) {\n case Ga:\n return a = a.get(null === d.key ? c : d.key) || null, d.type === Ia ? m(b, a, d.props.children, e, d.key) : k(b, a, d, e);\n\n case Ha:\n return a = a.get(null === d.key ? c : d.key) || null, l(b, a, d, e);\n }\n\n if (Xg(d) || Ua(d)) return a = a.get(c) || null, m(b, a, d, e, null);\n Zg(b, d);\n }\n\n return null;\n }\n\n function z(e, g, h, k) {\n for (var l = null, m = null, r = g, x = g = 0, A = null; null !== r && x < h.length; x++) {\n r.index > x ? (A = r, r = null) : A = r.sibling;\n var p = y(e, r, h[x], k);\n\n if (null === p) {\n null === r && (r = A);\n break;\n }\n\n a && r && null === p.alternate && b(e, r);\n g = f(p, g, x);\n null === m ? l = p : m.sibling = p;\n m = p;\n r = A;\n }\n\n if (x === h.length) return c(e, r), l;\n\n if (null === r) {\n for (; x < h.length; x++) {\n r = C(e, h[x], k), null !== r && (g = f(r, g, x), null === m ? l = r : m.sibling = r, m = r);\n }\n\n return l;\n }\n\n for (r = d(e, r); x < h.length; x++) {\n A = H(r, e, x, h[x], k), null !== A && (a && null !== A.alternate && r.delete(null === A.key ? x : A.key), g = f(A, g, x), null === m ? l = A : m.sibling = A, m = A);\n }\n\n a && r.forEach(function (a) {\n return b(e, a);\n });\n return l;\n }\n\n function ta(e, g, h, k) {\n var l = Ua(h);\n if (\"function\" !== typeof l) throw Error(u(150));\n h = l.call(h);\n if (null == h) throw Error(u(151));\n\n for (var m = l = null, r = g, x = g = 0, A = null, p = h.next(); null !== r && !p.done; x++, p = h.next()) {\n r.index > x ? (A = r, r = null) : A = r.sibling;\n var z = y(e, r, p.value, k);\n\n if (null === z) {\n null === r && (r = A);\n break;\n }\n\n a && r && null === z.alternate && b(e, r);\n g = f(z, g, x);\n null === m ? l = z : m.sibling = z;\n m = z;\n r = A;\n }\n\n if (p.done) return c(e, r), l;\n\n if (null === r) {\n for (; !p.done; x++, p = h.next()) {\n p = C(e, p.value, k), null !== p && (g = f(p, g, x), null === m ? l = p : m.sibling = p, m = p);\n }\n\n return l;\n }\n\n for (r = d(e, r); !p.done; x++, p = h.next()) {\n p = H(r, e, x, p.value, k), null !== p && (a && null !== p.alternate && r.delete(null === p.key ? x : p.key), g = f(p, g, x), null === m ? l = p : m.sibling = p, m = p);\n }\n\n a && r.forEach(function (a) {\n return b(e, a);\n });\n return l;\n }\n\n return function (a, d, f, h) {\n var k = \"object\" === typeof f && null !== f && f.type === Ia && null === f.key;\n k && (f = f.props.children);\n var l = \"object\" === typeof f && null !== f;\n if (l) switch (f.$$typeof) {\n case Ga:\n a: {\n l = f.key;\n\n for (k = d; null !== k;) {\n if (k.key === l) {\n if (7 === k.tag ? f.type === Ia : k.elementType === f.type) {\n c(a, k.sibling);\n d = e(k, f.type === Ia ? f.props.children : f.props, h);\n d.ref = Yg(a, k, f);\n d.return = a;\n a = d;\n break a;\n } else {\n c(a, k);\n break;\n }\n } else b(a, k);\n k = k.sibling;\n }\n\n f.type === Ia ? (d = eh(f.props.children, a.mode, h, f.key), d.return = a, a = d) : (h = ch(f.type, f.key, f.props, null, a.mode, h), h.ref = Yg(a, d, f), h.return = a, a = h);\n }\n\n return g(a);\n\n case Ha:\n a: {\n for (k = f.key; null !== d;) {\n if (d.key === k) {\n if (4 === d.tag && d.stateNode.containerInfo === f.containerInfo && d.stateNode.implementation === f.implementation) {\n c(a, d.sibling);\n d = e(d, f.children || [], h);\n d.return = a;\n a = d;\n break a;\n } else {\n c(a, d);\n break;\n }\n } else b(a, d);\n d = d.sibling;\n }\n\n d = dh(f, a.mode, h);\n d.return = a;\n a = d;\n }\n\n return g(a);\n }\n if (\"string\" === typeof f || \"number\" === typeof f) return f = \"\" + f, null !== d && 6 === d.tag ? (c(a, d.sibling), d = e(d, f, h), d.return = a, a = d) : (c(a, d), d = bh(f, a.mode, h), d.return = a, a = d), g(a);\n if (Xg(f)) return z(a, d, f, h);\n if (Ua(f)) return ta(a, d, f, h);\n l && Zg(a, f);\n if (\"undefined\" === typeof f && !k) switch (a.tag) {\n case 1:\n case 0:\n throw a = a.type, Error(u(152, a.displayName || a.name || \"Component\"));\n }\n return c(a, d);\n };\n}\n\nvar fh = $g(!0),\n gh = $g(!1),\n hh = {},\n ih = {\n current: hh\n},\n jh = {\n current: hh\n},\n kh = {\n current: hh\n};\n\nfunction lh(a) {\n if (a === hh) throw Error(u(174));\n return a;\n}\n\nfunction mh(a, b) {\n I(kh, b, a);\n I(jh, a, a);\n I(ih, hh, a);\n var c = b.nodeType;\n\n switch (c) {\n case 9:\n case 11:\n b = (b = b.documentElement) ? b.namespaceURI : Qb(null, \"\");\n break;\n\n default:\n c = 8 === c ? b.parentNode : b, b = c.namespaceURI || null, c = c.tagName, b = Qb(b, c);\n }\n\n G(ih, a);\n I(ih, b, a);\n}\n\nfunction nh(a) {\n G(ih, a);\n G(jh, a);\n G(kh, a);\n}\n\nfunction oh(a) {\n lh(kh.current);\n var b = lh(ih.current);\n var c = Qb(b, a.type);\n b !== c && (I(jh, a, a), I(ih, c, a));\n}\n\nfunction ph(a) {\n jh.current === a && (G(ih, a), G(jh, a));\n}\n\nvar M = {\n current: 0\n};\n\nfunction qh(a) {\n for (var b = a; null !== b;) {\n if (13 === b.tag) {\n var c = b.memoizedState;\n if (null !== c && (c = c.dehydrated, null === c || c.data === je || c.data === ke)) return b;\n } else if (19 === b.tag && void 0 !== b.memoizedProps.revealOrder) {\n if (0 !== (b.effectTag & 64)) return b;\n } else if (null !== b.child) {\n b.child.return = b;\n b = b.child;\n continue;\n }\n\n if (b === a) break;\n\n for (; null === b.sibling;) {\n if (null === b.return || b.return === a) return null;\n b = b.return;\n }\n\n b.sibling.return = b.return;\n b = b.sibling;\n }\n\n return null;\n}\n\nfunction rh(a, b) {\n return {\n responder: a,\n props: b\n };\n}\n\nvar sh = Ea.ReactCurrentDispatcher,\n N = Ea.ReactCurrentBatchConfig,\n th = 0,\n uh = null,\n O = null,\n vh = null,\n wh = null,\n P = null,\n xh = null,\n yh = 0,\n zh = null,\n Ah = 0,\n Bh = !1,\n Ch = null,\n Gh = 0;\n\nfunction Q() {\n throw Error(u(321));\n}\n\nfunction Hh(a, b) {\n if (null === b) return !1;\n\n for (var c = 0; c < b.length && c < a.length; c++) {\n if (!of(a[c], b[c])) return !1;\n }\n\n return !0;\n}\n\nfunction Ih(a, b, c, d, e, f) {\n th = f;\n uh = b;\n vh = null !== a ? a.memoizedState : null;\n sh.current = null === vh ? Jh : Kh;\n b = c(d, e);\n\n if (Bh) {\n do {\n Bh = !1, Gh += 1, vh = null !== a ? a.memoizedState : null, xh = wh, zh = P = O = null, sh.current = Kh, b = c(d, e);\n } while (Bh);\n\n Ch = null;\n Gh = 0;\n }\n\n sh.current = Lh;\n a = uh;\n a.memoizedState = wh;\n a.expirationTime = yh;\n a.updateQueue = zh;\n a.effectTag |= Ah;\n a = null !== O && null !== O.next;\n th = 0;\n xh = P = wh = vh = O = uh = null;\n yh = 0;\n zh = null;\n Ah = 0;\n if (a) throw Error(u(300));\n return b;\n}\n\nfunction Mh() {\n sh.current = Lh;\n th = 0;\n xh = P = wh = vh = O = uh = null;\n yh = 0;\n zh = null;\n Ah = 0;\n Bh = !1;\n Ch = null;\n Gh = 0;\n}\n\nfunction Nh() {\n var a = {\n memoizedState: null,\n baseState: null,\n queue: null,\n baseUpdate: null,\n next: null\n };\n null === P ? wh = P = a : P = P.next = a;\n return P;\n}\n\nfunction Oh() {\n if (null !== xh) P = xh, xh = P.next, O = vh, vh = null !== O ? O.next : null;else {\n if (null === vh) throw Error(u(310));\n O = vh;\n var a = {\n memoizedState: O.memoizedState,\n baseState: O.baseState,\n queue: O.queue,\n baseUpdate: O.baseUpdate,\n next: null\n };\n P = null === P ? wh = a : P.next = a;\n vh = O.next;\n }\n return P;\n}\n\nfunction Ph(a, b) {\n return \"function\" === typeof b ? b(a) : b;\n}\n\nfunction Qh(a) {\n var b = Oh(),\n c = b.queue;\n if (null === c) throw Error(u(311));\n c.lastRenderedReducer = a;\n\n if (0 < Gh) {\n var d = c.dispatch;\n\n if (null !== Ch) {\n var e = Ch.get(c);\n\n if (void 0 !== e) {\n Ch.delete(c);\n var f = b.memoizedState;\n\n do {\n f = a(f, e.action), e = e.next;\n } while (null !== e);\n\n of(f, b.memoizedState) || (wg = !0);\n b.memoizedState = f;\n b.baseUpdate === c.last && (b.baseState = f);\n c.lastRenderedState = f;\n return [f, d];\n }\n }\n\n return [b.memoizedState, d];\n }\n\n d = c.last;\n var g = b.baseUpdate;\n f = b.baseState;\n null !== g ? (null !== d && (d.next = null), d = g.next) : d = null !== d ? d.next : null;\n\n if (null !== d) {\n var h = e = null,\n k = d,\n l = !1;\n\n do {\n var m = k.expirationTime;\n m < th ? (l || (l = !0, h = g, e = f), m > yh && (yh = m, Jg(yh))) : (Ig(m, k.suspenseConfig), f = k.eagerReducer === a ? k.eagerState : a(f, k.action));\n g = k;\n k = k.next;\n } while (null !== k && k !== d);\n\n l || (h = g, e = f);\n of(f, b.memoizedState) || (wg = !0);\n b.memoizedState = f;\n b.baseUpdate = h;\n b.baseState = e;\n c.lastRenderedState = f;\n }\n\n return [b.memoizedState, c.dispatch];\n}\n\nfunction Rh(a) {\n var b = Nh();\n \"function\" === typeof a && (a = a());\n b.memoizedState = b.baseState = a;\n a = b.queue = {\n last: null,\n dispatch: null,\n lastRenderedReducer: Ph,\n lastRenderedState: a\n };\n a = a.dispatch = Sh.bind(null, uh, a);\n return [b.memoizedState, a];\n}\n\nfunction Th(a) {\n return Qh(Ph, a);\n}\n\nfunction Uh(a, b, c, d) {\n a = {\n tag: a,\n create: b,\n destroy: c,\n deps: d,\n next: null\n };\n null === zh ? (zh = {\n lastEffect: null\n }, zh.lastEffect = a.next = a) : (b = zh.lastEffect, null === b ? zh.lastEffect = a.next = a : (c = b.next, b.next = a, a.next = c, zh.lastEffect = a));\n return a;\n}\n\nfunction Vh(a, b, c, d) {\n var e = Nh();\n Ah |= a;\n e.memoizedState = Uh(b, c, void 0, void 0 === d ? null : d);\n}\n\nfunction Wh(a, b, c, d) {\n var e = Oh();\n d = void 0 === d ? null : d;\n var f = void 0;\n\n if (null !== O) {\n var g = O.memoizedState;\n f = g.destroy;\n\n if (null !== d && Hh(d, g.deps)) {\n Uh(0, c, f, d);\n return;\n }\n }\n\n Ah |= a;\n e.memoizedState = Uh(b, c, f, d);\n}\n\nfunction Xh(a, b) {\n return Vh(516, 192, a, b);\n}\n\nfunction Yh(a, b) {\n return Wh(516, 192, a, b);\n}\n\nfunction Zh(a, b) {\n if (\"function\" === typeof b) return a = a(), b(a), function () {\n b(null);\n };\n if (null !== b && void 0 !== b) return a = a(), b.current = a, function () {\n b.current = null;\n };\n}\n\nfunction $h() {}\n\nfunction ai(a, b) {\n Nh().memoizedState = [a, void 0 === b ? null : b];\n return a;\n}\n\nfunction bi(a, b) {\n var c = Oh();\n b = void 0 === b ? null : b;\n var d = c.memoizedState;\n if (null !== d && null !== b && Hh(b, d[1])) return d[0];\n c.memoizedState = [a, b];\n return a;\n}\n\nfunction Sh(a, b, c) {\n if (!(25 > Gh)) throw Error(u(301));\n var d = a.alternate;\n if (a === uh || null !== d && d === uh) {\n if (Bh = !0, a = {\n expirationTime: th,\n suspenseConfig: null,\n action: c,\n eagerReducer: null,\n eagerState: null,\n next: null\n }, null === Ch && (Ch = new Map()), c = Ch.get(b), void 0 === c) Ch.set(b, a);else {\n for (b = c; null !== b.next;) {\n b = b.next;\n }\n\n b.next = a;\n }\n } else {\n var e = Pg(),\n f = Mg.suspense;\n e = Qg(e, a, f);\n f = {\n expirationTime: e,\n suspenseConfig: f,\n action: c,\n eagerReducer: null,\n eagerState: null,\n next: null\n };\n var g = b.last;\n if (null === g) f.next = f;else {\n var h = g.next;\n null !== h && (f.next = h);\n g.next = f;\n }\n b.last = f;\n if (0 === a.expirationTime && (null === d || 0 === d.expirationTime) && (d = b.lastRenderedReducer, null !== d)) try {\n var k = b.lastRenderedState,\n l = d(k, c);\n f.eagerReducer = d;\n f.eagerState = l;\n if (of(l, k)) return;\n } catch (m) {} finally {}\n Rg(a, e);\n }\n}\n\nvar Lh = {\n readContext: xg,\n useCallback: Q,\n useContext: Q,\n useEffect: Q,\n useImperativeHandle: Q,\n useLayoutEffect: Q,\n useMemo: Q,\n useReducer: Q,\n useRef: Q,\n useState: Q,\n useDebugValue: Q,\n useResponder: Q,\n useDeferredValue: Q,\n useTransition: Q\n},\n Jh = {\n readContext: xg,\n useCallback: ai,\n useContext: xg,\n useEffect: Xh,\n useImperativeHandle: function useImperativeHandle(a, b, c) {\n c = null !== c && void 0 !== c ? c.concat([a]) : null;\n return Vh(4, 36, Zh.bind(null, b, a), c);\n },\n useLayoutEffect: function useLayoutEffect(a, b) {\n return Vh(4, 36, a, b);\n },\n useMemo: function useMemo(a, b) {\n var c = Nh();\n b = void 0 === b ? null : b;\n a = a();\n c.memoizedState = [a, b];\n return a;\n },\n useReducer: function useReducer(a, b, c) {\n var d = Nh();\n b = void 0 !== c ? c(b) : b;\n d.memoizedState = d.baseState = b;\n a = d.queue = {\n last: null,\n dispatch: null,\n lastRenderedReducer: a,\n lastRenderedState: b\n };\n a = a.dispatch = Sh.bind(null, uh, a);\n return [d.memoizedState, a];\n },\n useRef: function useRef(a) {\n var b = Nh();\n a = {\n current: a\n };\n return b.memoizedState = a;\n },\n useState: Rh,\n useDebugValue: $h,\n useResponder: rh,\n useDeferredValue: function useDeferredValue(a, b) {\n var c = Rh(a),\n d = c[0],\n e = c[1];\n Xh(function () {\n q.unstable_next(function () {\n var c = N.suspense;\n N.suspense = void 0 === b ? null : b;\n\n try {\n e(a);\n } finally {\n N.suspense = c;\n }\n });\n }, [a, b]);\n return d;\n },\n useTransition: function useTransition(a) {\n var b = Rh(!1),\n c = b[0],\n d = b[1];\n return [ai(function (b) {\n d(!0);\n q.unstable_next(function () {\n var c = N.suspense;\n N.suspense = void 0 === a ? null : a;\n\n try {\n d(!1), b();\n } finally {\n N.suspense = c;\n }\n });\n }, [a, c]), c];\n }\n},\n Kh = {\n readContext: xg,\n useCallback: bi,\n useContext: xg,\n useEffect: Yh,\n useImperativeHandle: function useImperativeHandle(a, b, c) {\n c = null !== c && void 0 !== c ? c.concat([a]) : null;\n return Wh(4, 36, Zh.bind(null, b, a), c);\n },\n useLayoutEffect: function useLayoutEffect(a, b) {\n return Wh(4, 36, a, b);\n },\n useMemo: function useMemo(a, b) {\n var c = Oh();\n b = void 0 === b ? null : b;\n var d = c.memoizedState;\n if (null !== d && null !== b && Hh(b, d[1])) return d[0];\n a = a();\n c.memoizedState = [a, b];\n return a;\n },\n useReducer: Qh,\n useRef: function useRef() {\n return Oh().memoizedState;\n },\n useState: Th,\n useDebugValue: $h,\n useResponder: rh,\n useDeferredValue: function useDeferredValue(a, b) {\n var c = Th(a),\n d = c[0],\n e = c[1];\n Yh(function () {\n q.unstable_next(function () {\n var c = N.suspense;\n N.suspense = void 0 === b ? null : b;\n\n try {\n e(a);\n } finally {\n N.suspense = c;\n }\n });\n }, [a, b]);\n return d;\n },\n useTransition: function useTransition(a) {\n var b = Th(!1),\n c = b[0],\n d = b[1];\n return [bi(function (b) {\n d(!0);\n q.unstable_next(function () {\n var c = N.suspense;\n N.suspense = void 0 === a ? null : a;\n\n try {\n d(!1), b();\n } finally {\n N.suspense = c;\n }\n });\n }, [a, c]), c];\n }\n},\n ci = null,\n di = null,\n ei = !1;\n\nfunction fi(a, b) {\n var c = gi(5, null, null, 0);\n c.elementType = \"DELETED\";\n c.type = \"DELETED\";\n c.stateNode = b;\n c.return = a;\n c.effectTag = 8;\n null !== a.lastEffect ? (a.lastEffect.nextEffect = c, a.lastEffect = c) : a.firstEffect = a.lastEffect = c;\n}\n\nfunction hi(a, b) {\n switch (a.tag) {\n case 5:\n var c = a.type;\n b = 1 !== b.nodeType || c.toLowerCase() !== b.nodeName.toLowerCase() ? null : b;\n return null !== b ? (a.stateNode = b, !0) : !1;\n\n case 6:\n return b = \"\" === a.pendingProps || 3 !== b.nodeType ? null : b, null !== b ? (a.stateNode = b, !0) : !1;\n\n case 13:\n return !1;\n\n default:\n return !1;\n }\n}\n\nfunction ii(a) {\n if (ei) {\n var b = di;\n\n if (b) {\n var c = b;\n\n if (!hi(a, b)) {\n b = re(c.nextSibling);\n\n if (!b || !hi(a, b)) {\n a.effectTag = a.effectTag & -1025 | 2;\n ei = !1;\n ci = a;\n return;\n }\n\n fi(ci, c);\n }\n\n ci = a;\n di = re(b.firstChild);\n } else a.effectTag = a.effectTag & -1025 | 2, ei = !1, ci = a;\n }\n}\n\nfunction ji(a) {\n for (a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag;) {\n a = a.return;\n }\n\n ci = a;\n}\n\nfunction ki(a) {\n if (a !== ci) return !1;\n if (!ei) return ji(a), ei = !0, !1;\n var b = a.type;\n if (5 !== a.tag || \"head\" !== b && \"body\" !== b && !oe(b, a.memoizedProps)) for (b = di; b;) {\n fi(a, b), b = re(b.nextSibling);\n }\n ji(a);\n\n if (13 === a.tag) {\n a = a.memoizedState;\n a = null !== a ? a.dehydrated : null;\n if (!a) throw Error(u(317));\n\n a: {\n a = a.nextSibling;\n\n for (b = 0; a;) {\n if (8 === a.nodeType) {\n var c = a.data;\n\n if (c === ie) {\n if (0 === b) {\n di = re(a.nextSibling);\n break a;\n }\n\n b--;\n } else c !== he && c !== ke && c !== je || b++;\n }\n\n a = a.nextSibling;\n }\n\n di = null;\n }\n } else di = ci ? re(a.stateNode.nextSibling) : null;\n\n return !0;\n}\n\nfunction li() {\n di = ci = null;\n ei = !1;\n}\n\nvar mi = Ea.ReactCurrentOwner,\n wg = !1;\n\nfunction R(a, b, c, d) {\n b.child = null === a ? gh(b, null, c, d) : fh(b, a.child, c, d);\n}\n\nfunction ni(a, b, c, d, e) {\n c = c.render;\n var f = b.ref;\n vg(b, e);\n d = Ih(a, b, c, d, f, e);\n if (null !== a && !wg) return b.updateQueue = a.updateQueue, b.effectTag &= -517, a.expirationTime <= e && (a.expirationTime = 0), oi(a, b, e);\n b.effectTag |= 1;\n R(a, b, d, e);\n return b.child;\n}\n\nfunction pi(a, b, c, d, e, f) {\n if (null === a) {\n var g = c.type;\n if (\"function\" === typeof g && !qi(g) && void 0 === g.defaultProps && null === c.compare && void 0 === c.defaultProps) return b.tag = 15, b.type = g, ri(a, b, g, d, e, f);\n a = ch(c.type, null, d, null, b.mode, f);\n a.ref = b.ref;\n a.return = b;\n return b.child = a;\n }\n\n g = a.child;\n if (e < f && (e = g.memoizedProps, c = c.compare, c = null !== c ? c : qf, c(e, d) && a.ref === b.ref)) return oi(a, b, f);\n b.effectTag |= 1;\n a = ah(g, d, f);\n a.ref = b.ref;\n a.return = b;\n return b.child = a;\n}\n\nfunction ri(a, b, c, d, e, f) {\n return null !== a && qf(a.memoizedProps, d) && a.ref === b.ref && (wg = !1, e < f) ? oi(a, b, f) : si(a, b, c, d, f);\n}\n\nfunction ti(a, b) {\n var c = b.ref;\n if (null === a && null !== c || null !== a && a.ref !== c) b.effectTag |= 128;\n}\n\nfunction si(a, b, c, d, e) {\n var f = L(c) ? Df : J.current;\n f = Ef(b, f);\n vg(b, e);\n c = Ih(a, b, c, d, f, e);\n if (null !== a && !wg) return b.updateQueue = a.updateQueue, b.effectTag &= -517, a.expirationTime <= e && (a.expirationTime = 0), oi(a, b, e);\n b.effectTag |= 1;\n R(a, b, c, e);\n return b.child;\n}\n\nfunction ui(a, b, c, d, e) {\n if (L(c)) {\n var f = !0;\n Jf(b);\n } else f = !1;\n\n vg(b, e);\n if (null === b.stateNode) null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2), Ug(b, c, d, e), Wg(b, c, d, e), d = !0;else if (null === a) {\n var g = b.stateNode,\n h = b.memoizedProps;\n g.props = h;\n var k = g.context,\n l = c.contextType;\n \"object\" === typeof l && null !== l ? l = xg(l) : (l = L(c) ? Df : J.current, l = Ef(b, l));\n var m = c.getDerivedStateFromProps,\n C = \"function\" === typeof m || \"function\" === typeof g.getSnapshotBeforeUpdate;\n C || \"function\" !== typeof g.UNSAFE_componentWillReceiveProps && \"function\" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && Vg(b, g, d, l);\n yg = !1;\n var y = b.memoizedState;\n k = g.state = y;\n var H = b.updateQueue;\n null !== H && (Hg(b, H, d, g, e), k = b.memoizedState);\n h !== d || y !== k || K.current || yg ? (\"function\" === typeof m && (Og(b, c, m, d), k = b.memoizedState), (h = yg || Tg(b, c, h, d, y, k, l)) ? (C || \"function\" !== typeof g.UNSAFE_componentWillMount && \"function\" !== typeof g.componentWillMount || (\"function\" === typeof g.componentWillMount && g.componentWillMount(), \"function\" === typeof g.UNSAFE_componentWillMount && g.UNSAFE_componentWillMount()), \"function\" === typeof g.componentDidMount && (b.effectTag |= 4)) : (\"function\" === typeof g.componentDidMount && (b.effectTag |= 4), b.memoizedProps = d, b.memoizedState = k), g.props = d, g.state = k, g.context = l, d = h) : (\"function\" === typeof g.componentDidMount && (b.effectTag |= 4), d = !1);\n } else g = b.stateNode, h = b.memoizedProps, g.props = b.type === b.elementType ? h : mg(b.type, h), k = g.context, l = c.contextType, \"object\" === typeof l && null !== l ? l = xg(l) : (l = L(c) ? Df : J.current, l = Ef(b, l)), m = c.getDerivedStateFromProps, (C = \"function\" === typeof m || \"function\" === typeof g.getSnapshotBeforeUpdate) || \"function\" !== typeof g.UNSAFE_componentWillReceiveProps && \"function\" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && Vg(b, g, d, l), yg = !1, k = b.memoizedState, y = g.state = k, H = b.updateQueue, null !== H && (Hg(b, H, d, g, e), y = b.memoizedState), h !== d || k !== y || K.current || yg ? (\"function\" === typeof m && (Og(b, c, m, d), y = b.memoizedState), (m = yg || Tg(b, c, h, d, k, y, l)) ? (C || \"function\" !== typeof g.UNSAFE_componentWillUpdate && \"function\" !== typeof g.componentWillUpdate || (\"function\" === typeof g.componentWillUpdate && g.componentWillUpdate(d, y, l), \"function\" === typeof g.UNSAFE_componentWillUpdate && g.UNSAFE_componentWillUpdate(d, y, l)), \"function\" === typeof g.componentDidUpdate && (b.effectTag |= 4), \"function\" === typeof g.getSnapshotBeforeUpdate && (b.effectTag |= 256)) : (\"function\" !== typeof g.componentDidUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 4), \"function\" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 256), b.memoizedProps = d, b.memoizedState = y), g.props = d, g.state = y, g.context = l, d = m) : (\"function\" !== typeof g.componentDidUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 4), \"function\" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 256), d = !1);\n return vi(a, b, c, d, f, e);\n}\n\nfunction vi(a, b, c, d, e, f) {\n ti(a, b);\n var g = 0 !== (b.effectTag & 64);\n if (!d && !g) return e && Kf(b, c, !1), oi(a, b, f);\n d = b.stateNode;\n mi.current = b;\n var h = g && \"function\" !== typeof c.getDerivedStateFromError ? null : d.render();\n b.effectTag |= 1;\n null !== a && g ? (b.child = fh(b, a.child, null, f), b.child = fh(b, null, h, f)) : R(a, b, h, f);\n b.memoizedState = d.state;\n e && Kf(b, c, !0);\n return b.child;\n}\n\nfunction wi(a) {\n var b = a.stateNode;\n b.pendingContext ? Hf(a, b.pendingContext, b.pendingContext !== b.context) : b.context && Hf(a, b.context, !1);\n mh(a, b.containerInfo);\n}\n\nvar xi = {\n dehydrated: null,\n retryTime: 0\n};\n\nfunction yi(a, b, c) {\n var d = b.mode,\n e = b.pendingProps,\n f = M.current,\n g = !1,\n h;\n (h = 0 !== (b.effectTag & 64)) || (h = 0 !== (f & 2) && (null === a || null !== a.memoizedState));\n h ? (g = !0, b.effectTag &= -65) : null !== a && null === a.memoizedState || void 0 === e.fallback || !0 === e.unstable_avoidThisFallback || (f |= 1);\n I(M, f & 1, b);\n\n if (null === a) {\n void 0 !== e.fallback && ii(b);\n\n if (g) {\n g = e.fallback;\n e = eh(null, d, 0, null);\n e.return = b;\n if (0 === (b.mode & 2)) for (a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a;) {\n a.return = e, a = a.sibling;\n }\n c = eh(g, d, c, null);\n c.return = b;\n e.sibling = c;\n b.memoizedState = xi;\n b.child = e;\n return c;\n }\n\n d = e.children;\n b.memoizedState = null;\n return b.child = gh(b, null, d, c);\n }\n\n if (null !== a.memoizedState) {\n a = a.child;\n d = a.sibling;\n\n if (g) {\n e = e.fallback;\n c = ah(a, a.pendingProps, 0);\n c.return = b;\n if (0 === (b.mode & 2) && (g = null !== b.memoizedState ? b.child.child : b.child, g !== a.child)) for (c.child = g; null !== g;) {\n g.return = c, g = g.sibling;\n }\n d = ah(d, e, d.expirationTime);\n d.return = b;\n c.sibling = d;\n c.childExpirationTime = 0;\n b.memoizedState = xi;\n b.child = c;\n return d;\n }\n\n c = fh(b, a.child, e.children, c);\n b.memoizedState = null;\n return b.child = c;\n }\n\n a = a.child;\n\n if (g) {\n g = e.fallback;\n e = eh(null, d, 0, null);\n e.return = b;\n e.child = a;\n null !== a && (a.return = e);\n if (0 === (b.mode & 2)) for (a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a;) {\n a.return = e, a = a.sibling;\n }\n c = eh(g, d, c, null);\n c.return = b;\n e.sibling = c;\n c.effectTag |= 2;\n e.childExpirationTime = 0;\n b.memoizedState = xi;\n b.child = e;\n return c;\n }\n\n b.memoizedState = null;\n return b.child = fh(b, a, e.children, c);\n}\n\nfunction zi(a, b) {\n a.expirationTime < b && (a.expirationTime = b);\n var c = a.alternate;\n null !== c && c.expirationTime < b && (c.expirationTime = b);\n ug(a.return, b);\n}\n\nfunction Ai(a, b, c, d, e, f) {\n var g = a.memoizedState;\n null === g ? a.memoizedState = {\n isBackwards: b,\n rendering: null,\n last: d,\n tail: c,\n tailExpiration: 0,\n tailMode: e,\n lastEffect: f\n } : (g.isBackwards = b, g.rendering = null, g.last = d, g.tail = c, g.tailExpiration = 0, g.tailMode = e, g.lastEffect = f);\n}\n\nfunction Bi(a, b, c) {\n var d = b.pendingProps,\n e = d.revealOrder,\n f = d.tail;\n R(a, b, d.children, c);\n d = M.current;\n if (0 !== (d & 2)) d = d & 1 | 2, b.effectTag |= 64;else {\n if (null !== a && 0 !== (a.effectTag & 64)) a: for (a = b.child; null !== a;) {\n if (13 === a.tag) null !== a.memoizedState && zi(a, c);else if (19 === a.tag) zi(a, c);else if (null !== a.child) {\n a.child.return = a;\n a = a.child;\n continue;\n }\n if (a === b) break a;\n\n for (; null === a.sibling;) {\n if (null === a.return || a.return === b) break a;\n a = a.return;\n }\n\n a.sibling.return = a.return;\n a = a.sibling;\n }\n d &= 1;\n }\n I(M, d, b);\n if (0 === (b.mode & 2)) b.memoizedState = null;else switch (e) {\n case \"forwards\":\n c = b.child;\n\n for (e = null; null !== c;) {\n a = c.alternate, null !== a && null === qh(a) && (e = c), c = c.sibling;\n }\n\n c = e;\n null === c ? (e = b.child, b.child = null) : (e = c.sibling, c.sibling = null);\n Ai(b, !1, e, c, f, b.lastEffect);\n break;\n\n case \"backwards\":\n c = null;\n e = b.child;\n\n for (b.child = null; null !== e;) {\n a = e.alternate;\n\n if (null !== a && null === qh(a)) {\n b.child = e;\n break;\n }\n\n a = e.sibling;\n e.sibling = c;\n c = e;\n e = a;\n }\n\n Ai(b, !0, c, null, f, b.lastEffect);\n break;\n\n case \"together\":\n Ai(b, !1, null, null, void 0, b.lastEffect);\n break;\n\n default:\n b.memoizedState = null;\n }\n return b.child;\n}\n\nfunction oi(a, b, c) {\n null !== a && (b.dependencies = a.dependencies);\n var d = b.expirationTime;\n 0 !== d && Jg(d);\n if (b.childExpirationTime < c) return null;\n if (null !== a && b.child !== a.child) throw Error(u(153));\n\n if (null !== b.child) {\n a = b.child;\n c = ah(a, a.pendingProps, a.expirationTime);\n b.child = c;\n\n for (c.return = b; null !== a.sibling;) {\n a = a.sibling, c = c.sibling = ah(a, a.pendingProps, a.expirationTime), c.return = b;\n }\n\n c.sibling = null;\n }\n\n return b.child;\n}\n\nfunction Ci(a) {\n a.effectTag |= 4;\n}\n\nvar Hi, Ii, Ji, Ki;\n\nHi = function Hi(a, b) {\n for (var c = b.child; null !== c;) {\n if (5 === c.tag || 6 === c.tag) a.appendChild(c.stateNode);else if (4 !== c.tag && null !== c.child) {\n c.child.return = c;\n c = c.child;\n continue;\n }\n if (c === b) break;\n\n for (; null === c.sibling;) {\n if (null === c.return || c.return === b) return;\n c = c.return;\n }\n\n c.sibling.return = c.return;\n c = c.sibling;\n }\n};\n\nIi = function Ii() {};\n\nJi = function Ji(a, b, c, d, e) {\n var f = a.memoizedProps;\n\n if (f !== d) {\n var g = b.stateNode;\n lh(ih.current);\n a = null;\n\n switch (c) {\n case \"input\":\n f = Ab(g, f);\n d = Ab(g, d);\n a = [];\n break;\n\n case \"option\":\n f = Ib(g, f);\n d = Ib(g, d);\n a = [];\n break;\n\n case \"select\":\n f = n({}, f, {\n value: void 0\n });\n d = n({}, d, {\n value: void 0\n });\n a = [];\n break;\n\n case \"textarea\":\n f = Kb(g, f);\n d = Kb(g, d);\n a = [];\n break;\n\n default:\n \"function\" !== typeof f.onClick && \"function\" === typeof d.onClick && (g.onclick = ae);\n }\n\n Yd(c, d);\n var h, k;\n c = null;\n\n for (h in f) {\n if (!d.hasOwnProperty(h) && f.hasOwnProperty(h) && null != f[h]) if (\"style\" === h) for (k in g = f[h], g) {\n g.hasOwnProperty(k) && (c || (c = {}), c[k] = \"\");\n } else \"dangerouslySetInnerHTML\" !== h && \"children\" !== h && \"suppressContentEditableWarning\" !== h && \"suppressHydrationWarning\" !== h && \"autoFocus\" !== h && (ia.hasOwnProperty(h) ? a || (a = []) : (a = a || []).push(h, null));\n }\n\n for (h in d) {\n var l = d[h];\n g = null != f ? f[h] : void 0;\n if (d.hasOwnProperty(h) && l !== g && (null != l || null != g)) if (\"style\" === h) {\n if (g) {\n for (k in g) {\n !g.hasOwnProperty(k) || l && l.hasOwnProperty(k) || (c || (c = {}), c[k] = \"\");\n }\n\n for (k in l) {\n l.hasOwnProperty(k) && g[k] !== l[k] && (c || (c = {}), c[k] = l[k]);\n }\n } else c || (a || (a = []), a.push(h, c)), c = l;\n } else \"dangerouslySetInnerHTML\" === h ? (l = l ? l.__html : void 0, g = g ? g.__html : void 0, null != l && g !== l && (a = a || []).push(h, \"\" + l)) : \"children\" === h ? g === l || \"string\" !== typeof l && \"number\" !== typeof l || (a = a || []).push(h, \"\" + l) : \"suppressContentEditableWarning\" !== h && \"suppressHydrationWarning\" !== h && (ia.hasOwnProperty(h) ? (null != l && $d(e, h), a || g === l || (a = [])) : (a = a || []).push(h, l));\n }\n\n c && (a = a || []).push(\"style\", c);\n e = a;\n (b.updateQueue = e) && Ci(b);\n }\n};\n\nKi = function Ki(a, b, c, d) {\n c !== d && Ci(b);\n};\n\nfunction Li(a, b) {\n switch (a.tailMode) {\n case \"hidden\":\n b = a.tail;\n\n for (var c = null; null !== b;) {\n null !== b.alternate && (c = b), b = b.sibling;\n }\n\n null === c ? a.tail = null : c.sibling = null;\n break;\n\n case \"collapsed\":\n c = a.tail;\n\n for (var d = null; null !== c;) {\n null !== c.alternate && (d = c), c = c.sibling;\n }\n\n null === d ? b || null === a.tail ? a.tail = null : a.tail.sibling = null : d.sibling = null;\n }\n}\n\nfunction Mi(a) {\n switch (a.tag) {\n case 1:\n L(a.type) && Ff(a);\n var b = a.effectTag;\n return b & 4096 ? (a.effectTag = b & -4097 | 64, a) : null;\n\n case 3:\n nh(a);\n Gf(a);\n b = a.effectTag;\n if (0 !== (b & 64)) throw Error(u(285));\n a.effectTag = b & -4097 | 64;\n return a;\n\n case 5:\n return ph(a), null;\n\n case 13:\n return G(M, a), b = a.effectTag, b & 4096 ? (a.effectTag = b & -4097 | 64, a) : null;\n\n case 19:\n return G(M, a), null;\n\n case 4:\n return nh(a), null;\n\n case 10:\n return tg(a), null;\n\n default:\n return null;\n }\n}\n\nfunction Ni(a, b) {\n return {\n value: a,\n source: b,\n stack: Xa(b)\n };\n}\n\nvar Oi = \"function\" === typeof WeakSet ? WeakSet : Set;\n\nfunction Pi(a, b) {\n var c = b.source,\n d = b.stack;\n null === d && null !== c && (d = Xa(c));\n null !== c && Wa(c.type);\n b = b.value;\n null !== a && 1 === a.tag && Wa(a.type);\n\n try {\n console.error(b);\n } catch (e) {\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nfunction Qi(a, b) {\n try {\n b.props = a.memoizedProps, b.state = a.memoizedState, b.componentWillUnmount();\n } catch (c) {\n Ri(a, c);\n }\n}\n\nfunction Si(a) {\n var b = a.ref;\n if (null !== b) if (\"function\" === typeof b) try {\n b(null);\n } catch (c) {\n Ri(a, c);\n } else b.current = null;\n}\n\nfunction Ti(a, b) {\n switch (b.tag) {\n case 0:\n case 11:\n case 15:\n Ui(2, 0, b);\n break;\n\n case 1:\n if (b.effectTag & 256 && null !== a) {\n var c = a.memoizedProps,\n d = a.memoizedState;\n a = b.stateNode;\n b = a.getSnapshotBeforeUpdate(b.elementType === b.type ? c : mg(b.type, c), d);\n a.__reactInternalSnapshotBeforeUpdate = b;\n }\n\n break;\n\n case 3:\n case 5:\n case 6:\n case 4:\n case 17:\n break;\n\n default:\n throw Error(u(163));\n }\n}\n\nfunction Ui(a, b, c) {\n c = c.updateQueue;\n c = null !== c ? c.lastEffect : null;\n\n if (null !== c) {\n var d = c = c.next;\n\n do {\n if (0 !== (d.tag & a)) {\n var e = d.destroy;\n d.destroy = void 0;\n void 0 !== e && e();\n }\n\n 0 !== (d.tag & b) && (e = d.create, d.destroy = e());\n d = d.next;\n } while (d !== c);\n }\n}\n\nfunction Vi(a, b, c) {\n \"function\" === typeof Wi && Wi(b);\n\n switch (b.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n a = b.updateQueue;\n\n if (null !== a && (a = a.lastEffect, null !== a)) {\n var d = a.next;\n fg(97 < c ? 97 : c, function () {\n var a = d;\n\n do {\n var c = a.destroy;\n\n if (void 0 !== c) {\n var g = b;\n\n try {\n c();\n } catch (h) {\n Ri(g, h);\n }\n }\n\n a = a.next;\n } while (a !== d);\n });\n }\n\n break;\n\n case 1:\n Si(b);\n c = b.stateNode;\n \"function\" === typeof c.componentWillUnmount && Qi(b, c);\n break;\n\n case 5:\n Si(b);\n break;\n\n case 4:\n Xi(a, b, c);\n }\n}\n\nfunction Yi(a) {\n var b = a.alternate;\n a.return = null;\n a.child = null;\n a.memoizedState = null;\n a.updateQueue = null;\n a.dependencies = null;\n a.alternate = null;\n a.firstEffect = null;\n a.lastEffect = null;\n a.pendingProps = null;\n a.memoizedProps = null;\n null !== b && Yi(b);\n}\n\nfunction Zi(a) {\n return 5 === a.tag || 3 === a.tag || 4 === a.tag;\n}\n\nfunction $i(a) {\n a: {\n for (var b = a.return; null !== b;) {\n if (Zi(b)) {\n var c = b;\n break a;\n }\n\n b = b.return;\n }\n\n throw Error(u(160));\n }\n\n b = c.stateNode;\n\n switch (c.tag) {\n case 5:\n var d = !1;\n break;\n\n case 3:\n b = b.containerInfo;\n d = !0;\n break;\n\n case 4:\n b = b.containerInfo;\n d = !0;\n break;\n\n default:\n throw Error(u(161));\n }\n\n c.effectTag & 16 && (Tb(b, \"\"), c.effectTag &= -17);\n\n a: b: for (c = a;;) {\n for (; null === c.sibling;) {\n if (null === c.return || Zi(c.return)) {\n c = null;\n break a;\n }\n\n c = c.return;\n }\n\n c.sibling.return = c.return;\n\n for (c = c.sibling; 5 !== c.tag && 6 !== c.tag && 18 !== c.tag;) {\n if (c.effectTag & 2) continue b;\n if (null === c.child || 4 === c.tag) continue b;else c.child.return = c, c = c.child;\n }\n\n if (!(c.effectTag & 2)) {\n c = c.stateNode;\n break a;\n }\n }\n\n for (var e = a;;) {\n var f = 5 === e.tag || 6 === e.tag;\n\n if (f) {\n var g = f ? e.stateNode : e.stateNode.instance;\n if (c) {\n if (d) {\n f = b;\n var h = g;\n g = c;\n 8 === f.nodeType ? f.parentNode.insertBefore(h, g) : f.insertBefore(h, g);\n } else b.insertBefore(g, c);\n } else d ? (h = b, 8 === h.nodeType ? (f = h.parentNode, f.insertBefore(g, h)) : (f = h, f.appendChild(g)), h = h._reactRootContainer, null !== h && void 0 !== h || null !== f.onclick || (f.onclick = ae)) : b.appendChild(g);\n } else if (4 !== e.tag && null !== e.child) {\n e.child.return = e;\n e = e.child;\n continue;\n }\n\n if (e === a) break;\n\n for (; null === e.sibling;) {\n if (null === e.return || e.return === a) return;\n e = e.return;\n }\n\n e.sibling.return = e.return;\n e = e.sibling;\n }\n}\n\nfunction Xi(a, b, c) {\n for (var d = b, e = !1, f, g;;) {\n if (!e) {\n e = d.return;\n\n a: for (;;) {\n if (null === e) throw Error(u(160));\n f = e.stateNode;\n\n switch (e.tag) {\n case 5:\n g = !1;\n break a;\n\n case 3:\n f = f.containerInfo;\n g = !0;\n break a;\n\n case 4:\n f = f.containerInfo;\n g = !0;\n break a;\n }\n\n e = e.return;\n }\n\n e = !0;\n }\n\n if (5 === d.tag || 6 === d.tag) {\n a: for (var h = a, k = d, l = c, m = k;;) {\n if (Vi(h, m, l), null !== m.child && 4 !== m.tag) m.child.return = m, m = m.child;else {\n if (m === k) break;\n\n for (; null === m.sibling;) {\n if (null === m.return || m.return === k) break a;\n m = m.return;\n }\n\n m.sibling.return = m.return;\n m = m.sibling;\n }\n }\n\n g ? (h = f, k = d.stateNode, 8 === h.nodeType ? h.parentNode.removeChild(k) : h.removeChild(k)) : f.removeChild(d.stateNode);\n } else if (4 === d.tag) {\n if (null !== d.child) {\n f = d.stateNode.containerInfo;\n g = !0;\n d.child.return = d;\n d = d.child;\n continue;\n }\n } else if (Vi(a, d, c), null !== d.child) {\n d.child.return = d;\n d = d.child;\n continue;\n }\n\n if (d === b) break;\n\n for (; null === d.sibling;) {\n if (null === d.return || d.return === b) return;\n d = d.return;\n 4 === d.tag && (e = !1);\n }\n\n d.sibling.return = d.return;\n d = d.sibling;\n }\n}\n\nfunction aj(a, b) {\n switch (b.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n Ui(4, 8, b);\n break;\n\n case 1:\n break;\n\n case 5:\n var c = b.stateNode;\n\n if (null != c) {\n var d = b.memoizedProps,\n e = null !== a ? a.memoizedProps : d;\n a = b.type;\n var f = b.updateQueue;\n b.updateQueue = null;\n\n if (null !== f) {\n c[ve] = d;\n \"input\" === a && \"radio\" === d.type && null != d.name && Cb(c, d);\n Zd(a, e);\n b = Zd(a, d);\n\n for (e = 0; e < f.length; e += 2) {\n var g = f[e],\n h = f[e + 1];\n \"style\" === g ? Wd(c, h) : \"dangerouslySetInnerHTML\" === g ? Sb(c, h) : \"children\" === g ? Tb(c, h) : vb(c, g, h, b);\n }\n\n switch (a) {\n case \"input\":\n Eb(c, d);\n break;\n\n case \"textarea\":\n Mb(c, d);\n break;\n\n case \"select\":\n b = c._wrapperState.wasMultiple, c._wrapperState.wasMultiple = !!d.multiple, a = d.value, null != a ? Jb(c, !!d.multiple, a, !1) : b !== !!d.multiple && (null != d.defaultValue ? Jb(c, !!d.multiple, d.defaultValue, !0) : Jb(c, !!d.multiple, d.multiple ? [] : \"\", !1));\n }\n }\n }\n\n break;\n\n case 6:\n if (null === b.stateNode) throw Error(u(162));\n b.stateNode.nodeValue = b.memoizedProps;\n break;\n\n case 3:\n b = b.stateNode;\n b.hydrate && (b.hydrate = !1, Lc(b.containerInfo));\n break;\n\n case 12:\n break;\n\n case 13:\n c = b;\n null === b.memoizedState ? d = !1 : (d = !0, c = b.child, bj = cg());\n if (null !== c) a: for (a = c;;) {\n if (5 === a.tag) f = a.stateNode, d ? (f = f.style, \"function\" === typeof f.setProperty ? f.setProperty(\"display\", \"none\", \"important\") : f.display = \"none\") : (f = a.stateNode, e = a.memoizedProps.style, e = void 0 !== e && null !== e && e.hasOwnProperty(\"display\") ? e.display : null, f.style.display = Vd(\"display\", e));else if (6 === a.tag) a.stateNode.nodeValue = d ? \"\" : a.memoizedProps;else if (13 === a.tag && null !== a.memoizedState && null === a.memoizedState.dehydrated) {\n f = a.child.sibling;\n f.return = a;\n a = f;\n continue;\n } else if (null !== a.child) {\n a.child.return = a;\n a = a.child;\n continue;\n }\n if (a === c) break a;\n\n for (; null === a.sibling;) {\n if (null === a.return || a.return === c) break a;\n a = a.return;\n }\n\n a.sibling.return = a.return;\n a = a.sibling;\n }\n cj(b);\n break;\n\n case 19:\n cj(b);\n break;\n\n case 17:\n break;\n\n case 20:\n break;\n\n case 21:\n break;\n\n default:\n throw Error(u(163));\n }\n}\n\nfunction cj(a) {\n var b = a.updateQueue;\n\n if (null !== b) {\n a.updateQueue = null;\n var c = a.stateNode;\n null === c && (c = a.stateNode = new Oi());\n b.forEach(function (b) {\n var d = dj.bind(null, a, b);\n c.has(b) || (c.add(b), b.then(d, d));\n });\n }\n}\n\nvar ej = \"function\" === typeof WeakMap ? WeakMap : Map;\n\nfunction fj(a, b, c) {\n c = Bg(c, null);\n c.tag = 3;\n c.payload = {\n element: null\n };\n var d = b.value;\n\n c.callback = function () {\n gj || (gj = !0, hj = d);\n Pi(a, b);\n };\n\n return c;\n}\n\nfunction ij(a, b, c) {\n c = Bg(c, null);\n c.tag = 3;\n var d = a.type.getDerivedStateFromError;\n\n if (\"function\" === typeof d) {\n var e = b.value;\n\n c.payload = function () {\n Pi(a, b);\n return d(e);\n };\n }\n\n var f = a.stateNode;\n null !== f && \"function\" === typeof f.componentDidCatch && (c.callback = function () {\n \"function\" !== typeof d && (null === jj ? jj = new Set([this]) : jj.add(this), Pi(a, b));\n var c = b.stack;\n this.componentDidCatch(b.value, {\n componentStack: null !== c ? c : \"\"\n });\n });\n return c;\n}\n\nvar kj = Math.ceil,\n lj = Ea.ReactCurrentDispatcher,\n mj = Ea.ReactCurrentOwner,\n S = 0,\n nj = 8,\n oj = 16,\n pj = 32,\n qj = 0,\n rj = 1,\n sj = 2,\n tj = 3,\n uj = 4,\n vj = 5,\n T = S,\n U = null,\n V = null,\n W = 0,\n X = qj,\n wj = null,\n xj = 1073741823,\n yj = 1073741823,\n zj = null,\n Aj = 0,\n Bj = !1,\n bj = 0,\n Cj = 500,\n Y = null,\n gj = !1,\n hj = null,\n jj = null,\n Dj = !1,\n Ej = null,\n Fj = 90,\n Gj = null,\n Hj = 0,\n Ij = null,\n Jj = 0;\n\nfunction Pg() {\n return (T & (oj | pj)) !== S ? 1073741821 - (cg() / 10 | 0) : 0 !== Jj ? Jj : Jj = 1073741821 - (cg() / 10 | 0);\n}\n\nfunction Qg(a, b, c) {\n b = b.mode;\n if (0 === (b & 2)) return 1073741823;\n var d = dg();\n if (0 === (b & 4)) return 99 === d ? 1073741823 : 1073741822;\n if ((T & oj) !== S) return W;\n if (null !== c) a = lg(a, c.timeoutMs | 0 || 5E3, 250);else switch (d) {\n case 99:\n a = 1073741823;\n break;\n\n case 98:\n a = lg(a, 150, 100);\n break;\n\n case 97:\n case 96:\n a = lg(a, 5E3, 250);\n break;\n\n case 95:\n a = 2;\n break;\n\n default:\n throw Error(u(326));\n }\n null !== U && a === W && --a;\n return a;\n}\n\nfunction Rg(a, b) {\n if (50 < Hj) throw Hj = 0, Ij = null, Error(u(185));\n a = Kj(a, b);\n\n if (null !== a) {\n var c = dg();\n 1073741823 === b ? (T & nj) !== S && (T & (oj | pj)) === S ? Lj(a) : (Z(a), T === S && jg()) : Z(a);\n (T & 4) === S || 98 !== c && 99 !== c || (null === Gj ? Gj = new Map([[a, b]]) : (c = Gj.get(a), (void 0 === c || c > b) && Gj.set(a, b)));\n }\n}\n\nfunction Kj(a, b) {\n a.expirationTime < b && (a.expirationTime = b);\n var c = a.alternate;\n null !== c && c.expirationTime < b && (c.expirationTime = b);\n var d = a.return,\n e = null;\n if (null === d && 3 === a.tag) e = a.stateNode;else for (; null !== d;) {\n c = d.alternate;\n d.childExpirationTime < b && (d.childExpirationTime = b);\n null !== c && c.childExpirationTime < b && (c.childExpirationTime = b);\n\n if (null === d.return && 3 === d.tag) {\n e = d.stateNode;\n break;\n }\n\n d = d.return;\n }\n null !== e && (U === e && (Jg(b), X === uj && Mj(e, W)), Nj(e, b));\n return e;\n}\n\nfunction Oj(a) {\n var b = a.lastExpiredTime;\n if (0 !== b) return b;\n b = a.firstPendingTime;\n if (!Pj(a, b)) return b;\n b = a.lastPingedTime;\n a = a.nextKnownPendingLevel;\n return b > a ? b : a;\n}\n\nfunction Z(a) {\n if (0 !== a.lastExpiredTime) a.callbackExpirationTime = 1073741823, a.callbackPriority = 99, a.callbackNode = hg(Lj.bind(null, a));else {\n var b = Oj(a),\n c = a.callbackNode;\n if (0 === b) null !== c && (a.callbackNode = null, a.callbackExpirationTime = 0, a.callbackPriority = 90);else {\n var d = Pg();\n 1073741823 === b ? d = 99 : 1 === b || 2 === b ? d = 95 : (d = 10 * (1073741821 - b) - 10 * (1073741821 - d), d = 0 >= d ? 99 : 250 >= d ? 98 : 5250 >= d ? 97 : 95);\n\n if (null !== c) {\n var e = a.callbackPriority;\n if (a.callbackExpirationTime === b && e >= d) return;\n c !== Xf && Nf(c);\n }\n\n a.callbackExpirationTime = b;\n a.callbackPriority = d;\n b = 1073741823 === b ? hg(Lj.bind(null, a)) : gg(d, Qj.bind(null, a), {\n timeout: 10 * (1073741821 - b) - cg()\n });\n a.callbackNode = b;\n }\n }\n}\n\nfunction Qj(a, b) {\n Jj = 0;\n if (b) return b = Pg(), Rj(a, b), Z(a), null;\n var c = Oj(a);\n\n if (0 !== c) {\n b = a.callbackNode;\n if ((T & (oj | pj)) !== S) throw Error(u(327));\n Sj();\n a === U && c === W || Tj(a, c);\n\n if (null !== V) {\n var d = T;\n T |= oj;\n var e = Uj(a);\n\n do {\n try {\n Vj();\n break;\n } catch (h) {\n Wj(a, h);\n }\n } while (1);\n\n rg();\n T = d;\n lj.current = e;\n if (X === rj) throw b = wj, Tj(a, c), Mj(a, c), Z(a), b;\n if (null === V) switch (e = a.finishedWork = a.current.alternate, a.finishedExpirationTime = c, d = X, U = null, d) {\n case qj:\n case rj:\n throw Error(u(345));\n\n case sj:\n Rj(a, 2 < c ? 2 : c);\n break;\n\n case tj:\n Mj(a, c);\n d = a.lastSuspendedTime;\n c === d && (a.nextKnownPendingLevel = Xj(e));\n\n if (1073741823 === xj && (e = bj + Cj - cg(), 10 < e)) {\n if (Bj) {\n var f = a.lastPingedTime;\n\n if (0 === f || f >= c) {\n a.lastPingedTime = c;\n Tj(a, c);\n break;\n }\n }\n\n f = Oj(a);\n if (0 !== f && f !== c) break;\n\n if (0 !== d && d !== c) {\n a.lastPingedTime = d;\n break;\n }\n\n a.timeoutHandle = pe(Yj.bind(null, a), e);\n break;\n }\n\n Yj(a);\n break;\n\n case uj:\n Mj(a, c);\n d = a.lastSuspendedTime;\n c === d && (a.nextKnownPendingLevel = Xj(e));\n\n if (Bj && (e = a.lastPingedTime, 0 === e || e >= c)) {\n a.lastPingedTime = c;\n Tj(a, c);\n break;\n }\n\n e = Oj(a);\n if (0 !== e && e !== c) break;\n\n if (0 !== d && d !== c) {\n a.lastPingedTime = d;\n break;\n }\n\n 1073741823 !== yj ? d = 10 * (1073741821 - yj) - cg() : 1073741823 === xj ? d = 0 : (d = 10 * (1073741821 - xj) - 5E3, e = cg(), c = 10 * (1073741821 - c) - e, d = e - d, 0 > d && (d = 0), d = (120 > d ? 120 : 480 > d ? 480 : 1080 > d ? 1080 : 1920 > d ? 1920 : 3E3 > d ? 3E3 : 4320 > d ? 4320 : 1960 * kj(d / 1960)) - d, c < d && (d = c));\n\n if (10 < d) {\n a.timeoutHandle = pe(Yj.bind(null, a), d);\n break;\n }\n\n Yj(a);\n break;\n\n case vj:\n if (1073741823 !== xj && null !== zj) {\n f = xj;\n var g = zj;\n d = g.busyMinDurationMs | 0;\n 0 >= d ? d = 0 : (e = g.busyDelayMs | 0, f = cg() - (10 * (1073741821 - f) - (g.timeoutMs | 0 || 5E3)), d = f <= e ? 0 : e + d - f);\n\n if (10 < d) {\n Mj(a, c);\n a.timeoutHandle = pe(Yj.bind(null, a), d);\n break;\n }\n }\n\n Yj(a);\n break;\n\n default:\n throw Error(u(329));\n }\n Z(a);\n if (a.callbackNode === b) return Qj.bind(null, a);\n }\n }\n\n return null;\n}\n\nfunction Lj(a) {\n var b = a.lastExpiredTime;\n b = 0 !== b ? b : 1073741823;\n if (a.finishedExpirationTime === b) Yj(a);else {\n if ((T & (oj | pj)) !== S) throw Error(u(327));\n Sj();\n a === U && b === W || Tj(a, b);\n\n if (null !== V) {\n var c = T;\n T |= oj;\n var d = Uj(a);\n\n do {\n try {\n Zj();\n break;\n } catch (e) {\n Wj(a, e);\n }\n } while (1);\n\n rg();\n T = c;\n lj.current = d;\n if (X === rj) throw c = wj, Tj(a, b), Mj(a, b), Z(a), c;\n if (null !== V) throw Error(u(261));\n a.finishedWork = a.current.alternate;\n a.finishedExpirationTime = b;\n U = null;\n Yj(a);\n Z(a);\n }\n }\n return null;\n}\n\nfunction ak() {\n if (null !== Gj) {\n var a = Gj;\n Gj = null;\n a.forEach(function (a, c) {\n Rj(c, a);\n Z(c);\n });\n jg();\n }\n}\n\nfunction bk(a, b) {\n var c = T;\n T |= 1;\n\n try {\n return a(b);\n } finally {\n T = c, T === S && jg();\n }\n}\n\nfunction ck(a, b) {\n var c = T;\n T &= -2;\n T |= nj;\n\n try {\n return a(b);\n } finally {\n T = c, T === S && jg();\n }\n}\n\nfunction Tj(a, b) {\n a.finishedWork = null;\n a.finishedExpirationTime = 0;\n var c = a.timeoutHandle;\n -1 !== c && (a.timeoutHandle = -1, qe(c));\n if (null !== V) for (c = V.return; null !== c;) {\n var d = c;\n\n switch (d.tag) {\n case 1:\n var e = d.type.childContextTypes;\n null !== e && void 0 !== e && Ff(d);\n break;\n\n case 3:\n nh(d);\n Gf(d);\n break;\n\n case 5:\n ph(d);\n break;\n\n case 4:\n nh(d);\n break;\n\n case 13:\n G(M, d);\n break;\n\n case 19:\n G(M, d);\n break;\n\n case 10:\n tg(d);\n }\n\n c = c.return;\n }\n U = a;\n V = ah(a.current, null, b);\n W = b;\n X = qj;\n wj = null;\n yj = xj = 1073741823;\n zj = null;\n Aj = 0;\n Bj = !1;\n}\n\nfunction Wj(a, b) {\n do {\n try {\n rg();\n Mh();\n if (null === V || null === V.return) return X = rj, wj = b, null;\n\n a: {\n var c = a,\n d = V.return,\n e = V,\n f = b;\n b = W;\n e.effectTag |= 2048;\n e.firstEffect = e.lastEffect = null;\n\n if (null !== f && \"object\" === typeof f && \"function\" === typeof f.then) {\n var g = f,\n h = 0 !== (M.current & 1),\n k = d;\n\n do {\n var l;\n\n if (l = 13 === k.tag) {\n var m = k.memoizedState;\n if (null !== m) l = null !== m.dehydrated ? !0 : !1;else {\n var C = k.memoizedProps;\n l = void 0 === C.fallback ? !1 : !0 !== C.unstable_avoidThisFallback ? !0 : h ? !1 : !0;\n }\n }\n\n if (l) {\n var y = k.updateQueue;\n\n if (null === y) {\n var H = new Set();\n H.add(g);\n k.updateQueue = H;\n } else y.add(g);\n\n if (0 === (k.mode & 2)) {\n k.effectTag |= 64;\n e.effectTag &= -2981;\n if (1 === e.tag) if (null === e.alternate) e.tag = 17;else {\n var z = Bg(1073741823, null);\n z.tag = 2;\n Dg(e, z);\n }\n e.expirationTime = 1073741823;\n break a;\n }\n\n f = void 0;\n e = b;\n var ta = c.pingCache;\n null === ta ? (ta = c.pingCache = new ej(), f = new Set(), ta.set(g, f)) : (f = ta.get(g), void 0 === f && (f = new Set(), ta.set(g, f)));\n\n if (!f.has(e)) {\n f.add(e);\n var r = dk.bind(null, c, g, e);\n g.then(r, r);\n }\n\n k.effectTag |= 4096;\n k.expirationTime = b;\n break a;\n }\n\n k = k.return;\n } while (null !== k);\n\n f = Error((Wa(e.type) || \"A React component\") + \" suspended while rendering, but no fallback UI was specified.\\n\\nAdd a component higher in the tree to provide a loading indicator or placeholder to display.\" + Xa(e));\n }\n\n X !== vj && (X = sj);\n f = Ni(f, e);\n k = d;\n\n do {\n switch (k.tag) {\n case 3:\n g = f;\n k.effectTag |= 4096;\n k.expirationTime = b;\n var x = fj(k, g, b);\n Eg(k, x);\n break a;\n\n case 1:\n g = f;\n var A = k.type,\n p = k.stateNode;\n\n if (0 === (k.effectTag & 64) && (\"function\" === typeof A.getDerivedStateFromError || null !== p && \"function\" === typeof p.componentDidCatch && (null === jj || !jj.has(p)))) {\n k.effectTag |= 4096;\n k.expirationTime = b;\n var t = ij(k, g, b);\n Eg(k, t);\n break a;\n }\n\n }\n\n k = k.return;\n } while (null !== k);\n }\n\n V = ek(V);\n } catch (v) {\n b = v;\n continue;\n }\n\n break;\n } while (1);\n}\n\nfunction Uj() {\n var a = lj.current;\n lj.current = Lh;\n return null === a ? Lh : a;\n}\n\nfunction Ig(a, b) {\n a < xj && 2 < a && (xj = a);\n null !== b && a < yj && 2 < a && (yj = a, zj = b);\n}\n\nfunction Jg(a) {\n a > Aj && (Aj = a);\n}\n\nfunction Zj() {\n for (; null !== V;) {\n V = fk(V);\n }\n}\n\nfunction Vj() {\n for (; null !== V && !Of();) {\n V = fk(V);\n }\n}\n\nfunction fk(a) {\n var b = gk(a.alternate, a, W);\n a.memoizedProps = a.pendingProps;\n null === b && (b = ek(a));\n mj.current = null;\n return b;\n}\n\nfunction ek(a) {\n V = a;\n\n do {\n var b = V.alternate;\n a = V.return;\n\n if (0 === (V.effectTag & 2048)) {\n a: {\n var c = b;\n b = V;\n var d = W;\n var e = b.pendingProps;\n\n switch (b.tag) {\n case 2:\n break;\n\n case 16:\n break;\n\n case 15:\n case 0:\n break;\n\n case 1:\n L(b.type) && Ff(b);\n break;\n\n case 3:\n nh(b);\n Gf(b);\n e = b.stateNode;\n e.pendingContext && (e.context = e.pendingContext, e.pendingContext = null);\n (null === c || null === c.child) && ki(b) && Ci(b);\n Ii(b);\n break;\n\n case 5:\n ph(b);\n d = lh(kh.current);\n var f = b.type;\n if (null !== c && null != b.stateNode) Ji(c, b, f, e, d), c.ref !== b.ref && (b.effectTag |= 128);else if (e) {\n var g = lh(ih.current);\n\n if (ki(b)) {\n e = b;\n var h = e.stateNode;\n c = e.type;\n var k = e.memoizedProps,\n l = d;\n h[ue] = e;\n h[ve] = k;\n f = void 0;\n d = h;\n\n switch (c) {\n case \"iframe\":\n case \"object\":\n case \"embed\":\n F(\"load\", d);\n break;\n\n case \"video\":\n case \"audio\":\n for (h = 0; h < cc.length; h++) {\n F(cc[h], d);\n }\n\n break;\n\n case \"source\":\n F(\"error\", d);\n break;\n\n case \"img\":\n case \"image\":\n case \"link\":\n F(\"error\", d);\n F(\"load\", d);\n break;\n\n case \"form\":\n F(\"reset\", d);\n F(\"submit\", d);\n break;\n\n case \"details\":\n F(\"toggle\", d);\n break;\n\n case \"input\":\n Bb(d, k);\n F(\"invalid\", d);\n $d(l, \"onChange\");\n break;\n\n case \"select\":\n d._wrapperState = {\n wasMultiple: !!k.multiple\n };\n F(\"invalid\", d);\n $d(l, \"onChange\");\n break;\n\n case \"textarea\":\n Lb(d, k), F(\"invalid\", d), $d(l, \"onChange\");\n }\n\n Yd(c, k);\n h = null;\n\n for (f in k) {\n k.hasOwnProperty(f) && (g = k[f], \"children\" === f ? \"string\" === typeof g ? d.textContent !== g && (h = [\"children\", g]) : \"number\" === typeof g && d.textContent !== \"\" + g && (h = [\"children\", \"\" + g]) : ia.hasOwnProperty(f) && null != g && $d(l, f));\n }\n\n switch (c) {\n case \"input\":\n yb(d);\n Gb(d, k, !0);\n break;\n\n case \"textarea\":\n yb(d);\n Nb(d, k);\n break;\n\n case \"select\":\n case \"option\":\n break;\n\n default:\n \"function\" === typeof k.onClick && (d.onclick = ae);\n }\n\n f = h;\n e.updateQueue = f;\n e = null !== f ? !0 : !1;\n e && Ci(b);\n } else {\n c = b;\n l = f;\n k = e;\n h = 9 === d.nodeType ? d : d.ownerDocument;\n g === Ob.html && (g = Pb(l));\n g === Ob.html ? \"script\" === l ? (k = h.createElement(\"div\"), k.innerHTML = \"