`;\n warn$2(`Component ${componentName} is missing template or render function.`);\n push(``);\n }\n }\n return getBuffer();\n}\nfunction renderVNode(push, vnode, parentComponent, slotScopeId) {\n const { type, shapeFlag, children } = vnode;\n switch (type) {\n case Text:\n push(escapeHtml(children));\n break;\n case Comment:\n push(\n children ? `` : ``\n );\n break;\n case Static:\n push(children);\n break;\n case Fragment:\n if (vnode.slotScopeIds) {\n slotScopeId = (slotScopeId ? slotScopeId + \" \" : \"\") + vnode.slotScopeIds.join(\" \");\n }\n push(``);\n renderVNodeChildren(\n push,\n children,\n parentComponent,\n slotScopeId\n );\n push(``);\n break;\n default:\n if (shapeFlag & 1) {\n renderElementVNode(push, vnode, parentComponent, slotScopeId);\n } else if (shapeFlag & 6) {\n push(renderComponentVNode(vnode, parentComponent, slotScopeId));\n } else if (shapeFlag & 64) {\n renderTeleportVNode(push, vnode, parentComponent, slotScopeId);\n } else if (shapeFlag & 128) {\n renderVNode(push, vnode.ssContent, parentComponent, slotScopeId);\n } else {\n warn$2(\n \"[@vue/server-renderer] Invalid VNode type:\",\n type,\n `(${typeof type})`\n );\n }\n }\n}\nfunction renderVNodeChildren(push, children, parentComponent, slotScopeId) {\n for (let i = 0; i < children.length; i++) {\n renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId);\n }\n}\nfunction renderElementVNode(push, vnode, parentComponent, slotScopeId) {\n const tag = vnode.type;\n let { props, children, shapeFlag, scopeId, dirs } = vnode;\n let openTag = `<${tag}`;\n if (dirs) {\n props = applySSRDirectives(vnode, props, dirs);\n }\n if (props) {\n openTag += ssrRenderAttrs(props, tag);\n }\n if (scopeId) {\n openTag += ` ${scopeId}`;\n }\n let curParent = parentComponent;\n let curVnode = vnode;\n while (curParent && curVnode === curParent.subTree) {\n curVnode = curParent.vnode;\n if (curVnode.scopeId) {\n openTag += ` ${curVnode.scopeId}`;\n }\n curParent = curParent.parent;\n }\n if (slotScopeId) {\n openTag += ` ${slotScopeId}`;\n }\n push(openTag + `>`);\n if (!isVoidTag(tag)) {\n let hasChildrenOverride = false;\n if (props) {\n if (props.innerHTML) {\n hasChildrenOverride = true;\n push(props.innerHTML);\n } else if (props.textContent) {\n hasChildrenOverride = true;\n push(escapeHtml(props.textContent));\n } else if (tag === \"textarea\" && props.value) {\n hasChildrenOverride = true;\n push(escapeHtml(props.value));\n }\n }\n if (!hasChildrenOverride) {\n if (shapeFlag & 8) {\n push(escapeHtml(children));\n } else if (shapeFlag & 16) {\n renderVNodeChildren(\n push,\n children,\n parentComponent,\n slotScopeId\n );\n }\n }\n push(`${tag}>`);\n }\n}\nfunction applySSRDirectives(vnode, rawProps, dirs) {\n const toMerge = [];\n for (let i = 0; i < dirs.length; i++) {\n const binding = dirs[i];\n const {\n dir: { getSSRProps }\n } = binding;\n if (getSSRProps) {\n const props = getSSRProps(binding, vnode);\n if (props)\n toMerge.push(props);\n }\n }\n return mergeProps(rawProps || {}, ...toMerge);\n}\nfunction renderTeleportVNode(push, vnode, parentComponent, slotScopeId) {\n const target = vnode.props && vnode.props.to;\n const disabled = vnode.props && vnode.props.disabled;\n if (!target) {\n if (!disabled) {\n warn$2(`[@vue/server-renderer] Teleport is missing target prop.`);\n }\n return [];\n }\n if (!isString(target)) {\n warn$2(\n `[@vue/server-renderer] Teleport target must be a query selector string.`\n );\n return [];\n }\n ssrRenderTeleport(\n push,\n (push2) => {\n renderVNodeChildren(\n push2,\n vnode.children,\n parentComponent,\n slotScopeId\n );\n },\n target,\n disabled || disabled === \"\",\n parentComponent\n );\n}\n\nconst { isVNode: isVNode$1 } = ssrUtils;\nasync function unrollBuffer$1(buffer) {\n if (buffer.hasAsync) {\n let ret = \"\";\n for (let i = 0; i < buffer.length; i++) {\n let item = buffer[i];\n if (isPromise(item)) {\n item = await item;\n }\n if (isString(item)) {\n ret += item;\n } else {\n ret += await unrollBuffer$1(item);\n }\n }\n return ret;\n } else {\n return unrollBufferSync$1(buffer);\n }\n}\nfunction unrollBufferSync$1(buffer) {\n let ret = \"\";\n for (let i = 0; i < buffer.length; i++) {\n let item = buffer[i];\n if (isString(item)) {\n ret += item;\n } else {\n ret += unrollBufferSync$1(item);\n }\n }\n return ret;\n}\nasync function renderToString(input, context = {}) {\n if (isVNode$1(input)) {\n return renderToString(createApp({ render: () => input }), context);\n }\n const vnode = createVNode(input._component, input._props);\n vnode.appContext = input._context;\n input.provide(ssrContextKey, context);\n const buffer = await renderComponentVNode(vnode);\n const result = await unrollBuffer$1(buffer);\n await resolveTeleports(context);\n if (context.__watcherHandles) {\n for (const unwatch of context.__watcherHandles) {\n unwatch();\n }\n }\n return result;\n}\nasync function resolveTeleports(context) {\n if (context.__teleportBuffers) {\n context.teleports = context.teleports || {};\n for (const key in context.__teleportBuffers) {\n context.teleports[key] = await unrollBuffer$1(\n await Promise.all([context.__teleportBuffers[key]])\n );\n }\n }\n}\n\nconst { isVNode } = ssrUtils;\nasync function unrollBuffer(buffer, stream) {\n if (buffer.hasAsync) {\n for (let i = 0; i < buffer.length; i++) {\n let item = buffer[i];\n if (isPromise(item)) {\n item = await item;\n }\n if (isString(item)) {\n stream.push(item);\n } else {\n await unrollBuffer(item, stream);\n }\n }\n } else {\n unrollBufferSync(buffer, stream);\n }\n}\nfunction unrollBufferSync(buffer, stream) {\n for (let i = 0; i < buffer.length; i++) {\n let item = buffer[i];\n if (isString(item)) {\n stream.push(item);\n } else {\n unrollBufferSync(item, stream);\n }\n }\n}\nfunction renderToSimpleStream(input, context, stream) {\n if (isVNode(input)) {\n return renderToSimpleStream(\n createApp({ render: () => input }),\n context,\n stream\n );\n }\n const vnode = createVNode(input._component, input._props);\n vnode.appContext = input._context;\n input.provide(ssrContextKey, context);\n Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => {\n if (context.__watcherHandles) {\n for (const unwatch of context.__watcherHandles) {\n unwatch();\n }\n }\n }).then(() => stream.push(null)).catch((error) => {\n stream.destroy(error);\n });\n return stream;\n}\nfunction renderToStream(input, context = {}) {\n console.warn(\n `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.`\n );\n return renderToNodeStream(input, context);\n}\nfunction renderToNodeStream(input, context = {}) {\n {\n throw new Error(\n `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.`\n );\n }\n}\nfunction pipeToNodeWritable(input, context = {}, writable) {\n renderToSimpleStream(input, context, {\n push(content) {\n if (content != null) {\n writable.write(content);\n } else {\n writable.end();\n }\n },\n destroy(err) {\n writable.destroy(err);\n }\n });\n}\nfunction renderToWebStream(input, context = {}) {\n if (typeof ReadableStream !== \"function\") {\n throw new Error(\n `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.`\n );\n }\n const encoder = new TextEncoder();\n let cancelled = false;\n return new ReadableStream({\n start(controller) {\n renderToSimpleStream(input, context, {\n push(content) {\n if (cancelled)\n return;\n if (content != null) {\n controller.enqueue(encoder.encode(content));\n } else {\n controller.close();\n }\n },\n destroy(err) {\n controller.error(err);\n }\n });\n },\n cancel() {\n cancelled = true;\n }\n });\n}\nfunction pipeToWebWritable(input, context = {}, writable) {\n const writer = writable.getWriter();\n const encoder = new TextEncoder();\n let hasReady = false;\n try {\n hasReady = isPromise(writer.ready);\n } catch (e) {\n }\n renderToSimpleStream(input, context, {\n async push(content) {\n if (hasReady) {\n await writer.ready;\n }\n if (content != null) {\n return writer.write(encoder.encode(content));\n } else {\n return writer.close();\n }\n },\n destroy(err) {\n console.log(err);\n writer.close();\n }\n });\n}\n\ninitDirectivesForSSR();\n\nexport { pipeToNodeWritable, pipeToWebWritable, renderToNodeStream, renderToSimpleStream, renderToStream, renderToString, renderToWebStream, ssrGetDirectiveProps, ssrGetDynamicModelProps, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderDynamicAttr, ssrRenderDynamicModel, ssrRenderList, ssrRenderSlot, ssrRenderSlotInner, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport, renderVNode as ssrRenderVNode };\n", "\n/**\n * @cypress/vue v0.0.0-development\n * (c) 2024 Cypress.io\n * Released under the MIT License\n */\n\nimport * as Vue from 'vue';\nimport { nextTick, defineComponent, computed, h, shallowReactive, reactive, isRef, ref, createApp, transformVNodeArgs, setDevtoolsHook, Transition, BaseTransition, TransitionGroup } from 'vue';\nimport { compile } from '@vue/compiler-dom';\nimport { renderToString as renderToString$1 } from '@vue/server-renderer';\n\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nconst ROOT_SELECTOR = '[data-cy-root]';\n/**\n * Gets the root element used to mount the component.\n * @returns {HTMLElement} The root element\n * @throws {Error} If the root element is not found\n */\nconst getContainerEl = () => {\n const el = document.querySelector(ROOT_SELECTOR);\n if (el) {\n return el;\n }\n throw Error(`No element found that matches selector ${ROOT_SELECTOR}. Please add a root element with data-cy-root attribute to your \"component-index.html\" file so that Cypress can attach your component to the DOM.`);\n};\nfunction checkForRemovedStyleOptions(mountingOptions) {\n for (const key of ['cssFile', 'cssFiles', 'style', 'styles', 'stylesheet', 'stylesheets']) {\n if (mountingOptions[key]) {\n Cypress.utils.throwErrByPath('mount.removed_style_mounting_options', key);\n }\n }\n}\n/**\n * Utility function to register CT side effects and run cleanup code during the \"test:before:run\" Cypress hook\n * @param optionalCallback Callback to be called before the next test runs\n */\nfunction setupHooks(optionalCallback) {\n // We don't want CT side effects to run when e2e\n // testing so we early return.\n // System test to verify CT side effects do not pollute e2e: system-tests/test/e2e_with_mount_import_spec.ts\n if (Cypress.testingType !== 'component') {\n return;\n }\n // When running component specs, we cannot allow \"cy.visit\"\n // because it will wipe out our preparation work, and does not make much sense\n // thus we overwrite \"cy.visit\" to throw an error\n Cypress.Commands.overwrite('visit', () => {\n throw new Error('cy.visit from a component spec is not allowed');\n });\n Cypress.Commands.overwrite('session', () => {\n throw new Error('cy.session from a component spec is not allowed');\n });\n Cypress.Commands.overwrite('origin', () => {\n throw new Error('cy.origin from a component spec is not allowed');\n });\n // @ts-ignore\n Cypress.on('test:before:after:run:async', () => {\n optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback();\n });\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\n\nvar Pluggable = /** @class */ (function () {\n function Pluggable() {\n this.installedPlugins = [];\n }\n Pluggable.prototype.install = function (handler, options) {\n if (typeof handler !== 'function') {\n console.error('plugin.install must receive a function');\n handler = function () { return ({}); };\n }\n this.installedPlugins.push({ handler: handler, options: options });\n };\n Pluggable.prototype.extend = function (instance) {\n var invokeSetup = function (_a) {\n var handler = _a.handler, options = _a.options;\n return handler(instance, options); // invoke the setup method passed to install\n };\n var bindProperty = function (_a) {\n var property = _a[0], value = _a[1];\n instance[property] =\n typeof value === 'function' ? value.bind(instance) : value;\n };\n var addAllPropertiesFromSetup = function (setupResult) {\n setupResult = typeof setupResult === 'object' ? setupResult : {};\n Object.entries(setupResult).forEach(bindProperty);\n };\n this.installedPlugins.map(invokeSetup).forEach(addAllPropertiesFromSetup);\n };\n /** For testing */\n Pluggable.prototype.reset = function () {\n this.installedPlugins = [];\n };\n return Pluggable;\n}());\nvar config = {\n global: {\n stubs: {\n transition: true,\n 'transition-group': true\n },\n provide: {},\n components: {},\n config: {},\n directives: {},\n mixins: [],\n mocks: {},\n plugins: [],\n renderStubDefaultSlot: false\n },\n plugins: {\n VueWrapper: new Pluggable(),\n DOMWrapper: new Pluggable()\n }\n};\n\nfunction mergeStubs(target, source) {\n if (source.stubs) {\n if (Array.isArray(source.stubs)) {\n source.stubs.forEach(function (x) { return (target[x] = true); });\n }\n else {\n for (var _i = 0, _a = Object.entries(source.stubs); _i < _a.length; _i++) {\n var _b = _a[_i], k = _b[0], v = _b[1];\n target[k] = v;\n }\n }\n }\n}\n// perform 1-level-deep-pseudo-clone merge in order to prevent config leaks\n// example: vue-router overwrites globalProperties.$router\nfunction mergeAppConfig(configGlobalConfig, mountGlobalConfig) {\n return __assign(__assign(__assign({}, configGlobalConfig), mountGlobalConfig), { globalProperties: __assign(__assign({}, configGlobalConfig === null || configGlobalConfig === void 0 ? void 0 : configGlobalConfig.globalProperties), mountGlobalConfig === null || mountGlobalConfig === void 0 ? void 0 : mountGlobalConfig.globalProperties) });\n}\nfunction mergeGlobalProperties(mountGlobal) {\n var _a, _b, _c;\n if (mountGlobal === void 0) { mountGlobal = {}; }\n var stubs = {};\n var configGlobal = (_a = config === null || config === void 0 ? void 0 : config.global) !== null && _a !== void 0 ? _a : {};\n mergeStubs(stubs, configGlobal);\n mergeStubs(stubs, mountGlobal);\n var renderStubDefaultSlot = (_c = (_b = mountGlobal.renderStubDefaultSlot) !== null && _b !== void 0 ? _b : (configGlobal.renderStubDefaultSlot || (config === null || config === void 0 ? void 0 : config.renderStubDefaultSlot))) !== null && _c !== void 0 ? _c : false;\n if (config.renderStubDefaultSlot === true) {\n console.warn('config.renderStubDefaultSlot is deprecated, use config.global.renderStubDefaultSlot instead');\n }\n return {\n mixins: __spreadArray(__spreadArray([], (configGlobal.mixins || []), true), (mountGlobal.mixins || []), true),\n plugins: __spreadArray(__spreadArray([], (configGlobal.plugins || []), true), (mountGlobal.plugins || []), true),\n stubs: stubs,\n components: __assign(__assign({}, configGlobal.components), mountGlobal.components),\n provide: __assign(__assign({}, configGlobal.provide), mountGlobal.provide),\n mocks: __assign(__assign({}, configGlobal.mocks), mountGlobal.mocks),\n config: mergeAppConfig(configGlobal.config, mountGlobal.config),\n directives: __assign(__assign({}, configGlobal.directives), mountGlobal.directives),\n renderStubDefaultSlot: renderStubDefaultSlot\n };\n}\nvar isObject = function (obj) {\n return !!obj && typeof obj === 'object';\n};\n// https://stackoverflow.com/a/48218209\nvar mergeDeep = function (target, source) {\n if (!isObject(target) || !isObject(source)) {\n return source;\n }\n Object.keys(source).forEach(function (key) {\n var targetValue = target[key];\n var sourceValue = source[key];\n if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n target[key] = sourceValue;\n }\n else if (sourceValue instanceof Date) {\n target[key] = sourceValue;\n }\n else if (isObject(targetValue) && isObject(sourceValue)) {\n target[key] = mergeDeep(Object.assign({}, targetValue), sourceValue);\n }\n else {\n target[key] = sourceValue;\n }\n });\n return target;\n};\nfunction isClassComponent(component) {\n return typeof component === 'function' && '__vccOpts' in component;\n}\nfunction isComponent(component) {\n return Boolean(component &&\n (typeof component === 'object' || typeof component === 'function'));\n}\nfunction isFunctionalComponent(component) {\n return typeof component === 'function' && !isClassComponent(component);\n}\nfunction isObjectComponent(component) {\n return Boolean(component && typeof component === 'object');\n}\nfunction textContent(element) {\n var _a, _b;\n // we check if the element is a comment first\n // to return an empty string in that case, instead of the comment content\n return element.nodeType !== Node.COMMENT_NODE\n ? (_b = (_a = element.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : ''\n : '';\n}\nfunction hasOwnProperty(obj, prop) {\n return obj.hasOwnProperty(prop);\n}\nfunction isNotNullOrUndefined(obj) {\n return Boolean(obj);\n}\nfunction isRefSelector(selector) {\n return typeof selector === 'object' && 'ref' in selector;\n}\nfunction convertStubsToRecord(stubs) {\n if (Array.isArray(stubs)) {\n // ['Foo', 'Bar'] => { Foo: true, Bar: true }\n return stubs.reduce(function (acc, current) {\n acc[current] = true;\n return acc;\n }, {});\n }\n return stubs;\n}\nvar isDirectiveKey = function (key) { return key.match(/^v[A-Z].*/); };\nfunction getComponentsFromStubs(stubs) {\n var normalizedStubs = convertStubsToRecord(stubs);\n return Object.fromEntries(Object.entries(normalizedStubs).filter(function (_a) {\n var key = _a[0];\n return !isDirectiveKey(key);\n }));\n}\nfunction getDirectivesFromStubs(stubs) {\n var normalizedStubs = convertStubsToRecord(stubs);\n return Object.fromEntries(Object.entries(normalizedStubs)\n .filter(function (_a) {\n var key = _a[0], value = _a[1];\n return isDirectiveKey(key) && value !== false;\n })\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return [key.substring(1), value];\n }));\n}\nfunction hasSetupState(vm) {\n return (vm &&\n vm.$.devtoolsRawSetupState);\n}\nfunction isScriptSetup(vm) {\n return (vm && vm.$.setupState.__isScriptSetup);\n}\n\nvar ignorableKeyModifiers = [\n 'stop',\n 'prevent',\n 'self',\n 'exact',\n 'prevent',\n 'capture'\n];\nvar systemKeyModifiers = ['ctrl', 'shift', 'alt', 'meta'];\nvar mouseKeyModifiers = ['left', 'middle', 'right'];\nvar keyCodesByKeyName = {\n backspace: 8,\n tab: 9,\n enter: 13,\n esc: 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 delete: 46\n};\nvar domEvents = {\n abort: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n afterprint: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n animationend: {\n eventInterface: 'AnimationEvent',\n bubbles: true,\n cancelable: false\n },\n animationiteration: {\n eventInterface: 'AnimationEvent',\n bubbles: true,\n cancelable: false\n },\n animationstart: {\n eventInterface: 'AnimationEvent',\n bubbles: true,\n cancelable: false\n },\n appinstalled: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n /**\n * @deprecated\n */\n audioprocess: {\n eventInterface: 'AudioProcessingEvent',\n bubbles: false,\n cancelable: false\n },\n audioend: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n audiostart: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n beforeprint: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n beforeunload: {\n eventInterface: 'BeforeUnloadEvent',\n bubbles: false,\n cancelable: true\n },\n beginEvent: {\n eventInterface: 'TimeEvent',\n bubbles: false,\n cancelable: false\n },\n blur: {\n eventInterface: 'FocusEvent',\n bubbles: false,\n cancelable: false\n },\n boundary: {\n eventInterface: 'SpeechSynthesisEvent',\n bubbles: false,\n cancelable: false\n },\n cached: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n canplay: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n canplaythrough: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n change: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: false\n },\n chargingchange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n chargingtimechange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n checking: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n click: {\n eventInterface: 'MouseEvent',\n bubbles: true,\n cancelable: true\n },\n close: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n complete: {\n eventInterface: 'OfflineAudioCompletionEvent',\n bubbles: false,\n cancelable: false\n },\n compositionend: {\n eventInterface: 'CompositionEvent',\n bubbles: true,\n cancelable: true\n },\n compositionstart: {\n eventInterface: 'CompositionEvent',\n bubbles: true,\n cancelable: true\n },\n compositionupdate: {\n eventInterface: 'CompositionEvent',\n bubbles: true,\n cancelable: false\n },\n contextmenu: {\n eventInterface: 'MouseEvent',\n bubbles: true,\n cancelable: true\n },\n copy: {\n eventInterface: 'ClipboardEvent',\n bubbles: true,\n cancelable: true\n },\n cut: {\n eventInterface: 'ClipboardEvent',\n bubbles: true,\n cancelable: true\n },\n dblclick: {\n eventInterface: 'MouseEvent',\n bubbles: true,\n cancelable: true\n },\n devicechange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n devicelight: {\n eventInterface: 'DeviceLightEvent',\n bubbles: false,\n cancelable: false\n },\n devicemotion: {\n eventInterface: 'DeviceMotionEvent',\n bubbles: false,\n cancelable: false\n },\n deviceorientation: {\n eventInterface: 'DeviceOrientationEvent',\n bubbles: false,\n cancelable: false\n },\n deviceproximity: {\n eventInterface: 'DeviceProximityEvent',\n bubbles: false,\n cancelable: false\n },\n dischargingtimechange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n DOMActivate: {\n eventInterface: 'UIEvent',\n bubbles: true,\n cancelable: true\n },\n DOMAttributeNameChanged: {\n eventInterface: 'MutationNameEvent',\n bubbles: true,\n cancelable: true\n },\n DOMAttrModified: {\n eventInterface: 'MutationEvent',\n bubbles: true,\n cancelable: true\n },\n DOMCharacterDataModified: {\n eventInterface: 'MutationEvent',\n bubbles: true,\n cancelable: true\n },\n DOMContentLoaded: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: true\n },\n DOMElementNameChanged: {\n eventInterface: 'MutationNameEvent',\n bubbles: true,\n cancelable: true\n },\n DOMFocusIn: {\n eventInterface: 'FocusEvent',\n bubbles: true,\n cancelable: true\n },\n DOMFocusOut: {\n eventInterface: 'FocusEvent',\n bubbles: true,\n cancelable: true\n },\n DOMNodeInserted: {\n eventInterface: 'MutationEvent',\n bubbles: true,\n cancelable: true\n },\n DOMNodeInsertedIntoDocument: {\n eventInterface: 'MutationEvent',\n bubbles: true,\n cancelable: true\n },\n DOMNodeRemoved: {\n eventInterface: 'MutationEvent',\n bubbles: true,\n cancelable: true\n },\n DOMNodeRemovedFromDocument: {\n eventInterface: 'MutationEvent',\n bubbles: true,\n cancelable: true\n },\n /**\n * @deprecated\n */\n DOMSubtreeModified: {\n eventInterface: 'MutationEvent',\n bubbles: true,\n cancelable: false\n },\n downloading: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n drag: {\n eventInterface: 'DragEvent',\n bubbles: true,\n cancelable: true\n },\n dragend: {\n eventInterface: 'DragEvent',\n bubbles: true,\n cancelable: false\n },\n dragenter: {\n eventInterface: 'DragEvent',\n bubbles: true,\n cancelable: true\n },\n dragleave: {\n eventInterface: 'DragEvent',\n bubbles: true,\n cancelable: false\n },\n dragover: {\n eventInterface: 'DragEvent',\n bubbles: true,\n cancelable: true\n },\n dragstart: {\n eventInterface: 'DragEvent',\n bubbles: true,\n cancelable: true\n },\n drop: {\n eventInterface: 'DragEvent',\n bubbles: true,\n cancelable: true\n },\n durationchange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n emptied: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n end: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n ended: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n endEvent: {\n eventInterface: 'TimeEvent',\n bubbles: false,\n cancelable: false\n },\n error: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n focus: {\n eventInterface: 'FocusEvent',\n bubbles: false,\n cancelable: false\n },\n focusin: {\n eventInterface: 'FocusEvent',\n bubbles: true,\n cancelable: false\n },\n focusout: {\n eventInterface: 'FocusEvent',\n bubbles: true,\n cancelable: false\n },\n fullscreenchange: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: false\n },\n fullscreenerror: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: false\n },\n gamepadconnected: {\n eventInterface: 'GamepadEvent',\n bubbles: false,\n cancelable: false\n },\n gamepaddisconnected: {\n eventInterface: 'GamepadEvent',\n bubbles: false,\n cancelable: false\n },\n gotpointercapture: {\n eventInterface: 'PointerEvent',\n bubbles: false,\n cancelable: false\n },\n hashchange: {\n eventInterface: 'HashChangeEvent',\n bubbles: true,\n cancelable: false\n },\n lostpointercapture: {\n eventInterface: 'PointerEvent',\n bubbles: false,\n cancelable: false\n },\n input: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: false\n },\n invalid: {\n eventInterface: 'Event',\n cancelable: true,\n bubbles: false\n },\n keydown: {\n eventInterface: 'KeyboardEvent',\n bubbles: true,\n cancelable: true\n },\n keypress: {\n eventInterface: 'KeyboardEvent',\n bubbles: true,\n cancelable: true\n },\n keyup: {\n eventInterface: 'KeyboardEvent',\n bubbles: true,\n cancelable: true\n },\n languagechange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n levelchange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n load: {\n eventInterface: 'UIEvent',\n bubbles: false,\n cancelable: false\n },\n loadeddata: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n loadedmetadata: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n loadend: {\n eventInterface: 'ProgressEvent',\n bubbles: false,\n cancelable: false\n },\n loadstart: {\n eventInterface: 'ProgressEvent',\n bubbles: false,\n cancelable: false\n },\n mark: {\n eventInterface: 'SpeechSynthesisEvent',\n bubbles: false,\n cancelable: false\n },\n message: {\n eventInterface: 'MessageEvent',\n bubbles: false,\n cancelable: false\n },\n messageerror: {\n eventInterface: 'MessageEvent',\n bubbles: false,\n cancelable: false\n },\n mousedown: {\n eventInterface: 'MouseEvent',\n bubbles: true,\n cancelable: true\n },\n mouseenter: {\n eventInterface: 'MouseEvent',\n bubbles: false,\n cancelable: false\n },\n mouseleave: {\n eventInterface: 'MouseEvent',\n bubbles: false,\n cancelable: false\n },\n mousemove: {\n eventInterface: 'MouseEvent',\n bubbles: true,\n cancelable: true\n },\n mouseout: {\n eventInterface: 'MouseEvent',\n bubbles: true,\n cancelable: true\n },\n mouseover: {\n eventInterface: 'MouseEvent',\n bubbles: true,\n cancelable: true\n },\n mouseup: {\n eventInterface: 'MouseEvent',\n bubbles: true,\n cancelable: true\n },\n nomatch: {\n eventInterface: 'SpeechRecognitionEvent',\n bubbles: false,\n cancelable: false\n },\n notificationclick: {\n eventInterface: 'NotificationEvent',\n bubbles: false,\n cancelable: false\n },\n noupdate: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n obsolete: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n offline: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n online: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n open: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n orientationchange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n pagehide: {\n eventInterface: 'PageTransitionEvent',\n bubbles: false,\n cancelable: false\n },\n pageshow: {\n eventInterface: 'PageTransitionEvent',\n bubbles: false,\n cancelable: false\n },\n paste: {\n eventInterface: 'ClipboardEvent',\n bubbles: true,\n cancelable: true\n },\n pause: {\n eventInterface: 'SpeechSynthesisEvent',\n bubbles: false,\n cancelable: false\n },\n pointercancel: {\n eventInterface: 'PointerEvent',\n bubbles: true,\n cancelable: false\n },\n pointerdown: {\n eventInterface: 'PointerEvent',\n bubbles: true,\n cancelable: true\n },\n pointerenter: {\n eventInterface: 'PointerEvent',\n bubbles: false,\n cancelable: false\n },\n pointerleave: {\n eventInterface: 'PointerEvent',\n bubbles: false,\n cancelable: false\n },\n pointerlockchange: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: false\n },\n pointerlockerror: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: false\n },\n pointermove: {\n eventInterface: 'PointerEvent',\n bubbles: true,\n cancelable: true\n },\n pointerout: {\n eventInterface: 'PointerEvent',\n bubbles: true,\n cancelable: true\n },\n pointerover: {\n eventInterface: 'PointerEvent',\n bubbles: true,\n cancelable: true\n },\n pointerup: {\n eventInterface: 'PointerEvent',\n bubbles: true,\n cancelable: true\n },\n play: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n playing: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n popstate: {\n eventInterface: 'PopStateEvent',\n bubbles: true,\n cancelable: false\n },\n progress: {\n eventInterface: 'ProgressEvent',\n bubbles: false,\n cancelable: false\n },\n push: {\n eventInterface: 'PushEvent',\n bubbles: false,\n cancelable: false\n },\n pushsubscriptionchange: {\n eventInterface: 'PushEvent',\n bubbles: false,\n cancelable: false\n },\n ratechange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n readystatechange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n repeatEvent: {\n eventInterface: 'TimeEvent',\n bubbles: false,\n cancelable: false\n },\n reset: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: true\n },\n resize: {\n eventInterface: 'UIEvent',\n bubbles: false,\n cancelable: false\n },\n resourcetimingbufferfull: {\n eventInterface: 'Performance',\n bubbles: true,\n cancelable: true\n },\n result: {\n eventInterface: 'SpeechRecognitionEvent',\n bubbles: false,\n cancelable: false\n },\n resume: {\n eventInterface: 'SpeechSynthesisEvent',\n bubbles: false,\n cancelable: false\n },\n scroll: {\n eventInterface: 'UIEvent',\n bubbles: false,\n cancelable: false\n },\n seeked: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n seeking: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n select: {\n eventInterface: 'UIEvent',\n bubbles: true,\n cancelable: false\n },\n selectstart: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: true\n },\n selectionchange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n show: {\n eventInterface: 'MouseEvent',\n bubbles: false,\n cancelable: false\n },\n slotchange: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: false\n },\n soundend: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n soundstart: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n speechend: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n speechstart: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n stalled: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n start: {\n eventInterface: 'SpeechSynthesisEvent',\n bubbles: false,\n cancelable: false\n },\n storage: {\n eventInterface: 'StorageEvent',\n bubbles: false,\n cancelable: false\n },\n submit: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: true\n },\n success: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n suspend: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n SVGAbort: {\n eventInterface: 'SVGEvent',\n bubbles: true,\n cancelable: false\n },\n SVGError: {\n eventInterface: 'SVGEvent',\n bubbles: true,\n cancelable: false\n },\n SVGLoad: {\n eventInterface: 'SVGEvent',\n bubbles: false,\n cancelable: false\n },\n SVGResize: {\n eventInterface: 'SVGEvent',\n bubbles: true,\n cancelable: false\n },\n SVGScroll: {\n eventInterface: 'SVGEvent',\n bubbles: true,\n cancelable: false\n },\n SVGUnload: {\n eventInterface: 'SVGEvent',\n bubbles: false,\n cancelable: false\n },\n SVGZoom: {\n eventInterface: 'SVGZoomEvent',\n bubbles: true,\n cancelable: false\n },\n timeout: {\n eventInterface: 'ProgressEvent',\n bubbles: false,\n cancelable: false\n },\n timeupdate: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n touchcancel: {\n eventInterface: 'TouchEvent',\n bubbles: true,\n cancelable: false\n },\n touchend: {\n eventInterface: 'TouchEvent',\n bubbles: true,\n cancelable: true\n },\n touchmove: {\n eventInterface: 'TouchEvent',\n bubbles: true,\n cancelable: true\n },\n touchstart: {\n eventInterface: 'TouchEvent',\n bubbles: true,\n cancelable: true\n },\n transitionend: {\n eventInterface: 'TransitionEvent',\n bubbles: true,\n cancelable: true\n },\n unload: {\n eventInterface: 'UIEvent',\n bubbles: false,\n cancelable: false\n },\n updateready: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n userproximity: {\n eventInterface: 'UserProximityEvent',\n bubbles: false,\n cancelable: false\n },\n voiceschanged: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n visibilitychange: {\n eventInterface: 'Event',\n bubbles: true,\n cancelable: false\n },\n volumechange: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n waiting: {\n eventInterface: 'Event',\n bubbles: false,\n cancelable: false\n },\n wheel: {\n eventInterface: 'WheelEvent',\n bubbles: true,\n cancelable: true\n }\n};\n\n/**\n * Groups modifiers into lists\n */\nfunction generateModifiers(modifiers, isOnClick) {\n var keyModifiers = [];\n var systemModifiers = [];\n for (var i = 0; i < modifiers.length; i++) {\n var modifier = modifiers[i];\n // addEventListener() options, e.g. .passive & .capture, that we dont need to handle\n if (ignorableKeyModifiers.includes(modifier)) {\n continue;\n }\n // modifiers that require special conversion\n // if passed a left/right key modifier with onClick, add it here as well.\n if (systemKeyModifiers.includes(modifier) ||\n (mouseKeyModifiers.includes(modifier) &&\n isOnClick)) {\n systemModifiers.push(modifier);\n }\n else {\n keyModifiers.push(modifier);\n }\n }\n return {\n keyModifiers: keyModifiers,\n systemModifiers: systemModifiers\n };\n}\nfunction getEventProperties(eventParams) {\n var modifiers = eventParams.modifiers, _a = eventParams.options, options = _a === void 0 ? {} : _a, eventType = eventParams.eventType;\n var isOnClick = eventType === 'click';\n var _b = generateModifiers(modifiers, isOnClick), keyModifiers = _b.keyModifiers, systemModifiers = _b.systemModifiers;\n if (isOnClick) {\n // if it's a right click, it should fire a `contextmenu` event\n if (systemModifiers.includes('right')) {\n eventType = 'contextmenu';\n options.button = 2;\n // if its a middle click, fire a `mouseup` event\n }\n else if (systemModifiers.includes('middle')) {\n eventType = 'mouseup';\n options.button = 1;\n }\n }\n var meta = domEvents[eventType] || {\n eventInterface: 'Event',\n cancelable: true,\n bubbles: true\n };\n // convert `shift, ctrl` to `shiftKey, ctrlKey`\n // allows trigger('keydown.shift.ctrl.n') directly\n var systemModifiersMeta = systemModifiers.reduce(function (all, key) {\n all[\"\".concat(key, \"Key\")] = true;\n return all;\n }, {});\n // get the keyCode for backwards compat\n var keyCode = keyCodesByKeyName[keyModifiers[0]] ||\n (options && (options.keyCode || options.code));\n var eventProperties = __assign(__assign(__assign(__assign({}, systemModifiersMeta), options), { bubbles: meta.bubbles, cancelable: meta.cancelable, \n // Any derived options should go here\n keyCode: keyCode, code: keyCode }), (keyModifiers[0] ? { key: keyModifiers[0] } : {}));\n return {\n eventProperties: eventProperties,\n meta: meta,\n eventType: eventType\n };\n}\nfunction createEvent(eventParams) {\n var _a = getEventProperties(eventParams), eventProperties = _a.eventProperties, meta = _a.meta, eventType = _a.eventType;\n // user defined eventInterface\n var eventInterface = meta.eventInterface;\n var metaEventInterface = window[eventInterface];\n var SupportedEventInterface = typeof metaEventInterface === 'function' ? metaEventInterface : window.Event;\n return new SupportedEventInterface(eventType, \n // event properties can only be added when the event is instantiated\n // custom properties must be added after the event has been instantiated\n eventProperties);\n}\nfunction createDOMEvent(eventString, options) {\n // split eventString like `keydown.ctrl.shift` into `keydown` and array of modifiers\n var _a = eventString.split('.'), eventType = _a[0], modifiers = _a.slice(1);\n var eventParams = {\n eventType: eventType,\n modifiers: modifiers,\n options: options\n };\n var event = createEvent(eventParams);\n var eventPrototype = Object.getPrototypeOf(event);\n // attach custom options to the event, like `relatedTarget` and so on.\n options &&\n Object.keys(options).forEach(function (key) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(eventPrototype, key);\n var canSetProperty = !(propertyDescriptor && propertyDescriptor.set === undefined);\n if (canSetProperty) {\n event[key] = options[key];\n }\n });\n return event;\n}\n\n// Stubbing occurs when in vnode transformer we're swapping\n// component vnode type due to stubbing either component\n// or directive on component\n// In order to be able to find components we need to track pairs\n// stub --> original component\n// Having this as global might feel unsafe at first point\n// One can assume that sharing stub map across mounts might\n// lead to false matches, however our vnode mappers always\n// produce new nodeTypes for each mount even if you're reusing\n// same stub, so we're safe and do not need to pass these stubs\n// for each mount operation\nvar stubs = new WeakMap();\nfunction registerStub(_a) {\n var source = _a.source, stub = _a.stub;\n stubs.set(stub, source);\n}\nfunction getOriginalComponentFromStub(stub) {\n return stubs.get(stub);\n}\n\nvar cacheStringFunction = function (fn) {\n var cache = Object.create(null);\n return (function (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str));\n });\n};\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cacheStringFunction(function (str) {\n return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });\n});\nvar capitalize = cacheStringFunction(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cacheStringFunction(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase();\n});\n\nfunction matchName(target, sourceName) {\n var camelized = camelize(target);\n var capitalized = capitalize(camelized);\n return (!!sourceName &&\n (sourceName === target ||\n sourceName === camelized ||\n sourceName === capitalized ||\n capitalize(camelize(sourceName)) === capitalized));\n}\n\nfunction isCompatEnabled(key) {\n var _a, _b;\n return (_b = (_a = Vue.compatUtils) === null || _a === void 0 ? void 0 : _a.isCompatEnabled(key)) !== null && _b !== void 0 ? _b : false;\n}\nfunction isLegacyExtendedComponent(component) {\n if (!isCompatEnabled('GLOBAL_EXTEND') || typeof component !== 'function') {\n return false;\n }\n return (hasOwnProperty(component, 'super') &&\n component.super.extend({}).super === component.super);\n}\nfunction unwrapLegacyVueExtendComponent(selector) {\n return isLegacyExtendedComponent(selector) ? selector.options : selector;\n}\nfunction isLegacyFunctionalComponent(component) {\n return Boolean(component &&\n typeof component === 'object' &&\n hasOwnProperty(component, 'functional') &&\n component.functional);\n}\n\nvar getComponentNameInSetup = function (instance, type) {\n return Object.keys((instance === null || instance === void 0 ? void 0 : instance.setupState) || {}).find(function (key) { var _a; return ((_a = Object.getOwnPropertyDescriptor(instance.setupState, key)) === null || _a === void 0 ? void 0 : _a.value) === type; });\n};\nvar getComponentRegisteredName = function (instance, type) {\n if (!instance || !instance.parent)\n return null;\n // try to infer the name based on local resolution\n var registry = instance.type.components;\n for (var key in registry) {\n if (registry[key] === type) {\n return key;\n }\n }\n // try to retrieve name imported in script setup\n return getComponentNameInSetup(instance.parent, type) || null;\n};\nvar getComponentName = function (instance, type) {\n if (isObjectComponent(type)) {\n return (\n // If the component we stub is a script setup component and is automatically\n // imported by unplugin-vue-components we can only get its name through\n // the `__name` property.\n getComponentNameInSetup(instance, type) || type.name || type.__name || '');\n }\n if (isLegacyExtendedComponent(type)) {\n return unwrapLegacyVueExtendComponent(type).name || '';\n }\n if (isFunctionalComponent(type)) {\n return type.displayName || type.name;\n }\n return '';\n};\n\n/**\n * Detect whether a selector matches a VNode\n * @param node\n * @param selector\n * @return {boolean | ((value: any) => boolean)}\n */\nfunction matches(node, rawSelector) {\n var _a, _b, _c;\n var selector = unwrapLegacyVueExtendComponent(rawSelector);\n // do not return none Vue components\n if (!node.component)\n return false;\n var nodeType = node.type;\n if (!isComponent(nodeType))\n return false;\n if (typeof selector === 'string') {\n return (_b = (_a = node.el) === null || _a === void 0 ? void 0 : _a.matches) === null || _b === void 0 ? void 0 : _b.call(_a, selector);\n }\n // When we're using stubs we want user to be able to\n // find stubbed components both by original component\n // or stub definition. That's why we are trying to\n // extract original component and also stub, which was\n // used to create specialized stub for render\n var nodeTypeCandidates = [\n nodeType,\n getOriginalComponentFromStub(nodeType)\n ].filter(Boolean);\n // our selector might be a stub itself\n var target = (_c = getOriginalComponentFromStub(selector)) !== null && _c !== void 0 ? _c : selector;\n if (nodeTypeCandidates.includes(target)) {\n return true;\n }\n var componentName;\n componentName = getComponentName(node.component, nodeType);\n var selectorName = selector.name;\n // the component and selector both have a name\n if (componentName && selectorName) {\n return matchName(selectorName, componentName);\n }\n componentName =\n getComponentRegisteredName(node.component, nodeType) || undefined;\n // if a name is missing, then check the locally registered components in the parent\n if (node.component.parent) {\n var registry = node.component.parent.type.components;\n for (var key in registry) {\n // is it the selector\n if (!selectorName && registry[key] === selector) {\n selectorName = key;\n }\n // is it the component\n if (!componentName && registry[key] === nodeType) {\n componentName = key;\n }\n }\n }\n if (selectorName && componentName) {\n return matchName(selectorName, componentName);\n }\n return false;\n}\n/**\n * Filters out the null, undefined and primitive values,\n * to only keep VNode and VNodeArrayChildren values\n * @param value\n */\nfunction nodesAsObject(value) {\n return !!value && typeof value === 'object';\n}\n/**\n * Collect all children\n * @param nodes\n * @param children\n */\nfunction aggregateChildren(nodes, children) {\n if (children && Array.isArray(children)) {\n var reversedNodes = __spreadArray([], children, true).reverse().filter(nodesAsObject);\n reversedNodes.forEach(function (node) {\n if (Array.isArray(node)) {\n aggregateChildren(nodes, node);\n }\n else {\n nodes.unshift(node);\n }\n });\n }\n}\nfunction findAllVNodes(vnode, selector) {\n var matchingNodes = [];\n var nodes = [vnode];\n while (nodes.length) {\n var node = nodes.shift();\n aggregateChildren(nodes, node.children);\n if (node.component) {\n aggregateChildren(nodes, [node.component.subTree]);\n }\n if (node.suspense) {\n // match children if component is Suspense\n var activeBranch = node.suspense.activeBranch;\n aggregateChildren(nodes, [activeBranch]);\n }\n if (matches(node, selector) && !matchingNodes.includes(node)) {\n matchingNodes.push(node);\n }\n }\n return matchingNodes;\n}\nfunction find(root, selector) {\n var matchingVNodes = findAllVNodes(root, selector);\n if (typeof selector === 'string') {\n // When searching by CSS selector we want only one (topmost) vnode for each el`\n matchingVNodes = matchingVNodes.filter(function (vnode) { var _a; return ((_a = vnode.component.parent) === null || _a === void 0 ? void 0 : _a.vnode.el) !== vnode.el; });\n }\n return matchingVNodes.map(function (vnode) { return vnode.component; });\n}\n\nfunction createWrapperError(wrapperType) {\n return new Proxy(Object.create(null), {\n get: function (obj, prop) {\n switch (prop) {\n case 'then':\n // allows for better errors when wrapping `find` in `await`\n // https://github.com/vuejs/test-utils/issues/638\n return;\n case 'exists':\n return function () { return false; };\n default:\n throw new Error(\"Cannot call \".concat(String(prop), \" on an empty \").concat(wrapperType, \".\"));\n }\n }\n });\n}\n\n/*!\n * isElementVisible\n * Adapted from https://github.com/testing-library/jest-dom\n * Licensed under the MIT License.\n */\nfunction isStyleVisible(element) {\n if (!(element instanceof HTMLElement) && !(element instanceof SVGElement)) {\n return false;\n }\n var _a = getComputedStyle(element), display = _a.display, visibility = _a.visibility, opacity = _a.opacity;\n return (display !== 'none' &&\n visibility !== 'hidden' &&\n visibility !== 'collapse' &&\n opacity !== '0');\n}\nfunction isAttributeVisible(element) {\n return (!element.hasAttribute('hidden') &&\n (element.nodeName === 'DETAILS' ? element.hasAttribute('open') : true));\n}\nfunction isElementVisible(element) {\n return (element.nodeName !== '#comment' &&\n isStyleVisible(element) &&\n isAttributeVisible(element) &&\n (!element.parentElement || isElementVisible(element.parentElement)));\n}\n\nfunction isElement(element) {\n return element instanceof Element;\n}\n\nvar WrapperType;\n(function (WrapperType) {\n WrapperType[WrapperType[\"DOMWrapper\"] = 0] = \"DOMWrapper\";\n WrapperType[WrapperType[\"VueWrapper\"] = 1] = \"VueWrapper\";\n})(WrapperType || (WrapperType = {}));\nvar factories = {};\nfunction registerFactory(type, fn) {\n factories[type] = fn;\n}\nvar createDOMWrapper = function (element) {\n return factories[WrapperType.DOMWrapper](element);\n};\nvar createVueWrapper = function (app, vm, setProps) {\n return factories[WrapperType.VueWrapper](app, vm, setProps);\n};\n\nfunction stringifyNode(node) {\n return node instanceof Element\n ? node.outerHTML\n : new XMLSerializer().serializeToString(node);\n}\n\nvar jsExports = {};\nvar js = {\n get exports(){ return jsExports; },\n set exports(v){ jsExports = v; },\n};\n\nvar src = {};\n\nvar javascriptExports = {};\nvar javascript = {\n get exports(){ return javascriptExports; },\n set exports(v){ javascriptExports = v; },\n};\n\nvar beautifier$2 = {};\n\nvar output = {};\n\n/*jshint node:true */\n\nvar hasRequiredOutput;\n\nfunction requireOutput () {\n\tif (hasRequiredOutput) return output;\n\thasRequiredOutput = 1;\n\n\tfunction OutputLine(parent) {\n\t this.__parent = parent;\n\t this.__character_count = 0;\n\t // use indent_count as a marker for this.__lines that have preserved indentation\n\t this.__indent_count = -1;\n\t this.__alignment_count = 0;\n\t this.__wrap_point_index = 0;\n\t this.__wrap_point_character_count = 0;\n\t this.__wrap_point_indent_count = -1;\n\t this.__wrap_point_alignment_count = 0;\n\n\t this.__items = [];\n\t}\n\n\tOutputLine.prototype.clone_empty = function() {\n\t var line = new OutputLine(this.__parent);\n\t line.set_indent(this.__indent_count, this.__alignment_count);\n\t return line;\n\t};\n\n\tOutputLine.prototype.item = function(index) {\n\t if (index < 0) {\n\t return this.__items[this.__items.length + index];\n\t } else {\n\t return this.__items[index];\n\t }\n\t};\n\n\tOutputLine.prototype.has_match = function(pattern) {\n\t for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {\n\t if (this.__items[lastCheckedOutput].match(pattern)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t};\n\n\tOutputLine.prototype.set_indent = function(indent, alignment) {\n\t if (this.is_empty()) {\n\t this.__indent_count = indent || 0;\n\t this.__alignment_count = alignment || 0;\n\t this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);\n\t }\n\t};\n\n\tOutputLine.prototype._set_wrap_point = function() {\n\t if (this.__parent.wrap_line_length) {\n\t this.__wrap_point_index = this.__items.length;\n\t this.__wrap_point_character_count = this.__character_count;\n\t this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;\n\t this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;\n\t }\n\t};\n\n\tOutputLine.prototype._should_wrap = function() {\n\t return this.__wrap_point_index &&\n\t this.__character_count > this.__parent.wrap_line_length &&\n\t this.__wrap_point_character_count > this.__parent.next_line.__character_count;\n\t};\n\n\tOutputLine.prototype._allow_wrap = function() {\n\t if (this._should_wrap()) {\n\t this.__parent.add_new_line();\n\t var next = this.__parent.current_line;\n\t next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);\n\t next.__items = this.__items.slice(this.__wrap_point_index);\n\t this.__items = this.__items.slice(0, this.__wrap_point_index);\n\n\t next.__character_count += this.__character_count - this.__wrap_point_character_count;\n\t this.__character_count = this.__wrap_point_character_count;\n\n\t if (next.__items[0] === \" \") {\n\t next.__items.splice(0, 1);\n\t next.__character_count -= 1;\n\t }\n\t return true;\n\t }\n\t return false;\n\t};\n\n\tOutputLine.prototype.is_empty = function() {\n\t return this.__items.length === 0;\n\t};\n\n\tOutputLine.prototype.last = function() {\n\t if (!this.is_empty()) {\n\t return this.__items[this.__items.length - 1];\n\t } else {\n\t return null;\n\t }\n\t};\n\n\tOutputLine.prototype.push = function(item) {\n\t this.__items.push(item);\n\t var last_newline_index = item.lastIndexOf('\\n');\n\t if (last_newline_index !== -1) {\n\t this.__character_count = item.length - last_newline_index;\n\t } else {\n\t this.__character_count += item.length;\n\t }\n\t};\n\n\tOutputLine.prototype.pop = function() {\n\t var item = null;\n\t if (!this.is_empty()) {\n\t item = this.__items.pop();\n\t this.__character_count -= item.length;\n\t }\n\t return item;\n\t};\n\n\n\tOutputLine.prototype._remove_indent = function() {\n\t if (this.__indent_count > 0) {\n\t this.__indent_count -= 1;\n\t this.__character_count -= this.__parent.indent_size;\n\t }\n\t};\n\n\tOutputLine.prototype._remove_wrap_indent = function() {\n\t if (this.__wrap_point_indent_count > 0) {\n\t this.__wrap_point_indent_count -= 1;\n\t }\n\t};\n\tOutputLine.prototype.trim = function() {\n\t while (this.last() === ' ') {\n\t this.__items.pop();\n\t this.__character_count -= 1;\n\t }\n\t};\n\n\tOutputLine.prototype.toString = function() {\n\t var result = '';\n\t if (this.is_empty()) {\n\t if (this.__parent.indent_empty_lines) {\n\t result = this.__parent.get_indent_string(this.__indent_count);\n\t }\n\t } else {\n\t result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);\n\t result += this.__items.join('');\n\t }\n\t return result;\n\t};\n\n\tfunction IndentStringCache(options, baseIndentString) {\n\t this.__cache = [''];\n\t this.__indent_size = options.indent_size;\n\t this.__indent_string = options.indent_char;\n\t if (!options.indent_with_tabs) {\n\t this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);\n\t }\n\n\t // Set to null to continue support for auto detection of base indent\n\t baseIndentString = baseIndentString || '';\n\t if (options.indent_level > 0) {\n\t baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);\n\t }\n\n\t this.__base_string = baseIndentString;\n\t this.__base_string_length = baseIndentString.length;\n\t}\n\n\tIndentStringCache.prototype.get_indent_size = function(indent, column) {\n\t var result = this.__base_string_length;\n\t column = column || 0;\n\t if (indent < 0) {\n\t result = 0;\n\t }\n\t result += indent * this.__indent_size;\n\t result += column;\n\t return result;\n\t};\n\n\tIndentStringCache.prototype.get_indent_string = function(indent_level, column) {\n\t var result = this.__base_string;\n\t column = column || 0;\n\t if (indent_level < 0) {\n\t indent_level = 0;\n\t result = '';\n\t }\n\t column += indent_level * this.__indent_size;\n\t this.__ensure_cache(column);\n\t result += this.__cache[column];\n\t return result;\n\t};\n\n\tIndentStringCache.prototype.__ensure_cache = function(column) {\n\t while (column >= this.__cache.length) {\n\t this.__add_column();\n\t }\n\t};\n\n\tIndentStringCache.prototype.__add_column = function() {\n\t var column = this.__cache.length;\n\t var indent = 0;\n\t var result = '';\n\t if (this.__indent_size && column >= this.__indent_size) {\n\t indent = Math.floor(column / this.__indent_size);\n\t column -= indent * this.__indent_size;\n\t result = new Array(indent + 1).join(this.__indent_string);\n\t }\n\t if (column) {\n\t result += new Array(column + 1).join(' ');\n\t }\n\n\t this.__cache.push(result);\n\t};\n\n\tfunction Output(options, baseIndentString) {\n\t this.__indent_cache = new IndentStringCache(options, baseIndentString);\n\t this.raw = false;\n\t this._end_with_newline = options.end_with_newline;\n\t this.indent_size = options.indent_size;\n\t this.wrap_line_length = options.wrap_line_length;\n\t this.indent_empty_lines = options.indent_empty_lines;\n\t this.__lines = [];\n\t this.previous_line = null;\n\t this.current_line = null;\n\t this.next_line = new OutputLine(this);\n\t this.space_before_token = false;\n\t this.non_breaking_space = false;\n\t this.previous_token_wrapped = false;\n\t // initialize\n\t this.__add_outputline();\n\t}\n\n\tOutput.prototype.__add_outputline = function() {\n\t this.previous_line = this.current_line;\n\t this.current_line = this.next_line.clone_empty();\n\t this.__lines.push(this.current_line);\n\t};\n\n\tOutput.prototype.get_line_number = function() {\n\t return this.__lines.length;\n\t};\n\n\tOutput.prototype.get_indent_string = function(indent, column) {\n\t return this.__indent_cache.get_indent_string(indent, column);\n\t};\n\n\tOutput.prototype.get_indent_size = function(indent, column) {\n\t return this.__indent_cache.get_indent_size(indent, column);\n\t};\n\n\tOutput.prototype.is_empty = function() {\n\t return !this.previous_line && this.current_line.is_empty();\n\t};\n\n\tOutput.prototype.add_new_line = function(force_newline) {\n\t // never newline at the start of file\n\t // otherwise, newline only if we didn't just add one or we're forced\n\t if (this.is_empty() ||\n\t (!force_newline && this.just_added_newline())) {\n\t return false;\n\t }\n\n\t // if raw output is enabled, don't print additional newlines,\n\t // but still return True as though you had\n\t if (!this.raw) {\n\t this.__add_outputline();\n\t }\n\t return true;\n\t};\n\n\tOutput.prototype.get_code = function(eol) {\n\t this.trim(true);\n\n\t // handle some edge cases where the last tokens\n\t // has text that ends with newline(s)\n\t var last_item = this.current_line.pop();\n\t if (last_item) {\n\t if (last_item[last_item.length - 1] === '\\n') {\n\t last_item = last_item.replace(/\\n+$/g, '');\n\t }\n\t this.current_line.push(last_item);\n\t }\n\n\t if (this._end_with_newline) {\n\t this.__add_outputline();\n\t }\n\n\t var sweet_code = this.__lines.join('\\n');\n\n\t if (eol !== '\\n') {\n\t sweet_code = sweet_code.replace(/[\\n]/g, eol);\n\t }\n\t return sweet_code;\n\t};\n\n\tOutput.prototype.set_wrap_point = function() {\n\t this.current_line._set_wrap_point();\n\t};\n\n\tOutput.prototype.set_indent = function(indent, alignment) {\n\t indent = indent || 0;\n\t alignment = alignment || 0;\n\n\t // Next line stores alignment values\n\t this.next_line.set_indent(indent, alignment);\n\n\t // Never indent your first output indent at the start of the file\n\t if (this.__lines.length > 1) {\n\t this.current_line.set_indent(indent, alignment);\n\t return true;\n\t }\n\n\t this.current_line.set_indent();\n\t return false;\n\t};\n\n\tOutput.prototype.add_raw_token = function(token) {\n\t for (var x = 0; x < token.newlines; x++) {\n\t this.__add_outputline();\n\t }\n\t this.current_line.set_indent(-1);\n\t this.current_line.push(token.whitespace_before);\n\t this.current_line.push(token.text);\n\t this.space_before_token = false;\n\t this.non_breaking_space = false;\n\t this.previous_token_wrapped = false;\n\t};\n\n\tOutput.prototype.add_token = function(printable_token) {\n\t this.__add_space_before_token();\n\t this.current_line.push(printable_token);\n\t this.space_before_token = false;\n\t this.non_breaking_space = false;\n\t this.previous_token_wrapped = this.current_line._allow_wrap();\n\t};\n\n\tOutput.prototype.__add_space_before_token = function() {\n\t if (this.space_before_token && !this.just_added_newline()) {\n\t if (!this.non_breaking_space) {\n\t this.set_wrap_point();\n\t }\n\t this.current_line.push(' ');\n\t }\n\t};\n\n\tOutput.prototype.remove_indent = function(index) {\n\t var output_length = this.__lines.length;\n\t while (index < output_length) {\n\t this.__lines[index]._remove_indent();\n\t index++;\n\t }\n\t this.current_line._remove_wrap_indent();\n\t};\n\n\tOutput.prototype.trim = function(eat_newlines) {\n\t eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;\n\n\t this.current_line.trim();\n\n\t while (eat_newlines && this.__lines.length > 1 &&\n\t this.current_line.is_empty()) {\n\t this.__lines.pop();\n\t this.current_line = this.__lines[this.__lines.length - 1];\n\t this.current_line.trim();\n\t }\n\n\t this.previous_line = this.__lines.length > 1 ?\n\t this.__lines[this.__lines.length - 2] : null;\n\t};\n\n\tOutput.prototype.just_added_newline = function() {\n\t return this.current_line.is_empty();\n\t};\n\n\tOutput.prototype.just_added_blankline = function() {\n\t return this.is_empty() ||\n\t (this.current_line.is_empty() && this.previous_line.is_empty());\n\t};\n\n\tOutput.prototype.ensure_empty_line_above = function(starts_with, ends_with) {\n\t var index = this.__lines.length - 2;\n\t while (index >= 0) {\n\t var potentialEmptyLine = this.__lines[index];\n\t if (potentialEmptyLine.is_empty()) {\n\t break;\n\t } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&\n\t potentialEmptyLine.item(-1) !== ends_with) {\n\t this.__lines.splice(index + 1, 0, new OutputLine(this));\n\t this.previous_line = this.__lines[this.__lines.length - 2];\n\t break;\n\t }\n\t index--;\n\t }\n\t};\n\n\toutput.Output = Output;\n\treturn output;\n}\n\nvar token = {};\n\n/*jshint node:true */\n\nvar hasRequiredToken;\n\nfunction requireToken () {\n\tif (hasRequiredToken) return token;\n\thasRequiredToken = 1;\n\n\tfunction Token(type, text, newlines, whitespace_before) {\n\t this.type = type;\n\t this.text = text;\n\n\t // comments_before are\n\t // comments that have a new line before them\n\t // and may or may not have a newline after\n\t // this is a set of comments before\n\t this.comments_before = null; /* inline comment*/\n\n\n\t // this.comments_after = new TokenStream(); // no new line before and newline after\n\t this.newlines = newlines || 0;\n\t this.whitespace_before = whitespace_before || '';\n\t this.parent = null;\n\t this.next = null;\n\t this.previous = null;\n\t this.opened = null;\n\t this.closed = null;\n\t this.directives = null;\n\t}\n\n\n\ttoken.Token = Token;\n\treturn token;\n}\n\nvar acorn = {};\n\n/* jshint node: true, curly: false */\n\nvar hasRequiredAcorn;\n\nfunction requireAcorn () {\n\tif (hasRequiredAcorn) return acorn;\n\thasRequiredAcorn = 1;\n\t(function (exports) {\n\n\t\t// acorn used char codes to squeeze the last bit of performance out\n\t\t// Beautifier is okay without that, so we're using regex\n\t\t// permit # (23), $ (36), and @ (64). @ is used in ES7 decorators.\n\t\t// 65 through 91 are uppercase letters.\n\t\t// permit _ (95).\n\t\t// 97 through 123 are lowercase letters.\n\t\tvar baseASCIIidentifierStartChars = \"\\\\x23\\\\x24\\\\x40\\\\x41-\\\\x5a\\\\x5f\\\\x61-\\\\x7a\";\n\n\t\t// inside an identifier @ is not allowed but 0-9 are.\n\t\tvar baseASCIIidentifierChars = \"\\\\x24\\\\x30-\\\\x39\\\\x41-\\\\x5a\\\\x5f\\\\x61-\\\\x7a\";\n\n\t\t// Big ugly regular expressions that match characters in the\n\t\t// whitespace, identifier, and identifier-start categories. These\n\t\t// are only applied when a character is found to actually have a\n\t\t// code point above 128.\n\t\tvar nonASCIIidentifierStartChars = \"\\\\xaa\\\\xb5\\\\xba\\\\xc0-\\\\xd6\\\\xd8-\\\\xf6\\\\xf8-\\\\u02c1\\\\u02c6-\\\\u02d1\\\\u02e0-\\\\u02e4\\\\u02ec\\\\u02ee\\\\u0370-\\\\u0374\\\\u0376\\\\u0377\\\\u037a-\\\\u037d\\\\u0386\\\\u0388-\\\\u038a\\\\u038c\\\\u038e-\\\\u03a1\\\\u03a3-\\\\u03f5\\\\u03f7-\\\\u0481\\\\u048a-\\\\u0527\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0587\\\\u05d0-\\\\u05ea\\\\u05f0-\\\\u05f2\\\\u0620-\\\\u064a\\\\u066e\\\\u066f\\\\u0671-\\\\u06d3\\\\u06d5\\\\u06e5\\\\u06e6\\\\u06ee\\\\u06ef\\\\u06fa-\\\\u06fc\\\\u06ff\\\\u0710\\\\u0712-\\\\u072f\\\\u074d-\\\\u07a5\\\\u07b1\\\\u07ca-\\\\u07ea\\\\u07f4\\\\u07f5\\\\u07fa\\\\u0800-\\\\u0815\\\\u081a\\\\u0824\\\\u0828\\\\u0840-\\\\u0858\\\\u08a0\\\\u08a2-\\\\u08ac\\\\u0904-\\\\u0939\\\\u093d\\\\u0950\\\\u0958-\\\\u0961\\\\u0971-\\\\u0977\\\\u0979-\\\\u097f\\\\u0985-\\\\u098c\\\\u098f\\\\u0990\\\\u0993-\\\\u09a8\\\\u09aa-\\\\u09b0\\\\u09b2\\\\u09b6-\\\\u09b9\\\\u09bd\\\\u09ce\\\\u09dc\\\\u09dd\\\\u09df-\\\\u09e1\\\\u09f0\\\\u09f1\\\\u0a05-\\\\u0a0a\\\\u0a0f\\\\u0a10\\\\u0a13-\\\\u0a28\\\\u0a2a-\\\\u0a30\\\\u0a32\\\\u0a33\\\\u0a35\\\\u0a36\\\\u0a38\\\\u0a39\\\\u0a59-\\\\u0a5c\\\\u0a5e\\\\u0a72-\\\\u0a74\\\\u0a85-\\\\u0a8d\\\\u0a8f-\\\\u0a91\\\\u0a93-\\\\u0aa8\\\\u0aaa-\\\\u0ab0\\\\u0ab2\\\\u0ab3\\\\u0ab5-\\\\u0ab9\\\\u0abd\\\\u0ad0\\\\u0ae0\\\\u0ae1\\\\u0b05-\\\\u0b0c\\\\u0b0f\\\\u0b10\\\\u0b13-\\\\u0b28\\\\u0b2a-\\\\u0b30\\\\u0b32\\\\u0b33\\\\u0b35-\\\\u0b39\\\\u0b3d\\\\u0b5c\\\\u0b5d\\\\u0b5f-\\\\u0b61\\\\u0b71\\\\u0b83\\\\u0b85-\\\\u0b8a\\\\u0b8e-\\\\u0b90\\\\u0b92-\\\\u0b95\\\\u0b99\\\\u0b9a\\\\u0b9c\\\\u0b9e\\\\u0b9f\\\\u0ba3\\\\u0ba4\\\\u0ba8-\\\\u0baa\\\\u0bae-\\\\u0bb9\\\\u0bd0\\\\u0c05-\\\\u0c0c\\\\u0c0e-\\\\u0c10\\\\u0c12-\\\\u0c28\\\\u0c2a-\\\\u0c33\\\\u0c35-\\\\u0c39\\\\u0c3d\\\\u0c58\\\\u0c59\\\\u0c60\\\\u0c61\\\\u0c85-\\\\u0c8c\\\\u0c8e-\\\\u0c90\\\\u0c92-\\\\u0ca8\\\\u0caa-\\\\u0cb3\\\\u0cb5-\\\\u0cb9\\\\u0cbd\\\\u0cde\\\\u0ce0\\\\u0ce1\\\\u0cf1\\\\u0cf2\\\\u0d05-\\\\u0d0c\\\\u0d0e-\\\\u0d10\\\\u0d12-\\\\u0d3a\\\\u0d3d\\\\u0d4e\\\\u0d60\\\\u0d61\\\\u0d7a-\\\\u0d7f\\\\u0d85-\\\\u0d96\\\\u0d9a-\\\\u0db1\\\\u0db3-\\\\u0dbb\\\\u0dbd\\\\u0dc0-\\\\u0dc6\\\\u0e01-\\\\u0e30\\\\u0e32\\\\u0e33\\\\u0e40-\\\\u0e46\\\\u0e81\\\\u0e82\\\\u0e84\\\\u0e87\\\\u0e88\\\\u0e8a\\\\u0e8d\\\\u0e94-\\\\u0e97\\\\u0e99-\\\\u0e9f\\\\u0ea1-\\\\u0ea3\\\\u0ea5\\\\u0ea7\\\\u0eaa\\\\u0eab\\\\u0ead-\\\\u0eb0\\\\u0eb2\\\\u0eb3\\\\u0ebd\\\\u0ec0-\\\\u0ec4\\\\u0ec6\\\\u0edc-\\\\u0edf\\\\u0f00\\\\u0f40-\\\\u0f47\\\\u0f49-\\\\u0f6c\\\\u0f88-\\\\u0f8c\\\\u1000-\\\\u102a\\\\u103f\\\\u1050-\\\\u1055\\\\u105a-\\\\u105d\\\\u1061\\\\u1065\\\\u1066\\\\u106e-\\\\u1070\\\\u1075-\\\\u1081\\\\u108e\\\\u10a0-\\\\u10c5\\\\u10c7\\\\u10cd\\\\u10d0-\\\\u10fa\\\\u10fc-\\\\u1248\\\\u124a-\\\\u124d\\\\u1250-\\\\u1256\\\\u1258\\\\u125a-\\\\u125d\\\\u1260-\\\\u1288\\\\u128a-\\\\u128d\\\\u1290-\\\\u12b0\\\\u12b2-\\\\u12b5\\\\u12b8-\\\\u12be\\\\u12c0\\\\u12c2-\\\\u12c5\\\\u12c8-\\\\u12d6\\\\u12d8-\\\\u1310\\\\u1312-\\\\u1315\\\\u1318-\\\\u135a\\\\u1380-\\\\u138f\\\\u13a0-\\\\u13f4\\\\u1401-\\\\u166c\\\\u166f-\\\\u167f\\\\u1681-\\\\u169a\\\\u16a0-\\\\u16ea\\\\u16ee-\\\\u16f0\\\\u1700-\\\\u170c\\\\u170e-\\\\u1711\\\\u1720-\\\\u1731\\\\u1740-\\\\u1751\\\\u1760-\\\\u176c\\\\u176e-\\\\u1770\\\\u1780-\\\\u17b3\\\\u17d7\\\\u17dc\\\\u1820-\\\\u1877\\\\u1880-\\\\u18a8\\\\u18aa\\\\u18b0-\\\\u18f5\\\\u1900-\\\\u191c\\\\u1950-\\\\u196d\\\\u1970-\\\\u1974\\\\u1980-\\\\u19ab\\\\u19c1-\\\\u19c7\\\\u1a00-\\\\u1a16\\\\u1a20-\\\\u1a54\\\\u1aa7\\\\u1b05-\\\\u1b33\\\\u1b45-\\\\u1b4b\\\\u1b83-\\\\u1ba0\\\\u1bae\\\\u1baf\\\\u1bba-\\\\u1be5\\\\u1c00-\\\\u1c23\\\\u1c4d-\\\\u1c4f\\\\u1c5a-\\\\u1c7d\\\\u1ce9-\\\\u1cec\\\\u1cee-\\\\u1cf1\\\\u1cf5\\\\u1cf6\\\\u1d00-\\\\u1dbf\\\\u1e00-\\\\u1f15\\\\u1f18-\\\\u1f1d\\\\u1f20-\\\\u1f45\\\\u1f48-\\\\u1f4d\\\\u1f50-\\\\u1f57\\\\u1f59\\\\u1f5b\\\\u1f5d\\\\u1f5f-\\\\u1f7d\\\\u1f80-\\\\u1fb4\\\\u1fb6-\\\\u1fbc\\\\u1fbe\\\\u1fc2-\\\\u1fc4\\\\u1fc6-\\\\u1fcc\\\\u1fd0-\\\\u1fd3\\\\u1fd6-\\\\u1fdb\\\\u1fe0-\\\\u1fec\\\\u1ff2-\\\\u1ff4\\\\u1ff6-\\\\u1ffc\\\\u2071\\\\u207f\\\\u2090-\\\\u209c\\\\u2102\\\\u2107\\\\u210a-\\\\u2113\\\\u2115\\\\u2119-\\\\u211d\\\\u2124\\\\u2126\\\\u2128\\\\u212a-\\\\u212d\\\\u212f-\\\\u2139\\\\u213c-\\\\u213f\\\\u2145-\\\\u2149\\\\u214e\\\\u2160-\\\\u2188\\\\u2c00-\\\\u2c2e\\\\u2c30-\\\\u2c5e\\\\u2c60-\\\\u2ce4\\\\u2ceb-\\\\u2cee\\\\u2cf2\\\\u2cf3\\\\u2d00-\\\\u2d25\\\\u2d27\\\\u2d2d\\\\u2d30-\\\\u2d67\\\\u2d6f\\\\u2d80-\\\\u2d96\\\\u2da0-\\\\u2da6\\\\u2da8-\\\\u2dae\\\\u2db0-\\\\u2db6\\\\u2db8-\\\\u2dbe\\\\u2dc0-\\\\u2dc6\\\\u2dc8-\\\\u2dce\\\\u2dd0-\\\\u2dd6\\\\u2dd8-\\\\u2dde\\\\u2e2f\\\\u3005-\\\\u3007\\\\u3021-\\\\u3029\\\\u3031-\\\\u3035\\\\u3038-\\\\u303c\\\\u3041-\\\\u3096\\\\u309d-\\\\u309f\\\\u30a1-\\\\u30fa\\\\u30fc-\\\\u30ff\\\\u3105-\\\\u312d\\\\u3131-\\\\u318e\\\\u31a0-\\\\u31ba\\\\u31f0-\\\\u31ff\\\\u3400-\\\\u4db5\\\\u4e00-\\\\u9fcc\\\\ua000-\\\\ua48c\\\\ua4d0-\\\\ua4fd\\\\ua500-\\\\ua60c\\\\ua610-\\\\ua61f\\\\ua62a\\\\ua62b\\\\ua640-\\\\ua66e\\\\ua67f-\\\\ua697\\\\ua6a0-\\\\ua6ef\\\\ua717-\\\\ua71f\\\\ua722-\\\\ua788\\\\ua78b-\\\\ua78e\\\\ua790-\\\\ua793\\\\ua7a0-\\\\ua7aa\\\\ua7f8-\\\\ua801\\\\ua803-\\\\ua805\\\\ua807-\\\\ua80a\\\\ua80c-\\\\ua822\\\\ua840-\\\\ua873\\\\ua882-\\\\ua8b3\\\\ua8f2-\\\\ua8f7\\\\ua8fb\\\\ua90a-\\\\ua925\\\\ua930-\\\\ua946\\\\ua960-\\\\ua97c\\\\ua984-\\\\ua9b2\\\\ua9cf\\\\uaa00-\\\\uaa28\\\\uaa40-\\\\uaa42\\\\uaa44-\\\\uaa4b\\\\uaa60-\\\\uaa76\\\\uaa7a\\\\uaa80-\\\\uaaaf\\\\uaab1\\\\uaab5\\\\uaab6\\\\uaab9-\\\\uaabd\\\\uaac0\\\\uaac2\\\\uaadb-\\\\uaadd\\\\uaae0-\\\\uaaea\\\\uaaf2-\\\\uaaf4\\\\uab01-\\\\uab06\\\\uab09-\\\\uab0e\\\\uab11-\\\\uab16\\\\uab20-\\\\uab26\\\\uab28-\\\\uab2e\\\\uabc0-\\\\uabe2\\\\uac00-\\\\ud7a3\\\\ud7b0-\\\\ud7c6\\\\ud7cb-\\\\ud7fb\\\\uf900-\\\\ufa6d\\\\ufa70-\\\\ufad9\\\\ufb00-\\\\ufb06\\\\ufb13-\\\\ufb17\\\\ufb1d\\\\ufb1f-\\\\ufb28\\\\ufb2a-\\\\ufb36\\\\ufb38-\\\\ufb3c\\\\ufb3e\\\\ufb40\\\\ufb41\\\\ufb43\\\\ufb44\\\\ufb46-\\\\ufbb1\\\\ufbd3-\\\\ufd3d\\\\ufd50-\\\\ufd8f\\\\ufd92-\\\\ufdc7\\\\ufdf0-\\\\ufdfb\\\\ufe70-\\\\ufe74\\\\ufe76-\\\\ufefc\\\\uff21-\\\\uff3a\\\\uff41-\\\\uff5a\\\\uff66-\\\\uffbe\\\\uffc2-\\\\uffc7\\\\uffca-\\\\uffcf\\\\uffd2-\\\\uffd7\\\\uffda-\\\\uffdc\";\n\t\tvar nonASCIIidentifierChars = \"\\\\u0300-\\\\u036f\\\\u0483-\\\\u0487\\\\u0591-\\\\u05bd\\\\u05bf\\\\u05c1\\\\u05c2\\\\u05c4\\\\u05c5\\\\u05c7\\\\u0610-\\\\u061a\\\\u0620-\\\\u0649\\\\u0672-\\\\u06d3\\\\u06e7-\\\\u06e8\\\\u06fb-\\\\u06fc\\\\u0730-\\\\u074a\\\\u0800-\\\\u0814\\\\u081b-\\\\u0823\\\\u0825-\\\\u0827\\\\u0829-\\\\u082d\\\\u0840-\\\\u0857\\\\u08e4-\\\\u08fe\\\\u0900-\\\\u0903\\\\u093a-\\\\u093c\\\\u093e-\\\\u094f\\\\u0951-\\\\u0957\\\\u0962-\\\\u0963\\\\u0966-\\\\u096f\\\\u0981-\\\\u0983\\\\u09bc\\\\u09be-\\\\u09c4\\\\u09c7\\\\u09c8\\\\u09d7\\\\u09df-\\\\u09e0\\\\u0a01-\\\\u0a03\\\\u0a3c\\\\u0a3e-\\\\u0a42\\\\u0a47\\\\u0a48\\\\u0a4b-\\\\u0a4d\\\\u0a51\\\\u0a66-\\\\u0a71\\\\u0a75\\\\u0a81-\\\\u0a83\\\\u0abc\\\\u0abe-\\\\u0ac5\\\\u0ac7-\\\\u0ac9\\\\u0acb-\\\\u0acd\\\\u0ae2-\\\\u0ae3\\\\u0ae6-\\\\u0aef\\\\u0b01-\\\\u0b03\\\\u0b3c\\\\u0b3e-\\\\u0b44\\\\u0b47\\\\u0b48\\\\u0b4b-\\\\u0b4d\\\\u0b56\\\\u0b57\\\\u0b5f-\\\\u0b60\\\\u0b66-\\\\u0b6f\\\\u0b82\\\\u0bbe-\\\\u0bc2\\\\u0bc6-\\\\u0bc8\\\\u0bca-\\\\u0bcd\\\\u0bd7\\\\u0be6-\\\\u0bef\\\\u0c01-\\\\u0c03\\\\u0c46-\\\\u0c48\\\\u0c4a-\\\\u0c4d\\\\u0c55\\\\u0c56\\\\u0c62-\\\\u0c63\\\\u0c66-\\\\u0c6f\\\\u0c82\\\\u0c83\\\\u0cbc\\\\u0cbe-\\\\u0cc4\\\\u0cc6-\\\\u0cc8\\\\u0cca-\\\\u0ccd\\\\u0cd5\\\\u0cd6\\\\u0ce2-\\\\u0ce3\\\\u0ce6-\\\\u0cef\\\\u0d02\\\\u0d03\\\\u0d46-\\\\u0d48\\\\u0d57\\\\u0d62-\\\\u0d63\\\\u0d66-\\\\u0d6f\\\\u0d82\\\\u0d83\\\\u0dca\\\\u0dcf-\\\\u0dd4\\\\u0dd6\\\\u0dd8-\\\\u0ddf\\\\u0df2\\\\u0df3\\\\u0e34-\\\\u0e3a\\\\u0e40-\\\\u0e45\\\\u0e50-\\\\u0e59\\\\u0eb4-\\\\u0eb9\\\\u0ec8-\\\\u0ecd\\\\u0ed0-\\\\u0ed9\\\\u0f18\\\\u0f19\\\\u0f20-\\\\u0f29\\\\u0f35\\\\u0f37\\\\u0f39\\\\u0f41-\\\\u0f47\\\\u0f71-\\\\u0f84\\\\u0f86-\\\\u0f87\\\\u0f8d-\\\\u0f97\\\\u0f99-\\\\u0fbc\\\\u0fc6\\\\u1000-\\\\u1029\\\\u1040-\\\\u1049\\\\u1067-\\\\u106d\\\\u1071-\\\\u1074\\\\u1082-\\\\u108d\\\\u108f-\\\\u109d\\\\u135d-\\\\u135f\\\\u170e-\\\\u1710\\\\u1720-\\\\u1730\\\\u1740-\\\\u1750\\\\u1772\\\\u1773\\\\u1780-\\\\u17b2\\\\u17dd\\\\u17e0-\\\\u17e9\\\\u180b-\\\\u180d\\\\u1810-\\\\u1819\\\\u1920-\\\\u192b\\\\u1930-\\\\u193b\\\\u1951-\\\\u196d\\\\u19b0-\\\\u19c0\\\\u19c8-\\\\u19c9\\\\u19d0-\\\\u19d9\\\\u1a00-\\\\u1a15\\\\u1a20-\\\\u1a53\\\\u1a60-\\\\u1a7c\\\\u1a7f-\\\\u1a89\\\\u1a90-\\\\u1a99\\\\u1b46-\\\\u1b4b\\\\u1b50-\\\\u1b59\\\\u1b6b-\\\\u1b73\\\\u1bb0-\\\\u1bb9\\\\u1be6-\\\\u1bf3\\\\u1c00-\\\\u1c22\\\\u1c40-\\\\u1c49\\\\u1c5b-\\\\u1c7d\\\\u1cd0-\\\\u1cd2\\\\u1d00-\\\\u1dbe\\\\u1e01-\\\\u1f15\\\\u200c\\\\u200d\\\\u203f\\\\u2040\\\\u2054\\\\u20d0-\\\\u20dc\\\\u20e1\\\\u20e5-\\\\u20f0\\\\u2d81-\\\\u2d96\\\\u2de0-\\\\u2dff\\\\u3021-\\\\u3028\\\\u3099\\\\u309a\\\\ua640-\\\\ua66d\\\\ua674-\\\\ua67d\\\\ua69f\\\\ua6f0-\\\\ua6f1\\\\ua7f8-\\\\ua800\\\\ua806\\\\ua80b\\\\ua823-\\\\ua827\\\\ua880-\\\\ua881\\\\ua8b4-\\\\ua8c4\\\\ua8d0-\\\\ua8d9\\\\ua8f3-\\\\ua8f7\\\\ua900-\\\\ua909\\\\ua926-\\\\ua92d\\\\ua930-\\\\ua945\\\\ua980-\\\\ua983\\\\ua9b3-\\\\ua9c0\\\\uaa00-\\\\uaa27\\\\uaa40-\\\\uaa41\\\\uaa4c-\\\\uaa4d\\\\uaa50-\\\\uaa59\\\\uaa7b\\\\uaae0-\\\\uaae9\\\\uaaf2-\\\\uaaf3\\\\uabc0-\\\\uabe1\\\\uabec\\\\uabed\\\\uabf0-\\\\uabf9\\\\ufb20-\\\\ufb28\\\\ufe00-\\\\ufe0f\\\\ufe20-\\\\ufe26\\\\ufe33\\\\ufe34\\\\ufe4d-\\\\ufe4f\\\\uff10-\\\\uff19\\\\uff3f\";\n\t\t//var nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\n\t\t//var nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\n\n\t\tvar identifierStart = \"(?:\\\\\\\\u[0-9a-fA-F]{4}|[\" + baseASCIIidentifierStartChars + nonASCIIidentifierStartChars + \"])\";\n\t\tvar identifierChars = \"(?:\\\\\\\\u[0-9a-fA-F]{4}|[\" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"])*\";\n\n\t\texports.identifier = new RegExp(identifierStart + identifierChars, 'g');\n\t\texports.identifierStart = new RegExp(identifierStart);\n\t\texports.identifierMatch = new RegExp(\"(?:\\\\\\\\u[0-9a-fA-F]{4}|[\" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"])+\");\n\n\t\t// Whether a single character denotes a newline.\n\n\t\texports.newline = /[\\n\\r\\u2028\\u2029]/;\n\n\t\t// Matches a whole line break (where CRLF is considered a single\n\t\t// line break). Used to count lines.\n\n\t\t// in javascript, these two differ\n\t\t// in python they are the same, different methods are called on them\n\t\texports.lineBreak = new RegExp('\\r\\n|' + exports.newline.source);\n\t\texports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');\n} (acorn));\n\treturn acorn;\n}\n\nvar options$3 = {};\n\nvar options$2 = {};\n\n/*jshint node:true */\n\nvar hasRequiredOptions$3;\n\nfunction requireOptions$3 () {\n\tif (hasRequiredOptions$3) return options$2;\n\thasRequiredOptions$3 = 1;\n\n\tfunction Options(options, merge_child_field) {\n\t this.raw_options = _mergeOpts(options, merge_child_field);\n\n\t // Support passing the source text back with no change\n\t this.disabled = this._get_boolean('disabled');\n\n\t this.eol = this._get_characters('eol', 'auto');\n\t this.end_with_newline = this._get_boolean('end_with_newline');\n\t this.indent_size = this._get_number('indent_size', 4);\n\t this.indent_char = this._get_characters('indent_char', ' ');\n\t this.indent_level = this._get_number('indent_level');\n\n\t this.preserve_newlines = this._get_boolean('preserve_newlines', true);\n\t this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);\n\t if (!this.preserve_newlines) {\n\t this.max_preserve_newlines = 0;\n\t }\n\n\t this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\\t');\n\t if (this.indent_with_tabs) {\n\t this.indent_char = '\\t';\n\n\t // indent_size behavior changed after 1.8.6\n\t // It used to be that indent_size would be\n\t // set to 1 for indent_with_tabs. That is no longer needed and\n\t // actually doesn't make sense - why not use spaces? Further,\n\t // that might produce unexpected behavior - tabs being used\n\t // for single-column alignment. So, when indent_with_tabs is true\n\t // and indent_size is 1, reset indent_size to 4.\n\t if (this.indent_size === 1) {\n\t this.indent_size = 4;\n\t }\n\t }\n\n\t // Backwards compat with 1.3.x\n\t this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));\n\n\t this.indent_empty_lines = this._get_boolean('indent_empty_lines');\n\n\t // valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty']\n\t // For now, 'auto' = all off for javascript, all on for html (and inline javascript).\n\t // other values ignored\n\t this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);\n\t}\n\n\tOptions.prototype._get_array = function(name, default_value) {\n\t var option_value = this.raw_options[name];\n\t var result = default_value || [];\n\t if (typeof option_value === 'object') {\n\t if (option_value !== null && typeof option_value.concat === 'function') {\n\t result = option_value.concat();\n\t }\n\t } else if (typeof option_value === 'string') {\n\t result = option_value.split(/[^a-zA-Z0-9_\\/\\-]+/);\n\t }\n\t return result;\n\t};\n\n\tOptions.prototype._get_boolean = function(name, default_value) {\n\t var option_value = this.raw_options[name];\n\t var result = option_value === undefined ? !!default_value : !!option_value;\n\t return result;\n\t};\n\n\tOptions.prototype._get_characters = function(name, default_value) {\n\t var option_value = this.raw_options[name];\n\t var result = default_value || '';\n\t if (typeof option_value === 'string') {\n\t result = option_value.replace(/\\\\r/, '\\r').replace(/\\\\n/, '\\n').replace(/\\\\t/, '\\t');\n\t }\n\t return result;\n\t};\n\n\tOptions.prototype._get_number = function(name, default_value) {\n\t var option_value = this.raw_options[name];\n\t default_value = parseInt(default_value, 10);\n\t if (isNaN(default_value)) {\n\t default_value = 0;\n\t }\n\t var result = parseInt(option_value, 10);\n\t if (isNaN(result)) {\n\t result = default_value;\n\t }\n\t return result;\n\t};\n\n\tOptions.prototype._get_selection = function(name, selection_list, default_value) {\n\t var result = this._get_selection_list(name, selection_list, default_value);\n\t if (result.length !== 1) {\n\t throw new Error(\n\t \"Invalid Option Value: The option '\" + name + \"' can only be one of the following values:\\n\" +\n\t selection_list + \"\\nYou passed in: '\" + this.raw_options[name] + \"'\");\n\t }\n\n\t return result[0];\n\t};\n\n\n\tOptions.prototype._get_selection_list = function(name, selection_list, default_value) {\n\t if (!selection_list || selection_list.length === 0) {\n\t throw new Error(\"Selection list cannot be empty.\");\n\t }\n\n\t default_value = default_value || [selection_list[0]];\n\t if (!this._is_valid_selection(default_value, selection_list)) {\n\t throw new Error(\"Invalid Default Value!\");\n\t }\n\n\t var result = this._get_array(name, default_value);\n\t if (!this._is_valid_selection(result, selection_list)) {\n\t throw new Error(\n\t \"Invalid Option Value: The option '\" + name + \"' can contain only the following values:\\n\" +\n\t selection_list + \"\\nYou passed in: '\" + this.raw_options[name] + \"'\");\n\t }\n\n\t return result;\n\t};\n\n\tOptions.prototype._is_valid_selection = function(result, selection_list) {\n\t return result.length && selection_list.length &&\n\t !result.some(function(item) { return selection_list.indexOf(item) === -1; });\n\t};\n\n\n\t// merges child options up with the parent options object\n\t// Example: obj = {a: 1, b: {a: 2}}\n\t// mergeOpts(obj, 'b')\n\t//\n\t// Returns: {a: 2}\n\tfunction _mergeOpts(allOptions, childFieldName) {\n\t var finalOpts = {};\n\t allOptions = _normalizeOpts(allOptions);\n\t var name;\n\n\t for (name in allOptions) {\n\t if (name !== childFieldName) {\n\t finalOpts[name] = allOptions[name];\n\t }\n\t }\n\n\t //merge in the per type settings for the childFieldName\n\t if (childFieldName && allOptions[childFieldName]) {\n\t for (name in allOptions[childFieldName]) {\n\t finalOpts[name] = allOptions[childFieldName][name];\n\t }\n\t }\n\t return finalOpts;\n\t}\n\n\tfunction _normalizeOpts(options) {\n\t var convertedOpts = {};\n\t var key;\n\n\t for (key in options) {\n\t var newKey = key.replace(/-/g, \"_\");\n\t convertedOpts[newKey] = options[key];\n\t }\n\t return convertedOpts;\n\t}\n\n\toptions$2.Options = Options;\n\toptions$2.normalizeOpts = _normalizeOpts;\n\toptions$2.mergeOpts = _mergeOpts;\n\treturn options$2;\n}\n\n/*jshint node:true */\n\nvar hasRequiredOptions$2;\n\nfunction requireOptions$2 () {\n\tif (hasRequiredOptions$2) return options$3;\n\thasRequiredOptions$2 = 1;\n\n\tvar BaseOptions = requireOptions$3().Options;\n\n\tvar validPositionValues = ['before-newline', 'after-newline', 'preserve-newline'];\n\n\tfunction Options(options) {\n\t BaseOptions.call(this, options, 'js');\n\n\t // compatibility, re\n\t var raw_brace_style = this.raw_options.brace_style || null;\n\t if (raw_brace_style === \"expand-strict\") { //graceful handling of deprecated option\n\t this.raw_options.brace_style = \"expand\";\n\t } else if (raw_brace_style === \"collapse-preserve-inline\") { //graceful handling of deprecated option\n\t this.raw_options.brace_style = \"collapse,preserve-inline\";\n\t } else if (this.raw_options.braces_on_own_line !== undefined) { //graceful handling of deprecated option\n\t this.raw_options.brace_style = this.raw_options.braces_on_own_line ? \"expand\" : \"collapse\";\n\t // } else if (!raw_brace_style) { //Nothing exists to set it\n\t // raw_brace_style = \"collapse\";\n\t }\n\n\t //preserve-inline in delimited string will trigger brace_preserve_inline, everything\n\t //else is considered a brace_style and the last one only will have an effect\n\n\t var brace_style_split = this._get_selection_list('brace_style', ['collapse', 'expand', 'end-expand', 'none', 'preserve-inline']);\n\n\t this.brace_preserve_inline = false; //Defaults in case one or other was not specified in meta-option\n\t this.brace_style = \"collapse\";\n\n\t for (var bs = 0; bs < brace_style_split.length; bs++) {\n\t if (brace_style_split[bs] === \"preserve-inline\") {\n\t this.brace_preserve_inline = true;\n\t } else {\n\t this.brace_style = brace_style_split[bs];\n\t }\n\t }\n\n\t this.unindent_chained_methods = this._get_boolean('unindent_chained_methods');\n\t this.break_chained_methods = this._get_boolean('break_chained_methods');\n\t this.space_in_paren = this._get_boolean('space_in_paren');\n\t this.space_in_empty_paren = this._get_boolean('space_in_empty_paren');\n\t this.jslint_happy = this._get_boolean('jslint_happy');\n\t this.space_after_anon_function = this._get_boolean('space_after_anon_function');\n\t this.space_after_named_function = this._get_boolean('space_after_named_function');\n\t this.keep_array_indentation = this._get_boolean('keep_array_indentation');\n\t this.space_before_conditional = this._get_boolean('space_before_conditional', true);\n\t this.unescape_strings = this._get_boolean('unescape_strings');\n\t this.e4x = this._get_boolean('e4x');\n\t this.comma_first = this._get_boolean('comma_first');\n\t this.operator_position = this._get_selection('operator_position', validPositionValues);\n\n\t // For testing of beautify preserve:start directive\n\t this.test_output_raw = this._get_boolean('test_output_raw');\n\n\t // force this._options.space_after_anon_function to true if this._options.jslint_happy\n\t if (this.jslint_happy) {\n\t this.space_after_anon_function = true;\n\t }\n\n\t}\n\tOptions.prototype = new BaseOptions();\n\n\n\n\toptions$3.Options = Options;\n\treturn options$3;\n}\n\nvar tokenizer$2 = {};\n\nvar inputscanner = {};\n\n/*jshint node:true */\n\nvar hasRequiredInputscanner;\n\nfunction requireInputscanner () {\n\tif (hasRequiredInputscanner) return inputscanner;\n\thasRequiredInputscanner = 1;\n\n\tvar regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');\n\n\tfunction InputScanner(input_string) {\n\t this.__input = input_string || '';\n\t this.__input_length = this.__input.length;\n\t this.__position = 0;\n\t}\n\n\tInputScanner.prototype.restart = function() {\n\t this.__position = 0;\n\t};\n\n\tInputScanner.prototype.back = function() {\n\t if (this.__position > 0) {\n\t this.__position -= 1;\n\t }\n\t};\n\n\tInputScanner.prototype.hasNext = function() {\n\t return this.__position < this.__input_length;\n\t};\n\n\tInputScanner.prototype.next = function() {\n\t var val = null;\n\t if (this.hasNext()) {\n\t val = this.__input.charAt(this.__position);\n\t this.__position += 1;\n\t }\n\t return val;\n\t};\n\n\tInputScanner.prototype.peek = function(index) {\n\t var val = null;\n\t index = index || 0;\n\t index += this.__position;\n\t if (index >= 0 && index < this.__input_length) {\n\t val = this.__input.charAt(index);\n\t }\n\t return val;\n\t};\n\n\t// This is a JavaScript only helper function (not in python)\n\t// Javascript doesn't have a match method\n\t// and not all implementation support \"sticky\" flag.\n\t// If they do not support sticky then both this.match() and this.test() method\n\t// must get the match and check the index of the match.\n\t// If sticky is supported and set, this method will use it.\n\t// Otherwise it will check that global is set, and fall back to the slower method.\n\tInputScanner.prototype.__match = function(pattern, index) {\n\t pattern.lastIndex = index;\n\t var pattern_match = pattern.exec(this.__input);\n\n\t if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {\n\t if (pattern_match.index !== index) {\n\t pattern_match = null;\n\t }\n\t }\n\n\t return pattern_match;\n\t};\n\n\tInputScanner.prototype.test = function(pattern, index) {\n\t index = index || 0;\n\t index += this.__position;\n\n\t if (index >= 0 && index < this.__input_length) {\n\t return !!this.__match(pattern, index);\n\t } else {\n\t return false;\n\t }\n\t};\n\n\tInputScanner.prototype.testChar = function(pattern, index) {\n\t // test one character regex match\n\t var val = this.peek(index);\n\t pattern.lastIndex = 0;\n\t return val !== null && pattern.test(val);\n\t};\n\n\tInputScanner.prototype.match = function(pattern) {\n\t var pattern_match = this.__match(pattern, this.__position);\n\t if (pattern_match) {\n\t this.__position += pattern_match[0].length;\n\t } else {\n\t pattern_match = null;\n\t }\n\t return pattern_match;\n\t};\n\n\tInputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {\n\t var val = '';\n\t var match;\n\t if (starting_pattern) {\n\t match = this.match(starting_pattern);\n\t if (match) {\n\t val += match[0];\n\t }\n\t }\n\t if (until_pattern && (match || !starting_pattern)) {\n\t val += this.readUntil(until_pattern, until_after);\n\t }\n\t return val;\n\t};\n\n\tInputScanner.prototype.readUntil = function(pattern, until_after) {\n\t var val = '';\n\t var match_index = this.__position;\n\t pattern.lastIndex = this.__position;\n\t var pattern_match = pattern.exec(this.__input);\n\t if (pattern_match) {\n\t match_index = pattern_match.index;\n\t if (until_after) {\n\t match_index += pattern_match[0].length;\n\t }\n\t } else {\n\t match_index = this.__input_length;\n\t }\n\n\t val = this.__input.substring(this.__position, match_index);\n\t this.__position = match_index;\n\t return val;\n\t};\n\n\tInputScanner.prototype.readUntilAfter = function(pattern) {\n\t return this.readUntil(pattern, true);\n\t};\n\n\tInputScanner.prototype.get_regexp = function(pattern, match_from) {\n\t var result = null;\n\t var flags = 'g';\n\t if (match_from && regexp_has_sticky) {\n\t flags = 'y';\n\t }\n\t // strings are converted to regexp\n\t if (typeof pattern === \"string\" && pattern !== '') {\n\t // result = new RegExp(pattern.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), flags);\n\t result = new RegExp(pattern, flags);\n\t } else if (pattern) {\n\t result = new RegExp(pattern.source, flags);\n\t }\n\t return result;\n\t};\n\n\tInputScanner.prototype.get_literal_regexp = function(literal_string) {\n\t return RegExp(literal_string.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'));\n\t};\n\n\t/* css beautifier legacy helpers */\n\tInputScanner.prototype.peekUntilAfter = function(pattern) {\n\t var start = this.__position;\n\t var val = this.readUntilAfter(pattern);\n\t this.__position = start;\n\t return val;\n\t};\n\n\tInputScanner.prototype.lookBack = function(testVal) {\n\t var start = this.__position - 1;\n\t return start >= testVal.length && this.__input.substring(start - testVal.length, start)\n\t .toLowerCase() === testVal;\n\t};\n\n\tinputscanner.InputScanner = InputScanner;\n\treturn inputscanner;\n}\n\nvar tokenizer$1 = {};\n\nvar tokenstream = {};\n\n/*jshint node:true */\n\nvar hasRequiredTokenstream;\n\nfunction requireTokenstream () {\n\tif (hasRequiredTokenstream) return tokenstream;\n\thasRequiredTokenstream = 1;\n\n\tfunction TokenStream(parent_token) {\n\t // private\n\t this.__tokens = [];\n\t this.__tokens_length = this.__tokens.length;\n\t this.__position = 0;\n\t this.__parent_token = parent_token;\n\t}\n\n\tTokenStream.prototype.restart = function() {\n\t this.__position = 0;\n\t};\n\n\tTokenStream.prototype.isEmpty = function() {\n\t return this.__tokens_length === 0;\n\t};\n\n\tTokenStream.prototype.hasNext = function() {\n\t return this.__position < this.__tokens_length;\n\t};\n\n\tTokenStream.prototype.next = function() {\n\t var val = null;\n\t if (this.hasNext()) {\n\t val = this.__tokens[this.__position];\n\t this.__position += 1;\n\t }\n\t return val;\n\t};\n\n\tTokenStream.prototype.peek = function(index) {\n\t var val = null;\n\t index = index || 0;\n\t index += this.__position;\n\t if (index >= 0 && index < this.__tokens_length) {\n\t val = this.__tokens[index];\n\t }\n\t return val;\n\t};\n\n\tTokenStream.prototype.add = function(token) {\n\t if (this.__parent_token) {\n\t token.parent = this.__parent_token;\n\t }\n\t this.__tokens.push(token);\n\t this.__tokens_length += 1;\n\t};\n\n\ttokenstream.TokenStream = TokenStream;\n\treturn tokenstream;\n}\n\nvar whitespacepattern = {};\n\nvar pattern = {};\n\n/*jshint node:true */\n\nvar hasRequiredPattern;\n\nfunction requirePattern () {\n\tif (hasRequiredPattern) return pattern;\n\thasRequiredPattern = 1;\n\n\tfunction Pattern(input_scanner, parent) {\n\t this._input = input_scanner;\n\t this._starting_pattern = null;\n\t this._match_pattern = null;\n\t this._until_pattern = null;\n\t this._until_after = false;\n\n\t if (parent) {\n\t this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true);\n\t this._match_pattern = this._input.get_regexp(parent._match_pattern, true);\n\t this._until_pattern = this._input.get_regexp(parent._until_pattern);\n\t this._until_after = parent._until_after;\n\t }\n\t}\n\n\tPattern.prototype.read = function() {\n\t var result = this._input.read(this._starting_pattern);\n\t if (!this._starting_pattern || result) {\n\t result += this._input.read(this._match_pattern, this._until_pattern, this._until_after);\n\t }\n\t return result;\n\t};\n\n\tPattern.prototype.read_match = function() {\n\t return this._input.match(this._match_pattern);\n\t};\n\n\tPattern.prototype.until_after = function(pattern) {\n\t var result = this._create();\n\t result._until_after = true;\n\t result._until_pattern = this._input.get_regexp(pattern);\n\t result._update();\n\t return result;\n\t};\n\n\tPattern.prototype.until = function(pattern) {\n\t var result = this._create();\n\t result._until_after = false;\n\t result._until_pattern = this._input.get_regexp(pattern);\n\t result._update();\n\t return result;\n\t};\n\n\tPattern.prototype.starting_with = function(pattern) {\n\t var result = this._create();\n\t result._starting_pattern = this._input.get_regexp(pattern, true);\n\t result._update();\n\t return result;\n\t};\n\n\tPattern.prototype.matching = function(pattern) {\n\t var result = this._create();\n\t result._match_pattern = this._input.get_regexp(pattern, true);\n\t result._update();\n\t return result;\n\t};\n\n\tPattern.prototype._create = function() {\n\t return new Pattern(this._input, this);\n\t};\n\n\tPattern.prototype._update = function() {};\n\n\tpattern.Pattern = Pattern;\n\treturn pattern;\n}\n\n/*jshint node:true */\n\nvar hasRequiredWhitespacepattern;\n\nfunction requireWhitespacepattern () {\n\tif (hasRequiredWhitespacepattern) return whitespacepattern;\n\thasRequiredWhitespacepattern = 1;\n\n\tvar Pattern = requirePattern().Pattern;\n\n\tfunction WhitespacePattern(input_scanner, parent) {\n\t Pattern.call(this, input_scanner, parent);\n\t if (parent) {\n\t this._line_regexp = this._input.get_regexp(parent._line_regexp);\n\t } else {\n\t this.__set_whitespace_patterns('', '');\n\t }\n\n\t this.newline_count = 0;\n\t this.whitespace_before_token = '';\n\t}\n\tWhitespacePattern.prototype = new Pattern();\n\n\tWhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) {\n\t whitespace_chars += '\\\\t ';\n\t newline_chars += '\\\\n\\\\r';\n\n\t this._match_pattern = this._input.get_regexp(\n\t '[' + whitespace_chars + newline_chars + ']+', true);\n\t this._newline_regexp = this._input.get_regexp(\n\t '\\\\r\\\\n|[' + newline_chars + ']');\n\t};\n\n\tWhitespacePattern.prototype.read = function() {\n\t this.newline_count = 0;\n\t this.whitespace_before_token = '';\n\n\t var resulting_string = this._input.read(this._match_pattern);\n\t if (resulting_string === ' ') {\n\t this.whitespace_before_token = ' ';\n\t } else if (resulting_string) {\n\t var matches = this.__split(this._newline_regexp, resulting_string);\n\t this.newline_count = matches.length - 1;\n\t this.whitespace_before_token = matches[this.newline_count];\n\t }\n\n\t return resulting_string;\n\t};\n\n\tWhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) {\n\t var result = this._create();\n\t result.__set_whitespace_patterns(whitespace_chars, newline_chars);\n\t result._update();\n\t return result;\n\t};\n\n\tWhitespacePattern.prototype._create = function() {\n\t return new WhitespacePattern(this._input, this);\n\t};\n\n\tWhitespacePattern.prototype.__split = function(regexp, input_string) {\n\t regexp.lastIndex = 0;\n\t var start_index = 0;\n\t var result = [];\n\t var next_match = regexp.exec(input_string);\n\t while (next_match) {\n\t result.push(input_string.substring(start_index, next_match.index));\n\t start_index = next_match.index + next_match[0].length;\n\t next_match = regexp.exec(input_string);\n\t }\n\n\t if (start_index < input_string.length) {\n\t result.push(input_string.substring(start_index, input_string.length));\n\t } else {\n\t result.push('');\n\t }\n\n\t return result;\n\t};\n\n\n\n\twhitespacepattern.WhitespacePattern = WhitespacePattern;\n\treturn whitespacepattern;\n}\n\n/*jshint node:true */\n\nvar hasRequiredTokenizer$2;\n\nfunction requireTokenizer$2 () {\n\tif (hasRequiredTokenizer$2) return tokenizer$1;\n\thasRequiredTokenizer$2 = 1;\n\n\tvar InputScanner = requireInputscanner().InputScanner;\n\tvar Token = requireToken().Token;\n\tvar TokenStream = requireTokenstream().TokenStream;\n\tvar WhitespacePattern = requireWhitespacepattern().WhitespacePattern;\n\n\tvar TOKEN = {\n\t START: 'TK_START',\n\t RAW: 'TK_RAW',\n\t EOF: 'TK_EOF'\n\t};\n\n\tvar Tokenizer = function(input_string, options) {\n\t this._input = new InputScanner(input_string);\n\t this._options = options || {};\n\t this.__tokens = null;\n\n\t this._patterns = {};\n\t this._patterns.whitespace = new WhitespacePattern(this._input);\n\t};\n\n\tTokenizer.prototype.tokenize = function() {\n\t this._input.restart();\n\t this.__tokens = new TokenStream();\n\n\t this._reset();\n\n\t var current;\n\t var previous = new Token(TOKEN.START, '');\n\t var open_token = null;\n\t var open_stack = [];\n\t var comments = new TokenStream();\n\n\t while (previous.type !== TOKEN.EOF) {\n\t current = this._get_next_token(previous, open_token);\n\t while (this._is_comment(current)) {\n\t comments.add(current);\n\t current = this._get_next_token(previous, open_token);\n\t }\n\n\t if (!comments.isEmpty()) {\n\t current.comments_before = comments;\n\t comments = new TokenStream();\n\t }\n\n\t current.parent = open_token;\n\n\t if (this._is_opening(current)) {\n\t open_stack.push(open_token);\n\t open_token = current;\n\t } else if (open_token && this._is_closing(current, open_token)) {\n\t current.opened = open_token;\n\t open_token.closed = current;\n\t open_token = open_stack.pop();\n\t current.parent = open_token;\n\t }\n\n\t current.previous = previous;\n\t previous.next = current;\n\n\t this.__tokens.add(current);\n\t previous = current;\n\t }\n\n\t return this.__tokens;\n\t};\n\n\n\tTokenizer.prototype._is_first_token = function() {\n\t return this.__tokens.isEmpty();\n\t};\n\n\tTokenizer.prototype._reset = function() {};\n\n\tTokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false\n\t this._readWhitespace();\n\t var resulting_string = this._input.read(/.+/g);\n\t if (resulting_string) {\n\t return this._create_token(TOKEN.RAW, resulting_string);\n\t } else {\n\t return this._create_token(TOKEN.EOF, '');\n\t }\n\t};\n\n\tTokenizer.prototype._is_comment = function(current_token) { // jshint unused:false\n\t return false;\n\t};\n\n\tTokenizer.prototype._is_opening = function(current_token) { // jshint unused:false\n\t return false;\n\t};\n\n\tTokenizer.prototype._is_closing = function(current_token, open_token) { // jshint unused:false\n\t return false;\n\t};\n\n\tTokenizer.prototype._create_token = function(type, text) {\n\t var token = new Token(type, text,\n\t this._patterns.whitespace.newline_count,\n\t this._patterns.whitespace.whitespace_before_token);\n\t return token;\n\t};\n\n\tTokenizer.prototype._readWhitespace = function() {\n\t return this._patterns.whitespace.read();\n\t};\n\n\n\n\ttokenizer$1.Tokenizer = Tokenizer;\n\ttokenizer$1.TOKEN = TOKEN;\n\treturn tokenizer$1;\n}\n\nvar directives = {};\n\n/*jshint node:true */\n\nvar hasRequiredDirectives;\n\nfunction requireDirectives () {\n\tif (hasRequiredDirectives) return directives;\n\thasRequiredDirectives = 1;\n\n\tfunction Directives(start_block_pattern, end_block_pattern) {\n\t start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;\n\t end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;\n\t this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \\w+[:]\\w+)+ /.source + end_block_pattern, 'g');\n\t this.__directive_pattern = / (\\w+)[:](\\w+)/g;\n\n\t this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\\sbeautify\\signore:end\\s/.source + end_block_pattern, 'g');\n\t}\n\n\tDirectives.prototype.get_directives = function(text) {\n\t if (!text.match(this.__directives_block_pattern)) {\n\t return null;\n\t }\n\n\t var directives = {};\n\t this.__directive_pattern.lastIndex = 0;\n\t var directive_match = this.__directive_pattern.exec(text);\n\n\t while (directive_match) {\n\t directives[directive_match[1]] = directive_match[2];\n\t directive_match = this.__directive_pattern.exec(text);\n\t }\n\n\t return directives;\n\t};\n\n\tDirectives.prototype.readIgnored = function(input) {\n\t return input.readUntilAfter(this.__directives_end_ignore_pattern);\n\t};\n\n\n\tdirectives.Directives = Directives;\n\treturn directives;\n}\n\nvar templatablepattern = {};\n\n/*jshint node:true */\n\nvar hasRequiredTemplatablepattern;\n\nfunction requireTemplatablepattern () {\n\tif (hasRequiredTemplatablepattern) return templatablepattern;\n\thasRequiredTemplatablepattern = 1;\n\n\tvar Pattern = requirePattern().Pattern;\n\n\n\tvar template_names = {\n\t django: false,\n\t erb: false,\n\t handlebars: false,\n\t php: false,\n\t smarty: false\n\t};\n\n\t// This lets templates appear anywhere we would do a readUntil\n\t// The cost is higher but it is pay to play.\n\tfunction TemplatablePattern(input_scanner, parent) {\n\t Pattern.call(this, input_scanner, parent);\n\t this.__template_pattern = null;\n\t this._disabled = Object.assign({}, template_names);\n\t this._excluded = Object.assign({}, template_names);\n\n\t if (parent) {\n\t this.__template_pattern = this._input.get_regexp(parent.__template_pattern);\n\t this._excluded = Object.assign(this._excluded, parent._excluded);\n\t this._disabled = Object.assign(this._disabled, parent._disabled);\n\t }\n\t var pattern = new Pattern(input_scanner);\n\t this.__patterns = {\n\t handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/),\n\t handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/),\n\t handlebars: pattern.starting_with(/{{/).until_after(/}}/),\n\t php: pattern.starting_with(/<\\?(?:[= ]|php)/).until_after(/\\?>/),\n\t erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/),\n\t // django coflicts with handlebars a bit.\n\t django: pattern.starting_with(/{%/).until_after(/%}/),\n\t django_value: pattern.starting_with(/{{/).until_after(/}}/),\n\t django_comment: pattern.starting_with(/{#/).until_after(/#}/),\n\t smarty: pattern.starting_with(/{(?=[^}{\\s\\n])/).until_after(/[^\\s\\n]}/),\n\t smarty_comment: pattern.starting_with(/{\\*/).until_after(/\\*}/),\n\t smarty_literal: pattern.starting_with(/{literal}/).until_after(/{\\/literal}/)\n\t };\n\t}\n\tTemplatablePattern.prototype = new Pattern();\n\n\tTemplatablePattern.prototype._create = function() {\n\t return new TemplatablePattern(this._input, this);\n\t};\n\n\tTemplatablePattern.prototype._update = function() {\n\t this.__set_templated_pattern();\n\t};\n\n\tTemplatablePattern.prototype.disable = function(language) {\n\t var result = this._create();\n\t result._disabled[language] = true;\n\t result._update();\n\t return result;\n\t};\n\n\tTemplatablePattern.prototype.read_options = function(options) {\n\t var result = this._create();\n\t for (var language in template_names) {\n\t result._disabled[language] = options.templating.indexOf(language) === -1;\n\t }\n\t result._update();\n\t return result;\n\t};\n\n\tTemplatablePattern.prototype.exclude = function(language) {\n\t var result = this._create();\n\t result._excluded[language] = true;\n\t result._update();\n\t return result;\n\t};\n\n\tTemplatablePattern.prototype.read = function() {\n\t var result = '';\n\t if (this._match_pattern) {\n\t result = this._input.read(this._starting_pattern);\n\t } else {\n\t result = this._input.read(this._starting_pattern, this.__template_pattern);\n\t }\n\t var next = this._read_template();\n\t while (next) {\n\t if (this._match_pattern) {\n\t next += this._input.read(this._match_pattern);\n\t } else {\n\t next += this._input.readUntil(this.__template_pattern);\n\t }\n\t result += next;\n\t next = this._read_template();\n\t }\n\n\t if (this._until_after) {\n\t result += this._input.readUntilAfter(this._until_pattern);\n\t }\n\t return result;\n\t};\n\n\tTemplatablePattern.prototype.__set_templated_pattern = function() {\n\t var items = [];\n\n\t if (!this._disabled.php) {\n\t items.push(this.__patterns.php._starting_pattern.source);\n\t }\n\t if (!this._disabled.handlebars) {\n\t items.push(this.__patterns.handlebars._starting_pattern.source);\n\t }\n\t if (!this._disabled.erb) {\n\t items.push(this.__patterns.erb._starting_pattern.source);\n\t }\n\t if (!this._disabled.django) {\n\t items.push(this.__patterns.django._starting_pattern.source);\n\t // The starting pattern for django is more complex because it has different\n\t // patterns for value, comment, and other sections\n\t items.push(this.__patterns.django_value._starting_pattern.source);\n\t items.push(this.__patterns.django_comment._starting_pattern.source);\n\t }\n\t if (!this._disabled.smarty) {\n\t items.push(this.__patterns.smarty._starting_pattern.source);\n\t }\n\n\t if (this._until_pattern) {\n\t items.push(this._until_pattern.source);\n\t }\n\t this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')');\n\t};\n\n\tTemplatablePattern.prototype._read_template = function() {\n\t var resulting_string = '';\n\t var c = this._input.peek();\n\t if (c === '<') {\n\t var peek1 = this._input.peek(1);\n\t //if we're in a comment, do something special\n\t // We treat all comments as literals, even more than preformatted tags\n\t // we just look for the appropriate close tag\n\t if (!this._disabled.php && !this._excluded.php && peek1 === '?') {\n\t resulting_string = resulting_string ||\n\t this.__patterns.php.read();\n\t }\n\t if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') {\n\t resulting_string = resulting_string ||\n\t this.__patterns.erb.read();\n\t }\n\t } else if (c === '{') {\n\t if (!this._disabled.handlebars && !this._excluded.handlebars) {\n\t resulting_string = resulting_string ||\n\t this.__patterns.handlebars_comment.read();\n\t resulting_string = resulting_string ||\n\t this.__patterns.handlebars_unescaped.read();\n\t resulting_string = resulting_string ||\n\t this.__patterns.handlebars.read();\n\t }\n\t if (!this._disabled.django) {\n\t // django coflicts with handlebars a bit.\n\t if (!this._excluded.django && !this._excluded.handlebars) {\n\t resulting_string = resulting_string ||\n\t this.__patterns.django_value.read();\n\t }\n\t if (!this._excluded.django) {\n\t resulting_string = resulting_string ||\n\t this.__patterns.django_comment.read();\n\t resulting_string = resulting_string ||\n\t this.__patterns.django.read();\n\t }\n\t }\n\t if (!this._disabled.smarty) {\n\t // smarty cannot be enabled with django or handlebars enabled\n\t if (this._disabled.django && this._disabled.handlebars) {\n\t resulting_string = resulting_string ||\n\t this.__patterns.smarty_comment.read();\n\t resulting_string = resulting_string ||\n\t this.__patterns.smarty_literal.read();\n\t resulting_string = resulting_string ||\n\t this.__patterns.smarty.read();\n\t }\n\t }\n\t }\n\t return resulting_string;\n\t};\n\n\n\ttemplatablepattern.TemplatablePattern = TemplatablePattern;\n\treturn templatablepattern;\n}\n\n/*jshint node:true */\n\nvar hasRequiredTokenizer$1;\n\nfunction requireTokenizer$1 () {\n\tif (hasRequiredTokenizer$1) return tokenizer$2;\n\thasRequiredTokenizer$1 = 1;\n\n\tvar InputScanner = requireInputscanner().InputScanner;\n\tvar BaseTokenizer = requireTokenizer$2().Tokenizer;\n\tvar BASETOKEN = requireTokenizer$2().TOKEN;\n\tvar Directives = requireDirectives().Directives;\n\tvar acorn = requireAcorn();\n\tvar Pattern = requirePattern().Pattern;\n\tvar TemplatablePattern = requireTemplatablepattern().TemplatablePattern;\n\n\n\tfunction in_array(what, arr) {\n\t return arr.indexOf(what) !== -1;\n\t}\n\n\n\tvar TOKEN = {\n\t START_EXPR: 'TK_START_EXPR',\n\t END_EXPR: 'TK_END_EXPR',\n\t START_BLOCK: 'TK_START_BLOCK',\n\t END_BLOCK: 'TK_END_BLOCK',\n\t WORD: 'TK_WORD',\n\t RESERVED: 'TK_RESERVED',\n\t SEMICOLON: 'TK_SEMICOLON',\n\t STRING: 'TK_STRING',\n\t EQUALS: 'TK_EQUALS',\n\t OPERATOR: 'TK_OPERATOR',\n\t COMMA: 'TK_COMMA',\n\t BLOCK_COMMENT: 'TK_BLOCK_COMMENT',\n\t COMMENT: 'TK_COMMENT',\n\t DOT: 'TK_DOT',\n\t UNKNOWN: 'TK_UNKNOWN',\n\t START: BASETOKEN.START,\n\t RAW: BASETOKEN.RAW,\n\t EOF: BASETOKEN.EOF\n\t};\n\n\n\tvar directives_core = new Directives(/\\/\\*/, /\\*\\//);\n\n\tvar number_pattern = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\\d[\\d_]*n|(?:\\.\\d[\\d_]*|\\d[\\d_]*\\.?[\\d_]*)(?:[eE][+-]?[\\d_]+)?/;\n\n\tvar digit = /[0-9]/;\n\n\t// Dot \".\" must be distinguished from \"...\" and decimal\n\tvar dot_pattern = /[^\\d\\.]/;\n\n\tvar positionable_operators = (\n\t \">>> === !== &&= ??= ||= \" +\n\t \"<< && >= ** != == <= >> || ?? |> \" +\n\t \"< / - + > : & % ? ^ | *\").split(' ');\n\n\t// IMPORTANT: this must be sorted longest to shortest or tokenizing many not work.\n\t// Also, you must update possitionable operators separately from punct\n\tvar punct =\n\t \">>>= \" +\n\t \"... >>= <<= === >>> !== **= &&= ??= ||= \" +\n\t \"=> ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> \" +\n\t \"= ! ? > < : / ^ - + * & % ~ |\";\n\n\tpunct = punct.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, \"\\\\$&\");\n\t// ?. but not if followed by a number \n\tpunct = '\\\\?\\\\.(?!\\\\d) ' + punct;\n\tpunct = punct.replace(/ /g, '|');\n\n\tvar punct_pattern = new RegExp(punct);\n\n\t// words which should always start on new line.\n\tvar line_starters = 'continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(',');\n\tvar reserved_words = line_starters.concat(['do', 'in', 'of', 'else', 'get', 'set', 'new', 'catch', 'finally', 'typeof', 'yield', 'async', 'await', 'from', 'as', 'class', 'extends']);\n\tvar reserved_word_pattern = new RegExp('^(?:' + reserved_words.join('|') + ')$');\n\n\t// var template_pattern = /(?:(?:<\\?php|<\\?=)[\\s\\S]*?\\?>)|(?:<%[\\s\\S]*?%>)/g;\n\n\tvar in_html_comment;\n\n\tvar Tokenizer = function(input_string, options) {\n\t BaseTokenizer.call(this, input_string, options);\n\n\t this._patterns.whitespace = this._patterns.whitespace.matching(\n\t /\\u00A0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff/.source,\n\t /\\u2028\\u2029/.source);\n\n\t var pattern_reader = new Pattern(this._input);\n\t var templatable = new TemplatablePattern(this._input)\n\t .read_options(this._options);\n\n\t this.__patterns = {\n\t template: templatable,\n\t identifier: templatable.starting_with(acorn.identifier).matching(acorn.identifierMatch),\n\t number: pattern_reader.matching(number_pattern),\n\t punct: pattern_reader.matching(punct_pattern),\n\t // comment ends just before nearest linefeed or end of file\n\t comment: pattern_reader.starting_with(/\\/\\//).until(/[\\n\\r\\u2028\\u2029]/),\n\t // /* ... */ comment ends with nearest */ or end of file\n\t block_comment: pattern_reader.starting_with(/\\/\\*/).until_after(/\\*\\//),\n\t html_comment_start: pattern_reader.matching(//),\n\t include: pattern_reader.starting_with(/#include/).until_after(acorn.lineBreak),\n\t shebang: pattern_reader.starting_with(/#!/).until_after(acorn.lineBreak),\n\t xml: pattern_reader.matching(/[\\s\\S]*?<(\\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\\[CDATA\\[[^\\]]*?\\]\\]|)(\\s*{[^}]+?}|\\s+[-a-zA-Z:0-9_.]+|\\s+[-a-zA-Z:0-9_.]+\\s*=\\s*('[^']*'|\"[^\"]*\"|{([^{}]|{[^}]+?})+?}))*\\s*(\\/?)\\s*>/),\n\t single_quote: templatable.until(/['\\\\\\n\\r\\u2028\\u2029]/),\n\t double_quote: templatable.until(/[\"\\\\\\n\\r\\u2028\\u2029]/),\n\t template_text: templatable.until(/[`\\\\$]/),\n\t template_expression: templatable.until(/[`}\\\\]/)\n\t };\n\n\t};\n\tTokenizer.prototype = new BaseTokenizer();\n\n\tTokenizer.prototype._is_comment = function(current_token) {\n\t return current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.BLOCK_COMMENT || current_token.type === TOKEN.UNKNOWN;\n\t};\n\n\tTokenizer.prototype._is_opening = function(current_token) {\n\t return current_token.type === TOKEN.START_BLOCK || current_token.type === TOKEN.START_EXPR;\n\t};\n\n\tTokenizer.prototype._is_closing = function(current_token, open_token) {\n\t return (current_token.type === TOKEN.END_BLOCK || current_token.type === TOKEN.END_EXPR) &&\n\t (open_token && (\n\t (current_token.text === ']' && open_token.text === '[') ||\n\t (current_token.text === ')' && open_token.text === '(') ||\n\t (current_token.text === '}' && open_token.text === '{')));\n\t};\n\n\tTokenizer.prototype._reset = function() {\n\t in_html_comment = false;\n\t};\n\n\tTokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false\n\t var token = null;\n\t this._readWhitespace();\n\t var c = this._input.peek();\n\n\t if (c === null) {\n\t return this._create_token(TOKEN.EOF, '');\n\t }\n\n\t token = token || this._read_non_javascript(c);\n\t token = token || this._read_string(c);\n\t token = token || this._read_word(previous_token);\n\t token = token || this._read_singles(c);\n\t token = token || this._read_comment(c);\n\t token = token || this._read_regexp(c, previous_token);\n\t token = token || this._read_xml(c, previous_token);\n\t token = token || this._read_punctuation();\n\t token = token || this._create_token(TOKEN.UNKNOWN, this._input.next());\n\n\t return token;\n\t};\n\n\tTokenizer.prototype._read_word = function(previous_token) {\n\t var resulting_string;\n\t resulting_string = this.__patterns.identifier.read();\n\t if (resulting_string !== '') {\n\t resulting_string = resulting_string.replace(acorn.allLineBreaks, '\\n');\n\t if (!(previous_token.type === TOKEN.DOT ||\n\t (previous_token.type === TOKEN.RESERVED && (previous_token.text === 'set' || previous_token.text === 'get'))) &&\n\t reserved_word_pattern.test(resulting_string)) {\n\t if ((resulting_string === 'in' || resulting_string === 'of') &&\n\t (previous_token.type === TOKEN.WORD || previous_token.type === TOKEN.STRING)) { // hack for 'in' and 'of' operators\n\t return this._create_token(TOKEN.OPERATOR, resulting_string);\n\t }\n\t return this._create_token(TOKEN.RESERVED, resulting_string);\n\t }\n\t return this._create_token(TOKEN.WORD, resulting_string);\n\t }\n\n\t resulting_string = this.__patterns.number.read();\n\t if (resulting_string !== '') {\n\t return this._create_token(TOKEN.WORD, resulting_string);\n\t }\n\t};\n\n\tTokenizer.prototype._read_singles = function(c) {\n\t var token = null;\n\t if (c === '(' || c === '[') {\n\t token = this._create_token(TOKEN.START_EXPR, c);\n\t } else if (c === ')' || c === ']') {\n\t token = this._create_token(TOKEN.END_EXPR, c);\n\t } else if (c === '{') {\n\t token = this._create_token(TOKEN.START_BLOCK, c);\n\t } else if (c === '}') {\n\t token = this._create_token(TOKEN.END_BLOCK, c);\n\t } else if (c === ';') {\n\t token = this._create_token(TOKEN.SEMICOLON, c);\n\t } else if (c === '.' && dot_pattern.test(this._input.peek(1))) {\n\t token = this._create_token(TOKEN.DOT, c);\n\t } else if (c === ',') {\n\t token = this._create_token(TOKEN.COMMA, c);\n\t }\n\n\t if (token) {\n\t this._input.next();\n\t }\n\t return token;\n\t};\n\n\tTokenizer.prototype._read_punctuation = function() {\n\t var resulting_string = this.__patterns.punct.read();\n\n\t if (resulting_string !== '') {\n\t if (resulting_string === '=') {\n\t return this._create_token(TOKEN.EQUALS, resulting_string);\n\t } else if (resulting_string === '?.') {\n\t return this._create_token(TOKEN.DOT, resulting_string);\n\t } else {\n\t return this._create_token(TOKEN.OPERATOR, resulting_string);\n\t }\n\t }\n\t};\n\n\tTokenizer.prototype._read_non_javascript = function(c) {\n\t var resulting_string = '';\n\n\t if (c === '#') {\n\t if (this._is_first_token()) {\n\t resulting_string = this.__patterns.shebang.read();\n\n\t if (resulting_string) {\n\t return this._create_token(TOKEN.UNKNOWN, resulting_string.trim() + '\\n');\n\t }\n\t }\n\n\t // handles extendscript #includes\n\t resulting_string = this.__patterns.include.read();\n\n\t if (resulting_string) {\n\t return this._create_token(TOKEN.UNKNOWN, resulting_string.trim() + '\\n');\n\t }\n\n\t c = this._input.next();\n\n\t // Spidermonkey-specific sharp variables for circular references. Considered obsolete.\n\t var sharp = '#';\n\t if (this._input.hasNext() && this._input.testChar(digit)) {\n\t do {\n\t c = this._input.next();\n\t sharp += c;\n\t } while (this._input.hasNext() && c !== '#' && c !== '=');\n\t if (c === '#') ; else if (this._input.peek() === '[' && this._input.peek(1) === ']') {\n\t sharp += '[]';\n\t this._input.next();\n\t this._input.next();\n\t } else if (this._input.peek() === '{' && this._input.peek(1) === '}') {\n\t sharp += '{}';\n\t this._input.next();\n\t this._input.next();\n\t }\n\t return this._create_token(TOKEN.WORD, sharp);\n\t }\n\n\t this._input.back();\n\n\t } else if (c === '<' && this._is_first_token()) {\n\t resulting_string = this.__patterns.html_comment_start.read();\n\t if (resulting_string) {\n\t while (this._input.hasNext() && !this._input.testChar(acorn.newline)) {\n\t resulting_string += this._input.next();\n\t }\n\t in_html_comment = true;\n\t return this._create_token(TOKEN.COMMENT, resulting_string);\n\t }\n\t } else if (in_html_comment && c === '-') {\n\t resulting_string = this.__patterns.html_comment_end.read();\n\t if (resulting_string) {\n\t in_html_comment = false;\n\t return this._create_token(TOKEN.COMMENT, resulting_string);\n\t }\n\t }\n\n\t return null;\n\t};\n\n\tTokenizer.prototype._read_comment = function(c) {\n\t var token = null;\n\t if (c === '/') {\n\t var comment = '';\n\t if (this._input.peek(1) === '*') {\n\t // peek for comment /* ... */\n\t comment = this.__patterns.block_comment.read();\n\t var directives = directives_core.get_directives(comment);\n\t if (directives && directives.ignore === 'start') {\n\t comment += directives_core.readIgnored(this._input);\n\t }\n\t comment = comment.replace(acorn.allLineBreaks, '\\n');\n\t token = this._create_token(TOKEN.BLOCK_COMMENT, comment);\n\t token.directives = directives;\n\t } else if (this._input.peek(1) === '/') {\n\t // peek for comment // ...\n\t comment = this.__patterns.comment.read();\n\t token = this._create_token(TOKEN.COMMENT, comment);\n\t }\n\t }\n\t return token;\n\t};\n\n\tTokenizer.prototype._read_string = function(c) {\n\t if (c === '`' || c === \"'\" || c === '\"') {\n\t var resulting_string = this._input.next();\n\t this.has_char_escapes = false;\n\n\t if (c === '`') {\n\t resulting_string += this._read_string_recursive('`', true, '${');\n\t } else {\n\t resulting_string += this._read_string_recursive(c);\n\t }\n\n\t if (this.has_char_escapes && this._options.unescape_strings) {\n\t resulting_string = unescape_string(resulting_string);\n\t }\n\n\t if (this._input.peek() === c) {\n\t resulting_string += this._input.next();\n\t }\n\n\t resulting_string = resulting_string.replace(acorn.allLineBreaks, '\\n');\n\n\t return this._create_token(TOKEN.STRING, resulting_string);\n\t }\n\n\t return null;\n\t};\n\n\tTokenizer.prototype._allow_regexp_or_xml = function(previous_token) {\n\t // regex and xml can only appear in specific locations during parsing\n\t return (previous_token.type === TOKEN.RESERVED && in_array(previous_token.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) ||\n\t (previous_token.type === TOKEN.END_EXPR && previous_token.text === ')' &&\n\t previous_token.opened.previous.type === TOKEN.RESERVED && in_array(previous_token.opened.previous.text, ['if', 'while', 'for'])) ||\n\t (in_array(previous_token.type, [TOKEN.COMMENT, TOKEN.START_EXPR, TOKEN.START_BLOCK, TOKEN.START,\n\t TOKEN.END_BLOCK, TOKEN.OPERATOR, TOKEN.EQUALS, TOKEN.EOF, TOKEN.SEMICOLON, TOKEN.COMMA\n\t ]));\n\t};\n\n\tTokenizer.prototype._read_regexp = function(c, previous_token) {\n\n\t if (c === '/' && this._allow_regexp_or_xml(previous_token)) {\n\t // handle regexp\n\t //\n\t var resulting_string = this._input.next();\n\t var esc = false;\n\n\t var in_char_class = false;\n\t while (this._input.hasNext() &&\n\t ((esc || in_char_class || this._input.peek() !== c) &&\n\t !this._input.testChar(acorn.newline))) {\n\t resulting_string += this._input.peek();\n\t if (!esc) {\n\t esc = this._input.peek() === '\\\\';\n\t if (this._input.peek() === '[') {\n\t in_char_class = true;\n\t } else if (this._input.peek() === ']') {\n\t in_char_class = false;\n\t }\n\t } else {\n\t esc = false;\n\t }\n\t this._input.next();\n\t }\n\n\t if (this._input.peek() === c) {\n\t resulting_string += this._input.next();\n\n\t // regexps may have modifiers /regexp/MOD , so fetch those, too\n\t // Only [gim] are valid, but if the user puts in garbage, do what we can to take it.\n\t resulting_string += this._input.read(acorn.identifier);\n\t }\n\t return this._create_token(TOKEN.STRING, resulting_string);\n\t }\n\t return null;\n\t};\n\n\tTokenizer.prototype._read_xml = function(c, previous_token) {\n\n\t if (this._options.e4x && c === \"<\" && this._allow_regexp_or_xml(previous_token)) {\n\t var xmlStr = '';\n\t var match = this.__patterns.xml.read_match();\n\t // handle e4x xml literals\n\t //\n\t if (match) {\n\t // Trim root tag to attempt to\n\t var rootTag = match[2].replace(/^{\\s+/, '{').replace(/\\s+}$/, '}');\n\t var isCurlyRoot = rootTag.indexOf('{') === 0;\n\t var depth = 0;\n\t while (match) {\n\t var isEndTag = !!match[1];\n\t var tagName = match[2];\n\t var isSingletonTag = (!!match[match.length - 1]) || (tagName.slice(0, 8) === \"![CDATA[\");\n\t if (!isSingletonTag &&\n\t (tagName === rootTag || (isCurlyRoot && tagName.replace(/^{\\s+/, '{').replace(/\\s+}$/, '}')))) {\n\t if (isEndTag) {\n\t --depth;\n\t } else {\n\t ++depth;\n\t }\n\t }\n\t xmlStr += match[0];\n\t if (depth <= 0) {\n\t break;\n\t }\n\t match = this.__patterns.xml.read_match();\n\t }\n\t // if we didn't close correctly, keep unformatted.\n\t if (!match) {\n\t xmlStr += this._input.match(/[\\s\\S]*/g)[0];\n\t }\n\t xmlStr = xmlStr.replace(acorn.allLineBreaks, '\\n');\n\t return this._create_token(TOKEN.STRING, xmlStr);\n\t }\n\t }\n\n\t return null;\n\t};\n\n\tfunction unescape_string(s) {\n\t // You think that a regex would work for this\n\t // return s.replace(/\\\\x([0-9a-f]{2})/gi, function(match, val) {\n\t // return String.fromCharCode(parseInt(val, 16));\n\t // })\n\t // However, dealing with '\\xff', '\\\\xff', '\\\\\\xff' makes this more fun.\n\t var out = '',\n\t escaped = 0;\n\n\t var input_scan = new InputScanner(s);\n\t var matched = null;\n\n\t while (input_scan.hasNext()) {\n\t // Keep any whitespace, non-slash characters\n\t // also keep slash pairs.\n\t matched = input_scan.match(/([\\s]|[^\\\\]|\\\\\\\\)+/g);\n\n\t if (matched) {\n\t out += matched[0];\n\t }\n\n\t if (input_scan.peek() === '\\\\') {\n\t input_scan.next();\n\t if (input_scan.peek() === 'x') {\n\t matched = input_scan.match(/x([0-9A-Fa-f]{2})/g);\n\t } else if (input_scan.peek() === 'u') {\n\t matched = input_scan.match(/u([0-9A-Fa-f]{4})/g);\n\t } else {\n\t out += '\\\\';\n\t if (input_scan.hasNext()) {\n\t out += input_scan.next();\n\t }\n\t continue;\n\t }\n\n\t // If there's some error decoding, return the original string\n\t if (!matched) {\n\t return s;\n\t }\n\n\t escaped = parseInt(matched[1], 16);\n\n\t if (escaped > 0x7e && escaped <= 0xff && matched[0].indexOf('x') === 0) {\n\t // we bail out on \\x7f..\\xff,\n\t // leaving whole string escaped,\n\t // as it's probably completely binary\n\t return s;\n\t } else if (escaped >= 0x00 && escaped < 0x20) {\n\t // leave 0x00...0x1f escaped\n\t out += '\\\\' + matched[0];\n\t continue;\n\t } else if (escaped === 0x22 || escaped === 0x27 || escaped === 0x5c) {\n\t // single-quote, apostrophe, backslash - escape these\n\t out += '\\\\' + String.fromCharCode(escaped);\n\t } else {\n\t out += String.fromCharCode(escaped);\n\t }\n\t }\n\t }\n\n\t return out;\n\t}\n\n\t// handle string\n\t//\n\tTokenizer.prototype._read_string_recursive = function(delimiter, allow_unescaped_newlines, start_sub) {\n\t var current_char;\n\t var pattern;\n\t if (delimiter === '\\'') {\n\t pattern = this.__patterns.single_quote;\n\t } else if (delimiter === '\"') {\n\t pattern = this.__patterns.double_quote;\n\t } else if (delimiter === '`') {\n\t pattern = this.__patterns.template_text;\n\t } else if (delimiter === '}') {\n\t pattern = this.__patterns.template_expression;\n\t }\n\n\t var resulting_string = pattern.read();\n\t var next = '';\n\t while (this._input.hasNext()) {\n\t next = this._input.next();\n\t if (next === delimiter ||\n\t (!allow_unescaped_newlines && acorn.newline.test(next))) {\n\t this._input.back();\n\t break;\n\t } else if (next === '\\\\' && this._input.hasNext()) {\n\t current_char = this._input.peek();\n\n\t if (current_char === 'x' || current_char === 'u') {\n\t this.has_char_escapes = true;\n\t } else if (current_char === '\\r' && this._input.peek(1) === '\\n') {\n\t this._input.next();\n\t }\n\t next += this._input.next();\n\t } else if (start_sub) {\n\t if (start_sub === '${' && next === '$' && this._input.peek() === '{') {\n\t next += this._input.next();\n\t }\n\n\t if (start_sub === next) {\n\t if (delimiter === '`') {\n\t next += this._read_string_recursive('}', allow_unescaped_newlines, '`');\n\t } else {\n\t next += this._read_string_recursive('`', allow_unescaped_newlines, '${');\n\t }\n\t if (this._input.hasNext()) {\n\t next += this._input.next();\n\t }\n\t }\n\t }\n\t next += pattern.read();\n\t resulting_string += next;\n\t }\n\n\t return resulting_string;\n\t};\n\n\ttokenizer$2.Tokenizer = Tokenizer;\n\ttokenizer$2.TOKEN = TOKEN;\n\ttokenizer$2.positionable_operators = positionable_operators.slice();\n\ttokenizer$2.line_starters = line_starters.slice();\n\treturn tokenizer$2;\n}\n\n/*jshint node:true */\n\nvar hasRequiredBeautifier$2;\n\nfunction requireBeautifier$2 () {\n\tif (hasRequiredBeautifier$2) return beautifier$2;\n\thasRequiredBeautifier$2 = 1;\n\n\tvar Output = requireOutput().Output;\n\tvar Token = requireToken().Token;\n\tvar acorn = requireAcorn();\n\tvar Options = requireOptions$2().Options;\n\tvar Tokenizer = requireTokenizer$1().Tokenizer;\n\tvar line_starters = requireTokenizer$1().line_starters;\n\tvar positionable_operators = requireTokenizer$1().positionable_operators;\n\tvar TOKEN = requireTokenizer$1().TOKEN;\n\n\n\tfunction in_array(what, arr) {\n\t return arr.indexOf(what) !== -1;\n\t}\n\n\tfunction ltrim(s) {\n\t return s.replace(/^\\s+/g, '');\n\t}\n\n\tfunction generateMapFromStrings(list) {\n\t var result = {};\n\t for (var x = 0; x < list.length; x++) {\n\t // make the mapped names underscored instead of dash\n\t result[list[x].replace(/-/g, '_')] = list[x];\n\t }\n\t return result;\n\t}\n\n\tfunction reserved_word(token, word) {\n\t return token && token.type === TOKEN.RESERVED && token.text === word;\n\t}\n\n\tfunction reserved_array(token, words) {\n\t return token && token.type === TOKEN.RESERVED && in_array(token.text, words);\n\t}\n\t// Unsure of what they mean, but they work. Worth cleaning up in future.\n\tvar special_words = ['case', 'return', 'do', 'if', 'throw', 'else', 'await', 'break', 'continue', 'async'];\n\n\tvar validPositionValues = ['before-newline', 'after-newline', 'preserve-newline'];\n\n\t// Generate map from array\n\tvar OPERATOR_POSITION = generateMapFromStrings(validPositionValues);\n\n\tvar OPERATOR_POSITION_BEFORE_OR_PRESERVE = [OPERATOR_POSITION.before_newline, OPERATOR_POSITION.preserve_newline];\n\n\tvar MODE = {\n\t BlockStatement: 'BlockStatement', // 'BLOCK'\n\t Statement: 'Statement', // 'STATEMENT'\n\t ObjectLiteral: 'ObjectLiteral', // 'OBJECT',\n\t ArrayLiteral: 'ArrayLiteral', //'[EXPRESSION]',\n\t ForInitializer: 'ForInitializer', //'(FOR-EXPRESSION)',\n\t Conditional: 'Conditional', //'(COND-EXPRESSION)',\n\t Expression: 'Expression' //'(EXPRESSION)'\n\t};\n\n\tfunction remove_redundant_indentation(output, frame) {\n\t // This implementation is effective but has some issues:\n\t // - can cause line wrap to happen too soon due to indent removal\n\t // after wrap points are calculated\n\t // These issues are minor compared to ugly indentation.\n\n\t if (frame.multiline_frame ||\n\t frame.mode === MODE.ForInitializer ||\n\t frame.mode === MODE.Conditional) {\n\t return;\n\t }\n\n\t // remove one indent from each line inside this section\n\t output.remove_indent(frame.start_line_index);\n\t}\n\n\t// we could use just string.split, but\n\t// IE doesn't like returning empty strings\n\tfunction split_linebreaks(s) {\n\t //return s.split(/\\x0d\\x0a|\\x0a/);\n\n\t s = s.replace(acorn.allLineBreaks, '\\n');\n\t var out = [],\n\t idx = s.indexOf(\"\\n\");\n\t while (idx !== -1) {\n\t out.push(s.substring(0, idx));\n\t s = s.substring(idx + 1);\n\t idx = s.indexOf(\"\\n\");\n\t }\n\t if (s.length) {\n\t out.push(s);\n\t }\n\t return out;\n\t}\n\n\tfunction is_array(mode) {\n\t return mode === MODE.ArrayLiteral;\n\t}\n\n\tfunction is_expression(mode) {\n\t return in_array(mode, [MODE.Expression, MODE.ForInitializer, MODE.Conditional]);\n\t}\n\n\tfunction all_lines_start_with(lines, c) {\n\t for (var i = 0; i < lines.length; i++) {\n\t var line = lines[i].trim();\n\t if (line.charAt(0) !== c) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t}\n\n\tfunction each_line_matches_indent(lines, indent) {\n\t var i = 0,\n\t len = lines.length,\n\t line;\n\t for (; i < len; i++) {\n\t line = lines[i];\n\t // allow empty lines to pass through\n\t if (line && line.indexOf(indent) !== 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t}\n\n\n\tfunction Beautifier(source_text, options) {\n\t options = options || {};\n\t this._source_text = source_text || '';\n\n\t this._output = null;\n\t this._tokens = null;\n\t this._last_last_text = null;\n\t this._flags = null;\n\t this._previous_flags = null;\n\n\t this._flag_store = null;\n\t this._options = new Options(options);\n\t}\n\n\tBeautifier.prototype.create_flags = function(flags_base, mode) {\n\t var next_indent_level = 0;\n\t if (flags_base) {\n\t next_indent_level = flags_base.indentation_level;\n\t if (!this._output.just_added_newline() &&\n\t flags_base.line_indent_level > next_indent_level) {\n\t next_indent_level = flags_base.line_indent_level;\n\t }\n\t }\n\n\t var next_flags = {\n\t mode: mode,\n\t parent: flags_base,\n\t last_token: flags_base ? flags_base.last_token : new Token(TOKEN.START_BLOCK, ''), // last token text\n\t last_word: flags_base ? flags_base.last_word : '', // last TOKEN.WORD passed\n\t declaration_statement: false,\n\t declaration_assignment: false,\n\t multiline_frame: false,\n\t inline_frame: false,\n\t if_block: false,\n\t else_block: false,\n\t class_start_block: false, // class A { INSIDE HERE } or class B extends C { INSIDE HERE }\n\t do_block: false,\n\t do_while: false,\n\t import_block: false,\n\t in_case_statement: false, // switch(..){ INSIDE HERE }\n\t in_case: false, // we're on the exact line with \"case 0:\"\n\t case_body: false, // the indented case-action block\n\t case_block: false, // the indented case-action block is wrapped with {}\n\t indentation_level: next_indent_level,\n\t alignment: 0,\n\t line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level,\n\t start_line_index: this._output.get_line_number(),\n\t ternary_depth: 0\n\t };\n\t return next_flags;\n\t};\n\n\tBeautifier.prototype._reset = function(source_text) {\n\t var baseIndentString = source_text.match(/^[\\t ]*/)[0];\n\n\t this._last_last_text = ''; // pre-last token text\n\t this._output = new Output(this._options, baseIndentString);\n\n\t // If testing the ignore directive, start with output disable set to true\n\t this._output.raw = this._options.test_output_raw;\n\n\n\t // Stack of parsing/formatting states, including MODE.\n\t // We tokenize, parse, and output in an almost purely a forward-only stream of token input\n\t // and formatted output. This makes the beautifier less accurate than full parsers\n\t // but also far more tolerant of syntax errors.\n\t //\n\t // For example, the default mode is MODE.BlockStatement. If we see a '{' we push a new frame of type\n\t // MODE.BlockStatement on the the stack, even though it could be object literal. If we later\n\t // encounter a \":\", we'll switch to to MODE.ObjectLiteral. If we then see a \";\",\n\t // most full parsers would die, but the beautifier gracefully falls back to\n\t // MODE.BlockStatement and continues on.\n\t this._flag_store = [];\n\t this.set_mode(MODE.BlockStatement);\n\t var tokenizer = new Tokenizer(source_text, this._options);\n\t this._tokens = tokenizer.tokenize();\n\t return source_text;\n\t};\n\n\tBeautifier.prototype.beautify = function() {\n\t // if disabled, return the input unchanged.\n\t if (this._options.disabled) {\n\t return this._source_text;\n\t }\n\n\t var sweet_code;\n\t var source_text = this._reset(this._source_text);\n\n\t var eol = this._options.eol;\n\t if (this._options.eol === 'auto') {\n\t eol = '\\n';\n\t if (source_text && acorn.lineBreak.test(source_text || '')) {\n\t eol = source_text.match(acorn.lineBreak)[0];\n\t }\n\t }\n\n\t var current_token = this._tokens.next();\n\t while (current_token) {\n\t this.handle_token(current_token);\n\n\t this._last_last_text = this._flags.last_token.text;\n\t this._flags.last_token = current_token;\n\n\t current_token = this._tokens.next();\n\t }\n\n\t sweet_code = this._output.get_code(eol);\n\n\t return sweet_code;\n\t};\n\n\tBeautifier.prototype.handle_token = function(current_token, preserve_statement_flags) {\n\t if (current_token.type === TOKEN.START_EXPR) {\n\t this.handle_start_expr(current_token);\n\t } else if (current_token.type === TOKEN.END_EXPR) {\n\t this.handle_end_expr(current_token);\n\t } else if (current_token.type === TOKEN.START_BLOCK) {\n\t this.handle_start_block(current_token);\n\t } else if (current_token.type === TOKEN.END_BLOCK) {\n\t this.handle_end_block(current_token);\n\t } else if (current_token.type === TOKEN.WORD) {\n\t this.handle_word(current_token);\n\t } else if (current_token.type === TOKEN.RESERVED) {\n\t this.handle_word(current_token);\n\t } else if (current_token.type === TOKEN.SEMICOLON) {\n\t this.handle_semicolon(current_token);\n\t } else if (current_token.type === TOKEN.STRING) {\n\t this.handle_string(current_token);\n\t } else if (current_token.type === TOKEN.EQUALS) {\n\t this.handle_equals(current_token);\n\t } else if (current_token.type === TOKEN.OPERATOR) {\n\t this.handle_operator(current_token);\n\t } else if (current_token.type === TOKEN.COMMA) {\n\t this.handle_comma(current_token);\n\t } else if (current_token.type === TOKEN.BLOCK_COMMENT) {\n\t this.handle_block_comment(current_token, preserve_statement_flags);\n\t } else if (current_token.type === TOKEN.COMMENT) {\n\t this.handle_comment(current_token, preserve_statement_flags);\n\t } else if (current_token.type === TOKEN.DOT) {\n\t this.handle_dot(current_token);\n\t } else if (current_token.type === TOKEN.EOF) {\n\t this.handle_eof(current_token);\n\t } else if (current_token.type === TOKEN.UNKNOWN) {\n\t this.handle_unknown(current_token, preserve_statement_flags);\n\t } else {\n\t this.handle_unknown(current_token, preserve_statement_flags);\n\t }\n\t};\n\n\tBeautifier.prototype.handle_whitespace_and_comments = function(current_token, preserve_statement_flags) {\n\t var newlines = current_token.newlines;\n\t var keep_whitespace = this._options.keep_array_indentation && is_array(this._flags.mode);\n\n\t if (current_token.comments_before) {\n\t var comment_token = current_token.comments_before.next();\n\t while (comment_token) {\n\t // The cleanest handling of inline comments is to treat them as though they aren't there.\n\t // Just continue formatting and the behavior should be logical.\n\t // Also ignore unknown tokens. Again, this should result in better behavior.\n\t this.handle_whitespace_and_comments(comment_token, preserve_statement_flags);\n\t this.handle_token(comment_token, preserve_statement_flags);\n\t comment_token = current_token.comments_before.next();\n\t }\n\t }\n\n\t if (keep_whitespace) {\n\t for (var i = 0; i < newlines; i += 1) {\n\t this.print_newline(i > 0, preserve_statement_flags);\n\t }\n\t } else {\n\t if (this._options.max_preserve_newlines && newlines > this._options.max_preserve_newlines) {\n\t newlines = this._options.max_preserve_newlines;\n\t }\n\n\t if (this._options.preserve_newlines) {\n\t if (newlines > 1) {\n\t this.print_newline(false, preserve_statement_flags);\n\t for (var j = 1; j < newlines; j += 1) {\n\t this.print_newline(true, preserve_statement_flags);\n\t }\n\t }\n\t }\n\t }\n\n\t};\n\n\tvar newline_restricted_tokens = ['async', 'break', 'continue', 'return', 'throw', 'yield'];\n\n\tBeautifier.prototype.allow_wrap_or_preserved_newline = function(current_token, force_linewrap) {\n\t force_linewrap = (force_linewrap === undefined) ? false : force_linewrap;\n\n\t // Never wrap the first token on a line\n\t if (this._output.just_added_newline()) {\n\t return;\n\t }\n\n\t var shouldPreserveOrForce = (this._options.preserve_newlines && current_token.newlines) || force_linewrap;\n\t var operatorLogicApplies = in_array(this._flags.last_token.text, positionable_operators) ||\n\t in_array(current_token.text, positionable_operators);\n\n\t if (operatorLogicApplies) {\n\t var shouldPrintOperatorNewline = (\n\t in_array(this._flags.last_token.text, positionable_operators) &&\n\t in_array(this._options.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)\n\t ) ||\n\t in_array(current_token.text, positionable_operators);\n\t shouldPreserveOrForce = shouldPreserveOrForce && shouldPrintOperatorNewline;\n\t }\n\n\t if (shouldPreserveOrForce) {\n\t this.print_newline(false, true);\n\t } else if (this._options.wrap_line_length) {\n\t if (reserved_array(this._flags.last_token, newline_restricted_tokens)) {\n\t // These tokens should never have a newline inserted\n\t // between them and the following expression.\n\t return;\n\t }\n\t this._output.set_wrap_point();\n\t }\n\t};\n\n\tBeautifier.prototype.print_newline = function(force_newline, preserve_statement_flags) {\n\t if (!preserve_statement_flags) {\n\t if (this._flags.last_token.text !== ';' && this._flags.last_token.text !== ',' && this._flags.last_token.text !== '=' && (this._flags.last_token.type !== TOKEN.OPERATOR || this._flags.last_token.text === '--' || this._flags.last_token.text === '++')) {\n\t var next_token = this._tokens.peek();\n\t while (this._flags.mode === MODE.Statement &&\n\t !(this._flags.if_block && reserved_word(next_token, 'else')) &&\n\t !this._flags.do_block) {\n\t this.restore_mode();\n\t }\n\t }\n\t }\n\n\t if (this._output.add_new_line(force_newline)) {\n\t this._flags.multiline_frame = true;\n\t }\n\t};\n\n\tBeautifier.prototype.print_token_line_indentation = function(current_token) {\n\t if (this._output.just_added_newline()) {\n\t if (this._options.keep_array_indentation &&\n\t current_token.newlines &&\n\t (current_token.text === '[' || is_array(this._flags.mode))) {\n\t this._output.current_line.set_indent(-1);\n\t this._output.current_line.push(current_token.whitespace_before);\n\t this._output.space_before_token = false;\n\t } else if (this._output.set_indent(this._flags.indentation_level, this._flags.alignment)) {\n\t this._flags.line_indent_level = this._flags.indentation_level;\n\t }\n\t }\n\t};\n\n\tBeautifier.prototype.print_token = function(current_token) {\n\t if (this._output.raw) {\n\t this._output.add_raw_token(current_token);\n\t return;\n\t }\n\n\t if (this._options.comma_first && current_token.previous && current_token.previous.type === TOKEN.COMMA &&\n\t this._output.just_added_newline()) {\n\t if (this._output.previous_line.last() === ',') {\n\t var popped = this._output.previous_line.pop();\n\t // if the comma was already at the start of the line,\n\t // pull back onto that line and reprint the indentation\n\t if (this._output.previous_line.is_empty()) {\n\t this._output.previous_line.push(popped);\n\t this._output.trim(true);\n\t this._output.current_line.pop();\n\t this._output.trim();\n\t }\n\n\t // add the comma in front of the next token\n\t this.print_token_line_indentation(current_token);\n\t this._output.add_token(',');\n\t this._output.space_before_token = true;\n\t }\n\t }\n\n\t this.print_token_line_indentation(current_token);\n\t this._output.non_breaking_space = true;\n\t this._output.add_token(current_token.text);\n\t if (this._output.previous_token_wrapped) {\n\t this._flags.multiline_frame = true;\n\t }\n\t};\n\n\tBeautifier.prototype.indent = function() {\n\t this._flags.indentation_level += 1;\n\t this._output.set_indent(this._flags.indentation_level, this._flags.alignment);\n\t};\n\n\tBeautifier.prototype.deindent = function() {\n\t if (this._flags.indentation_level > 0 &&\n\t ((!this._flags.parent) || this._flags.indentation_level > this._flags.parent.indentation_level)) {\n\t this._flags.indentation_level -= 1;\n\t this._output.set_indent(this._flags.indentation_level, this._flags.alignment);\n\t }\n\t};\n\n\tBeautifier.prototype.set_mode = function(mode) {\n\t if (this._flags) {\n\t this._flag_store.push(this._flags);\n\t this._previous_flags = this._flags;\n\t } else {\n\t this._previous_flags = this.create_flags(null, mode);\n\t }\n\n\t this._flags = this.create_flags(this._previous_flags, mode);\n\t this._output.set_indent(this._flags.indentation_level, this._flags.alignment);\n\t};\n\n\n\tBeautifier.prototype.restore_mode = function() {\n\t if (this._flag_store.length > 0) {\n\t this._previous_flags = this._flags;\n\t this._flags = this._flag_store.pop();\n\t if (this._previous_flags.mode === MODE.Statement) {\n\t remove_redundant_indentation(this._output, this._previous_flags);\n\t }\n\t this._output.set_indent(this._flags.indentation_level, this._flags.alignment);\n\t }\n\t};\n\n\tBeautifier.prototype.start_of_object_property = function() {\n\t return this._flags.parent.mode === MODE.ObjectLiteral && this._flags.mode === MODE.Statement && (\n\t (this._flags.last_token.text === ':' && this._flags.ternary_depth === 0) || (reserved_array(this._flags.last_token, ['get', 'set'])));\n\t};\n\n\tBeautifier.prototype.start_of_statement = function(current_token) {\n\t var start = false;\n\t start = start || reserved_array(this._flags.last_token, ['var', 'let', 'const']) && current_token.type === TOKEN.WORD;\n\t start = start || reserved_word(this._flags.last_token, 'do');\n\t start = start || (!(this._flags.parent.mode === MODE.ObjectLiteral && this._flags.mode === MODE.Statement)) && reserved_array(this._flags.last_token, newline_restricted_tokens) && !current_token.newlines;\n\t start = start || reserved_word(this._flags.last_token, 'else') &&\n\t !(reserved_word(current_token, 'if') && !current_token.comments_before);\n\t start = start || (this._flags.last_token.type === TOKEN.END_EXPR && (this._previous_flags.mode === MODE.ForInitializer || this._previous_flags.mode === MODE.Conditional));\n\t start = start || (this._flags.last_token.type === TOKEN.WORD && this._flags.mode === MODE.BlockStatement &&\n\t !this._flags.in_case &&\n\t !(current_token.text === '--' || current_token.text === '++') &&\n\t this._last_last_text !== 'function' &&\n\t current_token.type !== TOKEN.WORD && current_token.type !== TOKEN.RESERVED);\n\t start = start || (this._flags.mode === MODE.ObjectLiteral && (\n\t (this._flags.last_token.text === ':' && this._flags.ternary_depth === 0) || reserved_array(this._flags.last_token, ['get', 'set'])));\n\n\t if (start) {\n\t this.set_mode(MODE.Statement);\n\t this.indent();\n\n\t this.handle_whitespace_and_comments(current_token, true);\n\n\t // Issue #276:\n\t // If starting a new statement with [if, for, while, do], push to a new line.\n\t // if (a) if (b) if(c) d(); else e(); else f();\n\t if (!this.start_of_object_property()) {\n\t this.allow_wrap_or_preserved_newline(current_token,\n\t reserved_array(current_token, ['do', 'for', 'if', 'while']));\n\t }\n\t return true;\n\t }\n\t return false;\n\t};\n\n\tBeautifier.prototype.handle_start_expr = function(current_token) {\n\t // The conditional starts the statement if appropriate.\n\t if (!this.start_of_statement(current_token)) {\n\t this.handle_whitespace_and_comments(current_token);\n\t }\n\n\t var next_mode = MODE.Expression;\n\t if (current_token.text === '[') {\n\n\t if (this._flags.last_token.type === TOKEN.WORD || this._flags.last_token.text === ')') {\n\t // this is array index specifier, break immediately\n\t // a[x], fn()[x]\n\t if (reserved_array(this._flags.last_token, line_starters)) {\n\t this._output.space_before_token = true;\n\t }\n\t this.print_token(current_token);\n\t this.set_mode(next_mode);\n\t this.indent();\n\t if (this._options.space_in_paren) {\n\t this._output.space_before_token = true;\n\t }\n\t return;\n\t }\n\n\t next_mode = MODE.ArrayLiteral;\n\t if (is_array(this._flags.mode)) {\n\t if (this._flags.last_token.text === '[' ||\n\t (this._flags.last_token.text === ',' && (this._last_last_text === ']' || this._last_last_text === '}'))) {\n\t // ], [ goes to new line\n\t // }, [ goes to new line\n\t if (!this._options.keep_array_indentation) {\n\t this.print_newline();\n\t }\n\t }\n\t }\n\n\t if (!in_array(this._flags.last_token.type, [TOKEN.START_EXPR, TOKEN.END_EXPR, TOKEN.WORD, TOKEN.OPERATOR, TOKEN.DOT])) {\n\t this._output.space_before_token = true;\n\t }\n\t } else {\n\t if (this._flags.last_token.type === TOKEN.RESERVED) {\n\t if (this._flags.last_token.text === 'for') {\n\t this._output.space_before_token = this._options.space_before_conditional;\n\t next_mode = MODE.ForInitializer;\n\t } else if (in_array(this._flags.last_token.text, ['if', 'while', 'switch'])) {\n\t this._output.space_before_token = this._options.space_before_conditional;\n\t next_mode = MODE.Conditional;\n\t } else if (in_array(this._flags.last_word, ['await', 'async'])) {\n\t // Should be a space between await and an IIFE, or async and an arrow function\n\t this._output.space_before_token = true;\n\t } else if (this._flags.last_token.text === 'import' && current_token.whitespace_before === '') {\n\t this._output.space_before_token = false;\n\t } else if (in_array(this._flags.last_token.text, line_starters) || this._flags.last_token.text === 'catch') {\n\t this._output.space_before_token = true;\n\t }\n\t } else if (this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) {\n\t // Support of this kind of newline preservation.\n\t // a = (b &&\n\t // (c || d));\n\t if (!this.start_of_object_property()) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\t } else if (this._flags.last_token.type === TOKEN.WORD) {\n\t this._output.space_before_token = false;\n\n\t // function name() vs function name ()\n\t // function* name() vs function* name ()\n\t // async name() vs async name ()\n\t // In ES6, you can also define the method properties of an object\n\t // var obj = {a: function() {}}\n\t // It can be abbreviated\n\t // var obj = {a() {}}\n\t // var obj = { a() {}} vs var obj = { a () {}}\n\t // var obj = { * a() {}} vs var obj = { * a () {}}\n\t var peek_back_two = this._tokens.peek(-3);\n\t if (this._options.space_after_named_function && peek_back_two) {\n\t // peek starts at next character so -1 is current token\n\t var peek_back_three = this._tokens.peek(-4);\n\t if (reserved_array(peek_back_two, ['async', 'function']) ||\n\t (peek_back_two.text === '*' && reserved_array(peek_back_three, ['async', 'function']))) {\n\t this._output.space_before_token = true;\n\t } else if (this._flags.mode === MODE.ObjectLiteral) {\n\t if ((peek_back_two.text === '{' || peek_back_two.text === ',') ||\n\t (peek_back_two.text === '*' && (peek_back_three.text === '{' || peek_back_three.text === ','))) {\n\t this._output.space_before_token = true;\n\t }\n\t } else if (this._flags.parent && this._flags.parent.class_start_block) {\n\t this._output.space_before_token = true;\n\t }\n\t }\n\t } else {\n\t // Support preserving wrapped arrow function expressions\n\t // a.b('c',\n\t // () => d.e\n\t // )\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\n\t // function() vs function ()\n\t // yield*() vs yield* ()\n\t // function*() vs function* ()\n\t if ((this._flags.last_token.type === TOKEN.RESERVED && (this._flags.last_word === 'function' || this._flags.last_word === 'typeof')) ||\n\t (this._flags.last_token.text === '*' &&\n\t (in_array(this._last_last_text, ['function', 'yield']) ||\n\t (this._flags.mode === MODE.ObjectLiteral && in_array(this._last_last_text, ['{', ',']))))) {\n\t this._output.space_before_token = this._options.space_after_anon_function;\n\t }\n\t }\n\n\t if (this._flags.last_token.text === ';' || this._flags.last_token.type === TOKEN.START_BLOCK) {\n\t this.print_newline();\n\t } else if (this._flags.last_token.type === TOKEN.END_EXPR || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.END_BLOCK || this._flags.last_token.text === '.' || this._flags.last_token.type === TOKEN.COMMA) {\n\t // do nothing on (( and )( and ][ and ]( and .(\n\t // TODO: Consider whether forcing this is required. Review failing tests when removed.\n\t this.allow_wrap_or_preserved_newline(current_token, current_token.newlines);\n\t }\n\n\t this.print_token(current_token);\n\t this.set_mode(next_mode);\n\t if (this._options.space_in_paren) {\n\t this._output.space_before_token = true;\n\t }\n\n\t // In all cases, if we newline while inside an expression it should be indented.\n\t this.indent();\n\t};\n\n\tBeautifier.prototype.handle_end_expr = function(current_token) {\n\t // statements inside expressions are not valid syntax, but...\n\t // statements must all be closed when their container closes\n\t while (this._flags.mode === MODE.Statement) {\n\t this.restore_mode();\n\t }\n\n\t this.handle_whitespace_and_comments(current_token);\n\n\t if (this._flags.multiline_frame) {\n\t this.allow_wrap_or_preserved_newline(current_token,\n\t current_token.text === ']' && is_array(this._flags.mode) && !this._options.keep_array_indentation);\n\t }\n\n\t if (this._options.space_in_paren) {\n\t if (this._flags.last_token.type === TOKEN.START_EXPR && !this._options.space_in_empty_paren) {\n\t // () [] no inner space in empty parens like these, ever, ref #320\n\t this._output.trim();\n\t this._output.space_before_token = false;\n\t } else {\n\t this._output.space_before_token = true;\n\t }\n\t }\n\t this.deindent();\n\t this.print_token(current_token);\n\t this.restore_mode();\n\n\t remove_redundant_indentation(this._output, this._previous_flags);\n\n\t // do {} while () // no statement required after\n\t if (this._flags.do_while && this._previous_flags.mode === MODE.Conditional) {\n\t this._previous_flags.mode = MODE.Expression;\n\t this._flags.do_block = false;\n\t this._flags.do_while = false;\n\n\t }\n\t};\n\n\tBeautifier.prototype.handle_start_block = function(current_token) {\n\t this.handle_whitespace_and_comments(current_token);\n\n\t // Check if this is should be treated as a ObjectLiteral\n\t var next_token = this._tokens.peek();\n\t var second_token = this._tokens.peek(1);\n\t if (this._flags.last_word === 'switch' && this._flags.last_token.type === TOKEN.END_EXPR) {\n\t this.set_mode(MODE.BlockStatement);\n\t this._flags.in_case_statement = true;\n\t } else if (this._flags.case_body) {\n\t this.set_mode(MODE.BlockStatement);\n\t } else if (second_token && (\n\t (in_array(second_token.text, [':', ',']) && in_array(next_token.type, [TOKEN.STRING, TOKEN.WORD, TOKEN.RESERVED])) ||\n\t (in_array(next_token.text, ['get', 'set', '...']) && in_array(second_token.type, [TOKEN.WORD, TOKEN.RESERVED]))\n\t )) {\n\t // We don't support TypeScript,but we didn't break it for a very long time.\n\t // We'll try to keep not breaking it.\n\t if (in_array(this._last_last_text, ['class', 'interface']) && !in_array(second_token.text, [':', ','])) {\n\t this.set_mode(MODE.BlockStatement);\n\t } else {\n\t this.set_mode(MODE.ObjectLiteral);\n\t }\n\t } else if (this._flags.last_token.type === TOKEN.OPERATOR && this._flags.last_token.text === '=>') {\n\t // arrow function: (param1, paramN) => { statements }\n\t this.set_mode(MODE.BlockStatement);\n\t } else if (in_array(this._flags.last_token.type, [TOKEN.EQUALS, TOKEN.START_EXPR, TOKEN.COMMA, TOKEN.OPERATOR]) ||\n\t reserved_array(this._flags.last_token, ['return', 'throw', 'import', 'default'])\n\t ) {\n\t // Detecting shorthand function syntax is difficult by scanning forward,\n\t // so check the surrounding context.\n\t // If the block is being returned, imported, export default, passed as arg,\n\t // assigned with = or assigned in a nested object, treat as an ObjectLiteral.\n\t this.set_mode(MODE.ObjectLiteral);\n\t } else {\n\t this.set_mode(MODE.BlockStatement);\n\t }\n\n\t if (this._flags.last_token) {\n\t if (reserved_array(this._flags.last_token.previous, ['class', 'extends'])) {\n\t this._flags.class_start_block = true;\n\t }\n\t }\n\n\t var empty_braces = !next_token.comments_before && next_token.text === '}';\n\t var empty_anonymous_function = empty_braces && this._flags.last_word === 'function' &&\n\t this._flags.last_token.type === TOKEN.END_EXPR;\n\n\t if (this._options.brace_preserve_inline) // check for inline, set inline_frame if so\n\t {\n\t // search forward for a newline wanted inside this block\n\t var index = 0;\n\t var check_token = null;\n\t this._flags.inline_frame = true;\n\t do {\n\t index += 1;\n\t check_token = this._tokens.peek(index - 1);\n\t if (check_token.newlines) {\n\t this._flags.inline_frame = false;\n\t break;\n\t }\n\t } while (check_token.type !== TOKEN.EOF &&\n\t !(check_token.type === TOKEN.END_BLOCK && check_token.opened === current_token));\n\t }\n\n\t if ((this._options.brace_style === \"expand\" ||\n\t (this._options.brace_style === \"none\" && current_token.newlines)) &&\n\t !this._flags.inline_frame) {\n\t if (this._flags.last_token.type !== TOKEN.OPERATOR &&\n\t (empty_anonymous_function ||\n\t this._flags.last_token.type === TOKEN.EQUALS ||\n\t (reserved_array(this._flags.last_token, special_words) && this._flags.last_token.text !== 'else'))) {\n\t this._output.space_before_token = true;\n\t } else {\n\t this.print_newline(false, true);\n\t }\n\t } else { // collapse || inline_frame\n\t if (is_array(this._previous_flags.mode) && (this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.COMMA)) {\n\t if (this._flags.last_token.type === TOKEN.COMMA || this._options.space_in_paren) {\n\t this._output.space_before_token = true;\n\t }\n\n\t if (this._flags.last_token.type === TOKEN.COMMA || (this._flags.last_token.type === TOKEN.START_EXPR && this._flags.inline_frame)) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame;\n\t this._flags.multiline_frame = false;\n\t }\n\t }\n\t if (this._flags.last_token.type !== TOKEN.OPERATOR && this._flags.last_token.type !== TOKEN.START_EXPR) {\n\t if (this._flags.last_token.type === TOKEN.START_BLOCK && !this._flags.inline_frame) {\n\t this.print_newline();\n\t } else {\n\t this._output.space_before_token = true;\n\t }\n\t }\n\t }\n\t this.print_token(current_token);\n\t this.indent();\n\n\t // Except for specific cases, open braces are followed by a new line.\n\t if (!empty_braces && !(this._options.brace_preserve_inline && this._flags.inline_frame)) {\n\t this.print_newline();\n\t }\n\t};\n\n\tBeautifier.prototype.handle_end_block = function(current_token) {\n\t // statements must all be closed when their container closes\n\t this.handle_whitespace_and_comments(current_token);\n\n\t while (this._flags.mode === MODE.Statement) {\n\t this.restore_mode();\n\t }\n\n\t var empty_braces = this._flags.last_token.type === TOKEN.START_BLOCK;\n\n\t if (this._flags.inline_frame && !empty_braces) { // try inline_frame (only set if this._options.braces-preserve-inline) first\n\t this._output.space_before_token = true;\n\t } else if (this._options.brace_style === \"expand\") {\n\t if (!empty_braces) {\n\t this.print_newline();\n\t }\n\t } else {\n\t // skip {}\n\t if (!empty_braces) {\n\t if (is_array(this._flags.mode) && this._options.keep_array_indentation) {\n\t // we REALLY need a newline here, but newliner would skip that\n\t this._options.keep_array_indentation = false;\n\t this.print_newline();\n\t this._options.keep_array_indentation = true;\n\n\t } else {\n\t this.print_newline();\n\t }\n\t }\n\t }\n\t this.restore_mode();\n\t this.print_token(current_token);\n\t};\n\n\tBeautifier.prototype.handle_word = function(current_token) {\n\t if (current_token.type === TOKEN.RESERVED) {\n\t if (in_array(current_token.text, ['set', 'get']) && this._flags.mode !== MODE.ObjectLiteral) {\n\t current_token.type = TOKEN.WORD;\n\t } else if (current_token.text === 'import' && in_array(this._tokens.peek().text, ['(', '.'])) {\n\t current_token.type = TOKEN.WORD;\n\t } else if (in_array(current_token.text, ['as', 'from']) && !this._flags.import_block) {\n\t current_token.type = TOKEN.WORD;\n\t } else if (this._flags.mode === MODE.ObjectLiteral) {\n\t var next_token = this._tokens.peek();\n\t if (next_token.text === ':') {\n\t current_token.type = TOKEN.WORD;\n\t }\n\t }\n\t }\n\n\t if (this.start_of_statement(current_token)) {\n\t // The conditional starts the statement if appropriate.\n\t if (reserved_array(this._flags.last_token, ['var', 'let', 'const']) && current_token.type === TOKEN.WORD) {\n\t this._flags.declaration_statement = true;\n\t }\n\t } else if (current_token.newlines && !is_expression(this._flags.mode) &&\n\t (this._flags.last_token.type !== TOKEN.OPERATOR || (this._flags.last_token.text === '--' || this._flags.last_token.text === '++')) &&\n\t this._flags.last_token.type !== TOKEN.EQUALS &&\n\t (this._options.preserve_newlines || !reserved_array(this._flags.last_token, ['var', 'let', 'const', 'set', 'get']))) {\n\t this.handle_whitespace_and_comments(current_token);\n\t this.print_newline();\n\t } else {\n\t this.handle_whitespace_and_comments(current_token);\n\t }\n\n\t if (this._flags.do_block && !this._flags.do_while) {\n\t if (reserved_word(current_token, 'while')) {\n\t // do {} ## while ()\n\t this._output.space_before_token = true;\n\t this.print_token(current_token);\n\t this._output.space_before_token = true;\n\t this._flags.do_while = true;\n\t return;\n\t } else {\n\t // do {} should always have while as the next word.\n\t // if we don't see the expected while, recover\n\t this.print_newline();\n\t this._flags.do_block = false;\n\t }\n\t }\n\n\t // if may be followed by else, or not\n\t // Bare/inline ifs are tricky\n\t // Need to unwind the modes correctly: if (a) if (b) c(); else d(); else e();\n\t if (this._flags.if_block) {\n\t if (!this._flags.else_block && reserved_word(current_token, 'else')) {\n\t this._flags.else_block = true;\n\t } else {\n\t while (this._flags.mode === MODE.Statement) {\n\t this.restore_mode();\n\t }\n\t this._flags.if_block = false;\n\t this._flags.else_block = false;\n\t }\n\t }\n\n\t if (this._flags.in_case_statement && reserved_array(current_token, ['case', 'default'])) {\n\t this.print_newline();\n\t if (!this._flags.case_block && (this._flags.case_body || this._options.jslint_happy)) {\n\t // switch cases following one another\n\t this.deindent();\n\t }\n\t this._flags.case_body = false;\n\n\t this.print_token(current_token);\n\t this._flags.in_case = true;\n\t return;\n\t }\n\n\t if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) {\n\t if (!this.start_of_object_property()) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\t }\n\n\t if (reserved_word(current_token, 'function')) {\n\t if (in_array(this._flags.last_token.text, ['}', ';']) ||\n\t (this._output.just_added_newline() && !(in_array(this._flags.last_token.text, ['(', '[', '{', ':', '=', ',']) || this._flags.last_token.type === TOKEN.OPERATOR))) {\n\t // make sure there is a nice clean space of at least one blank line\n\t // before a new function definition\n\t if (!this._output.just_added_blankline() && !current_token.comments_before) {\n\t this.print_newline();\n\t this.print_newline(true);\n\t }\n\t }\n\t if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD) {\n\t if (reserved_array(this._flags.last_token, ['get', 'set', 'new', 'export']) ||\n\t reserved_array(this._flags.last_token, newline_restricted_tokens)) {\n\t this._output.space_before_token = true;\n\t } else if (reserved_word(this._flags.last_token, 'default') && this._last_last_text === 'export') {\n\t this._output.space_before_token = true;\n\t } else if (this._flags.last_token.text === 'declare') {\n\t // accomodates Typescript declare function formatting\n\t this._output.space_before_token = true;\n\t } else {\n\t this.print_newline();\n\t }\n\t } else if (this._flags.last_token.type === TOKEN.OPERATOR || this._flags.last_token.text === '=') {\n\t // foo = function\n\t this._output.space_before_token = true;\n\t } else if (!this._flags.multiline_frame && (is_expression(this._flags.mode) || is_array(this._flags.mode))) ; else {\n\t this.print_newline();\n\t }\n\n\t this.print_token(current_token);\n\t this._flags.last_word = current_token.text;\n\t return;\n\t }\n\n\t var prefix = 'NONE';\n\n\t if (this._flags.last_token.type === TOKEN.END_BLOCK) {\n\n\t if (this._previous_flags.inline_frame) {\n\t prefix = 'SPACE';\n\t } else if (!reserved_array(current_token, ['else', 'catch', 'finally', 'from'])) {\n\t prefix = 'NEWLINE';\n\t } else {\n\t if (this._options.brace_style === \"expand\" ||\n\t this._options.brace_style === \"end-expand\" ||\n\t (this._options.brace_style === \"none\" && current_token.newlines)) {\n\t prefix = 'NEWLINE';\n\t } else {\n\t prefix = 'SPACE';\n\t this._output.space_before_token = true;\n\t }\n\t }\n\t } else if (this._flags.last_token.type === TOKEN.SEMICOLON && this._flags.mode === MODE.BlockStatement) {\n\t // TODO: Should this be for STATEMENT as well?\n\t prefix = 'NEWLINE';\n\t } else if (this._flags.last_token.type === TOKEN.SEMICOLON && is_expression(this._flags.mode)) {\n\t prefix = 'SPACE';\n\t } else if (this._flags.last_token.type === TOKEN.STRING) {\n\t prefix = 'NEWLINE';\n\t } else if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD ||\n\t (this._flags.last_token.text === '*' &&\n\t (in_array(this._last_last_text, ['function', 'yield']) ||\n\t (this._flags.mode === MODE.ObjectLiteral && in_array(this._last_last_text, ['{', ',']))))) {\n\t prefix = 'SPACE';\n\t } else if (this._flags.last_token.type === TOKEN.START_BLOCK) {\n\t if (this._flags.inline_frame) {\n\t prefix = 'SPACE';\n\t } else {\n\t prefix = 'NEWLINE';\n\t }\n\t } else if (this._flags.last_token.type === TOKEN.END_EXPR) {\n\t this._output.space_before_token = true;\n\t prefix = 'NEWLINE';\n\t }\n\n\t if (reserved_array(current_token, line_starters) && this._flags.last_token.text !== ')') {\n\t if (this._flags.inline_frame || this._flags.last_token.text === 'else' || this._flags.last_token.text === 'export') {\n\t prefix = 'SPACE';\n\t } else {\n\t prefix = 'NEWLINE';\n\t }\n\n\t }\n\n\t if (reserved_array(current_token, ['else', 'catch', 'finally'])) {\n\t if ((!(this._flags.last_token.type === TOKEN.END_BLOCK && this._previous_flags.mode === MODE.BlockStatement) ||\n\t this._options.brace_style === \"expand\" ||\n\t this._options.brace_style === \"end-expand\" ||\n\t (this._options.brace_style === \"none\" && current_token.newlines)) &&\n\t !this._flags.inline_frame) {\n\t this.print_newline();\n\t } else {\n\t this._output.trim(true);\n\t var line = this._output.current_line;\n\t // If we trimmed and there's something other than a close block before us\n\t // put a newline back in. Handles '} // comment' scenario.\n\t if (line.last() !== '}') {\n\t this.print_newline();\n\t }\n\t this._output.space_before_token = true;\n\t }\n\t } else if (prefix === 'NEWLINE') {\n\t if (reserved_array(this._flags.last_token, special_words)) {\n\t // no newline between 'return nnn'\n\t this._output.space_before_token = true;\n\t } else if (this._flags.last_token.text === 'declare' && reserved_array(current_token, ['var', 'let', 'const'])) {\n\t // accomodates Typescript declare formatting\n\t this._output.space_before_token = true;\n\t } else if (this._flags.last_token.type !== TOKEN.END_EXPR) {\n\t if ((this._flags.last_token.type !== TOKEN.START_EXPR || !reserved_array(current_token, ['var', 'let', 'const'])) && this._flags.last_token.text !== ':') {\n\t // no need to force newline on 'var': for (var x = 0...)\n\t if (reserved_word(current_token, 'if') && reserved_word(current_token.previous, 'else')) {\n\t // no newline for } else if {\n\t this._output.space_before_token = true;\n\t } else {\n\t this.print_newline();\n\t }\n\t }\n\t } else if (reserved_array(current_token, line_starters) && this._flags.last_token.text !== ')') {\n\t this.print_newline();\n\t }\n\t } else if (this._flags.multiline_frame && is_array(this._flags.mode) && this._flags.last_token.text === ',' && this._last_last_text === '}') {\n\t this.print_newline(); // }, in lists get a newline treatment\n\t } else if (prefix === 'SPACE') {\n\t this._output.space_before_token = true;\n\t }\n\t if (current_token.previous && (current_token.previous.type === TOKEN.WORD || current_token.previous.type === TOKEN.RESERVED)) {\n\t this._output.space_before_token = true;\n\t }\n\t this.print_token(current_token);\n\t this._flags.last_word = current_token.text;\n\n\t if (current_token.type === TOKEN.RESERVED) {\n\t if (current_token.text === 'do') {\n\t this._flags.do_block = true;\n\t } else if (current_token.text === 'if') {\n\t this._flags.if_block = true;\n\t } else if (current_token.text === 'import') {\n\t this._flags.import_block = true;\n\t } else if (this._flags.import_block && reserved_word(current_token, 'from')) {\n\t this._flags.import_block = false;\n\t }\n\t }\n\t};\n\n\tBeautifier.prototype.handle_semicolon = function(current_token) {\n\t if (this.start_of_statement(current_token)) {\n\t // The conditional starts the statement if appropriate.\n\t // Semicolon can be the start (and end) of a statement\n\t this._output.space_before_token = false;\n\t } else {\n\t this.handle_whitespace_and_comments(current_token);\n\t }\n\n\t var next_token = this._tokens.peek();\n\t while (this._flags.mode === MODE.Statement &&\n\t !(this._flags.if_block && reserved_word(next_token, 'else')) &&\n\t !this._flags.do_block) {\n\t this.restore_mode();\n\t }\n\n\t // hacky but effective for the moment\n\t if (this._flags.import_block) {\n\t this._flags.import_block = false;\n\t }\n\t this.print_token(current_token);\n\t};\n\n\tBeautifier.prototype.handle_string = function(current_token) {\n\t if (current_token.text.startsWith(\"`\") && current_token.newlines === 0 && current_token.whitespace_before === '' && (current_token.previous.text === ')' || this._flags.last_token.type === TOKEN.WORD)) ; else if (this.start_of_statement(current_token)) {\n\t // The conditional starts the statement if appropriate.\n\t // One difference - strings want at least a space before\n\t this._output.space_before_token = true;\n\t } else {\n\t this.handle_whitespace_and_comments(current_token);\n\t if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD || this._flags.inline_frame) {\n\t this._output.space_before_token = true;\n\t } else if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) {\n\t if (!this.start_of_object_property()) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\t } else if ((current_token.text.startsWith(\"`\") && this._flags.last_token.type === TOKEN.END_EXPR && (current_token.previous.text === ']' || current_token.previous.text === ')') && current_token.newlines === 0)) {\n\t this._output.space_before_token = true;\n\t } else {\n\t this.print_newline();\n\t }\n\t }\n\t this.print_token(current_token);\n\t};\n\n\tBeautifier.prototype.handle_equals = function(current_token) {\n\t if (this.start_of_statement(current_token)) ; else {\n\t this.handle_whitespace_and_comments(current_token);\n\t }\n\n\t if (this._flags.declaration_statement) {\n\t // just got an '=' in a var-line, different formatting/line-breaking, etc will now be done\n\t this._flags.declaration_assignment = true;\n\t }\n\t this._output.space_before_token = true;\n\t this.print_token(current_token);\n\t this._output.space_before_token = true;\n\t};\n\n\tBeautifier.prototype.handle_comma = function(current_token) {\n\t this.handle_whitespace_and_comments(current_token, true);\n\n\t this.print_token(current_token);\n\t this._output.space_before_token = true;\n\t if (this._flags.declaration_statement) {\n\t if (is_expression(this._flags.parent.mode)) {\n\t // do not break on comma, for(var a = 1, b = 2)\n\t this._flags.declaration_assignment = false;\n\t }\n\n\t if (this._flags.declaration_assignment) {\n\t this._flags.declaration_assignment = false;\n\t this.print_newline(false, true);\n\t } else if (this._options.comma_first) {\n\t // for comma-first, we want to allow a newline before the comma\n\t // to turn into a newline after the comma, which we will fixup later\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\t } else if (this._flags.mode === MODE.ObjectLiteral ||\n\t (this._flags.mode === MODE.Statement && this._flags.parent.mode === MODE.ObjectLiteral)) {\n\t if (this._flags.mode === MODE.Statement) {\n\t this.restore_mode();\n\t }\n\n\t if (!this._flags.inline_frame) {\n\t this.print_newline();\n\t }\n\t } else if (this._options.comma_first) {\n\t // EXPR or DO_BLOCK\n\t // for comma-first, we want to allow a newline before the comma\n\t // to turn into a newline after the comma, which we will fixup later\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\t};\n\n\tBeautifier.prototype.handle_operator = function(current_token) {\n\t var isGeneratorAsterisk = current_token.text === '*' &&\n\t (reserved_array(this._flags.last_token, ['function', 'yield']) ||\n\t (in_array(this._flags.last_token.type, [TOKEN.START_BLOCK, TOKEN.COMMA, TOKEN.END_BLOCK, TOKEN.SEMICOLON]))\n\t );\n\t var isUnary = in_array(current_token.text, ['-', '+']) && (\n\t in_array(this._flags.last_token.type, [TOKEN.START_BLOCK, TOKEN.START_EXPR, TOKEN.EQUALS, TOKEN.OPERATOR]) ||\n\t in_array(this._flags.last_token.text, line_starters) ||\n\t this._flags.last_token.text === ','\n\t );\n\n\t if (this.start_of_statement(current_token)) ; else {\n\t var preserve_statement_flags = !isGeneratorAsterisk;\n\t this.handle_whitespace_and_comments(current_token, preserve_statement_flags);\n\t }\n\n\t // hack for actionscript's import .*;\n\t if (current_token.text === '*' && this._flags.last_token.type === TOKEN.DOT) {\n\t this.print_token(current_token);\n\t return;\n\t }\n\n\t if (current_token.text === '::') {\n\t // no spaces around exotic namespacing syntax operator\n\t this.print_token(current_token);\n\t return;\n\t }\n\n\t // Allow line wrapping between operators when operator_position is\n\t // set to before or preserve\n\t if (this._flags.last_token.type === TOKEN.OPERATOR && in_array(this._options.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\n\t if (current_token.text === ':' && this._flags.in_case) {\n\t this.print_token(current_token);\n\n\t this._flags.in_case = false;\n\t this._flags.case_body = true;\n\t if (this._tokens.peek().type !== TOKEN.START_BLOCK) {\n\t this.indent();\n\t this.print_newline();\n\t this._flags.case_block = false;\n\t } else {\n\t this._flags.case_block = true;\n\t this._output.space_before_token = true;\n\t }\n\t return;\n\t }\n\n\t var space_before = true;\n\t var space_after = true;\n\t var in_ternary = false;\n\t if (current_token.text === ':') {\n\t if (this._flags.ternary_depth === 0) {\n\t // Colon is invalid javascript outside of ternary and object, but do our best to guess what was meant.\n\t space_before = false;\n\t } else {\n\t this._flags.ternary_depth -= 1;\n\t in_ternary = true;\n\t }\n\t } else if (current_token.text === '?') {\n\t this._flags.ternary_depth += 1;\n\t }\n\n\t // let's handle the operator_position option prior to any conflicting logic\n\t if (!isUnary && !isGeneratorAsterisk && this._options.preserve_newlines && in_array(current_token.text, positionable_operators)) {\n\t var isColon = current_token.text === ':';\n\t var isTernaryColon = (isColon && in_ternary);\n\t var isOtherColon = (isColon && !in_ternary);\n\n\t switch (this._options.operator_position) {\n\t case OPERATOR_POSITION.before_newline:\n\t // if the current token is : and it's not a ternary statement then we set space_before to false\n\t this._output.space_before_token = !isOtherColon;\n\n\t this.print_token(current_token);\n\n\t if (!isColon || isTernaryColon) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\n\t this._output.space_before_token = true;\n\t return;\n\n\t case OPERATOR_POSITION.after_newline:\n\t // if the current token is anything but colon, or (via deduction) it's a colon and in a ternary statement,\n\t // then print a newline.\n\n\t this._output.space_before_token = true;\n\n\t if (!isColon || isTernaryColon) {\n\t if (this._tokens.peek().newlines) {\n\t this.print_newline(false, true);\n\t } else {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\t } else {\n\t this._output.space_before_token = false;\n\t }\n\n\t this.print_token(current_token);\n\n\t this._output.space_before_token = true;\n\t return;\n\n\t case OPERATOR_POSITION.preserve_newline:\n\t if (!isOtherColon) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\n\t // if we just added a newline, or the current token is : and it's not a ternary statement,\n\t // then we set space_before to false\n\t space_before = !(this._output.just_added_newline() || isOtherColon);\n\n\t this._output.space_before_token = space_before;\n\t this.print_token(current_token);\n\t this._output.space_before_token = true;\n\t return;\n\t }\n\t }\n\n\t if (isGeneratorAsterisk) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t space_before = false;\n\t var next_token = this._tokens.peek();\n\t space_after = next_token && in_array(next_token.type, [TOKEN.WORD, TOKEN.RESERVED]);\n\t } else if (current_token.text === '...') {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t space_before = this._flags.last_token.type === TOKEN.START_BLOCK;\n\t space_after = false;\n\t } else if (in_array(current_token.text, ['--', '++', '!', '~']) || isUnary) {\n\t // unary operators (and binary +/- pretending to be unary) special cases\n\t if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR) {\n\t this.allow_wrap_or_preserved_newline(current_token);\n\t }\n\n\t space_before = false;\n\t space_after = false;\n\n\t // http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1\n\t // if there is a newline between -- or ++ and anything else we should preserve it.\n\t if (current_token.newlines && (current_token.text === '--' || current_token.text === '++' || current_token.text === '~')) {\n\t var new_line_needed = reserved_array(this._flags.last_token, special_words) && current_token.newlines;\n\t if (new_line_needed && (this._previous_flags.if_block || this._previous_flags.else_block)) {\n\t this.restore_mode();\n\t }\n\t this.print_newline(new_line_needed, true);\n\t }\n\n\t if (this._flags.last_token.text === ';' && is_expression(this._flags.mode)) {\n\t // for (;; ++i)\n\t // ^^^\n\t space_before = true;\n\t }\n\n\t if (this._flags.last_token.type === TOKEN.RESERVED) {\n\t space_before = true;\n\t } else if (this._flags.last_token.type === TOKEN.END_EXPR) {\n\t space_before = !(this._flags.last_token.text === ']' && (current_token.text === '--' || current_token.text === '++'));\n\t } else if (this._flags.last_token.type === TOKEN.OPERATOR) {\n\t // a++ + ++b;\n\t // a - -b\n\t space_before = in_array(current_token.text, ['--', '-', '++', '+']) && in_array(this._flags.last_token.text, ['--', '-', '++', '+']);\n\t // + and - are not unary when preceeded by -- or ++ operator\n\t // a-- + b\n\t // a * +b\n\t // a - -b\n\t if (in_array(current_token.text, ['+', '-']) && in_array(this._flags.last_token.text, ['--', '++'])) {\n\t space_after = true;\n\t }\n\t }\n\n\n\t if (((this._flags.mode === MODE.BlockStatement && !this._flags.inline_frame) || this._flags.mode === MODE.Statement) &&\n\t (this._flags.last_token.text === '{' || this._flags.last_token.text === ';')) {\n\t // { foo; --i }\n\t // foo(); --bar;\n\t this.print_newline();\n\t }\n\t }\n\n\t this._output.space_before_token = this._output.space_before_token || space_before;\n\t this.print_token(current_token);\n\t this._output.space_before_token = space_after;\n\t};\n\n\tBeautifier.prototype.handle_block_comment = function(current_token, preserve_statement_flags) {\n\t if (this._output.raw) {\n\t this._output.add_raw_token(current_token);\n\t if (current_token.directives && current_token.directives.preserve === 'end') {\n\t // If we're testing the raw output behavior, do not allow a directive to turn it off.\n\t this._output.raw = this._options.test_output_raw;\n\t }\n\t return;\n\t }\n\n\t if (current_token.directives) {\n\t this.print_newline(false, preserve_statement_flags);\n\t this.print_token(current_token);\n\t if (current_token.directives.preserve === 'start') {\n\t this._output.raw = true;\n\t }\n\t this.print_newline(false, true);\n\t return;\n\t }\n\n\t // inline block\n\t if (!acorn.newline.test(current_token.text) && !current_token.newlines) {\n\t this._output.space_before_token = true;\n\t this.print_token(current_token);\n\t this._output.space_before_token = true;\n\t return;\n\t } else {\n\t this.print_block_commment(current_token, preserve_statement_flags);\n\t }\n\t};\n\n\tBeautifier.prototype.print_block_commment = function(current_token, preserve_statement_flags) {\n\t var lines = split_linebreaks(current_token.text);\n\t var j; // iterator for this case\n\t var javadoc = false;\n\t var starless = false;\n\t var lastIndent = current_token.whitespace_before;\n\t var lastIndentLength = lastIndent.length;\n\n\t // block comment starts with a new line\n\t this.print_newline(false, preserve_statement_flags);\n\n\t // first line always indented\n\t this.print_token_line_indentation(current_token);\n\t this._output.add_token(lines[0]);\n\t this.print_newline(false, preserve_statement_flags);\n\n\n\t if (lines.length > 1) {\n\t lines = lines.slice(1);\n\t javadoc = all_lines_start_with(lines, '*');\n\t starless = each_line_matches_indent(lines, lastIndent);\n\n\t if (javadoc) {\n\t this._flags.alignment = 1;\n\t }\n\n\t for (j = 0; j < lines.length; j++) {\n\t if (javadoc) {\n\t // javadoc: reformat and re-indent\n\t this.print_token_line_indentation(current_token);\n\t this._output.add_token(ltrim(lines[j]));\n\t } else if (starless && lines[j]) {\n\t // starless: re-indent non-empty content, avoiding trim\n\t this.print_token_line_indentation(current_token);\n\t this._output.add_token(lines[j].substring(lastIndentLength));\n\t } else {\n\t // normal comments output raw\n\t this._output.current_line.set_indent(-1);\n\t this._output.add_token(lines[j]);\n\t }\n\n\t // for comments on their own line or more than one line, make sure there's a new line after\n\t this.print_newline(false, preserve_statement_flags);\n\t }\n\n\t this._flags.alignment = 0;\n\t }\n\t};\n\n\n\tBeautifier.prototype.handle_comment = function(current_token, preserve_statement_flags) {\n\t if (current_token.newlines) {\n\t this.print_newline(false, preserve_statement_flags);\n\t } else {\n\t this._output.trim(true);\n\t }\n\n\t this._output.space_before_token = true;\n\t this.print_token(current_token);\n\t this.print_newline(false, preserve_statement_flags);\n\t};\n\n\tBeautifier.prototype.handle_dot = function(current_token) {\n\t if (this.start_of_statement(current_token)) ; else {\n\t this.handle_whitespace_and_comments(current_token, true);\n\t }\n\n\t if (this._flags.last_token.text.match('^[0-9]+$')) {\n\t this._output.space_before_token = true;\n\t }\n\n\t if (reserved_array(this._flags.last_token, special_words)) {\n\t this._output.space_before_token = false;\n\t } else {\n\t // allow preserved newlines before dots in general\n\t // force newlines on dots after close paren when break_chained - for bar().baz()\n\t this.allow_wrap_or_preserved_newline(current_token,\n\t this._flags.last_token.text === ')' && this._options.break_chained_methods);\n\t }\n\n\t // Only unindent chained method dot if this dot starts a new line.\n\t // Otherwise the automatic extra indentation removal will handle the over indent\n\t if (this._options.unindent_chained_methods && this._output.just_added_newline()) {\n\t this.deindent();\n\t }\n\n\t this.print_token(current_token);\n\t};\n\n\tBeautifier.prototype.handle_unknown = function(current_token, preserve_statement_flags) {\n\t this.print_token(current_token);\n\n\t if (current_token.text[current_token.text.length - 1] === '\\n') {\n\t this.print_newline(false, preserve_statement_flags);\n\t }\n\t};\n\n\tBeautifier.prototype.handle_eof = function(current_token) {\n\t // Unwind any open statements\n\t while (this._flags.mode === MODE.Statement) {\n\t this.restore_mode();\n\t }\n\t this.handle_whitespace_and_comments(current_token);\n\t};\n\n\tbeautifier$2.Beautifier = Beautifier;\n\treturn beautifier$2;\n}\n\n/*jshint node:true */\n\nvar hasRequiredJavascript;\n\nfunction requireJavascript () {\n\tif (hasRequiredJavascript) return javascriptExports;\n\thasRequiredJavascript = 1;\n\n\tvar Beautifier = requireBeautifier$2().Beautifier,\n\t Options = requireOptions$2().Options;\n\n\tfunction js_beautify(js_source_text, options) {\n\t var beautifier = new Beautifier(js_source_text, options);\n\t return beautifier.beautify();\n\t}\n\n\tjavascript.exports = js_beautify;\n\tjavascriptExports.defaultOptions = function() {\n\t return new Options();\n\t};\n\treturn javascriptExports;\n}\n\nvar cssExports = {};\nvar css = {\n get exports(){ return cssExports; },\n set exports(v){ cssExports = v; },\n};\n\nvar beautifier$1 = {};\n\nvar options$1 = {};\n\n/*jshint node:true */\n\nvar hasRequiredOptions$1;\n\nfunction requireOptions$1 () {\n\tif (hasRequiredOptions$1) return options$1;\n\thasRequiredOptions$1 = 1;\n\n\tvar BaseOptions = requireOptions$3().Options;\n\n\tfunction Options(options) {\n\t BaseOptions.call(this, options, 'css');\n\n\t this.selector_separator_newline = this._get_boolean('selector_separator_newline', true);\n\t this.newline_between_rules = this._get_boolean('newline_between_rules', true);\n\t var space_around_selector_separator = this._get_boolean('space_around_selector_separator');\n\t this.space_around_combinator = this._get_boolean('space_around_combinator') || space_around_selector_separator;\n\n\t var brace_style_split = this._get_selection_list('brace_style', ['collapse', 'expand', 'end-expand', 'none', 'preserve-inline']);\n\t this.brace_style = 'collapse';\n\t for (var bs = 0; bs < brace_style_split.length; bs++) {\n\t if (brace_style_split[bs] !== 'expand') {\n\t // default to collapse, as only collapse|expand is implemented for now\n\t this.brace_style = 'collapse';\n\t } else {\n\t this.brace_style = brace_style_split[bs];\n\t }\n\t }\n\t}\n\tOptions.prototype = new BaseOptions();\n\n\n\n\toptions$1.Options = Options;\n\treturn options$1;\n}\n\n/*jshint node:true */\n\nvar hasRequiredBeautifier$1;\n\nfunction requireBeautifier$1 () {\n\tif (hasRequiredBeautifier$1) return beautifier$1;\n\thasRequiredBeautifier$1 = 1;\n\n\tvar Options = requireOptions$1().Options;\n\tvar Output = requireOutput().Output;\n\tvar InputScanner = requireInputscanner().InputScanner;\n\tvar Directives = requireDirectives().Directives;\n\n\tvar directives_core = new Directives(/\\/\\*/, /\\*\\//);\n\n\tvar lineBreak = /\\r\\n|[\\r\\n]/;\n\tvar allLineBreaks = /\\r\\n|[\\r\\n]/g;\n\n\t// tokenizer\n\tvar whitespaceChar = /\\s/;\n\tvar whitespacePattern = /(?:\\s|\\n)+/g;\n\tvar block_comment_pattern = /\\/\\*(?:[\\s\\S]*?)((?:\\*\\/)|$)/g;\n\tvar comment_pattern = /\\/\\/(?:[^\\n\\r\\u2028\\u2029]*)/g;\n\n\tfunction Beautifier(source_text, options) {\n\t this._source_text = source_text || '';\n\t // Allow the setting of language/file-type specific options\n\t // with inheritance of overall settings\n\t this._options = new Options(options);\n\t this._ch = null;\n\t this._input = null;\n\n\t // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule\n\t this.NESTED_AT_RULE = {\n\t \"@page\": true,\n\t \"@font-face\": true,\n\t \"@keyframes\": true,\n\t // also in CONDITIONAL_GROUP_RULE below\n\t \"@media\": true,\n\t \"@supports\": true,\n\t \"@document\": true\n\t };\n\t this.CONDITIONAL_GROUP_RULE = {\n\t \"@media\": true,\n\t \"@supports\": true,\n\t \"@document\": true\n\t };\n\t this.NON_SEMICOLON_NEWLINE_PROPERTY = [\n\t \"grid-template-areas\",\n\t \"grid-template\"\n\t ];\n\n\t}\n\n\tBeautifier.prototype.eatString = function(endChars) {\n\t var result = '';\n\t this._ch = this._input.next();\n\t while (this._ch) {\n\t result += this._ch;\n\t if (this._ch === \"\\\\\") {\n\t result += this._input.next();\n\t } else if (endChars.indexOf(this._ch) !== -1 || this._ch === \"\\n\") {\n\t break;\n\t }\n\t this._ch = this._input.next();\n\t }\n\t return result;\n\t};\n\n\t// Skips any white space in the source text from the current position.\n\t// When allowAtLeastOneNewLine is true, will output new lines for each\n\t// newline character found; if the user has preserve_newlines off, only\n\t// the first newline will be output\n\tBeautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) {\n\t var result = whitespaceChar.test(this._input.peek());\n\t var newline_count = 0;\n\t while (whitespaceChar.test(this._input.peek())) {\n\t this._ch = this._input.next();\n\t if (allowAtLeastOneNewLine && this._ch === '\\n') {\n\t if (newline_count === 0 || newline_count < this._options.max_preserve_newlines) {\n\t newline_count++;\n\t this._output.add_new_line(true);\n\t }\n\t }\n\t }\n\t return result;\n\t};\n\n\t// Nested pseudo-class if we are insideRule\n\t// and the next special character found opens\n\t// a new block\n\tBeautifier.prototype.foundNestedPseudoClass = function() {\n\t var openParen = 0;\n\t var i = 1;\n\t var ch = this._input.peek(i);\n\t while (ch) {\n\t if (ch === \"{\") {\n\t return true;\n\t } else if (ch === '(') {\n\t // pseudoclasses can contain ()\n\t openParen += 1;\n\t } else if (ch === ')') {\n\t if (openParen === 0) {\n\t return false;\n\t }\n\t openParen -= 1;\n\t } else if (ch === \";\" || ch === \"}\") {\n\t return false;\n\t }\n\t i++;\n\t ch = this._input.peek(i);\n\t }\n\t return false;\n\t};\n\n\tBeautifier.prototype.print_string = function(output_string) {\n\t this._output.set_indent(this._indentLevel);\n\t this._output.non_breaking_space = true;\n\t this._output.add_token(output_string);\n\t};\n\n\tBeautifier.prototype.preserveSingleSpace = function(isAfterSpace) {\n\t if (isAfterSpace) {\n\t this._output.space_before_token = true;\n\t }\n\t};\n\n\tBeautifier.prototype.indent = function() {\n\t this._indentLevel++;\n\t};\n\n\tBeautifier.prototype.outdent = function() {\n\t if (this._indentLevel > 0) {\n\t this._indentLevel--;\n\t }\n\t};\n\n\t/*_____________________--------------------_____________________*/\n\n\tBeautifier.prototype.beautify = function() {\n\t if (this._options.disabled) {\n\t return this._source_text;\n\t }\n\n\t var source_text = this._source_text;\n\t var eol = this._options.eol;\n\t if (eol === 'auto') {\n\t eol = '\\n';\n\t if (source_text && lineBreak.test(source_text || '')) {\n\t eol = source_text.match(lineBreak)[0];\n\t }\n\t }\n\n\n\t // HACK: newline parsing inconsistent. This brute force normalizes the this._input.\n\t source_text = source_text.replace(allLineBreaks, '\\n');\n\n\t // reset\n\t var baseIndentString = source_text.match(/^[\\t ]*/)[0];\n\n\t this._output = new Output(this._options, baseIndentString);\n\t this._input = new InputScanner(source_text);\n\t this._indentLevel = 0;\n\t this._nestedLevel = 0;\n\n\t this._ch = null;\n\t var parenLevel = 0;\n\n\t var insideRule = false;\n\t // This is the value side of a property value pair (blue in the following ex)\n\t // label { content: blue }\n\t var insidePropertyValue = false;\n\t var enteringConditionalGroup = false;\n\t var insideAtExtend = false;\n\t var insideAtImport = false;\n\t var insideScssMap = false;\n\t var topCharacter = this._ch;\n\t var insideNonSemiColonValues = false;\n\t var whitespace;\n\t var isAfterSpace;\n\t var previous_ch;\n\n\t while (true) {\n\t whitespace = this._input.read(whitespacePattern);\n\t isAfterSpace = whitespace !== '';\n\t previous_ch = topCharacter;\n\t this._ch = this._input.next();\n\t if (this._ch === '\\\\' && this._input.hasNext()) {\n\t this._ch += this._input.next();\n\t }\n\t topCharacter = this._ch;\n\n\t if (!this._ch) {\n\t break;\n\t } else if (this._ch === '/' && this._input.peek() === '*') {\n\t // /* css comment */\n\t // Always start block comments on a new line.\n\t // This handles scenarios where a block comment immediately\n\t // follows a property definition on the same line or where\n\t // minified code is being beautified.\n\t this._output.add_new_line();\n\t this._input.back();\n\n\t var comment = this._input.read(block_comment_pattern);\n\n\t // Handle ignore directive\n\t var directives = directives_core.get_directives(comment);\n\t if (directives && directives.ignore === 'start') {\n\t comment += directives_core.readIgnored(this._input);\n\t }\n\n\t this.print_string(comment);\n\n\t // Ensures any new lines following the comment are preserved\n\t this.eatWhitespace(true);\n\n\t // Block comments are followed by a new line so they don't\n\t // share a line with other properties\n\t this._output.add_new_line();\n\t } else if (this._ch === '/' && this._input.peek() === '/') {\n\t // // single line comment\n\t // Preserves the space before a comment\n\t // on the same line as a rule\n\t this._output.space_before_token = true;\n\t this._input.back();\n\t this.print_string(this._input.read(comment_pattern));\n\n\t // Ensures any new lines following the comment are preserved\n\t this.eatWhitespace(true);\n\t } else if (this._ch === '@' || this._ch === '$') {\n\t this.preserveSingleSpace(isAfterSpace);\n\n\t // deal with less propery mixins @{...}\n\t if (this._input.peek() === '{') {\n\t this.print_string(this._ch + this.eatString('}'));\n\t } else {\n\t this.print_string(this._ch);\n\n\t // strip trailing space, if present, for hash property checks\n\t var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\\]\\/='\"]/g);\n\n\t if (variableOrRule.match(/[ :]$/)) {\n\t // we have a variable or pseudo-class, add it and insert one space before continuing\n\t variableOrRule = this.eatString(\": \").replace(/\\s$/, '');\n\t this.print_string(variableOrRule);\n\t this._output.space_before_token = true;\n\t }\n\n\t variableOrRule = variableOrRule.replace(/\\s$/, '');\n\n\t if (variableOrRule === 'extend') {\n\t insideAtExtend = true;\n\t } else if (variableOrRule === 'import') {\n\t insideAtImport = true;\n\t }\n\n\t // might be a nesting at-rule\n\t if (variableOrRule in this.NESTED_AT_RULE) {\n\t this._nestedLevel += 1;\n\t if (variableOrRule in this.CONDITIONAL_GROUP_RULE) {\n\t enteringConditionalGroup = true;\n\t }\n\t // might be less variable\n\t } else if (!insideRule && parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {\n\t insidePropertyValue = true;\n\t this.indent();\n\t }\n\t }\n\t } else if (this._ch === '#' && this._input.peek() === '{') {\n\t this.preserveSingleSpace(isAfterSpace);\n\t this.print_string(this._ch + this.eatString('}'));\n\t } else if (this._ch === '{') {\n\t if (insidePropertyValue) {\n\t insidePropertyValue = false;\n\t this.outdent();\n\t }\n\n\t // when entering conditional groups, only rulesets are allowed\n\t if (enteringConditionalGroup) {\n\t enteringConditionalGroup = false;\n\t insideRule = (this._indentLevel >= this._nestedLevel);\n\t } else {\n\t // otherwise, declarations are also allowed\n\t insideRule = (this._indentLevel >= this._nestedLevel - 1);\n\t }\n\t if (this._options.newline_between_rules && insideRule) {\n\t if (this._output.previous_line && this._output.previous_line.item(-1) !== '{') {\n\t this._output.ensure_empty_line_above('/', ',');\n\t }\n\t }\n\n\t this._output.space_before_token = true;\n\n\t // The difference in print_string and indent order is necessary to indent the '{' correctly\n\t if (this._options.brace_style === 'expand') {\n\t this._output.add_new_line();\n\t this.print_string(this._ch);\n\t this.indent();\n\t this._output.set_indent(this._indentLevel);\n\t } else {\n\t // inside mixin and first param is object\n\t if (previous_ch === '(') {\n\t this._output.space_before_token = false;\n\t } else if (previous_ch !== ',') {\n\t this.indent();\n\t }\n\t this.print_string(this._ch);\n\t }\n\n\t this.eatWhitespace(true);\n\t this._output.add_new_line();\n\t } else if (this._ch === '}') {\n\t this.outdent();\n\t this._output.add_new_line();\n\t if (previous_ch === '{') {\n\t this._output.trim(true);\n\t }\n\t insideAtImport = false;\n\t insideAtExtend = false;\n\t if (insidePropertyValue) {\n\t this.outdent();\n\t insidePropertyValue = false;\n\t }\n\t this.print_string(this._ch);\n\t insideRule = false;\n\t if (this._nestedLevel) {\n\t this._nestedLevel--;\n\t }\n\n\t this.eatWhitespace(true);\n\t this._output.add_new_line();\n\n\t if (this._options.newline_between_rules && !this._output.just_added_blankline()) {\n\t if (this._input.peek() !== '}') {\n\t this._output.add_new_line(true);\n\t }\n\t }\n\t if (this._input.peek() === ')') {\n\t this._output.trim(true);\n\t if (this._options.brace_style === \"expand\") {\n\t this._output.add_new_line(true);\n\t }\n\t }\n\t } else if (this._ch === \":\") {\n\n\t for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) {\n\t if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) {\n\t insideNonSemiColonValues = true;\n\t break;\n\t }\n\t }\n\n\t if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack(\"&\") || this.foundNestedPseudoClass()) && !this._input.lookBack(\"(\") && !insideAtExtend && parenLevel === 0) {\n\t // 'property: value' delimiter\n\t // which could be in a conditional group query\n\t this.print_string(':');\n\t if (!insidePropertyValue) {\n\t insidePropertyValue = true;\n\t this._output.space_before_token = true;\n\t this.eatWhitespace(true);\n\t this.indent();\n\t }\n\t } else {\n\t // sass/less parent reference don't use a space\n\t // sass nested pseudo-class don't use a space\n\n\t // preserve space before pseudoclasses/pseudoelements, as it means \"in any child\"\n\t if (this._input.lookBack(\" \")) {\n\t this._output.space_before_token = true;\n\t }\n\t if (this._input.peek() === \":\") {\n\t // pseudo-element\n\t this._ch = this._input.next();\n\t this.print_string(\"::\");\n\t } else {\n\t // pseudo-class\n\t this.print_string(':');\n\t }\n\t }\n\t } else if (this._ch === '\"' || this._ch === '\\'') {\n\t var preserveQuoteSpace = previous_ch === '\"' || previous_ch === '\\'';\n\t this.preserveSingleSpace(preserveQuoteSpace || isAfterSpace);\n\t this.print_string(this._ch + this.eatString(this._ch));\n\t this.eatWhitespace(true);\n\t } else if (this._ch === ';') {\n\t insideNonSemiColonValues = false;\n\t if (parenLevel === 0) {\n\t if (insidePropertyValue) {\n\t this.outdent();\n\t insidePropertyValue = false;\n\t }\n\t insideAtExtend = false;\n\t insideAtImport = false;\n\t this.print_string(this._ch);\n\t this.eatWhitespace(true);\n\n\t // This maintains single line comments on the same\n\t // line. Block comments are also affected, but\n\t // a new line is always output before one inside\n\t // that section\n\t if (this._input.peek() !== '/') {\n\t this._output.add_new_line();\n\t }\n\t } else {\n\t this.print_string(this._ch);\n\t this.eatWhitespace(true);\n\t this._output.space_before_token = true;\n\t }\n\t } else if (this._ch === '(') { // may be a url\n\t if (this._input.lookBack(\"url\")) {\n\t this.print_string(this._ch);\n\t this.eatWhitespace();\n\t parenLevel++;\n\t this.indent();\n\t this._ch = this._input.next();\n\t if (this._ch === ')' || this._ch === '\"' || this._ch === '\\'') {\n\t this._input.back();\n\t } else if (this._ch) {\n\t this.print_string(this._ch + this.eatString(')'));\n\t if (parenLevel) {\n\t parenLevel--;\n\t this.outdent();\n\t }\n\t }\n\t } else {\n\t var space_needed = false;\n\t if (this._input.lookBack(\"with\")) {\n\t // look back is not an accurate solution, we need tokens to confirm without whitespaces\n\t space_needed = true;\n\t }\n\t this.preserveSingleSpace(isAfterSpace || space_needed);\n\t this.print_string(this._ch);\n\n\t // handle scss/sass map\n\t if (insidePropertyValue && previous_ch === \"$\" && this._options.selector_separator_newline) {\n\t this._output.add_new_line();\n\t insideScssMap = true;\n\t } else {\n\t this.eatWhitespace();\n\t parenLevel++;\n\t this.indent();\n\t }\n\t }\n\t } else if (this._ch === ')') {\n\t if (parenLevel) {\n\t parenLevel--;\n\t this.outdent();\n\t }\n\t if (insideScssMap && this._input.peek() === \";\" && this._options.selector_separator_newline) {\n\t insideScssMap = false;\n\t this.outdent();\n\t this._output.add_new_line();\n\t }\n\t this.print_string(this._ch);\n\t } else if (this._ch === ',') {\n\t this.print_string(this._ch);\n\t this.eatWhitespace(true);\n\t if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideAtImport && !insideAtExtend) {\n\t this._output.add_new_line();\n\t } else {\n\t this._output.space_before_token = true;\n\t }\n\t } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) {\n\t //handle combinator spacing\n\t if (this._options.space_around_combinator) {\n\t this._output.space_before_token = true;\n\t this.print_string(this._ch);\n\t this._output.space_before_token = true;\n\t } else {\n\t this.print_string(this._ch);\n\t this.eatWhitespace();\n\t // squash extra whitespace\n\t if (this._ch && whitespaceChar.test(this._ch)) {\n\t this._ch = '';\n\t }\n\t }\n\t } else if (this._ch === ']') {\n\t this.print_string(this._ch);\n\t } else if (this._ch === '[') {\n\t this.preserveSingleSpace(isAfterSpace);\n\t this.print_string(this._ch);\n\t } else if (this._ch === '=') { // no whitespace before or after\n\t this.eatWhitespace();\n\t this.print_string('=');\n\t if (whitespaceChar.test(this._ch)) {\n\t this._ch = '';\n\t }\n\t } else if (this._ch === '!' && !this._input.lookBack(\"\\\\\")) { // !important\n\t this._output.space_before_token = true;\n\t this.print_string(this._ch);\n\t } else {\n\t var preserveAfterSpace = previous_ch === '\"' || previous_ch === '\\'';\n\t this.preserveSingleSpace(preserveAfterSpace || isAfterSpace);\n\t this.print_string(this._ch);\n\n\t if (!this._output.just_added_newline() && this._input.peek() === '\\n' && insideNonSemiColonValues) {\n\t this._output.add_new_line();\n\t }\n\t }\n\t }\n\n\t var sweetCode = this._output.get_code(eol);\n\n\t return sweetCode;\n\t};\n\n\tbeautifier$1.Beautifier = Beautifier;\n\treturn beautifier$1;\n}\n\n/*jshint node:true */\n\nvar hasRequiredCss;\n\nfunction requireCss () {\n\tif (hasRequiredCss) return cssExports;\n\thasRequiredCss = 1;\n\n\tvar Beautifier = requireBeautifier$1().Beautifier,\n\t Options = requireOptions$1().Options;\n\n\tfunction css_beautify(source_text, options) {\n\t var beautifier = new Beautifier(source_text, options);\n\t return beautifier.beautify();\n\t}\n\n\tcss.exports = css_beautify;\n\tcssExports.defaultOptions = function() {\n\t return new Options();\n\t};\n\treturn cssExports;\n}\n\nvar htmlExports = {};\nvar html = {\n get exports(){ return htmlExports; },\n set exports(v){ htmlExports = v; },\n};\n\nvar beautifier = {};\n\nvar options = {};\n\n/*jshint node:true */\n\nvar hasRequiredOptions;\n\nfunction requireOptions () {\n\tif (hasRequiredOptions) return options;\n\thasRequiredOptions = 1;\n\n\tvar BaseOptions = requireOptions$3().Options;\n\n\tfunction Options(options) {\n\t BaseOptions.call(this, options, 'html');\n\t if (this.templating.length === 1 && this.templating[0] === 'auto') {\n\t this.templating = ['django', 'erb', 'handlebars', 'php'];\n\t }\n\n\t this.indent_inner_html = this._get_boolean('indent_inner_html');\n\t this.indent_body_inner_html = this._get_boolean('indent_body_inner_html', true);\n\t this.indent_head_inner_html = this._get_boolean('indent_head_inner_html', true);\n\n\t this.indent_handlebars = this._get_boolean('indent_handlebars', true);\n\t this.wrap_attributes = this._get_selection('wrap_attributes',\n\t ['auto', 'force', 'force-aligned', 'force-expand-multiline', 'aligned-multiple', 'preserve', 'preserve-aligned']);\n\t this.wrap_attributes_indent_size = this._get_number('wrap_attributes_indent_size', this.indent_size);\n\t this.extra_liners = this._get_array('extra_liners', ['head', 'body', '/html']);\n\n\t // Block vs inline elements\n\t // https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements\n\t // https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements\n\t // https://www.w3.org/TR/html5/dom.html#phrasing-content\n\t this.inline = this._get_array('inline', [\n\t 'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite',\n\t 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img',\n\t 'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript',\n\t 'object', 'output', 'progress', 'q', 'ruby', 's', 'samp', /* 'script', */ 'select', 'small',\n\t 'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var',\n\t 'video', 'wbr', 'text',\n\t // obsolete inline tags\n\t 'acronym', 'big', 'strike', 'tt'\n\t ]);\n\t this.void_elements = this._get_array('void_elements', [\n\t // HTLM void elements - aka self-closing tags - aka singletons\n\t // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements\n\t 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen',\n\t 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',\n\t // NOTE: Optional tags are too complex for a simple list\n\t // they are hard coded in _do_optional_end_element\n\n\t // Doctype and xml elements\n\t '!doctype', '?xml',\n\n\t // obsolete tags\n\t // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm\n\t // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex\n\t 'basefont', 'isindex'\n\t ]);\n\t this.unformatted = this._get_array('unformatted', []);\n\t this.content_unformatted = this._get_array('content_unformatted', [\n\t 'pre', 'textarea'\n\t ]);\n\t this.unformatted_content_delimiter = this._get_characters('unformatted_content_delimiter');\n\t this.indent_scripts = this._get_selection('indent_scripts', ['normal', 'keep', 'separate']);\n\n\t}\n\tOptions.prototype = new BaseOptions();\n\n\n\n\toptions.Options = Options;\n\treturn options;\n}\n\nvar tokenizer = {};\n\n/*jshint node:true */\n\nvar hasRequiredTokenizer;\n\nfunction requireTokenizer () {\n\tif (hasRequiredTokenizer) return tokenizer;\n\thasRequiredTokenizer = 1;\n\n\tvar BaseTokenizer = requireTokenizer$2().Tokenizer;\n\tvar BASETOKEN = requireTokenizer$2().TOKEN;\n\tvar Directives = requireDirectives().Directives;\n\tvar TemplatablePattern = requireTemplatablepattern().TemplatablePattern;\n\tvar Pattern = requirePattern().Pattern;\n\n\tvar TOKEN = {\n\t TAG_OPEN: 'TK_TAG_OPEN',\n\t TAG_CLOSE: 'TK_TAG_CLOSE',\n\t ATTRIBUTE: 'TK_ATTRIBUTE',\n\t EQUALS: 'TK_EQUALS',\n\t VALUE: 'TK_VALUE',\n\t COMMENT: 'TK_COMMENT',\n\t TEXT: 'TK_TEXT',\n\t UNKNOWN: 'TK_UNKNOWN',\n\t START: BASETOKEN.START,\n\t RAW: BASETOKEN.RAW,\n\t EOF: BASETOKEN.EOF\n\t};\n\n\tvar directives_core = new Directives(/<\\!--/, /-->/);\n\n\tvar Tokenizer = function(input_string, options) {\n\t BaseTokenizer.call(this, input_string, options);\n\t this._current_tag_name = '';\n\n\t // Words end at whitespace or when a tag starts\n\t // if we are indenting handlebars, they are considered tags\n\t var templatable_reader = new TemplatablePattern(this._input).read_options(this._options);\n\t var pattern_reader = new Pattern(this._input);\n\n\t this.__patterns = {\n\t word: templatable_reader.until(/[\\n\\r\\t <]/),\n\t single_quote: templatable_reader.until_after(/'/),\n\t double_quote: templatable_reader.until_after(/\"/),\n\t attribute: templatable_reader.until(/[\\n\\r\\t =>]|\\/>/),\n\t element_name: templatable_reader.until(/[\\n\\r\\t >\\/]/),\n\n\t handlebars_comment: pattern_reader.starting_with(/{{!--/).until_after(/--}}/),\n\t handlebars: pattern_reader.starting_with(/{{/).until_after(/}}/),\n\t handlebars_open: pattern_reader.until(/[\\n\\r\\t }]/),\n\t handlebars_raw_close: pattern_reader.until(/}}/),\n\t comment: pattern_reader.starting_with(//),\n\t cdata: pattern_reader.starting_with(//),\n\t // https://en.wikipedia.org/wiki/Conditional_comment\n\t conditional_comment: pattern_reader.starting_with(//),\n\t processing: pattern_reader.starting_with(/<\\?/).until_after(/\\?>/)\n\t };\n\n\t if (this._options.indent_handlebars) {\n\t this.__patterns.word = this.__patterns.word.exclude('handlebars');\n\t }\n\n\t this._unformatted_content_delimiter = null;\n\n\t if (this._options.unformatted_content_delimiter) {\n\t var literal_regexp = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);\n\t this.__patterns.unformatted_content_delimiter =\n\t pattern_reader.matching(literal_regexp)\n\t .until_after(literal_regexp);\n\t }\n\t};\n\tTokenizer.prototype = new BaseTokenizer();\n\n\tTokenizer.prototype._is_comment = function(current_token) { // jshint unused:false\n\t return false; //current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.UNKNOWN;\n\t};\n\n\tTokenizer.prototype._is_opening = function(current_token) {\n\t return current_token.type === TOKEN.TAG_OPEN;\n\t};\n\n\tTokenizer.prototype._is_closing = function(current_token, open_token) {\n\t return current_token.type === TOKEN.TAG_CLOSE &&\n\t (open_token && (\n\t ((current_token.text === '>' || current_token.text === '/>') && open_token.text[0] === '<') ||\n\t (current_token.text === '}}' && open_token.text[0] === '{' && open_token.text[1] === '{')));\n\t};\n\n\tTokenizer.prototype._reset = function() {\n\t this._current_tag_name = '';\n\t};\n\n\tTokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false\n\t var token = null;\n\t this._readWhitespace();\n\t var c = this._input.peek();\n\n\t if (c === null) {\n\t return this._create_token(TOKEN.EOF, '');\n\t }\n\n\t token = token || this._read_open_handlebars(c, open_token);\n\t token = token || this._read_attribute(c, previous_token, open_token);\n\t token = token || this._read_close(c, open_token);\n\t token = token || this._read_raw_content(c, previous_token, open_token);\n\t token = token || this._read_content_word(c);\n\t token = token || this._read_comment_or_cdata(c);\n\t token = token || this._read_processing(c);\n\t token = token || this._read_open(c, open_token);\n\t token = token || this._create_token(TOKEN.UNKNOWN, this._input.next());\n\n\t return token;\n\t};\n\n\tTokenizer.prototype._read_comment_or_cdata = function(c) { // jshint unused:false\n\t var token = null;\n\t var resulting_string = null;\n\t var directives = null;\n\n\t if (c === '<') {\n\t var peek1 = this._input.peek(1);\n\t // We treat all comments as literals, even more than preformatted tags\n\t // we only look for the appropriate closing marker\n\t if (peek1 === '!') {\n\t resulting_string = this.__patterns.comment.read();\n\n\t // only process directive on html comments\n\t if (resulting_string) {\n\t directives = directives_core.get_directives(resulting_string);\n\t if (directives && directives.ignore === 'start') {\n\t resulting_string += directives_core.readIgnored(this._input);\n\t }\n\t } else {\n\t resulting_string = this.__patterns.cdata.read();\n\t }\n\t }\n\n\t if (resulting_string) {\n\t token = this._create_token(TOKEN.COMMENT, resulting_string);\n\t token.directives = directives;\n\t }\n\t }\n\n\t return token;\n\t};\n\n\tTokenizer.prototype._read_processing = function(c) { // jshint unused:false\n\t var token = null;\n\t var resulting_string = null;\n\t var directives = null;\n\n\t if (c === '<') {\n\t var peek1 = this._input.peek(1);\n\t if (peek1 === '!' || peek1 === '?') {\n\t resulting_string = this.__patterns.conditional_comment.read();\n\t resulting_string = resulting_string || this.__patterns.processing.read();\n\t }\n\n\t if (resulting_string) {\n\t token = this._create_token(TOKEN.COMMENT, resulting_string);\n\t token.directives = directives;\n\t }\n\t }\n\n\t return token;\n\t};\n\n\tTokenizer.prototype._read_open = function(c, open_token) {\n\t var resulting_string = null;\n\t var token = null;\n\t if (!open_token) {\n\t if (c === '<') {\n\n\t resulting_string = this._input.next();\n\t if (this._input.peek() === '/') {\n\t resulting_string += this._input.next();\n\t }\n\t resulting_string += this.__patterns.element_name.read();\n\t token = this._create_token(TOKEN.TAG_OPEN, resulting_string);\n\t }\n\t }\n\t return token;\n\t};\n\n\tTokenizer.prototype._read_open_handlebars = function(c, open_token) {\n\t var resulting_string = null;\n\t var token = null;\n\t if (!open_token) {\n\t if (this._options.indent_handlebars && c === '{' && this._input.peek(1) === '{') {\n\t if (this._input.peek(2) === '!') {\n\t resulting_string = this.__patterns.handlebars_comment.read();\n\t resulting_string = resulting_string || this.__patterns.handlebars.read();\n\t token = this._create_token(TOKEN.COMMENT, resulting_string);\n\t } else {\n\t resulting_string = this.__patterns.handlebars_open.read();\n\t token = this._create_token(TOKEN.TAG_OPEN, resulting_string);\n\t }\n\t }\n\t }\n\t return token;\n\t};\n\n\n\tTokenizer.prototype._read_close = function(c, open_token) {\n\t var resulting_string = null;\n\t var token = null;\n\t if (open_token) {\n\t if (open_token.text[0] === '<' && (c === '>' || (c === '/' && this._input.peek(1) === '>'))) {\n\t resulting_string = this._input.next();\n\t if (c === '/') { // for close tag \"/>\"\n\t resulting_string += this._input.next();\n\t }\n\t token = this._create_token(TOKEN.TAG_CLOSE, resulting_string);\n\t } else if (open_token.text[0] === '{' && c === '}' && this._input.peek(1) === '}') {\n\t this._input.next();\n\t this._input.next();\n\t token = this._create_token(TOKEN.TAG_CLOSE, '}}');\n\t }\n\t }\n\n\t return token;\n\t};\n\n\tTokenizer.prototype._read_attribute = function(c, previous_token, open_token) {\n\t var token = null;\n\t var resulting_string = '';\n\t if (open_token && open_token.text[0] === '<') {\n\n\t if (c === '=') {\n\t token = this._create_token(TOKEN.EQUALS, this._input.next());\n\t } else if (c === '\"' || c === \"'\") {\n\t var content = this._input.next();\n\t if (c === '\"') {\n\t content += this.__patterns.double_quote.read();\n\t } else {\n\t content += this.__patterns.single_quote.read();\n\t }\n\t token = this._create_token(TOKEN.VALUE, content);\n\t } else {\n\t resulting_string = this.__patterns.attribute.read();\n\n\t if (resulting_string) {\n\t if (previous_token.type === TOKEN.EQUALS) {\n\t token = this._create_token(TOKEN.VALUE, resulting_string);\n\t } else {\n\t token = this._create_token(TOKEN.ATTRIBUTE, resulting_string);\n\t }\n\t }\n\t }\n\t }\n\t return token;\n\t};\n\n\tTokenizer.prototype._is_content_unformatted = function(tag_name) {\n\t // void_elements have no content and so cannot have unformatted content\n\t // script and style tags should always be read as unformatted content\n\t // finally content_unformatted and unformatted element contents are unformatted\n\t return this._options.void_elements.indexOf(tag_name) === -1 &&\n\t (this._options.content_unformatted.indexOf(tag_name) !== -1 ||\n\t this._options.unformatted.indexOf(tag_name) !== -1);\n\t};\n\n\n\tTokenizer.prototype._read_raw_content = function(c, previous_token, open_token) { // jshint unused:false\n\t var resulting_string = '';\n\t if (open_token && open_token.text[0] === '{') {\n\t resulting_string = this.__patterns.handlebars_raw_close.read();\n\t } else if (previous_token.type === TOKEN.TAG_CLOSE &&\n\t previous_token.opened.text[0] === '<' && previous_token.text[0] !== '/') {\n\t // ^^ empty tag has no content \n\t var tag_name = previous_token.opened.text.substr(1).toLowerCase();\n\t if (tag_name === 'script' || tag_name === 'style') {\n\t // Script and style tags are allowed to have comments wrapping their content\n\t // or just have regular content.\n\t var token = this._read_comment_or_cdata(c);\n\t if (token) {\n\t token.type = TOKEN.TEXT;\n\t return token;\n\t }\n\t resulting_string = this._input.readUntil(new RegExp('' + tag_name + '[\\\\n\\\\r\\\\t ]*?>', 'ig'));\n\t } else if (this._is_content_unformatted(tag_name)) {\n\n\t resulting_string = this._input.readUntil(new RegExp('' + tag_name + '[\\\\n\\\\r\\\\t ]*?>', 'ig'));\n\t }\n\t }\n\n\t if (resulting_string) {\n\t return this._create_token(TOKEN.TEXT, resulting_string);\n\t }\n\n\t return null;\n\t};\n\n\tTokenizer.prototype._read_content_word = function(c) {\n\t var resulting_string = '';\n\t if (this._options.unformatted_content_delimiter) {\n\t if (c === this._options.unformatted_content_delimiter[0]) {\n\t resulting_string = this.__patterns.unformatted_content_delimiter.read();\n\t }\n\t }\n\n\t if (!resulting_string) {\n\t resulting_string = this.__patterns.word.read();\n\t }\n\t if (resulting_string) {\n\t return this._create_token(TOKEN.TEXT, resulting_string);\n\t }\n\t};\n\n\ttokenizer.Tokenizer = Tokenizer;\n\ttokenizer.TOKEN = TOKEN;\n\treturn tokenizer;\n}\n\n/*jshint node:true */\n\nvar hasRequiredBeautifier;\n\nfunction requireBeautifier () {\n\tif (hasRequiredBeautifier) return beautifier;\n\thasRequiredBeautifier = 1;\n\n\tvar Options = requireOptions().Options;\n\tvar Output = requireOutput().Output;\n\tvar Tokenizer = requireTokenizer().Tokenizer;\n\tvar TOKEN = requireTokenizer().TOKEN;\n\n\tvar lineBreak = /\\r\\n|[\\r\\n]/;\n\tvar allLineBreaks = /\\r\\n|[\\r\\n]/g;\n\n\tvar Printer = function(options, base_indent_string) { //handles input/output and some other printing functions\n\n\t this.indent_level = 0;\n\t this.alignment_size = 0;\n\t this.max_preserve_newlines = options.max_preserve_newlines;\n\t this.preserve_newlines = options.preserve_newlines;\n\n\t this._output = new Output(options, base_indent_string);\n\n\t};\n\n\tPrinter.prototype.current_line_has_match = function(pattern) {\n\t return this._output.current_line.has_match(pattern);\n\t};\n\n\tPrinter.prototype.set_space_before_token = function(value, non_breaking) {\n\t this._output.space_before_token = value;\n\t this._output.non_breaking_space = non_breaking;\n\t};\n\n\tPrinter.prototype.set_wrap_point = function() {\n\t this._output.set_indent(this.indent_level, this.alignment_size);\n\t this._output.set_wrap_point();\n\t};\n\n\n\tPrinter.prototype.add_raw_token = function(token) {\n\t this._output.add_raw_token(token);\n\t};\n\n\tPrinter.prototype.print_preserved_newlines = function(raw_token) {\n\t var newlines = 0;\n\t if (raw_token.type !== TOKEN.TEXT && raw_token.previous.type !== TOKEN.TEXT) {\n\t newlines = raw_token.newlines ? 1 : 0;\n\t }\n\n\t if (this.preserve_newlines) {\n\t newlines = raw_token.newlines < this.max_preserve_newlines + 1 ? raw_token.newlines : this.max_preserve_newlines + 1;\n\t }\n\t for (var n = 0; n < newlines; n++) {\n\t this.print_newline(n > 0);\n\t }\n\n\t return newlines !== 0;\n\t};\n\n\tPrinter.prototype.traverse_whitespace = function(raw_token) {\n\t if (raw_token.whitespace_before || raw_token.newlines) {\n\t if (!this.print_preserved_newlines(raw_token)) {\n\t this._output.space_before_token = true;\n\t }\n\t return true;\n\t }\n\t return false;\n\t};\n\n\tPrinter.prototype.previous_token_wrapped = function() {\n\t return this._output.previous_token_wrapped;\n\t};\n\n\tPrinter.prototype.print_newline = function(force) {\n\t this._output.add_new_line(force);\n\t};\n\n\tPrinter.prototype.print_token = function(token) {\n\t if (token.text) {\n\t this._output.set_indent(this.indent_level, this.alignment_size);\n\t this._output.add_token(token.text);\n\t }\n\t};\n\n\tPrinter.prototype.indent = function() {\n\t this.indent_level++;\n\t};\n\n\tPrinter.prototype.get_full_indent = function(level) {\n\t level = this.indent_level + (level || 0);\n\t if (level < 1) {\n\t return '';\n\t }\n\n\t return this._output.get_indent_string(level);\n\t};\n\n\tvar get_type_attribute = function(start_token) {\n\t var result = null;\n\t var raw_token = start_token.next;\n\n\t // Search attributes for a type attribute\n\t while (raw_token.type !== TOKEN.EOF && start_token.closed !== raw_token) {\n\t if (raw_token.type === TOKEN.ATTRIBUTE && raw_token.text === 'type') {\n\t if (raw_token.next && raw_token.next.type === TOKEN.EQUALS &&\n\t raw_token.next.next && raw_token.next.next.type === TOKEN.VALUE) {\n\t result = raw_token.next.next.text;\n\t }\n\t break;\n\t }\n\t raw_token = raw_token.next;\n\t }\n\n\t return result;\n\t};\n\n\tvar get_custom_beautifier_name = function(tag_check, raw_token) {\n\t var typeAttribute = null;\n\t var result = null;\n\n\t if (!raw_token.closed) {\n\t return null;\n\t }\n\n\t if (tag_check === 'script') {\n\t typeAttribute = 'text/javascript';\n\t } else if (tag_check === 'style') {\n\t typeAttribute = 'text/css';\n\t }\n\n\t typeAttribute = get_type_attribute(raw_token) || typeAttribute;\n\n\t // For script and style tags that have a type attribute, only enable custom beautifiers for matching values\n\t // For those without a type attribute use default;\n\t if (typeAttribute.search('text/css') > -1) {\n\t result = 'css';\n\t } else if (typeAttribute.search(/module|((text|application|dojo)\\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\\+)?json|method|aspect))/) > -1) {\n\t result = 'javascript';\n\t } else if (typeAttribute.search(/(text|application|dojo)\\/(x-)?(html)/) > -1) {\n\t result = 'html';\n\t } else if (typeAttribute.search(/test\\/null/) > -1) {\n\t // Test only mime-type for testing the beautifier when null is passed as beautifing function\n\t result = 'null';\n\t }\n\n\t return result;\n\t};\n\n\tfunction in_array(what, arr) {\n\t return arr.indexOf(what) !== -1;\n\t}\n\n\tfunction TagFrame(parent, parser_token, indent_level) {\n\t this.parent = parent || null;\n\t this.tag = parser_token ? parser_token.tag_name : '';\n\t this.indent_level = indent_level || 0;\n\t this.parser_token = parser_token || null;\n\t}\n\n\tfunction TagStack(printer) {\n\t this._printer = printer;\n\t this._current_frame = null;\n\t}\n\n\tTagStack.prototype.get_parser_token = function() {\n\t return this._current_frame ? this._current_frame.parser_token : null;\n\t};\n\n\tTagStack.prototype.record_tag = function(parser_token) { //function to record a tag and its parent in this.tags Object\n\t var new_frame = new TagFrame(this._current_frame, parser_token, this._printer.indent_level);\n\t this._current_frame = new_frame;\n\t};\n\n\tTagStack.prototype._try_pop_frame = function(frame) { //function to retrieve the opening tag to the corresponding closer\n\t var parser_token = null;\n\n\t if (frame) {\n\t parser_token = frame.parser_token;\n\t this._printer.indent_level = frame.indent_level;\n\t this._current_frame = frame.parent;\n\t }\n\n\t return parser_token;\n\t};\n\n\tTagStack.prototype._get_frame = function(tag_list, stop_list) { //function to retrieve the opening tag to the corresponding closer\n\t var frame = this._current_frame;\n\n\t while (frame) { //till we reach '' (the initial value);\n\t if (tag_list.indexOf(frame.tag) !== -1) { //if this is it use it\n\t break;\n\t } else if (stop_list && stop_list.indexOf(frame.tag) !== -1) {\n\t frame = null;\n\t break;\n\t }\n\t frame = frame.parent;\n\t }\n\n\t return frame;\n\t};\n\n\tTagStack.prototype.try_pop = function(tag, stop_list) { //function to retrieve the opening tag to the corresponding closer\n\t var frame = this._get_frame([tag], stop_list);\n\t return this._try_pop_frame(frame);\n\t};\n\n\tTagStack.prototype.indent_to_tag = function(tag_list) {\n\t var frame = this._get_frame(tag_list);\n\t if (frame) {\n\t this._printer.indent_level = frame.indent_level;\n\t }\n\t};\n\n\tfunction Beautifier(source_text, options, js_beautify, css_beautify) {\n\t //Wrapper function to invoke all the necessary constructors and deal with the output.\n\t this._source_text = source_text || '';\n\t options = options || {};\n\t this._js_beautify = js_beautify;\n\t this._css_beautify = css_beautify;\n\t this._tag_stack = null;\n\n\t // Allow the setting of language/file-type specific options\n\t // with inheritance of overall settings\n\t var optionHtml = new Options(options, 'html');\n\n\t this._options = optionHtml;\n\n\t this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 'force'.length) === 'force';\n\t this._is_wrap_attributes_force_expand_multiline = (this._options.wrap_attributes === 'force-expand-multiline');\n\t this._is_wrap_attributes_force_aligned = (this._options.wrap_attributes === 'force-aligned');\n\t this._is_wrap_attributes_aligned_multiple = (this._options.wrap_attributes === 'aligned-multiple');\n\t this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 'preserve'.length) === 'preserve';\n\t this._is_wrap_attributes_preserve_aligned = (this._options.wrap_attributes === 'preserve-aligned');\n\t}\n\n\tBeautifier.prototype.beautify = function() {\n\n\t // if disabled, return the input unchanged.\n\t if (this._options.disabled) {\n\t return this._source_text;\n\t }\n\n\t var source_text = this._source_text;\n\t var eol = this._options.eol;\n\t if (this._options.eol === 'auto') {\n\t eol = '\\n';\n\t if (source_text && lineBreak.test(source_text)) {\n\t eol = source_text.match(lineBreak)[0];\n\t }\n\t }\n\n\t // HACK: newline parsing inconsistent. This brute force normalizes the input.\n\t source_text = source_text.replace(allLineBreaks, '\\n');\n\n\t var baseIndentString = source_text.match(/^[\\t ]*/)[0];\n\n\t var last_token = {\n\t text: '',\n\t type: ''\n\t };\n\n\t var last_tag_token = new TagOpenParserToken();\n\n\t var printer = new Printer(this._options, baseIndentString);\n\t var tokens = new Tokenizer(source_text, this._options).tokenize();\n\n\t this._tag_stack = new TagStack(printer);\n\n\t var parser_token = null;\n\t var raw_token = tokens.next();\n\t while (raw_token.type !== TOKEN.EOF) {\n\n\t if (raw_token.type === TOKEN.TAG_OPEN || raw_token.type === TOKEN.COMMENT) {\n\t parser_token = this._handle_tag_open(printer, raw_token, last_tag_token, last_token);\n\t last_tag_token = parser_token;\n\t } else if ((raw_token.type === TOKEN.ATTRIBUTE || raw_token.type === TOKEN.EQUALS || raw_token.type === TOKEN.VALUE) ||\n\t (raw_token.type === TOKEN.TEXT && !last_tag_token.tag_complete)) {\n\t parser_token = this._handle_inside_tag(printer, raw_token, last_tag_token, tokens);\n\t } else if (raw_token.type === TOKEN.TAG_CLOSE) {\n\t parser_token = this._handle_tag_close(printer, raw_token, last_tag_token);\n\t } else if (raw_token.type === TOKEN.TEXT) {\n\t parser_token = this._handle_text(printer, raw_token, last_tag_token);\n\t } else {\n\t // This should never happen, but if it does. Print the raw token\n\t printer.add_raw_token(raw_token);\n\t }\n\n\t last_token = parser_token;\n\n\t raw_token = tokens.next();\n\t }\n\t var sweet_code = printer._output.get_code(eol);\n\n\t return sweet_code;\n\t};\n\n\tBeautifier.prototype._handle_tag_close = function(printer, raw_token, last_tag_token) {\n\t var parser_token = {\n\t text: raw_token.text,\n\t type: raw_token.type\n\t };\n\t printer.alignment_size = 0;\n\t last_tag_token.tag_complete = true;\n\n\t printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);\n\t if (last_tag_token.is_unformatted) {\n\t printer.add_raw_token(raw_token);\n\t } else {\n\t if (last_tag_token.tag_start_char === '<') {\n\t printer.set_space_before_token(raw_token.text[0] === '/', true); // space before />, no space before >\n\t if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.has_wrapped_attrs) {\n\t printer.print_newline(false);\n\t }\n\t }\n\t printer.print_token(raw_token);\n\n\t }\n\n\t if (last_tag_token.indent_content &&\n\t !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {\n\t printer.indent();\n\n\t // only indent once per opened tag\n\t last_tag_token.indent_content = false;\n\t }\n\n\t if (!last_tag_token.is_inline_element &&\n\t !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {\n\t printer.set_wrap_point();\n\t }\n\n\t return parser_token;\n\t};\n\n\tBeautifier.prototype._handle_inside_tag = function(printer, raw_token, last_tag_token, tokens) {\n\t var wrapped = last_tag_token.has_wrapped_attrs;\n\t var parser_token = {\n\t text: raw_token.text,\n\t type: raw_token.type\n\t };\n\n\t printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);\n\t if (last_tag_token.is_unformatted) {\n\t printer.add_raw_token(raw_token);\n\t } else if (last_tag_token.tag_start_char === '{' && raw_token.type === TOKEN.TEXT) {\n\t // For the insides of handlebars allow newlines or a single space between open and contents\n\t if (printer.print_preserved_newlines(raw_token)) {\n\t raw_token.newlines = 0;\n\t printer.add_raw_token(raw_token);\n\t } else {\n\t printer.print_token(raw_token);\n\t }\n\t } else {\n\t if (raw_token.type === TOKEN.ATTRIBUTE) {\n\t printer.set_space_before_token(true);\n\t last_tag_token.attr_count += 1;\n\t } else if (raw_token.type === TOKEN.EQUALS) { //no space before =\n\t printer.set_space_before_token(false);\n\t } else if (raw_token.type === TOKEN.VALUE && raw_token.previous.type === TOKEN.EQUALS) { //no space before value\n\t printer.set_space_before_token(false);\n\t }\n\n\t if (raw_token.type === TOKEN.ATTRIBUTE && last_tag_token.tag_start_char === '<') {\n\t if (this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) {\n\t printer.traverse_whitespace(raw_token);\n\t wrapped = wrapped || raw_token.newlines !== 0;\n\t }\n\n\n\t if (this._is_wrap_attributes_force) {\n\t var force_attr_wrap = last_tag_token.attr_count > 1;\n\t if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.attr_count === 1) {\n\t var is_only_attribute = true;\n\t var peek_index = 0;\n\t var peek_token;\n\t do {\n\t peek_token = tokens.peek(peek_index);\n\t if (peek_token.type === TOKEN.ATTRIBUTE) {\n\t is_only_attribute = false;\n\t break;\n\t }\n\t peek_index += 1;\n\t } while (peek_index < 4 && peek_token.type !== TOKEN.EOF && peek_token.type !== TOKEN.TAG_CLOSE);\n\n\t force_attr_wrap = !is_only_attribute;\n\t }\n\n\t if (force_attr_wrap) {\n\t printer.print_newline(false);\n\t wrapped = true;\n\t }\n\t }\n\t }\n\t printer.print_token(raw_token);\n\t wrapped = wrapped || printer.previous_token_wrapped();\n\t last_tag_token.has_wrapped_attrs = wrapped;\n\t }\n\t return parser_token;\n\t};\n\n\tBeautifier.prototype._handle_text = function(printer, raw_token, last_tag_token) {\n\t var parser_token = {\n\t text: raw_token.text,\n\t type: 'TK_CONTENT'\n\t };\n\t if (last_tag_token.custom_beautifier_name) { //check if we need to format javascript\n\t this._print_custom_beatifier_text(printer, raw_token, last_tag_token);\n\t } else if (last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) {\n\t printer.add_raw_token(raw_token);\n\t } else {\n\t printer.traverse_whitespace(raw_token);\n\t printer.print_token(raw_token);\n\t }\n\t return parser_token;\n\t};\n\n\tBeautifier.prototype._print_custom_beatifier_text = function(printer, raw_token, last_tag_token) {\n\t var local = this;\n\t if (raw_token.text !== '') {\n\n\t var text = raw_token.text,\n\t _beautifier,\n\t script_indent_level = 1,\n\t pre = '',\n\t post = '';\n\t if (last_tag_token.custom_beautifier_name === 'javascript' && typeof this._js_beautify === 'function') {\n\t _beautifier = this._js_beautify;\n\t } else if (last_tag_token.custom_beautifier_name === 'css' && typeof this._css_beautify === 'function') {\n\t _beautifier = this._css_beautify;\n\t } else if (last_tag_token.custom_beautifier_name === 'html') {\n\t _beautifier = function(html_source, options) {\n\t var beautifier = new Beautifier(html_source, options, local._js_beautify, local._css_beautify);\n\t return beautifier.beautify();\n\t };\n\t }\n\n\t if (this._options.indent_scripts === \"keep\") {\n\t script_indent_level = 0;\n\t } else if (this._options.indent_scripts === \"separate\") {\n\t script_indent_level = -printer.indent_level;\n\t }\n\n\t var indentation = printer.get_full_indent(script_indent_level);\n\n\t // if there is at least one empty line at the end of this text, strip it\n\t // we'll be adding one back after the text but before the containing tag.\n\t text = text.replace(/\\n[ \\t]*$/, '');\n\n\t // Handle the case where content is wrapped in a comment or cdata.\n\t if (last_tag_token.custom_beautifier_name !== 'html' &&\n\t text[0] === '<' && text.match(/^(|]]>)$/.exec(text);\n\n\t // if we start to wrap but don't finish, print raw\n\t if (!matched) {\n\t printer.add_raw_token(raw_token);\n\t return;\n\t }\n\n\t pre = indentation + matched[1] + '\\n';\n\t text = matched[4];\n\t if (matched[5]) {\n\t post = indentation + matched[5];\n\t }\n\n\t // if there is at least one empty line at the end of this text, strip it\n\t // we'll be adding one back after the text but before the containing tag.\n\t text = text.replace(/\\n[ \\t]*$/, '');\n\n\t if (matched[2] || matched[3].indexOf('\\n') !== -1) {\n\t // if the first line of the non-comment text has spaces\n\t // use that as the basis for indenting in null case.\n\t matched = matched[3].match(/[ \\t]+$/);\n\t if (matched) {\n\t raw_token.whitespace_before = matched[0];\n\t }\n\t }\n\t }\n\n\t if (text) {\n\t if (_beautifier) {\n\n\t // call the Beautifier if avaliable\n\t var Child_options = function() {\n\t this.eol = '\\n';\n\t };\n\t Child_options.prototype = this._options.raw_options;\n\t var child_options = new Child_options();\n\t text = _beautifier(indentation + text, child_options);\n\t } else {\n\t // simply indent the string otherwise\n\t var white = raw_token.whitespace_before;\n\t if (white) {\n\t text = text.replace(new RegExp('\\n(' + white + ')?', 'g'), '\\n');\n\t }\n\n\t text = indentation + text.replace(/\\n/g, '\\n' + indentation);\n\t }\n\t }\n\n\t if (pre) {\n\t if (!text) {\n\t text = pre + post;\n\t } else {\n\t text = pre + text + '\\n' + post;\n\t }\n\t }\n\n\t printer.print_newline(false);\n\t if (text) {\n\t raw_token.text = text;\n\t raw_token.whitespace_before = '';\n\t raw_token.newlines = 0;\n\t printer.add_raw_token(raw_token);\n\t printer.print_newline(true);\n\t }\n\t }\n\t};\n\n\tBeautifier.prototype._handle_tag_open = function(printer, raw_token, last_tag_token, last_token) {\n\t var parser_token = this._get_tag_open_token(raw_token);\n\n\t if ((last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) &&\n\t !last_tag_token.is_empty_element &&\n\t raw_token.type === TOKEN.TAG_OPEN && raw_token.text.indexOf('') === 0) {\n\t // End element tags for unformatted or content_unformatted elements\n\t // are printed raw to keep any newlines inside them exactly the same.\n\t printer.add_raw_token(raw_token);\n\t parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name);\n\t } else {\n\t printer.traverse_whitespace(raw_token);\n\t this._set_tag_position(printer, raw_token, parser_token, last_tag_token, last_token);\n\t if (!parser_token.is_inline_element) {\n\t printer.set_wrap_point();\n\t }\n\t printer.print_token(raw_token);\n\t }\n\n\t //indent attributes an auto, forced, aligned or forced-align line-wrap\n\t if (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) {\n\t parser_token.alignment_size = raw_token.text.length + 1;\n\t }\n\n\t if (!parser_token.tag_complete && !parser_token.is_unformatted) {\n\t printer.alignment_size = parser_token.alignment_size;\n\t }\n\n\t return parser_token;\n\t};\n\n\tvar TagOpenParserToken = function(parent, raw_token) {\n\t this.parent = parent || null;\n\t this.text = '';\n\t this.type = 'TK_TAG_OPEN';\n\t this.tag_name = '';\n\t this.is_inline_element = false;\n\t this.is_unformatted = false;\n\t this.is_content_unformatted = false;\n\t this.is_empty_element = false;\n\t this.is_start_tag = false;\n\t this.is_end_tag = false;\n\t this.indent_content = false;\n\t this.multiline_content = false;\n\t this.custom_beautifier_name = null;\n\t this.start_tag_token = null;\n\t this.attr_count = 0;\n\t this.has_wrapped_attrs = false;\n\t this.alignment_size = 0;\n\t this.tag_complete = false;\n\t this.tag_start_char = '';\n\t this.tag_check = '';\n\n\t if (!raw_token) {\n\t this.tag_complete = true;\n\t } else {\n\t var tag_check_match;\n\n\t this.tag_start_char = raw_token.text[0];\n\t this.text = raw_token.text;\n\n\t if (this.tag_start_char === '<') {\n\t tag_check_match = raw_token.text.match(/^<([^\\s>]*)/);\n\t this.tag_check = tag_check_match ? tag_check_match[1] : '';\n\t } else {\n\t tag_check_match = raw_token.text.match(/^{{~?(?:[\\^]|#\\*?)?([^\\s}]+)/);\n\t this.tag_check = tag_check_match ? tag_check_match[1] : '';\n\n\t // handle \"{{#> myPartial}}\" or \"{{~#> myPartial}}\"\n\t if ((raw_token.text.startsWith('{{#>') || raw_token.text.startsWith('{{~#>')) && this.tag_check[0] === '>') {\n\t if (this.tag_check === '>' && raw_token.next !== null) {\n\t this.tag_check = raw_token.next.text.split(' ')[0];\n\t } else {\n\t this.tag_check = raw_token.text.split('>')[1];\n\t }\n\t }\n\t }\n\n\t this.tag_check = this.tag_check.toLowerCase();\n\n\t if (raw_token.type === TOKEN.COMMENT) {\n\t this.tag_complete = true;\n\t }\n\n\t this.is_start_tag = this.tag_check.charAt(0) !== '/';\n\t this.tag_name = !this.is_start_tag ? this.tag_check.substr(1) : this.tag_check;\n\t this.is_end_tag = !this.is_start_tag ||\n\t (raw_token.closed && raw_token.closed.text === '/>');\n\n\t // if whitespace handler ~ included (i.e. {{~#if true}}), handlebars tags start at pos 3 not pos 2\n\t var handlebar_starts = 2;\n\t if (this.tag_start_char === '{' && this.text.length >= 3) {\n\t if (this.text.charAt(2) === '~') {\n\t handlebar_starts = 3;\n\t }\n\t }\n\n\t // handlebars tags that don't start with # or ^ are single_tags, and so also start and end.\n\t this.is_end_tag = this.is_end_tag ||\n\t (this.tag_start_char === '{' && (this.text.length < 3 || (/[^#\\^]/.test(this.text.charAt(handlebar_starts)))));\n\t }\n\t};\n\n\tBeautifier.prototype._get_tag_open_token = function(raw_token) { //function to get a full tag and parse its type\n\t var parser_token = new TagOpenParserToken(this._tag_stack.get_parser_token(), raw_token);\n\n\t parser_token.alignment_size = this._options.wrap_attributes_indent_size;\n\n\t parser_token.is_end_tag = parser_token.is_end_tag ||\n\t in_array(parser_token.tag_check, this._options.void_elements);\n\n\t parser_token.is_empty_element = parser_token.tag_complete ||\n\t (parser_token.is_start_tag && parser_token.is_end_tag);\n\n\t parser_token.is_unformatted = !parser_token.tag_complete && in_array(parser_token.tag_check, this._options.unformatted);\n\t parser_token.is_content_unformatted = !parser_token.is_empty_element && in_array(parser_token.tag_check, this._options.content_unformatted);\n\t parser_token.is_inline_element = in_array(parser_token.tag_name, this._options.inline) || parser_token.tag_start_char === '{';\n\n\t return parser_token;\n\t};\n\n\tBeautifier.prototype._set_tag_position = function(printer, raw_token, parser_token, last_tag_token, last_token) {\n\n\t if (!parser_token.is_empty_element) {\n\t if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending\n\t parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name); //remove it and all ancestors\n\t } else { // it's a start-tag\n\t // check if this tag is starting an element that has optional end element\n\t // and do an ending needed\n\t if (this._do_optional_end_element(parser_token)) {\n\t if (!parser_token.is_inline_element) {\n\t printer.print_newline(false);\n\t }\n\t }\n\n\t this._tag_stack.record_tag(parser_token); //push it on the tag stack\n\n\t if ((parser_token.tag_name === 'script' || parser_token.tag_name === 'style') &&\n\t !(parser_token.is_unformatted || parser_token.is_content_unformatted)) {\n\t parser_token.custom_beautifier_name = get_custom_beautifier_name(parser_token.tag_check, raw_token);\n\t }\n\t }\n\t }\n\n\t if (in_array(parser_token.tag_check, this._options.extra_liners)) { //check if this double needs an extra line\n\t printer.print_newline(false);\n\t if (!printer._output.just_added_blankline()) {\n\t printer.print_newline(true);\n\t }\n\t }\n\n\t if (parser_token.is_empty_element) { //if this tag name is a single tag type (either in the list or has a closing /)\n\n\t // if you hit an else case, reset the indent level if you are inside an:\n\t // 'if', 'unless', or 'each' block.\n\t if (parser_token.tag_start_char === '{' && parser_token.tag_check === 'else') {\n\t this._tag_stack.indent_to_tag(['if', 'unless', 'each']);\n\t parser_token.indent_content = true;\n\t // Don't add a newline if opening {{#if}} tag is on the current line\n\t var foundIfOnCurrentLine = printer.current_line_has_match(/{{#if/);\n\t if (!foundIfOnCurrentLine) {\n\t printer.print_newline(false);\n\t }\n\t }\n\n\t // Don't add a newline before elements that should remain where they are.\n\t if (parser_token.tag_name === '!--' && last_token.type === TOKEN.TAG_CLOSE &&\n\t last_tag_token.is_end_tag && parser_token.text.indexOf('\\n') === -1) ; else {\n\t if (!(parser_token.is_inline_element || parser_token.is_unformatted)) {\n\t printer.print_newline(false);\n\t }\n\t this._calcluate_parent_multiline(printer, parser_token);\n\t }\n\t } else if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending\n\t var do_end_expand = false;\n\n\t // deciding whether a block is multiline should not be this hard\n\t do_end_expand = parser_token.start_tag_token && parser_token.start_tag_token.multiline_content;\n\t do_end_expand = do_end_expand || (!parser_token.is_inline_element &&\n\t !(last_tag_token.is_inline_element || last_tag_token.is_unformatted) &&\n\t !(last_token.type === TOKEN.TAG_CLOSE && parser_token.start_tag_token === last_tag_token) &&\n\t last_token.type !== 'TK_CONTENT'\n\t );\n\n\t if (parser_token.is_content_unformatted || parser_token.is_unformatted) {\n\t do_end_expand = false;\n\t }\n\n\t if (do_end_expand) {\n\t printer.print_newline(false);\n\t }\n\t } else { // it's a start-tag\n\t parser_token.indent_content = !parser_token.custom_beautifier_name;\n\n\t if (parser_token.tag_start_char === '<') {\n\t if (parser_token.tag_name === 'html') {\n\t parser_token.indent_content = this._options.indent_inner_html;\n\t } else if (parser_token.tag_name === 'head') {\n\t parser_token.indent_content = this._options.indent_head_inner_html;\n\t } else if (parser_token.tag_name === 'body') {\n\t parser_token.indent_content = this._options.indent_body_inner_html;\n\t }\n\t }\n\n\t if (!(parser_token.is_inline_element || parser_token.is_unformatted) &&\n\t (last_token.type !== 'TK_CONTENT' || parser_token.is_content_unformatted)) {\n\t printer.print_newline(false);\n\t }\n\n\t this._calcluate_parent_multiline(printer, parser_token);\n\t }\n\t};\n\n\tBeautifier.prototype._calcluate_parent_multiline = function(printer, parser_token) {\n\t if (parser_token.parent && printer._output.just_added_newline() &&\n\t !((parser_token.is_inline_element || parser_token.is_unformatted) && parser_token.parent.is_inline_element)) {\n\t parser_token.parent.multiline_content = true;\n\t }\n\t};\n\n\t//To be used for tag special case:\n\tvar p_closers = ['address', 'article', 'aside', 'blockquote', 'details', 'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'];\n\tvar p_parent_excludes = ['a', 'audio', 'del', 'ins', 'map', 'noscript', 'video'];\n\n\tBeautifier.prototype._do_optional_end_element = function(parser_token) {\n\t var result = null;\n\t // NOTE: cases of \"if there is no more content in the parent element\"\n\t // are handled automatically by the beautifier.\n\t // It assumes parent or ancestor close tag closes all children.\n\t // https://www.w3.org/TR/html5/syntax.html#optional-tags\n\t if (parser_token.is_empty_element || !parser_token.is_start_tag || !parser_token.parent) {\n\t return;\n\n\t }\n\n\t if (parser_token.tag_name === 'body') {\n\t // A head element’s end tag may be omitted if the head element is not immediately followed by a space character or a comment.\n\t result = result || this._tag_stack.try_pop('head');\n\n\t //} else if (parser_token.tag_name === 'body') {\n\t // DONE: A body element’s end tag may be omitted if the body element is not immediately followed by a comment.\n\n\t } else if (parser_token.tag_name === 'li') {\n\t // An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.\n\t result = result || this._tag_stack.try_pop('li', ['ol', 'ul']);\n\n\t } else if (parser_token.tag_name === 'dd' || parser_token.tag_name === 'dt') {\n\t // A dd element’s end tag may be omitted if the dd element is immediately followed by another dd element or a dt element, or if there is no more content in the parent element.\n\t // A dt element’s end tag may be omitted if the dt element is immediately followed by another dt element or a dd element.\n\t result = result || this._tag_stack.try_pop('dt', ['dl']);\n\t result = result || this._tag_stack.try_pop('dd', ['dl']);\n\n\n\t } else if (parser_token.parent.tag_name === 'p' && p_closers.indexOf(parser_token.tag_name) !== -1) {\n\t // IMPORTANT: this else-if works because p_closers has no overlap with any other element we look for in this method\n\t // check for the parent element is an HTML element that is not an ,