This repository has been archived by the owner on Mar 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
8 lines (6 loc) · 195 KB
/
index.js
1
2
3
4
5
6
7
8
'use strict';
var Ct=Object.defineProperty;var vt=(i,f)=>{for(var p in f)Ct(i,p,{get:f[p],enumerable:true});};var q=function(){const i=typeof process!=="undefined"&&process.versions!=null?"node":"browser";let f="";return {env:i,mode:"beautify",end:0,iterator:0,start:0,scopes:[],beautify:{},lexers:{},get source(){return i==="node"&&Buffer.isBuffer(f)?f.toString():f},set source(p){f=i==="node"?Buffer.isBuffer(p)?p:Buffer.from(p):p;},data:{begin:[],ender:[],lexer:[],lines:[],stack:[],token:[],types:[]},hooks:{before:[],language:[],rules:[],after:[]},stats:{chars:-1,time:-1,size:"",language:""},options:{lexer:"auto",language:"text",languageName:"Plain Text",mode:"beautify",indentLevel:0,crlf:false,commentIndent:true,endNewline:false,indentChar:" ",indentSize:2,preserveComment:false,preserveLine:2,wrap:0,grammar:{},markup:{correct:false,commentNewline:false,delimiterTrims:"preserve",delimiterSpacing:false,attributeCasing:"preserve",attributeSort:false,attributeSortList:[],forceAttribute:3,forceLeadAttribute:true,forceIndent:false,ignoreJson:false,ignoreStyles:false,ignoreScripts:false,lineBreakSeparator:"default",preserveText:false,preserveAttributes:false,selfCloseSpace:true,quoteConvert:"none",normalizeSpacing:true,valueForce:"intent"},style:{correct:false,compressCSS:false,classPadding:false,noLeadZero:false,sortSelectors:false,sortProperties:false,quoteConvert:"none",forceValue:"preserve"},script:{correct:false,braceNewline:false,bracePadding:false,braceStyle:"none",braceAllman:false,commentNewline:false,caseSpace:false,elseNewline:false,endComma:"never",arrayFormat:"default",objectSort:false,objectIndent:"default",functionNameSpace:false,functionSpace:false,styleGuide:"none",ternaryLine:false,methodChain:4,neverFlatten:false,noCaseIndent:false,noSemicolon:false,quoteConvert:"none",variableList:"none",vertical:false},json:{useStringify:false,arrayFormat:"default",braceAllman:false,bracePadding:false,objectIndent:"default",objectSort:false}}}}();var je=Object.assign;var Ue=Object.create;var Me=Object.keys;var Ke=Object.defineProperty;var Ae=Array.isArray;var g="";var ne=" ";var ce="\n";function Be(i){return new Set(i)}function $e(i,f=ne){if(i===0)return f;let p=g;let a=1;do{p+=f;}while(a++<i);return p}var c=(i,f)=>i?i.charCodeAt(0)===f:false;c.last=(i,f)=>c(i[i.length-1],f);var K=(i,f)=>c(i,f)===false;K.last=(i,f)=>c.last(i,f)===false;function be(i){return /\s/.test(i)}function pt(i){const f=1024;const p=1048576;const a=1073741824;if(i<f)return i+" B";else if(i<p)return (i/f).toFixed(1)+" KB";else if(i<a)return (i/p).toFixed(1)+" MB";else return (i/a).toFixed(1)+" GB"}function nt(i){return `\\${i}`}function Ne(i,f=NaN){if(typeof i!=="string")return g;if(K(i,60)&&K(i,123))return i;if(c(i,60)){const a=i.slice(1,i.search(/[\s>]/));return c(a,63)&&c.last(a,63)?"xml":isNaN(f)?a.toLowerCase():a.slice(f).toLowerCase()}let p=c(i[2],45)?i.slice(3).trimStart():i.slice(2).trimStart();p=p.slice(0,p.search(/[\s=|!<>,.[]|-?[%}]}/)).toLowerCase();return isNaN(f)?p:p.slice(f)}function ht(i){const f=i.indexOf("{");if(c(i[f+1],37)){let p;p=i.slice(f+(c(i[f+2],45)?3:2)).trimStart();p=p.slice(0,p.search(/[\s=|!<>,.[]|-?[%}]}/));return p.startsWith("end")?false:ke.liquid.control.has(p)}return false}function dt(i){const f=i.indexOf("{");console.log(f);if(c(i[f+1],37)){let p;p=i.slice(f+(c(i[f+2],45)?3:2)).trimStart();p=p.slice(0,p.search(/[\s=|!<>,.[]|-?[%}]}/));return p.startsWith("end")?false:ke.liquid.else.has(p)}return false}function gt(i){const f=i.indexOf("=");if(f>-1){if(c(i[f+1],34)||c(i[f+1],39)){return /{%-?\s*end\w+/.test(i.slice(f,i.lastIndexOf(i[f+1])))}}return false}function st(i){if(Xe(i))return /{%-?\s*end\w+/.test(i);return false}function Xe(i,f=false){let p;if(f){if(Ie(i,6)&&Ie(i,8)){p=i.slice(c(i[2],45)?3:2).trimStart();p=p.slice(0,p.search(/[\s=|!<>,.[]|-?[%}]}/));return p.startsWith("end")?false:ke.liquid.tags.has(p)}return false}const a=i.indexOf("{");if(c(i[a+1],37)){p=i.slice(a+(c(i[a+2],45)?3:2)).trimStart();p=p.slice(0,p.search(/[\s=|!<>,.[]|-?[%}]}/));return p.startsWith("end")?false:ke.liquid.tags.has(p)}return false}function Ve(i){let f=i;if(Array.isArray(i))f=i.join("");const p=f.indexOf("{");if(c(f[p+1],37)){if(c(f[p+2],45))return f.slice(p+3).trimStart().startsWith("end");return f.slice(p+2).trimStart().startsWith("end")}return false}function Ie(i,f){if(f===1){return c(i[0],123)&&(c(i[1],37)||c(i[1],123))}else if(f===6){return c(i[0],123)&&c(i[1],37)}else if(f===7){return c(i[0],123)&&c(i[1],123)}else if(f===8){return c(i[i.length-2],37)&&c(i[i.length-1],125)}else if(f===9){return c(i[i.length-2],125)&&c(i[i.length-1],125)}else if(f===4){return /{[{%]/.test(i)}else if(f===5){return /{[{%]/.test(i)&&/[%}]}/.test(i)}else if(f===2){const p=i.length;return c(i[p-1],125)&&(c(i[p-2],37)||c(i[p-2],125))}else if(f===3){const p=i.length;return c(i[0],123)&&(c(i[1],37)||c(i[1],123))&&(c(i[p-1],125)&&(c(i[p-2],37)||c(i[p-2],125)))}}function it(i){let f=0;const p=i.length;const a=i;const r=()=>{let w=0;const E=a.length;if(w<E){do{if(Ae(a[w])===true)a[w]=it.apply(this,a[w]);w=w+1;}while(w<E)}};const t=w=>{let E=f;let $=0;let o=0;let L=0;let e=[];let m=a[f];let _="";const Z=typeof m;if(E<p){do{_=typeof a[E];if(a[E]<m||_<Z){m=a[E];e=[E];}else if(a[E]===m){e.push(E);}E=E+1;}while(E<p)}o=e.length;E=f;$=o+f;if(E<$){do{a[e[L]]=a[E];a[E]=m;L=L+1;E=E+1;}while(E<$)}f=f+o;if(f<p){t("");}else {if(this.recursive===true)r();i=a;}return w};t("");return i}function rt(i){let f=0;const p=i.length;const a=i;const r=()=>{let w=0;const E=a.length;if(w<E){do{if(Ae(a[w]))a[w]=rt.apply(this,a[w]);w=w+1;}while(w<E)}};const t=w=>{let E=f;let $=0;let o=0;let L=0;let e=a[f];let m=[];let _="";const Z=typeof e;if(E<p){do{_=typeof a[E];if(a[E]>e||_>Z){e=a[E];m=[E];}else if(a[E]===e){m.push(E);}E=E+1;}while(E<p)}o=m.length;E=f;$=o+f;if(E<$){do{a[m[L]]=a[E];a[E]=e;L=L+1;E=E+1;}while(E<$)}f=f+o;if(f<p){t("");}else {if(this.recursive===true)r();i=a;}return w};t("");return i}function ot(i){let f=i;const p=[i[0]];const a=()=>{let t=0;const w=f.length;if(t<w){do{if(Ae(f[t]))f[t]=ot.apply(this,f[t]);t=t+1;}while(t<w)}};const r=t=>{let w=0;const E=[];const $=f.length;if(w<$){do{if(f[w]!==t)E.push(f[w]);w=w+1;}while(w<$)}f=E;if(E.length>0){p.push(E[0]);r(E[0]);}else {if(this.recursive===true)a();i=f;}};r(this.array[0]);return i}var we;var ke=new(we=class{constructor(){this.script={};this.style={};this.html={embed:{}};this.liquid={embed:{}};this.script.keywords=Be(we.script.keywords);this.style.units=Be(we.style.units);this.style.atrules=Be(we.style.atrules);this.style.pseudoFunctions=Be(we.style.pseudo.functions);this.style.pseudoClasses=Be(we.style.pseudo.classes);this.style.pseudoElements=Be(we.style.pseudo.elements);this.html.tags=Be(we.html.tags);this.html.voids=Be(we.html.voids);this.liquid.tags=Be(we.liquid.tags);this.liquid.control=Be(we.liquid.control);this.liquid.else=Be(we.liquid.else);this.liquid.singletons=Be(we.liquid.singletons);this.defaults();}defaults(){for(const f in we.html.embedded){this.html.embed[f]={};for(const{language:p,attribute:a=null}of we.html.embedded[f]){this.html.embed[f].language=p;if(typeof a==="object"){for(const r in a){this.html.embed[f].attribute=r;if(Ae(a[r])){this.html.embed[f].value=t=>new Set(a[r]).has(t);}else {this.html.embed[f].value=t=>new RegExp(a[r]).test(t);}}}else {this.html.embed[f].attribute=null;}}}for(const f in we.liquid.embedded){this.liquid.embed[f]={end:p=>new RegExp(`^{%-?\\s*end${f}`).test(p)};for(const{language:p,argument:a}of we.liquid.embedded[f]){this.liquid.embed[f].language=p;if(a){if(Ae(a)){this.liquid.embed[f].attribute=r=>new Set(a).has(r);}else {this.liquid.embed[f].attribute=r=>new RegExp(a).test(r);}}else {this.liquid.embed[f].attribute=null;}}}}embed(f,p){if(p in this[f].embed)return this[f].embed[p];return false}extend(f){for(const p in f){if(p==="html"){if("tags"in f[p]&&Ae(f[p].tags)){for(const a of f[p].tags){if(!this.html.tags.has(a)){we.html.tags.push(a);this.html.tags.add(a);}}}if("voids"in f[p]&&Ae(f[p].voids)){for(const a of f[p].voids){if(!this.html.voids.has(a)){we.html.voids.push(a);this.html.voids.add(a);}}}if("embedded"in f[p]);}if(p==="liquid"){if("tags"in f[p]&&Ae(f[p].tags)){for(const a of f[p].tags){if(!this.liquid.tags.has(a)){we.liquid.tags.push(a);this.liquid.tags.add(a);}}}if("else"in f[p]&&Ae(f[p].else)){for(const a of f[p].else){if(!this.liquid.else.has(a)){we.liquid.else.push(a);this.liquid.else.add(a);}}}if("singletons"in f[p]&&Ae(f[p].singletons)){for(const a of f[p].singletons){if(!this.liquid.singletons.has(a)){we.liquid.singletons.push(a);this.liquid.singletons.add(a);}}}if("embedded"in f[p]&&typeof f[p].embedded==="object"){for(const a in f[p].embedded){if(!(a in this.liquid.embed)){this.liquid.embed[a]={end:r=>new RegExp(`{%-?\\s*end${a}`).test(r)};}for(const{language:r,argument:t}of f[p].embedded[a]){if(this.liquid.embed[a].language!==r){this.liquid.embed[a].language=r;}if(t){if(this.liquid.embed[a].attribute===null){if(Ae(t)){this.liquid.embed[a].attribute=w=>Be(t).has(w);}else {this.liquid.embed[a].attribute=w=>new RegExp(t).test(w);}}else {const w=[];for(const E of we.liquid.embedded[a]){if(Ae(E.argument)){for(const $ of E.argument){if(t!==$)w.push(t);else w.push($);}this.liquid.embed[a].attribute=$=>Be(w).has($);}else {if(E.argument!==t){this.liquid.embed[a].attribute=$=>new RegExp(t).test($);}}}}}}}}}if(p==="style"){if("units"in f[p]&&Ae(f[p].units)){for(const a of f[p].units){if(!this.style.units.has(a)){we.style.units.push(a);this.style.units.add(a);}}}if("atrules"in f[p]&&Ae(f[p].atrules)){for(const a of f[p].atrules){if(!this.style.atrules.has(a)){we.style.atrules.push(a);this.style.atrules.add(a);}}}if("pseudo"in f[p]){if("classes"in f[p].pseudo&&Ae(f[p].pseudo.classes)){for(const a of f[p].pseudo.classes){if(!this.style.pseudoClasses.has(a)){we.style.pseudo.classes.push(a);this.style.pseudoClasses.add(a);}}}if("elements"in f[p].pseudo&&Ae(f[p].pseudo.elements)){for(const a of f[p].pseudo.elements){if(!this.style.pseudoElements.has(a)){we.style.pseudo.elements.push(a);this.style.pseudoElements.add(a);}}}}}if(p==="script"){if("keywords"in f[p]&&Ae(f[p].keywords)){for(const a of f[p].keywords){if(!this.script.keywords.has(a)){we.script.keywords.push(a);this.script.keywords.add(a);}}}}}}},we.script={keywords:["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"]},we.html={embedded:{script:[{language:"javascript"},{language:"json",attribute:{type:["application/json","application/ld+json"]}},{language:"jsx",attribute:{type:["text/jsx","application/jsx"]}}],style:[{language:"css"}]},voids:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","path","circle","source","track","wbr"],tags:["body","colgroup","dd","dt","head","html","li","option","tbody","td","tfoot","th","thead","tr"]},we.liquid={embedded:{schema:[{language:"json"}],style:[{language:"css"}],stylesheet:[{language:"css"},{language:"scss",argument:/\s*['"]scss['"]/}],javascript:[{language:"javascript"}]},tags:["form","paginate","capture","case","comment","for","if","raw","tablerow","unless","schema","style","script","stylesheet","javascript"],control:["if","unless","case"],else:["else","elsif"],singletons:["include","layout","section","assign","liquid","break","continue","cycle","decrement","echo","increment","render","when"]},we.style={units:["%","cap","ch","cm","deg","dpcm","dpi","dppx","em","ex","fr","grad","Hz","ic","in","kHz","lh","mm","ms","mS","pc","pt","px","Q","rad","rem","rlh","s","turn","vb","vh","vi","vmax","vmin","vw"],atrules:["charset","color-profile","counter-style","font-face","font-feature-values","import","keyframes","layer","media","namespace","page","supports"],pseudo:{classes:["active","any-link","checked","default","defined","disabled","empty","enabled","first","first-child","first-of-type","fullscreen","focus","focus-visible","focus-within","host","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","modal","not","nth-child","nth-col","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","picture-in-picture","placeholder-shown","paused","playing","read-only","read-write","required","right","root","scope","target","valid","visited","where"],elements:["after","backdrop","before","cue","cue-region","first-letter","first-line","file-selector-button","marker","part","placeholder","selection","slotted"],functions:["after","before","first-letter","first-line","host","host-context","part","slotted","lang","not","nth-child","nth-col","nth-last-child","nth-last-of-type","nth-of-type","where"]}},we);var He=/^\s+/;var De=/\s+$/;var Qe=/^[\t\v\f\r \u00a0\u2000-\u200b\u2028-\u2029\u3000]+/;var Ee=/[\t\v\f \u00a0\u2000-\u200b\u2028-\u2029\u3000]+$/;var lt=/[\t\v\r \u00a0\u2000-\u200b\u2028-\u2029\u3000]+/g;var bt=/(\/[*/]|{%-?\s*(?:comment\s*-?%}|#)|<!-{2})\s*@prettify\s+/;var mt=/(\/[*/]|{%-?\s*(?:comment\s*-?%})|<!-{2})\s*@prettify-ignore\b/;var kt=/(\/[*/]|{%-?\s*(?:comment\s*-?%}|#)|<!-{2})\s*@prettify-ignore-next\b/;var yt=/{%-?\s*|\s*-?%}/g;var at=/(\/|\\|\||\*|\[|\]|\{|\})/g;var et={markup:"markup",html:"markup",liquid:"markup",xml:"markup",javascript:"script",typescript:"script",jsx:"script",tsx:"script",json:"script",less:"style",scss:"style",sass:"style",css:"style",text:"text"};var xt={html:"HTML",xhtml:"XHTML",liquid:"Liquid",xml:"XML",jsx:"JSX",tsx:"TSX",json:"JSON",yaml:"YAML",css:"CSS",scss:"SCSS",sass:"SASS",less:"LESS",text:"Plain Text",javascript:"JavaScript",typescript:"TypeScript"};function ct(i){return typeof i!=="string"||i.indexOf("html")>-1||et[i]===void 0?"markup":et[i]}function Lt(i){if(typeof i!=="string"||xt[i]===void 0)return i.toUpperCase();return xt[i]}function Oe(i){const f={};if(i==="unknown"){f.language=i;f.languageName="Unknown";f.lexer="markup";}else if(i==="xhtml"||i==="markup"){f.language="xml";f.languageName="XHTML";f.lexer="markup";}else {f.language=i;f.languageName=Lt(i);f.lexer=ct(i);}if(q.hooks.language.length>0){for(const p of q.hooks.language){const a=p(f);if(typeof a==="object")je(f,a);}}return f}Ze.reference=Oe;Ze.listen=function(i){q.hooks.language.push(i);};function Ze(i){let f=[];let p=0;const a=/(((var)|(let)|(const)|(function)|(import))\s+(\w|\$)+[a-zA-Z0-9]*)/.test(i)&&/@import/.test(i)===false;const r=/((((final)|(public)|(private))\s+static)|(static\s+void))/.test(i);function t(){if(/\n\s*#+\s+/.test(i)||/^#+\s+/.test(i))return Oe("markdown");if(/\$[a-zA-Z]/.test(i)||/\{\s*(\w|\.|\$|#)+\s*\{/.test(i)||/^[.#]?[\w][\w-]+\s+\{(?:\s+[a-z][a-z-]+:\s*\S+;)+\s+[&>+]?\s+[.#:]?[\w][\w-]\s+\{/.test(i)&&/:\s*@[a-zA-Z];/.test(i)===false)return Oe("scss");if(/@[a-zA-Z]:/.test(i)||/\.[a-zA-Z]\(\);/.test(i))return Oe("less");return Oe("css")}function w(){let $=1;let o=g;let L=false;let e=false;const m=/((public)|(private))\s+(static\s+)?(((v|V)oid)|(class)|(final))/.test(i);function _(){if(i.indexOf("(")>-1||i.indexOf("=")>-1||i.indexOf(";")>-1&&i.indexOf("{")>-1){if(r===true||/\w<\w+(,\s+\w+)*>/.test(i))return Oe("typescript");if(/(?:var|let|const)\s+\w+\s*:/.test(i)||/=\s*<\w+/.test(i))return Oe("typescript");return Oe("javascript")}return Oe("unknown")}function Z(){if(/:\s*(?:number|string|boolean|any|unknown)(?:\[\])?/.test(i)||/(?:public|private)\s+/.test(i)||/(?:export|declare)\s+type\s+\w+\s*=/.test(i)||/(?:namespace|interface|enum|implements|declare)\s+\w+/.test(i)||/(?:typeof|keyof|as)\s+\w+/.test(i)||/\w+\s+as\s+\w+/.test(i)||/\[\w+(?:(?::\s*\w+)|(?:\s+in\s+\w+))\]:/.test(i)||/\):\s*\w+(?:\[\])?\s*(?:=>|\{)\s+/.test(i)||/(var|const|let)\s+\w+:\s*(string|number|boolean|string|any)(\[\])?/.test(i))return Oe("typescript");if(/\s(class|var|const|let)\s+\w/.test(i)===false&&/<[a-zA-Z](?:-[a-zA-Z])?/.test(i)&&/<\/[a-zA-Z-](?:-[a-zA-Z])?/.test(i)&&(/\s?\{%/.test(i)||/{{/.test(i)))return Oe("liquid");if(/^(\s*[$@])/.test(i)===false&&/([}\]];?\s*)$/.test(i)){if(/^\s*import\s+\*\s+as\s+\w+\s+from\s+['"]/.test(i)||/module\.export\s+=\s+/.test(i)||/export\s+default\s+\{/.test(i)||/[?:]\s*[{[]/.test(i)||/^(?:\s*return;?(?:\s+[{[])?)/.test(i)){return Oe("javascript")}}if(/{%/.test(i)&&/{{/.test(i)&&/<\w/.test(i))return Oe("liquid");if(/{\s*(?:\w|\.|@|#)+\s*\{/.test(i))return Oe("less");if(/\$(\w|-)/.test(i))return Oe("scss");if(/[;{:]\s*@\w/.test(i)===true)return Oe("less");return Oe("css")}if($<p){do{if(L===false){if(c(f[$],42)&&c(f[$-1],47)){f[$-1]=g;L=true;}else if(e===false&&$<p-6&&f[$].charCodeAt(0)===102&&f[$+1].charCodeAt(0)===105&&f[$+2].charCodeAt(0)===108&&f[$+3].charCodeAt(0)===116&&f[$+4].charCodeAt(0)===101&&f[$+5].charCodeAt(0)===114&&c(f[$+6],58)){e=true;}}else if(L===true&&c(f[$],42)&&$!==p-1&&c(f[$+1],47)){L=false;f[$]=g;f[$+1]=g;}else if(e===true&&c(f[$],59)){e=false;f[$]=g;}if(L===true||e===true)f[$]=g;$=$+1;}while($<p)}o=f.join(g);if(/\s\/\//.test(i)===false&&/\/\/\s/.test(i)===false&&/^(\s*(\{|\[)(?!%))/.test(i)===true&&/((\]|\})\s*)$/.test(i)&&i.indexOf(",")!==-1)return Oe("json");if(/((\}?(\(\))?\)*;?\s*)|([a-z0-9]("|')?\)*);?(\s*\})*)$/i.test(i)===true&&(a===true||m===true||/console\.log\(/.test(i)===true||/export\s+default\s+class\s+/.test(i)===true||/export\s+(const|var|let|class)s+/.test(i)===true||/document\.get/.test(i)===true||/((=|(\$\())\s*function)|(\s*function\s+(\w*\s+)?\()/.test(i)===true||i.indexOf("{")===-1||/^(\s*if\s+\()/.test(i)===true))return _();if(i.indexOf("{")>-1&&(/^(\s*[\u007b\u0024\u002e#@a-z0-9])/i.test(i)||/^(\s*\/(\*|\/))/.test(i)||/^(\s*\*\s*\{)/.test(i))&&/^(\s*if\s*\()/.test(i)===false&&/=\s*(\{|\[|\()/.test(o)===false&&(/(\+|-|=|\?)=/.test(o)===false||/\/\/\s*=+/.test(o)||/=+('|")?\)/.test(i)&&/;\s*base64/.test(i))&&/function(\s+\w+)*\s*\(/.test(o)===false)return Z();return i.indexOf("{%")>-1?Oe("liquid"):Oe("unknown")}function E(){function $(){return /{%-?\s*(schema|for|if|unless|render|include)/.test(i)||/{%-?\s*end\w+/.test(i)||/{{-?\s*content_for/.test(i)||/{{-?\s*[a-zA-Z0-9_'".[\]]+\s*-?}}/.test(i)||/{%/.test(i)&&/%}/.test(i)&&/{{/.test(i)&&/}}/.test(i)?Oe("liquid"):Oe("html")}return /^(\s*<!doctype\s+html>)/i.test(i)||/^(\s*<html)/i.test(i)||/<form\s/i.test(i)&&/<label\s/i.test(i)&&/<input\s/i.test(i)||(/<img(\s+\w+=['"]?\S+['"]?)*\s+src\s*=/.test(i)||/<a(\s+\w+=['"]?\S+['"]?)*\s+href\s*=/.test(i))||/<ul\s/i.test(i)&&/<li\s/i.test(i)&&/<\/li>/i.test(i)&&/<\/ul>/i.test(i)||/<head\s*>/.test(i)&&/<\/head>/.test(i)||/^(\s*<!DOCTYPE\s+((html)|(HTML))\s+PUBLIC\s+)/.test(i)&&/XHTML\s+1\.1/.test(i)===false&&/XHTML\s+1\.0\s+(S|s)((trict)|(TRICT))/.test(i)===false?$():/\s?{[{%]-?/.test(i)?Oe("liquid"):Oe("xml")}if(i===null||i.replace(/\s+/g,g)===g)return Oe("unknown");if((/\n\s*#{1,6}\s+/.test(i)||/\n\s*(?:\*|-|(?:\d+\.))\s/.test(i))&&(/\[( |x|X)\]/.test(i)||/\s[*_~]{1,2}\w+[*_~]{1,2}/.test(i)||/\n\s*```[a-zA-Z]*?\s+/.test(i)||/-+\|(-+\|)+/.test(i)))return Oe("markdown");if(/^(\s*<!DOCTYPE\s+html>)/i.test(i))return E();if(/^\s*@(?:charset|import|include|keyframes|media|namespace|page)\b/.test(i))return t();if(r===false&&/=(>|=|-|\+|\*)/.test(i)===false&&/^(?:\s*((if)|(for)|(function))\s*\()/.test(i)===false&&/(?:\s|;|\})((if)|(for)|(function\s*\w*))\s*\(/.test(i)===false&&a===false&&/return\s*\w*\s*(;|\})/.test(i)===false&&(i===void 0||/^(?:\s*#(?!(!\/)))/.test(i)||/\n\s*(\.|@)\w+(\(|(\s*:))/.test(i)&&/>\s*<\w/.test(i)===false||(/^\s*:root\s*\{/.test(i)||/-{2}\w+\s*\{/.test(i)||/^\s*(?:body|button|hr|section|h[1-6]|p|strong|\*)\s+\{\s+/.test(i))))return t();f=i.replace(/\[[a-zA-Z][\w-]*=['"]?[a-zA-Z][\w-]*['"]?\]/g,g).split(g);p=f.length;if(/^(\s*({{|{%|<))/.test(i))return E();if(r===true||/^(?:[\s\w-]*<)/.test(i)===false&&/(?:>[\s\w-]*)$/.test(i)===false)return w();return (/^(?:\s*<\?xml)/.test(i)||/(?:>[\w\s:]*)?<(?:\/|!|#)?[\w\s:\-[]+/.test(i)||/^\s*</.test(i)&&/<\/\w+(\w|\d)+>\s*$/.test(i))&&(/^(?:[\s\w]*<)/.test(i)||/(?:>[\s\w]*)$/.test(i))||/^(?:\s*<s((cript)|(tyle)))/i.test(i)&&/(?:<\/s((cript)|(tyle))>\s*)$/i.test(i)?/^(?:[\s\w]*<)/.test(i)===false||/(?:>[\s\w]*)$/.test(i)===false?w():E():Oe("unknown")}var s=new class on{constructor(){this.datanames=["begin","ender","lexer","lines","stack","token","types"];this.data={begin:[],ender:[],lexer:[],lines:[],stack:[],token:[],types:[]};this.structure=[["global",-1]];this.attributes=new Set;this.references=[[]];this.count=-1;this.lineStart=0;this.lineNumber=0;this.linesSpace=0;this.error=g;}get scope(){const[f,p]=this.structure[this.structure.length-1];return {token:f,index:p}}get current(){const{begin:f,ender:p,lexer:a,lines:r,stack:t,token:w,types:E}=this.data;return {begin:f[f.length-1],ender:p[p.length-1],lexer:a[a.length-1],lines:r[r.length-1],stack:t[t.length-1],token:w[f.length-1],types:E[f.length-1]}}full(){this.error=g;this.count=-1;this.linesSpace=0;this.lineNumber=0;this.references=[[]];this.data.begin=[];this.data.ender=[];this.data.lexer=[];this.data.lines=[];this.data.stack=[];this.data.token=[];this.data.types=[];this.structure=[["global",-1]];this.structure.pop=()=>{const f=this.structure.length-1;const p=this.structure[f];if(f>0)this.structure.splice(f,1);return p};return this.data}increment(){this.error=g;this.count=-1;this.linesSpace=0;this.lineNumber=0;this.references=[[]];this.data.begin=[];this.data.ender=[];this.data.lexer=[];this.data.lines=[];this.data.stack=[];this.data.token=[];this.data.types=[];this.structure=[["global",-1]];this.structure.pop=()=>{const f=this.structure.length-1;const p=this.structure[f];if(f>0)this.structure.splice(f,1);return p};return this.data}pushEnder(f){let p=this.count;const a=f.begin[p];if(f.lexer[p]==="style"&&q.options.style.sortProperties===true||f.lexer[p]==="script"&&(q.options.script.objectSort===true||q.options.json.objectSort===true)){return}do{if(f.begin[p]===a||f.begin[f.begin[p]]===a&&f.types[p].indexOf("attribute")>-1&&f.types[p].indexOf("attribute_end")<0){f.ender[p]=this.count;}else {p=f.begin[p];}p=p-1;}while(p>a);if(p>-1)f.ender[p]=this.count;}lexer(f,p){const a=et[p];const r=q.options.language;q.options.language=p;if(p==="json"){const t=je({},q.options.json);const w=je({},q.options.script);q.options.script=je(q.options.script,q.options.json,{quoteConvert:"double",endComma:"never",noSemicolon:true,vertical:false});q.lexers[a](f);if(p==="json"&&q.options.json.objectSort===true){this.sortCorrect(0,this.count+1);}q.options.language=r;q.options.json=t;q.options.script=w;}else {q.lexers[a](f);if(p==="javascript"&&q.options.script.objectSort===true||(p==="css"||p==="scss")&&q.options.style.sortProperties===true){this.sortCorrect(0,this.count+1);}q.options.language=r;}}beautify(f){q.options.indentLevel=f;const p=c(this.data.token[q.start],123)?"liquid":"html";const a=Ne(this.data.stack[q.start]);const r=ke.embed(p,a);const t=q.options.language;if(r!==false){const w=this.data.lexer[q.start];q.options.language=r.language;if(r.language==="json"){const E=je({},q.options.json);const $=je({},q.options.script);q.options.script=je(q.options.script,q.options.json,{quoteConvert:"double",endComma:"never",noSemicolon:true,vertical:false});return {reset(){q.options.language=t;q.options.indentLevel=0;q.options.json=E;q.options.script=$;},get beautify(){return q.beautify[w](q.options)}}}return {reset(){q.options.language=t;q.options.indentLevel=0;},get beautify(){return q.beautify[w](q.options)}}}return null}push(f,p,a=g){f.begin.push(p.begin);f.ender.push(p.ender);f.lexer.push(p.lexer);f.stack.push(p.stack);f.token.push(p.token);f.types.push(p.types);f.lines.push(p.lines);if(f===this.data){this.count=this.count+1;this.linesSpace=0;if(p.lexer!=="style"&&a.replace(/[{}@<>%#]/g,g)===g){a=p.types==="else"?"else":Ne(p.token);}if(p.types==="start"||p.types.indexOf("_start")>0){this.structure.push([a,this.count]);}else if(p.types==="end"||p.types.indexOf("_end")>0){let r=0;const t=this.structure.length;if(this.structure.length>2&&(f.types[this.structure[t-1][1]]==="else"||f.types[this.structure[t-1][1]].indexOf("_else")>0)&&(f.types[this.structure[t-2][1]]==="start"||f.types[this.structure[t-2][1]].indexOf("_start")>0)&&(f.types[this.structure[t-2][1]+1]==="else"||f.types[this.structure[t-2][1]+1].indexOf("_else")>0)){this.structure.pop();f.begin[this.count]=this.structure[this.structure.length-1][1];f.stack[this.count]=this.structure[this.structure.length-1][0];f.ender[this.count-1]=this.count;r=f.ender[f.begin[this.count]+1];}this.pushEnder(f);if(r>0)f.ender[f.begin[this.count]+1]=r;this.structure.pop();}else if(p.types==="else"||p.types.indexOf("_else")>0){if(a===g)a="else";if(this.count>0&&(f.types[this.count-1]==="start"||f.types[this.count-1].indexOf("_start")>0)){this.structure.push([a,this.count]);}else {this.pushEnder(f);this.structure[this.structure.length-1]=a===g?["else",this.count]:[a,this.count];}}}}pop(f){const p={begin:f.begin.pop(),ender:f.ender.pop(),lexer:f.lexer.pop(),lines:f.lines.pop(),stack:f.stack.pop(),token:f.token.pop(),types:f.types.pop()};if(f===this.data)this.count=this.count-1;return p}concat(f,p){f.begin=f.begin.concat(p.begin);f.ender=f.ender.concat(p.ender);f.lexer=f.lexer.concat(p.lexer);f.stack=f.stack.concat(p.stack);f.token=f.token.concat(p.token);f.types=f.types.concat(p.types);f.lines=f.lines.concat(p.lines);if(f===this.data)this.count=f.token.length-1;}sortObject(f){let p=this.count;let a=this.structure[this.structure.length-1][1];let r=0;let t=0;let w=0;let E=0;let $=0;let o=0;let L=0;let e=true;const m=[];const _=a;const Z=this.structure[this.structure.length-1][0];const n=this.linesSpace;const A=this.count;const C=q.options.language==="json";const u=f.lexer[p]==="style"&&Z==="global";const X=f.lexer[p]==="style";const ee=X===true?[";","separator"]:[",","separator"];const h=u===true?"global":Z;const M={begin:[],ender:[],lexer:[],lines:[],stack:[],token:[],types:[]};const y=(z,b)=>{let k=z[0];let d=b[0];if(f.types[k]==="comment"){do k=k+1;while(k<A&&f.types[k]==="comment");if(f.token[k]===void 0)return 1}if(f.types[d]==="comment"){do d=d+1;while(d<A&&f.types[d]==="comment");if(f.token[d]===void 0)return 1}if(X===true){if(f.token[k].indexOf("@import")===0||f.token[d].indexOf("@import")===0){return k<d?-1:1}if(f.types[k]!==f.types[d]){if(f.types[k]==="function")return 1;if(f.types[k]==="variable")return -1;if(f.types[k]==="selector")return 1;if(f.types[k]==="property"&&f.types[d]!=="variable")return -1;if(f.types[k]==="mixin"&&f.types[d]!=="property"&&f.types[d]!=="variable")return -1}}if(f.token[k].toLowerCase()>f.token[d].toLowerCase())return 1;return -1};E=p;do{if(f.begin[p]===a||u===true&&p<E&&c(f.token[p],125)&&f.begin[f.begin[p]]===-1){if(f.types[p].indexOf("template")>-1)return;if(f.token[p]===ee[0]||X===true&&c(f.token[p],125)&&K(f.token[p+1],59)){e=true;$=p+1;}else if(X===true&&c(f.token[p-1],125)){e=true;$=p;}if($===0&&f.types[0]==="comment"){do $=$+1;while(f.types[$]==="comment")}else if(f.types[$]==="comment"&&f.lines[$]<2){$=$+1;}if(e===true&&(f.token[p]===ee[0]||X===true&&c(f.token[p-1],125))&&$<=E){if(X===true&&"};".indexOf(f.token[E])<0){E=E+1;}else if(X===false&&K(f.token[E],44)){E=E+1;}m.push([$,E]);if(X===true&&c(f.token[$],125)){E=$;}else {E=$-1;}}}p=p-1;}while(p>a);if(m.length>0&&m[m.length-1][0]>p+1){r=m[m.length-1][0]-1;if(f.types[r]==="comment"&&f.lines[r]>1){do r=r-1;while(r>0&&f.types[r]==="comment");m[m.length-1][0]=r+1;}if(f.types[p+1]==="comment"&&p===-1){do p=p+1;while(f.types[p+1]==="comment")}m.push([p+1,r]);}if(m.length>1){if(C===true||X===true||c(f.token[p-1],61)||c(f.token[p-1],58)||c(f.token[p-1],40)||c(f.token[p-1],91)||c(f.token[p-1],44)||f.types[p-1]==="word"||p===0){m.sort(y);L=m.length;e=false;a=0;do{o=m[a][1];if(X===true){w=o;if(f.types[w]==="comment")w=w-1;if(c(f.token[w],125)){o=o+1;ee[0]="}";ee[1]="end";}else {ee[0]=";";ee[1]="separator";}}r=m[a][0];if(X===true&&f.types[o-1]!=="end"&&f.types[o]==="comment"&&f.types[o+1]!=="comment"&&a<L-1){o=o+1;}if(r<o){do{if(X===false&&a===L-1&&r===o-2&&c(f.token[r],44)&&f.lexer[r]==="script"&&f.types[r+1]==="comment"){t=t+1;}else {this.push(M,{begin:f.begin[r],ender:f.ender[r],lexer:f.lexer[r],lines:f.lines[r],stack:f.stack[r],token:f.token[r],types:f.types[r]});t=t+1;}if(f.token[r]===ee[0]&&(X===true||f.begin[r]===f.begin[m[a][0]])){e=true;}else if(f.token[r]!==ee[0]&&f.types[r]!=="comment"){e=false;}r=r+1;}while(r<o)}if(e===false&&M.token[M.token.length-1]!=="x;"&&(X===true||a<L-1)){r=M.types.length-1;if(M.types[r]==="comment"){do r=r-1;while(r>0&&M.types[r]==="comment")}r=r+1;this.splice({data:M,howmany:0,index:r,record:{begin:_,stack:h,ender:this.count,lexer:M.lexer[r-1],lines:0,token:ee[0],types:ee[1]}});t=t+1;}a=a+1;}while(a<L);this.splice({data:f,howmany:t,index:p+1});this.linesSpace=n;this.concat(f,M);}}}sortSafe(f,p,a){if(Ae(f)===false)return f;if(p==="normal")return ot.call({array:f,recursive:a},f);if(p==="descend")return rt.call({recursive:a},f);return it.call({recursive:a},f)}sortCorrect(f,p){let a=f;let r=-1;const t=this.data;const w=[];const E=this.structure.length<2?[-1]:[this.structure[this.structure.length-2][1]];do{if(a>0&&t.types[a].indexOf("attribute")>-1&&t.types[a].indexOf("end")<0&&t.types[a-1].indexOf("start")<0&&t.types[a-1].indexOf("attribute")<0&&t.lexer[a]==="markup"){E.push(a-1);}if(a>0&&t.types[a-1].indexOf("attribute")>-1&&t.types[a].indexOf("attribute")<0&&t.lexer[E[E.length-1]]==="markup"&&t.types[E[E.length-1]].indexOf("start")<0){E.pop();}if(t.begin[a]!==E[E.length-1]){t.begin[a]=E.length>0?E[E.length-1]:-1;}if(t.types[a].indexOf("else")>-1){if(E.length>0){E[E.length-1]=a;}else {E.push(a);}}if(t.types[a].indexOf("end")>-1)E.pop();if(t.types[a].indexOf("start")>-1)E.push(a);a=a+1;}while(a<p);a=p;do{a=a-1;if(t.types[a].indexOf("end")>-1){w.push(a);r=r+1;}t.ender[a]=r>-1?w[r]:-1;if(t.types[a].indexOf("start")>-1){w.pop();r=r-1;}}while(a>f)}space(f,p){this.linesSpace=1;return a=>{do{if(c(f[a],10))this.lineNumber=this.lineNumber+1;if(be(f[a])===false)break;this.linesSpace=this.linesSpace+1;a=a+1;}while(a<p);return a}}spacer(f){this.linesSpace=1;do{if(f.array[f.index]===ce){this.linesSpace=this.linesSpace+1;this.lineNumber=this.lineNumber+1;}if(be(f.array[f.index+1])===false)break;f.index=f.index+1;}while(f.index<f.end);return f.index}splice(f){const{data:p}=this;const a=[p.begin[this.count],p.token[this.count]];if(f.record!==void 0&&f.record.token!==g){for(const r of this.datanames){f.data[r].splice(f.index,f.howmany,f.record[r]);}if(f.data===p){this.count=this.count-f.howmany+1;if(a[0]!==p.begin[this.count]||a[1]!==p.token[this.count]){this.linesSpace=0;}}return}for(const r of this.datanames){f.data[r].splice(f.index,f.howmany);}if(f.data===p){this.count=this.count-f.howmany;this.linesSpace=0;}}wrapCommentLine(f){let p=f.start;let a=0;let r=g;let t=[];const{wrap:w,preserveComment:E}=q.options;function $(){let L=g;do{a=a+1;if(c(f.chars[a+1],10))return}while(a<f.end&&be(f.chars[a])===true);if(f.chars[a]+f.chars[a+1]==="//"){t=[];do{t.push(f.chars[a]);a=a+1;}while(a<f.end&&f.chars[a]!==ce);L=t.join(g);if(/^\/\/ (\*|-|(\d+\.))/.test(L)===false&&L.slice(0,6)!=="// "&&/^\/\/\s*$/.test(L)===false){r=`${r} ${L.replace(/(^\/\/\s*)/,g).replace(Ee,g)}`;p=a-1;$();}}}const o=()=>{const L=[];const e={ender:-1,types:"comment",lexer:f.lexer,lines:this.linesSpace};if(this.count>-1){e.begin=this.structure[this.structure.length-1][1];e.stack=this.structure[this.structure.length-1][0];e.token=this.data.token[this.count];}else {e.begin=-1;e.stack="global";e.token=g;}let m=0;let _=0;r=r.replace(/\s+/g,ne).replace(Ee,g);_=r.length;if(w>_)return;do{m=w;if(r.charAt(m)!==ne){do{m=m-1;}while(m>0&&r.charAt(m)!==ne);if(m<3){m=w;do{m=m+1;}while(m<_-1&&r.charAt(m)!==ne)}}L.push(r.slice(0,m));r=`// ${r.slice(m).replace(Qe,g)}`;_=r.length;}while(w<_);m=0;_=L.length;do{e.token=L[m];this.push(this.data,e,g);e.lines=2;this.linesSpace=2;m=m+1;}while(m<_)};do{t.push(f.chars[p]);p=p+1;}while(p<f.end&&f.chars[p]!==ce);if(p===f.end){f.chars.push(ce);}else {p=p-1;}r=t.join(g).replace(Ee,g);if(/^(\/\/\s*@prettify-ignore-start\b)/.test(r)===true){let L=ce;p=p+1;do{t.push(f.chars[p]);p=p+1;}while(p<f.end&&(f.chars[p-1]!=="d"||f.chars[p-1]==="d"&&t.slice(t.length-20).join(g)!=="@prettify-ignore-end"));a=p;do{}while(a>f.start&&f.chars[a-1]==="/"&&(f.chars[a]==="*"||f.chars[a]==="/"));if(f.chars[a]==="*")L="*/";if(L!==ce||f.chars[p]!==ce){do{t.push(f.chars[p]);if(L===ce&&f.chars[p+1]===ce)break;p=p+1;}while(p<f.end&&(L===ce||L==="*/"&&(f.chars[p-1]!=="*"||f.chars[p]!=="/")))}if(f.chars[p]===ce)p=p-1;r=t.join(g).replace(Ee,g);return [r,p]}if(r==="//"||r.slice(0,6)==="// "||E===true){return [r,p]}r=r.replace(/(\/\/\s*)/,"// ");if(w<1||p===f.end-1&&this.data.begin[this.count]<1)return [r,p];a=p+1;$();o();return [r,p]}};function Ge(i){const{options:f}=q;const p=[];const a=[];const r=f.crlf===true?"\r\n":ce;const t=i.begin.replace(at,nt);const w=c(i.begin[0],123)&&c(i.begin[1],37);const E=new RegExp(`^(${t}\\s*@prettify-ignore-start)`);const $=new RegExp(`(${t}\\s*)`);const o=w?new RegExp(`\\s*${i.ender.replace(yt,O=>c(O,123)?"{%-?\\s*":"\\s*-?%}")}$`):new RegExp(i.ender.replace(at,nt));let L=i.start;let e=0;let m=0;let _=0;let Z=0;let n=[];let A=g;let C=g;let u=false;let X=false;let ee=false;let h=g;let M=i.ender.length-1;let y=i.ender.charAt(M);let z=0;function b(){if(/^\s+$/.test(n[e+1])||n[e+1]===g){do e=e+1;while(e<Z&&(/^\s+$/.test(n[e+1])||n[e+1]===g))}if(e<Z-1)a.push(g);}function k(){let O=ce;L=L+1;do{p.push(i.chars[L]);if(p.slice(p.length-20).join(g)==="@prettify-ignore-end"){if(w){const v=i.chars.indexOf("{",L);if(c(i.chars[v+1],37)){const R=i.chars.slice(v,i.chars.indexOf("}",v+1)+1).join(g);if(o.test(R))i.ender=R;}}L=L+1;break}L=L+1;}while(L<i.end);e=L;M=i.begin.length-1;y=i.begin.charAt(M);do{if(i.begin==="/*"&&c(i.chars[e-1],47)&&(c(i.chars[e],42)||c(i.chars[e],47))){break}if(i.begin!=="/*"&&i.chars[e]===y&&i.chars.slice(e-M,e+1).join(g)===i.begin){break}e=e-1;}while(e>i.start);if(i.begin==="/*"&&c(i.chars[e],42)){O="*/";}else if(i.begin!=="/*"){O=i.ender;}M=O.length-1;y=O.charAt(M);if(O!==ce||i.chars[L]!==ce){do{p.push(i.chars[L]);if(O===ce&&i.chars[L+1]===ce){break}if(i.chars[L]===y&&i.chars.slice(L-M,L+1).join(g)===O){break}L=L+1;}while(L<i.end)}if(i.chars[L]===ce)L=L-1;h=p.join(g).replace(Ee,g);return [h,L]}do{p.push(i.chars[L]);if(i.chars[L]===ce)s.lineNumber=s.lineNumber+1;if(i.chars[L]===y&&i.chars.slice(L-M,L+1).join(g)===i.ender)break;L=L+1;}while(L<i.end);h=p.join(g);if(E.test(h)===true)return k();if(f.preserveComment===true||f.wrap<1||L===i.end||h.length<=f.wrap&&h.indexOf(ce)<0||i.begin==="/*"&&h.indexOf(ce)>0&&h.replace(ce,g).indexOf(ce)>0&&/\n(?!(\s*\*))/.test(h)===false){return [h,L]}e=i.start;if(e>0&&K(i.chars[e-1],10)&&be(i.chars[e-1])){do e=e-1;while(e>0&&K(i.chars[e-1],10)&&be(i.chars[e-1]))}A=i.chars.slice(e,i.start).join(g);const d=new RegExp(ce+A,"g");n=h.replace(/\r\n/g,ce).replace(d,ce).split(ce);Z=n.length;n[0]=n[0].replace($,g);n[Z-1]=n[Z-1].replace(o,g);if(Z<2)n=n[0].split(ne);if(n[0]===g){n[0]=i.begin;}else {n.splice(0,0,i.begin);}Z=n.length;e=0;do{C=e<Z-1?n[e+1].replace(Qe,g):g;if(/^\s+$/.test(n[e])===true||n[e]===g){b();}else if(n[e].replace(Qe,g).length>f.wrap&&n[e].replace(Qe,g).indexOf(ne)>f.wrap){n[e]=n[e].replace(Qe,g);m=n[e].indexOf(ne);a.push(n[e].slice(0,m));n[e]=n[e].slice(m+1);e=e-1;}else {n[e]=i.begin==="/*"&&n[e].indexOf("/*")!==0?` ${n[e].replace(Qe,g).replace(Ee,g).replace(/\s+/g,ne)}`:`${n[e].replace(Qe,g).replace(Ee,g).replace(/\s+/g,ne)}`;z=e<1?f.wrap-(i.begin.length+1):f.wrap;m=n[e].length;_=n[e].replace(Qe,g).indexOf(ne);if(m>z&&_>0&&_<z){m=z;do{m=m-1;if(be(n[e].charAt(m))&&m<=f.wrap)break}while(m>0);if(/^\s*\d+\.\s/.test(n[e])===true&&/^\s*\d+\.\s/.test(n[e+1])===false){n.splice(e+1,0,"1. ");}if(/^\s+$/.test(n[e+1])===true||n[e+1]===g){a.push(n[e].slice(0,m));n[e]=n[e].slice(m+1);u=true;e=e-1;}else if(/^\s*[*-]\s/.test(n[e+1])){a.push(n[e].slice(0,m));n[e]=n[e].slice(m+1);X=true;e=e-1;}else if(/^\s*\d+\.\s/.test(n[e+1])){a.push(n[e].slice(0,m));n[e]=n[e].slice(m+1);ee=true;e=e-1;}else if(n[e].replace(Qe,g).indexOf(ne)<f.wrap){n[e+1]=n[e].length>f.wrap?n[e].slice(m+1)+r+n[e+1]:`${n[e].slice(m+1)} ${n[e+1]}`;}if(u===false&&X===false&&ee===false){n[e]=n[e].slice(0,m);}}else if(n[e+1]!==void 0&&(n[e].length+C.indexOf(ne)>f.wrap&&C.indexOf(ne)>0||n[e].length+C.length>f.wrap&&C.indexOf(ne)<0)){a.push(n[e]);e=e+1;}else if(n[e+1]!==void 0&&/^\s+$/.test(n[e+1])===false&&n[e+1]!==g&&/^\s*(?:[*-]|\d+\.)\s/.test(n[e+1])===false){a.push(n[e]);u=true;}else {a.push(n[e]);u=true;}X=false;ee=false;}e=e+1;}while(e<Z);if(a.length>0){if(a[a.length-1].length>f.wrap-(i.ender.length+1)){a.push(i.ender);}else {a.push(i.ender);}h=a.join(r);}else {n[n.length-1]=n[n.length-1]+i.ender;h=n.join(r);}return [h,L]}q.lexers.style=function i(f){const{options:p}=q;const a=p.style;const{data:r}=s;const t=f.split(g);const w=f.length;const E=[];const $=[];let o=0;let L=g;let e=g;function m(M){s.push(r,{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"style",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:e,types:L},M);}function _(M){const y=M;do{M=M-1;}while(t[M]==="\\"&&M>0);return (y-M)%2===1}function Z(M){const y=M.replace(/\s*!important/," !important").split(g);const z=/-?transition$/.test(r.token[s.count-2]);const b=[];const k=/(\s|\(|,)-?0+\.?\d+([a-z]|\)|,|\s)/g;const d=/(\s|\(|,)-?\.?\d+([a-z]|\)|,|\s)/g;let O=0;let v=0;let R=g;let I=y.length;let le=[];const V=re=>{return re};function ue(re){re=re.replace(/\s*/g,g);return /\/\d/.test(re)&&M.indexOf("url(")===0?re:` ${re.charAt(0)} ${re.charAt(1)}`}function xe(re){if(a.noLeadZero===true){return re.replace(/^-?\D0+(\.|\d)/,Y=>Y.replace(/0+/,g))}else if(/0*\./.test(re)){return re.replace(/0*\./,"0.")}else if(/0+/.test(/\d+/.exec(re)[0])){return /^\D*0+\D*$/.test(re)?re.replace(/0+/,"0"):re.replace(/\d+/.exec(re)[0],/\d+/.exec(re)[0].replace(/^0+/,g))}return re}function Q(re){return re.replace(",",", ")}function pe(re){return `${re} `}function Ce(){const re=O-1;let Y=re;if(re<1)return true;do{Y=Y-1;}while(Y>0&&y[Y]==="\\");return (re-Y)%2===1}if(O<I){do{le.push(y[O]);if(y[O-1]!=="\\"||Ce()===false){if(R===g){if(c(y[O],34)){R='"';v=v+1;}else if(c(y[O],39)){R="'";v=v+1;}else if(c(y[O],40)){R=")";v=v+1;}else if(c(y[O],91)){R="]";v=v+1;}}else if(c(y[O],40)&&c(R,41)||c(y[O],91)&&c(R,93)){v=v+1;}else if(y[O]===R){v=v-1;if(v===0)R=g;}}if(R===g&&c(y[O],32)){le.pop();b.push(V(le.join(g)));le=[];}O=O+1;}while(O<I)}b.push(V(le.join(g)));I=b.length;O=0;if(O<I){do{if(a.noLeadZero===true&&/^-?0+\.\d+[a-z]/.test(b[O])===true){b[O]=b[O].replace(/0+\./,".");}else if(a.noLeadZero===false&&/^-?\.\d+[a-z]/.test(b[O])){b[O]=b[O].replace(".","0.");}else if(k.test(b[O])||d.test(b[O])){b[O]=b[O].replace(k,xe).replace(d,xe);}else if(/^(0+([a-z]{2,3}|%))$/.test(b[O])&&z===false){b[O]="0";}else if(/^(0+)/.test(b[O])){b[O]=b[O].replace(/0+/,"0");if(/\d/.test(b[O].charAt(1)))b[O]=b[O].substr(1);}else if(/^url\((?!('|"))/.test(b[O])&&b[O].charCodeAt(b[O].length-1)===41){R=b[O].charAt(b[O].indexOf("url(")+4);if(R!=="@"&&K(R,40)&&K(R,60)){if(a.quoteConvert==="double"){b[O]=b[O].replace(/url\(/,'url("').replace(/\)$/,'")');}else {b[O]=b[O].replace(/url\(/,"url('").replace(/\)$/,"')");}}}if(/^(\+|-)?\d+(\.\d+)?(e-?\d+)?\D+$/.test(b[O])){if(!ke.style.units.has(b[O].replace(/(\+|-)?\d+(\.\d+)?(e-?\d+)?/,g))){b[O]=b[O].replace(/(\+|-)?\d+(\.\d+)?(e-?\d+)?/,pe);}}if(/^\w+\(/.test(b[O])&&b[O].charAt(b[O].length-1)===")"&&(b[O].indexOf("url(")!==0||b[O].indexOf("url(")===0&&b[O].indexOf(ne)>0)){b[O]=b[O].replace(/,\S/g,Q);}O=O+1;}while(O<I)}R=b.join(ne);return R.charAt(0)+R.slice(1).replace(/\s*(\/|\+|\*)\s*(\d|\$)/,ue)}function n(){const M=[];const y=[];const z=a.quoteConvert;let b=o;let k=0;let d=g;let O=null;function v(){y.push(t[b]);if(be(t[b+1]))do{b=b+1;}while(b<w&&be(t[b+1]))}if(b<w){do{if(c(t[b],34)||c(t[b],39)){if(O===null)O=false;if(M[M.length-1]===t[b]&&(t[b-1]!=="\\"||_(b-1)===false)){M.pop();if(z==="double"){t[b]='"';}else if(z==="single"){t[b]="'";}}else if(K(M[M.length-1],34)&&K(M[M.length-1],39)&&(t[b-1]!=="\\"||_(b-1)===false)){M.push(t[b]);if(z==="double"){t[b]='"';}else if(z==="single"){t[b]="'";}}else if(t[b-1]==="\\"&&z!=="none"){if(_(b-1)===true){if(z==="double"&&c(t[b],39)){y.pop();}else if(z==="single"&&c(t[b],34)){y.pop();}}}else if(z==="double"&&c(t[b],34)){t[b]='\\"';}else if(z==="single"&&c(t[b],39)){t[b]="\\'";}y.push(t[b]);}else if(t[b-1]!=="\\"||_(b-1)===false){if(c(t[b],40)){if(O===null)O=true;M.push(")");v();}else if(c(t[b],91)){O=false;M.push("]");v();}else if((c(t[b],35)||c(t[b],64))&&c(t[b+1],123)){O=false;y.push(t[b]);b=b+1;M.push("}");v();}else if(t[b]===M[M.length-1]){y.push(t[b]);M.pop();}else {y.push(t[b]);}}else {y.push(t[b]);}if(s.structure[s.structure.length-1][0]==="map"&&M.length===0&&(c(t[b+1],44)||c(t[b+1],41))){if(c(t[b+1],41)&&c(r.token[s.count],40)){s.pop(r);s.structure.pop();y.splice(0,0,"(");}else {break}}if(c(t[b+1],58)){k=b;if(/\s/.test(t[k]))do{k=k-1;}while(/\s/.test(t[k]));d=t.slice(k-6,k+1).join(g);if(d.indexOf("filter")===d.length-6||d.indexOf("progid")===d.length-6){d="filter";}}if(M.length===0){if(c(t[b+1],59)&&_(b+1)===true||c(t[b+1],58)&&K(t[b],58)&&K(t[b+2],58)&&d!=="filter"&&d!=="progid"||(c(t[b+1],125)||c(t[b+1],123))||c(t[b+1],47)&&(c(t[b+2],42)||c(t[b+2],47))){k=y.length-1;if(/\s/.test(y[k])){do{k=k-1;b=b-1;y.pop();}while(/\s/.test(y[k]))}break}if(c(t[b+1],44))break}b=b+1;}while(b<w)}o=b;if(s.structure[s.structure.length-1][0]==="map"&&c(y[0],40)){E[E.length-1]=E[E.length-1]-1;}e=y.join(g).replace(/\s+/g,ne).replace(/^\s/,g).replace(/\s$/,g);if(O===true){e=e.replace(/\s+\(/g,"(").replace(/\s+\)/g,")").replace(/,\(/g,", (");}if(s.count>-1&&r.token[s.count].indexOf("extend(")===0){L="pseudo";}else if(O===true&&/\d/.test(e.charAt(0))===false&&/^rgba?\(/.test(e)===false&&e.indexOf("url(")!==0&&(e.indexOf(ne)<0||e.indexOf(ne)>e.indexOf("("))&&e.charAt(e.length-1)===")"){if(c(r.token[s.count],58)){L="value";}else {e=e.replace(/,\u0020?/g,", ");L="function";}e=Z(e);}else if(s.count>-1&&`"'`.indexOf(r.token[s.count].charAt(0))>-1&&r.types[s.count]==="variable"){L="item";}else if(c(y[0],64)||y[0]==="$"){if(r.types[s.count]==="colon"&&p.language==="css"&&(r.types[s.count-1]==="property"||r.types[s.count-1]==="variable")){L="value";}else if(s.count>-1){L="item";d=r.token[s.count];b=d.indexOf("(");if(c(d[d.length-1],41)&&b>0){d=d.slice(b+1,d.length-1);r.token[s.count]=r.token[s.count].slice(0,b+1)+Z(d)+")";}}e=Z(e);}else {L="item";}m(g);}function A(M){let y=s.count;let z=0;let b=g;const k=[];function d(){if(s.count<0)return;if(y>0&&(r.types[y]==="comment"||r.types[y]==="ignore")){do{y=y-1;k.push(r.token[y]);}while(y>0&&r.lexer[y]==="style"&&(r.types[y]==="comment"||r.types[y]==="ignore"))}z=y-1;if(z>0&&(r.types[z]==="comment"||r.types[z]==="ignore")){do{z=z-1;}while(z>0&&r.lexer[y]==="style"&&(r.types[z]==="comment"||r.types[z]==="ignore"))}if(z<0)z=0;if(y<0)y=0;b=r.token[y].charAt(0);}function O(v){let R=v;const I=r.begin[R];r.token[v]=r.token[v].replace(/\s*&/," &").replace(/\s*&\s*{/," & {").replace(/\s*>\s*/g," > ").replace(/\s*\+\s*/g," + ").replace(/:\s+/g,": ").replace(/^\s+/,g).replace(/\s+$/,g).replace(/\s+::\s+/,"::");if(K(r.token[R],44)&&r.types[R]!=="comment"){r.types[R]="selector";}if(c(r.token[R-1],44)||c(r.token[R-1],58)||r.types[R-1]==="comment"||r.types[R-1]==="pseudo"){if(r.types[R-1]==="colon"&&r.types[R]==="selector"&&(r.types[R-2]==="template"||r.types[R-2]==="template_start"||r.types[R-2]==="template_else"||r.types[R-2]==="template_end")){r.token[R-1]=":"+r.token[R]+ne;r.types[R-1]="selector";s.splice({data:r,howmany:1,index:R});}else if(r.types[R-1]==="pseudo"){r.token[R-1]=`${r.token[R-1]}${r.token[R]}`;r.types[R-1]="selector";s.splice({data:r,howmany:1,index:R});}else {do{R=R-1;if(r.begin[R]===I){if(c(r.token[R],59))break;if(K(r.token[R],44)&&r.types[R]!=="comment")r.types[R]="selector";if(r.token[R]===":"&&K(r.token[R-1],59)){r.token[R-1]=`${r.token[R-1]}:${r.token[R+1]}`.replace(/\s*&/," &").replace(/\s*&\s*{/," & {").replace(/\s*>\s*/g," > ").replace(/\s*\+\s*/g," + ");s.splice({data:r,howmany:2,index:R});}}else {break}}while(R>0)}}R=s.count;if(a.sortSelectors===true&&c(r.token[R-1],44)){const le=[r.token[R]];do{R=R-1;if(r.types[R]==="comment"||r.types[R]==="ignore"){do{R=R-1;}while(R>0&&(r.types[R]==="comment"||r.types[R]==="ignore"))}if(c(r.token[R],44))R=R-1;le.push(r.token[R]);}while(R>0&&(c(r.token[R-1],44)||r.types[R-1]==="selector"||r.types[R-1]==="comment"||r.types[R-1]==="ignore"));le.sort();R=s.count;r.token[R]=le.pop();do{R=R-1;if(r.types[R]==="comment"||r.types[R]==="ignore"){do{R=R-1;}while(R>0&&(r.types[R]==="comment"||r.types[R]==="ignore"))}if(c(r.token[R],44))R=R-1;r.token[R]=le.pop();}while(R>0&&(c(r.token[R-1],44)||r.token[R-1]==="selector"||r.types[R-1]==="comment"||r.types[R-1]==="ignore"))}y=s.count;d();}d();if(M==="start"&&(r.types[y]==="value"||r.types[y]==="variable")){r.types[y]="item";}if(r.lexer[s.count-1]!=="style"||z<0){if(M==="colon"){if(b==="$"||c(b,64)){r.types[y]="variable";}else if(r.stack[y]!=="global"&&(r.types[y]!=="comment"||r.types[y]!=="ignore")){r.types[y]="property";}}else if(r.lexer[y]==="style"){r.types[y]="selector";O(y);}}else if(M==="start"&&r.types[y]==="function"&&r.lexer[y]==="style"){r.types[y]="selector";O(y);}else if(r.types[y]==="item"&&r.lexer[y]==="style"){if(M==="start"){O(y);r.types[y]="selector";if(r.token[y]===":")r.types[z]="selector";if(r.token[y].indexOf("=\u201C")>0){s.error=`Invalid Quote (\u201C, \\201c) used on line number ${s.lineNumber}`;}else if(r.token[y].indexOf("=\u201D")>0){s.error=`Invalid Quote (\u201D, \\201d) used on line number ${s.lineNumber}`;}}else if(M==="end"){if(b==="$"||c(b,64)){r.types[y]="variable";}else {r.types[y]="value";}r.token[y]=Z(r.token[y]);}else if(M==="separator"){if(r.types[z]==="colon"||c(r.token[z],44)||c(r.token[z],123)){if(K(t[o],59)&&(r.types[z]==="selector"||c(r.token[z],123))){r.types[y]="selector";O(y);}else if(r.token[y].charAt(0)==="$"||c(r.token[y],64)){r.types[y]="variable";}else {r.types[y]="value";}r.token[y]=Z(r.token[y]);if(r.token[y].charAt(0)==="\u201C"){s.error=`Invalid Quote (\u201C, \\201c) used on line number ${s.lineNumber}`;}else if(r.token[y].charAt(0)==="\u201D"){s.error=`Invalid (\u201D, \\201d) used on line number ${s.lineNumber}`;}}else {if(b==="$"||c(b,64)){r.types[y]="variable";}else if(r.types[z]==="value"||r.types[z]==="variable"){r.token[z]=r.token[z]+r.token[y];s.pop(r);}else {r.types[y]="value";}}}else if(M==="colon"){if(b==="$"||c(b,64)){r.types[y]="variable";}else {r.types[y]="property";}}else if(c(r.token[z],64)&&(r.types[z-2]!=="variable"&&r.types[z-2]!=="property"||r.types[z-1]==="separator")){r.types[z]="variable";L="variable";r.token[z]=Z(r.token[z]);}}}function C(){let M=s.count;do{M=M-1;}while(M>0&&r.types[M]==="comment");if(r.token[M]===";")return;s.splice({data:r,howmany:0,index:M+1,record:{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"style",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:";",types:"separator"}});}function u(M,y){const z=[];let b=g;let k=g;let d=0;let O=M.length;function v(R){const I=r.types[s.count-1];if(L==="item"){if(I==="colon"){r.types[s.count]="value";}else {A(I);}}L=R;if(L.indexOf("start")>-1||L.indexOf("else")>-1){m(e);}else {m(g);}}$[$.length-1]=true;if(o<w){do{z.push(t[o]);if(b===g){if(c(t[o],34)){b='"';}else if(c(t[o],39)){b="'";}else if(c(t[o],47)){if(c(t[o+1],47)){b="/";}else if(c(t[o+1],42)){b="*";}}else if(t[o+1]===y.charAt(0)){do{d=d+1;o=o+1;z.push(t[o]);}while(o<w&&d<y.length&&t[o+1]===y.charAt(d));if(d===y.length){b=z.join(g);if(be(b.charAt(O))){do{O=O+1;}while(be(b.charAt(O)))}d=O;do{d=d+1;}while(d<y.length&&!be(b.charAt(d)));if(d===b.length)d=d-y.length;if(M==="{%"){if(c(b[2],45)){b=b.replace(/^{%-\s*/,"{%- ");b=b.endsWith("-%}")?b.replace(/\s*-%}$/," -%}"):b.replace(/\s*%}$/," %}");k=b.slice(4);}else {b=b.replace(/^{%\s*/,"{% ");b=b.endsWith("-%}")?b.replace(/\s*-%}$/," -%}"):b.replace(/\s*%}$/," %}");k=b.slice(3);}}if(M==="{{"){if(c(b[2],45)){b=b.replace(/^{{-\s*/,"{{- ");b=b.endsWith("-}}")?b.replace(/\s*-}}$/," -}}"):b.replace(/\s*}}$/," }}");}else {b=b.replace(/^{{\s*/,"{{ ");b=b.endsWith("-}}")?b.replace(/\s*-}}$/," -}}"):b.replace(/\s*%}}$/," }}");}}if(L==="item"&&r.types[s.count-1]==="colon"&&(r.types[s.count-2]==="property"||r.types[s.count-2]==="variable")){L="value";r.types[s.count]="value";if(Number.isNaN(Number(r.token[s.count]))===true&&r.token[s.count].charAt(r.token[s.count].length-1)!==")"){r.token[s.count]=r.token[s.count]+b;}else {r.token[s.count]=r.token[s.count]+ne+b;}return}e=b;if(M==="{%"){const R=Array.from(ke.liquid.tags);let I=R.length-1;k=k.slice(0,k.indexOf(ne));if(k.indexOf("(")>0){k=k.slice(0,k.indexOf("("));}if(ke.liquid.else.has(k)){v("template_else");return}I=R.length-1;if(I>-1){do{if(k===R[I]){v("template_start");return}if(k==="end"+R[I]){v("template_end");return}I=I-1;}while(I>-1)}}else if(M==="{{"){let R=b.slice(2);const I=R.length;let le=0;do{le=le+1;}while(le<I&&be(R.charAt(le))===false&&R.charCodeAt(O)!==40);R=R.slice(0,le);if(c(R[R.length-2],125))R=R.slice(0,R.length-2);if(R==="end"){v("template_end");return}}v("template");return}d=0;}}else if(b===t[o]){if(c(b,34)||c(b,39)){b=g;}else if(c(b,47)&&(t[o]==="\r"||c(t[o],10))){b=g;}else if(c(b,42)&&c(t[o+1],47)){b=g;}}o=o+1;}while(o<w)}}function X(M){let y;if(M){y=s.wrapCommentLine({chars:t,start:o,end:w,lexer:"style",begin:"//",ender:"\n"});e=y[0];L=/^(\/\/\s*@prettify-ignore-start)/.test(e)?"ignore":"comment";}else {y=Ge({chars:t,start:o,end:w,lexer:"style",begin:"/*",ender:"*/"});e=y[0];L=/^(\/\*\s*@prettify-ignore-start)/.test(e)?"ignore":"comment";}m(g);o=y[1];}function ee(){const M=s.linesSpace;const y={data:{margin:[g,g,g,g,false],padding:[g,g,g,g,false]},last:{margin:0,padding:0},removes:[]};const z=s.structure[s.structure.length-1][1];function b(v){if(r.token[d-2]===v){const R=r.token[d].replace(/\s*!important\s*/g,g).split(ne);const I=R.length;if(r.token[d].indexOf("!important")>-1)y.data[v[4]]=true;if(I>3){if(y.data[v][0]===g)y.data[v][0]=R[0];if(y.data[v][1]===g)y.data[v][1]=R[1];if(y.data[v][2]===g)y.data[v][2]=R[2];if(y.data[v][3]===g)y.data[v][3]=R[3];}else if(I>2){if(y.data[v][0]===g)y.data[v][0]=R[0];if(y.data[v][1]===g)y.data[v][1]=R[1];if(y.data[v][2]===g)y.data[v][2]=R[2];if(y.data[v][3]===g)y.data[v][3]=R[1];}else if(I>1){if(y.data[v][0]===g)y.data[v][0]=R[0];if(y.data[v][1]===g)y.data[v][1]=R[1];if(y.data[v][2]===g)y.data[v][2]=R[0];if(y.data[v][3]===g)y.data[v][3]=R[1];}else {if(y.data[v][0]===g)y.data[v][0]=R[0];if(y.data[v][1]===g)y.data[v][1]=R[0];if(y.data[v][2]===g)y.data[v][2]=R[0];if(y.data[v][3]===g)y.data[v][3]=R[0];}}else if(r.token[d-2]===`${v}-bottom`){if(y.data[v][2]===g)y.data[v][2]=r.token[d];}else if(r.token[d-2]===`${v}-left`){if(y.data[v][3]===g)y.data[v][3]=r.token[d];}else if(r.token[d-2]===`${v}-right`){if(y.data[v][1]===g)y.data[v][1]=r.token[d];}else if(r.token[d-2]===`${v}-top`){if(y.data[v][0]===g)y.data[v][0]=r.token[d];}else {return}y.removes.push([d,v]);y.last[v]=d;}function k(){let v=0;let R=g;const I=/^(0+([a-z]+|%))/;const le=y.removes.length;const V=y.data.margin[0]!==g&&y.data.margin[1]!==g&&y.data.margin[2]!==g&&y.data.margin[3]!==g;const ue=y.data.padding[0]!==g&&y.data.padding[1]!==g&&y.data.padding[2]!==g&&y.data.padding[3]!==g;function xe(Q){if(I.test(y.data[Q][0])===true)y.data[Q][0]="0";if(I.test(y.data[Q][1])===true)y.data[Q][1]="0";if(I.test(y.data[Q][2])===true)y.data[Q][2]="0";if(I.test(y.data[Q][3])===true)y.data[Q][3]="0";if(y.data[Q][0]===y.data[Q][1]&&y.data[Q][0]===y.data[Q][2]&&y.data[Q][0]===y.data[Q][3]){R=y.data[Q][0];}else if(y.data[Q][0]===y.data[Q][2]&&y.data[Q][1]===y.data[Q][3]&&y.data[Q][0]!==y.data[Q][1]){R=`${y.data[Q][0]} ${y.data[Q][1]}`;}else if(y.data[Q][1]===y.data[Q][3]&&y.data[Q][0]!==y.data[Q][2]){R=`${y.data[Q][0]} ${y.data[Q][1]} ${y.data[Q][2]}`;}else {R=`${y.data[Q][0]} ${y.data[Q][1]} ${y.data[Q][2]} ${y.data[Q][3]}`;}if(y.data[Q[4]]===true)R=`${R.replace(" !important",g)} !important`;if(y.last[Q]>s.count){v=z<1?1:z+1;do{if(r.begin[v]===z&&r.types[v]==="value"&&r.token[v-2].indexOf(Q)===0){y.last[Q]=v;break}v=v+1;}while(v<s.count)}r.token[y.last[Q]]=R;r.token[y.last[Q]-2]=Q;}if(le>1&&(V===true||ue===true)){do{if(y.removes[v][0]!==y.last.margin&&y.removes[v][0]!==y.last.padding&&(V===true&&y.removes[v][1]==="margin"||ue===true&&y.removes[v][1]==="padding")){s.splice({data:r,howmany:r.types[y.removes[v][0]+1]==="separator"?4:3,index:y.removes[v][0]-2});}v=v+1;}while(v<le-1)}if(V===true)xe("margin");if(ue===true)xe("padding");if(O===true){if(z<0){s.error="Brace mismatch. There appears to be more closing braces than starting braces.";}else {s.sortCorrect(z,s.count+1);}}}let d=s.count;let O=false;do{d=d-1;if(r.begin[d]===z){if(r.types[d]==="value"&&r.types[d-2]==="property"){if(r.token[d-2].indexOf("margin")===0){b("margin");}else if(r.token[d-2].indexOf("padding")===0){b("padding");}}}else {O=true;d=r.begin[d];}}while(d>z);k();s.linesSpace=M;}function h(){s.linesSpace=1;do{if(c(t[o],10)){s.lineStart=o;s.linesSpace=s.linesSpace+1;s.lineNumber=s.lineNumber+1;}if(be(t[o+1])===false)break;o=o+1;}while(o<w)}do{if(be(t[o])){h();}else if(c(t[o],47)&&c(t[o+1],42)){X(false);}else if(c(t[o],47)&&c(t[o+1],47)){X(true);}else if(c(t[o],123)&&c(t[o+1],37)){u("{%","%}");}else if(c(t[o],123)&&c(t[o+1],123)){u("{{","}}");}else if(c(t[o],123)||c(t[o],40)&&c(r.token[s.count],58)&&r.types[s.count-1]==="variable"){A("start");L="start";e=t[o];if(c(t[o],40)){m("map");E.push(0);}else if(r.types[s.count]==="selector"||r.types[s.count]==="variable"){m(r.token[s.count]);}else if(r.types[s.count]==="colon"){m(r.token[s.count-1]);}else {m("block");}$.push(false);}else if(c(t[o],125)||t[o]===")"&&s.structure[s.structure.length-1][0]==="map"&&E[E.length-1]===0){if(c(t[o],125)&&c(r.token[s.count-1],123)&&r.types[s.count]==="item"&&r.token[s.count-2]!==void 0&&r.token[s.count-2].charAt(r.token[s.count-2].length-1)==="@"){r.token[s.count-2]=r.token[s.count-2]+"{"+r.token[s.count]+"}";s.pop(r);s.pop(r);s.structure.pop();}else {if(c(t[o],41))E.pop();A("end");if(c(t[o],125)&&K(r.token[s.count],59)){if(r.types[s.count]==="value"||r.types[s.count]==="function"||r.types[s.count]==="variable"&&(c(r.token[s.count-1],58)||c(r.token[s.count-1],59))){if(a.correct===true){e=";";}else {e="x;";}L="separator";m(g);}else if(r.types[s.count]==="comment"){C();}}$.pop();e=t[o];L="end";if(c(t[o],125))ee();if(a.sortProperties===true&&c(t[o],125))s.sortObject(r);m(g);}}else if(c(t[o],59)||c(t[o],44)){if(r.types[s.count-1]==="selector"||r.types[s.count]!=="function"&&c(r.token[s.count-1],125)){A("start");}else {A("separator");}if(r.types[s.count]!=="separator"&&_(o)===true){e=t[o];L="separator";m(g);}}else if(s.count>-1&&c(t[o],58)&&r.types[s.count]!=="end"){A("colon");e=":";L="colon";m(g);}else {if(s.structure[s.structure.length-1][0]==="map"&&c(t[o],40)){E[E.length-1]=E[E.length-1]+1;}n();}o=o+1;}while(o<w);if(a.sortProperties===true)s.sortObject(r);return r};q.lexers.script=function i(f){const{options:p}=q;const a=je({},p.script);if(p.language==="json"){p.script=je(p.script,p.json,{quoteConvert:"double",endComma:"never",noSemicolon:true,vertical:false});}let r=0;let t=g;let w=g;let E=[];let $=0;let o=-1;let L=-1;let e=[];let m;let _;let Z;const{data:n}=s;const{references:A}=s;const C=f.length;const u=f.split(g);const X=[];const ee=[];const h=[];const M=[0,g];const y=[false];const z=["autoescape","block","capture","case","comment","embed","filter","for","form","if","macro","paginate","raw","sandbox","spaceless","tablerow","unless","verbatim"];const b={};b.count=[];b.index=[];b.len=-1;b.word=[];function k(l){let x=0;const S=Q(1,false);const j=s.structure.length===0?"":s.structure[s.structure.length-1][0];const N=Ue(null);N.begin=n.begin[s.count];N.ender=n.begin[s.count];N.lexer=n.lexer[s.count];N.lines=n.lines[s.count];N.stack=n.stack[s.count];N.token=n.token[s.count];N.types=n.types[s.count];if(/^(\/(\/|\*)\s*@prettify-ignore-start)/.test(t))return;if(w==="start"||w==="type_start")return;if(p.language==="json")return;if(c(N.token,59)||c(N.token,44)||N.stack==="class"||N.stack==="map"||N.stack==="attribute"||n.types[N.begin-1]==="generic"||S==="{"||j==="initializer"){return}if(c(N.token,125)&&n.stack[N.begin-1]==="global"&&n.types[N.begin-1]!=="operator"&&N.stack===n.stack[s.count-1]){return}if(N.stack==="array"&&N.token!=="]")return;if(n.token[n.begin[s.count]]==="{"&&N.stack==="data_type")return;if(N.types!==void 0&&N.types.indexOf("template")>-1&&N.types.indexOf("template_string")<0){return}if(c(S,59)&&l===false)return;if(n.lexer[s.count-1]!=="script"&&(r<C&&C===q.source.length-1||C<q.source.length-1)){return}if(c(N.token,125)&&(N.stack==="function"||N.stack==="if"||N.stack==="else"||N.stack==="for"||N.stack==="do"||N.stack==="while"||N.stack==="switch"||N.stack==="class"||N.stack==="try"||N.stack==="catch"||N.stack==="finally"||N.stack==="block")){if(N.stack==="function"&&(n.stack[N.begin-1]==="data_type"||n.types[N.begin-1]==="type")){x=N.begin;do{x=x-1;}while(x>0&&n.token[x]!==")"&&n.stack[x]!=="arguments");x=n.begin[x];}else {x=n.begin[N.begin-1];}if(c(n.token[x],40)){x=x-1;if(n.token[x-1]==="function")x=x-1;if(n.stack[x-1]==="object"||n.stack[x-1]==="switch")return;if(n.token[x-1]!=="="&&n.token[x-1]!=="return"&&n.token[x-1]!==":"){return}}else {return}}if(N.types==="comment"||j==="method"||j==="paren"||j==="expression"||j==="array"||j==="object"||j==="switch"&&N.stack!=="method"&&n.token[n.begin[s.count]]==="("&&n.token[n.begin[s.count]-1]!=="return"&&n.types[n.begin[s.count]-1]!=="operator"){return}if(n.stack[s.count]==="expression"&&(n.token[n.begin[s.count]-1]!=="while"||n.token[n.begin[s.count]-1]==="while"&&n.stack[n.begin[s.count]-2]!=="do")){return}if(S!==""&&"=<>+*?|^:&%~,.()]".indexOf(S)>-1&&l===false)return;if(N.types==="comment"){x=s.count;do{x=x-1;}while(x>0&&n.types[x]==="comment");if(x<1)return;N.token=n.token[x];N.types=n.types[x];N.stack=n.stack[x];}if(N.token===void 0||N.types==="start"||N.types==="separator"||N.types==="operator"&&N.token!=="++"&&N.token!=="--"||N.token==="x}"||N.token==="var"||N.token==="let"||N.token==="const"||N.token==="else"||N.token.indexOf("#!/")===0||N.token==="instanceof"){return}if(N.stack==="method"&&(n.token[N.begin-1]==="function"||n.token[N.begin-2]==="function")){return}if(p.script.variableList==="list")b.index[b.len]=s.count;t=p.script.correct===true?";":"x;";w="separator";x=s.linesSpace;s.linesSpace=0;Y("");s.linesSpace=x;R();}function d(){let l=s.count;do{l=l-1;}while(l>-1&&n.token[l]==="x}");if(n.stack[l]==="else")return Y("");l=l+1;s.splice({data:n,howmany:0,index:l,record:{begin:n.begin[l],ender:-1,lexer:"script",lines:s.linesSpace,stack:n.stack[l],token:t,types:w}});Y("");}function O(){let l=s.count;if(n.types[l]==="comment"){do{l=l-1;}while(l>0&&n.types[l]==="comment")}if(n.token[l]==="from")l=l-2;if(n.token[l]==="x;"){s.splice({data:n,howmany:1,index:l});}}function v(){k(false);if(o>-1)D();Z=Ge({chars:u,end:C,lexer:"script",begin:"/*",start:r,ender:"*/"});r=Z[1];if(n.token[s.count]==="var"||n.token[s.count]==="let"||n.token[s.count]==="const"){m=s.pop(n);Y("");s.push(n,m,"");if(n.lines[s.count-2]===0)n.lines[s.count-2]=n.lines[s.count];n.lines[s.count]=0;}else if(Z[0]!==""){t=Z[0];w=/^\/\*\s*@prettify-ignore-start/.test(t)?"ignore":"comment";if(t.indexOf("# sourceMappingURL=")===2){M[0]=s.count+1;M[1]=t;}s.push(n,{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"script",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:t,types:w},"");}if(/\/\*\s*global\s+/.test(n.token[s.count])===true&&n.types.indexOf("word")<0){A[0]=n.token[s.count].replace(/\/\*\s*global\s+/,"").replace("*/","").replace(/,\s+/g,",").split(",");}}function R(){let l="";const x=Q(5,false);const S=s.count;const j=s.linesSpace;if(p.language==="json"||ee.length<1||ee[ee.length-1].charAt(0)!=="x"||/^x?(;|\}|\))$/.test(t)===false){return}if(n.stack[s.count]==="do"&&x==="while"&&n.token[s.count]==="}"){return}if(t===";"&&n.token[S-1]==="x{"){l=n.token[n.begin[S-2]-1];if(n.token[S-2]==="do"||n.token[S-2]===")"&&"ifforwhilecatch".indexOf(l)>-1){m=s.pop(n);t=p.script.correct===true?"}":"x}";w="end";_=s.structure[s.structure.length-1];Y("");ee.pop();s.linesSpace=j;return}m=s.pop(n);t=p.script.correct===true?"}":"x}";w="end";_=s.structure[s.structure.length-1];Y("");ee.pop();t=";";w="end";s.push(n,m,"");s.linesSpace=j;return}t=p.script.correct===true?"}":"x}";w="end";if(n.token[s.count]==="x}")return;if(n.stack[s.count]==="if"&&(n.token[s.count]===";"||n.token[s.count]==="x;")&&x==="else"){_=s.structure[s.structure.length-1];Y("");ee.pop();s.linesSpace=j;return}do{_=s.structure[s.structure.length-1];Y("");ee.pop();if(n.stack[s.count]==="do")break}while(ee[ee.length-1]==="x{");s.linesSpace=j;}function I(){let l=s.count;if(n.stack[l]==="object"&&p.script.objectSort===true){t=",";w="separator";O();Y("");}else {do{l=l-1;}while(l>0&&n.types[l-1]==="comment");s.splice({data:n,howmany:0,index:l,record:{begin:n.begin[l],ender:-1,lexer:"script",lines:s.linesSpace,stack:n.stack[l],token:",",types:"separator"}});Y("");}}function le(l){let x=false;let S=false;const j=Q(1,false);const N=n.token[s.count]==="("?s.count:n.begin[s.count];function F(){let B=0;const se=n.token[N-1]==="Array";const W=se===true?"[":"{";const P=se===true?"]":"}";const J=se===true?"array":"object";if(se===true&&n.types[s.count]==="number"){B=Number(n.token[s.count]);m=s.pop(n);}m=s.pop(n);m=s.pop(n);m=s.pop(n);s.structure.pop();t=W;w="start";Y(J);if(B>0){t=",";w="separator";do{Y("");B=B-1;}while(B>0)}t=P;w="end";Y("");}if(o>-1)D();if(h.length>0){if(h[h.length-1]===0){h.pop();}else {h[h.length-1]=h[h.length-1]-1;}}if(c(l,41)||l==="x)"||c(l,93)){if(p.script.correct===true)re();O();}if(c(l,41)||l==="x)")k(false);if(b.len>-1){if(c(l,125)&&(p.script.variableList==="list"&&b.count[b.len]===0||n.token[s.count]==="x;"&&p.script.variableList==="each")){T();}b.count[b.len]=b.count[b.len]-1;if(b.count[b.len]<0)T();}if(c(t,44)&&n.stack[s.count]!=="initializer"&&(c(l,93)&&c(n.token[s.count-1],91)||c(l,125))){m=s.pop(n);}if(c(l,41)||l==="x)"){t=l;if(X.length>0){E=X[X.length-1];if(E.length>1&&K(j,123)&&(E[0]==="if"||E[0]==="for"||E[0]==="with"||E[0]==="while"&&n.stack[E[1]-2]!==void 0&&n.stack[E[1]-2]!=="do")){x=true;}}}else if(c(l,93)){t="]";}else if(c(l,125)){if(K(t,44)&&p.script.correct===true)re();if(s.structure.length>0&&s.structure[s.structure.length-1][0]!=="object")k(true);if((p.script.objectSort===true||p.language==="json"&&p.json.objectSort===true)&&s.structure[s.structure.length-1][0]==="object"){s.sortObject(n);}if(w==="comment"){t=n.token[s.count];w=n.types[s.count];}t="}";}if(s.structure[s.structure.length-1][0]==="data_type"){w="type_end";}else {w="end";}X.pop();_=s.structure[s.structure.length-1];if(c(l,41)&&p.script.correct===true&&N-s.count<2&&(c(n.token[s.count],40)||n.types[s.count]==="number")&&(n.token[N-1]==="Array"||n.token[N-1]==="Object")&&n.token[N-2]==="new"){F();S=true;}if(ee[ee.length-1]==="x{"&&c(l,125)){R();ee.pop();if(n.stack[s.count]!=="try"){if(K(j,58)&&K(j,59)&&n.token[n.begin[r]-1]!=="?")R();}t="}";}else {ee.pop();}if(p.script.endComma!==void 0&&p.script.endComma!=="none"&&s.structure[s.structure.length-1][0]==="array"||s.structure[s.structure.length-1][0]==="object"||s.structure[s.structure.length-1][0]==="data_type"){if(p.script.endComma==="always"&&n.token[s.count]!==","){const B=s.structure[s.structure.length-1][1];let se=s.count;do{if(n.begin[se]===B){if(c(n.token[se],44))break}else {se=n.begin[se];}se=se-1;}while(se>B);if(se>B){const W=w;const P=t;t=",";w="separator";Y("");t=P;w=W;}}else if(p.script.endComma==="never"&&c(n.token[s.count],44)){s.pop(n);}}if(S===false){Y("");if(t==="}"&&n.stack[s.count]!=="object"&&n.stack[s.count]!=="class"&&n.stack[s.count]!=="data_type"){A.pop();R();}}if(x===true){t=p.script.correct===true?"{":"x{";w="start";Y(E[0]);ee.push("x{");E[1]=s.count;}y.pop();if(s.structure[s.structure.length-1][0]!=="data_type")y[y.length-1]=false;}function V(l,x,S){let j=0;let N=false;let F=false;let B=[l];let se;const W=x.split(g);const P=W.length;const J=r;const G=r+l.length;const ie=p.script.quoteConvert===void 0?"none":p.script.quoteConvert;function fe(){let H=0;B=[];w=S;j=r;if(S==="string"&&/\s/.test(u[j+1])===true){H=1;do{j=j+1;if(u[j]==="\n")H=H+1;}while(j<C&&/\s/.test(u[j+1])===true);s.linesSpace=H;}}function te(){let H=g;function ge(ae){if(p.language!=="javascript"&&p.language!=="typescript"&&p.language!=="jsx"&&p.language!=="tsx"){const me=ye=>ye.replace(/\s*$/," ");const Re=ye=>ye.replace(/^\s*/," ");if(/\{(#|\/|(%>)|(%\]))/.test(ae)||/\}%(>|\])/.test(ae))return ae;ae=ae.replace(/\{((\{+)|%-?)\s*/g,me);ae=ae.replace(/\s*((\}\}+)|(-?%\}))/g,Re);return ae}return ae}if(c(l,34)&&ie==="single"){B[0]="'";B[B.length-1]="'";}else if(c(l,39)&&ie==="double"){B[0]='"';B[B.length-1]='"';}else if(N===true){H=B[B.length-1];B.pop();B.pop();B.push(H);}r=j;if(x==="\n"){r=r-1;B.pop();}t=B.join(g);if(c(l,34)||c(l,39)||l==="{{"||l==="{%"){t=ge(t);}if(l==="{%"||l==="{{"){se=We(t);w=se[0];Y(se[1]);return}if(S==="string"){w="string";if(p.language==="json"){t=t.replace(/\u0000/g,"\\u0000").replace(/\u0001/g,"\\u0001").replace(/\u0002/g,"\\u0002").replace(/\u0003/g,"\\u0003").replace(/\u0004/g,"\\u0004").replace(/\u0005/g,"\\u0005").replace(/\u0006/g,"\\u0006").replace(/\u0007/g,"\\u0007").replace(/\u0008/g,"\\u0008").replace(/\u0009/g,"\\u0009").replace(/\u000a/g,"\\u000a").replace(/\u000b/g,"\\u000b").replace(/\u000c/g,"\\u000c").replace(/\u000d/g,"\\u000d").replace(/\u000e/g,"\\u000e").replace(/\u000f/g,"\\u000f").replace(/\u0010/g,"\\u0010").replace(/\u0011/g,"\\u0011").replace(/\u0012/g,"\\u0012").replace(/\u0013/g,"\\u0013").replace(/\u0014/g,"\\u0014").replace(/\u0015/g,"\\u0015").replace(/\u0016/g,"\\u0016").replace(/\u0017/g,"\\u0017").replace(/\u0018/g,"\\u0018").replace(/\u0019/g,"\\u0019").replace(/\u001a/g,"\\u001a").replace(/\u001b/g,"\\u001b").replace(/\u001c/g,"\\u001c").replace(/\u001d/g,"\\u001d").replace(/\u001e/g,"\\u001e").replace(/\u001f/g,"\\u001f");}else if(l.indexOf("#!")===0){t=t.slice(0,t.length-1);s.linesSpace=2;}else if(s.structure[s.structure.length-1][0]!=="object"||s.structure[s.structure.length-1][0]==="object"&&Q(1,false)!==":"&&K(n.token[s.count],44)&&K(n.token[s.count],123)){if(t.length>p.wrap&&p.wrap>0||p.wrap!==0&&n.token[s.count]==="+"&&(n.token[s.count-1].charAt(0)==='"'||n.token[s.count-1].charAt(0)==="'")){let ae=t;let me="";let Re=ie==="double"?'"':ie==="single"?"'":ae.charAt(0);const ye=p.wrap;const Te=/u[0-9a-fA-F]{4}/;const oe=/x[0-9a-fA-F]{2}/;ae=ae.slice(1,ae.length-1);if(n.token[s.count]==="+"&&(n.token[s.count-1].charAt(0)==='"'||n.token[s.count-1].charAt(0)==="'")){s.pop(n);Re=n.token[s.count].charAt(0);ae=n.token[s.count].slice(1,n.token[s.count].length-1)+ae;s.pop(n);}if(ae.length>ye&&ye>0){do{me=ae.slice(0,ye);if(me.charAt(ye-5)==="\\"&&Te.test(ae.slice(ye-4,ye+1))){me=me.slice(0,ye-5);}else if(me.charAt(ye-4)==="\\"&&Te.test(ae.slice(ye-3,ye+2))){me=me.slice(0,ye-4);}else if(me.charAt(ye-3)==="\\"&&(Te.test(ae.slice(ye-2,ye+3))||oe.test(ae.slice(ye-2,ye+1)))){me=me.slice(0,ye-3);}else if(me.charAt(ye-2)==="\\"&&(Te.test(ae.slice(ye-1,ye+4))||oe.test(ae.slice(ye-1,ye+2)))){me=me.slice(0,ye-2);}else if(me.charAt(ye-1)==="\\"){me=me.slice(0,ye-1);}me=Re+me+Re;ae=ae.slice(me.length-2);t=me;w="string";Y(g);s.linesSpace=0;t="+";w="operator";Y(g);}while(ae.length>ye)}if(ae===g){t=Re+Re;}else {t=Re+ae+Re;}w="string";}}}else if(/\{\s*\?>$/.test(t)){w="template_start";}else {w=S;}if(t.length>0)Y(g);}if(o>-1)D();if(u[r-1]==="\\"&&de(r-1)===true&&(c(u[r],34)||c(u[r],39))){s.pop(n);if(c(n.token[0],123)){if(c(u[r],34)){l='"';x='\\"';B=['"'];}else {l="'";x="\\'";B=["'"];}N=true;}else {if(c(u[r],34)){B=['\\"'];te();return}B=["\\'"];te();return}}j=G;if(j<C){do{if(K(n.token[0],123)&&K(n.token[0],91)&&ie!=="none"&&(c(u[j],34)||c(u[j],39))){if(u[j-1]==="\\"){if(de(j-1)===true){if(ie==="double"&&c(u[j],39)){B.pop();}else if(ie==="single"&&c(u[j],34)){B.pop();}}}else if(ie==="double"&&c(u[j],34)&&c(u[r],39)){u[j]='\\"';}else if(ie==="single"&&c(u[j],39)&&c(u[r],34)){u[j]="\\'";}B.push(u[j]);}else if(j>J){F=true;if(c(u[j],123)&&c(u[j+1],37)&&u[j+2]!==l){te();V("{%","%}","template");fe();}else if(c(u[j],123)&&c(u[j+1],123)&&u[j+2]!==l){te();V("{{","}}","template");fe();}else {F=false;B.push(u[j]);}}else {B.push(u[j]);}if(p.language!=="json"&&p.language!=="javascript"&&(c(l,34)||c(l,39))&&(F===true||j>J)&&u[j-1]!=="\\"&&K(u[j],34)&&K(u[j],39)&&(c(u[j],10)||j===C-1===true)){s.error="Unterminated string in script on line number "+s.lineNumber;break}if(u[j]===W[P-1]&&(u[j-1]!=="\\"||de(j-1)===false)){if(P===1)break;if(B[j-G]===W[0]&&B.slice(j-G-P+2).join("")===x)break}j=j+1;}while(j<C)}te();}function ue(){k(false);R();if(o>-1)D();Z=s.wrapCommentLine({chars:u,end:C,lexer:"script",begin:"//",start:r,ender:"\n"});r=Z[1];if(Z[0]!==""){t=Z[0];w=/^(\/\/\s*@prettify-ignore-start)/.test(t)?"ignore":"comment";if(t.indexOf("# sourceMappingURL=")===2){M[0]=s.count+1;M[1]=t;}s.push(n,{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"script",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:t,types:w},"");}}function xe(){let l=0;let x=false;let S=false;let j=0;let N=0;let F=0;let B="";let se="";let W="";const P=[];const J=y[y.length-1];const G="0123456789=<>+-*?|^:&.,;%(){}[]~";function ie(){if(t==="(")s.structure[s.structure.length-1]=["paren",s.count];q.lexers.markup(P.join(""));}if(o>-1)D();se=s.count>0?n.token[s.count-1]:"";W=s.count>0?n.types[s.count-1]:"";B=Q(1,false);if(p.language!=="jsx"&&p.language!=="tsx"&&/\d/.test(B)===false&&(t==="function"||se==="=>"||se==="void"||se==="."||n.stack[s.count]==="arguments"||w==="type"&&se==="type"||w==="reference"&&(W==="operator"||se==="function"||se==="class"||se==="new")||w==="type"&&W==="operator"||t==="return"||w==="operator")){const fe=[];let te=0;let H=0;l=r;do{fe.push(u[l]);if(u[l]==="<"){te=te+1;}else if(u[l]===">"){te=te-1;if(te<1)break}l=l+1;}while(l<C);H=r;r=l;B=Q(1,false);if(u[l]===">"&&(J===true||se==="=>"||se==="."||W!=="operator"||W==="operator"&&(B==="("||B==="="))){w="generic";t=fe.join("").replace(/^<\s+/,"<").replace(/\s+>$/,">").replace(/,\s*/g,", ");Y("");return}r=H;}l=s.count;if(n.types[l]==="comment"){do{l=l-1;}while(l>0&&n.types[l]==="comment")}if(J===false&&Q(1,false)!==">"&&(u[r]!=="<"&&G.indexOf(u[r+1])>-1||n.token[l]==="++"||n.token[l]==="--"||/\s/.test(u[r+1])===true||/\d/.test(u[r+1])===true&&(w==="operator"||w==="string"||w==="number"||w==="reference"||w==="word"&&t!=="return"))){w="operator";t=Ce();return Y("")}if(p.language!=="typescript"&&(n.token[l]==="return"||n.types[l]==="operator"||n.types[l]==="start"||n.types[l]==="separator"||n.types[l]==="jsx_attribute_start"||n.token[l]==="}"&&s.structure[s.structure.length-1][0]==="global")){w="markup";p.language="jsx";do{P.push(u[r]);if(u[r]==="{"){N=N+1;x=true;}else if(u[r]==="}"){N=N-1;if(N===0)x=false;}else if(u[r]==="<"&&x===false){if(u[r+1]==="<"){do{P.push(u[r]);r=r+1;}while(r<C&&u[r+1]==="<")}j=j+1;if(Q(1,false)==="/")S=true;}else if(u[r]===">"&&x===false){if(u[r+1]===">"){do{P.push(u[r]);r=r+1;}while(u[r+1]===">")}j=j-1;if(S===true){F=F-1;}else if(u[r-1]!=="/"){F=F+1;}if(j===0&&N===0&&F<1){B=Q(2,false);if(B.charAt(0)!=="<")return ie();if(B.charAt(0)==="<"&&G.indexOf(B.charAt(1))<0&&/\s/.test(B.charAt(1))===false){l=r+1;do{l=l+1;if(u[l]===">"||/\s/.test(u[l-1])&&G.indexOf(u[l])<0)break;if(G.indexOf(u[l])>-1)return ie()}while(l<C)}else {return ie()}}S=false;}r=r+1;}while(r<C);return ie()}w="operator";t=Ce();Y("");}function Q(l,x){let S=x===true?r:r+1;let j="";if(typeof l!=="number"||l<1)l=1;if(u[r]==="/"){if(u[r+1]==="/"){j="\n";}else if(u[r+1]==="*"){j="/";}}if(S<C){do{if(/\s/.test(u[S])===false){if(u[S]==="/"){if(j===""){if(u[S+1]==="/"){j="\n";}else if(u[S+1]==="*"){j="/";}}else if(j==="/"&&u[S-1]==="*"){j="";}}if(j===""&&u[S-1]+u[S]!=="*/")return u.slice(S,S+l).join("")}else if(j==="\n"&&u[S]==="\n"){j="";}S=S+1;}while(S<C)}return ""}function pe(){const l=C;const x=[u[r]];let S=0;let j=/zz/;let N=x[0]===".";if(r<C-2&&u[r]==="0"){if(u[r+1]==="x"){j=/[0-9a-fA-F]/;}else if(u[r+1]==="o"){j=/[0-9]/;}else if(u[r+1]==="b"){j=/0|1/;}if(j.test(u[r+2])===true){x.push(u[r+1]);S=r+1;do{S=S+1;x.push(u[S]);}while(j.test(u[S+1])===true);r=S;return x.join("")}}S=r+1;if(S<l){do{if(/[0-9]/.test(u[S])||u[S]==="."&&N===false){x.push(u[S]);if(u[S]===".")N=true;}else {break}S=S+1;}while(S<l)}if(S<l-1&&(/\d/.test(u[S-1])===true||/\d/.test(u[S-2])===true&&(u[S-1]==="-"||u[S-1]==="+"))&&(u[S]==="e"||u[S]==="E")){x.push(u[S]);if(u[S+1]==="-"||u[S+1]==="+"){x.push(u[S+1]);S=S+1;}N=false;S=S+1;if(S<l){do{if(/[0-9]/.test(u[S])||u[S]==="."&&N===false){x.push(u[S]);if(u[S]===".")N=true;}else {break}S=S+1;}while(S<l)}}r=S-1;return x.join("")}function Ce(){let l=0;let x=0;let S=C;let j="";const N=["=","<",">","+","*","?","|","^",":","&","%","~"];const F=N.length;if(o>-1)D();if(u[r]==="/"&&(s.count>-1&&(w!=="word"&&w!=="reference"||t==="typeof"||t==="return"||t==="else")&&w!=="number"&&w!=="string"&&w!=="end")){if(t==="return"||t==="typeof"||t==="else"||w!=="word"){t=U();w="regex";}else {t="/";w="operator";}Y("");return "regex"}if(u[r]==="?"&&("+-*/.?".indexOf(u[r+1])>-1||u[r+1]===":"&&N.join("").indexOf(u[r+2])<0)){if(u[r+1]==="."&&/\d/.test(u[r+2])===false){j="?.";}else if(u[r+1]==="?"){j="??";}if(j==="")return "?"}if(u[r]===":"&&"+-*/".indexOf(u[r+1])>-1)return ":";if(r<C-1){if(u[r]!=="<"&&u[r+1]==="<")return u[r];if(u[r]==="!"&&u[r+1]==="/")return "!";if(u[r]==="-"){y[y.length-1]=false;if(u[r+1]==="-"){j="--";}else if(u[r+1]==="="){j="-=";}else if(u[r+1]===">"){j="->";}if(j==="")return "-"}if(u[r]==="+"){y[y.length-1]=false;if(u[r+1]==="+"){j="++";}else if(u[r+1]==="="){j="+=";}if(j==="")return "+"}if(u[r]==="="&&u[r+1]!=="="&&u[r+1]!=="!"&&u[r+1]!==">"){y[y.length-1]=false;return "="}}if(u[r]===":"){if(p.language==="typescript"){if(n.stack[s.count]==="arguments"){if(n.token[s.count]==="?"){s.pop(n);j="?:";r=r-1;}y[y.length-1]=true;}else if(t===")"&&(n.token[n.begin[s.count]-1]==="function"||n.token[n.begin[s.count]-2]==="function")){y[y.length-1]=true;}else if(w==="reference"){l=s.count;let B=false;do{if(n.begin[l]===n.begin[s.count]){if(l<s.count&&n.token[l]===":"&&n.types[l+1]!=="type")B=true;if(n.token[l]==="?"&&B===false)break;if(n.token[l]===";"||n.token[l]==="x;")break;if(n.token[l]==="var"||n.token[l]==="let"||n.token[l]==="const"||n.types[l]==="type"){y[y.length-1]=true;break}}else {if(n.types[l]==="type_end"){y[y.length-1]=true;break}l=n.begin[l];}l=l-1;}while(l>n.begin[s.count])}}else if(n.token[s.count-1]==="["&&(n.types[s.count]==="word"||n.types[s.count]==="reference")){s.structure[s.structure.length-1][0]="attribute";n.stack[s.count]="attribute";}}if(j===""){if(u[r+1]==="+"&&u[r+2]==="+"||u[r+1]==="-"&&u[r+2]==="-"){j=u[r];}else {const B=[u[r]];l=r+1;if(l<S){do{if(u[l]==="+"&&u[l+1]==="+"||u[l]==="-"&&u[l+1]==="-")break;x=0;if(x<F){do{if(u[l]===N[x]){B.push(N[x]);break}x=x+1;}while(x<F)}if(x===F)break;l=l+1;}while(l<S)}j=B.join("");}}r=r+(j.length-1);if(j==="=>"&&t===")"){l=s.count;S=n.begin[l];do{if(n.begin[l]===S)n.stack[l]="method";l=l-1;}while(l>S-1)}return j}function re(){let l=true;let x="+";let S="";let j="";let N="";let F=0;let B=0;let se=0;let W="";const P=[];function J(){se=n.begin[se]-1;if(n.types[se]==="end"){J();}else if(n.token[se-1]==="."){G();}}function G(){se=se-2;if(n.types[se]==="end"){J();}else if(n.token[se-1]==="."){G();}}function ie(){let te=0;const H=P.length;if(te<H){do{s.push(n,P[te],"");te=te+1;}while(te<H)}}function fe(te){const H=Ue(null);H.begin=n.begin[te];H.ender=n.ender[te];H.lexer=n.lexer[te];H.lines=n.lines[te];H.stack=n.stack[te];H.token=n.token[te];H.types=n.types[te];return H}S=n.token[s.count];j=n.token[s.count-1];N=n.token[s.count-2];if(S!=="++"&&S!=="--"&&j!=="++"&&j!=="--"){se=s.count;if(n.types[se]==="end"){J();}else if(n.token[se-1]==="."){G();}}if(n.token[se-1]==="++"||n.token[se-1]==="--"){if("startendoperator".indexOf(n.types[se-2])>-1)return;F=se;if(F<s.count+1){do{P.push(fe(F));F=F+1;}while(F<s.count+1);s.splice({data:n,howmany:s.count-se,index:se});}}else {if(p.script.correct===false||S!=="++"&&S!=="--"&&j!=="++"&&j!=="--"){return}W=Q(1,false);if((S==="++"||S==="--")&&(u[r]===";"||W===";"||u[r]==="}"||W==="}"||u[r]===")"||W===")")){x=n.stack[s.count];if(x==="array"||x==="method"||x==="object"||x==="paren"||x==="notation"||n.token[n.begin[s.count]-1]==="while"&&x!=="while"){return}F=s.count;do{F=F-1;if(n.token[F]==="return")return;if(n.types[F]==="end"){do{F=n.begin[F]-1;}while(n.types[F]==="end"&&F>0)}}while(F>0&&(n.token[F]==="."||n.types[F]==="word"||n.types[F]==="reference"||n.types[F]==="end"));if(n.token[F]===","&&u[r]!==";"&&W!==";"&&u[r]!=="}"&&W!=="}"&&u[r]!==")"&&W!==")"){return}if(n.types[F]==="operator"){if(n.stack[F]==="switch"&&n.token[F]===":"){do{F=F-1;if(n.types[F]==="start"){B=B-1;if(B<0)break}else if(n.types[F]==="end"){B=B+1;}if(n.token[F]==="?"&&B===0)return}while(F>0)}else {return}}l=false;x=S==="--"?"-":"+";}else if(N==="["||N===";"||N==="x;"||N==="}"||N==="{"||N==="("||N===")"||N===","||N==="return"){if(S==="++"||S==="--"){if(N==="["||N==="("||N===","||N==="return")return;if(S==="--")x="-";l=false;}else if(j==="--"||S==="--"){x="-";}}else {return}if(l===false)m=s.pop(n);se=s.count;if(n.types[se]==="end"){J();}else if(n.token[se-1]==="."){G();}F=se;if(F<s.count+1){do{P.push(fe(F));F=F+1;}while(F<s.count+1)}}if(l===true){s.splice({data:n,howmany:1,index:se-1});t="=";w="operator";Y("");ie();t=x;w="operator";Y("");t="1";w="number";Y("");}else {t="=";w="operator";Y("");ie();t=x;w="operator";Y("");t="1";w="number";Y("");}t=n.token[s.count];w=n.types[s.count];if(W==="}"&&u[r]!==";")k(false);}function Y(l){s.push(n,{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"script",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:t,types:w},l);}function U(){let l=r+1;let x=0;let S=0;let j="";let N=false;const F=C;const B=["/"];if(l<F){do{B.push(u[l]);if(u[l-1]!=="\\"||u[l-2]==="\\"){if(u[l]==="["){N=true;}if(u[l]==="]"){N=false;}}if(u[l]==="/"&&N===false){if(u[l-1]==="\\"){S=0;x=l-1;if(x>0){do{if(u[x]==="\\"){S=S+1;}else {break}x=x-1;}while(x>0)}if(S%2===0){break}}else {break}}l=l+1;}while(l<F)}if(u[l+1]==="g"||u[l+1]==="i"||u[l+1]==="m"||u[l+1]==="y"||u[l+1]==="u"){B.push(u[l+1]);if(u[l+2]!==u[l+1]&&(u[l+2]==="g"||u[l+2]==="i"||u[l+2]==="m"||u[l+2]==="y"||u[l+2]==="u")){B.push(u[l+2]);if(u[l+3]!==u[l+1]&&u[l+3]!==u[l+2]&&(u[l+3]==="g"||u[l+3]==="i"||u[l+3]==="m"||u[l+3]==="y"||u[l+3]==="u")){B.push(u[l+3]);if(u[l+4]!==u[l+1]&&u[l+4]!==u[l+2]&&u[l+4]!==u[l+3]&&(u[l+4]==="g"||u[l+4]==="i"||u[l+4]==="m"||u[l+4]==="y"||u[l+4]==="u")){B.push(u[l+4]);if(u[l+5]!==u[l+1]&&u[l+5]!==u[l+2]&&u[l+5]!==u[l+3]&&u[l+5]!==u[l+4]&&(u[l+5]==="g"||u[l+5]==="i"||u[l+5]==="m"||u[l+5]==="y"||u[l+5]==="u")){B.push(u[l+4]);r=l+5;}else {r=l+4;}}else {r=l+3;}}else {r=l+2;}}else {r=l+1;}}else {r=l;}j=B.join("");return j}function de(l){const x=l;do{l=l-1;}while(u[l]==="\\"&&l>0);return (x-l)%2===1}function Pe(l){let x=s.count;let S="";let j="";let N="";let F=false;ee.push(l);if(l==="{"&&(n.types[s.count]==="type"||n.types[s.count]==="type_end"||n.types[s.count]==="generic")){let B=0;if(n.types[s.count]==="type_end")x=n.begin[s.count];B=x;do{x=x-1;if(n.begin[x]!==B&&n.begin[x]!==-1)break;if(n.token[x]===":")break}while(x>n.begin[x]);if(n.token[x]===":"&&n.stack[x-1]==="arguments"){y.push(false);F=true;}else {y.push(y[y.length-1]);}x=s.count;}else if(l==="["&&n.types[s.count]==="type_end"){y.push(true);}else {y.push(y[y.length-1]);}if(o>-1){D();x=s.count;}if(b.len>-1)b.count[b.len]=b.count[b.len]+1;if(n.token[x-1]==="function"){X.push(["function",x+1]);}else {X.push([t,x+1]);}t=l;if(y[y.length-1]===true){w="type_start";}else {w="start";}if(l==="("||l==="x("){O();}else if(l==="{"){if(L>-1){if(n.begin[L-1]===n.begin[n.begin[x]-1]||n.token[n.begin[x]]==="x("){L=-1;if(p.script.correct===true){le(")");}else {le("x)");}O();t="{";w="start";}}else if(t===")"){O();}if(w==="comment"&&n.token[x-1]===")"){t=n.token[x];n.token[x]="{";w=n.types[x];n.types[x]="start";}}S=(()=>{let B=s.count;if(n.types[B]==="comment"){do{B=B-1;}while(B>0&&n.types[B]==="comment")}return n.token[B]})();j=n.stack[x]===void 0?"":(()=>{let B=s.count;if(n.types[B]==="comment"){do{B=B-1;}while(B>0&&n.types[B]==="comment")}return n.token[n.begin[B]-1]})();if(c(t,123)&&(n.types[x]==="word"||n.token[x]==="]")){let B=x;if(n.token[B]==="]"){do{B=n.begin[B]-1;}while(n.token[B]==="]")}do{if(n.types[B]==="start"||n.types[B]==="end"||n.types[B]==="operator")break;B=B-1;}while(B>0);if(n.token[B]===":"&&n.stack[B-1]==="arguments"){N="function";A.push(e);e=[];}}if(w==="type_start"){N="data_type";}else if(N===""&&(c(t,123)||t==="x{")){if(S==="else"||S==="do"||S==="try"||S==="finally"||S==="switch"){N=S;}else if(h[h.length-1]===0&&S!=="return"){h.pop();N="class";}else if(n.token[x-1]==="class"){N="class";}else if(n.token[x]==="]"&&n.token[x-1]==="["){N="array";}else if((n.types[x]==="word"||n.types[x]==="reference")&&(n.types[x-1]==="word"||n.types[x-1]==="reference"||n.token[x-1]==="?"&&(n.types[x-2]==="word"||n.types[x-2]==="reference"))&&n.token[x]!=="in"&&n.token[x-1]!=="export"&&n.token[x-1]!=="import"){N="map";}else if(n.stack[x]==="method"&&n.types[x]==="end"&&(n.types[n.begin[x]-1]==="word"||n.types[n.begin[x]-1]==="reference")&&n.token[n.begin[x]-2]==="new"){N="initializer";}else if(c(t,123)&&(c(S,41)||S==="x)")&&(n.types[n.begin[x]-1]==="word"||n.types[n.begin[x]-1]==="reference"||n.token[n.begin[x]-1]==="]")){if(j==="if"){N="if";}else if(j==="for"){N="for";}else if(j==="while"){N="while";}else if(j==="class"){N="class";}else if(j==="switch"||n.token[n.begin[x]-1]==="switch"){N="switch";}else if(j==="catch"){N="catch";}else {N="function";}}else if(c(t,123)&&(S===";"||S==="x;")){N="block";}else if(c(t,123)&&n.token[x]===":"&&n.stack[x]==="switch"){N="block";}else if(n.token[x-1]==="import"||n.token[x-2]==="import"||n.token[x-1]==="export"||n.token[x-2]==="export"){N="object";}else if(c(S,41)&&(E[0]==="function"||E[0]==="if"||E[0]==="for"||E[0]==="class"||E[0]==="while"||E[0]==="switch"||E[0]==="catch")){N=E[0];}else if(n.stack[x]==="notation"){N="function";}else if((n.types[x]==="number"||n.types[x]==="string"||n.types[x]==="word"||n.types[x]==="reference")&&(n.types[x-1]==="word"||n.types[x-1]==="reference")&&n.token[n.begin[x]-1]!=="for"){N="function";}else if(s.structure.length>0&&n.token[x]!==":"&&s.structure[s.structure.length-1][0]==="object"&&(n.token[n.begin[x]-2]==="{"||n.token[n.begin[x]-2]===",")){N="function";}else if(n.types[E[1]-1]==="markup"&&n.token[E[1]-3]==="function"){N="function";}else if(S==="=>"){N="function";}else if(F===true||n.types[s.count]==="type_end"&&n.stack[n.begin[s.count]-2]==="arguments"){N="function";}else if(c(S,41)&&n.stack[x]==="method"&&(n.types[n.begin[x]-1]==="word"||n.types[n.begin[x]-1]==="property"||n.types[n.begin[x]-1]==="reference")){N="function";}else if(n.types[x]==="word"&&c(t,123)&&n.token[x]!=="return"&&n.token[x]!=="in"&&n.token[x]!=="import"&&n.token[x]!=="const"&&n.token[x]!=="let"&&n.token[x]!==""){N="block";}else if(c(t,123)&&"if|else|for|while|function|class|switch|catch|finally".indexOf(n.stack[x])>-1&&(n.token[x]==="x}"||n.token[x]==="}")){N="block";}else if(n.stack[x]==="arguments"){N="function";}else if(n.types[x]==="generic"){do{x=x-1;if(n.token[x]==="function"||n.stack[x]==="arguments"){N="function";break}if(n.token[x]==="interface"){N="map";break}if(n.token[x]===";"){N="object";break}}while(x>n.begin[s.count])}else {N="object";}if(N!=="object"&&N!=="class"){if(N==="function"){A.push(e);e=[];}else {A.push([]);}}}else if(t==="["){N="array";}else if(t==="("||t==="x("){if(S==="function"||n.token[x-1]==="function"||n.token[x-1]==="function*"||n.token[x-2]==="function"){N="arguments";}else if(n.token[x-1]==="."||n.token[n.begin[x]-2]==="."){N="method";}else if(n.types[x]==="generic"){N="method";}else if(n.token[x]==="}"&&n.stack[x]==="function"){N="method";}else if(S==="if"||S==="for"||S==="class"||S==="while"||S==="catch"||S==="finally"||S==="switch"||S==="with"){N="expression";}else if(n.types[x]==="word"||n.types[x]==="property"||n.types[x]==="reference"){N="method";}else {N="paren";}}Y(N);if(h.length>0)h[h.length-1]=h[h.length-1]+1;}function _e(){const l=[u[r]];r=r+1;if(r<C){do{l.push(u[r]);if(u[r]==="`"&&(u[r-1]!=="\\"||de(r-1)===false))break;if(u[r-1]==="$"&&u[r]==="{"&&(u[r-2]!=="\\"||de(r-2)===false))break;r=r+1;}while(r<C)}return l.join("")}function We(l){let x=2;let S=0;let j="";const N=l.slice(0,2);const F=l.length;if(l.charAt(2)==="-")x=x+1;if(/\s/.test(l.charAt(x))===true){do{x=x+1;}while(/\s/.test(l.charAt(x))===true&&x<F)}S=x;do{S=S+1;}while(/\s/.test(l.charAt(S))===false&&l.charAt(S)!=="("&&S<F);if(S===F)S=l.length-2;j=l.slice(x,S);if(j==="else"||N==="{%"&&(j==="elseif"||j==="when"||j==="elif"||j==="elsif")){return ["template_else",`template_${j}`]}if(N==="{{"){if(j==="end")return ["template_end",""];if(j==="block"&&/\{%\s*\w/.test(f)===false||j==="define"||j==="form"||j==="if"||j==="unless"||j==="range"||j==="with"){return ["template_start",`template_${j}`]}return ["template",""]}S=z.length-1;if(S>-1){do{if(j===z[S]&&(j!=="block"||/\{%\s*\w/.test(f)===false)){return ["template_start",`template_${j}`]}if(j==="end"+z[S]){return ["template_end",""]}S=S-1;}while(S>-1)}return ["template",""]}function T(){b.count.pop();b.index.pop();b.word.pop();b.len=b.len-1;}function D(){let l=o;let x=1;let S="";let j="";let N=t;let F=w;const B=[];function se(){ee.push("x{");s.splice({data:n,howmany:1,index:s.count-3});}function W(P,J,G){const ie=n.begin[P];let fe=0;do{if(n.token[P]===J&&n.types[P]==="word"){if(G===true){n.types[P]="reference";}else if(n.begin[P]>ie&&n.token[n.begin[P]]==="{"&&n.stack[P]!=="object"&&n.stack[P]!=="class"&&n.stack[P]!=="data_type"){if(n.stack[P]==="function"){n.types[P]="reference";}else {fe=n.begin[P];do{if(n.stack[fe]==="function"){n.types[P]="reference";break}fe=n.begin[fe];}while(fe>ie)}}}P=P-1;}while(P>ie)}do{B.push(u[l]);if(u[l]==="\\"){s.error=`Illegal escape in JavaScript on line number ${s.lineNumber}`;}l=l+1;}while(l<r);if(t.charAt(0)==="\u201C"){s.error=`Quote looking character (\u201C, \\u201c) used instead of actual quotes on line number ${s.lineNumber}`;}else if(t.charAt(0)==="\u201D"){s.error=`Quote looking character (\u201D, \\u201d) used instead of actual quotes on line number ${s.lineNumber}`;}S=B.join("");o=-1;if(s.count>0&&S==="function"&&n.token[s.count]==="("&&(n.token[s.count-1]==="{"||n.token[s.count-1]==="x{")){n.types[s.count]="start";}if(s.count>1&&S==="function"&&t==="("&&(n.token[s.count-1]==="}"||n.token[s.count-1]==="x}")){if(n.token[s.count-1]==="}"){l=s.count-2;if(l>-1){do{if(n.types[l]==="end"){x=x+1;}else if(n.types[l]==="start"||n.types[l]==="end"){x=x-1;}if(x===0)break;l=l-1;}while(l>-1)}if(n.token[l]==="{"&&n.token[l-1]===")"){x=1;l=l-2;if(l>-1){do{if(n.types[l]==="end"){x=x+1;}else if(n.types[l]==="start"||n.types[l]==="end"){x=x-1;}if(x===0)break;l=l-1;}while(l>-1)}if(n.token[l-1]!=="function"&&n.token[l-2]!=="function"){n.types[s.count]="start";}}}else {n.types[s.count]="start";}}if(p.script.correct===true&&(S==="Object"||S==="Array")&&u[r+1]==="("&&u[r+2]===")"&&n.token[s.count-1]==="="&&n.token[s.count]==="new"){if(S==="Object"){n.token[s.count]="{";t="}";n.stack[s.count]="object";s.structure[s.structure.length-1][0]="object";}else {n.token[s.count]="[";t="]";n.stack[s.count]="array";s.structure[s.structure.length-1][0]="array";}n.types[s.count]="start";w="end";u[r+1]="";u[r+2]="";r=r+2;}else {x=s.count;l=x;if(p.script.variableList!=="none"&&(S==="var"||S==="let"||S==="const")){if(n.types[x]==="comment"){do{x=x-1;}while(x>0&&n.types[x]==="comment")}if(p.script.variableList==="list"&&b.len>-1&&b.index[b.len]===x&&S===b.word[b.len]){t=",";w="separator";n.token[x]=t;n.types[x]=w;b.count[b.len]=0;b.index[b.len]=x;b.word[b.len]=S;return}b.len=b.len+1;b.count.push(0);b.index.push(x);b.word.push(S);x=l;}else if(b.len>-1&&S!==b.word[b.len]&&s.count===b.index[b.len]&&n.token[b.index[b.len]]===";"&&t!==b.word[b.len]&&p.script.variableList==="list"){T();}if(S==="from"&&n.token[s.count]==="x;"&&n.token[s.count-1]==="}"){O();}if(S==="while"&&n.token[s.count]==="x;"&&n.token[s.count-1]==="}"){let P=0;let J=s.count-2;if(J>-1){do{if(n.types[J]==="end"){P=P+1;}else if(n.types[J]==="start"){P=P-1;}if(P<0){if(n.token[J]==="{"&&n.token[J-1]==="do")O();return}J=J-1;}while(J>-1)}}if(F==="comment"){let P=s.count;do{P=P-1;}while(P>0&&n.types[P]==="comment");F=n.types[P];N=n.token[P];}j=Q(2,false);if(S==="void"){if(N===":"&&n.stack[s.count-1]==="arguments"){w="type";}else {w="word";}}else if((s.structure[s.structure.length-1][0]==="object"||s.structure[s.structure.length-1][0]==="class"||s.structure[s.structure.length-1][0]==="data_type")&&(n.token[s.count]==="{"||n.token[n.begin[s.count]]==="{"&&n.token[s.count]===","||n.types[s.count]==="template_end"&&(n.token[n.begin[s.count]-1]==="{"||n.token[n.begin[s.count]-1]===","))){if(S==="return"||S==="break"){w="word";}else {w="property";}}else if(y[y.length-1]===true||(p.language==="typescript"||p.language==="flow")&&N==="type"){w="type";}else if(A.length>0&&(N==="function"||N==="class"||N==="const"||N==="let"||N==="var"||N==="new"||N==="void")){w="reference";A[A.length-1].push(S);if(p.language==="javascript"||p.language==="jsx"||p.language==="typescript"||p.language==="tsx"){if(N==="var"||N==="function"&&n.types[s.count-1]!=="operator"&&n.types[s.count-1]!=="start"&&n.types[s.count-1]!=="end"){W(s.count,S,true);}else {W(s.count,S,false);}}else {W(s.count,S,false);}}else if(s.structure[s.structure.length-1][0]==="arguments"&&w!=="operator"){w="reference";e.push(S);}else if(N===","&&n.stack[s.count]!=="method"&&(n.stack[s.count]!=="expression"||n.token[n.begin[s.count]-1]==="for")){let P=s.count;const J=s.structure[s.structure.length-1][1];do{if(n.begin[P]===J){if(n.token[P]===";")break;if(n.token[P]==="var"||n.token[P]==="let"||n.token[P]==="const"||n.token[P]==="type"){break}}else if(n.types[P]==="end"){P=n.begin[P];}P=P-1;}while(P>J);if(A.length>0&&n.token[P]==="var"){w="reference";A[A.length-1].push(S);if(p.language==="javascript"||p.language==="jsx"||p.language==="typescript"||p.language==="tsx"){W(P,S,true);}else {W(P,S,false);}}else if(A.length>0&&(n.token[P]==="let"||n.token[P]==="const"||n.token[P]==="type"&&(p.language==="typescript"||p.language==="tsx"))){w="reference";A[A.length-1].push(S);W(P,S,false);}else {w="word";}}else if(s.structure[s.structure.length-1][0]!=="object"||s.structure[s.structure.length-1][0]==="object"&&t!==","&&t!=="{"){let P=A.length;let J=0;if(P>0){do{P=P-1;J=A[P].length;if(J>0){do{J=J-1;if(S===A[P][J])break}while(J>0);if(S===A[P][J])break}}while(P>0);if(A[P][J]===S&&N!=="."){w="reference";}else {w="word";}}else {w="word";}}else {w="word";}t=S;if(S==="from"&&n.token[s.count]==="}")O();}Y("");if(S==="class")h.push(0);if(S==="do"){j=Q(1,true);if(j!=="{"){t=p.script.correct===true?"{":"x{";w="start";ee.push("x{");Y("do");}}if(S==="else"){j=Q(2,true);let P=s.count-1;if(n.types[P]==="comment"){do{P=P-1;}while(P>0&&n.types[P]==="comment")}if(n.token[P]==="x}"){if(n.token[s.count]==="else"){if(n.stack[s.count-1]!=="if"&&n.types[s.count-1]!=="comment"&&n.stack[s.count-1]!=="else"){ee.pop();s.splice({data:n,howmany:0,index:s.count-1,record:{begin:n.begin[n.begin[n.begin[s.count-1]-1]-1],ender:-1,lexer:"script",lines:0,stack:"if",token:p.script.correct===true?"}":"x}",types:"end"}});if(s.structure.length>1){s.structure.splice(s.structure.length-2,1);s.structure[s.structure.length-1][1]=s.count;}}else if(n.token[s.count-2]==="x}"&&_[0]!=="if"&&n.stack[s.count]==="else"){se();}else if(n.token[s.count-2]==="}"&&n.stack[s.count-2]==="if"&&_[0]==="if"&&n.token[_[1]-1]!=="if"&&n.token[n.begin[s.count-1]]==="x{"){se();}}else if(n.token[s.count]==="x}"&&n.stack[s.count]==="if"){se();}}if(j!=="if"&&j.charAt(0)!=="{"){t=p.script.correct===true?"{":"x{";w="start";ee.push("x{");Y("else");}}if((S==="for"||S==="if"||S==="switch"||S==="catch")&&n.token[s.count-1]!=="."){j=Q(1,true);if(j!=="("){L=s.count;if(p.script.correct===true){Pe("(");}else {Pe("x(");}}}}do{if(/\s/.test(u[r])){if(o>-1)D();r=s.spacer({array:u,end:C,index:r});if(s.linesSpace>1&&t!==";"&&$<s.count&&u[r+1]!=="}"){k(false);$=s.count;}}else if(u[r]==="{"&&u[r+1]==="%"){V("{%","%}","template");}else if(u[r]==="{"&&u[r+1]==="{"){V("{{","}}","template");}else if(u[r]==="<"&&u[r+1]==="!"&&u[r+2]==="-"&&u[r+3]==="-"){V("<!--","-->","comment");}else if(u[r]==="<"){xe();}else if(u[r]==="/"&&(r===C-1||u[r+1]==="*")){v();}else if((s.count<0||n.lines[s.count]>0)&&u[r]==="#"&&u[r+1]==="!"&&(u[r+2]==="/"||u[r+2]==="[")){V("#!"+u[r+2],"\n","string");}else if(u[r]==="/"&&(r===C-1||u[r+1]==="/")){ue();}else if(c(u[r],96)||c(u[r],125)&&s.structure[s.structure.length-1][0]==="template_string"){if(o>-1)D();t=_e();if(c(t,125)&&t.slice(t.length-2)==="${"){w="template_string_else";Y("template_string");}else if(t.slice(t.length-2)==="${"){w="template_string_start";Y("template_string");}else if(c(t[0],125)){w="template_string_end";Y("");}else {w="string";Y("");}}else if(u[r]==='"'||u[r]==="'"){V(u[r],u[r],"string");}else if(u[r]==="-"&&(r<C-1&&u[r+1]!=="="&&u[r+1]!=="-")&&(w==="number"||w==="word"||w==="reference")&&t!=="return"&&(t===")"||t==="]"||w==="word"||w==="reference"||w==="number")){if(o>-1)D();t="-";w="operator";Y("");}else if(o===-1&&(u[r]!=="0"||u[r]==="0"&&u[r+1]!=="b")&&(/\d/.test(u[r])||r!==C-2&&u[r]==="-"&&u[r+1]==="."&&/\d/.test(u[r+2])||r!==C-1&&(u[r]==="-"||u[r]===".")&&/\d/.test(u[r+1]))){if(o>-1)D();if(w==="end"&&u[r]==="-"){t="-";w="operator";}else {t=pe();w="number";}Y("");}else if(u[r]===":"&&u[r+1]===":"){if(o>-1)D();if(p.script.correct===true)re();O();r=r+1;t="::";w="separator";Y("");}else if(u[r]===","){if(o>-1)D();if(p.script.correct===true)re();if(y[y.length-1]===true&&n.stack[s.count].indexOf("type")<0){y[y.length-1]=false;}if(w==="comment"){I();}else if(b.len>-1&&b.count[b.len]===0&&p.script.variableList==="each"){O();t=";";w="separator";Y("");t=b.word[b.len];w="word";Y("");b.index[b.len]=s.count;}else {t=",";w="separator";O();Y("");}}else if(u[r]==="."){if(o>-1)D();y[y.length-1]=false;if(u[r+1]==="."&&u[r+2]==="."){t="...";w="operator";r=r+2;}else {O();t=".";w="separator";}if(/\s/.test(u[r-1])===true)s.linesSpace=1;Y("");}else if(u[r]===";"){if(o>-1)D();if(y[y.length-1]===true&&n.stack[s.count].indexOf("type")<0){y[y.length-1]=false;}if(h[h.length-1]===0)h.pop();if(b.len>-1&&b.count[b.len]===0){if(p.script.variableList==="each"){T();}else {b.index[b.len]=s.count+1;}}if(p.script.correct===true)re();t=";";w="separator";if(n.token[s.count]==="x}"){d();}else {Y("");}R();}else if(u[r]==="("||u[r]==="["||u[r]==="{"){Pe(u[r]);}else if(u[r]===")"||u[r]==="]"||u[r]==="}"){le(u[r]);}else if(u[r]==="*"&&n.stack[s.count]==="object"&&o<0&&/\s/.test(u[r+1])===false&&u[r+1]!=="="&&/\d/.test(u[r+1])===false){o=r;}else if(u[r]==="="||u[r]==="&"||u[r]==="<"||u[r]===">"||u[r]==="+"||u[r]==="-"||u[r]==="*"||u[r]==="/"||u[r]==="!"||u[r]==="?"||u[r]==="|"||u[r]==="^"||u[r]===":"||u[r]==="%"||u[r]==="~"){t=Ce();if(t==="regex"){t=n.token[s.count];}else if(t==="*"&&n.token[s.count]==="function"){n.token[s.count]="function*";}else {w="operator";if(t!=="!"&&t!=="++"&&t!=="--")O();Y("");}}else if(o<0&&u[r]!==""){o=r;}if(b.len>-1&&s.count===b.index[b.len]+1&&n.token[b.index[b.len]]===";"&&t!==b.word[b.len]&&w!=="comment"&&p.script.variableList==="list"){T();}r=r+1;}while(r<C);if(o>-1)D();if((n.token[s.count]!=="}"&&n.token[0]==="{"||n.token[0]!=="{")&&(n.token[s.count]!=="]"&&n.token[0]==="["||n.token[0]!=="[")){k(false);}if(M[0]===s.count){t="\n"+M[1];w="string";Y("");}if(n.token[s.count]==="x;"&&(n.token[s.count-1]==="}"||n.token[s.count-1]==="]")&&n.begin[s.count-1]===0){s.pop(n);}p.script=a;return n};q.lexers.markup=function i(f){const{options:p}=q;const{data:a}=s;const r=p.language==="jsx"||p.language==="tsx";const t=p.language==="html"||p.language==="liquid";const w=p.markup;const E=w.attributeSortList.length;const $={end:0,start:0,line:1,index:-1};const o=f.split(g);const L=o.length;let e=0;let m=false;let _;t?p.language:"html";let n=0;function A(k){if(!(t===true&&r===false))return k;if(/(?:{[=#/]|%[>\]])|\}%[>\]]/.test(k))return k;if(!Ie(k,3))return k;const d=k.length-3;if(w.delimiterTrims==="force"){if(c(k[1],37)){if(K(k[2],45))k=k.replace(/^{%/,"{%-");if(K(k[d],45))k=k.replace(/%}$/,"-%}");}else {if(K(k[2],45))k=k.replace(/^{{/,"{{-");if(K(k[d],45))k=k.replace(/}}$/,"-}}");}}else if(w.delimiterTrims==="strip"){k=k.replace(/^{%-/,"{%").replace(/-%}$/,"%}").replace(/^{{-/,"{{").replace(/-}}$/,"}}");}else if(w.delimiterTrims==="tags"&&c(k[1],37)){if(K(k[2],45))k=k.replace(/^{%/,"{%-");if(K(k[d],45))k=k.replace(/%}$/,"-%}");}else if(w.delimiterTrims==="outputs"&&c(k[1],123)){if(K(k[2],45))k=k.replace(/^{{/,"{{-");if(K(k[d],45))k=k.replace(/}}$/,"-}}");}if(/^{%-?\s*#/.test(k))return k;if(/{%-?\s*(?:liquid)/.test(k))return k;if(w.normalizeSpacing===false)return k;let O;let v=0;return k.split(/(["']{1})/).map((R,I,le)=>{const V=c(R[0],34)||c(R[0],39);if(v>0||V&&v===0&&K(le[I-1],92)||V){if(v===0)O=R.charCodeAt(0);if(v===1&&K(le[I-1],92)){if(O===R.charCodeAt(0))v=2;return R}if(v!==2){v=v===0?1:v===1?c(le[I-1],92)?1:2:0;return R}v=0;}return R.replace(lt,ne).replace(/^({[{%]-?)/,"$1 ").replace(/([!=]=|[<>]=?)/g," $1 ").replace(new RegExp(" +(?=[|[\\],:.])|(?<=[[.]) +","g"),g).replace(new RegExp("(\\||(?<=[^=!<>])(?:(?<=assign[^=]+)=(?=[^=!<>])|=$))","g")," $1 ").replace(/([:,]$|[:,](?=\S))/g,"$1 ").replace(/(-?[%}]})$/," $1").replace(lt,ne)}).join(g)}function C(k){let d=k;do d=d-1;while(c(o[d],92));d=k-d;return d%2===1}function u(k,d,O){if(k===a){if(d.types.indexOf("end")>-1){$.end=$.end+1;}else if(d.types.indexOf("start")>-1){$.start=$.start+1;}}$.index=s.count;$.line=s.lineNumber;s.push(k,d,O);}function X(k,d){if(!ke.html.tags.has(k))return false;if(k===d)return true;if(k==="dd"&&d==="dt")return true;if(k==="dt"&&d==="dd")return true;if(k==="td"&&d==="th")return true;if(k==="th"&&d==="td")return true;if(k==="colgroup"&&(d==="tbody"||d==="tfoot"||d==="thead"||d==="tr"))return true;if(k==="tbody"&&(d==="colgroup"||d==="tfoot"||d==="thead"))return true;if(k==="tfoot"&&(d==="colgroup"||d==="tbody"||d==="thead"))return true;if(k==="thead"&&(d==="colgroup"||d==="tbody"||d==="tfoot"))return true;if(k==="tr"&&d==="colgroup")return true;return false}function ee(k){return `Parse Error (line ${s.lineNumber}):
${Array.isArray(k)?k.join(g):k}`}function h(k,d){const O=Ne(k);const v={begin:s.scope.index,ender:-1,lexer:"markup",lines:a.lines[s.count]>0?1:0,stack:Ne(s.scope.token),token:`</${s.scope.token}>`,types:"end"};u(a,v,g);if(ke.html.tags.has(s.scope.token)&&(d===true&&s.structure.length>1||d===false&&`/${s.scope.token}`!==O)){do{v.begin=s.scope.index;v.stack=Ne(s.scope.token);v.token=`</${s.scope.token}>`;u(a,v,g);}while(ke.html.tags.has(s.scope.token)&&(d===true&&s.structure.length>1||d===false&&`/${s.scope.token}`!==O))}}function M(){s.error="Prettify Error:\n\n"+s.error;}function y(k){const d={lexer:"markup",lines:s.linesSpace,stack:s.scope.token!=="global"?Ne(s.scope.token):"global",begin:s.scope.index,token:g,types:g,ender:-1};let O=g;let v=g;let R=g;let I=g;let le=g;let V=false;let ue=false;let xe=false;let Q=0;let pe=false;let Ce=false;let re=false;let Y=false;let U=[];let de=[g,0];function Pe(W){const P=W.indexOf("=");if(P>0){const J=W.indexOf('"');if(P<J&&J>0)return [W.slice(0,P),W.slice(P+1)];const G=W.indexOf("'");if(P<G&&G>0)return [W.slice(0,P),W.slice(P+1)]}return [W,g]}function _e(W){d.lines=a.lines[s.count]>0?1:0;d.token=`</${s.scope.token}>`;d.types="end";u(a,d,g);if(W>0){do{d.begin=s.scope.index;d.stack=Ne(s.scope.token);d.token=`</${s.scope.token}>`;u(a,d,g);W=W-1;}while(W>0)}d.begin=s.scope.index;d.lines=s.linesSpace;d.stack=Ne(s.scope.token);d.token=O;d.types="end";a.lines[s.count-1]=0;}function We(){if(R==="end"){const W=a.token[s.count];if(a.types[s.count-1]==="singleton"&&W.charCodeAt(W.length-2)!==47&&`/${Ne(W)}`===I){a.types[s.count-1]="start";}}if(t){if(c(O[0],60)&&K(O[1],33)&&K(O[1],63)&&(s.count<0||a.types[s.count].indexOf("template")<0)){O=O.toLowerCase();}if(ke.html.tags.has(s.scope.token)&&X(I.slice(1),s.structure[s.structure.length-2][0])){_e(0);}else if(s.structure.length>3&&ke.html.tags.has(s.scope.token)&&ke.html.tags.has(s.structure[s.structure.length-2][0])&&ke.html.tags.has(s.structure[s.structure.length-3][0])&&X(I,s.structure[s.structure.length-4][0])){_e(3);}else if(s.structure.length>2&&ke.html.tags.has(s.scope.token)&&ke.html.tags.has(s.structure[s.structure.length-2][0])&&X(I,s.structure[s.structure.length-3][0])){_e(2);}else if(s.structure.length>1&&ke.html.tags.has(s.scope.token)&&X(I,s.structure[s.structure.length-2][0])){_e(1);}else if(X(I,s.scope.token)){_e(0);}else if(c(I[0],47)&&ke.html.tags.has(s.scope.token)&&s.scope.token!==I.slice(1)){h(O,false);d.begin=s.scope.index;d.lines=s.linesSpace;d.stack=Ne(s.scope.token);d.token=O;d.types="end";a.lines[s.count-1]=0;}if(r===false&&ke.html.voids.has(I)){if(w.correct===true&&/\/>$/.test(O)===false){O=O.slice(0,O.length-1)+" />";}return true}}return false}function T(){if(R!=="cdata")return j();if(d.stack==="script"||d.stack==="style"){const W=d.stack;let P=s.count;let J=s.count;if(a.types[J]==="attribute"){do{P=P-1;J=J-1;}while(a.types[J]==="attribute"&&J>-1)}d.begin=P;d.token="<![CDATA[";d.types="cdata_start";O=O.replace(/^(\s*<!\[cdata\[)/i,g).replace(/(\]{2}>\s*)$/,g);u(a,d,g);s.structure.push(["cdata",s.count]);if(W==="script"){q.lexers.script(O);}else {q.lexers.style(O);}d.begin=s.scope.index;d.token="]]>";d.types="cdata_end";u(a,d,g);s.structure.pop();}return j()}function D(){if(d.types.indexOf("template")===-1)return T();if(c(O[0],123)&&c(O[1],37)){if(ke.liquid.else.has(I)){d.types="template_else";}else if(ke.liquid.tags.has(I)){d.types="template_start";}else if(I.startsWith("end")){const W=I.slice(3);if(ke.liquid.tags.has(W)){d.types="template_end";}else {d.stack=W;d.types="template_end";let P=0;do{if(a.types[P]==="template"&&a.stack[P]===W){a.types[P]="template_start";$.start=$.start+1;break}P=a.stack.indexOf(W,P+1);}while(P>-1)}}else {d.stack=I;}}if(w.quoteConvert==="double"){d.token=d.token.replace(/'/g,'"');}else if(w.quoteConvert==="single"){d.token=d.token.replace(/"/g,"'");}return T()}function l(){if(Y&&xe===false&&R!=="xml"){if(V===true||ke.html.voids.has(I)||c(O[O.length-2],47)&&c(O[O.length-1],62)){R="singleton";}else {R="start";}d.types=R;}return x()}function x(){let W=g;if(kt.test(a.token[s.count])){xe=true;re=false;if(R.indexOf("template")>0&&ke.liquid.tags.has(I)){W=`end${I}`;}else if(ke.html.voids.has(I)){W=null;}}else if(ke.html.voids.has(I)){W=null;}if(W!==null&&re===false&&xe===true&&(k===">"||k==="%}"||k==="}}")){const P=[];if(V===true){R="singleton";}else {re=true;R="ignore";e=e+1;if(e<L){let J=g;let G=0;let ie=0;let fe=false;do{if(c(o[e],10))s.lineNumber=s.lineNumber+1;P.push(o[e]);if(J===g){J=c(o[e],34)?'"':c(o[e],39)?"'":g;if(K(P[0],123)&&c(o[e],123)&&(c(o[e+1],123)||c(o[e+1],37))){J=o[e+1]+"}";}else if(c(o[e],60)&&Y===true){fe=c(o[e+1],47);}else if(o[e]===v&&K(o[e-1],47)){if(fe===true){Q=Q-1;if(Q<0)break}else {Q=Q+1;}}}else if(c(o[e],J.charCodeAt(J.length-1))){ie=0;G=J.length-1;if(c(J[G],125)){if(o.slice(e+(c(o[e+2],45)?3:2),o.indexOf("%",e+2)).join(g).trim().startsWith(W))break}else if(G>-1){do{if(K(o[e-ie],J.charCodeAt(G)))break;ie=ie+1;G=G-1;}while(G>-1)}if(G<0)J=g;}e=e+1;}while(e<L)}}O=O+P.join(g);O=O.replace(">",` ${U.map(([J])=>J).join(ne)}>`);U=[];d.token=O;d.types="content-ignore";}return D()}function S(){V=We();if(!ke.embed("html",I)&&!ke.embed("liquid",I))return l();let W=U.length-1;let P=g;let J;if(W>-1){do{J=Pe(U[W][0]);if(J[0]==="type"){P=J[1];if(c(P,34)||c(P,39))P=P.slice(1,-1);break}W=W-1;}while(W>-1)}const G=Ie(O,3);if(G===false&&ke.embed("html",I)){m=true;if(P===g){_=ke.html.embed[I].language;}else if(ke.html.embed[I].value(P)){_=ke.html.embed[I].language;}}else if(G===true&&ke.embed("liquid",I)){m=true;if(P===g){_=ke.liquid.embed[I].language;}else {_=ke.liquid.embed[I].language;}}if(m===true){W=e+1;if(W<L){do{if(be(o[W])===false){if(c(o[W],60)){if(o.slice(W+1,W+4).join(g)==="!--"){W=W+4;if(W<L){do{if(be(o[W])===false){m=false;break}if(c(o[W],10)||c(o[W],13))break;W=W+1;}while(W<L)}}else {m=false;}}break}W=W+1;}while(W<L)}}return l()}function j(){u(a,d,g);const W=s.count;const P=I.replace(/\/$/,g);const J=w.quoteConvert;let G=0;let ie=0;let fe=0;let te=0;let H=g;let ge=g;let ae=U.length;function me(){if(s.attributes.has(W)){if(G+1===ae&&K(d.token[d.token.length-1],62)){d.token=d.token+">";}}let oe=Ie(d.token,5);if(xe===true||J==="none"||d.types.indexOf("attribute")<0||oe===false&&J==="single"&&d.token.indexOf('"')<0||oe===false&&J==="double"&&d.token.indexOf("'")<0){u(a,d,g);}else {let ve=0;let Fe=false;const Se=d.token.split(g);const he=d.token.indexOf("=");const Le=Se.length-1;if(K(Se[he+1],34)&&K(Se[Se.length-1],34)&&J==="single"&&oe===false){u(a,d,g);}else if(K(Se[he+1],39)&&K(Se[Se.length-1],39)&&J==="double"&&oe===false){u(a,d,g);}else {ve=he+2;if(oe===false){if(J==="double"){if(d.token.slice(he+2,Le).indexOf('"')>-1)Fe=true;Se[he+1]='"';Se[Se.length-1]='"';}else if(J==="single"){if(d.token.slice(he+2,Le).indexOf("'")>-1)Fe=true;Se[he+1]="'";Se[Se.length-1]="'";}}if(Fe===true||oe===true){oe=false;do{if(c(Se[ve-1],123)&&(c(Se[ve],37)||c(Se[ve],123))){oe=true;}else if(c(Se[ve],125)&&(c(Se[ve-1],37)||c(Se[ve-1],125))){oe=false;}if(oe===true){if(c(Se[ve],34)&&J==="double"){Se[ve]="'";}else if(c(Se[ve],39)&&J==="single"){Se[ve]='"';}}else {if(c(Se[ve],39)&&J==="double"){Se[ve]='"';}else if(c(Se[ve],34)&&J==="single"){Se[ve]="'";}}ve=ve+1;}while(ve<Le)}d.token=Se.join(g);u(a,d,g);}}}function Re(){if(!(!r&&!pe&&!Ce))return;if(E===0){U=s.sortSafe(U,g,false);return}const oe=[];fe=0;ie=0;ae=U.length;do{ie=0;do{H=U[ie][0].split("=")[0];if(w.attributeSortList[fe]===H){oe.push(U[ie]);U.splice(ie,1);ae=ae-1;break}ie=ie+1;}while(ie<ae);fe=fe+1;}while(fe<E);U=s.sortSafe(U,g,false);U=oe.concat(U);ae=U.length;}function ye(){d.token=H+"={";d.types="jsx_attribute_start";u(a,d,"jsx_attribute");q.lexers.script(ge.slice(1,ge.length-1));d.begin=s.count;if(/\s\}$/.test(ge)){ge=ge.slice(0,ge.length-1);ge=De.exec(ge)[0];d.lines=ge.indexOf("\n")<0?1:ge.split("\n").length;}else {d.lines=0;}d.begin=s.scope.index;d.stack=s.scope.token;d.token="}";d.types="jsx_attribute_end";me();}function Te(){if(st(U[G][0])){d.types="attribute";d.token=U[G][0];}else if(Ve(U[G][0])){d.token=U[G][0];d.types="template_attribute_end";d.ender=d.begin;}else {if(Xe(U[G][0])){d.types="template_attribute_start";d.begin=s.count;d.token=U[G][0];}else if(dt(U[G][0])){d.types="template_attribute_else";d.token=U[G][0];}else {d.types="attribute";d.token=U[G][0];}}me();}if(U.length<1)return se();if(c(U[U.length-1][0],47)){U.pop();O=O.replace(/>$/,"/>");}ie=U.length;fe=1;if(fe<ie){do{H=U[fe-1][0];if(c(H[H.length-1],61)&&U[fe][0].indexOf("=")<0){U[fe-1][0]=H+U[fe][0];U.splice(fe,1);ie=ie-1;fe=fe-1;}fe=fe+1;}while(fe<ie)}if(w.attributeSort)Re();d.begin=W;d.stack=P;d.types="attribute";if(G<ae){do{if(U[G]===void 0)break;d.lines=U[G][1];U[G][0]=U[G][0].replace(De,g);if(r===true&&/^\/[/*]/.test(U[G][0])){d.types="comment_attribute";d.token=U[G][0];me();G=G+1;continue}if(U[G][1]<=1&&st(U[G][0])){if(!gt(U[G][0])){d.types="attribute";d.token=U[G][0];me();G=G+1;continue}}ie=U[G][0].indexOf("=");fe=U[G][0].indexOf('"');te=U[G][0].indexOf("'");if(ie<0){d.types="attribute";if(c(U[G][0],35)||c(U[G][0],91)||c(U[G][0],123)||c(U[G][0],40)||r===true){d.token=U[G][0];}else {d.token=w.attributeCasing==="preserve"?U[G][0]:U[G][0].toLowerCase();}me();}else {H=U[G][0].slice(0,ie);ge=U[G][0].slice(ie+1);if(w.attributeCasing==="lowercase-name"){H=H.toLowerCase();U[G][0]=H+"="+ge;}else if(w.attributeCasing==="lowercase-value"){ge=ge.toLowerCase();U[G][0]=H+"="+ge;}else if(w.attributeCasing==="lowercase"){H=H.toLowerCase();ge=ge.toLowerCase();U[G][0]=H+"="+ge;}if(w.correct&&(K(ge,60)||K(ge,123)||K(ge,61)||K(ge,34)||K(ge,39))){ge='"'+ge+'"';}if(r===true&&/^\s*{/.test(ge)){ye();d.types="attribute";d.begin=W;d.stack=P;}else if(Xe(ge)&&(w.valueForce==="always"||(w.valueForce==="intent"||w.valueForce==="wrap")&&p.wrap>0&&Math.abs(e-s.lineStart)>=p.wrap||ge.indexOf(ce)>0&&(w.valueForce==="newline"||w.valueForce==="intent"))&&(c(ge[0],34)||c(ge[0],39))){d.token=`${H}=${te>-1?"'":'"'}`;d.types="attribute";s.attributes.add(W);u(a,d,g);if(G+1===ae){i(ge.slice(1,-1));a.token[s.count]=`${a.token[s.count]}${te>-1?"'":'"'}>`;break}if(w.forceIndent===true){const oe=ge.lastIndexOf(ge[0]);if(c(ge[oe],34)||c(ge[oe],39)){i(ge.slice(1,oe));a.token[s.count]=`${a.token[s.count]}${te>-1?"'":'"'}`;}else {i(ge.slice(1));}}else {i(ge.slice(1));}d.types="attribute";d.stack=P;d.begin=W;}else {if(Ie(H,5)){Te();}else {d.types="attribute";d.token=U[G][0];me();}}}G=G+1;}while(G<ae)}m=false;return se()}function N(){if(k==="---"){le="---";R="ignore";re=true;}else if(c(o[e],60)){if(c(o[e+1],47)){R="end";k=">";}else if(c(o[e+1],33)){if((c(o[e+2],100)||c(o[e+2],68))&&(c(o[e+3],111)||c(o[e+3],79))&&(c(o[e+4],99)||c(o[e+4],67))&&(c(o[e+5],116)||c(o[e+5],84))&&(c(o[e+6],121)||c(o[e+6],89))&&(c(o[e+7],112)||c(o[e+7],80))&&(c(o[e+8],101)||c(o[e+8],69))){k=">";R="doctype";re=true;}else if(c(o[e+2],45)&&c(o[e+3],45)){k="-->";R="comment";le="<!--";}else if(c(o[e+2],91)&&o[e+3].charCodeAt(0)===67&&o[e+4].charCodeAt(0)===68&&o[e+5].charCodeAt(0)===65&&o[e+6].charCodeAt(0)===84&&o[e+7].charCodeAt(0)===65&&c(o[e+8],91)){k="]]>";R="cdata";re=true;}}else if(o[e+1]==="?"){k="?>";if(o[e+2].charCodeAt(0)===120&&o[e+3].charCodeAt(0)===109&&o[e+4].charCodeAt(0)===109){R="xml";Y=true;}else {re=true;R="template";}}else if((c(o[e+1],112)||c(o[e+1],80))&&(c(o[e+2],114)||c(o[e+2],82))&&(c(o[e+3],101)||c(o[e+3],69))&&(c(o[e+4],62)||be(o[e+4]))){k="</pre>";R="ignore";re=true;}else if(w.ignoreScripts===true&&o.slice(e+1,e+7).join(g).toLowerCase()==="script"){k="<\/script>";R="ignore";re=true;xe=true;}else if(w.ignoreStyles===true&&o.slice(e+1,e+6).join(g).toLowerCase()==="style"){k="</style>";R="ignore";re=true;xe=true;}else {Y=true;k=">";}}else if(c(o[e],123)){if(r){m=true;ue=true;d.token="{";d.types="script_start";s.structure.push(["script",s.count]);u(a,d,g);return}if(c(o[e+1],123)){re=true;k="}}";R="template";}else if(c(o[e+1],37)){re=true;k="%}";R="template";const W=o.indexOf("}",e+2);if(c(o[W-1],37)){let P=o.slice(e+2,W-1).join(g);if(c(P,45)){le="{%-";P=P.slice(1).trimStart();}else {le="{%";P=P.trimStart();}if(c(P[P.length-1],45)){k="-%}";P=P.slice(0,P.length-1).trimEnd();}else {k="%}";P=P.trimEnd();}if(P==="comment"){const J=f.indexOf("{%",W);let G=J;if(o[J+1].charCodeAt(0)===45)G=J+1;G=f.indexOf("endcomment",G);if(G>0){G=o.indexOf("}",G);if(G>0&&o[G-1].charCodeAt(0)===37){R="comment";le=o.slice(e,W+1).join(g);k=o.slice(J,G+1).join(g);}}}else if(c(P,35)){R="template";k="%}";}}else {re=true;k="%}";R="template";}}else {re=true;k=o[e+1]+"}";R="template";}}if(w.preserveAttributes===true)re=true;if(ue)return S();v=k.charAt(k.length-1);if(R==="comment"&&(c(o[e],60)||c(o[e],123)&&c(o[e+1],37))){return F()}else if(e<L){return B()}else {return S()}}function F(){de=Ge({chars:o,end:L,lexer:"markup",begin:le,start:e,ender:k});O=de[0];e=de[1];if(O.replace(le,g).trimStart().startsWith("@prettify-ignore-start")){d.token=O;d.types="ignore";u(a,d,g);}else {if(c(O[0],123)&&c(O[1],37)){const W=O.indexOf("%}",2)+2;const P=O.lastIndexOf("{%");O=A(O.slice(0,W))+O.slice(W,P)+A(O.slice(P));}d.token=O;d.types="comment";}return S()}function B(){const W=[];let P=0;let J=0;let G=0;let ie=0;let fe=0;let te=0;let H=g;let ge=g;let ae=0;let me=false;let Re=false;let ye=false;let Te=false;let oe=[];function ve(Fe){let Se;let he=g;if(Fe===true){he=oe.join(g);Se=Pe(he);H=g;if(Se[0]==="data-prettify-ignore")xe=true;}else {he=oe.join(g);if(r===false||r&&K.last(he,125))he=he.replace(/\s+/g,ne);Se=Pe(he);if(Se[0]==="data-prettify-ignore")xe=true;if(r&&c(oe[0],123)&&c.last(oe,125))ae=0;}if(c(he[0],123)&&c(he[1],37))Ce=true;if(Fe===false){if(Xe(he))n=n+1;if(Ve(he))n=n-1;}he=he.replace(/^\u0020/,g).replace(/\u0020$/,g);oe=he.replace(/\r\n/g,ce).split(ce);if(!oe.length)oe[0]=oe[0].replace(/\s+$/,g);he=p.crlf===true?A(oe.join("\r\n")):A(oe.join(ce));if(n>0||Ie(he,1)){if(Ie(he,5)===false){te=0;if(c(o[e+1],10)||c(o[e],10))te=2;if(c(o[e],32)&&K(o[e+1],32))te=1;}else {if(c(o[e+1],10)){te=2;}else if(c(o[e+1],32)){te=1;}else if(te>=1){te=0;}}}else {if(c(o[e+1],10)){te=2;}else if(c(o[e+1],32)){te=1;}}if(U.length>0){const Le=U.length-1;if(c(he,61)||c(he,45)){U[Le][0]=U[Le][0]+he;U[Le][1]=te;he=g;}else if(te===0&&U[Le][1]===0){U[Le][0]=U[Le][0]+he;U[Le][1]=te;he=g;}else if(te>0&&U[Le][1]===0&&Ve(he)===true){U[Le][0]=U[Le][0]+he;U[Le][1]=te;he=g;}else if(te>0&&U[Le][1]===0&&Ie(U[Le][0],4)){U[Le][0]=U[Le][0]+he;he=g;}else if(U[Le][1]>0&&te===0&&ht(he)===false){te=U[Le][1];}else if(U[Le][1]>0&&te>0&&Ve(he)&&!Ie(he,6)){const ut=he.indexOf("{%");U.push([he.slice(0,ut),te]);he=he.slice(ut);}}if(he!==g&&he!==ne)U.push([he,te]);if(U.length>0){const[Le]=U[U.length-1];if(Le.indexOf("=\u201C")>0){s.error=ee("Invalid quote character (\u201C, “) used.");}else if(Le.indexOf("=\u201D")>0){s.error=ee("Invalid quote character (\u201D, ”) used.");}}oe=[];te=c(o[e],10)?2:1;}do{if(c(o[e],10)){te=te+1;s.lineNumber=s.lineNumber+1;}if(le==="---"&&k==="---"&&R==="ignore"){W.push(o[e]);if(e>3&&c(o[e],45)&&c(o[e-1],45)&&c(o[e-2],45))break;e=e+1;continue}if(re===true||(be(o[e])===false&&K(H,125)||c(H,125))){if(me===false&&c(o[e-1],123)&&(c(o[e],123)||c(o[e],37))){me=true;}else if(me===true&&c(o[e],125)&&(c(o[e-1],125)||c(o[e-1],37))){me=false;}W.push(o[e]);if(c(W[0],60)&&c(W[1],62)&&c(k,62)){d.token="<>";d.types="start";u(a,d,"(empty)");return}if(c(W[0],60)&&c(W[1],47)&&c(W[2],62)&&c(k,62)){d.token="</>";d.types="end";u(a,d,g);return}}if(R==="cdata"&&c(o[e],62)&&c(o[e-1],93)&&K(o[e-2],93)){s.error=ee(`CDATA tag (${W.join(g)}) not properly terminated with "]]>`);break}if(R==="comment"){H=g;if(o[e]===v&&W.length>k.length+1){J=W.length;P=k.length-1;if(P>-1){do{J=J-1;if(K(W[J],k.charCodeAt(P)))break;P=P-1;}while(P>-1)}if(P<0)break}}else {if(H===g){if(c(W[0],60)&&c(W[1],33)&&R!=="cdata"){if(R==="doctype"&&c(o[e],62))break;if(c(o[e],91)){if(c(o[e+1],60)){R="start";break}if(be(o[e+1])){do{e=e+1;if(c(o[e],10))te=te+1;}while(e<L-1&&be(o[e+1]))}if(c(o[e+1],60)){R="start";break}}}if(r){if(c(o[e],123)){ae=ae+1;}else if(c(o[e],125)){ae=ae-1;}}if(c(o[e],60)&&Y===true&&re===false&&W.length>1&&/>{2,3}/.test(k)===false){s.error=ee(`Invalid structure detected ${o.slice(e,e+8).join(g)}`);break}if(be(o[e])===false&&Re===true&&o[e]!==v){Re=false;Q=0;H=ge;W.pop();if(e<L){do{if(c(o[e],10))s.lineNumber=s.lineNumber+1;if(w.preserveAttributes===true){W.push(o[e]);}else {oe.push(o[e]);}if(K(H,34)||K(H,39)){if(c(o[e-1],123)&&(c(o[e],37)||c(o[e],123))){me=true;}else if((c(o[e-1],125)||c(o[e-1],37))&&c(o[e],125)){me=false;}}if(r===false&&ye===false&&me===true&&w.preserveAttributes===false){const Fe=c(oe[0],61);do{e=e+1;if(c(o[e],10)){if(Fe){me=false;H=g;ve(false);break}}oe.push(o[e]);if(Fe&&c(o[e+1],62)){me=false;H=g;U[U.length-1][0]+=oe.join(g);oe=[];break}if(Fe===false&&c(o[e],125)&&(c(o[e-1],125)||c(o[e-1],37))){me=false;H=g;ve(false);break}}while(e<L)}if(r===false&&(c(o[e],60)||c(o[e],62))&&(H===g||c(H,62))){if(H===g&&c(o[e],60)){H=">";G=1;}else if(c(H,62)){if(c(o[e],60)){G=G+1;}else if(c(o[e],62)){G=G-1;if(G===0){H=g;Q=0;ve(false);break}}}}else if(H===g){if(o[e+1]===v){if(c.last(oe,47)||c.last(oe,63)&&R==="xml"){oe.pop();if(re===true)W.pop();e=e-1;}if(oe.length>0)ve(false);break}if(r===false&&c(o[e],123)&&c(o[e-1],61)){H="}";}else if(c(o[e],34)||c(o[e],39)){H=o[e];if(ye===false&&me===false)ye=true;if(c(o[e-1],61)&&(c(o[e+1],60)||c(o[e+1],123)&&c(o[e+2],37)||be(o[e+1])&&K(o[e-1],61))){Q=e;}}else if(c(o[e],40)){H=")";fe=1;}else if(r){if((c(o[e-1],61)||be(o[e-1]))&&c(o[e],123)){H="}";ie=1;}else if(c(o[e],47)){if(c(o[e+1],42)){H="*/";}else if(o[e+1]==="/"){H="\n";}}}else if(c(W[0],123)&&c(o[e],123)&&(c(o[e+1],123)||c(o[e+1],37))){H=c(o[e+1],123)?"}}":o[e+1]+"}";}if(be(o[e])&&H===g){if(c(oe[oe.length-2],61)){P=e+1;if(P<L){do{if(be(o[P])===false){if(c(o[P],34)||c(o[P],39)){e=P-1;Te=true;oe.pop();}break}P=P+1;}while(P<L)}}if(Te===true){Te=false;}else if(ae===0||ae===1&&c(oe[0],123)){oe.pop();if(oe.length>0)ve(false);Re=true;break}}}else if(c(o[e],40)&&c(H,41)){fe=fe+1;}else if(c(o[e],41)&&c(H,41)){fe=fe-1;if(fe===0){H=g;if(c(o[e+1],k.charCodeAt(0))){ve(false);break}}}else if(r&&(c(H,125)||c(H,10)&&c(o[e],10)||H==="*/"&&c(o[e-1],42)&&c(o[e],47))){if(c(o[e],96)){e=e+1;do{oe.push(o[e]);if(c(o[e],96))break;e=e+1;}while(e<o.length)}if(c(H,125)){if(c(o[e],125)&&o[e]!==H){ie=ie+1;}else if(o[e]===H){ie=ie-1;if(ie===0){ae=0;H=g;O=oe.join(g);if(w.preserveAttributes===false){if(r){if(!/^\s*$/.test(O))U.push([O,te]);}else {O=O.replace(/\s+/g,ne);if(O!==ne)U.push([O,te]);}}oe=[];te=1;break}}}else {ge=g;pe=true;O=oe.join(g);if(O!==ne)U.push([O,te]);oe=[];te=c(H,10)?2:1;H=g;break}}else if(c(o[e],123)&&c(o[e+1],37)&&c(o[Q-1],61)&&(c(H,34)||c(H,39))){H=H+"{%";Q=0;}else if(c(o[e-1],37)&&c(o[e],125)&&(H==='"{%'||H==="'{%")){H=H[0];Q=0;}else if(c(o[e],60)&&c(k,62)&&c(o[Q-1],61)&&(c(H,34)||c(H,39))){H=H+"<";Q=0;}else if(c(o[e],62)&&(H==='"<'||H==="'<")){H=H.charAt(0);Q=0;}else if(Q===0&&K(H,62)&&(H.length<2||K(H,34)&&K(H,39))){J=0;P=H.length-1;if(P>-1){do{if(K(o[e-J],H.charCodeAt(P)))break;J=J+1;P=P-1;}while(P>-1)}if(P<0&&me===false&&ye===true){ye=false;ve(true);if(o[e+1]===v)break}}else if(Q>0&&be(o[e])===false){Q=0;}e=e+1;}while(e<L)}}else if(c(k,10)===false&&(c(o[e],34)||c(o[e],39))){H=o[e];}else if(R!=="comment"&&K(k,10)&&c(o[e],60)&&c(o[e+1],33)&&c(o[e+2],45)&&c(o[e+3],45)&&a.types[s.count]!=="conditional"){H="-->";}else if(c(o[e],123)&&K(W[0],123)&&K(k,10)&&(c(o[e+1],123)||c(o[e+1],37))){if(c(o[e+1],123)){H="}}";}else {H=o[e+1]+"}";if(oe.length<1&&(U.length<1||be(o[e-1]))){W.pop();do{if(c(o[e],10))te=te+1;oe.push(o[e]);e=e+1;}while(e<L&&o[e-1]+o[e]!==H);oe.push("}");U.push([oe.join(g),te]);oe=[];te=1;H=g;}}if(H===k)H=g;}else if(Y&&K(k,10)&&be(o[e])&&K(o[e-1],60)){Re=true;}else if(Y&&r&&c(o[e],47)&&(c(o[e+1],42)||c(o[e+1],47))){Re=true;W[W.length-1]=ne;ge=c(o[e+1],42)?"*/":ce;oe.push(o[e]);}else if(me===false&&(o[e]===v||c(k,10)&&c(o[e+1],60))&&(W.length>k.length+1||c(W[0],93))&&(r===false||ae===0)){if(c(k,10)){if(be(W[W.length-1])){do{W.pop();e=e-1;}while(be(W[W.length-1]))}break}J=W.length;P=k.length-1;if(P>-1){do{J=J-1;if(W[J]!==k.charAt(P))break;P=P-1;}while(P>-1)}if(P<0){if(c(W[J],62)&&c(o[e],62)&&U.length>0){if(U[U.length-1][1]===0&&c(o[e-1],125)&&be(o[e+1])){U[U.length-1][1]=c(o[e+1],32)?1:2;}}break}}}else if(c(o[e],H.charCodeAt(H.length-1))&&(r&&c(k,125)&&(K(o[e-1],92)||C(e)===false)||(r===false||K(k,125)))){J=0;P=H.length-1;if(P>-1){do{if(o[e-J]!==H.charAt(P))break;J=J+1;P=P-1;}while(P>-1)}if(P<0)H=g;}}e=e+1;}while(e<L);Q=0;O=W.join(g);I=Ne(O);O=A(O);d.token=O;d.types=R;if(re===false&&r===false)O=O.replace(/\s+/g,ne);return S()}function se(){if(p.wrap>0&&r===true){let W=0;let P=s.count;let J=0;if(a.types[P].indexOf("attribute")>-1){do{W=W+a.token[P].length+1;P=P-1;}while(a.lexer[P]!=="markup"||a.types[P].indexOf("attribute")>-1);if(a.lines[P]===1)W=W+a.token[P].length+1;}else if(a.lines[P]===1){W=a.token[P].length+1;}J=P-1;if(W>0&&a.types[J]!=="script_end"){if(a.types[J].indexOf("attribute")>-1){do{W=W+a.token[J].length+1;J=J-1;}while(a.lexer[J]!=="markup"||a.types[J].indexOf("attribute")>-1);if(a.lines[J]===1)W=W+a.token[J].length+1;}else if(a.lines[J]===1){W=a.token[J].length+1;}}}s.linesSpace=0;}return N()}function z(){const k=e;const d=r===true&&c(a.token[s.count],123);let O=[];let v=g;let R=s.linesSpace;let I=g;if(m===true){if(d===true){I="script";}else if(s.scope.index>-1){I=Ne(a.token[s.scope.index]);}else if(a.begin[s.count]>1){I=Ne(a.token[a.begin[s.count]]);}else {I=Ne(a.token[a.begin[s.count]]);}}const le=a.types[s.count]==="template_start"&&a.token[s.count].indexOf("<!")===0&&a.token[s.count].indexOf("<![")<0&&a.token[s.count].charCodeAt(a.token[s.count].length-1)===91;const V={begin:s.scope.index,ender:-1,lexer:"markup",lines:R,stack:Ne(s.scope.token),token:g,types:"content"};function ue(){let Q=e-1;let pe=0;if(K(o[e-1],92))return false;if(Q>-1){do{if(K(o[Q],92))break;pe=pe+1;Q=Q-1;}while(Q>-1)}return pe%2===1}if(e<L){let Q=g;let pe=g;let Ce=g;let re=0;do{if(c(o[e],10))s.lineNumber=s.lineNumber+1;if(m===true){if(pe===g){if(c(o[e],47)){if(c(o[e+1],42)){pe="*";}else if(c(o[e+1],47)){pe="/";}else if(I==="script"&&"([{!=,;.?:&<>".indexOf(o[e-1])>-1){if(r===false||K(o[e-1],60))pe="reg";}}else if((c(o[e],34)||c(o[e],39)||c(o[e],96))&&ue()===false){pe=o[e];}else if(c(o[e],123)&&d===true){re=re+1;}else if(c(o[e],125)&&d===true){if(re===0){Ce=O.join(g).replace(He,g).replace(De,g);q.lexers.script(Ce);s.scope.index+=1;if(a.types[s.count]==="end"&&a.lexer[a.begin[s.count]-1]==="script"){V.lexer="script";V.token=w.correct===true?";":"x;";V.types="separator";u(a,V,g);V.lexer="markup";}V.token="}";V.types="script_end";u(a,V,g);s.structure.pop();break}re=re-1;}if(Ie(a.token[s.count],3)===false){Q=o.slice(e,e+10).join(g).toLowerCase();if(I==="script"){Q=e===L-9?Q.slice(0,Q.length-1):Q.slice(0,Q.length-2);if(Q==="<\/script"){Ce=O.join(g).replace(He,g).replace(De,g);e=e-1;if(O.length<1)break;if(/^<!--+/.test(Ce)&&/--+>$/.test(Ce)){V.token="<!--";V.types="comment";u(a,V,g);Ce=Ce.replace(/^<!--+/,g).replace(/--+>$/,g);q.lexers.script(Ce);V.token="-->";u(a,V,g);}else {p.language=_;q.lexers.script(Ce);if(_==="json"&&p.json.objectSort||_!=="json"&&p.script.objectSort){s.sortCorrect(0,s.count+1);}p.language="html";}break}}if(I==="style"){if(e===L-8){Q=Q.slice(0,Q.length-1);}else if(e===L-9){Q=Q.slice(0,Q.length-2);}else {Q=Q.slice(0,Q.length-3);}if(Q==="</style"){let Y=O.join(g).replace(He,g).replace(De,g);e=e-1;if(O.length<1)break;if(/^<!--+/.test(Y)&&/--+>$/.test(Y)){V.token="<!--";V.types="comment";u(a,V,g);Y=Y.replace(/^<!--+/,g).replace(/--+>$/,g);q.lexers.style(Y);V.token="-->";u(a,V,g);}else {p.language=_;q.lexers.style(Y);if(p.style.sortProperties===true)s.sortCorrect(0,s.count+1);p.language="html";}break}}}else {const Y=ke.embed("liquid",I);if(Y!==false){const U=o.slice(e).join(g);const de=U.search(new RegExp(`{%-?\\s*end${I}`));O=O.length>0?O.concat(O,o.slice(e,e+de)):o.slice(e,e+de);e=e+de;Q=o.slice(e).join(g).toLowerCase();if(Y.end(Q)){Q=Q.slice(0,Q.indexOf("%}")+2);Ce=O.join(g).replace(He,g).replace(De,g);e=e+(Q.length-1);if(O.length<1)break;s.lexer(Ce,Y.language);V.token=Q;V.types="template_end";u(a,V,g);}break}}}else if(pe===o[e]&&ue()===false&&(c(pe,34)||c(pe,39)||c(pe,96)||c(pe,42)&&c(o[e+1],47))){pe=g;}else if(c(pe,96)&&c(o[e],36)&&c(o[e+1],123)&&ue()===false){pe="}";}else if(c(pe,125)&&c(o[e],125)&&ue()===false){pe="`";}else if(c(pe,47)&&(c(o[e],10)||c(o[e],13))){pe=g;}else if(pe==="reg"&&c(o[e],47)&&ue()===false){pe=g;}else if(c(pe,47)&&c(o[e],60)&&c(o[e-1],45)&&c(o[e-2],45)){Q=o.slice(e+1,e+11).join(g).toLowerCase();Q=Q.slice(0,Q.length-2);if(I==="script"&&Q==="<\/script")pe=g;Q=Q.slice(0,Q.length-1);if(I==="style"&&Q==="</style")pe=g;}}if(le===true&&c(o[e],93)){e=e-1;R=0;v=O.join(g);v=v.replace(De,g);V.token=v;u(a,V,g);break}if(m===false&&O.length>0&&(c(o[e],60)&&K(o[e+1],61)&&!/[\s\d]/.test(o[e+1])||c(o[e],91)&&c(o[e+1],37)||c(o[e],123)&&(r===true||c(o[e+1],123)||c(o[e+1],37)))){e=e-1;if(s.scope.token==="comment"){v=O.join(g);}else {v=O.join(g).replace(De,g);}R=0;V.token=v;if(p.wrap>0&&w.preserveText===false){let _e=function(){if(c(v[de],32)){U.push(v.slice(0,de));v=v.slice(de+1);Pe=v.length;de=Y;return}do de=de-1;while(de>0&&K(v[de],32));if(de>0){U.push(v.slice(0,de));v=v.slice(de+1);Pe=v.length;de=Y;}else {de=Y;do de=de+1;while(de<Pe&&K(v[de],32));U.push(v.slice(0,de));v=v.slice(de+1);Pe=v.length;de=Y;}};const{wrap:Y}=p;const U=[];let de=Y;let Pe=v.length;if(a.token[a.begin[s.count]]==="<a>"&&a.token[a.begin[a.begin[s.count]]]==="<li>"&&a.lines[a.begin[s.count]]===0&&s.linesSpace===0&&v.length<p.wrap){u(a,V,g);break}if(Pe<Y){u(a,V,g);break}if(s.linesSpace<1&&s.count>-1){let We=s.count;do{de=de-a.token[We].length;if(a.types[We].indexOf("attribute")>-1)de=de-1;if(a.lines[We]>0&&a.types[We].indexOf("attribute")<0)break;We=We-1;}while(We>0&&de>0);if(de<1)de=v.indexOf(ne);}v=O.join(g).replace(He,g).replace(De,g).replace(/\s+/g,ne);do _e();while(de<Pe);if(v!==g&&K(v,32))U.push(v);v=p.crlf===true?U.join("\r\n"):U.join("\n");v=g+v+g;}else {const Y=v.indexOf(ce);if(Y>-1){V.token=v.slice(0,Y);u(a,V,g);v=v.slice(Y);const U=v.match(/^\n+/);if(U===null){V.lines=1;}else {V.lines=2;v=v.replace(He,g);}}}R=0;V.token=v;u(a,V,g);break}O.push(o[e]);e=e+1;}while(e<L)}if(e>k&&e<L){if(be(o[e])){let Q=e;s.linesSpace=1;do{if(c(o[Q],10))s.linesSpace=s.linesSpace+1;Q=Q-1;}while(Q>k&&be(o[Q]))}else {s.linesSpace=0;}}else if(e!==k||e===k&&m===false){v=O.join(g).replace(De,g);R=0;if(V.token!==v){V.token=v;u(a,V,g);s.linesSpace=0;}}m=false;}function b(){s.linesSpace=1;do{if(c(o[e],10)){s.lineStart=e;s.linesSpace=s.linesSpace+1;s.lineNumber=s.lineNumber+1;}if(be(o[e+1])===false)break;e=e+1;}while(e<L)}if(p.language==="html"||p.language==="liquid");do{if(be(o[e])){b();}else if(m){z();}else if(c(o[e],60)){y(g);}else if(c(o[e],123)&&(r||c(o[e+1],123)||c(o[e+1],37))){y(g);}else if(c(o[e],45)&&c(o[e+1],45)&&c(o[e+2],45)){y("---");}else if(s.error){M();return a}else {z();}e=e+1;}while(e<L);if($.end!==$.start&&s.error===g){if($.end>$.start){const k=$.end-$.start;const d=k===1?g:"s";s.error=`Prettify Error (line ${$.line}):
${k} more end type${d} than start type${d}`;}else {const k=$.start-$.end;const d=k===1?g:"s";s.error=`Prettify Error (line ${$.line}):
${k} more start type${d} than end type${d}`;}}return a};q.beautify.markup=function(i){const f={};const p="markup";const a=s.data;const r=i.language==="jsx"||i.language==="tsx";const t=i.crlf===true?String.fromCharCode(13,10):String.fromCharCode(10);const w=i.markup;const E=w.forceAttribute;const $=q.end<1||q.end>a.token.length?a.token.length:q.end+1;const o={is:(C,u)=>a.types[C]===u,not:(C,u)=>a.types[C]!==u,idx:(C,u)=>C>-1&&(a.types[C]||g).indexOf(u)};const L={is:(C,u)=>a.token[C]===u,not:(C,u)=>a.token[C]!==u};let e=q.start;let m=-1;let _=0;let Z=0;let n=isNaN(i.indentLevel)?0:Number(i.indentLevel);const A=function(){const C=q.start>0?Array(q.start).fill(0,0,q.start):[];function u(){let k=e+1;let d=0;if(o.is(k,void 0))return k-1;if(o.is(k,"comment")||e<$-1&&o.idx(k,"attribute")>-1){do{if(o.is(k,"jsx_attribute_start")){d=k;do{if(o.is(k,"jsx_attribute_end")&&a.begin[k]===d)break;k=k+1;}while(k<$)}else if(o.not(k,"comment")&&o.idx(k,"attribute")<0)return k;k=k+1;}while(k<$)}return k}function X(){const k=a.begin[e];let d=e;do{d=d-1;if(L.is(d,"</li>")&&L.is(d-1,"</a>")&&a.begin[a.begin[d]]===k&&a.begin[d-1]===a.begin[d]+1){d=a.begin[d];}else {return}}while(d>k+1);d=e;do{d=d-1;if(o.is(d+1,"attribute")){C[d]=-10;}else if(L.not(d,"</li>")){C[d]=-20;}}while(d>k+1)}function ee(){let k=e;let d=false;if(a.lines[e+1]===0&&w.forceIndent===false){do{if(a.lines[k]>0){d=true;break}k=k-1;}while(k>m);k=e;}else {d=true;}if(d===true){if(o.is(a.begin[k]-1,"template")){C[a.begin[k]-1]=n;}const O=o.is(_,"end")||o.is(_,"template_end")?n+1:n;do{C.push(O);k=k-1;}while(k>m);if(O===n+1)C[e]=n;if(o.is(k,"attribute")||o.is(k,"template_attribute")||o.is(k,"jsx_attribute_start")){C[a.begin[k]]=O;}else {C[k]=O;}}else {do{C.push(-20);k=k-1;}while(k>m);C[k]=-20;}m=-1;}function h(){let k=n;if(w.forceIndent===true||w.forceAttribute===true){C.push(n);return}if(_<$&&(o.idx(_,"end")>-1||o.idx(_,"start")>-1)&&a.lines[_]>0){C.push(n);k=k+1;if(e>0&&o.is(e,"singleton")&&o.idx(e-1,"attribute")>-1&&o.is(a.begin[e-1],"singleton")){if(a.begin[e]<0||o.is(a.begin[e-1],"singleton")&&a.begin[a.ender[e]-1]!==e){C[e-1]=n;}else {C[e-1]=n+1;}}}else if(e>0&&o.is(e,"singleton")&&o.idx(e-1,"attribute")>-1){C[e-1]=n;Z=a.token[e].length;C.push(-10);}else if(a.lines[_]===0){C.push(-20);}else if((i.wrap===0||e<$-2&&a.token[e]!==void 0&&a.token[e+1]!==void 0&&a.token[e+2]!==void 0&&a.token[e].length+a.token[e+1].length+a.token[e+2].length+1>i.wrap&&o.idx(e+2,"attribute")>-1||a.token[e]!==void 0&&a.token[e+1]!==void 0&&a.token[e].length+a.token[e+1].length>i.wrap)&&(o.is(e+1,"singleton")||o.is(e+1,"template"))){C.push(n);}else {Z=Z+1;C.push(-10);}if(e>0&&o.idx(e-1,"attribute")>-1&&a.lines[e]<1){C[e-1]=-20;}if(Z>i.wrap){let d=e;let O=Math.max(a.begin[e],0);if(o.is(e,"content")&&w.preserveText===false){let v=0;const R=a.token[e].replace(/\s+/g,ne).split(ne);do{d=d-1;if(C[d]<0){v=v+a.token[d].length;if(C[d]===-10)v=v+1;}else {break}}while(d>0);d=0;O=R.length;do{if(R[d].length+v>i.wrap){R[d]=t+R[d];v=R[d].length;}else {R[d]=` ${R[d]}`;v=v+R[d].length;}d=d+1;}while(d<O);if(c(R[0],32)){a.token[e]=R.join(g).slice(1);}else {C[e-1]=k;a.token[e]=R.join(g).replace(t,g);}if(a.token[e].indexOf(t)>0){Z=a.token[e].length-a.token[e].lastIndexOf(t);}}else {do{d=d-1;if(C[d]>-1){Z=a.token[e].length;if(a.lines[e+1]>0)Z=Z+1;return}if(o.idx(d,"start")>-1){Z=0;return}if(a.lines[d+1]>0&&(o.not(d,"attribute")||o.is(d,"attribute")&&o.is(d+1,"attribute"))){if(o.not(d,"singleton")||o.is(d,"attribute")&&o.is(d+1,"attribute")){Z=a.token[e].length;if(a.lines[e+1]>0)Z=Z+1;break}}}while(d>O);C[d]=k;}}}function M(){const k=e;if(a.types[k-1]==="script_start"&&c(a.token[k-1],123)){C[k-1]=-20;}do{if(a.lexer[e+1]===p&&a.begin[e+1]<k&&o.not(e+1,"start")&&o.not(e+1,"singleton"))break;C.push(0);e=e+1;}while(e<$);f[k]=e;if(a.types[e+1]==="script_end"&&a.token[e+1]==="}"){C.push(-20);}else {C.push(n-1);}_=u();if(a.lexer[_]===p&&a.stack[e].indexOf("attribute")<0&&(a.types[_]==="end"||a.types[_]==="template_end")){n=n-1;}}function y(){function k(ue){const xe=a.token[ue].replace(/\s+/g,ne).split(ne);const Q=xe.length;let pe=1;let Ce=xe[0].length;do{if(Ce+xe[pe].length>i.wrap){Ce=xe[pe].length;xe[pe]=t+xe[pe];}else {xe[pe]=` ${xe[pe]}`;Ce=Ce+xe[pe].length;}pe=pe+1;}while(pe<Q);a.token[ue]=xe.join(g);}let d=e;const O=e-1;let v=false;let R=false;let I=a.types.indexOf("end",O+1);let le=a.token[O].length+1;let V=(()=>{if(o.idx(e,"start")>0){let ue=e;do{if(o.is(ue,"end")&&a.begin[ue]===e){if(ue<$-1&&o.idx(ue+1,"attribute")>-1){v=true;break}}ue=ue+1;}while(ue<$)}else if(e<$-1&&o.idx(e+1,"attribute")>-1){v=true;}if(o.is(_,"end")||o.is(_,"template_end")){return n+(o.is(O,"singleton")?2:1)}if(o.is(O,"singleton"))return n+1;return n})();if(v===false&&o.is(e,"comment_attribute")){C.push(n);C[O]=a.types[O]==="singleton"?n+1:n;return}if(V<1)V=1;I=0;do I=I+1;while(o.idx(e+I,"attribute")>-1&&(o.not(e+I,"end")||o.not(e+I,"singleton")||o.not(e+I,"start")||o.not(e+I,"comment")));do{Z=Z+a.token[e].length+1;if(a.types[e].indexOf("attribute")>0){if(o.is(e,"comment_attribute")){C.push(V);}else if(o.idx(e,"start")>0&&o.idx(e,"template")<0){R=true;if(e<$-2&&a.types[e+2].indexOf("attribute")>0){C.push(-20);e=e+1;f[e]=e;}else {if(O===e-1&&v===false){if(r){C.push(-20);}else {C.push(V);}}else {if(r){C.push(-20);}else {C.push(V+1);}}if(a.lexer[e+1]!==p){e=e+1;M();}}}else if(o.idx(e,"end")>0){if(C[e-1]!==-20)C[e-1]=C[a.begin[e]]-1;if(a.lexer[e+1]!==p){C.push(-20);}else {C.push(V);}}else {C.push(V);}}else if(o.is(e,"attribute")){le=le+a.token[e].length+1;if(w.preserveAttributes===true){C.push(-10);}else if(w.forceAttribute===true||w.forceAttribute>=1||R===true||e<$-1&&o.idx(e+1,"attribute")>0){if(w.forceAttribute===false&&a.lines[e]===1){C.push(-10);}else {if(w.forceAttribute===true){C.push(V);}else {C.push(-10);}}}else {C.push(-10);}}else if(a.begin[e]<O+1){break}e=e+1;}while(e<$);e=e-1;if(o.idx(e,"template")<0&&o.idx(e,"end")>0&&o.idx(e,"attribute")>0&&o.not(O,"singleton")&&C[e-1]>0&&v===true){C[e-1]=C[e-1]-1;}if(C[e]!==-20){if(r===true&&o.idx(O,"start")>-1&&o.is(e+1,"script_start")){C[e]=V;}else {if(L.is(e,"/")&&C[e-1]!==10){C[e-1]=-10;}else {C[e]=C[O];}}}if(w.forceAttribute===true){Z=0;C[O]=V;}else if(w.forceAttribute>=1){if(I>=w.forceAttribute){C[O]=V;let ue=e-1;do{if(o.is(ue,"template")&&C[ue]===-10){C[ue]=V;}else if(o.is(ue,"attribute")&&C[ue]===-10){C[ue]=V;}ue=ue-1;}while(ue>O)}else {C[O]=-10;}}else {C[O]=-10;}if(w.preserveAttributes===true||L.is(O,"<%xml%>")||L.is(O,"<?xml?>")){Z=0;return}d=e;if(d>O+1){if(w.selfCloseSpace===false)le=le-1;if(le>i.wrap&&i.wrap>0&&w.forceAttribute===false){if(w.forceLeadAttribute===true){C[O]=V;d=d-1;}Z=a.token[e].length;do{if(a.token[d].length>i.wrap&&be(a.token[d]))k(d);if(o.idx(d,"template")>-1&&C[d]===-10){C[d]=V;}else if(o.is(d,"attribute")&&C[d]===-10){C[d]=V;}d=d-1;}while(d>O)}}else if(i.wrap>0&&o.is(e,"attribute")&&a.token[e].length>i.wrap&&be(a.token[e])){k(e);}}function z(){const k=a.token[e].split(ce);const d=c(a.token[e][2],45);let O=0;let v=0;let R=0;let I=g;let le=g;if(C.length>=2){O=C[C.length-2]+1;}else if(C.length===1){O=C[C.length-1]+1;}let V=d?$e(O*i.indentSize):$e(O*i.indentSize-1);do{if(v===0){I=k[v].trimEnd();if(I.endsWith(",")){le=","+ne;k[v]=I.slice(0,-1);}else if(I.endsWith("|")){le="|"+ne;k[v]=I.slice(0,-1);}else if(/^{[{%]-?$/.test(I)){k[v]=I;v=v+1;do{I=k[v].trim();if(I.length>0)break;k.splice(v,1);if(v>k.length)break}while(v<k.length);const ue=k[k.length-1].trim();if(/^-?[%}]}$/.test(ue)){R=1;if(d){k[v]=V+I;k[k.length-1]=V.slice(2)+ue;V=V.slice(2)+$e(i.indentSize);}else {k[v]=V+$e(i.indentSize)+I;k[k.length-1]=V.slice(1)+ue;V=V+$e(i.indentSize);}}else {k[v]=V+$e(i.indentSize)+I;}}else if(I.endsWith(",")===false&&c(k[v+1].trimStart(),44)&&w.lineBreakSeparator==="after"){k[v]=I+",";}v=v+1;continue}I=k[v].trim();if(c(I,44)&&w.lineBreakSeparator==="after"){if(I.endsWith("%}")){I=ne+I.slice(1);}else {I=ne+I.slice(1)+",";}}if(I.length===0){k.splice(v,1);continue}if(v===k.length-1&&R===1)break;if(I.endsWith(",")&&w.lineBreakSeparator==="before"){k[v]=V+le+I.slice(0,-1);le=","+ne;}else if(I.endsWith("|")){k[v]=V+le+I.slice(0,-1);le=V+"|"+ne;}else {k[v]=V+le+I;le=g;}v=v+1;}while(v<k.length);if(w.normalizeSpacing===true){a.token[e]=k.join(ce).replace(/\s*-?[%}]}$/,ue=>ue.replace(/\s*/,ne));}else {const ue=$e(a.lines[e]-1===-1?i.indentSize:a.lines[e]-1);a.token[e]=k.join(ce).replace(/\s*-?[%}]}$/,xe=>xe.replace(Ee,ue));}}function b(k){return o.is(k,"template")&&a.token[k].indexOf(t)>0&&/{%-?\s*\bliquid/.test(a.token[k])===false}do{if(a.lexer[e]===p){if(o.is(e,"doctype"))C[e-1]=n;if(o.idx(e,"attribute")>-1){if(s.attributes.has(a.begin[e])&&E!==true){w.forceAttribute=true;}else if(E!==w.forceAttribute){w.forceAttribute=E;}y();}else if(o.is(e,"comment")){if(m<0)m=e;if(o.not(e+1,"comment")||e>0&&o.idx(e-1,"end")>-1){ee();}}else if(o.not(e,"comment")){_=u();if(o.is(_,"end")||o.is(_,"template_end")){if(s.attributes.has(a.begin[e])||a.types[a.begin[e-1]]==="singleton"&&a.types[e-1]==="attribute");n=n-1;if(o.is(_,"template_end")&&o.is(a.begin[_]+1,"template_else")){n=n-1;}if(L.is(e,"</ol>")||L.is(e,"</ul>")||L.is(e,"</dl>"))X();}if(o.is(e,"script_end")&&o.is(_,"end")){if(a.lines[_]<1){C.push(-20);}else if(a.lines[_]>1){C.push(n);}else {C.push(-10);}}else if((w.forceIndent===false||w.forceIndent===true&&o.is(_,"script_start"))&&(o.is(e,"content")||o.is(e,"singleton")||o.is(e,"template"))){Z=Z+a.token[e].length;if(a.lines[_]>0&&o.is(_,"script_start")){C.push(-10);}else if(i.wrap>0&&(o.idx(e,"template")<0||_<$&&o.idx(e,"template")>-1&&o.idx(_,"template")<0)){h();}else if(_<$&&(o.idx(_,"end")>-1||o.idx(_,"start")>-1)&&(a.lines[_]>0||o.idx(e,"template_")>-1)){C.push(n);if(b(e))z();}else if(a.lines[_]===0){C.push(-20);if(b(e))z();}else if(a.lines[_]===1){C.push(-10);}else {C.push(n);if(b(e))z();}}else if(o.is(e,"start")||o.is(e,"template_start")){n=n+1;if(o.is(e,"template_start")&&o.is(_,"template_else")){n=n+1;}if(r===true&&L.is(e+1,"{")){if(a.lines[_]===0){C.push(-20);}else if(a.lines[_]>1){C.push(n);}else {C.push(-10);}}else if(o.is(e,"start")&&o.is(_,"end")||o.is(e,"template_start")&&o.is(_,"template_end")){C.push(-20);}else if(o.is(e,"start")&&o.is(_,"script_start")){C.push(-10);}else if(w.forceIndent===true){C.push(n);}else if(a.lines[_]===0&&(o.is(_,"content")||o.is(_,"singleton")||o.is(e,"start")&&o.is(_,"template"))){C.push(-20);}else {C.push(n);}}else if(w.forceIndent===false&&a.lines[_]===0&&(o.is(_,"content")||o.is(_,"singleton"))){C.push(-20);}else if(o.is(e+2,"script_end")){C.push(-20);}else if(o.is(e,"template_else")){C[e-1]=n-1;if(o.is(_,"template_end")){C[e-1]=n-1;}C.push(n);}else if(w.forceIndent===true&&(o.is(e,"content")&&(o.is(_,"template")||o.is(_,"content"))||o.is(e,"template")&&(o.is(_,"content")||o.is(_,"template")))){if(a.lines[_]<1){C.push(-20);}else if(a.lines[_]>1){C.push(n);}else {C.push(-10);}}else {C.push(n);}}if(o.not(e,"content")&&o.not(e,"singleton")&&o.not(e,"template")&&o.not(e,"attribute")){Z=0;}}else {Z=0;M();}e=e+1;}while(e<$);return C}();return function(){const C=[];const u=function(){const y=[i.indentChar];const z=i.indentSize-1;let b=0;if(b<z){do{y.push(i.indentChar);b=b+1;}while(b<z)}return y.join(g)}();function X(y){const z=[];const b=i.preserveLine+1;const k=Math.min(a.lines[e+1]-1,b);let d=0;if(y<0)y=0;do{z.push(t);d=d+1;}while(d<k);if(y>0){d=0;do{z.push(u);d=d+1;}while(d<y)}return z.join(g)}function ee(){let y=a.token[e].split(t);const z=a.lines[e+1];if(o.is(e,"comment")&&i.preserveComment===false){y=y.map(O=>O.trimStart());}const b=A[e-1]>-1?o.is(e,"attribute")?A[e-1]+1:A[e-1]:(()=>{let O=e-1;let v=O>-1&&o.idx(O,"start")>-1;if(A[e]>-1&&o.is(e,"attribute"))return A[e]+1;do{O=O-1;if(A[O]>-1)return o.is(e,"content")&&v===false?A[O]:A[O]+1;if(o.idx(O,"start")>-1)v=true;}while(O>0);return O===-2?0:1})();let k=0;a.lines[e+1]=0;const d=y.length-1;do{if(o.is(e,"comment")){if(k===0&&w.commentNewline){if(i.preserveLine===0){C.push(X(b));}else {if(C.length>0&&C[C.length-1].lastIndexOf(ce)+1<2){C.push(X(b));}}}if(y[k]!==g){if(k>0&&i.commentIndent)C.push(u);if(y[k+1].trimStart()!==g){C.push(y[k],X(b));}else {C.push(y[k],ce);}}else {if(y[k+1].trimStart()===g){C.push(ce);}else {C.push(X(b));}}}else {C.push(y[k]);C.push(X(b));}k=k+1;}while(k<d);a.lines[e+1]=z;C.push(y[d]);if(o.is(e,"comment")&&(o.is(e+1,"template_end")||o.is(e-1,"template_end"))){C.push(X(A[e]));}else if(A[e]===-10){C.push(ne);}else if(A[e]>1){C.push(X(A[e]));}else if(A[e]===0&&e===0&&o.is(e,"comment")){C.push(X(A[e]));}}function h(){const y=/(?!=)\/?>$/;const z=a.token[e];const b=y.exec(z);if(b===null)return;let k=e+1;let d=false;let O=w.selfCloseSpace===true&&b!==null&&b[0]==="/>"?ne:g;a.token[e]=z.replace(y,g);do{if(o.is(k,"jsx_attribute_end")&&a.begin[a.begin[k]]===e){d=false;}else if(a.begin[k]===e){if(o.is(k,"jsx_attribute_start")){d=true;}else if(o.idx(k,"attribute")<0&&d===false){break}}else if(d===false&&(a.begin[k]<e||o.idx(k,"attribute")<0)){break}k=k+1;}while(k<$);if(o.is(k-1,"comment_attribute"))O=X(A[k-2]-1);if(!s.attributes.has(e)){a.token[k-1]=`${a.token[k-1]}${O}${b[0]}`;}if(o.is(k,"comment")&&a.lines[e+1]<2)A[e]=-10;}e=q.start;let M=i.indentLevel;do{if(a.lexer[e]===p){if((o.is(e,"start")||o.is(e,"singleton")||o.is(e,"xml"))&&o.idx(e,"attribute")<0&&e<$-1&&a.types[e+1]!==void 0&&o.idx(e+1,"attribute")>-1){h();}if(L.not(e,void 0)&&a.token[e].indexOf(t)>0&&(o.is(e,"content")&&w.preserveText===false||o.is(e,"comment")||o.is(e,"attribute"))){ee();}else if(i.preserveComment===false&&o.is(e,"comment")&&w.commentNewline&&(i.preserveLine===0||C[C.length-1].lastIndexOf(ce)+1<2)){C.push(X(A[e]),a.token[e],X(A[e]));}else {C.push(a.token[e]);if(A[e]===-10&&e<$-1){C.push(ne);}else if(A[e]>-1){M=A[e];C.push(X(A[e]));}}}else {q.start=e;q.end=f[e];const y=s.beautify(M);const z=y.beautify.replace(Ee,g);C.push(z);if(z.endsWith(ce)){if(M-1>0)C.push($e(M-1,u));}else {if(w.forceIndent===true||A[q.iterator]>-1&&f[e]>e){C.push(X(A[q.iterator]));}}e=q.iterator;y.reset();}e=e+1;}while(e<$);q.iterator=$-1;if(C[0]===t||c(C[0],32))C[0]=g;return C.join(g)}()};q.beautify.style=function i(f){const p=[];const a=q.data;const r=f.style;const t=f.crlf===true?"\r\n":"\n";const w=q.end>0?q.end+1:a.token.length;const E=f.preserveLine+1;const $=(()=>{let Z=0;const n=[];do{n.push(f.indentChar);Z=Z+1;}while(Z<f.indentSize);return n.join(g)})();let o=f.indentLevel;let L=q.start;let e=[g,g];const m={is:(Z,n)=>a.types[Z]===n,not:(Z,n)=>a.types[Z]!==n,idx:(Z,n)=>Z>-1&&(a.types[Z]||g).indexOf(n)};function _(Z){const n=[];const A=(()=>{if(L===w-1)return 1;if(a.lines[L+1]-1>E)return E;if(a.lines[L+1]>1)return a.lines[L+1]-1;return 1})();let C=0;if(Z<0)Z=0;do{n.push(t);C=C+1;}while(C<A);if(Z>0){C=0;do{n.push($);C=C+1;}while(C<Z)}p.push(n.join(g));}do{if(m.is(L+1,"end")||m.is(L+1,"template_end")||m.is(L+1,"template_else")){o=o-1;}if(m.is(L,"template")&&a.lines[L]>0){p.push(a.token[L]);_(o);}else if(m.is(L,"template_else")){p.push(a.token[L]);o=o+1;_(o);}else if(m.is(L,"start")||m.is(L,"template_start")){o=o+1;p.push(a.token[L]);if(m.not(L+1,"end")&&m.not(L+1,"template_end")){_(o);}}else if(c(a.token[L],59)||(m.is(L,"end")||m.is(L,"template_end")||m.is(L,"comment"))){p.push(a.token[L]);if(m.is(L+1,"value")){if(a.lines[L+1]===1){p.push(ne);}else if(a.lines[L+1]>1){_(o);}}else if(m.not(L+1,"separator")){if(m.not(L+1,"comment")||m.is(L+1,"comment")&&a.lines[L+1]>1){_(o);}else {p.push(ne);}}}else if(c(a.token[L],58)){p.push(a.token[L]);if(m.not(L+1,"selector")&&K(a.token[L+1],44)){p.push(ne);}}else if(m.is(L,"selector")){if(r.classPadding===true&&m.is(L-1,"end")&&a.lines[L]<3){p.push(t);}if(a.token[L].indexOf("and(")>0){a.token[L]=a.token[L].replace(/and\(/,"and (");p.push(a.token[L]);}else if(a.token[L].indexOf("when(")>0){e=a.token[L].split("when(");p.push(e[0].replace(/\s+$/,g));_(o+1);p.push(`when (${e[1]}`);}else {p.push(a.token[L]);}if(m.is(L+1,"start")){p.push(ne);}}else if(c(a.token[L],44)){p.push(a.token[L]);if(m.is(L+1,"selector")||m.is(L+1,"property")){_(o);}else {p.push(ne);}}else if(a.stack[L]==="map"&&c(a.token[L+1],41)&&L-a.begin[L]>5){p.push(a.token[L]);_(o);}else if(a.token[L]==="x;"){_(o);}else if((m.is(L,"variable")||m.is(L,"function"))&&r.classPadding===true&&m.is(L-1,"end")&&a.lines[L]<3){p.push(t);p.push(a.token[L]);}else if(K(a.token[L],59)){p.push(a.token[L]);}L=L+1;}while(L<w);q.iterator=w-1;return p.join(g)};q.beautify.script=i=>{const f=new Set(["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"]);const r=Ue(null);const t=q.data;const w="script";const E=q.scopes;const $=q.end<1||q.end>t.token.length?t.token.length:q.end+1;const o=(()=>{let e=q.start;let m=isNaN(i.indentLevel)?0:Number(i.indentLevel);let _=false;let Z=false;let n="";let A="";let C=t.types[0];let u=t.token[0];const X=[-1];const ee=[];const h=q.start>0?Array(q.start).fill(0,0,q.start):[];const M=[];const y=[[]];const z=[];const b=[];const k=[];const d=[false];const O=[];const v=[];function R(){I(false,false);const T=i.commentIndent===true?m:0;if(_===false&&/\/\u002a\s*global\s/.test(t.token[e])){const D=t.token[e].replace(/\/\u002a\s*global\s+/,"").replace(/\s*\u002a\/$/,"").split(",");let l=D.length;do{l=l-1;D[l]=D[l].replace(/\s+/g,"");if(D[l]!=="")E.push([D[l],-1]);}while(l>0)}if(t.types[e-1]==="comment"||t.types[e+1]==="comment"){h[e-1]=T;}else if(t.lines[e]<2){let D=e+1;if(t.types[D]==="comment"){do{D=D+1;}while(D<$&&t.types[D]==="comment")}if(e<$-1&&t.stack[D]!=="block"&&(t.token[D]==="{"||t.token[D]==="x{")){let l=E.length;t.begin.splice(e,0,t.begin[D]);t.ender.splice(e,0,t.ender[D]);t.lexer.splice(e,0,t.lexer[D]);t.lines.splice(e,0,t.lines[D]);t.stack.splice(e,0,t.stack[D]);t.token.splice(e,0,t.token[D]);t.types.splice(e,0,t.types[D]);if(l>0){do{l=l-1;if(E[l][1]===D){E[l][1]=e;}else if(E[l][1]<e){break}}while(l>0)}D=D+1;t.begin.splice(D,1);t.ender.splice(D,1);t.lexer.splice(D,1);t.lines.splice(D,1);t.stack.splice(D,1);t.token.splice(D,1);t.types.splice(D,1);l=e+1;do{t.begin[l]=e;t.stack[l]=t.stack[D];l=l+1;}while(l<D);l=l+1;do{if(t.begin[l]===t.begin[D]){t.begin[l]=e;if(t.types[l]==="end"){break}}l=l+1;}while(l<$-1);t.begin[D]=e;e=e-1;}else {h[e-1]=-10;if(t.stack[e]==="paren"||t.stack[e]==="method"){h.push(m+2);}else {h.push(m);}if(i.commentIndent===true&&h[e]>-1&&t.lines[e]<3){t.lines[e]=3;}}if(t.types[e+1]!=="comment")_=true;return}else if(t.token[e-1]===","){h[e-1]=T;}else if(u==="="&&t.types[e-1]!=="comment"&&/^(\/\*\*\s*@[a-z_]+\s)/.test(A)===true){h[e-1]=-10;}else if(u==="{"&&t.types[e-1]!=="comment"&&t.lines[0]<2){if(t.stack[e]==="function"){h[e-1]=T;}else {h[e-1]=/\n/.test(A)?T:-10;}}else {h[e-1]=T;}if(t.types[e+1]!=="comment")_=true;if(t.token[t.begin[e]]==="("){h.push(m+1);}else {h.push(m);}if(h[e]>-1&&t.lines[e]<3){if(t.types[e-1]==="comment"&&A.startsWith("//")){t.lines[e]=2;}else {t.lines[e]=3;}}if(i.script.commentNewline===true&&A.startsWith("//")===false&&t.lines[e]>=3){t.lines[e]=2;}}function I(T,D){let l=e-1;let x=T===true?0:1;const S=y[y.length-1]===void 0?[]:y[y.length-1];const j=D===false&&t.stack[e]==="array"&&T===true&&A!=="[";if(b[b.length-1]===false||t.stack[e]==="array"&&i.script.arrayFormat==="inline"||t.stack[e]==="object"&&i.script.objectIndent==="inline"){return}b[b.length-1]=false;do{if(t.types[l]==="end"){x=x+1;}else if(t.types[l]==="start"){x=x-1;}if(t.stack[l]==="global")break;if(x===0){if(t.stack[e]==="class"||t.stack[e]==="map"||j===false&&(T===false&&t.token[l]!=="("&&t.token[l]!=="x("||T===true&&t.token[l]===",")){if(t.types[l+1]==="template_start"){if(t.lines[l]<1){h[l]=-20;}else {h[l]=m-1;}}else if(S.length>0&&S[S.length-1]>-1){h[l]=m-1;}else {h[l]=m;}}else if(t.stack[e]==="array"&&t.types[e]==="operator"){if(t.token[l]===",")h[l]=m;if(l===t.begin[e])break}if(T===false)break}if(x<0){if(t.types[l+1]==="template_start"||t.types[l+1]==="template_string_start"){if(t.lines[l]<1){h[l]=-20;}else {h[l]=m-1;}}else if(S.length>0&&S[S.length-1]>-1){h[l]=m-1;}else {h[l]=m;}break}l=l-1;}while(l>-1)}function le(){const T=y[y.length-1]===void 0?[]:y[y.length-1];const D=()=>{let l=e;let x=false;const S=t.begin[l];do{l=l-1;if(t.lexer[l]==="markup"){x=true;break}if(t.begin[l]!==S)l=t.begin[l];}while(l>S);if(x===true){l=e;do{l=l-1;if(t.begin[l]!==S){l=t.begin[l];}else if(t.token[l]===","){h[l]=m+1;}}while(l>S);h[S]=m+1;h[e-1]=m;}else {h[e-1]=-20;}};if(A===")"&&t.token[e+1]==="."&&T[T.length-1]>-1&&t.token[T[0]]!==":"){let l=t.begin[e];let x=false;let S=false;do{l=l-1;}while(l>0&&h[l]<-9);x=h[l]===m;l=e+1;do{l=l+1;if(t.token[l]==="{"){S=true;break}if(t.begin[l]===t.begin[e+1]&&(t.types[l]==="separator"||t.types[l]==="end")){break}}while(l<$);if(x===false&&S===true&&y.length>1){y[y.length-2].push(t.begin[e]);m=m+1;}}if(C!=="separator")xe();if(t.token[e+1]===","&&(t.stack[e]==="object"||t.stack[e]==="array")){I(true,false);}if(t.token[t.begin[e]-1]===","&&(t.token[e+1]==="}"||t.token[e+1]==="]")&&(t.stack[e]==="object"||t.stack[e]==="array")){I(true,false);}if(t.stack[e]!=="attribute"){if(A!==")"&&A!=="x)"&&(t.lexer[e-1]!=="markup"||t.lexer[e-1]==="markup"&&t.token[e-2]!=="return")){m=m-1;}if(A==="}"&&t.stack[e]==="switch"&&i.script.noCaseIndent===false){m=m-1;}}if(A==="}"||A==="x}"){if(t.types[e-1]!=="comment"&&u!=="{"&&u!=="x{"&&C!=="end"&&C!=="string"&&C!=="number"&&C!=="separator"&&u!=="++"&&u!=="--"&&(e<2||t.token[e-2]!==";"||t.token[e-2]!=="x;"||u==="break"||u==="return")){let l=e-1;let x=false;const S=t.begin[e];const j=ee.length;do{if(t.begin[l]===S){if(t.token[l]==="="||t.token[l]===";"||t.token[l]==="x;"){x=true;}if(t.token[l]==="."&&h[l-1]>-1){b[b.length-1]=false;h[S]=m+1;h[e-1]=m;break}if(l>0&&t.token[l]==="return"&&(t.token[l-1]===")"||t.token[l-1]==="x)"||t.token[l-1]==="{"||t.token[l-1]==="x{"||t.token[l-1]==="}"||t.token[l-1]==="x}"||t.token[l-1]===";"||t.token[l-1]==="x;")){m=m-1;h[e-1]=m;break}if(t.token[l]===":"&&M.length===0||t.token[l]===","&&x===false){break}if(l===0||t.token[l-1]==="{"||t.token[l-1]==="x{"||t.token[l]==="for"||t.token[l]==="if"||t.token[l]==="do"||t.token[l]==="function"||t.token[l]==="while"||t.token[l]==="var"||t.token[l]==="let"||t.token[l]==="const"||t.token[l]==="with"){if(ee[j-1]===false&&j>1&&(e===$-1||t.token[e+1]!==")"&&t.token[e+1]!=="x)")&&t.stack[e]!=="object"){m=m-1;}break}}else {l=t.begin[l];}l=l-1;}while(l>S)}X.pop();}if(i.script.bracePadding===false&&A!=="}"&&C!=="markup"){h[e-1]=-20;}if(i.script.bracePadding===true&&C!=="start"&&u!==";"&&(h[t.begin[e]]<-9||b[b.length-1]===true)){h[t.begin[e]]=-10;h[e-1]=-10;h.push(-20);}else if(t.stack[e]==="attribute"){h[e-1]=-20;h.push(m);}else if(t.stack[e]==="array"&&(T.length>0||z[z.length-1]===true)){V();b[b.length-1]=false;h[t.begin[e]]=m+1;h[e-1]=m;h.push(-20);}else if((t.stack[e]==="object"||t.begin[e]===0&&A==="}")&&T.length>0){V();b[b.length-1]=false;h[t.begin[e]]=m+1;h[e-1]=m;h.push(-20);}else if(A===")"||A==="x)"){const l=A===")"&&u!=="("&&v.length>0?v.pop()+1:0;const x=t.token[t.begin[e]-1]==="if"?(()=>{let S=e;do{S=S-1;if(t.token[S]===")"&&h[S-1]>-1)return l}while(S>t.begin[e]);return l+5})():l;if(l>0&&(i.language!=="jsx"||i.language==="jsx"&&t.token[t.begin[e]-1]!=="render")){const S=i.wrap;const j=t.begin[e];const N=v.length;let F=e-2;if(x>S){h[t.begin[e]]=m+1;h[e-1]=m;do{if(t.begin[F]===j){if(t.token[F]==="&&"||t.token[F]==="||"){h[F]=m+1;}else if(h[F]>-1&&t.types[F]!=="comment"&&t.token[F+1]!=="."){h[F]=h[F]+1;}}else if(h[F]>-1&&t.token[F+1]!=="."){h[F]=h[F]+1;}F=F-1;}while(F>j)}else if(N>0){v[N-1]=v[N-1]+l;}}else if(A===")"&&e>t.begin[e]+2&&t.lexer[t.begin[e]+1]===w&&t.token[t.begin[e]+1]!=="function"){const S=t.begin[e]<0?0:t.begin[e];const j=i.wrap;const N=T.length;let F=0;let B=0;let se=0;let W=0;let P=0;let J=false;let G=false;let ie=m+1;let fe=false;let te=false;let H=false;if(h[S]<-9){B=S;do{B=B+1;}while(B<e&&h[B]<-9);W=B;do{F=F+t.token[B].length;if(h[B]===-10)F=F+1;if(t.token[B]==="("&&se>0&&se<j-1&&W===e){se=-1;}if(t.token[B]===")"){P=P-1;}else if(t.token[B]==="("){P=P+1;}if(B===S&&P>0)se=F;B=B-1;}while(B>S&&h[B]<-9);if(t.token[B+1]===".")ie=h[B]+1;if(F>j-1&&j>0&&u!=="("&&se!==-1&&b[b.length-2]===false){if(t.token[S-1]==="if"&&ee[ee.length-1]===true||t.token[S-1]!=="if"){h[S]=ie;if(t.token[S-1]==="for"){B=S;do{B=B+1;if(t.token[B]===";"&&t.begin[B]===S){h[B]=ie;}}while(B<e)}}}}B=e;F=0;do{B=B-1;if(t.stack[B]==="function"){B=t.begin[B];}else if(t.begin[B]===S){if(t.token[B]==="?"){H=true;}else if(t.token[B]===","&&J===false){J=true;if(F>=j&&j>0)fe=true;}else if(t.types[B]==="markup"&&te===false){te=true;}if(h[B]>-9&&t.token[B]!==","&&t.types[B]!=="markup"){F=0;}else {if(h[B]===-10)F=F+1;F=F+t.token[B].length;if(F>=j&&j>0&&(J===true||te===true)){fe=true;}}}else {if(h[B]>-9){F=0;}else {F=F+t.token[B].length;if(F>=j&&j>0&&(J===true||te===true)){fe=true;}}}}while(B>S&&fe===false);if(J===false&&t.token[t.begin[e]+1].charAt(0)==="`"){h[t.begin[e]]=-20;h[e-1]=-20;}else if((J===true||te===true)&&F>=j&&j>0||h[S]>-9){if(H===true){ie=h[S];if(t.token[S-1]==="["){B=e;do{B=B+1;if(t.types[B]==="end"||t.token[B]===","||t.token[B]===";"){break}}while(B<$);if(t.token[B]==="]"){ie=ie-1;G=true;}}}else if(N>0&&T[N-1]>B){ie=ie-N;}b[b.length-1]=false;B=e;do{B=B-1;if(t.begin[B]===S){if(t.token[B].indexOf("=")>-1&&t.types[B]==="operator"&&t.token[B].indexOf("!")<0&&t.token[B].indexOf("==")<0&&t.token[B]!=="<="&&t.token[B].indexOf(">")<0){F=B;do{F=F-1;if(t.begin[F]===S&&(t.token[F]===";"||t.token[F]===","||F===S)){break}}while(F>S)}else if(t.token[B]===","){h[B]=ie;}else if(h[B]>-9&&G===false&&(t.token[S-1]!=="for"||t.token[B+1]==="?"||t.token[B+1]===":")&&(t.token[t.begin[e]]!=="("||t.token[B]!=="+")){h[B]=h[B]+1;}}else if(h[B]>-9&&G===false){h[B]=h[B]+1;}}while(B>S);h[S]=ie;h[e-1]=ie-1;}else {h[e-1]=-20;}if(t.token[t.begin[e]-1]==="+"&&h[t.begin[e]]>-9){h[t.begin[e]-1]=-10;}}else if(i.language==="jsx"){D();}else {h[e-1]=-20;}h.push(-20);}else if(b[b.length-1]===true){if(A==="]"&&t.begin[e]-1>0&&t.token[t.begin[t.begin[e]-1]]==="["){b[b.length-2]=false;}if(t.begin[e]<h.length)h[t.begin[e]]=-20;if(i.language==="jsx"){D();}else if(A==="]"&&h[t.begin[e]]>-1){h[e-1]=h[t.begin[e]]-1;}else {h[e-1]=-20;}h.push(-20);}else if(t.types[e-1]==="comment"&&t.token[e-1].substring(0,2)==="//"){if(t.token[e-2]==="x}")h[e-3]=m+1;h[e-1]=m;h.push(-20);}else if(t.types[e-1]!=="comment"&&(u==="{"&&A==="}"||u==="["&&A==="]")){h[e-1]=-20;h.push(-20);}else if(A==="]"){if(ee[ee.length-1]===true&&b[b.length-1]===false&&i.script.arrayFormat!=="inline"||u==="]"&&h[e-2]===m+1){h[e-1]=m;h[t.begin[e]]=m+1;}else if(h[e-1]===-10){h[e-1]=-20;}if(t.token[t.begin[e]+1]==="function"){h[e-1]=m;}else if(ee[ee.length-1]===false){if(u==="}"||u==="x}")h[e-1]=m;let l=e-1;let x=1;do{if(t.token[l]==="]")x=x+1;if(t.token[l]==="["){x=x-1;if(x===0){if(l>0&&(t.token[l+1]==="{"||t.token[l+1]==="x{"||t.token[l+1]==="[")){h[l]=m+1;break}if(t.token[l+1]!=="["||Z===false){h[l]=-20;break}break}}if(x===1&&t.token[l]==="+"&&h[l]>1){h[l]=h[l]-1;}l=l-1;}while(l>-1)}else if(i.language==="jsx"){D();}if(i.script.arrayFormat==="inline"){let l=e;const x=t.begin[e];do{l=l-1;if(t.types[l]==="end")break}while(l>x);if(l>x){h[t.begin[e]]=m+1;h[e-1]=m;}else {h[t.begin[e]]=-20;h[e-1]=-20;}}else if(h[t.begin[e]]>-1){h[e-1]=h[t.begin[e]]-1;}h.push(-20);}else if(A==="}"||A==="x}"||ee[ee.length-1]===true){if(A==="}"&&u==="x}"&&t.token[e+1]==="else"){h[e-2]=m+2;h.push(-20);}else {h.push(m);}h[e-1]=m;}else {h.push(-20);}if(t.types[e-1]==="comment")h[e-1]=m;V();Z=ee[ee.length-1];ee.pop();y.pop();z.pop();k.pop();O.pop();b.pop();d.pop();}function V(){let T=0;const D=y[y.length-1];if(D===void 0)return;T=D.length-1;if(T<1&&D[T]<0&&(A===";"||A==="x;"||A===")"||A==="x)"||A==="}"||A==="x}")){D.pop();return}if(T<0||D[T]<0)return;if(A===":"){if(t.token[D[T]]!=="?"){do{D.pop();T=T-1;m=m-1;}while(T>-1&&D[T]>-1&&t.token[D[T]]!=="?")}D[T]=e;h[e-1]=m;}else {do{D.pop();T=T-1;m=m-1;}while(T>-1&&D[T]>-1)}if((t.stack[e]==="array"||A===",")&&D.length<1)D.push(-1);}function ue(){const T=e;do{if(t.lexer[e+1]===w&&t.begin[e+1]<T)break;if(t.token[T-1]==="return"&&t.types[e]==="end"&&t.begin[e]===T)break;h.push(0);e=e+1;}while(e<$);r[T]=e;h.push(m-1);}function xe(){let T=e-1;const D=t.begin[e];if(m<1)return;do{if(D!==t.begin[T]){T=t.begin[T];}else {if(t.types[T]==="separator"||t.types[T]==="operator"){if(t.token[T]==="."&&h[T-1]>0){if(t.token[D-1]==="if"){m=m-2;}else {m=m-1;}}break}}T=T-1;}while(T>0&&T>D)}function Q(){if(t.token[e+1]!==","&&A.indexOf("/>")!==A.length-2||t.token[e+1]===","&&t.token[t.begin[e]-3]!=="React"){I(false,false);}if(u==="return"||u==="?"||u===":"){h[e-1]=-10;h.push(-20);}else if(C==="start"||t.token[e-2]==="return"&&t.stack[e-1]==="method"){h.push(m);}else {h.push(-20);}}function pe(){const T=y[y.length-1]===void 0?[]:y[y.length-1];function D(){const l=t.token[e+1];let x=0;let S=0;let j=e;let N=A==="+"?m+2:m;let F=0;if(i.wrap<1){h.push(-10);return}do{j=j-1;if(t.token[t.begin[e]]==="("){if(j===t.begin[e]){F=x;}if(t.token[j]===","&&t.begin[j]===t.begin[e]&&ee[ee.length-1]===true){break}}if(x>i.wrap-1)break;if(h[j]>-9)break;if(t.types[j]==="operator"&&t.token[j]!=="="&&t.token[j]!=="+"&&t.begin[j]===t.begin[e]){break}x=x+t.token[j].length;if(j===t.begin[e]&&t.token[j]==="["&&x<i.wrap-1){break}if(t.token[j]==="."&&h[j]>-9)break;if(h[j]===-10)x=x+1;}while(j>0);if(F>0)F=F+l.length;x=x+l.length;S=j;if(x>i.wrap-1&&h[j]<-9){do{S=S-1;}while(S>0&&h[S]<-9)}if(t.token[S+1]==="."&&t.begin[e]<=t.begin[S]){N=N+1;}else if(t.types[S]==="operator"){N=h[S];}S=l.length;if(x+S<i.wrap){h.push(-10);return}if(t.token[t.begin[e]]==="("&&(t.token[T[0]]===":"||t.token[T[0]]==="?")){N=m+3;}else if(t.stack[e]==="method"){h[t.begin[e]]=m;if(ee[ee.length-1]===true){N=m+3;}else {N=m+1;}}else if(t.stack[e]==="object"||t.stack[e]==="array"){I(true,false);}if(t.token[j]==="var"||t.token[j]==="let"||t.token[j]==="const"){x=x-i.indentSize*i.indentChar.length*2;}if(F>0){j=i.wrap-F;}else {j=i.wrap-x;}if(j>0&&j<5){h.push(N);if(t.token[e].charAt(0)==='"'||t.token[e].charAt(0)==="'"){e=e+1;h.push(-10);}return}if(t.token[t.begin[e]]!=="("||F>i.wrap-1||F===0){if(F>0)x=F;if(x-l.length<i.wrap-1&&(l.charAt(0)==='"'||l.charAt(0)==="'")){e=e+1;x=x+3;if(x-l.length>i.wrap-4){h.push(N);return}h.push(-10);return}h.push(N);return}h.push(-10);}xe();if(T.length>0&&T[T.length-1]>-1&&t.stack[e]==="array"){z[z.length-1]=true;}if(A!==":"){if(t.token[t.begin[e]]!=="("&&t.token[t.begin[e]]!=="x("&&b.length>0){I(true,false);}if(A!=="?"&&t.token[T[T.length-1]]==="."){let l=0;let x=e;const S=t.begin[x];do{if(t.begin[x]===S){if(t.token[x+1]==="{"||t.token[x+1]==="["||t.token[x]==="function"){break}if(t.token[x]===","||t.token[x]===";"||t.types[x]==="end"||t.token[x]===":"){T.pop();m=m-1;break}if(t.token[x]==="?"||t.token[x]===":"){if(t.token[T[T.length-1]]==="."&&l<2)T[T.length-1]=S+1;break}if(t.token[x]===".")l=l+1;}x=x+1;}while(x<$)}}if(A==="!"||A==="..."){if(u==="}"||u==="x}")h[e-1]=m;h.push(-20);return}if(u===";"||u==="x;"){if(t.token[t.begin[e]-1]!=="for")h[e-1]=m;h.push(-20);return}if(A==="*"){if(u==="function"||u==="yield"){h[e-1]=-20;}else {h[e-1]=-10;}h.push(-10);return}if(A==="?"){if(t.lines[e]===0&&t.types[e-2]==="word"&&t.token[e-2]!=="return"&&t.token[e-2]!=="in"&&t.token[e-2]!=="instanceof"&&t.token[e-2]!=="typeof"&&(C==="reference"||C==="word")){if(t.types[e+1]==="word"||t.types[e+1]==="reference"||(t.token[e+1]==="("||t.token[e+1]==="x(")&&t.token[e-2]==="new"){h[e-1]=-20;if(t.types[e+1]==="word"||t.types[e+1]==="reference"){h.push(-10);return}h.push(-20);return}}if(t.token[e+1]===":"){h[e-1]=-20;h.push(-20);return}M.push(e);if(i.script.ternaryLine===true){h[e-1]=-10;}else {let l=e-1;do{l=l-1;}while(l>-1&&h[l]<-9);T.push(e);m=m+1;if(h[l]===m&&t.token[l+1]!==":"){m=m+1;T.push(e);}h[e-1]=m;if(t.token[t.begin[e]]==="("&&(T.length<2||T[0]===T[1])){b[b.length-1]=false;if(e-2===t.begin[e]){h[t.begin[e]]=m-1;}else {h[t.begin[e]]=m;}l=e-2;do{if(t.types[l]==="end"&&h[l-1]>-1)break;if(h[l]>-1)h[l]=h[l]+1;l=l-1;}while(l>t.begin[e])}}h.push(-10);return}if(A===":"){if(t.stack[e]==="map"||t.types[e+1]==="type"||t.types[e+1]==="type_start"){h[e-1]=-20;h.push(-10);return}if(M.length>0&&t.begin[M[M.length-1]]===t.begin[e]){let l=e;const x=t.begin[e];do{l=l-1;if(t.begin[l]===x){if(t.token[l]===","||t.token[l]===";"){h[e-1]=-20;break}if(t.token[l]==="?"){M.pop();V();if(i.script.ternaryLine===true)h[e-1]=-10;h.push(-10);return}}else if(t.types[l]==="end"){l=t.begin[l];}}while(l>x)}if(t.token[e-2]==="where"&&t.stack[e-2]===t.stack[e]){h[e-1]=-10;h.push(-10);return}if(C==="reference"&&t.token[t.begin[e]]!=="("&&t.token[t.begin[e]]!=="x("){h[e-1]=-20;h.push(-10);return}if((u===")"||u==="x)")&&t.token[t.begin[e-1]-2]==="function"){h[e-1]=-20;h.push(-10);return}if(t.stack[e]==="attribute"){h[e-1]=-20;h.push(-10);return}if(t.token[t.begin[e]]!=="("&&t.token[t.begin[e]]!=="x("&&(C==="reference"||u===")"||u==="]"||u==="?")&&(t.stack[e]==="map"||t.stack[e]==="class"||t.types[e+1]==="reference")&&(M.length===0||M[M.length-1]<t.begin[e])&&("mapclassexpressionmethodglobalparen".indexOf(t.stack[e])>-1||t.types[e-2]==="word"&&t.stack[e]!=="switch")){h[e-1]=-20;h.push(-10);return}if(t.stack[e]==="switch"&&(M.length<1||M[M.length-1]<t.begin[e])){h[e-1]=-20;if(i.script.caseSpace===true){h.push(-10);}else {h.push(m);}return}if(t.stack[e]==="object"){h[e-1]=-20;}else if(M.length>0){h[e-1]=m;}else {h[e-1]=-10;}h.push(-10);return}if(A==="++"||A==="--"){if(C==="number"||C==="reference"){h[e-1]=-20;h.push(-10);}else if(e<$-1&&(t.types[e+1]==="number"||t.types[e+1]==="reference")){h.push(-20);}else {h.push(-10);}return}if(A==="+"){if(C==="start"){h[e-1]=-20;}else {h[e-1]=-10;}if(i.wrap<1||t.token[t.begin[e]]==="x("){h.push(-10);return}const l=t.token[e+1];if(l===void 0){h.push(-10);return}if(t.types[e-1]==="operator"||t.types[e-1]==="start"){if(t.types[e+1]==="reference"||l==="("||l==="["){h.push(-20);return}if(Number(l.slice(1,-1))>-1&&(/\d/.test(l.charAt(1))===true||l.charAt(1)==="."||l.charAt(1)==="-"||l.charAt(1)==="+")){h.push(-20);return}}return D()}if(t.types[e-1]!=="comment"){if(u==="("){h[e-1]=-20;}else if(A==="*"&&t.stack[e]==="object"&&t.types[e+1]==="reference"&&(u==="{"||u===",")){h[e-1]=m;}else if(A!=="?"||M.length===0){h[e-1]=-10;}}if(A.indexOf("=")>-1&&A!=="=="&&A!=="==="&&A!=="!="&&A!=="!=="&&A!==">="&&A!=="<="&&A!=="=>"&&t.stack[e]!=="method"&&t.stack[e]!=="object"){let l=e+1;let x=0;let S=false;let j="";if((t.token[t.begin[e]]==="("||t.token[t.begin[e]]==="x(")&&t.token[e+1]!=="function"){return}do{if(t.types[l]==="start"){if(S===true&&t.token[l]!=="["){if(d[d.length-1]===true){d[d.length-1]=false;}break}x=x+1;}if(t.types[l]==="end")x=x-1;if(x<0){if(d[d.length-1]===true){d[d.length-1]=false;}break}if(x===0){j=t.token[l];if(S===true){if(t.types[l]==="operator"||t.token[l]===";"||t.token[l]==="x;"||t.token[l]==="?"||t.token[l]==="var"||t.token[l]==="let"||t.token[l]==="const"){if(j!==void 0&&(j==="?"||j.indexOf("=")>-1&&j!=="=="&&j!=="==="&&j!=="!="&&j!=="!=="&&j!==">="&&j!=="<=")){if(d[d.length-1]===false){d[d.length-1]=true;}}if((j===";"||j==="x;"||j==="var"||j==="let"||j==="const")&&d[d.length-1]===true){d[d.length-1]=false;}break}if(d[d.length-1]===true&&(j==="return"||j==="break"||j==="continue"||j==="throw")){d[d.length-1]=false;}}if(j===";"||j==="x;"||j===",")S=true;}l=l+1;}while(l<$);h.push(-10);return}if(A==="-"&&u==="return"||u==="="){h.push(-20);return}if(C==="operator"&&t.types[e+1]==="reference"&&u!=="--"&&u!=="++"&&A!=="&&"&&A!=="||"){h.push(-20);return}return D()}function Ce(){const T=()=>{let D=t.begin[e];if(D<0){E.push([t.token[e],-1]);}else {if(t.stack[D+1]!=="function"){do{D=t.begin[D];}while(D>-1&&t.stack[D+1]!=="function")}E.push([t.token[e],D]);}};if(t.types[e-1]==="comment"){h[e-1]=m;}else if(C==="end"&&u!==")"&&t.token[t.begin[e-1]-1]!==")"){h[e-1]=-10;}else if(C!=="separator"&&C!=="start"&&C!=="end"&&C.indexOf("template_string")<0){if(C==="word"||C==="operator"||C==="property"||C==="type"||C==="reference"){h[e-1]=-10;}else {h[e-1]=-20;}}if(u==="var"&&t.lexer[e-1]===w){T();}else if(u==="function"){E.push([t.token[e],e]);}else if(u==="let"||u==="const"){E.push([t.token[e],e]);}else if(t.stack[e]==="arguments"){E.push([t.token[e],e]);}else if(u===","){let D=e;do{D=D-1;}while(D>t.begin[e]&&t.token[D]!=="var"&&t.token[D]!=="let"&&t.token[D]!=="const");if(t.token[D]==="var"){T();}else if(t.token[D]==="let"||t.token[D]==="const"){E.push([t.token[e],e]);}}h.push(-10);}function re(){const T=y[y.length-1]===void 0?[]:y[y.length-1];const D=()=>{if(i.script.methodChain>0){let l=e;let x=t.begin[e];const S=[e];const j=t.token[x-1]==="if";do{l=l-1;if(t.types[l]==="end")l=t.begin[l];if(t.begin[l]===x){if(t.types[l]==="string"&&t.token[l].indexOf("${")===t.token[l].length-2){break}if(t.token[l]==="."){if(h[l-1]>0){h[e-1]=j===true?m+1:m;return}S.push(l);}else if(t.token[l]===";"||t.token[l]===","||t.types[l]==="operator"||(t.types[l]==="word"||t.types[l]==="reference")&&(t.types[l-1]==="word"||t.types[l-1]==="reference")){break}}}while(l>x);if(S.length<i.script.methodChain){h[e-1]=-20;return}l=0;x=S.length;do{h[S[l]-1]=j===true?m+1:m;l=l+1;}while(l<x);l=S[S.length-1]-1;do{if(h[l]>-1)h[l]=h[l]+1;l=l+1;}while(l<e);m=j===true?m+2:m+1;}h[e-1]=m;};if(A==="::"){h[e-1]=-20;h.push(-20);return}if(A==="."){if(t.token[t.begin[e]]!=="("&&t.token[t.begin[e]]!=="x("&&T.length>0){if(t.stack[e]==="object"||t.stack[e]==="array"){I(true,false);}else {I(false,false);}}if(i.script.methodChain===0){h[e-1]=-20;}else if(i.script.methodChain<0){if(t.lines[e]>0){D();}else {h[e-1]=-20;}}else {D();}h.push(-20);return}if(A===","){xe();if(ee[ee.length-1]===false&&(t.stack[e]==="object"||t.stack[e]==="array"||t.stack[e]==="paren"||t.stack[e]==="expression"||t.stack[e]==="method")){ee[ee.length-1]=true;if(t.token[t.begin[e]]==="("){let l=e;do{l=l-1;if(t.begin[l]===t.begin[e]&&t.token[l]==="+"&&h[l]>-9){h[l]=h[l]+2;}}while(l>t.begin[e])}}if(t.stack[e]==="array"&&i.script.arrayFormat==="indent"){h[e-1]=-20;h.push(m);return}if(t.stack[e]==="array"&&i.script.arrayFormat==="inline"){h[e-1]=-20;h.push(-10);return}if(t.stack[e]==="object"&&i.script.objectIndent==="indent"){h[e-1]=-20;h.push(m);return}if(t.stack[e]==="object"&&i.script.objectIndent==="inline"){h[e-1]=-20;h.push(-10);return}if(T.length>0){if(T[T.length-1]>-1)V();h[e-1]=-20;h.push(m);return}if(t.token[e-2]===":"&&t.token[e-4]==="where"){h[e-1]=-20;h.push(-10);return}h[e-1]=-20;if(t.types[e+1]!=="end"){k[k.length-1]=k[k.length-1]+1;}if((t.token[t.begin[e]]==="("||t.token[t.begin[e]]==="x(")&&i.language!=="jsx"&&t.stack[e]!=="global"&&(t.types[e-1]!=="string"&&t.types[e-1]!=="number"||t.token[e-2]!=="+"||t.types[e-1]==="string"&&t.types[e-1]!=="number"&&t.token[e-2]==="+"&&t.types[e-3]!=="string"&&t.types[e-3]!=="number")){h.push(-10);return}if(C==="reference"&&t.types[e-2]==="word"&&"var-let-const-from".indexOf(t.token[e-2])<0&&(t.types[e-3]==="end"||t.token[e-3]===";")){O[O.length-1]=true;h.push(-10);return}if(O[O.length-1]===true||t.stack[e]==="notation"){h.push(-10);return}if(k[k.length-1]>3&&(t.stack[e]==="array"||t.stack[e]==="object")){if(b[b.length-1]===true)I(true,true);h[e-1]=-20;if(z[z.length-1]===true){h.push(m);return}const l=t.begin[e];let x=e;do{if(t.types[x]==="end"){x=t.begin[x];}else {if(t.token[x]===","&&t.types[x+1]!=="comment"){h[x]=m;}}x=x-1;}while(x>l);h[l]=m;z[z.length-1]=true;return}if(t.stack[e]==="object"){if(b[b.length-1]===true&&t.types[t.begin[e]-1]!=="word"&&t.types[t.begin[e]-1]!=="reference"&&t.token[t.begin[e]-1]!=="("&&t.token[t.begin[e]-1]!=="x("){const l=t.begin[e];let x=e-1;do{if(t.begin[x]===l){if(t.token[x]===",")break;if(t.token[x]===":"){I(true,false);break}}x=x-1;}while(x>l)}}if(b[b.length-1]===false||t.token[e-2]==="+"&&(C==="string"||C==="number")&&h[e-2]>0&&(u.charAt(0)==='"'||u.charAt(0)==="'")){if(t.stack[e]==="method"){if(t.token[e-2]==="+"&&(u.charAt(0)==='"'||u.charAt(0)==="'")&&(t.token[e-3].charAt(0)==='"'||t.token[e-3].charAt(0)==="'")){h.push(m+2);return}if(t.token[e-2]!=="+"){h.push(-10);return}}h.push(m);return}if(b[b.length-1]===true&&t.stack[e]!=="object"){h.push(-10);return}if(k[k.length-1]<4&&(t.stack[e]==="array"||t.stack[e]==="object")){h.push(-10);return}h.push(m);return}if(A===";"||A==="x;"){xe();if(t.token[e+1]!==void 0&&t.types[e+1].indexOf("attribute")>0&&t.types[e+1].indexOf("end")>0){h[e-1]=-20;h.push(m-1);return}if(X[X.length-1]>-1&&t.stack[X[X.length-1]]!=="expression"){let l=e;do{l=l-1;if(t.token[l]===";")break;if(t.token[l]===","){m=m-1;break}if(t.types[l]==="end")l=t.begin[l];}while(l>0&&l>t.begin[e])}X[X.length-1]=-1;V();if(t.token[t.begin[e]-1]!=="for")I(false,false);O[O.length-1]=false;h[e-1]=-20;if(t.begin[e]>0&&t.token[t.begin[e]-1]==="for"&&t.stack[e]!=="for"){h.push(-10);return}h.push(m);return}h.push(-20);}function Y(){const T=t.stack[e+1];const D=e===0?t.stack[e]:t.stack[e-1];if(u===")"||(D==="object"||D==="array")&&u!=="]"){if(T!=="method"||T==="method"&&t.token[e+1]!==")"&&t.token[e+2]!==")"){if(u===")"&&(T!=="function"||t.token[t.begin[t.begin[e-1]-1]]==="("||t.token[t.begin[t.begin[e-1]-1]]==="x(")){I(false,false);}else if(t.types[e+1]!=="end"&&t.types[e+2]!=="end"){I(true,false);}}}ee.push(false);y.push([]);d.push(false);z.push(false);O.push(false);k.push(0);if(i.script.neverFlatten===true||T==="array"&&i.script.arrayFormat==="indent"||T==="attribute"||C==="generic"||T==="class"&&u!=="("&&u!=="x("||A==="["&&t.token[e+1]==="function"){b.push(false);}else {if(T==="expression"||T==="method"){b.push(true);}else if((T==="object"||T==="class")&&(u==="("||u==="x("||C==="word"||C==="reference")){b.push(true);}else if(T==="array"||A==="("||A==="x("){b.push(true);}else if(A==="{"&&T==="object"&&C!=="operator"&&C!=="start"&&C!=="string"&&C!=="number"&&D!=="object"&&D!=="array"&&e>0){b.push(true);}else {b.push(false);}}if(A!=="("&&A!=="x("&&t.stack[e+1]!=="attribute"){m=m+1;}if(A==="{"||A==="x{"){X.push(-1);if(t.types[e-1]!=="comment"){if(C==="markup"){h[e-1]=m;}else if(i.script.braceAllman===true&&C!=="operator"&&u!=="return"){h[e-1]=m-1;}else if(t.stack[e+1]!=="block"&&(T==="function"||u===")"||u==="x)"||u===","||u==="}"||C==="markup")){h[e-1]=-10;}else if(u==="{"||u==="x{"||u==="["||u==="}"||u==="x}"){h[e-1]=m-1;}}if(T==="object"){if(i.script.objectIndent==="indent"){b[b.length-1]=false;h.push(m);return}if(i.script.objectIndent==="inline"){b[b.length-1]=true;h.push(-20);return}}if(T==="switch"){if(i.script.noCaseIndent===true){h.push(m-1);return}m=m+1;h.push(m);return}if(b[b.length-1]===true){if(C!=="word"&&C!=="reference"){h.push(-20);return}}h.push(m);return}if(A==="("||A==="x("){if(i.wrap>0&&A==="("&&t.token[e+1]!==")"){v.push(1);}if(u==="-"&&(t.token[e-2]==="("||t.token[e-2]==="x(")){h[e-2]=-20;}if(C==="end"&&D!=="if"&&D!=="for"&&D!=="catch"&&D!=="else"&&D!=="do"&&D!=="try"&&D!=="finally"&&D!=="catch"){if(t.types[e-1]==="comment"){h[e-1]=m;}else {h[e-1]=-20;}}if(u==="async"){h[e-1]=-10;}else if(T==="method"||t.token[e-2]==="function"&&C==="reference"){if(u==="import"||u==="in"||i.script.functionNameSpace===true){h[e-1]=-10;}else if(u==="}"&&t.stack[e-1]==="function"||C==="word"||C==="reference"||C==="property"){h[e-1]=-20;}else if(D!=="method"&&T!=="method"){h[e-1]=m;}}if(u==="+"&&(t.token[e-2].charAt(0)==='"'||t.token[e-2].charAt(0)==="'")){h.push(m);return}if(u==="}"||u==="x}"){h.push(-20);return}if(u==="-"&&(e<2||t.token[e-2]!==")"&&t.token[e-2]!=="x)"&&t.token[e-2]!=="]"&&t.types[e-2]!=="reference"&&t.types[e-2]!=="string"&&t.types[e-2]!=="number")||i.script.functionSpace===false&&u==="function"){h[e-1]=-20;}h.push(-20);return}if(A==="["){if(u==="[")ee[ee.length-2]=true;if(u==="return"||u==="var"||u==="let"||u==="const"){h[e-1]=-10;}else if(t.types[e-1]!=="comment"&&t.stack[e-1]!=="attribute"&&(C==="end"||C==="word"||C==="reference")){h[e-1]=-20;}else if(u==="["||u==="{"||u==="x{"){h[e-1]=m-1;}if(t.stack[e]==="attribute"){h.push(-20);return}if(i.script.arrayFormat==="indent"){b[b.length-1]=false;h.push(m);return}if(i.script.arrayFormat==="inline"){b[b.length-1]=true;h.push(-20);return}if(T==="method"||b[b.length-1]===true){h.push(-20);return}let l=e+1;do{if(t.token[l]==="]"){h.push(-20);return}if(t.token[l]===","){h.push(m);return}l=l+1;}while(l<$);h.push(-20);}}function U(){if(A.length===1){h.push(-20);if(t.lines[e]===0)h[e-1]=-20;}else if(A.indexOf("#!/")===0){h.push(m);}else {h.push(-10);}if((u===","||C==="start")&&(t.stack[e]==="object"||t.stack[e]==="array")&&b[b.length-1]===false&&e>0){h[e-1]=m;}}function de(){if(i.language!=="json"&&t.types[e-1]!=="string"){if(n==="template_else"){h[e-1]=m-1;h.push(m);}else if(n==="template_start"){m=m+1;if(t.lines[e-1]<1)h[e-1]=-20;if(t.lines[e]>0||u.length===1&&C==="string"){h.push(m);}else {h.push(-20);}}else if(n==="template_end"){m=m-1;if(C==="template_start"||t.lines[e-1]<1){h[e-1]=-20;}else {h[e-1]=m;}if(t.lines[e]>0){h.push(m);}else {h.push(-20);}}else if(n==="template"){if(t.lines[e]>0){h.push(m);}else {h.push(-20);}}}}function Pe(){if(n==="template_string_start"){m=m+1;h.push(m);}else if(n==="template_string_else"){xe();h[e-1]=m-1;h.push(m);}else {xe();m=m-1;h[e-1]=m;h.push(-10);}if(e>2&&(t.types[e-2]==="template_string_else"||t.types[e-2]==="template_string_start")){if(i.script.bracePadding===true){h[e-2]=-10;h[e-1]=-10;}else {h[e-2]=-20;h[e-1]=-20;}}}function _e(){if(t.token[e-1]===","||t.token[e-1]===":"&&t.stack[e-1]!=="data_type"){h[e-1]=-10;}else {h[e-1]=-20;}if(t.types[e]==="type"||t.types[e]==="type_end"){h.push(-10);}if(t.types[e]==="type_start"){h.push(-20);}}function We(){if((u===")"||u==="x)")&&t.stack[e]==="class"&&(t.token[t.begin[e-1]-1]==="static"||t.token[t.begin[e-1]-1]==="final"||t.token[t.begin[e-1]-1]==="void")){h[e-1]=-10;h[t.begin[e-1]-1]=-10;}if(u==="]")h[e-1]=-10;if(A==="else"&&u==="}"){if(t.token[e-2]==="x}")h[e-3]=h[e-3]-1;if(i.script.braceAllman===true||i.script.elseNewline===true){h[e-1]=m;}}if(A==="new"&&f.has(t.token[e+1]));if(A==="from"&&C==="end"&&e>0&&(t.token[t.begin[e-1]-1]==="import"||t.token[t.begin[e-1]-1]===",")){h[e-1]=-10;}if(A==="function"){if(i.script.functionSpace===false&&e<$-1&&(t.token[e+1]==="("||t.token[e+1]==="x(")){h.push(-20);return}h.push(-10);return}if(u==="-"&&e>1){if(t.types[e-2]==="operator"||t.token[e-2]===","){h[e-1]=-20;}else if(t.types[e-2]==="start"){h[e-2]=-20;h[e-1]=-20;}}else if(A==="while"&&(u==="}"||u==="x}")){let T=e-1;let D=0;do{if(t.token[T]==="}"||t.token[T]==="x}")D=D+1;if(t.token[T]==="{"||t.token[T]==="x{")D=D-1;if(D===0){if(t.token[T-1]==="do"){h[e-1]=-10;break}h[e-1]=m;break}T=T-1;}while(T>-1)}else if(A==="in"||(A==="else"&&i.script.elseNewline===false&&i.script.braceAllman===false||A==="catch")&&(u==="}"||u==="x}")){h[e-1]=-10;}else if(A==="var"||A==="let"||A==="const"){X[X.length-1]=e;if(C==="end")h[e-1]=m;if(t.token[t.begin[e]-1]!=="for"){let T=e+1;let D=0;do{if(t.types[T]==="end")D=D-1;if(t.types[T]==="start")D=D+1;if(D<0||D===0&&(t.token[T]===";"||t.token[T]===",")){break}T=T+1;}while(T<$);if(t.token[T]===",")m=m+1;}h.push(-10);return}if((A==="default"||A==="case")&&C!=="word"&&t.stack[e]==="switch"){h[e-1]=m-1;h.push(-10);return}if(A==="catch"&&u==="."){h[e-1]=-20;h.push(-20);return}if(A==="catch"||A==="finally"){h[e-1]=-10;h.push(-10);return}if(i.script.bracePadding===false&&e<$-1&&t.token[e+1].charAt(0)==="}"){h.push(-20);return}if(t.stack[e]==="object"&&(u==="{"||u===",")&&(t.token[e+1]==="("||t.token[e+1]==="x(")){h.push(-20);return}if(t.types[e-1]==="comment"&&t.token[t.begin[e]]==="("){h[e-1]=m+1;}h.push(-10);}do{if(t.lexer[e]===w){n=t.types[e];A=t.token[e];if(n==="comment"){R();}else if(n==="regex"){h.push(-20);}else if(n==="string"){U();}else if(n.indexOf("template_string")===0){Pe();}else if(n==="separator"){re();}else if(n==="start"){Y();}else if(n==="end"){le();}else if(n==="type"||n==="type_start"||n==="type_end"){_e();}else if(n==="operator"){pe();}else if(n==="word"){We();}else if(n==="reference"){Ce();}else if(n==="markup"){Q();}else if(n.indexOf("template")===0){de();}else if(n==="generic"){if(u!=="return"&&u.charAt(0)!=="#"&&C!=="operator"&&u!=="public"&&u!=="private"&&u!=="static"&&u!=="final"&&u!=="implements"&&u!=="class"&&u!=="void"){h[e-1]=-20;}if(t.token[e+1]==="("||t.token[e+1]==="x("){h.push(-20);}else {h.push(-10);}}else {h.push(-10);}if(n!=="comment"){C=n;u=A;}if(v.length>0&&t.token[e]!==")"){if(t.types[e]==="comment"&&v[v.length-1]>-1){v[v.length-1]=i.wrap+1;}else if(h[e]>-1||t.token[e].charAt(0)==="`"&&t.token[e].indexOf(ce)>0){v[v.length-1]=-1;}else if(v[v.length-1]>-1){v[v.length-1]=v[v.length-1]+t.token[e].length;if(h[e]===-10)v[v.length-1]=v[v.length-1]+1;}}}else {ue();}e=e+1;}while(e<$);return h})();const L=(()=>{const e=[];const m=(()=>{const h=[];const M=i.indentChar;let y=i.indentSize;if(typeof y!=="number"||y<1)return "";do{h.push(M);y=y-1;}while(y>0);return h.join("")})();const _=i.crlf===true?"\r\n":ce;const Z=i.preserveLine+1;const n=["x;","x}","x{","x(","x)"];let A=q.start;let C="";let u=i.indentLevel;function X(h){const M=[];const y=(()=>{if(A===$-1)return 1;if(t.lines[A+1]-1>Z)return Z;if(t.lines[A+1]>1)return t.lines[A+1]-1;return 1})();let z=0;if(h<0)h=0;do{M.push(_);z=z+1;}while(z<y);if(h>0){z=0;do{M.push(m);z=z+1;}while(z<h)}return M.join(g)}if(i.script.vertical===true){let h=function(M){let y=0;let z=0;let b=M-1;let k=0;let d=0;const O=t.begin[A];const v=[];do{if((t.begin[b]===O||t.token[b]==="]"||t.token[b]===")")&&(t.token[b+1]===":"&&t.stack[b]==="object"||t.token[b+1]==="=")){k=b;z=0;do{if(t.begin[k]===O){if(t.token[k]===","||t.token[k]===";"||t.token[k]==="x;"||o[k]>-1&&t.types[k]!=="comment"){if(t.token[k+1]==="."){z=z+i.indentSize*i.indentChar.length;}break}}else if(o[k]>-1){break}if(t.types[k]!=="comment"){if(o[k-1]===-10)z=z+1;z=t.token[k].length+z;}k=k-1;}while(k>O);d=k;if(t.token[d]===","&&t.token[b+1]==="="){do{if(t.types[d]==="end")d=t.begin[d];if(t.begin[d]===O){if(t.token[d]===";"||t.token[d]==="x;")break;if(t.token[d]==="var"||t.token[d]==="const"||t.token[d]==="let"){z=z+i.indentSize*i.indentChar.length;break}}d=d-1;}while(d>O)}if(z>y)y=z;v.push([b,z]);b=k;}else if(t.types[b]==="end"){b=t.begin[b];}b=b-1;}while(b>O);b=v.length;if(b>0){do{b=b-1;k=v[b][1];if(k<y){do{t.token[v[b][0]]=t.token[v[b][0]]+ne;k=k+1;}while(k<y)}}while(b>0)}};A=$;do{A=A-1;if(t.lexer[A]==="script"){if(t.token[A]==="}"&&t.token[A-1]!=="{"&&o[t.begin[A]]>0){h(A);}}else {A=t.begin[A];}}while(A>0)}A=q.start;do{if(t.lexer[A]===w||q.beautify[t.lexer[A]]===void 0){if(t.types[A]==="comment"&&i.commentIndent===true){if(/\n/.test(t.token[A])){const h=t.begin[A]>-1?t.token[A].charAt(2)==="*"?$e(o[A],m)+i.indentChar:$e(o[A],m):i.indentChar;const M=t.token[A].split(/\n/);let y=1;do{M[y]=h+M[y].trimStart();y=y+1;}while(y<M.length);t.token.splice(A,1,M.join(ce));}}if(n.indexOf(t.token[A])<0){if(t.token[A]!==";"||i.script.noSemicolon===false){e.push(t.token[A]);}else if(o[A]<0&&t.types[A+1]!=="comment"){e.push(";");}}if(A<$-1&&t.lexer[A+1]!==w&&t.begin[A]===t.begin[A+1]&&t.types[A+1].indexOf("end")<0&&t.token[A]!==","){e.push(ne);}else if(o[A]>-1){if((o[A]>-1&&t.token[A]==="{"||o[A]>-1&&t.token[A+1]==="}")&&t.lines[A]<3&&i.script.braceNewline===true){if(t.lines[A+1]<3)e.push(X(0));}e.push(X(o[A]));u=o[A];}else if(o[A]===-10){e.push(ne);if(t.lexer[A+1]!==w)u=u+1;}}else {if(r[A]===A){e.push(t.token[A]);}else {q.end=r[A];q.start=A;const h=s.beautify(u);C=h.beautify.replace(Ee,g);e.push(C);A=q.iterator;if(o[A]===-10){e.push(ne);}else if(o[A]>-1){e.push(X(o[A]));}h.reset();}}A=A+1;}while(A<$);q.iterator=$-1;return e.join(g)})();return L};var ft={};vt(ft,{definitions:()=>qe,format:()=>tt,formatSync:()=>Nt,language:()=>Ze,options:()=>Je,parse:()=>Ot,parseSync:()=>Pt});var qe={language:{description:"The language name",lexer:"all",type:"select",default:"auto",values:[{rule:"auto",description:"Prettify will automatically detect the language"},{rule:"text",description:"Plain Text"},{rule:"html",description:"HTML"},{rule:"liquid",description:"HTML + Liquid"},{rule:"javascript",description:"JavaScript"},{rule:"jsx",description:"JSX"},{rule:"typescript",description:"TypeScript"},{rule:"tsx",description:"TSX"},{rule:"json",description:"JSON"},{rule:"css",description:"CSS"},{rule:"scss",description:"SCSS"},{rule:"less",description:"LESS"},{rule:"xml",description:"XML"}]},wrap:{default:0,description:"Character width limit before applying word wrap. A 0 value disables this option. A negative value concatenates script strings.",lexer:"all",type:"number"},indentSize:{default:2,description:'The number of "indentChar" values to comprise a single indentation.',lexer:"all",type:"number"},indentChar:{default:" ",description:"The string characters to comprise a single indentation. Any string combination is accepted.",lexer:"all",type:"string"},crlf:{default:false,description:"If line termination should be Windows (CRLF) format. Unix (LF) format is the default.",lexer:"all",type:"boolean"},endNewline:{default:false,description:"Insert an empty line at the end of output.",lexer:"all",type:"boolean"},preserveLine:{default:2,description:"The maximum number of consecutive empty lines to retain.",lexer:"all",type:"number"},preserveComment:{default:false,description:"Prevent comment reformatting due to option wrap.",lexer:"all",type:"boolean"},commentNewline:{default:false,description:"If a blank new line should be forced above comments.",lexer:"all",type:"boolean"},commentIndent:{default:false,description:"This will determine whether comments should always start at position 0 of each line or if comments should be indented according to the code.",lexer:"all",type:"boolean"},correct:{default:false,description:"Automatically correct some sloppiness in code.",lexer:"all",type:"boolean"},quoteConvert:{lexer:"all",description:"If the quotes should be converted to single quotes or double quotes.",type:"select",default:"none",values:[{rule:"none",description:"Ignores this option"},{rule:"single",description:"Converts double quotes to single quotes"},{rule:"double",description:"Converts single quotes to double quotes"}]},attributeSort:{default:false,description:"Alphanumerically sort markup attributes. Attribute sorting is ignored on tags that contain attributes template attributes.",lexer:"markup",type:"boolean"},attributeSortList:{default:[],description:"A comma separated list of attribute names. Attributes will be sorted according to this list and then alphanumerically. This option requires 'attributeSort' have a value of true.",lexer:"markup",type:"array"},attributeCasing:{default:"preserve",description:"Controls the casing of attribute values and keys.",type:"select",lexer:"markup",values:[{rule:"preserve",description:"All tag attribute keys/values are preserved and left intact."},{rule:"lowercase",description:"All tag attribute keys/values are converted to lowercase"},{rule:"lowercase-name",description:"Only attribute keys are converted to lowercase"},{rule:"lowercase-value",description:"Only attribute values are converted to lowercase"}]},delimiterTrims:{default:"preserve",description:"How delimiter whitespace trim dashes should handled on Liquid tokens. You should avoid setting this to force in order to avoid stripping whitespace between text content.",lexer:"markup",type:"select",values:[{rule:"preserve",description:"All trim dash occurances of trims intact"},{rule:"strip",description:"Removes all trim dash occurances for tags and output tokens"},{rule:"force",description:"Applies trime dashes to all tags and output tokens"},{rule:"tags",description:"Applies trim dashes to tags tokens only"},{rule:"output",description:"Applies trim dashes to output object tokens only"}]},forceAttribute:{default:false,description:"If all markup attributes should be indented each onto their own line. This option accepts either a boolean or number value, depending on your preferences you can either force attributes based a count limit, disable forcing or always enable enforcing.",lexer:"markup",type:["number","boolean"],multi:{number:{default:1,description:"Optionally define an attribute force threshold. When the number of attributes exceeds this limit then they will be forced, otherwise they will be left intact."},boolean:{default:false,description:"Whether or not to enforce the rule. A value of true will always force attributes, whereas a value of false will never force attributes."}}},forceLeadAttribute:{default:false,description:"Forces leading attribute onto a newline when using wrap based indentation.",lexer:"markup",type:"boolean"},forceIndent:{default:false,description:"Will force indentation upon all content and tags without regard for the creation of new text nodes.",lexer:"markup",type:"boolean"},normalizeSpacing:{default:true,description:"Whether or not to normalize the distributed spacing contained in Liquid tokens.",lexer:"markup",type:"boolean"},preserveAttributes:{default:false,description:"If markup tags should have their insides preserved. This option is only available to markup and does not support child tokens that require a different lexer.",lexer:"markup",type:"boolean"},preserveText:{default:false,description:"If text in the provided markup code should be preserved exactly as provided. This option eliminates beautification and wrapping of text content.",lexer:"markup",type:"boolean"},selfCloseSpace:{default:false,description:'Markup self-closing tags end will end with " />" instead of "/>".',lexer:"markup",type:"boolean"},lineBreakSeparator:{default:"default",description:"Controls the placement of Liquid tag separator type characters in newline structures.",lexer:"markup",type:"select",values:[{rule:"default",description:"Leave line break character intace"},{rule:"before",description:"Place line break character at the start of expressions"},{rule:"after",description:"Place line break character at the end of expressions"}]},ignoreScripts:{default:false,description:"Whether to ignore embedded regions of tags identified to contain JavaScript",lexer:"markup",type:"boolean"},ignoreStyles:{default:false,description:"Whether to ignore embedded regions of tags identified to contain CSS",lexer:"markup",type:"boolean"},classPadding:{description:"Inserts new line characters between every CSS code block.",default:false,type:"boolean",lexer:"style"},sortSelectors:{default:false,type:"boolean",description:"If comma separated CSS selectors should present on a single line of code.",lexer:"style"},sortProperties:{lexer:"style",description:"This option will alphabetically sort CSS properties contained within classes.",default:false,type:"boolean"},noLeadZero:{lexer:"style",description:"This will eliminate leading zeros from numbers expressed within values.",default:false,type:"boolean"},compressCSS:{lexer:"style",description:"If CSS should be beautified in a style where the properties and values are minifed for faster reading of selectors.",default:false,type:"boolean"},braceAllman:{lexer:"script",default:false,description:'Determines if opening curly braces will exist on the same line as their condition or be forced onto a new line, otherwise known as "Allman Style" indentation.',type:"boolean"},bracePadding:{default:false,description:"This will create a newline before and after objects values",type:"boolean",lexer:"script"},braceNewline:{default:false,description:"If true an empty line will be inserted after opening curly braces and before closing curly braces.",type:"boolean",lexer:"script"},braceStyle:{default:"none",description:"Emulates JSBeautify's brace_style option using existing Prettify options",type:"select",lexer:"script",values:[{rule:"none",description:"Ignores this option"},{rule:"collapse",description:"Sets formatObject to indent and neverflatten to true."},{rule:"collapse-preserve-inline",description:"Sets formatObject to inline and bracePadding to true"},{rule:"expand",description:"Sets objectIndent to indent and braceNewline + neverflatten to true."}]},arrayFormat:{lexer:"script",description:"Determines if all array indexes should be indented, never indented, or left to the default",type:"select",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},objectSort:{default:false,description:"This option will alphabetically sort object properties in JSON objects",type:"boolean",lexer:"script"},objectIndent:{description:"This option will alphabetically sort object properties in JSON objects",type:"select",lexer:"script",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},functionSpace:{lexer:"script",default:true,type:"boolean",description:"Inserts a space following the function keyword for anonymous functions."},functionNameSpace:{lexer:"script",default:true,type:"boolean",description:"If a space should follow a JavaScript function name."},methodChain:{lexer:"script",default:-1,description:"When to break consecutively chained methods and properties onto separate lines. A negative value disables this option. A value of 0 ensures method chainsare never broken.",type:"number"},caseSpace:{default:false,type:"boolean",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation thereby keeping the case on a single line of code.",lexer:"script"},elseNewline:{lexer:"script",default:false,type:"boolean",description:'If keyword "else" is forced onto a new line.'},ternaryLine:{lexer:"script",description:"If ternary operators in JavaScript `?` and `:` should remain on the same line.",type:"boolean",default:false},neverFlatten:{lexer:"script",default:true,description:"If destructured lists in script should never be flattend.",type:"boolean"},variableList:{lexer:"script",description:"If consecutive JavaScript variables should be merged into a comma separated list or if variables in a list should be separated. each \u2014 Ensure each reference is a single declaration statement.",type:"select",default:"none",values:[{rule:"none",description:"Ignores this option"},{rule:"each",description:"Ensure each reference is a single declaration statement"},{rule:"list",description:"Ensure consecutive declarations are a comma separated list"}]},vertical:{lexer:"script",description:"If lists of assignments and properties should be vertically aligned",type:"boolean",default:false},noCaseIndent:{lexer:"script",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation, thereby keeping the case on a single line of code.",default:false,type:"boolean"},noSemicolon:{lexer:"script",description:"Removes semicolons that would be inserted by ASI. This option is in conflict with option `attemptCorrection` and takes precedence over conflicting features. Use of this option is a possible security/stability risk.",default:false,type:"boolean"},endComma:{description:"If there should be a trailing comma in arrays and objects.",type:"select",lexer:"script",default:"none",values:[{rule:"none",description:"Ignore this option"},{rule:"always",description:"Always ensure there is a tailing comma"},{rule:"never",description:"Remove trailing commas"}]}};function wt(i){const f=i.source.search(bt);const p=i.source.search(mt);const a=Me(qe);const r=a.length;let t=0;if(p>-1&&i.source.slice(0,p).trimStart()===g)return false;if(f>-1&&(f===0||`"':`.indexOf(i.source.charAt(f-1))<0)){let M=function(){if(L.charAt(m-1)!=="\\")return false;let y=m;do{y=y-1;}while(y>0&&L.charAt(y)==="\\");return (m-y)%2===0};const $=[];const o=f;const L=i.source;const e=L.length;let m=o;let _=0;let Z=g;let n=g;let A=g;let C=g;let u=[];let X=[];let ee;let h;if(c(L[m],60)){h="<!--";}else if(c(L[m+1],47)){h="//";}else if(c(L[m+1],37)){ee=L.indexOf("}",m+1);if(c(L[ee-1],37))h=L.slice(m,ee+1);}else {h="/*";}do{if(L.slice(m-9,m)==="@prettify")break;m=m+1;}while(m<e);do{if(M()===false){if(Z===g){if(c(L[m],34)||c(L[m],39)||c(L[m],96)){Z=L.charAt(m);if($.length>0&&$[$.length-1].charAt($[$.length-1].length-1)===":")_=m;}else if(/\s/.test(L.charAt(m))===false&&_===0){_=m;}else if(c(L[m],44)||be(L.charAt(m))===true&&_>0){n=L.slice(_,m);if($.length>0){if($.length>0&&c(n,58)&&$[$.length-1].indexOf(":")<0){$[$.length-1]=$[$.length-1]+n;_=m;}else if($.length>0&&$[$.length-1].charAt($[$.length-1].length-1)===":"){$[$.length-1]=$[$.length-1]+n;_=0;}else {$.push(n);_=0;}}else {$.push(n);_=0;}}if(h==="<!--"&&L.slice(m-2,m+1)==="-->")break;if(h==="//"&&L.charAt(m)==="\n")break;if(h==="/*"&&L.slice(m-1,m+1)==="*/")break;if(h.charCodeAt(1)===37&&L.slice(m-1,m+1)==="%"&&L.indexOf("endcomment",L.indexOf("{%",ee))>0)break}else if(L.charAt(m)===Z&&Z!=="${"){Z=g;}else if(Z==="`"&&L.slice(m,m+2)==="${"){Z="${";}else if(Z==="${"&&L.charAt(m)==="}"){Z="`";}}m=m+1;}while(m<e);if(_>0){Z=L.slice(_,m+1);if(h==="<!--")Z=Z.replace(/\s*-+>$/,g);else if(h==="//")Z=Z.replace(/\s+$/,g);else Z=Z.replace(/\s*\u002a\/$/,g);$.push(Z);}m=$.length;if(m>0){do{m=m-1;if($[m].indexOf(":")>0){X=[$[m].slice(0,$[m].indexOf(":")),$[m].slice($[m].indexOf(":")+1)];}else if(qe[$[m]]!==void 0&&qe[$[m]].type==="boolean"){i.options[$[m]]=true;}if(X.length===2&&qe[X[0]]!==void 0){if(X[1].charAt(X[1].length-1)===X[1].charAt(0)&&(X[1].charAt(0)==='"'||X[1].charAt(0)==="'"||X[1].charAt(0)==="`")){X[1]=X[1].slice(1,X[1].length-1);}if(qe[X[0]].type==="number"&&isNaN(Number(X[1]))===false){i.options[X[0]]=Number(X[1]);}else if(qe[X[0]].type==="boolean"){i.options[X[0]]=X[1]==="true";}else {if(qe[X[0]].values!==void 0){u=Me(qe[X[0]].values);_=u.length;do{_=_-1;if(u[_]===X[1]){i.options[X[0]]=X[1];break}}while(_>0)}else {if(X[0]==="language"){A=X[1];}else if(X[0]==="lexer"){C=X[1];}i.options[X[0]]=X[1];}}}}while(m>0);if(C===g&&A!==g)C=ct(A);}}if(i.options.lexer==="script"){if(i.options.script.styleGuide!==void 0){switch(i.options.script.styleGuide){case"airbnb":i.options.wrap=80;i.options.indentChar=" ";i.options.indentSize=2;i.options.preserveLine=1;i.options.script.correct=true;i.options.script.quoteConvert="single";i.options.script.variableList="each";i.options.script.endComma="always";i.options.script.bracePadding=true;break;case"crockford":i.options.indentChar=" ";i.options.indentSize=4;i.options.script.correct=true;i.options.script.bracePadding=false;i.options.script.elseNewline=false;i.options.script.endComma="never";i.options.script.noCaseIndent=true;i.options.script.functionSpace=true;i.options.script.variableList="each";i.options.script.vertical=false;break;case"google":i.options.wrap=-1;i.options.indentChar=" ";i.options.indentSize=4;i.options.preserveLine=1;i.options.script.correct=true;i.options.script.quoteConvert="single";i.options.script.vertical=false;break;case"jquery":i.options.wrap=80;i.options.indentChar=" ";i.options.indentSize=1;i.options.script.correct=true;i.options.script.bracePadding=true;i.options.script.quoteConvert="double";i.options.script.variableList="each";break;case"jslint":i.options.indentChar=" ";i.options.indentSize=4;i.options.script.correct=true;i.options.script.bracePadding=false;i.options.script.elseNewline=false;i.options.script.endComma="never";i.options.script.noCaseIndent=true;i.options.script.functionSpace=true;i.options.script.variableList="each";i.options.script.vertical=false;break;case"standard":i.options.wrap=0;i.options.indentChar=" ";i.options.indentSize=2;i.options.endNewline=false;i.options.preserveLine=1;i.options.script.correct=true;i.options.script.noSemicolon=true;i.options.script.endComma="never";i.options.script.braceNewline=false;i.options.script.bracePadding=false;i.options.script.braceAllman=false;i.options.script.quoteConvert="single";i.options.script.functionSpace=true;i.options.script.ternaryLine=false;i.options.script.variableList="each";i.options.script.vertical=false;break;case"yandex":i.options.script.correct=true;i.options.script.bracePadding=false;i.options.script.quoteConvert="single";i.options.script.variableList="each";i.options.script.vertical=false;break}}if(i.options.script.braceStyle!==void 0){switch(i.options.script.braceStyle){case"collapse":i.options.script.braceNewline=false;i.options.script.bracePadding=false;i.options.script.braceAllman=false;i.options.script.objectIndent="indent";i.options.script.neverFlatten=true;break;case"collapse-preserve-inline":i.options.script.braceNewline=false;i.options.script.bracePadding=true;i.options.script.braceAllman=false;i.options.script.objectIndent="indent";i.options.script.neverFlatten=false;break;case"expand":i.options.script.braceNewline=false;i.options.script.bracePadding=false;i.options.script.braceAllman=true;i.options.script.objectIndent="indent";i.options.script.neverFlatten=true;break}}if(i.options.language==="json")i.options.wrap=0;}do{if(i.options[Me[t]]!==void 0){qe[Me[t]].lexer.length;}t=t+1;}while(t<r)}function jt(i){const{source:f,options:p}=i;const{lexer:a,language:r}=p;if(typeof i.lexers[a]==="function"){i.lexers[a](`${f} `);}else {s.error=`Specified lexer, ${a}, is not a function.`;}let t=0;let w=0;const E=Me(s.data);const $=E.length;do{w=t+1;do{if(s.data[E[t]].length!==s.data[E[w]].length){s.error=`"${E[t]}" array is of different length than "${E[w]}"`;break}w=w+1;}while(w<$);t=t+1;}while(t<$-1);if(s.data.begin.length>0){if(a==="script"&&(r==="json"&&p.json.objectSort===true||p.language!=="json"&&p.script.objectSort===true)){s.sortCorrect(0,s.count+1);}else if(a==="style"&&p.style.sortProperties===true){s.sortCorrect(0,s.count+1);}}return s.data}function St(i){const f=Date.now();const p={language:i,chars:-1};return a=>{p.chars=a;p.size=pt(a);p.time=(Date.now()-f).toFixed(1);return p}}function Rt(i){const{languageName:f}=Oe(i.options.language);const p=i.options.crlf===true?"\r\n":"\n";const a=i.source.match(/\n/g);const r=St(f);let t=g;if(a===null){if(i.options.endNewline)t=p;i.stats=r(t.length);}else {t=a[0].length>i.options.preserveLine?$e(i.options.preserveLine,p):$e(a[0].length,p);if(i.options.endNewline)t+=p;i.stats=r(t.length);}return t}function Ye(i){i.data=s.full();if(!/\S/.test(i.source))return Rt(i);if(i.options.language==="text"){i.options.language="text";i.options.languageName="Plain Text";i.options.lexer="markup";}else if(i.options.language==="auto"||i.options.language===void 0){const{lexer:t,language:w,languageName:E}=Ze(i.source);if(w==="unknown"){console.warn("Prettify: unknown and/or unsupport language");console.info("Prettify: define a support language (fallback is HTML)");}i.options.lexer=t;i.options.language=w;i.options.languageName=E;}else {const{lexer:t,language:w,languageName:E}=Oe(i.options.language);if(w==="unknown"){console.warn(`Prettify: unsupport ${i.options.language}`);console.info("Prettify: language is not supported (fallback is HTML)");}i.options.lexer=t;i.options.language=w;i.options.languageName=E;}const f=St(i.options.languageName);const p=i.mode;const a=i.options.crlf===true?"\r\n":"\n";let r=i.source;if(wt(i)===false){i.stats=f(r.length);return r}i.data=jt(i);if(p==="parse"){i.stats=f(r.length);return s.data}r=i.beautify[i.options.lexer](i.options);r=i.options.endNewline===true?r.replace(/\s*$/,a):r.replace(/\s+$/,g);i.stats=f(r.length);i.end=0;i.start=0;return r}tt.before=i=>q.hooks.before.push(i);tt.after=i=>q.hooks.after.push(i);Je.listen=i=>q.hooks.rules.push(i);Ke(tt,"stats",{get(){return q.stats}});Ke(Ot,"stats",{get(){return q.stats}});Ke(Je,"rules",{get(){return q.options}});function Nt(i,f){q.source=i;if(typeof f==="object")q.options=Je(f);if(q.hooks.before.length>0){for(const a of q.hooks.before){if(a(q.options,i)===false)return i}}const p=Ye(q);if(q.hooks.after.length>0){for(const a of q.hooks.after){if(a.call(s.data,p,q.options)===false)return i}}if(s.error.length)throw new Error(s.error);return p}function tt(i,f){q.source=i;if(typeof f==="object")q.options=Je(f);if(q.hooks.before.length>0){for(const a of q.hooks.before){if(a(q.options,i)===false)return i}}const p=Ye(q);if(q.hooks.after.length>0){for(const a of q.hooks.after){if(a.call(s.data,p,q.options)===false)return i}}return new Promise((a,r)=>{if(s.error.length)return r(s.error);return a(p)})}function Je(i){for(const f of Me(i)){if(f in qe&&qe[f].lexer==="auto"){q.options[f]=i[f];}else if(f==="markup"){je(q.options.markup,i.markup);}else if(f==="script"){je(q.options.script,i.script);}else if(f==="style"){je(q.options.style,i.style);}else if(f==="json"){je(q.options.json,i.json);}else if(f==="grammar"){ke.extend(i.grammar);}else if(f in q.options){q.options[f]=i[f];}}if(q.hooks.rules.length>0){for(const f of q.hooks.rules)f(q.options);}return q.options}function Ot(i,f){q.source=i;q.mode="parse";if(typeof f==="object")q.options=Je(f);const p=Ye(q);return new Promise((a,r)=>{if(s.error.length)return r(s.error);return a(p)})}function Pt(i,f){q.source=i;q.mode="parse";if(typeof f==="object")q.options=Je(f);const p=Ye(q);if(s.error.length)throw new Error(s.error);return p}
module.exports = ft;